]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
Fix gdbserver regression exposed by gdb.threads/multi-create-ns-info-thr.exp
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
94c207e0
PA
12017-09-29 Pedro Alves <palves@redhat.com>
2
3 * linux-low.c (handle_extended_wait): Pass parent thread instead
4 of process to thread_db_notice_clone.
5 * linux-low.h (thread_db_notice_clone): Replace parent process
6 parameter with parent thread parameter.
7 * thread-db.c (find_one_thread): Add comment.
8 (thread_db_notice_clone): Replace parent process parameter with
9 parent thread parameter. Temporarily switch to the parent thread.
10
75352e28
SDJ
112017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
12
13 * gdbthread.h: Include "common-gdbthread.h".
14 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
15 "if" when validating the ptid.
16 * remote-utils.c: Include "gdbthread.h".
17 (prepare_resume_reply): Use "switch_to_thread".
18 * target.c (done_accessing_memory): Likewise.
19
ad339634
AA
202017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
21
22 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
23 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
24 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
25 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
26 s390x-gs-linux64-ipa.o to ipa_obj.
27 * linux-s390-low.c (HWCAP_S390_GS): New define.
28 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
29 New functions.
30 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
31 (s390_arch_setup): Check for guarded-storage support and choose
32 appropriate tdesc.
33 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
34 init_registers_s390x_gs_linux64.
35 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
36 enum value.
37 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
38 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
39
cc4d742f
SM
402017-09-22 Simon Marchi <simon.marchi@ericsson.com>
41
42 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
43
f6327dcb
KB
442017-09-21 Kevin Buettner <kevinb@redhat.com>
45
46 * linux-low.h (struct lwp_info): Add new field, thread_handle.
47 (thread_db_thread_handle): Declare.
48 * linux-low.c (linux_target_ops): Initialize thread_handle.
49 * server.c (handle_qxfer_threads_worker): Add support for
50 "handle" attribute.
51 * target.h (struct target_ops): Add new function pointer,
52 thread_handle.
53 (target_thread_handle): Define.
54 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
55 field in lwp.
56 (thread_db_thread_handle): New function.
57
86299109
KB
582017-09-21 Kevin Buettner <kevinb@redhat.com>
59
60 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
61 * linux-low.h (thread_db_notice_clone): Declare.
62 * thread-db.c (thread_db_notice_clone): New function.
63
f557a88a
PA
642017-09-21 Pedro Alves <palves@redhat.com>
65
66 * server.c (gdb_read_memory, handle_status, process_serial_event)
67 (handle_serial_event, handle_target_event): Adjust to
68 set_desired_thread prototype change.
69 * target.c (set_desired_thread): Remove 'use_general' parameter
70 and adjust.
71 * target.h (set_desired_thread): Remove 'use_general' parameter.
72
223ffa71
TT
732017-09-20 Tom Tromey <tom@tromey.com>
74
75 * target.c (target_terminal::terminal_state): Define.
76 (target_terminal::init): Rename from target_terminal_init.
77 (target_terminal::inferior): Rename from
78 target_terminal_inferior.
79 (target_terminal::ours): Rename from target_terminal_ours.
80 (target_terminal::ours_for_output, target_terminal::info): New.
81
04fd3ba9
SM
822017-09-16 Simon Marchi <simon.marchi@ericsson.com>
83
84 * server.c (accumulate_file_name_length): Remove.
85 (emit_dll_description): Adjust to std::string change.
86 (handle_qxfer_libraries): Use std::string to hold document.
87
5e187554
SM
882017-09-16 Simon Marchi <simon.marchi@ericsson.com>
89
90 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
91 return type of xml_escape_text.
92 * server.c (emit_dll_description): Likewise.
93
1526853e
SM
942017-09-16 Simon Marchi <simon.marchi@ericsson.com>
95
96 * server.c (captured_main): Accept argument for --selftest.
97 Update run_tests call.
98 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
99 when registering selftests.
100
c4dfafab
SDJ
1012017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
102
103 * regcache.c (get_thread_regcache): Update code to use "std::vector"
104 instead of "VEC" for "target_desc.reg_defs".
105 (regcache_cpy): Likewise.
106 (registers_to_string): Likewise.
107 (registers_from_string): Likewise.
108 (find_regno): Likewise.
109 (supply_regblock): Likewise.
110 (regcache_raw_read_unsigned): Likewise.
111 * tdesc.c (init_target_desc): Likewise.
112 (tdesc_create_reg): Likewise.
113 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
114 (struct target_desc) <reg_defs>: Convert to "std::vector".
115 (target_desc): Do not initialize "reg_defs".
116 (~target_desc): Update code to use "std::vector" instead of "VEC"
117 for "target_desc.reg_defs".
118 (operator==): Likewise.
119
124aceb4
SM
1202017-09-15 Simon Marchi <simon.marchi@ericsson.com>
121
122 * inferiors.h (thread_to_gdb_id): Remove.
123 * inferiors.c (thread_to_gdb_id): Remove.
124 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
125 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
126 lynx_store_registers, lynx_read_memory, lynx_write_memory):
127 Likewise.
128 * nto-low.c (nto_fetch_registers, nto_store_registers,
129 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
130
96cde54f
SM
1312017-09-15 Simon Marchi <simon.marchi@ericsson.com>
132
133 * inferiors.h (gdb_id_to_thread_id): Remove.
134 * inferiors.c (gdb_id_to_thread_id): Remove.
135 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
136 removal. Move pid declaration closer to where it's used.
137
e8ca139e
SM
1382017-09-15 Simon Marchi <simon.marchi@ericsson.com>
139
140 * server.c (handle_detach): New function.
141 (process_serial_event): Move code out, call handle_detach.
142
f8a4e119
SM
1432017-09-15 Simon Marchi <simon.marchi@ericsson.com>
144
145 * server.c (require_running): Rename to ...
146 (require_running_or_return): ... this ...
147 (require_running_or_break): ... and this.
148 (handle_query, process_serial_event): Adjust.
149
0eb0a407
SM
1502017-09-15 Simon Marchi <simon.marchi@ericsson.com>
151
152 * linux-low.c (linux_set_resume_request): Remove unused
153 variables.
154
785922a5
SM
1552017-09-15 Simon Marchi <simon.marchi@ericsson.com>
156
157 * server.c (first_thread_of): Remove.
158 (process_serial_event): Replace usage of first_thread_of with
159 find_any_thread_of_pid.
160 * tracepoint.c (same_process_p): Remove.
161 (gdb_agent_about_to_close): Replace usage of same_process_p with
162 find_any_thread_of_pid.
163 * linux-x86-low.c (same_process_callback): Remove.
164 (x86_arch_setup_process_callback): Replace usage of
165 same_process_callback with find_any_thread_of_pid.
166 * thread-db.c (any_thread_of): Remove.
167 (switch_to_process): Replace usage of any_thread_of with
168 find_any_thread_of_pid.
169 * inferiors.c (thread_pid_matches_callback): Remove.
170 (find_thread_process): Adjust to use find_any_thread_of_pid.
171
a059f00c
SDJ
1722017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
173
174 * regcache.c (get_thread_regcache): Guard calls to "memset"
175 with "!VEC_empty".
176
cc397f3a
SDJ
1772017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
178
179 * linux-low.c (handle_extended_wait): Use
180 "allocate_target_description" instead of "XNEW".
181 * linux-x86-low.c (initialize_low_arch): Likewise.
182
22916b07
YQ
1832017-09-05 Yao Qi <yao.qi@linaro.org>
184
185 * configure.srv (srv_i386_regobj): Remove.
186 (srv_amd64_regobj): Remove.
187 (srv_regobj): Set it to "" for x86 non-linux targets.
188 * linux-x86-tdesc.c (i386_linux_read_description):
189 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
190 (init_registers_i386): Remove the declaration.
191 (tdesc_i386): Remove the declaration.
192 (lynx_i386_arch_setup): Call i386_create_target_description.
193 * nto-x86-low.c: Likewise.
194 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
195 [!__x86_64__]: include arch/i386.h.
196 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
197
38602d55
YQ
1982017-09-05 Yao Qi <yao.qi@linaro.org>
199
200 * configure.srv (srv_amd64_linux_xmlfiles): Remove
201 i386/amd64-XXX-linux from it.
202
44b886ff
YQ
2032017-09-05 Yao Qi <yao.qi@linaro.org>
204
205 * configure.srv: Empty srv_amd64_linux_regobj if $development is
206 false.
207 (ipa_amd64_linux_regobj): Remove.
208 (ipa_x32_linux_regobj): Remove.
209
b4570e4b
YQ
2102017-09-05 Yao Qi <yao.qi@linaro.org>
211
212 * Makefile.in (arch-amd64.o): New rule.
213 * configure.srv: Append arch-amd64.o.
214 * linux-amd64-ipa.c: Include common/x86-xstate.h.
215 (get_ipa_tdesc): Call amd64_linux_read_description.
216 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
217 and init_registers_amd64_XXX.
218 * linux-x86-low.c (x86_linux_read_description): Call
219 amd64_linux_read_description.
220 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
221 (initialize_low_arch): Don't call init_registers_x32_XXX and
222 init_registers_amd64_XXX.
223 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
224 and tdesc_amd64_XXX.
225 [__x86_64__] (amd64_tdesc_test): New function.
226 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
227 and init_registers_amd64_XXX.
228 * linux-x86-tdesc.c: Include arch/amd64.h.
229 (xcr0_to_tdesc_idx): New function.
230 (i386_linux_read_description): New function.
231 (amd64_get_ipa_tdesc_idx): New function.
232 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
233 (amd64_get_ipa_tdesc): Declare.
234
d1f28ea2
YQ
2352017-09-05 Yao Qi <yao.qi@linaro.org>
236
237 * configure.srv (srv_i386_linux_xmlfiles): Remove
238 i386/i386-XXX-linux.xml from it.
239
25a93583
YQ
2402017-09-05 Yao Qi <yao.qi@linaro.org>
241
242 * configure.srv: Set srv_i386_linux_regobj empty if $development
243 is false.
244 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
245 initialize_low_tdesc.
246 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
247 with #if initialize_low_tdesc.
248 * linux-x86-tdesc-selftest.c: New file.
249 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
250
5f035c07
YQ
2512017-09-05 Yao Qi <yao.qi@linaro.org>
252
253 * Makefile.in (arch-i386.o): New rule.
254 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
255 (x86_64-*-linux*): Likewise.
256 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
257 include arch/i386.h.
258 (i386_linux_read_description): Remove code and call
259 i386_create_target_description.
260 * tdesc.c (allocate_target_description): New function.
261 * tdesc.h (set_tdesc_architecture): Remove declaration.
262 (set_tdesc_osabi): Likewise.
263
0abe8a89
YQ
2642017-09-05 Yao Qi <yao.qi@linaro.org>
265
266 * linux-x86-tdesc.c: Don't include <inttypes.h>.
267 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
268 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
269 .xmltarget.
270 * server.c (get_features_xml): Call tdesc_get_features_xml.
271 * tdesc.c (set_tdesc_architecture): New function.
272 (set_tdesc_osabi): New function.
273 (tdesc_get_features_xml): New function.
274 (tdesc_create_feature): Add an argument.
275 * tdesc.h (struct target_desc) <features>: New field.
276 <arch, osabi>: New field.
277 (~target_desc): xfree features, arch, and osabi.
278 (target_desc::oerator==): Don't compare .xmltarget.
279 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
280 (set_tdesc_osabi): Likewise.
281 (tdesc_get_features_xml): Likewise.
282
0a188386
YQ
2832017-09-05 Yao Qi <yao.qi@linaro.org>
284
285 * linux-x86-tdesc.c: Include selftest.h.
286 (i386_tdesc_test): New function.
287 (initialize_low_tdesc): Call selftests::register_test.
288 * tdesc.h: Include regdef.h.
289 (target_desc): Override operator == and !=.
290
f49ff000
YQ
2912017-09-05 Yao Qi <yao.qi@linaro.org>
292
293 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
294 (ipa_obj): Likewise.
295 * linux-i386-ipa.c: Include common/x86-xstate.h
296 (get_ipa_tdesc): Call i386_linux_read_description.
297 (initialize_low_tracepoint): Don't call init_registers_XXX
298 functions, call initialize_low_tdesc instead.
299 * linux-x86-low.c (x86_linux_read_description): Call
300 i386_linux_read_description.
301 (initialize_low_arch): Don't call init_registers_i386_XXX
302 functions, call initialize_low_tdesc.
303 * linux-x86-tdesc.c: New file.
304 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
305 (i386_get_ipa_tdesc_idx): Declare.
306 (i386_get_ipa_tdesc): Declare.
307 (initialize_low_tdesc): Declare.
308
2b68ef2f
YQ
3092017-09-05 Yao Qi <yao.qi@linaro.org>
310
311 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
312 instead of 0.
313
f7000548
YQ
3142017-09-05 Yao Qi <yao.qi@linaro.org>
315
316 * Makefile.in (IPA_OBJS): Add vec-ipa.o
317 * regcache.c (get_thread_regcache): Use VEC_length.
318 (init_register_cache): Likewise.
319 (regcache_cpy): Likewise.
320 (registers_to_string): Iterate reg_defs via VEC_iterate.
321 (find_regno): Likewise.
322 (find_register_by_number): Use VEC_index.
323 (register_size): Call find_register_by_number.
324 (register_data): Call find_register_by_number.
325 (supply_regblock): Use VEC_length.
326 (regcache_raw_read_unsigned): Likewise.
327 * tdesc.c (init_target_desc): Iterate reg_defs via
328 VEC_iterate.
329 (default_description): Update initializer.
330 (copy_target_description): Don't update field num_registers.
331 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
332 <num_registers>: Remove.
333
50a421ac
SM
3342017-09-04 Simon Marchi <simon.marchi@ericsson.com>
335
336 * Makefile.in (.SECONDARY): Define target.
337
23fdd69e
SM
3382017-09-03 Simon Marchi <simon.marchi@ericsson.com>
339
340 * linux-low.c (linux_wait_1): Adjust.
341 * server.c (queue_stop_reply_callback): Adjust.
342
0a2dde4a
SDJ
3432017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
344
345 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
346 QEnvironmentUnset and QEnvironmentReset packets.
347 (handle_query): Inform remote that QEnvironmentHexEncoded,
348 QEnvironmentUnset and QEnvironmentReset are supported.
349
6afd337d
SM
3502017-08-25 Simon Marchi <simon.marchi@ericsson.com>
351
352 * inferiors.h (inferior_target_data): Rename to ...
353 (thread_target_data): ... this.
354 (inferior_regcache_data): Rename to ...
355 (thread_regcache_data): ... this.
356 (set_inferior_regcache_data): Rename to ...
357 (set_thread_regcache_data): ... this.
358 * inferiors.c (inferior_target_data): Rename to ...
359 (thread_target_data): ... this.
360 (inferior_regcache_data): Rename to ...
361 (thread_regcache_data): ... this.
362 (set_inferior_regcache_data): Rename to ...
363 (set_thread_regcache_data): ... this.
364 (free_one_thread): Update.
365 * linux-low.h (get_thread_lwp): Update.
366 * regcache.c (get_thread_regcache): Update.
367 (regcache_invalidate_thread): Update.
368 (free_register_cache_thread): Update.
369 * win32-i386-low.c (update_debug_registers_callback): Update.
370 (win32_get_current_dr): Update.
371 * win32-low.c (thread_rec): Update.
372 (delete_thread_info): Update.
373 (continue_one_thread): Update.
374 (suspend_one_thread): Update.
375
a160cc46
SM
3762017-08-24 Simon Marchi <simon.marchi@ericsson.com>
377
378 * inferiors.c (set_inferior_target_data): Remove.
379 * inferiors.h (set_inferior_target_data): Remove.
380
6d580b63
YQ
3812017-08-18 Yao Qi <yao.qi@linaro.org>
382
383 * Makefile.in (OBS): Add selftest.o.
384 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
385 * configure, config.in: Re-generated.
386 * server.c: Include common/sefltest.h.
387 (captured_main): Handle option --selftest.
388
f5a29eb0
YQ
3892017-08-09 Yao Qi <yao.qi@linaro.org>
390
391 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
392 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
393 i386-avx-mpx.o and i386-mmx.o.
394 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
395 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
396 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
397 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
398 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
399 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
400 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
401 i386/amd64-avx-mpx.xml.
402
57757c2f
YQ
4032017-08-09 Yao Qi <yao.qi@linaro.org>
404
405 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
406 and x32-avx-avx512.o.
407 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
408 i386/x32-avx-avx512.xml.
409
229d26fc
SM
4102017-07-26 Simon Marchi <simon.marchi@ericsson.com>
411
412 * tracepoint.h (enum class fast_tpoint_collect_result): New
413 enumeration.
414 (fast_tracepoint_collecting): Change return type to
415 fast_tpoint_collect_result.
416 * tracepoint.c (fast_tracepoint_collecting): Likewise.
417 * linux-low.h: Include tracepoint.h.
418 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
419 fast_tpoint_collect_result.
420 * linux-low.c (handle_tracepoints): Adjust.
421 (linux_fast_tracepoint_collecting): Change return type to
422 fast_tpoint_collect_result.
423 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
424 linux_wait_1, stuck_in_jump_pad_callback,
425 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
426 proceed_one_lwp): Adjust to type change.
427
2e1e43e1
YQ
4282017-07-10 Yao Qi <yao.qi@linaro.org>
429
430 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
431
adc764e7
YQ
4322017-06-29 Yao Qi <yao.qi@linaro.org>
433
434 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
435 Remove.
436 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
437
a206891a
SM
4382017-06-20 Simon Marchi <simon.marchi@ericsson.com>
439
440 * Makefile.in (IPA_OBJS): Sort and format one item per line.
441
9a6c7d9c
SDJ
4422017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
443
444 * linux-low.c (linux_create_inferior): Adjust code to access the
445 environment information via 'gdb_environ' class.
446 * lynx-low.c (lynx_create_inferior): Likewise.
447 * server.c (our_environ): Make it an instance of 'gdb_environ'.
448 (get_environ): Return a pointer to 'our_environ'.
449 (captured_main): Initialize 'our_environ'.
450 * server.h (get_environ): Adjust prototype.
451 * spu-low.c (spu_create_inferior): Adjust code to access the
452 environment information via 'gdb_environ' class.
453
ae3e2ccf
SM
4542017-06-17 Simon Marchi <simon.marchi@ericsson.com>
455
456 * linux-low.c (linux_read_memory, linux_write_memory): Remove
457 usage of "register" keyword.
458
3e019bdc
SM
4592017-06-17 Simon Marchi <simon.marchi@ericsson.com>
460
461 * configure: Re-generate.
462
8465943a
SM
4632017-06-17 Simon Marchi <simon.marchi@ericsson.com>
464
465 * configure: Re-generate.
466
cf0dd6f0
SM
4672017-06-17 Simon Marchi <simon.marchi@ericsson.com>
468
469 * Makefile.in (COMPILE.pre): Add "-x c++".
470
9845682b
SDJ
4712017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
472
473 * fork-child.c: Conditionally include <signal.h>.
474
aefd8b33
SDJ
4752017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
476
477 * server.c (handle_general_set): Handle new packet
478 "QStartupWithShell".
479 (handle_query): Add "QStartupWithShell" to the list of supported
480 packets.
481 (gdbserver_usage): Add help text explaining the
482 new "--startup-with-shell" and "--no-startup-with-shell" CLI
483 options.
484 (captured_main): Recognize and act upon the presence of the new
485 CLI options.
486
2090129c
SDJ
4872017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
488 Pedro Alves <palves@redhat.com>
489
490 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
491 * configure: Regenerate.
492 * configure.srv (srv_linux_obj): Add "fork-child.o" and
493 "fork-inferior.o".
494 (i[34567]86-*-lynxos*): Likewise.
495 (spu*-*-*): Likewise.
496 * fork-child.c: New file.
497 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
498 and "environ.h".
499 (linux_ptrace_fun): New function.
500 (linux_create_inferior): Adjust function prototype to reflect
501 change on "target.h". Adjust function code to use
502 "fork_inferior".
503 (linux_request_interrupt): Delete "signal_pid".
504 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
505 (lynx_ptrace_fun): New function.
506 (lynx_create_inferior): Adjust function prototype to reflect
507 change on "target.h". Adjust function code to use
508 "fork_inferior".
509 * nto-low.c (nto_create_inferior): Adjust function prototype and
510 code to reflect change on "target.h". Update comments.
511 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
512 "common-terminal.h" and "environ.h".
513 (terminal_fd): Moved to fork-child.c.
514 (old_foreground_pgrp): Likewise.
515 (restore_old_foreground_pgrp): Likewise.
516 (last_status): Make it global.
517 (last_ptid): Likewise.
518 (our_environ): New variable.
519 (startup_with_shell): Likewise.
520 (program_name): Likewise.
521 (program_argv): Rename to...
522 (program_args): ...this.
523 (wrapper_argv): New variable.
524 (start_inferior): Delete function.
525 (get_exec_wrapper): New function.
526 (get_exec_file): Likewise.
527 (get_environ): Likewise.
528 (prefork_hook): Likewise.
529 (post_fork_inferior): Likewise.
530 (postfork_hook): Likewise.
531 (postfork_child_hook): Likewise.
532 (handle_v_run): Update code to deal with arguments coming from the
533 remote host. Update calls from "start_inferior" to
534 "create_inferior".
535 (captured_main): Likewise. Initialize environment variable. Call
536 "have_job_control".
537 * server.h (post_fork_inferior): New prototype.
538 (get_environ): Likewise.
539 (last_status): Declare.
540 (last_ptid): Likewise.
541 (signal_pid): Likewise.
542 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
543 (spu_ptrace_fun): New function.
544 (spu_create_inferior): Adjust function prototype to reflect change
545 on "target.h". Adjust function code to use "fork_inferior".
546 * target.c (target_terminal_init): New function.
547 (target_terminal_inferior): Likewise.
548 (target_terminal_ours): Likewise.
549 * target.h: Include <vector>.
550 (struct target_ops) <create_inferior>: Update prototype.
551 (create_inferior): Update macro.
552 * utils.c (gdb_flush_out_err): New function.
553 * win32-low.c (win32_create_inferior): Adjust function prototype
554 and code to reflect change on "target.h".
555
043a4934
SDJ
5562017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
557
558 * inferiors.c (switch_to_thread): New function.
559
15652511
SDJ
5602017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
561
562 * Makefile.in (SFILE): Add "common/job-control.c".
563 (OBS): Add "job-control.o".
564
21ea5acd
SDJ
5652017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
566
567 * Makefile: Remove "@host_makefile_frag@".
568
e13cb306
PA
5692017-05-05 Pedro Alves <palves@redhat.com>
570
571 * configure: Regenerate.
572
c94fee56
SDJ
5732017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
574
575 * configure: Regenerate.
576
a0ff9e1a
SM
5772017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
578
579 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
580 software_single_step change of return type to
581 std::vector<CORE_ADDR>.
582 * linux-low.c (install_software_single_step_breakpoints):
583 Likewise.
584 * linux-low.h (install_software_single_step_breakpoints):
585 Likewise.
586
be628ab8
SDJ
5872017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
588
589 * remote-utils.c: Include "gdb_termios.h" instead of
590 "terminal.h".
591 * terminal.h: Delete file.
592
7c5ded6a
SDJ
5932017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
594
595 * server.c: Include <vector>.
596 <program_argv, wrapper_argv>: Convert to std::vector.
597 (start_inferior): Rewrite function to use C++.
598 (handle_v_run): Likewise. Update code that calculates the argv
599 based on the vRun packet; use C++.
600 (captured_main): Likewise.
601
436252de
SM
6022017-04-06 Simon Marchi <simon.marchi@ericsson.com>
603
604 * server.c (handle_v_cont): Initialize thread_resume::thread
605 with null_ptid.
606
9bf2a700
PA
6072017-04-05 Pedro Alves <palves@redhat.com>
608
609 * configure: Regenerate.
610
a121b7c1
PA
6112017-04-05 Pedro Alves <palves@redhat.com>
612
613 * gdbreplay.c (sync_error): Constify.
614 * linux-x86-low.c (push_opcode): Constify.
615
21c8a587
PA
6162017-04-05 Pedro Alves <palves@redhat.com>
617
618 * win32-low.c (get_child_debug_event)
619 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
620 Report TARGET_WAITKIND_SPURIOUS instead.
621
fb32b4f7
PA
6222017-04-05 Pedro Alves <palves@redhat.com>
623
624 * remote-utils.c (remote_prepare, remote_open): Constify.
625 * remote-utils.h (remote_prepare, remote_open): Constify.
626 * server.c (captured_main): Constify 'port' handling.
627
65dd1e59
SM
6282017-04-04 Simon Marchi <simon.marchi@ericsson.com>
629
630 * Makefile.in (clean): Clear .deps.
631
8fa5b777
SM
6322017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
633
634 * .gitignore: Remove generated files, replace with wildcard.
635 * (clean): Replace removal of generated files with wildcard.
636 (version.c): Replace with...
637 (version-generated.c): ...this.
638 (xml-builtin.c): Replace with...
639 (xml-builtin-generated.c): ...this.
640 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
641 (%.c: *regformats*): Replace with...
642 (%-generated.c: *regformats*): ...this.
643
a12e714b
MF
6442017-03-27 Max Filippov <jcmvbkbc@gmail.com>
645
646 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
647 (xtensa_fill_gregset): Call collect_register_by_name for
648 threadptr register.
649 (xtensa_store_gregset): Call supply_register_by_name for
650 threadptr register.
651
1a09b50a
MF
6522017-03-27 Max Filippov <jcmvbkbc@gmail.com>
653
654 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
655 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
656 (xtensa_store_gregset): Call supply_register for all registers in
657 a0_regnum..a0_regnum + C0_NREGS range.
658
1a01e7c6
SM
6592017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
660
661 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
662 (ax-ipa.o: ax.c): Remove.
663 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
664 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
665 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
666 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
667 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
668
36bc18a8
SM
6692017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
670
671 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
672 (print-utils-ipa.o: ../common/print-utils.c): Remove.
673 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
674 (errors-ipa.o: ../common/errors.c): Remove.
675 (format-ipa.o: ../common/format.c): Remove.
676 (common-utils-ipa.o: ../common/common-utils.c): Remove.
677
a8ebe3d5
SM
6782017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
679
680 * Makefile.in (%-ipa.o: %.c): New rule.
681 (tracepoint-ipa.o: tracepoint.c): Remove.
682 (utils-ipa.o: utils.c): Remove.
683 (remote-utils-ipa.o: remote-utils.c): Remove.
684 (regcache-ipa.o: regcache.c): Remove.
685 (i386-linux-ipa.o: i386-linux.c): Remove.
686 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
687 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
688 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
689 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
690 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
691 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
692 (amd64-linux-ipa.o: amd64-linux.c): Remove.
693 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
694 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
695 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
696 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
697 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
698 (aarch64-ipa.o: aarch64.c): Remove.
699 (s390-linux32-ipa.o: s390-linux32.c): Remove.
700 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
701 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
702 (s390-linux64-ipa.o: s390-linux64.c): Remove.
703 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
704 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
705 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
706 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
707 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
708 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
709 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
710 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
711 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
712 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
713 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
714 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
715 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
716 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
717 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
718 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
719 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
720 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
721 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
722 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
723 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
724 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
725 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
726 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
727 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
728 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
729 (tdesc-ipa.o: tdesc.c): Remove.
730 (x32-linux-ipa.o: x32-linux.c): Remove.
731 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
732 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
733
50cfacb7
SM
7342017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
735
736 * Makefile.in (%.o: ../arch/%.c): New rule.
737 (arm.o: ../arch/arm.c): Remove.
738 (arm-linux.o: ../arch/arm-linux.c): Remove.
739 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
740 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
741
c5a22423
SM
7422017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
743
744 * Makefile.in (%.o: ../nat/%.c): New rule.
745 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
746 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
747 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
748 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
749 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
750 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
751 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
752 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
753 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
754 (linux-personality.o: ../nat/linux-personality.c): Remove.
755 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
756 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
757 (x86-linux.o: ../nat/x86-linux.c): Remove.
758 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
759 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
760
6bda016b
SM
7612017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
762
763 * Makefile.in (%.o: ../common/%.c): New rule.
764 (signals.o: ../common/signals.c): Remove.
765 (print-utils.o: ../common/print-utils.c): Remove.
766 (rsp-low.o: ../common/rsp-low.c): Remove.
767 (common-utils.o: ../common/common-utils.c): Remove.
768 (posix-strerror.o: ../common/posix-strerror.c): Remove.
769 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
770 (vec.o: ../common/vec.c): Remove.
771 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
772 (xml-utils.o: ../common/xml-utils.c): Remove.
773 (ptid.o: ../common/ptid.c): Remove.
774 (buffer.o: ../common/buffer.c): Remove.
775 (format.o: ../common/format.c): Remove.
776 (filestuff.o: ../common/filestuff.c): Remove.
777 (agent.o: ../common/agent.c): Remove.
778 (errors.o: ../common/errors.c): Remove.
779 (environ.o: ../common/environ.c): Remove.
780 (common-debug.o: ../common/common-debug.c): Remove.
781 (cleanups.o: ../common/cleanups.c): Remove.
782 (common-exceptions.o: ../common/common-exceptions.c): Remove.
783 (fileio.o: ../common/fileio.c): Remove.
784 (common-regcache.o: ../common/common-regcache.c): Remove.
785 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
786 (new-op.o: ../common/new-op.c): Remove.
787 (btrace-common.o: ../common/btrace-common.c): Remove.
788
21122961
SM
7892017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
790
791 * Makefile.in (%.o: ../target/%.c): New rule.
792 (waitstatus.o: ../target/waitstatus.c): Remove.
793
c362e621
SM
7942017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
795
796 * Makefile.in
797 (%.c: ../regformats/%.dat,
798 (%.c: ../regformats/arm/%.dat,
799 (%.c: ../regformats/i386/%.dat,
800 (%.c: ../regformats/rs6000/%.dat): New rules.
801 (aarch64.c): Remove.
802 (reg-arm.c): Remove.
803 (arm-with-iwmmxt.c): Remove.
804 (arm-with-vfpv2.c): Remove.
805 (arm-with-vfpv3.c): Remove.
806 (arm-with-neon.c): Remove.
807 (reg-bfin.c): Remove.
808 (reg-cris.c): Remove.
809 (reg-crisv32.c): Remove.
810 (i386.c): Remove.
811 (i386-linux.c): Remove.
812 (i386-avx.c): Remove.
813 (i386-avx-linux.c): Remove.
814 (i386-avx-avx512.c): Remove.
815 (i386-avx-avx512-linux.c): Remove.
816 (i386-mpx.c): Remove.
817 (i386-mpx-linux.c): Remove.
818 (i386-avx-mpx-avx512-pku.c): Remove.
819 (i386-avx-mpx-avx512-pku-linux.c): Remove.
820 (i386-avx-mpx.c): Remove.
821 (i386-avx-mpx-linux.c): Remove.
822 (i386-mmx.c): Remove.
823 (i386-mmx-linux.c): Remove.
824 (reg-ia64.c): Remove.
825 (reg-m32r.c): Remove.
826 (reg-m68k.c): Remove.
827 (reg-cf.c): Remove.
828 (mips-linux.c): Remove.
829 (mips-dsp-linux.c): Remove.
830 (mips64-linux.c): Remove.
831 (mips64-dsp-linux.c): Remove.
832 (nios2-linux.c): Remove.
833 (powerpc-32.c): Remove.
834 (powerpc-32l.c): Remove.
835 (powerpc-altivec32l.c): Remove.
836 (powerpc-cell32l.c): Remove.
837 (powerpc-vsx32l.c): Remove.
838 (powerpc-isa205-32l.c): Remove.
839 (powerpc-isa205-altivec32l.c): Remove.
840 (powerpc-isa205-vsx32l.c): Remove.
841 (powerpc-e500l.c): Remove.
842 (powerpc-64l.c): Remove.
843 (powerpc-altivec64l.c): Remove.
844 (powerpc-cell64l.c): Remove.
845 (powerpc-vsx64l.c): Remove.
846 (powerpc-isa205-64l.c): Remove.
847 (powerpc-isa205-altivec64l.c): Remove.
848 (powerpc-isa205-vsx64l.c): Remove.
849 (s390-linux32.c): Remove.
850 (s390-linux32v1.c): Remove.
851 (s390-linux32v2.c): Remove.
852 (s390-linux64.c): Remove.
853 (s390-linux64v1.c): Remove.
854 (s390-linux64v2.c): Remove.
855 (s390-te-linux64.c): Remove.
856 (s390-vx-linux64.c): Remove.
857 (s390-tevx-linux64.c): Remove.
858 (s390x-linux64.c): Remove.
859 (s390x-linux64v1.c): Remove.
860 (s390x-linux64v2.c): Remove.
861 (s390x-te-linux64.c): Remove.
862 (s390x-vx-linux64.c): Remove.
863 (s390x-tevx-linux64.c): Remove.
864 (tic6x-c64xp-linux.c): Remove.
865 (tic6x-c64x-linux.c): Remove.
866 (tic6x-c62x-linux.c): Remove.
867 (reg-sh.c): Remove.
868 (reg-sparc64.c): Remove.
869 (reg-spu.c): Remove.
870 (amd64.c): Remove.
871 (amd64-linux.c): Remove.
872 (amd64-avx.c): Remove.
873 (amd64-avx-linux.c): Remove.
874 (amd64-avx-avx512.c): Remove.
875 (amd64-avx-avx512-linux.c): Remove.
876 (amd64-mpx.c): Remove.
877 (amd64-mpx-linux.c): Remove.
878 (amd64-avx-mpx-avx512-pku.c): Remove.
879 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
880 (amd64-avx-mpx.c): Remove.
881 (amd64-avx-mpx-linux.c): Remove.
882 (x32.c): Remove.
883 (x32-linux.c): Remove.
884 (x32-avx.c): Remove.
885 (x32-avx-linux.c): Remove.
886 (x32-avx-avx512.c): Remove.
887 (x32-avx-avx512-linux.c): Remove.
888 (reg-xtensa.c): Remove.
889 (reg-tilegx.c): Remove.
890 (reg-tilegx32.c): Remove.
891
1672e0d9
SDJ
8922017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
893
894 * Makefile.in (SFILES): Add "common/environ.c".
895 (OBJS): Add "common/environ.h".
896
239b6d10
WT
8972017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
898
899 * configure.ac: Check if the fs_base and gs_base members of
900 `struct user_regs_struct' exist.
901 * config.in: Regenerated.
902 * configure: Likewise.
903
694b382c
AT
9042017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
905
906 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
907 target_read_memory.
908 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
909 (get_next_pcs_syscall_next_pc): Likewise.
910
7dc53023
LM
9112016-12-23 Luis Machado <lgustavo@codesourcery.com>
912
913 * win32-i386-low.c: Fix incorrect reference to a couple source files.
914 * nto-x86-low.c: Likewise.
915
ad02e4fe
SM
9162016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
917
918 * Makefile.in: Include disable-implicit-rules.mk.
919
dcb07cfa
PA
9202016-11-23 Pedro Alves <palves@redhat.com>
921
922 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
923 (debug_vprintf): Use std::chrono::steady_clock instead of
924 gettimeofday. Use '.' instead of ':'.
925 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
926 (get_timestamp): Use std::chrono::steady_clock instead of
927 gettimeofday.
928
8629c02c
SM
9292016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
930
931 * Makefile.in: Fix whitespace formatting.
932
b593ecca
SM
9332016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
934
935 * Makefile.in (SFILES, OBS): Flatten list and order
936 alphabetically.
937
9986ba08
PA
9382016-11-23 Pedro Alves <palves@redhat.com>
939
940 * event-loop.c (handle_file_event): Use warning.
941 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
942 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
943 Use warning.
944
4eefa7bc
PA
9452016-11-23 Pedro Alves <palves@redhat.com>
946
947 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
948 output.
949 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
950 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
951 debug_printf and debug_flush for debug output.
952 * server.c (handle_general_set): Likewise.
953 * thread-db.c (try_thread_db_load): Use debug_printf for debug
954 output.
955
5443506e
SM
9562016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
957
958 * Makefile.in (.c.o): Replace rule with ...
959 (%.o: %.c): ... this one.
960
3b165252
SM
9612016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
962
963 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
964 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
965 make.
966 * configure.ac: Remove checks for the make program.
967 * configure: Re-generate.
968
0bcda685
PA
9692016-10-28 Pedro Alves <palves@redhat.com>
970
971 * Makefile.in (CXX_DIALECT): Get from configure.
972 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
973 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
974 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
975 * config.in: Regenerate.
976 * configure: Regenerate.
977
c3805894
YQ
9782016-10-27 Yao Qi <yao.qi@linaro.org>
979
980 * linux-low.c (linux_supports_range_stepping): Return true if
981 can_software_single_step return true.
982
89342618
YQ
9832016-10-27 Yao Qi <yao.qi@linaro.org>
984
985 * inferiors.c (find_inferior_in_random): New function.
986 * inferiors.h (find_inferior_in_random): Declare.
987 * linux-low.c (linux_wait_for_event_filtered): Call
988 find_inferior_in_random instead of find_inferior.
989
e3652c84
YQ
9902016-10-27 Yao Qi <yao.qi@linaro.org>
991
992 * linux-low.c (linux_wait_1): If single-step breakpoints are
993 inserted, remove them.
994
5a04c4cf
PA
9952016-10-26 Pedro Alves <palves@redhat.com>
996
997 * linux-low.c (handle_extended_wait): Link parent/child fork
998 threads.
999 (linux_wait_1): Unlink them.
1000 (linux_set_resume_request): Ignore resume requests for
1001 already-resumed and unhandled fork child threads.
1002 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1003 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1004 New functions.
1005 (handle_v_requests) <vCont>: Don't call require_running.
1006 * server.h (in_queued_stop_replies): New declaration.
1007
cb93dc7f
YQ
10082016-10-24 Yao Qi <yao.qi@linaro.org>
1009
1010 PR server/20733
1011 * linux-aarch64-low.c (append_insns): Cast the return value to
1012 'uint32_t *'.
1013
a1078bea
YQ
10142016-10-10 Yao Qi <yao.qi@linaro.org>
1015
1016 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1017
1fb77080
SDJ
10182016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1019
1020 * target.c (target_supports_multi_process): New function, moved
1021 from...
1022 * target.h (target_supports_multi_process): ... here. Remove
1023 macro.
1024
39b5a3b9
TT
10252016-10-05 Tom Tromey <tom@tromey.com>
1026
1027 PR remote/20655:
1028 * tracepoint.c (handle_tracepoint_bkpts): Check
1029 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1030
c1d0b70a
YQ
10312016-10-05 Yao Qi <yao.qi@linaro.org>
1032
1033 * configure.srv: Update the path of arm-*.xml files.
1034
0a69eedb
YQ
10352016-10-05 Terry Guo <terry.guo@arm.com>
1036 Yao Qi <yao.qi@linaro.org>
1037
1038 * Makefile.in: Adjust the path of rules.
1039 * configure.srv: Update the path of xml files.
1040 * regformats/arm-with-iwmmxt.dat: Regenerated.
1041 * regformats/arm-with-neon.dat: Likewise.
1042 * regformats/arm-with-vfpv2.dat: Likewise.
1043 * regformats/arm-with-vfpv3.dat Likewise.
1044
17e16485
YQ
10452016-09-30 Yao Qi <yao.qi@linaro.org>
1046
1047 PR gdbserver/20627
1048 * target.c (target_stop_and_wait): Don't call
1049 target_continue_no_signal, use resume_stop instead.
1050
edeeb602
YQ
10512016-09-26 Yao Qi <yao.qi@linaro.org>
1052
1053 * linux-low.c (linux_wait_1): Call debug_exit.
1054
503b1c39
PA
10552016-09-23 Pedro Alves <palves@redhat.com>
1056
1057 * Makefile.in (SFILES): Add common/new-op.c.
1058 (OBS): Add common/new-op.o.
1059 (new-op.o): New rule.
1060
74172ecf
SM
10612016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1062
1063 * .gitinore: Ignore more files.
1064
fc6cda2e
YQ
10652016-09-21 Yao Qi <yao.qi@linaro.org>
1066
1067 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1068 23.
1069
bc1e6c81
SDJ
10702016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1071
1072 * server.c (start_inferior): Call target_mourn_inferior instead of
1073 mourn_inferior; pass ptid_t argument to it.
1074 (resume): Likewise.
1075 (handle_target_event): Likewise.
1076 * target.c (target_mourn_inferior): New function.
1077 * target.h (mourn_inferior): Delete macro.
1078
0e00e962
AA
10792016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1080
1081 * linux-low.c (lwp_is_stepping): New function.
1082
1d8cb77d
CL
10832016-09-06 Carl Love <cel@us.ibm.com>
1084
1085 * server.c (start_inferior): Fixed comment, requested comment change
1086 didn't get updated correctly. Removed reference to ptrace () call as
1087 it is only true on Linux systems.
1088
7313bced
CL
10892016-09-06 Carl Love <cel@us.ibm.com>
1090
1091 * server.c (start_inferior): Do not call
1092 function target_post_create_inferior () if the
1093 inferior process has already exited.
1094
cf6de44d
PA
10952016-09-05 Pedro Alves <palves@redhat.com>
1096
1097 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1098 (COMPILE.pre, CC_LD): Use CXX directly.
1099 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1100 * acinclude.m4: Don't include build-with-cxx.m4.
1101 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1102 * configure: Regenerate.
1103
c1da6748
AT
11042016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1105
1106 PR gdb/19495
1107 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1108 call writing data to own_buf.
1109
f2b9e3df
SDJ
11102016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1111
1112 * target.c (mywait): Call target_wait instead of
1113 the_target->wait.
1114 (target_wait): New function.
1115
049a8570
SDJ
11162016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1117
1118 * server.c (start_inferior): New variable 'ptid'. Replace calls
1119 to the_target->resume by target_continue{,_no_signal}, depending
1120 on the case.
1121 * target.c (target_stop_and_wait): Call target_continue_no_signal
1122 instead of the_target->resume.
1123 (target_continue): New function.
1124
3aa5cfa0
AT
11252016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1126
1127 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1128
754653a7
AZ
11292016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1130
1131 PR server/20491
1132 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1133 ps_prochandle.
1134 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1135 * linux-arm-low.c (ps_get_thread_area): Likewise.
1136 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1137 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1138 * linux-mips-low.c (ps_get_thread_area): Likewise.
1139 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1140 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1141 * linux-x86-low.c (ps_get_thread_area): Likewise.
1142 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1143
ed036b40
PA
11442016-08-19 Pedro Alves <palves@redhat.com>
1145
1146 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1147
c8ef42ee
PA
11482016-08-19 Pedro Alves <palves@redhat.com>
1149
1150 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1151 comment. Use memcpy instead of casting through unsigned long.
1152
9c235a72
PA
11532016-08-19 Pedro Alves <palves@redhat.com>
1154
1155 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1156 allocating around 0x80000000.
1157
201506da
PA
11582016-08-19 Pedro Alves <palves@redhat.com>
1159
1160 PR gdb/20415
1161 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1162 (x32-avx512-linux-ipa.o): New rules.
1163 * configure.ac (x86_64-*-linux*): New x32 check.
1164 * configure.srv (ipa_x32_linux_regobj): New.
1165 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1166 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1167 descriptions.
1168 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1169 descriptions.
1170 * configure: Regenerate.
1171
f348d89a
PA
11722016-08-09 Pedro Alves <palves@redhat.com>
1173
1174 PR gdb/18653
1175 * Makefile.in (OBS): Add signals-state-save-restore.o.
1176 (signals-state-save-restore.o): New rule.
1177 * config.in: Regenerate.
1178 * configure: Regenerate.
1179 * linux-low.c: Include "signals-state-save-restore.h".
1180 (linux_create_inferior): Call
1181 restore_original_signals_state.
1182 * server.c: Include "dispositions-save-restore.h".
1183 (captured_main): Call save_original_signals_state.
1184
1baf5149
PA
11852016-08-05 Pedro Alves <palves@redhat.com>
1186
1187 * configure: Regenerate.
1188
fcd4a73d
YQ
11892016-08-04 Yao Qi <yao.qi@linaro.org>
1190
1191 * linux-low.c (regsets_fetch_inferior_registers): Check
1192 errno is ESRCH or not.
1193
979659d0
YQ
11942016-08-02 Yao Qi <yao.qi@linaro.org>
1195
1196 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1197 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1198 (thread_db_load_search): Update.
1199 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1200 td_ta_set_event and td_ta_event_getmsg.
1201
6598661d
PA
12022016-07-26 Pedro Alves <palves@redhat.com>
1203
1204 PR server/20414
1205 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1206 of unsigned long for 64-bit registers and use uint32_t instead of
1207 unsigned int for 32-bit registers.
1208
9cf12d57
PA
12092016-07-26 Pedro Alves <palves@redhat.com>
1210
1211 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1212 to 'ptrace'.
1213
305450ed
TT
12142016-07-21 Tom Tromey <tom@tromey.com>
1215
1216 * configure: Rebuild.
1217
2583da7c
YQ
12182016-07-21 Yao Qi <yao.qi@linaro.org>
1219
1220 * mem-break.c (find_gdb_breakpoint): Cast bp to
1221 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1222
21536b36
YQ
12232016-07-21 Yao Qi <yao.qi@linaro.org>
1224
1225 * server.c (handle_v_requests): Support s and S actions
1226 if target_supports_software_single_step return true.
1227
8901d193
YQ
12282016-07-21 Yao Qi <yao.qi@linaro.org>
1229
1230 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1231 is resume_step, call maybe_hw_step.
1232 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1233 and unstop them.
1234 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1235 breakpoints or not.
1236 (proceed_one_lwp): If resume request is resume_step, install
1237 reinsert breakpoints and call maybe_hw_step.
1238
0e9a339e
YQ
12392016-07-21 Yao Qi <yao.qi@linaro.org>
1240
1241 * linux-low.c (proceed_one_lwp): Declare.
1242 (linux_resume_one_thread): Remove local variable 'step'.
1243 Lift code enqueue signal. Call proceed_one_lwp instead of
1244 linux_resume_one_lwp.
1245
4281b351
YQ
12462016-07-21 Yao Qi <yao.qi@linaro.org>
1247
1248 * linux-low.c (linux_resume_one_thread): Call
1249 enqueue_pending_signal.
1250
984a2c04
YQ
12512016-07-21 Yao Qi <yao.qi@linaro.org>
1252
1253 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1254 * inferiors.c (do_restore_current_thread_cleanup): New function.
1255 (make_cleanup_restore_current_thread): Likewise.
1256 * linux-low.c (install_software_single_step_breakpoints): Call
1257 make_cleanup_restore_current_thread. Switch current_thread to
1258 thread.
1259
bec903c9
YQ
12602016-07-21 Yao Qi <yao.qi@linaro.org>
1261
1262 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1263 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1264 (clone_one_breakpoint): Likewise.
1265 (delete_reinsert_breakpoints): Change parameter to thread.
1266 Callers updated.
1267 (has_reinsert_breakpoints): Likewise.
1268 (uninsert_reinsert_breakpoints): Likewise.
1269 (reinsert_reinsert_breakpoints): Likewise.
1270 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1271 (delete_reinsert_breakpoints): Likewise.
1272 (reinsert_reinsert_breakpoints): Likewise.
1273 (uninsert_reinsert_breakpoints): Likewise.
1274 (has_reinsert_breakpoints): Likewise.
1275
63c40ec7
YQ
12762016-07-21 Yao Qi <yao.qi@linaro.org>
1277
1278 * inferiors.c (get_thread_process): Make parameter const.
1279 * inferiors.h (get_thread_process): Update declaration.
1280 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1281 Add new parameters child_thread and parent_thread. Callers
1282 updated.
1283 * mem-break.h (clone_all_breakpoints): Update declaration.
1284
9aa76cd0
YQ
12852016-07-21 Yao Qi <yao.qi@linaro.org>
1286
1287 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1288 <command_list, handler>: Remove.
1289 (struct gdb_breakpoint): New.
1290 (struct other_breakpoint): New.
1291 (struct reinsert_breakpoint): New.
1292 (is_gdb_breakpoint): New function.
1293 (any_persistent_commands): Update command_list if
1294 is_gdb_breakpoint returns true.
1295 (set_breakpoint): Create breakpoints according to their types.
1296 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1297 (set_gdb_breakpoint_1): Likewise.
1298 (set_gdb_breakpoint): Likewise.
1299 (clear_breakpoint_conditions): Change parameter type to
1300 'struct gdb_breakpoint *'.
1301 (clear_breakpoint_commands): Likewise.
1302 (clear_breakpoint_conditions_and_commands): Likewise.
1303 (add_condition_to_breakpoint): Likewise.
1304 (add_breakpoint_condition): Likewise.
1305 (add_commands_to_breakpoint): Likewise.
1306 (check_breakpoints): Check other_breakpoint.
1307 (clone_one_breakpoint): Clone breakpopint according to its type.
1308 * mem-break.h (struct gdb_breakpoint): Declare.
1309 (set_gdb_breakpoint): Update declaration.
1310 (clear_breakpoint_conditions_and_commands): Likewise.
1311 (add_breakpoint_condition): Likewise.
1312 (add_breakpoint_commands): Likewise.
1313 * server.c (process_point_options): Change parameter type to
1314 'struct gdb_breakpoint *'.
1315
811f8301
YQ
13162016-07-21 Yao Qi <yao.qi@linaro.org>
1317
1318 * mem-break.c (set_breakpoint_at): Rename it to ...
1319 (set_breakpoint_type_at): ... it.
1320 (set_breakpoint_at): Call set_breakpoint_type_at.
1321 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1322 * mem-break.h (set_breakpoint_at): Update comments.
1323
b1c51e36
CLT
13242016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1325
1326 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1327 to buf parameter.
1328 (nios2_store_gregset): Likewise.
1329
ced2dffb
PA
13302016-07-01 Pedro Alves <palves@redhat.com>
1331 Antoine Tremblay <antoine.tremblay@ericsson.com>
1332
1333 * linux-low.c: Change interface to take the target lwp_info
1334 pointer directly and return void. Handle detaching from a zombie
1335 thread.
1336 (linux_detach_lwp_callback): New function.
1337 (linux_detach): Detach from the leader thread after detaching from
1338 the clone threads.
1339
2ac09a5b
YQ
13402016-06-28 Yao Qi <yao.qi@linaro.org>
1341
1342 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1343 for variable new_offset.
1344 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1345 (aarch64_ftrace_insn_reloc_cb): Likewise.
1346 (aarch64_ftrace_insn_reloc_tb): Likewise.
1347 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1348 PRIx64 instead of PRIx32.
1349
79e7fd4f
YQ
13502016-06-28 Yao Qi <yao.qi@linaro.org>
1351
1352 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1353 (the_low_target): Install arm_get_syscall_trapinfo.
1354
061fc021
YQ
13552016-06-28 Yao Qi <yao.qi@linaro.org>
1356
1357 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1358 function.
1359 (the_low_target): Install aarch64_get_syscall_trapinfo.
1360
4cc32bec
YQ
13612016-06-28 Yao Qi <yao.qi@linaro.org>
1362
1363 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1364 Callers updated.
1365 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1366 Remove parameter sysno.
1367 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1368 sysret.
1369
782c1122
AA
13702016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1371
1372 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1373 (s390_emit_ne_goto): Likewise.
1374 (s390_emit_lt_goto): Likewise.
1375 (s390_emit_le_goto): Likewise.
1376 (s390_emit_gt_goto): Likewise.
1377 (s390_emit_ge_goto): Likewise.
1378 (s390x_emit_eq_goto): Likewise.
1379 (s390x_emit_ne_goto): Likewise.
1380 (s390x_emit_lt_goto): Likewise.
1381 (s390x_emit_le_goto): Likewise.
1382 (s390x_emit_gt_goto): Likewise.
1383 (s390x_emit_ge_goto): Likewise.
1384 (s390_emit_ops_impl): Mark variable static.
1385 (s390x_emit_ops): Likewise.
1386
2e7b624b
YQ
13872016-06-17 Yao Qi <yao.qi@linaro.org>
1388
1389 * linux-low.c (handle_extended_wait): Call
1390 uninsert_reinsert_breakpoints for the parent process. Remove
1391 reinsert breakpoints from the child process. Reinsert them to
1392 the parent process when vfork is done.
1393 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1394 (reinsert_reinsert_breakpoints): New function.
1395 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1396 (reinsert_reinsert_breakpoints): Declare.
1397
8a81c5d7
YQ
13982016-06-17 Yao Qi <yao.qi@linaro.org>
1399
1400 * linux-low.c (handle_extended_wait): If the parent is doing
1401 step-over, remove the reinsert breakpoints from the forked child.
1402
f50bf8e5
YQ
14032016-06-17 Yao Qi <yao.qi@linaro.org>
1404
1405 * linux-low.c (unsuspend_all_lwps): Declare.
1406 (linux_low_filter_event): If thread exited, call finish_step_over.
1407 If step-over is finished, unsuspend other threads.
1408
8376a3cb
YQ
14092016-06-17 Yao Qi <yao.qi@linaro.org>
1410
1411 * linux-low.c (linux_resume_one_lwp_throw): Assert
1412 has_reinsert_breakpoints returns false.
1413 * mem-break.c (delete_disabled_breakpoints): Assert
1414 bp type isn't reinsert_breakpoint.
1415
f79b145d
YQ
14162016-06-17 Yao Qi <yao.qi@linaro.org>
1417
1418 * linux-low.c (maybe_hw_step): New function.
1419 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1420 (finish_step_over): Switch current_thread to lwp temporarily,
1421 and assert has_reinsert_breakpoints returns true.
1422 (proceed_one_lwp): Call maybe_hw_step.
1423 * mem-break.c (has_reinsert_breakpoints): New function.
1424 * mem-break.h (has_reinsert_breakpoints): Declare.
1425
0ae534d2
JT
14262016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1427
1428 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1429
fcdad592
YQ
14302016-05-17 Yao Qi <yao.qi@linaro.org>
1431
1432 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1433 instead of find_inferior.
1434
9e784964
YQ
14352016-05-05 Yao Qi <yao.qi@linaro.org>
1436
1437 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1438 Initialize res to zero.
1439
cf2ebb6e
YQ
14402016-05-05 Yao Qi <yao.qi@linaro.org>
1441
1442 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1443 to uint32_t.
1444
c1aebf87
UW
14452016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1446
1447 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1448 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1449 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1450
35fd2deb 14512016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 1452 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
1453
1454 * tracepoint.c (write_inferior_int8): New function.
1455 (cmd_qtenable_disable): Write enable flag using
1456 write_inferior_int8.
1457
484b3c32
YQ
14582016-04-25 Yao Qi <yao.qi@linaro.org>
1459
1460 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1461 (need_step_over_p): Return zero if the LWP has pending signals
1462 can be delivered on software single step target.
1463
85ba7d86
YQ
14642016-04-25 Yao Qi <yao.qi@linaro.org>
1465
1466 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1467 return instead of error.
1468
3539aa13
YQ
14692016-04-22 Yao Qi <yao.qi@linaro.org>
1470
1471 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1472 to 23.
1473
5b061e98
YQ
14742016-04-22 Yao Qi <yao.qi@linaro.org>
1475
1476 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1477 signal when stepping over breakpoint with software single
1478 step.
1479
3451269c
PA
14802016-04-21 Pedro Alves <palves@redhat.com>
1481
1482 * linux-s390-low.c (s390_collect_ptrace_register)
1483 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1484 add casts.
1485 (s390_check_regset): Use void * instead of gdb_byte *.
1486
a2358508
PA
14872016-04-20 Pedro Alves <palves@redhat.com>
1488
1489 * configure: Renegerate.
1490
6885166d
YQ
14912016-04-20 Yao Qi <yao.qi@linaro.org>
1492
1493 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1494 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1495 number 16.
1496 (arm_store_gregset): Likewise.
1497
2b863f51
WT
14982016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1499
1500 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1501 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1502 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1503 (amd64-avx-mpx-linux.c): New rules.
1504 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1505 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1506 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1507 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1508 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1509 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1510 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1511 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1512 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1513 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1514 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1515 * linux-x86-low.c (x86_linux_read_description): Add case for
1516 X86_XSTATE_AVX_MPX_MASK.
1517 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1518 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1519 init_registers_i386_avx_mpx_linux.
1520 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1521 (initialize_low_tracepoint): Call
1522 init_registers_i386_avx_mpx_linux.
1523 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1524 (initialize_low_tracepoint): Call
1525 init_registers_amd64_avx_mpx_linux.
1526 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1527 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1528 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1529 declarations.
1530
9b30624b
PA
15312016-04-18 Pedro Alves <palves@redhat.com>
1532
1533 * configure: Regenerate.
1534
45e3745e
AT
15352016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1536
1537 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1538 (aarch64_emit_sub): Likewise.
1539
2afc13ff
PA
15402016-04-12 Pedro Alves <palves@redhat.com>
1541
1542 * utils.c (prepare_to_throw_exception): Delete.
1543
6e774b13
SM
15442016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1545
1546 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1547
4dca19f8
MK
15482016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1549
1550 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1551
d0a9981f
MK
15522016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1553
1554 * linux-aarch64-ipa.c: Add <elf.h> include.
1555 * linux-ppc-ipa.c: Add <elf.h> include.
1556 * linux-s390-ipa.c: Add <elf.h> include.
1557
252db07e
MK
15582016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1559
1560 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1561 (get_raw_reg_ptr): Likewise.
1562 (get_trace_state_variable_value_ptr): Likewise.
1563 (set_trace_state_variable_value_ptr): Likewise.
1564 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1565 char *.
1566
14e2b6d9
MK
15672016-03-31 Wei-cheng Wang <cole945@gmail.com>
1568 Marcin Kościelnicki <koriakin@0x04.net>
1569
1570 PR/17221
1571 * linux-ppc-low.c (emit_insns): New function.
1572 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1573 (ppc_emit_prologue): New function.
1574 (ppc_emit_epilogue): New function.
1575 (ppc_emit_add): New function.
1576 (ppc_emit_sub): New function.
1577 (ppc_emit_mul): New function.
1578 (ppc_emit_lsh): New function.
1579 (ppc_emit_rsh_signed): New function.
1580 (ppc_emit_rsh_unsigned): New function.
1581 (ppc_emit_ext): New function.
1582 (ppc_emit_zero_ext): New function.
1583 (ppc_emit_log_not): New function.
1584 (ppc_emit_bit_and): New function.
1585 (ppc_emit_bit_or): New function.
1586 (ppc_emit_bit_xor): New function.
1587 (ppc_emit_bit_not): New function.
1588 (ppc_emit_equal): New function.
1589 (ppc_emit_less_signed): New function.
1590 (ppc_emit_less_unsigned): New function.
1591 (ppc_emit_ref): New function.
1592 (ppc_emit_const): New function.
1593 (ppc_emit_reg): New function.
1594 (ppc_emit_pop): New function.
1595 (ppc_emit_stack_flush): New function.
1596 (ppc_emit_swap): New function.
1597 (ppc_emit_stack_adjust): New function.
1598 (ppc_emit_call): New function.
1599 (ppc_emit_int_call_1): New function.
1600 (ppc_emit_void_call_2): New function.
1601 (ppc_emit_if_goto): New function.
1602 (ppc_emit_goto): New function.
1603 (ppc_emit_eq_goto): New function.
1604 (ppc_emit_ne_goto): New function.
1605 (ppc_emit_lt_goto): New function.
1606 (ppc_emit_le_goto): New function.
1607 (ppc_emit_gt_goto): New function.
1608 (ppc_emit_ge_goto): New function.
1609 (ppc_write_goto_address): New function.
1610 (ppc_emit_ops_impl): New static variable.
1611 (ppc64v1_emit_prologue): New function.
1612 (ppc64v2_emit_prologue): New function.
1613 (ppc64_emit_epilogue): New function.
1614 (ppc64_emit_add): New function.
1615 (ppc64_emit_sub): New function.
1616 (ppc64_emit_mul): New function.
1617 (ppc64_emit_lsh): New function.
1618 (ppc64_emit_rsh_signed): New function.
1619 (ppc64_emit_rsh_unsigned): New function.
1620 (ppc64_emit_ext): New function.
1621 (ppc64_emit_zero_ext): New function.
1622 (ppc64_emit_log_not): New function.
1623 (ppc64_emit_bit_and): New function.
1624 (ppc64_emit_bit_or): New function.
1625 (ppc64_emit_bit_xor): New function.
1626 (ppc64_emit_bit_not): New function.
1627 (ppc64_emit_equal): New function.
1628 (ppc64_emit_less_signed): New function.
1629 (ppc64_emit_less_unsigned): New function.
1630 (ppc64_emit_ref): New function.
1631 (ppc64_emit_const): New function.
1632 (ppc64v1_emit_reg): New function.
1633 (ppc64v2_emit_reg): New function.
1634 (ppc64_emit_pop): New function.
1635 (ppc64_emit_stack_flush): New function.
1636 (ppc64_emit_swap): New function.
1637 (ppc64v1_emit_call): New function.
1638 (ppc64v2_emit_call): New function.
1639 (ppc64v1_emit_int_call_1): New function.
1640 (ppc64v2_emit_int_call_1): New function.
1641 (ppc64v1_emit_void_call_2): New function.
1642 (ppc64v2_emit_void_call_2): New function.
1643 (ppc64_emit_if_goto): New function.
1644 (ppc64_emit_eq_goto): New function.
1645 (ppc64_emit_ne_goto): New function.
1646 (ppc64_emit_lt_goto): New function.
1647 (ppc64_emit_le_goto): New function.
1648 (ppc64_emit_gt_goto): New function.
1649 (ppc64_emit_ge_goto): New function.
1650 (ppc64v1_emit_ops_impl): New static variable.
1651 (ppc64v2_emit_ops_impl): New static variable.
1652 (ppc_emit_ops): New function.
1653 (linux_low_target): Wire in ppc_emit_ops.
1654
a2174ba4
MK
16552016-03-31 Wei-cheng Wang <cole945@gmail.com>
1656 Marcin Kościelnicki <koriakin@0x04.net>
1657
1658 PR/17221
1659 * Makefile.in: Add powerpc-*-ipa.o
1660 * configure.srv: Add ipa_obj for powerpc*-linux.
1661 * linux-ppc-ipa.c: New file.
1662 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1663 includes.
1664 (PPC_FIELD): New macro.
1665 (PPC_SEXT): New macro.
1666 (PPC_OP6): New macro.
1667 (PPC_BO): New macro.
1668 (PPC_LI): New macro.
1669 (PPC_BD): New macro.
1670 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1671 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1672 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1673 (ppc_get_thread_area): New function.
1674 (is_elfv2_inferior): New function.
1675 (gen_ds_form): New function.
1676 (GEN_STD): New macro.
1677 (GEN_STDU): New macro.
1678 (GEN_LD): New macro.
1679 (GEN_LDU): New macro.
1680 (gen_d_form): New function.
1681 (GEN_ADDI): New macro.
1682 (GEN_ADDIS): New macro.
1683 (GEN_LI): New macro.
1684 (GEN_LIS): New macro.
1685 (GEN_ORI): New macro.
1686 (GEN_ORIS): New macro.
1687 (GEN_LWZ): New macro.
1688 (GEN_STW): New macro.
1689 (GEN_STWU): New macro.
1690 (gen_xfx_form): New function.
1691 (GEN_MFSPR): New macro.
1692 (GEN_MTSPR): New macro.
1693 (GEN_MFCR): New macro.
1694 (GEN_MTCR): New macro.
1695 (GEN_SYNC): New macro.
1696 (GEN_LWSYNC): New macro.
1697 (gen_x_form): New function.
1698 (GEN_OR): New macro.
1699 (GEN_MR): New macro.
1700 (GEN_LWARX): New macro.
1701 (GEN_STWCX): New macro.
1702 (GEN_CMPW): New macro.
1703 (gen_md_form): New function.
1704 (GEN_RLDICL): New macro.
1705 (GEN_RLDICR): New macro.
1706 (gen_i_form): New function.
1707 (GEN_B): New macro.
1708 (GEN_BL): New macro.
1709 (gen_b_form): New function.
1710 (GEN_BNE): New macro.
1711 (GEN_LOAD): New macro.
1712 (GEN_STORE): New macro.
1713 (gen_limm): New function.
1714 (gen_atomic_xchg): New function.
1715 (gen_call): New function.
1716 (ppc_relocate_instruction): New function.
1717 (ppc_install_fast_tracepoint_jump_pad): New function.
1718 (ppc_get_min_fast_tracepoint_insn_len): New function.
1719 (ppc_get_ipa_tdesc_idx): New function.
1720 (the_low_target): Wire in the new functions.
1721 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1722 tdescs.
1723 * linux-ppc-tdesc.h: New file.
1724
a13c4696
MK
17252016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1726
1727 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1728 (alloc_jump_pad_buffer): New function.
1729 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1730 (alloc_jump_pad_buffer): New function.
1731 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1732 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1733 (alloc_jump_pad_buffer): New function.
1734 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1735 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1736 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1737 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1738
1cda1512
MK
17392016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1740
1741 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1742 * linux-amd64-ipa.c: Likewise.
1743 * linux-i386-ipa.c: Likewise.
1744 * linux-s390-ipa.c: Likewise.
1745 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1746 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1747 set_trace_state_variable_value_ptr.
1748 (struct ipa_sym_addresses): Likewise.
1749 (symbol_list): Likewise.
1750 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1751 accessing gdb_collect directly.
1752 (gdb_collect_ptr_type): New typedef.
1753 (get_raw_reg_ptr_type): New typedef.
1754 (get_trace_state_variable_value_ptr_type): New typedef.
1755 (set_trace_state_variable_value_ptr_type): New typedef.
1756 (gdb_collect_ptr): New global.
1757 (get_raw_reg_ptr): New global.
1758 (get_trace_state_variable_value_ptr): New global.
1759 (set_trace_state_variable_value_ptr): New global.
1760 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1761 accessing get_raw_reg directly.
1762 (get_get_tsv_func_addr): Likewise for
1763 get_trace_state_variable_value_ptr.
1764 (get_set_tsv_func_addr): Likewise for
1765 set_trace_state_variable_value_ptr.
1766 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1767
72fb5488
SM
17682016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1769
1770 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1771
28170b88
MK
17722016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1773
1774 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1775 packets.
1776 (relocate_instruction): Remove own_buf.
1777 * server.c (own_buf): Make global.
1778 (handle_v_requests): Make global.
1779 * server.h (own_buf): New declaration.
1780 (handle_v_requests): New prototype.
1781
f39e8743
MK
17822016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1783
1784 PR 18377
1785 * linux-s390-low.c (add_insns): New function.
1786 (s390_emit_prologue): New function.
1787 (s390_emit_epilogue): New function.
1788 (s390_emit_add): New function.
1789 (s390_emit_sub): New function.
1790 (s390_emit_mul): New function.
1791 (s390_emit_lsh): New function.
1792 (s390_emit_rsh_signed): New function.
1793 (s390_emit_rsh_unsigned): New function.
1794 (s390_emit_ext): New function.
1795 (s390_emit_log_not): New function.
1796 (s390_emit_bit_and): New function.
1797 (s390_emit_bit_or): New function.
1798 (s390_emit_bit_xor): New function.
1799 (s390_emit_bit_not): New function.
1800 (s390_emit_equal): New function.
1801 (s390_emit_less_signed): New function.
1802 (s390_emit_less_unsigned): New function.
1803 (s390_emit_ref): New function.
1804 (s390_emit_if_goto): New function.
1805 (s390_emit_goto): New function.
1806 (s390_write_goto_address): New function.
1807 (s390_emit_litpool): New function.
1808 (s390_emit_const): New function.
1809 (s390_emit_call): New function.
1810 (s390_emit_reg): New function.
1811 (s390_emit_pop): New function.
1812 (s390_emit_stack_flush): New function.
1813 (s390_emit_zero_ext): New function.
1814 (s390_emit_swap): New function.
1815 (s390_emit_stack_adjust): New function.
1816 (s390_emit_set_r2): New function.
1817 (s390_emit_int_call_1): New function.
1818 (s390_emit_void_call_2): New function.
1819 (s390_emit_eq_goto): New function.
1820 (s390_emit_ne_goto): New function.
1821 (s390_emit_lt_goto): New function.
1822 (s390_emit_le_goto): New function.
1823 (s390_emit_gt_goto): New function.
1824 (s390_emit_ge_goto): New function.
1825 (s390x_emit_prologue): New function.
1826 (s390x_emit_epilogue): New function.
1827 (s390x_emit_add): New function.
1828 (s390x_emit_sub): New function.
1829 (s390x_emit_mul): New function.
1830 (s390x_emit_lsh): New function.
1831 (s390x_emit_rsh_signed): New function.
1832 (s390x_emit_rsh_unsigned): New function.
1833 (s390x_emit_ext): New function.
1834 (s390x_emit_log_not): New function.
1835 (s390x_emit_bit_and): New function.
1836 (s390x_emit_bit_or): New function.
1837 (s390x_emit_bit_xor): New function.
1838 (s390x_emit_bit_not): New function.
1839 (s390x_emit_equal): New function.
1840 (s390x_emit_less_signed): New function.
1841 (s390x_emit_less_unsigned): New function.
1842 (s390x_emit_ref): New function.
1843 (s390x_emit_if_goto): New function.
1844 (s390x_emit_const): New function.
1845 (s390x_emit_call): New function.
1846 (s390x_emit_reg): New function.
1847 (s390x_emit_pop): New function.
1848 (s390x_emit_stack_flush): New function.
1849 (s390x_emit_zero_ext): New function.
1850 (s390x_emit_swap): New function.
1851 (s390x_emit_stack_adjust): New function.
1852 (s390x_emit_int_call_1): New function.
1853 (s390x_emit_void_call_2): New function.
1854 (s390x_emit_eq_goto): New function.
1855 (s390x_emit_ne_goto): New function.
1856 (s390x_emit_lt_goto): New function.
1857 (s390x_emit_le_goto): New function.
1858 (s390x_emit_gt_goto): New function.
1859 (s390x_emit_ge_goto): New function.
1860 (s390_emit_ops): New function.
1861 (struct linux_target_ops): Fill in emit_ops hook.
1862
abd9baf9
MK
18632016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1864
1865 PR 18377
1866 * Makefile.in: Add s390 IPA files.
1867 * configure.srv: Build IPA for s390.
1868 * linux-s390-ipa.c: New file.
1869 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1870 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1871 (tdesc_s390_linux32): Likewise.
1872 (init_registers_s390_linux32v1): Likewise.
1873 (tdesc_s390_linux32v1): Likewise.
1874 (init_registers_s390_linux32v2): Likewise.
1875 (tdesc_s390_linux32v2): Likewise.
1876 (init_registers_s390_linux64): Likewise.
1877 (tdesc_s390_linux64): Likewise.
1878 (init_registers_s390_linux64v1): Likewise.
1879 (tdesc_s390_linux64v1): Likewise.
1880 (init_registers_s390_linux64v2): Likewise.
1881 (tdesc_s390_linux64v2): Likewise.
1882 (init_registers_s390_te_linux64): Likewise.
1883 (tdesc_s390_te_linux64): Likewise.
1884 (init_registers_s390_vx_linux64): Likewise.
1885 (tdesc_s390_vx_linux64): Likewise.
1886 (init_registers_s390_tevx_linux64): Likewise.
1887 (tdesc_s390_tevx_linux64): Likewise.
1888 (init_registers_s390x_linux64): Likewise.
1889 (tdesc_s390x_linux64): Likewise.
1890 (init_registers_s390x_linux64v1): Likewise.
1891 (tdesc_s390x_linux64v1): Likewise.
1892 (init_registers_s390x_linux64v2): Likewise.
1893 (tdesc_s390x_linux64v2): Likewise.
1894 (init_registers_s390x_te_linux64): Likewise.
1895 (tdesc_s390x_te_linux64): Likewise.
1896 (init_registers_s390x_vx_linux64): Likewise.
1897 (tdesc_s390x_vx_linux64): Likewise.
1898 (init_registers_s390x_tevx_linux64): Likewise.
1899 (tdesc_s390x_tevx_linux64): Likewise.
1900 (have_hwcap_s390_vx): New static variable.
1901 (s390_arch_setup): Fill have_hwcap_s390_vx.
1902 (s390_get_thread_area): New function.
1903 (s390_ft_entry_gpr_esa): New const.
1904 (s390_ft_entry_gpr_zarch): New const.
1905 (s390_ft_entry_misc): New const.
1906 (s390_ft_entry_fr): New const.
1907 (s390_ft_entry_vr): New const.
1908 (s390_ft_main_31): New const.
1909 (s390_ft_main_64): New const.
1910 (s390_ft_exit_fr): New const.
1911 (s390_ft_exit_vr): New const.
1912 (s390_ft_exit_misc): New const.
1913 (s390_ft_exit_gpr_esa): New const.
1914 (s390_ft_exit_gpr_zarch): New const.
1915 (append_insns): New function.
1916 (s390_relocate_instruction): New function.
1917 (s390_install_fast_tracepoint_jump_pad): New function.
1918 (s390_get_min_fast_tracepoint_insn_len): New function.
1919 (s390_get_ipa_tdesc_idx): New function.
1920 (struct linux_target_ops): Wire in the above functions.
1921 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1922 * linux-s390-tdesc.h: New file.
1923
a4105d04
MK
19242016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1925
1926 * linux-s390-low.c (s390_supports_tracepoints): New function.
1927 (struct linux_target_ops): Fill supports_tracepoints hook.
1928
35ac8b3e
YQ
19292016-03-18 Yao Qi <yao.qi@linaro.org>
1930
1931 * linux-low.c (lwp_signal_can_be_delivered): New function.
1932 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1933
94610ec4
YQ
19342016-03-18 Yao Qi <yao.qi@linaro.org>
1935
1936 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1937 0 if signal is enqueued. Remove 'signal' from one debugging
1938 message. Move one debugging message to some lines below.
1939 Remove code setting 'signal' to 0.
1940
80aea927
YQ
19412016-03-18 Yao Qi <yao.qi@linaro.org>
1942
1943 * linux-low.c (linux_low_filter_event): Remove redundant
1944 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1945
b04fd3be
MK
19462016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1947
1948 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1949 (struct linux_target_ops): Wire in the above.
1950
c40c8d4b
YQ
19512016-03-03 Yao Qi <yao.qi@linaro.org>
1952
1953 * linux-low.c: Update comments to start_step_over.
1954
0f8288ae
YQ
19552016-03-03 Yao Qi <yao.qi@linaro.org>
1956
1957 PR server/19736
1958 * linux-low.c (handle_extended_wait): Set child suspended
1959 if event_lwp->bp_reinsert isn't zero.
1960
fdbd04a8
YQ
19612016-03-02 Yao Qi <yao.qi@linaro.org>
1962
1963 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1964 enqueue_pending_signal.
1965
6896a8fa
MK
19662016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1967
1968 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1969 is actually loaded.
1970
ab503087
MK
19712016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1972
1973 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1974 (s390_regmap_3264) [!__s390x__]: New global.
1975 (s390_collect_ptrace_register): Skip map entries containing -1.
1976 (s390_supply_ptrace_register): Ditto.
1977 (s390_fill_gprs_high): New function.
1978 (s390_store_gprs_high): New function.
1979 (s390_regsets): Add NT_S390_HIGH_GPRS.
1980 (s390_get_hwcap): Enable on 31-bit.
1981 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1982 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1983 Detect NT_S390_HIGH_GPRS.
1984 (s390_usrregs_info_3264): Enable on 31-bit.
1985 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1986 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1987
ae91f625
MK
19882016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1989
1990 PR gdb/13808
1991 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1992 * configure.srv: Ditto.
1993 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1994 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1995 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1996 (init_registers_amd64_linux): Remove prototype.
1997 (tdesc_amd64_linux): Remove declaration.
1998 (get_ipa_tdesc): New function.
1999 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2000 initialize remaining tdescs.
2001 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2002 (init_registers_i386_linux): Remove prototype.
2003 (tdesc_i386_linux): Remove declaration.
2004 (get_ipa_tdesc): New function.
2005 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2006 initialize remaining tdescs.
2007 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2008 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2009 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2010 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2011 (x86_get_ipa_tdesc_idx): New function.
2012 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2013 * linux-x86-tdesc.h: New file.
2014 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2015 (target_get_ipa_tdesc_idx): New macro.
2016 * tracepoint.c (ipa_tdesc_idx): New macro.
2017 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2018 (symbol_list): Add ipa_tdesc_idx.
2019 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2020 (ipa_tdesc): Remove.
2021 (ipa_tdesc_idx): New variable.
2022 (get_context_regcache): Use get_ipa_tdesc.
2023 (gdb_collect): Ditto.
2024 (gdb_probe): Ditto.
2025 * tracepoint.h (get_ipa_tdesc): New prototype.
2026 (ipa_tdesc): Remove.
2027
e7ad2f14
PA
20282016-02-24 Pedro Alves <palves@redhat.com>
2029
2030 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2031 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2032 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2033 Factor out common code between the USE_SIGTRAP_SIGINFO and
2034 !USE_SIGTRAP_SIGINFO blocks.
2035 (linux_low_filter_event): Call save_stop_reason instead of
2036 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2037 Update comments.
2038 (linux_wait_1): Update comments.
2039
657f9cde
WW
20402016-02-24 Wei-cheng Wang <cole945@gmail.com>
2041
2042 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2043 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2044 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2045 ppc_insert_point, ppc_remove_point.
2046
b00b61e1
MK
20472016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2048
2049 * linux-s390-low.c (s390_supports_z_point_type): New function.
2050 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2051
553cb527
YQ
20522016-02-16 Yao Qi <yao.qi@linaro.org>
2053
2054 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2055 PC. Get pc from regcache_read_pc.
2056
a5652c21
YQ
20572016-02-12 Yao Qi <yao.qi@linaro.org>
2058
2059 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2060 or linux_get_pc_32bit.
2061 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2062
ed443b61
YQ
20632016-02-12 Yao Qi <yao.qi@linaro.org>
2064
2065 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2066 arm_linux_get_next_pcs_fixup.
2067
020ecd38
MK
20682016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2069
2070 * tracepoint.c (x_tracepoint_action_download): Change
2071 write_inferior_data_ptr to write_inferior_data_pointer.
2072 (cmd_qtstart): Likewise.
2073 (write_inferior_data_ptr): Remove.
2074 (download_agent_expr): Change write_inferior_data_ptr to
2075 write_inferior_data_pointer.
2076 (download_tracepoint_1): Likewise.
2077 (download_tracepoint): Likewise.
2078 (download_trace_state_variables): Likewise.
2079
7cae9051
WW
20802016-02-11 Wei-cheng Wang <cole945@gmail.com>
2081 Marcin Kościelnicki <koriakin@0x04.net>
2082
2083 * tracepoint.c (struct tracepoint_action_ops): Remove.
2084 (struct tracepoint_action): Remove ops.
2085 (m_tracepoint_action_download, r_tracepoint_action_download)
2086 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2087 size and offset accordingly.
2088 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2089 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2090 (tracepoint_action_send, tracepoint_action_download): New functions.
2091 Helpers for trace action handlers.
2092 (add_tracepoint_action): Remove setup actions ops.
2093 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2094
9f6a71b4
YQ
20952016-02-10 Yao Qi <yao.qi@linaro.org>
2096
2097 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2098
1e94266c
SM
20992016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2100
2101 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2102 to AC_OUTPUT.
2103 * configure: Regenerate.
2104
8adce034
SM
21052016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2106
2107 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2108 void * to gdb_byte *.
2109 * linux-low.c (siginfo_fixup): Likewise.
2110 (linux_xfer_siginfo): Likewise.
2111 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2112 Likewise.
2113 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2114
93813b37
WT
21152016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2116
2117 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2118 to srv_tgtobj.
2119 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2120 to srv_tgtobj.
2121 * linux-x86-low.c [__x86_64__]: Include
2122 "nat/amd64-linux-siginfo.h".
2123 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2124 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2125 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2126 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2127 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2128 (cpt_si_fd, si_timerid, si_overrun): Move from
2129 nat/amd64-linux-siginfo.c.
2130 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2131
8424cc97
SM
21322016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2133
2134 * server.c (skip_to_semicolon): Remove.
2135 (process_point_options): Use strchrnul instead of
2136 skip_to_semicolon.
2137
4d18591b
YQ
21382016-01-26 Yao Qi <yao.qi@linaro.org>
2139
2140 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2141 * linux-low.c (install_software_single_step_breakpoints): Don't
2142 call regcache_read_pc.
2143 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2144 argument pc.
2145
d8020970
YQ
21462016-01-26 Yao Qi <yao.qi@linaro.org>
2147
2148 * linux-low.c (install_software_single_step_breakpoints): Call
2149 regcache_read_pc instead of get_pc.
2150
8b207339
YQ
21512016-01-26 Yao Qi <yao.qi@linaro.org>
2152
2153 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2154 (unblock_async_io): Rename to ...
2155 (block_unblock_async_io): ... it. New function.
2156 (enable_async_io): Don't install SIGIO handler. Unblock it
2157 instead.
2158 (disable_async_io): Don't ignore SIGIO. Block it instead.
2159 (initialize_async_io): Install SIGIO handler. Don't call
2160 unblock_async_io.
2161
18879fef
YQ
21622016-01-26 Yao Qi <yao.qi@linaro.org>
2163
2164 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2165 first character is '\003', call *the_target->request_interrupt.
2166
a0f8e08a
YQ
21672016-01-25 Yao Qi <yao.qi@linaro.org>
2168
2169 * remote-utils.c (new_thread_notify): Remove.
2170 (dead_thread_notify): Likewise.
2171 * remote-utils.h (new_thread_notify): Remove declaration.
2172 (dead_thread_notify): Likewise.
2173
cc5fd9ab
MK
21742016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2175
2176 * gdb.trace/pending.exp: Fix expected message on continue.
2177
99e8eb11
MK
21782016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2179
2180 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2181 it works properly on big-endian machines where sizeof (CORE_ADDR)
2182 != sizeof (void *).
2183
a994041d
PA
21842016-01-21 Pedro Alves <palves@redhat.com>
2185
2186 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2187 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2188 * configure: Regenerate.
2189
f7a6a40d
YQ
21902016-01-21 Yao Qi <yao.qi@linaro.org>
2191
2192 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2193 is_thumb and set it according to CPSR saved on the stack.
2194 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2195 arm_sigreturn_next_pc.
2196
6f69e520
YQ
21972016-01-18 Yao Qi <yao.qi@linaro.org>
2198
2199 * linux-low.c (linux_set_pc_64bit): New function.
2200 (linux_get_pc_64bit): New function.
2201 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2202 Declare.
2203 * linux-sparc-low.c (debug_threads): Remove declaration.
2204 (sparc_get_pc): Remove.
2205 (the_low_target): Use linux_get_pc_64bit instead of
2206 sparc_get_pc.
2207 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2208 (the_low_target): Use linux_get_pc_64bit and
2209 linux_set_pc_64bit.
2210
276d4552
YQ
22112016-01-18 Yao Qi <yao.qi@linaro.org>
2212
2213 * linux-arm-low.c (debug_threads): Remove declaration.
2214 (arm_get_pc, arm_set_pc): Remove.
2215 (the_low_target): Use linux_get_pc_32bit and
2216 linux_set_pc_32bit.
2217 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2218 (the_low_target): Use linux_get_pc_32bit and
2219 linux_set_pc_32bit.
2220 * linux-cris-low.c (debug_threads): Remove declaration.
2221 (cris_get_pc, cris_set_pc,): Remove.
2222 (the_low_target): Use linux_get_pc_32bit and
2223 linux_set_pc_32bit.
2224 * linux-crisv32-low.c (debug_threads): Remove declaration.
2225 (cris_get_pc, cris_set_pc): Remove.
2226 (the_low_target): Use linux_get_pc_32bit and
2227 linux_set_pc_32bit.
2228 * linux-low.c: Include inttypes.h.
2229 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2230 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2231 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2232 (the_low_target): Use linux_get_pc_32bit and
2233 linux_set_pc_32bit.
2234 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2235 (the_low_target): Use linux_get_pc_32bit and
2236 linux_set_pc_32bit.
2237 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2238 (the_low_target): Use linux_get_pc_32bit and
2239 linux_set_pc_32bit.
2240 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2241 (the_low_target): Use linux_get_pc_32bit and
2242 linux_set_pc_32bit.
2243 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2244 (the_low_target): Use linux_get_pc_32bit and
2245 linux_set_pc_32bit.
2246
eb0edac8
GB
22472016-01-18 Gary Benson <gbenson@redhat.com>
2248
2249 * configure.ac (AC_FUNC_FORK): New check.
2250 * config.in: Regenerate.
2251 * configure: Likewise.
2252
1b451dda
YQ
22532016-01-14 Yao Qi <yao.qi@linaro.org>
2254
2255 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2256 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2257 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2258 arm_get_next_pcs_ctor.
2259
82075af2
JS
22602016-01-12 Josh Stone <jistone@redhat.com>
2261 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2262
2263 * inferiors.h: Include "gdb_vecs.h".
2264 (struct process_info): Add syscalls_to_catch.
2265 * inferiors.c (remove_process): Free syscalls_to_catch.
2266 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2267 syscall_return stops.
2268 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2269 * server.c (handle_general_set): Handle QCatchSyscalls.
2270 (handle_query): Report support for QCatchSyscalls.
2271 * target.h (struct target_ops): Add supports_catch_syscall.
2272 (target_supports_catch_syscall): New macro.
2273 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2274 (struct lwp_info): Add syscall_state.
2275 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2276 Maintain syscall_state and syscalls_to_catch across exec.
2277 (get_syscall_trapinfo): New function, proxy to the_low_target.
2278 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2279 (linux_low_filter_event): Toggle syscall_state entry/return for
2280 syscall traps, and set it ignored for all others.
2281 (gdb_catching_syscalls_p): New function.
2282 (gdb_catch_this_syscall_p): New function.
2283 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2284 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2285 (linux_supports_catch_syscall): New function.
2286 (linux_target_ops): Install it.
2287 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2288 (the_low_target): Install it.
2289
8f13a3ce
MF
22902016-01-12 Mike Frysinger <vapier@gentoo.org>
2291
2292 * acinclude.m4: Include new ../warning.m4 file.
2293 * configure: Regenerated.
2294 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2295
5b3da067
MF
22962016-01-12 Mike Frysinger <vapier@gentoo.org>
2297
2298 * ax.c (is_goto_target): Mark static.
2299 * linux-low.c (register_addr): Likewise.
2300 (linux_fetch_registers, linux_store_registers): Likewise.
2301 * mem-break.c (any_persistent_commands): Fix old prototype.
2302 (add_commands_to_breakpoint): Mark static.
2303 * regcache.c (find_register_by_name): Delete unused func.
2304 * remote-utils.c (hex_or_minus_one): Mark static.
2305 * server.c (monitor_show_help): Mark static.
2306 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2307 handle_v_requests): Likewise.
2308
bc504a31
PA
23092016-01-12 Pedro Alves <palves@redhat.com>
2310
2311 Remove use of the registered trademark symbol throughout.
2312
5a0dd67a
YQ
23132016-01-08 Yao Qi <yao.qi@linaro.org>
2314
2315 * remote-utils.c (getpkt): If c is '\003', call target hook
2316 request_interrupt.
2317
b2ca446f
YQ
23182016-01-06 Yao Qi <yao.qi@linaro.org>
2319
2320 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2321 linux-aarch32-low.c.
2322 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2323 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2324 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2325 (thumb2_breakpoint): Declare.
2326 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2327 linux-aarch32-low.h.
2328 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2329 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2330 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2331
edd88788
JB
23322016-01-01 Joel Brobecker <brobecker@adacore.com>
2333
2334 * gdbreplay.c (gdbreplay_version): Change copyright year in
2335 version message.
2336 * server.c (gdbserver_version): Likewise.
2337
65da7f14
PP
23382015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2339
2340 * server.c (crc32_table): Delete.
2341 (crc32): Use libiberty's xcrc32 function.
2342
4abd5ed2
JB
23432015-12-22 Joel Brobecker <brobecker@adacore.com>
2344
2345 * lynx-low.c (lynx_delete_thread_callback): New function.
2346 (lynx_mourn): Properly delete our process and all of its
2347 threads. Remove call to clear_inferiors.
2348
0e50fe5c
JB
23492015-12-22 Joel Brobecker <brobecker@adacore.com>
2350
2351 * target.c (thread_search_callback): Add check that
2352 the thread_stopped target callback is not NULL before
2353 calling it.
2354
35adc03f
YQ
23552015-12-21 Yao Qi <yao.qi@linaro.org>
2356
2357 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2358 arm breakpoint.
2359
bd2b2909
AT
23602015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2361
2362 * server.c (handle_query): Call target_supports_software_single_step.
2363
7fe5e27e
AT
23642015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2365
2366 * linux-low.c (single_step): New function.
2367 (linux_resume_one_lwp_throw): Call single_step.
2368 (start_step_over): Likewise.
2369
d9311bfa
AT
23702015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2371
2372 * Makefile.in (SFILES): Append arch/arm-linux.c,
2373 arch/arm-get-next-pcs.c.
2374 (arm-linux.o): New rule.
2375 (arm-get-next-pcs.o): New rule.
2376 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2377 arm-linux.o.
2378 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2379 to linux-aarch32-low.c.
2380 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2381 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2382 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2383 (thumb2_breakpoint_len): Likewise.
2384 (arm_is_thumb_mode): Make non-static.
2385 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2386 from linux-aarch32-low.c.
2387 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2388 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2389 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2390 (thumb2_breakpoint_len): Likewise.
2391 (arm_is_thumb_mode): New declaration.
2392 * linux-arm-low.c: Include arch/arm-linux.h
2393 aarch/arm-get-next-pcs.h, sys/syscall.h.
2394 (get_next_pcs_ops): New struct.
2395 (get_next_pcs_addr_bits_remove): New function.
2396 (get_next_pcs_is_thumb): New function.
2397 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2398 (arm_sigreturn_next_pc): Likewise.
2399 (get_next_pcs_syscall_next_pc): Likewise.
2400 (arm_gdbserver_get_next_pcs): Likewise.
2401 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2402 Initialize.
2403 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2404 * server.h: Include gdb_vecs.h.
2405
68ce2059
AT
24062015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2407
2408 * Makefile.in (SFILES): Append common/common-regcache.c.
2409 (OBS): Append common-regcache.o.
2410 (common-regcache.o): New rule.
2411 * regcache.c (init_register_cache): Initialize cache to
2412 REG_UNAVAILABLE.
2413 (regcache_raw_read_unsigned): New function.
2414 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2415 register_status enum.
2416
fa5308bd
AT
24172015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2418
2419 * linux-aarch64-low.c (the_low_targets): Rename
2420 breakpoint_reinsert_addr to get_next_pcs.
2421 * linux-arm-low.c (the_low_targets): Likewise.
2422 * linux-bfin-low.c (the_low_targets): Likewise.
2423 * linux-cris-low.c (the_low_targets): Likewise.
2424 * linux-crisv32-low.c (the_low_targets): Likewise.
2425 * linux-low.c (can_software_single_step): Likewise.
2426 (install_software_single_step_breakpoints): New function.
2427 (start_step_over): Use install_software_single_step_breakpoints.
2428 * linux-low.h: New CORE_ADDR vector.
2429 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2430 get_next_pcs.
2431 * linux-mips-low.c (the_low_targets): Likewise.
2432 * linux-nios2-low.c (the_low_targets): Likewise.
2433 * linux-sparc-low.c (the_low_targets): Likewise.
2434
4a6ed09b
PA
24352015-12-17 Pedro Alves <palves@redhat.com>
2436
2437 * linux-low.c (linux_kill_one_lwp): Remove references to
2438 LinuxThreads.
2439 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2440 to 'kill'.
2441 (linux_init_signals): Delete.
2442 (initialize_low): Adjust.
2443 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2444
7544db95
PA
24452015-12-16 Pedro Alves <palves@redhat.com>
2446
2447 * configure.ac (compiler warning flags): When testing a
2448 -Wno-foo option, check whether -Wfoo works instead.
2449 * configure: Regenerate.
2450
8020350c
DB
24512015-12-11 Don Breazeal <donb@codesourcery.com>
2452
2453 * server.c (process_serial_event): Don't exit from gdbserver
2454 in remote mode if there are still active inferiors.
2455
db91f502
YQ
24562015-12-11 Yao Qi <yao.qi@linaro.org>
2457
2458 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2459 arm_breakpoint_at if the process is 32-bit.
2460
b37a6290
YQ
24612015-12-11 Yao Qi <yao.qi@linaro.org>
2462
2463 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2464 arm breakpoint.
2465
17b1509a
YQ
24662015-12-07 Yao Qi <yao.qi@linaro.org>
2467
2468 * configure.srv: Append arm.o to srv_tgtobj for
2469 aarch64*-*-linux* target.
2470 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2471 from linux-arm-low.c.
2472 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2473 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2474 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2475 (thumb2_breakpoint_len): Likewise.
2476 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2477 (arm_breakpoint_kinds): Likewise.
2478 (arm_breakpoint_kind_from_pc): Likewise.
2479 (arm_sw_breakpoint_from_kind): Likewise.
2480 (arm_breakpoint_kind_from_current_state): Likewise.
2481 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2482 (arm_sw_breakpoint_from_kind): Declare.
2483 (arm_breakpoint_kind_from_current_state): Declare.
2484 (arm_breakpoint_at): Declare.
2485 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2486 arm_sw_breakpoint_from_kind if process is 32-bit.
2487 (aarch64_breakpoint_kind_from_pc): New function.
2488 (aarch64_breakpoint_kind_from_current_state): New function.
2489 (the_low_target): Initialize fields breakpoint_kind_from_pc
2490 and breakpoint_kind_from_current_state.
2491 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2492 linux-aarch32-low.c.
2493 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2494 (arm_breakpoint, arm_breakpoint_len): Likewise.
2495 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2496 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2497 (arm_is_thumb_mode): Likewise.
2498 (arm_breakpoint_at): Likewise.
2499 (arm_breakpoint_kind_from_pc): Likewise.
2500 (arm_sw_breakpoint_from_kind): Likewise.
2501 (arm_breakpoint_kind_from_current_state): Likewise.
2502
2503 Revert:
2504 2015-08-04 Yao Qi <yao.qi@linaro.org>
2505
2506 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2507 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2508 * server.c (extended_protocol): Remove "static".
2509 * server.h (extended_protocol): Declare it.
2510
ece66d65
JS
25112015-12-04 Josh Stone <jistone@redhat.com>
2512
2513 * target.h (struct target_ops) <arch_setup>: Rename to ...
2514 (struct target_ops) <post_create_inferior>: ... this.
2515 (target_arch_setup): Rename to ...
2516 (target_post_create_inferior): ... this, calling post_create_inferior.
2517 * server.c (start_inferior): Update target_arch_setup calls to
2518 target_post_create_inferior.
2519 * linux-low.c (linux_low_ptrace_options): Forward declare.
2520 (linux_arch_setup): Update its comment for general use.
2521 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2522 (struct linux_target_ops): Use linux_post_create_inferior.
2523 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2524 to post_create_inferior.
2525 * nto-low.c (struct nto_target_ops): Likewise.
2526 * spu-low.c (struct spu_target_ops): Likewise.
2527 * win32-low.c (struct win32_target_ops): Likewise.
2528
e58c48b4
AT
25292015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2530
2531 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2532
fbec8956
AT
25332015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2534
2535 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2536 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2537 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2538 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2539 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2540 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2541 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2542 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2543 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2544 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2545 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2546 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2547
9b4c5f87
AT
25482015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2549
2550 * linux-low.c (linux_look_up_symbols): Don't call
2551 linux_supports_traceclone.
2552 * linux-low.h (thread_db_init): Remove use_events argument.
2553 * thread-db.c (thread_db_use_event): Remove global variable.
2554 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2555 (struct thread_db) <td_create_bp>: Remove field.
2556 (thread_db_create_event): Remove function.
2557 (thread_db_enable_reporting): Likewise.
2558 (find_one_thread): Don't check for thread_db_use_events.
2559 (attach_thread): Likewise.
2560 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2561 (try_thread_db_load_1): Don't check for thread_db_use_events.
2562 (thread_db_init): Remove use_events argument and thread events
2563 handling.
2564 (remove_thread_event_breakpoints): Remove function.
2565 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2566
7d00775e
AT
25672015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2568
2569 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2570 New function.
2571 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2572 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2573 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2574 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2575 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2576 Initialize.
2577 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2578 New function.
2579 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2580 * linux-low.c (can_hardware_single_step): Use
2581 supports_hardware_single_step.
2582 (can_software_single_step): New function.
2583 (start_step_over): Call can_software_single_step.
2584 (linux_supports_hardware_single_step): New function.
2585 (struct target_ops) <supports_software_single_step>: Initialize.
2586 * linux-low.h (struct linux_target_ops)
2587 <supports_hardware_single_step>: Initialize.
2588 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2589 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2590 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2591 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2592 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2593 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2594 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2595 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2596 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2597 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2598 Initialize.
2599 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2600 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2601 Initialize.
2602 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2603 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2604 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2605 New function.
2606 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2607 * target.h (struct target_ops): <supports_software_single_step>:
2608 New field.
2609 (target_supports_software_single_step): New macro.
2610
2d97cd35
AT
26112015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2612
2613 * linux-low.c (linux_wait_1): Fix pc advance condition.
2614 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2615 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2616
769ef81f
AT
26172015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2618
2619 * linux-arm-low.c (arm_is_thumb_mode): New function.
2620 (arm_breakpoint_at): Use arm_is_thumb_mode.
2621 (arm_breakpoint_kind_from_current_state): New function.
2622 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2623 Initialize.
2624 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2625 (linux_breakpoint_kind_from_current_state): New function.
2626 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2627 * linux-low.h (struct linux_target_ops)
2628 <breakpoint_kind_from_current_state>: New field.
2629 * target.h (struct target_ops): Likewise.
2630 (target_breakpoint_kind_from_current_state): New macro.
2631
1bebeeca
PA
26322015-11-30 Pedro Alves <palves@redhat.com>
2633
2634 * linux-low.c (linux_resume): Wake up the event loop before
2635 returning.
2636
a67a9fae
PA
26372015-11-30 Pedro Alves <palves@redhat.com>
2638
2639 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2640 check.
2641 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2642 to -1.
2643 * target.c (struct thread_search): New structure.
2644 (thread_search_callback): New function.
2645 (prev_general_thread): New global.
2646 (prepare_to_access_memory, done_accessing_memory): New functions.
2647 * target.h (prepare_to_access_memory, done_accessing_memory):
2648 Replace macros with function declarations.
2649
f2faf941
PA
26502015-11-30 Pedro Alves <palves@redhat.com>
2651
2652 PR 14618
2653 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2654 report TARGET_WAITKIND_NO_RESUMED.
2655 * remote-utils.c (prepare_resume_reply): Handle
2656 TARGET_WAITKIND_NO_RESUMED.
2657 * server.c (report_no_resumed): New global.
2658 (handle_query) <qSupported>: Handle "no-resumed+". Report
2659 "no-resumed+" support.
2660 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2661 return error if the client doesn't support no-resumed events.
2662 (push_stop_notification): New function.
2663 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2664 events if the client supports them.
2665
a681f9c9
PA
26662015-11-30 Pedro Alves <palves@redhat.com>
2667
2668 * linux-low.c (thread_still_has_status_pending_p): Don't check
2669 vCont;t here.
2670 (lwp_resumed): New function.
2671 (status_pending_p_callback): Return early if the LWP is not
2672 supposed to be resumed.
2673
65706a29
PA
26742015-11-30 Pedro Alves <palves@redhat.com>
2675
2676 * linux-low.c (handle_extended_wait): Assert that the LWP's
2677 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2678 thread create events, leave the new child's status pending.
2679 (linux_low_filter_event): If GDB wants to hear about thread exit
2680 events, leave the LWP marked dead and don't delete it.
2681 (linux_wait_for_event_filtered): Don't check for thread exit.
2682 (filter_exit_event): New function.
2683 (linux_wait_1): Use it, when returning an exit event.
2684 (linux_resume_one_lwp_throw): Assert that the LWP's
2685 waitstatus is TARGET_WAITKIND_IGNORE.
2686 * remote-utils.c (prepare_resume_reply): Handle
2687 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2688 * server.c (report_thread_events): New global.
2689 (handle_general_set): Handle QThreadEvents.
2690 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2691 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2692 TARGET_WAITKIND_THREAD_EXITED.
2693 * server.h (report_thread_events): Declare.
2694
56cf4bed
PA
26952015-11-30 Pedro Alves <palves@redhat.com>
2696
2697 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2698 the thread's last_resume_kind was resume_stop.
2699
500c1d85
PA
27002015-11-30 Pedro Alves <palves@redhat.com>
2701
2702 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2703 before returning.
2704
de979965
PA
27052015-11-30 Pedro Alves <palves@redhat.com>
2706
2707 * server.c (handle_v_requests): Handle vCtrlC.
2708
34c65914
PA
27092015-11-30 Pedro Alves <palves@redhat.com>
2710
2711 * gdbthread.h (find_any_thread_of_pid): Declare.
2712 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2713 functions.
2714 * server.c (handle_query): If current_thread is NULL, look for
2715 another thread of the selected process.
2716
79efa585 27172015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 2718 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
2719
2720 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2721 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2722 name in reply.
2723 * target.h (struct target_ops) <thread_name>: New field.
2724 (target_thread_name): New macro.
2725
80d82c19
JB
27262015-11-23 Joel Brobecker <brobecker@adacore.com>
2727
2728 * regcache.h (regcache_invalidate_pid): Add declaration.
2729 * regcache.c (regcache_invalidate_pid): New function, extracted
2730 from regcache_invalidate.
2731 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2732 Add trivial documentation comment.
2733 * lynx-low.c: Use regcache_invalidate_pid instead of
2734 regcache_invalidate.
2735
64da5dd5
JB
27362015-11-23 Joel Brobecker <brobecker@adacore.com>
2737
2738 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2739 and Elf64_auxv_t if the target is Android.
2740
37ce4055
DE
27412015-11-22 Doug Evans <xdje42@gmail.com>
2742
2743 * target.h: #include <sys/types.h>.
2744
06e03fff
PA
27452015-11-19 Pedro Alves <palves@redhat.com>
2746
2747 * linux-low.c (linux_process_qsupported): Change prototype.
2748 Adjust.
2749 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2750 Change prototype.
2751 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2752 and adjust to loop over all features.
2753 * server.c (handle_query) <qSupported>: Adjust to call
2754 target_process_qsupported once, passing it a vector of unprocessed
2755 features.
2756 * target.h (struct target_ops) <process_qsupported>: Change
2757 prototype.
2758 (target_process_qsupported): Adjust.
2759
9a084706
PA
27602015-11-19 Pedro Alves <palves@redhat.com>
2761
2762 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2763 mode.
2764 * configure: Regenerate.
2765
dad44a1f
PA
27662015-11-19 Pedro Alves <palves@redhat.com>
2767
2768 * configure: Regenerate.
2769
231c0592
YQ
27702015-11-19 Yao Qi <yao.qi@linaro.org>
2771
2772 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2773 type to uint32_t.
2774
6c1c9a8b
YQ
27752015-11-19 Yao Qi <yao.qi@linaro.org>
2776
2777 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2778 (struct aarch64_operand): Move enum out.
2779
9caa3311
YQ
27802015-11-19 Yao Qi <yao.qi@linaro.org>
2781
2782 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2783 struct user_fpsimd_state *.
2784 (aarch64_store_fpregset): Likewise.
2785
6a69a054
YQ
27862015-11-19 Yao Qi <yao.qi@linaro.org>
2787
2788 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2789 struct user_pt_regs *.
2790 (aarch64_store_gregset): Likewise.
2791
1798301e
PA
27922015-11-18 Pedro Alves <palves@redhat.com>
2793
2794 * Makefile.in (all_object_files): Add $IPA_OBJS.
2795
ce7715e2
PA
27962015-11-17 Pedro Alves <palves@redhat.com>
2797
2798 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2799 GDB_SIGNAL_0 and gdb_signal_to_string.
2800
c0879059
PA
28012015-11-17 Pedro Alves <palves@redhat.com>
2802
2803 * win32-low.c (handle_output_debug_string): Remove parameter.
2804 (win32_kill): Remove our_status local and adjust call to
2805 handle_output_debug_string.
2806 (get_child_debug_event): Adjust call to
2807 handle_output_debug_string.
2808
1996e237
SM
28092015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2810
2811 * linux-mips-low.c (mips_fill_gregset): Add cast.
2812 (mips_store_gregset): Likewise.
2813 (mips_fill_fpregset): Likewise.
2814 (mips_store_fpregset): Likewise.
2815
cbec665b
SM
28162015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2817
2818 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2819 priv.
2820
eb3e3c67
SM
28212015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2822
2823 * linux-mips-low.c (mips_linux_new_thread): Change type of
2824 watch_type to enum target_hw_bp_type.
2825
171de4b8
SM
28262015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2827
2828 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2829 Change return type to arm_hwbp_type.
2830
04248ead
SM
28312015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2832
2833 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2834 (arm_store_gregset): Likewise.
2835 * linux-arm-low.c (arm_get_hwcap): Likewise.
2836 (arm_read_description): Likewise.
2837
04b3479c
SM
28382015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2839
2840 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2841
2bc84e8a
SM
28422015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2843
2844 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2845 (ppc_fill_vsxregset): Likewise.
2846 (ppc_store_vsxregset): Likewise.
2847 (ppc_fill_vrregset): Likewise.
2848 (ppc_store_vrregset): Likewise.
2849 (ppc_fill_evrregset): Likewise.
2850 (ppc_store_evrregset): Likewise.
2851
e6c5bb05
SM
28522015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2853
2854 * linux-ppc-low.c (ppc_usrregs_info): Remove
2855 forward-declaration.
2856 (ppc_arch_setup): Move lower in file.
2857
7ea45d72
SM
28582015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2859
2860 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2861 (ps_pdwrite): Likewise.
2862
69291610
HW
28632015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2864
2865 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2866 to after assert checks.
2867
b42945fd
SM
28682015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2869
2870 * proc-service.c (ps_pdread): Add/adjust casts.
2871 (ps_pdwrite): Add/adjust casts.
2872
d6f85c84
SM
28732015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2874
2875 * server.c (handle_search_memory_1): Cast return value of
2876 memmem.
2877
f98cd059
SM
28782015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2879
2880 * server.c (write_qxfer_response): Change type of data to
2881 gdb_byte *.
2882
d2412fa5
PA
28832015-10-29 Pedro Alves <palves@redhat.com>
2884
2885 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2886
c17414a2
PA
28872015-10-29 Pedro Alves <palves@redhat.com>
2888
2889 * tracepoint.c (clear_installed_tracepoints): Add casts.
2890
e053fbc4
PA
28912015-10-29 Pedro Alves <palves@redhat.com>
2892
2893 * server.c (handle_v_cont, process_serial_event): Add enum
2894 gdb_signal casts to signal parsing code.
2895
add67df8
PA
28962015-10-29 Pedro Alves <palves@redhat.com>
2897
2898 * linux-low.h (NULL_REGSET): Define.
2899 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2900 * linux-arm-low.c (arm_regsets): Likewise.
2901 * linux-crisv32-low.c (cris_regsets): Likewise.
2902 * linux-m68k-low.c (m68k_regsets): Likewise.
2903 * linux-mips-low.c (mips_regsets): Likewise.
2904 * linux-nios2-low.c (nios2_regsets): Likewise.
2905 * linux-ppc-low.c (ppc_regsets): Likewise.
2906 * linux-s390-low.c (s390_regsets): Likewise.
2907 * linux-sh-low.c (sh_regsets): Likewise.
2908 * linux-sparc-low.c (sparc_regsets): Likewise.
2909 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2910 * linux-tile-low.c (tile_regsets): Likewise.
2911 * linux-x86-low.c (x86_regsets): Likewise.
2912 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2913
50bc912a
PA
29142015-10-29 Pedro Alves <palves@redhat.com>
2915
2916 * linux-low.h (NULL_REGSET): Define.
2917 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2918 * linux-arm-low.c (arm_regsets): Likewise.
2919 * linux-crisv32-low.c (cris_regsets): Likewise.
2920 * linux-m68k-low.c (m68k_regsets): Likewise.
2921 * linux-mips-low.c (mips_regsets): Likewise.
2922 * linux-nios2-low.c (nios2_regsets): Likewise.
2923 * linux-ppc-low.c (ppc_regsets): Likewise.
2924 * linux-s390-low.c (s390_regsets): Likewise.
2925 * linux-sh-low.c (sh_regsets): Likewise.
2926 * linux-sparc-low.c (sparc_regsets): Likewise.
2927 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2928 * linux-tile-low.c (tile_regsets): Likewise.
2929 * linux-x86-low.c (x86_regsets): Likewise.
2930 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2931
682b2546
DE
29322015-10-26 Doug Evans <dje@google.com>
2933
2934 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2935
963843d4
DE
29362015-10-26 Doug Evans <dje@google.com>
2937
2938 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2939
d41401ac
DE
29402015-10-26 Doug Evans <dje@google.com>
2941
2942 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2943 for debug_printf.
2944 (attach_thread, find_new_threads_callback): Ditto.
2945
3db28855
AT
29462015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2947
2948 * mem-break.h (set_breakpoint_data): Remove.
2949
fb78e89c
AT
29502015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2951
2952 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2953 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2954 (initialize_low): Remove set_breakpoint_data call.
2955 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2956 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2957 (initialize_low): Remove set_breakpoint_data call.
2958 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2959 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2960 (initialize_low): Remove set_breakpoint_data call.
2961
2e6ee069
AT
29622015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2963
2964 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2965 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2966 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2967 * target.h (target_breakpoint_kind_from_pc): New macro.
2968
1652a986
AT
29692015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2970
2971 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2972 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2973 the default breakpoint kind.
2974
abeead09
AT
29752015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2976
2977 * linux-arm-low.c (arm_supports_z_point_type): Add software
2978 breakpoint support.
2979
b0b4b501
AT
29802015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2981
2982 * linux-arm-low.c: Refactor breakpoint definitions.
2983 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2984 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2985
8689682c
AT
29862015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2987
2988 * Makefile.in: Add arm.c/o.
2989 * configure.srv: Likewise.
2990 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2991 (arm_breakpoint_kind_from_pc): New function.
2992 (arm_sw_breakpoint_from_kind): Return proper kind.
2993 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2994
27165294
AT
29952015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2996
2997 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2998 removal.
2999 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3000 (struct raw_breakpoint) <size>: Remove.
3001 (struct raw_breakpoint) <kind>: Add.
3002 (bp_size): New function.
3003 (bp_opcode): Likewise.
3004 (find_raw_breakpoint_at): Adjust for kind.
3005 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3006 (remove_memory_breakpoint): Adjust for kind call bp_size.
3007 (set_raw_breakpoint_at): Adjust for kind.
3008 (set_breakpoint): Likewise.
3009 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3010 (delete_raw_breakpoint): Adjust for kind.
3011 (delete_breakpoint): Likewise.
3012 (find_gdb_breakpoint): Likewise.
3013 (set_gdb_breakpoint_1): Likewise.
3014 (set_gdb_breakpoint): Likewise.
3015 (delete_gdb_breakpoint_1): Likewise.
3016 (delete_gdb_breakpoint): Likewise.
3017 (uninsert_raw_breakpoint): Likewise.
3018 (reinsert_raw_breakpoint): Likewise.
3019 (set_breakpoint_data): Remove.
3020 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3021 (check_mem_read): Adjust for kind call bp_size.
3022 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3023 (clone_one_breakpoint): Adjust for kind.
3024 * mem-break.h (set_gdb_breakpoint): Likewise.
3025 (delete_gdb_breakpoint): Likewise.
3026 * server.c (process_serial_event): Likewise.
3027
dd373349
AT
30282015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3029
3030 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3031 (struct linux_target_ops) <breakpoint>: Remove.
3032 (struct linux_target_ops) <breakpoint_len>: Remove.
3033 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3034 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3035 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3036 (arm_sw_breakpoint_from_kind): New function.
3037 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3038 (struct linux_target_ops) <breakpoint>: Remove.
3039 (struct linux_target_ops) <breakpoint_len>: Remove.
3040 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3041 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3042 * linux-cris-low.c (cris_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-crisv32-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-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3053 and sw_breakpoint_from_kind to increment the pc.
3054 (linux_breakpoint_kind_from_pc): New function.
3055 (linux_sw_breakpoint_from_kind): New function.
3056 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3057 (initialize_low): Call breakpoint_kind_from_pc and
3058 sw_breakpoint_from_kind to replace breakpoint_data/len.
3059 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3060 New field.
3061 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3062 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3063 (struct linux_target_ops) <breakpoint>: Remove.
3064 (struct linux_target_ops) <breakpoint_len>: Remove.
3065 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3066 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3067 * linux-m68k-low.c (m68k_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-mips-low.c (mips_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-nios2-low.c (nios2_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-ppc-low.c (ppc_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-s390-low.c (s390_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-sh-low.c (sh_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-sparc-low.c (sparc_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-tic6x-low.c (tic6x_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-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3108 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3109 (struct linux_target_ops) <breakpoint>: Remove.
3110 (struct linux_target_ops) <breakpoint_len>: Remove.
3111 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3112 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3113 * linux-xtensa-low.c (xtensa_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
4cd98a19
AT
31192015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3120
3121 * linux-cris-low.c (cris_get_pc): Remove void arg.
3122
774ee6d2
AR
31232015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3124
3125 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3126 variable name.
3127
833dcd29
AR
31282015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3129
3130 * inferiors.c (thread_pid_matches_callback): New function.
3131 (find_thread_process): New function.
3132 (remove_thread): Reset current_thread.
3133 (remove_process): Assert threads have been removed first.
3134
8d689ee5
YQ
31352015-10-15 Yao Qi <yao.qi@linaro.org>
3136
3137 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3138 if it is 3.
3139 (aarch64_remove_point): Likewise.
3140 * regcache.c (regcache_register_size): New function.
3141
1c2e1515
YQ
31422015-10-12 Yao Qi <yao.qi@linaro.org>
3143
3144 * linux-aarch64-low.c: Update all callers as emit_load_store
3145 is renamed to aarch64_emit_load_store.
3146
e1c587c3
YQ
31472015-10-12 Yao Qi <yao.qi@linaro.org>
3148
3149 * linux-aarch64-low.c: Update all callers of function renaming
3150 from emit_insn to aarch64_emit_insn.
3151
b6542f81
YQ
31522015-10-12 Yao Qi <yao.qi@linaro.org>
3153
3154 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3155 arch/aarch64-insn.h.
3156 (struct aarch64_memory_operand): Likewise.
3157 (ENCODE): Likewise.
3158 (emit_insn): Move to arch/aarch64-insn.c.
3159 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3160 (emit_load_store): Move to arch/aarch64-insn.c.
3161 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3162 (can_encode_int32): Remove.
3163
246994ce
YQ
31642015-10-12 Yao Qi <yao.qi@linaro.org>
3165
3166 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3167 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3168 (aarch64_relocate_instruction): Likewise.
3169 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3170 (struct aarch64_insn_visitor): Likewise.
3171
0badd99f
YQ
31722015-10-12 Yao Qi <yao.qi@linaro.org>
3173
3174 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3175 (struct aarch64_insn_visitor): New.
3176 (struct aarch64_insn_relocation_data): New.
3177 (aarch64_ftrace_insn_reloc_b): New function.
3178 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3179 (aarch64_ftrace_insn_reloc_cb): Likewise.
3180 (aarch64_ftrace_insn_reloc_tb): Likewise.
3181 (aarch64_ftrace_insn_reloc_adr): Likewise.
3182 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3183 (aarch64_ftrace_insn_reloc_others): Likewise.
3184 (visitor): New.
3185 (aarch64_relocate_instruction): Use visitor.
3186
dfaffe9d
YQ
31872015-10-12 Yao Qi <yao.qi@linaro.org>
3188
3189 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3190 int. Add argument buf.
3191 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3192 aarch64_relocate_instruction.
3193
70b439f0
YQ
31942015-10-12 Yao Qi <yao.qi@linaro.org>
3195
3196 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3197 argument insn. Remove local variable insn. Don't call
3198 target_read_uint32.
3199 (aarch64_install_fast_tracepoint_jump_pad): Call
3200 target_read_uint32.
3201
7781c06f
YQ
32022015-09-30 Yao Qi <yao.qi@linaro.org>
3203
3204 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3205 (emit_load_store_pair): Likewise.
3206
9a3c8263
SM
32072015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3208
3209 * dll.c (match_dll): Add cast(s).
3210 (unloaded_dll): Likewise.
3211 * linux-low.c (second_thread_of_pid_p): Likewise.
3212 (delete_lwp_callback): Likewise.
3213 (count_events_callback): Likewise.
3214 (select_event_lwp_callback): Likewise.
3215 (linux_set_resume_request): Likewise.
3216 * server.c (accumulate_file_name_length): Likewise.
3217 (emit_dll_description): Likewise.
3218 (handle_qxfer_threads_worker): Likewise.
3219 (visit_actioned_threads): Likewise.
3220 * thread-db.c (any_thread_of): Likewise.
3221 * tracepoint.c (same_process_p): Likewise.
3222 (match_blocktype): Likewise.
3223 (build_traceframe_info_xml): Likewise.
3224
224c3ddb
SM
32252015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3226
3227 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3228 assignment.
3229 (gdb_unparse_agent_expr): Likewise.
3230 * hostio.c (require_data): Likewise.
3231 (handle_pread): Likewise.
3232 * linux-low.c (disable_regset): Likewise.
3233 (fetch_register): Likewise.
3234 (store_register): Likewise.
3235 (get_dynamic): Likewise.
3236 (linux_qxfer_libraries_svr4): Likewise.
3237 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3238 (set_fast_tracepoint_jump): Likewise.
3239 (uninsert_fast_tracepoint_jumps_at): Likewise.
3240 (reinsert_fast_tracepoint_jumps_at): Likewise.
3241 (validate_inserted_breakpoint): Likewise.
3242 (clone_agent_expr): Likewise.
3243 * regcache.c (init_register_cache): Likewise.
3244 * remote-utils.c (putpkt_binary_1): Likewise.
3245 (decode_M_packet): Likewise.
3246 (decode_X_packet): Likewise.
3247 (look_up_one_symbol): Likewise.
3248 (relocate_instruction): Likewise.
3249 (monitor_output): Likewise.
3250 * server.c (handle_search_memory): Likewise.
3251 (handle_qxfer_exec_file): Likewise.
3252 (handle_qxfer_libraries): Likewise.
3253 (handle_qxfer): Likewise.
3254 (handle_query): Likewise.
3255 (handle_v_cont): Likewise.
3256 (handle_v_run): Likewise.
3257 (captured_main): Likewise.
3258 * target.c (write_inferior_memory): Likewise.
3259 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3260 * tracepoint.c (init_trace_buffer): Likewise.
3261 (add_tracepoint_action): Likewise.
3262 (add_traceframe): Likewise.
3263 (add_traceframe_block): Likewise.
3264 (cmd_qtdpsrc): Likewise.
3265 (cmd_qtdv): Likewise.
3266 (cmd_qtstatus): Likewise.
3267 (response_source): Likewise.
3268 (response_tsv): Likewise.
3269 (cmd_qtnotes): Likewise.
3270 (gdb_collect): Likewise.
3271 (initialize_tracepoint): Likewise.
3272
afbe19f8
PL
32732015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3274
3275 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3276 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3277 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3278 <NOP>: New.
3279 (enum aarch64_condition_codes): New enum.
3280 (w0): New static global.
3281 (fp): Likewise.
3282 (lr): Likewise.
3283 (struct aarch64_memory_operand) <type>: New
3284 MEMORY_OPERAND_POSTINDEX type.
3285 (postindex_memory_operand): New helper function.
3286 (emit_ret): New function.
3287 (emit_load_store_pair): New function, factored out of emit_stp
3288 with support for MEMORY_OPERAND_POSTINDEX.
3289 (emit_stp): Rewrite using emit_load_store_pair.
3290 (emit_ldp): New function.
3291 (emit_load_store): Likewise.
3292 (emit_ldr): Mention post-index instruction in comment.
3293 (emit_ldrh): New function.
3294 (emit_ldrb): New function.
3295 (emit_ldrsw): Mention post-index instruction in comment.
3296 (emit_str): Likewise.
3297 (emit_subs): New function.
3298 (emit_cmp): Likewise.
3299 (emit_and): Likewise.
3300 (emit_orr): Likewise.
3301 (emit_orn): Likewise.
3302 (emit_eor): Likewise.
3303 (emit_mvn): Likewise.
3304 (emit_lslv): Likewise.
3305 (emit_lsrv): Likewise.
3306 (emit_asrv): Likewise.
3307 (emit_mul): Likewise.
3308 (emit_sbfm): Likewise.
3309 (emit_sbfx): Likewise.
3310 (emit_ubfm): Likewise.
3311 (emit_ubfx): Likewise.
3312 (emit_csinc): Likewise.
3313 (emit_cset): Likewise.
3314 (emit_nop): Likewise.
3315 (emit_ops_insns): New helper function.
3316 (emit_pop): Likewise.
3317 (emit_push): Likewise.
3318 (aarch64_emit_prologue): New function.
3319 (aarch64_emit_epilogue): Likewise.
3320 (aarch64_emit_add): Likewise.
3321 (aarch64_emit_sub): Likewise.
3322 (aarch64_emit_mul): Likewise.
3323 (aarch64_emit_lsh): Likewise.
3324 (aarch64_emit_rsh_signed): Likewise.
3325 (aarch64_emit_rsh_unsigned): Likewise.
3326 (aarch64_emit_ext): Likewise.
3327 (aarch64_emit_log_not): Likewise.
3328 (aarch64_emit_bit_and): Likewise.
3329 (aarch64_emit_bit_or): Likewise.
3330 (aarch64_emit_bit_xor): Likewise.
3331 (aarch64_emit_bit_not): Likewise.
3332 (aarch64_emit_equal): Likewise.
3333 (aarch64_emit_less_signed): Likewise.
3334 (aarch64_emit_less_unsigned): Likewise.
3335 (aarch64_emit_ref): Likewise.
3336 (aarch64_emit_if_goto): Likewise.
3337 (aarch64_emit_goto): Likewise.
3338 (aarch64_write_goto_address): Likewise.
3339 (aarch64_emit_const): Likewise.
3340 (aarch64_emit_call): Likewise.
3341 (aarch64_emit_reg): Likewise.
3342 (aarch64_emit_pop): Likewise.
3343 (aarch64_emit_stack_flush): Likewise.
3344 (aarch64_emit_zero_ext): Likewise.
3345 (aarch64_emit_swap): Likewise.
3346 (aarch64_emit_stack_adjust): Likewise.
3347 (aarch64_emit_int_call_1): Likewise.
3348 (aarch64_emit_void_call_2): Likewise.
3349 (aarch64_emit_eq_goto): Likewise.
3350 (aarch64_emit_ne_goto): Likewise.
3351 (aarch64_emit_lt_goto): Likewise.
3352 (aarch64_emit_le_goto): Likewise.
3353 (aarch64_emit_gt_goto): Likewise.
3354 (aarch64_emit_ge_got): Likewise.
3355 (aarch64_emit_ops_impl): New static global variable.
3356 (aarch64_emit_ops): New target function, return
3357 &aarch64_emit_ops_impl.
3358 (struct linux_target_ops): Install it.
3359
bb903df0
PL
33602015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3361
3362 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3363 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3364 aarch64-ipa.o.
3365 * linux-aarch64-ipa.c: New file.
3366 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3367 and endian.h.
3368 (aarch64_get_thread_area): New target method.
3369 (extract_signed_bitfield): New helper function.
3370 (aarch64_decode_ldr_literal): New function.
3371 (enum aarch64_opcodes): New enum.
3372 (struct aarch64_register): New struct.
3373 (struct aarch64_operand): New struct.
3374 (x0): New static global.
3375 (x1): Likewise.
3376 (x2): Likewise.
3377 (x3): Likewise.
3378 (x4): Likewise.
3379 (w2): Likewise.
3380 (ip0): Likewise.
3381 (sp): Likewise.
3382 (xzr): Likewise.
3383 (aarch64_register): New helper function.
3384 (register_operand): Likewise.
3385 (immediate_operand): Likewise.
3386 (struct aarch64_memory_operand): New struct.
3387 (offset_memory_operand): New helper function.
3388 (preindex_memory_operand): Likewise.
3389 (enum aarch64_system_control_registers): New enum.
3390 (ENCODE): New macro.
3391 (emit_insn): New helper function.
3392 (emit_b): New function.
3393 (emit_bcond): Likewise.
3394 (emit_cb): Likewise.
3395 (emit_tb): Likewise.
3396 (emit_blr): Likewise.
3397 (emit_stp): Likewise.
3398 (emit_ldp_q_offset): Likewise.
3399 (emit_stp_q_offset): Likewise.
3400 (emit_load_store): Likewise.
3401 (emit_ldr): Likewise.
3402 (emit_ldrsw): Likewise.
3403 (emit_str): Likewise.
3404 (emit_ldaxr): Likewise.
3405 (emit_stxr): Likewise.
3406 (emit_stlr): Likewise.
3407 (emit_data_processing_reg): Likewise.
3408 (emit_data_processing): Likewise.
3409 (emit_add): Likewise.
3410 (emit_sub): Likewise.
3411 (emit_mov): Likewise.
3412 (emit_movk): Likewise.
3413 (emit_mov_addr): Likewise.
3414 (emit_mrs): Likewise.
3415 (emit_msr): Likewise.
3416 (emit_sevl): Likewise.
3417 (emit_wfe): Likewise.
3418 (append_insns): Likewise.
3419 (can_encode_int32_in): New helper function.
3420 (aarch64_relocate_instruction): New function.
3421 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3422 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3423 (struct linux_target_ops): Install aarch64_get_thread_area,
3424 aarch64_install_fast_tracepoint_jump_pad and
3425 aarch64_get_min_fast_tracepoint_insn_len.
3426
787749ea
PL
34272015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3428
3429 * Makefile.in (aarch64-insn.o): New rule.
3430 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3431
9812b2e6
YQ
34322015-09-21 Yao Qi <yao.qi@linaro.org>
3433
3434 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3435
18fe412b
YQ
34362015-09-21 Yao Qi <yao.qi@linaro.org>
3437
3438 * tracepoint.c (max_jump_pad_size): Remove.
3439
a0cc84cd
YQ
34402015-09-18 Yao Qi <yao.qi@linaro.org>
3441
3442 * linux-aarch64-low.c: Don't include sys/uio.h.
3443 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3444
d78908cf
WW
34452015-09-16 Wei-cheng Wang <cole945@gmail.com>
3446
3447 * tracepoint.c (eval_result_type): Change prototype.
3448 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3449
d57e0d50
PA
34502015-09-15 Pedro Alves <palves@redhat.com>
3451
3452 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3453 Check whether to report exec events instead of checking whether
3454 multiprocess is enabled.
3455
5a676acc
PA
34562015-09-15 Pedro Alves <palves@redhat.com>
3457
3458 PR remote/18965
3459 * remote-utils.c (prepare_resume_reply): Merge
3460 TARGET_WAITKIND_VFORK_DONE switch case with the
3461 TARGET_WAITKIND_FORKED case.
3462
7c5d0fad
YQ
34632015-09-15 Yao Qi <yao.qi@linaro.org>
3464
3465 * server.c (handle_query): Check string comparison using
3466 "else if" instead of "if".
3467
750ce8d1
YQ
34682015-09-15 Yao Qi <yao.qi@linaro.org>
3469
3470 * server.c (vCont_supported): New global variable.
3471 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3472 matches. Append ";vContSupported+" to own_buf.
3473 (handle_v_requests): Append ";s;S" to own_buf if target supports
3474 hardware single step or vCont_supported is false.
3475 (capture_main): Set vCont_supported to zero.
3476
70b90b91
YQ
34772015-09-15 Yao Qi <yao.qi@linaro.org>
3478
3479 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3480 it to ...
3481 (linux_supports_hardware_single_step): ... New function.
3482 (linux_target_ops): Update.
3483 * lynx-low.c (lynx_target_ops): Set field
3484 supports_hardware_single_step to target_can_do_hardware_single_step.
3485 * nto-low.c (nto_target_ops): Likewise.
3486 * spu-low.c (spu_target_ops): Likewise.
3487 * win32-low.c (win32_target_ops): Likewise.
3488 * target.c (target_can_do_hardware_single_step): New function.
3489 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3490 Remove. <supports_hardware_single_step>: New field.
3491 (target_supports_conditional_breakpoints): Remove.
3492 (target_supports_hardware_single_step): New macro.
3493 (target_can_do_hardware_single_step): Declare.
3494 * server.c (handle_query): Use target_supports_hardware_single_step
3495 instead of target_supports_conditional_breakpoints.
3496
ade90bde
YQ
34972015-09-15 Yao Qi <yao.qi@linaro.org>
3498
3499 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3500 function.
3501 (struct linux_target_ops the_low_target): Install
3502 aarch64_linux_siginfo_fixup.
3503
94585166
DB
35042015-09-11 Don Breazeal <donb@codesourcery.com>
3505 Luis Machado <lgustavo@codesourcery.com>
3506
3507 * linux-low.c (linux_mourn): Static declaration.
3508 (linux_arch_setup): Move in front of
3509 handle_extended_wait.
3510 (linux_arch_setup_thread): New function.
3511 (handle_extended_wait): Handle exec events. Call
3512 linux_arch_setup_thread. Make event_lwp argument a
3513 pointer-to-a-pointer.
3514 (check_zombie_leaders): Do not check stopped threads.
3515 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3516 (linux_low_filter_event): Add lwp and thread for exec'ing
3517 non-leader thread if leader thread has been deleted.
3518 Refactor code into linux_arch_setup_thread and call it.
3519 Pass child lwp pointer by reference to handle_extended_wait.
3520 (linux_wait_for_event_filtered): Update comment.
3521 (linux_wait_1): Prevent clobbering exec event status.
3522 (linux_supports_exec_events): New function.
3523 (linux_target_ops) <supports_exec_events>: Initialize new member.
3524 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3525 new member.
3526 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3527 * server.c (report_exec_events): New global variable.
3528 (handle_query): Handle qSupported query for exec-events feature.
3529 (captured_main): Initialize report_exec_events.
3530 * server.h (report_exec_events): Declare new global variable.
3531 * target.h (struct target_ops) <supports_exec_events>: New
3532 member.
3533 (target_supports_exec_events): New macro.
3534 * win32-low.c (win32_target_ops) <supports_exec_events>:
3535 Initialize new member.
3536
0568462b
MM
35372015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3538
3539 * linux-low.c (linux_low_enable_btrace): Remove.
3540 (linux_target_ops): Replace linux_low_enable_btrace with
3541 linux_enable_btrace.
3542
39edd165
YQ
35432015-09-03 Yao Qi <yao.qi@linaro.org>
3544
3545 * linux-aarch64-low.c (aarch64_insert_point): Call
3546 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3547 returns true.
3548
1db33b5a
UW
35492015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3550
3551 * linux-low.c (check_stopped_by_breakpoint): Use
3552 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3553
ab290430
PA
35542015-08-27 Pedro Alves <palves@redhat.com>
3555
3556 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3557
8d749320
SM
35582015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3559
6711b7f8
SM
3560 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3561 the XNEW-family equivalent.
8d749320
SM
3562 (compile_bytecodes): Likewise.
3563 * dll.c (loaded_dll): Likewise.
3564 * event-loop.c (append_callback_event): Likewise.
3565 (create_file_handler): Likewise.
3566 (create_file_event): Likewise.
3567 * hostio.c (handle_open): Likewise.
3568 * inferiors.c (add_thread): Likewise.
3569 (add_process): Likewise.
3570 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3571 * linux-arm-low.c (arm_new_process): Likewise.
3572 (arm_new_thread): Likewise.
3573 * linux-low.c (add_to_pid_list): Likewise.
3574 (linux_add_process): Likewise.
3575 (handle_extended_wait): Likewise.
3576 (add_lwp): Likewise.
3577 (enqueue_one_deferred_signal): Likewise.
3578 (enqueue_pending_signal): Likewise.
3579 (linux_resume_one_lwp_throw): Likewise.
3580 (linux_resume_one_thread): Likewise.
3581 (linux_read_memory): Likewise.
3582 (linux_write_memory): Likewise.
3583 * linux-mips-low.c (mips_linux_new_process): Likewise.
3584 (mips_linux_new_thread): Likewise.
3585 (mips_add_watchpoint): Likewise.
3586 * linux-x86-low.c (initialize_low_arch): Likewise.
3587 * lynx-low.c (lynx_add_process): Likewise.
3588 * mem-break.c (set_raw_breakpoint_at): Likewise.
3589 (set_breakpoint): Likewise.
3590 (add_condition_to_breakpoint): Likewise.
3591 (add_commands_to_breakpoint): Likewise.
3592 (clone_agent_expr): Likewise.
3593 (clone_one_breakpoint): Likewise.
3594 * regcache.c (new_register_cache): Likewise.
3595 * remote-utils.c (look_up_one_symbol): Likewise.
3596 * server.c (queue_stop_reply): Likewise.
3597 (start_inferior): Likewise.
3598 (queue_stop_reply_callback): Likewise.
3599 (handle_target_event): Likewise.
3600 * spu-low.c (fetch_ppc_memory): Likewise.
3601 (store_ppc_memory): Likewise.
3602 * target.c (set_target_ops): Likewise.
3603 * thread-db.c (thread_db_load_search): Likewise.
3604 (try_thread_db_load_1): Likewise.
3605 * tracepoint.c (add_tracepoint): Likewise.
3606 (add_tracepoint_action): Likewise.
3607 (create_trace_state_variable): Likewise.
3608 (cmd_qtdpsrc): Likewise.
3609 (cmd_qtro): Likewise.
3610 (add_while_stepping_state): Likewise.
3611 * win32-low.c (child_add_thread): Likewise.
3612 (get_image_name): Likewise.
3613
ed8b7b42
YQ
36142015-08-25 Yao Qi <yao.qi@linaro.org>
3615
3616 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3617
db3cb7cb
YQ
36182015-08-25 Yao Qi <yao.qi@linaro.org>
3619
3620 * Makefile.in (aarch64-linux.o): New rule.
3621 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3622 srv_tgtobj.
3623 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3624 (aarch64_init_debug_reg_state): Make it extern.
3625 (aarch64_linux_prepare_to_resume): Remove.
3626
f6011a1c
YQ
36272015-08-25 Yao Qi <yao.qi@linaro.org>
3628
3629 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3630 lwp_arch_private_info and ptid_of_lwp.
3631
88e2cf7e
YQ
36322015-08-25 Yao Qi <yao.qi@linaro.org>
3633
3634 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3635 Find proc_info by find_process_pid. All callers updated.
3636
5e35436e
YQ
36372015-08-25 Yao Qi <yao.qi@linaro.org>
3638
3639 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3640 Remove.
3641 (debug_reg_change_callback): Remove.
3642 (aarch64_notify_debug_reg_change): Remove.
3643
4a8a7965
YQ
36442015-08-25 Yao Qi <yao.qi@linaro.org>
3645
3646 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3647 Call current_lwp_ptid.
3648
32a271ee
YQ
36492015-08-25 Yao Qi <yao.qi@linaro.org>
3650
3651 * linux-aarch64-low.c (debug_reg_change_callback): Use
3652 debug_printf.
3653
0d51c8d7
YQ
36542015-08-25 Yao Qi <yao.qi@linaro.org>
3655
3656 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3657
31a43dd5
YQ
36582015-08-25 Yao Qi <yao.qi@linaro.org>
3659
3660 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3661
8ee52567
YQ
36622015-08-25 Yao Qi <yao.qi@linaro.org>
3663
3664 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3665 the code.
3666
ff3f0f45
YQ
36672015-08-25 Yao Qi <yao.qi@linaro.org>
3668
3669 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3670 Remove.
3671 (debug_reg_change_callback): Remove argument entry and add argument
3672 lwp. Remove local variable thread. Don't print thread id in the
3673 debugging output. Don't check whether pid of thread equals to pid.
3674 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3675 iterate_over_lwps instead find_inferior.
3676
3d40fbb5
PA
36772015-08-24 Pedro Alves <palves@redhat.com>
3678
3679 * inferiors.c (get_first_process): New function.
3680 * inferiors.h (get_first_process): New declaration.
3681 * remote-utils.c (read_ptid): Default to the first process in the
3682 list, instead of to the current thread's process.
3683
438e1e42
PA
36842015-08-24 Pedro Alves <palves@redhat.com>
3685
3686 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3687 * event-loop.c: Likewise.
3688 * remote-utils.c: Likewise.
3689 * tracepoint.c: Likewise.
3690
a8c6d4fc
PA
36912015-08-24 Pedro Alves <palves@redhat.com>
3692
3693 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3694 ptid_get_lwp.
3695
99b0bb12
PA
36962015-08-21 Pedro Alves <palves@redhat.com>
3697
3698 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3699 instead of literal 1.
3700
f8904751
PA
37012015-08-21 Pedro Alves <palves@redhat.com>
3702
3703 * tdesc.c (default_description): Explicitly zero-initialize.
3704
465a859e
PA
37052015-08-21 Pedro Alves <palves@redhat.com>
3706
3707 PR gdb/18749
3708 * inferiors.c (remove_thread): Discard any pending stop reply for
3709 this thread.
3710 * server.c (remove_all_on_match_pid): Rename to ...
3711 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3712 instead of a pid.
3713 (discard_queued_stop_replies): Change parameter to a ptid. Now
3714 extern.
3715 (handle_v_kill, kill_inferior_callback, captured_main)
3716 (process_serial_event): Adjust.
3717 * server.h (discard_queued_stop_replies): Declare.
3718
f0db101d
PA
37192015-08-21 Pedro Alves <palves@redhat.com>
3720
3721 * linux-low.c (wait_for_sigstop): Always switch to no thread
3722 selected if the previously current thread dies.
3723 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3724 process instead of the current thread's.
3725 * remote-utils.c (input_interrupt): Don't check if there's no
3726 current thread.
3727 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3728 current thread to the general thread fails, error out.
3729 (handle_qxfer_auxv, handle_qxfer_libraries)
3730 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3731 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3732 (handle_query): Check if there's a thread selected instead of
3733 checking whether there's any thread in the thread list.
3734 (handle_qxfer_threads, handle_qxfer_btrace)
3735 (handle_qxfer_btrace_conf): Don't error out early if there's no
3736 thread in the thread list.
3737 (handle_v_cont, myresume): Don't set the current thread to the
3738 continue thread.
3739 (process_serial_event) <Hg handling>: Also set thread_id if the
3740 previous general thread is still alive.
3741 (process_serial_event) <g/G handling>: If setting the current
3742 thread to the general thread fails, error out.
3743 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3744 thread's lwp instead of the current thread's.
3745 * target.c (set_desired_thread): If the desired thread was not
3746 found, leave the current thread pointing to NULL. Return an int
3747 (boolean) indicating success.
3748 * target.h (set_desired_thread): Change return type to int.
3749
40045d91
MF
37502015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3751
3752 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3753 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3754 #includes.
3755 (ps_get_thread_area): New function.
3756
45face3b
GB
37572015-08-19 Gary Benson <gbenson@redhat.com>
3758
3759 * hostio.c (handle_pread): Do not attempt to read more data
3760 than hostio_reply_with_data can fit in a packet.
3761
16d5f642
JB
37622015-08-18 Joel Brobecker <brobecker@adacore.com>
3763
3764 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3765
a738da3a
MF
37662015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3767
3768 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3769
33ebda9d
PA
37702015-08-06 Pedro Alves <palves@redhat.com>
3771
3772 * tracepoint.c (expr_eval_result): Now an int.
3773
a44892be
PA
37742015-08-06 Pedro Alves <palves@redhat.com>
3775
3776 * gdbthread.h (struct regcache): Forward declare.
3777 (struct thread_info) <regcache_data>: Now a struct regcache
3778 pointer.
3779 * inferiors.c (inferior_regcache_data)
3780 (set_inferior_regcache_data): Now work with struct regcache
3781 pointers.
3782 * inferiors.h (struct regcache): Forward declare.
3783 (inferior_regcache_data, set_inferior_regcache_data): Now work
3784 with struct regcache pointers.
3785 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3786 (free_register_cache_thread): Remove struct regcache pointer
3787 casts.
3788
608a1e46
PA
37892015-08-06 Pedro Alves <palves@redhat.com>
3790
3791 * server.c (captured_main): On error, print the exception message
3792 to stderr, and if run_once is set, throw a quit.
3793
f0ce0d3a
PA
37942015-08-06 Pedro Alves <palves@redhat.com>
3795
3796 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3797 the current thread.
3798
bf47e248
PA
37992015-08-06 Pedro Alves <palves@redhat.com>
3800
3801 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3802 reading beyond the passed in buffer length.
3803
b6b9ffcc
PL
38042015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3805
3806 * tracepoint.c (symbol_list) <required>: Remove.
3807
863d01bd
PA
38082015-08-06 Pedro Alves <palves@redhat.com>
3809
3810 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3811 count if stopping and suspending threads.
3812 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3813 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3814 (linux_detach): Complete an ongoing step-over.
3815 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3816 throughout.
3817 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3818 (linux_wait_1): If passing a signal to the inferior after
3819 finishing a step-over, unsuspend and re-resume all lwps. If we
3820 see a single-step event but the thread should be continuing, don't
3821 pass the trap to gdb.
3822 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3823 internal_error instead of gdb_assert.
3824 (enqueue_pending_signal): New function.
3825 (check_ptrace_stopped_lwp_gone): Add debug output.
3826 (start_step_over): Use internal_error instead of gdb_assert.
3827 (complete_ongoing_step_over): New function.
3828 (linux_resume_one_thread): Don't resume a suspended thread.
3829 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3830 it stepping.
3831
00db26fa
PA
38322015-08-06 Pedro Alves <palves@redhat.com>
3833
3834 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3835 (linux_thread_alive): Use lwp_is_marked_dead.
3836 (extended_event_reported): Delete.
3837 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3838 instead of extended_event_reported.
3839 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3840 as well.
3841 (lwp_is_marked_dead): New function.
3842 (lwp_running): Use lwp_is_marked_dead.
3843 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3844 comment.
3845
ad071a30
PA
38462015-08-06 Pedro Alves <palves@redhat.com>
3847
3848 * linux-low.c (linux_wait_1): Move fork event output out of the
3849 !report_to_gdb check. Pass event_child->waitstatus to
3850 target_waitstatus_to_string instead of ourstatus.
3851
524b57e6
YQ
38522015-08-04 Yao Qi <yao.qi@linaro.org>
3853
3854 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3855 if current_thread is 32 bit.
3856
6085d6f6
YQ
38572015-08-04 Yao Qi <yao.qi@linaro.org>
3858
3859 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3860 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3861 * server.c (extended_protocol): Remove "static".
3862 * server.h (extended_protocol): Declare it.
3863
8a7e4587
YQ
38642015-08-04 Yao Qi <yao.qi@linaro.org>
3865
3866 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3867 both aarch64 and aarch32.
3868 (aarch64_set_pc): Likewise.
3869
3b53ae99
YQ
38702015-08-04 Yao Qi <yao.qi@linaro.org>
3871
3872 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3873 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3874 arm-with-neon.xml to srv_xmlfiles.
3875 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3876 (is_64bit_tdesc): New function.
3877 (aarch64_linux_read_description): New function.
3878 (aarch64_arch_setup): Call aarch64_linux_read_description.
3879 (regs_info): Rename to regs_info_aarch64.
3880 (aarch64_regs_info): Return right regs_info.
3881 (initialize_low_arch): Call initialize_low_arch_aarch32.
3882
bd9e6534
YQ
38832015-08-04 Yao Qi <yao.qi@linaro.org>
3884
3885 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3886 * linux-aarch32-low.c: New file.
3887 * linux-aarch32-low.h: New file.
3888 * linux-arm-low.c (arm_fill_gregset): Move it to
3889 linux-aarch32-low.c.
3890 (arm_store_gregset): Likewise.
3891 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3892 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3893 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3894 (regs_info): Rename to regs_info_arm.
3895 (arm_regs_info): Return regs_info_aarch32 if
3896 have_ptrace_getregset is 1 and target description is
3897 arm_with_neon or arm_with_vfpv3.
3898 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3899 Call initialize_low_arch_aarch32 instead.
3900
ded48a5e
YQ
39012015-08-04 Yao Qi <yao.qi@linaro.org>
3902
3903 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3904 * linux-low.c: ... here.
3905 * linux-low.h (have_ptrace_getregset): Declare it.
3906
96e9210f
PA
39072015-08-04 Pedro Alves <palves@redhat.com>
3908
3909 * thread-db.c (struct thread_db): Use new typedefs.
3910 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3911 CHK calls.
3912 (disable_thread_event_reporting): Cast result of dlsym to
3913 destination function pointer type.
3914 (thread_db_mourn): Use td_ta_delete_ftype.
3915
af60a1ef
SL
39162015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3917
3918 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3919 arch variant.
3920 (CDX_BREAKPOINT): Define for R2.
3921 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3922 (the_low_target): Add comments.
3923
e8b41681
YQ
39242015-07-30 Yao Qi <yao.qi@linaro.org>
3925
3926 * linux-arm-low.c (arm_hwcap): Remove it.
3927 (arm_read_description): New local variable arm_hwcap. Don't
3928 set arm_hwcap to zero.
3929
89abb039
YQ
39302015-07-30 Yao Qi <yao.qi@linaro.org>
3931
3932 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3933 Use regcache->tdesc instead.
3934 (arm_store_wmmxregset): Likewise.
3935 (arm_fill_vfpregset): Likewise.
3936 (arm_store_vfpregset): Likewise.
3937
deca266c
YQ
39382015-07-30 Yao Qi <yao.qi@linaro.org>
3939
3940 * linux-arm-low.c: Include arch/arm.h.
3941 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3942 (arm_store_gregset): Likewise.
3943
aa58a496
SM
39442015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3945
3946 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3947 ptrace's 4th parameter.
3948
50904b25
YQ
39492015-07-27 Yao Qi <yao.qi@linaro.org>
3950
3951 * configure.srv (case aarch64*-*-linux*): Don't set
3952 srv_linux_usrregs.
3953
5826e159
PA
39542015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3955
3956 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3957 sys/ptrace.h.
3958 * linux-arm-low.c: Likewise.
3959 * linux-cris-low.c: Likewise.
3960 * linux-crisv32-low.c: Likewise.
3961 * linux-low.c: Likewise.
3962 * linux-m68k-low.c: Likewise.
3963 * linux-mips-low.c: Likewise.
3964 * linux-nios2-low.c: Likewise.
3965 * linux-s390-low.c: Likewise.
3966 * linux-sparc-low.c: Likewise.
3967 * linux-tic6x-low.c: Likewise.
3968 * linux-tile-low.c: Likewise.
3969 * linux-x86-low.c: Likewise.
3970
54019719
PA
39712015-07-24 Pedro Alves <palves@redhat.com>
3972
3973 * config.in: Regenerate.
3974 * configure: Regenerate.
3975
eb7aa561
PA
39762015-07-24 Pedro Alves <palves@redhat.com>
3977
3978 * acinclude.m4: Include ../ptrace.m4.
3979 * configure.ac: Call GDB_AC_PTRACE.
3980 * config.in, configure: Regenerate.
3981
55d7b841
YQ
39822015-07-24 Yao Qi <yao.qi@linaro.org>
3983
3984 * linux-low.c (linux_create_inferior): Remove setting to
3985 proc->priv->new_inferior.
3986 (linux_attach): Likewise.
3987 (linux_low_filter_event): Likewise.
3988 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3989
c06cbd92
YQ
39902015-07-24 Yao Qi <yao.qi@linaro.org>
3991
3992 * linux-low.c (linux_arch_setup): New function.
3993 (linux_low_filter_event): If proc->tdesc is NULL and
3994 proc->attached is true, call the_low_target.arch_setup.
3995 Otherwise, keep status pending, and return.
3996 (linux_resume_one_lwp_throw): Don't call get_pc if
3997 thread->while_stepping isn't NULL. Don't call
3998 get_thread_regcache if proc->tdesc is NULL.
3999 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4000 (linux_target_ops): Install arch_setup.
4001 * server.c (start_inferior): Call the_target->arch_setup.
4002 * target.h (struct target_ops) <arch_setup>: New field.
4003 (target_arch_setup): New marco.
4004 * lynx-low.c (lynx_target_ops): Update.
4005 * nto-low.c (nto_target_ops): Update.
4006 * spu-low.c (spu_target_ops): Update.
4007 * win32-low.c (win32_target_ops): Update.
4008
5ae3ebba
YQ
40092015-07-24 Yao Qi <yao.qi@linaro.org>
4010
4011 * linux-low.c (linux_add_process): Don't set
4012 proc->priv->new_inferior.
4013 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4014 (linux_attach): Likewise.
4015
eb97750b
YQ
40162015-07-24 Yao Qi <yao.qi@linaro.org>
4017
4018 * server.c (start_inferior): Code refactor.
4019
51aee833
YQ
40202015-07-24 Yao Qi <yao.qi@linaro.org>
4021
4022 * server.c (process_serial_event): Set general_thread.
4023
af1b22f3
YQ
40242015-07-21 Yao Qi <yao.qi@linaro.org>
4025
4026 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4027 aarch64_linux_get_debug_reg_capacity.
4028
554717a3
YQ
40292015-07-17 Yao Qi <yao.qi@linaro.org>
4030
4031 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4032 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4033 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4034 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4035 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4036 (AARCH64_HWP_ALIGNMENT): Likewise.
4037 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4038 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4039 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4040 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4041 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4042 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4043 (struct aarch64_debug_reg_state): Likewise.
4044 (struct arch_lwp_info): Likewise.
4045 (aarch64_align_watchpoint): Likewise.
4046 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4047 (aarch64_watchpoint_length): Likewise.
4048 (aarch64_point_encode_ctrl_reg): Likewise
4049 (aarch64_point_is_aligned): Likewise.
4050 (aarch64_align_watchpoint): Likewise.
4051 (aarch64_linux_set_debug_regs):
4052 (aarch64_dr_state_insert_one_point): Likewise.
4053 (aarch64_dr_state_remove_one_point): Likewise.
4054 (aarch64_handle_breakpoint): Likewise.
4055 (aarch64_handle_aligned_watchpoint): Likewise.
4056 (aarch64_handle_unaligned_watchpoint): Likewise.
4057 (aarch64_handle_watchpoint): Likewise.
4058
c67ca4de
YQ
40592015-07-17 Yao Qi <yao.qi@linaro.org>
4060
4061 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4062 and don't aarch64_get_debug_reg_state. All callers update.
4063 (aarch64_handle_aligned_watchpoint): Likewise.
4064 (aarch64_handle_unaligned_watchpoint): Likewise.
4065 (aarch64_handle_watchpoint): Likewise.
4066 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4067 (aarch64_remove_point): Likewise.
4068
25abf979
YQ
40692015-07-17 Yao Qi <yao.qi@linaro.org>
4070
4071 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4072 debug_printf.
4073 (aarch64_handle_unaligned_watchpoint): Likewise.
4074
db1ff28b
JK
40752015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4076
4077 Revert the previous 3 commits:
4078 Move gdb_regex* to common/
4079 Move linux_find_memory_regions_full & co.
4080 gdbserver build-id attribute generator
4081
700ca40f
JK
40822015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4083 Jan Kratochvil <jan.kratochvil@redhat.com>
4084
4085 gdbserver build-id attribute generator.
4086 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4087 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4088 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4089 (find_phdr): New.
4090 (get_dynamic): Use find_pdhr to traverse program headers.
4091 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4092 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4093 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4094 (get_hex_build_id): New.
4095 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4096 to reply XML document.
4097
9904185c
JK
40982015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4099 Jan Kratochvil <jan.kratochvil@redhat.com>
4100
4101 * target.c: Include target/target-utils.h and fcntl.h.
4102 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4103 (target_fileio_read_stralloc): New functions.
4104
6e5b4429
JK
41052015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4106
4107 * Makefile.in (OBS): Add gdb_regex.o.
4108 (gdb_regex.o): New.
4109 * config.in: Rebuilt.
4110 * configure: Rebuilt.
4111
ddc98fbf
JK
41122015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4113 Jan Kratochvil <jan.kratochvil@redhat.com>
4114
4115 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4116 * Makefile.in (OBS): Add target-utils.o.
4117 (linux-maps.o, target-utils.o): New.
4118 * configure.srv (srv_linux_obj): Add linux-maps.o.
4119
e57bb7a0
PL
41202015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4121
4122 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4123 function, return 1.
4124 (the_low_target): Install it.
4125
586b02a9
PA
41262015-07-14 Pedro Alves <palves@redhat.com>
4127
4128 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4129 Instead, ignore ECHILD, and throw an error for other errnos.
4130
58c1b36c
PA
41312015-07-10 Pedro Alves <palves@redhat.com>
4132
4133 * event-loop.c (struct callback_event) <data>: Change type to
4134 gdb_client_data instance instead of gdb_client_data pointer.
4135 (append_callback_event): Adjust.
4136
421530db
PL
41372015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4138
4139 * linux-aarch64-low.c: Add comments for each linux_target_ops
4140 method. Remove comments already covered in target_ops and
4141 linux_target_ops definitions.
4142 (the_low_target): Add comments for each unimplemented method.
4143
c2d65f38
YQ
41442015-07-09 Yao Qi <yao.qi@linaro.org>
4145
4146 * linux-aarch64-low.c (aarch64_regmap): Remove.
4147 (aarch64_usrregs_info): Remove.
4148 (regs_info): Set field usrregs to NULL.
4149
b20a6524
MM
41502015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4151
4152 * linux-low.c: Include "rsp-low.h"
4153 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4154 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4155 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4156 (handle_btrace_enable_pt): New.
4157 (handle_btrace_general_set): Support "pt".
4158 (handle_btrace_conf_general_set): Support "pt:size".
4159
96c97461
PL
41602015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4161
4162 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4163 Z_PACKET_SW_BP.
4164
37d66942
PL
41652015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4166
4167 * linux-aarch64-low.c: Remove comment about endianness.
4168 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4169 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4170 memcmp.
4171
dc06243f
GB
41722015-06-24 Gary Benson <gbenson@redhat.com>
4173
4174 * linux-i386-ipa.c (stdint.h): Do not include.
4175 * lynx-i386-low.c (stdint.h): Likewise.
4176 * lynx-ppc-low.c (stdint.h): Likewise.
4177 * mem-break.c (stdint.h): Likewise.
4178 * thread-db.c (stdint.h): Likewise.
4179 * tracepoint.c (stdint.h): Likewise.
4180 * win32-low.c (stdint.h): Likewise.
4181
124e13d9
SM
41822015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4183
4184 * server.c (write_qxfer_response): Update call to
4185 remote_escape_output.
4186
909c2cda
JK
41872015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4188 Jan Kratochvil <jan.kratochvil@redhat.com>
4189
4190 Merge multiple hex conversions.
4191 * gdbreplay.c (tohex): Rename to 'fromhex'.
4192 (logchar): Use fromhex.
4193
24c05f46
JK
41942015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4195
4196 * server.c (handle_qxfer_libraries): Set `version' attribute for
4197 <library-list>.
4198
14d2069a
GB
41992015-06-10 Gary Benson <gbenson@redhat.com>
4200
4201 * target.h (struct target_ops) <multifs_open>: New field.
4202 <multifs_unlink>: Likewise.
4203 <multifs_readlink>: Likewise.
4204 * linux-low.c (nat/linux-namespaces.h): New include.
4205 (linux_target_ops): Initialize the_target->multifs_open,
4206 the_target->multifs_unlink and the_target->multifs_readlink.
4207 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4208 * hostio.c (hostio_fs_pid): New static variable.
4209 (hostio_handle_new_gdb_connection): New function.
4210 (handle_setfs): Likewise.
4211 (handle_open): Use the_target->multifs_open as appropriate.
4212 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4213 (handle_readlink): Use the_target->multifs_readlink as
4214 appropriate.
4215 (handle_vFile): Handle vFile:setfs packets.
4216 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4217 after target_handle_new_gdb_connection.
4218
4b8b5e72
GB
42192015-06-10 Gary Benson <gbenson@redhat.com>
4220
4221 * configure.ac (AC_CHECK_FUNCS): Add setns.
4222 * config.in: Regenerate.
4223 * configure: Likewise.
4224 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4225 (linux-namespaces.o): New rule.
4226 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4227
3ac2e371
GB
42282015-06-09 Gary Benson <gbenson@redhat.com>
4229
4230 * hostio.c (handle_open): Process mode argument with
4231 fileio_to_host_mode.
4232
ca9b78ce
YQ
42332015-06-01 Yao Qi <yao.qi@linaro.org>
4234
4235 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4236 * linux-x86-low.c: Likewise.
4237
bfacd19d
DB
42382015-05-28 Don Breazeal <donb@codesourcery.com>
4239
4240 * linux-low.c (handle_extended_wait): Initialize
4241 thread_info.last_resume_kind for new fork children.
4242
452003ef
PA
42432015-05-15 Pedro Alves <palves@redhat.com>
4244
4245 * target.h (target_handle_new_gdb_connection): Rewrite using if
4246 wrapped in do/while.
4247
1041a03c
JB
42482015-05-14 Joel Brobecker <brobecker@adacore.com>
4249
4250 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4251 * configure, config.in: Regenerate.
4252 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4253 Declare typedef.
4254
c269dbdb
DB
42552015-05-12 Don Breazeal <donb@codesourcery.com>
4256
4257 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4258 PTRACE_EVENT_VFORK_DONE.
4259 (linux_low_ptrace_options, extended_event_reported): Add vfork
4260 events.
4261 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4262 and "vforkdone" for RSP 'T' Stop Reply Packet.
4263 * server.h (report_vfork_events): Declare
4264 global variable.
4265
3a8a0396
DB
42662015-05-12 Don Breazeal <donb@codesourcery.com>
4267
4268 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4269 (the_low_target) <new_fork>: Initialize new member.
4270 * linux-arm-low.c (arm_new_fork): New function.
4271 (the_low_target) <new_fork>: Initialize new member.
4272 * linux-low.c (handle_extended_wait): Call new target function
4273 new_fork.
4274 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4275 * linux-mips-low.c (mips_add_watchpoint): New function
4276 extracted from mips_insert_point.
4277 (the_low_target) <new_fork>: Initialize new member.
4278 (mips_linux_new_fork): New function.
4279 (mips_insert_point): Call mips_add_watchpoint.
4280 * linux-x86-low.c (x86_linux_new_fork): New function.
4281 (the_low_target) <new_fork>: Initialize new member.
4282
de0d863e
DB
42832015-05-12 Don Breazeal <donb@codesourcery.com>
4284
4285 * linux-low.c (handle_extended_wait): Implement return value,
4286 rename argument 'event_child' to 'event_lwp', handle
4287 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4288 (linux_low_ptrace_options): New function.
4289 (linux_low_filter_event): Call linux_low_ptrace_options,
4290 use different argument fo linux_enable_event_reporting,
4291 use return value from handle_extended_wait.
4292 (extended_event_reported): New function.
4293 (linux_wait_1): Call extended_event_reported and set
4294 status to report fork events.
4295 (linux_write_memory): Add pid to debug message.
4296 (reset_lwp_ptrace_options_callback): New function.
4297 (linux_handle_new_gdb_connection): New function.
4298 (linux_target_ops): Initialize new structure member.
4299 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4300 * lynx-low.c: Initialize new structure member.
4301 * remote-utils.c (prepare_resume_reply): Implement stop reason
4302 "fork" for "T" stop message.
4303 * server.c (handle_query): Call handle_new_gdb_connection.
4304 * server.h (report_fork_events): Declare global flag.
4305 * target.h (struct target_ops) <handle_new_gdb_connection>:
4306 New member.
4307 (target_handle_new_gdb_connection): New macro.
4308 * win32-low.c: Initialize new structure member.
4309
ddcbc397
DB
43102015-05-12 Don Breazeal <donb@codesourcery.com>
4311
4312 * mem-break.c (APPEND_TO_LIST): Define macro.
4313 (clone_agent_expr): New function.
4314 (clone_one_breakpoint): New function.
4315 (clone_all_breakpoints): New function.
4316 * mem-break.h: Declare new functions.
4317
89245bc0
DB
43182015-05-12 Don Breazeal <donb@codesourcery.com>
4319
4320 * linux-low.c (linux_supports_fork_events): New function.
4321 (linux_supports_vfork_events): New function.
4322 (linux_target_ops): Initialize new structure members.
4323 (initialize_low): Call linux_check_ptrace_features.
4324 * lynx-low.c (lynx_target_ops): Initialize new structure
4325 members.
4326 * server.c (report_fork_events, report_vfork_events):
4327 New global flags.
4328 (handle_query): Add new features to qSupported packet and
4329 response.
4330 (captured_main): Initialize new global variables.
4331 * target.h (struct target_ops) <supports_fork_events>:
4332 New member.
4333 <supports_vfork_events>: New member.
4334 (target_supports_fork_events): New macro.
4335 (target_supports_vfork_events): New macro.
4336 * win32-low.c (win32_target_ops): Initialize new structure
4337 members.
4338
835205d0
GB
43392015-05-12 Gary Benson <gbenson@redhat.com>
4340
4341 * server.c (handle_qxfer_exec_file): Use current process
4342 if annex is empty.
4343
21e94bd9
SL
43442015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4345
4346 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4347 Remove HAVE_PTRACE_GETREGS conditionals.
4348 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4349 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4350
45614f15
YQ
43512015-05-08 Yao Qi <yao.qi@linaro.org>
4352
4353 * linux-low.c (linux_supports_conditional_breakpoints): New
4354 function.
4355 (linux_target_ops): Install new target method.
4356 * lynx-low.c (lynx_target_ops): Install NULL hook for
4357 supports_conditional_breakpoints.
4358 * nto-low.c (nto_target_ops): Likewise.
4359 * spu-low.c (spu_target_ops): Likewise.
4360 * win32-low.c (win32_target_ops): Likewise.
4361 * server.c (handle_query): Check
4362 target_supports_conditional_breakpoints.
4363 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4364 New field.
4365 (target_supports_conditional_breakpoints): New macro.
4366
80ad801e
PA
43672015-05-06 Pedro Alves <palves@redhat.com>
4368
4369 PR server/18081
4370 * server.c (start_inferior): If the process exits, mourn it.
4371
819843c7
GB
43722015-04-21 Gary Benson <gbenson@redhat.com>
4373
4374 * hostio.c (fileio_open_flags_to_host): Factored out to
4375 fileio_to_host_openflags in common/fileio.c. Single use
4376 updated.
4377
a2d5a9d7
MF
43782015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4379
4380 * linux-xtensa-low.c (xtensa_fill_gregset)
4381 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4382 XCHAL_HAVE_LOOP.
4383
deb44829
MF
43842015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4385
4386 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4387 (regs_info): Replace usrregs pointer with NULL.
4388
e57f1de3
GB
43892015-04-17 Gary Benson <gbenson@redhat.com>
4390
4391 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4392 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4393 * server.c (handle_qxfer_exec_file): New function.
4394 (qxfer_packets): Add exec-file entry.
4395 (handle_query): Report qXfer:exec-file:read as supported packet.
4396
62828379
RN
43972015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4398
4399 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4400
b88bb450
GB
44012015-04-09 Gary Benson <gbenson@redhat.com>
4402
4403 * hostio-errno.c (errno_to_fileio_error): Remove function.
4404 Update caller to use remote_fileio_to_fio_error.
4405
c8f4bfdd
YQ
44062015-04-09 Yao Qi <yao.qi@linaro.org>
4407
4408 * linux-low.c (linux_insert_point): Call
4409 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4410 (linux_remove_point): Call remove_memory_breakpoint if type is
4411 raw_bkpt_type_sw.
4412 * linux-x86-low.c (x86_insert_point): Don't call
4413 insert_memory_breakpoint.
4414 (x86_remove_point): Don't call remove_memory_breakpoint.
4415
41f98f02
PA
44162015-04-01 Pedro Alves <palves@redhat.com>
4417 Cleber Rosa <crosa@redhat.com>
4418
4419 * server.c (gdbserver_usage): Reorganize and extend the usage
4420 message.
4421
2bf6fb9d
PA
44222015-03-24 Pedro Alves <palves@redhat.com>
4423
4424 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4425 output. Also dump TRAP_TRACE.
4426 (linux_low_filter_event): In debug output, distinguish a
4427 resume_stop SIGSTOP from a delayed SIGSTOP.
4428
369f6daa
GB
44292015-03-24 Gary Benson <gbenson@redhat.com>
4430
4431 * linux-x86-low.c (x86_linux_new_thread): Moved to
4432 nat/x86-linux.c.
4433 (x86_linux_prepare_to_resume): Likewise.
4434
8e5d4070
GB
44352015-03-24 Gary Benson <gbenson@redhat.com>
4436
4437 * Makefile.in (x86-linux-dregs.o): New rule.
4438 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4439 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4440 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4441 (x86_linux_dr_get): Likewise.
4442 (x86_linux_dr_set): Likewise.
4443 (update_debug_registers_callback): Likewise.
4444 (x86_linux_dr_set_addr): Likewise.
4445 (x86_linux_dr_get_addr): Likewise.
4446 (x86_linux_dr_set_control): Likewise.
4447 (x86_linux_dr_get_control): Likewise.
4448 (x86_linux_dr_get_status): Likewise.
4449 (x86_linux_update_debug_registers): Likewise.
4450
2b95d440
GB
44512015-03-24 Gary Benson <gbenson@redhat.com>
4452
4453 * linux-x86-low.c (x86_linux_update_debug_registers):
4454 New function, factored out from...
4455 (x86_linux_prepare_to_resume): ...this.
4456
14b0bc68
GB
44572015-03-24 Gary Benson <gbenson@redhat.com>
4458
4459 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4460 (x86_linux_dr_set): Likewise.
4461 (update_debug_registers_callback): Likewise.
4462 (x86_linux_dr_set_addr): Likewise.
4463 (x86_linux_dr_get_addr): Likewise.
4464 (x86_linux_dr_set_control): Likewise.
4465 (x86_linux_dr_get_control): Likewise.
4466 (x86_linux_dr_get_status): Likewise.
4467 (x86_linux_prepare_to_resume): Likewise.
4468
5dfe6ca8
GB
44692015-03-24 Gary Benson <gbenson@redhat.com>
4470
4471 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4472 Use perror_with_name. Pass string through gettext.
4473 (x86_linux_dr_set): Likewise.
4474
d33472ad
GB
44752015-03-24 Gary Benson <gbenson@redhat.com>
4476
4477 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4478 (x86_linux_dr_set_addr): ...this.
4479 (x86_dr_low_get_addr): Rename to...
4480 (x86_linux_dr_get_addr): ...this.
4481 (x86_dr_low_set_control): Rename to...
4482 (x86_linux_dr_set_control): ...this.
4483 (x86_dr_low_get_control): Rename to...
4484 (x86_linux_dr_get_control): ...this.
4485 (x86_dr_low_get_status): Rename to...
4486 (x86_linux_dr_get_status): ...this.
4487 (x86_dr_low): Update with new function names.
4488
4b134ca1
GB
44892015-03-24 Gary Benson <gbenson@redhat.com>
4490
4491 * Makefile.in (x86-linux.o): New rule.
4492 * configure.srv: Add x86-linux.o to relevant targets.
4493 * linux-low.c (lwp_set_arch_private_info): New function.
4494 (lwp_arch_private_info): Likewise.
4495 * linux-x86-low.c: Include nat/x86-linux.h.
4496 (arch_lwp_info): Removed structure.
4497 (update_debug_registers_callback):
4498 Use lwp_set_debug_registers_changed.
4499 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4500 and lwp_set_debug_registers_changed.
4501 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4502
34c703da
GB
45032015-03-24 Gary Benson <gbenson@redhat.com>
4504
4505 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4506 * linux-arm-low.c (arm_new_thread): Likewise.
4507 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4508 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4509 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4510 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4511
cff068da
GB
45122015-03-24 Gary Benson <gbenson@redhat.com>
4513
4514 * linux-low.c (ptid_of_lwp): New function.
4515 (lwp_is_stopped): Likewise.
4516 (lwp_stop_reason): Likewise.
4517 * linux-x86-low.c (update_debug_registers_callback):
4518 Use lwp_is_stopped.
4519 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4520 lwp_stop_reason.
4521
b2f7c7e8
GB
45222015-03-24 Gary Benson <gbenson@redhat.com>
4523
4524 * linux-low.h (linux_stop_lwp): Remove declaration.
4525
6d4ee8c6
GB
45262015-03-24 Gary Benson <gbenson@redhat.com>
4527
4528 * linux-low.h: Include nat/linux-nat.h.
4529 * linux-low.c (iterate_over_lwps_args): New structure.
4530 (iterate_over_lwps_filter): New function.
4531 (iterate_over_lwps): Likewise.
4532 * linux-x86-low.c (update_debug_registers_callback):
4533 Update signature to what iterate_over_lwps expects.
4534 Remove PID check that iterate_over_lwps now performs.
4535 (x86_dr_low_set_addr): Use iterate_over_lwps.
4536 (x86_dr_low_set_control): Likewise.
4537
70a0bb6b
GB
45382015-03-24 Gary Benson <gbenson@redhat.com>
4539
4540 * linux-x86-low.c (x86_debug_reg_state): New function.
4541 (x86_linux_prepare_to_resume): Use the above.
4542
7b669087
GB
45432015-03-24 Gary Benson <gbenson@redhat.com>
4544
4545 * linux-low.c (current_lwp_ptid): New function.
4546 * linux-x86-low.c: Include nat/linux-nat.h.
4547 (x86_dr_low_get_addr): Use current_lwp_ptid.
4548 (x86_dr_low_get_control): Likewise.
4549 (x86_dr_low_get_status): Likewise.
4550
eef49a3d
PA
45512015-03-20 Pedro Alves <palves@redhat.com>
4552
4553 * tracepoint.c (cmd_qtstatus): Make "str" const.
4554
b2333d22
PA
45552015-03-20 Pedro Alves <palves@redhat.com>
4556
4557 * server.c (handle_general_set): Make "req_str" const.
4558
23f238d3
PA
45592015-03-19 Pedro Alves <palves@redhat.com>
4560
4561 * linux-low.c (linux_resume_one_lwp): Rename to ...
4562 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4563 instead call perror_with_name.
4564 (check_ptrace_stopped_lwp_gone): New function.
4565 (linux_resume_one_lwp): Reimplement as wrapper around
4566 linux_resume_one_lwp_throw that swallows errors if the LWP is
4567 gone.
4568
91baf43f
PA
45692015-03-19 Pedro Alves <palves@redhat.com>
4570
4571 * linux-low.c (count_events_callback, select_event_lwp_callback):
4572 No longer check whether the thread has resume_stop as last resume
4573 kind.
4574
8bf3b159
PA
45752015-03-19 Pedro Alves <palves@redhat.com>
4576
4577 * linux-low.c (count_events_callback, select_event_lwp_callback):
4578 Use the lwp's status_pending_p field, not the thread's.
4579
b90fc188
PA
45802015-03-19 Pedro Alves <palves@redhat.com>
4581
4582 * linux-low.c (select_event_lwp_callback): Update comments to
4583 no longer mention SIGTRAP.
4584
464b0089
GB
45852015-03-18 Gary Benson <gbenson@redhat.com>
4586
4587 * server.c (handle_query): Do not report vFile:fstat as supported.
4588
aa9e327f
GB
45892015-03-11 Gary Benson <gbenson@redhat.com>
4590
4591 * hostio.c (sys/types.h): New include.
4592 (sys/stat.h): Likewise.
4593 (common-remote-fileio.h): Likewise.
4594 (handle_fstat): New function.
4595 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 4596
791c0056
GB
45972015-03-11 Gary Benson <gbenson@redhat.com>
4598
4599 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4600 struct stat.st_blocks and struct stat.st_blksize.
4601 * configure: Regenerate.
4602 * config.in: Likewise.
4603 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4604 (OBS): Add common-remote-fileio.o.
4605 (common-remote-fileio.o): New rule.
4606
9a9df970
PA
46072015-03-09 Pedro Alves <palves@redhat.com>
4608
4609 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4610 'struct sockaddr' pointer in 'accept' call.
4611
9eb1356e
PA
46122015-03-09 Pedro Alves <palves@redhat.com>
4613
4614 Revert:
4615 2015-03-07 Pedro Alves <palves@redhat.com>
4616 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4617 or <winsock2.h> here. Instead include "gdb_socket.h".
4618 (remote_open): Use union gdb_sockaddr_u.
4619 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4620 or <winsock2.h> here. Instead include "gdb_socket.h".
4621 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4622 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4623 or <sys/un.h>.
4624 (init_named_socket, gdb_agent_helper_thread): Use union
4625 gdb_sockaddr_u.
4626
aac331e4
PA
46272015-03-07 Pedro Alves <palves@redhat.com>
4628
4629 * configure.ac (build_warnings): Move
4630 -Wdeclaration-after-statement to the C-specific set.
4631 * configure: Regenerate.
4632
366c75fc
PA
46332015-03-07 Pedro Alves <palves@redhat.com>
4634
4635 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4636 or <winsock2.h> here. Instead include "gdb_socket.h".
4637 (remote_open): Use union gdb_sockaddr_u.
4638 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4639 or <winsock2.h> here. Instead include "gdb_socket.h".
4640 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4641 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4642 or <sys/un.h>.
4643 (init_named_socket, gdb_agent_helper_thread): Use union
4644 gdb_sockaddr_u.
4645
492d29ea
PA
46462015-03-07 Pedro Alves <palves@redhat.com>
4647
4648 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4649 instead.
4650
60a191ed
YQ
46512015-03-06 Yao Qi <yao.qi@linaro.org>
4652
4653 * linux-aarch64-low.c (aarch64_insert_point): Use
4654 show_debug_regs as a boolean.
4655 (aarch64_remove_point): Likewise.
4656
f5771b1d
PA
46572015-03-05 Pedro Alves <palves@redhat.com>
4658
4659 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4660 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4661 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4662 * nto-low.c (nto_target_ops): Likewise.
4663 * spu-low.c (spu_target_ops): Likewise.
4664 * win32-low.c (win32_target_ops): Likewise.
4665
3e572f71
PA
46662015-03-04 Pedro Alves <palves@redhat.com>
4667
72f4393d 4668 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
4669 Decide whether a breakpoint triggered based on the SIGTRAP's
4670 siginfo.si_code.
72f4393d
L
4671 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4672 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
4673 (linux_low_filter_event): Check for breakpoints before checking
4674 watchpoints.
4675 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4676 siginfo.si_code.
72f4393d
L
4677 (linux_stopped_by_sw_breakpoint)
4678 (linux_supports_stopped_by_sw_breakpoint)
4679 (linux_stopped_by_hw_breakpoint)
4680 (linux_supports_stopped_by_hw_breakpoint): New functions.
4681 (linux_target_ops): Install new target methods.
3e572f71 4682
1ec68e26
PA
46832015-03-04 Pedro Alves <palves@redhat.com>
4684
4685 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4686 * server.c (swbreak_feature, hwbreak_feature): New globals.
4687 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4688 (captured_main): Clear swbreak_feature and hwbreak_feature.
4689 * server.h (swbreak_feature, hwbreak_feature): Declare.
4690 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4691 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4692 supports_stopped_by_hw_breakpoint>: New fields.
4693 (target_supports_stopped_by_sw_breakpoint)
4694 (target_stopped_by_sw_breakpoint)
4695 (target_supports_stopped_by_hw_breakpoint)
4696 (target_stopped_by_hw_breakpoint): Declare.
4697
15c66dd6
PA
46982015-03-04 Pedro Alves <palves@redhat.com>
4699
4700 enum lwp_stop_reason -> enum target_stop_reason
4701 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4702 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4703 (linux_wait_1, stuck_in_jump_pad_callback)
4704 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4705 (linux_stopped_by_watchpoint):
4706 * linux-low.h (enum lwp_stop_reason): Delete.
4707 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4708 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4709
98fc70d6
YQ
47102015-03-04 Yao Qi <yao.qi@linaro.org>
4711
4712 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4713
dd2ac174
GB
47142015-03-03 Gary Benson <gbenson@redhat.com>
4715
4716 * hostio.c (handle_vFile): Fix prefix lengths.
4717
d68e53f4
MM
47182015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4719
4720 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4721 ptr_bits.
4722
bf2d68ab
AA
47232015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4724
4725 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4726 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4727 (clean): Add "rm -f" for above C files.
4728 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4729 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4730 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4731 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4732 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4733 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4734 (init_registers_s390x_vx_linux64)
4735 (init_registers_s390x_tevx_linux64)
4736 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4737 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4738 declarations.
4739 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4740 (s390_store_vxrs_high): New functions.
4741 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4742 NT_S390_VXRS_HIGH.
4743 (s390_arch_setup): Add logic for selecting one of the new target
4744 descriptions. Activate the new vector regsets if applicable.
4745 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4746 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4747 and init_registers_s390x_tevx_linux64.
4748
c966a859
PA
47492015-03-01 Pedro Alves <palves@redhat.com>
4750
4751 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4752 parameter.
4753
4180215b
PA
47542015-02-27 Pedro Alves <palves@redhat.com>
4755
4756 * linux-x86-low.c (u_debugreg_offset): New function.
4757 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4758
749bab01
PA
47592015-02-27 Pedro Alves <palves@redhat.com>
4760
4761 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4762 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4763 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4764 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4765 (ps_lsetfpregs, ps_getpid)
4766 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4767 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4768 (ps_lsetxregs, ps_plog): Declare.
4769
3c14e5a3
PA
47702015-02-27 Pedro Alves <palves@redhat.com>
4771
4772 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4773 IP_AGENT_EXPORT_FUNC.
4774 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4775 IP_AGENT_EXPORT_FUNC.
4776 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4777 (IP_AGENT_EXPORT): Delete.
4778 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4779 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4780 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4781 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4782 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4783 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4784 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4785 (traceframe_read_count, traceframe_write_count)
4786 (traceframes_created, trace_state_variables, get_raw_reg)
4787 (get_trace_state_variable_value, set_trace_state_variable_value)
4788 (ust_loaded, helper_thread_id, cmd_buf): Use
4789 IPA_SYM_EXPORTED_NAME.
4790 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4791 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4792 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4793 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4794 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4795 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4796 EXTERN_C_PUSH/EXTERN_C_POP.
4797 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4798 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4799 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4800 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4801 (traceframe_write_count, traceframe_read_count)
4802 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4803 (about_to_request_buffer_space, get_trace_state_variable_value)
4804 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4805 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4806 EXTERN_C_PUSH/EXTERN_C_POP.
4807 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4808 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4809 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4810 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4811 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4812 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4813 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4814 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4815 Define.
4816 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4817 (IP_AGENT_EXPORT_VAR_DECL): Define.
4818 (tracing): Declare.
4819 (gdb_agent_get_raw_reg): Declare.
4820
fe978cb0
PA
48212015-02-27 Tom Tromey <tromey@redhat.com>
4822 Pedro Alves <palves@redhat.com>
4823
4824 Rename symbols whose names are reserved C++ keywords throughout.
4825
3bc3d82a
PA
48262015-02-27 Pedro Alves <palves@redhat.com>
4827
4828 * Makefile.in (COMPILER): New, get it from autoconf.
4829 (CXX): Get from autoconf instead.
4830 (COMPILE.pre): Use COMPILER.
4831 (CC-LD): Rename to ...
4832 (CC_LD): ... this. Use COMPILER.
4833 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4834 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4835 * acinclude.m4: Include build-with-cxx.m4.
4836 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4837 Disable -Werror by default if building in C++ mode.
4838 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4839 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4840 the C++ compiler. Save/restore CXXFLAGS too.
4841 * configure: Regenerate.
4842
07697489
PA
48432015-02-27 Pedro Alves <palves@redhat.com>
4844
4845 * acinclude.m4: Include libiberty.m4.
4846 * configure.ac: Call libiberty_INIT.
4847 * config.in, configure: Regenerate.
4848
9beb7c4e
PA
48492015-02-26 Pedro Alves <palves@redhat.com>
4850
4851 * linux-low.c (linux_wait_1): When incrementing the PC past a
4852 program breakpoint always use the_low_target.breakpoint_len as
4853 increment, rather than the maximum between that and
4854 the_low_target.decr_pc_after_break.
4855
8090aef2
PA
48562015-02-23 Pedro Alves <palves@redhat.com>
4857
4858 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4859 thread was doing a step-over; always adjust the PC if
4860 we stepped over a permanent breakpoint.
4861 (linux_wait_1): If we stepped over breakpoint that was on top of a
4862 permanent breakpoint, manually advance the PC past it.
4863
bc9540e8
PA
48642015-02-23 Pedro Alves <palves@redhat.com>
4865
4866 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4867 modes.
4868 (x86_fill_gregset, x86_store_gregset): Use it when handling
4869 $orig_eax.
4870
2db9a427
PA
48712015-02-20 Pedro Alves <palves@redhat.com>
4872
4873 * thread-db.c: Include "nat/linux-procfs.h".
4874 (thread_db_init): Skip listing new threads if the kernel supports
4875 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4876
afa8d396
PA
48772015-02-20 Pedro Alves <palves@redhat.com>
4878
4879 * linux-low.c (status_pending_p_callback): Use ptid_match.
4880
c9587f88
AT
48812015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4882
4883 PR breakpoints/16812
4884 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4885 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4886 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4887
b05ec7a5
AT
48882015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
4889
4890 PR breakpoints/15956
4891 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4892
d33501a5
MM
48932015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4894
4895 * linux-low.c (linux_low_btrace_conf): Print size.
4896 * server.c (handle_btrace_conf_general_set): New.
4897 (hanle_general_set): Call handle_btrace_conf_general_set.
4898 (handle_query): Report Qbtrace-conf:bts:size as supported.
4899
f4abbc16
MM
49002015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4901
4902 * linux-low.c (linux_low_enable_btrace): Update parameters.
4903 (linux_low_btrace_conf): New.
4904 (linux_target_ops)<to_btrace_conf>: Initialize.
4905 * server.c (current_btrace_conf): New.
4906 (handle_btrace_enable): Rename to ...
4907 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
4908 to target_enable_btrace. Update comment. Update users.
4909 (handle_qxfer_btrace_conf): New.
4910 (qxfer_packets): Add btrace-conf entry.
4911 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4912 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4913 (target_ops)<read_btrace_conf>: New.
4914 (target_enable_btrace): Update parameters.
4915 (target_read_btrace_conf): New.
4916
043c3577
MM
49172015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4918
4919 * server.c (handle_btrace_general_set): Remove call to
4920 target_supports_btrace.
4921 (supported_btrace_packets): New.
4922 (handle_query): Call supported_btrace_packets.
4923 * target.h: include btrace-common.h.
4924 (btrace_target_info): Removed.
4925 (supports_btrace, target_supports_btrace): Update parameters.
4926
734b0e4b
MM
49272015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4928
4929 * Makefile.in (SFILES): Add common/btrace-common.c.
4930 (OBS): Add common/btrace-common.o.
4931 (btrace-common.o): Add build rules.
4932 * linux-low: Include btrace-common.h.
4933 (linux_low_read_btrace): Use struct btrace_data. Call
4934 btrace_data_init and btrace_data_fini.
4935
d6c146e9
PA
49362015-02-06 Pedro Alves <palves@redhat.com>
4937
4938 * thread-db.c (find_new_threads_callback): Add debug output.
4939
20ba1ce6
PA
49402015-02-04 Pedro Alves <palves@redhat.com>
4941
4942 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4943 (resume_stopped_resumed_lwps): New function.
4944 (linux_wait_for_event_filtered): Use it.
4945
8cc73a39
SDJ
49462015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4947
4948 * Makefile.in (SFILES): Add linux-personality.c.
4949 (linux-personality.o): New rule.
4950 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4951 list of objects to be built.
4952 * linux-low.c: Include nat/linux-personality.h.
4953 (linux_create_inferior): Remove code to disable address space
4954 randomization (moved to ../nat/linux-personality.c). Create
4955 cleanup to disable address space randomization.
4956
fb23d554
SDJ
49572015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4958
4959 * Makefile.in (posix-strerror.o): New rule.
4960 (mingw-strerror.o): Likewise.
4961 * configure: Regenerated.
4962 * configure.ac: Source file ../common/common.host. Initialize new
4963 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4964
cdf43629
YQ
49652015-01-14 Yao Qi <yao@codesourcery.com>
4966
4967 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4968 (ppc-linux.o): New rule.
4969 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4970 * configure.ac: AC_CHECK_FUNCS(getauxval).
4971 * config.in: Re-generated.
4972 * configure: Re-generated.
4973 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4974 ppc64_64bit_inferior_p
4975
514c5338
YQ
49762015-01-14 Yao Qi <yao@codesourcery.com>
4977
4978 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4979 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4980 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4981 (PT_ORIG_R3, PT_TRAP): Likewise.
4982 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4983 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4984 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4985
3368c1e5
JB
49862015-01-10 Joel Brobecker <brobecker@adacore.com>
4987
4988 * i387-fp.c (i387_cache_to_xsave): In look over
4989 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4990 zmmh_low_space field by use of zmmh_high_space.
4991
582511be
PA
49922015-01-09 Pedro Alves <palves@redhat.com>
4993
4994 * linux-low.c (step_over_bkpt): Move higher up in the file.
4995 (handle_extended_wait): Don't store the stop_pc here.
4996 (get_stop_pc): Adjust comments and rename to ...
4997 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4998 stopped for a software breakpoint or hardware breakpoint.
4999 (thread_still_has_status_pending_p): New function.
5000 (status_pending_p_callback): Use
5001 thread_still_has_status_pending_p. If the event is no longer
5002 interesting, resume the LWP.
5003 (handle_tracepoints): Add assert.
5004 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5005 (wstatus_maybe_breakpoint): New function.
5006 (cancel_breakpoint): Delete function.
5007 (check_stopped_by_watchpoint): New function, factored out from
5008 linux_low_filter_event.
5009 (lp_status_maybe_breakpoint): Delete function.
5010 (linux_low_filter_event): Remove filter_ptid argument.
5011 Leave thread group exits pending here. Store the LWP's stop PC.
5012 Always leave events pending.
5013 (linux_wait_for_event_filtered): Pull all events out of the
5014 kernel, and leave them all pending.
5015 (count_events_callback, select_event_lwp_callback): Consider all
5016 events.
5017 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5018 (select_event_lwp): Only give preference to the stepping LWP in
5019 all-stop mode. Adjust comments.
5020 (ignore_event): New function.
5021 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5022 references to cancel_breakpoints. Adjust to renames. Also give
5023 equal priority to all LWPs that have had events in non-stop mode.
5024 If reporting a software breakpoint event, unadjust the LWP's PC.
5025 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5026 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5027 Adjust.
5028 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5029 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5030 (linux_stopped_by_watchpoint): Adjust.
5031 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5032 * linux-low.h (enum lwp_stop_reason): New.
5033 (struct lwp_info) <stop_pc>: Adjust comment.
5034 <stopped_by_watchpoint>: Delete field.
5035 <stop_reason>: New field.
5036 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5037 * mem-break.c (software_breakpoint_inserted_here)
5038 (hardware_breakpoint_inserted_here): New function.
5039 * mem-break.h (software_breakpoint_inserted_here)
5040 (hardware_breakpoint_inserted_here): Declare.
5041 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5042 (cancel_breakpoints): Delete.
5043 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5044 (upload_fast_traceframes): Remove references to
5045 cancel_breakpoints.
5046
a33e3959
PA
50472015-01-09 Pedro Alves <palves@redhat.com>
5048
5049 * thread-db.c (find_new_threads_callback): Ignore thread if the
5050 kernel thread ID is -1.
5051
8784d563
PA
50522015-01-09 Pedro Alves <palves@redhat.com>
5053
5054 * linux-low.c (linux_attach_fail_reason_string): Move to
5055 nat/linux-ptrace.c, and rename.
5056 (linux_attach_lwp): Update comment.
5057 (attach_proc_task_lwp_callback): New function.
5058 (linux_attach): Adjust to rename and use
5059 linux_proc_attach_tgid_threads.
5060 (linux_attach_fail_reason_string): Delete declaration.
5061
76f2b779
JB
50622015-01-01 Joel Brobecker <brobecker@adacore.com>
5063
5064 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5065 * server.c (gdbserver_version): Likewise.
5066
fafcc06a
SDJ
50672014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5068
5069 * remote-utils.c: Include ctype.h.
5070 (input_interrupt): Explicitly handle the case when the char
5071 received is the NUL byte. Improve the printing of non-ASCII
5072 characters.
5073
beed38b8
JB
50742014-12-16 Joel Brobecker <brobecker@adacore.com>
5075
5076 * linux-low.c (linux_low_filter_event): Update call to
5077 linux_enable_event_reporting following the addition of
5078 a new parameter to that function.
5079
bf330350
CU
50802014-12-16 Catalin Udma <catalin.udma@freescale.com>
5081
5082 PR server/17457
5083 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5084 (AARCH64_FPCR_REGNO): Likewise.
5085 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5086 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5087 (aarch64_store_fpregset): Likewise.
5088
5227d625
JB
50892014-12-15 Joel Brobecker <brobecker@adacore.com>
5090
5091 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5092 Remove FIXME comment about assumption about N.
5093
f93b65a0
JB
50942014-12-13 Joel Brobecker <brobecker@adacore.com>
5095
5096 * configure.ac: If large-file support is disabled in GDBserver,
5097 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5098 * configure: Regenerate.
5099
e5a9158d
AA
51002014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5101
5102 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5103 warning upon ENODATA from ptrace.
5104 * linux-s390-low.c (s390_store_tdb): New.
5105 (s390_regsets): Add regset for NT_S390_TDB.
5106
feea5f36
AA
51072014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5108
5109 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5110 without a fill_function.
5111 * linux-s390-low.c (s390_fill_last_break): Remove.
5112 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5113 (s390_arch_setup): Use regset's size instead of fill_function for
5114 loop end condition.
5115
098dbe61
AA
51162014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5117
5118 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5119 the regset's store function when ptrace returned an error.
5120 * regcache.c (get_thread_regcache): Invalidate register cache
5121 before fetching inferior's registers.
5122
28eef672
AA
51232014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5124
5125 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5126 while-loop as for-loop.
5127 (regsets_store_inferior_registers): Likewise.
5128
bdca27a2
YQ
51292014-11-28 Yao Qi <yao@codesourcery.com>
5130
5131 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5132 * config.in, configure: Re-generate.
5133 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5134 is defined.
5135
9c232dda
YQ
51362014-11-21 Yao Qi <yao@codesourcery.com>
5137
5138 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5139 (AC_CHECK_HEADERS): Remove malloc.h.
5140 * configure: Re-generated.
5141 * config.in: Re-generated.
5142 * server.h: Don't include alloca.h and malloc.h.
5143 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5144 Don't include malloc.h.
5145
43968415
JB
51462014-11-17 Joel Brobecker <brobecker@adacore.com>
5147
5148 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5149 corresponding ERRNO check in same block.
5150
40e91bc7
PA
51512014-11-12 Pedro Alves <palves@redhat.com>
5152
5153 * server.c (cont_thread): Update comment.
5154 (start_inferior, attach_inferior): No longer clear cont_thread.
5155 (handle_v_cont): No longer set cont_thread.
5156 (captured_main): Clear cont_thread each time a GDB connects.
5157
c2c118cf
PA
51582014-11-12 Pedro Alves <palves@redhat.com>
5159
5160 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5161 thread, and don't resume all threads if the Hc thread has exited.
5162
78708b7c
PA
51632014-11-12 Pedro Alves <palves@redhat.com>
5164
5165 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5166 the process group instead of to a specific LWP.
5167
a2abc7de
PA
51682014-10-15 Pedro Alves <palves@redhat.com>
5169
5170 PR server/17487
5171 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5172 parameter.
5173 (arm_set_thread_context): Delete.
5174 (the_low_target): Adjust.
5175 * win32-i386-low.c (debug_registers_changed)
5176 (debug_registers_used): Delete.
5177 (update_debug_registers_callback): New function.
5178 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5179 needing to update their debug registers.
5180 (win32_get_current_dr): New function.
5181 (x86_dr_low_get_addr, x86_dr_low_get_control)
5182 (x86_dr_low_get_status): Fetch the debug register from the thread
5183 record's context.
5184 (i386_initial_stuff): Adjust.
5185 (i386_get_thread_context): Remove current_event parameter. Don't
5186 clear debug_registers_changed nor copy DR values to
5187 debug_reg_state.
5188 (i386_set_thread_context): Delete.
5189 (i386_prepare_to_resume): New function.
5190 (i386_thread_added): Mark the thread as needing to update irs
5191 debug registers.
5192 (the_low_target): Remove i386_set_thread_context and install
5193 i386_prepare_to_resume.
5194 * win32-low.c (win32_get_thread_context): Adjust.
5195 (win32_set_thread_context): Use SetThreadContext
5196 directly.
5197 (win32_prepare_to_resume): New function.
5198 (win32_require_context): New function, factored out from ...
5199 (thread_rec): ... this.
5200 (continue_one_thread): Call win32_prepare_to_resume on each thread
5201 we're about to continue.
5202 (win32_resume): Call win32_prepare_to_resume on the event thread.
5203 * win32-low.h (struct win32_thread_info)
5204 <debug_registers_changed>: New field.
5205 (struct win32_target_ops): Change prototype of set_thread_context,
5206 delete set_thread_context and add prepare_to_resume.
5207 (win32_require_context): New declaration.
5208
a442d071
GB
52092014-10-08 Gary Benson <gbenson@redhat.com>
5210
5211 * server.h: Do not include common-exceptions.h.
5212
6f1947e8
GB
52132014-10-08 Gary Benson <gbenson@redhat.com>
5214
5215 * server.h: Do not include cleanups.h.
5216
63b434a4
JH
52172014-09-30 James Hogan <james.hogan@imgtec.com>
5218
5219 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5220 mips64-dsp-linux.c.
5221
c4d9ceb6
YQ
52222014-09-23 Yao Qi <yao@codesourcery.com>
5223
5224 * linux-low.c (lp_status_maybe_breakpoint): New function.
5225 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5226 (count_events_callback): Likewise.
5227 (select_event_lwp_callback): Likewise.
5228 (cancel_breakpoints_callback): Likewise.
5229
89a5711c
DB
52302014-09-19 Don Breazeal <donb@codesourcery.com>
5231
5232 * linux-low.c (handle_extended_wait): Call
5233 linux_ptrace_get_extended_event.
5234 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5235 linux_is_extended_waitstatus.
5236
bffc0964
JB
52372014-09-16 Joel Brobecker <brobecker@adacore.com>
5238
5239 * Makefile.in (CPPFLAGS): Define.
5240 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5241 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5242
0bfdf32f
GB
52432014-09-16 Gary Benson <gbenson@redhat.com>
5244
5245 * inferiors.h (current_inferior): Renamed as...
5246 (current_thread): New variable. All uses updated.
5247 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5248 (maybe_move_out_of_jump_pad): Likewise.
5249 (cancel_breakpoint): Likewise.
5250 (linux_low_filter_event): Likewise.
5251 (wait_for_sigstop): Likewise.
5252 (linux_resume_one_lwp): Likewise.
5253 (need_step_over_p): Likewise.
5254 (start_step_over): Likewise.
5255 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5256 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5257 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5258 and save_inferior as saved_thread.
5259 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5260 saved_thread.
5261 (regcache_invalidate_thread): Likewise.
5262 * remote-utils.c (prepare_resume_reply): Likewise.
5263 * thread-db.c (thread_db_get_tls_address): Likewise.
5264 (disable_thread_event_reporting): Likewise.
5265 (remove_thread_event_breakpoints): Likewise.
5266 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5267 as saved_thread.
5268 * target.h (set_desired_inferior): Renamed as...
5269 (set_desired_thread): New declaration. All uses updated.
5270 * server.c (myresume): Updated comment to reference thread instead
5271 of inferior.
5272 (handle_serial_event): Likewise.
5273 (handle_target_event): Likewise.
5274
361c8ade
GB
52752014-09-12 Tom Tromey <tromey@redhat.com>
5276 Gary Benson <gbenson@redhat.com>
5277
5278 * regcache.h: Include common-regcache.h.
5279 (regcache_read_pc): Don't declare.
5280 * regcache.c (get_thread_regcache_for_ptid): New function.
5281
bd9269f7
GB
52822014-09-11 Tom Tromey <tromey@redhat.com>
5283 Gary Benson <gbenson@redhat.com>
5284
5285 * symbol.c: New file.
5286 * Makefile.in (SFILES): Add symbol.c.
5287 (OBS): Add symbol.o.
5288
f8c1d06b
GB
52892014-09-11 Gary Benson <gbenson@redhat.com>
5290
5291 * target.c (target_stop_ptid, target_continue_ptid): New
5292 functions.
5293
721ec300
GB
52942014-09-11 Tom Tromey <tromey@redhat.com>
5295 Gary Benson <gbenson@redhat.com>
5296
5297 * target.h: Include target/target.h.
5298 * target.c (target_read_memory, target_read_uint32)
5299 (target_write_memory): New functions.
5300
c5e92cca
GB
53012014-09-11 Gary Benson <gbenson@redhat.com>
5302
5303 * server.h (debug_hw_points): Don't declare.
5304 * server.c (debug_hw_points): Don't define. Replace all uses
5305 with show_debug_regs.
5306 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5307 all uses with show_debug_regs.
5308
2e4bb98a
EBM
53092014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5310
5311 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5312 endianness into account.
5313 (ppc_supply_ptrace_register): Likewise.
5314
ac740bc7
JH
53152014-09-03 James Hogan <james.hogan@imgtec.com>
5316
5317 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5318 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5319
97ea6506
GB
53202014-09-03 Gary Benson <gbenson@redhat.com>
5321
5322 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5323 ALL_DEBUG_ADDRESS_REGISTERS.
5324
df7e5265
GB
53252014-09-02 Gary Benson <gbenson@redhat.com>
5326
5327 * i386-low.h: Renamed as...
5328 * x86-low.h: New file. All type, function and variable name
5329 prefixes changed from "i386_" to "x86_". All references updated.
5330 * i386-low.c: Renamed as...
5331 * x86-low.c: New file. All type, function and variable name
5332 prefixes changed from "i386_" to "x86_". All references updated.
5333
ed859da7
GB
53342014-09-02 Gary Benson <gbenson@redhat.com>
5335
5336 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5337 (x86_linux_new_thread): Likewise.
5338
860789c7
GB
53392014-08-29 Gary Benson <gbenson@redhat.com>
5340
5341 * server.h (setjmp.h): Do not include.
5342 (toplevel): Do not declare.
5343 (common-exceptions.h): Include.
5344 (cleanups.h): Likewise.
5345 * server.c (toplevel): Do not define.
5346 (exit_code): New static global.
5347 (detach_or_kill_for_exit_cleanup): New function.
5348 (main): New function. Original main renamed to...
5349 (captured_main): New function.
5350 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5351
ff55e1b5
GB
53522014-08-29 Gary Benson <gbenson@redhat.com>
5353
5354 * Makefile.in (SFILES): Add common/common-exceptions.c.
5355 (OBS): Add common-exceptions.o.
5356 (common-exceptions.o): New rule.
5357 * utils.c (prepare_to_throw_exception): New function.
5358
e9bcb658
GB
53592014-08-29 Gary Benson <gbenson@redhat.com>
5360
5361 * config.in: Regenerate.
5362 * configure: Likewise.
5363
e3180625
GB
53642014-08-29 Gary Benson <gbenson@redhat.com>
5365
5366 * Makefile.in (SFILES): Add common/cleanups.c.
5367 (OBS): cleanups.o.
5368 (cleanups.o): New rule.
5369
e3d6ba5d
GB
53702014-08-29 Gary Benson <gbenson@redhat.com>
5371
5372 * utils.c (internal_vwarning): New function.
5373
7096e886
GB
53742014-08-28 Gary Benson <gbenson@redhat.com>
5375
5376 * utils.h (fatal): Remove declaration.
5377 * utils.c (fatal): Remove function.
5378
14ce3192
GB
53792014-08-28 Gary Benson <gbenson@redhat.com>
5380
5381 * tracepoint.c (gdb_agent_init): Replace fatal with
5382 perror_with_name.
5383 (initialize_tracepoint): Likewise.
5384
50278d59
GB
53852014-08-28 Gary Benson <gbenson@redhat.com>
5386
5387 * remote-utils.c (remote_prepare): Replace fatal with error.
5388
aa96c426
GB
53892014-08-28 Gary Benson <gbenson@redhat.com>
5390
5391 * linux-low.c (linux_async): Replace fatal with warning.
5392 Tidy up and return.
5393 (linux_start_non_stop): Return -1 if linux_async failed.
5394
f7160e97
GB
53952014-08-28 Gary Benson <gbenson@redhat.com>
5396
5397 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5398 gdb_assert.
5399 (i386_dr_low_get_addr): Remove vague comment.
5400 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5401 gdb_assert.
5402
38e08fca
GB
54032014-08-28 Gary Benson <gbenson@redhat.com>
5404
5405 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5406 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5407 internal_error.
5408 (linux_resume_one_lwp): Likewise.
5409 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5410 gdb_assert.
5411 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5412 with internal_error.
5413 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5414 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5415 (find_register_by_name): Replace fatal with internal_error.
5416 (find_regno): Likewise.
5417 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5418 * thread-db.c (thread_db_create_event): Likewise.
5419 (thread_db_load_search): Likewise.
5420 (try_thread_db_load_1): Likewise.
5421 * tracepoint.c (get_jump_space_head): Replace fatal with
5422 internal_error.
5423 (claim_trampoline_space): Likewise.
5424 (have_fast_tracepoint_trampoline_buffer): Likewise.
5425 (cmd_qtstart): Likewise.
5426 (stop_tracing): Likewise.
5427 (fast_tracepoint_collecting): Likewise.
5428 (target_malloc): Likewise.
5429 (download_tracepoint): Likewise.
5430 (download_trace_state_variables): Replace check with gdb_assert.
5431 (upload_fast_traceframes): Replace fatal with internal_error.
5432
34abf635
GB
54332014-08-19 Tom Tromey <tromey@redhat.com>
5434 Gary Benson <gbenson@redhat.com>
5435
5436 * Makefile.in (SFILES): Add common/common-debug.c.
5437 (OBS): Add common-debug.o.
5438 (common-debug.o): New rule.
5439 * debug.h (debug_printf): Don't declare.
5440 * debug.c (debug_printf): Renamed and rewritten as...
5441 (debug_vprintf): New function.
5442
f6e94d78
GB
54432014-08-19 Gary Benson <gbenson@redhat.com>
5444
5445 * utils.h: Do not include print-utils.h.
5446
9239eeab
GB
54472014-08-19 Tom Tromey <tromey@redhat.com>
5448 Gary Benson <gbenson@redhat.com>
5449
5450 * server.h: Add static assertion.
5451 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5452
ef87c8bb
GB
54532014-08-19 Tom Tromey <tromey@redhat.com>
5454 Gary Benson <gbenson@redhat.com>
5455
5456 * Makefile.in (SFILES): Add common/errors.c.
5457 (OBS): Add errors.o.
5458 (IPA_OBS): Add errors-ipa.o.
5459 (errors.o): New rule.
5460 (errors-ipa.o): Likewise.
5461 * utils.h (perror_with_name, error, warning): Don't declare.
5462 * utils.c (warning): Renamed and rewritten as...
5463 (vwarning): New function.
5464 (error): Renamed and rewritten as...
5465 (verror): New function.
5466 (internal_error): Renamed and rewritten as...
5467 (internal_verror): New function.
5468
bb974a24
GB
54692014-08-07 Gary Benson <gbenson@redhat.com>
5470
5471 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5472 * configure: Regenerate.
5473 * config.in: Likewise.
5474 * server.h: Do not include errno.h.
5475 * event-loop.c: Likewise.
5476 * hostio-errno.c: Likewise.
5477 * linux-low.c: Likewise.
5478 * remote-utils.c: Likewise.
5479 * spu-low.c: Likewise.
5480 * utils.c: Likewise.
5481 * gdbreplay.c: Unconditionally include errno.h.
5482
6d3d12eb
GB
54832014-08-07 Gary Benson <gbenson@redhat.com>
5484
5485 * server.h: Do not include string.h.
5486 * event-loop.c: Likewise.
5487 * linux-low.c: Likewise.
5488 * regcache.c: Likewise.
5489 * remote-utils.c: Likewise.
5490 * spu-low.c: Likewise.
5491 * utils.c: Likewise.
5492
dccbb609
GB
54932014-08-07 Gary Benson <gbenson@redhat.com>
5494
5495 * server.h: Do not include gdb_assert.h.
5496
e76df0d0
GB
54972014-08-07 Gary Benson <gbenson@redhat.com>
5498
5499 * server.h: Do not include common-utils.h.
5500
4cb9c816
GB
55012014-08-07 Gary Benson <gbenson@redhat.com>
5502
5503 * server.h: Do not include ptid.h.
5504 * notif.h: Likewise.
5505
3995eeee
GB
55062014-08-07 Gary Benson <gbenson@redhat.com>
5507
5508 * server.h: Do not include gdb_locale.h.
5509
cb9f1a9b
GB
55102014-08-07 Gary Benson <gbenson@redhat.com>
5511
5512 * server.h: Do not include gdb/signals.h.
5513 * win32-low.c: Likewise.
5514
a5fceff8
GB
55152014-08-07 Gary Benson <gbenson@redhat.com>
5516
5517 * server.h: Do not include pathmax.h.
5518
b9391142
GB
55192014-08-07 Gary Benson <gbenson@redhat.com>
5520
5521 * server.h: Do not include libiberty.h.
5522 * linux-bfin-low.c: Likewise.
5523
0e443c87
GB
55242014-08-07 Gary Benson <gbenson@redhat.com>
5525
5526 * server.h: Do not include ansidecl.h.
5527
8ebb3f56
GB
55282014-08-07 Gary Benson <gbenson@redhat.com>
5529
5530 * linux-x86-low.c: Do not include stddef.h.
5531 * lynx-ppc-low.c: Likewise.
5532 * tracepoint.c: Likewise.
5533
8980bdf6
GB
55342014-08-07 Gary Benson <gbenson@redhat.com>
5535
5536 * server.h: Do not include stdarg.h.
5537 * nto-low.c: Likewise.
5538
d7096f71
GB
55392014-08-07 Gary Benson <gbenson@redhat.com>
5540
5541 * server.h: Do not include stdlib.h.
5542 * inferiors.c: Likewise.
5543 * linux-low.c: Likewise.
5544 * regcache.c: Likewise.
5545 * spu-low.c: Likewise.
5546 * tracepoint.c: Likewise.
5547 * utils.c: Likewise.
5548
d02f550d
GB
55492014-08-07 Gary Benson <gbenson@redhat.com>
5550
5551 * server.h: Do not include stdio.h.
5552 * linux-low.c: Likewise.
5553 * remote-utils.c: Likewise.
5554 * spu-low.c: Likewise.
5555 * utils.c: Likewise.
5556 * wincecompat.c: Likewise.
5557
87f6c4e3
GB
55582014-08-06 Gary Benson <gbenson@redhat.com>
5559
5560 * regcache.c (init_register_cache): Move conditionals inside if.
5561
7089dca4
GB
55622014-08-06 Gary Benson <gbenson@redhat.com>
5563
5564 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5565
462f517e
GB
55662014-07-31 Gary Benson <gbenson@redhat.com>
5567
5568 * ax.h: Do not include server.h.
5569 * gdbthread.h: Likewise.
5570 * lynx-low.h: Likewise.
5571 * notif.h: Likewise.
5572
976411d6
GB
55732014-07-30 Gary Benson <gbenson@redhat.com>
5574
5575 * server.h: Include common-defs.h.
5576 Do not include config.h or build-gnulib-gdbserver/config.h.
5577
d41f6d8e
GB
55782014-07-30 Gary Benson <gbenson@redhat.com>
5579
5580 * hostio-errno.c: Move server.h to top of includes list.
5581 * inferiors.c: Likewise.
5582 * linux-x86-low.c: Likewise.
5583 * notif.c: Include server.h.
5584
314c6a35
TT
55852014-07-24 Tom Tromey <tromey@redhat.com>
5586 Gary Benson <gbenson@redhat.com>
5587
5588 * server.h (CORE_ADDR): Now unsigned.
5589
69ff6be5
PA
55902014-07-16 Pedro Alves <palves@redhat.com>
5591
5592 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5593
ce9e3fe7
PA
55942014-07-15 Pedro Alves <palves@redhat.com>
5595
5596 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5597 copy.
5598
e76126e8
PA
55992014-07-11 Pedro Alves <palves@redhat.com>
5600
5601 * linux-low.c (kill_wait_lwp): New function, based on
5602 kill_one_lwp_callback, but use my_waitpid directly.
5603 (kill_one_lwp_callback, linux_kill): Use it.
5604
8e9db26e
PA
56052014-06-23 Pedro Alves <palves@redhat.com>
5606
5607 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5608 before setting DR0..DR3.
5609
698b3e08
GB
56102014-06-20 Gary Benson <gbenson@redhat.com>
5611
5612 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5613 * configure: Regenerated.
5614 * config.in: Likewise.
5615
125f8a3d
GB
56162014-06-20 Gary Benson <gbenson@redhat.com>
5617
5618 * Makefile.in (SFILES): Update locations for files moved
5619 from common to nat.
5620 (object file files): Reordered.
5621
42995dbd
GB
56222014-06-20 Gary Benson <gbenson@redhat.com>
5623
5624 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5625 (i386_dr_low_set_addr): Likewise.
5626 (i386_dr_low_get_addr): Likewise.
5627 (i386_dr_low_can_set_control): Likewise.
5628 (i386_dr_low_set_control): Likewise.
5629 (i386_dr_low_get_control): Likewise.
5630 (i386_dr_low_get_status): Likewise.
5631 (i386_get_debug_register_length): Likewise.
5632 * linux-x86-low.c (i386_dr_low_set_addr):
5633 Changed signature. Made static.
5634 (i386_dr_low_get_addr): Likewise.
5635 (i386_dr_low_set_control): Likewise.
5636 (i386_dr_low_get_control): Likewise.
5637 (i386_dr_low_get_status): Likewise.
5638 (i386_dr_low): New global variable.
5639 * win32-i386-low.c (i386_dr_low_set_addr):
5640 Changed signature. Made static.
5641 (i386_dr_low_get_addr): Likewise.
5642 (i386_dr_low_set_control): Likewise.
5643 (i386_dr_low_get_control): Likewise.
5644 (i386_dr_low_get_status): Likewise.
5645 (i386_dr_low): New global variable.
5646
e1d2394b
MS
56472014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5648
5649 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5650 * Makefile.in (AR, AR_FLAGS): Define.
5651 * configure: Regenerate.
5652
3a8ee006
GB
56532014-06-19 Gary Benson <gbenson@redhat.com>
5654
5655 * Makefile.in (i386-dregs.o): New rule.
5656 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5657 * i386-low.c (target.h): Remove include.
5658 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5659 (DR_CONTROL_SHIFT): Likewise.
5660 (DR_CONTROL_SIZE): Likewise.
5661 (DR_RW_EXECUTE): Likewise.
5662 (DR_RW_WRITE): Likewise.
5663 (DR_RW_READ): Likewise.
5664 (DR_RW_IORW): Likewise.
5665 (DR_LEN_1): Likewise.
5666 (DR_LEN_2): Likewise.
5667 (DR_LEN_4): Likewise.
5668 (DR_LEN_8): Likewise.
5669 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5670 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5671 (DR_ENABLE_SIZE): Likewise.
5672 (DR_LOCAL_SLOWDOWN): Likewise.
5673 (DR_GLOBAL_SLOWDOWN): Likewise.
5674 (DR_CONTROL_RESERVED): Likewise.
5675 (I386_DR_CONTROL_MASK): Likewise.
5676 (I386_DR_VACANT): Likewise.
5677 (I386_DR_LOCAL_ENABLE): Likewise.
5678 (I386_DR_GLOBAL_ENABLE): Likewise.
5679 (I386_DR_DISABLE): Likewise.
5680 (I386_DR_SET_RW_LEN): Likewise.
5681 (I386_DR_GET_RW_LEN): Likewise.
5682 (I386_DR_WATCH_HIT): Likewise.
5683 (i386_wp_op_t): Likewise.
5684 (i386_show_dr): Likewise.
5685 (i386_length_and_rw_bits): Likewise.
5686 (i386_insert_aligned_watchpoint): Likewise.
5687 (i386_remove_aligned_watchpoint): Likewise.
5688 (i386_handle_nonaligned_watchpoint): Likewise.
5689 i386_update_inferior_debug_regs(): Likewise.
5690 (i386_dr_insert_watchpoint): Likewise.
5691 (i386_dr_remove_watchpoint): Likewise.
5692 (i386_dr_region_ok_for_watchpoint): Likewise.
5693 (i386_dr_stopped_data_address): Likewise.
5694 (i386_dr_stopped_by_watchpoint): Likewise.
5695
8f26655c
GB
56962014-06-19 Gary Benson <gbenson@redhat.com>
5697
5698 * i386-low.c (i386_dr_show): Renamed to
5699 i386_show_dr and made static. All uses updated.
5700 (i386_dr_length_and_rw_bits): Renamed to
5701 i386_length_and_rw_bits and made static.
5702 All uses updated.
5703 (i386_dr_insert_aligned_watchpoint): Renamed to
5704 i386_insert_aligned_watchpoint and made static.
5705 All uses updated.
5706 (i386_dr_remove_aligned_watchpoint): Renamed to
5707 i386_remove_aligned_watchpoint and made static.
5708 All uses updated.
5709 (i386_dr_update_inferior_debug_regs): Renamed to
5710 i386_update_inferior_debug_regs and made static.
5711 All uses updated.
5712
b9228891
GB
57132014-06-18 Gary Benson <gbenson@redhat.com>
5714
5171def3
GB
5715 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5716 (i386_dr_low_can_set_control): Likewise.
5717 (i386_get_debug_register_length): Likewise.
5718 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5719 (i386_dr_low_can_set_control): Likewise.
5720 (i386_get_debug_register_length): Likewise.
5721
57222014-06-17 Gary Benson <gbenson@redhat.com>
5723
b9228891
GB
5724 * i386-low.h (i386-dregs.h): New include.
5725 (DR_FIRSTADDR): Now in i386-dregs.h.
5726 (DR_LASTADDR): Likewise.
5727 (DR_NADDR): Likewise.
5728 (DR_STATUS): Likewise.
5729 (DR_CONTROL): Likewise.
5730 (i386_debug_reg_state): Likewise.
5731 (i386_dr_insert_watchpoint): Likewise.
5732 (i386_dr_remove_watchpoint): Likewise.
5733 (i386_dr_region_ok_for_watchpoint): Likewise.
5734 (i386_dr_stopped_data_address): Likewise.
5735 (i386_dr_stopped_by_watchpoint): Likewise.
5736 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5737
4be83cc2
GB
57382014-06-18 Gary Benson <gbenson@redhat.com>
5739
5740 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5741 i386_dr_insert_watchpoint.
5742 (i386_low_remove_watchpoint): Renamed to
5743 i386_dr_remove_watchpoint.
5744 (i386_low_region_ok_for_watchpoint): Renamed to
5745 i386_dr_region_ok_for_watchpoint.
5746 (i386_low_stopped_data_address): Renamed to
5747 i386_dr_stopped_data_address.
5748 (i386_low_stopped_by_watchpoint): Renamed to
5749 i386_dr_stopped_by_watchpoint.
5750 * i386-low.c (i386_show_dr): Renamed to
5751 i386_dr_show and made nonstatic. All uses updated.
5752 (i386_length_and_rw_bits): Renamed to
5753 i386_dr_length_and_rw_bits and made nonstatic.
5754 All uses updated.
5755 (i386_insert_aligned_watchpoint): Renamed to
5756 i386_dr_insert_aligned_watchpoint and made nonstatic.
5757 All uses updated.
5758 (i386_remove_aligned_watchpoint): Renamed to
5759 i386_dr_remove_aligned_watchpoint and made nonstatic.
5760 All uses updated.
5761 (i386_update_inferior_debug_regs): Renamed to
5762 i386_dr_update_inferior_debug_regs and made nonstatic.
5763 All uses updated.
5764 (i386_low_insert_watchpoint): Renamed to
5765 i386_dr_insert_watchpoint. All uses updated.
5766 (i386_low_remove_watchpoint): Renamed to
5767 i386_dr_remove_watchpoint. All uses updated.
5768 (i386_low_region_ok_for_watchpoint): Renamed to
5769 i386_dr_region_ok_for_watchpoint. All uses updated.
5770 (i386_low_stopped_data_address): Renamed to
5771 i386_dr_stopped_data_address. All uses updated.
5772 (i386_low_stopped_by_watchpoint): Renamed to
5773 i386_dr_stopped_by_watchpoint. All uses updated.
5774
131aa0d4
GB
57752014-06-18 Gary Benson <gbenson@redhat.com>
5776
5777 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5778 (i386_dr_low_can_set_control): Likewise.
5779 (i386_insert_aligned_watchpoint): New check.
5780
d9305f7f
GB
57812014-06-18 Gary Benson <gbenson@redhat.com>
5782
5783 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5784 Renamed to state.
5785
e927c9fc
GB
57862014-06-18 Gary Benson <gbenson@redhat.com>
5787
5788 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5789 instead of fatal and error.
5790 (i386_handle_nonaligned_watchpoint): Likewise.
5791
1b6d4134
GB
57922014-06-18 Gary Benson <gbenson@redhat.com>
5793
5794 * i386-low.c (i386_get_debug_register_length): New macro.
5795 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5796 (i386_show_dr): Use debug_printf instead of fprintf. Use
5797 phex to format values.
5798
6e62758f
GB
57992014-06-18 Gary Benson <gbenson@redhat.com>
5800
5801 * i386-low.h: Comment changes.
5802 * i386-low.c: Likewise.
5803
fc6e2f03
GB
58042014-06-18 Gary Benson <gbenson@redhat.com>
5805
5806 * i386-low.c: Whitespace changes.
5807
f9d1eeed
TT
58082014-06-12 Tom Tromey <tromey@redhat.com>
5809
5810 * utils.c (freeargv): Remove.
5811
0b04e523
TT
58122014-06-12 Tom Tromey <tromey@redhat.com>
5813
5814 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5815 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5816 (parse_debug_format_options): Likewise.
5817 (gdbserver_usage): Likewise.
5818 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5819 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5820 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5821 against libiberty.
5822 ($(LIBGNU)): Depend on libiberty.
5823 (all-lib): Recurse into all subdirs.
5824 (install-only): Invoke "install" target in subdirs.
5825 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5826 targets.
5827 * configure: Rebuild.
5828 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5829 for vasprintf, vsnprintf, or gettimeofday.
5830 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5831 srv_tgtobj.
5832
270c9937
JB
58332014-06-05 Joel Brobecker <brobecker@adacore.com>
5834
5835 * development.sh: Delete.
5836 * Makefile.in (config.status): Adjust dependency on development.sh.
5837 * configure.ac: Adjust development.sh source call.
5838 * configure: Regenerate.
5839
0a261ed8
PA
58402014-06-02 Pedro Alves <palves@redhat.com>
5841
5842 * ax.c (gdb_free_agent_expr): New function.
5843 * ax.h (gdb_free_agent_expr): New declaration.
5844 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5845 list.
5846 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5847 static.
5848 (clear_breakpoint_conditions_and_commands): New function.
5849 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5850 (clear_breakpoint_conditions_and_commands): New declaration.
5851
e9dae05e
RR
58522014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5853
5854 * linux-aarch64-low.c (asm/ptrace.h): Include.
5855
5876f503
JK
58562014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5857
5858 Fix TLS access for -static -pthread.
5859 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5860 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5861 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5862
802e8e6d
PA
58632014-05-20 Pedro Alves <palves@redhat.com>
5864
5865 * linux-aarch64-low.c (aarch64_insert_point)
5866 (aarch64_remove_point): No longer check whether the type is
5867 supported here. Adjust to new interface.
5868 (the_low_target): Install aarch64_supports_z_point_type as
5869 supports_z_point_type method.
5870 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5871 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5872 instead of a Z packet char. Adjust.
5873 (arm_supports_z_point_type): New function.
5874 (arm_insert_point, arm_remove_point): Adjust to new interface.
5875 (the_low_target): Install arm_supports_z_point_type.
5876 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5877 (cris_insert_point, cris_remove_point): Adjust to new interface.
5878 Don't check whether the type is supported here.
5879 (the_low_target): Install cris_supports_z_point_type.
5880 * linux-low.c (linux_supports_z_point_type): New function.
5881 (linux_insert_point, linux_remove_point): Adjust to new interface.
5882 * linux-low.h (struct linux_target_ops) <insert_point,
5883 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5884 raw_breakpoint pointer parameter.
5885 <supports_z_point_type>: New method.
5886 * linux-mips-low.c (mips_supports_z_point_type): New function.
5887 (mips_insert_point, mips_remove_point): Adjust to new interface.
5888 Use mips_supports_z_point_type.
5889 (the_low_target): Install mips_supports_z_point_type.
5890 * linux-ppc-low.c (the_low_target): Install NULL as
5891 supports_z_point_type method.
5892 * linux-s390-low.c (the_low_target): Install NULL as
5893 supports_z_point_type method.
5894 * linux-sparc-low.c (the_low_target): Install NULL as
5895 supports_z_point_type method.
5896 * linux-x86-low.c (x86_supports_z_point_type): New function.
5897 (x86_insert_point): Adjust to new insert_point interface. Use
5898 insert_memory_breakpoint. Adjust to new
5899 i386_low_insert_watchpoint interface.
5900 (x86_remove_point): Adjust to remove_point interface. Use
5901 remove_memory_breakpoint. Adjust to new
5902 i386_low_remove_watchpoint interface.
5903 (the_low_target): Install x86_supports_z_point_type.
5904 * lynx-low.c (lynx_target_ops): Install NULL as
5905 supports_z_point_type callback.
5906 * nto-low.c (nto_supports_z_point_type): New.
5907 (nto_insert_point, nto_remove_point): Adjust to new interface.
5908 (nto_target_ops): Install nto_supports_z_point_type.
5909 * mem-break.c: Adjust intro comment.
5910 (struct raw_breakpoint) <raw_type, size>: New fields.
5911 <inserted>: Update comment.
5912 <shlib_disabled>: Delete field.
5913 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5914 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5915 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5916 (raw_bkpt_type_to_target_hw_bp_type): New function.
5917 (find_enabled_raw_code_breakpoint_at): New function.
5918 (find_raw_breakpoint_at): New type and size parameters. Use them.
5919 (insert_memory_breakpoint): New function, based off
5920 set_raw_breakpoint_at.
5921 (remove_memory_breakpoint): New function.
5922 (set_raw_breakpoint_at): Reimplement.
5923 (set_breakpoint): New, based on set_breakpoint_at.
5924 (set_breakpoint_at): Reimplement.
5925 (delete_raw_breakpoint): Go through the_target->remove_point
5926 instead of assuming memory breakpoints.
5927 (find_gdb_breakpoint_at): Delete.
5928 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5929 (find_gdb_breakpoint): New function.
5930 (set_gdb_breakpoint_at): Delete.
5931 (z_type_supported): New function.
5932 (set_gdb_breakpoint_1): New function, loosely based off
5933 set_gdb_breakpoint_at.
5934 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5935 (delete_gdb_breakpoint_at): Delete.
5936 (delete_gdb_breakpoint_1): New function, loosely based off
5937 delete_gdb_breakpoint_at.
5938 (delete_gdb_breakpoint): New function.
5939 (clear_gdb_breakpoint_conditions): Rename to ...
5940 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5941 breakpoint.
5942 (add_condition_to_breakpoint): Make static.
5943 (add_breakpoint_condition): Take a struct breakpoint pointer
5944 instead of an address. Adjust.
5945 (gdb_condition_true_at_breakpoint): Rename to ...
5946 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5947 z_type parameter.
5948 (gdb_condition_true_at_breakpoint): Reimplement.
5949 (add_breakpoint_commands): Take a struct breakpoint pointer
5950 instead of an address. Adjust.
5951 (gdb_no_commands_at_breakpoint): Rename to ...
5952 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5953 parameter. Return true if no breakpoint was found. Change debug
5954 output.
5955 (gdb_no_commands_at_breakpoint): Reimplement.
5956 (run_breakpoint_commands): Rename to ...
5957 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5958 and change return type to boolean.
5959 (run_breakpoint_commands): New function.
5960 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5961 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5962 breakpoint. Go through the_target->remove_point instead of
5963 assuming memory breakpoint.
5964 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5965 software and hardware breakpoints.
5966 (reinsert_raw_breakpoint): Go through the_target->insert_point
5967 instead of assuming memory breakpoint.
5968 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5969 software and hardware breakpoints.
5970 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5971 Check both software and hardware breakpoints.
5972 (validate_inserted_breakpoint): Assert the breakpoint is a
5973 software breakpoint. Set the inserted flag to -1 instead of
5974 setting shlib_disabled.
5975 (delete_disabled_breakpoints): Adjust.
5976 (validate_breakpoints): Only validate software breakpoints.
5977 Adjust to inserted flag change.
5978 (check_mem_read, check_mem_write): Skip breakpoint types other
5979 than software breakpoints. Adjust to inserted flag change.
5980 * mem-break.h (enum raw_bkpt_type): New enum.
5981 (raw_breakpoint, struct process_info): Forward declare.
5982 (Z_packet_to_target_hw_bp_type): Delete declaration.
5983 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5984 (set_gdb_breakpoint, delete_gdb_breakpoint)
5985 (clear_breakpoint_conditions): New declarations.
5986 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5987 (breakpoint_inserted_here): Update comment.
5988 (add_breakpoint_condition, add_breakpoint_commands): Replace
5989 address parameter with a breakpoint pointer parameter.
5990 (gdb_breakpoint_here): Update comment.
5991 (delete_gdb_breakpoint_at): Delete.
5992 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5993 * server.c (process_point_options): Take a struct breakpoint
5994 pointer instead of an address. Adjust.
5995 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5996 delete_gdb_breakpoint.
5997 * spu-low.c (spu_target_ops): Install NULL as
5998 supports_z_point_type method.
5999 * target.h: Include mem-break.h.
6000 (struct target_ops) <prepare_to_access_memory>: Update comment.
6001 <supports_z_point_type>: New field.
6002 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6003 instead of a char. Also take a raw breakpoint pointer.
6004 * win32-arm-low.c (the_low_target): Install NULL as
6005 supports_z_point_type.
6006 * win32-i386-low.c (i386_supports_z_point_type): New function.
6007 (i386_insert_point, i386_remove_point): Adjust to new interface.
6008 (the_low_target): Install i386_supports_z_point_type.
6009 * win32-low.c (win32_supports_z_point_type): New function.
6010 (win32_insert_point, win32_remove_point): Adjust to new interface.
6011 (win32_target_ops): Install win32_supports_z_point_type.
6012 * win32-low.h (struct win32_target_ops):
6013 <supports_z_point_type>: New method.
6014 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6015 instead of a char. Also take a raw breakpoint pointer.
6016
932539e3
PA
60172014-05-20 Pedro Alves <palves@redhat.com>
6018
6019 * mem-break.h: Include break-common.h.
6020 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6021 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6022 (Z_packet_to_target_hw_bp_type): New declaration.
6023 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6024 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6025 (Z_PACKET_ACCESS_WP): Delete macros.
6026 (Z_packet_to_hw_type): Delete function.
6027 * i386-low.h: Don't include break-common.h here.
6028 (Z_packet_to_hw_type): Delete declaration.
6029 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6030 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6031 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6032 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6033 * linux-aarch64-low.c: Don't include break-common.h here.
6034 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6035 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6036 (Z_packet_to_target_hw_bp_type): Delete function.
6037 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6038 function.
6039 (mips_insert_point, mips_remove_point): Use
6040 Z_packet_to_target_hw_bp_type.
6041
4ff0d3d8
PA
60422014-05-20 Pedro Alves <palves@redhat.com>
6043
6044 * linux-aarch64-low.c: Include break-common.h.
6045 (enum target_point_type): Delete.
6046 (Z_packet_to_point_type): Rename to ...
6047 (Z_packet_to_target_hw_bp_type): ... this, and return a
6048 target_hw_bp_type instead.
6049 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6050 instead of an enum target_point_type.
6051 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6052 breakpoint type.
6053 (aarch64_dr_state_insert_one_point)
6054 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6055 (aarch64_handle_aligned_watchpoint)
6056 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6057 Take an enum target_hw_bp_type instead of an enum
6058 target_point_type.
6059 (aarch64_supports_z_point_type): New function.
6060 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6061 use Z_packet_to_target_hw_bp_type.
6062
786dc519
JB
60632014-05-20 Joel Brobecker <brobecker@adacore.com>
6064
6065 * configure.ac: Only use -Werror by default when DEVELOPMENT
6066 is true.
6067 * configure: Regenerate.
6068
9e0aa64f
JK
60692014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6070
6071 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6072 * linux-x86-low.c (X86_64_USER_REGS): New.
6073 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6074
2b577b92
YQ
60752014-04-28 Yao Qi <yao@codesourcery.com>
6076
6077 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6078 name.
6079
94611da2
PA
60802014-04-25 Pedro Alves <palves@redhat.com>
6081
6082 PR server/16255
6083 * linux-low.c (linux_attach_fail_reason_string): New function.
6084 (linux_attach_lwp): Delete.
6085 (linux_attach_lwp_1): Rename to ...
6086 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6087 argument. Remove "initial" parameter. Return int instead of
6088 void. Don't error or warn here.
6089 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6090 failure to attach to the tgid. Call warning when failing to
6091 attach to an lwp.
6092 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6093 argument. Remove "initial" parameter. Return int instead of
6094 void. Don't error or warn here.
6095 (linux_attach_fail_reason_string): New declaration.
6096 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6097 interface change. Use linux_attach_fail_reason_string.
6098
01f9f808
MS
60992014-04-24 Michael Sturm <michael.sturm@mintel.com>
6100 Walfred Tedeschi <walfred.tedeschi@intel.com>
6101
6102 * Makefile.in: Added rules to handle new files
6103 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6104 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6105 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6106 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6107 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6108 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6109 x32-avx512-linux.o.
6110 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6111 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6112 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6113 i386/x32-avx512.xml.
6114 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6115 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6116 i386/x32-avx512-linux.xml.
6117 * i387-fp.c (num_avx512_k_registers): New constant for number
6118 of K registers.
6119 (num_avx512_zmmh_low_registers): New constant for number of
6120 lower ZMM registers (0-15).
6121 (num_avx512_zmmh_high_registers): New constant for number of
6122 higher ZMM registers (16-31).
6123 (num_avx512_ymmh_registers): New contant for number of higher
6124 YMM registers (ymm16-31 added by avx521 on x86_64).
6125 (num_avx512_xmm_registers): New constant for number of higher
6126 XMM registers (xmm16-31 added by AVX512 on x86_64).
6127 (struct i387_xsave): Add space for AVX512 registers.
6128 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6129 Add code to handle AVX512 registers.
6130 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6131 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6132 prototypei from generated file.
6133 (tdesc_amd64_avx512_linux): Likewise.
6134 (init_registers_x32_avx512_linux): Likewise.
6135 (tdesc_x32_avx512_linux): Likewise.
6136 (init_registers_i386_avx512_linux): Likewise.
6137 (tdesc_i386_avx512_linux): Likewise.
6138 (x86_64_regmap): Add AVX512 registers.
6139 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6140 mask.
6141 (initialize_low_arch): Add code to initialize AVX512 registers.
6142
51aa91f9
PA
61432014-04-23 Pedro Alves <palves@redhat.com>
6144
6145 * mem-break.c (find_gdb_breakpoint_at): Make static.
6146 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6147
a4165e94
PA
61482014-04-23 Pedro Alves <palves@redhat.com>
6149
6150 * i386-low.c: Don't include break-common.h here.
6151 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6152 prototype to take target_hw_bp_type as argument instead of a Z
6153 packet char.
6154 * i386-low.h: Include break-common.h here.
6155 (Z_packet_to_hw_type): Declare.
6156 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6157 prototypes.
6158 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6159 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6160 (x86_remove_point): Convert the packet number to a
6161 target_hw_bp_type before calling i386_low_remove_watchpoint.
6162 * win32-i386-low.c (i386_insert_point): Convert the packet number
6163 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6164 (i386_remove_point): Convert the packet number to a
6165 target_hw_bp_type before calling i386_low_remove_watchpoint.
6166
b8acf843
PA
61672014-04-23 Pedro Alves <palves@redhat.com>
6168
6169 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6170
d708bcd1
PA
61712014-04-10 Pedro Alves <palves@redhat.com>
6172
6173 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6174 Check if the condition or command is NULL before checking if the
6175 breakpoint is known. On success, return true.
6176 * mem-break.h (add_breakpoint_condition): Document return.
6177 (add_breakpoint_commands): Add describing comment.
6178 * server.c (skip_to_semicolon): New function.
6179 (process_point_options): Use it.
6180
2eec7d5b
PA
61812014-04-09 Pedro Alves <palves@redhat.com>
6182
6183 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6184 to lwpid_of.
6185
fa96cb38
PA
61862014-02-27 Pedro Alves <palves@redhat.com>
6187
6188 PR 12702
6189 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6190 macros.
6191 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6192 output.
6193 (last_thread_of_process_p): Take a PID argument instead of a
6194 thread pointer.
6195 (linux_wait_for_lwp): Delete.
6196 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6197 functions.
6198 (linux_low_filter_event): New function, party factored out from
6199 linux_wait_for_event.
6200 (linux_wait_for_event): Rename to ...
6201 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6202 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6203 sigsuspend. Check for zombie leaders.
6204 (linux_wait_for_event): Reimplement as wrapper around
6205 linux_wait_for_event_filtered.
6206 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6207 a normal or signal exit is seen, it's the whole process exiting.
6208 (wait_for_sigstop): No longer a for_each_inferior callback.
6209 Rewrite on top of linux_wait_for_event_filtered.
6210 (stop_all_lwps): Call wait_for_sigstop directly.
6211 * server.c (resume, handle_target_event): Handle
6212 TARGET_WAITKIND_NO_RESUMED.
6213
d763de10
JB
62142014-02-26 Joel Brobecker <brobecker@adacore.com>
6215
6216 * win32-low.c (psapi_get_dll_name,
6217 * win32_CreateToolhelp32Snapshot): Delete.
6218 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6219 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6220 Delete.
6221 (handle_load_dll): Add function description.
6222 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6223
850a0f76
JB
62242014-02-26 Joel Brobecker <brobecker@adacore.com>
6225
6226 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6227 Add comment.
6228 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6229 base address when calling win32_add_one_solib.
6230 (handle_load_dll): Delete local variable load_addr.
6231 Remove 0x1000 offset applied to DLL base address when calling
6232 win32_add_one_solib.
6233 (handle_unload_dll): Add comment.
6234
f25b3fc3
JB
62352014-02-26 Joel Brobecker <brobecker@adacore.com>
6236
6237 * win32-low.c (win32_add_all_dlls): Renames
6238 win32_ensure_ntdll_loaded. Rewrite function documentation.
6239 Adjust implementation to always load all DLLs.
6240 Add 0x1000 offset to DLL base address when calling
6241 win32_add_one_solib.
6242 (child_initialization_done): New static global.
6243 (do_initial_child_stuff): Set child_initialization_done to
6244 zero during child initialization, and 1 after. Replace call
6245 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6246 Add comment.
6247 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6248 (handle_unload_dll): Add function documentation.
6249 (get_child_debug_event): Ignore load and unload DLL events
6250 during child initialization.
6251
d86d4aaf
DE
62522014-02-20 Doug Evans <dje@google.com>
6253
3bc32da3 6254 Remove global all_lwps.
d86d4aaf
DE
6255 * inferiors.h (ptid_of): Move here from linux-low.h.
6256 (pid_of, lwpid_of): Ditto.
6257 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6258 parameter is a struct thread_info * now.
6259 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6260 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6261 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6262 directly.
6263 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6264 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6265 * linux-arm-low.c (update_registers_callback): Update, "entry"
6266 parameter is a struct thread_info * now.
6267 Fetch lwpid from current_inferior directly.
6268 (arm_insert_point): Pass &all_threads to find_inferior instead of
6269 &all_lwps.
6270 (arm_remove_point): Ditto.
6271 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6272 (arm_prepare_to_resume): Fetch pid from thread.
6273 (arm_read_description): Fetch lwpid from current_inferior directly.
6274 * linux-low.c (all_lwps): Delete.
6275 (delete_lwp): Delete call to remove_inferior.
6276 (handle_extended_wait): Fetch lwpid from thread.
6277 (add_lwp): Don't set lwp->entry.id. Remove call to
6278 add_inferior_to_list.
6279 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6280 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6281 (kill_one_lwp_callback): Ditto.
6282 (linux_kill): Don't dereference NULL pointer.
6283 Fetch ptid,lwpid from thread.
6284 (get_detach_signal): Fetch ptid from thread.
6285 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6286 Simplify call to regcache_invalidate_thread.
6287 (delete_lwp_callback): Update, "entry" parameter is a
6288 struct thread_info * now. Fetch pid from thread.
6289 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6290 (status_pending_p_callback): Update, "entry" parameter is a
6291 struct thread_info * now. Fetch ptid from thread.
6292 (find_lwp_pid): Update, "entry" parameter is a
6293 struct thread_info * now.
6294 (linux_wait_for_lwp): Fetch pid from thread.
6295 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6296 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6297 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6298 (dequeue_one_deferred_signal): Ditto.
6299 (cancel_breakpoint): Fetch ptid from current_inferior.
6300 (linux_wait_for_event): Pass &all_threads to find_inferior,
6301 not &all_lwps. Fetch ptid, lwpid from thread.
6302 (count_events_callback): Update, "entry" parameter is a
6303 struct thread_info * now.
6304 (select_singlestep_lwp_callback): Ditto.
6305 (select_event_lwp_callback): Ditto.
6306 (cancel_breakpoints_callback): Ditto.
6307 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6308 not &all_lwps.
6309 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6310 (unsuspend_one_lwp): Update, "entry" parameter is a
6311 struct thread_info * now.
6312 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6313 not &all_lwps.
6314 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6315 Fetch lwpid from thread, not lwp.
6316 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6317 Pass &all_threads to find_inferior, not &all_lwps.
6318 (send_sigstop): Fetch lwpid from thread, not lwp.
6319 (send_sigstop_callback): Update, "entry" parameter is a
6320 struct thread_info * now.
6321 (suspend_and_send_sigstop_callback): Ditto.
6322 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6323 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6324 struct thread_info * now.
6325 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6326 from thread, lwp.
6327 (lwp_running): Update, "entry" parameter is a
6328 struct thread_info * now.
6329 (stop_all_lwps): Fetch ptid from thread.
6330 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6331 (linux_resume_one_lwp): Fetch lwpid from thread.
6332 (linux_set_resume_request): Update, "entry" parameter is a
6333 struct thread_info * now. Fetch pid, lwpid from thread.
6334 (resume_status_pending_p): Update, "entry" parameter is a
6335 struct thread_info * now.
6336 (need_step_over_p): Ditto. Fetch lwpid from thread.
6337 (start_step_over): Fetch lwpid from thread.
6338 (linux_resume_one_thread): Update, "entry" parameter is a
6339 struct thread_info * now. Fetch lwpid from thread.
6340 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6341 (proceed_one_lwp): Update, "entry" parameter is a
6342 struct thread_info * now. Fetch lwpid from thread.
6343 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6344 struct thread_info * now.
6345 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6346 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6347 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6348 directly.
6349 (regsets_store_inferior_registers): Ditto.
6350 (fetch_register, store_register): Ditto.
6351 (linux_read_memory, linux_write_memory): Ditto.
6352 (linux_request_interrupt): Ditto.
6353 (linux_read_auxv): Ditto.
6354 (linux_xfer_siginfo): Ditto.
6355 (linux_qxfer_spu): Ditto.
6356 (linux_qxfer_libraries_svr4): Ditto.
6357 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6358 moved to inferiors.h.
6359 (get_lwp): Delete.
6360 (get_thread_lwp): Update.
6361 (struct lwp_info): Delete member "entry". Simplify comment for
6362 member "thread".
6363 (all_lwps): Delete.
6364 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6365 current_inferior directly.
6366 (update_watch_registers_callback): Update, "entry" parameter is a
6367 struct thread_info * now. Fetch pid from thread.
6368 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6369 (mips_insert_point): Fetch lwpid from current_inferior.
6370 Pass &all_threads to find_inferior, not &all_lwps.
6371 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6372 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6373 directly.
6374 (mips_stopped_data_address): Ditto.
6375 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6376 directly.
6377 * linux-tile-low.c (tile_arch_setup): Ditto.
6378 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6379 (update_debug_registers_callback): Update, "entry" parameter is a
6380 struct thread_info * now. Fetch pid from thread.
6381 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6382 Pass &all_threads to find_inferior, not &all_lwps.
6383 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6384 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6385 Pass &all_threads to find_inferior, not &all_lwps.
6386 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6387 (i386_dr_low_get_status): Ditto.
6388 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6389 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6390 (x86_linux_read_description): Ditto.
6391 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6392
3b8361aa
DE
63932014-02-20 Doug Evans <dje@google.com>
6394
6395 * inferiors.c (get_first_inferior): Fix buglet.
6396
f7667f0d
DE
63972014-02-19 Doug Evans <dje@google.com>
6398
6399 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6400 * inferiors.c (add_thread): Change result type to struct thread_info *.
6401 All callers updated.
6402 (add_lwp): Call add_thread here instead of in callers.
6403 All callers updated.
6404 * linux-low.h (get_lwp_thread): Rewrite.
6405 (struct lwp_info): New member "thread".
6406
b3312d80
DE
64072014-02-19 Doug Evans <dje@google.com>
6408
6409 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6410 All callers updated.
6411
ecc6f45c
DE
64122014-02-19 Doug Evans <dje@google.com>
6413
6414 * inferiors.c (add_thread): Fix whitespace.
6415
649ebbca
DE
64162014-02-19 Doug Evans <dje@google.com>
6417
6418 * dll.c (clear_dlls): Replace accessing list implemention details
6419 with API function.
6420 * gdbthread.h (get_first_thread): Declare.
6421 * inferiors.c (for_each_inferior_with_data): New function.
6422 (get_first_thread): New function.
6423 (find_thread_ptid): Simplify.
6424 (get_first_inferior): New function.
6425 (clear_list): Delete.
6426 (one_inferior_p): New function.
6427 (clear_inferior_list): New function.
6428 (clear_inferiors): Update.
6429 * inferiors.h (for_each_inferior_with_data): Declare.
6430 (clear_inferior_list): Declare.
6431 (one_inferior_p): Declare.
6432 (get_first_inferior): Declare.
6433 * linux-low.c (linux_wait_for_event): Replace accessing list
6434 implemention details with API function.
6435 * server.c (target_running): Ditto.
6436 (accumulate_file_name_length): New function.
6437 (emit_dll_description): New function.
6438 (handle_qxfer_libraries): Replace accessing list implemention
6439 details with API function.
6440 (handle_qxfer_threads_worker): New function.
6441 (handle_qxfer_threads_proper): Replace accessing list implemention
6442 details with API function.
6443 (handle_query): Ditto.
6444 (visit_actioned_threads_callback_ftype): New typedef.
6445 (visit_actioned_threads_data): New struct.
6446 (visit_actioned_threads): Rewrite to be find_inferior callback.
6447 (resume): Call find_inferior.
6448 (handle_status): Replace accessing list implemention
6449 details with API function.
6450 (process_serial_event): Replace accessing list implemention details
6451 with API function.
6452 * target.c (set_desired_inferior): Replace accessing list implemention
6453 details with API function.
6454 * tracepoint.c (same_process_p): New function.
6455 (gdb_agent_about_to_close): Replace accessing list implemention
6456 details with API function.
6457 * win32-low.c (child_delete_thread): Replace accessing list
6458 implemention details with API function.
6459 (match_dll_by_basename): New function.
6460 (dll_is_loaded_by_basename): New function.
6461 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6462 details call to dll_is_loaded_by_basename.
6463
80894984
DE
64642014-02-19 Doug Evans <dje@google.com>
6465
6466 * dll.h (struct dll_info): Add comment.
6467 * gdbthread.h (struct thread_info): Add comment.
6468 (current_ptid): Simplify.
6469 * inferiors.c (add_process): Update.
6470 (remove_process): Update.
6471 * inferiors.h (struct process_info): Rename member "head" to "entry".
6472 * linux-low.c (delete_lwp): Update.
6473 (add_lwp): Update.
6474 (last_thread_of_process_p): Update.
6475 (kill_one_lwp_callback, linux_kill): Update.
6476 (status_pending_p_callback): Update.
6477 (wait_for_sigstop): Update. Simplify read of ptid.
6478 (start_step_over): Update.
6479 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6480 (get_lwp_thread): Update.
6481 (struct lwp_info): Rename member "head" to "entry".
6482 * regcache.h (inferior_list_entry): Delete.
6483 * server.c (kill_inferior_callback): Update.
6484 (detach_or_kill_inferior_callback): Update.
6485 (print_started_pid): Update.
6486 (print_attached_pid): Update.
6487 (process_serial_event): Simplify read of ptid.
6488 * thread-db.c (thread_db_create_event): Update.
6489 (thread_db_get_tls_address): Update.
6490 * win32-low.c (current_inferior_ptid): Simplify.
6491
46917d26
TT
64922014-02-19 Tom Tromey <tromey@redhat.com>
6493
6494 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6495 argument.
6496 (target_supports_btrace): Update.
6497
0759a81e
YQ
64982014-02-14 Yao Qi <yao@codesourcery.com>
6499
6500 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6501 (rsp-low-ipa.o): New target.
6502
a7191e8b
TT
65032014-02-12 Tom Tromey <tromey@redhat.com>
6504
6505 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6506 convert_ascii_to_int.
6507 * regcache.c (registers_to_string): Likewise.
6508 * remote-utils.c (decode_M_packet): Likewise.
6509 * server.c (process_serial_event): Likewise.
6510
ff0e980e
TT
65112014-02-12 Tom Tromey <tromey@redhat.com>
6512
6513 * server.c (handle_query, handle_v_run): Use hex2bin, not
6514 unhexify.
6515 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6516
e9371aff
TT
65172014-02-12 Tom Tromey <tromey@redhat.com>
6518
6519 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6520 convert_int_to_ascii.
6521 * regcache.c (registers_to_string, collect_register_as_string):
6522 Likewise.
6523 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6524 Likewise.
6525 * server.c (process_serial_event): Likewise.
6526 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6527 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6528
971dc0b8
TT
65292014-02-12 Tom Tromey <tromey@redhat.com>
6530
6531 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6532 bin2hex, not hexify.
6533 * tracepoint.c (cmd_qtstatus): Likewise.
6534
0a822afb
TT
65352014-02-12 Tom Tromey <tromey@redhat.com>
6536
6537 * remote-utils.c (monitor_output): Pass explicit length to
6538 hexify.
6539
9c3d6531
TT
65402014-02-12 Tom Tromey <tromey@redhat.com>
6541
6542 * tracepoint.c: Include rsp-low.h.
6543 * server.c: Include rsp-low.h.
6544 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6545 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6546 declare.
6547 * remote-utils.c: Include rsp-low.h.
6548 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6549 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6550 (convert_int_to_ascii, convert_ascii_to_int): Move to
6551 common/rsp-low.c.
6552 * regcache.c: Include rsp-low.h.
6553 * ax.c: Include rsp-low.h.
6554 * Makefile.in (SFILES): Add common/rsp-low.c.
6555 (OBS): Add rsp-low.o.
6556 (rsp-low.o): New target.
6557
01fd3ea5
TT
65582014-02-12 Tom Tromey <tromey@redhat.com>
6559
6560 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6561 Include print-utils.h.
6562 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6563 (plongest, thirty_two, phex_nz): Remove.
6564 * Makefile.in (SFILES): Add common/print-utils.c.
6565 (OBS): Add print-utils.o.
6566 (print-utils-ipa.o): New target.
6567 (print-utils.o): New target.
6568 (IPA_OBJS): Add print-utils-ipa.o.
6569
e99dc820
TT
65702014-02-06 Tom Tromey <tromey@redhat.com>
6571
6572 * Makefile.in (SFILES): Fix indentation.
6573
ee1e2d4f
DE
65742014-02-05 Doug Evans <dje@google.com>
6575
6576 * linux-low.c (linux_wait_for_event): Improve comment.
6577 (linux_wait_1): Keep current_inferior in sync with event_child.
6578
f5a02773
DE
65792014-01-22 Doug Evans <dje@google.com>
6580
6581 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6582
87ce2a04
DE
65832014-01-22 Doug Evans <dje@google.com>
6584
6585 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6586 * configure: Regenerate.
6587 * config.in: Regenerate.
6588 * Makefile.in (SFILES): Add debug.c.
6589 (OBS): Add debug.o.
6590 * debug.c: New file.
6591 * debug.h: New file.
6592 * linux-aarch64-low.c (*): Update all debugging printfs to use
6593 debug_printf instead of fprintf.
6594 * linux-arm-low.c (*): Ditto.
6595 * linux-cris-low.c (*): Ditto.
6596 * linux-crisv32-low.c (*): Ditto.
6597 * linux-m32r-low.c (*): Ditto.
6598 * linux-sparc-low.c (*): Ditto.
6599 * linux-x86.c (*): Ditto.
6600 * linux-low.c (*): Ditto.
6601 (linux_wait_1): Add calls to debug_enter, debug_exit.
6602 (linux_wait): Remove redundant debugging printf.
6603 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6604 (linux_resume, unstop_all_lwps): Ditto.
6605 * mem-break.c (*): Update all debugging printfs to use
6606 debug_printf instead of fprintf.
6607 * remote-utils.c (*): Ditto.
6608 * thread-db.c (*): Ditto.
6609 * server.c #include <ctype.h>, "gdb_vecs.h".
6610 (debug_threads): Moved to debug.c.
6611 (*): Update all debugging printfs to use debug_printf instead of
6612 fprintf.
6613 (start_inferior): Replace call to fflush with call to debug_flush.
6614 (monitor_show_help): Mention set debug-format.
6615 (parse_debug_format_options): New function.
6616 (handle_monitor_command): Handle "monitor set debug-format".
6617 (gdbserver_usage): Mention --debug-format.
6618 (main): Parse --debug-format.
6619 * server.h (debug_threads): Declaration moved to debug.h.
6620 #include "debug.h".
6621 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6622 trace_debug_1 that uses debug_printf.
6623 (tracepoint_look_up_symbols): Update all debugging printfs to use
6624 debug_printf instead of fprintf.
6625
e671835b
BS
66262014-01-20 Baruch Siach <baruch@tkos.co.il>
6627
6628 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6629 sys/ptrace.h.
6630
b5737fa9
PA
66312014-01-17 Pedro Alves <palves@redhat.com>
6632
ea38d2a9 6633 PR build/16445
c7faa97a
PA
6634 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6635 defined after including gdb_proc_service.h.
b5737fa9 6636
40ed484e
DE
66372014-01-16 Doug Evans <dje@google.com>
6638
6639 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6640 (match_dll): Use it.
6641
969c39fb
MM
66422014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6643
6644 * target.h (target_ops) <read_btrace>: Change parameters and
6645 return type to allow error reporting.
6646 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6647 trace reading errors on.
6648 * linux-low.c (linux_low_read_btrace): Pass trace reading
6649 errors on.
6650 (linux_low_disable_btrace): New.
6651
ab7f45ba
DE
66522014-01-15 Doug Evans <dje@google.com>
6653
6654 * inferiors.c (thread_id_to_gdb_id): Delete.
6655 * inferiors.h (thread_id_to_gdb_id): Delete.
6656
66af0f44
EZ
66572014-01-13 Eli Zaretskii <eliz@gnu.org>
6658
6659 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6660 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6661 versions.
6662
9939e131
PA
66632014-01-08 Pedro Alves <palves@redhat.com>
6664
6665 * server.c (handle_status): Don't discard previous queued stop
6666 replies or thread's pending status here.
6667 (main) <disconnection>: Do it here instead.
6668
b7ea362b
PA
66692014-01-08 Pedro Alves <palves@redhat.com>
6670
6671 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6672 * server.c (visit_actioned_threads, handle_pending_status): New
6673 function.
6674 (handle_v_cont): Factor out parts to ...
6675 (resume): ... this new function. If in all-stop, and a thread
6676 being resumed has a pending status, report it without actually
6677 resuming.
6678 (myresume): Adjust to use the new 'resume' function.
6679 (clear_pending_status_callback, set_pending_status_callback)
6680 (find_status_pending_thread_callback): New functions.
6681 (handle_status): Handle the case of multiple threads having
6682 interesting statuses to report. Report threads' real last signal
6683 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6684 with an interesting thread to report the status for, instead of
6685 always reporting the status of the first thread.
6686
28498c42
JB
66872014-01-01 Joel Brobecker <brobecker@adacore.com>
6688
6689 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6690 * gdbreplay.c (gdbreplay_version): Likewise.
6691
f45c82da
YZ
66922013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6693
6694 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6695 iov.iov_len with the real length in use.
6696
379a5e2d
JB
66972013-12-13 Joel Brobecker <brobecker@adacore.com>
6698
6699 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6700 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6701 for all targets that use win32-low.c.
6702 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6703 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6704
4210d83e
PA
67052013-12-13 Pedro Alves <palves@redhat.com>
6706
6707 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6708 if equal to TARGET_WAITKIND_LOADED.
6709 * win32-low.c (cached_status): New static global.
6710 (win32_wait): Add declaration.
6711 (do_initial_child_stuff): Flush all initial pending debug events
6712 up to the initial breakpoint.
6713 (win32_wait): If CACHED_STATUS was set, return that instead
6714 of doing a real wait. Remove the code resuming the execution
6715 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6716 during the initial phase. Also remove the code changing
6717 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6718 TARGET_WAITKIND_STOPPED.
6719
e7f0d979
YQ
67202013-12-11 Yao Qi <yao@codesourcery.com>
6721
6722 * notif.c (handle_notif_ack): Return 0 if no notification
6723 matches.
6724
ebcf782c
DE
67252013-11-20 Doug Evans <dje@google.com>
6726
6727 * linux-low.c (linux_set_resume_request): Fix comment.
6728
20ad9378
DE
67292013-11-20 Doug Evans <dje@google.com>
6730
6731 * linux-low.c (resume_status_pending_p): Tweak comment.
6732
a196ebeb
WT
67332013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6734
6735 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6736 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6737 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6738 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6739 (srv_amd64_regobj): Add amd64-mpx.o.
6740 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6741 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6742 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6743 * i387-fp.c (num_pl_bnd_register) Added constant.
6744 (num_pl_bnd_cfg_registers) Added constant.
6745 (struct i387_xsave) Added reserved area and MPX fields.
6746 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6747 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6748 function.
6749 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6750 (init_registers_amd64_mpx_linux): Declare new function.
6751 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6752 (x86_64_regmap): Add MPX registers.
6753 (x86_linux_read_description): Add MPX case.
6754 (initialize_low_arch): Initialize MPX targets.
6755
0080a2f6
TT
67562013-11-18 Tom Tromey <tromey@redhat.com>
6757
6758 * configure: Rebuild.
6759 * configure.ac: Don't check for stdlib.h.
6760 * gdbreplay.c: Unconditionally include stdlib.h.
6761
2978b111
TT
67622013-11-18 Tom Tromey <tromey@redhat.com>
6763
6764 * config.in: Rebuild.
6765 * configure: Rebuild.
6766 * configure.ac: Don't use AC_HEADER_DIRENT.
6767
a3d08894
TT
67682013-11-18 Tom Tromey <tromey@redhat.com>
6769
6770 * server.h: Don't check HAVE_STRING_H.
6771 * gdbreplay.c: Don't check HAVE_STRING_H.
6772 * configure: Rebuild.
6773
0a5dd17d
TT
67742013-11-18 Tom Tromey <tromey@redhat.com>
6775
6776 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6777 LIBGNU.
6778
1bd2f0ba
TT
67792013-11-08 Tom Tromey <tromey@redhat.com>
6780
6781 * configure, config.in: Rebuild.
6782 * configure.ac: Remove unused configury.
6783
3266f10b
TT
67842013-11-08 Tom Tromey <tromey@redhat.com>
6785
6786 * acinclude.m4: Include common.m4, codeset.m4.
6787 * configure, config.in: Rebuild.
6788 * configure.ac: Use GDB_AC_COMMON.
6789
6682d959
AA
67902013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6791
6792 * linux-s390-low.c (HWCAP_S390_TE): New define.
6793 (s390_arch_setup): Consider the TE field in the HWCAP for
6794 determining 'have_regset_tdb'.
6795
fd0a4d76
SDJ
67962013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6797
6798 PR gdb/16014
6799 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6800 call to sizeof.
6801
1a3d890b
PA
68022013-10-02 Pedro Alves <palves@redhat.com>
6803
6804 * server.c (process_serial_event): Don't output "GDBserver
6805 exiting" if GDB is connected through stdio.
6806 * target.c (mywait): Likewise, be silent if GDB is connected
6807 through stdio.
6808
97ad4581
JB
68092013-10-01 Joel Brobecker <brobecker@adacore.com>
6810
6811 * lynx-low.c (lynx_add_threads_after_attach): New function.
6812 (lynx_attach): Remove call to add_thread. Add call to
6813 lynx_add_threads_after_attach instead.
6814
5b4e221c
MF
68152013-09-28 Mike Frysinger <vapier@gentoo.org>
6816
6817 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6818 * config.in, configure: Regenerated.
6819
ee47b2f8
YQ
68202013-09-18 Yao Qi <yao@codesourcery.com>
6821
6822 PR server/15959
6823 * server.c (start_inferior): Clear 'resume_info'.
6824
d6707650 68252013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6826
d6707650
JW
6827 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6828 for each register.
6829
9243dd0e 68302013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6831
9243dd0e
JW
6832 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6833 linux-tile-low.o to srv_tgtobj.
6834
c623a6ef
WN
68352013-09-16 Will Newton <will.newton@linaro.org>
6836
6837 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6838 out regs.
6839
fb71d39e
PA
68402013-09-06 Pedro Alves <palves@redhat.com>
6841
6842 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6843 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6844 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6845 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6846 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6847 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6848
8e7e9910
PA
68492013-09-06 Pedro Alves <palves@redhat.com>
6850
6851 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6852 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6853
7c3a12ca
PA
68542013-09-06 Pedro Alves <palves@redhat.com>
6855
6856 * linux-amd64-ipa.c: Include tracepoint.h.
6857 * linux-i386-ipa.c: Include tracepoint.h.
6858
8eb3d7b6
RW
68592013-09-06 Ricard Wanderlof <ricardw@axis.com>
6860
6861 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6862 (ps_get_thread_area): New function.
6863
eddddb9d
RW
68642013-09-06 Ricard Wanderlof <ricardw@axis.com>
6865
6866 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6867 (initialize_low_arch): Call init_registers_crisv32 rather than
6868 init_register_crisv32.
6869
533b0600
PA
68702013-09-05 Pedro Alves <palves@redhat.com>
6871
6872 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6873 to ...
6874 * hostio.h: ... this new file.
6875 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6876 win32-low.c: Include hostio.h.
6877
0ce3d3b5
PA
68782013-09-05 Pedro Alves <palves@redhat.com>
6879
6880 * server.h (gdb_client_data, handler_func, callback_handler_func)
6881 (delete_file_handler, add_file_handler, append_callback_event)
6882 (delete_callback_event, start_event_loop, initialize_event_loop):
6883 Move to event-loop.h and include it.
6884 * event-loop.h: New file.
6885
799cdc37
PA
68862013-09-05 Pedro Alves <palves@redhat.com>
6887
6888 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6889 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6890 (loaded_dll, unloaded_dll): Move to ...
6891 * dll.h: ... this new file.
6892 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6893
6a6bbd9d
PA
68942013-09-05 Pedro Alves <palves@redhat.com>
6895
6896 * server.h (current_process, get_thread_process, all_processes)
6897 (add_inferior_to_list, for_each_inferior, current_inferior)
6898 (remove_inferior, add_process, remove_process, find_process_pid)
6899 (have_started_inferiors_p, have_attached_inferiors_p)
6900 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6901 (clear_inferiors, find_inferior, find_inferior_id)
6902 (inferior_target_data, set_inferior_target_data)
6903 (inferior_regcache_data, set_inferior_regcache_data): Move to
6904 inferiors.h, and include it.
6905 * inferiors.h: New file.
6906
f699aaba
PA
69072013-09-05 Pedro Alves <palves@redhat.com>
6908
6909 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6910 Move ...
72f4393d 6911 * ax.h: ... here.
f699aaba 6912
c144c7a0
PA
69132013-09-05 Pedro Alves <palves@redhat.com>
6914
6915 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6916 tracepoint.h.
6917 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6918 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6919 (handle_tracepoint_general_set, handle_tracepoint_query)
6920 (tracepoint_finished_step, tracepoint_was_hit)
6921 (release_while_stepping_state_list, current_traceframe)
6922 (in_readonly_region, traceframe_read_mem)
6923 (fetch_traceframe_registers, traceframe_read_sdata)
6924 (traceframe_read_info, struct fast_tpoint_collect_status)
6925 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6926 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6927 (supply_fast_tracepoint_registers)
6928 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6929 (ipa_tdesc, claim_trampoline_space)
6930 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6931 (agent_mem_read, agent_get_trace_state_variable_value)
6932 (agent_set_trace_state_variable_value, agent_tsv_read)
6933 (agent_mem_read_string, get_raw_reg_func_addr)
6934 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6935 * tracepoint.h: ... this new file.
6936
ff42e6ab
PA
69372013-09-05 Pedro Alves <palves@redhat.com>
6938
6939 * server.h (perror_with_name, error, fatal, warning, paddress)
6940 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6941 include it.
6942 * utils.h: New file.
6943
541af0f4
PA
69442013-09-05 Pedro Alves <palves@redhat.com>
6945
6946 * server.h (remote_debug, noack_mode, transport_is_reliable)
6947 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6948 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6949 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6950 (write_enn, initialize_async_io, enable_async_io)
6951 (disable_async_io, check_remote_input_interrupt_request)
6952 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6953 (dead_thread_notify, prepare_resume_reply)
6954 (decode_address_to_semicolon, decode_address, decode_m_packet)
6955 (decode_M_packet, decode_X_packet, decode_xfer_write)
6956 (decode_search_memory_packet, unhexify, hexify)
6957 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6958 (look_up_one_symbol, relocate_instruction)
6959 (monitor_output): Move to remote-utils.h, and include it.
6960 * remote-utils.h: New file.
6961
eebdf26b
PA
69622013-09-05 Pedro Alves <palves@redhat.com>
6963
6964 * server.h (_): Delete.
6965
3aafd2ff
PA
69662013-09-02 Pedro Alves <palves@redhat.com>
6967
6968 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6969 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6970 allocated.
6971 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6972
cee83bcb
PM
69732013-09-02 Pierre Muller <muller@sourceware.org>
6974
6975 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6976 or WriteProcessMemory complete successfully and handle
6977 ERROR_PARTIAL_COPY error.
6978
9a13b2fa
PA
69792013-09-02 Pedro Alves <palves@redhat.com>
6980
6981 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6982 error instead of EIO.
6983
602e3198
JK
69842013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6985
6986 PR server/15604
6987 * linux-low.c: Include filestuff.h.
6988 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6989 * lynx-low.c: Include filestuff.h.
6990 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6991 * server.c: Include filestuff.h.
6992 (main): Call notice_open_fds.
6993 * spu-low.c: Include filestuff.h.
6994 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6995
96d7229d
LM
69962013-08-22 Luis Machado <lgustavo@codesourcery.com>
6997
6998 * Makefile.in: Explain why ../target and ../nat are not
6999 listed as include file search paths.
7000 (linux-waitpid.o): New object file rule.
7001 * configure.srv (srv_native_linux_obj): New variable.
7002 Replace all occurrences of linux native object files with
7003 $srv_native_linux_obj.
7004 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7005 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7006 (linux_enable_event_reporting): Remove declaration.
7007 (my_waitpid): Moved to common/linux-waitpid.c.
7008 (linux_wait_for_event): Pass ptid when calling
7009 linux_enable_event_reporting.
7010 (linux_supports_tracefork_flag): Remove.
7011 (linux_enable_event_reporting): Likewise.
7012 (linux_tracefork_grandchild): Remove.
7013 (STACK_SIZE): Moved to common/linux-ptrace.c.
7014 (linux_tracefork_child): Remove.
7015 (linux_test_for_tracefork): Remove.
7016 (linux_look_up_symbols): Call linux_supports_traceclone.
7017 (initialize_low): Remove call to linux_test_for_tracefork.
7018 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7019 common/linux-ptrace.h.
7020 (PTRACE_TYPE_ARG4): Likewise.
7021 Include linux-ptrace.h.
7022
32940073
PA
70232013-08-21 Pedro Alves <palves@redhat.com>
7024
7025 * config.in: Renegerate.
7026
33b60d58 70272013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 7028
33b60d58
LM
7029 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7030 (SFILES): Remove $(srcdir)/common/target-common.c and
7031 add $(srcdir)/target/waitstatus.c.
7032 (OBS): Remove target-common.o and add waitstatus.o.
7033 (server_h): Remove $(srcdir)/../common/target-common.h and
7034 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7035 and $(srcdir)/../target/waitstatus.h.
7036 (target-common.o): Remove.
7037 (waitstatus.o): New target object file.
7038 * target.h: Do not include target-common.h and
7039 include target/resume.h, target/wait.h and
7040 target/waitstatus.h.
7041
b8e1b30e
LM
70422013-08-13 Luis Machado <lgustavo@codesourcery.com>
7043
7044 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7045 to PTRACE_TYPE_ARG3.
7046 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7047 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7048 PTRACE_TYPE_ARG4.
7049 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7050 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7051
7a60ad40
YQ
70522013-07-27 Jie Zhang <jie@codesourcery.com>
7053 Daniel Jacobowitz <dan@codesourcery.com>
7054 Yao Qi <yao@codesourcery.com>
7055
7056 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7057 (mips-linux-watch.o): New rule.
7058 (mips_linux_watch_h): New variable.
7059 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7060 srv_tgtobj.
7061 * linux-mips-low.c: Include mips-linux-watch.h.
7062 (struct arch_process_info, struct arch_lwp_info): New.
7063 (update_watch_registers_callback): New function.
7064 (mips_linux_new_process, mips_linux_new_thread) New functions.
7065 (mips_linux_prepare_to_resume, mips_insert_point): New
7066 functions.
7067 (mips_remove_point, mips_stopped_by_watchpoint): New
7068 functions.
7069 (rsp_bp_type_to_target_hw_bp_type): New function.
7070 (mips_stopped_data_address): New function.
7071 (the_low_target): Add watchpoint support functions.
7072
de6f69ad
YQ
70732013-07-27 Yao Qi <yao@codesourcery.com>
7074
7075 * i386-low.c: Include break-common.h.
7076 (enum target_hw_bp_type): Remove.
7077
3360c0bf
LM
70782013-07-24 Luis Machado <lgustavo@codesourcery.com>
7079
7080 * Makefile.in (SFILES): /common/target-common.c.
7081 (OBS): Add target-common.o.
7082 (server_h): Add $(srcdir)/../common/target-common.h.
7083 (target-common.o): New target.
7084 * server.c (queue_stop_reply_callback): Free
7085 status string after use.
7086 * target.c (target_waitstatus_to_string): Remove.
7087 * target.h: Include target-common.h.
7088 (resume_kind): Likewise.
7089 (target_waitkind): Likewise.
7090 (target_waitstatus): Likewise.
7091 (TARGET_WNOHANG): Likewise.
7092
bd885420
YQ
70932013-07-04 Yao Qi <yao@codesourcery.com>
7094
7095 * Makefile.in (host_alias): Use @host_noncanonical@.
7096 (target_alias): Use @target_noncanonical@.
7097 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7098 ACX_NONCANONICAL_HOST.
7099 * configure: Regenerated.
7100
7101 Revert:
7102 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7103
7104 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7105 * configure: Rebuild.
7106 * Makefile.in (version_host, version_target): Get from configure.
7107 (version.c): Use $(version_host) and $(version_target).
7108
17ef446e
PA
71092013-07-03 Pedro Alves <palves@redhat.com>
7110
7111 * Makefile.in (config.status): Depend on development.sh.
7112 * acinclude.m4: Include libmcheck.m4.
7113 * configure: Regenerate.
7114
7a9a7487
MG
71152013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7116
7117 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7118 attribute inside the parentheses.
7119 (winapi_DebugSetProcessKillOnExit): Ditto.
7120 (winapi_DebugBreakProcess): Ditto.
7121 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 7122
49b64de6
MG
71232013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7124
7125 * notif.h (notif_event): Add a dummy member to avoid compiler
7126 errors.
7127
d5749ee7
PA
71282013-07-01 Pedro Alves <palves@redhat.com>
7129
7130 * hostio.c (HOSTIO_PATH_MAX): Define.
7131 (require_filename, handle_open, handle_unlink, handle_readlink):
7132 Use it.
7133
d8d2a3ee
PA
71342013-07-01 Pedro Alves <palves@redhat.com>
7135
7136 * server.h: Include "pathmax.h".
7137 * linux-low.c: Don't include sys/param.h.
7138 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7139 MAXPATHLEN.
7140 * win32-low.c: Don't include sys/param.h.
7141 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7142
bc7dea8d
PA
71432013-07-01 Pedro Alves <palves@redhat.com>
7144
7145 * event-loop.c: Don't check HAVE_UNISTD_H before including
7146 <unistd.h>.
7147 * gdbreplay.c: Likewise.
7148 * remote-utils.c: Likewise.
7149 * server.c: Likewise.
7150 * configure.ac: Don't check for unistd.h.
7151 * configure: Regenerate.
7152
d6c2da54
TT
71532013-06-28 Tom Tromey <tromey@redhat.com>
7154
7155 * Makefile.in (version.c): Use version.in, not
7156 common/version.in.
7157
257b6bec
MG
71582013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7159
7160 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7161 * configure: Rebuild.
7162 * Makefile.in (version_host, version_target): Get from configure.
7163 (version.c): Use $(version_host) and $(version_target).
7164
86ebe149
DK
71652013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7166
7167 Fix trace-status to output user name without trailing colon.
7168 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7169
f30aa5af
DK
71702013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7171
7172 Fix trace-status to output proper start-time and stop-time.
7173 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7174 output start time and stop time in hex as gdb expects.
7175
28a93511
YQ
71762013-06-26 Pedro Alves <pedro@codesourcery.com>
7177
7178 * tracepoint.c (build_traceframe_info_xml): Output trace state
7179 variables present in the trace buffer.
7180
01208463
TT
71812013-06-24 Tom Tromey <tromey@redhat.com>
7182
7183 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7184 create-version.sh.
7185 (version.o): Remove.
7186 * gdbreplay.c: Include version.h.
7187 (version, host_name): Don't declare.
7188 * server.h: Include version.h.
7189 (version, host_name): Don't declare.
7190
760256f9
PA
71912013-06-12 Pedro Alves <palves@redhat.com>
7192
7193 * linux-x86-low.c (linux_is_elf64): Delete global.
7194 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7195 with local linux_pid_exe_is_elf_64_file use.
7196
030031ee
PA
71972013-06-11 Pedro Alves <palves@redhat.com>
7198
7199 * linux-low.c (regset_disabled, disable_regset): New functions.
7200 (regsets_fetch_inferior_registers)
7201 (regsets_store_inferior_registers): Use them.
7202 (initialize_regsets_info); Don't allocate the disabled_regsets
7203 array here.
7204 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7205 comment.
7206
5da6eb0a
PA
72072013-06-11 Pedro Alves <palves@redhat.com>
7208
7209 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7210 xmalloc.
7211
7e5aaa09
PA
72122013-06-11 Pedro Alves <palves@redhat.com>
7213
7214 * linux-x86-low.c (initialize_low_arch): Call
7215 init_registers_x32_avx_linux.
7216
d878444c
JK
72172013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7218
7219 Fix compatibility with Android Bionic.
7220 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7221 it is not empty.
7222
3aee8918
PA
72232013-06-07 Pedro Alves <palves@redhat.com>
7224
5f2b57b5 7225 PR server/14823
3aee8918
PA
7226 * Makefile.in (OBS): Add tdesc.o.
7227 (IPA_OBJS): Add tdesc-ipa.o.
7228 (tdesc-ipa.o): New rule.
7229 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7230 interface.
7231 * linux-low.c (new_inferior): Delete.
7232 (disabled_regsets, num_regsets): Delete.
7233 (linux_add_process): Adjust to set the new per-process
7234 new_inferior flag.
7235 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7236 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7237 was a stop. When calling arch_setup, switch the current inferior
7238 to the thread that got an event.
7239 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7240 (regsets_fetch_inferior_registers)
7241 (regsets_store_inferior_registers): New regsets_info parameter.
7242 Adjust to use it.
7243 (linux_register_in_regsets): New regs_info parameter. Adjust to
7244 use it.
7245 (register_addr, fetch_register, store_register): New usrregs_info
7246 parameter. Adjust to use it.
7247 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7248 parameter regs_info. Adjust to use it.
7249 (linux_fetch_registers): Get the current inferior's regs_info, and
7250 adjust to use it.
7251 (linux_store_registers): Ditto.
7252 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7253 (initialize_low): Don't initialize the target_regsets here. Call
7254 initialize_low_arch.
7255 * linux-low.h (target_regsets): Delete declaration.
7256 (struct regsets_info): New.
7257 (struct usrregs_info): New.
7258 (struct regs_info): New.
7259 (struct process_info_private) <new_inferior>: New field.
7260 (struct linux_target_ops): Delete the num_regs, regmap, and
7261 regset_bitmap fields. New field regs_info.
7262 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7263 * i387-fp.c (num_xmm_registers): Delete.
7264 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7265 calls to new interface.
7266 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7267 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7268 Infer the number of xmm registers from the regcache's target
7269 description.
7270 * i387-fp.h (num_xmm_registers): Delete.
7271 * inferiors.c (add_thread): Don't install the thread's regcache
7272 here.
7273 * proc-service.c (gregset_info): Fetch the current inferior's
7274 regs_info. Adjust to use it.
7275 * regcache.c: Include tdesc.h.
7276 (register_bytes, reg_defs, num_registers)
7277 (gdbserver_expedite_regs): Delete.
7278 (get_thread_regcache): If the thread doesn't have a regcache yet,
7279 create one, instead of aborting gdbserver.
7280 (regcache_invalidate_one): Rename to ...
7281 (regcache_invalidate_thread): ... this.
7282 (regcache_invalidate_one): New.
7283 (regcache_invalidate): Only invalidate registers of the current
7284 process.
7285 (init_register_cache): Add target_desc parameter, and use it.
7286 (new_register_cache): Ditto. Assert the target description has a
7287 non zero registers_size.
7288 (regcache_cpy): Add assertions. Adjust.
7289 (realloc_register_cache, set_register_cache): Delete.
7290 (registers_to_string, registers_from_string): Adjust.
7291 (find_register_by_name, find_regno, find_register_by_number)
7292 (register_cache_size): Add target_desc parameter, and use it.
7293 (free_register_cache_thread, free_register_cache_thread_one)
7294 (regcache_release, register_cache_size): New.
7295 (register_size): Add target_desc parameter, and use it.
7296 (register_data, supply_register, supply_register_zeroed)
7297 (supply_regblock, supply_register_by_name, collect_register)
7298 (collect_register_as_string, collect_register_by_name): Adjust.
7299 * regcache.h (struct target_desc): Forward declare.
7300 (struct regcache) <tdesc>: New field.
7301 (init_register_cache, new_register_cache): Add target_desc
7302 parameter.
7303 (regcache_invalidate_thread): Declare.
7304 (regcache_invalidate_one): Delete declaration.
7305 (regcache_release): Declare.
7306 (find_register_by_number, register_cache_size, register_size)
7307 (find_regno): Add target_desc parameter.
7308 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7309 declarations.
7310 * remote-utils.c: Include tdesc.h.
7311 (outreg, prepare_resume_reply): Adjust.
7312 * server.c: Include tdesc.h.
7313 (gdbserver_xmltarget): Delete declaration.
7314 (get_features_xml, process_serial_event): Adjust.
7315 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7316 declare.
7317 (struct process_info) <tdesc>: New field.
7318 (ipa_tdesc): Declare.
7319 * tdesc.c: New file.
7320 * tdesc.h: New file.
7321 * tracepoint.c: Include tdesc.h.
7322 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7323 (get_context_regcache): Adjust to pass ipa_tdesc down.
7324 (do_action_at_tracepoint): Adjust to get the register cache size
7325 from the context regcache's description.
7326 (traceframe_walk_blocks): Adjust to get the register cache size
7327 from the current trace frame's description.
7328 (traceframe_get_pc): Adjust to get current trace frame's
7329 description and pass it down.
7330 (gdb_collect): Adjust to get the register cache size from the
7331 IPA's description.
7332 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7333 (gdbserver_xmltarget): Delete.
7334 (initialize_low_tracepoint): Set the ipa's target description.
7335 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7336 (initialize_low_tracepoint): Set the ipa's target description.
7337 * linux-x86-low.c: Include tdesc.h.
7338 [__x86_64__] (is_64bit_tdesc): New.
7339 (ps_get_thread_area, x86_get_thread_area): Use it.
7340 (i386_cannot_store_register): Rename to ...
7341 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7342 (i386_cannot_fetch_register): Rename to ...
7343 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7344 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7345 to new interface.
7346 (target_regsets): Rename to ...
7347 (x86_regsets): ... this.
7348 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7349 interface.
7350 (x86_siginfo_fixup): Use is_64bit_tdesc.
7351 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7352 (tdesc_x32_avx_linux, tdesc_x32_linux)
7353 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7354 Declare.
7355 (x86_linux_update_xmltarget): Delete.
7356 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7357 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7358 (AMD64_LINUX_USER64_CS): New.
7359 (x86_linux_read_description): New, based on
7360 x86_linux_update_xmltarget.
7361 (same_process_callback): New.
7362 (x86_arch_setup_process_callback): New.
7363 (x86_linux_update_xmltarget): New.
7364 (x86_regsets_info): New.
7365 (amd64_linux_regs_info): New.
7366 (i386_linux_usrregs_info): New.
7367 (i386_linux_regs_info): New.
7368 (x86_linux_regs_info): New.
7369 (x86_arch_setup): Reimplement.
7370 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7371 (x86_emit_ops): Ditto.
7372 (the_low_target): Adjust. Install x86_linux_regs_info,
7373 x86_cannot_fetch_register, and x86_cannot_store_register.
7374 (initialize_low_arch): New.
7375 * linux-ia64-low.c (tdesc_ia64): Declare.
7376 (ia64_fetch_register): Adjust.
7377 (ia64_usrregs_info, regs_info): New globals.
7378 (ia64_regs_info): New function.
7379 (the_low_target): Adjust.
7380 (initialize_low_arch): New function.
7381 * linux-sparc-low.c (tdesc_sparc64): Declare.
7382 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7383 Adjust.
7384 (sparc_arch_setup): New function.
7385 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7386 (the_low_target): Adjust.
7387 (initialize_low_arch): New function.
7388 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7389 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7390 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7391 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7392 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7393 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7394 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7395 (tdesc_powerpc_isa205_vsx64l): Declare.
7396 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7397 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7398 (ppc_set_pc, ppc_get_hwcap): Adjust.
7399 (ppc_usrregs_info): Forward declare.
7400 (!__powerpc64__) ppc_regmap_adjusted: New global.
7401 (ppc_arch_setup): Adjust to the current process'es target
7402 description.
7403 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7404 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7405 (ppc_store_evrregset): Adjust.
7406 (target_regsets): Rename to ...
7407 (ppc_regsets): ... this, and make static.
7408 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7409 (ppc_regs_info): New function.
7410 (the_low_target): Adjust.
7411 (initialize_low_arch): New function.
7412 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7413 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7414 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7415 (tdesc_s390x_linux64v2): Declare.
7416 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7417 (s390_fill_gregset, s390_store_last_break): Adjust.
7418 (target_regsets): Rename to ...
7419 (s390_regsets): ... this, and make static.
7420 (s390_get_pc, s390_set_pc): Adjust.
7421 (s390_get_hwcap): New target_desc parameter, and use it.
7422 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7423 (s390_arch_setup): Adjust to set the current process'es target
7424 description. Don't adjust the regmap.
7425 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7426 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7427 (regs_info_3264): New globals.
7428 (s390_regs_info): New function.
7429 (the_low_target): Adjust.
7430 (initialize_low_arch): New function.
7431 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7432 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7433 [__mips64] (init_registers_mips_linux)
7434 (init_registers_mips_dsp_linux): Delete defines.
7435 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7436 (have_dsp): New global.
7437 (mips_read_description): New, based on mips_arch_setup.
7438 (mips_arch_setup): Reimplement.
7439 (get_usrregs_info): New function.
7440 (mips_cannot_fetch_register, mips_cannot_store_register)
7441 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7442 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7443 (target_regsets): Rename to ...
7444 (mips_regsets): ... this, and make static.
7445 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7446 (dsp_regs_info, regs_info): New globals.
7447 (mips_regs_info): New function.
7448 (the_low_target): Adjust.
7449 (initialize_low_arch): New function.
7450 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7451 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7452 Declare.
7453 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7454 (arm_read_description): New, with bits factored from
7455 arm_arch_setup.
7456 (arm_arch_setup): Reimplement.
7457 (target_regsets): Rename to ...
7458 (arm_regsets): ... this, and make static.
7459 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7460 (arm_regs_info): New function.
7461 (the_low_target): Adjust.
7462 (initialize_low_arch): New function.
7463 * linux-m68k-low.c (tdesc_m68k): Declare.
7464 (target_regsets): Rename to ...
7465 (m68k_regsets): ... this, and make static.
7466 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7467 (m68k_regs_info): New function.
7468 (m68k_arch_setup): New function.
7469 (the_low_target): Adjust.
7470 (initialize_low_arch): New function.
7471 * linux-sh-low.c (tdesc_sharch): Declare.
7472 (target_regsets): Rename to ...
7473 (sh_regsets): ... this, and make static.
7474 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7475 (sh_regs_info, sh_arch_setup): New functions.
7476 (the_low_target): Adjust.
7477 (initialize_low_arch): New function.
7478 * linux-bfin-low.c (tdesc_bfin): Declare.
7479 (bfin_arch_setup): New function.
7480 (bfin_usrregs_info, regs_info): New globals.
7481 (bfin_regs_info): New function.
7482 (the_low_target): Adjust.
7483 (initialize_low_arch): New function.
7484 * linux-cris-low.c (tdesc_cris): Declare.
7485 (cris_arch_setup): New function.
7486 (cris_usrregs_info, regs_info): New globals.
7487 (cris_regs_info): New function.
7488 (the_low_target): Adjust.
7489 (initialize_low_arch): New function.
7490 * linux-cris-low.c (tdesc_crisv32): Declare.
7491 (cris_arch_setup): New function.
7492 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7493 (cris_regs_info): New function.
7494 (the_low_target): Adjust.
7495 (initialize_low_arch): New function.
7496 * linux-m32r-low.c (tdesc_m32r): Declare.
7497 (m32r_arch_setup): New function.
7498 (m32r_usrregs_info, regs_info): New globals.
7499 (m32r_regs_info): Adjust.
7500 (initialize_low_arch): New function.
7501 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7502 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7503 (tic6x_usrregs_info): Forward declare.
7504 (tic6x_read_description): New function, based on ...
7505 (tic6x_arch_setup): ... this. Reimplement.
7506 (target_regsets): Rename to ...
7507 (tic6x_regsets): ... this, and make static.
7508 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7509 (tic6x_regs_info): New function.
7510 (the_low_target): Adjust.
7511 (initialize_low_arch): New function.
7512 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7513 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7514 (target_regsets): Rename to ...
7515 (xtensa_regsets): ... this, and make static.
7516 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7517 globals.
7518 (xtensa_arch_setup, xtensa_regs_info): New functions.
7519 (the_low_target): Adjust.
7520 (initialize_low_arch): New function.
7521 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7522 (nios2_arch_setup): Set the current process'es tdesc.
7523 (target_regsets): Rename to ...
7524 (nios2_regsets): ... this.
7525 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7526 (nios2_regs_info): New function.
7527 (the_low_target): Adjust.
7528 (initialize_low_arch): New function.
a261b8f5
PA
7529 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7530 (aarch64_arch_setup): Set the current process'es tdesc.
7531 (target_regsets): Rename to ...
7532 (aarch64_regsets): ... this.
7533 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7534 (aarch64_regs_info): New function.
7535 (the_low_target): Adjust.
7536 (initialize_low_arch): New function.
3aee8918
PA
7537 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7538 globals.
7539 (target_regsets): Rename to ...
7540 (tile_regsets): ... this.
7541 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7542 (tile_regs_info): New function.
7543 (tile_arch_setup): Set the current process'es tdesc.
7544 (the_low_target): Adjust.
7545 (initialize_low_arch): New function.
7546 * spu-low.c (tdesc_spu): Declare.
7547 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7548 * win32-arm-low.c (tdesc_arm): Declare.
7549 (arm_arch_setup): New function.
7550 (the_low_target): Install arm_arch_setup instead of
7551 init_registers_arm.
7552 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7553 (init_windows_x86): Rename to ...
7554 (i386_arch_setup): ... this. Set `win32_tdesc'.
7555 (the_low_target): Adjust.
7556 * win32-low.c (win32_tdesc): New global.
7557 (child_add_thread): Don't create the thread cache here.
7558 (do_initial_child_stuff): Set the new process'es tdesc.
7559 * win32-low.h (struct target_desc): Forward declare.
7560 (win32_tdesc): Declare.
7561 * lynx-i386-low.c (tdesc_i386): Declare global.
7562 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7563 * lynx-low.c (lynx_tdesc): New global.
7564 (lynx_add_process): Set the new process'es tdesc.
7565 * lynx-low.h (struct target_desc): Forward declare.
7566 (lynx_tdesc): Declare global.
7567 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7568 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7569 * nto-low.c (nto_tdesc): New global.
7570 (do_attach): Set the new process'es tdesc.
7571 * nto-low.h (struct target_desc): Forward declare.
7572 (nto_tdesc): Declare.
7573 * nto-x86-low.c (tdesc_i386): Declare.
7574 (nto_x86_arch_setup): Set `nto_tdesc'.
7575
b1fbec62
GB
75762013-06-04 Gary Benson <gbenson@redhat.com>
7577
7578 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7579 to qSupported response when appropriate.
7580 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7581 with nonzero-length annex.
7582 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7583 arguments supplied in annex.
7584
d1ec4ce7
DE
75852013-05-31 Doug Evans <dje@google.com>
7586
ac44adcb 7587 PR server/15594
d1ec4ce7
DE
7588 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7589 64 bits in 64-cross-32 environment.
7590
9b25f2d3
PA
75912013-05-28 Pedro Alves <palves@redhat.com>
7592
7593 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7594 (aarch64-without-fpu.c): Delete rule.
7595 * configure.srv (aarch64*-*-linux*): Remove references to
7596 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7597 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7598 declaration.
7599
6740dc9c
PA
76002013-05-24 Pedro Alves <palves@redhat.com>
7601
7602 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7603 instead of strchr/decode_address. Error if the range isn't split
7604 with a ','. Don't assume there's be a ':' in the action.
7605
c2d6af84
PA
76062013-05-23 Yao Qi <yao@codesourcery.com>
7607 Pedro Alves <palves@redhat.com>
7608
7609 * linux-low.c (lwp_in_step_range): New function.
7610 (linux_wait_1): If the thread was range stepping and stopped
7611 outside the stepping range, report the stop to GDB. Otherwise,
7612 continue stepping. Add range stepping debug output.
7613 (linux_set_resume_request): Copy the step range from the resume
7614 request to the lwp.
7615 (linux_supports_range_stepping): New.
7616 (linux_target_ops) <supports_range_stepping>: Set to
7617 linux_supports_range_stepping.
7618 * linux-low.h (struct linux_target_ops)
7619 <supports_range_stepping>: New field.
7620 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7621 * linux-x86-low.c (x86_supports_range_stepping): New.
7622 (the_low_target) <supports_range_stepping>: Set to
7623 x86_supports_range_stepping.
7624 * server.c (handle_v_cont): Handle 'r' action.
7625 (handle_v_requests): Append ";r" if the target supports range
7626 stepping.
7627 * target.h (struct thread_resume) <step_range_start,
7628 step_range_end>: New fields.
7629 (struct target_ops) <supports_range_stepping>:
7630 New field.
7631 (target_supports_range_stepping): New macro.
7632
58794e1a
JB
76332013-05-17 Joel Brobecker <brobecker@adacore.com>
7634
7635 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7636 confusion in comment.
7637
d631c5a7
JB
76382013-05-17 Joel Brobecker <brobecker@adacore.com>
7639
7640 * lynx-low.c (struct process_info_private): New type.
7641 (lynx_add_process): New function.
7642 (lynx_create_inferior, lynx_attach): Replace calls to
7643 add_process by calls to lynx_add_process.
7644 (lynx_resume): If PTID is null, then try using
7645 current_process()->private->last_wait_event_ptid.
7646 Add comments.
7647 (lynx_clear_inferiors): Delete. The contents of that function
7648 has been inlined in lynx_mourn;
7649 (lynx_wait_1): Save the ptid in the process's private data.
7650 (lynx_mourn): Free the process' private data. Replace call
7651 to lynx_clear_inferiors by call to clear_inferiors.
7652
96f7a20f
YQ
76532013-05-17 Yao Qi <yao@codesourcery.com>
7654
7655 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7656 the right place.
7657
db0dfaa0
LM
76582013-05-16 Luis Machado <lgustavo@codesourcery.com>
7659
7660 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7661 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7662 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7663 PT_TEXT_END_ADDR guards. Update comments.
7664 (linux_target_op) <read_offsets>: Conditionally define to
7665 linux_read_offsets if the target is UCLIBC and if it defines
7666 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7667
68f5f838
SL
76682013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7669 Andrew Jenner <andrew@codesourcery.com>
7670
7671 * Makefile.in (SFILES): Add linux-nios2-low.c.
7672 (clean): Add action to delete nios2-linux.c.
7673 (nios2-linux.c): New rule.
7674 * configure.srv: Add nios2*-*-linux*.
7675 * linux-nios2-low.c: New.
7676
1ebff1fd
HAQ
76772013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7678
7679 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7680
f6150862
HZ
76812013-04-25 Hui Zhu <hui@codesourcery.com>
7682
7683 PR gdb/15186
f6150862
HZ
7684 * ax.c (ax_printf): Add fflush.
7685
614c279d
TT
76862013-04-22 Tom Tromey <tromey@redhat.com>
7687
7688 * Makefile.in (SFILES): Add filestuff.c.
7689 (OBS): Add filestuff.o.
7690 (filestuff.o): New target.
7691 * config.in, configure: Rebuild.
7692 * configure.ac: Check for fdwalk, pipe2.
7693
7d4e5717
PA
76942013-04-17 Pedro Alves <palves@redhat.com>
7695
7696 * configure.ac (USE_THREAD_DB): Delete variable.
7697 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7698 Don't AC_SUBST USE_THREAD_DB.
7699 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7700 * config.in, configure: Regenerate.
7701
d5c93e41
PA
77022013-04-16 Pedro Alves <palves@redhat.com>
7703
7704 * linux-low.h (struct lwp_info) <thread_known>: Move under
7705 the USE_THREAD_DB #ifdef.
7706
04f5fe89
PA
77072013-04-16 Pedro Alves <palves@redhat.com>
7708
7709 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7710 (linux-low.o): Delete rule.
7711 * linux-low.h: Always include "gdb_thread_db.h" instead of
7712 conditionally including thread_db.h.
7713 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7714 HAVE_THREAD_DB_H.
7715
480b27bf
JK
77162013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7717
7718 * Makefile.in (install-only): Fix make install regression.
7719
43662968
JK
77202013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7721
7722 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7723 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7724 installation.
7725 * gdbserver.1: Remove.
7726
3e74e146
PA
77272013-03-22 Pedro Alves <palves@redhat.com>
7728
7729 * linux-low.c (handle_extended_wait): Don't call
7730 linux_enable_event_reporting.
7731
a8347a2a
TT
77322013-03-15 Tony Theodore <tonyt@logyst.com>
7733
7734 PR build/9098:
7735 * Makefile.in (SHELL): Use @SHELL@.
7736
eeb56fa7
SDJ
77372013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7738
7739 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7740 compiler warning.
7741
4fa7e2ff
JB
77422013-03-13 Joel Brobecker <brobecker@adacore.com>
7743
7744 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7745 Remove extraneous NULL element.
7746
8ddb1965
YQ
77472013-03-13 Yao Qi <yao@codesourcery.com>
7748
7749 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7750 'V' block in trace frame.
7751
9accd112
MM
77522013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7753
7754 * target.h (struct target_ops): Add btrace ops.
7755 (target_supports_btrace): New macro.
7756 (target_enable_btrace): New macro.
7757 (target_disable_btrace): New macro.
7758 (target_read_btrace): New macro.
7759 * gdbthread.h (struct thread_info): Add btrace field.
7760 * server.c: Include btrace-common.h.
7761 (handle_btrace_general_set): New function.
7762 (handle_btrace_enable): New function.
7763 (handle_btrace_disable): New function.
7764 (handle_general_set): Call handle_btrace_general_set.
7765 (handle_qxfer_btrace): New function.
7766 (struct qxfer qxfer_packets[]): Add btrace entry.
7767 * inferiors.c (remove_thread): Disable btrace.
7768 * linux-low: Include linux-btrace.h.
7769 (linux_low_enable_btrace): New function.
7770 (linux_low_read_btrace): New function.
7771 (linux_target_ops): Add btrace ops.
7772 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7773 Add srv_linux_btrace=yes.
7774 (x86_64-*-linux*): Add linux-btrace.o.
7775 Add srv_linux_btrace=yes.
7776 * configure.ac: Define HAVE_LINUX_BTRACE.
7777 * config.in: Regenerated.
7778 * configure: Regenerated.
7779
5cc22e4c
MM
77802013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7781
7782 * server.c (handle_qxfer): Preserve error message if -3 is
7783 returned.
7784 (qxfer): Document the -3 return value.
7785
7c97f91e
MM
77862013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7787
7788 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7789 (linux_btrace_h): New variable.
7790 (linux-btrace.o): New rule.
7791
be9a119c 77922013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
7793 Hafiz Abid Qadeer <abidh@codesourcery.com>
7794
7795 * tracepoint.c (trace_buffer_size): New global.
7796 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7797 (init_trace_buffer): Change to one-argument function. Allocate
7798 trace buffer memory.
7799 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7800 handle QTBuffer:size packet.
7801 (cmd_bigqtbuffer_size): New function.
7802 (initialize_tracepoint): Call init_trace_buffer with
7803 DEFAULT_TRACE_BUFFER_SIZE.
7804 * server.c (handle_query): Add QTBuffer:size in the
7805 supported packets.
7806
e64f7499
YQ
78072013-03-07 Yao Qi <yao@codesourcery.com>
7808
7809 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7810 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7811 of -1.
7812 (cmd_qtsp): Adjust condition. Do post increment.
7813 Set cur_action and cur_step_action back to 0.
7814
f0ae6fc3
PA
78152013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7816
7817 PR server/15236
7818 * linux-low.c (linux_write_memory): Return early success if LEN is
7819 zero.
7820
b5b0b0af
CV
78212013-03-05 Corinna Vinschen <vinschen@redhat.de>
7822
334ad4a8 7823 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 7824
589bc927
TT
78252013-02-28 Tom Tromey <tromey@redhat.com>
7826
7827 * configure.ac: Invoke AC_SYS_LARGEFILE.
7828 * configure, config.in: Rebuild.
7829
dfe07582
CV
78302013-02-28 Corinna Vinschen <vinschen@redhat.com>
7831
7832 * win32-low.c: Throughout, fix format strings and casts of
7833 printf-like functions to avoid type related warnings on all
7834 platforms.
7835 (get_child_debug_event): Print dwDebugEventCode as hex since
7836 that's how it's usually documented.
7837
736cd585
YQ
78382013-02-28 Yao Qi <yao@codesourcery.com>
7839
7840 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7841 pulongest.
7842
e1f58301
JW
78432013-02-27 Jiong Wang <jiwang@tilera.com>
7844
7845 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7846 (reg-tilegx32.c): New rule.
7847 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7848 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7849 different register info initializer according to elf class.
7850 (init_registers_tilgx32): New function. The tilegx32 register info
7851 initializer.
7852 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7853 (tile_store_gregset): Likewise.
7854
d171ca78
YQ
78552013-02-27 Yao Qi <yao@codesourcery.com>
7856
7857 * server.c (process_point_options): Print debug message when
7858 debug_threads is true.
7859
282bbdf3
YQ
78602013-02-26 Yao Qi <yao@codesourcery.com>
7861
7862 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7863
aca22551
PA
78642013-02-19 Pedro Alves <palves@redhat.com>
7865 Kai Tietz <ktietz@redhat.com>
7866
7867 PR gdb/15161
7868
7869 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7870 instead of strtoul to extract address from packet.
7871 (process_serial_event) <'z'>: Likewise.
7872
4f3cee1c
YQ
78732013-02-18 Yao Qi <yao@codesourcery.com>
7874
7875 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7876
8e1d55a3
PA
78772013-02-14 Pedro Alves <palves@redhat.com>
7878
7879 Plug memory leak.
7880
7881 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7882 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7883
458820da
PA
78842013-02-14 Pedro Alves <palves@redhat.com>
7885
7886 * tracepoint.c (cmd_qtdpsrc): Use savestring.
7887
baea0dae
PA
78882013-02-14 Pedro Alves <palves@redhat.com>
7889
7890 * tracepoint.c (save_string): Delete.
7891 (add_tracepoint_action): Use savestring instead of save_string.
7892
0b1afbb3
PA
78932013-02-12 Pedro Alves <palves@redhat.com>
7894
7895 * linux-xtensa-low.c: Ditto.
7896 * xtensa-xtregs.c: Ditto.
7897
8a4ac37e
PA
78982013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7899
7900 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7901 thread_db.
7902
148de6bb
MS
79032013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7904
7905 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7906 aarch64_num_wp_regs and aarch64_num_bp_regs to
7907 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7908
55fac6e0
MS
79092013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7910
7911 * linux-aarch64-low.c (ps_get_thread_area): Replace
7912 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7913
176eb98c
MS
79142013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7915 Marcus Shawcroft <marcus.shawcroft@arm.com>
7916 Nigel Stephens <nigel.stephens@arm.com>
7917 Yufeng Zhang <yufeng.zhang@arm.com>
7918
7919 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7920 (aarch64.c, aarch64-without-fpu.c): New targets.
7921 * configure.srv (aarch64*-*-linux*): New.
7922 * linux-aarch64-low.c: New file.
7923
56f7af9c
MS
79242013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7925
43aaf8b6 7926 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
7927 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7928 (dequeue_one_deferred_signal, linux_resume_one_thread)
7929 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7930 (linux_tracefork_grandchild, linux_test_for_tracefork)
7931 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7932 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7933 where the argument is 0.
7934
60f662b0
YQ
79352013-01-25 Yao Qi <yao@codesourcery.com>
7936
7937 * event-loop.c: Include "queue.h".
7938 (gdb_event_p): New typedef.
7939 (struct gdb_event) <next_event>: Remove.
7940 (event_queue): Change to QUEUE(gdb_event_p).
7941 (async_queue_event): Remove.
7942 (gdb_event_xfree): New.
7943 (initialize_event_loop): New.
7944 (process_event): Use API from QUEUE.
7945 (wait_for_event): Likewise.
7946 * server.c (main): Call initialize_event_loop.
7947 * server.h (initialize_event_loop): Declare.
7948
5ae4861a
YQ
79492013-01-18 Yao Qi <yao@codesourcery.com>
7950
7951 * ax.h (struct eval_agent_expr_context): New.
7952 (gdb_eval_agent_expr): Update declaration.
7953 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7954 TFRAME. Add new argument CTX.
7955 * server.h (struct eval_agent_expr_context): Declare.
7956 (agent_mem_read, agent_tsv_read): Update declaration.
7957 (agent_mem_read_string): Likewise.
7958 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7959 (add_traceframe_block): Add new argument TPOINT.
7960 Increase TPOINT->traceframe_usage.
7961 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7962 eval_tracepoint_agent_expr.
7963 (condition_true_at_tracepoint): Likewise.
7964 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7965 (agent_mem_read_string, agent_tsv_read): Likewise.
7966
85e00e85
YQ
79672013-01-16 Yao Qi <yao@codesourcery.com>
7968
7969 * linux-low.c (linux_resume_one_lwp): Don't check
7970 'lwp->bp_reinsert != 0'.
7971
4039cf45
JB
79722013-01-07 Joel Brobecker <brobecker@adacore.com>
7973 Pedro Alves <palves@redhat.com>
7974
7975 * lynx-low.c (ptrace_request_to_str): Define a temporary
7976 macro and use it to simplify this function's implementation.
7977
9044dee2
JB
79782013-01-07 Joel Brobecker <brobecker@adacore.com>
7979
7980 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7981 sets errno.
7982
e6352c8f
JB
79832013-01-07 Joel Brobecker <brobecker@adacore.com>
7984
7985 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7986
50681a27
JB
79872013-01-07 Joel Brobecker <brobecker@adacore.com>
7988
7989 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7990
3f6e77ef
JB
79912013-01-07 Joel Brobecker <brobecker@adacore.com>
7992
7993 * lynx-low.c (lynx_resume): Use the resume_info parameter
7994 to determine the ptid for the lynx_ptrace call, unless
7995 it is equal to minus_one_ptid, in which case we use the
7996 ptid of the current_inferior.
7997 (lynx_wait_1): After having received a thread create/exit
7998 event, resume the inferior's execution using the signaling
7999 thread's ptid, rather than the old ptid.
8000
7fda33ae
JB
80012013-01-07 Joel Brobecker <brobecker@adacore.com>
8002
8003 * lynx-low.c (lynx_resume): Delete variable ret.
8004
b9786c74
JB
80052013-01-01 Joel Brobecker <brobecker@adacore.com>
8006
8007 * gdbreplay.c (gdbreplay_version): Update copyright year.
8008 * server.c (gdbserver_version): Likewise.
8009
8b93d60f
JB
80102012-12-17 Joel Brobecker <brobecker@adacore.com>
8011
8012 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8013 new thread.
8014
037335a7
JB
80152012-12-17 Joel Brobecker <brobecker@adacore.com>
8016
8017 * lynx-low.c (ptrace_request_to_str): Add handling for
8018 PTRACE_GETTRACESIG.
8019
52d4cbd8
JB
80202012-12-17 Joel Brobecker <brobecker@adacore.com>
8021
8022 * lynx-low.c (lynx_attach): Delete variable new_process.
8023
ab8f6ca9
JB
80242012-12-17 Joel Brobecker <brobecker@adacore.com>
8025
8026 * lynx-low.c (lynx_create_inferior): Delete variable
8027 new_process.
8028
78cbc024
JB
80292012-12-17 Joel Brobecker <brobecker@adacore.com>
8030
8031 * lynx-low.c (ptrace_request_to_str): Do not handle
8032 PTRACE_GETTHREADLIST if this macro does not exist.
8033
14a00470
YQ
80342012-12-15 Yao Qi <yao@codesourcery.com>
8035
8036 * Makefile.in (OBS): Add notif.o.
8037 * notif.c, notif.h: New.
8038 * server.c: Include "notif.h".
8039 (struct vstop_notif) <next>: Remove.
8040 <base>: New field.
8041 (queue_stop_reply): Update.
8042 (push_event, send_next_stop_reply): Remove.
8043 (discard_queued_stop_replies): Update.
8044 (notif_stop): New variable.
8045 (handle_v_stopped): Remove.
8046 (handle_v_requests): Don't call handle_v_stopped. Call
8047 handle_ack_notif instead.
8048 (queue_stop_reply_callback): Call notif_event_enque instead
8049 of queue_stop_reply.
8050 (handle_status): Don't call send_next_stop_reply, call
8051 notif_write_event instead.
8052 (kill_inferior_callback): Likewise.
8053 (detach_or_kill_inferior_callback): Likewise.
8054 (main): Call initialize_notif.
8055 (process_serial_event): Call QUEUE_is_empty.
8056 (handle_target_event): Call notif_push instead of push event.
8057 * server.h (push_event): Remove declaration.
8058
61c125b9
TT
80592012-12-10 Tom Tromey <tromey@redhat.com>
8060
8061 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8062 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8063 macros.
8064 (.c.o): Rewrite.
8065 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8066 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8067 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8068 (amd64-linux-ipa.o, ax.o): Rewrite.
8069 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8070 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8071 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8072 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8073 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8074 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8075 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8076 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8077 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8078 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8079 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8080 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8081 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8082 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8083 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8084 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8085 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8086 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8087 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8088 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8089 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8090 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8091 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8092 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8093 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8094 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8095 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8096 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8097 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8098 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8099 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8100 (reg-tilegx.o): Remove.
8101 (all_object_files): New macro.
8102 Include .deps files.
8103 * aclocal.m4, configure: Rebuild.
8104 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8105 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8106 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8107
e90e9ad9
TT
81082012-12-05 Tom Tromey <tromey@redhat.com>
8109
8110 PR gdb/14917:
8111 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8112
02d403bf 81132012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
8114
8115 * configure.ac: Check for linux/perf_event.h.
8116 * config.in: Regenerated.
8117 * configure: Regenerated.
8118
0270a750
PA
81192012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8120
8121 * hostio.c (handle_readlink): Decrease buffer size
8122 parameter passed to readlink by one byte.
8123
8c29b58e
YQ
81242012-11-26 Yao Qi <yao@codesourcery.com>
8125
8126 * configure.ac (build_warnings): Append '-Wempty-body'.
8127 * configure: Regenerated.
8128 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8129 body.
8130
8bdce1ff
PM
81312012-11-15 Pierre Muller <muller@sourceware.org>
8132
8133 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8134 * config.in: Regenerate.
8135 * configure: Regenerate.
8136 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8137 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8138 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8139 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8140 header.
8141 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8142 instead of <sys/wait.h> header.
8143 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8144
02d403bf 81452012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
8146
8147 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8148 (various make rules): Remove -DGDBSERVER
8149
fbd5db48
YQ
81502012-11-09 Yao Qi <yao@codesourcery.com>
8151
8152 * spu-low.c (current_ptid): Move it to ..
8153 * gdbthread.h: ... here. New.
8154 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8155 * server.c (myresume, process_serial_event): Likewise.
8156 * thread-db.c (thread_db_find_new_threads): Likewise.
8157 * tracepoint.c (run_inferior_command): Likewise.
8158
b3dc46ff
AB
81592012-10-01 Andrew Burgess <aburgess@broadcom.com>
8160
8161 * server.c (handle_search_memory_1): Include access length in
8162 warning message.
8163
07c04788
HPN
81642012-09-05 Michael Brandt <michael.brandt@axis.com>
8165
8166 * linux-crisv32-low.c: Fix compile errors.
8167
918d227b
YQ
81682012-09-04 Yao Qi <yao@codesourcery.com>
8169
8170 * tracepoint.c (cmd_qtsv): Adjust debug message.
8171 Don't check CUR_TPOINT.
8172
18c1b81a
YQ
81732012-08-28 Yao Qi <yao@codesourcery.com>
8174
8175 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8176 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8177 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8178 Remove declarations of xmalloc, xreallloc, xstrdup and
8179 freeargv.
8180 * Makefile.in (libiberty_h): New.
8181 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8182 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8183
dc82f37b
YQ
81842012-08-23 Yao Qi <yao@codesourcery.com>
8185
8186 * server.h: Remove declaration of 'xsnprintf'.
8187
406b1477
KS
81882012-08-22 Keith Seitz <keiths@redhat.com>
8189
8190 * server.h: Include build-gnulib-gbserver/config.h.
8191 * gdbreplay.c: Likewise.
8192
e6712ff1
DE
81932012-08-08 Doug Evans <dje@google.com>
8194
8195 * Makefile.in (SFILES): Add gdb_vecs.c.
8196 (OBS): Add gdb_vecs.o.
8197 (gdb_vecs_h, host_defs_h): New variables.
8198 (thread-db.o): Add $(gdb_vecs_h) dependency.
8199 (gdb_vecs.o): New rule.
8200 * thread-db.c: #include "gdb_vecs.h".
8201 (thread_db_load_search): Use a vector to iterate over path elements.
8202 Handle text appearing after "$pdir".
8203
8204 * configure.ac: Add check for strstr.
8205 * config.in: Regenerate.
8206 * configure: Regenerate.
8207
7c3270ae
UW
82082012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8209
8210 * hostio.c (handle_pread): If pread fails, fall back to attempting
8211 lseek/read.
8212 (handle_pwrite): Likewise for pwrite.
8213
b62e2b27
UW
82142012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8215
8216 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8217 between unsupported TYPE and unimplementable ADDR/LEN combination.
8218 (arm_insert_point): Act on new return value.
8219
78a99e91
PA
82202012-07-31 Pedro Alves <palves@redhat.com>
8221
8222 * server.c (process_point_options): Only skip tokens if we find
8223 one that is unrecognized. Don't treat 'X' specially while
8224 skipping unrecognized tokens.
8225
fcf303ab
UW
82262012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8227
8228 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8229 to 4-byte-align HW breakpoint addresses for Thumb.
8230
7255706c
YQ
82312012-07-27 Yao Qi <yao@codesourcery.com>
8232
8233 PR remote/14161.
8234
8235 * server.h: Declare gdb_agent_about_to_close.
8236 * target.c (kill_inferior): Include "agent.h".
8237 New. Send command 'kill'.
8238 * target.h (kill_inferior): Removed macro.
8239 * tracepoint.c (gdb_agent_about_to_close): New.
8240 (gdb_agent_helper_thread): Handle command 'close'.
8241 Wait endlessly until the inferior stops.
8242 Install gdb_agent_remove_socket to atexit hook.
8243 (agent_socket_name): New static variable.
8244 (gdb_agent_socket_init): Replace local variable 'name' with
8245 'agent_socket_name'.
8246 (gdb_agent_remove_socket): New.
8247
5a3f286f
YQ
82482012-07-27 Yao Qi <yao@codesourcery.com>
8249
8250 * server.c (process_point_options): Stop at 'X' when parsing.
8251
961bd387
ME
82522012-07-19 Michael Eager <eager@eagercon.com>
8253
a261b8f5 8254 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
8255 to hw_execute.
8256 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8257 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8258 hardware breakpoint.
8259
aa7c7447
JK
82602012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8261
8262 * gdbserver/linux-low.c (initialize_low): Call
8263 linux_ptrace_init_warnings.
8264
7f216e7c
DE
82652012-07-02 Doug Evans <dje@google.com>
8266
8267 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8268 pointer to int.
8269
d3ce09f5
SS
82702012-07-02 Stan Shebs <stan@codesourcery.com>
8271
8272 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8273 (ax.o): Add it to build rule.
8274 (ax-ipa.o): Ditto.
8275 (OBS): Add format.o.
8276 (IPA_OBS): Add format.o.
8277 * server.c (handle_query): Claim support for breakpoint commands.
8278 (process_point_options): Add command case.
8279 (process_serial_event): Leave running if there are printfs in
8280 effect.
8281 * mem-break.h (any_persistent_commands): Declare.
8282 (add_breakpoint_commands): Declare.
8283 (gdb_no_commands_at_breakpoint): Declare.
8284 (run_breakpoint_commands): Declare.
8285 * mem-break.c (struct point_command_list): New struct.
8286 (struct breakpoint): New field command_list.
8287 (any_persistent_commands): New function.
8288 (add_commands_to_breakpoint): New function.
8289 (add_breakpoint_commands): New function.
8290 (gdb_no_commands_at_breakpoint): New function.
8291 (run_breakpoint_commands): New function.
8292 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8293 locally.
8294 * ax.c: Include format.h.
8295 (ax_printf): New function.
8296 (gdb_eval_agent_expr): Add printf opcode.
8297
2f8f6aed
YQ
82982012-06-13 Yao Qi <yao@codesourcery.com>
8299
8300 * server.c (start_inferior): Remove duplicated writes to fields
8301 'last_resume_kind' and 'last_status' of 'current_inferior'.
8302
0c9070b3
YQ
83032012-06-12 Yao Qi <yao@codesourcery.com>
8304 Pedro Alves <palves@redhat.com>
8305
8306 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8307 comment.
8308 * server.c (handle_v_cont): Extend comment.
8309
c52daf70
YQ
83102012-06-11 Yao Qi <yao@codesourcery.com>
8311
8312 * linux-low.c (linux_attach): Add 'static'.
8313
d38bbb0a
YQ
83142012-06-06 Yao Qi <yao@codesourcery.com>
8315
8316 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8317
89dc0afd
JK
83182012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8319
8320 Fix gcc -flto compilation warning.
8321 * server.c (main): Make variable multi_mode and attach volatile.
8322
75f62ce7
TJB
83232012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8324
8325 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8326 if the platform doesn't know about it.
8327
65f479b6
PA
83282012-05-30 Jeff Kenton <jkenton@tilera.com>
8329
8330 * Makefile.in (SFILES): Add linux-tile-low.c.
8331 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8332 * configure.srv: Handle tilegx-*-linux*.
8333 * linux-tile-low.c: New file.
8334
0c5bf5a9
JK
83352012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8336
8337 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8338
a493e3e2
PA
83392012-05-24 Pedro Alves <palves@redhat.com>
8340
8341 PR gdb/7205
8342
43aaf8b6 8343 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 8344
2ea28649
PA
83452012-05-24 Pedro Alves <palves@redhat.com>
8346
8347 PR gdb/7205
8348
8349 Replace target_signal with gdb_signal throughout.
8350
8d409d16
MR
83512012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8352
8353 * linux-low.c (linux_store_registers): Avoid the copying sequence
8354 when no data has been retrieved by ptrace.
8355
23512c01
MGD
83562012-05-22 Will Deacon <will.deacon@arm.com>
8357
8358 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8359 Include asm/ptrace.h.
8360 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8361 already defined.
8362
4934b29e
MR
83632012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8364
8365 * linux-low.c (linux_store_registers): Don't re-retrieve data
8366 with ptrace that has already been obtained from /proc. Always
8367 copy any data retrieved with ptrace to the buffer supplied.
8368
bde24c0a
PA
83692012-05-11 Yao Qi <yao@codesourcery.com>
8370 Pedro Alves <palves@redhat.com>
8371
8372 * linux-low.c (enum stopping_threads_kind): New.
8373 (stopping_threads): Change type to `enum stopping_threads_kind'.
8374 (handle_extended_wait): If stopping and suspending threads, leave
8375 the new_lwp suspended too.
8376 (linux_wait_for_event): Adjust.
8377 (stop_all_lwps): Set `stopping_threads' to
8378 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8379 whether we're suspending threads or just stopping them. Assert no
8380 recursion happens.
8381
623b6bdf
YQ
83822012-04-29 Yao Qi <yao@codesourcery.com>
8383
8384 * server.h: Move some code to ...
8385 * gdbthread.h: ... here. New.
8386 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8387 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8388 (nto-low.o, win32-low.o): Likewise.
8389 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8390 * regcache.c, remote-utils.c, server.c: Likewise.
8391 * target.c, tracepoint.c, win32-low.c: Likewise.
8392
f15f9948
TJB
83932012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8394
8395 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8396 (PTRACE_ARG4_TYPE): Likewise.
8397 (PTRACE_XFER_TYPE): Likewise.
8398 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8399 ptrace to PTRACE_ARG3_TYPE.
8400 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8401 (PTRACE_ARG4_TYPE): Likewise.
8402 (PTRACE_XFER_TYPE): Likewise.
8403 (linux_detach_one_lwp): Cast fourth argument of
8404 ptrace to long then PTRACE_ARG4_TYPE.
8405 (regsets_fetch_inferior_registers): Cast third argument of
8406 ptrace to long then PTRACE_ARG3_TYPE.
8407 (regsets_store_inferior_registers): Likewise.
8408
38ea300a
PA
84092012-04-20 Pedro Alves <palves@redhat.com>
8410
8411 * configure: Regenerate.
8412
c971b7fa
PA
84132012-04-19 Pedro Alves <palves@redhat.com>
8414
43aaf8b6 8415 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 8416 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
8417 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8418 (all, install-only, uninstall, clean-info, all-lib, clean): No
8419 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8420 (maintainer-clean realclean distclean): Use subdir_do.
8421 (subdir_do): New.
8422 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 8423 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
8424 * acinclude.m4: Include acx_configure_dir.m4.
8425 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8426 calls. Call AC_PROG_RANLIB. Configure gnulib using
8427 ACX_CONFIGURE_DIR.
8428 (GNULIB): New.
8429 (GNULIB_STDINT_H): Adjust.
8430 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8431 * gdbreplay.c: Include build-gnulib/config.h.
8432 * server.h: Likewise.
8433 * aclocal.m4: Regenerate.
8434 * config.in: Regenerate.
8435 * configure: Regenerate.
c971b7fa 8436
809277f8
PA
84372012-04-19 Pedro Alves <palves@redhat.com>
8438
8439 * Makefile.in (LIBGNU, INCGNU): Adjust.
8440 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8441 (all, install-only, uninstall, clean-info, all-lib, clean)
8442 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8443 * configure.ac: Adjust AC_OUTPUT output.
8444 * aclocal.m4: Regenerate.
8445 * configure: Regenerate.
8446
fd9bb8b8
PA
84472012-04-19 Pedro Alves <palves@redhat.com>
8448
8449 * Makefile.in (generated_files): New.
8450 (server_h): Remove the explicit dependency on config.h, and depend
8451 on $generated_files.
8452
1c298c66
PA
84532012-04-19 Pedro Alves <palves@redhat.com>
8454
8455 * Makefile.in (INCGNU): Add -Ignulib.
8456
57c4b50b
PA
84572012-04-19 Pedro Alves <palves@redhat.com>
8458
8459 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8460 (INCGNU): ... this, and spell out -I here.
8461 (GNULIB_LIB): Rename to ...
8462 (LIBGNU): ... this.
8463 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8464
1030e047
PA
84652012-04-19 Pedro Alves <palves@redhat.com>
8466
8467 * config.in: Regenerate.
8468
447d4319
PA
84692012-04-19 Pedro Alves <palves@redhat.com>
8470
8471 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8472 * server.h (memmem): Remove declaration.
8473 * config.in: Regenerate.
8474 * configure: Regenerate.
8475
aad9eab9
YQ
84762012-04-19 Yao Qi <yao@codesourcery.com>
8477
8478 * Makefile.in (SFILES): Add common/vec.c.
8479 (OBS): Add vec.o.
8480 (vec.o): New rule.
8481
3e10640f
YQ
84822012-04-19 Yao Qi <yao@codesourcery.com>
8483
8484 * remote-utils.c (prepare_resume_reply): Replace with macro
8485 target_core_of_thread.
8486 * server.c (handle_qxfer_threads_proper): Likewise.
8487 * target.h (traget_core_of_thread): New macro.
8488
71622373
PA
84892012-04-18 Pedro Alves <palves@redhat.com>
8490
8491 * aclocal.m4: Regenerate.
8492 * configure: Regenerate.
8493
80d26939
YQ
84942012-04-16 Yao Qi <yao@codesourcery.com>
8495
8496 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8497 duplicated on address.
8498
42476b70
YQ
84992012-04-16 Yao Qi <yao@codesourcery.com>
8500
8501 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8502 (struct tracepoint_action_ops) <send>: New field.
8503 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8504 (agent_expr_send, x_tracepoint_action_send): New.
8505 (l_tracepoint_action_send): New.
8506 (cmd_qtdp): Download and install tracepoint
8507 according to `use_agent'.
8508 (run_inferior_command): Add one more parameter `len'.
8509 Update callers.
8510 (tracepoint_send_agent): New.
8511 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8512
7bc83639
YQ
85132012-04-16 Yao Qi <yao@codesourcery.com>
8514
8515 * tracepoint.c (download_tracepoints): Moved to ...
8516 (cmd_qtstart): ... here.
8517
5f18041e
YQ
85182012-04-14 Yao Qi <yao@codesourcery.com>
8519
8520 * tracepoint.c: Include inttypes.h.
8521 (struct collect_memory_action): Use sized types.
8522 (struct tracepoint): Likewise.
8523 (cmd_qtdp, stop_tracing): Update print specifiers.
8524 (cmd_qtp, response_tracepoint): Likewise.
8525 (collect_data_at_tracepoint): Likewise.
8526 (collect_data_at_step): Likewise.
8527
55a8c076
YQ
85282012-04-14 Yao Qi <yao@codesourcery.com>
8529
8530 Import gnulib module inttypes.
8531 * aclocal.m4, config.in, configure: Regenerated.
8532
dc750257
YQ
85332012-04-14 Yao Qi <yao@codesourcery.com>
8534
8535 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8536 Makefile and config.status at last.
8537
0ab5faf9
YQ
85382012-04-13 Yao Qi <yao@codesourcery.com>
8539
8540 * tracepoint.c: Include stdint.h unconditionally.
8541
18f5fd81
TJB
85422012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8543
8544 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8545 on BFD_HAVE_SYS_PROCFS_TYPE.
8546 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8547 * configure: Regenerate.
8548 * config.in: Likewise.
8549
4d47af5c
L
85502012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8551
8552 * Makefile.in (clean): Also remove x32.c x32-linux.c
8553 x32-avx.c x32-avx-linux.c.
8554 (x32.o): New target.
8555 (x32.c): Likewise.
8556 (x32-linux.o): Likewise.
8557 (x32-linux.c): Likewise.
8558 (x32-avx.o): Likewise.
8559 (x32-avx.c): Likewise.
8560 (x32-avx-linux.o): Likewise.
8561 (x32-avx-linux.c): Likewise.
8562
8563 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8564 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8565 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8566 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8567 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8568 i386/x32-avx-linux.xml.
8569
8570 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8571 (init_registers_x32_avx_linux): Likwise.
8572 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8573 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8574
ecedbe58
PA
85752012-04-13 Pedro Alves <palves@redhat.com>
8576
8577 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8578 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8579 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8580 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8581 the sub-make.
8582
c92b5177
L
85832012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8584
8585 * linux-x86-low.c (compat_x32_clock_t): New.
8586 (compat_x32_siginfo_t): Likewise.
8587 (compat_x32_siginfo_from_siginfo): Likewise.
8588 (siginfo_from_compat_x32_siginfo): Likewise.
8589 (linux_is_elf64): Likewise.
8590 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8591 and siginfo_from_compat_x32_siginfo for x32.
8592 (x86_arch_setup): Set linux_is_elf64.
8593
214d508e
L
85942012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8595
8596 PR gdb/13969
8597 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8598 e_machine field.
8599 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8600 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8601 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8602 compatible with process.
8603
c9a1864a
YQ
86042012-04-12 Yao Qi <yao@codesourcery.com>
8605
8606 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8607 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8608 (install-only, install-info, clean): Handle sub dir gnulib.
8609 (all-lib, am--refresh): New targets.
8610 (memmem.o): Remove target.
8611 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8612 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8613 (AC_REPLACE_FUNCS): Remove memmem.
8614 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8615 (AC_OUTPUT): Generate Makefile in gnulib/.
8616 * aclocal.m4, config.in, configure: Regenerated.
8617
367ba2c2
MR
86182012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8619
8620 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8621
9d236627
PA
86222012-04-05 Pedro Alves <palves@redhat.com>
8623
8624 -Werror=strict-aliasing
8625
8626 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8627 pointer.
8628
111217b3
PA
86292012-04-04 Pedro Alves <palves@redhat.com>
8630
8631 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8632 (sparc_store_gregset_from_stack, sparc_store_gregset)
8633 (sparc_breakpoint_at): Fix formatting.
8634
8365dcf5
TJB
86352012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8636
8637 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8638 are available.
8639 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8640 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8641 * config.in: Regenerate.
8642 * configure: Likewise.
8643
689cc2ae
PA
86442012-03-29 Pedro Alves <palves@redhat.com>
8645
8646 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8647 Correct ptrace arguments.
8648
c14dfd32
PA
86492012-03-28 Pedro Alves <palves@redhat.com>
8650
8651 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8652 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8653 (IA64_FR1_REGNUM): New defines.
8654 (ia64_fetch_register): New.
8655 (the_low_target): Install it.
8656 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8657 field.
8658 * linux-low.c (linux_fetch_registers): Try the
8659 the_low_target.fetch_register hook first.
8660
8661 * linux-arm-low.c (the_low_target): Adjust.
8662 * linux-bfin-low.c (the_low_target): Adjust.
8663 * linux-cris-low.c (the_low_target): Adjust.
8664 * linux-crisv32-low.c (the_low_target): Adjust.
8665 * linux-m32r-low.c (the_low_target): Adjust.
8666 * linux-m68k-low.c (the_low_target): Adjust.
8667 * linux-mips-low.c (the_low_target): Adjust.
8668 * linux-ppc-low.c (the_low_target): Adjust.
8669 * linux-s390-low.c (the_low_target): Adjust.
8670 * linux-sh-low.c (the_low_target): Adjust.
8671 * linux-sparc-low.c (the_low_target): Adjust.
8672 * linux-tic6x-low.c (the_low_target): Adjust.
8673 * linux-x86-low.c (the_low_target): Adjust.
8674 * linux-xtensa-low.c (the_low_target): Adjust.
8675
63c88e13
PA
86762012-03-26 Pedro Alves <palves@redhat.com>
8677
8678 * server.c (handle_qxfer_libraries): Don't bail early if
8679 the_target->qxfer_libraries_svr4 is not NULL.
8680
fb723180
PA
86812012-03-26 Pedro Alves <palves@redhat.com>
8682
8683 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8684
0afae3cf
PA
86852012-03-23 Pedro Alves <palves@redhat.com>
8686
8687 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8688 "library-list-svr4" element's start tag when the the DSO list is
8689 empty.
8690
485f1ee4
PA
86912012-03-23 Pedro Alves <palves@redhat.com>
8692
8693 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8694 a variable whose type size is the same as the inferior's pointer
8695 size.
8696
a5362b9a
TS
86972012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8698
8699 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8700 struct siginfo.
8701 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8702 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8703 * linux-low.h: Include <signal.h>.
8704 (struct siginfo): Remove forward declaration.
8705 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8706 struct siginfo.
8707
d226c142
MF
87082012-03-21 Mike Frysinger <vapier@gentoo.org>
8709
8710 * .gitignore: Ignore more files.
8711
122f36ef
PA
87122012-03-19 Pedro Alves <palves@redhat.com>
8713 Jan Kratochvil <jan.kratochvil@redhat.com>
8714
8715 * server.c (cont_thread, general_thread): Add describing comments.
8716 (start_inferior): Clear `cont_thread'.
8717 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8718 of a process.
8719
fc3e5175
YQ
87202012-03-15 Yao Qi <yao@codesourcery.com>
8721
8722 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8723 handling to ...
8724 (cmd_qtdp): ... here.
8725
8d0d92cd
YQ
87262012-03-15 Yao Qi <yao@codesourcery.com>
8727
8728 * tracepoint.c (struct tracepoint_action_ops): New.
8729 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8730 (m_tracepoint_action_download): New.
8731 (r_tracepoint_action_download): New.
8732 (x_tracepoint_action_download): New.
8733 (l_tracepoint_action_download): New.
8734 (add_tracepoint_action): Install `action->ops' according type.
8735 (download_tracepoint_1): Move code `download' function pointer
8736 of various tracepoint_action_ops.
8737
87b0bb13
JK
87382012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8739
8740 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8741 linux_ptrace_attach_warnings.
8742
5f572dec
JK
87432012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8744
8745 * Makefile.in (linux-ptrace.o): New.
8746 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8747 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8748 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8749 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8750 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8751 of these targets.
8752 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8753
f4647387
YQ
87542012-03-08 Yao Qi <yao@codesourcery.com>
8755 Pedro Alves <palves@redhat.com>
8756
8757 Fix PR server/13392.
8758 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8759 offset of JMP insn.
8760 * tracepoint.c (remove_tracepoint): New.
8761 (cmd_qtdp): Call remove_tracepoint when failed to install.
8762
9b224c5e
PA
87632012-03-07 Pedro Alves <palves@redhat.com>
8764
8765 * linux-low.c (get_detach_signal): New.
8766 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8767 Pass on pending signals to PTRACE_DETACH. Check the result of the
8768 ptrace call.
8769 * server.c (program_signals, program_signals_p): New.
8770 (handle_general_set): Handle QProgramSignals.
8771 * server.h (program_signals, program_signals_p): Declare.
8772
e237a7e2
JK
87732012-03-05 Pedro Alves <palves@redhat.com>
8774 Jan Kratochvil <jan.kratochvil@redhat.com>
8775
8776 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8777 New comment why.
8778
5808517f
YQ
87792012-03-03 Yao Qi <yao@codesourcery.com>
8780
8781 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8782 agent_look_up_symbols.
8783
58b4daa5
YQ
87842012-03-03 Yao Qi <yao@codesourcery.com>
8785
8786 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8787 (linux-x86-low.o): Likewise.
8788 * server.h: Remove in_process_agent_loaded.
8789 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8790 common/agent.c.
8791 Update callers.
8792
8ffcbaaf
YQ
87932012-03-03 Yao Qi <yao@codesourcery.com>
8794
8795 * tracepoint.c (gdb_agent_capability): New global.
8796 (in_process_agent_loaded_ust): Renamed to
8797 `in_process_agent_supports_ust'.
8798 Update callers.
8799 (in_process_agent_supports_ust): Call agent_capability_check.
8800 (clear_installed_tracepoints): Assert that agent supports
8801 agent.
8802
d1feda86
YQ
88032012-03-03 Yao Qi <yao@codesourcery.com>
8804
8805 * linux-low.c (linux_supports_agent): New.
8806 (linux_target_ops): Initialize field `supports_agent' with
8807 linux_supports_agent.
8808 * target.h (struct target_ops) <supports_agent>: New.
8809 (target_supports_agent): New macro.
8810 * server.c (handle_general_set): Handle packet 'QAgent'.
8811 (handle_query): Send `QAgent+'.
8812 * Makefile.in (server.o): Depends on agent.h.
8813
2fa291ac
YQ
88142012-03-03 Yao Qi <yao@codesourcery.com>
8815
8816 * Makefile.in (OBS): Add agent.o.
8817 Add new rule for agent.o.
8818 Track dependence of tracepoint.c on agent.h.
8819 * tracepoint.c (run_inferior_command_1):
8820 (run_inferior_command): Call agent_run_command.
8821 (gdb_ust_connect_sync_socket): Deleted. Move it to
8822 common/agent.c.
8823 (resume_thread, stop_thread): Likewise.
8824 (gdb_ust_socket_init): Renamed to ...
8825 (gdb_agent_socket_init): ... New.
8826 (gdb_ust_thread): Renamed to ...
8827 (gdb_agent_helper_thread): ... New.
8828 (gdb_ust_init): Move some code to ...
8829 (gdb_agent_init): ... here. New.
8830 [HAVE_UST]: Call gdb_ust_init.
8831 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8832 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8833 * config.in, configure: Regenerated.
8834
05044653
PA
88352012-03-02 Pedro Alves <palves@redhat.com>
8836
8837 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8838 * linux-low.c (struct simple_pid_list): New.
8839 (stopped_pids): New a struct simple_pid_list pointer.
8840 (add_to_pid_list, pull_pid_from_list): New.
8841 (handle_extended_wait): Don't assume the first signal new children
8842 report is SIGSTOP. Adjust call to pull_pid_from_list.
8843 (linux_wait_for_lwp): Adjust.
8844
8d00225b
YQ
88452012-03-02 Yao Qi <yao@codesourcery.com>
8846
8847 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8848 debug log.
8849
19560ba5
YQ
88502012-03-02 Yao Qi <yao@codesourcery.com>
8851
8852 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8853 `stop_pc' and `tpoint'. Update caller.
8854
1faeff08
MR
88552012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8856
8857 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8858 * linux-low.c (use_linux_regsets): New macro.
8859 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8860 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8861 (linux_register_in_regsets): New function.
8862 (usr_fetch_inferior_registers): Skip registers covered by
8863 regsets.
8864 (usr_store_inferior_registers): Likewise.
8865 (usr_fetch_inferior_registers): New macro.
8866 (usr_store_inferior_registers): Likewise.
8867 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8868 (linux_store_registers): Likewise.
8869 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8870 prototype.
8871 (init_registers_mips64_dsp_linux): Likewise.
8872 (init_registers_mips_linux): New macro.
8873 (init_registers_mips_dsp_linux): Likewise.
8874 (mips_dsp_num_regs): Likewise.
8875 (DSP_BASE, DSP_CONTROL): New fallback macros.
8876 (mips_base_regs): New macro.
8877 (mips_regmap): Use it. Fix the size.
8878 (mips_dsp_regmap): New variable.
8879 (mips_dsp_regset_bitmap): Likewise.
8880 (mips_arch_setup): New function.
8881 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8882 than mips_regmap.
8883 (mips_cannot_store_register): Likewise.
8884 (the_low_target): Update .arch_setup, .num_regs and .regmap
8885 initializers. Add .regset_bitmap initializer.
8886 * linux-arm-low.c (the_low_target): Add .regset_bitmap
8887 initializer.
8888 * linux-bfin-low.c (the_low_target): Likewise.
8889 * linux-cris-low.c (the_low_target): Likewise.
8890 * linux-crisv32-low.c (the_low_target): Likewise.
8891 * linux-ia64-low.c (the_low_target): Likewise.
8892 * linux-m32r-low.c (the_low_target): Likewise.
8893 * linux-m68k-low.c (the_low_target): Likewise.
8894 * linux-ppc-low.c (the_low_target): Likewise.
8895 * linux-s390-low.c (the_low_target): Likewise.
8896 * linux-sh-low.c (the_low_target): Likewise.
8897 * linux-sparc-low.c (the_low_target): Likewise.
8898 * linux-tic6x-low.c (the_low_target): Likewise.
8899 * linux-x86-low.c (the_low_target): Likewise.
8900 * linux-xtensa-low.c (the_low_target): Likewise.
8901 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8902 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8903 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8904 srv_xmlfiles.
8905 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8906 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8907
c03e6ccc
YQ
89082012-02-29 Yao Qi <yao@codesourcery.com>
8909 Pedro Alves <palves@redhat.com>
8910
8911 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8912 `step_over_finished' is true.
8913
644cebc9
PA
89142012-02-27 Pedro Alves <palves@redhat.com>
8915
8916 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8917 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8918
c14d7ab2
PA
89192012-02-27 Pedro Alves <palves@redhat.com>
8920
8921 PR server/9684
8922 * linux-low.c (pid_is_stopped): New.
8923 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8924
412c89dd
LM
89252012-02-25 Luis Machado <lgustavo@codesourcery.com>
8926
8927 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8928 of conditions.
8929
b745defe
MR
89302012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8931
8932 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8933
9f3a5c85
LM
89342012-02-24 Luis Machado <lgustavo@codesourcery>
8935
8936 * server.c (handle_query): Advertise support for target-side
8937 breakpoint condition evaluation.
8938 (process_point_options): New function.
8939 (process_serial_event): When inserting a breakpoint, check for
8940 a target-side condition that should be evaluated.
8941
8942 * mem-break.c: Include regcache.h and ax.h.
8943 (point_cond_list_t): New data structure.
8944 (breakpoint) <cond_list>: New field.
8945 (find_gdb_breakpoint_at): Make non-static.
8946 (delete_gdb_breakpoint_at): Clear any target-side
8947 conditions.
8948 (clear_gdb_breakpoint_conditions): New function.
8949 (add_condition_to_breakpoint): Likewise.
8950 (add_breakpoint_condition): Likewise.
8951 (gdb_condition_true_at_breakpoint): Likewise.
8952 (gdb_breakpoint_here): Return result directly instead
8953 of going through a local variable.
8954
8955 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8956 (clear_gdb_breakpoint_conditions): Likewise.
8957 (add_breakpoint_condition): Likewise.
8958 (gdb_condition_true_at_breakpoint): Likewise.
8959
8960 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8961 (need_step_over_p): Take target-side breakpoint condition into
8962 consideration.
8963
5e1dc496
LM
89642012-02-24 Luis Machado <lgustavo@codesourcery>
8965
8966 * server.h: Include tracepoint.h.
8967 (agent_mem_read, agent_get_trace_state_variable_value,
8968 agent_set_trace_state_variable_value,
8969 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8970 get_set_tsv_func_addr): New prototypes.
8971
8972 * ax.h: New include file.
8973 * ax.c: New source file.
8974
8975 * tracepoint.c: Include ax.h.
8976 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8977 agent_expr, eval_result_type): Move to ax.h.
8978 (parse_agent_expr): Rename to ...
8979 (gdb_parse_agent_expr): ... this, make it non-static and move
8980 to ax.h.
8981 (unparse_agent_expr) Rename to ...
8982 (gdb_unparse_agent_expr): ... this, make it non-static and move
8983 to ax.h.
8984 (eval_agent_expr): Rename to ...
8985 (eval_tracepoint_agent_expr): ... this.
8986 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8987 forward declarations.
8988 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8989 (agent_get_trace_state_variable_value): New function.
8990 (agent_set_trace_state_variable_value): New function.
8991 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8992 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8993 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8994 (condition_true_at_tracepoint): Likewise.
8995 (parse_agent_expr): Rename to ...
8996 (gdb_parse_agent_expr): ... this and move to ax.c.
8997 (unparse_agent_expr): Rename to ...
8998 (gdb_unparse_agent_expr): ... this and move to ax.c.
8999 (gdb_agent_op_name): Move to ax.c.
9000 (eval_agent_expr): Rename to ...
9001 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9002 and move to ax.c.
9003 (eval_tracepoint_agent_expr): New function.
9004 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 9005 non-static.
5e1dc496
LM
9006 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9007 ax.c.
9008 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9009 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9010 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9011 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9012 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9013 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9014 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9015 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9016 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9017 (compile_bytecodes): Remove forward declaration.
9018 (is_goto_target): Move to ax.c.
9019 (compile_bytecodes): Move to ax.c and call
9020 agent_get_trace_state_variable_value (...) and
9021 agent_set_trace_state_variable_value (...).
9022
9023 * Makefile.in: Update ax.c and IPA dependencies.
9024
277e4e52
PA
90252012-02-24 Pedro Alves <palves@redhat.com>
9026
9027 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9028 (cmd_bigqtbuffer_circular): ... this. Only handle
9029 'QTBuffer:circular:'.
9030 (handle_tracepoint_general_set): Adjust.
9031
bf4c19f7
YQ
90322012-02-16 Yao Qi <yao@codesourcery.com>
9033
9034 * inferiors.c: Move code to ...
9035 * dll.c: .... here. New.
9036 * server.h: Declare clear_dlls.
9037 * Makefile.in (SFILES): Add dll.c.
9038 (OBS): Add dll.o
9039 (dll.o): New rule.
9040
d73f2619
YQ
90412012-02-11 Yao Qi <yao@codesourcery.com>
9042
9043 * server.c: (handle_monitor_command): Add a new parameter
9044 `own_buf'.
9045 (handle_query): Update caller.
9046
f8255c2a
JB
90472012-02-09 Joel Brobecker <brobecker@adacore.com>
9048
9049 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9050 * configure, config.in: Regenerate.
9051 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9052 is not defined.
9053
da84f473
PA
90542012-02-02 Pedro Alves <palves@redhat.com>
9055
9056 Try SIGKILL first, then PTRACE_KILL.
9057 * linux-low.c (linux_kill_one_lwp): New.
9058 (linux_kill_one_lwp): Rename to ...
9059 (kill_one_lwp_callback): ... this. Use the new
9060 linux_kill_one_lwp.
9061
e886a173
PA
90622012-02-02 Pedro Alves <palves@redhat.com>
9063
9064 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9065 inferior.
9066
be07f1a2
PA
90672012-01-27 Pedro Alves <palves@redhat.com>
9068
9069 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9070 (elf_64_file_p): Make static.
9071 (linux_pid_exe_is_elf_64_file): New.
9072 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9073 Delete declarations.
9074 (linux_pid_exe_is_elf_64_file): Declare.
9075 * linux-x86-low.c (x86_arch_setup): Use
9076 linux_pid_exe_is_elf_64_file.
9077
d8301ad1
JK
90782012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9079
9080 * linux-low.c (linux_wait_for_event_1): Rename to ...
9081 (linux_wait_for_event): ... here and merge it with former
9082 linux_wait_for_event - new variable wait_ptid, use it.
9083 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9084
01b17894
PA
90852012-01-23 Pedro Alves <palves@redhat.com>
9086
9087 * server.c (main): Avoid yet another case of infinite loop while
9088 detaching/killing after a longjmp.
9089
e825046f
JK
90902012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9091
9092 Code cleanup.
9093 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9094
b9e7b9c3
UW
90952012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9096
9097 * hostio.c (handle_readlink): New function.
9098 (handle_vFile): Call it to handle "vFile:readlink" packets.
9099
901f9912
UW
91002012-01-20 Pedro Alves <palves@redhat.com>
9101 Ulrich Weigand <ulrich.weigand@linaro.org>
9102
9103 * server.c (handle_v_requests): Only support vAttach and vRun to
9104 start multiple processes when in extended protocol mode.
9105
fc1ab1a0
PA
91062012-01-17 Pedro Alves <palves@redhat.com>
9107
9108 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9109 memalign plus mprotect to allocate the scratch buffer.
9110
7d5d4e98
PA
91112012-01-13 Pedro Alves <palves@redhat.com>
9112
9113 * server.c (attach_inferior): Clear `cont_thread'.
9114
f128d5e9
PA
91152012-01-13 Pedro Alves <palves@redhat.com>
9116
9117 * server.c (main): Avoid infinite loop while detaching/killing
9118 after a longjmp.
9119
06db92f0
DE
91202012-01-09 Doug Evans <dje@google.com>
9121
9122 * server.c (start_inferior): Set last_ptid in --wrapper case.
9123
32d92999
YQ
91242012-01-06 Yao Qi <yao@codesourcery.com>
9125
9126 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9127 defined.
9128 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9129
5e0a92a9
YQ
91302012-01-04 Yao Qi <yao@codesourcery.com>
9131
9132 * tracepoint.c (cmd_qtdp): Print debug message
9133 for static tracepoint.
9134
ae639e8c
YQ
91352012-01-04 Yao Qi <yao@codesourcery.com>
9136
9137 * tracepoint.c (trace_vdebug): Differentiate debug message
9138 between gdbserver and IPA.
9139
f72429c5
YQ
91402012-01-03 Yao Qi <yao@codesourcery.com>
9141
9142 * tracepoint.c (tracepoint_was_hit): Don't collect for
9143 static tracepoint.
9144
12c3e59c
JB
91452012-01-02 Joel Brobecker <brobecker@adacore.com>
9146
9147 * terminal.h: Reformat copyright header.
9148
67827812
JB
91492012-01-02 Joel Brobecker <brobecker@adacore.com>
9150
9151 * server.c (gdbserver_version): Update copyright year.
9152 * gdbreplay.c (gdbreplay_version): Likewise.
9153
3e52c33d
JK
91542011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9155
9156 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9157
9158 Revert:
9159 2011-12-18 Hui Zhu <teawater@gmail.com>
9160 * linux-low.c (linux_create_inferior): Save return value to ret.
9161
66f1260e
HZ
91622011-12-18 Hui Zhu <teawater@gmail.com>
9163
9164 * linux-low.c (linux_create_inferior): Save return value to ret.
9165
e77616d7
DE
91662011-12-16 Doug Evans <dje@google.com>
9167
e7b06c57
DE
9168 * linux-low.c (linux_create_inferior): If stdio connection,
9169 redirect stdin from /dev/null, stdout to stderr.
9170 * remote-utils.c (remote_is_stdio): New static global.
9171 (remote_connection_is_stdio): New function.
9172 (remote_prepare): Handle stdio connection.
9173 (remote_open): Ditto.
9174 (remote_close): Don't close stdin for stdio connections.
9175 (read_prim,write_prim): New functions. Replace all calls to
9176 read/write to these.
9177 * server.c (main): Watch for "-" argument. Move call to
9178 remote_prepare before start_inferior.
9179 * server.h (STDIO_CONNECTION_NAME): New macro.
9180 (remote_connection_is_stdio): Declare.
9181
e77616d7
DE
9182 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9183 in debugging output.
9184
82067193
YQ
91852011-12-15 Yao Qi <yao@codesourcery.com>
9186
9187 * tracepoint.c: Include sys/syscall.h.
9188 (gdb_ust_thread): Remove preprocessor conditional.
9189
82bfbe7e
PA
91902011-12-14 Pedro Alves <pedro@codesourcery.com>
9191
9192 * linux-low.c (linux_detach_one_lwp): Call
9193 the_low_target.prepare_to_resume before detaching.
9194
712c6575
YQ
91952011-12-14 Yao Qi <yao@codesourcery.com>
9196
9197 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9198 of write.
9199
d54d1edf
YQ
92002011-12-14 Yao Qi <yao@codesourcery.com>
9201
9202 * i386-low.c (i386_low_stopped_data_address): Initialize local
9203 variable `control'.
9204
6210a125
PA
92052011-12-13 Pedro Alves <pedro@codesourcery.com>
9206
9207 PR remote/13492
9208
9209 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9210 DR_CONTROL unless necessary. Extend comments.
9211 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9212 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9213
2ece8244
YQ
92142011-12-13 Yao Qi <yao@codesourcery.com>
9215
9216 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9217 macros.
9218 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9219
784867a5
JK
92202011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9221
9222 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9223 Print new debug message for such case.
9224
6bf36717
JK
92252011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9226
9227 Fix overlapping memcpy.
9228 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9229 the read_inferior_memory transfer.
9230 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9231 write_inferior_memory transfer.
9232 (set_fast_tracepoint_jump): New variable buf. Use it for the
9233 read_inferior_memory and write_inferior_memory transfers.
9234 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9235 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9236 Use it for the write_inferior_memory transfer.
9237 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9238 buffers.
9239
50275556
MR
92402011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9241
9242 * linux-low.c (fetch_register, store_register): Make code
9243 consistent, fix formatting.
9244
7325beb4
MR
92452011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9246
9247 * linux-low.c (usr_store_inferior_registers): Factor out code
9248 to handle individual registers into...
9249 (store_register): ... this new function.
9250
c642a434
UW
92512011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9252
9253 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9254 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9255 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9256 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9257 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9258 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9259 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9260 (srv_xmlfiles): Add new XML files.
9261
9262 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9263 and <sys/uio.h>.
9264 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9265 (init_registers_s390_linux32v1): Add prototype.
9266 (init_registers_s390_linux32v2): Likewise.
9267 (init_registers_s390_linux64v1): Likewise.
9268 (init_registers_s390_linux64v2): Likewise.
9269 (init_registers_s390x_linux64v1): Likewise.
9270 (init_registers_s390x_linux64v2): Likewise.
9271 (s390_num_regs): Increment to 52.
9272 (s390_regmap): Add orig_r2 register.
9273 (s390_num_regs_3264): Increment to 68.
9274 (s390_regmap_3264): Add orig_r2 register.
9275 (s390_collect_ptrace_register): Handle orig_r2 register.
9276 (s390_supply_ptrace_register): Likewise.
9277 (s390_fill_last_break): New function.
9278 (s390_store_last_break): Likewise.
9279 (s390_fill_system_call): New function.
9280 (s390_store_system_call): Likewise.
9281 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9282 register sets.
9283 (s390_check_regset): New function.
9284 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9285 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9286 Update target_regsets for available register sets.
9287
2268b414
JK
92882011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9289 Jan Kratochvil <jan.kratochvil@redhat.com>
9290
9291 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9292 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9293 New.
9294 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9295 * linux-low.h (struct process_info_private): New member r_debug.
9296 * server.c (handle_qxfer_libraries): Call
9297 the_target->qxfer_libraries_svr4.
9298 (handle_qxfer_libraries_svr4): New function.
9299 (qxfer_packets): New entry "libraries-svr4".
9300 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9301 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9302 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9303 PACKET_qXfer_libraries_svr4.
9304
d6db1fab
UW
93052011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9306
9307 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9308 PSW address/mask between 8-byte and 16-byte formats.
9309 (s390_supply_ptrace_register): Likewise.
9310 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9311 basic addressing mode bit.
9312
242f5f1c
SS
93132011-11-24 Stan Shebs <stan@codesourcery.com>
9314
9315 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9316
f196051f
SS
93172011-11-17 Stan Shebs <stan@codesourcery.com>
9318
9319 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9320 (tracing_start_time): New global.
9321 (tracing_stop_time): New global.
9322 (tracing_user_name): New global.
9323 (tracing_notes): New global.
9324 (tracing_stop_note): New global.
9325 (cmd_qtstart): Set traceframe_usage, start_time.
9326 (stop_tracing): Set stop_time.
9327 (cmd_qtstatus): Report additional status.
9328 (cmd_qtp): New function.
9329 (handle_tracepoint_query): Call it.
9330 (cmd_qtnotes): New function.
9331 (handle_tracepoint_general_set): Call it.
9332 (get_timestamp): Rename from tsv_get_timestamp.
9333
405f8e94
SS
93342011-11-14 Stan Shebs <stan@codesourcery.com>
9335 Kwok Cheung Yeung <kcy@codesourcery.com>
9336
9337 * linux-x86-low.c (small_jump_insn): New.
9338 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9339 trampoline and error message, build a trampoline and issue a small
9340 jump instruction to it.
9341 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9342 trampoline and error message.
9343 (x86_get_min_fast_tracepoint_insn_len): New.
9344 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9345 * linux-low.h (struct linux_target_ops): Add arguments to
9346 install_fast_tracepoint_jump_pad operation, add new operation.
9347 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9348 arguments.
9349 (linux_get_min_fast_tracepoint_insn_len): New function.
9350 (linux_target_op): Add new operation.
9351 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9352 (gdb_trampoline_buffer_end): Ditto.
9353 (gdb_trampoline_buffer_error): Ditto.
9354 (struct ipa_sym_addresses): Add fields for new IPA variables.
9355 (symbol_list): Add entries for new IPA variables.
9356 (struct tracepoint): Add fields to hold the address range of the
9357 trampoline used by the tracepoint.
9358 (trampoline_buffer_head): New static variable.
9359 (trampoline_buffer_tail): Ditto.
9360 (claim_trampoline_space): New function.
9361 (have_fast_tracepoint_trampoline_buffer): New function.
9362 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9363 structure.
9364 (install_fast_tracepoint): Ditto, also add error buffer argument.
9365 (cmd_qtminftpilen): New function.
9366 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9367 (fast_tracepoint_from_trampoline_address): New function.
9368 (fast_tracepoint_collecting): Handle trampoline as part of jump
9369 pad space.
9370 (set_trampoline_buffer_space): New function.
9371 (initialize_tracepoint): Initialize new IPA variables.
9372 * target.h (struct target_ops): Add arguments to
9373 install_fast_tracepoint_jump_pad operation, add new
9374 get_min_fast_tracepoint_insn_len operation.
9375 (target_get_min_fast_tracepoint_insn_len): New.
9376 (install_fast_tracepoint_jump_pad): Add arguments.
9377 * server.h (IPA_BUFSIZ): Define.
9378 * linux-i386-ipa.c: Include extra header files.
9379 (initialize_fast_tracepoint_trampoline_buffer): New function.
9380 (initialize_low_tracepoint): Call it.
9381 * server.h (set_trampoline_buffer_space): Declare.
9382 (claim_trampoline_space): Ditto.
9383 (have_fast_tracepoint_trampoline_buffer): Ditto.
9384
1e4d1764
YQ
93852011-11-14 Yao Qi <yao@codesourcery.com>
9386
9387 * server.c (handle_query): Handle InstallInTrace for qSupported.
9388 * tracepoint.c (add_tracepoint): Sort list.
9389 (install_tracepoint, download_tracepoint): New.
9390 (cmd_qtdp): Call them to install and download tracepoints.
9391 (sort_tracepoints): Removed.
9392 (cmd_qtstart): Update.
9393
5c73ff4e
YQ
93942011-11-14 Yao Qi <yao@codesourcery.com>
9395
9396 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9397 * mem-break.h: Declare.
9398 * tracepoint.c (cmd_qtstart): Move some code to ...
9399 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9400 New.
9401 (download_tracepoints): Move some code to ...
9402 (download_tracepoint_1): ... here. New.
9403
86a30030
YQ
94042011-11-08 Yao Qi <yao@codesourcery.com>
9405
9406 * remote-utils.c (relocate_instruction): A comment fix.
9407
8d26e50c
JB
94082011-11-07 Joel Brobecker <brobecker@adacore.com>
9409
9410 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9411 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9412 dr_status_mirror and dr_control_mirror from debug_reg_state.
9413 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9414 (i386_initial_stuff): Remove use of deleted globals.
9415 (i386_get_thread_context, i386_set_thread_context,
9416 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9417 from debug_reg_state.
9418
a59306a3
YQ
94192011-11-05 Yao Qi <yao@codesourcery.com>
9420
9421 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9422 address as TPOINT's.
9423
3065dfb6
SS
94242011-11-02 Stan Shebs <stan@codesourcery.com>
9425
9426 * tracepoint.c (agent_mem_read_string): New function.
9427 (eval_agent_expr): Call it for tracenz.
9428 * server.c (handle_query): Report support for tracenz.
9429
fd0d8c7c
YQ
94302011-11-02 Yao Qi <yao@codesourcery.com>
9431
9432 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9433
609086b1
YQ
94342011-11-02 Yao Qi <yao@codesourcery.com>
9435
9436 * target.h: Fix a typo in comment.
9437
b9fd1791
PA
94382011-10-31 Pedro Alves <pedro@codesourcery.com>
9439
9440 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9441 clobber the breakpoints' shadows with fast tracepoint jumps.
9442 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9443 * target.c (write_inferior_memory): Also pass MYADDR down to
9444 check_mem_write.
9445
03583c20
UW
94462011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9447
9448 * configure.ac: Check support for personality routine.
9449 * configure: Regenerate.
9450 * config.in: Likewise.
9451 * linux-low.c: Include <sys/personality.h>.
9452 Define ADDR_NO_RANDOMIZE if necessary.
9453 (linux_create_inferior): Disable address space randomization when
9454 forking inferior, if requested.
9455 (linux_supports_disable_randomization): New function.
9456 (linux_target_ops): Install it.
9457 * server.h (disable_randomization): Declare.
9458 * server.c (disable_randomization): New global variable.
9459 (handle_general_set): Handle QDisableRandomization.
9460 (handle_query): Likewise for qSupported.
9461 (main): Support --disable-randomization and --no-disable-randomization
9462 command line arguments.
9463 * target.h (struct target_ops): Add supports_disable_randomization.
9464 (target_supports_disable_randomization): New macro.
9465
723b724b
MF
94662011-09-29 Mike Frysinger <vapier@gentoo.org>
9467
9468 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9469 ifdef check.
9470 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9471 [!PT_GETDSBT] (target_loadmap): New definition.
9472 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9473 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9474 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9475 and PT_GETDSBT to LINUX_LOADMAP.
9476 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9477 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9478
55329a5c 94792011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
9480
9481 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9482 (arm_linux_hwbp_cap): New static variable.
9483 (arm_linux_get_hwbp_cap): Replace by ...
9484 (arm_linux_init_hwbp_cap): ... this new function.
9485 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9486 (arm_linux_get_hw_watchpoint_count): Likewise.
9487 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9488 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9489 (arm_prepare_to_resume): Use perror_with_name instead of error.
9490
55329a5c 94912011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
9492
9493 * linux-arm-low.c: Include <signal.h>.
9494 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9495 (struct arm_linux_hwbp_cap): New data type.
9496 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9497 (struct arm_linux_hw_breakpoint): New data type.
9498 (MAX_BPTS, MAX_WPTS): Define.
9499 (struct arch_process_info, struct arch_lwp_info): New data types.
9500 (arm_linux_get_hwbp_cap): New function.
9501 (arm_linux_get_hw_breakpoint_count): Likewise.
9502 (arm_linux_get_hw_watchpoint_count): Likewise.
9503 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9504 (arm_hwbp_control_initialize): Likewise.
9505 (arm_hwbp_control_is_enabled): Likewise.
9506 (arm_hwbp_control_is_initialized): Likewise.
9507 (arm_hwbp_control_disable): Likewise.
9508 (arm_linux_hw_breakpoint_equal): Likewise.
9509 (arm_linux_hw_point_initialize): Likewise.
9510 (struct update_registers_data): New data structure.
9511 (update_registers_callback: New function.
9512 (arm_insert_point): Likewise.
9513 (arm_remove_point): Likewise.
9514 (arm_stopped_by_watchpoint): Likewise.
9515 (arm_stopped_data_address): Likewise.
9516 (arm_new_process): Likewise.
9517 (arm_new_thread): Likewise.
9518 (arm_prepare_to_resume): Likewise.
9519 (the_low_target): Register arm_insert_point, arm_remove_point,
9520 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9521 arm_new_thread, and arm_prepare_to_resume.
9522
6b9801d4
SS
95232011-09-15 Stan Shebs <stan@codesourcery.com>
9524
9525 * server.h (struct emit_ops): Add compare-goto fields.
9526 * tracepoint.c (gdb_agent_op_sizes): New table.
9527 (emit_eq_goto): New function.
9528 (emit_ne_goto): New function.
9529 (emit_lt_goto): New function.
9530 (emit_le_goto): New function.
9531 (emit_gt_goto): New function.
9532 (emit_ge_goto): New function.
9533 (is_goto_target): New function.
9534 (compile_bytecodes): Recognize special cases of compare-goto
9535 combinations and call specialized emitters for them.
9536 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9537 (amd64_emit_ne_goto): New function.
9538 (amd64_emit_lt_goto): New function.
9539 (amd64_emit_le_goto): New function.
9540 (amd64_emit_gt_goto): New function.
9541 (amd64_emit_ge_goto): New function.
9542 (amd64_emit_ops): Add the new functions.
9543 (i386_emit_eq_goto): New function.
9544 (i386_emit_ne_goto): New function.
9545 (i386_emit_lt_goto): New function.
9546 (i386_emit_le_goto): New function.
9547 (i386_emit_gt_goto): New function.
9548 (i386_emit_ge_goto): New function.
9549 (i386_emit_ops): Add the new functions.
9550
bf15cbda
SS
95512011-09-08 Stan Shebs <stan@codesourcery.com>
9552
9553 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9554 (i386_emit_epilogue): Restore %ebx.
9555
943ca1dd
JZ
95562011-08-31 Jie Zhang <jzhang918@gmail.com>
9557
9558 * server.c (step_thread): Remove definition.
9559 (process_serial_event): Don't handle Hs.
9560 * server.h (step_thread): Remove declaration.
9561 * target.c (set_desired_inferior): Remove use of step_thread.
9562
e3deef73
LM
95632011-08-24 Luis Machado <lgustavo@codesourcery.com>
9564
9565 * linux-low.c: Include linux-procfs.h.
9566 (linux_attach_lwp_1): Update comments.
9567 (linux_attach): Scan for existing threads when attaching to a
9568 process that is the tgid.
9569 * Makefile.in: Update dependencies.
9570
13da1c97
LM
95712011-08-24 Luis Machado <lgustavo@codesourcery.com>
9572
9573 * configure.srv: Add linux-procfs.o dependencies.
9574
881127c9
YQ
95752011-08-14 Yao Qi <yao@codesourcery.com>
9576
9577 * target.h (struct target_ops): Fix indent.
9578 * win32-low.c (win32_target_ops): Fix comment.
9579
58dbd541
YQ
95802011-08-14 Andrew Jenner <andrew@codesourcery.com>
9581 Yao Qi <yao@codesourcery.com>
9582
9583 * Makefile.in (clean): Remove tic6x-*.c files.
9584 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9585 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9586 (tic6x-c64xp-linux.c): Likewise.
9587 * configure.srv: Add support for tic6x-*-uclinux.
9588 * linux-tic6x-low.c: New.
9589 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9590
78d85199
YQ
95912011-08-14 Andrew Stubbs <ams@codesourcery.com>
9592 Yao Qi <yao@codesourcery.com>
9593
9594 * target.h (struct target_ops): Add read_loadmap.
9595 * linux-low.c (struct target_loadseg): New type.
9596 (struct target_loadmap): New type.
9597 (linux_read_loadmap): New function.
9598 (linux_target_ops): Add linux_read_loadmap.
9599 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
9600 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9601 to NULL.
78d85199 9602
a959a88d
EZ
96032011-08-05 Eli Zaretskii <eliz@gnu.org>
9604
9605 * win32-low.c: Include <stdint.h>.
9606
1ced966e
PA
96072011-07-22 Pedro Alves <pedro@codesourcery.com>
9608
9609 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9610 to the inferior here.
9611 (i386_remove_aligned_watchpoint): Ditto.
9612 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9613 fit part of the watchpoint in the debug registers.
9614 (i386_update_inferior_debug_regs): New.
9615 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9616 registers, and only update the inferior on success.
9617 (i386_low_remove_watchpoint): Ditto.
9618
d26e3629
KY
96192011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9620
9621 * linux-low.c (compare_ints, unique, list_threads, show_process,
9622 linux_core_of_thread): Delete.
9623 (linux_target_ops): Change linux_core_of_thread to
9624 linux_common_core_of_thread.
9625 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9626 * utils.c (malloc_failure): Change type of argument.
9627 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9628 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9629 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9630 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9631 (IPA_OBJS): Add common-utils-ipa.o.
9632 (ptid_h, linux_osdata_h): New macros.
9633 (server_h): Add common/common-utils.h, common/xml-utils.h,
9634 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9635 common/ptid.h.
9636 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9637 ptid.o, buffer.o): New rules.
9638 (linux-low.o): Add common/linux-osdata.h as a dependency.
9639 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9640 * configure.ac: Add AC_HEADER_DIRENT check.
9641 * config.in: Regenerate.
9642 * configure: Regenerate.
9643 * remote-utils.c (xml_escape_text): Delete.
9644 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9645 buffer_xml_printf): Move to common/buffer.c.
9646 * server.c (main): Remove call to initialize_inferiors.
9647 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9648 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9649 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9650 internal_error, gdb_assert, gdb_assert_fail): Delete.
9651 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9652 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9653 common/buffer.h.
9654 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9655 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9656 initialize_inferiors): Delete.
9657
2275a1a7
PA
96582011-07-20 Pedro Alves <pedro@codesourcery.com>
9659
9660 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9661 symbol error.
9662
0a5b1e09
PA
96632011-05-31 Pedro Alves <pedro@codesourcery.com>
9664
9665 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9666 assertion.
9667 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9668
6938fd34
YQ
96692011-05-26 Yao Qi <yao@codesourcery.com>
9670
9671 * Makefile.in (thread-db.o): Track dependence to
9672 common/gdb_thread_db.h.
9673 * thread-db.c: include gdb_thread_db.h from right place.
9674
b481f9e0
TT
96752011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9676
9677 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9678 __FILE__ and __LINE__ to internal_error.
9679
98a5dd13
DE
96802011-05-13 Doug Evans <dje@google.com>
9681
9682 * thread-db.c (try_thread_db_load_from_sdir): New function.
9683 (try_thread_db_load_from_dir): New function.
9684 (thread_db_load_search): Handle $sdir, ignore $pdir.
9685 Remove trying of system directories if search of
9686 libthread-db-search-path fails, that is now done via $sdir.
9687
d248b706
KY
96882011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9689
9690 * server.c (handle_query): Add EnableDisableTracepoints to the list
9691 of supported features.
43aaf8b6 9692 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 9693 tracepoints.
43aaf8b6
PA
9694 (cmd_qtenable_disable): New.
9695 (cmd_qtstart): Install tracepoints even if disabled.
9696 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9697 receiving a QTEnable or QTDisable packet.
9698 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9699 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9700 tracepoints.
9701 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 9702
84e578fb
DE
97032011-05-10 Doug Evans <dje@google.com>
9704
9705 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9706
71f55dd8
DE
97072011-05-04 Doug Evans <dje@google.com>
9708
9709 * linux-low.c (linux_join): Skip process lookup.
9710 * spu-low.c (spu_join): Ditto.
9711 * server.c (join_inferiors_callback): Delete.
9712 (process_serial_event): For 'D' packet (detach) call join_inferior
9713 directly.
9714
4d393d60
JM
97152011-05-04 Joseph Myers <joseph@codesourcery.com>
9716
9717 * README: Don't mention xscale*-*-linux*.
9718 * configure.srv (xscale*-*-linux*): Don't handle target.
9719
b00ad6ff
NF
97202011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9721
9722 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9723 casting pointers.
9724 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9725 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9726 (i386_emit_void_call_2): Likewise.
9727
af96c192
YQ
97282011-04-26 Yao Qi <yao@codesourcery.com>
9729
43aaf8b6
PA
9730 * linux-low.c: Move common macros to linux-ptrace.h.
9731 Include linux-ptrace.h.
af96c192
YQ
9732 * Makefile.in (linux_ptrace_h): New.
9733 (linux-low.o): Depends on linux-ptrace.h.
9734
03f2bd59
JK
97352011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9736
9737 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9738 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9739 (remote_prepare): New function with most of the TCP code from ...
9740 (remote_open): ... here. Detect PORT here unconditionally. Move also
9741 setting transport_is_reliable.
9742 * server.c (run_once): New variable.
9743 (gdbserver_usage): Document it.
9744 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9745 the first run if RUN_ONCE.
9746 * server.h (run_once, remote_prepare): New declarations.
9747
7a9dd1b2
TT
97482011-04-19 Tom Tromey <tromey@redhat.com>
9749
9750 * win32-low.c (handle_load_dll): Remove duplicate "the".
9751
81239425
PM
97522011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9753
9754 Remove support for old Cygwin 1.5 versions.
9755 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9756 function to avoid warning.
9757 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9758 warning.
9759
9e0627f1
PM
97602011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9761
9762 * gdbserver/server.h (Macro _): Define it if not available.
9763
588eebee
MS
97642011-03-14 Michael Snyder <msnyder@vmware.com>
9765
348af9f7 9766 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 9767
43f70d4c
JB
97682011-03-10 Joel Brobecker <brobecker@adacore.com>
9769
9770 * Makefile.in (maintainer-clean realclean distclean): Remove
9771 "make ... subdir_do" command.
9772
348af9f7
MS
97732011-03-10 Michael Snyder <msnyder@vmware.com>
9774
9775 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9776
9777 * server.c (handle_v_run): Free alloced buffer on early return.
9778
e637a4f5
YQ
97792011-03-09 Yao Qi <yao@codesourcery.com>
9780
9781 Revert:
9782 2011-03-04 Yao Qi <yao@codesourcery.com>
9783
9784 * Makefile.in: Remove GNU make feature --directory.
9785
9786 2011-03-05 Yao Qi <yao@codesourcery.com>
9787
9788 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9789 (subdir_do): New make target. Copied from gdb/Makefile.
9790 (maintainer-clean, realclean, distclean, clean): Call corresponding
9791 make targets in common/Makefile.
9792
9793 2011-02-11 Yao Qi <yao@codesourcery.com>
9794
9795 * configure.ac: Call AC_PROG_RANLIB.
9796 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9797 * configure: Regenerate.
9798
e6edda56
JK
97992011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9800
9801 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9802
e5141119
JB
98032011-03-06 Yao Qi <yao@codesourcery.com>
9804
9805 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9806
64794aa4
JB
98072011-03-05 Yao Qi <yao@codesourcery.com>
9808
9809 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9810 (subdir_do): New make target. Copied from gdb/Makefile.
9811 (maintainer-clean, realclean, distclean, clean): Call corresponding
9812 make targets in common/Makefile.
9813
7a762829
YQ
98142011-03-04 Yao Qi <yao@codesourcery.com>
9815
9816 * Makefile.in: Remove GNU make feature --directory.
9817
348af9f7
MS
98182011-03-04 Michael Snyder <msnyder@vmware.com>
9819
9820 * server.c (queue_stop_reply): Call xmalloc not malloc.
9821
98222011-03-02 Michael Snyder <msnyder@vmware.com>
9823
9824 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9825
9f72fee2
MS
98262011-02-28 Michael Snyder <msnyder@vmware.com>
9827
588eebee
MS
9828 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9829 (cmd_qtframe): Ditto.
9830 (cmd_qtbuffer): Ditto.
9831 (cmd_bigqtbuffer): Ditto.
9832
9f72fee2
MS
9833 * utils.c (decimal2str): Initialize 'width' to nine, then
9834 don't mess with it.
9835
8040bd49
UW
98362011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9837
9838 * hostio.c (require_data): Free *data, not data.
9839
7e52cbd0
JK
98402011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9841
9842 * hostio.c (require_data): Use free, not xfree.
9843
9130f83e
MS
98442011-02-27 Michael Snyder <msnyder@vmware.com>
9845
4b812f4e
MS
9846 * server.c (handle_query): Discard unused value.
9847
9130f83e
MS
9848 * hostio.c (require_data): Free malloc memory before returning
9849 error.
9850
69d37113
MS
98512011-02-26 Michael Snyder <msnyder@vmware.com>
9852
9853 * linux-low.c (list_threads): Call closedir for dirent.
9854
35f5825a
MS
98552011-02-27 Michael Snyder <msnyder@vmware.com>
9856
2a589cef
MS
9857 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9858 a case statement falls through.
9859
0adea5f7
MS
9860 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9861
35f5825a
MS
9862 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9863 in comparison.
9864
238f1c74
MS
98652011-02-26 Michael Snyder <msnyder@vmware.com>
9866
9867 * utils.c (decimal2str): Eliminate dead code and dead param.
9868 (pulongest): Drop dead param from call to decimal2str.
9869 (plongest): Ditto.
9870
633ff500
JB
98712011-02-24 Joel Brobecker <brobecker@adacore.com>
9872
9873 Revert the following patch (not approved yet):
9874 2011-02-21 Hui Zhu <teawater@gmail.com>
9875 * tracepoint.c (tp_printf): New function.
9876 (eval_agent_expr): Handle gdb_agent_op_printf.
9877
f9c6ff72
HZ
98782011-02-21 Hui Zhu <teawater@gmail.com>
9879
9880 * tracepoint.c (tp_printf): New function.
9881 (eval_agent_expr): Handle gdb_agent_op_printf.
9882
94d5e490
TT
98832011-02-18 Tom Tromey <tromey@redhat.com>
9884
9885 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9886 (tracepoint.o): Likewise.
9887 * tracepoint.c (enum gdb_agent_op): Use ax.def.
9888 (gdb_agent_op_names): Likewise.
9889
c7f96d2b
TT
98902011-02-18 Tom Tromey <tromey@redhat.com>
9891
9892 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9893 gdb_agent_op_rot>: New constants.
9894 (gdb_agent_op_names): Add pick and roll.
9895 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9896 cases.
9897
0feedb2c
JK
98982011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9899
9900 * aclocal.m4: Regenerated with aclocal-1.11.1.
9901
b3b9301e
PA
99022011-02-14 Pedro Alves <pedro@codesourcery.com>
9903
9904 * server.c (handle_qxfer_traceframe_info): New.
9905 (qxfer_packets): Register "traceframe-info".
9906 (handle_query): Report support for qXfer:traceframe-info:read+.
9907 * tracepoint.c (match_blocktype): New.
9908 (traceframe_find_block_type): Rename to ...
9909 (traceframe_walk_blocks): ... this. Add callback filter argument,
9910 and use it.
9911 (traceframe_find_block_type): New, reimplemented on top of
9912 traceframe_walk_blocks.
9913 (build_traceframe_info_xml): New.
9914 (traceframe_read_info): New.
9915 * server.h (traceframe_read_info): Declare.
9916
4f3e6fb7
YQ
99172011-02-11 Yao Qi <yao@codesourcery.com>
9918
9919 * configure.ac: Call AC_PROG_RANLIB.
9920 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9921 * configure: Regenerate.
9922
764880b7
PA
99232011-02-07 Pedro Alves <pedro@codesourcery.com>
9924
9925 * server.c (gdb_read_memory): Change return semantics to allow
9926 partial transfers.
9927 (handle_search_memory_1): Adjust.
9928 (process_serial_event) <'m' packet>: Handle partial transfers.
9929 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9930
1c79eb8a
PA
99312011-01-28 Pedro Alves <pedro@codesourcery.com>
9932
9933 * regcache.c (init_register_cache): Initialize
9934 regcache->register_status.
9935 (free_register_cache): Release regcache->register_status.
9936 (regcache_cpy): Copy register_status.
9937 (registers_to_string): Print 'x's for unavailable registers.
9938 (supply_register): Mark the register's status valid or
9939 unavailable, depending on whether a buffer was passed in or not.
9940 (supply_register_zeroed): New.
9941 (supply_regblock): Mark the registers' status valid or
9942 unavailable, depending on whether a buffer was passed in or not.
9943 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9944 (struct regcache): New `register_status' field.
9945 (supply_register_zeroed): Declare.
9946 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9947 supply_register_zeroed, rather than passing a NULL buffer to
9948 supply_register.
9949 * tracepoint.c (fetch_traceframe_registers): Update comment.
9950
85724a0e
PA
99512011-01-28 Pedro Alves <pedro@codesourcery.com>
9952
9953 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9954 buffer explicit.
9955
d08aafef
PA
99562011-01-25 Pedro Alves <pedro@codesourcery.com>
9957
9958 * server.h (decode_xfer_write): Change prototype.
9959 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9960 and don't extract the annex here.
9961 * server.c (decode_xfer_read): Remove `annex' parameter,
9962 and don't extract the annex here.
9963 (decode_xfer): New.
9964 (struct qxfer): New.
9965 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9966 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9967 (handle_qxfer_statictrace): New functions, abstracted out from
9968 handle_query, and made to use the struct qxfer interface.
9969 (handle_threads_qxfer_proper): Rename to ...
9970 (handle_qxfer_threads_proper): ... this.
9971 (handle_threads_qxfer): Rename to ...
9972 (handle_qxfer_threads): ... this. Adjust.
9973 (qxfer_packets): New array.
9974 (handle_qxfer): New function.
9975 (handle_query): Use handle_qxfer.
9976
493e2a69
MS
99772011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9978
9979 * gdbreplay.c: Shorten lines of >= 80 columns.
9980 * linux-low.c: Ditto.
9981 * linux-ppc-low.c: Ditto.
9982 * linux-s390-low.c: Ditto.
9983 * linux-sparc-low.c: Ditto.
9984 * linux-x86-low.c: Ditto.
9985 * linux-xtensa-low.c: Ditto.
9986 * mem-break.c: Ditto.
9987 * nto-low.c: Ditto.
9988 * regcache.h: Ditto.
9989 * remote-utils.c: Ditto.
9990 * server.c: Ditto.
9991 * server.h: Ditto.
9992 * thread-db.c: Ditto.
9993 * tracepoint.c: Ditto.
9994 * utils.c: Ditto.
9995 * win32-low.h: Ditto.
9996
44944448
JB
99972011-01-05 Joel Brobecker <brobecker@adacore.com>
9998
9999 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10000 update.
10001
71ce852c
JB
100022011-01-01 Joel Brobecker <brobecker@adacore.com>
10003
10004 * server.c (gdbserver_version): Update copyright year in version
10005 output.
10006 * gdbreplay.c (gdbreplay_version): Ditto.
10007
eb826dc6
MF
100082010-12-29 Jie Zhang <jie.zhang@analog.com>
10009
10010 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10011 * linux-bfin-low.c: New file.
10012 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10013 PT_DATA_ADDR for BFIN targets.
10014 * Makefile.in (SFILES): Add linux-bfin-low.c.
10015 (clean): Remove reg-bfin.c.
10016 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10017 * README: Mention supported Blackfin targets.
10018
39ab222a
MF
100192010-12-23 Mike Frysinger <vapier@gentoo.org>
10020
10021 * .gitignore: New file.
10022
a1f2ce7d
MF
100232010-11-16 Mike Frysinger <vapier@gentoo.org>
10024
10025 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10026
f474844c
JZ
100272010-10-22 Jie Zhang <jie@codesourcery.com>
10028
10029 * Makefile.in: Add FLAGS_TO_PASS variable.
10030 (install): Remove dependency of install-only and recursively
10031 invoke make for install-only.
10032
f1048712
DE
100332010-10-04 Doug Evans <dje@google.com>
10034
10035 * Makefile.in (uninstall): Use $(DESTDIR).
10036
b53a1623
PA
100372010-09-24 Pedro Alves <pedro@codesourcery.com>
10038
e6ee044d
PA
10039 PR gdb/11842
10040
b53a1623
PA
10041 * linux-x86-low.c (compat_siginfo_from_siginfo)
10042 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10043 si_code is < 0. Check for si_code == SI_TIMER before checking for
10044 si_code < 0.
10045
fa1bd1e4
JB
100462010-09-13 Joel Brobecker <brobecker@adacore.com>
10047
10048 * lynx-i386-low.c: New file.
10049 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10050
47fac8f8
JB
100512010-09-13 Joel Brobecker <brobecker@adacore.com>
10052
10053 * lynx-low.c (ptrace_request_to_str): Remove handling for
10054 request values that have been removed in LynxOS 5.x.
10055
1adfc54d
JB
100562010-09-13 Joel Brobecker <brobecker@adacore.com>
10057
10058 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10059 <ptrace.h>
10060
c2a66c29
NS
100612010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10062
10063 * configure.ac: Add --enable-inprocess-agent option.
10064 * configure: Rebuilt.
10065
32fcada3
YQ
100662010-09-06 Yao Qi <yao@codesourcery.com>
10067
10068 * linux-low.c (linux_kill): Remove unused variable.
10069 (linux_stabilize_threads): Likewise.
10070 * server.c (start_inferior): Likewise.
10071 (queue_stop_reply_callback): Likewise.
10072 * tracepoint.c (do_action_at_tracepoint): Likewise.
10073
0cccb683
YQ
100742010-09-06 Yao Qi <yao@codesourcery.com>
10075
10076 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10077 on return.
10078
423ec54c
JK
100792010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10080
10081 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10082
12ac6819
PA
100832010-09-06 Pedro Alves <pedro@codesourcery.com>
10084
10085 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10086 "$(IPA_DEPFILES)".
10087
8ed54b31
JB
100882010-09-01 Joel Brobecker <brobecker@adacore.com>
10089
10090 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10091 gdbserver/lynx-ppc-low.c: New files.
10092 * Makefile.in (lynx_low_h): New variable.
10093 (lynx-low.o, lynx-ppc-low.o): New rules.
10094 * configure.ac: On LynxOS, link with -lnetinet.
10095 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10096 * configure: regenerate.
10097
bb0116a4
JB
100982010-09-01 Joel Brobecker <brobecker@adacore.com>
10099
10100 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10101 * configure.ac: Add check for vasprintf and vsnprintf.
10102 * configure, config.in: Regenerate.
10103 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10104
a778ab81 101052010-09-01 Joel Brobecker <brobecker@adacore.com>
10106
10107 * gdbreplay.c: Move include of alloca.h up, next to include of
10108 malloc.h.
10109 * server.h: Add include of malloc.h.
10110 * mem-break.c: Remove include of malloc.h.
10111 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10112
8b034a19 101132010-09-01 Joel Brobecker <brobecker@adacore.com>
10114
10115 * Makefile.in (memmem.o): Build with -Wno-error.
10116
101172010-09-01 Joel Brobecker <brobecker@adacore.com>
10118
10119 * utils.c (xsnprintf): Make non-static.
10120 * server.h: Add xsnprintf declaration.
10121 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10122 replace calls to snprintf by calls to xsnprintf throughout.
10123
101242010-09-01 Joel Brobecker <brobecker@adacore.com>
10125
10126 * configure.ac: Add configure check for alloca.
10127 * configure, config.in: Regenerate.
10128 * server.h: Include alloca.h if it exists.
10129 * gdbreplay.c: Include alloca.h if it exists.
10130
1a981360
PA
101312010-08-28 Pedro Alves <pedro@codesourcery.com>
10132
10133 * linux-low.c (__SIGRTMIN): Define if not already defined.
10134 (linux_create_inferior): Check for __ANDROID__ rather than
10135 __SIGRTMIN.
10136 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10137 are already deferred.
10138 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10139 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10140 stopped and already has a pending signal to report.
10141 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10142 a pending signal to report or is moving out of a jump pad.
10143 (linux_init_signals): Check for __ANDROID__ rather than
10144 __SIGRTMIN.
10145
b4d51a55
PA
101462010-08-28 Pedro Alves <pedro@codesourcery.com>
10147
10148 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10149 debug_threads check. Avoid a linear search when not doing debug
10150 output.
10151
ec48365d
PA
101522010-08-27 Pedro Alves <pedro@codesourcery.com>
10153
10154 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10155 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10156 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10157 (process_event): Change local fd's type to gdb_fildes_t.
10158 (create_file_handler): Adjust prototype.
10159 (delete_file_handler): Adjust prototype.
10160 (handle_file_event): Adjust prototype. Use pfildes.
10161 (create_file_event): Adjsut prototype.
10162 * remote-utils.c (remote_desc, listen_desc): Change type to
10163 gdb_fildes_t.
10164 * server.h: New gdb_fildes_t typedef.
10165 [USE_WIN32API]: Include winsock2.h.
10166 (delete_file_handler, add_file_handler): Adjust prototypes.
10167 (pfildes): Declare.
10168 * utils.c (pfildes): New.
10169
854d88f0
PA
101702010-08-27 Pedro Alves <pedro@codesourcery.com>
10171
10172 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10173 * configure: Regenerate.
10174
0146f85b
PA
101752010-08-27 Pedro Alves <pedro@codesourcery.com>
10176
10177 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10178 (linux_done_accessing_memory): ... this.
10179 (linux_target_ops): Adjust.
10180 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10181 * nto-low.c (nto_target_ops): Adjust comment.
10182 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10183 * spu-low.c (spu_target_ops): Adjust comment.
10184 * target.h (target_ops): Rename unprepare_to_access_memory field
10185 to done_accessing_memory.
10186 (unprepare_to_access_memory): Rename to ...
10187 (done_accessing_memory): ... this.
10188
90d74c30
PA
101892010-08-26 Pedro Alves <pedro@codesourcery.com>
10190
10191 * linux-low.c (linux_prepare_to_access_memory): New.
10192 (linux_unprepare_to_access_memory): New.
10193 (linux_target_ops): Install them.
10194 * server.c (read_memory): Rename to ...
10195 (gdb_read_memory): ... this. Use
10196 prepare_to_access_memory/prepare_to_access_memory.
10197 (write_memory): Rename to ...
10198 (gdb_write_memory): ... this. Use
10199 prepare_to_access_memory/prepare_to_access_memory.
10200 (handle_search_memory_1): Adjust.
10201 (process_serial_event): Adjust.
10202 * target.h (struct target_ops): New fields
10203 prepare_to_access_memory and unprepare_to_access_memory.
10204 (prepare_to_access_memory, unprepare_to_access_memory): New.
10205 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10206 prepare_to_access_memory/prepare_to_access_memory.
10207 * nto-low.c (nto_target_ops): Adjust.
10208 * spu-low.c (spu_target_ops): Adjust.
10209 * win32-low.c (win32_target_ops): Adjust.
10210
fd467969
PA
102112010-08-26 Pedro Alves <pedro@codesourcery.com>
10212
10213 * Makefile.in (WARN_CFLAGS): Get it from configure.
10214 (WERROR_CFLAGS): New.
10215 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10216 * configure.ac: Introduce --enable-werror, which adds -Werror to
10217 the compiler command line. Enabled by default. Disable with
10218 --disable-werror. Add -Wdeclaration-after-statement
10219 Wpointer-arith and -Wformat-nonliteral to warning flags.
10220 * configure: Regenerate.
10221
331e2f5f
PA
102222010-08-26 Pedro Alves <pedro@codesourcery.com>
10223
10224 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10225
e581f2b4
PA
102262010-08-26 Pedro Alves <pedro@codesourcery.com>
10227
10228 * gdbreplay.c (remote_error): New.
10229 (gdbchar): New.
10230 (expect): Use gdbchar. Check for error reading from GDB.
10231 Clarify sync error output.
10232 (play): Check for errors writing to GDB.
10233 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10234 * remote-utils.c (getpkt): Check for errors writing to the remote
10235 descriptor.
10236
3c11dd79
PA
102372010-08-25 Pedro Alves <pedro@codesourcery.com>
10238
10239 * linux-low.c (linux_wait_1): Move non-debugging code out of
10240 `debug_threads' control.
10241
d20a8ad9
PA
102422010-08-25 Pedro Alves <pedro@codesourcery.com>
10243
10244 * linux-low.c (linux_wait_1): Don't set last_status here.
10245 * server.c (push_event, queue_stop_reply_callback): Assert we're
10246 not pushing a TARGET_WAITKIND_IGNORE event.
10247 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10248 (myresume, handle_target_event): Set the thread's last_resume_kind
10249 and last_status from the target returned status.
10250
964e4306
PA
102512010-08-25 Pedro Alves <pedro@codesourcery.com>
10252
10253 PR threads/10729
10254
10255 * linux-x86-low.c (update_debug_registers_callback): New.
10256 (i386_dr_low_set_addr): Use it.
10257 (i386_dr_low_get_addr): New.
10258 (i386_dr_low_set_control): Use update_debug_registers_callback.
10259 (i386_dr_low_get_control): New.
10260 (i386_dr_low_get_status): Adjust.
10261 * linux-low.c (linux_stop_lwp): New.
10262 * linux-low.h (linux_stop_lwp): Declare.
10263
10264 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10265 argument instead of a i386_debug_reg_state.
10266 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10267 a i386_debug_reg_state.
10268 (i386_insert_aligned_watchpoint): Adjust.
10269 (i386_remove_aligned_watchpoint): Adjust.
10270 (i386_low_stopped_data_address): Read the debug registers from the
10271 inferior instead of from the mirrors.
10272 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10273 (i386_dr_low_get_addr): Declare.
10274 (i386_dr_low_get_control): Declare.
10275 (i386_dr_low_get_status): Change prototype.
10276
10277 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10278 (i386_dr_low_get_addr): New.
10279 (i386_dr_low_get_control): New.
10280 (i386_dr_low_get_status): Adjust prototype. Return
10281 dr_status_mirror.
10282 (i386_initial_stuff): Clear dr_status_mirror and
10283 dr_control_mirror.
10284 (i386_get_thread_context): Adjust.
10285 (i386_set_thread_context): Adjust.
10286 (i386_thread_added): Adjust.
10287
5f21a75b
PA
102882010-08-24 Pedro Alves <pedro@codesourcery.com>
10289
10290 * linux-low.h (linux_thread_area): Delete declaration.
10291
3e4c1235
TS
102922010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10293
10294 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10295 after its termination.
10296
1971b033
PA
102972010-08-09 Pedro Alves <pedro@codesourcery.com>
10298
10299 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10300 (gdb_wants_all_stopped): Delete.
10301 (linux_wait_1): Don't call them.
10302 * server.c (handle_v_cont): Tag all threads as want-stopped.
10303 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10304 stopped as "client-wants-stopped".
10305
310444ac
PA
103062010-07-31 Pedro Alves <pedro@codesourcery.com>
10307
10308 * Makefile.in (signals_h): New.
10309 (server_h): Depend on it.
10310 (server.o): Don't depend on $(signals_def).
10311 (signals.o): Depend on $(signals_def).
10312
a19cae16
JK
103132010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10314
10315 * Makefile.in (signals_def): New.
10316 (server_h): Append include/gdb/signals.h and signals_def.
10317 (server.o): Append signals_def.
10318
30d50328
JK
103192010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10320
10321 * server.c (handle_target_event): Use target_signal_to_host for
10322 resume_info.sig initialization.
10323 * target.h (struct thread_resume) <sig>: New comment.
10324
5c3216e2
OS
103252010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10326
c6f46ca0
OS
10327 * server.c (handle_query): strcpy() the returned string from paddress()
10328 instead of sprintf().
5c3216e2
OS
10329 * utils.c (paddress): Return phex_nz().
10330
6bd31874
JB
103312010-07-07 Joel Brobecker <brobecker@adacore.com>
10332
10333 * server.c (handle_v_cont): Call mourn_inferior if process
10334 just exited.
10335 (myresume): Likewise.
10336
0fb4aa4b
PA
103372010-07-01 Pedro Alves <pedro@codesourcery.com>
10338
10339 Static tracepoints, and integration with UST.
10340
10341 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10342 * mem-break.c (uninsert_all_breakpoints)
10343 (reinsert_all_breakpoints): New.
10344 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10345 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10346 (gdb_agent_ust_loaded, helper_thread_id)
10347 (gdb_agent_helper_thread_id): New macros.
10348 (struct ipa_sym_addresses): Add addr_ust_loaded,
10349 addr_helper_thread_id, addr_cmd_buf.
10350 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10351 (in_process_agent_loaded_ust): New.
10352 (write_e_ust_not_loaded): New.
10353 (maybe_write_ipa_ust_not_loaded): New.
10354 (struct collect_static_trace_data_action): New.
10355 (enum tracepoint_type) <static_tracepoint>: New.
10356 (struct tracepoint) <handle>: Mention static tracepoints.
10357 (struct static_tracepoint_ctx): New.
10358 (CMD_BUF_SIZE): New.
10359 (add_tracepoint_action): Handle static tracepoint actions.
10360 (unprobe_marker_at): New.
10361 (clear_installed_tracepoints): Handle static tracepoints.
10362 (cmd_qtdp): Handle static tracepoints.
10363 (probe_marker_at): New.
10364 (cmd_qtstart): Handle static tracepoints.
10365 (response_tracepoint): Handle static tracepoints.
10366 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10367 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10368 (get_context_regcache): Handle static tracepoints.
10369 (do_action_at_tracepoint): Handle static tracepoint actions.
10370 (traceframe_find_block_type): Handle static trace data blocks.
10371 (traceframe_read_sdata): New.
10372 (download_tracepoints): Download static tracepoint actions.
10373 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10374 (GDB_PROBE_NAME): New.
10375 (ust_ops): New.
10376 (GET_UST_SYM): New.
10377 (USTF): New.
10378 (dlsym_ust): New.
10379 (ust_marker_to_static_tracepoint): New.
10380 (gdb_probe): New.
10381 (collect_ust_data_at_tracepoint): New.
10382 (gdb_ust_probe): New.
10383 (UNIX_PATH_MAX, SOCK_DIR): New.
10384 (gdb_ust_connect_sync_socket): New.
10385 (resume_thread, stop_thread): New.
10386 (run_inferior_command): New.
10387 (init_named_socket): New.
10388 (gdb_ust_socket_init): New.
10389 (cstr_to_hexstr): New.
10390 (next_st): New.
10391 (first_marker, next_marker): New.
10392 (response_ust_marker): New.
10393 (cmd_qtfstm, cmd_qtsstm): New.
10394 (unprobe_marker_at, probe_marker_at): New.
10395 (cmd_qtstmat, gdb_ust_thread): New.
10396 (gdb_ust_init): New.
10397 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10398 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10399 (ST_REGENTRY): New.
10400 (x86_64_st_collect_regmap): New.
10401 (X86_64_NUM_ST_COLLECT_GREGS): New.
10402 (AMD64_RIP_REGNUM): New.
10403 (supply_static_tracepoint_registers): New.
10404 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10405 (ST_REGENTRY): New.
10406 (i386_st_collect_regmap): New.
10407 (i386_NUM_ST_COLLECT_GREGS): New.
10408 (supply_static_tracepoint_registers): New.
10409 * server.c (handle_query): Handle qXfer:statictrace:read.
10410 <qSupported>: Report support for StaticTracepoints, and
10411 qXfer:statictrace:read features.
10412 * server.h (traceframe_read_sdata)
10413 (supply_static_tracepoint_registers): Declare.
10414 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10415 (unpack_varlen_hex): Include in IPA build.
10416 * Makefile.in (ustlibs, ustinc): New.
10417 (IPA_OBJS): Add remote-utils-ipa.o.
10418 ($(IPA_LIB)): Link -ldl and -lpthread.
10419 (UST_CFLAGS): New.
10420 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10421 * config.in, configure: Regenerate.
10422
9e4344e5
PA
104232010-06-20 Ian Lance Taylor <iant@google.com>
10424 Pedro Alves <pedro@codesourcery.com>
10425
10426 * linux-x86-low.c (always_true): Delete.
10427 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10428 trying to fool the compiler with always_true.
10429
c6beb2cb
PA
104302010-06-20 Pedro Alves <pedro@codesourcery.com>
10431
10432 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10433 conditions in gdbserver.
10434
d2ed6730
UW
104352010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10436
10437 * spu-low.c (spu_read_memory): Wrap around local store limit.
10438 (spu_write_memory): Likewise.
10439
4e29fb54
PA
104402010-06-15 Pedro Alves <pedro@codesourcery.com>
10441
10442 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10443 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10444 LONGEST uses.
10445 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10446 uses.
10447 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10448 uses with LONGEST uses.
10449
6a271cae
PA
104502010-06-14 Stan Shebs <stan@codesourcery.com>
10451 Pedro Alves <pedro@codesourcery.com>
10452
10453 Bytecode compiler.
10454
10455 * linux-x86-low.c: Include limits.h.
10456 (add_insns): New.
10457 (always_true): New.
10458 (EMIT_ASM): New.
10459 (EMIT_ASM32): New.
10460 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10461 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10462 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10463 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10464 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10465 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10466 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10467 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10468 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10469 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10470 (amd64_emit_void_call_2): New.
10471 (amd64_emit_ops): New.
10472 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10473 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10474 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10475 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10476 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10477 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10478 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10479 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10480 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10481 (i386_emit_stack_adjust, i386_emit_int_call_1)
10482 (i386_emit_void_call_2): New.
10483 (i386_emit_ops): New.
10484 (x86_emit_ops): New.
10485 (the_low_target): Install x86_emit_ops.
10486 * server.h (struct emit_ops): New.
10487 (get_raw_reg_func_addr): Declare.
10488 (current_insn_ptr, emit_error): Declare.
10489 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10490 (set_trace_state_variable_value): New defines.
10491 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10492 addr_get_trace_state_variable_value and
10493 addr_set_trace_state_variable_value.
10494 (symbol_list): New fields for get_raw_reg,
10495 get_trace_state_variable_value and set_trace_state_variable_value.
10496 (condfn): New typedef.
10497 (struct tracepoint): New field `compiled_cond'.
10498 (do_action_at_tracepoint): Clear compiled_cond.
10499 (get_trace_state_variable_value, set_trace_state_variable_value):
10500 Export in the IPA.
10501 (condition_true_at_tracepoint): If there's a compiled condition,
10502 run that.
10503 (current_insn_ptr, emit_error): New globals.
10504 (struct bytecode_address): New.
10505 (get_raw_reg_func_addr): New.
10506 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10507 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10508 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10509 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10510 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10511 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10512 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10513 (compile_tracepoint_condition, compile_bytecodes): New.
10514 * target.h (emit_ops): Forward declare.
10515 (struct target_ops): New field emit_ops.
10516 (target_emit_ops): New.
10517 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10518 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10519 * linux-low.c (linux_emit_ops): New.
10520 (linux_target_ops): Install it.
10521 * linux-low.h (struct linux_target_ops): New field emit_ops.
10522
92b72907
UW
105232010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10524
10525 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10526 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10527
fa593d66
PA
105282010-06-01 Pedro Alves <pedro@codesourcery.com>
10529 Stan Shebs <stan@codesourcery.com>
10530
10531 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10532 (all): Depend on $(extra_libraries).
10533 (install-only): Install the IPA.
10534 (IPA_OBJS, IPA_LIB): New.
10535 (clean): Remove the IPA lib.
10536 (IPAGENT_CFLAGS): New.
10537 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10538 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10539 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10540 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10541 * configure.ac: Check for atomic builtins support in the compiler.
10542 (IPA_DEPFILES, extra_libraries): Define.
10543 * configure.srv (ipa_obj): Add description.
10544 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10545 (i[34567]86-*-linux*): Set ipa_obj.
10546 (x86_64-*-linux*): Set ipa_obj.
10547 * linux-low.c (stabilizing_threads): New.
10548 (supports_fast_tracepoints): New.
10549 (linux_detach): Stabilize threads before detaching.
10550 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10551 the lwp is either not stabilizing, or is moving out of a jump pad.
10552 (linux_fast_tracepoint_collecting): New.
10553 (maybe_move_out_of_jump_pad): New.
10554 (enqueue_one_deferred_signal): New.
10555 (dequeue_one_deferred_signal): New.
10556 (linux_wait_for_event_1): If moving out of a jump pad, defer
10557 pending signals to later.
10558 (linux_stabilize_threads): New.
10559 (linux_wait_1): Check if threads need moving out of jump pads, and
10560 do it if so.
10561 (stuck_in_jump_pad_callback): New.
10562 (move_out_of_jump_pad_callback): New.
10563 (lwp_running): New.
10564 (linux_resume_one_lwp): Handle moving out of jump pads.
10565 (linux_set_resume_request): Dequeue deferred signals.
10566 (need_step_over_p): Also step over fast tracepoint jumps.
10567 (start_step_over): Also uninsert fast tracepoint jumps.
10568 (finish_step_over): Also reinsert fast tracepoint jumps.
10569 (linux_install_fast_tracepoint_jump): New.
10570 (linux_target_ops): Install linux_stabilize_threads and
10571 linux_install_fast_tracepoint_jump_pad.
10572 * linux-low.h (linux_target_ops) <get_thread_area,
10573 install_fast_tracepoint_jump_pad>: New fields.
10574 (struct lwp_info) <collecting_fast_tracepoint,
10575 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10576 (linux_get_thread_area): Declare.
10577 * linux-x86-low.c (jump_insn): New.
10578 (x86_get_thread_area): New.
10579 (append_insns): New.
10580 (push_opcode): New.
10581 (amd64_install_fast_tracepoint_jump_pad): New.
10582 (i386_install_fast_tracepoint_jump_pad): New.
10583 (x86_install_fast_tracepoint_jump_pad): New.
10584 (the_low_target): Install x86_get_thread_area and
10585 x86_install_fast_tracepoint_jump_pad.
10586 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10587 (struct fast_tracepoint_jump): New.
10588 (fast_tracepoint_jump_insn): New.
10589 (fast_tracepoint_jump_shadow): New.
10590 (find_fast_tracepoint_jump_at): New.
10591 (fast_tracepoint_jump_here): New.
10592 (delete_fast_tracepoint_jump): New.
10593 (set_fast_tracepoint_jump): New.
10594 (uninsert_fast_tracepoint_jumps_at): New.
10595 (reinsert_fast_tracepoint_jumps_at): New.
10596 (set_breakpoint_at): Use write_inferior_memory.
10597 (uninsert_raw_breakpoint): Use write_inferior_memory.
10598 (check_mem_read): Mask out fast tracepoint jumps.
10599 (check_mem_write): Mask out fast tracepoint jumps.
10600 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10601 (set_fast_tracepoint_jump): Declare.
10602 (delete_fast_tracepoint_jump)
10603 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10604 (reinsert_fast_tracepoint_jumps_at): Declare.
10605 * regcache.c: Don't compile many functions when building the
10606 in-process agent library.
10607 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10608 the register buffer in the heap.
10609 (free_register_cache): If the register buffer isn't owned by the
10610 regcache, don't free it.
10611 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10612 pre-existing register caches.
10613 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10614 type.
10615 (convert_ascii_to_int): : Constify `from' parameter type.
10616 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10617 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10618 the needed buffer in-place.
10619 (relocate_instruction): New.
10620 * server.c (handle_query) <qSymbols>: If the target supports
10621 tracepoints, give it a chance of looking up symbols. Report
10622 support for fast tracepoints.
10623 (handle_status): Stabilize threads.
10624 (process_serial_event): Adjust.
10625 * server.h (struct fast_tracepoint_jump): Forward declare.
10626 (struct process_info) <fast_tracepoint_jumps>: New field.
10627 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10628 (decode_X_packet, decode_M_packet): Adjust.
10629 (relocate_instruction): Declare.
10630 (in_process_agent_loaded): Declare.
10631 (tracepoint_look_up_symbols): Declare.
10632 (struct fast_tpoint_collect_status): Declare.
10633 (fast_tracepoint_collecting): Declare.
10634 (force_unlock_trace_buffer): Declare.
10635 (handle_tracepoint_bkpts): Declare.
10636 (initialize_low_tracepoint)
10637 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10638 * target.h (struct target_ops) <stabilize_threads,
10639 install_fast_tracepoint_jump_pad>: New fields.
10640 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10641 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10642 [HAVE_STDINT_H]: Include stdint.h.
10643 (trace_debug_1): Rename to ...
10644 (trace_vdebug): ... this.
10645 (trace_debug): Rename to ...
10646 (trace_debug_1): ... this. Add `level' parameter.
10647 (trace_debug): New.
10648 (ATTR_USED, ATTR_NOINLINE): New.
10649 (IP_AGENT_EXPORT): New.
10650 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10651 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10652 (about_to_request_buffer_space, trace_buffer_is_full)
10653 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10654 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10655 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10656 (traceframe_write_count, traceframes_created)
10657 (trace_state_variables)
10658 New renaming defines.
10659 (struct ipa_sym_addresses): New.
10660 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10661 (symbol_list): New.
10662 (ipa_sym_addrs): New.
10663 (all_tracepoint_symbols_looked_up): New.
10664 (in_process_agent_loaded): New.
10665 (write_e_ipa_not_loaded): New.
10666 (maybe_write_ipa_not_loaded): New.
10667 (tracepoint_look_up_symbols): New.
10668 (debug_threads) [IN_PROCESS_AGENT]: New.
10669 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10670 (UNKNOWN_SIDE_EFFECTS): New.
10671 (stop_tracing): New.
10672 (flush_trace_buffer): New.
10673 (stop_tracing_bkpt): New.
10674 (flush_trace_buffer_bkpt): New.
10675 (read_inferior_integer): New.
10676 (read_inferior_uinteger): New.
10677 (read_inferior_data_pointer): New.
10678 (write_inferior_data_pointer): New.
10679 (write_inferior_integer): New.
10680 (write_inferior_uinteger): New.
10681 (struct collect_static_trace_data_action): Delete.
10682 (enum tracepoint_type): New.
10683 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
10684 <actions_str, step_actions, step_actions_str>: Only include in
10685 GDBserver.
fa593d66
PA
10686 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10687 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10688 (tracepoints): Use IP_AGENT_EXPORT.
10689 (last_tracepoint): Don't include in the IPA.
10690 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10691 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10692 (alloced_trace_state_variables): New.
10693 (trace_state_variables): Use IP_AGENT_EXPORT.
10694 (traceframe_t): Delete unused variable.
10695 (circular_trace_buffer): Don't include in the IPA.
10696 (trace_buffer_start): Delete.
10697 (struct trace_buffer_control): New.
10698 (trace_buffer_free): Delete.
10699 (struct ipa_trace_buffer_control): New.
10700 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10701 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10702 New.
10703 (trace_buffer_ctrl): New.
10704 (TRACE_BUFFER_CTRL_CURR): New.
10705 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10706 Reimplement as macros.
10707 (trace_buffer_wrap): Delete.
10708 (traceframe_write_count, traceframe_read_count)
10709 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10710 (struct tracepoint_hit_ctx) <type>: New field.
10711 (struct fast_tracepoint_ctx): New.
10712 (memory_barrier): New.
10713 (cmpxchg): New.
10714 (record_tracepoint_error): Update atomically in the IPA.
10715 (clear_inferior_trace_buffer): New.
10716 (about_to_request_buffer_space): New.
10717 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10718 updating the same buffer.
10719 (add_tracepoint): Default the tracepoint's type to trap
10720 tracepoint, and orig_size to -1.
10721 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10722 internal variables.
10723 (create_trace_state_variable): New parameter `gdb'. Handle it.
10724 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10725 (cmd_qtdp): Handle fast tracepoints.
10726 (cmd_qtdv): Adjust.
10727 (max_jump_pad_size): New.
10728 (gdb_jump_pad_head): New.
10729 (get_jump_space_head): New.
10730 (claim_jump_space): New.
10731 (sort_tracepoints): New.
10732 (MAX_JUMP_SIZE): New.
10733 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10734 IPA.
10735 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10736 support. Upload fast traceframes, and delete internal IPA
10737 breakpoints.
10738 (stop_tracing_handler): New.
10739 (flush_trace_buffer_handler): New.
10740 (cmd_qtstop): Upload fast tracepoints.
10741 (response_tracepoint): Handle fast tracepoints.
10742 (tracepoint_finished_step): Upload fast traceframes. Set the
10743 tracepoint hit context's tracepoint type.
10744 (handle_tracepoint_bkpts): New.
10745 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10746 type. Add comment about fast tracepoints.
10747 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10748 non-existing action_str field.
10749 (get_context_regcache): Handle fast tracepoints.
10750 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10751 to the regcache.
10752 (fast_tracepoint_from_jump_pad_address): New.
10753 (fast_tracepoint_from_ipa_tpoint_address): New.
10754 (collecting_t): New.
10755 (force_unlock_trace_buffer): New.
10756 (fast_tracepoint_collecting): New.
10757 (collecting): New.
10758 (gdb_collect): New.
10759 (write_inferior_data_ptr): New.
10760 (target_tp_heap): New.
10761 (target_malloc): New.
10762 (download_agent_expr): New.
10763 (UALIGN): New.
10764 (download_tracepoints): New.
10765 (download_trace_state_variables): New.
10766 (upload_fast_traceframes): New.
10767 (IPA_FIRST_TRACEFRAME): New.
10768 (IPA_NEXT_TRACEFRAME_1): New.
10769 (IPA_NEXT_TRACEFRAME): New.
10770 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10771 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10772 (gdb_jump_pad_buffer_end): New.
10773 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10774 (initialize_tracepoint): Adjust.
10775 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10776 buffer. Initialize the low module.
10777 * utils.c (PREFIX, TOOLNAME): New.
10778 (malloc_failure): Use PREFIX.
10779 (error): In the IPA, an error causes an exit.
10780 (fatal, warning): Use PREFIX.
10781 (internal_error): Use TOOLNAME.
10782 (NUMCELLS): Increase to 10.
10783 * configure, config.in: Regenerate.
10784
d149dd1d
PA
107852010-06-01 Pedro Alves <pedro@codesourcery.com>
10786
10787 * server.c (handle_query) <qSupported>: Do two passes over the
10788 qSupported string to avoid nesting strtok.
10789
f6528abd
JK
107902010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10791
10792 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10793 (CDEPS): New.
10794 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10795 -Wl,--dynamic-list.
10796 * configure: Regenerate.
10797 * proc-service.list: New.
10798
ca2a87a0
JK
107992010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10800
10801 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10802 New comment.
10803
363a6e9f
OS
108042010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10805
10806 * gdbreplay.c (remote_open): Check error return from socket() call by
10807 its equality to -1 not by it being negative.
10808 * remote-utils.c (remote_open): Likewise.
10809
d23b6cb1
PA
108102010-05-23 Pedro Alves <pedro@codesourcery.com>
10811
10812 * config.h: Regenerate.
10813
28d3cf85
MK
108142010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10815
10816 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10817 doesn't provide PTRACE_GET_THREAD_AREA.
10818
fea36a59
MK
108192010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10820
10821 * linux-m68k-low.c: Include <asm/ptrace.h>
10822 (ps_get_thread_area): Implement.
10823
24b066ba
DE
108242010-05-03 Doug Evans <dje@google.com>
10825
10826 * event-loop.c (struct callback_event): New struct.
10827 (callback_list): New global.
10828 (append_callback_event, delete_callback_event): New functions.
10829 (process_callback): New function.
10830 (start_event_loop): Call it.
10831 * remote-utils.c (NOT_SCHEDULED): Define.
10832 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10833 moved out of readchar.
10834 (readchar): Rewrite. Call reschedule before returning.
10835 (reset_readchar): New function.
10836 (remote_close): Call it.
10837 (process_remaining, reschedule): New functions.
10838 * server.h (callback_handler_func): New typedef.
10839 (append_callback_event, delete_callback_event): Declare.
10840
9836d6ea
PA
108412010-05-03 Pedro Alves <pedro@codesourcery.com>
10842
10843 * proc-service.c (ps_pglobal_lookup): Use
10844 thread_db_look_up_one_symbol.
10845 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10846 parameter. Use it instead of all_symbols_looked_up.
10847 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10848 field.
10849 (all_symbols_looked_up): Don't declare.
10850 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10851 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10852 field.
10853 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10854 Set all_symbols_looked_up here.
10855 (thread_db_look_up_one_symbol): New.
10856 (thread_db_get_tls_address): Adjust.
10857 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10858 thread_db object on the heap, and tentatively set it in the
10859 process structure.
10860 (thread_db_init): Don't set all_symbols_looked_up here.
10861 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10862
7984d532
PA
108632010-05-03 Pedro Alves <pedro@codesourcery.com>
10864
10865 * linux-low.c (linux_kill, linux_detach): Adjust.
10866 (status_pending_p_callback): Remove redundant statement. Check
10867 for !TARGET_WAITIKIND_IGNORE, instead of
10868 TARGET_WAITKIND_STOPPED.
10869 (handle_tracepoints): Make sure LWP is locked. Adjust.
10870 (linux_wait_for_event_1): Adjust.
10871 (linux_cancel_breakpoints): New.
10872 (unsuspend_one_lwp): New.
10873 (unsuspend_all_lwps): New.
10874 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10875 (send_sigstop_callback): Change return type to int, add new
10876 `except' parameter and handle it.
10877 (suspend_and_send_sigstop_callback): New.
10878 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10879 pass them down. If SUSPEND, also increment the lwp's suspend
10880 count.
10881 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10882 (need_step_over_p): Don't consider suspended LWPs.
10883 (start_step_over): Adjust.
10884 (proceed_one_lwp): Change return type to int, add new `except'
10885 parameter and handle it.
10886 (unsuspend_and_proceed_one_lwp): New.
10887 (proceed_all_lwps): Use find_inferior instead of
10888 for_each_inferior.
10889 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
10890 also decrement the suspend count of LWPs. Pass `except' down,
10891 instead of hacking its suspend count.
10892 (linux_pause_all): Add `freeze' parameter. Adjust.
10893 (linux_unpause_all): New.
10894 (linux_target_ops): Install linux_unpause_all.
10895 * server.c (handle_status): Adjust.
10896 * target.h (struct target_ops): New fields `unpause_all' and
10897 `cancel_breakpoints'. Add new parameter to `pause_all'.
10898 (pause_all): Add new `freeze' parameter.
10899 (unpause_all): New.
10900 (cancel_breakpoints): New.
10901 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10902 cancel breakpoints.
10903 (cmd_qtstart): Pause threads.
10904 (stop_tracing): Pause threads, and cancel breakpoints.
10905 * win32-low.c (win32_target_ops): Adjust.
10906
e471f25b
PA
109072010-05-03 Pedro Alves <pedro@codesourcery.com>
10908
10909 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10910 the inferior right away from here...
10911 (linux_wait_1): ... to here, and adjust to check the thread's
10912 last_resume_kind instead of the lwp's step or stop_expected flags.
10913
1915ef4f
PA
109142010-05-02 Pedro Alves <pedro@codesourcery.com>
10915
10916 * README: Use consistent `GDB' and `GDBserver' spellings.
10917
f9e39928
PA
109182010-05-02 Pedro Alves <pedro@codesourcery.com>
10919
10920 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10921 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10922 (linux_detach_one_lwp): Assume the lwp is stopped.
10923 (any_thread_of): Delete.
10924 (linux_detach): Stop all lwps here. Don't blindly delete all
10925 breakpoints.
10926 (delete_lwp_callback): New.
10927 (linux_mourn): Delete all lwps of the process that is gone.
10928 (linux_wait_1): Don't delete the last lwp of the process here.
10929 * mem-break.h (mark_breakpoints_out): Declare.
10930 * mem-break.c (mark_breakpoints_out): New.
10931 (free_all_breakpoints): Use it.
10932 * server.c (handle_target_event): If the process is gone, mark
10933 breakpoints out.
10934 * thread-db.c (struct thread_db) <create_bp>: New field.
10935 (thread_db_enable_reporting): Fix prototype. Store a thread event
10936 breakpoint reference in the thread_db struct.
10937 (thread_db_load_search): Clear the thread_db object.
10938 (try_thread_db_load_1): Ditto.
10939 (switch_to_process): New.
10940 (disable_thread_event_reporting): Use it.
10941 (remove_thread_event_breakpoints): New.
10942 (thread_db_detach, thread_db_mourn): Use it.
10943
1e7fc18c
PA
109442010-05-01 Pedro Alves <pedro@codesourcery.com>
10945
10946 * linux-low.c (linux_enable_event_reporting): New.
10947 (linux_wait_for_event_1, handle_extended_wait): Use it.
10948
02fc4de7
PA
109492010-04-30 Pedro Alves <pedro@codesourcery.com>
10950
10951 * linux-low.c (linux_kill_one_lwp, linux_kill)
10952 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10953 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10954 SIGSTOP even if the LWP is stopped.
10955 (send_sigstop_callback): New.
10956 (stop_all_lwps): Use send_sigstop_callback instead.
10957 (linux_resume_one_thread): Adjust.
10958 (proceed_one_lwp): Still proceed an LWP that the client has
10959 requested to stop, if we haven't reported it as stopped yet. Make
10960 sure that LWPs the client want stopped, have a pending SIGSTOP.
10961
bc3b5632
DE
109622010-04-26 Doug Evans <dje@google.com>
10963
ae1ada35
DE
10964 * server.c (handle_general_set): Make static.
10965
bc3b5632
DE
10966 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10967 Print received char after testing for error/eof instead of before.
10968 (input_interrupt): Tweak comment.
10969
65730243
DE
109702010-04-23 Doug Evans <dje@google.com>
10971
10972 * server.c (start_inferior): Print inferior argv if --debug.
10973
a8ae7dc0
AR
109742010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10975
10976 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10977 * nto-x86-low.c: Include server.h
10978
1c07cc19
PM
109792010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10980
10981 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10982 be consistent with other sources of this directory.
10983 (init_registers_amd64): Correct name of source file of this function
10984 in the comment.
10985
e0a61e09
PM
109862010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10987
10988 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10989 64-bit executables.
10990
54709339
PM
109912010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10992
10993 * win32-i386-low.c: Add 64-bit support.
10994 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10995 (init_registers_amd64): Declare.
10996 (mappings): Add 64-bit version of array.
10997 (init_windows_x86): New function.
10998 (the_low_target): Change init_arch field to init_windows_x86.
10999
e8f0053d
PM
110002010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11001
11002 * win32-low.c: Adapt to support also 64-bit architecture.
11003 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11004 (get_image_name): Use SIZE_T type for local variable `done'.
11005 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11006 (toolhelp_get_dll_name): Idem.
11007 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11008 Use uintptr_t typecast to avoid warning.
11009 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11010 (handle_exception): Use phex_nz to avoid warning.
11011 (win32_wait): Remove unused local variable `process'.
11012
c481e77e
PM
110132010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11014
11015 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11016 `amd64-avx.o'.
11017
12ea4b69
PM
110182010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11019
11020 * configure.ac: Use `ws2_32' library for srv_mingw.
11021 * configure: Regenerate.
11022 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11023 * remote-utils.c: Likewise.
11024
f6d1620c
L
110252010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11026
11027 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11028 if __x86_64__ is defined.
11029
8e642873
PM
110302010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11031
11032 * configure: Regenerate.
11033
711e434b
PM
110342010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11035
11036 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11037 * target.h (target_ops): New get_tib_address field.
11038 * win32-low.h (win32_thread_info): Add thread_local_base field.
11039 * win32-low.c (child_add_thread): Add tlb argument.
11040 Set thread_local_base field to TLB.
11041 (get_child_debug_event): Adapt to child_add_thread change.
11042 (win32_get_tib_address): New function.
11043 (win32_target_ops): Set get_tib_address field to
11044 win32_get_tib_address.
11045 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11046
505106cd
PA
110472010-04-12 Pedro Alves <pedro@codesourcery.com>
11048
505106cd
PA
11049 * linux-low.c (linux_mourn): Also remove the process.
11050 * server.c (handle_target_event): Don't remove the process here.
11051 * nto-low.c (nto_mourn): New.
11052 (nto_target_ops): Install it.
11053 * spu-low.c (spu_mourn): New.
11054 (spu_target_ops): Install it.
11055 * win32-low.c (win32_mourn): New.
11056 (win32_target_ops): Install it.
11057
e8470a06
PA
110582010-04-12 Pedro Alves <pedro@codesourcery.com>
11059
11060 * server.h (buffer_xml_printf): Remove redundant `;'.
11061
45ba0d02
PA
110622010-04-12 Pedro Alves <pedro@codesourcery.com>
11063
11064 * regcache.c (set_register_cache): Invalidate regcaches before
11065 changing the register cache layout.
11066 (regcache_invalidate_one): Allow a NULL regcache.
11067 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11068 regcaches before changing the register cache layout or the target
11069 regsets.
11070
59e04013
L
110712010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11072
11073 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11074 variable warning on Linux/x86-64.
11075
8336d594
PA
110762010-04-11 Pedro Alves <pedro@codesourcery.com>
11077
11078 GDBserver disconnected tracing support.
11079
11080 * linux-low.c (linux_remove_process): Delete.
11081 (add_lwp): Don't set last_resume_kind here.
11082 (linux_kill): Use `mourn'.
11083 (linux_detach): Use `thread_db_detach', and `mourn'.
11084 (linux_mourn): New.
11085 (linux_attach_lwp_1): Adjust comment.
11086 (linux_attach): last_resume_kind moved the thread_info; adjust.
11087 (status_pending_p_callback): Adjust.
11088 (linux_wait_for_event_1): Adjust.
11089 (count_events_callback, select_singlestep_lwp_callback)
11090 (select_event_lwp_callback, cancel_breakpoints_callback)
11091 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11092 (proceed_one_lwp): Adjust.
11093 (linux_async): Add debug output.
11094 (linux_thread_stopped): New.
11095 (linux_pause_all): New.
11096 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11097 linux_pause_all.
11098 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11099 (thread_db_free): Delete declaration.
11100 (thread_db_detach, thread_db_mourn): Declare.
11101 * thread-db.c (thread_db_init): Use thread_db_mourn.
11102 (thread_db_free): Delete, split in two.
11103 (disable_thread_event_reporting): New.
11104 (thread_db_detach): New.
11105 (thread_db_mourn): New.
11106
11107 * server.h (struct thread_info) <last_resume_kind>: New field.
11108 <attached>: Add comment.
11109 <gdb_detached>: New field.
11110 (handler_func): Change return type to int.
11111 (handle_serial_event, handle_target_event): Ditto.
11112 (gdb_connected): Declare.
11113 (tracing): Delete.
11114 (disconnected_tracing): Declare.
11115 (stop_tracing): Declare.
11116
11117 * server.c (handle_query) <qSupported>: Report support for
11118 disconnected tracing.
11119 (queue_stop_reply_callback): Account for running threads.
11120 (gdb_wants_thread_stopped): New.
11121 (gdb_wants_all_threads_stopped): New.
11122 (gdb_reattached_process): New.
11123 (handle_status): Clear the `gdb_detached' flag of all processes.
11124 In all-stop, stop all threads.
11125 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11126 (process_serial_event): If the remote connection breaks, or if an
11127 exit was forced with "monitor exit", force an event loop exit.
11128 Handle disconnected tracing on detach.
11129 (handle_serial_event): Adjust.
11130 (handle_target_event): If GDB isn't connected, forward events back
11131 to the inferior, unless the last process exited, in which case,
11132 exit gdbserver. Adjust interface.
11133
11134 * remote-utils.c (remote_open): Don't block in accept. Instead
11135 register an event loop source on the listen socket file
11136 descriptor. Refactor bits into ...
11137 (listen_desc): ... this new global.
11138 (gdb_connected): ... this new function.
11139 (enable_async_notification): ... this new function.
11140 (handle_accept_event): ... this new function.
11141 (remote_close): Clear remote_desc.
11142
11143 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11144
11145 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11146 New fields.
11147 (mourn_inferior): Define.
11148 (target_process_qsupported): Avoid the dangling else problem.
11149 (thread_stopped): Define.
11150 (pause_all): Define.
11151 (target_waitstatus_to_string): Declare.
11152 * target.c (target_waitstatus_to_string): New.
11153
11154 * tracepoint.c (tracing): Make extern.
11155 (disconnected_tracing): New.
11156 (stop_tracing): Make extern. Handle tracing stops due to GDB
11157 disconnecting.
11158 (cmd_qtdisconnected): New.
11159 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11160 (handle_tracepoint_general_set): Handle QTDisconnected.
11161
11162 * event-loop.c (event_handler_func): Change return type to int.
11163 (process_event): Bail out if the event handler wants the event
11164 loop to stop.
11165 (handle_file_event): Ditto.
11166 (start_event_loop): Bail out if the event handler wants the event
11167 loop to stop.
11168
11169 * nto-low.c (nto_target_ops): Adjust.
11170 * spu-low.c (spu_wait): Don't remove the process here.
11171 (spu_target_ops): Adjust.
11172 * win32-low.c (win32_wait): Don't remove the process here.
11173 (win32_target_ops): Adjust.
11174
5d267c4c
PA
111752010-04-11 Pedro Alves <pedro@codesourcery.com>
11176
11177 * regcache.c (realloc_register_cache): Invalidate inferior's
11178 regcache before recreating it.
11179
623ccd72
PA
111802010-04-09 Pedro Alves <pedro@codesourcery.com>
11181
11182 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11183
219f2f23
PA
111842010-04-09 Stan Shebs <stan@codesourcery.com>
11185 Pedro Alves <pedro@codesourcery.com>
11186
11187 * server.h (LONGEST): New.
11188 (struct thread_info) <while_stepping>: New field.
11189 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11190 Declare.
11191 (initialize_tracepoint, handle_tracepoint_general_set)
11192 (handle_tracepoint_query, tracepoint_finished_step)
11193 (tracepoint_was_hit, release_while_stepping_state_list):
11194 (current_traceframe): Declare.
11195 * server.c (handle_general_set): Handle tracepoint packets.
11196 (read_memory): New.
11197 (write_memory): New.
11198 (handle_search_memory_1): Use read_memory.
11199 (handle_query): Report support for conditional tracepoints, trace
11200 state variables, and tracepoint sources. Handle tracepoint
11201 queries.
11202 (main): Initialize the tracepoints module.
11203 (process_serial_event): Handle traceframe reads/writes.
11204
11205 * linux-low.c (handle_tracepoints): New.
11206 (linux_wait_1): Call it.
11207 (linux_resume_one_lwp): Handle while-stepping.
11208 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11209 (linux_target_ops): Install them.
11210 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11211 New field.
11212 * linux-x86-low.c (x86_supports_tracepoints): New.
11213 (the_low_target). Install it.
11214
11215 * mem-break.h (delete_breakpoint): Declare.
11216 * mem-break.c (delete_breakpoint): Make external.
11217
11218 * target.h (struct target_ops): Add `supports_tracepoints',
11219 `read_pc', and `write_pc' fields.
11220 (target_supports_tracepoints): Define.
11221 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11222 (phex_nz): New.
11223
11224 * regcache.h (struct regcache) <registers_owned>: New field.
11225 (init_register_cache, regcache_cpy): Declare.
11226 (regcache_read_pc, regcache_write_pc): Declare.
11227 (register_cache_size): Declare.
11228 (supply_regblock): Declare.
11229 * regcache.c (init_register_cache): New.
11230 (new_register_cache): Use it.
11231 (regcache_cpy): New.
11232 (register_cache_size): New.
11233 (supply_regblock): New.
11234 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 11235
219f2f23
PA
11236 * tracepoint.c: New.
11237
11238 * Makefile.in (OBS): Add tracepoint.o.
11239 (tracepoint.o): New rule.
11240
3a13a53b
L
112412010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11242
11243 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11244 (i386-mmx.o): New.
11245 (i386-mmx.c): Likewise.
11246 (i386-mmx-linux.o): Likewise.
11247 (i386-mmx-linux.c): Likewise.
11248
11249 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11250 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11251 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11252 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11253
11254 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11255 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11256 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11257
1570b33e
L
112582010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11259
11260 * Makefile.in (clean): Updated.
11261 (i386-avx.o): New.
11262 (i386-avx.c): Likewise.
11263 (i386-avx-linux.o): Likewise.
11264 (i386-avx-linux.c): Likewise.
11265 (amd64-avx.o): Likewise.
11266 (amd64-avx.c): Likewise.
11267 (amd64-avx-linux.o): Likewise.
11268 (amd64-avx-linux.c): Likewise.
11269
11270 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11271 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11272 (srv_amd64_regobj): Add amd64-avx.o.
11273 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11274 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11275 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11276 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11277 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11278 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11279 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11280
11281 * i387-fp.c: Include "i386-xstate.h".
11282 (i387_xsave): New.
11283 (i387_cache_to_xsave): Likewise.
11284 (i387_xsave_to_cache): Likewise.
11285 (x86_xcr0): Likewise.
11286
11287 * i387-fp.h (i387_cache_to_xsave): Likewise.
11288 (i387_xsave_to_cache): Likewise.
11289 (x86_xcr0): Likewise.
11290
11291 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11292 * linux-crisv32-low.c (target_regsets): Likewise.
11293 * linux-m68k-low.c (target_regsets): Likewise.
11294 * linux-mips-low.c (target_regsets): Likewise.
11295 * linux-ppc-low.c (target_regsets): Likewise.
11296 * linux-s390-low.c (target_regsets): Likewise.
11297 * linux-sh-low.c (target_regsets): Likewise.
11298 * linux-sparc-low.c (target_regsets): Likewise.
11299 * linux-xtensa-low.c (target_regsets): Likewise.
11300
11301 * linux-low.c: Include <sys/uio.h>.
11302 (regsets_fetch_inferior_registers): Support nt_type.
11303 (regsets_store_inferior_registers): Likewise.
11304 (linux_process_qsupported): New.
11305 (linux_target_ops): Add linux_process_qsupported.
11306
11307 * linux-low.h (regset_info): Add nt_type.
11308 (linux_target_ops): Add process_qsupported.
11309
11310 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11311 and <sys/uio.h>.
11312 (init_registers_i386_avx_linux): New.
11313 (init_registers_amd64_avx_linux): Likewise.
11314 (xmltarget_i386_linux_no_xml): Likewise.
11315 (xmltarget_amd64_linux_no_xml): Likewise.
11316 (PTRACE_GETREGSET): Likewise.
11317 (PTRACE_SETREGSET): Likewise.
11318 (x86_fill_xstateregset): Likewise.
11319 (x86_store_xstateregset): Likewise.
11320 (use_xml): Likewise.
11321 (x86_linux_update_xmltarget): Likewise.
11322 (x86_linux_process_qsupported): Likewise.
11323 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11324 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11325 init_registers_i386_linux here. Call
11326 x86_linux_update_xmltarget.
11327 (the_low_target): Add x86_linux_process_qsupported.
11328
11329 * server.c (handle_query): Call target_process_qsupported.
11330
11331 * target.h (target_ops): Add process_qsupported.
11332 (target_process_qsupported): New.
11333
fc7238bb
PA
113342010-04-03 Pedro Alves <pedro@codesourcery.com>
11335
11336 * inferiors.c (add_thread): Set last_status kind to
11337 TARGET_WAITKIND_IGNORE.
11338 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11339 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11340 (linux_wait_1): Move `thread' local definition to block that uses
11341 it. Don't NULL initialize `event_child'.
11342 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11343 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11344 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11345
bdabb078
PA
113462010-04-01 Pedro Alves <pedro@codesourcery.com>
11347
11348 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11349 an extended waitstatus, or by a watchpoint.
11350 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11351 thread was stepping or has been stopped by a watchpoint.
11352
d3bbe7a0
PA
113532010-04-01 Pedro Alves <pedro@codesourcery.com>
11354
11355 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11356 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11357 of another, then delete the previous, and validate all
11358 breakpoints.
11359 (validate_inserted_breakpoint): New.
11360 (delete_disabled_breakpoints): New.
11361 (validate_breakpoints): New.
11362 (check_mem_read): Validate breakpoints before trusting their
11363 shadow. Delete disabled breakpoints.
11364 (check_mem_write): Validate breakpoints before trusting they
11365 should be inserted. Delete disabled breakpoints.
11366 * mem-break.h (validate_breakpoints):
11367 * server.c (handle_query): Validate breakpoints when we see a
11368 qSymbol query.
11369
8b07ae33
PA
113702010-04-01 Pedro Alves <pedro@codesourcery.com>
11371
11372 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11373 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11374 if we could tell there's a GDB breakpoint at stop_pc.
11375 (need_step_over_p): Don't do a step over if we find a GDB
11376 breakpoint at the resume PC.
11377
11378 * mem-break.c (struct raw_breakpoint): New.
11379 (enum bkpt_type): New type `gdb_breakpoint'.
11380 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11381 fields. New field `raw'.
11382 (find_raw_breakpoint_at): New.
11383 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11384 breakpoint instead.
11385 (set_breakpoint_at): Adjust.
11386 (delete_raw_breakpoint): New.
11387 (release_breakpoint): New.
11388 (delete_breakpoint): Rename to...
11389 (delete_breakpoint_1): ... this. Add proc parameter. Use
11390 release_breakpoint. Return ENOENT.
11391 (delete_breakpoint): Reimplement.
11392 (find_breakpoint_at): Delete.
11393 (find_gdb_breakpoint_at): New.
11394 (delete_breakpoint_at): Delete.
11395 (set_gdb_breakpoint_at): New.
11396 (delete_gdb_breakpoint_at): New.
11397 (gdb_breakpoint_here): New.
11398 (set_reinsert_breakpoint): Use release_breakpoint.
11399 (uninsert_breakpoint): Rename to ...
11400 (uninsert_raw_breakpoint): ... this.
11401 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11402 (reinsert_raw_breakpoint): Change parameter type to
11403 raw_breakpoint.
11404 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11405 instead.
11406 (check_breakpoints): Adjust. Use release_breakpoint.
11407 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11408 (breakpoint_inserted_here): Ditto.
11409 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11410 Don't trust the breakpoint's shadow if it is not inserted.
11411 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11412 (delete_all_breakpoints): Adjust.
11413 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11414 use delete_breakpoint_1.
11415
11416 * mem-break.h (breakpoints_supported): Delete declaration.
11417 (set_gdb_breakpoint_at): Declare.
11418 (gdb_breakpoint_here): Declare.
11419 (delete_breakpoint_at): Delete.
11420 (delete_gdb_breakpoint_at): Declare.
11421
11422 * server.h (struct raw_breakpoint): Forward declare.
11423 (struct process_info): New field `raw_breakpoints'.
11424
11425 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11426 breakpoints.
11427
6bf5e0ba
PA
114282010-03-24 Pedro Alves <pedro@codesourcery.com>
11429
11430 * linux-low.c (status_pending_p_callback): Fix comment.
11431 (linux_wait_for_event_1): Move most of the internal breakpoint
11432 handling from here...
11433 (linux_wait_1): ... to here.
11434 (count_events_callback): New.
11435 (select_singlestep_lwp_callback): New.
11436 (select_event_lwp_callback): New.
11437 (cancel_breakpoints_callback): New.
11438 (select_event_lwp): New.
11439 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11440 priority to all LWPs that have had events that should be reported
11441 to the client. Cancel breakpoints when about to reporting the
11442 event to the client, not while stopping lwps. No longer cancel
11443 finished single-steps here.
11444 (cancel_finished_single_step): Delete.
11445 (cancel_finished_single_steps): Delete.
11446
414a389f
PA
114472010-03-24 Pedro Alves <pedro@codesourcery.com>
11448
11449 * mem-break.c (enum bkpt_type): New.
11450 (struct breakpoint): New field `type'.
11451 (set_breakpoint_at): Change return type to struct breakpoint
11452 pointer. Set type to `other_breakpoint' by default.
11453 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11454 in the breakpoint list.
11455 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11456 (reinsert_breakpoint): Rename to ...
11457 (reinsert_raw_breakpoint): ... this.
11458 (reinsert_breakpoints_at): Adjust.
11459 * mem-break.h (struct breakpoint): Declare.
11460 (set_breakpoint_at): Change return type to struct breakpoint
11461 pointer.
11462
2280c721
PA
114632010-03-24 Pedro Alves <pedro@codesourcery.com>
11464
11465 * server.c (handle_query): Assign, not compare.
11466
d50171e4
PA
114672010-03-24 Pedro Alves <pedro@codesourcery.com>
11468
11469 Teach linux gdbserver to step-over-breakpoints.
11470
11471 * linux-low.c (can_hardware_single_step): New.
11472 (supports_breakpoints): New.
11473 (handle_extended_wait): If stopping threads, read the stop pc of
11474 the new cloned LWP.
11475 (get_pc): New.
11476 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11477 low target doesn't support retrieving the PC.
11478 (add_lwp): Set last_resume_kind to resume_continue.
11479 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11480 (linux_attach): Don't clear stop_expected. Set the lwp's
11481 last_resume_kind to resume_stop.
11482 (linux_detach_one_lwp): Don't check for removed breakpoints.
11483 (check_removed_breakpoint): Delete.
11484 (status_pending_p): Rename to ...
11485 (status_pending_p_callback): ... this. Don't check for removed
11486 breakpoints. Don't consider threads that are stopped from GDB's
11487 perspective.
11488 (linux_wait_for_lwp): Always read the stop_pc here.
11489 (cancel_breakpoint): New.
11490 (step_over_bkpt): New global.
11491 (linux_wait_for_event_1): Implement stepping over breakpoints.
11492 (gdb_wants_lwp_stopped): New.
11493 (gdb_wants_all_stopped): New.
11494 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11495 single-step traps here. Store the thread's last reported target
11496 wait status.
11497 (send_sigstop): Don't clear stop_expected. Always set it,
11498 instead.
11499 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11500 (cancel_finished_single_step): New.
11501 (cancel_finished_single_steps): New.
11502 (wait_for_sigstop): Don't cancel finished single-step traps here.
11503 (linux_resume_one_lwp): Don't check for removed breakpoints.
11504 Don't set `step' on non-hardware step archs.
11505 (linux_set_resume_request): Ignore resume_stop requests if already
11506 stopping or stopped. Set the lwp's last_resume_kind.
11507 (resume_status_pending_p): Don't check for removed breakpoints.
11508 (need_step_over_p): New.
11509 (start_step_over): New.
11510 (finish_step_over): New.
11511 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11512 requests. Clear the thread's last reported target waitstatus.
11513 Don't use the `suspended' flag. Don't consider pending breakpoints.
11514 (linux_resume): Start a step-over if necessary.
11515 (proceed_one_lwp): New.
11516 (proceed_all_lwps): New.
11517 (unstop_all_lwps): New.
11518 * linux-low.h (struct lwp_info): Rewrite comment for the
11519 `suspended' flag. Add the `stop_pc' field. Delete the
11520 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11521 Add `'last_resume_kind' and `need_step_over' fields.
11522 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11523 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11524 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11525 (set_raw_breakpoint_at): New.
11526 (set_breakpoint_at): Rewrite to use it.
11527 (reinsert_breakpoint_handler): Delete.
11528 (set_reinsert_breakpoint): New.
11529 (reinsert_breakpoint_by_bp): Delete.
11530 (delete_reinsert_breakpoints): New.
11531 (uninsert_breakpoint): Rewrite.
11532 (uninsert_breakpoints_at): New.
11533 (reinsert_breakpoint): Rewrite.
11534 (reinsert_breakpoints_at): New.
11535 (check_breakpoints): Rewrite.
11536 (breakpoint_here): New.
11537 (breakpoint_inserted_here): New.
11538 (check_mem_read): Adjust.
11539 * mem-break.h (breakpoints_supported, breakpoint_here)
11540 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11541 (reinsert_breakpoint_by_bp): Delete declaration.
11542 (delete_reinsert_breakpoints): Declare.
11543 (reinsert_breakpoint): Delete declaration.
11544 (reinsert_breakpoints_at): Declare.
11545 (uninsert_breakpoint): Delete declaration.
11546 (uninsert_breakpoints_at): Declare.
11547 (check_breakpoints): Adjust prototype.
11548 * server.h: Adjust include order.
11549 (struct thread_info): Declare here. Add a `last_status' field.
11550
30ba68cb
MS
115512010-03-23 Michael Snyder <msnyder@vmware.com>
11552
11553 * server.c (crc32): New function.
11554 (handle_query): Add handling for 'qCRC:' request.
11555
b9a881c2
PA
115562010-03-23 Pedro Alves <pedro@codesourcery.com>
11557
11558 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11559 lwp had been stopped by a watchpoint.
11560
e92d13d5
PA
115612010-03-16 Pedro Alves <pedro@codesourcery.com>
11562
11563 * server.h (internal_error): Declare.
11564 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11565 * utils.c (internal_error): New function.
11566
64daa791
AS
115672010-03-15 Andreas Schwab <schwab@redhat.com>
11568
11569 * configure.srv: Fix typo setting srv_regobj.
11570
f52cd8cd
PA
115712010-03-15 Pedro Alves <pedro@codesourcery.com>
11572
11573 * linux-low.c (fetch_register): Avoid passing a non string literal
11574 format to `error'.
11575 (usr_store_inferior_registers): Ditto.
11576
93ae6fdc
PA
115772010-03-14 Pedro Alves <pedro@codesourcery.com>
11578
11579 * linux-low.c (linux_write_memory): Bail out early if peeking
11580 memory failed.
11581
c3adc08c
PA
115822010-03-14 Pedro Alves <pedro@codesourcery.com>
11583
11584 * linux-low.h (struct lwp_info): New fields
11585 `stopped_by_watchpoint' and `stopped_data_address'.
11586 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11587 here, and cache them in the lwp object.
11588 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11589 directly.
11590 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11591 field.
11592 (linux_stopped_by_watchpoint): Rewrite.
11593 (linux_stopped_data_address): Rewrite.
11594
bce522a2
PA
115952010-03-06 Simo Melenius <simo.melenius@iki.fi>
11596
11597 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11598 switching the current inferior, not before.
11599
90884b2b
L
116002010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11601
11602 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11603 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11604 i386-linux.c and amd64-linux.c.
11605 (reg-i386.o): Removed.
11606 (reg-i386.c): Likewise.
11607 (reg-i386-linux.o): Likewise.
11608 (reg-i386-linux.c): Likewise.
11609 (reg-x86-64.o): Likewise.
11610 (reg-x86-64.c): Likewise.
11611 (reg-x86-64-linux.o): Likewise.
11612 (reg-x86-64-linux.c): Likewise.
11613 (i386.o): New.
11614 (i386.c): Likewise.
11615 (i386-linux.o): Likewise.
11616 (i386-linux.c): Likewise.
11617 (amd64.o): Likewise.
11618 (amd64.c): Likewise.
11619 (amd64-linux.o): Likewise.
11620 (amd64-linux.c): Likewise.
11621
11622 * configure.srv (srv_i386_regobj): New.
11623 (srv_i386_linux_regobj): Likewise.
11624 (srv_amd64_regobj): Likewise.
11625 (srv_amd64_linux_regobj): Likewise.
11626 (srv_i386_32bit_xmlfiles): Likewise.
11627 (srv_i386_64bit_xmlfiles): Likewise.
11628 (srv_i386_xmlfiles): Likewise.
11629 (srv_amd64_xmlfiles): Likewise.
11630 (srv_i386_linux_xmlfiles): Likewise.
11631 (srv_amd64_linux_xmlfiles): Likewise.
11632 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11633 srv_xmlfiles to $srv_i386_xmlfiles.
11634 (i[34567]86-*-mingw32ce*): Likewise.
11635 (i[34567]86-*-mingw*): Likewise.
11636 (i[34567]86-*-nto*): Likewise.
11637 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11638 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11639 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11640 (x86_64-*-linux*): Likewise.
11641
11642 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11643 (init_registers_amd64_linux): New.
11644 (x86_arch_setup): Replace init_registers_x86_64_linux with
11645 init_registers_amd64_linux.
11646
193f13e6
MK
116472010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11648
11649 * configure.ac: Check for libdl. If it is not available link against
11650 static libthread_db.
11651 * configure: Regenerate.
11652
85d721b8
PA
116532010-02-22 Pedro Alves <pedro@codesourcery.com>
11654
11655 PR9605
11656
11657 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11658 handing a read watchpoint.
11659 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11660
6076632b
DE
116612010-02-12 Doug Evans <dje@google.com>
11662
11663 * linux-low.c (linux_supports_tracefork_flag): Document.
11664 (linux_look_up_symbols): Add comment.
11665
3327ccf7
L
116662010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11667
11668 * regcache.c (supply_register): Clear regcache if buf is NULL.
11669
0718675c 116702010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 11671 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
11672
11673 * inferiors.c (find_inferior): Add function documentation.
11674 (unloaded_dll): Handle the case where the unloaded dll has not
11675 been previously registered in the dll list.
11676
177321bd
DJ
116772010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11678
11679 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11680 (thumb2_breakpoint): New.
11681 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11682
2b009048
DJ
116832010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11684
11685 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11686 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11687 breakpoints.
11688
3be029c7
PA
116892010-01-21 Pedro Alves <pedro@codesourcery.com>
11690
11691 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11692
18f5de3b
JK
116932010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11694
11695 * linux-s390-low.c (s390_collect_ptrace_register)
11696 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11697
3743bb4f
DE
116982010-01-21 Doug Evans <dje@google.com>
11699
14ce3065
DE
11700 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11701 (PTRACE_ARG4_TYPE): New macro.
11702 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11703 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11704 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11705 (usr_store_inferior_registers): Ditto.
11706 (linux_read_memory, linux_write_memory): Ditto.
11707 (linux_test_for_tracefork): Ditto.
11708
3743bb4f
DE
11709 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11710 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11711
8b315be5
PA
117122010-01-21 Pedro Alves <pedro@codesourcery.com>
11713
11714 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11715 target.
11716
85492558
PA
117172010-01-21 Pedro Alves <pedro@codesourcery.com>
11718
11719 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11720 prototype to take a regcache. Adjust.
11721
442ea881
PA
117222010-01-20 Pedro Alves <pedro@codesourcery.com>
11723
11724 * regcache.h (struct thread_info): Forward declare.
11725 (struct regcache): New.
11726 (new_register_cache): Adjust prototype.
11727 (get_thread_regcache): Declare.
11728 (free_register_cache): Adjust prototype.
11729 (registers_to_string, registers_from_string): Ditto.
11730 (supply_register, supply_register_by_name, collect_register)
11731 (collect_register_as_string, collect_register_by_name): Ditto.
11732 * regcache.c (struct inferior_regcache_data): Delete.
11733 (get_regcache): Rename to ...
11734 (get_thread_regcache): ... this. Adjust. Switch inferior before
11735 fetching registers.
11736 (regcache_invalidate_one): Adjust.
11737 (regcache_invalidate): Fix prototype.
11738 (new_register_cache): Return the new register cache.
11739 (free_register_cache): Change prototype.
11740 (realloc_register_cache): Adjust.
11741 (registers_to_string): Change prototype to take a regcache. Adjust.
11742 (registers_from_string): Ditto.
11743 (register_data): Ditto.
11744 (supply_register): Ditto.
11745 (supply_register_by_name): Ditto.
11746 (collect_register): Ditto.
11747 (collect_register_as_string): Ditto.
11748 (collect_register_by_name): Ditto.
11749 * server.c (process_serial_event): Adjust.
11750 * linux-low.h (regset_fill_func, regset_store_func): Change
11751 prototype.
11752 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11753 Change prototype.
11754 * linux-low.c (get_stop_pc): Adjust.
11755 (check_removed_breakpoint): Adjust.
11756 (linux_wait_for_event): Adjust.
11757 (linux_resume_one_lwp): Adjust.
11758 (fetch_register): Add regcache parameter. Adjust.
11759 (usr_store_inferior_registers): Ditto.
11760 (regsets_fetch_inferior_registers): Ditto.
11761 (regsets_store_inferior_registers): Ditto.
11762 (linux_fetch_registers, linux_store_registers): Ditto.
11763 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11764 regcache. Adjust.
43aaf8b6
PA
11765 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11766 Ditto.
442ea881
PA
11767 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11768 prototype to take a regcache.
11769 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11770 * remote-utils.c (convert_ascii_to_int, outreg)
11771 (prepare_resume_reply): Change prototype to take a regcache.
11772 Adjust.
11773 * target.h (struct target_ops) <fetch_registers, store_registers>:
11774 Change prototype to take a regcache.
11775 (fetch_inferior_registers, store_inferior_registers): Change
11776 prototype to take a regcache. Adjust.
11777 * proc-service.c (ps_lgetregs): Adjust.
11778 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11779 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11780 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11781 take a regcache. Adjust.
11782 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11783 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11784 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11785 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11786 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11787 (cris_cannot_fetch_register):
11788 (cris_breakpoint_at): Change prototype to take a regcache.
11789 Adjust.
11790 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11791 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11792 to take a regcache. Adjust.
11793 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11794 Adjust.
11795 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11796 take a regcache. Adjust.
11797 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11798 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11799 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11800 * linux-mips-low.c (mips_get_pc):
11801 (mips_set_pc): Change prototype to take a regcache. Adjust.
11802 (mips_reinsert_addr): Adjust.
11803 (mips_collect_register): Change prototype to take a regcache.
11804 Adjust.
11805 (mips_supply_register):
11806 (mips_collect_register_32bit, mips_supply_register_32bit)
11807 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11808 (mips_store_fpregset): Ditto.
43aaf8b6
PA
11809 * linux-ppc-low.c (ppc_supply_ptrace_register)
11810 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
11811 (parse_spufs_run): Adjust.
11812 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11813 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11814 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11815 take a regcache. Adjust.
11816 * linux-s390-low.c (s390_collect_ptrace_register)
11817 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11818 (s390_set_pc): Change prototype to take a regcache. Adjust.
11819 (s390_arch_setup): Adjust.
11820 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11821 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11822 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11823 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11824 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11825 regcache. Adjust.
11826 (sparc_breakpoint_at): Adjust.
11827 * linux-xtensa-low.c (xtensa_fill_gregset):
11828 (xtensa_store_gregset):
11829 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11830 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11831 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11832 prototype to take a regcache. Adjust.
11833 * win32-arm-low.c (arm_fetch_inferior_register)
11834 (arm_store_inferior_register): Change prototype to take a
11835 regcache. Adjust.
11836 * win32-i386-low.c (i386_fetch_inferior_register)
11837 (i386_store_inferior_register): Change prototype to take a
11838 regcache. Adjust.
11839 * win32-low.c (child_fetch_inferior_registers)
11840 (child_store_inferior_registers): Change prototype to take a
11841 regcache. Adjust.
11842 (win32_wait): Adjust.
11843 (win32_fetch_inferior_registers): Change prototype to take a
11844 regcache. Adjust.
11845 (win32_store_inferior_registers): Adjust.
11846 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11847 store_inferior_register>: Change prototype to take a regcache.
11848
60c3d7b0
DE
118492010-01-20 Doug Evans <dje@google.com>
11850
11851 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11852 #ifdef.
11853 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 11854 (W_STOPCODE): Provide definition if missing.
60c3d7b0 11855
dc146f7c
VP
118562010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11857
11858 * linux-low.c (linux_core_of_thread): New.
11859 (compare_ints, show_process, list_threads): New.
11860 (linux_qxfer_osdata): Report threads and cores.
11861 (linux_target_op): Register linux_core_of_thread.
11862 * remote-utils.c (prepare_resume_reply): Report the core.
11863 (buffer_xml_printf): Support %d specifier.
11864 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11865 New.
11866 (handle_query): Handle qXfer:threads. Announce availability
11867 thereof.
11868 * target.h (struct target_ops): New field core_of_thread.
11869
7803799a
UW
118702010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11871
11872 * Makefile.in (clean): Remove new generated files.
11873 (reg-s390.o, reg-s390.c): Remove rules.
11874 (reg-s390x.o, reg-s390x.c): Likewise.
11875 (s390-linux32.o, s390-linux32.c): Add rules.
11876 (s390-linux64.o, s390-linux64.c): Likewise.
11877 (s390x-linux64.o, s390x-linux64.c): Likewise.
11878 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11879 * linux-s390-low.c: Include <elf.h>.
11880 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11881 (init_registers_s390): Remove prototype.
11882 (init_registers_s390x): Likewise.
11883 (init_registers_s390_linux32): Add prototype.
11884 (init_registers_s390_linux64): Likewise.
11885 (init_registers_s390x_linux64): Likewise.
11886 (s390_num_regs_3264): New define.
11887 (s390_regmap_3264): New global variable.
11888 (s390_cannot_fetch_register): Remove obsolete check.
11889 (s390_cannot_store_register): Likewise.
11890 (s390_collect_ptrace_register): Handle upper/lower register halves.
11891 (s390_supply_ptrace_register): Likewise.
11892 (s390_fill_gregset): Update to register number changes.
11893 (s390_get_hwcap): New routine.
11894 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11895 Install appropriate regmap and register set.
11896
6e7ffa39
JB
118972010-01-01 Joel Brobecker <brobecker@adacore.com>
11898
11899 * server.c (gdbserver_version): Update copyright year to 2010.
11900 * gdbreplay.c (gdbreplay_version): Likewise.
11901
957f3f49
DE
119022009-12-28 Doug Evans <dje@google.com>
11903
11904 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11905 elf/external.h. Include <elf.h> instead but only if necessary.
11906
ca5c370d
PA
119072009-12-28 Pedro Alves <pedro@codesourcery.com>
11908
11909 * linux-low.c (linux_remove_process): Remove `detaching'
11910 parameter. Don't release/detach from thread_db here.
11911 (linux_kill): Release/detach from thread_db here, ...
11912 (linux_detach): ... and here, before actually detaching.
11913 (linux_wait_1): ... and here, when a process exits.
11914 * thread-db.c (any_thread_of): New.
11915 (thread_db_free): Switch the current inferior to a thread of the
11916 passed in process.
11917
4ee62156
DE
119182009-12-21 Doug Evans <dje@google.com>
11919
d90e6a88
DE
11920 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11921
c5f62d5f
DE
11922 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11923 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11924 warning ifndef __NR_tkill. Move setting of errno there too.
11925 Delete unnecessary resetting of errno after syscall.
11926 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11927
10e86dd7
DE
11928 * configure.ac: Check for dladdr.
11929 * config.in: Regenerate.
11930 * configure: Regenerate.
11931 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11932 (try_thread_db_load): Update.
11933
4ee62156
DE
11934 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11935
00f515da
DE
119362009-12-18 Doug Evans <dje@google.com>
11937
e9464885
DE
11938 * event-loop.c: Include unistd.h if it exists.
11939
07d4f67e
DE
11940 * linux-low.c (my_waitpid): Move definition away from being in
11941 between linux_tracefork_child/linux_test_for_tracefork.
11942
00f515da
DE
11943 * gdb_proc_service.h (psaddr_t): Fix type.
11944 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11945 signature to match glibc.
11946
1de1badb
DE
119472009-12-16 Doug Evans <dje@google.com>
11948
11949 * linux-low.c (linux_read_memory): Fix argument to read.
11950
aeeb81d1
PA
119512009-11-26 Pedro Alves <pedro@codesourcery.com>
11952
11953 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11954 events, don't leave current_inferior pointing at null.
11955
10357975
PA
119562009-11-26 Pedro Alves <pedro@codesourcery.com>
11957
11958 * win32-low.c (LOG): Delete.
11959 (OUTMSG): Output to stderr.
11960 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11961 on compile time LOG macro.
11962 (win32_wait): Fix debug output.
11963
cf6e3471
PA
119642009-11-26 Pedro Alves <pedro@codesourcery.com>
11965
11966 * win32-low.c (win32_add_one_solib): If the dll name is
11967 "ntdll.dll", prepend the system directory to the dll path.
11968
0c85e18e
MK
119692009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11970
11971 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11972
9ac544ce 119732009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 11974 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
11975
11976 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11977 * configure.ac: Check for __mcoldfire__ and set
11978 gdb_cv_m68k_is_coldfire.
11979 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11980 reg-cf.o and reg-m68k.o.
11981 * configure: Regenerated.
11982
fd7dd3e6
PA
119832009-11-16 Pedro Alves <pedro@codesourcery.com>
11984
11985 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11986 Pass it to thread_db_free.
11987 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11988 proper `detaching' argument to linux_remove_process.
11989 * linux-low.h (thread_db_free): Add `detaching' parameter.
11990 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11991 to thread_db_free.
11992 (thread_db_free): Add `detaching' parameter. Only
11993 call td_ta_clear_event if detaching from process.
11994
75aa492e
MK
119952009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11996
11997 * thread-db.c (thread_db_free): Fix typo.
11998
21e1bee4
PP
119992009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12000
12001 PR gdb/10838
12002 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12003
8838b45e
NS
120042009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12005
12006 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12007 with an i686 compiler.
12008 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12009 needed.
12010 * configure: Rebuilt.
12011
8a35fb51
SL
120122009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12013
12014 PR gdb/10783
12015
12016 * server.c (handle_search_memory_1): Correct read_addr initialization
12017 in loop for searching subsequent chunks.
12018
96f15937
PP
120192009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12020
12021 * configure.ac: New --with-libthread-db option.
12022 * thread-db.c: Allow direct dependence on libthread_db.
12023 (thread_db_free): Adjust.
12024 * config.in: Regenerate.
12025 * configure: Likewise.
889bf7c5 12026
5f7d1694
PP
120272009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12028
12029 PR gdb/10757
12030 * thread-db.c (attach_thread): New function.
12031 (maybe_attach_thread): Return success/failure.
12032 (find_new_threads_callback): Adjust.
889bf7c5
PA
12033 (thread_db_find_new_threads): Loop until no new threads.
12034
88e3b899
PA
120352009-10-13 Pedro Alves <pedro@codesourcery.com>
12036
12037 * proc-service.c (ps_lgetregs): Formatting.
12038
cdbfd419
PP
120392009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12040
12041 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12042 * configure.ac: Adjust.
12043 * linux-low.h (struct process_info_private): Move members to struct
12044 thread_db.
12045 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12046 * linux-low.c (linux_remove_process): Adjust.
12047 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12048 * server.c (handle_query): Move code ...
12049 (handle_monitor_command): ... here. New function.
12050 * target.h (struct target_ops): New member.
12051 * thread-db.c (struct thread_db): New.
12052 (libthread_db_search_path): New variable.
12053 (thread_db_create_event, thread_db_enable_reporting)
12054 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12055 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12056 (try_thread_db_load_1, dladdr_to_soname): New functions.
12057 (try_thread_db_load, thread_db_load_search): New functions.
12058 (thread_db_init): Search for libthread_db.
12059 (thread_db_free): New function.
12060 (thread_db_handle_monitor_command): Likewise.
12061 * config.in: Regenerate.
12062 * configure: Regenerate.
889bf7c5 12063
4168d2d6
UW
120642009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12065
12066 * spu-low.c (spu_kill): Wait for inferior to terminate.
12067 Call clear_inferiors.
12068 (spu_detach): Call clear_inferiors.
12069
81ecdfbb
RW
120702009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12071
12072 * aclocal.m4: Regenerate.
12073 * config.in: Likewise.
12074 * configure: Likewise.
12075
0b9ff2c0
UW
120762009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12077
12078 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12079 (parse_spufs_run): New function.
12080 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12081 (ppc_breakpoint_at): Handle SPU breakpoints.
12082
efcbbd14
UW
120832009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12084
12085 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12086 (SPUFS_MAGIC): Define.
12087 (spu_enumerate_spu_ids): New function.
12088 (linux_qxfer_spu): New function.
12089 (linux_target_ops): Install linux_qxfer_spu.
12090
f4d9bade
UW
120912009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12092
12093 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12094 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12095 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12096 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12097 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12098 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12099 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12100 (init_registers_powerpc_cell32l): Add prototype.
12101 (init_registers_powerpc_cell64l): Likewise.
12102 (ppc_arch_setup): Detect Cell/B.E. architecture.
12103
96e946ca
RW
121042009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12105
12106 * Makefile.in (datarootdir): New variable.
12107
58d6951d
DJ
121082009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12109
12110 * linux-low.c (linux_write_memory): Update debugging output.
12111 * Makefile.in (clean): Add new descriptions.
12112 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12113 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12114 * configure.srv: Add new files for arm*-*-linux*.
12115 * linux-arm-low.c: Add new declarations.
12116 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12117 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12118 (HWCAP_VFPv3D16): New.
12119 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12120 instead of __IWMMXT__.
12121 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12122 (arm_arch_setup): New.
12123 (target_regsets): Remove #ifdef. Add VFP regset.
12124 (the_low_target): Use arm_arch_setup.
12125
12b42a12
DJ
121262009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12127
12128 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12129 the main thread again.
12130
ac8c974e
AR
121312009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12132
12133 Adding Neutrino gdbserver.
12134 * configure: Regenerated.
12135 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12136 * configure.srv (i[34567]86-*-nto*): New target.
12137 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12138 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12139 (nto_comctrl) [__QNX__]: New function.
12140 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12141
4424e0c3 121422009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
12143
12144 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12145 srv_tgtobj.
12146
912cf4ba
PA
121472009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12148 Pedro Alves <pedro@codesourcery.com>
12149
12150 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12151 don't support CONTEXT_EXTENDED_REGISTERS.
12152 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12153 (the_low_target): Install them.
12154 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12155 failing with ERROR_PIPE_NOT_CONNECTED.
12156
aa5ca48f
DE
121572009-06-30 Doug Evans <dje@google.com>
12158 Pierre Muller <muller@ics.u-strasbg.fr>
12159
12160 Add h/w watchpoint support to x86-linux, win32-i386.
12161 * Makefile.in (SFILES): Add i386-low.c
12162 (i386_low_h): Define.
12163 (i386-low.o): Add dependencies.
12164 (linux-x86-low.o): Add i386-low.h dependency.
12165 (win32-i386-low.o): Ditto.
12166 * i386-low.c: New file.
12167 * i386-low.h: New file.
12168 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12169 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12170 * linux-low.c (linux_add_process): Initialize arch_private.
12171 (linux_remove_process): Free arch_private.
12172 (add_lwp): Initialize arch_private.
12173 (delete_lwp): Free arch_private.
12174 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12175 provided.
12176 * linux-low.h (process_info_private): New member arch_private.
12177 (lwp_info): New member arch_private.
12178 (linux_target_ops): New members new_process, new_thread,
12179 prepare_to_resume.
12180 (ptid_of): New macro.
12181 * linux-x86-low.c: Include stddef.h, i386-low.h.
12182 (arch_process_info): New struct.
12183 (arch_lwp_info): New struct.
12184 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12185 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12186 (i386_dr_low_get_status): New function.
12187 (x86_insert_point, x86_remove_point): New functions.
12188 (x86_stopped_by_watchpoint): New function.
12189 (x86_stopped_data_address): New function.
12190 (x86_linux_new_process, x86_linux_new_thread): New functions.
12191 (x86_linux_prepare_to_resume): New function.
12192 (the_low_target): Add entries for insert_point, remove_point,
12193 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12194 prepare_to_resume.
12195 * server.c (debug_hw_points): New global.
12196 (monitor_show_help): Document set debug-hw-points.
12197 (handle_query): Process "set debug-hw-points".
12198 * server.h (debug_hw_points): Declare.
12199 (paddress): Declare.
12200 * utils.c (NUMCELLS, CELLSIZE): New macros.
12201 (get_sell, xsnprintf, paddress): New functions.
12202 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12203 remove_point, stopped_by_watchpoint, stopped_data_address.
12204 * win32-i386-low.c: Include i386-low.h.
12205 (debug_reg_state): Replaces dr.
12206 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12207 (i386_dr_low_get_status): New function.
12208 (i386_insert_point, i386_remove_point): New functions.
12209 (i386_stopped_by_watchpoint): New function.
12210 (i386_stopped_data_address): New function.
12211 (i386_initial_stuff): Update.
12212 (get_thread_context,set_thread_context,i386_thread_added): Update.
12213 (the_low_target): Add entries for insert_point,
12214 remove_point, stopped_by_watchpoint, stopped_data_address.
12215 * win32-low.c (win32_insert_watchpoint): New function.
12216 (win32_remove_watchpoint): New function.
12217 (win32_stopped_by_watchpoint): New function.
12218 (win32_stopped_data_address): New function.
12219 (win32_target_ops): Add entries for insert_watchpoint,
12220 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12221 * win32-low.h (win32_target_ops): New members insert_point,
12222 remove_point, stopped_by_watchpoint, stopped_data_address.
12223
d993e290
PA
122242009-06-25 Pedro Alves <pedro@codesourcery.com>
12225
12226 * server.c (process_serial_event): Re-return unsupported, not
12227 error, if the type isn't recognized. Re-allow supporting only
12228 insert or remove packets. Also call require_running for
12229 breakpoints. Add missing break statement to default case. Tidy.
12230 * target.h (struct target_ops): Rename insert_watchpoint to
12231 insert_point, and remove_watchpoint to remove_point.
12232
12233 * linux-low.h (struct linux_target_ops): Likewise.
12234 * linux-low.c (linux_insert_watchpoint): Rename to ...
12235 (linux_insert_point): ... this. Adjust.
12236 (linux_remove_watchpoint): Rename to ...
12237 (linux_remove_point): ... this. Adjust.
12238 (linux_target_ops): Adjust.
12239 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12240 (cris_insert_point): ... this.
12241 (cris_remove_watchpoint): Rename to ...
12242 (cris_remove_point): ... this.
12243 (the_low_target): Adjust.
12244
0f54c268
PM
122452009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12246
12247 * server.c (handle_v_kill): Pass signal_pid to
12248 kill_inferior if multi_process is zero.
12249
c6314022
AR
122502009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12251
12252 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12253 * target.h (target_ops): Comment for *_watchpoint to make it clear
12254 the functions can get types '0' and '1'.
12255
4463ce24
AR
122562009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12257
12258 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12259 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12260 * regcache.c (get_regcache): Likewise.
12261 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12262 * win32-low.c (child_fetch_inferior_registers): Remove check for
12263 regno 0.
12264
cf8fd78b
PA
122652009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12266 Pedro Alves <pedro@codesourcery.com>
12267
12268 * target.h (struct target_ops) <supports_multi_process>: New
12269 callback.
12270 (target_supports_multi_process): New.
12271 * server.c (handle_query): Even if GDB reports support, only
12272 enable multi-process if the target also supports it. Report
12273 multi-process support only if the target backend supports it.
12274 * linux-low.c (linux_supports_multi_process): New function.
12275 (linux_target_ops): Install it as target_supports_multi_process
12276 callback.
12277
47c0c975
DE
122782009-05-24 Doug Evans <dje@google.com>
12279
e09875d4
DE
12280 Global renaming of find_thread_pid to find_thread_ptid.
12281 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12282 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12283 All callers updated.
12284
e27d73f6
DE
12285 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12286 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12287 directly.
12288
47c0c975
DE
12289 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12290 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12291 (linux_resume_one_lwp): Ditto.
12292
2acc282a
DE
122932009-05-23 Doug Evans <dje@google.com>
12294
12295 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12296 from struct inferior_list_entry * to struct lwp_info *.
12297 All callers updated.
12298
9f1036c1
DE
122992009-05-13 Doug Evans <dje@google.com>
12300
12301 * linux-x86-low.c: Don't include assert.h.
12302 (x86_siginfo_fixup): Use fatal, not assert.
12303 (x86_arch_setup): Fix comment.
12304
d0722149
DE
123052009-05-12 Doug Evans <dje@google.com>
12306
12307 Biarch support for i386/amd64 gdbserver.
12308 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12309 Add linux-x86-low.c.
12310 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12311 (linux-x86-low.o): Add.
12312 * linux-x86-64-low.c: Delete.
12313 * linux-i386-low.c: Delete.
12314 * linux-x86-low.c: New file.
12315 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12316 linux-x86-low.o.
12317 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12318 linux-x86-low.o.
12319 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12320 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12321 (linux_child_pid_to_exec_file): New function.
12322 (elf_64_header_p, elf_64_file_p): New functions.
12323 (siginfo_fixup): New function.
12324 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12325 give target a chance to convert layout.
12326 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12327 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12328
fdeb2a12
DE
123292009-05-07 Doug Evans <dje@google.com>
12330
12331 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12332 (regsets_store_inferior_registers): Ditto.
12333
a6dbe5df
PA
123342009-05-06 Pedro Alves <pedro@codesourcery.com>
12335
12336 PR server/10048
12337
12338 * linux-low.c (must_set_ptrace_flags): Delete.
12339 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12340 of the global.
12341 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12342 `lwp->must_set_ptrace_flags' instead.
ba42693b 12343 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
12344 (linux_wait_1): ... not here.
12345
5091eb23
DE
123462009-04-30 Doug Evans <dje@google.com>
12347
9f767825
DE
12348 * inferiors.c (started_inferior_callback): New function.
12349 (attached_inferior_callback): New function.
12350 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12351 * server.c (print_started_pid, print_attached_pid): New functions.
12352 (detach_or_kill_for_exit): New function.
12353 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12354 * server.h (have_started_inferiors_p): Declare.
12355 (have_attached_inferiors_p): Declare.
12356
5091eb23
DE
12357 * inferiors.c (remove_process): Fix memory leak, free process.
12358 * linux-low.c (linux_remove_process): New function.
12359 (linux_kill): Call it instead of remove_process.
12360 (linux_detach, linux_wait_1): Ditto.
12361
155c8968
PA
123622009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12363
12364 * configure.srv: Add x86 Windows CE target.
12365
7fe519cb
UW
123662009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12367
12368 * inferiors.c (get_thread_process): Make global.
12369 * server.h (get_thread_process): Add prototype.
12370 * thread-db.c (find_one_thread): Use get_thread_process
12371 instead of current_process.
12372 (thread_db_get_tls_address): Do not crash if called when
12373 thread layer is not yet initialized.
12374
5472f405
UW
123752009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12376
12377 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12378 * spu-low.c (current_tid): Rename to ...
12379 (current_ptid): ... this.
12380 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12381 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12382 ptid_get_lwp (current_ptid) instead of current_tid.
12383 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12384 instead of current_tid. Use find_process_pid to verify pid
12385 argument is valid. Pass proper argument to remove_process.
12386 (spu_thread_alive): Compare current_ptid instead of current_tid.
12387 (spu_resume): Likewise.
12388
55ac2b99
PA
123892009-04-02 Pedro Alves <pedro@codesourcery.com>
12390
12391 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12392 variable.
12393
95954743
PA
123942009-04-01 Pedro Alves <pedro@codesourcery.com>
12395
12396 Implement the multiprocess extensions, and add linux multiprocess
12397 support.
12398
12399 * server.h (ULONGEST): Declare.
12400 (struct ptid, ptid_t): New.
12401 (minus_one_ptid, null_ptid): Declare.
12402 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12403 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12404 (struct inferior_list_entry): Change `id' type from unsigned from
12405 to ptid_t.
12406 (struct sym_cache, struct breakpoint, struct
12407 process_info_private): Forward declare.
12408 (struct process_info): Declare.
12409 (current_process): Declare.
12410 (all_processes): Declare.
12411 (initialize_inferiors): Declare.
12412 (add_thread): Adjust to use ptid_t.
12413 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12414 (add_process, remove_process, find_thread_pid): Declare.
12415 (find_inferior_id): Adjust to use ptid_t.
12416 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12417 (multi_process): Declare.
12418 (push_event): Adjust to use ptid_t.
12419 (read_ptid, write_ptid): Declare.
12420 (prepare_resume_reply): Adjust to use ptid_t.
12421 (clear_symbol_cache): Declare.
12422 * inferiors.c (all_processes): New.
12423 (null_ptid, minus_one_ptid): New.
12424 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12425 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12426 (add_thread): Change unsigned long to ptid. Remove gdb_id
12427 parameter. Adjust.
12428 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12429 (gdb_id_to_thread): Rename to ...
12430 (find_thread_pid): ... this. Change unsigned long to ptid.
12431 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12432 (loaded_dll, pull_pid_from_list): Adjust.
12433 (add_process, remove_process, find_process_pid)
12434 (get_thread_process, current_process, initialize_inferiors): New.
12435 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12436 (struct target_waitstatus) <related_pid>: Ditto.
12437 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12438 return type to int.
12439 (struct target_ops) <join>: Add `pid' argument.
12440 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12441 (struct target_ops) <wait>: Add `ptid' field. Change return type
12442 to ptid.
12443 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12444 (mywait): Add `ptid' argument. Change return type to ptid_t.
12445 (target_pid_to_str): Declare.
12446 * target.c (set_desired_inferior): Adjust to use ptids.
12447 (mywait): Add new `ptid' argument. Adjust.
12448 (target_pid_to_str): New.
12449 * mem-break.h (free_all_breakpoints): Declare.
12450 * mem-break.c (breakpoints): Delelete.
12451 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12452 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12453 to use per-process breakpoint list.
12454 (free_all_breakpoints): New.
12455 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12456 (symbol_cache, all_symbols_looked_up): Delete.
12457 (hexchars): New.
12458 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12459 read_ptid): New.
12460 (prepare_resume_reply): Change ptid argument's type from unsigned
12461 long to ptid_t. Adjust. Implement W;process and X;process.
12462 (free_sym_cache, clear_symbol_cache): New.
12463 (look_up_one_symbol): Adjust to per-process symbol cache. *
12464 * server.c (cont_thread, general_thread, step_thread): Change type
12465 to ptid_t.
12466 (attached): Delete.
12467 (multi_process): New.
12468 (last_ptid): Change type to ptid_t.
12469 (struct vstop_notif) <ptid>: Change type to ptid_t.
12470 (queue_stop_reply, push_event): Change `ptid' argument's type to
12471 ptid_t.
12472 (discard_queued_stop_replies): Add `pid' argument.
12473 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12474 changes. Don't reference the `attached' global.
12475 (attach_inferior): Adjust to mywait interface changes.
12476 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12477 features. Handle and report "multiprocess+". Handle
12478 "qAttached:PID".
12479 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12480 changes.
12481 (handle_v_kill): New.
12482 (handle_v_stopped): Adjust to use target_pid_to_str.
12483 (handle_v_requests): Allow multiple attaches and runs when
12484 multiprocess extensions are in effect. Handle "vKill".
12485 (myresume): Adjust to use ptids.
12486 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12487 (handle_status): Adjust to discard_queued_stop_replies interface
12488 change.
12489 (first_thread_of, kill_inferior_callback)
12490 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12491 (main): Call initialize_inferiors. Adjust to use ptids, killing
12492 and detaching from all inferiors. Handle multiprocess packet
12493 variants.
12494 * linux-low.h: Include gdb_proc_service.h.
12495 (struct process_info_private): New.
12496 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12497 <lwpid_of>: Use ptid_get_lwp.
12498 (get_lwp_thread): Adjust.
12499 (struct lwp_info): Add `dead' member.
12500 (find_lwp_pid): Declare.
12501 * linux-low.c (thread_db_active): Delete.
12502 (new_inferior): Adjust comment.
12503 (inferior_pid): Delete.
12504 (linux_add_process): New.
12505 (handle_extended_wait): Adjust.
12506 (add_lwp): Change unsigned long to ptid.
12507 (linux_create_inferior): Add process to processes table. Adjust
12508 to use ptids. Don't set new_inferior here.
12509 (linux_attach_lwp): Rename to ...
12510 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12511 it. Adjust to use ptids.
12512 (linux_attach_lwp): New.
12513 (linux_attach): Add process to processes table. Don't set
12514 new_inferior here.
12515 (struct counter): New.
12516 (second_thread_of_pid_p, last_thread_of_process_p): New.
12517 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12518 multiple processes.
12519 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12520 processes. Remove process from process table.
12521 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12522 to multiple processes.
12523 (any_thread_of): New.
12524 (linux_detach): Add `pid' argument, and handle it. Remove process
12525 from processes table.
12526 (linux_join): Add `pid' argument. Handle it.
12527 (linux_thread_alive): Change unsighed long argument to ptid_t.
12528 Consider dead lwps as not being alive.
12529 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12530 threads we're not interested in.
12531 (same_lwp, find_lwp_pid): New.
12532 (linux_wait_for_lwp): Change `pid' argument's type from int to
12533 ptid_t. Adjust.
12534 (linux_wait_for_event): Rename to ...
12535 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12536 from int to ptid_t. Adjust.
12537 (linux_wait_for_event): New.
12538 (linux_wait_1): Add `ptid' argument. Change return type to
12539 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12540 that exit from the process table.
12541 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12542 Adjust.
12543 (mark_lwp_dead): New.
12544 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12545 stopping all threads, mark its main lwp as dead.
12546 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12547 ptids.
12548 (fetch_register, usr_store_inferior_registers)
12549 (regsets_fetch_inferior_registers)
12550 (regsets_store_inferior_registers, linux_read_memory)
12551 (linux_write_memory): Inline `inferior_pid'.
12552 (linux_look_up_symbols): Adjust to use per-process
12553 `thread_db_active'.
12554 (linux_request_interrupt): Adjust to use ptids.
12555 (linux_read_auxv): Inline `inferior_pid'.
12556 (initialize_low): Don't reference thread_db_active.
12557 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12558 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12559 (ps_getpid): Return the pid of the current inferior.
12560 * thread-db.c (proc_handle, thread_agent): Delete.
12561 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12562 per-process data.
12563 (find_one_thread): Change argument type to ptid_t. Adjust to
12564 per-process data.
12565 (maybe_attach_thread): Adjust to per-process data and ptids.
12566 (thread_db_find_new_threads): Ditto.
12567 (thread_db_init): Ditto.
12568 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12569 processes table. Adjust to use ptids.
12570 (spu_kill, spu_detach): Adjust interface. Remove process from
12571 processes table.
12572 (spu_join, spu_thread_alive): Adjust interface.
12573 (spu_wait): Adjust interface. Remove process from processes
12574 table. Adjust to use ptids.
12575 * win32-low.c (current_inferior_tid): Delete.
12576 (current_inferior_ptid): New.
12577 (debug_event_ptid): New.
12578 (thread_rec): Take a ptid. Adjust.
12579 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12580 (child_delete_thread): Ditto.
12581 (do_initial_child_stuff): Add `attached' argument. Add process to
12582 processes table.
12583 (child_fetch_inferior_registers, child_store_inferior_registers):
12584 Adjust.
12585 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12586 (win32_attach): Pass 1 to do_initial_child_stuff.
12587 (win32_kill): Adjust interface. Remove process from processes
12588 table.
12589 (win32_detach): Ditto.
12590 (win32_join): Adjust interface.
12591 (win32_thread_alive): Take a ptid.
12592 (win32_resume): Adjust to use ptids.
12593 (get_child_debug_event): Ditto.
12594 (win32_wait): Adjust interface. Remove exiting process from
12595 processes table.
12596
bd99dc85
PA
125972009-04-01 Pedro Alves <pedro@codesourcery.com>
12598
12599 Non-stop mode support.
12600
12601 * server.h (non_stop): Declare.
12602 (gdb_client_data, handler_func): Declare.
12603 (delete_file_handler, add_file_handler, start_event_loop):
12604 Declare.
12605 (handle_serial_event, handle_target_event, push_event)
12606 (putpkt_notif): Declare.
12607 * target.h (enum resume_kind): New.
12608 (struct thread_resume): Replace `step' field by `kind' field.
12609 (TARGET_WNOHANG): Define.
12610 (struct target_ops) <wait>: Add `options' argument.
12611 <supports_non_stop, async, start_non_stop>: New fields.
12612 (target_supports_non_stop, target_async): New.
12613 (start_non_stop): Declare.
12614 (mywait): Add `options' argument.
12615 * target.c (mywait): Add `options' argument. Print child exit
12616 notifications here.
12617 (start_non_stop): New.
12618 * server.c (non_stop, own_buf, mem_buf): New globals.
12619 (struct vstop_notif): New.
12620 (notif_queue): New global.
12621 (queue_stop_reply, push_event, discard_queued_stop_replies)
12622 (send_next_stop_reply): New.
12623 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12624 interface changes.
12625 (attach_inferior): In non-stop mode, don't wait for the target
12626 here.
12627 (handle_general_set): Handle QNonStop.
12628 (handle_query): When handling qC, return the current general
12629 thread, instead of the first thread of the list.
12630 (handle_query): If the backend supports non-stop mode, include
12631 QNonStop+ in the qSupported query response.
12632 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12633 and non-stop mode.
12634 (handle_v_attach, handle_v_run): Handle non-stop mode.
12635 (handle_v_stopped): New.
12636 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12637 (myresume): Adjust to use resume_kind. Handle non-stop.
12638 (queue_stop_reply_callback): New.
12639 (handle_status): Handle non-stop mode.
12640 (main): Clear non_stop flag on reconnection. Use the event-loop.
12641 Refactor serial protocol handling from here ...
12642 (process_serial_event): ... to this new function. When GDB
12643 selects any thread, select one here. In non-stop mode, wait until
12644 GDB acks all pending events before exiting.
12645 (handle_serial_event, handle_target_event): New.
12646 * remote-utils.c (remote_open): Install remote_desc in the event
12647 loop.
12648 (remote_close): Remove remote_desc from the event loop.
12649 (putpkt_binary): Rename to...
12650 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12651 (putpkt_binary): New as wrapper around putpkt_binary_1.
12652 (putpkt_notif): New.
12653 (prepare_resume_reply): In non-stop mode, don't change the
12654 general_thread.
12655 * event-loop.c: New.
12656 * Makefile.in (OBJ): Add event-loop.o.
12657 (event-loop.o): New rule.
12658
12659 * linux-low.h (pid_of): Moved here.
12660 (lwpid_of): New.
12661 (get_lwp_thread): Use lwpid_of.
12662 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12663 * linux-low.c (pid_of): Delete.
12664 (inferior_pid): Use lwpid_of.
12665 (linux_event_pipe): New.
12666 (target_is_async_p): New.
12667 (delete_lwp): New.
12668 (handle_extended_wait): Use lwpid_of.
12669 (add_lwp): Don't set lwpid field.
12670 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12671 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12672 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12673 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12674 first. Adjust to linux_wait_for_event interface changes. Use
12675 lwpid_of.
12676 (linux_detach): Don't delete the main lwp here.
12677 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12678 (status_pending_p): Don't consider explicitly suspended lwps.
12679 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12680 pointer. Add OPTIONS argument. Change return type to int. Use
12681 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12682 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12683 pointer. Add status pointer argument. Return a pid instead of a
12684 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12685 changes. In non-stop mode, don't switch to a random thread.
12686 (linux_wait): Rename to...
12687 (linux_wait_1): ... this. Add target_options argument, and handle
12688 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12689 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12690 clean exit and signal exit code. Don't stop all threads in
12691 non-stop mode. In all-stop mode, only stop all threads when
12692 reporting a stop to GDB. Handle explicit thread stop requests.
12693 (async_file_flush, async_file_mark): New.
12694 (linux_wait): New.
12695 (send_sigstop): Use lwpid_of.
12696 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12697 interface changes. In non-stop mode, don't switch to a random
12698 thread.
12699 (linux_resume_one_lwp): Use lwpid_of.
12700 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12701 (linux_resume_one_thread): ... this. Handle resume_stop. In
12702 non-stop mode, don't look for pending flag in all threads.
12703 (resume_status_pending_p): Don't consider explicitly suspended
12704 threads.
12705 (my_waitpid): Reimplement. Emulate __WALL.
12706 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12707 Use lwpid_of.
12708 (sigchld_handler, linux_supports_non_stop, linux_async)
12709 (linux_start_non_stop): New.
12710 (linux_target_ops): Register linux_supports_non_stop, linux_async
12711 and linux_start_non_stop.
12712 (initialize_low): Install SIGCHLD handler.
12713 * thread-db.c (thread_db_create_event, find_one_thread)
12714 (thread_db_get_tls_address): Use lwpid_of.
12715 * win32-low.c (win32_detach): Adjust to use resume_kind.
12716 (win32_wait): Add `options' argument.
12717 * spu-low.c (spu_resume): Adjust to use resume_kind.
12718 (spu_wait): Add `options' argument.
12719
5b1c542e
PA
127202009-04-01 Pedro Alves <pedro@codesourcery.com>
12721
12722 Decouple target code from remote protocol.
12723
12724 * target.h (enum target_waitkind): New.
12725 (struct target_waitstatus): New.
12726 (struct target_ops) <wait>: Return an unsigned long. Take a
12727 target_waitstatus pointer instead of a char pointer.
12728 (mywait): Likewise.
12729 * target.c (mywait): Change prototype to return an unsigned long.
12730 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12731 * server.h (thread_from_wait, old_thread_from_wait): Delete
12732 declarations.
12733 (prepare_resume_reply): Change prototype to take a
12734 target_waitstatus.
12735 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12736 (last_status, last_ptid): New.
12737 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12738 pid instead of a signal.
12739 (attach_inferior): Remove "status" and "signal" parameters.
12740 Adjust.
12741 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12742 not as an address.
12743 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12744 (handle_v_requests, myresume): Remove "status" and "signal"
12745 parameters. Adjust.
12746 (handle_status): New.
12747 (main): Delete local `status'. Adjust.
12748 * remote-utils.c: Include target.h.
12749 (prepare_resume_reply): Change prototype to take a
12750 target_waitstatus. Adjust.
12751
12752 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12753 interface.
12754 * spu-low.c (spu_wait): Adjust.
12755 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12756 Delete.
12757 (win32_wait): Adjust.
12758
2bd7c093
PA
127592009-04-01 Pedro Alves <pedro@codesourcery.com>
12760
12761 * target.h (struct thread_resume): Delete leave_stopped member.
12762 (struct target_ops): Add a `n' argument to the `resume' callback.
12763 * server.c (start_inferior): Adjust.
12764 (handle_v_cont, myresume): Adjust.
12765 * linux-low.c (check_removed_breakpoint): Adjust to resume
12766 interface change, and to removed leave_stopped field.
12767 (resume_ptr): Delete.
12768 (struct thread_resume_array): New.
12769 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12770 resume interface change.
12771 (linux_continue_one_thread, linux_queue_one_thread)
12772 (resume_status_pending_p): Check if the resume field is NULL
12773 instead of checking the leave_stopped member.
12774 (linux_resume): Adjust to the target resume interface change.
12775 * spu-low.c (spu_resume): Adjust to the target resume interface
12776 change.
12777 * win32-low.c (win32_detach, win32_resume): Ditto.
12778
c35fafde
PA
127792009-04-01 Pedro Alves <pedro@codesourcery.com>
12780
12781 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12782 flag.
12783 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12784 pending.
12785 (linux_continue_one_thread): Only preserve the stepping flag if
12786 there's a pending breakpoint.
12787
0a59d50b
PA
127882009-03-31 Pedro Alves <pedro@codesourcery.com>
12789
12790 * server.c (main): After the inferior having exited, call
12791 remote_close before exiting gdbserver.
12792
f04c6d38
TJB
127932009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12794
12795 Fix size of FPSCR in Power 7 processors.
12796 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12797 (PPC_FEATURE_HAS_DFP): New #define.
12798 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12799 size of the FPSCR.
12800
78e5cee6
PA
128012009-03-23 Pedro Alves <pedro@codesourcery.com>
12802
12803 * server.c (handle_query) Whitespace and formatting.
12804
1b3f6016
PA
128052009-03-22 Pedro Alves <pedro@codesourcery.com>
12806
12807 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12808 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12809 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12810 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12811 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12812 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12813 Makefile.in, configure.ac: Fix whitespace throughout.
12814 * configure: Regenerate.
12815
a07b2135
PA
128162009-03-22 Pedro Alves <pedro@codesourcery.com>
12817
12818 * inferiors.c (find_inferior): Make it safe for the callback
12819 function to delete the currently iterated inferior.
12820
67cc2626
PA
128212009-03-22 Pedro Alves <pedro@codesourcery.com>
12822
12823 * Makefile.in (linuw_low_h): Move higher.
12824 (thread-db.o): Depend on $(linux_low_h).
12825
54a0b537
PA
128262009-03-17 Pedro Alves <pedro@codesourcery.com>
12827
12828 Rename "process" to "lwp" throughout.
12829
12830 * linux-low.c (all_processes): Rename to...
12831 (all_lwps): ... this.
12832 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12833 (add_process): Rename to ...
12834 (add_lwp): ... this. Adjust.
12835 (linux_create_inferior): Adjust.
12836 (linux_attach_lwp): Adjust.
12837 (linux_attach): Adjust.
12838 (linux_kill_one_process): Rename to ...
12839 (linux_kill_one_lwp): ... this. Adjust.
12840 (linux_kill): Adjust.
12841 (linux_detach_one_process): Rename to ...
12842 (linux_detach_one_lwp): ... this. Adjust.
12843 (linux_detach): Adjust.
12844 (check_removed_breakpoint): Adjust.
12845 (status_pending_p): Adjust.
12846 (linux_wait_for_process): Rename to ...
12847 (linux_wait_for_lwp): ... this. Adjust.
12848 (linux_wait_for_event): Adjust.
12849 (send_sigstop): Adjust.
12850 (wait_for_sigstop): Adjust.
12851 (stop_all_processes): Rename to ...
12852 (stop_all_lwps): ... this.
12853 (linux_resume_one_process): Rename to ...
12854 (linux_resume_one_lwp): ... this. Adjust.
12855 (linux_set_resume_request, linux_continue_one_thread)
12856 (linux_queue_one_thread, resume_status_pending_p)
12857 (usr_store_inferior_registers, regsets_store_inferior_registers)
12858 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12859 Adjust.
12860 * linux-low.h (get_process): Rename to ...
12861 (get_lwp): ... this. Adjust.
12862 (get_thread_process): Rename to ...
12863 (get_thread_lwp): ... this. Adjust.
12864 (get_process_thread): Rename to ...
12865 (get_lwp_thread): ... this. Adjust.
12866 (struct process_info): Rename to ...
12867 (struct lwp_info): ... this.
12868 (all_processes): Rename to ...
12869 (all_lwps): ... this.
12870 * proc-service.c (ps_lgetregs): Adjust.
12871 * thread-db.c (thread_db_create_event, find_one_thread)
12872 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12873
0b16c5cf
PA
128742009-03-14 Pedro Alves <pedro@codesourcery.com>
12875
12876 * server.c (handle_query): Handle "qAttached".
12877
32de4b9d
NS
128782009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12879
12880 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12881 GPLv3, update license URL.
12882
2aecd87f
DE
128832009-03-01 Doug Evans <dje@google.com>
12884
93efd302 12885 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
12886 (server_h): Add gdb_signals.h.
12887 (signals.o): Update.
12888 * server.h (target_signal_from_host,target_signal_to_host_p)
12889 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12890
86b1f9c5
PM
128912009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12892
12893 * remote-utils.c (getpkt): Also generate remote-debug
12894 information if noack_mode is set.
12895
4aa995e1
PA
128962009-02-06 Pedro Alves <pedro@codesourcery.com>
12897
12898 * server.c (handle_query): Report qXfer:siginfo:read and
12899 qXfer:siginfo:write as supported and handle them.
12900 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12901 * linux-low.c (linux_xfer_siginfo): New.
12902 (linux_target_ops): Set it.
12903
62709adf
PA
129042009-01-26 Pedro Alves <pedro@codesourcery.com>
12905
12906 * server.c (gdbserver_usage): Mention --remote-debug.
12907 (main): Accept '--remote-debug' switch.
12908
aef93bd7
DE
129092009-01-18 Doug Evans <dje@google.com>
12910
12911 * regcache.c (new_register_cache): No need to check result of xcalloc.
12912 * server.c (handle_search_memory): Back out calls to xmalloc,
12913 result is checked and error is returned to user upon failure.
12914 (handle_query): Ditto. Add more checks for result of malloc.
12915 (handle_v_cont): Check result of malloc, report error back to
12916 user upon failure.
12917 (handle_v_run): Ditto. Call freeargv.
12918 * server.h (freeargv): Declare.
12919 * utils.c (freeargv): New fn.
12920
54363045
DE
129212009-01-15 Doug Evans <dje@google.com>
12922
f626972c
DE
12923 * gdbreplay.c (perror_with_name): Make arg const char *.
12924 * server.h (target_signal_to_name): Make return type const char *.
0842e787 12925 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 12926 * utils.c (perror_with_name): Make arg const char *.
54363045 12927
18aae699
PA
129282009-01-14 Pedro Alves <pedro@codesourcery.com>
12929
12930 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12931 when handling a EXIT_PROCESS_DEBUG_EVENT.
12932
ff703abe
JB
129332009-01-06 Joel Brobecker <brobecker@adacore.com>
12934
12935 * gdbreplay.c (gdbreplay_version): Update copyright year.
12936 * server.c (gdbserver_version): Likewise.
12937
f21cc1a2 129382009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
12939
12940 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 12941 (handle_extended_wait): Improve comment.
0e21c1ec 12942
bca929d3
DE
129432008-12-13 Doug Evans <dje@google.com>
12944
12945 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12946 * server.h (ATTR_MALLOC): New macro.
12947 (xmalloc,xcalloc,xstrdup): Declare.
12948 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12949 * inferiors.c: Ditto.
12950 * linux-low.c: Ditto.
12951 * mem-break.c: Ditto.
12952 * regcache.c: Ditto.
12953 * remote-utils.c: Ditto.
12954 * server.c: Ditto.
12955 * target.c: Ditto.
12956 * win32-low.c: Ditto.
12957
97438e3f
DE
129582008-12-12 Doug Evans <dje@google.com>
12959
896c7fbb
DE
12960 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12961 in debugging printf.
12962
97438e3f
DE
12963 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12964
e3b886f8
DE
129652008-12-09 Doug Evans <dje@google.com>
12966
12967 * linux-low.h (struct process_info): Delete member tid, unused.
12968 * thread-db.c (find_one_thread): Update.
12969 (maybe_attach_thread): Update.
12970
07e059b5
VP
129712008-12-02 Pedro Alves <pedro@codesourcery.com>
12972
889bf7c5
PA
12973 * target.h (struct target_ops): Add qxfer_osdata member.
12974 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12975 and dirent.h.
12976 (linux_qxfer_osdata): New functions.
12977 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12978 callback.
12979 * server.c (handle_query): Handle "qXfer:osdata:read:".
12980 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12981 (buffer_xml_printf): New functions.
12982 * server.h (struct buffer): New.
12983 (buffer_grow_str, buffer_grow_str0): New macros.
12984 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12985 (buffer_xml_printf): Declare.
07e059b5 12986
4cab47ab
DE
129872008-11-24 Doug Evans <dje@google.com>
12988
12989 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12990
f142445f
DJ
129912008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12992
12993 * server.c (handle_v_run): Always use the supplied argument list.
12994
d0107bb6 129952008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 12996
d0107bb6
BW
12997 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12998 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 12999
2c4ad781
TJB
130002008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13001
13002 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13003 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13004 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13005 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13006 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13007 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13008 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13009 XML target descriptions.
13010 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13011 when inferior is running on an ISA 2.05 or later processor. Add
13012 special case to return offset for full 64-bit slot of FPSCR when
13013 in 32-bits.
13014
dfb64f85
DJ
130152008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13016
13017 * Makefile.in (SFILES, clean): Added sparc64 files.
13018 (reg-sparc64.o, reg-sparc64.c): New.
13019 * configure.srv (sparc*-*-linux*): New configuration.
13020 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13021 syscall arguments for SPARC.
13022 (regsets_store_inferior_registers): Likewise.
13023 * linux-sparc-low.c: New file.
13024
66b6e1dd
DE
130252008-10-21 Doug Evans <dje@google.com>
13026
13027 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13028 (READLINE_DIR,READLINE_DEP): Delete.
13029 (INTERNAL_CFLAGS): Update.
13030 (LINTFLAGS): Update.
13031
9b710a42
PA
130322008-10-10 Pedro Alves <pedro@codesourcery.com>
13033
13034 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13035 whole argv from the last run, not just argv[0].
13036
5822d809
PA
130372008-09-08 Pedro Alves <pedro@codesourcery.com>
13038
13039 * regcache.c (new_register_cache): Return NULL if the register
13040 cache size isn't known yet.
13041 (free_register_cache): Avoid dereferencing a NULL regcache.
13042
74aac56f
DJ
130432008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13044
13045 * configure.srv: Merge MIPS and MIPS64.
13046
400b20f5
MR
130472008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13048
13049 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13050
677c5bb1
LM
130512008-08-18 Luis Machado <luisgpm@br.ibm.com>
13052
13053 * Makefile.in: Add required vsx dependencies.
13054
13055 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13056 Declare init_registers_powerpc_vsx32l.
13057 Declare init_registers_powerpc_vsx64l.
13058 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13059 (ppc_arch_setup): Check for VSX in hwcap.
13060 (ppc_fill_vsxregset): New function.
13061 (ppc_store_vsxregset): New function.
13062 Add new VSX entry in regset_info target_regsets.
13063
13064 * configure.srv: Add new VSX dependencies.
13065
a6f3e723
SL
130662008-08-12 Pedro Alves <pedro@codesourcery.com>
13067
13068 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13069 (remote_open): Set or clear transport_is_reliable.
13070 (putpkt_binary): Don't expect acks in noack mode.
13071 (getpkt): Don't send ack/nac in noack mode.
13072 * server.c (handle_general_set): Handle QStartNoAckMode.
13073 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13074 qSupported.
13075 (main): Reset noack_mode on every connection.
13076 * server.h (noack_mode): Declare.
13077
a417dc56
RW
130782008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13079
13080 * Makefile.in (GDBREPLAY_OBS): New variable.
13081 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13082
3221518c
UW
130832008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13084 Daniel Jacobowitz <dan@codesourcery.com>
13085
13086 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13087 (usr_store_inferior_registers): Likewise.
13088 (regsets_store_inferior_registers): Likewise.
13089
ec56be1b
PA
130902008-07-31 Rolf Jansen <rj@surtec.com>
13091 Pedro Alves <pedro@codesourcery.com>
13092
13093 * configure.ac: Check for memmem declaration.
13094 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13095 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13096 (disable_packet_qfThreadInfo): Unconditionally compile.
13097 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13098 * configure, config.in: Regenerate.
13099
2fe5e3ff
DE
131002008-07-28 Doug Kwan <dougkwan@google.com>
13101
13102 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13103 (linux_write_memory): Remove declaration of errno.
13104
836acd6d
UW
131052008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13106
13107 * linux-low.c (handle_extended_wait): Do not use "status"
13108 variable uninitialized.
13109
aeba519e
PA
131102008-07-07 Pedro Alves <pedro@codesourcery.com>
13111
13112 * server.c (handle_v_attach): Inhibit reporting dll changes.
13113
db42f210
PA
131142008-06-27 Pedro Alves <pedro@codesourcery.com>
13115
13116 * remote-utils.c (prepare_resume_reply): If requested, don't
13117 output "thread:TID" in the T stop reply.
13118
13119 * server.c (disable_packet_vCont, disable_packet_Tthread)
13120 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13121 (handle_query): If requested, disable support for qC, qfThreadInfo
13122 and qsThreadInfo.
13123 (handle_v_requests): If requested, disable support for vCont.
13124 (gdbserver_show_disableable): New.
13125 (main): Handle --disable-packet and --disable-packet=LIST.
13126
13127 * server.h (disable_packet_vCont, disable_packet_Tthread)
13128 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13129
8e4c5421
CD
131302008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13131
13132 * server.c (gdbserver_usage): Mention --version.
13133
6e23a804
DJ
131342008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13135
13136 * Makefile.in (gdbreplay.o): New rule.
13137
90aa6a40
JM
131382008-06-06 Joseph Myers <joseph@codesourcery.com>
13139
13140 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13141 message, not gdbserver.
13142
c16158bc 131432008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
13144 Nathan Sidwell <nathan@codesourcery.com>
13145 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
13146
13147 * acinclude.m4: Include ../../config/acx.m4.
13148 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13149 * configure, config.in: Regenerate.
13150 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13151 * server.c (gdbserver_version): Print PKGVERSION.
13152 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13153 (main): Adjust gdbserver_usage calls.
13154 * gdbreplay.c (version, host_name): Add declarations.
13155 (gdbreplay_version, gdbreplay_usage): New.
13156 (main): Accept --version and --help options.
13157
aeb75bf5
DJ
131582008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13159
13160 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13161 (arm_breakpoint_at): Handle Thumb.
13162 (the_low_target): Add comment.
13163
76b233dd
UW
131642008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13165
13166 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13167
08388c79
DE
131682008-05-09 Doug Evans <dje@google.com>
13169
a3c83fae
DE
13170 * server.h (decode_search_memory_packet): Declare.
13171 * remote-utils.c (decode_search_memory_packet): New fn.
13172 * server.c (handle_search_memory_1): New fn.
08388c79
DE
13173 (handle_search_memory): New fn.
13174 (handle_query): Process qSearch:memory packets.
13175
bb9c3d36
UW
131762008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13177
13178 * regcache.c (registers_length): Remove.
13179 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13180 full register packet.
13181 * regcache.h (registers_length): Remove prototype.
13182 * server.h (PBUFSIZ): Define to 16384.
13183
7284e1be
UW
131842008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13185
13186 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13187 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13188 powerpc-64l.o, and powerpc-altivec64l.o.
13189 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13190 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13191 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13192 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13193 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13194 to srv_xmlfiles.
13195
13196 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13197 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13198 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13199 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13200 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13201 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13202 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13203 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13204 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13205 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13206 (clean): Update.
13207
13208 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13209 (init_registers_powerpc_32l): ... this new prototype.
13210 (init_registers_powerpc_32): Remove, replace by ...
13211 (init_registers_powerpc_altivec32l): ... this new prototype.
13212 (init_registers_powerpc_e500): Remove, replace by ...
13213 (init_registers_powerpc_e500l): ... this new prototype.
13214 (init_registers_ppc64): Remove, replace by ...
13215 (init_registers_powerpc_64l): ... this new prototype.
13216 (init_registers_powerpc_64): Remove, replace by ...
13217 (init_registers_powerpc_altivec64l): ... this new prototype.
13218 (ppc_num_regs): Set to 73.
13219 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13220 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13221 (ppc_cannot_store_register): Handle orig_r3 and trap.
13222 (ppc_arch_setup): Update init_registers_... calls.
13223 (ppc_fill_gregset): Handle orig_r3 and trap.
13224
13225 * inferiors.c (clear_inferiors): Reset current_inferior.
13226
fdc59709
PB
132272008-04-23 Paolo Bonzini <bonzini@gnu.org>
13228
889bf7c5
PA
13229 * acinclude.m4: Add override.m4.
13230 * configure: Regenerate.
fdc59709 13231
c9b2f845
UW
132322008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13233
13234 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13235 initial call to init_register_ppc64.
13236
550512b8
UW
132372008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13238
43aaf8b6
PA
13239 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13240 single powerpc*-*-linux* case.
550512b8
UW
13241 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13242
b6430ec3
UW
132432008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13244
13245 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 13246 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
13247 from reg_xmlfiles.
13248 * linux-ppc-low.c: Include <elf.h>.
13249 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13250 (ppc_hwcap): New global variable.
13251 (ppc_regmap): Remove __SPE__ #ifdef sections.
13252 (ppc_regmap_e500): New global variable.
13253 (ppc_cannot_store_register): Update __SPE__ special case.
13254 (ppc_get_hwcap): New function.
13255 (ppc_arch_setup): Use it to determine whether inferior supports
13256 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13257 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13258 Do not access registers if target does not support AltiVec.
13259 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13260 Do not access registers if target does not support SPE.
13261 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13262
52fa2412
UW
132632008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13264
13265 * linux-low.c (disabled_regsets, num_regsets): New.
13266 (use_regsets_p): Delete.
13267 (linux_wait_for_process): Clear disabled_regsets.
13268 (regsets_fetch_inferior_registers): Check and set it.
13269 (regsets_store_inferior_registers): Likewise.
13270 (linux_fetch_registers, linux_store_registers): Do not use
13271 use_regsets_p.
13272 (initialize_low): Allocate disabled_regsets.
13273
e28b3332
DJ
132742008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13275
13276 * Makefile.in (LIBOBJS): New.
13277 (OBS): Use LIBOBJS.
13278 (memmem.o): New rule.
13279 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13280 * configure: Regenerated.
13281
4536995d
UW
132822008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13283
13284 * server.c (handle_query): Never return "unsupported" for
13285 qXfer:features:read queries.
13286
221c031f
UW
132872008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13288
13289 * server.c (get_features_xml): Fix inverted condition.
13290 (handle_query): Always support qXfer:feature:read.
13291
ccd213ac
DJ
132922008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13293
13294 * server.c (wrapper_argv): New.
13295 (start_inferior): Handle wrapper_argv. If set, expect an extra
13296 trap.
13297 (gdbserver_usage): Document --wrapper.
13298 (main): Parse --wrapper.
13299
6fe305f7
UW
133002008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13301
13302 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13303 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13304 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13305 (ppc_set_pc): Likewise.
13306 (ppc_arch_setup): New function.
13307 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13308 of collect_register.
889bf7c5 13309 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 13310
5b0a002e
UW
133112008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13312
13313 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13314 instead of linux-ppc64-low.o.
13315 * linux-ppc64-low.c: Remove file.
13316 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13317 (linux-ppc64-low.o): Remove rule.
13318
13319 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13320 (init_registers_powerpc_64): Likewise.
13321 (ppc_regmap): Conditionally define depending on __powerpc64__.
13322 (ppc_cannot_store_register): Do not special-case "fpscr" when
13323 compiled on __powerpc64__.
13324 (ppc_collect_ptrace_register): New function.
13325 (ppc_supply_ptrace_register): New function.
13326 (ppc_breakpoint): Change type to "unsigned int".
13327 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13328 (the_low_target): Conditionally provide initializers for the
889bf7c5 13329 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
13330 collect_ptrace_register and supply_ptrace_register members.
13331
9b4b61c8
UW
133322008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13333
13334 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13335 * server.c (gdbserver_xmltarget): Define.
13336 (get_features_xml): Use it to replace "target.xml" and arch_string.
13337
13338 * configure.srv: Remove srv_xmltarget. Add XML files that were
13339 mentioned there to srv_xmlfiles instead. Remove conditional tests
13340 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13341 srv_xmlfiles and srv_regobj to include all possible choices.
13342 * configure.ac (srv_xmltarget): Remove.
13343 (srv_xmlfiles): Do not add "target.xml".
13344 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13345 checks for supplementary target information.
13346 * configure: Regenerate.
13347 * Makefile.in (XML_TARGET): Remove.
13348 (target.xml): Remove rule.
13349 (clean): Do not clean up target.xml.
13350 (.PRECIOUS): Do not mention target.xml.
13351
13352 * target.h (struct target_ops): Remove arch_string member.
13353 * linux-low.c (linux_arch_string): Remove.
13354 (linux_target_ops): Remove arch_string initializer.
13355 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13356 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13357 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13358 * spu-low.c (spu_arch_string): Remove.
13359 (spu_target_ops): Remove arch_string initializer.
13360 * win32-low.c (win32_arch_string): Remove.
13361 (win32_target_ops): Remove arch_string initializer.
13362 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13363 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13364 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13365
ee1a7ae4
UW
133662008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13367
13368 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13369 by collect_ptrace_register and supply_ptrace_register hooks.
13370 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13371 instead of checking for the_low_target.left_pad_xfer.
13372 (usr_store_inferior_registers): Use collect_ptrace_register callback
13373 instead of checking for the_low_target.left_pad_xfer.
13374
13375 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13376 (s390_supply_ptrace_register): Likewise.
13377 (s390_fill_gregset): Call s390_collect_ptrace_register.
13378 (the_low_target): Update.
13379
13380 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13381 (ppc_supply_ptrace_register): Likewise.
13382 (the_low_target): Update.
13383
13384 * linux-i386-low.c (the_low_target): Update.
13385 * linux-x86-64-low.c (the_low_target): Update.
13386
d61ddec4
UW
133872008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13388
13389 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13390 reg-s390.o and reg-s390x.o.
13391
13392 * linux-low.c (new_inferior): New global variable.
13393 (linux_create_inferior, linux_attach): Set it.
13394 (linux_wait_for_process): Call the_low_target.arch_setup after the
13395 target has stopped for the first time.
13396 (initialize_low): Do not call the_low_target.arch_setup.
13397
13398 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13399 (s390_set_pc): Likewise.
13400 (s390_arch_setup): New function.
13401 (the_low_target): Use s390_arch_setup as arch_setup routine.
13402
13403 * regcache.c (realloc_register_cache): New function.
13404 (set_register_cache): Call it for each existing regcache.
13405
d05b4ac3
UW
134062008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13407
13408 * server.h (init_registers): Remove prototype.
13409
13410 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13411 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13412 instead of init_registers ().
13413 * linux-arm-low.c (init_registers_arm): Add prototype.
13414 (init_registers_arm_with_iwmmxt): Likewise.
13415 (the_low_target): Add initializer for arch_setup field.
13416 * linux-cris-low.c (init_registers_cris): Add prototype.
13417 (the_low_target): Add initializer for arch_setup field.
13418 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13419 (the_low_target): Add initializer for arch_setup field.
13420 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13421 (the_low_target): Add initializer for arch_setup field.
13422 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13423 (the_low_target): Add initializer for arch_setup field.
13424 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13425 (the_low_target): Add initializer for arch_setup field.
13426 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13427 (the_low_target): Add initializer for arch_setup field.
13428 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13429 (init_registers_mips64_linux): Likewise.
13430 (the_low_target): Add initializer for arch_setup field.
13431 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13432 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13433 (the_low_target): Add initializer for arch_setup field.
13434 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13435 (init_registers_powerpc_64): Likewise.
13436 (the_low_target): Add initializer for arch_setup field.
13437 * linux-s390-low.c (init_registers_s390): Add prototype.
13438 (init_registers_s390x): Likewise.
13439 (the_low_target): Add initializer for arch_setup field.
13440 * linux-sh-low.c (init_registers_sh): Add prototype.
13441 (the_low_target): Add initializer for arch_setup field.
13442 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13443 (the_low_target): Add initializer for arch_setup field.
13444 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13445 (the_low_target): Add initializer for arch_setup field.
13446
13447 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13448 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13449 instead of init_registers ().
13450 * win32-arm-low.c (init_registers_arm): Add prototype.
13451 (the_low_target): Add initializer for arch_setup field.
13452 * win32-i386-low.c (init_registers_i386): Add prototype.
13453 (the_low_target): Add initializer for arch_setup field.
13454
13455 * spu-low.c (init_registers_spu): Add prototype.
13456 (initialize_low): Call initialie_registers_spu () instead of
13457 initialize_registers ().
13458
fd96d250
PA
134592008-02-19 Pedro Alves <pedro@codesourcery.com>
13460
13461 * server.c (handle_v_requests): When handling the vRun and vAttach
13462 packets, if already debugging a process, don't kill it. Return an
13463 error instead.
13464
d41b6bb4
DJ
134652008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13466
13467 * server.c (handle_query): Correct length check.
13468
5ac588cf
PA
134692008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13470
13471 * win32-low.c (do_initial_child_stuff): Add process handle
13472 parameter. Set current_process_handle and current_process_id from the
13473 parameters. Clear globals.
13474 (win32_create_inferior): Don't set current_process_handle and
13475 current_process_id here. Instead pass them on the call to
13476 do_initial_child_stuff.
13477 (win32_attach): Likewise.
13478 (win32_clear_inferiors): New.
13479 (win32_kill): Don't close the current process handle or the
13480 current thread handle here. Instead call win32_clear_inferiors.
13481 (win32_detach): Don't open a new handle to the process. Call
13482 win32_clear_inferiors.
13483 (win32_join): Don't rely on current_process_handle; open a new
13484 handle using the process id.
13485 (win32_wait): Call win32_clear_inferiors when the inferior process
13486 has exited.
13487
ecd7ecbc
DJ
134882008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13489
13490 * server.c (monitor_show_help): Add "exit".
13491
1525d545
MG
134922008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13493
ecd7ecbc 13494 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
13495 (clean): Add reg-xtensa.c.
13496 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
13497 * configure.srv (xtensa*-*-linux*) New target.
13498 * linux-xtensa-low.c: New.
13499 * xtensa-xtregs.c: New.
1525d545 13500
59a016f0
PA
135012008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13502
13503 * hostio.c: Don't include errno.h.
13504 (errno_to_fileio_errno): Move to hostio-errno.
13505 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13506 error number outputting to the target->hostio_last_error callback.
13507 (hostio_packet_error): Use FILEIO_EINVAL directly.
13508 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13509 calls to hostio_error.
13510 * hostio-errno.c: New.
13511 * server.h (hostio_last_error_from_errno): Declare.
13512 * target.h (target_ops): Add hostio_last_error member.
13513 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13514 as hostio_last_error handler.
889bf7c5 13515 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
13516 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13517 (wince_hostio_last_error): New functions.
13518 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13519 as hostio_last_error handler.
13520 (win32_target_ops) [!_WIN32_WCE]: Register
13521 hostio_last_error_from_errno as hostio_last_error handler.
13522 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13523 (hostio-errno.o): New rule.
13524 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13525 * configure.srv (srv_hostio_err_objs): New variable. Default to
13526 hostio-errno.o.
13527 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13528 * configure: Regenerate.
13529
2d717e4f
DJ
135302008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13531
13532 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13533 (linux_kill, linux_detach): Clean up the process list.
13534 * remote-utils.c (remote_open): Improve port number parsing.
13535 (putpkt_binary, input_interrupt): Only send interrupts if the target
13536 is running.
13537 * server.c (extended_protocol): Make static.
13538 (attached): Define earlier.
13539 (exit_requested, response_needed, program_argv): New variables.
13540 (target_running): New.
13541 (start_inferior): Clear attached here.
13542 (attach_inferior): Set attached here.
13543 (require_running): Define.
13544 (handle_query): Use require_running and target_running. Implement
13545 "monitor exit".
13546 (handle_v_attach, handle_v_run): New.
13547 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13548 (gdbserver_usage): Update.
13549 (main): Redo argument parsing. Handle --debug and --multi. Handle
13550 --attach along with other options or after the port. Save
13551 program_argv. Support no initial program. Resynchronize
13552 communication with GDB after an error. Handle "monitor exit".
13553 Use require_running and target_running. Always allow the extended
13554 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13555 restart in extended mode.
13556 * README: Refer to the GDB manual. Update --attach usage.
13557
7407e2de
AS
135582007-12-20 Andreas Schwab <schwab@suse.de>
13559
13560 * linux-low.c (STACK_SIZE): Define.
13561 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13562 (linux_test_for_tracefork): Likewise.
13563
b65d95c5
DJ
135642007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13565
13566 * linux-low.c (linux_wait_for_event): Update messages. Do not
13567 reinsert auto-delete breakpoints.
13568 * mem-break.c (struct breakpoint): Change return type of handler to
13569 int.
13570 (set_breakpoint_at): Update handler type.
13571 (reinsert_breakpoint_handler): Return 1 instead of calling
13572 delete_breakpoint.
13573 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13574 setting a new one.
13575 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13576 * mem-break.h (set_breakpoint_at): Update handler type.
13577 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13578 * win32-low.c (auto_delete_breakpoint): New.
13579 (get_child_debug_event): Use it.
13580
4e799345
DJ
135812007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13582
13583 * configure.ac: Check for pread and pwrite.
13584 * hostio.c (handle_pread): Fall back to lseek and read.
13585 (handle_pwrite): Fall back to lseek and write.
13586 * config.in, configure: Regenerated.
13587
27524b67
DJ
135882007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13589
13590 * server.c (myresume): Add own_buf argument.
13591 (main): Update calls.
13592
a20d5e98
DJ
135932007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13594
13595 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13596 * remote-utils.c (remote_open): Do not call disable_async_io.
13597 (block_async_io): Delete.
13598 (unblock_async_io): Make static.
13599 (initialize_async_io): New.
13600 * server.c (handle_v_cont): Handle async I/O here.
13601 (myresume): Likewise. Move other common resume tasks here...
13602 (main): ... from here. Call initialize_async_io. Disable async
13603 I/O before the main loop.
13604 * server.h (initialize_async_io): Declare.
13605 (block_async_io, unblock_async_io): Delete prototypes.
13606 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13607
b79d787e
DJ
136082007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13609
13610 * remote-utils.c (readchar): Allow binary data in received messages.
13611
d97903b2
PA
136122007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13613
13614 * win32-low.c (attaching): New global.
13615 (win32_create_inferior): Clear the `attaching' global.
13616 (win32_attach): Set the `attaching' global.
13617 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13618 attaching. Only set a breakpoint at the entry point if not
13619 attaching.
13620
311de423
PA
136212007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13622
13623 * server.c (main): Don't report dll events on the initial
13624 connection on attaches.
13625
6c2d16d2
PA
136262007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13627
13628 * server.c (main): Relax numerical bases supported for the pid of
13629 the --attach command line argument.
13630
5ca906e6
PA
136312007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13632
13633 * win32-low.c (win32_attach): Call OpenProcess before
13634 DebugActiveProcess, not after. Add last error output to error
13635 call.
13636
9c6c8194
PA
136372007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13638
13639 * win32-low.c (win32_get_thread_context)
13640 (win32_set_thread_context): New functions.
13641 (thread_rec): Use win32_get_thread_context.
13642 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13643 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13644 field.
13645
4d5d1aaa
PA
136462007-12-03 Leo Zayas
13647 Pedro Alves <pedro_alves@portugalmail.pt>
13648
13649 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13650 global variables.
13651 (child_add_thread): Minor cleanup.
13652 (child_continue): Resume artificially suspended threads before
13653 calling ContinueDebugEvent.
13654 (suspend_one_thread): New.
13655 (fake_breakpoint_event): New.
13656 (get_child_debug_event): Change return type to int. Check here if
13657 gdb sent an interrupt request. If a soft interrupt was requested,
13658 fake a breakpoint event. Return 0 if there is no event to handle,
13659 and 1 otherwise.
13660 (win32_wait): Don't check here if gdb sent an interrupt request.
13661 Ensure there is a valid event to handle.
13662 (win32_request_interrupt): Add soft interruption method as last
13663 resort.
13664
c436e841
PA
136652007-12-03 Leo Zayas
13666 Pedro Alves <pedro_alves@portugalmail.pt>
13667
13668 * win32-low.h (win32_thread_info): Add descriptions to the
13669 structure members. Replace `suspend_count' counter by a
13670 `suspended' flag.
13671 * win32-low.c (thread_rec): Update condition of when to get the
13672 context from the inferior. Rely on ContextFlags being set if it
13673 has already been retrieved. Only suspend the inferior thread if
13674 we haven't already. Warn if that fails.
13675 (continue_one_thread): s/suspend_count/suspended/. Only call
13676 ResumeThread once. Warn if that fails.
13677
e7b5fa67
PA
136782007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13679
13680 * win32-low.c (win32_wait): Don't read from the inferior when it
13681 has already exited.
13682
a385171d
PA
136832007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13684
13685 * Makefile.in (win32_low_h): New variable.
13686 (win32-low.o): Add dependency on $(win32_low_h).
13687 (win32-arm-low.o, win32-i386-low.o): New rules.
13688
f80c84b3
DJ
136892007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13690
13691 * hostio.c: Correct copyright year.
13692
a6b151f1
DJ
136932007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13694
13695 * Makefile.in (OBS): Add hostio.o.
13696 (hostio.o): New rule.
13697 * server.h (handle_vFile): Declare.
13698 * hostio.c: New file.
13699 * server.c (handle_v_requests): Take packet_len and new_packet_len
13700 for binary packets. Call handle_vFile.
13701 (main): Update call to handle_v_requests.
13702
f9387fc3
DJ
137032007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13704
13705 * linux-low.c: Include <sched.h>.
13706
51c2684e
DJ
137072007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13708
13709 * linux-low.c (linux_tracefork_grandchild): New.
13710 (linux_tracefork_child): Use clone.
13711 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13712
75f83163
JB
137132007-10-31 Joel Brobecker <brobecker@adacore.com>
13714
13715 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13716
da5898ce
DJ
137172007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13718
13719 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13720
24a09b5f
DJ
137212007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13722
13723 * inferiors.c (change_inferior_id): Delete.
13724 (add_pid_to_list, pull_pid_from_list): New.
13725 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13726 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13727 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13728 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13729 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13730 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13731 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13732 (using_threads): Always set to 1.
13733 (handle_extended_wait): New.
13734 (add_process): Do not set TID.
13735 (linux_create_inferior): Set must_set_ptrace_flags.
13736 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13737 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13738 (linux_thread_alive): Rename TID argument to LWPID.
13739 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13740 (linux_wait_for_event): Do not use TID or check using_threads. Update
13741 call to dead_thread_notify. Call handle_extended_wait.
13742 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13743 (send_sigstop): Delete sigstop_sent.
13744 (wait_for_sigstop): Avoid TID.
13745 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13746 (linux_test_for_tracefork): New.
13747 (linux_lookup_signals): Use thread_db_active and
13748 linux_supports_tracefork_flag.
13749 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13750 * linux-low.h (get_process_thread): Avoid TID.
13751 (struct process_ifo): Move thread_known and tid to the end. Remove
13752 sigstop_sent.
13753 (linux_attach_lwp, thread_db_init): Update prototypes.
13754 * server.h (change_inferior_id): Delete prototype.
13755 (add_pid_to_list, pull_pid_from_list): New prototypes.
13756 * thread-db.c (thread_db_use_events): New.
13757 (find_first_thread): Rename to...
13758 (find_one_thread): ...this. Update callers and messages. Do not
13759 call fatal. Check thread_db_use_events. Do not call
13760 change_inferior_id or new_thread_notify.
13761 (maybe_attach_thread): Update. Do not call new_thread_notify.
13762 (thread_db_init): Set thread_db_use_events. Check use_events.
13763 * utils.c (fatal, warning): Correct message prefix.
13764
30ed0a8f
DJ
137652007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13766
13767 * Makefile.in (clean): Remove new files.
13768 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13769 (powerpc-64.o, powerpc-64.c): New rules.
13770 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13771 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13772 with SPE.
13773 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13774 SPE targets.
13775 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13776 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13777 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13778 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13779 (target_regsets): Add AltiVec and SPE register sets.
13780 * configure.ac: Check for AltiVec and SPE.
13781 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13782 (ppc_fill_vrregset, ppc_store_vrregset): New.
13783 (target_regsets): Add AltiVec register set.
13784 * configure: Regenerated.
13785
fd462a61
DJ
137862007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13787
13788 * linux-low.c (O_LARGEFILE): Define.
13789 (linux_read_memory): Use /proc/PID/mem.
13790 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13791 * configure, config.in: Regenerated.
13792
69f223ed
DJ
137932007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13794
13795 * linux-low.c (linux_wait_for_event): Do not pass signals while
13796 single-stepping.
13797
aec18585
PA
137982007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13799
13800 * win32-low.c (create_process): New.
13801 (win32_create_inferior): Use create_process instead of
13802 CreateProcess. If create_process failed retry appending an ".exe"
13803 suffix. Store the GetLastError result immediatelly after
13804 create_process calls and use it on the call to error.
13805
34d86ddd
PA
138062007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13807
13808 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13809
5a0e3bd0
JB
138102007-08-23 Joel Brobecker <brobecker@adacore.com>
13811
13812 * configure.ac: Switch license to GPLv3.
13813
f88c79e6
MS
138142007-08-01 Michael Snyder <msnyder@access-company.com>
13815
13816 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13817
6b3d9b83
PA
138182007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13819
13820 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13821 typedef.
13822 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13823 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13824 CloseToolhelp32Snapshot.
13825 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13826 CloseToolhelp32Snapshot.
13827
c588c53c
MS
138282007-07-27 Michael Snyder <michael.snyder@access-company.com>
13829
13830 * server.c (main): Check for inferior exit before main loop.
13831
aa0403d9
PA
138322007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13833
13834 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13835 instead of on tmp_desc.
13836
255e7678
DJ
138372007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13838 Daniel Jacobowitz <dan@codesourcery.com>
13839
13840 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13841 (add_thread): Minor cleanups.
13842 (clear_inferiors): Move lower in the file. Clear the DLL
13843 list.
13844 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13845 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13846 (xml_escape_text): New.
13847 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13848 for qSupported.
13849 (handle_v_cont): Report errors.
13850 (gdbserver_version): Update.
13851 (main): Correct size of own_buf. Do not report initial DLL events.
13852 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13853 (unloaded_dll, xml_escape_text): New.
13854 * win32-low.c (enum target_waitkind): Update comments.
13855 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13856 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13857 (win32_EnumProcessModules, win32_GetModuleInformation)
13858 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13859 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13860 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13861 (win32_Module32First, win32_Module32Next, load_toolhelp)
13862 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13863 (get_child_debug_event): Handle DLL events.
13864 (win32_wait): Likewise.
13865
0d37add9
DJ
138662007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13867
13868 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13869 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13870
45e2715e
PA
138712007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13872
13873 * win32-low.c (handle_output_debug_string): Ignore event if not
13874 waiting.
13875
c5674cf1
PA
138762007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13877
13878 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13879
2bbe3cc1
DJ
138802007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13881
13882 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13883
ae13219e
DJ
138842007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13885
13886 * inferiors.c (change_inferior_id): Add comment.
13887 * linux-low.c (check_removed_breakpoint): Add an early
13888 prototype. Improve debug output.
13889 (linux_attach): Doc update.
13890 (linux_detach_one_process, linux_detach): Clean up before releasing
13891 each process.
13892 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13893 * linux-low.h (struct process_info): Doc improvement.
13894 * mem-break.c (delete_all_breakpoints): New.
13895 * mem-break.h (delete_all_breakpoints): New prototype.
13896 * thread-db.c (find_first_thread): New.
13897 (thread_db_create_event): Call it instead of
13898 thread_db_find_new_threads. Clean up unused variables.
13899 (maybe_attach_thread): Remove first thread handling.
13900 (thread_db_find_new_threads): Use find_first_thread.
13901 (thread_db_get_tls_address): Likewise.
13902
4105de34
DJ
139032007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13904
13905 * thread-db.c (thread_db_find_new_threads): Add prototype.
13906 (thread_db_create_event): Check for the main thread before adding
13907 a new thread.
13908 (maybe_attach_thread): Only enable event reporting if TID == 0.
13909 (thread_db_get_tls_address): Check for new threads.
13910
2b876972
DJ
139112007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13912
13913 * linux-low.c (linux_create_inferior): Try execv before execvp.
13914 * spu-low.c (spu_create_inferior): Likewise.
13915
7a245884
DJ
139162007-06-13 Mike Frysinger <vapier@gentoo.org>
13917
13918 * linux-low.c (linux_create_inferior): Change execv to execvp.
13919 * spu-low.c (spu_create_inferior): Likewies.
13920
117ce543
DJ
139212007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13922
13923 * Makefile.in (clean): Clean new files instead of deleted ones.
13924 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13925 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13926 rules.
13927 * configure.srv: Specify XML files and new regformats for MIPS and
13928 MIPS64 GNU/Linux.
13929 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13930 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13931 an entry for the restart register.
13932 (mips_cannot_fetch_register, mips_cannot_store_register)
13933 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13934 register names to match the XML descriptions.
13935 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13936 restart register instead of $0.
13937
0e7f50da
UW
139382007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13939 Markus Deuling <deuling@de.ibm.com>
13940
13941 * remote-utils.c (decode_xfer_write): New function.
13942 * server.h (decode_xfer_write): Add prototype.
13943 * server.c (handle_query): Add PACKET_LEN argument. Support
13944 qXfer:spu:read and qXfer:spu:write packets.
13945 (main): Pass packet_len to handle_query.
13946 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13947 * target.h (target_ops): Add qxfer_spu.
13948
374c1d38
UW
139492007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13950
13951 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13952 accessing non-seekable spufs files.
13953
bb63802a
UW
139542007-05-16 Markus Deuling <deuling@de.ibm.com>
13955
889bf7c5 13956 * server.c (handle_query): Add reply for qC packet.
bb63802a 13957
7390519e
PA
139582007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13959 Leo Zayas <lerele@champenstudios@com>
13960
13961 * server.h (check_remote_input_interrupt_request): New function.
13962 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13963 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13964 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13965 (check_remote_input_interrupt_request): New function.
13966 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 13967 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
13968 winapi_GenerateConsoleCtrlEvent): New typedefs.
13969 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13970 to 250 ms.
13971 (win32_wait): Check for remote interrupt request
13972 with check_remote_input_interrupt_request.
13973 (win32_request_interrupt): New function.
13974 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13975
34b34921
PA
139762007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13977
13978 * win32-low.c (debug_registers_changed,
13979 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13980 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13981 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13982 (thread_rec): Get context using the low target.
13983 (child_add_thread): Call thread_added on the low target,
13984 which does the same thing.
13985 (regptr): Delete.
13986 (do_initial_child_stuff): Remove debug registers references.
13987 Set context using the low target. Resume threads after
13988 setting the contexts.
13989 (child_continue): Remove dead variable. Remove debug
13990 registers references.
13991 (child_fetch_inferior_registers): Go through the low target.
13992 (do_child_store_inferior_registers): Remove.
13993 (child_store_inferior_registers): Go through the low target.
13994 (win32_resume): Remove debug registers references.
13995 Set context using the low target.
13996 (handle_exception): Change return type to void. Don't record
13997 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13998 first chance exception.
889bf7c5 13999 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
14000 goto loop. Always return after waiting for debug event.
14001 (win32_wait): Convert to switch statement. Handle spurious
14002 events.
14003
14004 * win32-i386-low.c (debug_registers_changed,
14005 debug_registers_used): New.
14006 (initial_stuff): Rename to ...
14007 (i386_initial_stuff): ... this. Clear debug registers
14008 state variables.
14009 (store_debug_registers): Delete.
14010 (i386_get_thread_context): New.
14011 (load_debug_registers): Delete.
14012 (i386_set_thread_context): New.
14013 (i386_thread_added): New.
14014 (single_step): Rename to ...
14015 (i386_single_step): ... this.
14016 (do_fetch_inferior_registers): Rename to ...
14017 (i386_fetch_inferior_register): ... this.
14018 (i386_store_inferior_register): New.
14019 (the_low_target): Adapt to new interface.
14020
14021 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14022 (arm_get_thread_context): New.
14023 (arm_set_thread_context): New.
14024 (regptr): New.
14025 (do_fetch_inferior_registers): Rename to ...
14026 (arm_fetch_inferior_register): ... this.
14027 (arm_store_inferior_register): New.
14028 (arm_wince_breakpoint): Reimplement as unsigned long.
14029 (arm_wince_breakpoint_len): Define.
14030 (the_low_target): Adapt to new interface.
14031
14032 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14033 load_debug_registers. Add get_thread_context, set_thread_context,
14034 thread_added and store_inferior_register. Rename
14035 fetch_inferior_registers to fetch_inferior_register.
14036 (regptr): Remove declaration.
14037
dd6953e1
PA
140382007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14039
14040 * linux-low.c (linux_detach): Change return type to int. Return 0.
14041 * spu-low.c (spu_detach): Likewise.
14042
444d6139
PA
140432007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14044
14045 * target.h (target_ops): Change return type of detach to int.
14046 Add join.
14047 (join_inferior): New.
14048 * server.c (main): Don't skip detach support on mingw32.
14049 If the inferior doesn't support detaching return error.
14050 Call join_inferior instead of using waitpid.
14051 * linux-low.c (linux_join): New.
14052 (linux_target_op): Add linux_join.
14053 * spu-low.c (spu_join): New.
14054 (spu_target_ops): Add spu_join.
14055 * win32-low.c (win32_detach): Adapt to new interface.
14056 Reopen current_process_handle before detaching. Issue a child
14057 resume before detaching.
14058 (win32_join): New.
14059 (win32_target_op): Add win32_join.
14060
1d5315fe
PA
140612007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14062
14063 * win32-low.c (win32-attach): Fix return value.
14064 * target.h (target_ops): Describe ATTACH return values.
14065
bf914831
PA
140662007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14067
14068 * win32-low.c (GETPROCADDRESS): Define.
14069 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14070 (winapi_DebugSetProcessKillOnExit): Likewise.
14071 (win32_create_inferior): Force usage of ansi CreateProcessA.
14072 (win32_attach): Use GETPROCADDRESS.
14073 (win32_detach): Likewise.
14074
f72f3e60
PA
140752007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14076
14077 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14078
ed50f18f
PA
140792007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14080
14081 * win32-low.c: Commit leftover changes from 2007-03-29.
14082
0c2ead7e
DJ
140832007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14084
14085 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14086 fields short instead of int. Add explicit padding.
14087 (i387_cache_to_fsave): Remove unnecessary casts.
14088 (i387_fsave_to_cache): Doc fix.
14089 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14090
73725ff3
DJ
140912007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14092
14093 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14094 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14095
d99f33d8
PA
140962007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14097
14098 * configure.srv (arm*-*-mingw32ce*): Move near the other
14099 arm targets.
14100
68070c10
PA
141012007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14102
2482afc6 14103 * configure.ac: Add errno checking.
68070c10
PA
14104 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14105 sys/file.h and malloc.h.
14106 (AC_CHECK_DECLS): Add perror.
14107 (srv_mingwce): Handle.
2482afc6 14108 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
14109 win32-i386-low.o to srv_tgtobj.
14110 (i[34567]86-*-mingw*): Likewise.
14111 (arm*-*-mingw32ce*): Add case.
14112 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14113 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14114 [__MINGW32CE__] (strerror): New function.
14115 [__MINGW32CE__] (errno): Define to GetLastError.
14116 [__MINGW32CE__] (COUNTOF): New macro.
14117 (remote_open): Remove extra close call.
14118 * mem-break.c (delete_breakpoint_at): New function.
14119 * mem-break.h (delete_breakpoint_at): Declare.
14120 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14121 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14122 [USE_WIN32API] (read, write): Add char* casts.
14123 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14124 * server.h: Include wincecompat.h on Windows CE.
14125 [HAVE_ERRNO_H]: Check.
14126 (perror): Declare if not declared.
14127 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14128 (perror_with_name): Remove errno declaration.
14129 * wincecompat.h: New.
14130 * wincecompat.c: New.
14131 * win32-low.h: New.
14132 * win32-arm-low.c: New.
14133 * win32-i386-low.c: New.
14134 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14135 (OUTMSG2): Make it safe.
14136 (_T): New macro.
14137 (COUNTOF): New macro.
14138 (NUM_REGS): Get it from the low target.
14139 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14140 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14141 (thread_rec): Let low target handle debug registers.
14142 (child_add_thread): Likewise.
14143 (child_init_thread_list): Likewise.
14144 (continue_one_thread): Likewise.
14145 (regptr): New.
14146 (do_child_fetch_inferior_registers): Move to ...
14147 * win32-i386-low.c: ... here, and rename to ...
14148 (do_fetch_inferior_registers): ... this.
889bf7c5 14149 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
14150 Go through the low target.
14151 (do_child_store_inferior_registers): Use regptr.
14152 (strwinerror): New function.
14153 (win32_create_inferior): Handle Windows CE.
14154 Use strwinerror instead of strerror on Windows error
14155 codes. Add program to the error output.
14156 Don't close the main thread handle on Windows CE.
14157 (win32_attach): Use coredll.dll on Windows CE.
14158 (win32_kill): Close current process and current
14159 thread handles.
14160 (win32_detach): Use coredll.dll on Windows CE.
14161 (win32_resume): Let low target handle debug registers, and
14162 step request.
14163 (handle_exception): Add/Remove initial breakpoint. Avoid
14164 non-existant WSTOPSIG on Windows CE.
14165 (win32_read_inferior_memory): Cast to remove warning.
14166 (win32_arch_string): Go through the low target.
14167 (initialize_low): Call set_breakpoint_data with the low
14168 target's breakpoint.
14169 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14170 FOP_REGNUM, mappings): Move to ...
14171 * win32-i386-low.c: ... here.
14172 * win32-low.c (win32_thread_info): Move to ...
14173 * win32-low.h: ... here.
14174 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14175 win32-arm-low.c and wincecompat.c.
14176 (all:): Add $EXEEXT.
14177 (install-only:): Likewise.
14178 (gdbserver:): Likewise.
14179 (gdbreplay:): Likewise.
14180 * config.in: Regenerate.
14181 * configure: Regenerate.
14182
41093d81
PA
141832007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14184
14185 * win32-low.c: Rename typedef thread_info to
14186 win32_thread_info throughout.
14187
544afa54
PA
141882007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14189
14190 * win32-i386-low.c: Rename to ...
14191 * win32-low.c: ... this.
14192 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14193 * Makefile.in: Likewise.
14194
bce7165d
PA
141952007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14196
14197 * remote-utils.c (monitor_output): Constify msg parameter.
14198 * server.h (monitor_output): Likewise.
14199 * win32-i386-low.c (handle_output_debug_string): New.
14200 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14201 handle_output_debug_string.
14202 (get_child_debug_event): Likewise.
14203
506c7aa0
DJ
142042007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14205
14206 * server.c (main): Correct strtoul check.
14207
42c81e2a
DJ
142082007-03-27 Jon Ringle <jon@ringle.org>
14209
14210 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14211
9453113a
DJ
142122007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14213
14214 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14215
64a69107
DJ
142162007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14217
14218 * terminal.h: Check HAVE_SGTTY_H.
14219
142202007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
14221
14222 * remote-utils.c (remote_open): Print out the assigned port number.
14223
c74d0ad8
DJ
142242007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14225
14226 * remote-utils.c (monitor_output): New function.
14227 * server.c (debug_threads): Define here.
14228 (monitor_show_help): New function.
14229 (handle_query): Handle qRcmd.
14230 (main): Do not handle 'd' packet.
14231 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14232 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14233 of debug_threads.
14234
de7c3b4a
PA
142352007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14236
14237 * Makefile.in (EXEEXT): New.
14238 (clean): Use $(EXEEXT).
14239
ef57601b
PA
142402007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14241
14242 * target.h (target_ops): Rename send_signal to request_interrupt,
14243 and remove enum target_signal parameter.
14244 * linux-low.c (linux_request_interrupt): Rename from
14245 linux_send_signal, and always send SIGINT.
14246 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14247 and always send SIGINT.
14248 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14249 of send_signal.
14250 (input_interrupt): Likewise.
14251
820f2bda
PA
142522007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14253
14254 * server.c (get_features_xml): Check if target implemented
14255 arch_string.
14256 * win32-i386-low.c (win32_arch_string): New.
14257 (win32_target_ops): Add win32_arch_string as arch_string member.
14258
ab39bf24
UW
142592007-02-22 Markus Deuling <deuling@de.ibm.com>
14260
14261 * spu-low.c (spu_arch_string): New.
14262 (spu_target_ops): Add spu_arch_string.
14263
61ff6e04
DJ
142642007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14265
14266 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14267 * configure.ac: Do not check for terminal.h.
14268 * configure, config.in: Regenerated.
14269
fb1e4ffc
DJ
142702007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14271
14272 * Makefile.in (OBS): Add $(XML_BUILTIN).
14273 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14274 (clean): Update.
14275 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14276 (arm-with-iwmmxt.c): New.
14277 * config.in, configure: Regenerate.
14278 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14279 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14280 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14281 (arm*-*-linux*): Add iWMMXt and regset support.
14282 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14283 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14284 (arm_store_wmmxregset, target_regsets): New.
14285 * server.c (get_features_xml): Take annex argument. Check builtin
14286 XML documents.
14287 (handle_query): Handle multiple annexes.
14288
0f48aa01
DJ
142892007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14290
14291 * remote-utils.c [USE_WIN32API] (read, write): Define.
14292 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14293 write.
14294
23181151
DJ
142952007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14296
14297 * linux-i386-low.c (the_low_target): Set arch_string.
14298 * linux-x86-64-low.c (the_low_target): Likewise.
14299 * linux-low.c (linux_arch_string): New.
14300 (linux_target_ops): Add it.
14301 * linux-low.h (struct linux_target_ops): Add arch_string.
14302 * server.c (write_qxfer_response): Use const void * for DATA.
14303 (get_features_xml): New.
14304 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14305 * target.h (struct target_ops): Add arch_string method.
14306
9d606399
DJ
143072007-01-03 Denis Pilat <denis.pilat@st.com>
14308 Daniel Jacobowitz <dan@codesourcery.com>
14309
14310 * linux-low.c (linux_kill): Handle being called with no threads.
14311 * win32-i386-low.c (win32_kill): Likewise.
14312 (get_child_debug_event): Clear current_process_handle.
14313
143142006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
14315 Daniel Jacobowitz <dan@codesourcery.com>
14316
14317 * remote-utils.c (remote_open): Check the type of specified
14318 serial port devices before opening them.
14319 * server.c (main): Kill the inferior if an error occurs during
14320 the first remote_open.
14321
a5e13d24
DJ
143222006-12-05 Markus Deuling <deuling@de.ibm.com>
14323
14324 * README: Update supported targets.
14325
186947f7
DJ
143262006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14327
14328 * Makefile.in (clean): Remove reg-mips64.c.
14329 (reg-mips64.c, reg-mips64.o): New rules.
14330 * configure.srv: Handle mips64. Include regset support for mips.
14331 * linux-mips-low.c (union mips_register): New.
14332 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14333 (mips_breakpoint, mips_breakpoint_at): Use int.
14334 (mips_collect_register, mips_supply_register)
14335 (mips_collect_register_32bit, mips_supply_register_32bit)
14336 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14337 (mips_store_fpregset, target_regsets): New.
14338 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14339
a13e2c95
UW
143402006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14341
14342 * configure.srv: Add target "spu*-*-*".
14343 * Makefile.in (clean): Remove reg-spu.c.
14344 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14345 * spu-low.c: New file.
14346
cb7283db
DJ
143472006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14348
14349 * configure.ac: Correct td_thr_tls_get_addr test.
14350 * configure: Regenerated.
14351
89be2091
DJ
143522006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14353
14354 * linux-low.c (linux_wait_for_event): Reformat. Use the
14355 pass_signals array.
14356 * remote-utils.c (decode_address_to_semicolon): New.
14357 * server.c (pass_signals, handle_general_set): New.
14358 (handle_query): Mention QPassSignals for qSupported.
14359 (main): Call handle_general_set.
14360 * server.h (pass_signals, decode_address_to_semicolon): New.
14361
000ef4f0
DJ
143622006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14363
14364 * server.c (handle_query): Correct error handling for read_auxv.
14365
b7149293
UW
143662005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14367
14368 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14369 and srv_linux_thread_db to yes.
14370 * linux-s390-low.c (s390_fill_gregset): New function.
14371 (target_regsets): Define data structure.
14372
dae5f5cf
DJ
143732006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14374
14375 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14376 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14377 * config.in, configure: Regenerated.
14378 * inferiors.c (gdb_id_to_thread): New function.
14379 (gdb_id_to_thread_id): Use it.
14380 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14381 * linux-low.h (struct process_info): Add th member.
14382 (thread_db_get_tls_address): New prototype.
14383 * remote-utils.c (decode_address): Make non-static.
14384 * server.c (handle_query): Handle qGetTLSAddr.
14385 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14386 * target.h (struct target_ops): Add get_tls_address.
14387 * thread-db.c (maybe_attach_thread): Save the thread handle.
14388 (thread_db_get_tls_address): New.
14389
32ca6d61
DJ
143902006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14391
14392 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14393 (linux_resume_one_process): Take a siginfo_t *. Update all
14394 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14395 (struct pending_signals): Add a siginfo_t.
14396 (linux_wait_for_process): Always set last_status.
14397 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14398 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14399 * linux-low.h (struct process_info): Add last_status.
14400
5ffff7c1
DJ
144012006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14402
14403 * remote-utils.c (try_rle): New function.
14404 (putpkt_binary): Use it.
14405
8695c747
DJ
144062006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14407
14408 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14409 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14410 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14411 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14412 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14413 point registers.
14414
290fadea
RS
144152006-08-08 Richard Sandiford <richard@codesourcery.com>
14416
14417 * server.c (terminal_fd): New variable.
14418 (old_foreground_pgrp): Likewise.
14419 (restore_old_foreground_pgrp): New function.
14420 (start_inferior): Record the terminal file descriptor in terminal_fd
14421 and its original foreground group in old_foreground_pgrp. Register
14422 restore_old_foreground_pgrp with atexit().
14423
9f2e1e63
DJ
144242006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14425
14426 * server.c (handle_query): Correct qPart to qXfer.
14427
b80864fb
DJ
144282006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14429
14430 * configure.ac: Check for more headers which are missing on
14431 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14432 * configure.srv: Add Cygwin and mingw32.
14433 * remote-utils.c: Don't include headers unconditionally which
14434 are missing on mingw32. Include <winsock.h> for mingw32.
14435 (remote_open): Adjust for mingw32 support. Flush
14436 standard error after writing to it.
14437 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14438 (unblock_async_io, enable_async_io, disable_async_io)
14439 (readchar, getpkt): Update for Winsock support.
14440 (prepare_resume_reply): Expect a protocol signal number.
14441 * server.c: Disable <sys/wait.h> on mingw32.
14442 (start_inferior): Adjust for mingw32 support. Flush
14443 standard error after writing to it.
14444 (attach_inferior): Likewise. Use protocol signal
14445 numbers.
14446 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14447 and names.
14448 * win32-i386-low.c: New file.
14449 * Makefile.in (XM_CLIBS): Set.
14450 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14451 (win32-i386-low.o): New dependency rule.
14452 * linux-low.c (linux_wait): Use target signal numbers.
14453 * target.h (struct target_ops): Doc fix.
14454 * server.h (target_signal_to_name): New prototype.
14455 * gdbreplay.c: Don't include headers unconditionally which
14456 are missing on mingw32. Include <winsock.h> for mingw32.
14457 (remote_close, remote_open): Adjust for Winsock support.
14458 * configure, config.in: Regenerated.
14459
0876f84a
DJ
144602006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14461
14462 * server.c (decode_xfer_read, write_qxfer_response): New.
14463 (handle_query): Take a packet length argument. Handle
14464 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14465 the qSupported response.
14466 (main): Update call to handle_query.
14467
01f9e8fa
DJ
144682006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14469
14470 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14471 (putpkt_binary): Renamed from putpkt and adjusted for binary
14472 data.
14473 (putpkt): New wrapper for putpkt_binary.
14474 (readchar): Don't mask off the high bit.
14475 (decode_X_packet): New function.
14476 * server.c (main): Call putpkt_binary if a handler sets the packet
14477 length. Save the length of the incoming packet. Handle 'X'.
14478 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14479
be2a5f71
DJ
144802006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14481
14482 * server.c (handle_query): Handle qSupported.
14483
ea025f5f
DJ
144842006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14485
14486 * remote-utils.c (all_symbols_looked_up): New variable.
14487 (look_up_one_symbol): Check it.
14488 * server.h (look_up_one_symbol): New declaration.
14489 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14490
9308fc88
DJ
144912006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14492
14493 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 14494 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
14495 (PTRACE_GET_THREAD_AREA): Define.
14496 (ps_get_thread_area): New function.
14497
52fb6437
NS
144982006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14499
14500 * configure.srv (m68k*-*-uclinux*): New target.
14501 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14502 (linux_resume_one_process): Remove extraneous cast.
14503 (linux_read_offsets): New.
14504 (linux_target_op): Add linux_read_offsets on mmuless systems.
14505 * server.c (handle_query): Add qOffsets logic.
14506 * target.h (struct target_ops): Add read_offsets.
14507
21b0f40c
DJ
145082006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14509
14510 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14511 (PTRACE_GET_THREAD_AREA): Define.
14512 (ps_get_thread_area): New function.
14513 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14514 (linux-x86-64-low.o): Update.
14515
0050a760
DJ
145162006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14517
14518 * configure.ac: Remove checks for prfpregset_t.
14519 * gdb_proc_service.h: New file.
14520 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14521 new "gdb_proc_service.h".
14522 * proc-service.c: Likewise.
14523 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14524 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14525 * Makefile.in (gdb_proc_service_h): Updated.
14526 * configure, config.in: Regenerated.
14527
b92a518e
DJ
145282006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14529
14530 * remote-utils.c (prepare_resume_reply): Move declaration
14531 of gdb_id_from_wait to the top of the block.
14532
545587ee
DJ
145332006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14534
14535 * linux-low.c (regsets_store_inferior_registers): Read the regset
14536 from the target before filling it.
14537
9db87ebd
DJ
145382006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14539
14540 * server.c (attach_inferior): Return SIGTRAP for a successful
14541 attach.
14542
dd24457d
DJ
145432006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14544
14545 * Makefile.in (OBS): Add version.o.
14546 (STAGESTUFF): Delete.
14547 (version.o): Add dependencies.
14548 (version.c): Replace rule.
14549 (clean): Remove version.c.
14550 * server.c (gdbserver_version): New.
14551 (gdbserver_usage): Use printf.
14552 (main): Handle --version and --help.
14553 * server.h (version, host_name): Add declarations.
14554
6f0f660e
EZ
145552005-12-23 Eli Zaretskii <eliz@gnu.org>
14556
889bf7c5
PA
14557 * linux-arm-low.c:
14558 * linux-arm-low.c:
14559 * inferiors.c:
14560 * i387-fp.h:
14561 * i387-fp.c:
14562 * gdbreplay.c:
14563 * regcache.c:
14564 * proc-service.c:
14565 * mem-break.h:
14566 * mem-break.c:
14567 * linux-x86-64-low.c:
14568 * linux-sh-low.c:
14569 * linux-s390-low.c:
14570 * linux-ppc64-low.c:
14571 * linux-ppc-low.c:
14572 * linux-mips-low.c:
14573 * linux-m68k-low.c:
14574 * linux-m32r-low.c:
14575 * linux-low.h:
14576 * linux-low.c:
14577 * linux-ia64-low.c:
14578 * linux-i386-low.c:
14579 * linux-crisv32-low.c:
14580 * thread-db.c:
14581 * terminal.h:
14582 * target.h:
14583 * target.c:
14584 * server.h:
14585 * server.c:
14586 * remote-utils.c:
14587 * regcache.h:
14588 * utils.c:
14589 * Makefile.in:
14590 * configure.ac:
6f0f660e
EZ
14591 * gdbserver.1: Add (C) after Copyright. Update the FSF
14592 address.
14593
9d1fb177
DJ
145942005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14595
14596 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14597 (arm_breakpoint_at): Recognize both breakpoints.
14598 (the_low_target): Use the correct breakpoint instruction.
14599
011a70c2
DJ
146002005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14601
14602 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14603 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14604 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14605 (the_low_target): Update.
14606
7fb85e41
AS
146072005-10-25 Andreas Schwab <schwab@suse.de>
14608
14609 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14610
14611 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14612 (ia64_num_regs): Reduce to 462.
14613
3db0444b
DJ
146142005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14615
14616 * acinclude.m4: Correct quoting.
14617 * aclocal.m4: Regenerated.
14618
14619 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14620 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14621 (thread_db_init): Call thread_db_err_str.
14622 * configure.ac: Check for TD_VERSION.
14623 * config.in, configure: Regenerated.
14624
bee0189a
DJ
146252005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14626
14627 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14628
e9d25b98
DJ
146292005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14630
14631 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14632 is not available. Define HAVE_PTRACE_GETREGS if it is.
14633 * config.in, configure: Regenerated.
14634 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14635 * linux-i386-low.c, linux-m68k-low.c: Update to use
14636 HAVE_PTRACE_GETREGS.
14637 * linux-low.c (regsets_fetch_inferior_registers)
14638 (regsets_store_inferior_registers): Only return 0 if we processed
14639 GENERAL_REGS.
14640 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14641 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14642
a06660f7
DJ
146432005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14644
14645 * inferiors.c (struct thread_info): Add gdb_id.
14646 (add_thread): Add gdb_id argument.
14647 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14648 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14649 calls to add_thread.
14650 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14651 * server.c (handle_query): Use thread_to_gdb_id.
14652 (handle_v_cont, main): Use gdb_id_to_thread_id.
14653 * server.h (add_thread): Update prototype.
14654 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14655 prototypes.
14656
5a1f5858
DJ
146572005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14658
14659 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14660 left-padded registers.
14661 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14662 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14663
e122f1f5
SE
146642005-07-01 Steve Ellcey <sje@cup.hp.com>
14665
14666 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14667 * configure: Regenerate.
14668 * config.in: Regenerate.
14669 * server.h (NEED_DECLARATION_STRERROR):
14670 Replace with !HAVE_DECL_STRERROR.
14671
d592fa2f
DJ
146722005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14673
14674 * linux-low.c (linux_wait, linux_send_signal): Don't test
14675 an unsigned long variable for > 0 if it could be MAX_ULONG.
14676 * server.c (myresume): Likewise.
14677 * target.c (set_desired_inferior): Likewise.
14678
ccbd4912
MK
146792005-06-13 Mark Kettenis <kettenis@gnu.org>
14680
14681 * configure.ac: Simplify and improve check for socklen_t.
14682 * configure, config.in: Regenerate.
14683
f450004a
DJ
146842005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14685
14686 * acconfig.h: Remove.
14687 * configure.ac: Add a test for socklen_t. Use three-argument
14688 AC_DEFINE throughout.
14689 * config.in: Regenerated using autoheader 2.59.
14690 * configure: Regenerated.
14691
14692 * gdbreplay.c (socklen_t): Provide a default.
14693 (remote_open): Use socklen_t.
14694 * remote-utils.c (socklen_t): Provide a default.
14695 (remote_open): Use socklen_t.
14696 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14697 unsigned char.
14698
14699 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14700 char for buffers.
14701 * linux-low.c (linux_read_memory, linux_write_memory)
14702 (linux_read_auxv): Likewise.
14703 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14704 (check_mem_write): Likewise.
14705 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14706 Likewise.
14707 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14708 (registers_from_string, register_data): Likewise.
14709 * server.c (handle_query, main): Likewise.
14710 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14711 (decode_M_packet): Likewise.
14712 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14713 * target.h (struct target_ops): Update read_memory, write_memory,
14714 and read_auxv.
14715 (read_inferior_memory, write_inferior_memory): Update.
14716 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14717 to unsigned char *.
14718 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14719 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14720 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14721 linux-s390-low.c, linux-sh-low.c: Update for changes in
14722 read_inferior_memory and the_low_target->breakpoint.
14723
eee84df1
DJ
147242005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14725
14726 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14727 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14728 * configure.srv: Add powerpc64-*-linux*.
14729 * linux-ppc64-low.c: New file.
14730
45b134e5
OF
147312005-05-23 Orjan Friberg <orjanf@axis.com>
14732
14733 * linux-cris-low.c: New file with support for CRIS.
14734 * linux-crisv32-low.c: Ditto for CRISv32.
14735 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14736 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 14737 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
14738 reg-crisv32.o, and reg-crisv32.c to make rules.
14739 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14740 recognized targets.
14741
48d93c75
UW
147422005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14743
14744 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14745 of sizeof (PTRACE_XFER_TYPE).
14746 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14747
e013ee27
OF
147482005-05-12 Orjan Friberg <orjanf@axis.com>
14749
889bf7c5 14750 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
14751 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14752 pointers for hardware watchpoint support.
14753 * linux-low.h (struct linux_target_ops): Ditto.
14754 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14755 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14756 to linux_target_ops.
14757 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14758 reply packet.
14759 * server.c (main): Recognize 'Z' and 'z' packets.
14760
b0ded00b
UW
147612005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14762
14763 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14764 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14765 (the_low_target): Add new members.
14766
8643e2ad
DJ
147672005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14768
14769 * proc-service.c (ps_lgetregs): Search all_processes instead of
14770 all_threads.
14771
fc620387
DJ
147722005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14773
14774 * server.c (start_inferior): Change return type to int.
14775 (attach_inferior): Change sigptr to int *.
14776 (handle_v_cont, handle_v_requests): Change signal to int *.
14777 (main): Change signal to int.
14778
147792005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
14780
14781 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14782 * configure.srv: Add m32r*-*-linux*.
14783 * linux-m32r-low.c: New file.
14784
e0e76420
DJ
147852005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14786
14787 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14788
a1928bad
DJ
147892005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14790
14791 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14792 Take unsigned long arguments for PIDs.
14793 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14794 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14795 (wait_for_sigstop, linux_resume_one_process)
14796 (regsets_fetch_inferior_registers, linux_send_signal)
14797 (linux_read_auxv): Likewise. Update the types of variables holding
14798 PIDs. Update format string specifiers.
14799 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14800 * remote-utils.c (prepare_resume_reply): Likewise.
14801 * server.c (cont_thread, general_thread, step_thread)
14802 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14803 unsigned long.
14804 (handle_query): Update format specifiers.
14805 (handle_v_cont, main): Use strtoul for thread IDs.
14806 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14807 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14808 (general_thread, step_thread, thread_from_wait)
14809 (old_thread_from_wait): Update.
14810 * target.h (struct thread_resume): Use unsigned long for THREAD.
14811 (struct target_ops): Use unsigned long for arguments to attach and
14812 thread_alive.
14813
dcdb98d2
DJ
148142005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14815
14816 * acinclude.m4: Include bfd/bfd.m4 directly.
14817 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14818 <agriffis@toolchain.org>.
14819 * aclocal.m4, configure: Regenerated.
14820
bec39cab
AC
148212005-01-07 Andrew Cagney <cagney@gnu.org>
14822
14823 * configure.ac: Rename configure.in, require autoconf 2.59.
14824 * configure: Re-generate.
14825
434c4c77
DJ
148262004-12-08 Daniel Jacobowitz <dan@debian.org>
14827
14828 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14829 LIBS when finished.
14830 * aclocal.m4: Regenerated.
14831 * configure: Regenerated.
14832
db1d3e1b
AS
148332004-11-21 Andreas Schwab <schwab@suse.de>
14834
14835 * linux-m68k-low.c (m68k_num_gregs): Define.
14836 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14837 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14838 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14839 (m68k_breakpoint_at): New. Add to the_low_target.
14840
14841 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14842 srv_linux_thread_db to yes.
14843
43360365
JB
148442004-10-20 Joel Brobecker <brobecker@gnat.com>
14845
14846 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14847 (ARCH_SET_FS): Likewise.
14848 (ARCH_GET_FS): Likewise.
14849 (ARCH_GET_GS): Likewise.
14850
fd500816
DJ
148512004-10-16 Daniel Jacobowitz <dan@debian.org>
14852
14853 * linux-i386-low.c (ps_get_thread_area): New.
14854 * linux-x86-64-low.c (ps_get_thread_area): New.
14855 * linux-low.c: Include <sys/syscall.h>.
14856 (linux_kill_one_process): Don't kill the first thread here.
14857 (linux_kill): Kill the first thread here.
14858 (kill_lwp): New function.
14859 (send_sigstop, linux_send_signal): Use it.
14860 * proc-service.c: Clean up #ifdefs.
14861 (fpregset_info): Delete.
14862 (ps_lgetregs): Update and enable implementation.
14863 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14864 implementations.
14865 * remote-utils.c (struct sym_cache, symbol_cache): New.
14866 (input_interrupt): Print a clearer message.
14867 (async_io_enabled): New variable.
14868 (enable_async_io, disable_async_io): Use it. Update comments.
14869 (look_up_one_symbol): Use the symbol cache.
14870 * thread-db.c (thread_db_look_up_symbols): New function.
14871 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14872
f6de3c42
DJ
148732004-10-16 Daniel Jacobowitz <dan@debian.org>
14874
14875 * configure.in: Test for -rdynamic.
14876 * configure: Regenerated.
14877 * Makefile (INTERNAL_LDFLAGS): New.
14878 (gdbserver, gdbreplay): Use it.
14879
2c0fc042
AC
148802004-09-02 Andrew Cagney <cagney@gnu.org>
14881
14882 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14883
075b3282
DJ
148842004-03-23 Daniel Jacobowitz <drow@mvista.com>
14885
14886 * linux-low.c (linux_wait): Clear all_processes list also.
14887
fa6a77dc
DJ
148882004-03-12 Daniel Jacobowitz <drow@mvista.com>
14889
14890 * linux-low.c: Include <errno.h>. Remove extern declaration of
14891 errno.
14892
6d782a97
DJ
148932004-03-12 Daniel Jacobowitz <drow@mvista.com>
14894
14895 * gdbreplay.c, server.h, utils.c: Update copyright years.
14896
3a7fb99b
DJ
148972004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14898
14899 * server.c (main): Print child status or termination signal from
14900 variable 'signal', not 'sig'.
14901
c3e735a6
DJ
149022004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14903
14904 * linux-low.c (linux_read_memory): Change return type to
14905 int. Check for and return error from ptrace().
14906 * target.c (read_inferior_memory): Change return type to int. Pass
14907 back return status from the_target->read_memory().
14908 * target.h (struct target_ops): Adapt *read_memory() prototype.
14909 Update comment.
14910 (read_inferior_memory): Adapt prototype.
14911 * server.c (main): Return an error packet if
14912 read_inferior_memory() returns an error.
14913
a59d1c82
DJ
149142004-03-04 Daniel Jacobowitz <drow@mvista.com>
14915
14916 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14917 Unify with other clean targets.
14918
dc3f8883
DJ
149192004-02-29 Daniel Jacobowitz <drow@mvista.com>
14920
14921 * server.c (handle_v_cont): Call set_desired_inferior.
14922
89a208da
DJ
149232004-02-29 Daniel Jacobowitz <drow@mvista.com>
14924
14925 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14926
62ea82f5
DJ
149272004-02-29 Daniel Jacobowitz <drow@mvista.com>
14928
14929 * linux-low.c (linux_wait): Unblock async I/O.
14930 (linux_resume): Block and enable async I/O.
14931 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14932 * server.h (block_async_io, unblock_async_io): Add prototypes.
14933
6910d122
DJ
149342004-02-29 Daniel Jacobowitz <drow@mvista.com>
14935
14936 * remote-utils.c (remote_open): Print a status notice after
14937 opening a TCP port.
14938 * server.c (attach_inferior): Print a status notice after
14939 attaching.
14940
149412004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
14942
14943 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14944
c89dc5d4
DJ
149452004-02-26 Daniel Jacobowitz <drow@mvista.com>
14946
14947 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14948 error packet.
14949 * server.c, target.h: Update copyright years.
14950
4b8dad4a
RM
149512004-02-25 Roland McGrath <roland@redhat.com>
14952
14953 * target.h (struct target_ops): New member `read_auxv'.
14954 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14955 * linux-low.c (linux_read_auxv): New function.
14956 (linux_target_ops): Initialize `read_auxv' member to that.
14957
d7446758
JB
149582004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14959
14960 Committed by Jim Blandy <jimb@redhat.com>.
14961
14962 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 14963 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
14964 instead of GPR_SIZE to distiguish s390 and s390x targets.
14965
5544ad89
DJ
149662004-01-31 Daniel Jacobowitz <drow@mvista.com>
14967
14968 * linux-low.c: Update copyright year.
14969 (check_removed_breakpoint): Clear pending_is_breakpoint.
14970 (linux_set_resume_request, linux_queue_one_thread)
14971 (resume_status_pending_p): New functions.
14972 (linux_continue_one_thread): Use process->resume.
14973 (linux_resume): Only resume threads if there are no pending events.
14974 * linux-low.h (struct process_info): Add resume request
14975 pointer.
14976
2a68b70e
DJ
149772004-01-30 Daniel Jacobowitz <drow@mvista.com>
14978
14979 * regcache.c (new_register_cache): Clear the allocated register
14980 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14981
64386c31
DJ
149822003-10-13 Daniel Jacobowitz <drow@mvista.com>
14983
14984 * linux-low.c (linux_resume): Take a struct thread_resume *
14985 argument.
14986 (linux_wait): Update call.
14987 (resume_ptr): New static variable.
14988 (linux_continue_one_thread): Renamed from
14989 linux_continue_one_process. Use resume_ptr.
14990 (linux_resume): Use linux_continue_one_thread.
14991 * server.c (handle_v_cont, handle_v_requests): New functions.
14992 (myresume): New function.
14993 (main): Handle 'v' case.
14994 * target.h (struct thread_resume): New type.
14995 (struct target_ops): Change argument of "resume" to struct
14996 thread_resume *.
14997 (myresume): Delete macro.
14998
c938e9b0
L
149992003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15000
15001 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15002 (uninstall): Support DESTDIR.
15003
7f313d07
BC
15004Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15005
15006 * configure.srv: Add xscale*linux copy of arm*linux entry.
15007
3b2fc2ea
DJ
150082003-07-24 Daniel Jacobowitz <drow@mvista.com>
15009
15010 * linux-arm-low.c (arm_reinsert_addr): New function.
15011 (the_low_target): Add arm_reinsert_addr.
15012
1c0a559e
MK
150132003-07-08 Mark Kettenis <kettenis@gnu.org>
15014
15015 * mem-break.c: Remove whitespace at end of file.
15016
43d5792c
DJ
150172003-06-28 Daniel Jacobowitz <drow@mvista.com>
15018
15019 * configure.in: Check whether we need to prototype strerror.
15020 * server.h: Optionally prototype strerror.
15021 * gdbreplay.c (perror_with_name): Use strerror.
15022 * linux-low.c (linux_attach_lwp): Use strerror.
15023 * utils.c (perror_with_name): Use strerror.
15024 * config.in, configure: Regenerated.
15025
c8a86edf
DJ
150262003-06-28 Daniel Jacobowitz <drow@mvista.com>
15027
15028 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15029 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15030
73d37363
DJ
150312003-06-20 Daniel Jacobowitz <drow@mvista.com>
15032
15033 * Makefile.in (SFILES): Update.
15034 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15035 low-sun3.c: Remove files.
15036
6ad8ae5c
DJ
150372003-06-17 Daniel Jacobowitz <drow@mvista.com>
15038
15039 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15040 (linux_detach_one_process, linux_detach): New functions.
15041 (linux_target_ops): Add linux_detach.
15042 * server.c (main): Handle 'D' packet.
15043 * target.h (struct target_ops): Add "detach" member.
15044 (detach_inferior): Define.
15045
1581182a
MK
150462003-06-13 Mark Kettenis <kettenis@gnu.org>
15047
15048 From Kelley Cook <kelleycook@wideopenwest.com>:
15049 * configure.srv: Accept i[34567]86 variants.
15050
e5379b03
DJ
150512003-06-05 Daniel Jacobowitz <drow@mvista.com>
15052
15053 * linux-low.c (linux_wait_for_event): Correct comment typos.
15054 (linux_resume_one_process): Call check_removed_breakpoint.
15055 (linux_send_signal): New function.
15056 (linux_target_ops): Add linux_send_signal.
15057 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15058 of kill.
15059 * target.h (struct target_ops): Add send_signal.
15060
2ff29de4
JB
150612003-05-29 Jim Blandy <jimb@redhat.com>
15062
15063 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15064 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15065 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15066 away part of the register's value.
15067
254787d4
DJ
150682003-03-26 Daniel Jacobowitz <drow@mvista.com>
15069
15070 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15071 (linux_wait_for_event, linux_init_signals): Likewise.
15072
94e10508
DJ
150732003-03-17 Daniel Jacobowitz <drow@mvista.com>
15074
15075 * configure.in: Check for stdlib.h.
15076 * configure: Regenerated.
15077 * config.in: Regenerated.
15078
4c0711e0
DJ
150792003-01-04 Andreas Schwab <schwab@suse.de>
15080
15081 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15082
ef66e766
AC
150832003-01-02 Andrew Cagney <ac131313@redhat.com>
15084
15085 * Makefile.in: Remove obsolete code.
15086
a1358604
DJ
150872002-11-20 Daniel Jacobowitz <drow@mvista.com>
15088
15089 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15090 defined(PT_FPR0_HI).
15091
23ce3b1c
DJ
150922002-11-17 Stuart Hughes <seh@zee2.com>
15093
15094 * linux-arm-low.c (arm_num_regs): Increase.
15095 (arm_regmap): Include status register.
15096
150972002-11-17 Daniel Jacobowitz <drow@mvista.com>
15098
15099 * linux-low.c (register_addr): Remove incorrect -1 check.
15100
a9fa9f7d
DJ
151012002-08-29 Daniel Jacobowitz <drow@mvista.com>
15102
15103 * linux-low.c (linux_create_inferior): Call setpgid. Return
15104 the new PID.
15105 (unstopped_p, linux_signal_pid): Remove.
15106 (linux_target_ops): Remove linux_signal_pid.
15107 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15108 global instead of target method.
15109 * target.h (struct target_ops): Remove signal_pid. Update comment
15110 for create_inferior.
15111 * server.c (signal_pid): New variable.
15112 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 15113 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
15114 (attach_inferior): Set signal_pid.
15115
17574093
DJ
151162002-08-23 Daniel Jacobowitz <drow@mvista.com>
15117
15118 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15119
151202002-08-20 Jim Blandy <jimb@redhat.com>
15121
15122 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15123 default for this.
15124
151252002-08-01 Andrew Cagney <cagney@redhat.com>
15126
15127 * Makefile.in: Make chill references obsolete.
15128
151292002-07-24 Kevin Buettner <kevinb@redhat.com>
15130
15131 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15132 * configure: Regenerate.
15133 * config.in: Regenerate.
15134
151352002-07-09 David O'Brien <obrien@FreeBSD.org>
15136
15137 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15138 (perror_with_name, remote_close, remote_open, expect, play): Static.
15139
151402002-07-04 Michal Ludvig <mludvig@suse.cz>
15141
4b8dad4a 15142 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
15143 byte offsets instead of an array of indexes.
15144 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15145
151462002-06-13 Daniel Jacobowitz <drow@mvista.com>
15147
15148 * regcache.c: Add comment.
15149
151502002-06-11 Daniel Jacobowitz <drow@mvista.com>
15151
15152 * thread-db.c: New file.
15153 * proc-service.c: New file.
15154 * acinclude.m4: New file.
15155 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15156 proc-service.o, and thread-db.o.
15157 (linux-low.o): Add USE_THREAD_DB.
15158 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15159 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15160 * aclocal.m4: Regenerated.
15161 * config.in: Regenerated.
15162 * configure: Regenerated.
15163 * configure.in: Check for proc_service.h, sys/procfs.h,
15164 thread_db.h, and linux/elf.h headrs.
15165 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15166 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15167 Check for -lthread_db and thread support.
15168 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15169 PowerPC, and SuperH.
15170 * i387-fp.c: Constify arguments.
15171 * i387-fp.h: Likewise.
15172 * inferiors.c: (struct thread_info): Renamed from
15173 `struct inferior_info'. Remove PID member. Use generic inferior
15174 list header. All uses updated.
15175 (inferiors, signal_pid): Removed.
15176 (all_threads): New variable.
15177 (get_thread): Define.
15178 (add_inferior_to_list): New function.
15179 (for_each_inferior): New function.
15180 (change_inferior_id): New function.
15181 (add_inferior): Removed.
15182 (remove_inferior): New function.
15183 (add_thread): New function.
15184 (free_one_thread): New function.
15185 (remove_thread): New function.
15186 (clear_inferiors): Use for_each_inferior and free_one_thread.
15187 (find_inferior): New function.
15188 (find_inferior_id): New function.
15189 (inferior_target_data): Update argument type.
15190 (set_inferior_target_data): Likewise.
15191 (inferior_regcache_data): Likewise.
15192 (set_inferior_regcache_data): Likewise.
15193 * linux-low.c (linux_bp_reinsert): Remove.
15194 (all_processes, stopping_threads, using_thrads)
15195 (struct pending_signals, debug_threads, pid_of): New.
15196 (inferior_pid): Replace with macro.
15197 (struct inferior_linux_data): Remove.
15198 (get_stop_pc, add_process): New functions.
15199 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15200 Use add_process and add_thread.
15201 (linux_attach_lwp): New function, based on old linux_attach. Use
15202 add_process and add_thread. Set stop_expected for new threads.
15203 (linux_attach): New function.
15204 (linux_kill_one_process): New function.
15205 (linux_kill): Kill all LWPs.
15206 (linux_thread_alive): Use find_inferior_id.
15207 (check_removed_breakpoints, status_pending_p): New functions.
15208 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15209 Update. Use WNOHANG. Wait for cloned processes also. Update process
15210 struct for the found process.
15211 (linux_wait_for_event): New function.
15212 (linux_wait): Use it. Support LWPs.
15213 (send_sigstop, wait_for_sigstop, stop_all_processes)
15214 (linux_resume_one_process, linux_continue_one_process): New functions.
15215 (linux_resume): Support LWPs.
15216 (REGISTER_RAW_SIZE): Remove.
15217 (fetch_register): Use register_size instead. Call supply_register.
15218 (usr_store_inferior_registers): Likewise. Call collect_register.
15219 Fix recursive case.
15220 (regsets_fetch_inferior_registers): Improve error message.
15221 (regsets_store_inferior_registers): Add debugging.
15222 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15223 (unstopped_p, linux_signal_pid): New functions.
15224 (linux_target_ops): Add linux_signal_pid.
15225 (linux_init_signals): New function.
15226 (initialize_low): Call it. Initialize using_threads.
15227 * regcache.c (inferior_regcache_data): Add valid
15228 flag.
15229 (get_regcache): Fetch registers lazily. Add fetch argument
15230 and update all callers.
15231 (regcache_invalidate_one, regcache_invalidate): New
15232 functions.
15233 (new_register_cache): Renamed from create_register_cache.
15234 Return the new regcache.
15235 (free_register_cache): Change argument to a void *.
15236 (registers_to_string, registers_from_string): Call get_regcache
15237 with fetch flag set.
15238 (register_data): Make static. Pass fetch flag to get_regcache.
15239 (supply_register): Call get_regcache with fetch flag clear.
15240 (collect_register): Call get_regcache with fetch flag set.
15241 (collect_register_as_string): New function.
15242 * regcache.h: Update.
15243 * remote-utils.c (putpkt): Flush after debug output and use
15244 stderr.
15245 Handle input interrupts while waiting for an ACK.
15246 (input_interrupt): Use signal_pid method.
15247 (getpkt): Flush after debug output and use stderr.
15248 (outreg): Use collect_register_as_string.
15249 (new_thread_notify, dead_thread_notify): New functions.
15250 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15251 and general_thread.
15252 (look_up_one_symbol): Flush after debug output.
15253 * server.c (step_thread, server_waiting): New variables.
15254 (start_inferior): Don't use signal_pid. Update call to mywait.
15255 (attach_inferior): Update call to mywait.
15256 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15257 (main): Don't fetch/store registers explicitly. Use
15258 set_desired_inferior. Support proposed ``Hs'' packet. Update
15259 calls to mywait.
15260 * server.h: Update.
15261 (struct inferior_list, struct_inferior_list_entry): New.
15262 * target.c (set_desired_inferior): New.
15263 (write_inferior_memory): Constify.
15264 (mywait): New function.
15265 * target.h: Update.
15266 (struct target_ops): New signal_pid method.
15267 (mywait): Removed macro, added prototype.
15268
15269 * linux-low.h (regset_func): Removed.
15270 (regset_fill_func, regset_store_func): New.
15271 (enum regset_type): New.
15272 (struct regset_info): Add type field. Use new operation types.
15273 (struct linux_target_ops): stop_pc renamed to get_pc.
15274 Add decr_pc_after_break and breakpoint_at.
15275 (get_process, get_thread_proess, get_process_thread)
15276 (strut process_info, all_processes, linux_attach_lwp)
15277 (thread_db_init): New.
15278
15279 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15280 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15281 (the_low_target): Add new members.
15282 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15283 (i386_store_fpxregset): Constify.
15284 (target_regsets): Add new kind identifier.
15285 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15286 (i386_set_pc): Add debugging.
15287 (i386_breakpoint_at): New function.
15288 (the_low_target): Add new members.
15289 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15290 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15291 (mips_breakpoint_at): New.
15292 (the_low_target): Add new members.
15293 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15294 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15295 (the_low_target): Add new members.
15296 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15297 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15298 (the_low_target): Add new members.
15299 * linux-x86-64-low.c (target_regsets): Add new kind
15300 identifier.
15301
153022002-05-15 Daniel Jacobowitz <drow@mvista.com>
15303
15304 From Martin Pool <mbp@samba.org>:
15305 * server.c (gdbserver_usage): New function.
15306 (main): Call it.
15307
153082002-05-14 Daniel Jacobowitz <drow@mvista.com>
15309
15310 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15311 stop_at -> stop_pc.
15312
153132002-05-04 Andrew Cagney <ac131313@redhat.com>
15314
15315 * Makefile.in: Remove obsolete code.
15316
153172002-04-24 Michal Ludvig <mludvig@suse.cz>
15318
15319 * linux-low.c (regsets_fetch_inferior_registers),
15320 (regsets_store_inferior_registers): Removed cast to int from
15321 ptrace() calls.
15322 * regcache.h: Added declaration of struct inferior_info.
15323
153242002-04-20 Daniel Jacobowitz <drow@mvista.com>
15325
15326 * inferiors.c (struct inferior_info): Add regcache_data.
15327 (add_inferior): Call create_register_cache.
15328 (clear_inferiors): Call free_register_cache.
15329 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15330 * regcache.c (struct inferior_regcache_data): New.
15331 (registers): Remove.
15332 (get_regcache): New function.
15333 (create_register_cache, free_register_cache): New functions.
15334 (set_register_cache): Don't initialize the register cache here.
15335 (registers_to_string, registers_from_string, register_data): Call
15336 get_regcache.
15337 * regcache.h: Add prototypes.
15338 * server.h: Likewise.
15339
153402002-04-20 Daniel Jacobowitz <drow@mvista.com>
15341
15342 * mem-break.c: New file.
15343 * mem-break.h: New file.
15344 * Makefile.in: Add mem-break.o rule; update server.h
15345 dependencies.
15346 * inferiors.c (struct inferior_info): Add target_data
15347 member.
15348 (clear_inferiors): Free target_data member if set.
15349 (inferior_target_data, set_inferior_target_data): New functions.
15350 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15351 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15352 * linux-low.c (linux_bp_reinsert): New variable.
15353 (struct inferior_linux_data): New.
15354 (linux_create_inferior): Use set_inferior_target_data.
15355 (linux_attach): Likewise. Call add_inferior.
15356 (linux_wait_for_one_inferior): New function.
15357 (linux_wait): Call it.
15358 (linux_write_memory): Add const.
15359 (initialize_low): Call set_breakpoint_data.
15360 * linux-low.h (struct linux_target_ops): Add breakpoint
15361 handling members.
15362 * server.c (attach_inferior): Remove extra add_inferior
15363 call.
15364 * server.h: Include mem-break.h. Update inferior.c
15365 prototypes.
15366 * target.c (read_inferior_memory)
15367 (write_inferior_memory): New functions.
15368 * target.h (read_inferior_memory)
15369 (write_inferior_memory): Change macros to prototypes.
15370 (struct target_ops): Update comments. Add const to write_memory
15371 definition.
15372
153732002-04-11 Daniel Jacobowitz <drow@mvista.com>
15374
15375 * linux-low.c (usr_store_inferior_registers): Support
15376 registers which are allowed to fail to store.
15377 * linux-low.h (linux_target_ops): Likewise.
15378 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15379 (ppc_cannot_store_register): FPSCR may not be storable.
15380
153812002-04-09 Daniel Jacobowitz <drow@mvista.com>
15382
15383 * server.h: Include <string.h> if HAVE_STRING_H.
15384 * ChangeLog: Correct paths in last ChangeLog entry.
15385
153862002-04-09 Daniel Jacobowitz <drow@mvista.com>
15387
15388 * linux-low.h: Remove obsolete prototypes.
15389 (struct linux_target_ops): New.
15390 (extern the_low_target): New.
15391 * linux-low.c (num_regs, regmap): Remove declarations.
15392 (register_addr): Use the_low_target explicitly.
15393 (fetch_register): Likewise.
15394 (usr_fetch_inferior_registers): Likewise.
15395 (usr_store_inferior_registers): Likewise.
15396 * linux-arm-low.c (num_regs): Remove.
15397 (arm_num_regs): Define.
15398 (arm_regmap): Renamed from regmap, made static.
15399 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15400 made static.
15401 (arm_cannot_store_register): Renamed from cannot_store_register,
15402 made static.
15403 (the_low_target): New.
15404 * linux-i386-low.c (num_regs): Remove.
15405 (i386_num_regs): Define.
15406 (i386_regmap): Renamed from regmap, made static.
15407 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15408 made static.
15409 (i386_cannot_store_register): Renamed from cannot_store_register,
15410 made static.
15411 (the_low_target): New.
15412 * linux-ia64-low.c (num_regs): Remove.
15413 (ia64_num_regs): Define.
15414 (ia64_regmap): Renamed from regmap, made static.
15415 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15416 made static.
15417 (ia64_cannot_store_register): Renamed from cannot_store_register,
15418 made static.
15419 (the_low_target): New.
15420 * linux-m68k-low.c (num_regs): Remove.
15421 (m68k_num_regs): Define.
15422 (m68k_regmap): Renamed from regmap, made static.
15423 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15424 made static.
15425 (m68k_cannot_store_register): Renamed from cannot_store_register,
15426 made static.
15427 (the_low_target): New.
15428 * linux-mips-low.c (num_regs): Remove.
15429 (mips_num_regs): Define.
15430 (mips_regmap): Renamed from regmap, made static.
15431 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15432 made static.
15433 (mips_cannot_store_register): Renamed from cannot_store_register,
15434 made static.
15435 (the_low_target): New.
15436 * linux-ppc-low.c (num_regs): Remove.
15437 (ppc_num_regs): Define.
15438 (ppc_regmap): Renamed from regmap, made static.
15439 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15440 made static.
15441 (ppc_cannot_store_register): Renamed from cannot_store_register,
15442 made static.
15443 (the_low_target): New.
15444 * linux-s390-low.c (num_regs): Remove.
15445 (s390_num_regs): Define.
15446 (s390_regmap): Renamed from regmap, made static.
15447 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15448 made static.
15449 (s390_cannot_store_register): Renamed from cannot_store_register,
15450 made static.
15451 (the_low_target): New.
15452 * linux-sh-low.c (num_regs): Remove.
15453 (sh_num_regs): Define.
15454 (sh_regmap): Renamed from regmap, made static.
15455 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15456 made static.
15457 (sh_cannot_store_register): Renamed from cannot_store_register,
15458 made static.
15459 (the_low_target): New.
15460 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15461 (the_low_target): New.
15462
154632002-04-09 Daniel Jacobowitz <drow@mvista.com>
15464
15465 * Makefile.in: Add stamp-h target.
15466 * configure.in: Create stamp-h.
15467 * configure: Regenerated.
15468
154692002-04-09 Daniel Jacobowitz <drow@mvista.com>
15470
15471 * inferiors.c: New file.
15472 * target.c: New file.
15473 * target.h: New file.
15474 * Makefile.in: Add target.o and inferiors.o. Update
15475 dependencies.
15476 * linux-low.c (inferior_pid): New static variable,
15477 moved from server.c.
15478 (linux_create_inferior): Renamed from create_inferior.
15479 Call add_inferior. Return 0 on success instead of a PID.
15480 (linux_attach): Renamed from myattach.
15481 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15482 (linux_thread_alive): Renamed from mythread_alive.
15483 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15484 child dies.
15485 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15486 (regsets_store_inferior_registers): Correct error message.
15487 Add missing ``return 0''.
15488 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15489 (linux_store_registers): Renamed from store_inferior_registers.
15490 (linux_read_memory): Renamed from read_inferior_memory.
15491 (linux_write_memory): Renamed from write_inferior_memory.
15492 (linux_target_ops): New structure.
15493 (initialize_low): Call set_target_ops ().
15494 * remote-utils.c (unhexify): New function.
15495 (hexify): New function.
15496 (input_interrupt): Send signals to ``signal_pid''.
15497 * server.c (inferior_pid): Remove.
15498 (start_inferior): Update create_inferior call.
15499 (attach_inferior): Call add_inferior.
15500 (handle_query): New function.
15501 (main): Call handle_query for `q' packets.
15502 * server.h: Include "target.h". Remove obsolete prototypes.
15503 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15504
155052002-04-09 Daniel Jacobowitz <drow@mvista.com>
15506
15507 * Makefile.in: Add WARN_CFLAGS. Update configury
15508 dependencies.
15509 * configure.in: Check for <string.h>
15510 * configure: Regenerate.
15511 * config.in: Regenerate.
15512 * gdbreplay.c: Include needed system headers.
15513 (remote_open): Remove strchr prototype.
15514 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15515 * regcache.c (supply_register): Change buf argument to const void *.
15516 (supply_register_by_name): Likewise.
15517 (collect_register): Change buf argument to void *.
15518 (collect_register_by_name): Likewise.
15519 * regcache.h: Add missing prototypes.
15520 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15521 * server.c (handle_query): New function.
15522 (attached): New static variable, moved out of main.
15523 (main): Quiet longjmp clobber warnings.
15524 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15525 * utils.c (error): Remove NORETURN.
15526 (fatal): Likewise.