ppc: Add Power ISA 3.0/POWER9 instructions record support
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
fc6cda2e
YQ
12016-09-21 Yao Qi <yao.qi@linaro.org>
2
3 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
4 23.
5
bc1e6c81
SDJ
62016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
7
8 * server.c (start_inferior): Call target_mourn_inferior instead of
9 mourn_inferior; pass ptid_t argument to it.
10 (resume): Likewise.
11 (handle_target_event): Likewise.
12 * target.c (target_mourn_inferior): New function.
13 * target.h (mourn_inferior): Delete macro.
14
0e00e962
AA
152016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
16
17 * linux-low.c (lwp_is_stepping): New function.
18
1d8cb77d
CL
192016-09-06 Carl Love <cel@us.ibm.com>
20
21 * server.c (start_inferior): Fixed comment, requested comment change
22 didn't get updated correctly. Removed reference to ptrace () call as
23 it is only true on Linux systems.
24
7313bced
CL
252016-09-06 Carl Love <cel@us.ibm.com>
26
27 * server.c (start_inferior): Do not call
28 function target_post_create_inferior () if the
29 inferior process has already exited.
30
cf6de44d
PA
312016-09-05 Pedro Alves <palves@redhat.com>
32
33 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
34 (COMPILE.pre, CC_LD): Use CXX directly.
35 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
36 * acinclude.m4: Don't include build-with-cxx.m4.
37 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
38 * configure: Regenerate.
39
c1da6748
AT
402016-09-02 Akash Trehan <akash.trehan123@gmail.com>
41
42 PR gdb/19495
43 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
44 call writing data to own_buf.
45
f2b9e3df
SDJ
462016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
47
48 * target.c (mywait): Call target_wait instead of
49 the_target->wait.
50 (target_wait): New function.
51
049a8570
SDJ
522016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
53
54 * server.c (start_inferior): New variable 'ptid'. Replace calls
55 to the_target->resume by target_continue{,_no_signal}, depending
56 on the case.
57 * target.c (target_stop_and_wait): Call target_continue_no_signal
58 instead of the_target->resume.
59 (target_continue): New function.
60
3aa5cfa0
AT
612016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
62
63 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
64
754653a7
AZ
652016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
66
67 PR server/20491
68 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
69 ps_prochandle.
70 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
71 * linux-arm-low.c (ps_get_thread_area): Likewise.
72 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
73 * linux-m68k-low.c (ps_get_thread_area): Likewise.
74 * linux-mips-low.c (ps_get_thread_area): Likewise.
75 * linux-nios2-low.c (ps_get_thread_area): Likewise.
76 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
77 * linux-x86-low.c (ps_get_thread_area): Likewise.
78 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
79
ed036b40
PA
802016-08-19 Pedro Alves <palves@redhat.com>
81
82 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
83
c8ef42ee
PA
842016-08-19 Pedro Alves <palves@redhat.com>
85
86 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
87 comment. Use memcpy instead of casting through unsigned long.
88
9c235a72
PA
892016-08-19 Pedro Alves <palves@redhat.com>
90
91 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
92 allocating around 0x80000000.
93
201506da
PA
942016-08-19 Pedro Alves <palves@redhat.com>
95
96 PR gdb/20415
97 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
98 (x32-avx512-linux-ipa.o): New rules.
99 * configure.ac (x86_64-*-linux*): New x32 check.
100 * configure.srv (ipa_x32_linux_regobj): New.
101 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
102 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
103 descriptions.
104 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
105 descriptions.
106 * configure: Regenerate.
107
f348d89a
PA
1082016-08-09 Pedro Alves <palves@redhat.com>
109
110 PR gdb/18653
111 * Makefile.in (OBS): Add signals-state-save-restore.o.
112 (signals-state-save-restore.o): New rule.
113 * config.in: Regenerate.
114 * configure: Regenerate.
115 * linux-low.c: Include "signals-state-save-restore.h".
116 (linux_create_inferior): Call
117 restore_original_signals_state.
118 * server.c: Include "dispositions-save-restore.h".
119 (captured_main): Call save_original_signals_state.
120
1baf5149
PA
1212016-08-05 Pedro Alves <palves@redhat.com>
122
123 * configure: Regenerate.
124
fcd4a73d
YQ
1252016-08-04 Yao Qi <yao.qi@linaro.org>
126
127 * linux-low.c (regsets_fetch_inferior_registers): Check
128 errno is ESRCH or not.
129
979659d0
YQ
1302016-08-02 Yao Qi <yao.qi@linaro.org>
131
132 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
133 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
134 (thread_db_load_search): Update.
135 (try_thread_db_load_1): Don't look for td_ta_event_addr,
136 td_ta_set_event and td_ta_event_getmsg.
137
6598661d
PA
1382016-07-26 Pedro Alves <palves@redhat.com>
139
140 PR server/20414
141 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
142 of unsigned long for 64-bit registers and use uint32_t instead of
143 unsigned int for 32-bit registers.
144
9cf12d57
PA
1452016-07-26 Pedro Alves <palves@redhat.com>
146
147 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
148 to 'ptrace'.
149
305450ed
TT
1502016-07-21 Tom Tromey <tom@tromey.com>
151
152 * configure: Rebuild.
153
2583da7c
YQ
1542016-07-21 Yao Qi <yao.qi@linaro.org>
155
156 * mem-break.c (find_gdb_breakpoint): Cast bp to
157 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
158
21536b36
YQ
1592016-07-21 Yao Qi <yao.qi@linaro.org>
160
161 * server.c (handle_v_requests): Support s and S actions
162 if target_supports_software_single_step return true.
163
8901d193
YQ
1642016-07-21 Yao Qi <yao.qi@linaro.org>
165
166 * linux-low.c (resume_stopped_resumed_lwps): If resume request
167 is resume_step, call maybe_hw_step.
168 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
169 and unstop them.
170 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
171 breakpoints or not.
172 (proceed_one_lwp): If resume request is resume_step, install
173 reinsert breakpoints and call maybe_hw_step.
174
0e9a339e
YQ
1752016-07-21 Yao Qi <yao.qi@linaro.org>
176
177 * linux-low.c (proceed_one_lwp): Declare.
178 (linux_resume_one_thread): Remove local variable 'step'.
179 Lift code enqueue signal. Call proceed_one_lwp instead of
180 linux_resume_one_lwp.
181
4281b351
YQ
1822016-07-21 Yao Qi <yao.qi@linaro.org>
183
184 * linux-low.c (linux_resume_one_thread): Call
185 enqueue_pending_signal.
186
984a2c04
YQ
1872016-07-21 Yao Qi <yao.qi@linaro.org>
188
189 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
190 * inferiors.c (do_restore_current_thread_cleanup): New function.
191 (make_cleanup_restore_current_thread): Likewise.
192 * linux-low.c (install_software_single_step_breakpoints): Call
193 make_cleanup_restore_current_thread. Switch current_thread to
194 thread.
195
bec903c9
YQ
1962016-07-21 Yao Qi <yao.qi@linaro.org>
197
198 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
199 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
200 (clone_one_breakpoint): Likewise.
201 (delete_reinsert_breakpoints): Change parameter to thread.
202 Callers updated.
203 (has_reinsert_breakpoints): Likewise.
204 (uninsert_reinsert_breakpoints): Likewise.
205 (reinsert_reinsert_breakpoints): Likewise.
206 * mem-break.h (set_reinsert_breakpoint): Update declaration.
207 (delete_reinsert_breakpoints): Likewise.
208 (reinsert_reinsert_breakpoints): Likewise.
209 (uninsert_reinsert_breakpoints): Likewise.
210 (has_reinsert_breakpoints): Likewise.
211
63c40ec7
YQ
2122016-07-21 Yao Qi <yao.qi@linaro.org>
213
214 * inferiors.c (get_thread_process): Make parameter const.
215 * inferiors.h (get_thread_process): Update declaration.
216 * mem-break.c (clone_all_breakpoints): Remove all parameters.
217 Add new parameters child_thread and parent_thread. Callers
218 updated.
219 * mem-break.h (clone_all_breakpoints): Update declaration.
220
9aa76cd0
YQ
2212016-07-21 Yao Qi <yao.qi@linaro.org>
222
223 * mem-break.c (struct breakpoint) <cond_list>: Remove.
224 <command_list, handler>: Remove.
225 (struct gdb_breakpoint): New.
226 (struct other_breakpoint): New.
227 (struct reinsert_breakpoint): New.
228 (is_gdb_breakpoint): New function.
229 (any_persistent_commands): Update command_list if
230 is_gdb_breakpoint returns true.
231 (set_breakpoint): Create breakpoints according to their types.
232 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
233 (set_gdb_breakpoint_1): Likewise.
234 (set_gdb_breakpoint): Likewise.
235 (clear_breakpoint_conditions): Change parameter type to
236 'struct gdb_breakpoint *'.
237 (clear_breakpoint_commands): Likewise.
238 (clear_breakpoint_conditions_and_commands): Likewise.
239 (add_condition_to_breakpoint): Likewise.
240 (add_breakpoint_condition): Likewise.
241 (add_commands_to_breakpoint): Likewise.
242 (check_breakpoints): Check other_breakpoint.
243 (clone_one_breakpoint): Clone breakpopint according to its type.
244 * mem-break.h (struct gdb_breakpoint): Declare.
245 (set_gdb_breakpoint): Update declaration.
246 (clear_breakpoint_conditions_and_commands): Likewise.
247 (add_breakpoint_condition): Likewise.
248 (add_breakpoint_commands): Likewise.
249 * server.c (process_point_options): Change parameter type to
250 'struct gdb_breakpoint *'.
251
811f8301
YQ
2522016-07-21 Yao Qi <yao.qi@linaro.org>
253
254 * mem-break.c (set_breakpoint_at): Rename it to ...
255 (set_breakpoint_type_at): ... it.
256 (set_breakpoint_at): Call set_breakpoint_type_at.
257 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
258 * mem-break.h (set_breakpoint_at): Update comments.
259
b1c51e36
CLT
2602016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
261
262 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
263 to buf parameter.
264 (nios2_store_gregset): Likewise.
265
ced2dffb
PA
2662016-07-01 Pedro Alves <palves@redhat.com>
267 Antoine Tremblay <antoine.tremblay@ericsson.com>
268
269 * linux-low.c: Change interface to take the target lwp_info
270 pointer directly and return void. Handle detaching from a zombie
271 thread.
272 (linux_detach_lwp_callback): New function.
273 (linux_detach): Detach from the leader thread after detaching from
274 the clone threads.
275
2ac09a5b
YQ
2762016-06-28 Yao Qi <yao.qi@linaro.org>
277
278 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
279 for variable new_offset.
280 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
281 (aarch64_ftrace_insn_reloc_cb): Likewise.
282 (aarch64_ftrace_insn_reloc_tb): Likewise.
283 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
284 PRIx64 instead of PRIx32.
285
79e7fd4f
YQ
2862016-06-28 Yao Qi <yao.qi@linaro.org>
287
288 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
289 (the_low_target): Install arm_get_syscall_trapinfo.
290
061fc021
YQ
2912016-06-28 Yao Qi <yao.qi@linaro.org>
292
293 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
294 function.
295 (the_low_target): Install aarch64_get_syscall_trapinfo.
296
4cc32bec
YQ
2972016-06-28 Yao Qi <yao.qi@linaro.org>
298
299 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
300 Callers updated.
301 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
302 Remove parameter sysno.
303 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
304 sysret.
305
782c1122
AA
3062016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
307
308 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
309 (s390_emit_ne_goto): Likewise.
310 (s390_emit_lt_goto): Likewise.
311 (s390_emit_le_goto): Likewise.
312 (s390_emit_gt_goto): Likewise.
313 (s390_emit_ge_goto): Likewise.
314 (s390x_emit_eq_goto): Likewise.
315 (s390x_emit_ne_goto): Likewise.
316 (s390x_emit_lt_goto): Likewise.
317 (s390x_emit_le_goto): Likewise.
318 (s390x_emit_gt_goto): Likewise.
319 (s390x_emit_ge_goto): Likewise.
320 (s390_emit_ops_impl): Mark variable static.
321 (s390x_emit_ops): Likewise.
322
2e7b624b
YQ
3232016-06-17 Yao Qi <yao.qi@linaro.org>
324
325 * linux-low.c (handle_extended_wait): Call
326 uninsert_reinsert_breakpoints for the parent process. Remove
327 reinsert breakpoints from the child process. Reinsert them to
328 the parent process when vfork is done.
329 * mem-break.c (uninsert_reinsert_breakpoints): New function.
330 (reinsert_reinsert_breakpoints): New function.
331 * mem-break.h (uninsert_reinsert_breakpoints): Declare
332 (reinsert_reinsert_breakpoints): Declare.
333
8a81c5d7
YQ
3342016-06-17 Yao Qi <yao.qi@linaro.org>
335
336 * linux-low.c (handle_extended_wait): If the parent is doing
337 step-over, remove the reinsert breakpoints from the forked child.
338
f50bf8e5
YQ
3392016-06-17 Yao Qi <yao.qi@linaro.org>
340
341 * linux-low.c (unsuspend_all_lwps): Declare.
342 (linux_low_filter_event): If thread exited, call finish_step_over.
343 If step-over is finished, unsuspend other threads.
344
8376a3cb
YQ
3452016-06-17 Yao Qi <yao.qi@linaro.org>
346
347 * linux-low.c (linux_resume_one_lwp_throw): Assert
348 has_reinsert_breakpoints returns false.
349 * mem-break.c (delete_disabled_breakpoints): Assert
350 bp type isn't reinsert_breakpoint.
351
f79b145d
YQ
3522016-06-17 Yao Qi <yao.qi@linaro.org>
353
354 * linux-low.c (maybe_hw_step): New function.
355 (linux_resume_one_lwp_throw): Call maybe_hw_step.
356 (finish_step_over): Switch current_thread to lwp temporarily,
357 and assert has_reinsert_breakpoints returns true.
358 (proceed_one_lwp): Call maybe_hw_step.
359 * mem-break.c (has_reinsert_breakpoints): New function.
360 * mem-break.h (has_reinsert_breakpoints): Declare.
361
0ae534d2
JT
3622016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
363
364 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
365
fcdad592
YQ
3662016-05-17 Yao Qi <yao.qi@linaro.org>
367
368 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
369 instead of find_inferior.
370
9e784964
YQ
3712016-05-05 Yao Qi <yao.qi@linaro.org>
372
373 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
374 Initialize res to zero.
375
cf2ebb6e
YQ
3762016-05-05 Yao Qi <yao.qi@linaro.org>
377
378 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
379 to uint32_t.
380
c1aebf87
UW
3812016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
382
383 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
384 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
385 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
386
35fd2deb 3872016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 388 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
389
390 * tracepoint.c (write_inferior_int8): New function.
391 (cmd_qtenable_disable): Write enable flag using
392 write_inferior_int8.
393
484b3c32
YQ
3942016-04-25 Yao Qi <yao.qi@linaro.org>
395
396 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
397 (need_step_over_p): Return zero if the LWP has pending signals
398 can be delivered on software single step target.
399
85ba7d86
YQ
4002016-04-25 Yao Qi <yao.qi@linaro.org>
401
402 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
403 return instead of error.
404
3539aa13
YQ
4052016-04-22 Yao Qi <yao.qi@linaro.org>
406
407 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
408 to 23.
409
5b061e98
YQ
4102016-04-22 Yao Qi <yao.qi@linaro.org>
411
412 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
413 signal when stepping over breakpoint with software single
414 step.
415
3451269c
PA
4162016-04-21 Pedro Alves <palves@redhat.com>
417
418 * linux-s390-low.c (s390_collect_ptrace_register)
419 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
420 add casts.
421 (s390_check_regset): Use void * instead of gdb_byte *.
422
a2358508
PA
4232016-04-20 Pedro Alves <palves@redhat.com>
424
425 * configure: Renegerate.
426
6885166d
YQ
4272016-04-20 Yao Qi <yao.qi@linaro.org>
428
429 * linux-aarch32-low.c: Include "arch/arm-linux.h".
430 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
431 number 16.
432 (arm_store_gregset): Likewise.
433
2b863f51
WT
4342016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
435
436 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
437 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
438 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
439 (amd64-avx-mpx-linux.c): New rules.
440 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
441 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
442 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
443 (srv_amd64_regobj): Add amd64-avx-mpx.o.
444 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
445 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
446 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
447 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
448 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
449 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
450 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
451 * linux-x86-low.c (x86_linux_read_description): Add case for
452 X86_XSTATE_AVX_MPX_MASK.
453 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
454 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
455 init_registers_i386_avx_mpx_linux.
456 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
457 (initialize_low_tracepoint): Call
458 init_registers_i386_avx_mpx_linux.
459 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
460 (initialize_low_tracepoint): Call
461 init_registers_amd64_avx_mpx_linux.
462 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
463 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
464 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
465 declarations.
466
9b30624b
PA
4672016-04-18 Pedro Alves <palves@redhat.com>
468
469 * configure: Regenerate.
470
45e3745e
AT
4712016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
472
473 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
474 (aarch64_emit_sub): Likewise.
475
2afc13ff
PA
4762016-04-12 Pedro Alves <palves@redhat.com>
477
478 * utils.c (prepare_to_throw_exception): Delete.
479
6e774b13
SM
4802016-04-05 Simon Marchi <simon.marchi@ericsson.com>
481
482 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
483
4dca19f8
MK
4842016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
485
486 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
487
d0a9981f
MK
4882016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
489
490 * linux-aarch64-ipa.c: Add <elf.h> include.
491 * linux-ppc-ipa.c: Add <elf.h> include.
492 * linux-s390-ipa.c: Add <elf.h> include.
493
252db07e
MK
4942016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
495
496 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
497 (get_raw_reg_ptr): Likewise.
498 (get_trace_state_variable_value_ptr): Likewise.
499 (set_trace_state_variable_value_ptr): Likewise.
500 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
501 char *.
502
14e2b6d9
MK
5032016-03-31 Wei-cheng Wang <cole945@gmail.com>
504 Marcin Kościelnicki <koriakin@0x04.net>
505
506 PR/17221
507 * linux-ppc-low.c (emit_insns): New function.
508 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
509 (ppc_emit_prologue): New function.
510 (ppc_emit_epilogue): New function.
511 (ppc_emit_add): New function.
512 (ppc_emit_sub): New function.
513 (ppc_emit_mul): New function.
514 (ppc_emit_lsh): New function.
515 (ppc_emit_rsh_signed): New function.
516 (ppc_emit_rsh_unsigned): New function.
517 (ppc_emit_ext): New function.
518 (ppc_emit_zero_ext): New function.
519 (ppc_emit_log_not): New function.
520 (ppc_emit_bit_and): New function.
521 (ppc_emit_bit_or): New function.
522 (ppc_emit_bit_xor): New function.
523 (ppc_emit_bit_not): New function.
524 (ppc_emit_equal): New function.
525 (ppc_emit_less_signed): New function.
526 (ppc_emit_less_unsigned): New function.
527 (ppc_emit_ref): New function.
528 (ppc_emit_const): New function.
529 (ppc_emit_reg): New function.
530 (ppc_emit_pop): New function.
531 (ppc_emit_stack_flush): New function.
532 (ppc_emit_swap): New function.
533 (ppc_emit_stack_adjust): New function.
534 (ppc_emit_call): New function.
535 (ppc_emit_int_call_1): New function.
536 (ppc_emit_void_call_2): New function.
537 (ppc_emit_if_goto): New function.
538 (ppc_emit_goto): New function.
539 (ppc_emit_eq_goto): New function.
540 (ppc_emit_ne_goto): New function.
541 (ppc_emit_lt_goto): New function.
542 (ppc_emit_le_goto): New function.
543 (ppc_emit_gt_goto): New function.
544 (ppc_emit_ge_goto): New function.
545 (ppc_write_goto_address): New function.
546 (ppc_emit_ops_impl): New static variable.
547 (ppc64v1_emit_prologue): New function.
548 (ppc64v2_emit_prologue): New function.
549 (ppc64_emit_epilogue): New function.
550 (ppc64_emit_add): New function.
551 (ppc64_emit_sub): New function.
552 (ppc64_emit_mul): New function.
553 (ppc64_emit_lsh): New function.
554 (ppc64_emit_rsh_signed): New function.
555 (ppc64_emit_rsh_unsigned): New function.
556 (ppc64_emit_ext): New function.
557 (ppc64_emit_zero_ext): New function.
558 (ppc64_emit_log_not): New function.
559 (ppc64_emit_bit_and): New function.
560 (ppc64_emit_bit_or): New function.
561 (ppc64_emit_bit_xor): New function.
562 (ppc64_emit_bit_not): New function.
563 (ppc64_emit_equal): New function.
564 (ppc64_emit_less_signed): New function.
565 (ppc64_emit_less_unsigned): New function.
566 (ppc64_emit_ref): New function.
567 (ppc64_emit_const): New function.
568 (ppc64v1_emit_reg): New function.
569 (ppc64v2_emit_reg): New function.
570 (ppc64_emit_pop): New function.
571 (ppc64_emit_stack_flush): New function.
572 (ppc64_emit_swap): New function.
573 (ppc64v1_emit_call): New function.
574 (ppc64v2_emit_call): New function.
575 (ppc64v1_emit_int_call_1): New function.
576 (ppc64v2_emit_int_call_1): New function.
577 (ppc64v1_emit_void_call_2): New function.
578 (ppc64v2_emit_void_call_2): New function.
579 (ppc64_emit_if_goto): New function.
580 (ppc64_emit_eq_goto): New function.
581 (ppc64_emit_ne_goto): New function.
582 (ppc64_emit_lt_goto): New function.
583 (ppc64_emit_le_goto): New function.
584 (ppc64_emit_gt_goto): New function.
585 (ppc64_emit_ge_goto): New function.
586 (ppc64v1_emit_ops_impl): New static variable.
587 (ppc64v2_emit_ops_impl): New static variable.
588 (ppc_emit_ops): New function.
589 (linux_low_target): Wire in ppc_emit_ops.
590
a2174ba4
MK
5912016-03-31 Wei-cheng Wang <cole945@gmail.com>
592 Marcin Kościelnicki <koriakin@0x04.net>
593
594 PR/17221
595 * Makefile.in: Add powerpc-*-ipa.o
596 * configure.srv: Add ipa_obj for powerpc*-linux.
597 * linux-ppc-ipa.c: New file.
598 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
599 includes.
600 (PPC_FIELD): New macro.
601 (PPC_SEXT): New macro.
602 (PPC_OP6): New macro.
603 (PPC_BO): New macro.
604 (PPC_LI): New macro.
605 (PPC_BD): New macro.
606 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
607 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
608 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
609 (ppc_get_thread_area): New function.
610 (is_elfv2_inferior): New function.
611 (gen_ds_form): New function.
612 (GEN_STD): New macro.
613 (GEN_STDU): New macro.
614 (GEN_LD): New macro.
615 (GEN_LDU): New macro.
616 (gen_d_form): New function.
617 (GEN_ADDI): New macro.
618 (GEN_ADDIS): New macro.
619 (GEN_LI): New macro.
620 (GEN_LIS): New macro.
621 (GEN_ORI): New macro.
622 (GEN_ORIS): New macro.
623 (GEN_LWZ): New macro.
624 (GEN_STW): New macro.
625 (GEN_STWU): New macro.
626 (gen_xfx_form): New function.
627 (GEN_MFSPR): New macro.
628 (GEN_MTSPR): New macro.
629 (GEN_MFCR): New macro.
630 (GEN_MTCR): New macro.
631 (GEN_SYNC): New macro.
632 (GEN_LWSYNC): New macro.
633 (gen_x_form): New function.
634 (GEN_OR): New macro.
635 (GEN_MR): New macro.
636 (GEN_LWARX): New macro.
637 (GEN_STWCX): New macro.
638 (GEN_CMPW): New macro.
639 (gen_md_form): New function.
640 (GEN_RLDICL): New macro.
641 (GEN_RLDICR): New macro.
642 (gen_i_form): New function.
643 (GEN_B): New macro.
644 (GEN_BL): New macro.
645 (gen_b_form): New function.
646 (GEN_BNE): New macro.
647 (GEN_LOAD): New macro.
648 (GEN_STORE): New macro.
649 (gen_limm): New function.
650 (gen_atomic_xchg): New function.
651 (gen_call): New function.
652 (ppc_relocate_instruction): New function.
653 (ppc_install_fast_tracepoint_jump_pad): New function.
654 (ppc_get_min_fast_tracepoint_insn_len): New function.
655 (ppc_get_ipa_tdesc_idx): New function.
656 (the_low_target): Wire in the new functions.
657 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
658 tdescs.
659 * linux-ppc-tdesc.h: New file.
660
a13c4696
MK
6612016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
662
663 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
664 (alloc_jump_pad_buffer): New function.
665 * linux-amd64-ipa.c: Add <sys/mman.h> include.
666 (alloc_jump_pad_buffer): New function.
667 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
668 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
669 (alloc_jump_pad_buffer): New function.
670 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
671 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
672 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
673 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
674
1cda1512
MK
6752016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
676
677 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
678 * linux-amd64-ipa.c: Likewise.
679 * linux-i386-ipa.c: Likewise.
680 * linux-s390-ipa.c: Likewise.
681 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
682 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
683 set_trace_state_variable_value_ptr.
684 (struct ipa_sym_addresses): Likewise.
685 (symbol_list): Likewise.
686 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
687 accessing gdb_collect directly.
688 (gdb_collect_ptr_type): New typedef.
689 (get_raw_reg_ptr_type): New typedef.
690 (get_trace_state_variable_value_ptr_type): New typedef.
691 (set_trace_state_variable_value_ptr_type): New typedef.
692 (gdb_collect_ptr): New global.
693 (get_raw_reg_ptr): New global.
694 (get_trace_state_variable_value_ptr): New global.
695 (set_trace_state_variable_value_ptr): New global.
696 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
697 accessing get_raw_reg directly.
698 (get_get_tsv_func_addr): Likewise for
699 get_trace_state_variable_value_ptr.
700 (get_set_tsv_func_addr): Likewise for
701 set_trace_state_variable_value_ptr.
702 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
703
72fb5488
SM
7042016-03-30 Simon Marchi <simon.marchi@ericsson.com>
705
706 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
707
28170b88
MK
7082016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
709
710 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
711 packets.
712 (relocate_instruction): Remove own_buf.
713 * server.c (own_buf): Make global.
714 (handle_v_requests): Make global.
715 * server.h (own_buf): New declaration.
716 (handle_v_requests): New prototype.
717
f39e8743
MK
7182016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
719
720 PR 18377
721 * linux-s390-low.c (add_insns): New function.
722 (s390_emit_prologue): New function.
723 (s390_emit_epilogue): New function.
724 (s390_emit_add): New function.
725 (s390_emit_sub): New function.
726 (s390_emit_mul): New function.
727 (s390_emit_lsh): New function.
728 (s390_emit_rsh_signed): New function.
729 (s390_emit_rsh_unsigned): New function.
730 (s390_emit_ext): New function.
731 (s390_emit_log_not): New function.
732 (s390_emit_bit_and): New function.
733 (s390_emit_bit_or): New function.
734 (s390_emit_bit_xor): New function.
735 (s390_emit_bit_not): New function.
736 (s390_emit_equal): New function.
737 (s390_emit_less_signed): New function.
738 (s390_emit_less_unsigned): New function.
739 (s390_emit_ref): New function.
740 (s390_emit_if_goto): New function.
741 (s390_emit_goto): New function.
742 (s390_write_goto_address): New function.
743 (s390_emit_litpool): New function.
744 (s390_emit_const): New function.
745 (s390_emit_call): New function.
746 (s390_emit_reg): New function.
747 (s390_emit_pop): New function.
748 (s390_emit_stack_flush): New function.
749 (s390_emit_zero_ext): New function.
750 (s390_emit_swap): New function.
751 (s390_emit_stack_adjust): New function.
752 (s390_emit_set_r2): New function.
753 (s390_emit_int_call_1): New function.
754 (s390_emit_void_call_2): New function.
755 (s390_emit_eq_goto): New function.
756 (s390_emit_ne_goto): New function.
757 (s390_emit_lt_goto): New function.
758 (s390_emit_le_goto): New function.
759 (s390_emit_gt_goto): New function.
760 (s390_emit_ge_goto): New function.
761 (s390x_emit_prologue): New function.
762 (s390x_emit_epilogue): New function.
763 (s390x_emit_add): New function.
764 (s390x_emit_sub): New function.
765 (s390x_emit_mul): New function.
766 (s390x_emit_lsh): New function.
767 (s390x_emit_rsh_signed): New function.
768 (s390x_emit_rsh_unsigned): New function.
769 (s390x_emit_ext): New function.
770 (s390x_emit_log_not): New function.
771 (s390x_emit_bit_and): New function.
772 (s390x_emit_bit_or): New function.
773 (s390x_emit_bit_xor): New function.
774 (s390x_emit_bit_not): New function.
775 (s390x_emit_equal): New function.
776 (s390x_emit_less_signed): New function.
777 (s390x_emit_less_unsigned): New function.
778 (s390x_emit_ref): New function.
779 (s390x_emit_if_goto): New function.
780 (s390x_emit_const): New function.
781 (s390x_emit_call): New function.
782 (s390x_emit_reg): New function.
783 (s390x_emit_pop): New function.
784 (s390x_emit_stack_flush): New function.
785 (s390x_emit_zero_ext): New function.
786 (s390x_emit_swap): New function.
787 (s390x_emit_stack_adjust): New function.
788 (s390x_emit_int_call_1): New function.
789 (s390x_emit_void_call_2): New function.
790 (s390x_emit_eq_goto): New function.
791 (s390x_emit_ne_goto): New function.
792 (s390x_emit_lt_goto): New function.
793 (s390x_emit_le_goto): New function.
794 (s390x_emit_gt_goto): New function.
795 (s390x_emit_ge_goto): New function.
796 (s390_emit_ops): New function.
797 (struct linux_target_ops): Fill in emit_ops hook.
798
abd9baf9
MK
7992016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
800
801 PR 18377
802 * Makefile.in: Add s390 IPA files.
803 * configure.srv: Build IPA for s390.
804 * linux-s390-ipa.c: New file.
805 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
806 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
807 (tdesc_s390_linux32): Likewise.
808 (init_registers_s390_linux32v1): Likewise.
809 (tdesc_s390_linux32v1): Likewise.
810 (init_registers_s390_linux32v2): Likewise.
811 (tdesc_s390_linux32v2): Likewise.
812 (init_registers_s390_linux64): Likewise.
813 (tdesc_s390_linux64): Likewise.
814 (init_registers_s390_linux64v1): Likewise.
815 (tdesc_s390_linux64v1): Likewise.
816 (init_registers_s390_linux64v2): Likewise.
817 (tdesc_s390_linux64v2): Likewise.
818 (init_registers_s390_te_linux64): Likewise.
819 (tdesc_s390_te_linux64): Likewise.
820 (init_registers_s390_vx_linux64): Likewise.
821 (tdesc_s390_vx_linux64): Likewise.
822 (init_registers_s390_tevx_linux64): Likewise.
823 (tdesc_s390_tevx_linux64): Likewise.
824 (init_registers_s390x_linux64): Likewise.
825 (tdesc_s390x_linux64): Likewise.
826 (init_registers_s390x_linux64v1): Likewise.
827 (tdesc_s390x_linux64v1): Likewise.
828 (init_registers_s390x_linux64v2): Likewise.
829 (tdesc_s390x_linux64v2): Likewise.
830 (init_registers_s390x_te_linux64): Likewise.
831 (tdesc_s390x_te_linux64): Likewise.
832 (init_registers_s390x_vx_linux64): Likewise.
833 (tdesc_s390x_vx_linux64): Likewise.
834 (init_registers_s390x_tevx_linux64): Likewise.
835 (tdesc_s390x_tevx_linux64): Likewise.
836 (have_hwcap_s390_vx): New static variable.
837 (s390_arch_setup): Fill have_hwcap_s390_vx.
838 (s390_get_thread_area): New function.
839 (s390_ft_entry_gpr_esa): New const.
840 (s390_ft_entry_gpr_zarch): New const.
841 (s390_ft_entry_misc): New const.
842 (s390_ft_entry_fr): New const.
843 (s390_ft_entry_vr): New const.
844 (s390_ft_main_31): New const.
845 (s390_ft_main_64): New const.
846 (s390_ft_exit_fr): New const.
847 (s390_ft_exit_vr): New const.
848 (s390_ft_exit_misc): New const.
849 (s390_ft_exit_gpr_esa): New const.
850 (s390_ft_exit_gpr_zarch): New const.
851 (append_insns): New function.
852 (s390_relocate_instruction): New function.
853 (s390_install_fast_tracepoint_jump_pad): New function.
854 (s390_get_min_fast_tracepoint_insn_len): New function.
855 (s390_get_ipa_tdesc_idx): New function.
856 (struct linux_target_ops): Wire in the above functions.
857 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
858 * linux-s390-tdesc.h: New file.
859
a4105d04
MK
8602016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
861
862 * linux-s390-low.c (s390_supports_tracepoints): New function.
863 (struct linux_target_ops): Fill supports_tracepoints hook.
864
35ac8b3e
YQ
8652016-03-18 Yao Qi <yao.qi@linaro.org>
866
867 * linux-low.c (lwp_signal_can_be_delivered): New function.
868 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
869
94610ec4
YQ
8702016-03-18 Yao Qi <yao.qi@linaro.org>
871
872 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
873 0 if signal is enqueued. Remove 'signal' from one debugging
874 message. Move one debugging message to some lines below.
875 Remove code setting 'signal' to 0.
876
80aea927
YQ
8772016-03-18 Yao Qi <yao.qi@linaro.org>
878
879 * linux-low.c (linux_low_filter_event): Remove redundant
880 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
881
b04fd3be
MK
8822016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
883
884 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
885 (struct linux_target_ops): Wire in the above.
886
c40c8d4b
YQ
8872016-03-03 Yao Qi <yao.qi@linaro.org>
888
889 * linux-low.c: Update comments to start_step_over.
890
0f8288ae
YQ
8912016-03-03 Yao Qi <yao.qi@linaro.org>
892
893 PR server/19736
894 * linux-low.c (handle_extended_wait): Set child suspended
895 if event_lwp->bp_reinsert isn't zero.
896
fdbd04a8
YQ
8972016-03-02 Yao Qi <yao.qi@linaro.org>
898
899 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
900 enqueue_pending_signal.
901
6896a8fa
MK
9022016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
903
904 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
905 is actually loaded.
906
ab503087
MK
9072016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
908
909 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
910 (s390_regmap_3264) [!__s390x__]: New global.
911 (s390_collect_ptrace_register): Skip map entries containing -1.
912 (s390_supply_ptrace_register): Ditto.
913 (s390_fill_gprs_high): New function.
914 (s390_store_gprs_high): New function.
915 (s390_regsets): Add NT_S390_HIGH_GPRS.
916 (s390_get_hwcap): Enable on 31-bit.
917 (have_hwcap_s390_high_gprs): Enable on 31-bit.
918 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
919 Detect NT_S390_HIGH_GPRS.
920 (s390_usrregs_info_3264): Enable on 31-bit.
921 (s390_regs_info): Enable regs_info_3264 on 31-bit.
922 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
923
ae91f625
MK
9242016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
925
926 PR gdb/13808
927 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
928 * configure.srv: Ditto.
929 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
930 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
931 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
932 (init_registers_amd64_linux): Remove prototype.
933 (tdesc_amd64_linux): Remove declaration.
934 (get_ipa_tdesc): New function.
935 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
936 initialize remaining tdescs.
937 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
938 (init_registers_i386_linux): Remove prototype.
939 (tdesc_i386_linux): Remove declaration.
940 (get_ipa_tdesc): New function.
941 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
942 initialize remaining tdescs.
943 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
944 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
945 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
946 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
947 (x86_get_ipa_tdesc_idx): New function.
948 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
949 * linux-x86-tdesc.h: New file.
950 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
951 (target_get_ipa_tdesc_idx): New macro.
952 * tracepoint.c (ipa_tdesc_idx): New macro.
953 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
954 (symbol_list): Add ipa_tdesc_idx.
955 (cmd_qtstart): Write ipa_tdesc_idx in the target.
956 (ipa_tdesc): Remove.
957 (ipa_tdesc_idx): New variable.
958 (get_context_regcache): Use get_ipa_tdesc.
959 (gdb_collect): Ditto.
960 (gdb_probe): Ditto.
961 * tracepoint.h (get_ipa_tdesc): New prototype.
962 (ipa_tdesc): Remove.
963
e7ad2f14
PA
9642016-02-24 Pedro Alves <palves@redhat.com>
965
966 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
967 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
968 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
969 Factor out common code between the USE_SIGTRAP_SIGINFO and
970 !USE_SIGTRAP_SIGINFO blocks.
971 (linux_low_filter_event): Call save_stop_reason instead of
972 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
973 Update comments.
974 (linux_wait_1): Update comments.
975
657f9cde
WW
9762016-02-24 Wei-cheng Wang <cole945@gmail.com>
977
978 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
979 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
980 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
981 ppc_insert_point, ppc_remove_point.
982
b00b61e1
MK
9832016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
984
985 * linux-s390-low.c (s390_supports_z_point_type): New function.
986 (struct linux_target_ops): Wire s390_supports_z_point_type in.
987
553cb527
YQ
9882016-02-16 Yao Qi <yao.qi@linaro.org>
989
990 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
991 PC. Get pc from regcache_read_pc.
992
a5652c21
YQ
9932016-02-12 Yao Qi <yao.qi@linaro.org>
994
995 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
996 or linux_get_pc_32bit.
997 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
998
ed443b61
YQ
9992016-02-12 Yao Qi <yao.qi@linaro.org>
1000
1001 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
1002 arm_linux_get_next_pcs_fixup.
1003
020ecd38
MK
10042016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
1005
1006 * tracepoint.c (x_tracepoint_action_download): Change
1007 write_inferior_data_ptr to write_inferior_data_pointer.
1008 (cmd_qtstart): Likewise.
1009 (write_inferior_data_ptr): Remove.
1010 (download_agent_expr): Change write_inferior_data_ptr to
1011 write_inferior_data_pointer.
1012 (download_tracepoint_1): Likewise.
1013 (download_tracepoint): Likewise.
1014 (download_trace_state_variables): Likewise.
1015
7cae9051
WW
10162016-02-11 Wei-cheng Wang <cole945@gmail.com>
1017 Marcin Kościelnicki <koriakin@0x04.net>
1018
1019 * tracepoint.c (struct tracepoint_action_ops): Remove.
1020 (struct tracepoint_action): Remove ops.
1021 (m_tracepoint_action_download, r_tracepoint_action_download)
1022 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
1023 size and offset accordingly.
1024 (m_tracepoint_action_ops, r_tracepoint_action_ops)
1025 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
1026 (tracepoint_action_send, tracepoint_action_download): New functions.
1027 Helpers for trace action handlers.
1028 (add_tracepoint_action): Remove setup actions ops.
1029 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
1030
9f6a71b4
YQ
10312016-02-10 Yao Qi <yao.qi@linaro.org>
1032
1033 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
1034
1e94266c
SM
10352016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1036
1037 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
1038 to AC_OUTPUT.
1039 * configure: Regenerate.
1040
8adce034
SM
10412016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1042
1043 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
1044 void * to gdb_byte *.
1045 * linux-low.c (siginfo_fixup): Likewise.
1046 (linux_xfer_siginfo): Likewise.
1047 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
1048 Likewise.
1049 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1050
93813b37
WT
10512016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
1052
1053 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
1054 to srv_tgtobj.
1055 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
1056 to srv_tgtobj.
1057 * linux-x86-low.c [__x86_64__]: Include
1058 "nat/amd64-linux-siginfo.h".
1059 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
1060 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
1061 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
1062 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
1063 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
1064 (cpt_si_fd, si_timerid, si_overrun): Move from
1065 nat/amd64-linux-siginfo.c.
1066 * Makefile.in (amd64-linux-siginfo.o:): New rule.
1067
8424cc97
SM
10682016-01-28 Simon Marchi <simon.marchi@ericsson.com>
1069
1070 * server.c (skip_to_semicolon): Remove.
1071 (process_point_options): Use strchrnul instead of
1072 skip_to_semicolon.
1073
4d18591b
YQ
10742016-01-26 Yao Qi <yao.qi@linaro.org>
1075
1076 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
1077 * linux-low.c (install_software_single_step_breakpoints): Don't
1078 call regcache_read_pc.
1079 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
1080 argument pc.
1081
d8020970
YQ
10822016-01-26 Yao Qi <yao.qi@linaro.org>
1083
1084 * linux-low.c (install_software_single_step_breakpoints): Call
1085 regcache_read_pc instead of get_pc.
1086
8b207339
YQ
10872016-01-26 Yao Qi <yao.qi@linaro.org>
1088
1089 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
1090 (unblock_async_io): Rename to ...
1091 (block_unblock_async_io): ... it. New function.
1092 (enable_async_io): Don't install SIGIO handler. Unblock it
1093 instead.
1094 (disable_async_io): Don't ignore SIGIO. Block it instead.
1095 (initialize_async_io): Install SIGIO handler. Don't call
1096 unblock_async_io.
1097
18879fef
YQ
10982016-01-26 Yao Qi <yao.qi@linaro.org>
1099
1100 * remote-utils.c (getpkt): If the buffer isn't empty, and the
1101 first character is '\003', call *the_target->request_interrupt.
1102
a0f8e08a
YQ
11032016-01-25 Yao Qi <yao.qi@linaro.org>
1104
1105 * remote-utils.c (new_thread_notify): Remove.
1106 (dead_thread_notify): Likewise.
1107 * remote-utils.h (new_thread_notify): Remove declaration.
1108 (dead_thread_notify): Likewise.
1109
cc5fd9ab
MK
11102016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
1111
1112 * gdb.trace/pending.exp: Fix expected message on continue.
1113
99e8eb11
MK
11142016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
1115
1116 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
1117 it works properly on big-endian machines where sizeof (CORE_ADDR)
1118 != sizeof (void *).
1119
a994041d
PA
11202016-01-21 Pedro Alves <palves@redhat.com>
1121
1122 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
1123 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
1124 * configure: Regenerate.
1125
f7a6a40d
YQ
11262016-01-21 Yao Qi <yao.qi@linaro.org>
1127
1128 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
1129 is_thumb and set it according to CPSR saved on the stack.
1130 (get_next_pcs_syscall_next_pc): Pass is_thumb to
1131 arm_sigreturn_next_pc.
1132
6f69e520
YQ
11332016-01-18 Yao Qi <yao.qi@linaro.org>
1134
1135 * linux-low.c (linux_set_pc_64bit): New function.
1136 (linux_get_pc_64bit): New function.
1137 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
1138 Declare.
1139 * linux-sparc-low.c (debug_threads): Remove declaration.
1140 (sparc_get_pc): Remove.
1141 (the_low_target): Use linux_get_pc_64bit instead of
1142 sparc_get_pc.
1143 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
1144 (the_low_target): Use linux_get_pc_64bit and
1145 linux_set_pc_64bit.
1146
276d4552
YQ
11472016-01-18 Yao Qi <yao.qi@linaro.org>
1148
1149 * linux-arm-low.c (debug_threads): Remove declaration.
1150 (arm_get_pc, arm_set_pc): Remove.
1151 (the_low_target): Use linux_get_pc_32bit and
1152 linux_set_pc_32bit.
1153 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
1154 (the_low_target): Use linux_get_pc_32bit and
1155 linux_set_pc_32bit.
1156 * linux-cris-low.c (debug_threads): Remove declaration.
1157 (cris_get_pc, cris_set_pc,): Remove.
1158 (the_low_target): Use linux_get_pc_32bit and
1159 linux_set_pc_32bit.
1160 * linux-crisv32-low.c (debug_threads): Remove declaration.
1161 (cris_get_pc, cris_set_pc): Remove.
1162 (the_low_target): Use linux_get_pc_32bit and
1163 linux_set_pc_32bit.
1164 * linux-low.c: Include inttypes.h.
1165 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
1166 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
1167 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
1168 (the_low_target): Use linux_get_pc_32bit and
1169 linux_set_pc_32bit.
1170 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
1171 (the_low_target): Use linux_get_pc_32bit and
1172 linux_set_pc_32bit.
1173 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
1174 (the_low_target): Use linux_get_pc_32bit and
1175 linux_set_pc_32bit.
1176 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
1177 (the_low_target): Use linux_get_pc_32bit and
1178 linux_set_pc_32bit.
1179 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
1180 (the_low_target): Use linux_get_pc_32bit and
1181 linux_set_pc_32bit.
1182
eb0edac8
GB
11832016-01-18 Gary Benson <gbenson@redhat.com>
1184
1185 * configure.ac (AC_FUNC_FORK): New check.
1186 * config.in: Regenerate.
1187 * configure: Likewise.
1188
1b451dda
YQ
11892016-01-14 Yao Qi <yao.qi@linaro.org>
1190
1191 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
1192 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
1193 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
1194 arm_get_next_pcs_ctor.
1195
82075af2
JS
11962016-01-12 Josh Stone <jistone@redhat.com>
1197 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1198
1199 * inferiors.h: Include "gdb_vecs.h".
1200 (struct process_info): Add syscalls_to_catch.
1201 * inferiors.c (remove_process): Free syscalls_to_catch.
1202 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
1203 syscall_return stops.
1204 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
1205 * server.c (handle_general_set): Handle QCatchSyscalls.
1206 (handle_query): Report support for QCatchSyscalls.
1207 * target.h (struct target_ops): Add supports_catch_syscall.
1208 (target_supports_catch_syscall): New macro.
1209 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
1210 (struct lwp_info): Add syscall_state.
1211 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
1212 Maintain syscall_state and syscalls_to_catch across exec.
1213 (get_syscall_trapinfo): New function, proxy to the_low_target.
1214 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
1215 (linux_low_filter_event): Toggle syscall_state entry/return for
1216 syscall traps, and set it ignored for all others.
1217 (gdb_catching_syscalls_p): New function.
1218 (gdb_catch_this_syscall_p): New function.
1219 (linux_wait_1): Handle SYSCALL_SIGTRAP.
1220 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
1221 (linux_supports_catch_syscall): New function.
1222 (linux_target_ops): Install it.
1223 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
1224 (the_low_target): Install it.
1225
8f13a3ce
MF
12262016-01-12 Mike Frysinger <vapier@gentoo.org>
1227
1228 * acinclude.m4: Include new ../warning.m4 file.
1229 * configure: Regenerated.
1230 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
1231
5b3da067
MF
12322016-01-12 Mike Frysinger <vapier@gentoo.org>
1233
1234 * ax.c (is_goto_target): Mark static.
1235 * linux-low.c (register_addr): Likewise.
1236 (linux_fetch_registers, linux_store_registers): Likewise.
1237 * mem-break.c (any_persistent_commands): Fix old prototype.
1238 (add_commands_to_breakpoint): Mark static.
1239 * regcache.c (find_register_by_name): Delete unused func.
1240 * remote-utils.c (hex_or_minus_one): Mark static.
1241 * server.c (monitor_show_help): Mark static.
1242 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
1243 handle_v_requests): Likewise.
1244
bc504a31
PA
12452016-01-12 Pedro Alves <palves@redhat.com>
1246
1247 Remove use of the registered trademark symbol throughout.
1248
5a0dd67a
YQ
12492016-01-08 Yao Qi <yao.qi@linaro.org>
1250
1251 * remote-utils.c (getpkt): If c is '\003', call target hook
1252 request_interrupt.
1253
b2ca446f
YQ
12542016-01-06 Yao Qi <yao.qi@linaro.org>
1255
1256 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
1257 linux-aarch32-low.c.
1258 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1259 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1260 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1261 (thumb2_breakpoint): Declare.
1262 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
1263 linux-aarch32-low.h.
1264 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1265 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1266 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1267
edd88788
JB
12682016-01-01 Joel Brobecker <brobecker@adacore.com>
1269
1270 * gdbreplay.c (gdbreplay_version): Change copyright year in
1271 version message.
1272 * server.c (gdbserver_version): Likewise.
1273
65da7f14
PP
12742015-12-28 Patrick Palka <patrick@parcs.ath.cx>
1275
1276 * server.c (crc32_table): Delete.
1277 (crc32): Use libiberty's xcrc32 function.
1278
4abd5ed2
JB
12792015-12-22 Joel Brobecker <brobecker@adacore.com>
1280
1281 * lynx-low.c (lynx_delete_thread_callback): New function.
1282 (lynx_mourn): Properly delete our process and all of its
1283 threads. Remove call to clear_inferiors.
1284
0e50fe5c
JB
12852015-12-22 Joel Brobecker <brobecker@adacore.com>
1286
1287 * target.c (thread_search_callback): Add check that
1288 the thread_stopped target callback is not NULL before
1289 calling it.
1290
35adc03f
YQ
12912015-12-21 Yao Qi <yao.qi@linaro.org>
1292
1293 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
1294 arm breakpoint.
1295
bd2b2909
AT
12962015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1297
1298 * server.c (handle_query): Call target_supports_software_single_step.
1299
7fe5e27e
AT
13002015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1301
1302 * linux-low.c (single_step): New function.
1303 (linux_resume_one_lwp_throw): Call single_step.
1304 (start_step_over): Likewise.
1305
d9311bfa
AT
13062015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1307
1308 * Makefile.in (SFILES): Append arch/arm-linux.c,
1309 arch/arm-get-next-pcs.c.
1310 (arm-linux.o): New rule.
1311 (arm-get-next-pcs.o): New rule.
1312 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
1313 arm-linux.o.
1314 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
1315 to linux-aarch32-low.c.
1316 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1317 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1318 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1319 (thumb2_breakpoint_len): Likewise.
1320 (arm_is_thumb_mode): Make non-static.
1321 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
1322 from linux-aarch32-low.c.
1323 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1324 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1325 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1326 (thumb2_breakpoint_len): Likewise.
1327 (arm_is_thumb_mode): New declaration.
1328 * linux-arm-low.c: Include arch/arm-linux.h
1329 aarch/arm-get-next-pcs.h, sys/syscall.h.
1330 (get_next_pcs_ops): New struct.
1331 (get_next_pcs_addr_bits_remove): New function.
1332 (get_next_pcs_is_thumb): New function.
1333 (get_next_pcs_read_memory_unsigned_integer): Likewise.
1334 (arm_sigreturn_next_pc): Likewise.
1335 (get_next_pcs_syscall_next_pc): Likewise.
1336 (arm_gdbserver_get_next_pcs): Likewise.
1337 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
1338 Initialize.
1339 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
1340 * server.h: Include gdb_vecs.h.
1341
68ce2059
AT
13422015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1343
1344 * Makefile.in (SFILES): Append common/common-regcache.c.
1345 (OBS): Append common-regcache.o.
1346 (common-regcache.o): New rule.
1347 * regcache.c (init_register_cache): Initialize cache to
1348 REG_UNAVAILABLE.
1349 (regcache_raw_read_unsigned): New function.
1350 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
1351 register_status enum.
1352
fa5308bd
AT
13532015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1354
1355 * linux-aarch64-low.c (the_low_targets): Rename
1356 breakpoint_reinsert_addr to get_next_pcs.
1357 * linux-arm-low.c (the_low_targets): Likewise.
1358 * linux-bfin-low.c (the_low_targets): Likewise.
1359 * linux-cris-low.c (the_low_targets): Likewise.
1360 * linux-crisv32-low.c (the_low_targets): Likewise.
1361 * linux-low.c (can_software_single_step): Likewise.
1362 (install_software_single_step_breakpoints): New function.
1363 (start_step_over): Use install_software_single_step_breakpoints.
1364 * linux-low.h: New CORE_ADDR vector.
1365 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
1366 get_next_pcs.
1367 * linux-mips-low.c (the_low_targets): Likewise.
1368 * linux-nios2-low.c (the_low_targets): Likewise.
1369 * linux-sparc-low.c (the_low_targets): Likewise.
1370
4a6ed09b
PA
13712015-12-17 Pedro Alves <palves@redhat.com>
1372
1373 * linux-low.c (linux_kill_one_lwp): Remove references to
1374 LinuxThreads.
1375 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
1376 to 'kill'.
1377 (linux_init_signals): Delete.
1378 (initialize_low): Adjust.
1379 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
1380
7544db95
PA
13812015-12-16 Pedro Alves <palves@redhat.com>
1382
1383 * configure.ac (compiler warning flags): When testing a
1384 -Wno-foo option, check whether -Wfoo works instead.
1385 * configure: Regenerate.
1386
8020350c
DB
13872015-12-11 Don Breazeal <donb@codesourcery.com>
1388
1389 * server.c (process_serial_event): Don't exit from gdbserver
1390 in remote mode if there are still active inferiors.
1391
db91f502
YQ
13922015-12-11 Yao Qi <yao.qi@linaro.org>
1393
1394 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
1395 arm_breakpoint_at if the process is 32-bit.
1396
b37a6290
YQ
13972015-12-11 Yao Qi <yao.qi@linaro.org>
1398
1399 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
1400 arm breakpoint.
1401
17b1509a
YQ
14022015-12-07 Yao Qi <yao.qi@linaro.org>
1403
1404 * configure.srv: Append arm.o to srv_tgtobj for
1405 aarch64*-*-linux* target.
1406 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
1407 from linux-arm-low.c.
1408 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1409 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1410 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1411 (thumb2_breakpoint_len): Likewise.
1412 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
1413 (arm_breakpoint_kinds): Likewise.
1414 (arm_breakpoint_kind_from_pc): Likewise.
1415 (arm_sw_breakpoint_from_kind): Likewise.
1416 (arm_breakpoint_kind_from_current_state): Likewise.
1417 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
1418 (arm_sw_breakpoint_from_kind): Declare.
1419 (arm_breakpoint_kind_from_current_state): Declare.
1420 (arm_breakpoint_at): Declare.
1421 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
1422 arm_sw_breakpoint_from_kind if process is 32-bit.
1423 (aarch64_breakpoint_kind_from_pc): New function.
1424 (aarch64_breakpoint_kind_from_current_state): New function.
1425 (the_low_target): Initialize fields breakpoint_kind_from_pc
1426 and breakpoint_kind_from_current_state.
1427 * linux-arm-low.c (arm_breakpoint_kinds): Move to
1428 linux-aarch32-low.c.
1429 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
1430 (arm_breakpoint, arm_breakpoint_len): Likewise.
1431 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
1432 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1433 (arm_is_thumb_mode): Likewise.
1434 (arm_breakpoint_at): Likewise.
1435 (arm_breakpoint_kind_from_pc): Likewise.
1436 (arm_sw_breakpoint_from_kind): Likewise.
1437 (arm_breakpoint_kind_from_current_state): Likewise.
1438
1439 Revert:
1440 2015-08-04 Yao Qi <yao.qi@linaro.org>
1441
1442 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1443 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1444 * server.c (extended_protocol): Remove "static".
1445 * server.h (extended_protocol): Declare it.
1446
ece66d65
JS
14472015-12-04 Josh Stone <jistone@redhat.com>
1448
1449 * target.h (struct target_ops) <arch_setup>: Rename to ...
1450 (struct target_ops) <post_create_inferior>: ... this.
1451 (target_arch_setup): Rename to ...
1452 (target_post_create_inferior): ... this, calling post_create_inferior.
1453 * server.c (start_inferior): Update target_arch_setup calls to
1454 target_post_create_inferior.
1455 * linux-low.c (linux_low_ptrace_options): Forward declare.
1456 (linux_arch_setup): Update its comment for general use.
1457 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
1458 (struct linux_target_ops): Use linux_post_create_inferior.
1459 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
1460 to post_create_inferior.
1461 * nto-low.c (struct nto_target_ops): Likewise.
1462 * spu-low.c (struct spu_target_ops): Likewise.
1463 * win32-low.c (struct win32_target_ops): Likewise.
1464
e58c48b4
AT
14652015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
1466
1467 * linux-arm-low.c: Remove duplicate arch/arm.h include.
1468
fbec8956
AT
14692015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1470
1471 * linux-arm-low.c (arm_reinsert_addr): Remove function.
1472 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
1473 * linux-cris-low.c (cris_reinsert_addr> Remove function.
1474 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1475 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
1476 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1477 * linux-mips-low.c (mips_reinsert_addr): Remove function.
1478 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1479 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
1480 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1481 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
1482 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1483
9b4c5f87
AT
14842015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1485
1486 * linux-low.c (linux_look_up_symbols): Don't call
1487 linux_supports_traceclone.
1488 * linux-low.h (thread_db_init): Remove use_events argument.
1489 * thread-db.c (thread_db_use_event): Remove global variable.
1490 (struct thread_db) <td_thr_event_enable_p>: Remove field.
1491 (struct thread_db) <td_create_bp>: Remove field.
1492 (thread_db_create_event): Remove function.
1493 (thread_db_enable_reporting): Likewise.
1494 (find_one_thread): Don't check for thread_db_use_events.
1495 (attach_thread): Likewise.
1496 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
1497 (try_thread_db_load_1): Don't check for thread_db_use_events.
1498 (thread_db_init): Remove use_events argument and thread events
1499 handling.
1500 (remove_thread_event_breakpoints): Remove function.
1501 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
1502
7d00775e
AT
15032015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1504
1505 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
1506 New function.
1507 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1508 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
1509 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1510 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
1511 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
1512 Initialize.
1513 * linux-crisv32-low.c (cris_supports_hardware_single_step):
1514 New function.
1515 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1516 * linux-low.c (can_hardware_single_step): Use
1517 supports_hardware_single_step.
1518 (can_software_single_step): New function.
1519 (start_step_over): Call can_software_single_step.
1520 (linux_supports_hardware_single_step): New function.
1521 (struct target_ops) <supports_software_single_step>: Initialize.
1522 * linux-low.h (struct linux_target_ops)
1523 <supports_hardware_single_step>: Initialize.
1524 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
1525 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1526 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
1527 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
1528 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
1529 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1530 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
1531 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1532 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
1533 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
1534 Initialize.
1535 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
1536 (struct linux_target_ops) <tile_supports_hardware_single_step>:
1537 Initialize.
1538 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
1539 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1540 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
1541 New function.
1542 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1543 * target.h (struct target_ops): <supports_software_single_step>:
1544 New field.
1545 (target_supports_software_single_step): New macro.
1546
2d97cd35
AT
15472015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1548
1549 * linux-low.c (linux_wait_1): Fix pc advance condition.
1550 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
1551 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
1552
769ef81f
AT
15532015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1554
1555 * linux-arm-low.c (arm_is_thumb_mode): New function.
1556 (arm_breakpoint_at): Use arm_is_thumb_mode.
1557 (arm_breakpoint_kind_from_current_state): New function.
1558 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
1559 Initialize.
1560 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
1561 (linux_breakpoint_kind_from_current_state): New function.
1562 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
1563 * linux-low.h (struct linux_target_ops)
1564 <breakpoint_kind_from_current_state>: New field.
1565 * target.h (struct target_ops): Likewise.
1566 (target_breakpoint_kind_from_current_state): New macro.
1567
1bebeeca
PA
15682015-11-30 Pedro Alves <palves@redhat.com>
1569
1570 * linux-low.c (linux_resume): Wake up the event loop before
1571 returning.
1572
a67a9fae
PA
15732015-11-30 Pedro Alves <palves@redhat.com>
1574
1575 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
1576 check.
1577 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
1578 to -1.
1579 * target.c (struct thread_search): New structure.
1580 (thread_search_callback): New function.
1581 (prev_general_thread): New global.
1582 (prepare_to_access_memory, done_accessing_memory): New functions.
1583 * target.h (prepare_to_access_memory, done_accessing_memory):
1584 Replace macros with function declarations.
1585
f2faf941
PA
15862015-11-30 Pedro Alves <palves@redhat.com>
1587
1588 PR 14618
1589 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
1590 report TARGET_WAITKIND_NO_RESUMED.
1591 * remote-utils.c (prepare_resume_reply): Handle
1592 TARGET_WAITKIND_NO_RESUMED.
1593 * server.c (report_no_resumed): New global.
1594 (handle_query) <qSupported>: Handle "no-resumed+". Report
1595 "no-resumed+" support.
1596 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
1597 return error if the client doesn't support no-resumed events.
1598 (push_stop_notification): New function.
1599 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
1600 events if the client supports them.
1601
a681f9c9
PA
16022015-11-30 Pedro Alves <palves@redhat.com>
1603
1604 * linux-low.c (thread_still_has_status_pending_p): Don't check
1605 vCont;t here.
1606 (lwp_resumed): New function.
1607 (status_pending_p_callback): Return early if the LWP is not
1608 supposed to be resumed.
1609
65706a29
PA
16102015-11-30 Pedro Alves <palves@redhat.com>
1611
1612 * linux-low.c (handle_extended_wait): Assert that the LWP's
1613 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
1614 thread create events, leave the new child's status pending.
1615 (linux_low_filter_event): If GDB wants to hear about thread exit
1616 events, leave the LWP marked dead and don't delete it.
1617 (linux_wait_for_event_filtered): Don't check for thread exit.
1618 (filter_exit_event): New function.
1619 (linux_wait_1): Use it, when returning an exit event.
1620 (linux_resume_one_lwp_throw): Assert that the LWP's
1621 waitstatus is TARGET_WAITKIND_IGNORE.
1622 * remote-utils.c (prepare_resume_reply): Handle
1623 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
1624 * server.c (report_thread_events): New global.
1625 (handle_general_set): Handle QThreadEvents.
1626 (handle_query) <qSupported>: Handle and report QThreadEvents+;
1627 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
1628 TARGET_WAITKIND_THREAD_EXITED.
1629 * server.h (report_thread_events): Declare.
1630
56cf4bed
PA
16312015-11-30 Pedro Alves <palves@redhat.com>
1632
1633 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
1634 the thread's last_resume_kind was resume_stop.
1635
500c1d85
PA
16362015-11-30 Pedro Alves <palves@redhat.com>
1637
1638 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
1639 before returning.
1640
de979965
PA
16412015-11-30 Pedro Alves <palves@redhat.com>
1642
1643 * server.c (handle_v_requests): Handle vCtrlC.
1644
34c65914
PA
16452015-11-30 Pedro Alves <palves@redhat.com>
1646
1647 * gdbthread.h (find_any_thread_of_pid): Declare.
1648 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
1649 functions.
1650 * server.c (handle_query): If current_thread is NULL, look for
1651 another thread of the selected process.
1652
79efa585 16532015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 1654 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
1655
1656 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
1657 * server.c (handle_qxfer_threads_worker): Refactor to include thread
1658 name in reply.
1659 * target.h (struct target_ops) <thread_name>: New field.
1660 (target_thread_name): New macro.
1661
80d82c19
JB
16622015-11-23 Joel Brobecker <brobecker@adacore.com>
1663
1664 * regcache.h (regcache_invalidate_pid): Add declaration.
1665 * regcache.c (regcache_invalidate_pid): New function, extracted
1666 from regcache_invalidate.
1667 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
1668 Add trivial documentation comment.
1669 * lynx-low.c: Use regcache_invalidate_pid instead of
1670 regcache_invalidate.
1671
64da5dd5
JB
16722015-11-23 Joel Brobecker <brobecker@adacore.com>
1673
1674 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
1675 and Elf64_auxv_t if the target is Android.
1676
37ce4055
DE
16772015-11-22 Doug Evans <xdje42@gmail.com>
1678
1679 * target.h: #include <sys/types.h>.
1680
06e03fff
PA
16812015-11-19 Pedro Alves <palves@redhat.com>
1682
1683 * linux-low.c (linux_process_qsupported): Change prototype.
1684 Adjust.
1685 * linux-low.h (struct linux_target_ops) <process_qsupported>:
1686 Change prototype.
1687 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
1688 and adjust to loop over all features.
1689 * server.c (handle_query) <qSupported>: Adjust to call
1690 target_process_qsupported once, passing it a vector of unprocessed
1691 features.
1692 * target.h (struct target_ops) <process_qsupported>: Change
1693 prototype.
1694 (target_process_qsupported): Adjust.
1695
9a084706
PA
16962015-11-19 Pedro Alves <palves@redhat.com>
1697
1698 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
1699 mode.
1700 * configure: Regenerate.
1701
dad44a1f
PA
17022015-11-19 Pedro Alves <palves@redhat.com>
1703
1704 * configure: Regenerate.
1705
231c0592
YQ
17062015-11-19 Yao Qi <yao.qi@linaro.org>
1707
1708 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
1709 type to uint32_t.
1710
6c1c9a8b
YQ
17112015-11-19 Yao Qi <yao.qi@linaro.org>
1712
1713 * linux-aarch64-low.c (enum aarch64_operand_type): New.
1714 (struct aarch64_operand): Move enum out.
1715
9caa3311
YQ
17162015-11-19 Yao Qi <yao.qi@linaro.org>
1717
1718 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
1719 struct user_fpsimd_state *.
1720 (aarch64_store_fpregset): Likewise.
1721
6a69a054
YQ
17222015-11-19 Yao Qi <yao.qi@linaro.org>
1723
1724 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
1725 struct user_pt_regs *.
1726 (aarch64_store_gregset): Likewise.
1727
1798301e
PA
17282015-11-18 Pedro Alves <palves@redhat.com>
1729
1730 * Makefile.in (all_object_files): Add $IPA_OBJS.
1731
ce7715e2
PA
17322015-11-17 Pedro Alves <palves@redhat.com>
1733
1734 * win32-low.c (win32_resume): Use gdb_signal_from_host,
1735 GDB_SIGNAL_0 and gdb_signal_to_string.
1736
c0879059
PA
17372015-11-17 Pedro Alves <palves@redhat.com>
1738
1739 * win32-low.c (handle_output_debug_string): Remove parameter.
1740 (win32_kill): Remove our_status local and adjust call to
1741 handle_output_debug_string.
1742 (get_child_debug_event): Adjust call to
1743 handle_output_debug_string.
1744
1996e237
SM
17452015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1746
1747 * linux-mips-low.c (mips_fill_gregset): Add cast.
1748 (mips_store_gregset): Likewise.
1749 (mips_fill_fpregset): Likewise.
1750 (mips_store_fpregset): Likewise.
1751
cbec665b
SM
17522015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1753
1754 * linux-mips-low.c (mips_add_watchpoint): Rename private to
1755 priv.
1756
eb3e3c67
SM
17572015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1758
1759 * linux-mips-low.c (mips_linux_new_thread): Change type of
1760 watch_type to enum target_hw_bp_type.
1761
171de4b8
SM
17622015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1763
1764 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
1765 Change return type to arm_hwbp_type.
1766
04248ead
SM
17672015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1768
1769 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
1770 (arm_store_gregset): Likewise.
1771 * linux-arm-low.c (arm_get_hwcap): Likewise.
1772 (arm_read_description): Likewise.
1773
04b3479c
SM
17742015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1775
1776 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
1777
2bc84e8a
SM
17782015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1779
1780 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
1781 (ppc_fill_vsxregset): Likewise.
1782 (ppc_store_vsxregset): Likewise.
1783 (ppc_fill_vrregset): Likewise.
1784 (ppc_store_vrregset): Likewise.
1785 (ppc_fill_evrregset): Likewise.
1786 (ppc_store_evrregset): Likewise.
1787
e6c5bb05
SM
17882015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1789
1790 * linux-ppc-low.c (ppc_usrregs_info): Remove
1791 forward-declaration.
1792 (ppc_arch_setup): Move lower in file.
1793
7ea45d72
SM
17942015-10-30 Simon Marchi <simon.marchi@ericsson.com>
1795
1796 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
1797 (ps_pdwrite): Likewise.
1798
69291610
HW
17992015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
1800
1801 * linux-arm-low.c (arm_new_thread): Move pointer dereference
1802 to after assert checks.
1803
b42945fd
SM
18042015-10-29 Simon Marchi <simon.marchi@ericsson.com>
1805
1806 * proc-service.c (ps_pdread): Add/adjust casts.
1807 (ps_pdwrite): Add/adjust casts.
1808
d6f85c84
SM
18092015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1810
1811 * server.c (handle_search_memory_1): Cast return value of
1812 memmem.
1813
f98cd059
SM
18142015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1815
1816 * server.c (write_qxfer_response): Change type of data to
1817 gdb_byte *.
1818
d2412fa5
PA
18192015-10-29 Pedro Alves <palves@redhat.com>
1820
1821 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
1822
c17414a2
PA
18232015-10-29 Pedro Alves <palves@redhat.com>
1824
1825 * tracepoint.c (clear_installed_tracepoints): Add casts.
1826
e053fbc4
PA
18272015-10-29 Pedro Alves <palves@redhat.com>
1828
1829 * server.c (handle_v_cont, process_serial_event): Add enum
1830 gdb_signal casts to signal parsing code.
1831
add67df8
PA
18322015-10-29 Pedro Alves <palves@redhat.com>
1833
1834 * linux-low.h (NULL_REGSET): Define.
1835 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1836 * linux-arm-low.c (arm_regsets): Likewise.
1837 * linux-crisv32-low.c (cris_regsets): Likewise.
1838 * linux-m68k-low.c (m68k_regsets): Likewise.
1839 * linux-mips-low.c (mips_regsets): Likewise.
1840 * linux-nios2-low.c (nios2_regsets): Likewise.
1841 * linux-ppc-low.c (ppc_regsets): Likewise.
1842 * linux-s390-low.c (s390_regsets): Likewise.
1843 * linux-sh-low.c (sh_regsets): Likewise.
1844 * linux-sparc-low.c (sparc_regsets): Likewise.
1845 * linux-tic6x-low.c (tic6x_regsets): Likewise.
1846 * linux-tile-low.c (tile_regsets): Likewise.
1847 * linux-x86-low.c (x86_regsets): Likewise.
1848 * linux-xtensa-low.c (xtensa_regsets): Likewise.
1849
50bc912a
PA
18502015-10-29 Pedro Alves <palves@redhat.com>
1851
1852 * linux-low.h (NULL_REGSET): Define.
1853 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1854 * linux-arm-low.c (arm_regsets): Likewise.
1855 * linux-crisv32-low.c (cris_regsets): Likewise.
1856 * linux-m68k-low.c (m68k_regsets): Likewise.
1857 * linux-mips-low.c (mips_regsets): Likewise.
1858 * linux-nios2-low.c (nios2_regsets): Likewise.
1859 * linux-ppc-low.c (ppc_regsets): Likewise.
1860 * linux-s390-low.c (s390_regsets): Likewise.
1861 * linux-sh-low.c (sh_regsets): Likewise.
1862 * linux-sparc-low.c (sparc_regsets): Likewise.
1863 * linux-tic6x-low.c (tic6x_regsets): Likewise.
1864 * linux-tile-low.c (tile_regsets): Likewise.
1865 * linux-x86-low.c (x86_regsets): Likewise.
1866 * linux-xtensa-low.c (xtensa_regsets): Likewise.
1867
682b2546
DE
18682015-10-26 Doug Evans <dje@google.com>
1869
1870 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
1871
963843d4
DE
18722015-10-26 Doug Evans <dje@google.com>
1873
1874 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
1875
d41401ac
DE
18762015-10-26 Doug Evans <dje@google.com>
1877
1878 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
1879 for debug_printf.
1880 (attach_thread, find_new_threads_callback): Ditto.
1881
3db28855
AT
18822015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1883
1884 * mem-break.h (set_breakpoint_data): Remove.
1885
fb78e89c
AT
18862015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1887
1888 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
1889 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
1890 (initialize_low): Remove set_breakpoint_data call.
1891 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
1892 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
1893 (initialize_low): Remove set_breakpoint_data call.
1894 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
1895 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
1896 (initialize_low): Remove set_breakpoint_data call.
1897
2e6ee069
AT
18982015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1899
1900 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
1901 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
1902 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
1903 * target.h (target_breakpoint_kind_from_pc): New macro.
1904
1652a986
AT
19052015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
1906
1907 * linux-low.c (default_breakpoint_kind_from_pc): New function.
1908 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
1909 the default breakpoint kind.
1910
abeead09
AT
19112015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1912
1913 * linux-arm-low.c (arm_supports_z_point_type): Add software
1914 breakpoint support.
1915
b0b4b501
AT
19162015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1917
1918 * linux-arm-low.c: Refactor breakpoint definitions.
1919 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
1920 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
1921
8689682c
AT
19222015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1923
1924 * Makefile.in: Add arm.c/o.
1925 * configure.srv: Likewise.
1926 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
1927 (arm_breakpoint_kind_from_pc): New function.
1928 (arm_sw_breakpoint_from_kind): Return proper kind.
1929 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
1930
27165294
AT
19312015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1932
1933 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
1934 removal.
1935 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
1936 (struct raw_breakpoint) <size>: Remove.
1937 (struct raw_breakpoint) <kind>: Add.
1938 (bp_size): New function.
1939 (bp_opcode): Likewise.
1940 (find_raw_breakpoint_at): Adjust for kind.
1941 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
1942 (remove_memory_breakpoint): Adjust for kind call bp_size.
1943 (set_raw_breakpoint_at): Adjust for kind.
1944 (set_breakpoint): Likewise.
1945 (set_breakpoint_at): Call breakpoint_kind_from_pc.
1946 (delete_raw_breakpoint): Adjust for kind.
1947 (delete_breakpoint): Likewise.
1948 (find_gdb_breakpoint): Likewise.
1949 (set_gdb_breakpoint_1): Likewise.
1950 (set_gdb_breakpoint): Likewise.
1951 (delete_gdb_breakpoint_1): Likewise.
1952 (delete_gdb_breakpoint): Likewise.
1953 (uninsert_raw_breakpoint): Likewise.
1954 (reinsert_raw_breakpoint): Likewise.
1955 (set_breakpoint_data): Remove.
1956 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
1957 (check_mem_read): Adjust for kind call bp_size.
1958 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
1959 (clone_one_breakpoint): Adjust for kind.
1960 * mem-break.h (set_gdb_breakpoint): Likewise.
1961 (delete_gdb_breakpoint): Likewise.
1962 * server.c (process_serial_event): Likewise.
1963
dd373349
AT
19642015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1965
1966 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
1967 (struct linux_target_ops) <breakpoint>: Remove.
1968 (struct linux_target_ops) <breakpoint_len>: Remove.
1969 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1970 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1971 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
1972 (arm_sw_breakpoint_from_kind): New function.
1973 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
1974 (struct linux_target_ops) <breakpoint>: Remove.
1975 (struct linux_target_ops) <breakpoint_len>: Remove.
1976 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1977 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1978 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
1979 (struct linux_target_ops) <breakpoint>: Remove.
1980 (struct linux_target_ops) <breakpoint_len>: Remove.
1981 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1982 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1983 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
1984 (struct linux_target_ops) <breakpoint>: Remove.
1985 (struct linux_target_ops) <breakpoint_len>: Remove.
1986 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1987 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1988 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
1989 and sw_breakpoint_from_kind to increment the pc.
1990 (linux_breakpoint_kind_from_pc): New function.
1991 (linux_sw_breakpoint_from_kind): New function.
1992 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
1993 (initialize_low): Call breakpoint_kind_from_pc and
1994 sw_breakpoint_from_kind to replace breakpoint_data/len.
1995 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
1996 New field.
1997 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
1998 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
1999 (struct linux_target_ops) <breakpoint>: Remove.
2000 (struct linux_target_ops) <breakpoint_len>: Remove.
2001 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2002 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2003 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
2004 (struct linux_target_ops) <breakpoint>: Remove.
2005 (struct linux_target_ops) <breakpoint_len>: Remove.
2006 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2007 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2008 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
2009 (struct linux_target_ops) <breakpoint>: Remove.
2010 (struct linux_target_ops) <breakpoint_len>: Remove.
2011 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2012 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2013 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
2014 (struct linux_target_ops) <breakpoint>: Remove.
2015 (struct linux_target_ops) <breakpoint_len>: Remove.
2016 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2017 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2018 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
2019 (struct linux_target_ops) <breakpoint>: Remove.
2020 (struct linux_target_ops) <breakpoint_len>: Remove.
2021 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2022 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2023 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
2024 (struct linux_target_ops) <breakpoint>: Remove.
2025 (struct linux_target_ops) <breakpoint_len>: Remove.
2026 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2027 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2028 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
2029 (struct linux_target_ops) <breakpoint>: Remove.
2030 (struct linux_target_ops) <breakpoint_len>: Remove.
2031 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2032 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2033 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
2034 (struct linux_target_ops) <breakpoint>: Remove.
2035 (struct linux_target_ops) <breakpoint_len>: Remove.
2036 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2037 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2038 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
2039 (struct linux_target_ops) <breakpoint>: Remove.
2040 (struct linux_target_ops) <breakpoint_len>: Remove.
2041 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2042 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2043 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
2044 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
2045 (struct linux_target_ops) <breakpoint>: Remove.
2046 (struct linux_target_ops) <breakpoint_len>: Remove.
2047 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2048 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2049 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
2050 (struct linux_target_ops) <breakpoint>: Remove.
2051 (struct linux_target_ops) <breakpoint_len>: Remove.
2052 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2053 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2054
4cd98a19
AT
20552015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2056
2057 * linux-cris-low.c (cris_get_pc): Remove void arg.
2058
774ee6d2
AR
20592015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2060
2061 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
2062 variable name.
2063
833dcd29
AR
20642015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2065
2066 * inferiors.c (thread_pid_matches_callback): New function.
2067 (find_thread_process): New function.
2068 (remove_thread): Reset current_thread.
2069 (remove_process): Assert threads have been removed first.
2070
8d689ee5
YQ
20712015-10-15 Yao Qi <yao.qi@linaro.org>
2072
2073 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
2074 if it is 3.
2075 (aarch64_remove_point): Likewise.
2076 * regcache.c (regcache_register_size): New function.
2077
1c2e1515
YQ
20782015-10-12 Yao Qi <yao.qi@linaro.org>
2079
2080 * linux-aarch64-low.c: Update all callers as emit_load_store
2081 is renamed to aarch64_emit_load_store.
2082
e1c587c3
YQ
20832015-10-12 Yao Qi <yao.qi@linaro.org>
2084
2085 * linux-aarch64-low.c: Update all callers of function renaming
2086 from emit_insn to aarch64_emit_insn.
2087
b6542f81
YQ
20882015-10-12 Yao Qi <yao.qi@linaro.org>
2089
2090 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
2091 arch/aarch64-insn.h.
2092 (struct aarch64_memory_operand): Likewise.
2093 (ENCODE): Likewise.
2094 (emit_insn): Move to arch/aarch64-insn.c.
2095 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
2096 (emit_load_store): Move to arch/aarch64-insn.c.
2097 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
2098 (can_encode_int32): Remove.
2099
246994ce
YQ
21002015-10-12 Yao Qi <yao.qi@linaro.org>
2101
2102 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
2103 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
2104 (aarch64_relocate_instruction): Likewise.
2105 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
2106 (struct aarch64_insn_visitor): Likewise.
2107
0badd99f
YQ
21082015-10-12 Yao Qi <yao.qi@linaro.org>
2109
2110 * linux-aarch64-low.c (struct aarch64_insn_data): New.
2111 (struct aarch64_insn_visitor): New.
2112 (struct aarch64_insn_relocation_data): New.
2113 (aarch64_ftrace_insn_reloc_b): New function.
2114 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2115 (aarch64_ftrace_insn_reloc_cb): Likewise.
2116 (aarch64_ftrace_insn_reloc_tb): Likewise.
2117 (aarch64_ftrace_insn_reloc_adr): Likewise.
2118 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
2119 (aarch64_ftrace_insn_reloc_others): Likewise.
2120 (visitor): New.
2121 (aarch64_relocate_instruction): Use visitor.
2122
dfaffe9d
YQ
21232015-10-12 Yao Qi <yao.qi@linaro.org>
2124
2125 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
2126 int. Add argument buf.
2127 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
2128 aarch64_relocate_instruction.
2129
70b439f0
YQ
21302015-10-12 Yao Qi <yao.qi@linaro.org>
2131
2132 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
2133 argument insn. Remove local variable insn. Don't call
2134 target_read_uint32.
2135 (aarch64_install_fast_tracepoint_jump_pad): Call
2136 target_read_uint32.
2137
7781c06f
YQ
21382015-09-30 Yao Qi <yao.qi@linaro.org>
2139
2140 * linux-aarch64-low.c (emit_movk): Shorten a long line.
2141 (emit_load_store_pair): Likewise.
2142
9a3c8263
SM
21432015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2144
2145 * dll.c (match_dll): Add cast(s).
2146 (unloaded_dll): Likewise.
2147 * linux-low.c (second_thread_of_pid_p): Likewise.
2148 (delete_lwp_callback): Likewise.
2149 (count_events_callback): Likewise.
2150 (select_event_lwp_callback): Likewise.
2151 (linux_set_resume_request): Likewise.
2152 * server.c (accumulate_file_name_length): Likewise.
2153 (emit_dll_description): Likewise.
2154 (handle_qxfer_threads_worker): Likewise.
2155 (visit_actioned_threads): Likewise.
2156 * thread-db.c (any_thread_of): Likewise.
2157 * tracepoint.c (same_process_p): Likewise.
2158 (match_blocktype): Likewise.
2159 (build_traceframe_info_xml): Likewise.
2160
224c3ddb
SM
21612015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2162
2163 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
2164 assignment.
2165 (gdb_unparse_agent_expr): Likewise.
2166 * hostio.c (require_data): Likewise.
2167 (handle_pread): Likewise.
2168 * linux-low.c (disable_regset): Likewise.
2169 (fetch_register): Likewise.
2170 (store_register): Likewise.
2171 (get_dynamic): Likewise.
2172 (linux_qxfer_libraries_svr4): Likewise.
2173 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
2174 (set_fast_tracepoint_jump): Likewise.
2175 (uninsert_fast_tracepoint_jumps_at): Likewise.
2176 (reinsert_fast_tracepoint_jumps_at): Likewise.
2177 (validate_inserted_breakpoint): Likewise.
2178 (clone_agent_expr): Likewise.
2179 * regcache.c (init_register_cache): Likewise.
2180 * remote-utils.c (putpkt_binary_1): Likewise.
2181 (decode_M_packet): Likewise.
2182 (decode_X_packet): Likewise.
2183 (look_up_one_symbol): Likewise.
2184 (relocate_instruction): Likewise.
2185 (monitor_output): Likewise.
2186 * server.c (handle_search_memory): Likewise.
2187 (handle_qxfer_exec_file): Likewise.
2188 (handle_qxfer_libraries): Likewise.
2189 (handle_qxfer): Likewise.
2190 (handle_query): Likewise.
2191 (handle_v_cont): Likewise.
2192 (handle_v_run): Likewise.
2193 (captured_main): Likewise.
2194 * target.c (write_inferior_memory): Likewise.
2195 * thread-db.c (try_thread_db_load_from_dir): Likewise.
2196 * tracepoint.c (init_trace_buffer): Likewise.
2197 (add_tracepoint_action): Likewise.
2198 (add_traceframe): Likewise.
2199 (add_traceframe_block): Likewise.
2200 (cmd_qtdpsrc): Likewise.
2201 (cmd_qtdv): Likewise.
2202 (cmd_qtstatus): Likewise.
2203 (response_source): Likewise.
2204 (response_tsv): Likewise.
2205 (cmd_qtnotes): Likewise.
2206 (gdb_collect): Likewise.
2207 (initialize_tracepoint): Likewise.
2208
afbe19f8
PL
22092015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2210
2211 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
2212 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
2213 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
2214 <NOP>: New.
2215 (enum aarch64_condition_codes): New enum.
2216 (w0): New static global.
2217 (fp): Likewise.
2218 (lr): Likewise.
2219 (struct aarch64_memory_operand) <type>: New
2220 MEMORY_OPERAND_POSTINDEX type.
2221 (postindex_memory_operand): New helper function.
2222 (emit_ret): New function.
2223 (emit_load_store_pair): New function, factored out of emit_stp
2224 with support for MEMORY_OPERAND_POSTINDEX.
2225 (emit_stp): Rewrite using emit_load_store_pair.
2226 (emit_ldp): New function.
2227 (emit_load_store): Likewise.
2228 (emit_ldr): Mention post-index instruction in comment.
2229 (emit_ldrh): New function.
2230 (emit_ldrb): New function.
2231 (emit_ldrsw): Mention post-index instruction in comment.
2232 (emit_str): Likewise.
2233 (emit_subs): New function.
2234 (emit_cmp): Likewise.
2235 (emit_and): Likewise.
2236 (emit_orr): Likewise.
2237 (emit_orn): Likewise.
2238 (emit_eor): Likewise.
2239 (emit_mvn): Likewise.
2240 (emit_lslv): Likewise.
2241 (emit_lsrv): Likewise.
2242 (emit_asrv): Likewise.
2243 (emit_mul): Likewise.
2244 (emit_sbfm): Likewise.
2245 (emit_sbfx): Likewise.
2246 (emit_ubfm): Likewise.
2247 (emit_ubfx): Likewise.
2248 (emit_csinc): Likewise.
2249 (emit_cset): Likewise.
2250 (emit_nop): Likewise.
2251 (emit_ops_insns): New helper function.
2252 (emit_pop): Likewise.
2253 (emit_push): Likewise.
2254 (aarch64_emit_prologue): New function.
2255 (aarch64_emit_epilogue): Likewise.
2256 (aarch64_emit_add): Likewise.
2257 (aarch64_emit_sub): Likewise.
2258 (aarch64_emit_mul): Likewise.
2259 (aarch64_emit_lsh): Likewise.
2260 (aarch64_emit_rsh_signed): Likewise.
2261 (aarch64_emit_rsh_unsigned): Likewise.
2262 (aarch64_emit_ext): Likewise.
2263 (aarch64_emit_log_not): Likewise.
2264 (aarch64_emit_bit_and): Likewise.
2265 (aarch64_emit_bit_or): Likewise.
2266 (aarch64_emit_bit_xor): Likewise.
2267 (aarch64_emit_bit_not): Likewise.
2268 (aarch64_emit_equal): Likewise.
2269 (aarch64_emit_less_signed): Likewise.
2270 (aarch64_emit_less_unsigned): Likewise.
2271 (aarch64_emit_ref): Likewise.
2272 (aarch64_emit_if_goto): Likewise.
2273 (aarch64_emit_goto): Likewise.
2274 (aarch64_write_goto_address): Likewise.
2275 (aarch64_emit_const): Likewise.
2276 (aarch64_emit_call): Likewise.
2277 (aarch64_emit_reg): Likewise.
2278 (aarch64_emit_pop): Likewise.
2279 (aarch64_emit_stack_flush): Likewise.
2280 (aarch64_emit_zero_ext): Likewise.
2281 (aarch64_emit_swap): Likewise.
2282 (aarch64_emit_stack_adjust): Likewise.
2283 (aarch64_emit_int_call_1): Likewise.
2284 (aarch64_emit_void_call_2): Likewise.
2285 (aarch64_emit_eq_goto): Likewise.
2286 (aarch64_emit_ne_goto): Likewise.
2287 (aarch64_emit_lt_goto): Likewise.
2288 (aarch64_emit_le_goto): Likewise.
2289 (aarch64_emit_gt_goto): Likewise.
2290 (aarch64_emit_ge_got): Likewise.
2291 (aarch64_emit_ops_impl): New static global variable.
2292 (aarch64_emit_ops): New target function, return
2293 &aarch64_emit_ops_impl.
2294 (struct linux_target_ops): Install it.
2295
bb903df0
PL
22962015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2297
2298 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
2299 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
2300 aarch64-ipa.o.
2301 * linux-aarch64-ipa.c: New file.
2302 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
2303 and endian.h.
2304 (aarch64_get_thread_area): New target method.
2305 (extract_signed_bitfield): New helper function.
2306 (aarch64_decode_ldr_literal): New function.
2307 (enum aarch64_opcodes): New enum.
2308 (struct aarch64_register): New struct.
2309 (struct aarch64_operand): New struct.
2310 (x0): New static global.
2311 (x1): Likewise.
2312 (x2): Likewise.
2313 (x3): Likewise.
2314 (x4): Likewise.
2315 (w2): Likewise.
2316 (ip0): Likewise.
2317 (sp): Likewise.
2318 (xzr): Likewise.
2319 (aarch64_register): New helper function.
2320 (register_operand): Likewise.
2321 (immediate_operand): Likewise.
2322 (struct aarch64_memory_operand): New struct.
2323 (offset_memory_operand): New helper function.
2324 (preindex_memory_operand): Likewise.
2325 (enum aarch64_system_control_registers): New enum.
2326 (ENCODE): New macro.
2327 (emit_insn): New helper function.
2328 (emit_b): New function.
2329 (emit_bcond): Likewise.
2330 (emit_cb): Likewise.
2331 (emit_tb): Likewise.
2332 (emit_blr): Likewise.
2333 (emit_stp): Likewise.
2334 (emit_ldp_q_offset): Likewise.
2335 (emit_stp_q_offset): Likewise.
2336 (emit_load_store): Likewise.
2337 (emit_ldr): Likewise.
2338 (emit_ldrsw): Likewise.
2339 (emit_str): Likewise.
2340 (emit_ldaxr): Likewise.
2341 (emit_stxr): Likewise.
2342 (emit_stlr): Likewise.
2343 (emit_data_processing_reg): Likewise.
2344 (emit_data_processing): Likewise.
2345 (emit_add): Likewise.
2346 (emit_sub): Likewise.
2347 (emit_mov): Likewise.
2348 (emit_movk): Likewise.
2349 (emit_mov_addr): Likewise.
2350 (emit_mrs): Likewise.
2351 (emit_msr): Likewise.
2352 (emit_sevl): Likewise.
2353 (emit_wfe): Likewise.
2354 (append_insns): Likewise.
2355 (can_encode_int32_in): New helper function.
2356 (aarch64_relocate_instruction): New function.
2357 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
2358 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
2359 (struct linux_target_ops): Install aarch64_get_thread_area,
2360 aarch64_install_fast_tracepoint_jump_pad and
2361 aarch64_get_min_fast_tracepoint_insn_len.
2362
787749ea
PL
23632015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2364
2365 * Makefile.in (aarch64-insn.o): New rule.
2366 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
2367
9812b2e6
YQ
23682015-09-21 Yao Qi <yao.qi@linaro.org>
2369
2370 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
2371
18fe412b
YQ
23722015-09-21 Yao Qi <yao.qi@linaro.org>
2373
2374 * tracepoint.c (max_jump_pad_size): Remove.
2375
a0cc84cd
YQ
23762015-09-18 Yao Qi <yao.qi@linaro.org>
2377
2378 * linux-aarch64-low.c: Don't include sys/uio.h.
2379 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
2380
d78908cf
WW
23812015-09-16 Wei-cheng Wang <cole945@gmail.com>
2382
2383 * tracepoint.c (eval_result_type): Change prototype.
2384 (condition_true_at_tracepoint): Fix argument to compiled_cond.
2385
d57e0d50
PA
23862015-09-15 Pedro Alves <palves@redhat.com>
2387
2388 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
2389 Check whether to report exec events instead of checking whether
2390 multiprocess is enabled.
2391
5a676acc
PA
23922015-09-15 Pedro Alves <palves@redhat.com>
2393
2394 PR remote/18965
2395 * remote-utils.c (prepare_resume_reply): Merge
2396 TARGET_WAITKIND_VFORK_DONE switch case with the
2397 TARGET_WAITKIND_FORKED case.
2398
7c5d0fad
YQ
23992015-09-15 Yao Qi <yao.qi@linaro.org>
2400
2401 * server.c (handle_query): Check string comparison using
2402 "else if" instead of "if".
2403
750ce8d1
YQ
24042015-09-15 Yao Qi <yao.qi@linaro.org>
2405
2406 * server.c (vCont_supported): New global variable.
2407 (handle_query): Set vCont_supported to 1 if "vContSupported+"
2408 matches. Append ";vContSupported+" to own_buf.
2409 (handle_v_requests): Append ";s;S" to own_buf if target supports
2410 hardware single step or vCont_supported is false.
2411 (capture_main): Set vCont_supported to zero.
2412
70b90b91
YQ
24132015-09-15 Yao Qi <yao.qi@linaro.org>
2414
2415 * linux-low.c (linux_supports_conditional_breakpoints): Rename
2416 it to ...
2417 (linux_supports_hardware_single_step): ... New function.
2418 (linux_target_ops): Update.
2419 * lynx-low.c (lynx_target_ops): Set field
2420 supports_hardware_single_step to target_can_do_hardware_single_step.
2421 * nto-low.c (nto_target_ops): Likewise.
2422 * spu-low.c (spu_target_ops): Likewise.
2423 * win32-low.c (win32_target_ops): Likewise.
2424 * target.c (target_can_do_hardware_single_step): New function.
2425 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2426 Remove. <supports_hardware_single_step>: New field.
2427 (target_supports_conditional_breakpoints): Remove.
2428 (target_supports_hardware_single_step): New macro.
2429 (target_can_do_hardware_single_step): Declare.
2430 * server.c (handle_query): Use target_supports_hardware_single_step
2431 instead of target_supports_conditional_breakpoints.
2432
ade90bde
YQ
24332015-09-15 Yao Qi <yao.qi@linaro.org>
2434
2435 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
2436 function.
2437 (struct linux_target_ops the_low_target): Install
2438 aarch64_linux_siginfo_fixup.
2439
94585166
DB
24402015-09-11 Don Breazeal <donb@codesourcery.com>
2441 Luis Machado <lgustavo@codesourcery.com>
2442
2443 * linux-low.c (linux_mourn): Static declaration.
2444 (linux_arch_setup): Move in front of
2445 handle_extended_wait.
2446 (linux_arch_setup_thread): New function.
2447 (handle_extended_wait): Handle exec events. Call
2448 linux_arch_setup_thread. Make event_lwp argument a
2449 pointer-to-a-pointer.
2450 (check_zombie_leaders): Do not check stopped threads.
2451 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
2452 (linux_low_filter_event): Add lwp and thread for exec'ing
2453 non-leader thread if leader thread has been deleted.
2454 Refactor code into linux_arch_setup_thread and call it.
2455 Pass child lwp pointer by reference to handle_extended_wait.
2456 (linux_wait_for_event_filtered): Update comment.
2457 (linux_wait_1): Prevent clobbering exec event status.
2458 (linux_supports_exec_events): New function.
2459 (linux_target_ops) <supports_exec_events>: Initialize new member.
2460 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
2461 new member.
2462 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
2463 * server.c (report_exec_events): New global variable.
2464 (handle_query): Handle qSupported query for exec-events feature.
2465 (captured_main): Initialize report_exec_events.
2466 * server.h (report_exec_events): Declare new global variable.
2467 * target.h (struct target_ops) <supports_exec_events>: New
2468 member.
2469 (target_supports_exec_events): New macro.
2470 * win32-low.c (win32_target_ops) <supports_exec_events>:
2471 Initialize new member.
2472
0568462b
MM
24732015-09-09 Markus Metzger <markus.t.metzger@intel.com>
2474
2475 * linux-low.c (linux_low_enable_btrace): Remove.
2476 (linux_target_ops): Replace linux_low_enable_btrace with
2477 linux_enable_btrace.
2478
39edd165
YQ
24792015-09-03 Yao Qi <yao.qi@linaro.org>
2480
2481 * linux-aarch64-low.c (aarch64_insert_point): Call
2482 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
2483 returns true.
2484
1db33b5a
UW
24852015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2486
2487 * linux-low.c (check_stopped_by_breakpoint): Use
2488 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
2489
ab290430
PA
24902015-08-27 Pedro Alves <palves@redhat.com>
2491
2492 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
2493
8d749320
SM
24942015-08-26 Simon Marchi <simon.marchi@ericsson.com>
2495
6711b7f8
SM
2496 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
2497 the XNEW-family equivalent.
8d749320
SM
2498 (compile_bytecodes): Likewise.
2499 * dll.c (loaded_dll): Likewise.
2500 * event-loop.c (append_callback_event): Likewise.
2501 (create_file_handler): Likewise.
2502 (create_file_event): Likewise.
2503 * hostio.c (handle_open): Likewise.
2504 * inferiors.c (add_thread): Likewise.
2505 (add_process): Likewise.
2506 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
2507 * linux-arm-low.c (arm_new_process): Likewise.
2508 (arm_new_thread): Likewise.
2509 * linux-low.c (add_to_pid_list): Likewise.
2510 (linux_add_process): Likewise.
2511 (handle_extended_wait): Likewise.
2512 (add_lwp): Likewise.
2513 (enqueue_one_deferred_signal): Likewise.
2514 (enqueue_pending_signal): Likewise.
2515 (linux_resume_one_lwp_throw): Likewise.
2516 (linux_resume_one_thread): Likewise.
2517 (linux_read_memory): Likewise.
2518 (linux_write_memory): Likewise.
2519 * linux-mips-low.c (mips_linux_new_process): Likewise.
2520 (mips_linux_new_thread): Likewise.
2521 (mips_add_watchpoint): Likewise.
2522 * linux-x86-low.c (initialize_low_arch): Likewise.
2523 * lynx-low.c (lynx_add_process): Likewise.
2524 * mem-break.c (set_raw_breakpoint_at): Likewise.
2525 (set_breakpoint): Likewise.
2526 (add_condition_to_breakpoint): Likewise.
2527 (add_commands_to_breakpoint): Likewise.
2528 (clone_agent_expr): Likewise.
2529 (clone_one_breakpoint): Likewise.
2530 * regcache.c (new_register_cache): Likewise.
2531 * remote-utils.c (look_up_one_symbol): Likewise.
2532 * server.c (queue_stop_reply): Likewise.
2533 (start_inferior): Likewise.
2534 (queue_stop_reply_callback): Likewise.
2535 (handle_target_event): Likewise.
2536 * spu-low.c (fetch_ppc_memory): Likewise.
2537 (store_ppc_memory): Likewise.
2538 * target.c (set_target_ops): Likewise.
2539 * thread-db.c (thread_db_load_search): Likewise.
2540 (try_thread_db_load_1): Likewise.
2541 * tracepoint.c (add_tracepoint): Likewise.
2542 (add_tracepoint_action): Likewise.
2543 (create_trace_state_variable): Likewise.
2544 (cmd_qtdpsrc): Likewise.
2545 (cmd_qtro): Likewise.
2546 (add_while_stepping_state): Likewise.
2547 * win32-low.c (child_add_thread): Likewise.
2548 (get_image_name): Likewise.
2549
ed8b7b42
YQ
25502015-08-25 Yao Qi <yao.qi@linaro.org>
2551
2552 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
2553
db3cb7cb
YQ
25542015-08-25 Yao Qi <yao.qi@linaro.org>
2555
2556 * Makefile.in (aarch64-linux.o): New rule.
2557 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
2558 srv_tgtobj.
2559 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
2560 (aarch64_init_debug_reg_state): Make it extern.
2561 (aarch64_linux_prepare_to_resume): Remove.
2562
f6011a1c
YQ
25632015-08-25 Yao Qi <yao.qi@linaro.org>
2564
2565 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
2566 lwp_arch_private_info and ptid_of_lwp.
2567
88e2cf7e
YQ
25682015-08-25 Yao Qi <yao.qi@linaro.org>
2569
2570 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
2571 Find proc_info by find_process_pid. All callers updated.
2572
5e35436e
YQ
25732015-08-25 Yao Qi <yao.qi@linaro.org>
2574
2575 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
2576 Remove.
2577 (debug_reg_change_callback): Remove.
2578 (aarch64_notify_debug_reg_change): Remove.
2579
4a8a7965
YQ
25802015-08-25 Yao Qi <yao.qi@linaro.org>
2581
2582 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
2583 Call current_lwp_ptid.
2584
32a271ee
YQ
25852015-08-25 Yao Qi <yao.qi@linaro.org>
2586
2587 * linux-aarch64-low.c (debug_reg_change_callback): Use
2588 debug_printf.
2589
0d51c8d7
YQ
25902015-08-25 Yao Qi <yao.qi@linaro.org>
2591
2592 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
2593
31a43dd5
YQ
25942015-08-25 Yao Qi <yao.qi@linaro.org>
2595
2596 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
2597
8ee52567
YQ
25982015-08-25 Yao Qi <yao.qi@linaro.org>
2599
2600 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
2601 the code.
2602
ff3f0f45
YQ
26032015-08-25 Yao Qi <yao.qi@linaro.org>
2604
2605 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
2606 Remove.
2607 (debug_reg_change_callback): Remove argument entry and add argument
2608 lwp. Remove local variable thread. Don't print thread id in the
2609 debugging output. Don't check whether pid of thread equals to pid.
2610 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
2611 iterate_over_lwps instead find_inferior.
2612
3d40fbb5
PA
26132015-08-24 Pedro Alves <palves@redhat.com>
2614
2615 * inferiors.c (get_first_process): New function.
2616 * inferiors.h (get_first_process): New declaration.
2617 * remote-utils.c (read_ptid): Default to the first process in the
2618 list, instead of to the current thread's process.
2619
438e1e42
PA
26202015-08-24 Pedro Alves <palves@redhat.com>
2621
2622 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
2623 * event-loop.c: Likewise.
2624 * remote-utils.c: Likewise.
2625 * tracepoint.c: Likewise.
2626
a8c6d4fc
PA
26272015-08-24 Pedro Alves <palves@redhat.com>
2628
2629 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
2630 ptid_get_lwp.
2631
99b0bb12
PA
26322015-08-21 Pedro Alves <palves@redhat.com>
2633
2634 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
2635 instead of literal 1.
2636
f8904751
PA
26372015-08-21 Pedro Alves <palves@redhat.com>
2638
2639 * tdesc.c (default_description): Explicitly zero-initialize.
2640
465a859e
PA
26412015-08-21 Pedro Alves <palves@redhat.com>
2642
2643 PR gdb/18749
2644 * inferiors.c (remove_thread): Discard any pending stop reply for
2645 this thread.
2646 * server.c (remove_all_on_match_pid): Rename to ...
2647 (remove_all_on_match_ptid): ... this. Work with a filter ptid
2648 instead of a pid.
2649 (discard_queued_stop_replies): Change parameter to a ptid. Now
2650 extern.
2651 (handle_v_kill, kill_inferior_callback, captured_main)
2652 (process_serial_event): Adjust.
2653 * server.h (discard_queued_stop_replies): Declare.
2654
f0db101d
PA
26552015-08-21 Pedro Alves <palves@redhat.com>
2656
2657 * linux-low.c (wait_for_sigstop): Always switch to no thread
2658 selected if the previously current thread dies.
2659 * lynx-low.c (lynx_request_interrupt): Use the first thread's
2660 process instead of the current thread's.
2661 * remote-utils.c (input_interrupt): Don't check if there's no
2662 current thread.
2663 * server.c (gdb_read_memory, gdb_write_memory): If setting the
2664 current thread to the general thread fails, error out.
2665 (handle_qxfer_auxv, handle_qxfer_libraries)
2666 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
2667 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
2668 (handle_query): Check if there's a thread selected instead of
2669 checking whether there's any thread in the thread list.
2670 (handle_qxfer_threads, handle_qxfer_btrace)
2671 (handle_qxfer_btrace_conf): Don't error out early if there's no
2672 thread in the thread list.
2673 (handle_v_cont, myresume): Don't set the current thread to the
2674 continue thread.
2675 (process_serial_event) <Hg handling>: Also set thread_id if the
2676 previous general thread is still alive.
2677 (process_serial_event) <g/G handling>: If setting the current
2678 thread to the general thread fails, error out.
2679 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
2680 thread's lwp instead of the current thread's.
2681 * target.c (set_desired_thread): If the desired thread was not
2682 found, leave the current thread pointing to NULL. Return an int
2683 (boolean) indicating success.
2684 * target.h (set_desired_thread): Change return type to int.
2685
40045d91
MF
26862015-08-20 Max Filippov <jcmvbkbc@gmail.com>
2687
2688 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
2689 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
2690 #includes.
2691 (ps_get_thread_area): New function.
2692
45face3b
GB
26932015-08-19 Gary Benson <gbenson@redhat.com>
2694
2695 * hostio.c (handle_pread): Do not attempt to read more data
2696 than hostio_reply_with_data can fit in a packet.
2697
16d5f642
JB
26982015-08-18 Joel Brobecker <brobecker@adacore.com>
2699
2700 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
2701
a738da3a
MF
27022015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
2703
2704 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
2705
33ebda9d
PA
27062015-08-06 Pedro Alves <palves@redhat.com>
2707
2708 * tracepoint.c (expr_eval_result): Now an int.
2709
a44892be
PA
27102015-08-06 Pedro Alves <palves@redhat.com>
2711
2712 * gdbthread.h (struct regcache): Forward declare.
2713 (struct thread_info) <regcache_data>: Now a struct regcache
2714 pointer.
2715 * inferiors.c (inferior_regcache_data)
2716 (set_inferior_regcache_data): Now work with struct regcache
2717 pointers.
2718 * inferiors.h (struct regcache): Forward declare.
2719 (inferior_regcache_data, set_inferior_regcache_data): Now work
2720 with struct regcache pointers.
2721 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
2722 (free_register_cache_thread): Remove struct regcache pointer
2723 casts.
2724
608a1e46
PA
27252015-08-06 Pedro Alves <palves@redhat.com>
2726
2727 * server.c (captured_main): On error, print the exception message
2728 to stderr, and if run_once is set, throw a quit.
2729
f0ce0d3a
PA
27302015-08-06 Pedro Alves <palves@redhat.com>
2731
2732 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
2733 the current thread.
2734
bf47e248
PA
27352015-08-06 Pedro Alves <palves@redhat.com>
2736
2737 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
2738 reading beyond the passed in buffer length.
2739
b6b9ffcc
PL
27402015-08-06 Pierre Langlois <pierre.langlois@arm.com>
2741
2742 * tracepoint.c (symbol_list) <required>: Remove.
2743
863d01bd
PA
27442015-08-06 Pedro Alves <palves@redhat.com>
2745
2746 * linux-low.c (handle_extended_wait): Set the fork child's suspend
2747 count if stopping and suspending threads.
2748 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
2749 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
2750 (linux_detach): Complete an ongoing step-over.
2751 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
2752 throughout.
2753 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
2754 (linux_wait_1): If passing a signal to the inferior after
2755 finishing a step-over, unsuspend and re-resume all lwps. If we
2756 see a single-step event but the thread should be continuing, don't
2757 pass the trap to gdb.
2758 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
2759 internal_error instead of gdb_assert.
2760 (enqueue_pending_signal): New function.
2761 (check_ptrace_stopped_lwp_gone): Add debug output.
2762 (start_step_over): Use internal_error instead of gdb_assert.
2763 (complete_ongoing_step_over): New function.
2764 (linux_resume_one_thread): Don't resume a suspended thread.
2765 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
2766 it stepping.
2767
00db26fa
PA
27682015-08-06 Pedro Alves <palves@redhat.com>
2769
2770 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
2771 (linux_thread_alive): Use lwp_is_marked_dead.
2772 (extended_event_reported): Delete.
2773 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
2774 instead of extended_event_reported.
2775 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
2776 as well.
2777 (lwp_is_marked_dead): New function.
2778 (lwp_running): Use lwp_is_marked_dead.
2779 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
2780 comment.
2781
ad071a30
PA
27822015-08-06 Pedro Alves <palves@redhat.com>
2783
2784 * linux-low.c (linux_wait_1): Move fork event output out of the
2785 !report_to_gdb check. Pass event_child->waitstatus to
2786 target_waitstatus_to_string instead of ourstatus.
2787
524b57e6
YQ
27882015-08-04 Yao Qi <yao.qi@linaro.org>
2789
2790 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
2791 if current_thread is 32 bit.
2792
6085d6f6
YQ
27932015-08-04 Yao Qi <yao.qi@linaro.org>
2794
2795 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2796 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2797 * server.c (extended_protocol): Remove "static".
2798 * server.h (extended_protocol): Declare it.
2799
8a7e4587
YQ
28002015-08-04 Yao Qi <yao.qi@linaro.org>
2801
2802 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
2803 both aarch64 and aarch32.
2804 (aarch64_set_pc): Likewise.
2805
3b53ae99
YQ
28062015-08-04 Yao Qi <yao.qi@linaro.org>
2807
2808 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
2809 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
2810 arm-with-neon.xml to srv_xmlfiles.
2811 * linux-aarch64-low.c: Include linux-aarch32-low.h.
2812 (is_64bit_tdesc): New function.
2813 (aarch64_linux_read_description): New function.
2814 (aarch64_arch_setup): Call aarch64_linux_read_description.
2815 (regs_info): Rename to regs_info_aarch64.
2816 (aarch64_regs_info): Return right regs_info.
2817 (initialize_low_arch): Call initialize_low_arch_aarch32.
2818
bd9e6534
YQ
28192015-08-04 Yao Qi <yao.qi@linaro.org>
2820
2821 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
2822 * linux-aarch32-low.c: New file.
2823 * linux-aarch32-low.h: New file.
2824 * linux-arm-low.c (arm_fill_gregset): Move it to
2825 linux-aarch32-low.c.
2826 (arm_store_gregset): Likewise.
2827 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
2828 (arm_store_vfpregset): Call arm_store_vfpregset_num.
2829 (arm_arch_setup): Check if PTRACE_GETREGSET works.
2830 (regs_info): Rename to regs_info_arm.
2831 (arm_regs_info): Return regs_info_aarch32 if
2832 have_ptrace_getregset is 1 and target description is
2833 arm_with_neon or arm_with_vfpv3.
2834 (initialize_low_arch): Don't call init_registers_arm_with_neon.
2835 Call initialize_low_arch_aarch32 instead.
2836
ded48a5e
YQ
28372015-08-04 Yao Qi <yao.qi@linaro.org>
2838
2839 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
2840 * linux-low.c: ... here.
2841 * linux-low.h (have_ptrace_getregset): Declare it.
2842
96e9210f
PA
28432015-08-04 Pedro Alves <palves@redhat.com>
2844
2845 * thread-db.c (struct thread_db): Use new typedefs.
2846 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
2847 CHK calls.
2848 (disable_thread_event_reporting): Cast result of dlsym to
2849 destination function pointer type.
2850 (thread_db_mourn): Use td_ta_delete_ftype.
2851
af60a1ef
SL
28522015-08-03 Sandra Loosemore <sandra@codesourcery.com>
2853
2854 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
2855 arch variant.
2856 (CDX_BREAKPOINT): Define for R2.
2857 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
2858 (the_low_target): Add comments.
2859
e8b41681
YQ
28602015-07-30 Yao Qi <yao.qi@linaro.org>
2861
2862 * linux-arm-low.c (arm_hwcap): Remove it.
2863 (arm_read_description): New local variable arm_hwcap. Don't
2864 set arm_hwcap to zero.
2865
89abb039
YQ
28662015-07-30 Yao Qi <yao.qi@linaro.org>
2867
2868 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
2869 Use regcache->tdesc instead.
2870 (arm_store_wmmxregset): Likewise.
2871 (arm_fill_vfpregset): Likewise.
2872 (arm_store_vfpregset): Likewise.
2873
deca266c
YQ
28742015-07-30 Yao Qi <yao.qi@linaro.org>
2875
2876 * linux-arm-low.c: Include arch/arm.h.
2877 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
2878 (arm_store_gregset): Likewise.
2879
aa58a496
SM
28802015-07-29 Simon Marchi <simon.marchi@ericsson.com>
2881
2882 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
2883 ptrace's 4th parameter.
2884
50904b25
YQ
28852015-07-27 Yao Qi <yao.qi@linaro.org>
2886
2887 * configure.srv (case aarch64*-*-linux*): Don't set
2888 srv_linux_usrregs.
2889
5826e159
PA
28902015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
2891
2892 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
2893 sys/ptrace.h.
2894 * linux-arm-low.c: Likewise.
2895 * linux-cris-low.c: Likewise.
2896 * linux-crisv32-low.c: Likewise.
2897 * linux-low.c: Likewise.
2898 * linux-m68k-low.c: Likewise.
2899 * linux-mips-low.c: Likewise.
2900 * linux-nios2-low.c: Likewise.
2901 * linux-s390-low.c: Likewise.
2902 * linux-sparc-low.c: Likewise.
2903 * linux-tic6x-low.c: Likewise.
2904 * linux-tile-low.c: Likewise.
2905 * linux-x86-low.c: Likewise.
2906
54019719
PA
29072015-07-24 Pedro Alves <palves@redhat.com>
2908
2909 * config.in: Regenerate.
2910 * configure: Regenerate.
2911
eb7aa561
PA
29122015-07-24 Pedro Alves <palves@redhat.com>
2913
2914 * acinclude.m4: Include ../ptrace.m4.
2915 * configure.ac: Call GDB_AC_PTRACE.
2916 * config.in, configure: Regenerate.
2917
55d7b841
YQ
29182015-07-24 Yao Qi <yao.qi@linaro.org>
2919
2920 * linux-low.c (linux_create_inferior): Remove setting to
2921 proc->priv->new_inferior.
2922 (linux_attach): Likewise.
2923 (linux_low_filter_event): Likewise.
2924 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
2925
c06cbd92
YQ
29262015-07-24 Yao Qi <yao.qi@linaro.org>
2927
2928 * linux-low.c (linux_arch_setup): New function.
2929 (linux_low_filter_event): If proc->tdesc is NULL and
2930 proc->attached is true, call the_low_target.arch_setup.
2931 Otherwise, keep status pending, and return.
2932 (linux_resume_one_lwp_throw): Don't call get_pc if
2933 thread->while_stepping isn't NULL. Don't call
2934 get_thread_regcache if proc->tdesc is NULL.
2935 (need_step_over_p): Return 0 if proc->tdesc is NULL.
2936 (linux_target_ops): Install arch_setup.
2937 * server.c (start_inferior): Call the_target->arch_setup.
2938 * target.h (struct target_ops) <arch_setup>: New field.
2939 (target_arch_setup): New marco.
2940 * lynx-low.c (lynx_target_ops): Update.
2941 * nto-low.c (nto_target_ops): Update.
2942 * spu-low.c (spu_target_ops): Update.
2943 * win32-low.c (win32_target_ops): Update.
2944
5ae3ebba
YQ
29452015-07-24 Yao Qi <yao.qi@linaro.org>
2946
2947 * linux-low.c (linux_add_process): Don't set
2948 proc->priv->new_inferior.
2949 (linux_create_inferior): Set proc->priv->new_inferior to 1.
2950 (linux_attach): Likewise.
2951
eb97750b
YQ
29522015-07-24 Yao Qi <yao.qi@linaro.org>
2953
2954 * server.c (start_inferior): Code refactor.
2955
51aee833
YQ
29562015-07-24 Yao Qi <yao.qi@linaro.org>
2957
2958 * server.c (process_serial_event): Set general_thread.
2959
af1b22f3
YQ
29602015-07-21 Yao Qi <yao.qi@linaro.org>
2961
2962 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
2963 aarch64_linux_get_debug_reg_capacity.
2964
554717a3
YQ
29652015-07-17 Yao Qi <yao.qi@linaro.org>
2966
2967 * Makefile.in (aarch64-linux-hw-point.o): New rule.
2968 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
2969 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
2970 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
2971 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
2972 (AARCH64_HWP_ALIGNMENT): Likewise.
2973 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
2974 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
2975 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
2976 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
2977 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
2978 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
2979 (struct aarch64_debug_reg_state): Likewise.
2980 (struct arch_lwp_info): Likewise.
2981 (aarch64_align_watchpoint): Likewise.
2982 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
2983 (aarch64_watchpoint_length): Likewise.
2984 (aarch64_point_encode_ctrl_reg): Likewise
2985 (aarch64_point_is_aligned): Likewise.
2986 (aarch64_align_watchpoint): Likewise.
2987 (aarch64_linux_set_debug_regs):
2988 (aarch64_dr_state_insert_one_point): Likewise.
2989 (aarch64_dr_state_remove_one_point): Likewise.
2990 (aarch64_handle_breakpoint): Likewise.
2991 (aarch64_handle_aligned_watchpoint): Likewise.
2992 (aarch64_handle_unaligned_watchpoint): Likewise.
2993 (aarch64_handle_watchpoint): Likewise.
2994
c67ca4de
YQ
29952015-07-17 Yao Qi <yao.qi@linaro.org>
2996
2997 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
2998 and don't aarch64_get_debug_reg_state. All callers update.
2999 (aarch64_handle_aligned_watchpoint): Likewise.
3000 (aarch64_handle_unaligned_watchpoint): Likewise.
3001 (aarch64_handle_watchpoint): Likewise.
3002 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
3003 (aarch64_remove_point): Likewise.
3004
25abf979
YQ
30052015-07-17 Yao Qi <yao.qi@linaro.org>
3006
3007 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
3008 debug_printf.
3009 (aarch64_handle_unaligned_watchpoint): Likewise.
3010
db1ff28b
JK
30112015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3012
3013 Revert the previous 3 commits:
3014 Move gdb_regex* to common/
3015 Move linux_find_memory_regions_full & co.
3016 gdbserver build-id attribute generator
3017
700ca40f
JK
30182015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3019 Jan Kratochvil <jan.kratochvil@redhat.com>
3020
3021 gdbserver build-id attribute generator.
3022 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
3023 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
3024 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
3025 (find_phdr): New.
3026 (get_dynamic): Use find_pdhr to traverse program headers.
3027 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
3028 (compare_mapping_entry_range, struct find_memory_region_callback_data)
3029 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
3030 (get_hex_build_id): New.
3031 (linux_qxfer_libraries_svr4): Add optional build-id attribute
3032 to reply XML document.
3033
9904185c
JK
30342015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3035 Jan Kratochvil <jan.kratochvil@redhat.com>
3036
3037 * target.c: Include target/target-utils.h and fcntl.h.
3038 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
3039 (target_fileio_read_stralloc): New functions.
3040
6e5b4429
JK
30412015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3042
3043 * Makefile.in (OBS): Add gdb_regex.o.
3044 (gdb_regex.o): New.
3045 * config.in: Rebuilt.
3046 * configure: Rebuilt.
3047
ddc98fbf
JK
30482015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3049 Jan Kratochvil <jan.kratochvil@redhat.com>
3050
3051 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
3052 * Makefile.in (OBS): Add target-utils.o.
3053 (linux-maps.o, target-utils.o): New.
3054 * configure.srv (srv_linux_obj): Add linux-maps.o.
3055
e57bb7a0
PL
30562015-07-15 Pierre Langlois <pierre.langlois@arm.com>
3057
3058 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
3059 function, return 1.
3060 (the_low_target): Install it.
3061
586b02a9
PA
30622015-07-14 Pedro Alves <palves@redhat.com>
3063
3064 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
3065 Instead, ignore ECHILD, and throw an error for other errnos.
3066
58c1b36c
PA
30672015-07-10 Pedro Alves <palves@redhat.com>
3068
3069 * event-loop.c (struct callback_event) <data>: Change type to
3070 gdb_client_data instance instead of gdb_client_data pointer.
3071 (append_callback_event): Adjust.
3072
421530db
PL
30732015-07-10 Pierre Langlois <pierre.langlois@arm.com>
3074
3075 * linux-aarch64-low.c: Add comments for each linux_target_ops
3076 method. Remove comments already covered in target_ops and
3077 linux_target_ops definitions.
3078 (the_low_target): Add comments for each unimplemented method.
3079
c2d65f38
YQ
30802015-07-09 Yao Qi <yao.qi@linaro.org>
3081
3082 * linux-aarch64-low.c (aarch64_regmap): Remove.
3083 (aarch64_usrregs_info): Remove.
3084 (regs_info): Set field usrregs to NULL.
3085
b20a6524
MM
30862015-07-02 Markus Metzger <markus.t.metzger@intel.com>
3087
3088 * linux-low.c: Include "rsp-low.h"
3089 (linux_low_encode_pt_config, linux_low_encode_raw): New.
3090 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
3091 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
3092 (handle_btrace_enable_pt): New.
3093 (handle_btrace_general_set): Support "pt".
3094 (handle_btrace_conf_general_set): Support "pt:size".
3095
96c97461
PL
30962015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3097
3098 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
3099 Z_PACKET_SW_BP.
3100
37d66942
PL
31012015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3102
3103 * linux-aarch64-low.c: Remove comment about endianness.
3104 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
3105 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
3106 memcmp.
3107
dc06243f
GB
31082015-06-24 Gary Benson <gbenson@redhat.com>
3109
3110 * linux-i386-ipa.c (stdint.h): Do not include.
3111 * lynx-i386-low.c (stdint.h): Likewise.
3112 * lynx-ppc-low.c (stdint.h): Likewise.
3113 * mem-break.c (stdint.h): Likewise.
3114 * thread-db.c (stdint.h): Likewise.
3115 * tracepoint.c (stdint.h): Likewise.
3116 * win32-low.c (stdint.h): Likewise.
3117
124e13d9
SM
31182015-06-18 Simon Marchi <simon.marchi@ericsson.com>
3119
3120 * server.c (write_qxfer_response): Update call to
3121 remote_escape_output.
3122
909c2cda
JK
31232015-06-15 Aleksandar Ristovski <aristovski@qnx.com
3124 Jan Kratochvil <jan.kratochvil@redhat.com>
3125
3126 Merge multiple hex conversions.
3127 * gdbreplay.c (tohex): Rename to 'fromhex'.
3128 (logchar): Use fromhex.
3129
24c05f46
JK
31302015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
3131
3132 * server.c (handle_qxfer_libraries): Set `version' attribute for
3133 <library-list>.
3134
14d2069a
GB
31352015-06-10 Gary Benson <gbenson@redhat.com>
3136
3137 * target.h (struct target_ops) <multifs_open>: New field.
3138 <multifs_unlink>: Likewise.
3139 <multifs_readlink>: Likewise.
3140 * linux-low.c (nat/linux-namespaces.h): New include.
3141 (linux_target_ops): Initialize the_target->multifs_open,
3142 the_target->multifs_unlink and the_target->multifs_readlink.
3143 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
3144 * hostio.c (hostio_fs_pid): New static variable.
3145 (hostio_handle_new_gdb_connection): New function.
3146 (handle_setfs): Likewise.
3147 (handle_open): Use the_target->multifs_open as appropriate.
3148 (handle_unlink): Use the_target->multifs_unlink as appropriate.
3149 (handle_readlink): Use the_target->multifs_readlink as
3150 appropriate.
3151 (handle_vFile): Handle vFile:setfs packets.
3152 * server.c (handle_query): Call hostio_handle_new_gdb_connection
3153 after target_handle_new_gdb_connection.
3154
4b8b5e72
GB
31552015-06-10 Gary Benson <gbenson@redhat.com>
3156
3157 * configure.ac (AC_CHECK_FUNCS): Add setns.
3158 * config.in: Regenerate.
3159 * configure: Likewise.
3160 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
3161 (linux-namespaces.o): New rule.
3162 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
3163
3ac2e371
GB
31642015-06-09 Gary Benson <gbenson@redhat.com>
3165
3166 * hostio.c (handle_open): Process mode argument with
3167 fileio_to_host_mode.
3168
ca9b78ce
YQ
31692015-06-01 Yao Qi <yao.qi@linaro.org>
3170
3171 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
3172 * linux-x86-low.c: Likewise.
3173
bfacd19d
DB
31742015-05-28 Don Breazeal <donb@codesourcery.com>
3175
3176 * linux-low.c (handle_extended_wait): Initialize
3177 thread_info.last_resume_kind for new fork children.
3178
452003ef
PA
31792015-05-15 Pedro Alves <palves@redhat.com>
3180
3181 * target.h (target_handle_new_gdb_connection): Rewrite using if
3182 wrapped in do/while.
3183
1041a03c
JB
31842015-05-14 Joel Brobecker <brobecker@adacore.com>
3185
3186 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
3187 * configure, config.in: Regenerate.
3188 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
3189 Declare typedef.
3190
c269dbdb
DB
31912015-05-12 Don Breazeal <donb@codesourcery.com>
3192
3193 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
3194 PTRACE_EVENT_VFORK_DONE.
3195 (linux_low_ptrace_options, extended_event_reported): Add vfork
3196 events.
3197 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
3198 and "vforkdone" for RSP 'T' Stop Reply Packet.
3199 * server.h (report_vfork_events): Declare
3200 global variable.
3201
3a8a0396
DB
32022015-05-12 Don Breazeal <donb@codesourcery.com>
3203
3204 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
3205 (the_low_target) <new_fork>: Initialize new member.
3206 * linux-arm-low.c (arm_new_fork): New function.
3207 (the_low_target) <new_fork>: Initialize new member.
3208 * linux-low.c (handle_extended_wait): Call new target function
3209 new_fork.
3210 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
3211 * linux-mips-low.c (mips_add_watchpoint): New function
3212 extracted from mips_insert_point.
3213 (the_low_target) <new_fork>: Initialize new member.
3214 (mips_linux_new_fork): New function.
3215 (mips_insert_point): Call mips_add_watchpoint.
3216 * linux-x86-low.c (x86_linux_new_fork): New function.
3217 (the_low_target) <new_fork>: Initialize new member.
3218
de0d863e
DB
32192015-05-12 Don Breazeal <donb@codesourcery.com>
3220
3221 * linux-low.c (handle_extended_wait): Implement return value,
3222 rename argument 'event_child' to 'event_lwp', handle
3223 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
3224 (linux_low_ptrace_options): New function.
3225 (linux_low_filter_event): Call linux_low_ptrace_options,
3226 use different argument fo linux_enable_event_reporting,
3227 use return value from handle_extended_wait.
3228 (extended_event_reported): New function.
3229 (linux_wait_1): Call extended_event_reported and set
3230 status to report fork events.
3231 (linux_write_memory): Add pid to debug message.
3232 (reset_lwp_ptrace_options_callback): New function.
3233 (linux_handle_new_gdb_connection): New function.
3234 (linux_target_ops): Initialize new structure member.
3235 * linux-low.h (struct lwp_info) <waitstatus>: New member.
3236 * lynx-low.c: Initialize new structure member.
3237 * remote-utils.c (prepare_resume_reply): Implement stop reason
3238 "fork" for "T" stop message.
3239 * server.c (handle_query): Call handle_new_gdb_connection.
3240 * server.h (report_fork_events): Declare global flag.
3241 * target.h (struct target_ops) <handle_new_gdb_connection>:
3242 New member.
3243 (target_handle_new_gdb_connection): New macro.
3244 * win32-low.c: Initialize new structure member.
3245
ddcbc397
DB
32462015-05-12 Don Breazeal <donb@codesourcery.com>
3247
3248 * mem-break.c (APPEND_TO_LIST): Define macro.
3249 (clone_agent_expr): New function.
3250 (clone_one_breakpoint): New function.
3251 (clone_all_breakpoints): New function.
3252 * mem-break.h: Declare new functions.
3253
89245bc0
DB
32542015-05-12 Don Breazeal <donb@codesourcery.com>
3255
3256 * linux-low.c (linux_supports_fork_events): New function.
3257 (linux_supports_vfork_events): New function.
3258 (linux_target_ops): Initialize new structure members.
3259 (initialize_low): Call linux_check_ptrace_features.
3260 * lynx-low.c (lynx_target_ops): Initialize new structure
3261 members.
3262 * server.c (report_fork_events, report_vfork_events):
3263 New global flags.
3264 (handle_query): Add new features to qSupported packet and
3265 response.
3266 (captured_main): Initialize new global variables.
3267 * target.h (struct target_ops) <supports_fork_events>:
3268 New member.
3269 <supports_vfork_events>: New member.
3270 (target_supports_fork_events): New macro.
3271 (target_supports_vfork_events): New macro.
3272 * win32-low.c (win32_target_ops): Initialize new structure
3273 members.
3274
835205d0
GB
32752015-05-12 Gary Benson <gbenson@redhat.com>
3276
3277 * server.c (handle_qxfer_exec_file): Use current process
3278 if annex is empty.
3279
21e94bd9
SL
32802015-05-08 Sandra Loosemore <sandra@codesourcery.com>
3281
3282 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
3283 Remove HAVE_PTRACE_GETREGS conditionals.
3284 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
3285 instead of PTRACE_GETREGS and PTRACE_SETREGS.
3286
45614f15
YQ
32872015-05-08 Yao Qi <yao.qi@linaro.org>
3288
3289 * linux-low.c (linux_supports_conditional_breakpoints): New
3290 function.
3291 (linux_target_ops): Install new target method.
3292 * lynx-low.c (lynx_target_ops): Install NULL hook for
3293 supports_conditional_breakpoints.
3294 * nto-low.c (nto_target_ops): Likewise.
3295 * spu-low.c (spu_target_ops): Likewise.
3296 * win32-low.c (win32_target_ops): Likewise.
3297 * server.c (handle_query): Check
3298 target_supports_conditional_breakpoints.
3299 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3300 New field.
3301 (target_supports_conditional_breakpoints): New macro.
3302
80ad801e
PA
33032015-05-06 Pedro Alves <palves@redhat.com>
3304
3305 PR server/18081
3306 * server.c (start_inferior): If the process exits, mourn it.
3307
819843c7
GB
33082015-04-21 Gary Benson <gbenson@redhat.com>
3309
3310 * hostio.c (fileio_open_flags_to_host): Factored out to
3311 fileio_to_host_openflags in common/fileio.c. Single use
3312 updated.
3313
a2d5a9d7
MF
33142015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3315
3316 * linux-xtensa-low.c (xtensa_fill_gregset)
3317 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
3318 XCHAL_HAVE_LOOP.
3319
deb44829
MF
33202015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3321
3322 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
3323 (regs_info): Replace usrregs pointer with NULL.
3324
e57f1de3
GB
33252015-04-17 Gary Benson <gbenson@redhat.com>
3326
3327 * target.h (struct target_ops) <pid_to_exec_file>: New field.
3328 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
3329 * server.c (handle_qxfer_exec_file): New function.
3330 (qxfer_packets): Add exec-file entry.
3331 (handle_query): Report qXfer:exec-file:read as supported packet.
3332
62828379
RN
33332015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
3334
3335 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
3336
b88bb450
GB
33372015-04-09 Gary Benson <gbenson@redhat.com>
3338
3339 * hostio-errno.c (errno_to_fileio_error): Remove function.
3340 Update caller to use remote_fileio_to_fio_error.
3341
c8f4bfdd
YQ
33422015-04-09 Yao Qi <yao.qi@linaro.org>
3343
3344 * linux-low.c (linux_insert_point): Call
3345 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
3346 (linux_remove_point): Call remove_memory_breakpoint if type is
3347 raw_bkpt_type_sw.
3348 * linux-x86-low.c (x86_insert_point): Don't call
3349 insert_memory_breakpoint.
3350 (x86_remove_point): Don't call remove_memory_breakpoint.
3351
41f98f02
PA
33522015-04-01 Pedro Alves <palves@redhat.com>
3353 Cleber Rosa <crosa@redhat.com>
3354
3355 * server.c (gdbserver_usage): Reorganize and extend the usage
3356 message.
3357
2bf6fb9d
PA
33582015-03-24 Pedro Alves <palves@redhat.com>
3359
3360 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
3361 output. Also dump TRAP_TRACE.
3362 (linux_low_filter_event): In debug output, distinguish a
3363 resume_stop SIGSTOP from a delayed SIGSTOP.
3364
369f6daa
GB
33652015-03-24 Gary Benson <gbenson@redhat.com>
3366
3367 * linux-x86-low.c (x86_linux_new_thread): Moved to
3368 nat/x86-linux.c.
3369 (x86_linux_prepare_to_resume): Likewise.
3370
8e5d4070
GB
33712015-03-24 Gary Benson <gbenson@redhat.com>
3372
3373 * Makefile.in (x86-linux-dregs.o): New rule.
3374 * configure.srv: Add x86-linux-dregs.o to relevant targets.
3375 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
3376 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
3377 (x86_linux_dr_get): Likewise.
3378 (x86_linux_dr_set): Likewise.
3379 (update_debug_registers_callback): Likewise.
3380 (x86_linux_dr_set_addr): Likewise.
3381 (x86_linux_dr_get_addr): Likewise.
3382 (x86_linux_dr_set_control): Likewise.
3383 (x86_linux_dr_get_control): Likewise.
3384 (x86_linux_dr_get_status): Likewise.
3385 (x86_linux_update_debug_registers): Likewise.
3386
2b95d440
GB
33872015-03-24 Gary Benson <gbenson@redhat.com>
3388
3389 * linux-x86-low.c (x86_linux_update_debug_registers):
3390 New function, factored out from...
3391 (x86_linux_prepare_to_resume): ...this.
3392
14b0bc68
GB
33932015-03-24 Gary Benson <gbenson@redhat.com>
3394
3395 * linux-x86-low.c (x86_linux_dr_get): Update comments.
3396 (x86_linux_dr_set): Likewise.
3397 (update_debug_registers_callback): Likewise.
3398 (x86_linux_dr_set_addr): Likewise.
3399 (x86_linux_dr_get_addr): Likewise.
3400 (x86_linux_dr_set_control): Likewise.
3401 (x86_linux_dr_get_control): Likewise.
3402 (x86_linux_dr_get_status): Likewise.
3403 (x86_linux_prepare_to_resume): Likewise.
3404
5dfe6ca8
GB
34052015-03-24 Gary Benson <gbenson@redhat.com>
3406
3407 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
3408 Use perror_with_name. Pass string through gettext.
3409 (x86_linux_dr_set): Likewise.
3410
d33472ad
GB
34112015-03-24 Gary Benson <gbenson@redhat.com>
3412
3413 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
3414 (x86_linux_dr_set_addr): ...this.
3415 (x86_dr_low_get_addr): Rename to...
3416 (x86_linux_dr_get_addr): ...this.
3417 (x86_dr_low_set_control): Rename to...
3418 (x86_linux_dr_set_control): ...this.
3419 (x86_dr_low_get_control): Rename to...
3420 (x86_linux_dr_get_control): ...this.
3421 (x86_dr_low_get_status): Rename to...
3422 (x86_linux_dr_get_status): ...this.
3423 (x86_dr_low): Update with new function names.
3424
4b134ca1
GB
34252015-03-24 Gary Benson <gbenson@redhat.com>
3426
3427 * Makefile.in (x86-linux.o): New rule.
3428 * configure.srv: Add x86-linux.o to relevant targets.
3429 * linux-low.c (lwp_set_arch_private_info): New function.
3430 (lwp_arch_private_info): Likewise.
3431 * linux-x86-low.c: Include nat/x86-linux.h.
3432 (arch_lwp_info): Removed structure.
3433 (update_debug_registers_callback):
3434 Use lwp_set_debug_registers_changed.
3435 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
3436 and lwp_set_debug_registers_changed.
3437 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
3438
34c703da
GB
34392015-03-24 Gary Benson <gbenson@redhat.com>
3440
3441 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
3442 * linux-arm-low.c (arm_new_thread): Likewise.
3443 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
3444 * linux-mips-low.c (mips_linux_new_thread): Likewise.
3445 * linux-x86-low.c (x86_linux_new_thread): Likewise.
3446 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
3447
cff068da
GB
34482015-03-24 Gary Benson <gbenson@redhat.com>
3449
3450 * linux-low.c (ptid_of_lwp): New function.
3451 (lwp_is_stopped): Likewise.
3452 (lwp_stop_reason): Likewise.
3453 * linux-x86-low.c (update_debug_registers_callback):
3454 Use lwp_is_stopped.
3455 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
3456 lwp_stop_reason.
3457
b2f7c7e8
GB
34582015-03-24 Gary Benson <gbenson@redhat.com>
3459
3460 * linux-low.h (linux_stop_lwp): Remove declaration.
3461
6d4ee8c6
GB
34622015-03-24 Gary Benson <gbenson@redhat.com>
3463
3464 * linux-low.h: Include nat/linux-nat.h.
3465 * linux-low.c (iterate_over_lwps_args): New structure.
3466 (iterate_over_lwps_filter): New function.
3467 (iterate_over_lwps): Likewise.
3468 * linux-x86-low.c (update_debug_registers_callback):
3469 Update signature to what iterate_over_lwps expects.
3470 Remove PID check that iterate_over_lwps now performs.
3471 (x86_dr_low_set_addr): Use iterate_over_lwps.
3472 (x86_dr_low_set_control): Likewise.
3473
70a0bb6b
GB
34742015-03-24 Gary Benson <gbenson@redhat.com>
3475
3476 * linux-x86-low.c (x86_debug_reg_state): New function.
3477 (x86_linux_prepare_to_resume): Use the above.
3478
7b669087
GB
34792015-03-24 Gary Benson <gbenson@redhat.com>
3480
3481 * linux-low.c (current_lwp_ptid): New function.
3482 * linux-x86-low.c: Include nat/linux-nat.h.
3483 (x86_dr_low_get_addr): Use current_lwp_ptid.
3484 (x86_dr_low_get_control): Likewise.
3485 (x86_dr_low_get_status): Likewise.
3486
eef49a3d
PA
34872015-03-20 Pedro Alves <palves@redhat.com>
3488
3489 * tracepoint.c (cmd_qtstatus): Make "str" const.
3490
b2333d22
PA
34912015-03-20 Pedro Alves <palves@redhat.com>
3492
3493 * server.c (handle_general_set): Make "req_str" const.
3494
23f238d3
PA
34952015-03-19 Pedro Alves <palves@redhat.com>
3496
3497 * linux-low.c (linux_resume_one_lwp): Rename to ...
3498 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
3499 instead call perror_with_name.
3500 (check_ptrace_stopped_lwp_gone): New function.
3501 (linux_resume_one_lwp): Reimplement as wrapper around
3502 linux_resume_one_lwp_throw that swallows errors if the LWP is
3503 gone.
3504
91baf43f
PA
35052015-03-19 Pedro Alves <palves@redhat.com>
3506
3507 * linux-low.c (count_events_callback, select_event_lwp_callback):
3508 No longer check whether the thread has resume_stop as last resume
3509 kind.
3510
8bf3b159
PA
35112015-03-19 Pedro Alves <palves@redhat.com>
3512
3513 * linux-low.c (count_events_callback, select_event_lwp_callback):
3514 Use the lwp's status_pending_p field, not the thread's.
3515
b90fc188
PA
35162015-03-19 Pedro Alves <palves@redhat.com>
3517
3518 * linux-low.c (select_event_lwp_callback): Update comments to
3519 no longer mention SIGTRAP.
3520
464b0089
GB
35212015-03-18 Gary Benson <gbenson@redhat.com>
3522
3523 * server.c (handle_query): Do not report vFile:fstat as supported.
3524
aa9e327f
GB
35252015-03-11 Gary Benson <gbenson@redhat.com>
3526
3527 * hostio.c (sys/types.h): New include.
3528 (sys/stat.h): Likewise.
3529 (common-remote-fileio.h): Likewise.
3530 (handle_fstat): New function.
3531 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 3532
791c0056
GB
35332015-03-11 Gary Benson <gbenson@redhat.com>
3534
3535 * configure.ac (AC_CHECK_MEMBERS): Add checks for
3536 struct stat.st_blocks and struct stat.st_blksize.
3537 * configure: Regenerate.
3538 * config.in: Likewise.
3539 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
3540 (OBS): Add common-remote-fileio.o.
3541 (common-remote-fileio.o): New rule.
3542
9a9df970
PA
35432015-03-09 Pedro Alves <palves@redhat.com>
3544
3545 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
3546 'struct sockaddr' pointer in 'accept' call.
3547
9eb1356e
PA
35482015-03-09 Pedro Alves <palves@redhat.com>
3549
3550 Revert:
3551 2015-03-07 Pedro Alves <palves@redhat.com>
3552 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3553 or <winsock2.h> here. Instead include "gdb_socket.h".
3554 (remote_open): Use union gdb_sockaddr_u.
3555 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3556 or <winsock2.h> here. Instead include "gdb_socket.h".
3557 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3558 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3559 or <sys/un.h>.
3560 (init_named_socket, gdb_agent_helper_thread): Use union
3561 gdb_sockaddr_u.
3562
aac331e4
PA
35632015-03-07 Pedro Alves <palves@redhat.com>
3564
3565 * configure.ac (build_warnings): Move
3566 -Wdeclaration-after-statement to the C-specific set.
3567 * configure: Regenerate.
3568
366c75fc
PA
35692015-03-07 Pedro Alves <palves@redhat.com>
3570
3571 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3572 or <winsock2.h> here. Instead include "gdb_socket.h".
3573 (remote_open): Use union gdb_sockaddr_u.
3574 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3575 or <winsock2.h> here. Instead include "gdb_socket.h".
3576 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3577 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3578 or <sys/un.h>.
3579 (init_named_socket, gdb_agent_helper_thread): Use union
3580 gdb_sockaddr_u.
3581
492d29ea
PA
35822015-03-07 Pedro Alves <palves@redhat.com>
3583
3584 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
3585 instead.
3586
60a191ed
YQ
35872015-03-06 Yao Qi <yao.qi@linaro.org>
3588
3589 * linux-aarch64-low.c (aarch64_insert_point): Use
3590 show_debug_regs as a boolean.
3591 (aarch64_remove_point): Likewise.
3592
f5771b1d
PA
35932015-03-05 Pedro Alves <palves@redhat.com>
3594
3595 * lynx-low.c (lynx_target_ops): Install NULL hooks for
3596 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
3597 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
3598 * nto-low.c (nto_target_ops): Likewise.
3599 * spu-low.c (spu_target_ops): Likewise.
3600 * win32-low.c (win32_target_ops): Likewise.
3601
3e572f71
PA
36022015-03-04 Pedro Alves <palves@redhat.com>
3603
72f4393d 3604 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
3605 Decide whether a breakpoint triggered based on the SIGTRAP's
3606 siginfo.si_code.
72f4393d
L
3607 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
3608 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
3609 (linux_low_filter_event): Check for breakpoints before checking
3610 watchpoints.
3611 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
3612 siginfo.si_code.
72f4393d
L
3613 (linux_stopped_by_sw_breakpoint)
3614 (linux_supports_stopped_by_sw_breakpoint)
3615 (linux_stopped_by_hw_breakpoint)
3616 (linux_supports_stopped_by_hw_breakpoint): New functions.
3617 (linux_target_ops): Install new target methods.
3e572f71 3618
1ec68e26
PA
36192015-03-04 Pedro Alves <palves@redhat.com>
3620
3621 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
3622 * server.c (swbreak_feature, hwbreak_feature): New globals.
3623 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
3624 (captured_main): Clear swbreak_feature and hwbreak_feature.
3625 * server.h (swbreak_feature, hwbreak_feature): Declare.
3626 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
3627 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
3628 supports_stopped_by_hw_breakpoint>: New fields.
3629 (target_supports_stopped_by_sw_breakpoint)
3630 (target_stopped_by_sw_breakpoint)
3631 (target_supports_stopped_by_hw_breakpoint)
3632 (target_stopped_by_hw_breakpoint): Declare.
3633
15c66dd6
PA
36342015-03-04 Pedro Alves <palves@redhat.com>
3635
3636 enum lwp_stop_reason -> enum target_stop_reason
3637 * linux-low.c (check_stopped_by_breakpoint): Adjust.
3638 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
3639 (linux_wait_1, stuck_in_jump_pad_callback)
3640 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
3641 (linux_stopped_by_watchpoint):
3642 * linux-low.h (enum lwp_stop_reason): Delete.
3643 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
3644 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3645
98fc70d6
YQ
36462015-03-04 Yao Qi <yao.qi@linaro.org>
3647
3648 * Makefile.in (SFILES): Add linux-aarch64-low.c.
3649
dd2ac174
GB
36502015-03-03 Gary Benson <gbenson@redhat.com>
3651
3652 * hostio.c (handle_vFile): Fix prefix lengths.
3653
d68e53f4
MM
36542015-03-03 Markus Metzger <markus.t.metzger@intel.com>
3655
3656 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
3657 ptr_bits.
3658
bf2d68ab
AA
36592015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
3660
3661 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
3662 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
3663 (clean): Add "rm -f" for above C files.
3664 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
3665 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
3666 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
3667 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
3668 * linux-s390-low.c (HWCAP_S390_VX): New macro.
3669 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
3670 (init_registers_s390x_vx_linux64)
3671 (init_registers_s390x_tevx_linux64)
3672 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
3673 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
3674 declarations.
3675 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
3676 (s390_store_vxrs_high): New functions.
3677 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
3678 NT_S390_VXRS_HIGH.
3679 (s390_arch_setup): Add logic for selecting one of the new target
3680 descriptions. Activate the new vector regsets if applicable.
3681 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
3682 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
3683 and init_registers_s390x_tevx_linux64.
3684
c966a859
PA
36852015-03-01 Pedro Alves <palves@redhat.com>
3686
3687 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
3688 parameter.
3689
4180215b
PA
36902015-02-27 Pedro Alves <palves@redhat.com>
3691
3692 * linux-x86-low.c (u_debugreg_offset): New function.
3693 (x86_linux_dr_get, x86_linux_dr_set): Use it.
3694
749bab01
PA
36952015-02-27 Pedro Alves <palves@redhat.com>
3696
3697 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
3698 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
3699 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
3700 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3701 (ps_lsetfpregs, ps_getpid)
3702 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
3703 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
3704 (ps_lsetxregs, ps_plog): Declare.
3705
3c14e5a3
PA
37062015-02-27 Pedro Alves <palves@redhat.com>
3707
3708 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
3709 IP_AGENT_EXPORT_FUNC.
3710 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
3711 IP_AGENT_EXPORT_FUNC.
3712 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
3713 (IP_AGENT_EXPORT): Delete.
3714 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3715 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3716 (gdb_trampoline_buffer_error, collecting, gdb_collect)
3717 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
3718 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
3719 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
3720 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
3721 (traceframe_read_count, traceframe_write_count)
3722 (traceframes_created, trace_state_variables, get_raw_reg)
3723 (get_trace_state_variable_value, set_trace_state_variable_value)
3724 (ust_loaded, helper_thread_id, cmd_buf): Use
3725 IPA_SYM_EXPORTED_NAME.
3726 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
3727 (tracepoints) Use IP_AGENT_EXPORT_VAR.
3728 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
3729 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3730 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
3731 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
3732 EXTERN_C_PUSH/EXTERN_C_POP.
3733 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
3734 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
3735 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3736 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
3737 (traceframe_write_count, traceframe_read_count)
3738 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
3739 (about_to_request_buffer_space, get_trace_state_variable_value)
3740 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
3741 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
3742 EXTERN_C_PUSH/EXTERN_C_POP.
3743 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
3744 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
3745 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
3746 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3747 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3748 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3749 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
3750 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
3751 Define.
3752 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
3753 (IP_AGENT_EXPORT_VAR_DECL): Define.
3754 (tracing): Declare.
3755 (gdb_agent_get_raw_reg): Declare.
3756
fe978cb0
PA
37572015-02-27 Tom Tromey <tromey@redhat.com>
3758 Pedro Alves <palves@redhat.com>
3759
3760 Rename symbols whose names are reserved C++ keywords throughout.
3761
3bc3d82a
PA
37622015-02-27 Pedro Alves <palves@redhat.com>
3763
3764 * Makefile.in (COMPILER): New, get it from autoconf.
3765 (CXX): Get from autoconf instead.
3766 (COMPILE.pre): Use COMPILER.
3767 (CC-LD): Rename to ...
3768 (CC_LD): ... this. Use COMPILER.
3769 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
3770 (CXX_FOR_TARGET): Default to g++ instead of gcc.
3771 * acinclude.m4: Include build-with-cxx.m4.
3772 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
3773 Disable -Werror by default if building in C++ mode.
3774 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
3775 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
3776 the C++ compiler. Save/restore CXXFLAGS too.
3777 * configure: Regenerate.
3778
07697489
PA
37792015-02-27 Pedro Alves <palves@redhat.com>
3780
3781 * acinclude.m4: Include libiberty.m4.
3782 * configure.ac: Call libiberty_INIT.
3783 * config.in, configure: Regenerate.
3784
9beb7c4e
PA
37852015-02-26 Pedro Alves <palves@redhat.com>
3786
3787 * linux-low.c (linux_wait_1): When incrementing the PC past a
3788 program breakpoint always use the_low_target.breakpoint_len as
3789 increment, rather than the maximum between that and
3790 the_low_target.decr_pc_after_break.
3791
8090aef2
PA
37922015-02-23 Pedro Alves <palves@redhat.com>
3793
3794 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
3795 thread was doing a step-over; always adjust the PC if
3796 we stepped over a permanent breakpoint.
3797 (linux_wait_1): If we stepped over breakpoint that was on top of a
3798 permanent breakpoint, manually advance the PC past it.
3799
bc9540e8
PA
38002015-02-23 Pedro Alves <palves@redhat.com>
3801
3802 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
3803 modes.
3804 (x86_fill_gregset, x86_store_gregset): Use it when handling
3805 $orig_eax.
3806
2db9a427
PA
38072015-02-20 Pedro Alves <palves@redhat.com>
3808
3809 * thread-db.c: Include "nat/linux-procfs.h".
3810 (thread_db_init): Skip listing new threads if the kernel supports
3811 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
3812
afa8d396
PA
38132015-02-20 Pedro Alves <palves@redhat.com>
3814
3815 * linux-low.c (status_pending_p_callback): Use ptid_match.
3816
c9587f88
AT
38172015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
3818
3819 PR breakpoints/16812
3820 * linux-low.c (wstatus_maybe_breakpoint): Remove.
3821 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
3822 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
3823
b05ec7a5
AT
38242015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
3825
3826 PR breakpoints/15956
3827 * tracepoint.c (cmd_qtinit): Add check for current_thread.
3828
d33501a5
MM
38292015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3830
3831 * linux-low.c (linux_low_btrace_conf): Print size.
3832 * server.c (handle_btrace_conf_general_set): New.
3833 (hanle_general_set): Call handle_btrace_conf_general_set.
3834 (handle_query): Report Qbtrace-conf:bts:size as supported.
3835
f4abbc16
MM
38362015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3837
3838 * linux-low.c (linux_low_enable_btrace): Update parameters.
3839 (linux_low_btrace_conf): New.
3840 (linux_target_ops)<to_btrace_conf>: Initialize.
3841 * server.c (current_btrace_conf): New.
3842 (handle_btrace_enable): Rename to ...
3843 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
3844 to target_enable_btrace. Update comment. Update users.
3845 (handle_qxfer_btrace_conf): New.
3846 (qxfer_packets): Add btrace-conf entry.
3847 (handle_query): Report qXfer:btrace-conf:read as supported packet.
3848 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
3849 (target_ops)<read_btrace_conf>: New.
3850 (target_enable_btrace): Update parameters.
3851 (target_read_btrace_conf): New.
3852
043c3577
MM
38532015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3854
3855 * server.c (handle_btrace_general_set): Remove call to
3856 target_supports_btrace.
3857 (supported_btrace_packets): New.
3858 (handle_query): Call supported_btrace_packets.
3859 * target.h: include btrace-common.h.
3860 (btrace_target_info): Removed.
3861 (supports_btrace, target_supports_btrace): Update parameters.
3862
734b0e4b
MM
38632015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3864
3865 * Makefile.in (SFILES): Add common/btrace-common.c.
3866 (OBS): Add common/btrace-common.o.
3867 (btrace-common.o): Add build rules.
3868 * linux-low: Include btrace-common.h.
3869 (linux_low_read_btrace): Use struct btrace_data. Call
3870 btrace_data_init and btrace_data_fini.
3871
d6c146e9
PA
38722015-02-06 Pedro Alves <palves@redhat.com>
3873
3874 * thread-db.c (find_new_threads_callback): Add debug output.
3875
20ba1ce6
PA
38762015-02-04 Pedro Alves <palves@redhat.com>
3877
3878 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
3879 (resume_stopped_resumed_lwps): New function.
3880 (linux_wait_for_event_filtered): Use it.
3881
8cc73a39
SDJ
38822015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
3883
3884 * Makefile.in (SFILES): Add linux-personality.c.
3885 (linux-personality.o): New rule.
3886 * configure.srv (srv_linux_obj): Add linux-personality.o to the
3887 list of objects to be built.
3888 * linux-low.c: Include nat/linux-personality.h.
3889 (linux_create_inferior): Remove code to disable address space
3890 randomization (moved to ../nat/linux-personality.c). Create
3891 cleanup to disable address space randomization.
3892
fb23d554
SDJ
38932015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
3894
3895 * Makefile.in (posix-strerror.o): New rule.
3896 (mingw-strerror.o): Likewise.
3897 * configure: Regenerated.
3898 * configure.ac: Source file ../common/common.host. Initialize new
3899 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
3900
cdf43629
YQ
39012015-01-14 Yao Qi <yao@codesourcery.com>
3902
3903 * Makefile.in (SFILES): Add nat/ppc-linux.c.
3904 (ppc-linux.o): New rule.
3905 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
3906 * configure.ac: AC_CHECK_FUNCS(getauxval).
3907 * config.in: Re-generated.
3908 * configure: Re-generated.
3909 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
3910 ppc64_64bit_inferior_p
3911
514c5338
YQ
39122015-01-14 Yao Qi <yao@codesourcery.com>
3913
3914 * linux-ppc-low.c: Include "nat/ppc-linux.h".
3915 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
3916 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
3917 (PT_ORIG_R3, PT_TRAP): Likewise.
3918 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
3919 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
3920 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
3921
3368c1e5
JB
39222015-01-10 Joel Brobecker <brobecker@adacore.com>
3923
3924 * i387-fp.c (i387_cache_to_xsave): In look over
3925 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
3926 zmmh_low_space field by use of zmmh_high_space.
3927
582511be
PA
39282015-01-09 Pedro Alves <palves@redhat.com>
3929
3930 * linux-low.c (step_over_bkpt): Move higher up in the file.
3931 (handle_extended_wait): Don't store the stop_pc here.
3932 (get_stop_pc): Adjust comments and rename to ...
3933 (check_stopped_by_breakpoint): ... this. Record whether the LWP
3934 stopped for a software breakpoint or hardware breakpoint.
3935 (thread_still_has_status_pending_p): New function.
3936 (status_pending_p_callback): Use
3937 thread_still_has_status_pending_p. If the event is no longer
3938 interesting, resume the LWP.
3939 (handle_tracepoints): Add assert.
3940 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
3941 (wstatus_maybe_breakpoint): New function.
3942 (cancel_breakpoint): Delete function.
3943 (check_stopped_by_watchpoint): New function, factored out from
3944 linux_low_filter_event.
3945 (lp_status_maybe_breakpoint): Delete function.
3946 (linux_low_filter_event): Remove filter_ptid argument.
3947 Leave thread group exits pending here. Store the LWP's stop PC.
3948 Always leave events pending.
3949 (linux_wait_for_event_filtered): Pull all events out of the
3950 kernel, and leave them all pending.
3951 (count_events_callback, select_event_lwp_callback): Consider all
3952 events.
3953 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
3954 (select_event_lwp): Only give preference to the stepping LWP in
3955 all-stop mode. Adjust comments.
3956 (ignore_event): New function.
3957 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
3958 references to cancel_breakpoints. Adjust to renames. Also give
3959 equal priority to all LWPs that have had events in non-stop mode.
3960 If reporting a software breakpoint event, unadjust the LWP's PC.
3961 (linux_wait): If linux_wait_1 returned an ignored event, retry.
3962 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
3963 Adjust.
3964 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
3965 (resume_status_pending_p): Use thread_still_has_status_pending_p.
3966 (linux_stopped_by_watchpoint): Adjust.
3967 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
3968 * linux-low.h (enum lwp_stop_reason): New.
3969 (struct lwp_info) <stop_pc>: Adjust comment.
3970 <stopped_by_watchpoint>: Delete field.
3971 <stop_reason>: New field.
3972 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3973 * mem-break.c (software_breakpoint_inserted_here)
3974 (hardware_breakpoint_inserted_here): New function.
3975 * mem-break.h (software_breakpoint_inserted_here)
3976 (hardware_breakpoint_inserted_here): Declare.
3977 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
3978 (cancel_breakpoints): Delete.
3979 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
3980 (upload_fast_traceframes): Remove references to
3981 cancel_breakpoints.
3982
a33e3959
PA
39832015-01-09 Pedro Alves <palves@redhat.com>
3984
3985 * thread-db.c (find_new_threads_callback): Ignore thread if the
3986 kernel thread ID is -1.
3987
8784d563
PA
39882015-01-09 Pedro Alves <palves@redhat.com>
3989
3990 * linux-low.c (linux_attach_fail_reason_string): Move to
3991 nat/linux-ptrace.c, and rename.
3992 (linux_attach_lwp): Update comment.
3993 (attach_proc_task_lwp_callback): New function.
3994 (linux_attach): Adjust to rename and use
3995 linux_proc_attach_tgid_threads.
3996 (linux_attach_fail_reason_string): Delete declaration.
3997
76f2b779
JB
39982015-01-01 Joel Brobecker <brobecker@adacore.com>
3999
4000 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
4001 * server.c (gdbserver_version): Likewise.
4002
fafcc06a
SDJ
40032014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
4004
4005 * remote-utils.c: Include ctype.h.
4006 (input_interrupt): Explicitly handle the case when the char
4007 received is the NUL byte. Improve the printing of non-ASCII
4008 characters.
4009
beed38b8
JB
40102014-12-16 Joel Brobecker <brobecker@adacore.com>
4011
4012 * linux-low.c (linux_low_filter_event): Update call to
4013 linux_enable_event_reporting following the addition of
4014 a new parameter to that function.
4015
bf330350
CU
40162014-12-16 Catalin Udma <catalin.udma@freescale.com>
4017
4018 PR server/17457
4019 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
4020 (AARCH64_FPCR_REGNO): Likewise.
4021 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
4022 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
4023 (aarch64_store_fpregset): Likewise.
4024
5227d625
JB
40252014-12-15 Joel Brobecker <brobecker@adacore.com>
4026
4027 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
4028 Remove FIXME comment about assumption about N.
4029
f93b65a0
JB
40302014-12-13 Joel Brobecker <brobecker@adacore.com>
4031
4032 * configure.ac: If large-file support is disabled in GDBserver,
4033 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
4034 * configure: Regenerate.
4035
e5a9158d
AA
40362014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4037
4038 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
4039 warning upon ENODATA from ptrace.
4040 * linux-s390-low.c (s390_store_tdb): New.
4041 (s390_regsets): Add regset for NT_S390_TDB.
4042
feea5f36
AA
40432014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4044
4045 * linux-low.c (regsets_store_inferior_registers): Skip regsets
4046 without a fill_function.
4047 * linux-s390-low.c (s390_fill_last_break): Remove.
4048 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
4049 (s390_arch_setup): Use regset's size instead of fill_function for
4050 loop end condition.
4051
098dbe61
AA
40522014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4053
4054 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
4055 the regset's store function when ptrace returned an error.
4056 * regcache.c (get_thread_regcache): Invalidate register cache
4057 before fetching inferior's registers.
4058
28eef672
AA
40592014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4060
4061 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
4062 while-loop as for-loop.
4063 (regsets_store_inferior_registers): Likewise.
4064
bdca27a2
YQ
40652014-11-28 Yao Qi <yao@codesourcery.com>
4066
4067 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
4068 * config.in, configure: Re-generate.
4069 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
4070 is defined.
4071
9c232dda
YQ
40722014-11-21 Yao Qi <yao@codesourcery.com>
4073
4074 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
4075 (AC_CHECK_HEADERS): Remove malloc.h.
4076 * configure: Re-generated.
4077 * config.in: Re-generated.
4078 * server.h: Don't include alloca.h and malloc.h.
4079 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
4080 Don't include malloc.h.
4081
43968415
JB
40822014-11-17 Joel Brobecker <brobecker@adacore.com>
4083
4084 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
4085 corresponding ERRNO check in same block.
4086
40e91bc7
PA
40872014-11-12 Pedro Alves <palves@redhat.com>
4088
4089 * server.c (cont_thread): Update comment.
4090 (start_inferior, attach_inferior): No longer clear cont_thread.
4091 (handle_v_cont): No longer set cont_thread.
4092 (captured_main): Clear cont_thread each time a GDB connects.
4093
c2c118cf
PA
40942014-11-12 Pedro Alves <palves@redhat.com>
4095
4096 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
4097 thread, and don't resume all threads if the Hc thread has exited.
4098
78708b7c
PA
40992014-11-12 Pedro Alves <palves@redhat.com>
4100
4101 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
4102 the process group instead of to a specific LWP.
4103
a2abc7de
PA
41042014-10-15 Pedro Alves <palves@redhat.com>
4105
4106 PR server/17487
4107 * win32-arm-low.c (arm_set_thread_context): Remove current_event
4108 parameter.
4109 (arm_set_thread_context): Delete.
4110 (the_low_target): Adjust.
4111 * win32-i386-low.c (debug_registers_changed)
4112 (debug_registers_used): Delete.
4113 (update_debug_registers_callback): New function.
4114 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
4115 needing to update their debug registers.
4116 (win32_get_current_dr): New function.
4117 (x86_dr_low_get_addr, x86_dr_low_get_control)
4118 (x86_dr_low_get_status): Fetch the debug register from the thread
4119 record's context.
4120 (i386_initial_stuff): Adjust.
4121 (i386_get_thread_context): Remove current_event parameter. Don't
4122 clear debug_registers_changed nor copy DR values to
4123 debug_reg_state.
4124 (i386_set_thread_context): Delete.
4125 (i386_prepare_to_resume): New function.
4126 (i386_thread_added): Mark the thread as needing to update irs
4127 debug registers.
4128 (the_low_target): Remove i386_set_thread_context and install
4129 i386_prepare_to_resume.
4130 * win32-low.c (win32_get_thread_context): Adjust.
4131 (win32_set_thread_context): Use SetThreadContext
4132 directly.
4133 (win32_prepare_to_resume): New function.
4134 (win32_require_context): New function, factored out from ...
4135 (thread_rec): ... this.
4136 (continue_one_thread): Call win32_prepare_to_resume on each thread
4137 we're about to continue.
4138 (win32_resume): Call win32_prepare_to_resume on the event thread.
4139 * win32-low.h (struct win32_thread_info)
4140 <debug_registers_changed>: New field.
4141 (struct win32_target_ops): Change prototype of set_thread_context,
4142 delete set_thread_context and add prepare_to_resume.
4143 (win32_require_context): New declaration.
4144
a442d071
GB
41452014-10-08 Gary Benson <gbenson@redhat.com>
4146
4147 * server.h: Do not include common-exceptions.h.
4148
6f1947e8
GB
41492014-10-08 Gary Benson <gbenson@redhat.com>
4150
4151 * server.h: Do not include cleanups.h.
4152
63b434a4
JH
41532014-09-30 James Hogan <james.hogan@imgtec.com>
4154
4155 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
4156 mips64-dsp-linux.c.
4157
c4d9ceb6
YQ
41582014-09-23 Yao Qi <yao@codesourcery.com>
4159
4160 * linux-low.c (lp_status_maybe_breakpoint): New function.
4161 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
4162 (count_events_callback): Likewise.
4163 (select_event_lwp_callback): Likewise.
4164 (cancel_breakpoints_callback): Likewise.
4165
89a5711c
DB
41662014-09-19 Don Breazeal <donb@codesourcery.com>
4167
4168 * linux-low.c (handle_extended_wait): Call
4169 linux_ptrace_get_extended_event.
4170 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
4171 linux_is_extended_waitstatus.
4172
bffc0964
JB
41732014-09-16 Joel Brobecker <brobecker@adacore.com>
4174
4175 * Makefile.in (CPPFLAGS): Define.
4176 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
4177 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
4178
0bfdf32f
GB
41792014-09-16 Gary Benson <gbenson@redhat.com>
4180
4181 * inferiors.h (current_inferior): Renamed as...
4182 (current_thread): New variable. All uses updated.
4183 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
4184 (maybe_move_out_of_jump_pad): Likewise.
4185 (cancel_breakpoint): Likewise.
4186 (linux_low_filter_event): Likewise.
4187 (wait_for_sigstop): Likewise.
4188 (linux_resume_one_lwp): Likewise.
4189 (need_step_over_p): Likewise.
4190 (start_step_over): Likewise.
4191 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
4192 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
4193 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
4194 and save_inferior as saved_thread.
4195 * regcache.c (get_thread_regcache): Renamed saved_inferior as
4196 saved_thread.
4197 (regcache_invalidate_thread): Likewise.
4198 * remote-utils.c (prepare_resume_reply): Likewise.
4199 * thread-db.c (thread_db_get_tls_address): Likewise.
4200 (disable_thread_event_reporting): Likewise.
4201 (remove_thread_event_breakpoints): Likewise.
4202 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
4203 as saved_thread.
4204 * target.h (set_desired_inferior): Renamed as...
4205 (set_desired_thread): New declaration. All uses updated.
4206 * server.c (myresume): Updated comment to reference thread instead
4207 of inferior.
4208 (handle_serial_event): Likewise.
4209 (handle_target_event): Likewise.
4210
361c8ade
GB
42112014-09-12 Tom Tromey <tromey@redhat.com>
4212 Gary Benson <gbenson@redhat.com>
4213
4214 * regcache.h: Include common-regcache.h.
4215 (regcache_read_pc): Don't declare.
4216 * regcache.c (get_thread_regcache_for_ptid): New function.
4217
bd9269f7
GB
42182014-09-11 Tom Tromey <tromey@redhat.com>
4219 Gary Benson <gbenson@redhat.com>
4220
4221 * symbol.c: New file.
4222 * Makefile.in (SFILES): Add symbol.c.
4223 (OBS): Add symbol.o.
4224
f8c1d06b
GB
42252014-09-11 Gary Benson <gbenson@redhat.com>
4226
4227 * target.c (target_stop_ptid, target_continue_ptid): New
4228 functions.
4229
721ec300
GB
42302014-09-11 Tom Tromey <tromey@redhat.com>
4231 Gary Benson <gbenson@redhat.com>
4232
4233 * target.h: Include target/target.h.
4234 * target.c (target_read_memory, target_read_uint32)
4235 (target_write_memory): New functions.
4236
c5e92cca
GB
42372014-09-11 Gary Benson <gbenson@redhat.com>
4238
4239 * server.h (debug_hw_points): Don't declare.
4240 * server.c (debug_hw_points): Don't define. Replace all uses
4241 with show_debug_regs.
4242 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
4243 all uses with show_debug_regs.
4244
2e4bb98a
EBM
42452014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
4246
4247 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
4248 endianness into account.
4249 (ppc_supply_ptrace_register): Likewise.
4250
ac740bc7
JH
42512014-09-03 James Hogan <james.hogan@imgtec.com>
4252
4253 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
4254 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
4255
97ea6506
GB
42562014-09-03 Gary Benson <gbenson@redhat.com>
4257
4258 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
4259 ALL_DEBUG_ADDRESS_REGISTERS.
4260
df7e5265
GB
42612014-09-02 Gary Benson <gbenson@redhat.com>
4262
4263 * i386-low.h: Renamed as...
4264 * x86-low.h: New file. All type, function and variable name
4265 prefixes changed from "i386_" to "x86_". All references updated.
4266 * i386-low.c: Renamed as...
4267 * x86-low.c: New file. All type, function and variable name
4268 prefixes changed from "i386_" to "x86_". All references updated.
4269
ed859da7
GB
42702014-09-02 Gary Benson <gbenson@redhat.com>
4271
4272 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
4273 (x86_linux_new_thread): Likewise.
4274
860789c7
GB
42752014-08-29 Gary Benson <gbenson@redhat.com>
4276
4277 * server.h (setjmp.h): Do not include.
4278 (toplevel): Do not declare.
4279 (common-exceptions.h): Include.
4280 (cleanups.h): Likewise.
4281 * server.c (toplevel): Do not define.
4282 (exit_code): New static global.
4283 (detach_or_kill_for_exit_cleanup): New function.
4284 (main): New function. Original main renamed to...
4285 (captured_main): New function.
4286 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
4287
ff55e1b5
GB
42882014-08-29 Gary Benson <gbenson@redhat.com>
4289
4290 * Makefile.in (SFILES): Add common/common-exceptions.c.
4291 (OBS): Add common-exceptions.o.
4292 (common-exceptions.o): New rule.
4293 * utils.c (prepare_to_throw_exception): New function.
4294
e9bcb658
GB
42952014-08-29 Gary Benson <gbenson@redhat.com>
4296
4297 * config.in: Regenerate.
4298 * configure: Likewise.
4299
e3180625
GB
43002014-08-29 Gary Benson <gbenson@redhat.com>
4301
4302 * Makefile.in (SFILES): Add common/cleanups.c.
4303 (OBS): cleanups.o.
4304 (cleanups.o): New rule.
4305
e3d6ba5d
GB
43062014-08-29 Gary Benson <gbenson@redhat.com>
4307
4308 * utils.c (internal_vwarning): New function.
4309
7096e886
GB
43102014-08-28 Gary Benson <gbenson@redhat.com>
4311
4312 * utils.h (fatal): Remove declaration.
4313 * utils.c (fatal): Remove function.
4314
14ce3192
GB
43152014-08-28 Gary Benson <gbenson@redhat.com>
4316
4317 * tracepoint.c (gdb_agent_init): Replace fatal with
4318 perror_with_name.
4319 (initialize_tracepoint): Likewise.
4320
50278d59
GB
43212014-08-28 Gary Benson <gbenson@redhat.com>
4322
4323 * remote-utils.c (remote_prepare): Replace fatal with error.
4324
aa96c426
GB
43252014-08-28 Gary Benson <gbenson@redhat.com>
4326
4327 * linux-low.c (linux_async): Replace fatal with warning.
4328 Tidy up and return.
4329 (linux_start_non_stop): Return -1 if linux_async failed.
4330
f7160e97
GB
43312014-08-28 Gary Benson <gbenson@redhat.com>
4332
4333 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
4334 gdb_assert.
4335 (i386_dr_low_get_addr): Remove vague comment.
4336 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
4337 gdb_assert.
4338
38e08fca
GB
43392014-08-28 Gary Benson <gbenson@redhat.com>
4340
4341 * inferiors.c (get_thread_process): Replace check with gdb_assert.
4342 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
4343 internal_error.
4344 (linux_resume_one_lwp): Likewise.
4345 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
4346 gdb_assert.
4347 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
4348 with internal_error.
4349 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
4350 (init_register_cache): Replace fatal with gdb_assert_not_reached.
4351 (find_register_by_name): Replace fatal with internal_error.
4352 (find_regno): Likewise.
4353 * tdesc.c (init_target_desc): Replace check with gdb_assert.
4354 * thread-db.c (thread_db_create_event): Likewise.
4355 (thread_db_load_search): Likewise.
4356 (try_thread_db_load_1): Likewise.
4357 * tracepoint.c (get_jump_space_head): Replace fatal with
4358 internal_error.
4359 (claim_trampoline_space): Likewise.
4360 (have_fast_tracepoint_trampoline_buffer): Likewise.
4361 (cmd_qtstart): Likewise.
4362 (stop_tracing): Likewise.
4363 (fast_tracepoint_collecting): Likewise.
4364 (target_malloc): Likewise.
4365 (download_tracepoint): Likewise.
4366 (download_trace_state_variables): Replace check with gdb_assert.
4367 (upload_fast_traceframes): Replace fatal with internal_error.
4368
34abf635
GB
43692014-08-19 Tom Tromey <tromey@redhat.com>
4370 Gary Benson <gbenson@redhat.com>
4371
4372 * Makefile.in (SFILES): Add common/common-debug.c.
4373 (OBS): Add common-debug.o.
4374 (common-debug.o): New rule.
4375 * debug.h (debug_printf): Don't declare.
4376 * debug.c (debug_printf): Renamed and rewritten as...
4377 (debug_vprintf): New function.
4378
f6e94d78
GB
43792014-08-19 Gary Benson <gbenson@redhat.com>
4380
4381 * utils.h: Do not include print-utils.h.
4382
9239eeab
GB
43832014-08-19 Tom Tromey <tromey@redhat.com>
4384 Gary Benson <gbenson@redhat.com>
4385
4386 * server.h: Add static assertion.
4387 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
4388
ef87c8bb
GB
43892014-08-19 Tom Tromey <tromey@redhat.com>
4390 Gary Benson <gbenson@redhat.com>
4391
4392 * Makefile.in (SFILES): Add common/errors.c.
4393 (OBS): Add errors.o.
4394 (IPA_OBS): Add errors-ipa.o.
4395 (errors.o): New rule.
4396 (errors-ipa.o): Likewise.
4397 * utils.h (perror_with_name, error, warning): Don't declare.
4398 * utils.c (warning): Renamed and rewritten as...
4399 (vwarning): New function.
4400 (error): Renamed and rewritten as...
4401 (verror): New function.
4402 (internal_error): Renamed and rewritten as...
4403 (internal_verror): New function.
4404
bb974a24
GB
44052014-08-07 Gary Benson <gbenson@redhat.com>
4406
4407 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
4408 * configure: Regenerate.
4409 * config.in: Likewise.
4410 * server.h: Do not include errno.h.
4411 * event-loop.c: Likewise.
4412 * hostio-errno.c: Likewise.
4413 * linux-low.c: Likewise.
4414 * remote-utils.c: Likewise.
4415 * spu-low.c: Likewise.
4416 * utils.c: Likewise.
4417 * gdbreplay.c: Unconditionally include errno.h.
4418
6d3d12eb
GB
44192014-08-07 Gary Benson <gbenson@redhat.com>
4420
4421 * server.h: Do not include string.h.
4422 * event-loop.c: Likewise.
4423 * linux-low.c: Likewise.
4424 * regcache.c: Likewise.
4425 * remote-utils.c: Likewise.
4426 * spu-low.c: Likewise.
4427 * utils.c: Likewise.
4428
dccbb609
GB
44292014-08-07 Gary Benson <gbenson@redhat.com>
4430
4431 * server.h: Do not include gdb_assert.h.
4432
e76df0d0
GB
44332014-08-07 Gary Benson <gbenson@redhat.com>
4434
4435 * server.h: Do not include common-utils.h.
4436
4cb9c816
GB
44372014-08-07 Gary Benson <gbenson@redhat.com>
4438
4439 * server.h: Do not include ptid.h.
4440 * notif.h: Likewise.
4441
3995eeee
GB
44422014-08-07 Gary Benson <gbenson@redhat.com>
4443
4444 * server.h: Do not include gdb_locale.h.
4445
cb9f1a9b
GB
44462014-08-07 Gary Benson <gbenson@redhat.com>
4447
4448 * server.h: Do not include gdb/signals.h.
4449 * win32-low.c: Likewise.
4450
a5fceff8
GB
44512014-08-07 Gary Benson <gbenson@redhat.com>
4452
4453 * server.h: Do not include pathmax.h.
4454
b9391142
GB
44552014-08-07 Gary Benson <gbenson@redhat.com>
4456
4457 * server.h: Do not include libiberty.h.
4458 * linux-bfin-low.c: Likewise.
4459
0e443c87
GB
44602014-08-07 Gary Benson <gbenson@redhat.com>
4461
4462 * server.h: Do not include ansidecl.h.
4463
8ebb3f56
GB
44642014-08-07 Gary Benson <gbenson@redhat.com>
4465
4466 * linux-x86-low.c: Do not include stddef.h.
4467 * lynx-ppc-low.c: Likewise.
4468 * tracepoint.c: Likewise.
4469
8980bdf6
GB
44702014-08-07 Gary Benson <gbenson@redhat.com>
4471
4472 * server.h: Do not include stdarg.h.
4473 * nto-low.c: Likewise.
4474
d7096f71
GB
44752014-08-07 Gary Benson <gbenson@redhat.com>
4476
4477 * server.h: Do not include stdlib.h.
4478 * inferiors.c: Likewise.
4479 * linux-low.c: Likewise.
4480 * regcache.c: Likewise.
4481 * spu-low.c: Likewise.
4482 * tracepoint.c: Likewise.
4483 * utils.c: Likewise.
4484
d02f550d
GB
44852014-08-07 Gary Benson <gbenson@redhat.com>
4486
4487 * server.h: Do not include stdio.h.
4488 * linux-low.c: Likewise.
4489 * remote-utils.c: Likewise.
4490 * spu-low.c: Likewise.
4491 * utils.c: Likewise.
4492 * wincecompat.c: Likewise.
4493
87f6c4e3
GB
44942014-08-06 Gary Benson <gbenson@redhat.com>
4495
4496 * regcache.c (init_register_cache): Move conditionals inside if.
4497
7089dca4
GB
44982014-08-06 Gary Benson <gbenson@redhat.com>
4499
4500 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
4501
462f517e
GB
45022014-07-31 Gary Benson <gbenson@redhat.com>
4503
4504 * ax.h: Do not include server.h.
4505 * gdbthread.h: Likewise.
4506 * lynx-low.h: Likewise.
4507 * notif.h: Likewise.
4508
976411d6
GB
45092014-07-30 Gary Benson <gbenson@redhat.com>
4510
4511 * server.h: Include common-defs.h.
4512 Do not include config.h or build-gnulib-gdbserver/config.h.
4513
d41f6d8e
GB
45142014-07-30 Gary Benson <gbenson@redhat.com>
4515
4516 * hostio-errno.c: Move server.h to top of includes list.
4517 * inferiors.c: Likewise.
4518 * linux-x86-low.c: Likewise.
4519 * notif.c: Include server.h.
4520
314c6a35
TT
45212014-07-24 Tom Tromey <tromey@redhat.com>
4522 Gary Benson <gbenson@redhat.com>
4523
4524 * server.h (CORE_ADDR): Now unsigned.
4525
69ff6be5
PA
45262014-07-16 Pedro Alves <palves@redhat.com>
4527
4528 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
4529
ce9e3fe7
PA
45302014-07-15 Pedro Alves <palves@redhat.com>
4531
4532 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
4533 copy.
4534
e76126e8
PA
45352014-07-11 Pedro Alves <palves@redhat.com>
4536
4537 * linux-low.c (kill_wait_lwp): New function, based on
4538 kill_one_lwp_callback, but use my_waitpid directly.
4539 (kill_one_lwp_callback, linux_kill): Use it.
4540
8e9db26e
PA
45412014-06-23 Pedro Alves <palves@redhat.com>
4542
4543 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
4544 before setting DR0..DR3.
4545
698b3e08
GB
45462014-06-20 Gary Benson <gbenson@redhat.com>
4547
4548 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
4549 * configure: Regenerated.
4550 * config.in: Likewise.
4551
125f8a3d
GB
45522014-06-20 Gary Benson <gbenson@redhat.com>
4553
4554 * Makefile.in (SFILES): Update locations for files moved
4555 from common to nat.
4556 (object file files): Reordered.
4557
42995dbd
GB
45582014-06-20 Gary Benson <gbenson@redhat.com>
4559
4560 * i386-low.h (i386_dr_low_can_set_addr): Removed.
4561 (i386_dr_low_set_addr): Likewise.
4562 (i386_dr_low_get_addr): Likewise.
4563 (i386_dr_low_can_set_control): Likewise.
4564 (i386_dr_low_set_control): Likewise.
4565 (i386_dr_low_get_control): Likewise.
4566 (i386_dr_low_get_status): Likewise.
4567 (i386_get_debug_register_length): Likewise.
4568 * linux-x86-low.c (i386_dr_low_set_addr):
4569 Changed signature. Made static.
4570 (i386_dr_low_get_addr): Likewise.
4571 (i386_dr_low_set_control): Likewise.
4572 (i386_dr_low_get_control): Likewise.
4573 (i386_dr_low_get_status): Likewise.
4574 (i386_dr_low): New global variable.
4575 * win32-i386-low.c (i386_dr_low_set_addr):
4576 Changed signature. Made static.
4577 (i386_dr_low_get_addr): Likewise.
4578 (i386_dr_low_set_control): Likewise.
4579 (i386_dr_low_get_control): Likewise.
4580 (i386_dr_low_get_status): Likewise.
4581 (i386_dr_low): New global variable.
4582
e1d2394b
MS
45832014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
4584
4585 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
4586 * Makefile.in (AR, AR_FLAGS): Define.
4587 * configure: Regenerate.
4588
3a8ee006
GB
45892014-06-19 Gary Benson <gbenson@redhat.com>
4590
4591 * Makefile.in (i386-dregs.o): New rule.
4592 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
4593 * i386-low.c (target.h): Remove include.
4594 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
4595 (DR_CONTROL_SHIFT): Likewise.
4596 (DR_CONTROL_SIZE): Likewise.
4597 (DR_RW_EXECUTE): Likewise.
4598 (DR_RW_WRITE): Likewise.
4599 (DR_RW_READ): Likewise.
4600 (DR_RW_IORW): Likewise.
4601 (DR_LEN_1): Likewise.
4602 (DR_LEN_2): Likewise.
4603 (DR_LEN_4): Likewise.
4604 (DR_LEN_8): Likewise.
4605 (DR_LOCAL_ENABLE_SHIFT): Likewise.
4606 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
4607 (DR_ENABLE_SIZE): Likewise.
4608 (DR_LOCAL_SLOWDOWN): Likewise.
4609 (DR_GLOBAL_SLOWDOWN): Likewise.
4610 (DR_CONTROL_RESERVED): Likewise.
4611 (I386_DR_CONTROL_MASK): Likewise.
4612 (I386_DR_VACANT): Likewise.
4613 (I386_DR_LOCAL_ENABLE): Likewise.
4614 (I386_DR_GLOBAL_ENABLE): Likewise.
4615 (I386_DR_DISABLE): Likewise.
4616 (I386_DR_SET_RW_LEN): Likewise.
4617 (I386_DR_GET_RW_LEN): Likewise.
4618 (I386_DR_WATCH_HIT): Likewise.
4619 (i386_wp_op_t): Likewise.
4620 (i386_show_dr): Likewise.
4621 (i386_length_and_rw_bits): Likewise.
4622 (i386_insert_aligned_watchpoint): Likewise.
4623 (i386_remove_aligned_watchpoint): Likewise.
4624 (i386_handle_nonaligned_watchpoint): Likewise.
4625 i386_update_inferior_debug_regs(): Likewise.
4626 (i386_dr_insert_watchpoint): Likewise.
4627 (i386_dr_remove_watchpoint): Likewise.
4628 (i386_dr_region_ok_for_watchpoint): Likewise.
4629 (i386_dr_stopped_data_address): Likewise.
4630 (i386_dr_stopped_by_watchpoint): Likewise.
4631
8f26655c
GB
46322014-06-19 Gary Benson <gbenson@redhat.com>
4633
4634 * i386-low.c (i386_dr_show): Renamed to
4635 i386_show_dr and made static. All uses updated.
4636 (i386_dr_length_and_rw_bits): Renamed to
4637 i386_length_and_rw_bits and made static.
4638 All uses updated.
4639 (i386_dr_insert_aligned_watchpoint): Renamed to
4640 i386_insert_aligned_watchpoint and made static.
4641 All uses updated.
4642 (i386_dr_remove_aligned_watchpoint): Renamed to
4643 i386_remove_aligned_watchpoint and made static.
4644 All uses updated.
4645 (i386_dr_update_inferior_debug_regs): Renamed to
4646 i386_update_inferior_debug_regs and made static.
4647 All uses updated.
4648
b9228891
GB
46492014-06-18 Gary Benson <gbenson@redhat.com>
4650
5171def3
GB
4651 * i386-low.h (i386_dr_low_can_set_addr): New macro.
4652 (i386_dr_low_can_set_control): Likewise.
4653 (i386_get_debug_register_length): Likewise.
4654 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
4655 (i386_dr_low_can_set_control): Likewise.
4656 (i386_get_debug_register_length): Likewise.
4657
46582014-06-17 Gary Benson <gbenson@redhat.com>
4659
b9228891
GB
4660 * i386-low.h (i386-dregs.h): New include.
4661 (DR_FIRSTADDR): Now in i386-dregs.h.
4662 (DR_LASTADDR): Likewise.
4663 (DR_NADDR): Likewise.
4664 (DR_STATUS): Likewise.
4665 (DR_CONTROL): Likewise.
4666 (i386_debug_reg_state): Likewise.
4667 (i386_dr_insert_watchpoint): Likewise.
4668 (i386_dr_remove_watchpoint): Likewise.
4669 (i386_dr_region_ok_for_watchpoint): Likewise.
4670 (i386_dr_stopped_data_address): Likewise.
4671 (i386_dr_stopped_by_watchpoint): Likewise.
4672 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
4673
4be83cc2
GB
46742014-06-18 Gary Benson <gbenson@redhat.com>
4675
4676 * i386-low.h (i386_low_insert_watchpoint): Renamed to
4677 i386_dr_insert_watchpoint.
4678 (i386_low_remove_watchpoint): Renamed to
4679 i386_dr_remove_watchpoint.
4680 (i386_low_region_ok_for_watchpoint): Renamed to
4681 i386_dr_region_ok_for_watchpoint.
4682 (i386_low_stopped_data_address): Renamed to
4683 i386_dr_stopped_data_address.
4684 (i386_low_stopped_by_watchpoint): Renamed to
4685 i386_dr_stopped_by_watchpoint.
4686 * i386-low.c (i386_show_dr): Renamed to
4687 i386_dr_show and made nonstatic. All uses updated.
4688 (i386_length_and_rw_bits): Renamed to
4689 i386_dr_length_and_rw_bits and made nonstatic.
4690 All uses updated.
4691 (i386_insert_aligned_watchpoint): Renamed to
4692 i386_dr_insert_aligned_watchpoint and made nonstatic.
4693 All uses updated.
4694 (i386_remove_aligned_watchpoint): Renamed to
4695 i386_dr_remove_aligned_watchpoint and made nonstatic.
4696 All uses updated.
4697 (i386_update_inferior_debug_regs): Renamed to
4698 i386_dr_update_inferior_debug_regs and made nonstatic.
4699 All uses updated.
4700 (i386_low_insert_watchpoint): Renamed to
4701 i386_dr_insert_watchpoint. All uses updated.
4702 (i386_low_remove_watchpoint): Renamed to
4703 i386_dr_remove_watchpoint. All uses updated.
4704 (i386_low_region_ok_for_watchpoint): Renamed to
4705 i386_dr_region_ok_for_watchpoint. All uses updated.
4706 (i386_low_stopped_data_address): Renamed to
4707 i386_dr_stopped_data_address. All uses updated.
4708 (i386_low_stopped_by_watchpoint): Renamed to
4709 i386_dr_stopped_by_watchpoint. All uses updated.
4710
131aa0d4
GB
47112014-06-18 Gary Benson <gbenson@redhat.com>
4712
4713 * i386-low.c (i386_dr_low_can_set_addr): New macro.
4714 (i386_dr_low_can_set_control): Likewise.
4715 (i386_insert_aligned_watchpoint): New check.
4716
d9305f7f
GB
47172014-06-18 Gary Benson <gbenson@redhat.com>
4718
4719 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
4720 Renamed to state.
4721
e927c9fc
GB
47222014-06-18 Gary Benson <gbenson@redhat.com>
4723
4724 * i386-low.c (i386_length_and_rw_bits): Use internal_error
4725 instead of fatal and error.
4726 (i386_handle_nonaligned_watchpoint): Likewise.
4727
1b6d4134
GB
47282014-06-18 Gary Benson <gbenson@redhat.com>
4729
4730 * i386-low.c (i386_get_debug_register_length): New macro.
4731 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
4732 (i386_show_dr): Use debug_printf instead of fprintf. Use
4733 phex to format values.
4734
6e62758f
GB
47352014-06-18 Gary Benson <gbenson@redhat.com>
4736
4737 * i386-low.h: Comment changes.
4738 * i386-low.c: Likewise.
4739
fc6e2f03
GB
47402014-06-18 Gary Benson <gbenson@redhat.com>
4741
4742 * i386-low.c: Whitespace changes.
4743
f9d1eeed
TT
47442014-06-12 Tom Tromey <tromey@redhat.com>
4745
4746 * utils.c (freeargv): Remove.
4747
0b04e523
TT
47482014-06-12 Tom Tromey <tromey@redhat.com>
4749
4750 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
4751 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
4752 (parse_debug_format_options): Likewise.
4753 (gdbserver_usage): Likewise.
4754 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
4755 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
4756 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
4757 against libiberty.
4758 ($(LIBGNU)): Depend on libiberty.
4759 (all-lib): Recurse into all subdirs.
4760 (install-only): Invoke "install" target in subdirs.
4761 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
4762 targets.
4763 * configure: Rebuild.
4764 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
4765 for vasprintf, vsnprintf, or gettimeofday.
4766 * configure.srv: Don't add safe-ctype.o or lbasename.o to
4767 srv_tgtobj.
4768
270c9937
JB
47692014-06-05 Joel Brobecker <brobecker@adacore.com>
4770
4771 * development.sh: Delete.
4772 * Makefile.in (config.status): Adjust dependency on development.sh.
4773 * configure.ac: Adjust development.sh source call.
4774 * configure: Regenerate.
4775
0a261ed8
PA
47762014-06-02 Pedro Alves <palves@redhat.com>
4777
4778 * ax.c (gdb_free_agent_expr): New function.
4779 * ax.h (gdb_free_agent_expr): New declaration.
4780 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
4781 list.
4782 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
4783 static.
4784 (clear_breakpoint_conditions_and_commands): New function.
4785 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
4786 (clear_breakpoint_conditions_and_commands): New declaration.
4787
e9dae05e
RR
47882014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
4789
4790 * linux-aarch64-low.c (asm/ptrace.h): Include.
4791
5876f503
JK
47922014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
4793
4794 Fix TLS access for -static -pthread.
4795 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
4796 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
4797 (thread_db_load_search, try_thread_db_load_1): Initialize it.
4798
802e8e6d
PA
47992014-05-20 Pedro Alves <palves@redhat.com>
4800
4801 * linux-aarch64-low.c (aarch64_insert_point)
4802 (aarch64_remove_point): No longer check whether the type is
4803 supported here. Adjust to new interface.
4804 (the_low_target): Install aarch64_supports_z_point_type as
4805 supports_z_point_type method.
4806 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
4807 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
4808 instead of a Z packet char. Adjust.
4809 (arm_supports_z_point_type): New function.
4810 (arm_insert_point, arm_remove_point): Adjust to new interface.
4811 (the_low_target): Install arm_supports_z_point_type.
4812 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
4813 (cris_insert_point, cris_remove_point): Adjust to new interface.
4814 Don't check whether the type is supported here.
4815 (the_low_target): Install cris_supports_z_point_type.
4816 * linux-low.c (linux_supports_z_point_type): New function.
4817 (linux_insert_point, linux_remove_point): Adjust to new interface.
4818 * linux-low.h (struct linux_target_ops) <insert_point,
4819 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
4820 raw_breakpoint pointer parameter.
4821 <supports_z_point_type>: New method.
4822 * linux-mips-low.c (mips_supports_z_point_type): New function.
4823 (mips_insert_point, mips_remove_point): Adjust to new interface.
4824 Use mips_supports_z_point_type.
4825 (the_low_target): Install mips_supports_z_point_type.
4826 * linux-ppc-low.c (the_low_target): Install NULL as
4827 supports_z_point_type method.
4828 * linux-s390-low.c (the_low_target): Install NULL as
4829 supports_z_point_type method.
4830 * linux-sparc-low.c (the_low_target): Install NULL as
4831 supports_z_point_type method.
4832 * linux-x86-low.c (x86_supports_z_point_type): New function.
4833 (x86_insert_point): Adjust to new insert_point interface. Use
4834 insert_memory_breakpoint. Adjust to new
4835 i386_low_insert_watchpoint interface.
4836 (x86_remove_point): Adjust to remove_point interface. Use
4837 remove_memory_breakpoint. Adjust to new
4838 i386_low_remove_watchpoint interface.
4839 (the_low_target): Install x86_supports_z_point_type.
4840 * lynx-low.c (lynx_target_ops): Install NULL as
4841 supports_z_point_type callback.
4842 * nto-low.c (nto_supports_z_point_type): New.
4843 (nto_insert_point, nto_remove_point): Adjust to new interface.
4844 (nto_target_ops): Install nto_supports_z_point_type.
4845 * mem-break.c: Adjust intro comment.
4846 (struct raw_breakpoint) <raw_type, size>: New fields.
4847 <inserted>: Update comment.
4848 <shlib_disabled>: Delete field.
4849 (enum bkpt_type) <gdb_breakpoint>: Delete value.
4850 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
4851 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
4852 (raw_bkpt_type_to_target_hw_bp_type): New function.
4853 (find_enabled_raw_code_breakpoint_at): New function.
4854 (find_raw_breakpoint_at): New type and size parameters. Use them.
4855 (insert_memory_breakpoint): New function, based off
4856 set_raw_breakpoint_at.
4857 (remove_memory_breakpoint): New function.
4858 (set_raw_breakpoint_at): Reimplement.
4859 (set_breakpoint): New, based on set_breakpoint_at.
4860 (set_breakpoint_at): Reimplement.
4861 (delete_raw_breakpoint): Go through the_target->remove_point
4862 instead of assuming memory breakpoints.
4863 (find_gdb_breakpoint_at): Delete.
4864 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
4865 (find_gdb_breakpoint): New function.
4866 (set_gdb_breakpoint_at): Delete.
4867 (z_type_supported): New function.
4868 (set_gdb_breakpoint_1): New function, loosely based off
4869 set_gdb_breakpoint_at.
4870 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
4871 (delete_gdb_breakpoint_at): Delete.
4872 (delete_gdb_breakpoint_1): New function, loosely based off
4873 delete_gdb_breakpoint_at.
4874 (delete_gdb_breakpoint): New function.
4875 (clear_gdb_breakpoint_conditions): Rename to ...
4876 (clear_breakpoint_conditions): ... this. Don't handle a NULL
4877 breakpoint.
4878 (add_condition_to_breakpoint): Make static.
4879 (add_breakpoint_condition): Take a struct breakpoint pointer
4880 instead of an address. Adjust.
4881 (gdb_condition_true_at_breakpoint): Rename to ...
4882 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
4883 z_type parameter.
4884 (gdb_condition_true_at_breakpoint): Reimplement.
4885 (add_breakpoint_commands): Take a struct breakpoint pointer
4886 instead of an address. Adjust.
4887 (gdb_no_commands_at_breakpoint): Rename to ...
4888 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
4889 parameter. Return true if no breakpoint was found. Change debug
4890 output.
4891 (gdb_no_commands_at_breakpoint): Reimplement.
4892 (run_breakpoint_commands): Rename to ...
4893 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
4894 and change return type to boolean.
4895 (run_breakpoint_commands): New function.
4896 (gdb_breakpoint_here): Also check for Z1 breakpoints.
4897 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
4898 breakpoint. Go through the_target->remove_point instead of
4899 assuming memory breakpoint.
4900 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
4901 software and hardware breakpoints.
4902 (reinsert_raw_breakpoint): Go through the_target->insert_point
4903 instead of assuming memory breakpoint.
4904 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
4905 software and hardware breakpoints.
4906 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
4907 Check both software and hardware breakpoints.
4908 (validate_inserted_breakpoint): Assert the breakpoint is a
4909 software breakpoint. Set the inserted flag to -1 instead of
4910 setting shlib_disabled.
4911 (delete_disabled_breakpoints): Adjust.
4912 (validate_breakpoints): Only validate software breakpoints.
4913 Adjust to inserted flag change.
4914 (check_mem_read, check_mem_write): Skip breakpoint types other
4915 than software breakpoints. Adjust to inserted flag change.
4916 * mem-break.h (enum raw_bkpt_type): New enum.
4917 (raw_breakpoint, struct process_info): Forward declare.
4918 (Z_packet_to_target_hw_bp_type): Delete declaration.
4919 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
4920 (set_gdb_breakpoint, delete_gdb_breakpoint)
4921 (clear_breakpoint_conditions): New declarations.
4922 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
4923 (breakpoint_inserted_here): Update comment.
4924 (add_breakpoint_condition, add_breakpoint_commands): Replace
4925 address parameter with a breakpoint pointer parameter.
4926 (gdb_breakpoint_here): Update comment.
4927 (delete_gdb_breakpoint_at): Delete.
4928 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
4929 * server.c (process_point_options): Take a struct breakpoint
4930 pointer instead of an address. Adjust.
4931 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
4932 delete_gdb_breakpoint.
4933 * spu-low.c (spu_target_ops): Install NULL as
4934 supports_z_point_type method.
4935 * target.h: Include mem-break.h.
4936 (struct target_ops) <prepare_to_access_memory>: Update comment.
4937 <supports_z_point_type>: New field.
4938 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
4939 instead of a char. Also take a raw breakpoint pointer.
4940 * win32-arm-low.c (the_low_target): Install NULL as
4941 supports_z_point_type.
4942 * win32-i386-low.c (i386_supports_z_point_type): New function.
4943 (i386_insert_point, i386_remove_point): Adjust to new interface.
4944 (the_low_target): Install i386_supports_z_point_type.
4945 * win32-low.c (win32_supports_z_point_type): New function.
4946 (win32_insert_point, win32_remove_point): Adjust to new interface.
4947 (win32_target_ops): Install win32_supports_z_point_type.
4948 * win32-low.h (struct win32_target_ops):
4949 <supports_z_point_type>: New method.
4950 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
4951 instead of a char. Also take a raw breakpoint pointer.
4952
932539e3
PA
49532014-05-20 Pedro Alves <palves@redhat.com>
4954
4955 * mem-break.h: Include break-common.h.
4956 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
4957 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
4958 (Z_packet_to_target_hw_bp_type): New declaration.
4959 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
4960 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
4961 (Z_PACKET_ACCESS_WP): Delete macros.
4962 (Z_packet_to_hw_type): Delete function.
4963 * i386-low.h: Don't include break-common.h here.
4964 (Z_packet_to_hw_type): Delete declaration.
4965 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
4966 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
4967 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
4968 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
4969 * linux-aarch64-low.c: Don't include break-common.h here.
4970 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
4971 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
4972 (Z_packet_to_target_hw_bp_type): Delete function.
4973 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
4974 function.
4975 (mips_insert_point, mips_remove_point): Use
4976 Z_packet_to_target_hw_bp_type.
4977
4ff0d3d8
PA
49782014-05-20 Pedro Alves <palves@redhat.com>
4979
4980 * linux-aarch64-low.c: Include break-common.h.
4981 (enum target_point_type): Delete.
4982 (Z_packet_to_point_type): Rename to ...
4983 (Z_packet_to_target_hw_bp_type): ... this, and return a
4984 target_hw_bp_type instead.
4985 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
4986 instead of an enum target_point_type.
4987 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
4988 breakpoint type.
4989 (aarch64_dr_state_insert_one_point)
4990 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
4991 (aarch64_handle_aligned_watchpoint)
4992 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
4993 Take an enum target_hw_bp_type instead of an enum
4994 target_point_type.
4995 (aarch64_supports_z_point_type): New function.
4996 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
4997 use Z_packet_to_target_hw_bp_type.
4998
786dc519
JB
49992014-05-20 Joel Brobecker <brobecker@adacore.com>
5000
5001 * configure.ac: Only use -Werror by default when DEVELOPMENT
5002 is true.
5003 * configure: Regenerate.
5004
9e0aa64f
JK
50052014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
5006
5007 Fix gdbserver qGetTLSAddr for x86_64 -m32.
5008 * linux-x86-low.c (X86_64_USER_REGS): New.
5009 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
5010
2b577b92
YQ
50112014-04-28 Yao Qi <yao@codesourcery.com>
5012
5013 * Makefile.in (i386-avx512.c): Fix the typo of generated file
5014 name.
5015
94611da2
PA
50162014-04-25 Pedro Alves <palves@redhat.com>
5017
5018 PR server/16255
5019 * linux-low.c (linux_attach_fail_reason_string): New function.
5020 (linux_attach_lwp): Delete.
5021 (linux_attach_lwp_1): Rename to ...
5022 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
5023 argument. Remove "initial" parameter. Return int instead of
5024 void. Don't error or warn here.
5025 (linux_attach): Adjust to call linux_attach_lwp. Call error on
5026 failure to attach to the tgid. Call warning when failing to
5027 attach to an lwp.
5028 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
5029 argument. Remove "initial" parameter. Return int instead of
5030 void. Don't error or warn here.
5031 (linux_attach_fail_reason_string): New declaration.
5032 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
5033 interface change. Use linux_attach_fail_reason_string.
5034
01f9f808
MS
50352014-04-24 Michael Sturm <michael.sturm@mintel.com>
5036 Walfred Tedeschi <walfred.tedeschi@intel.com>
5037
5038 * Makefile.in: Added rules to handle new files
5039 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
5040 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
5041 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
5042 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
5043 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
5044 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
5045 x32-avx512-linux.o.
5046 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
5047 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
5048 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
5049 i386/x32-avx512.xml.
5050 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
5051 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
5052 i386/x32-avx512-linux.xml.
5053 * i387-fp.c (num_avx512_k_registers): New constant for number
5054 of K registers.
5055 (num_avx512_zmmh_low_registers): New constant for number of
5056 lower ZMM registers (0-15).
5057 (num_avx512_zmmh_high_registers): New constant for number of
5058 higher ZMM registers (16-31).
5059 (num_avx512_ymmh_registers): New contant for number of higher
5060 YMM registers (ymm16-31 added by avx521 on x86_64).
5061 (num_avx512_xmm_registers): New constant for number of higher
5062 XMM registers (xmm16-31 added by AVX512 on x86_64).
5063 (struct i387_xsave): Add space for AVX512 registers.
5064 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
5065 Add code to handle AVX512 registers.
5066 (i387_xsave_to_cache): Add code to handle AVX512 registers.
5067 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
5068 prototypei from generated file.
5069 (tdesc_amd64_avx512_linux): Likewise.
5070 (init_registers_x32_avx512_linux): Likewise.
5071 (tdesc_x32_avx512_linux): Likewise.
5072 (init_registers_i386_avx512_linux): Likewise.
5073 (tdesc_i386_avx512_linux): Likewise.
5074 (x86_64_regmap): Add AVX512 registers.
5075 (x86_linux_read_description): Add code to handle AVX512 XSTATE
5076 mask.
5077 (initialize_low_arch): Add code to initialize AVX512 registers.
5078
51aa91f9
PA
50792014-04-23 Pedro Alves <palves@redhat.com>
5080
5081 * mem-break.c (find_gdb_breakpoint_at): Make static.
5082 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
5083
a4165e94
PA
50842014-04-23 Pedro Alves <palves@redhat.com>
5085
5086 * i386-low.c: Don't include break-common.h here.
5087 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5088 prototype to take target_hw_bp_type as argument instead of a Z
5089 packet char.
5090 * i386-low.h: Include break-common.h here.
5091 (Z_packet_to_hw_type): Declare.
5092 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5093 prototypes.
5094 * linux-x86-low.c (x86_insert_point): Convert the packet number to
5095 a target_hw_bp_type before calling i386_low_insert_watchpoint.
5096 (x86_remove_point): Convert the packet number to a
5097 target_hw_bp_type before calling i386_low_remove_watchpoint.
5098 * win32-i386-low.c (i386_insert_point): Convert the packet number
5099 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
5100 (i386_remove_point): Convert the packet number to a
5101 target_hw_bp_type before calling i386_low_remove_watchpoint.
5102
b8acf843
PA
51032014-04-23 Pedro Alves <palves@redhat.com>
5104
5105 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
5106
d708bcd1
PA
51072014-04-10 Pedro Alves <palves@redhat.com>
5108
5109 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5110 Check if the condition or command is NULL before checking if the
5111 breakpoint is known. On success, return true.
5112 * mem-break.h (add_breakpoint_condition): Document return.
5113 (add_breakpoint_commands): Add describing comment.
5114 * server.c (skip_to_semicolon): New function.
5115 (process_point_options): Use it.
5116
2eec7d5b
PA
51172014-04-09 Pedro Alves <palves@redhat.com>
5118
5119 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
5120 to lwpid_of.
5121
fa96cb38
PA
51222014-02-27 Pedro Alves <palves@redhat.com>
5123
5124 PR 12702
5125 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
5126 macros.
5127 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
5128 output.
5129 (last_thread_of_process_p): Take a PID argument instead of a
5130 thread pointer.
5131 (linux_wait_for_lwp): Delete.
5132 (num_lwps, check_zombie_leaders, not_stopped_callback): New
5133 functions.
5134 (linux_low_filter_event): New function, party factored out from
5135 linux_wait_for_event.
5136 (linux_wait_for_event): Rename to ...
5137 (linux_wait_for_event_filtered): ... this. Add new filter ptid
5138 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
5139 sigsuspend. Check for zombie leaders.
5140 (linux_wait_for_event): Reimplement as wrapper around
5141 linux_wait_for_event_filtered.
5142 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
5143 a normal or signal exit is seen, it's the whole process exiting.
5144 (wait_for_sigstop): No longer a for_each_inferior callback.
5145 Rewrite on top of linux_wait_for_event_filtered.
5146 (stop_all_lwps): Call wait_for_sigstop directly.
5147 * server.c (resume, handle_target_event): Handle
5148 TARGET_WAITKIND_NO_RESUMED.
5149
d763de10
JB
51502014-02-26 Joel Brobecker <brobecker@adacore.com>
5151
5152 * win32-low.c (psapi_get_dll_name,
5153 * win32_CreateToolhelp32Snapshot): Delete.
5154 (win32_CreateToolhelp32Snapshot, win32_Module32First)
5155 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
5156 Delete.
5157 (handle_load_dll): Add function description.
5158 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
5159
850a0f76
JB
51602014-02-26 Joel Brobecker <brobecker@adacore.com>
5161
5162 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
5163 Add comment.
5164 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
5165 base address when calling win32_add_one_solib.
5166 (handle_load_dll): Delete local variable load_addr.
5167 Remove 0x1000 offset applied to DLL base address when calling
5168 win32_add_one_solib.
5169 (handle_unload_dll): Add comment.
5170
f25b3fc3
JB
51712014-02-26 Joel Brobecker <brobecker@adacore.com>
5172
5173 * win32-low.c (win32_add_all_dlls): Renames
5174 win32_ensure_ntdll_loaded. Rewrite function documentation.
5175 Adjust implementation to always load all DLLs.
5176 Add 0x1000 offset to DLL base address when calling
5177 win32_add_one_solib.
5178 (child_initialization_done): New static global.
5179 (do_initial_child_stuff): Set child_initialization_done to
5180 zero during child initialization, and 1 after. Replace call
5181 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
5182 Add comment.
5183 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
5184 (handle_unload_dll): Add function documentation.
5185 (get_child_debug_event): Ignore load and unload DLL events
5186 during child initialization.
5187
d86d4aaf
DE
51882014-02-20 Doug Evans <dje@google.com>
5189
3bc32da3 5190 Remove global all_lwps.
d86d4aaf
DE
5191 * inferiors.h (ptid_of): Move here from linux-low.h.
5192 (pid_of, lwpid_of): Ditto.
5193 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
5194 parameter is a struct thread_info * now.
5195 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
5196 directly. Pass &all_threads to find_inferior instead of &all_lwps.
5197 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
5198 directly.
5199 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
5200 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
5201 * linux-arm-low.c (update_registers_callback): Update, "entry"
5202 parameter is a struct thread_info * now.
5203 Fetch lwpid from current_inferior directly.
5204 (arm_insert_point): Pass &all_threads to find_inferior instead of
5205 &all_lwps.
5206 (arm_remove_point): Ditto.
5207 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
5208 (arm_prepare_to_resume): Fetch pid from thread.
5209 (arm_read_description): Fetch lwpid from current_inferior directly.
5210 * linux-low.c (all_lwps): Delete.
5211 (delete_lwp): Delete call to remove_inferior.
5212 (handle_extended_wait): Fetch lwpid from thread.
5213 (add_lwp): Don't set lwp->entry.id. Remove call to
5214 add_inferior_to_list.
5215 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
5216 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
5217 (kill_one_lwp_callback): Ditto.
5218 (linux_kill): Don't dereference NULL pointer.
5219 Fetch ptid,lwpid from thread.
5220 (get_detach_signal): Fetch ptid from thread.
5221 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
5222 Simplify call to regcache_invalidate_thread.
5223 (delete_lwp_callback): Update, "entry" parameter is a
5224 struct thread_info * now. Fetch pid from thread.
5225 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
5226 (status_pending_p_callback): Update, "entry" parameter is a
5227 struct thread_info * now. Fetch ptid from thread.
5228 (find_lwp_pid): Update, "entry" parameter is a
5229 struct thread_info * now.
5230 (linux_wait_for_lwp): Fetch pid from thread.
5231 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
5232 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
5233 (enqueue_one_deferred_signal): Fetch lwpid from thread.
5234 (dequeue_one_deferred_signal): Ditto.
5235 (cancel_breakpoint): Fetch ptid from current_inferior.
5236 (linux_wait_for_event): Pass &all_threads to find_inferior,
5237 not &all_lwps. Fetch ptid, lwpid from thread.
5238 (count_events_callback): Update, "entry" parameter is a
5239 struct thread_info * now.
5240 (select_singlestep_lwp_callback): Ditto.
5241 (select_event_lwp_callback): Ditto.
5242 (cancel_breakpoints_callback): Ditto.
5243 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
5244 not &all_lwps.
5245 (select_event_lwp): Ditto. Fetch ptid from event_thread.
5246 (unsuspend_one_lwp): Update, "entry" parameter is a
5247 struct thread_info * now.
5248 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
5249 not &all_lwps.
5250 (linux_stabilize_threads): Ditto. And for for_each_inferior.
5251 Fetch lwpid from thread, not lwp.
5252 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
5253 Pass &all_threads to find_inferior, not &all_lwps.
5254 (send_sigstop): Fetch lwpid from thread, not lwp.
5255 (send_sigstop_callback): Update, "entry" parameter is a
5256 struct thread_info * now.
5257 (suspend_and_send_sigstop_callback): Ditto.
5258 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
5259 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
5260 struct thread_info * now.
5261 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
5262 from thread, lwp.
5263 (lwp_running): Update, "entry" parameter is a
5264 struct thread_info * now.
5265 (stop_all_lwps): Fetch ptid from thread.
5266 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
5267 (linux_resume_one_lwp): Fetch lwpid from thread.
5268 (linux_set_resume_request): Update, "entry" parameter is a
5269 struct thread_info * now. Fetch pid, lwpid from thread.
5270 (resume_status_pending_p): Update, "entry" parameter is a
5271 struct thread_info * now.
5272 (need_step_over_p): Ditto. Fetch lwpid from thread.
5273 (start_step_over): Fetch lwpid from thread.
5274 (linux_resume_one_thread): Update, "entry" parameter is a
5275 struct thread_info * now. Fetch lwpid from thread.
5276 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
5277 (proceed_one_lwp): Update, "entry" parameter is a
5278 struct thread_info * now. Fetch lwpid from thread.
5279 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
5280 struct thread_info * now.
5281 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
5282 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
5283 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
5284 directly.
5285 (regsets_store_inferior_registers): Ditto.
5286 (fetch_register, store_register): Ditto.
5287 (linux_read_memory, linux_write_memory): Ditto.
5288 (linux_request_interrupt): Ditto.
5289 (linux_read_auxv): Ditto.
5290 (linux_xfer_siginfo): Ditto.
5291 (linux_qxfer_spu): Ditto.
5292 (linux_qxfer_libraries_svr4): Ditto.
5293 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
5294 moved to inferiors.h.
5295 (get_lwp): Delete.
5296 (get_thread_lwp): Update.
5297 (struct lwp_info): Delete member "entry". Simplify comment for
5298 member "thread".
5299 (all_lwps): Delete.
5300 * linux-mips-low.c (mips_read_description): Fetch lwpid from
5301 current_inferior directly.
5302 (update_watch_registers_callback): Update, "entry" parameter is a
5303 struct thread_info * now. Fetch pid from thread.
5304 (mips_linux_prepare_to_resume): Fetch ptid from thread.
5305 (mips_insert_point): Fetch lwpid from current_inferior.
5306 Pass &all_threads to find_inferior, not &all_lwps.
5307 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
5308 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
5309 directly.
5310 (mips_stopped_data_address): Ditto.
5311 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
5312 directly.
5313 * linux-tile-low.c (tile_arch_setup): Ditto.
5314 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
5315 (update_debug_registers_callback): Update, "entry" parameter is a
5316 struct thread_info * now. Fetch pid from thread.
5317 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
5318 Pass &all_threads to find_inferior, not &all_lwps.
5319 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
5320 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
5321 Pass &all_threads to find_inferior, not &all_lwps.
5322 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
5323 (i386_dr_low_get_status): Ditto.
5324 (x86_linux_prepare_to_resume): Fetch ptid from thread.
5325 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
5326 (x86_linux_read_description): Ditto.
5327 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
5328
3b8361aa
DE
53292014-02-20 Doug Evans <dje@google.com>
5330
5331 * inferiors.c (get_first_inferior): Fix buglet.
5332
f7667f0d
DE
53332014-02-19 Doug Evans <dje@google.com>
5334
5335 * gdbthread.h (add_thread): Change result type to struct thread_info *.
5336 * inferiors.c (add_thread): Change result type to struct thread_info *.
5337 All callers updated.
5338 (add_lwp): Call add_thread here instead of in callers.
5339 All callers updated.
5340 * linux-low.h (get_lwp_thread): Rewrite.
5341 (struct lwp_info): New member "thread".
5342
b3312d80
DE
53432014-02-19 Doug Evans <dje@google.com>
5344
5345 * linux-low.c (add_lwp): Change result to struct lwp_info *.
5346 All callers updated.
5347
ecc6f45c
DE
53482014-02-19 Doug Evans <dje@google.com>
5349
5350 * inferiors.c (add_thread): Fix whitespace.
5351
649ebbca
DE
53522014-02-19 Doug Evans <dje@google.com>
5353
5354 * dll.c (clear_dlls): Replace accessing list implemention details
5355 with API function.
5356 * gdbthread.h (get_first_thread): Declare.
5357 * inferiors.c (for_each_inferior_with_data): New function.
5358 (get_first_thread): New function.
5359 (find_thread_ptid): Simplify.
5360 (get_first_inferior): New function.
5361 (clear_list): Delete.
5362 (one_inferior_p): New function.
5363 (clear_inferior_list): New function.
5364 (clear_inferiors): Update.
5365 * inferiors.h (for_each_inferior_with_data): Declare.
5366 (clear_inferior_list): Declare.
5367 (one_inferior_p): Declare.
5368 (get_first_inferior): Declare.
5369 * linux-low.c (linux_wait_for_event): Replace accessing list
5370 implemention details with API function.
5371 * server.c (target_running): Ditto.
5372 (accumulate_file_name_length): New function.
5373 (emit_dll_description): New function.
5374 (handle_qxfer_libraries): Replace accessing list implemention
5375 details with API function.
5376 (handle_qxfer_threads_worker): New function.
5377 (handle_qxfer_threads_proper): Replace accessing list implemention
5378 details with API function.
5379 (handle_query): Ditto.
5380 (visit_actioned_threads_callback_ftype): New typedef.
5381 (visit_actioned_threads_data): New struct.
5382 (visit_actioned_threads): Rewrite to be find_inferior callback.
5383 (resume): Call find_inferior.
5384 (handle_status): Replace accessing list implemention
5385 details with API function.
5386 (process_serial_event): Replace accessing list implemention details
5387 with API function.
5388 * target.c (set_desired_inferior): Replace accessing list implemention
5389 details with API function.
5390 * tracepoint.c (same_process_p): New function.
5391 (gdb_agent_about_to_close): Replace accessing list implemention
5392 details with API function.
5393 * win32-low.c (child_delete_thread): Replace accessing list
5394 implemention details with API function.
5395 (match_dll_by_basename): New function.
5396 (dll_is_loaded_by_basename): New function.
5397 (win32_ensure_ntdll_loaded): Replace accessing list implemention
5398 details call to dll_is_loaded_by_basename.
5399
80894984
DE
54002014-02-19 Doug Evans <dje@google.com>
5401
5402 * dll.h (struct dll_info): Add comment.
5403 * gdbthread.h (struct thread_info): Add comment.
5404 (current_ptid): Simplify.
5405 * inferiors.c (add_process): Update.
5406 (remove_process): Update.
5407 * inferiors.h (struct process_info): Rename member "head" to "entry".
5408 * linux-low.c (delete_lwp): Update.
5409 (add_lwp): Update.
5410 (last_thread_of_process_p): Update.
5411 (kill_one_lwp_callback, linux_kill): Update.
5412 (status_pending_p_callback): Update.
5413 (wait_for_sigstop): Update. Simplify read of ptid.
5414 (start_step_over): Update.
5415 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
5416 (get_lwp_thread): Update.
5417 (struct lwp_info): Rename member "head" to "entry".
5418 * regcache.h (inferior_list_entry): Delete.
5419 * server.c (kill_inferior_callback): Update.
5420 (detach_or_kill_inferior_callback): Update.
5421 (print_started_pid): Update.
5422 (print_attached_pid): Update.
5423 (process_serial_event): Simplify read of ptid.
5424 * thread-db.c (thread_db_create_event): Update.
5425 (thread_db_get_tls_address): Update.
5426 * win32-low.c (current_inferior_ptid): Simplify.
5427
46917d26
TT
54282014-02-19 Tom Tromey <tromey@redhat.com>
5429
5430 * target.h (struct target_ops) <supports_btrace>: Add target_ops
5431 argument.
5432 (target_supports_btrace): Update.
5433
0759a81e
YQ
54342014-02-14 Yao Qi <yao@codesourcery.com>
5435
5436 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
5437 (rsp-low-ipa.o): New target.
5438
a7191e8b
TT
54392014-02-12 Tom Tromey <tromey@redhat.com>
5440
5441 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
5442 convert_ascii_to_int.
5443 * regcache.c (registers_to_string): Likewise.
5444 * remote-utils.c (decode_M_packet): Likewise.
5445 * server.c (process_serial_event): Likewise.
5446
ff0e980e
TT
54472014-02-12 Tom Tromey <tromey@redhat.com>
5448
5449 * server.c (handle_query, handle_v_run): Use hex2bin, not
5450 unhexify.
5451 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
5452
e9371aff
TT
54532014-02-12 Tom Tromey <tromey@redhat.com>
5454
5455 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
5456 convert_int_to_ascii.
5457 * regcache.c (registers_to_string, collect_register_as_string):
5458 Likewise.
5459 * remote-utils.c (look_up_one_symbol, relocate_instruction):
5460 Likewise.
5461 * server.c (process_serial_event): Likewise.
5462 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
5463 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
5464
971dc0b8
TT
54652014-02-12 Tom Tromey <tromey@redhat.com>
5466
5467 * remote-utils.c (look_up_one_symbol, monitor_output): Use
5468 bin2hex, not hexify.
5469 * tracepoint.c (cmd_qtstatus): Likewise.
5470
0a822afb
TT
54712014-02-12 Tom Tromey <tromey@redhat.com>
5472
5473 * remote-utils.c (monitor_output): Pass explicit length to
5474 hexify.
5475
9c3d6531
TT
54762014-02-12 Tom Tromey <tromey@redhat.com>
5477
5478 * tracepoint.c: Include rsp-low.h.
5479 * server.c: Include rsp-low.h.
5480 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
5481 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
5482 declare.
5483 * remote-utils.c: Include rsp-low.h.
5484 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
5485 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
5486 (convert_int_to_ascii, convert_ascii_to_int): Move to
5487 common/rsp-low.c.
5488 * regcache.c: Include rsp-low.h.
5489 * ax.c: Include rsp-low.h.
5490 * Makefile.in (SFILES): Add common/rsp-low.c.
5491 (OBS): Add rsp-low.o.
5492 (rsp-low.o): New target.
5493
01fd3ea5
TT
54942014-02-12 Tom Tromey <tromey@redhat.com>
5495
5496 * utils.h (pulongest, plongest, phex_nz): Don't declare.
5497 Include print-utils.h.
5498 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
5499 (plongest, thirty_two, phex_nz): Remove.
5500 * Makefile.in (SFILES): Add common/print-utils.c.
5501 (OBS): Add print-utils.o.
5502 (print-utils-ipa.o): New target.
5503 (print-utils.o): New target.
5504 (IPA_OBJS): Add print-utils-ipa.o.
5505
e99dc820
TT
55062014-02-06 Tom Tromey <tromey@redhat.com>
5507
5508 * Makefile.in (SFILES): Fix indentation.
5509
ee1e2d4f
DE
55102014-02-05 Doug Evans <dje@google.com>
5511
5512 * linux-low.c (linux_wait_for_event): Improve comment.
5513 (linux_wait_1): Keep current_inferior in sync with event_child.
5514
f5a02773
DE
55152014-01-22 Doug Evans <dje@google.com>
5516
5517 * gdbthread.h (gdb_id_to_thread): Delete, unused.
5518
87ce2a04
DE
55192014-01-22 Doug Evans <dje@google.com>
5520
5521 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
5522 * configure: Regenerate.
5523 * config.in: Regenerate.
5524 * Makefile.in (SFILES): Add debug.c.
5525 (OBS): Add debug.o.
5526 * debug.c: New file.
5527 * debug.h: New file.
5528 * linux-aarch64-low.c (*): Update all debugging printfs to use
5529 debug_printf instead of fprintf.
5530 * linux-arm-low.c (*): Ditto.
5531 * linux-cris-low.c (*): Ditto.
5532 * linux-crisv32-low.c (*): Ditto.
5533 * linux-m32r-low.c (*): Ditto.
5534 * linux-sparc-low.c (*): Ditto.
5535 * linux-x86.c (*): Ditto.
5536 * linux-low.c (*): Ditto.
5537 (linux_wait_1): Add calls to debug_enter, debug_exit.
5538 (linux_wait): Remove redundant debugging printf.
5539 (stop_all_lwps): Add calls to debug_enter, debug_exit.
5540 (linux_resume, unstop_all_lwps): Ditto.
5541 * mem-break.c (*): Update all debugging printfs to use
5542 debug_printf instead of fprintf.
5543 * remote-utils.c (*): Ditto.
5544 * thread-db.c (*): Ditto.
5545 * server.c #include <ctype.h>, "gdb_vecs.h".
5546 (debug_threads): Moved to debug.c.
5547 (*): Update all debugging printfs to use debug_printf instead of
5548 fprintf.
5549 (start_inferior): Replace call to fflush with call to debug_flush.
5550 (monitor_show_help): Mention set debug-format.
5551 (parse_debug_format_options): New function.
5552 (handle_monitor_command): Handle "monitor set debug-format".
5553 (gdbserver_usage): Mention --debug-format.
5554 (main): Parse --debug-format.
5555 * server.h (debug_threads): Declaration moved to debug.h.
5556 #include "debug.h".
5557 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
5558 trace_debug_1 that uses debug_printf.
5559 (tracepoint_look_up_symbols): Update all debugging printfs to use
5560 debug_printf instead of fprintf.
5561
e671835b
BS
55622014-01-20 Baruch Siach <baruch@tkos.co.il>
5563
5564 * linux-xtensa-low.c: Include asm/ptrace.h instead of
5565 sys/ptrace.h.
5566
b5737fa9
PA
55672014-01-17 Pedro Alves <palves@redhat.com>
5568
ea38d2a9 5569 PR build/16445
c7faa97a
PA
5570 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
5571 defined after including gdb_proc_service.h.
b5737fa9 5572
40ed484e
DE
55732014-01-16 Doug Evans <dje@google.com>
5574
5575 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
5576 (match_dll): Use it.
5577
969c39fb
MM
55782014-01-16 Markus Metzger <markus.t.metzger@intel.com>
5579
5580 * target.h (target_ops) <read_btrace>: Change parameters and
5581 return type to allow error reporting.
5582 * server.c (handle_qxfer_btrace): Support delta reads. Pass
5583 trace reading errors on.
5584 * linux-low.c (linux_low_read_btrace): Pass trace reading
5585 errors on.
5586 (linux_low_disable_btrace): New.
5587
ab7f45ba
DE
55882014-01-15 Doug Evans <dje@google.com>
5589
5590 * inferiors.c (thread_id_to_gdb_id): Delete.
5591 * inferiors.h (thread_id_to_gdb_id): Delete.
5592
66af0f44
EZ
55932014-01-13 Eli Zaretskii <eliz@gnu.org>
5594
5595 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
5596 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
5597 versions.
5598
9939e131
PA
55992014-01-08 Pedro Alves <palves@redhat.com>
5600
5601 * server.c (handle_status): Don't discard previous queued stop
5602 replies or thread's pending status here.
5603 (main) <disconnection>: Do it here instead.
5604
b7ea362b
PA
56052014-01-08 Pedro Alves <palves@redhat.com>
5606
5607 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
5608 * server.c (visit_actioned_threads, handle_pending_status): New
5609 function.
5610 (handle_v_cont): Factor out parts to ...
5611 (resume): ... this new function. If in all-stop, and a thread
5612 being resumed has a pending status, report it without actually
5613 resuming.
5614 (myresume): Adjust to use the new 'resume' function.
5615 (clear_pending_status_callback, set_pending_status_callback)
5616 (find_status_pending_thread_callback): New functions.
5617 (handle_status): Handle the case of multiple threads having
5618 interesting statuses to report. Report threads' real last signal
5619 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
5620 with an interesting thread to report the status for, instead of
5621 always reporting the status of the first thread.
5622
28498c42
JB
56232014-01-01 Joel Brobecker <brobecker@adacore.com>
5624
5625 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
5626 * gdbreplay.c (gdbreplay_version): Likewise.
5627
f45c82da
YZ
56282013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
5629
5630 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
5631 iov.iov_len with the real length in use.
5632
379a5e2d
JB
56332013-12-13 Joel Brobecker <brobecker@adacore.com>
5634
5635 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
5636 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
5637 for all targets that use win32-low.c.
5638 * win32-low.c (win32_ensure_ntdll_loaded): New function.
5639 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
5640
4210d83e
PA
56412013-12-13 Pedro Alves <palves@redhat.com>
5642
5643 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
5644 if equal to TARGET_WAITKIND_LOADED.
5645 * win32-low.c (cached_status): New static global.
5646 (win32_wait): Add declaration.
5647 (do_initial_child_stuff): Flush all initial pending debug events
5648 up to the initial breakpoint.
5649 (win32_wait): If CACHED_STATUS was set, return that instead
5650 of doing a real wait. Remove the code resuming the execution
5651 of the inferior after receiving a TARGET_WAITKIND_LOADED event
5652 during the initial phase. Also remove the code changing
5653 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
5654 TARGET_WAITKIND_STOPPED.
5655
e7f0d979
YQ
56562013-12-11 Yao Qi <yao@codesourcery.com>
5657
5658 * notif.c (handle_notif_ack): Return 0 if no notification
5659 matches.
5660
ebcf782c
DE
56612013-11-20 Doug Evans <dje@google.com>
5662
5663 * linux-low.c (linux_set_resume_request): Fix comment.
5664
20ad9378
DE
56652013-11-20 Doug Evans <dje@google.com>
5666
5667 * linux-low.c (resume_status_pending_p): Tweak comment.
5668
a196ebeb
WT
56692013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5670
5671 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
5672 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
5673 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
5674 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
5675 (srv_amd64_regobj): Add amd64-mpx.o.
5676 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
5677 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
5678 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
5679 * i387-fp.c (num_pl_bnd_register) Added constant.
5680 (num_pl_bnd_cfg_registers) Added constant.
5681 (struct i387_xsave) Added reserved area and MPX fields.
5682 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
5683 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
5684 function.
5685 (tdesc_i386_mpx_linux): Add MPX amd64 target.
5686 (init_registers_amd64_mpx_linux): Declare new function.
5687 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
5688 (x86_64_regmap): Add MPX registers.
5689 (x86_linux_read_description): Add MPX case.
5690 (initialize_low_arch): Initialize MPX targets.
5691
0080a2f6
TT
56922013-11-18 Tom Tromey <tromey@redhat.com>
5693
5694 * configure: Rebuild.
5695 * configure.ac: Don't check for stdlib.h.
5696 * gdbreplay.c: Unconditionally include stdlib.h.
5697
2978b111
TT
56982013-11-18 Tom Tromey <tromey@redhat.com>
5699
5700 * config.in: Rebuild.
5701 * configure: Rebuild.
5702 * configure.ac: Don't use AC_HEADER_DIRENT.
5703
a3d08894
TT
57042013-11-18 Tom Tromey <tromey@redhat.com>
5705
5706 * server.h: Don't check HAVE_STRING_H.
5707 * gdbreplay.c: Don't check HAVE_STRING_H.
5708 * configure: Rebuild.
5709
0a5dd17d
TT
57102013-11-18 Tom Tromey <tromey@redhat.com>
5711
5712 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
5713 LIBGNU.
5714
1bd2f0ba
TT
57152013-11-08 Tom Tromey <tromey@redhat.com>
5716
5717 * configure, config.in: Rebuild.
5718 * configure.ac: Remove unused configury.
5719
3266f10b
TT
57202013-11-08 Tom Tromey <tromey@redhat.com>
5721
5722 * acinclude.m4: Include common.m4, codeset.m4.
5723 * configure, config.in: Rebuild.
5724 * configure.ac: Use GDB_AC_COMMON.
5725
6682d959
AA
57262013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
5727
5728 * linux-s390-low.c (HWCAP_S390_TE): New define.
5729 (s390_arch_setup): Consider the TE field in the HWCAP for
5730 determining 'have_regset_tdb'.
5731
fd0a4d76
SDJ
57322013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
5733
5734 PR gdb/16014
5735 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
5736 call to sizeof.
5737
1a3d890b
PA
57382013-10-02 Pedro Alves <palves@redhat.com>
5739
5740 * server.c (process_serial_event): Don't output "GDBserver
5741 exiting" if GDB is connected through stdio.
5742 * target.c (mywait): Likewise, be silent if GDB is connected
5743 through stdio.
5744
97ad4581
JB
57452013-10-01 Joel Brobecker <brobecker@adacore.com>
5746
5747 * lynx-low.c (lynx_add_threads_after_attach): New function.
5748 (lynx_attach): Remove call to add_thread. Add call to
5749 lynx_add_threads_after_attach instead.
5750
5b4e221c
MF
57512013-09-28 Mike Frysinger <vapier@gentoo.org>
5752
5753 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
5754 * config.in, configure: Regenerated.
5755
ee47b2f8
YQ
57562013-09-18 Yao Qi <yao@codesourcery.com>
5757
5758 PR server/15959
5759 * server.c (start_inferior): Clear 'resume_info'.
5760
d6707650 57612013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 5762
d6707650
JW
5763 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
5764 for each register.
5765
9243dd0e 57662013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 5767
9243dd0e
JW
5768 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
5769 linux-tile-low.o to srv_tgtobj.
5770
c623a6ef
WN
57712013-09-16 Will Newton <will.newton@linaro.org>
5772
5773 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
5774 out regs.
5775
fb71d39e
PA
57762013-09-06 Pedro Alves <palves@redhat.com>
5777
5778 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
5779 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
5780 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
5781 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
5782 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
5783 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
5784
8e7e9910
PA
57852013-09-06 Pedro Alves <palves@redhat.com>
5786
5787 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
5788 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
5789
7c3a12ca
PA
57902013-09-06 Pedro Alves <palves@redhat.com>
5791
5792 * linux-amd64-ipa.c: Include tracepoint.h.
5793 * linux-i386-ipa.c: Include tracepoint.h.
5794
8eb3d7b6
RW
57952013-09-06 Ricard Wanderlof <ricardw@axis.com>
5796
5797 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
5798 (ps_get_thread_area): New function.
5799
eddddb9d
RW
58002013-09-06 Ricard Wanderlof <ricardw@axis.com>
5801
5802 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
5803 (initialize_low_arch): Call init_registers_crisv32 rather than
5804 init_register_crisv32.
5805
533b0600
PA
58062013-09-05 Pedro Alves <palves@redhat.com>
5807
5808 * server.h (handle_vFile, hostio_last_error_from_errno): Move
5809 to ...
5810 * hostio.h: ... this new file.
5811 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
5812 win32-low.c: Include hostio.h.
5813
0ce3d3b5
PA
58142013-09-05 Pedro Alves <palves@redhat.com>
5815
5816 * server.h (gdb_client_data, handler_func, callback_handler_func)
5817 (delete_file_handler, add_file_handler, append_callback_event)
5818 (delete_callback_event, start_event_loop, initialize_event_loop):
5819 Move to event-loop.h and include it.
5820 * event-loop.h: New file.
5821
799cdc37
PA
58222013-09-05 Pedro Alves <palves@redhat.com>
5823
5824 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
5825 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
5826 (loaded_dll, unloaded_dll): Move to ...
5827 * dll.h: ... this new file.
5828 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
5829
6a6bbd9d
PA
58302013-09-05 Pedro Alves <palves@redhat.com>
5831
5832 * server.h (current_process, get_thread_process, all_processes)
5833 (add_inferior_to_list, for_each_inferior, current_inferior)
5834 (remove_inferior, add_process, remove_process, find_process_pid)
5835 (have_started_inferiors_p, have_attached_inferiors_p)
5836 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
5837 (clear_inferiors, find_inferior, find_inferior_id)
5838 (inferior_target_data, set_inferior_target_data)
5839 (inferior_regcache_data, set_inferior_regcache_data): Move to
5840 inferiors.h, and include it.
5841 * inferiors.h: New file.
5842
f699aaba
PA
58432013-09-05 Pedro Alves <palves@redhat.com>
5844
5845 * server.h (struct emit_ops, current_insn_ptr, emit_error):
5846 Move ...
72f4393d 5847 * ax.h: ... here.
f699aaba 5848
c144c7a0
PA
58492013-09-05 Pedro Alves <palves@redhat.com>
5850
5851 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
5852 tracepoint.h.
5853 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
5854 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
5855 (handle_tracepoint_general_set, handle_tracepoint_query)
5856 (tracepoint_finished_step, tracepoint_was_hit)
5857 (release_while_stepping_state_list, current_traceframe)
5858 (in_readonly_region, traceframe_read_mem)
5859 (fetch_traceframe_registers, traceframe_read_sdata)
5860 (traceframe_read_info, struct fast_tpoint_collect_status)
5861 (fast_tracepoint_collecting, force_unlock_trace_buffer)
5862 (handle_tracepoit_bkpts, initialize_low_tracepoint)
5863 (supply_fast_tracepoint_registers)
5864 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
5865 (ipa_tdesc, claim_trampoline_space)
5866 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
5867 (agent_mem_read, agent_get_trace_state_variable_value)
5868 (agent_set_trace_state_variable_value, agent_tsv_read)
5869 (agent_mem_read_string, get_raw_reg_func_addr)
5870 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
5871 * tracepoint.h: ... this new file.
5872
ff42e6ab
PA
58732013-09-05 Pedro Alves <palves@redhat.com>
5874
5875 * server.h (perror_with_name, error, fatal, warning, paddress)
5876 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
5877 include it.
5878 * utils.h: New file.
5879
541af0f4
PA
58802013-09-05 Pedro Alves <palves@redhat.com>
5881
5882 * server.h (remote_debug, noack_mode, transport_is_reliable)
5883 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
5884 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
5885 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
5886 (write_enn, initialize_async_io, enable_async_io)
5887 (disable_async_io, check_remote_input_interrupt_request)
5888 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
5889 (dead_thread_notify, prepare_resume_reply)
5890 (decode_address_to_semicolon, decode_address, decode_m_packet)
5891 (decode_M_packet, decode_X_packet, decode_xfer_write)
5892 (decode_search_memory_packet, unhexify, hexify)
5893 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
5894 (look_up_one_symbol, relocate_instruction)
5895 (monitor_output): Move to remote-utils.h, and include it.
5896 * remote-utils.h: New file.
5897
eebdf26b
PA
58982013-09-05 Pedro Alves <palves@redhat.com>
5899
5900 * server.h (_): Delete.
5901
3aafd2ff
PA
59022013-09-02 Pedro Alves <palves@redhat.com>
5903
5904 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
5905 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
5906 allocated.
5907 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
5908
cee83bcb
PM
59092013-09-02 Pierre Muller <muller@sourceware.org>
5910
5911 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
5912 or WriteProcessMemory complete successfully and handle
5913 ERROR_PARTIAL_COPY error.
5914
9a13b2fa
PA
59152013-09-02 Pedro Alves <palves@redhat.com>
5916
5917 * server.c (gdb_read_memory): Return -1 on traceframe memory read
5918 error instead of EIO.
5919
602e3198
JK
59202013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5921
5922 PR server/15604
5923 * linux-low.c: Include filestuff.h.
5924 (linux_create_inferior) <pid == 0>: Call close_most_fds.
5925 * lynx-low.c: Include filestuff.h.
5926 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
5927 * server.c: Include filestuff.h.
5928 (main): Call notice_open_fds.
5929 * spu-low.c: Include filestuff.h.
5930 (spu_create_inferior) <pid == 0>: Call close_most_fds.
5931
96d7229d
LM
59322013-08-22 Luis Machado <lgustavo@codesourcery.com>
5933
5934 * Makefile.in: Explain why ../target and ../nat are not
5935 listed as include file search paths.
5936 (linux-waitpid.o): New object file rule.
5937 * configure.srv (srv_native_linux_obj): New variable.
5938 Replace all occurrences of linux native object files with
5939 $srv_native_linux_obj.
5940 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
5941 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
5942 (linux_enable_event_reporting): Remove declaration.
5943 (my_waitpid): Moved to common/linux-waitpid.c.
5944 (linux_wait_for_event): Pass ptid when calling
5945 linux_enable_event_reporting.
5946 (linux_supports_tracefork_flag): Remove.
5947 (linux_enable_event_reporting): Likewise.
5948 (linux_tracefork_grandchild): Remove.
5949 (STACK_SIZE): Moved to common/linux-ptrace.c.
5950 (linux_tracefork_child): Remove.
5951 (linux_test_for_tracefork): Remove.
5952 (linux_look_up_symbols): Call linux_supports_traceclone.
5953 (initialize_low): Remove call to linux_test_for_tracefork.
5954 * linux-low.h (PTRACE_TYPE_ARG3): Move to
5955 common/linux-ptrace.h.
5956 (PTRACE_TYPE_ARG4): Likewise.
5957 Include linux-ptrace.h.
5958
32940073
PA
59592013-08-21 Pedro Alves <palves@redhat.com>
5960
5961 * config.in: Renegerate.
5962
33b60d58 59632013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 5964
33b60d58
LM
5965 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
5966 (SFILES): Remove $(srcdir)/common/target-common.c and
5967 add $(srcdir)/target/waitstatus.c.
5968 (OBS): Remove target-common.o and add waitstatus.o.
5969 (server_h): Remove $(srcdir)/../common/target-common.h and
5970 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
5971 and $(srcdir)/../target/waitstatus.h.
5972 (target-common.o): Remove.
5973 (waitstatus.o): New target object file.
5974 * target.h: Do not include target-common.h and
5975 include target/resume.h, target/wait.h and
5976 target/waitstatus.h.
5977
b8e1b30e
LM
59782013-08-13 Luis Machado <lgustavo@codesourcery.com>
5979
5980 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5981 to PTRACE_TYPE_ARG3.
5982 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5983 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
5984 PTRACE_TYPE_ARG4.
5985 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
5986 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
5987
7a60ad40
YQ
59882013-07-27 Jie Zhang <jie@codesourcery.com>
5989 Daniel Jacobowitz <dan@codesourcery.com>
5990 Yao Qi <yao@codesourcery.com>
5991
5992 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
5993 (mips-linux-watch.o): New rule.
5994 (mips_linux_watch_h): New variable.
5995 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
5996 srv_tgtobj.
5997 * linux-mips-low.c: Include mips-linux-watch.h.
5998 (struct arch_process_info, struct arch_lwp_info): New.
5999 (update_watch_registers_callback): New function.
6000 (mips_linux_new_process, mips_linux_new_thread) New functions.
6001 (mips_linux_prepare_to_resume, mips_insert_point): New
6002 functions.
6003 (mips_remove_point, mips_stopped_by_watchpoint): New
6004 functions.
6005 (rsp_bp_type_to_target_hw_bp_type): New function.
6006 (mips_stopped_data_address): New function.
6007 (the_low_target): Add watchpoint support functions.
6008
de6f69ad
YQ
60092013-07-27 Yao Qi <yao@codesourcery.com>
6010
6011 * i386-low.c: Include break-common.h.
6012 (enum target_hw_bp_type): Remove.
6013
3360c0bf
LM
60142013-07-24 Luis Machado <lgustavo@codesourcery.com>
6015
6016 * Makefile.in (SFILES): /common/target-common.c.
6017 (OBS): Add target-common.o.
6018 (server_h): Add $(srcdir)/../common/target-common.h.
6019 (target-common.o): New target.
6020 * server.c (queue_stop_reply_callback): Free
6021 status string after use.
6022 * target.c (target_waitstatus_to_string): Remove.
6023 * target.h: Include target-common.h.
6024 (resume_kind): Likewise.
6025 (target_waitkind): Likewise.
6026 (target_waitstatus): Likewise.
6027 (TARGET_WNOHANG): Likewise.
6028
bd885420
YQ
60292013-07-04 Yao Qi <yao@codesourcery.com>
6030
6031 * Makefile.in (host_alias): Use @host_noncanonical@.
6032 (target_alias): Use @target_noncanonical@.
6033 * configure.ac: Use ACX_NONCANONICAL_TARGET and
6034 ACX_NONCANONICAL_HOST.
6035 * configure: Regenerated.
6036
6037 Revert:
6038 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6039
6040 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6041 * configure: Rebuild.
6042 * Makefile.in (version_host, version_target): Get from configure.
6043 (version.c): Use $(version_host) and $(version_target).
6044
17ef446e
PA
60452013-07-03 Pedro Alves <palves@redhat.com>
6046
6047 * Makefile.in (config.status): Depend on development.sh.
6048 * acinclude.m4: Include libmcheck.m4.
6049 * configure: Regenerate.
6050
7a9a7487
MG
60512013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6052
6053 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
6054 attribute inside the parentheses.
6055 (winapi_DebugSetProcessKillOnExit): Ditto.
6056 (winapi_DebugBreakProcess): Ditto.
6057 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 6058
49b64de6
MG
60592013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6060
6061 * notif.h (notif_event): Add a dummy member to avoid compiler
6062 errors.
6063
d5749ee7
PA
60642013-07-01 Pedro Alves <palves@redhat.com>
6065
6066 * hostio.c (HOSTIO_PATH_MAX): Define.
6067 (require_filename, handle_open, handle_unlink, handle_readlink):
6068 Use it.
6069
d8d2a3ee
PA
60702013-07-01 Pedro Alves <palves@redhat.com>
6071
6072 * server.h: Include "pathmax.h".
6073 * linux-low.c: Don't include sys/param.h.
6074 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
6075 MAXPATHLEN.
6076 * win32-low.c: Don't include sys/param.h.
6077 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
6078
bc7dea8d
PA
60792013-07-01 Pedro Alves <palves@redhat.com>
6080
6081 * event-loop.c: Don't check HAVE_UNISTD_H before including
6082 <unistd.h>.
6083 * gdbreplay.c: Likewise.
6084 * remote-utils.c: Likewise.
6085 * server.c: Likewise.
6086 * configure.ac: Don't check for unistd.h.
6087 * configure: Regenerate.
6088
d6c2da54
TT
60892013-06-28 Tom Tromey <tromey@redhat.com>
6090
6091 * Makefile.in (version.c): Use version.in, not
6092 common/version.in.
6093
257b6bec
MG
60942013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6095
6096 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6097 * configure: Rebuild.
6098 * Makefile.in (version_host, version_target): Get from configure.
6099 (version.c): Use $(version_host) and $(version_target).
6100
86ebe149
DK
61012013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6102
6103 Fix trace-status to output user name without trailing colon.
6104 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
6105
f30aa5af
DK
61062013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6107
6108 Fix trace-status to output proper start-time and stop-time.
6109 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
6110 output start time and stop time in hex as gdb expects.
6111
28a93511
YQ
61122013-06-26 Pedro Alves <pedro@codesourcery.com>
6113
6114 * tracepoint.c (build_traceframe_info_xml): Output trace state
6115 variables present in the trace buffer.
6116
01208463
TT
61172013-06-24 Tom Tromey <tromey@redhat.com>
6118
6119 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
6120 create-version.sh.
6121 (version.o): Remove.
6122 * gdbreplay.c: Include version.h.
6123 (version, host_name): Don't declare.
6124 * server.h: Include version.h.
6125 (version, host_name): Don't declare.
6126
760256f9
PA
61272013-06-12 Pedro Alves <palves@redhat.com>
6128
6129 * linux-x86-low.c (linux_is_elf64): Delete global.
6130 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
6131 with local linux_pid_exe_is_elf_64_file use.
6132
030031ee
PA
61332013-06-11 Pedro Alves <palves@redhat.com>
6134
6135 * linux-low.c (regset_disabled, disable_regset): New functions.
6136 (regsets_fetch_inferior_registers)
6137 (regsets_store_inferior_registers): Use them.
6138 (initialize_regsets_info); Don't allocate the disabled_regsets
6139 array here.
6140 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
6141 comment.
6142
5da6eb0a
PA
61432013-06-11 Pedro Alves <palves@redhat.com>
6144
6145 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
6146 xmalloc.
6147
7e5aaa09
PA
61482013-06-11 Pedro Alves <palves@redhat.com>
6149
6150 * linux-x86-low.c (initialize_low_arch): Call
6151 init_registers_x32_avx_linux.
6152
d878444c
JK
61532013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
6154
6155 Fix compatibility with Android Bionic.
6156 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
6157 it is not empty.
6158
3aee8918
PA
61592013-06-07 Pedro Alves <palves@redhat.com>
6160
5f2b57b5 6161 PR server/14823
3aee8918
PA
6162 * Makefile.in (OBS): Add tdesc.o.
6163 (IPA_OBJS): Add tdesc-ipa.o.
6164 (tdesc-ipa.o): New rule.
6165 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
6166 interface.
6167 * linux-low.c (new_inferior): Delete.
6168 (disabled_regsets, num_regsets): Delete.
6169 (linux_add_process): Adjust to set the new per-process
6170 new_inferior flag.
6171 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
6172 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
6173 was a stop. When calling arch_setup, switch the current inferior
6174 to the thread that got an event.
6175 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
6176 (regsets_fetch_inferior_registers)
6177 (regsets_store_inferior_registers): New regsets_info parameter.
6178 Adjust to use it.
6179 (linux_register_in_regsets): New regs_info parameter. Adjust to
6180 use it.
6181 (register_addr, fetch_register, store_register): New usrregs_info
6182 parameter. Adjust to use it.
6183 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
6184 parameter regs_info. Adjust to use it.
6185 (linux_fetch_registers): Get the current inferior's regs_info, and
6186 adjust to use it.
6187 (linux_store_registers): Ditto.
6188 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
6189 (initialize_low): Don't initialize the target_regsets here. Call
6190 initialize_low_arch.
6191 * linux-low.h (target_regsets): Delete declaration.
6192 (struct regsets_info): New.
6193 (struct usrregs_info): New.
6194 (struct regs_info): New.
6195 (struct process_info_private) <new_inferior>: New field.
6196 (struct linux_target_ops): Delete the num_regs, regmap, and
6197 regset_bitmap fields. New field regs_info.
6198 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
6199 * i387-fp.c (num_xmm_registers): Delete.
6200 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
6201 calls to new interface.
6202 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
6203 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
6204 Infer the number of xmm registers from the regcache's target
6205 description.
6206 * i387-fp.h (num_xmm_registers): Delete.
6207 * inferiors.c (add_thread): Don't install the thread's regcache
6208 here.
6209 * proc-service.c (gregset_info): Fetch the current inferior's
6210 regs_info. Adjust to use it.
6211 * regcache.c: Include tdesc.h.
6212 (register_bytes, reg_defs, num_registers)
6213 (gdbserver_expedite_regs): Delete.
6214 (get_thread_regcache): If the thread doesn't have a regcache yet,
6215 create one, instead of aborting gdbserver.
6216 (regcache_invalidate_one): Rename to ...
6217 (regcache_invalidate_thread): ... this.
6218 (regcache_invalidate_one): New.
6219 (regcache_invalidate): Only invalidate registers of the current
6220 process.
6221 (init_register_cache): Add target_desc parameter, and use it.
6222 (new_register_cache): Ditto. Assert the target description has a
6223 non zero registers_size.
6224 (regcache_cpy): Add assertions. Adjust.
6225 (realloc_register_cache, set_register_cache): Delete.
6226 (registers_to_string, registers_from_string): Adjust.
6227 (find_register_by_name, find_regno, find_register_by_number)
6228 (register_cache_size): Add target_desc parameter, and use it.
6229 (free_register_cache_thread, free_register_cache_thread_one)
6230 (regcache_release, register_cache_size): New.
6231 (register_size): Add target_desc parameter, and use it.
6232 (register_data, supply_register, supply_register_zeroed)
6233 (supply_regblock, supply_register_by_name, collect_register)
6234 (collect_register_as_string, collect_register_by_name): Adjust.
6235 * regcache.h (struct target_desc): Forward declare.
6236 (struct regcache) <tdesc>: New field.
6237 (init_register_cache, new_register_cache): Add target_desc
6238 parameter.
6239 (regcache_invalidate_thread): Declare.
6240 (regcache_invalidate_one): Delete declaration.
6241 (regcache_release): Declare.
6242 (find_register_by_number, register_cache_size, register_size)
6243 (find_regno): Add target_desc parameter.
6244 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
6245 declarations.
6246 * remote-utils.c: Include tdesc.h.
6247 (outreg, prepare_resume_reply): Adjust.
6248 * server.c: Include tdesc.h.
6249 (gdbserver_xmltarget): Delete declaration.
6250 (get_features_xml, process_serial_event): Adjust.
6251 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
6252 declare.
6253 (struct process_info) <tdesc>: New field.
6254 (ipa_tdesc): Declare.
6255 * tdesc.c: New file.
6256 * tdesc.h: New file.
6257 * tracepoint.c: Include tdesc.h.
6258 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
6259 (get_context_regcache): Adjust to pass ipa_tdesc down.
6260 (do_action_at_tracepoint): Adjust to get the register cache size
6261 from the context regcache's description.
6262 (traceframe_walk_blocks): Adjust to get the register cache size
6263 from the current trace frame's description.
6264 (traceframe_get_pc): Adjust to get current trace frame's
6265 description and pass it down.
6266 (gdb_collect): Adjust to get the register cache size from the
6267 IPA's description.
6268 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
6269 (gdbserver_xmltarget): Delete.
6270 (initialize_low_tracepoint): Set the ipa's target description.
6271 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
6272 (initialize_low_tracepoint): Set the ipa's target description.
6273 * linux-x86-low.c: Include tdesc.h.
6274 [__x86_64__] (is_64bit_tdesc): New.
6275 (ps_get_thread_area, x86_get_thread_area): Use it.
6276 (i386_cannot_store_register): Rename to ...
6277 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
6278 (i386_cannot_fetch_register): Rename to ...
6279 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
6280 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
6281 to new interface.
6282 (target_regsets): Rename to ...
6283 (x86_regsets): ... this.
6284 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
6285 interface.
6286 (x86_siginfo_fixup): Use is_64bit_tdesc.
6287 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
6288 (tdesc_x32_avx_linux, tdesc_x32_linux)
6289 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
6290 Declare.
6291 (x86_linux_update_xmltarget): Delete.
6292 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
6293 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
6294 (AMD64_LINUX_USER64_CS): New.
6295 (x86_linux_read_description): New, based on
6296 x86_linux_update_xmltarget.
6297 (same_process_callback): New.
6298 (x86_arch_setup_process_callback): New.
6299 (x86_linux_update_xmltarget): New.
6300 (x86_regsets_info): New.
6301 (amd64_linux_regs_info): New.
6302 (i386_linux_usrregs_info): New.
6303 (i386_linux_regs_info): New.
6304 (x86_linux_regs_info): New.
6305 (x86_arch_setup): Reimplement.
6306 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
6307 (x86_emit_ops): Ditto.
6308 (the_low_target): Adjust. Install x86_linux_regs_info,
6309 x86_cannot_fetch_register, and x86_cannot_store_register.
6310 (initialize_low_arch): New.
6311 * linux-ia64-low.c (tdesc_ia64): Declare.
6312 (ia64_fetch_register): Adjust.
6313 (ia64_usrregs_info, regs_info): New globals.
6314 (ia64_regs_info): New function.
6315 (the_low_target): Adjust.
6316 (initialize_low_arch): New function.
6317 * linux-sparc-low.c (tdesc_sparc64): Declare.
6318 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
6319 Adjust.
6320 (sparc_arch_setup): New function.
6321 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
6322 (the_low_target): Adjust.
6323 (initialize_low_arch): New function.
6324 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
6325 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
6326 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
6327 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
6328 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
6329 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
6330 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
6331 (tdesc_powerpc_isa205_vsx64l): Declare.
6332 (ppc_cannot_store_register, ppc_collect_ptrace_register)
6333 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
6334 (ppc_set_pc, ppc_get_hwcap): Adjust.
6335 (ppc_usrregs_info): Forward declare.
6336 (!__powerpc64__) ppc_regmap_adjusted: New global.
6337 (ppc_arch_setup): Adjust to the current process'es target
6338 description.
6339 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
6340 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
6341 (ppc_store_evrregset): Adjust.
6342 (target_regsets): Rename to ...
6343 (ppc_regsets): ... this, and make static.
6344 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
6345 (ppc_regs_info): New function.
6346 (the_low_target): Adjust.
6347 (initialize_low_arch): New function.
6348 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
6349 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
6350 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
6351 (tdesc_s390x_linux64v2): Declare.
6352 (s390_collect_ptrace_register, s390_supply_ptrace_register)
6353 (s390_fill_gregset, s390_store_last_break): Adjust.
6354 (target_regsets): Rename to ...
6355 (s390_regsets): ... this, and make static.
6356 (s390_get_pc, s390_set_pc): Adjust.
6357 (s390_get_hwcap): New target_desc parameter, and use it.
6358 [__s390x__] (have_hwcap_s390_high_gprs): New global.
6359 (s390_arch_setup): Adjust to set the current process'es target
6360 description. Don't adjust the regmap.
6361 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
6362 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
6363 (regs_info_3264): New globals.
6364 (s390_regs_info): New function.
6365 (the_low_target): Adjust.
6366 (initialize_low_arch): New function.
6367 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
6368 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
6369 [__mips64] (init_registers_mips_linux)
6370 (init_registers_mips_dsp_linux): Delete defines.
6371 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
6372 (have_dsp): New global.
6373 (mips_read_description): New, based on mips_arch_setup.
6374 (mips_arch_setup): Reimplement.
6375 (get_usrregs_info): New function.
6376 (mips_cannot_fetch_register, mips_cannot_store_register)
6377 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
6378 (mips_fill_fpregset, mips_store_fpregset): Adjust.
6379 (target_regsets): Rename to ...
6380 (mips_regsets): ... this, and make static.
6381 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
6382 (dsp_regs_info, regs_info): New globals.
6383 (mips_regs_info): New function.
6384 (the_low_target): Adjust.
6385 (initialize_low_arch): New function.
6386 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
6387 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
6388 Declare.
6389 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
6390 (arm_read_description): New, with bits factored from
6391 arm_arch_setup.
6392 (arm_arch_setup): Reimplement.
6393 (target_regsets): Rename to ...
6394 (arm_regsets): ... this, and make static.
6395 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
6396 (arm_regs_info): New function.
6397 (the_low_target): Adjust.
6398 (initialize_low_arch): New function.
6399 * linux-m68k-low.c (tdesc_m68k): Declare.
6400 (target_regsets): Rename to ...
6401 (m68k_regsets): ... this, and make static.
6402 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
6403 (m68k_regs_info): New function.
6404 (m68k_arch_setup): New function.
6405 (the_low_target): Adjust.
6406 (initialize_low_arch): New function.
6407 * linux-sh-low.c (tdesc_sharch): Declare.
6408 (target_regsets): Rename to ...
6409 (sh_regsets): ... this, and make static.
6410 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
6411 (sh_regs_info, sh_arch_setup): New functions.
6412 (the_low_target): Adjust.
6413 (initialize_low_arch): New function.
6414 * linux-bfin-low.c (tdesc_bfin): Declare.
6415 (bfin_arch_setup): New function.
6416 (bfin_usrregs_info, regs_info): New globals.
6417 (bfin_regs_info): New function.
6418 (the_low_target): Adjust.
6419 (initialize_low_arch): New function.
6420 * linux-cris-low.c (tdesc_cris): Declare.
6421 (cris_arch_setup): New function.
6422 (cris_usrregs_info, regs_info): New globals.
6423 (cris_regs_info): New function.
6424 (the_low_target): Adjust.
6425 (initialize_low_arch): New function.
6426 * linux-cris-low.c (tdesc_crisv32): Declare.
6427 (cris_arch_setup): New function.
6428 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
6429 (cris_regs_info): New function.
6430 (the_low_target): Adjust.
6431 (initialize_low_arch): New function.
6432 * linux-m32r-low.c (tdesc_m32r): Declare.
6433 (m32r_arch_setup): New function.
6434 (m32r_usrregs_info, regs_info): New globals.
6435 (m32r_regs_info): Adjust.
6436 (initialize_low_arch): New function.
6437 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
6438 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
6439 (tic6x_usrregs_info): Forward declare.
6440 (tic6x_read_description): New function, based on ...
6441 (tic6x_arch_setup): ... this. Reimplement.
6442 (target_regsets): Rename to ...
6443 (tic6x_regsets): ... this, and make static.
6444 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
6445 (tic6x_regs_info): New function.
6446 (the_low_target): Adjust.
6447 (initialize_low_arch): New function.
6448 * linux-xtensa-low.c (tdesc_xtensa): Declare.
6449 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
6450 (target_regsets): Rename to ...
6451 (xtensa_regsets): ... this, and make static.
6452 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
6453 globals.
6454 (xtensa_arch_setup, xtensa_regs_info): New functions.
6455 (the_low_target): Adjust.
6456 (initialize_low_arch): New function.
6457 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
6458 (nios2_arch_setup): Set the current process'es tdesc.
6459 (target_regsets): Rename to ...
6460 (nios2_regsets): ... this.
6461 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
6462 (nios2_regs_info): New function.
6463 (the_low_target): Adjust.
6464 (initialize_low_arch): New function.
a261b8f5
PA
6465 * linux-aarch64-low.c (tdesc_aarch64): Declare.
6466 (aarch64_arch_setup): Set the current process'es tdesc.
6467 (target_regsets): Rename to ...
6468 (aarch64_regsets): ... this.
6469 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
6470 (aarch64_regs_info): New function.
6471 (the_low_target): Adjust.
6472 (initialize_low_arch): New function.
3aee8918
PA
6473 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
6474 globals.
6475 (target_regsets): Rename to ...
6476 (tile_regsets): ... this.
6477 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
6478 (tile_regs_info): New function.
6479 (tile_arch_setup): Set the current process'es tdesc.
6480 (the_low_target): Adjust.
6481 (initialize_low_arch): New function.
6482 * spu-low.c (tdesc_spu): Declare.
6483 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
6484 * win32-arm-low.c (tdesc_arm): Declare.
6485 (arm_arch_setup): New function.
6486 (the_low_target): Install arm_arch_setup instead of
6487 init_registers_arm.
6488 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
6489 (init_windows_x86): Rename to ...
6490 (i386_arch_setup): ... this. Set `win32_tdesc'.
6491 (the_low_target): Adjust.
6492 * win32-low.c (win32_tdesc): New global.
6493 (child_add_thread): Don't create the thread cache here.
6494 (do_initial_child_stuff): Set the new process'es tdesc.
6495 * win32-low.h (struct target_desc): Forward declare.
6496 (win32_tdesc): Declare.
6497 * lynx-i386-low.c (tdesc_i386): Declare global.
6498 (lynx_i386_arch_setup): Set `lynx_tdesc'.
6499 * lynx-low.c (lynx_tdesc): New global.
6500 (lynx_add_process): Set the new process'es tdesc.
6501 * lynx-low.h (struct target_desc): Forward declare.
6502 (lynx_tdesc): Declare global.
6503 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
6504 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
6505 * nto-low.c (nto_tdesc): New global.
6506 (do_attach): Set the new process'es tdesc.
6507 * nto-low.h (struct target_desc): Forward declare.
6508 (nto_tdesc): Declare.
6509 * nto-x86-low.c (tdesc_i386): Declare.
6510 (nto_x86_arch_setup): Set `nto_tdesc'.
6511
b1fbec62
GB
65122013-06-04 Gary Benson <gbenson@redhat.com>
6513
6514 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
6515 to qSupported response when appropriate.
6516 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
6517 with nonzero-length annex.
6518 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
6519 arguments supplied in annex.
6520
d1ec4ce7
DE
65212013-05-31 Doug Evans <dje@google.com>
6522
ac44adcb 6523 PR server/15594
d1ec4ce7
DE
6524 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
6525 64 bits in 64-cross-32 environment.
6526
9b25f2d3
PA
65272013-05-28 Pedro Alves <palves@redhat.com>
6528
6529 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
6530 (aarch64-without-fpu.c): Delete rule.
6531 * configure.srv (aarch64*-*-linux*): Remove references to
6532 aarch64-without-fpu.o and aarch64-without-fpu.xml.
6533 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
6534 declaration.
6535
6740dc9c
PA
65362013-05-24 Pedro Alves <palves@redhat.com>
6537
6538 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
6539 instead of strchr/decode_address. Error if the range isn't split
6540 with a ','. Don't assume there's be a ':' in the action.
6541
c2d6af84
PA
65422013-05-23 Yao Qi <yao@codesourcery.com>
6543 Pedro Alves <palves@redhat.com>
6544
6545 * linux-low.c (lwp_in_step_range): New function.
6546 (linux_wait_1): If the thread was range stepping and stopped
6547 outside the stepping range, report the stop to GDB. Otherwise,
6548 continue stepping. Add range stepping debug output.
6549 (linux_set_resume_request): Copy the step range from the resume
6550 request to the lwp.
6551 (linux_supports_range_stepping): New.
6552 (linux_target_ops) <supports_range_stepping>: Set to
6553 linux_supports_range_stepping.
6554 * linux-low.h (struct linux_target_ops)
6555 <supports_range_stepping>: New field.
6556 (struct lwp_info) <step_range_start, step_range_end>: New fields.
6557 * linux-x86-low.c (x86_supports_range_stepping): New.
6558 (the_low_target) <supports_range_stepping>: Set to
6559 x86_supports_range_stepping.
6560 * server.c (handle_v_cont): Handle 'r' action.
6561 (handle_v_requests): Append ";r" if the target supports range
6562 stepping.
6563 * target.h (struct thread_resume) <step_range_start,
6564 step_range_end>: New fields.
6565 (struct target_ops) <supports_range_stepping>:
6566 New field.
6567 (target_supports_range_stepping): New macro.
6568
58794e1a
JB
65692013-05-17 Joel Brobecker <brobecker@adacore.com>
6570
6571 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
6572 confusion in comment.
6573
d631c5a7
JB
65742013-05-17 Joel Brobecker <brobecker@adacore.com>
6575
6576 * lynx-low.c (struct process_info_private): New type.
6577 (lynx_add_process): New function.
6578 (lynx_create_inferior, lynx_attach): Replace calls to
6579 add_process by calls to lynx_add_process.
6580 (lynx_resume): If PTID is null, then try using
6581 current_process()->private->last_wait_event_ptid.
6582 Add comments.
6583 (lynx_clear_inferiors): Delete. The contents of that function
6584 has been inlined in lynx_mourn;
6585 (lynx_wait_1): Save the ptid in the process's private data.
6586 (lynx_mourn): Free the process' private data. Replace call
6587 to lynx_clear_inferiors by call to clear_inferiors.
6588
96f7a20f
YQ
65892013-05-17 Yao Qi <yao@codesourcery.com>
6590
6591 * i386-low.c (i386_length_and_rw_bits): Move the comment to
6592 the right place.
6593
db0dfaa0
LM
65942013-05-16 Luis Machado <lgustavo@codesourcery.com>
6595
6596 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
6597 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
6598 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
6599 PT_TEXT_END_ADDR guards. Update comments.
6600 (linux_target_op) <read_offsets>: Conditionally define to
6601 linux_read_offsets if the target is UCLIBC and if it defines
6602 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
6603
68f5f838
SL
66042013-05-06 Sandra Loosemore <sandra@codesourcery.com>
6605 Andrew Jenner <andrew@codesourcery.com>
6606
6607 * Makefile.in (SFILES): Add linux-nios2-low.c.
6608 (clean): Add action to delete nios2-linux.c.
6609 (nios2-linux.c): New rule.
6610 * configure.srv: Add nios2*-*-linux*.
6611 * linux-nios2-low.c: New.
6612
1ebff1fd
HAQ
66132013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
6614
6615 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
6616
f6150862
HZ
66172013-04-25 Hui Zhu <hui@codesourcery.com>
6618
6619 PR gdb/15186
f6150862
HZ
6620 * ax.c (ax_printf): Add fflush.
6621
614c279d
TT
66222013-04-22 Tom Tromey <tromey@redhat.com>
6623
6624 * Makefile.in (SFILES): Add filestuff.c.
6625 (OBS): Add filestuff.o.
6626 (filestuff.o): New target.
6627 * config.in, configure: Rebuild.
6628 * configure.ac: Check for fdwalk, pipe2.
6629
7d4e5717
PA
66302013-04-17 Pedro Alves <palves@redhat.com>
6631
6632 * configure.ac (USE_THREAD_DB): Delete variable.
6633 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
6634 Don't AC_SUBST USE_THREAD_DB.
6635 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
6636 * config.in, configure: Regenerate.
6637
d5c93e41
PA
66382013-04-16 Pedro Alves <palves@redhat.com>
6639
6640 * linux-low.h (struct lwp_info) <thread_known>: Move under
6641 the USE_THREAD_DB #ifdef.
6642
04f5fe89
PA
66432013-04-16 Pedro Alves <palves@redhat.com>
6644
6645 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
6646 (linux-low.o): Delete rule.
6647 * linux-low.h: Always include "gdb_thread_db.h" instead of
6648 conditionally including thread_db.h.
6649 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
6650 HAVE_THREAD_DB_H.
6651
480b27bf
JK
66522013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6653
6654 * Makefile.in (install-only): Fix make install regression.
6655
43662968
JK
66562013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
6657
6658 Convert man pages to texinfo, new gdbinit.5 texinfo page.
6659 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
6660 installation.
6661 * gdbserver.1: Remove.
6662
3e74e146
PA
66632013-03-22 Pedro Alves <palves@redhat.com>
6664
6665 * linux-low.c (handle_extended_wait): Don't call
6666 linux_enable_event_reporting.
6667
a8347a2a
TT
66682013-03-15 Tony Theodore <tonyt@logyst.com>
6669
6670 PR build/9098:
6671 * Makefile.in (SHELL): Use @SHELL@.
6672
eeb56fa7
SDJ
66732013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
6674
6675 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
6676 compiler warning.
6677
4fa7e2ff
JB
66782013-03-13 Joel Brobecker <brobecker@adacore.com>
6679
6680 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
6681 Remove extraneous NULL element.
6682
8ddb1965
YQ
66832013-03-13 Yao Qi <yao@codesourcery.com>
6684
6685 * tracepoint.c (traceframe_read_tsv): Look for the last matched
6686 'V' block in trace frame.
6687
9accd112
MM
66882013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6689
6690 * target.h (struct target_ops): Add btrace ops.
6691 (target_supports_btrace): New macro.
6692 (target_enable_btrace): New macro.
6693 (target_disable_btrace): New macro.
6694 (target_read_btrace): New macro.
6695 * gdbthread.h (struct thread_info): Add btrace field.
6696 * server.c: Include btrace-common.h.
6697 (handle_btrace_general_set): New function.
6698 (handle_btrace_enable): New function.
6699 (handle_btrace_disable): New function.
6700 (handle_general_set): Call handle_btrace_general_set.
6701 (handle_qxfer_btrace): New function.
6702 (struct qxfer qxfer_packets[]): Add btrace entry.
6703 * inferiors.c (remove_thread): Disable btrace.
6704 * linux-low: Include linux-btrace.h.
6705 (linux_low_enable_btrace): New function.
6706 (linux_low_read_btrace): New function.
6707 (linux_target_ops): Add btrace ops.
6708 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
6709 Add srv_linux_btrace=yes.
6710 (x86_64-*-linux*): Add linux-btrace.o.
6711 Add srv_linux_btrace=yes.
6712 * configure.ac: Define HAVE_LINUX_BTRACE.
6713 * config.in: Regenerated.
6714 * configure: Regenerated.
6715
5cc22e4c
MM
67162013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6717
6718 * server.c (handle_qxfer): Preserve error message if -3 is
6719 returned.
6720 (qxfer): Document the -3 return value.
6721
7c97f91e
MM
67222013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6723
6724 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
6725 (linux_btrace_h): New variable.
6726 (linux-btrace.o): New rule.
6727
be9a119c 67282013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
6729 Hafiz Abid Qadeer <abidh@codesourcery.com>
6730
6731 * tracepoint.c (trace_buffer_size): New global.
6732 (DEFAULT_TRACE_BUFFER_SIZE): New define.
6733 (init_trace_buffer): Change to one-argument function. Allocate
6734 trace buffer memory.
6735 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
6736 handle QTBuffer:size packet.
6737 (cmd_bigqtbuffer_size): New function.
6738 (initialize_tracepoint): Call init_trace_buffer with
6739 DEFAULT_TRACE_BUFFER_SIZE.
6740 * server.c (handle_query): Add QTBuffer:size in the
6741 supported packets.
6742
e64f7499
YQ
67432013-03-07 Yao Qi <yao@codesourcery.com>
6744
6745 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
6746 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
6747 of -1.
6748 (cmd_qtsp): Adjust condition. Do post increment.
6749 Set cur_action and cur_step_action back to 0.
6750
f0ae6fc3
PA
67512013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
6752
6753 PR server/15236
6754 * linux-low.c (linux_write_memory): Return early success if LEN is
6755 zero.
6756
b5b0b0af
CV
67572013-03-05 Corinna Vinschen <vinschen@redhat.de>
6758
334ad4a8 6759 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 6760
589bc927
TT
67612013-02-28 Tom Tromey <tromey@redhat.com>
6762
6763 * configure.ac: Invoke AC_SYS_LARGEFILE.
6764 * configure, config.in: Rebuild.
6765
dfe07582
CV
67662013-02-28 Corinna Vinschen <vinschen@redhat.com>
6767
6768 * win32-low.c: Throughout, fix format strings and casts of
6769 printf-like functions to avoid type related warnings on all
6770 platforms.
6771 (get_child_debug_event): Print dwDebugEventCode as hex since
6772 that's how it's usually documented.
6773
736cd585
YQ
67742013-02-28 Yao Qi <yao@codesourcery.com>
6775
6776 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
6777 pulongest.
6778
e1f58301
JW
67792013-02-27 Jiong Wang <jiwang@tilera.com>
6780
6781 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
6782 (reg-tilegx32.c): New rule.
6783 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
6784 * linux-tile-low.c (tile_arch_setup): New function. Invoke
6785 different register info initializer according to elf class.
6786 (init_registers_tilgx32): New function. The tilegx32 register info
6787 initializer.
6788 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
6789 (tile_store_gregset): Likewise.
6790
d171ca78
YQ
67912013-02-27 Yao Qi <yao@codesourcery.com>
6792
6793 * server.c (process_point_options): Print debug message when
6794 debug_threads is true.
6795
282bbdf3
YQ
67962013-02-26 Yao Qi <yao@codesourcery.com>
6797
6798 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
6799
aca22551
PA
68002013-02-19 Pedro Alves <palves@redhat.com>
6801 Kai Tietz <ktietz@redhat.com>
6802
6803 PR gdb/15161
6804
6805 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
6806 instead of strtoul to extract address from packet.
6807 (process_serial_event) <'z'>: Likewise.
6808
4f3cee1c
YQ
68092013-02-18 Yao Qi <yao@codesourcery.com>
6810
6811 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
6812
8e1d55a3
PA
68132013-02-14 Pedro Alves <palves@redhat.com>
6814
6815 Plug memory leak.
6816
6817 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
6818 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
6819
458820da
PA
68202013-02-14 Pedro Alves <palves@redhat.com>
6821
6822 * tracepoint.c (cmd_qtdpsrc): Use savestring.
6823
baea0dae
PA
68242013-02-14 Pedro Alves <palves@redhat.com>
6825
6826 * tracepoint.c (save_string): Delete.
6827 (add_tracepoint_action): Use savestring instead of save_string.
6828
0b1afbb3
PA
68292013-02-12 Pedro Alves <palves@redhat.com>
6830
6831 * linux-xtensa-low.c: Ditto.
6832 * xtensa-xtregs.c: Ditto.
6833
8a4ac37e
PA
68342013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
6835
6836 * thread-db.c (thread_db_get_tls_address): NULL pointer check
6837 thread_db.
6838
148de6bb
MS
68392013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
6840
6841 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
6842 aarch64_num_wp_regs and aarch64_num_bp_regs to
6843 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
6844
55fac6e0
MS
68452013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
6846
6847 * linux-aarch64-low.c (ps_get_thread_area): Replace
6848 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
6849
176eb98c
MS
68502013-02-04 Jim MacArthur <jim.macarthur@arm.com>
6851 Marcus Shawcroft <marcus.shawcroft@arm.com>
6852 Nigel Stephens <nigel.stephens@arm.com>
6853 Yufeng Zhang <yufeng.zhang@arm.com>
6854
6855 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
6856 (aarch64.c, aarch64-without-fpu.c): New targets.
6857 * configure.srv (aarch64*-*-linux*): New.
6858 * linux-aarch64-low.c: New file.
6859
56f7af9c
MS
68602013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
6861
43aaf8b6 6862 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
6863 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
6864 (dequeue_one_deferred_signal, linux_resume_one_thread)
6865 (fetch_register, linux_write_memory, linux_enable_event_reporting)
6866 (linux_tracefork_grandchild, linux_test_for_tracefork)
6867 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
6868 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
6869 where the argument is 0.
6870
60f662b0
YQ
68712013-01-25 Yao Qi <yao@codesourcery.com>
6872
6873 * event-loop.c: Include "queue.h".
6874 (gdb_event_p): New typedef.
6875 (struct gdb_event) <next_event>: Remove.
6876 (event_queue): Change to QUEUE(gdb_event_p).
6877 (async_queue_event): Remove.
6878 (gdb_event_xfree): New.
6879 (initialize_event_loop): New.
6880 (process_event): Use API from QUEUE.
6881 (wait_for_event): Likewise.
6882 * server.c (main): Call initialize_event_loop.
6883 * server.h (initialize_event_loop): Declare.
6884
5ae4861a
YQ
68852013-01-18 Yao Qi <yao@codesourcery.com>
6886
6887 * ax.h (struct eval_agent_expr_context): New.
6888 (gdb_eval_agent_expr): Update declaration.
6889 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
6890 TFRAME. Add new argument CTX.
6891 * server.h (struct eval_agent_expr_context): Declare.
6892 (agent_mem_read, agent_tsv_read): Update declaration.
6893 (agent_mem_read_string): Likewise.
6894 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
6895 (add_traceframe_block): Add new argument TPOINT.
6896 Increase TPOINT->traceframe_usage.
6897 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
6898 eval_tracepoint_agent_expr.
6899 (condition_true_at_tracepoint): Likewise.
6900 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
6901 (agent_mem_read_string, agent_tsv_read): Likewise.
6902
85e00e85
YQ
69032013-01-16 Yao Qi <yao@codesourcery.com>
6904
6905 * linux-low.c (linux_resume_one_lwp): Don't check
6906 'lwp->bp_reinsert != 0'.
6907
4039cf45
JB
69082013-01-07 Joel Brobecker <brobecker@adacore.com>
6909 Pedro Alves <palves@redhat.com>
6910
6911 * lynx-low.c (ptrace_request_to_str): Define a temporary
6912 macro and use it to simplify this function's implementation.
6913
9044dee2
JB
69142013-01-07 Joel Brobecker <brobecker@adacore.com>
6915
6916 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
6917 sets errno.
6918
e6352c8f
JB
69192013-01-07 Joel Brobecker <brobecker@adacore.com>
6920
6921 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
6922
50681a27
JB
69232013-01-07 Joel Brobecker <brobecker@adacore.com>
6924
6925 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
6926
3f6e77ef
JB
69272013-01-07 Joel Brobecker <brobecker@adacore.com>
6928
6929 * lynx-low.c (lynx_resume): Use the resume_info parameter
6930 to determine the ptid for the lynx_ptrace call, unless
6931 it is equal to minus_one_ptid, in which case we use the
6932 ptid of the current_inferior.
6933 (lynx_wait_1): After having received a thread create/exit
6934 event, resume the inferior's execution using the signaling
6935 thread's ptid, rather than the old ptid.
6936
7fda33ae
JB
69372013-01-07 Joel Brobecker <brobecker@adacore.com>
6938
6939 * lynx-low.c (lynx_resume): Delete variable ret.
6940
b9786c74
JB
69412013-01-01 Joel Brobecker <brobecker@adacore.com>
6942
6943 * gdbreplay.c (gdbreplay_version): Update copyright year.
6944 * server.c (gdbserver_version): Likewise.
6945
8b93d60f
JB
69462012-12-17 Joel Brobecker <brobecker@adacore.com>
6947
6948 * lynx-low.c (lynx_wait_1): Add debug trace before adding
6949 new thread.
6950
037335a7
JB
69512012-12-17 Joel Brobecker <brobecker@adacore.com>
6952
6953 * lynx-low.c (ptrace_request_to_str): Add handling for
6954 PTRACE_GETTRACESIG.
6955
52d4cbd8
JB
69562012-12-17 Joel Brobecker <brobecker@adacore.com>
6957
6958 * lynx-low.c (lynx_attach): Delete variable new_process.
6959
ab8f6ca9
JB
69602012-12-17 Joel Brobecker <brobecker@adacore.com>
6961
6962 * lynx-low.c (lynx_create_inferior): Delete variable
6963 new_process.
6964
78cbc024
JB
69652012-12-17 Joel Brobecker <brobecker@adacore.com>
6966
6967 * lynx-low.c (ptrace_request_to_str): Do not handle
6968 PTRACE_GETTHREADLIST if this macro does not exist.
6969
14a00470
YQ
69702012-12-15 Yao Qi <yao@codesourcery.com>
6971
6972 * Makefile.in (OBS): Add notif.o.
6973 * notif.c, notif.h: New.
6974 * server.c: Include "notif.h".
6975 (struct vstop_notif) <next>: Remove.
6976 <base>: New field.
6977 (queue_stop_reply): Update.
6978 (push_event, send_next_stop_reply): Remove.
6979 (discard_queued_stop_replies): Update.
6980 (notif_stop): New variable.
6981 (handle_v_stopped): Remove.
6982 (handle_v_requests): Don't call handle_v_stopped. Call
6983 handle_ack_notif instead.
6984 (queue_stop_reply_callback): Call notif_event_enque instead
6985 of queue_stop_reply.
6986 (handle_status): Don't call send_next_stop_reply, call
6987 notif_write_event instead.
6988 (kill_inferior_callback): Likewise.
6989 (detach_or_kill_inferior_callback): Likewise.
6990 (main): Call initialize_notif.
6991 (process_serial_event): Call QUEUE_is_empty.
6992 (handle_target_event): Call notif_push instead of push event.
6993 * server.h (push_event): Remove declaration.
6994
61c125b9
TT
69952012-12-10 Tom Tromey <tromey@redhat.com>
6996
6997 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
6998 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
6999 macros.
7000 (.c.o): Rewrite.
7001 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
7002 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
7003 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
7004 (amd64-linux-ipa.o, ax.o): Rewrite.
7005 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
7006 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
7007 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
7008 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
7009 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
7010 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
7011 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
7012 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
7013 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
7014 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
7015 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
7016 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
7017 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
7018 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
7019 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
7020 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
7021 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
7022 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
7023 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
7024 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
7025 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
7026 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
7027 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
7028 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
7029 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
7030 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
7031 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
7032 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
7033 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
7034 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
7035 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
7036 (reg-tilegx.o): Remove.
7037 (all_object_files): New macro.
7038 Include .deps files.
7039 * aclocal.m4, configure: Rebuild.
7040 * acinclude.m4: Include depstand.m4, lead-dot.m4.
7041 * configure.ac: Invoke ZW_CREATE_DEPDIR,
7042 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
7043
e90e9ad9
TT
70442012-12-05 Tom Tromey <tromey@redhat.com>
7045
7046 PR gdb/14917:
7047 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
7048
02d403bf 70492012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
7050
7051 * configure.ac: Check for linux/perf_event.h.
7052 * config.in: Regenerated.
7053 * configure: Regenerated.
7054
0270a750
PA
70552012-11-26 Maxime Villard <rustyBSD@gmx.fr>
7056
7057 * hostio.c (handle_readlink): Decrease buffer size
7058 parameter passed to readlink by one byte.
7059
8c29b58e
YQ
70602012-11-26 Yao Qi <yao@codesourcery.com>
7061
7062 * configure.ac (build_warnings): Append '-Wempty-body'.
7063 * configure: Regenerated.
7064 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
7065 body.
7066
8bdce1ff
PM
70672012-11-15 Pierre Muller <muller@sourceware.org>
7068
7069 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
7070 * config.in: Regenerate.
7071 * configure: Regenerate.
7072 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
7073 Use "gdb_wait.h" header instead of <sys/wait.h> header.
7074 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7075 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
7076 header.
7077 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
7078 instead of <sys/wait.h> header.
7079 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7080
02d403bf 70812012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
7082
7083 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
7084 (various make rules): Remove -DGDBSERVER
7085
fbd5db48
YQ
70862012-11-09 Yao Qi <yao@codesourcery.com>
7087
7088 * spu-low.c (current_ptid): Move it to ..
7089 * gdbthread.h: ... here. New.
7090 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
7091 * server.c (myresume, process_serial_event): Likewise.
7092 * thread-db.c (thread_db_find_new_threads): Likewise.
7093 * tracepoint.c (run_inferior_command): Likewise.
7094
b3dc46ff
AB
70952012-10-01 Andrew Burgess <aburgess@broadcom.com>
7096
7097 * server.c (handle_search_memory_1): Include access length in
7098 warning message.
7099
07c04788
HPN
71002012-09-05 Michael Brandt <michael.brandt@axis.com>
7101
7102 * linux-crisv32-low.c: Fix compile errors.
7103
918d227b
YQ
71042012-09-04 Yao Qi <yao@codesourcery.com>
7105
7106 * tracepoint.c (cmd_qtsv): Adjust debug message.
7107 Don't check CUR_TPOINT.
7108
18c1b81a
YQ
71092012-08-28 Yao Qi <yao@codesourcery.com>
7110
7111 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
7112 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
7113 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
7114 Remove declarations of xmalloc, xreallloc, xstrdup and
7115 freeargv.
7116 * Makefile.in (libiberty_h): New.
7117 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
7118 (linux-bfin-low.o): Append dependency 'libiberty.h'.
7119
dc82f37b
YQ
71202012-08-23 Yao Qi <yao@codesourcery.com>
7121
7122 * server.h: Remove declaration of 'xsnprintf'.
7123
406b1477
KS
71242012-08-22 Keith Seitz <keiths@redhat.com>
7125
7126 * server.h: Include build-gnulib-gbserver/config.h.
7127 * gdbreplay.c: Likewise.
7128
e6712ff1
DE
71292012-08-08 Doug Evans <dje@google.com>
7130
7131 * Makefile.in (SFILES): Add gdb_vecs.c.
7132 (OBS): Add gdb_vecs.o.
7133 (gdb_vecs_h, host_defs_h): New variables.
7134 (thread-db.o): Add $(gdb_vecs_h) dependency.
7135 (gdb_vecs.o): New rule.
7136 * thread-db.c: #include "gdb_vecs.h".
7137 (thread_db_load_search): Use a vector to iterate over path elements.
7138 Handle text appearing after "$pdir".
7139
7140 * configure.ac: Add check for strstr.
7141 * config.in: Regenerate.
7142 * configure: Regenerate.
7143
7c3270ae
UW
71442012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
7145
7146 * hostio.c (handle_pread): If pread fails, fall back to attempting
7147 lseek/read.
7148 (handle_pwrite): Likewise for pwrite.
7149
b62e2b27
UW
71502012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
7151
7152 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
7153 between unsupported TYPE and unimplementable ADDR/LEN combination.
7154 (arm_insert_point): Act on new return value.
7155
78a99e91
PA
71562012-07-31 Pedro Alves <palves@redhat.com>
7157
7158 * server.c (process_point_options): Only skip tokens if we find
7159 one that is unrecognized. Don't treat 'X' specially while
7160 skipping unrecognized tokens.
7161
fcf303ab
UW
71622012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
7163
7164 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
7165 to 4-byte-align HW breakpoint addresses for Thumb.
7166
7255706c
YQ
71672012-07-27 Yao Qi <yao@codesourcery.com>
7168
7169 PR remote/14161.
7170
7171 * server.h: Declare gdb_agent_about_to_close.
7172 * target.c (kill_inferior): Include "agent.h".
7173 New. Send command 'kill'.
7174 * target.h (kill_inferior): Removed macro.
7175 * tracepoint.c (gdb_agent_about_to_close): New.
7176 (gdb_agent_helper_thread): Handle command 'close'.
7177 Wait endlessly until the inferior stops.
7178 Install gdb_agent_remove_socket to atexit hook.
7179 (agent_socket_name): New static variable.
7180 (gdb_agent_socket_init): Replace local variable 'name' with
7181 'agent_socket_name'.
7182 (gdb_agent_remove_socket): New.
7183
5a3f286f
YQ
71842012-07-27 Yao Qi <yao@codesourcery.com>
7185
7186 * server.c (process_point_options): Stop at 'X' when parsing.
7187
961bd387
ME
71882012-07-19 Michael Eager <eager@eagercon.com>
7189
a261b8f5 7190 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
7191 to hw_execute.
7192 * linux-x86-low.c (x86_insert_point, x86_remove_point):
7193 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
7194 hardware breakpoint.
7195
aa7c7447
JK
71962012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7197
7198 * gdbserver/linux-low.c (initialize_low): Call
7199 linux_ptrace_init_warnings.
7200
7f216e7c
DE
72012012-07-02 Doug Evans <dje@google.com>
7202
7203 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
7204 pointer to int.
7205
d3ce09f5
SS
72062012-07-02 Stan Shebs <stan@codesourcery.com>
7207
7208 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
7209 (ax.o): Add it to build rule.
7210 (ax-ipa.o): Ditto.
7211 (OBS): Add format.o.
7212 (IPA_OBS): Add format.o.
7213 * server.c (handle_query): Claim support for breakpoint commands.
7214 (process_point_options): Add command case.
7215 (process_serial_event): Leave running if there are printfs in
7216 effect.
7217 * mem-break.h (any_persistent_commands): Declare.
7218 (add_breakpoint_commands): Declare.
7219 (gdb_no_commands_at_breakpoint): Declare.
7220 (run_breakpoint_commands): Declare.
7221 * mem-break.c (struct point_command_list): New struct.
7222 (struct breakpoint): New field command_list.
7223 (any_persistent_commands): New function.
7224 (add_commands_to_breakpoint): New function.
7225 (add_breakpoint_commands): New function.
7226 (gdb_no_commands_at_breakpoint): New function.
7227 (run_breakpoint_commands): New function.
7228 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
7229 locally.
7230 * ax.c: Include format.h.
7231 (ax_printf): New function.
7232 (gdb_eval_agent_expr): Add printf opcode.
7233
2f8f6aed
YQ
72342012-06-13 Yao Qi <yao@codesourcery.com>
7235
7236 * server.c (start_inferior): Remove duplicated writes to fields
7237 'last_resume_kind' and 'last_status' of 'current_inferior'.
7238
0c9070b3
YQ
72392012-06-12 Yao Qi <yao@codesourcery.com>
7240 Pedro Alves <palves@redhat.com>
7241
7242 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
7243 comment.
7244 * server.c (handle_v_cont): Extend comment.
7245
c52daf70
YQ
72462012-06-11 Yao Qi <yao@codesourcery.com>
7247
7248 * linux-low.c (linux_attach): Add 'static'.
7249
d38bbb0a
YQ
72502012-06-06 Yao Qi <yao@codesourcery.com>
7251
7252 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
7253
89dc0afd
JK
72542012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7255
7256 Fix gcc -flto compilation warning.
7257 * server.c (main): Make variable multi_mode and attach volatile.
7258
75f62ce7
TJB
72592012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7260
7261 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
7262 if the platform doesn't know about it.
7263
65f479b6
PA
72642012-05-30 Jeff Kenton <jkenton@tilera.com>
7265
7266 * Makefile.in (SFILES): Add linux-tile-low.c.
7267 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
7268 * configure.srv: Handle tilegx-*-linux*.
7269 * linux-tile-low.c: New file.
7270
0c5bf5a9
JK
72712012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7272
7273 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
7274
a493e3e2
PA
72752012-05-24 Pedro Alves <palves@redhat.com>
7276
7277 PR gdb/7205
7278
43aaf8b6 7279 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 7280
2ea28649
PA
72812012-05-24 Pedro Alves <palves@redhat.com>
7282
7283 PR gdb/7205
7284
7285 Replace target_signal with gdb_signal throughout.
7286
8d409d16
MR
72872012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
7288
7289 * linux-low.c (linux_store_registers): Avoid the copying sequence
7290 when no data has been retrieved by ptrace.
7291
23512c01
MGD
72922012-05-22 Will Deacon <will.deacon@arm.com>
7293
7294 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
7295 Include asm/ptrace.h.
7296 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
7297 already defined.
7298
4934b29e
MR
72992012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
7300
7301 * linux-low.c (linux_store_registers): Don't re-retrieve data
7302 with ptrace that has already been obtained from /proc. Always
7303 copy any data retrieved with ptrace to the buffer supplied.
7304
bde24c0a
PA
73052012-05-11 Yao Qi <yao@codesourcery.com>
7306 Pedro Alves <palves@redhat.com>
7307
7308 * linux-low.c (enum stopping_threads_kind): New.
7309 (stopping_threads): Change type to `enum stopping_threads_kind'.
7310 (handle_extended_wait): If stopping and suspending threads, leave
7311 the new_lwp suspended too.
7312 (linux_wait_for_event): Adjust.
7313 (stop_all_lwps): Set `stopping_threads' to
7314 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
7315 whether we're suspending threads or just stopping them. Assert no
7316 recursion happens.
7317
623b6bdf
YQ
73182012-04-29 Yao Qi <yao@codesourcery.com>
7319
7320 * server.h: Move some code to ...
7321 * gdbthread.h: ... here. New.
7322 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
7323 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
7324 (nto-low.o, win32-low.o): Likewise.
7325 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
7326 * regcache.c, remote-utils.c, server.c: Likewise.
7327 * target.c, tracepoint.c, win32-low.c: Likewise.
7328
f15f9948
TJB
73292012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7330
7331 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
7332 (PTRACE_ARG4_TYPE): Likewise.
7333 (PTRACE_XFER_TYPE): Likewise.
7334 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
7335 ptrace to PTRACE_ARG3_TYPE.
7336 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
7337 (PTRACE_ARG4_TYPE): Likewise.
7338 (PTRACE_XFER_TYPE): Likewise.
7339 (linux_detach_one_lwp): Cast fourth argument of
7340 ptrace to long then PTRACE_ARG4_TYPE.
7341 (regsets_fetch_inferior_registers): Cast third argument of
7342 ptrace to long then PTRACE_ARG3_TYPE.
7343 (regsets_store_inferior_registers): Likewise.
7344
38ea300a
PA
73452012-04-20 Pedro Alves <palves@redhat.com>
7346
7347 * configure: Regenerate.
7348
c971b7fa
PA
73492012-04-19 Pedro Alves <palves@redhat.com>
7350
43aaf8b6 7351 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 7352 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
7353 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
7354 (all, install-only, uninstall, clean-info, all-lib, clean): No
7355 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
7356 (maintainer-clean realclean distclean): Use subdir_do.
7357 (subdir_do): New.
7358 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 7359 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
7360 * acinclude.m4: Include acx_configure_dir.m4.
7361 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
7362 calls. Call AC_PROG_RANLIB. Configure gnulib using
7363 ACX_CONFIGURE_DIR.
7364 (GNULIB): New.
7365 (GNULIB_STDINT_H): Adjust.
7366 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
7367 * gdbreplay.c: Include build-gnulib/config.h.
7368 * server.h: Likewise.
7369 * aclocal.m4: Regenerate.
7370 * config.in: Regenerate.
7371 * configure: Regenerate.
c971b7fa 7372
809277f8
PA
73732012-04-19 Pedro Alves <palves@redhat.com>
7374
7375 * Makefile.in (LIBGNU, INCGNU): Adjust.
7376 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
7377 (all, install-only, uninstall, clean-info, all-lib, clean)
7378 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
7379 * configure.ac: Adjust AC_OUTPUT output.
7380 * aclocal.m4: Regenerate.
7381 * configure: Regenerate.
7382
fd9bb8b8
PA
73832012-04-19 Pedro Alves <palves@redhat.com>
7384
7385 * Makefile.in (generated_files): New.
7386 (server_h): Remove the explicit dependency on config.h, and depend
7387 on $generated_files.
7388
1c298c66
PA
73892012-04-19 Pedro Alves <palves@redhat.com>
7390
7391 * Makefile.in (INCGNU): Add -Ignulib.
7392
57c4b50b
PA
73932012-04-19 Pedro Alves <palves@redhat.com>
7394
7395 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
7396 (INCGNU): ... this, and spell out -I here.
7397 (GNULIB_LIB): Rename to ...
7398 (LIBGNU): ... this.
7399 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
7400
1030e047
PA
74012012-04-19 Pedro Alves <palves@redhat.com>
7402
7403 * config.in: Regenerate.
7404
447d4319
PA
74052012-04-19 Pedro Alves <palves@redhat.com>
7406
7407 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
7408 * server.h (memmem): Remove declaration.
7409 * config.in: Regenerate.
7410 * configure: Regenerate.
7411
aad9eab9
YQ
74122012-04-19 Yao Qi <yao@codesourcery.com>
7413
7414 * Makefile.in (SFILES): Add common/vec.c.
7415 (OBS): Add vec.o.
7416 (vec.o): New rule.
7417
3e10640f
YQ
74182012-04-19 Yao Qi <yao@codesourcery.com>
7419
7420 * remote-utils.c (prepare_resume_reply): Replace with macro
7421 target_core_of_thread.
7422 * server.c (handle_qxfer_threads_proper): Likewise.
7423 * target.h (traget_core_of_thread): New macro.
7424
71622373
PA
74252012-04-18 Pedro Alves <palves@redhat.com>
7426
7427 * aclocal.m4: Regenerate.
7428 * configure: Regenerate.
7429
80d26939
YQ
74302012-04-16 Yao Qi <yao@codesourcery.com>
7431
7432 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
7433 duplicated on address.
7434
42476b70
YQ
74352012-04-16 Yao Qi <yao@codesourcery.com>
7436
7437 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
7438 (struct tracepoint_action_ops) <send>: New field.
7439 (m_tracepoint_action_send, r_tracepoint_action_send): New.
7440 (agent_expr_send, x_tracepoint_action_send): New.
7441 (l_tracepoint_action_send): New.
7442 (cmd_qtdp): Download and install tracepoint
7443 according to `use_agent'.
7444 (run_inferior_command): Add one more parameter `len'.
7445 Update callers.
7446 (tracepoint_send_agent): New.
7447 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
7448
7bc83639
YQ
74492012-04-16 Yao Qi <yao@codesourcery.com>
7450
7451 * tracepoint.c (download_tracepoints): Moved to ...
7452 (cmd_qtstart): ... here.
7453
5f18041e
YQ
74542012-04-14 Yao Qi <yao@codesourcery.com>
7455
7456 * tracepoint.c: Include inttypes.h.
7457 (struct collect_memory_action): Use sized types.
7458 (struct tracepoint): Likewise.
7459 (cmd_qtdp, stop_tracing): Update print specifiers.
7460 (cmd_qtp, response_tracepoint): Likewise.
7461 (collect_data_at_tracepoint): Likewise.
7462 (collect_data_at_step): Likewise.
7463
55a8c076
YQ
74642012-04-14 Yao Qi <yao@codesourcery.com>
7465
7466 Import gnulib module inttypes.
7467 * aclocal.m4, config.in, configure: Regenerated.
7468
dc750257
YQ
74692012-04-14 Yao Qi <yao@codesourcery.com>
7470
7471 * Makefile.in (maintainer-clean, realclean, distclean): Remove
7472 Makefile and config.status at last.
7473
0ab5faf9
YQ
74742012-04-13 Yao Qi <yao@codesourcery.com>
7475
7476 * tracepoint.c: Include stdint.h unconditionally.
7477
18f5fd81
TJB
74782012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7479
7480 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
7481 on BFD_HAVE_SYS_PROCFS_TYPE.
7482 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
7483 * configure: Regenerate.
7484 * config.in: Likewise.
7485
4d47af5c
L
74862012-04-13 H.J. Lu <hongjiu.lu@intel.com>
7487
7488 * Makefile.in (clean): Also remove x32.c x32-linux.c
7489 x32-avx.c x32-avx-linux.c.
7490 (x32.o): New target.
7491 (x32.c): Likewise.
7492 (x32-linux.o): Likewise.
7493 (x32-linux.c): Likewise.
7494 (x32-avx.o): Likewise.
7495 (x32-avx.c): Likewise.
7496 (x32-avx-linux.o): Likewise.
7497 (x32-avx-linux.c): Likewise.
7498
7499 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
7500 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
7501 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
7502 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
7503 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
7504 i386/x32-avx-linux.xml.
7505
7506 * linux-x86-low.c (init_registers_x32_linux): New prototype.
7507 (init_registers_x32_avx_linux): Likwise.
7508 (x86_linux_update_xmltarget): Call init_registers_x32_linux
7509 or init_registers_x32_avx_linux if linux_is_elf64 is false.
7510
ecedbe58
PA
75112012-04-13 Pedro Alves <palves@redhat.com>
7512
7513 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
7514 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
7515 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
7516 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
7517 the sub-make.
7518
c92b5177
L
75192012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7520
7521 * linux-x86-low.c (compat_x32_clock_t): New.
7522 (compat_x32_siginfo_t): Likewise.
7523 (compat_x32_siginfo_from_siginfo): Likewise.
7524 (siginfo_from_compat_x32_siginfo): Likewise.
7525 (linux_is_elf64): Likewise.
7526 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
7527 and siginfo_from_compat_x32_siginfo for x32.
7528 (x86_arch_setup): Set linux_is_elf64.
7529
214d508e
L
75302012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7531
7532 PR gdb/13969
7533 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
7534 e_machine field.
7535 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
7536 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
7537 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
7538 compatible with process.
7539
c9a1864a
YQ
75402012-04-12 Yao Qi <yao@codesourcery.com>
7541
7542 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
7543 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
7544 (install-only, install-info, clean): Handle sub dir gnulib.
7545 (all-lib, am--refresh): New targets.
7546 (memmem.o): Remove target.
7547 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
7548 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
7549 (AC_REPLACE_FUNCS): Remove memmem.
7550 Invoke gl_INIT and AM_INIT_AUTOMAKE.
7551 (AC_OUTPUT): Generate Makefile in gnulib/.
7552 * aclocal.m4, config.in, configure: Regenerated.
7553
367ba2c2
MR
75542012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
7555
7556 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
7557
9d236627
PA
75582012-04-05 Pedro Alves <palves@redhat.com>
7559
7560 -Werror=strict-aliasing
7561
7562 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
7563 pointer.
7564
111217b3
PA
75652012-04-04 Pedro Alves <palves@redhat.com>
7566
7567 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7568 (sparc_store_gregset_from_stack, sparc_store_gregset)
7569 (sparc_breakpoint_at): Fix formatting.
7570
8365dcf5
TJB
75712012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7572
7573 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
7574 are available.
7575 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
7576 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
7577 * config.in: Regenerate.
7578 * configure: Likewise.
7579
689cc2ae
PA
75802012-03-29 Pedro Alves <palves@redhat.com>
7581
7582 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
7583 Correct ptrace arguments.
7584
c14dfd32
PA
75852012-03-28 Pedro Alves <palves@redhat.com>
7586
7587 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
7588 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
7589 (IA64_FR1_REGNUM): New defines.
7590 (ia64_fetch_register): New.
7591 (the_low_target): Install it.
7592 * linux-low.h (struct linux_target_ops) <fetch_register>: New
7593 field.
7594 * linux-low.c (linux_fetch_registers): Try the
7595 the_low_target.fetch_register hook first.
7596
7597 * linux-arm-low.c (the_low_target): Adjust.
7598 * linux-bfin-low.c (the_low_target): Adjust.
7599 * linux-cris-low.c (the_low_target): Adjust.
7600 * linux-crisv32-low.c (the_low_target): Adjust.
7601 * linux-m32r-low.c (the_low_target): Adjust.
7602 * linux-m68k-low.c (the_low_target): Adjust.
7603 * linux-mips-low.c (the_low_target): Adjust.
7604 * linux-ppc-low.c (the_low_target): Adjust.
7605 * linux-s390-low.c (the_low_target): Adjust.
7606 * linux-sh-low.c (the_low_target): Adjust.
7607 * linux-sparc-low.c (the_low_target): Adjust.
7608 * linux-tic6x-low.c (the_low_target): Adjust.
7609 * linux-x86-low.c (the_low_target): Adjust.
7610 * linux-xtensa-low.c (the_low_target): Adjust.
7611
63c88e13
PA
76122012-03-26 Pedro Alves <palves@redhat.com>
7613
7614 * server.c (handle_qxfer_libraries): Don't bail early if
7615 the_target->qxfer_libraries_svr4 is not NULL.
7616
fb723180
PA
76172012-03-26 Pedro Alves <palves@redhat.com>
7618
7619 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
7620
0afae3cf
PA
76212012-03-23 Pedro Alves <palves@redhat.com>
7622
7623 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
7624 "library-list-svr4" element's start tag when the the DSO list is
7625 empty.
7626
485f1ee4
PA
76272012-03-23 Pedro Alves <palves@redhat.com>
7628
7629 * linux-low.c (read_one_ptr): Read the inferior's pointer through
7630 a variable whose type size is the same as the inferior's pointer
7631 size.
7632
a5362b9a
TS
76332012-03-21 Thomas Schwinge <thomas@codesourcery.com>
7634
7635 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
7636 struct siginfo.
7637 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
7638 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
7639 * linux-low.h: Include <signal.h>.
7640 (struct siginfo): Remove forward declaration.
7641 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
7642 struct siginfo.
7643
d226c142
MF
76442012-03-21 Mike Frysinger <vapier@gentoo.org>
7645
7646 * .gitignore: Ignore more files.
7647
122f36ef
PA
76482012-03-19 Pedro Alves <palves@redhat.com>
7649 Jan Kratochvil <jan.kratochvil@redhat.com>
7650
7651 * server.c (cont_thread, general_thread): Add describing comments.
7652 (start_inferior): Clear `cont_thread'.
7653 (handle_v_cont): Don't set `cont_thread' if resuming all threads
7654 of a process.
7655
fc3e5175
YQ
76562012-03-15 Yao Qi <yao@codesourcery.com>
7657
7658 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
7659 handling to ...
7660 (cmd_qtdp): ... here.
7661
8d0d92cd
YQ
76622012-03-15 Yao Qi <yao@codesourcery.com>
7663
7664 * tracepoint.c (struct tracepoint_action_ops): New.
7665 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
7666 (m_tracepoint_action_download): New.
7667 (r_tracepoint_action_download): New.
7668 (x_tracepoint_action_download): New.
7669 (l_tracepoint_action_download): New.
7670 (add_tracepoint_action): Install `action->ops' according type.
7671 (download_tracepoint_1): Move code `download' function pointer
7672 of various tracepoint_action_ops.
7673
87b0bb13
JK
76742012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7675
7676 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
7677 linux_ptrace_attach_warnings.
7678
5f572dec
JK
76792012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7680
7681 * Makefile.in (linux-ptrace.o): New.
7682 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
7683 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
7684 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
7685 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
7686 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
7687 of these targets.
7688 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
7689
f4647387
YQ
76902012-03-08 Yao Qi <yao@codesourcery.com>
7691 Pedro Alves <palves@redhat.com>
7692
7693 Fix PR server/13392.
7694 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
7695 offset of JMP insn.
7696 * tracepoint.c (remove_tracepoint): New.
7697 (cmd_qtdp): Call remove_tracepoint when failed to install.
7698
9b224c5e
PA
76992012-03-07 Pedro Alves <palves@redhat.com>
7700
7701 * linux-low.c (get_detach_signal): New.
7702 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
7703 Pass on pending signals to PTRACE_DETACH. Check the result of the
7704 ptrace call.
7705 * server.c (program_signals, program_signals_p): New.
7706 (handle_general_set): Handle QProgramSignals.
7707 * server.h (program_signals, program_signals_p): Declare.
7708
e237a7e2
JK
77092012-03-05 Pedro Alves <palves@redhat.com>
7710 Jan Kratochvil <jan.kratochvil@redhat.com>
7711
7712 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
7713 New comment why.
7714
5808517f
YQ
77152012-03-03 Yao Qi <yao@codesourcery.com>
7716
7717 * tracepoint.c (tracepoint_look_up_symbols): Update call to
7718 agent_look_up_symbols.
7719
58b4daa5
YQ
77202012-03-03 Yao Qi <yao@codesourcery.com>
7721
7722 * Makefile.in (linux-low.o): Keep dependence on agent.h.
7723 (linux-x86-low.o): Likewise.
7724 * server.h: Remove in_process_agent_loaded.
7725 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
7726 common/agent.c.
7727 Update callers.
7728
8ffcbaaf
YQ
77292012-03-03 Yao Qi <yao@codesourcery.com>
7730
7731 * tracepoint.c (gdb_agent_capability): New global.
7732 (in_process_agent_loaded_ust): Renamed to
7733 `in_process_agent_supports_ust'.
7734 Update callers.
7735 (in_process_agent_supports_ust): Call agent_capability_check.
7736 (clear_installed_tracepoints): Assert that agent supports
7737 agent.
7738
d1feda86
YQ
77392012-03-03 Yao Qi <yao@codesourcery.com>
7740
7741 * linux-low.c (linux_supports_agent): New.
7742 (linux_target_ops): Initialize field `supports_agent' with
7743 linux_supports_agent.
7744 * target.h (struct target_ops) <supports_agent>: New.
7745 (target_supports_agent): New macro.
7746 * server.c (handle_general_set): Handle packet 'QAgent'.
7747 (handle_query): Send `QAgent+'.
7748 * Makefile.in (server.o): Depends on agent.h.
7749
2fa291ac
YQ
77502012-03-03 Yao Qi <yao@codesourcery.com>
7751
7752 * Makefile.in (OBS): Add agent.o.
7753 Add new rule for agent.o.
7754 Track dependence of tracepoint.c on agent.h.
7755 * tracepoint.c (run_inferior_command_1):
7756 (run_inferior_command): Call agent_run_command.
7757 (gdb_ust_connect_sync_socket): Deleted. Move it to
7758 common/agent.c.
7759 (resume_thread, stop_thread): Likewise.
7760 (gdb_ust_socket_init): Renamed to ...
7761 (gdb_agent_socket_init): ... New.
7762 (gdb_ust_thread): Renamed to ...
7763 (gdb_agent_helper_thread): ... New.
7764 (gdb_ust_init): Move some code to ...
7765 (gdb_agent_init): ... here. New.
7766 [HAVE_UST]: Call gdb_ust_init.
7767 (initialize_tracepoint_ftlib): Call gdb_agent_init.
7768 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
7769 * config.in, configure: Regenerated.
7770
05044653
PA
77712012-03-02 Pedro Alves <palves@redhat.com>
7772
7773 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
7774 * linux-low.c (struct simple_pid_list): New.
7775 (stopped_pids): New a struct simple_pid_list pointer.
7776 (add_to_pid_list, pull_pid_from_list): New.
7777 (handle_extended_wait): Don't assume the first signal new children
7778 report is SIGSTOP. Adjust call to pull_pid_from_list.
7779 (linux_wait_for_lwp): Adjust.
7780
8d00225b
YQ
77812012-03-02 Yao Qi <yao@codesourcery.com>
7782
7783 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
7784 debug log.
7785
19560ba5
YQ
77862012-03-02 Yao Qi <yao@codesourcery.com>
7787
7788 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
7789 `stop_pc' and `tpoint'. Update caller.
7790
1faeff08
MR
77912012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
7792
7793 * linux-low.h (linux_target_ops): Add regset_bitmap member.
7794 * linux-low.c (use_linux_regsets): New macro.
7795 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
7796 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
7797 (linux_register_in_regsets): New function.
7798 (usr_fetch_inferior_registers): Skip registers covered by
7799 regsets.
7800 (usr_store_inferior_registers): Likewise.
7801 (usr_fetch_inferior_registers): New macro.
7802 (usr_store_inferior_registers): Likewise.
7803 (linux_fetch_registers): Handle mixed regset/non-regset targets.
7804 (linux_store_registers): Likewise.
7805 * linux-mips-low.c (init_registers_mips_dsp_linux): New
7806 prototype.
7807 (init_registers_mips64_dsp_linux): Likewise.
7808 (init_registers_mips_linux): New macro.
7809 (init_registers_mips_dsp_linux): Likewise.
7810 (mips_dsp_num_regs): Likewise.
7811 (DSP_BASE, DSP_CONTROL): New fallback macros.
7812 (mips_base_regs): New macro.
7813 (mips_regmap): Use it. Fix the size.
7814 (mips_dsp_regmap): New variable.
7815 (mips_dsp_regset_bitmap): Likewise.
7816 (mips_arch_setup): New function.
7817 (mips_cannot_fetch_register): Use the_low_target.regmap rather
7818 than mips_regmap.
7819 (mips_cannot_store_register): Likewise.
7820 (the_low_target): Update .arch_setup, .num_regs and .regmap
7821 initializers. Add .regset_bitmap initializer.
7822 * linux-arm-low.c (the_low_target): Add .regset_bitmap
7823 initializer.
7824 * linux-bfin-low.c (the_low_target): Likewise.
7825 * linux-cris-low.c (the_low_target): Likewise.
7826 * linux-crisv32-low.c (the_low_target): Likewise.
7827 * linux-ia64-low.c (the_low_target): Likewise.
7828 * linux-m32r-low.c (the_low_target): Likewise.
7829 * linux-m68k-low.c (the_low_target): Likewise.
7830 * linux-ppc-low.c (the_low_target): Likewise.
7831 * linux-s390-low.c (the_low_target): Likewise.
7832 * linux-sh-low.c (the_low_target): Likewise.
7833 * linux-sparc-low.c (the_low_target): Likewise.
7834 * linux-tic6x-low.c (the_low_target): Likewise.
7835 * linux-x86-low.c (the_low_target): Likewise.
7836 * linux-xtensa-low.c (the_low_target): Likewise.
7837 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
7838 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
7839 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
7840 srv_xmlfiles.
7841 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
7842 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
7843
c03e6ccc
YQ
78442012-02-29 Yao Qi <yao@codesourcery.com>
7845 Pedro Alves <palves@redhat.com>
7846
7847 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
7848 `step_over_finished' is true.
7849
644cebc9
PA
78502012-02-27 Pedro Alves <palves@redhat.com>
7851
7852 * linux-low.c (pid_is_stopped): Delete, moved to common/.
7853 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
7854
c14d7ab2
PA
78552012-02-27 Pedro Alves <palves@redhat.com>
7856
7857 PR server/9684
7858 * linux-low.c (pid_is_stopped): New.
7859 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
7860
412c89dd
LM
78612012-02-25 Luis Machado <lgustavo@codesourcery.com>
7862
7863 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
7864 of conditions.
7865
b745defe
MR
78662012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
7867
7868 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
7869
9f3a5c85
LM
78702012-02-24 Luis Machado <lgustavo@codesourcery>
7871
7872 * server.c (handle_query): Advertise support for target-side
7873 breakpoint condition evaluation.
7874 (process_point_options): New function.
7875 (process_serial_event): When inserting a breakpoint, check for
7876 a target-side condition that should be evaluated.
7877
7878 * mem-break.c: Include regcache.h and ax.h.
7879 (point_cond_list_t): New data structure.
7880 (breakpoint) <cond_list>: New field.
7881 (find_gdb_breakpoint_at): Make non-static.
7882 (delete_gdb_breakpoint_at): Clear any target-side
7883 conditions.
7884 (clear_gdb_breakpoint_conditions): New function.
7885 (add_condition_to_breakpoint): Likewise.
7886 (add_breakpoint_condition): Likewise.
7887 (gdb_condition_true_at_breakpoint): Likewise.
7888 (gdb_breakpoint_here): Return result directly instead
7889 of going through a local variable.
7890
7891 * mem-break.h (find_gdb_breakpoint_at): New prototype.
7892 (clear_gdb_breakpoint_conditions): Likewise.
7893 (add_breakpoint_condition): Likewise.
7894 (gdb_condition_true_at_breakpoint): Likewise.
7895
7896 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
7897 (need_step_over_p): Take target-side breakpoint condition into
7898 consideration.
7899
5e1dc496
LM
79002012-02-24 Luis Machado <lgustavo@codesourcery>
7901
7902 * server.h: Include tracepoint.h.
7903 (agent_mem_read, agent_get_trace_state_variable_value,
7904 agent_set_trace_state_variable_value,
7905 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
7906 get_set_tsv_func_addr): New prototypes.
7907
7908 * ax.h: New include file.
7909 * ax.c: New source file.
7910
7911 * tracepoint.c: Include ax.h.
7912 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
7913 agent_expr, eval_result_type): Move to ax.h.
7914 (parse_agent_expr): Rename to ...
7915 (gdb_parse_agent_expr): ... this, make it non-static and move
7916 to ax.h.
7917 (unparse_agent_expr) Rename to ...
7918 (gdb_unparse_agent_expr): ... this, make it non-static and move
7919 to ax.h.
7920 (eval_agent_expr): Rename to ...
7921 (eval_tracepoint_agent_expr): ... this.
7922 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
7923 forward declarations.
7924 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
7925 (agent_get_trace_state_variable_value): New function.
7926 (agent_set_trace_state_variable_value): New function.
7927 (cmd_qtdp): Call gdb_parse_agent_expr (...).
7928 (response_tracepoint): Call gdb_unparse_agent_expr (...).
7929 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
7930 (condition_true_at_tracepoint): Likewise.
7931 (parse_agent_expr): Rename to ...
7932 (gdb_parse_agent_expr): ... this and move to ax.c.
7933 (unparse_agent_expr): Rename to ...
7934 (gdb_unparse_agent_expr): ... this and move to ax.c.
7935 (gdb_agent_op_name): Move to ax.c.
7936 (eval_agent_expr): Rename to ...
7937 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
7938 and move to ax.c.
7939 (eval_tracepoint_agent_expr): New function.
7940 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 7941 non-static.
5e1dc496
LM
7942 (current_insn_ptr, emit_error, struct bytecode_address): Move to
7943 ax.c.
7944 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
7945 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
7946 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
7947 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
7948 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
7949 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
7950 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
7951 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
7952 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
7953 (compile_bytecodes): Remove forward declaration.
7954 (is_goto_target): Move to ax.c.
7955 (compile_bytecodes): Move to ax.c and call
7956 agent_get_trace_state_variable_value (...) and
7957 agent_set_trace_state_variable_value (...).
7958
7959 * Makefile.in: Update ax.c and IPA dependencies.
7960
277e4e52
PA
79612012-02-24 Pedro Alves <palves@redhat.com>
7962
7963 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
7964 (cmd_bigqtbuffer_circular): ... this. Only handle
7965 'QTBuffer:circular:'.
7966 (handle_tracepoint_general_set): Adjust.
7967
bf4c19f7
YQ
79682012-02-16 Yao Qi <yao@codesourcery.com>
7969
7970 * inferiors.c: Move code to ...
7971 * dll.c: .... here. New.
7972 * server.h: Declare clear_dlls.
7973 * Makefile.in (SFILES): Add dll.c.
7974 (OBS): Add dll.o
7975 (dll.o): New rule.
7976
d73f2619
YQ
79772012-02-11 Yao Qi <yao@codesourcery.com>
7978
7979 * server.c: (handle_monitor_command): Add a new parameter
7980 `own_buf'.
7981 (handle_query): Update caller.
7982
f8255c2a
JB
79832012-02-09 Joel Brobecker <brobecker@adacore.com>
7984
7985 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
7986 * configure, config.in: Regenerate.
7987 * hostio.c: Provide an alternate implementation if HAVE_READLINK
7988 is not defined.
7989
da84f473
PA
79902012-02-02 Pedro Alves <palves@redhat.com>
7991
7992 Try SIGKILL first, then PTRACE_KILL.
7993 * linux-low.c (linux_kill_one_lwp): New.
7994 (linux_kill_one_lwp): Rename to ...
7995 (kill_one_lwp_callback): ... this. Use the new
7996 linux_kill_one_lwp.
7997
e886a173
PA
79982012-02-02 Pedro Alves <palves@redhat.com>
7999
8000 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
8001 inferior.
8002
be07f1a2
PA
80032012-01-27 Pedro Alves <palves@redhat.com>
8004
8005 * linux-low.c (linux_child_pid_to_exec_file): Delete.
8006 (elf_64_file_p): Make static.
8007 (linux_pid_exe_is_elf_64_file): New.
8008 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
8009 Delete declarations.
8010 (linux_pid_exe_is_elf_64_file): Declare.
8011 * linux-x86-low.c (x86_arch_setup): Use
8012 linux_pid_exe_is_elf_64_file.
8013
d8301ad1
JK
80142012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8015
8016 * linux-low.c (linux_wait_for_event_1): Rename to ...
8017 (linux_wait_for_event): ... here and merge it with former
8018 linux_wait_for_event - new variable wait_ptid, use it.
8019 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
8020
01b17894
PA
80212012-01-23 Pedro Alves <palves@redhat.com>
8022
8023 * server.c (main): Avoid yet another case of infinite loop while
8024 detaching/killing after a longjmp.
8025
e825046f
JK
80262012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8027
8028 Code cleanup.
8029 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
8030
b9e7b9c3
UW
80312012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
8032
8033 * hostio.c (handle_readlink): New function.
8034 (handle_vFile): Call it to handle "vFile:readlink" packets.
8035
901f9912
UW
80362012-01-20 Pedro Alves <palves@redhat.com>
8037 Ulrich Weigand <ulrich.weigand@linaro.org>
8038
8039 * server.c (handle_v_requests): Only support vAttach and vRun to
8040 start multiple processes when in extended protocol mode.
8041
fc1ab1a0
PA
80422012-01-17 Pedro Alves <palves@redhat.com>
8043
8044 * tracepoint.c (initialize_tracepoint): Use mmap instead of
8045 memalign plus mprotect to allocate the scratch buffer.
8046
7d5d4e98
PA
80472012-01-13 Pedro Alves <palves@redhat.com>
8048
8049 * server.c (attach_inferior): Clear `cont_thread'.
8050
f128d5e9
PA
80512012-01-13 Pedro Alves <palves@redhat.com>
8052
8053 * server.c (main): Avoid infinite loop while detaching/killing
8054 after a longjmp.
8055
06db92f0
DE
80562012-01-09 Doug Evans <dje@google.com>
8057
8058 * server.c (start_inferior): Set last_ptid in --wrapper case.
8059
32d92999
YQ
80602012-01-06 Yao Qi <yao@codesourcery.com>
8061
8062 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
8063 defined.
8064 [IN_PROCESS_AGENT] (debug_agent): New global variable.
8065
5e0a92a9
YQ
80662012-01-04 Yao Qi <yao@codesourcery.com>
8067
8068 * tracepoint.c (cmd_qtdp): Print debug message
8069 for static tracepoint.
8070
ae639e8c
YQ
80712012-01-04 Yao Qi <yao@codesourcery.com>
8072
8073 * tracepoint.c (trace_vdebug): Differentiate debug message
8074 between gdbserver and IPA.
8075
f72429c5
YQ
80762012-01-03 Yao Qi <yao@codesourcery.com>
8077
8078 * tracepoint.c (tracepoint_was_hit): Don't collect for
8079 static tracepoint.
8080
12c3e59c
JB
80812012-01-02 Joel Brobecker <brobecker@adacore.com>
8082
8083 * terminal.h: Reformat copyright header.
8084
67827812
JB
80852012-01-02 Joel Brobecker <brobecker@adacore.com>
8086
8087 * server.c (gdbserver_version): Update copyright year.
8088 * gdbreplay.c (gdbreplay_version): Likewise.
8089
3e52c33d
JK
80902011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
8091
8092 * linux-low.c (linux_create_inferior): Put empty if clause for write.
8093
8094 Revert:
8095 2011-12-18 Hui Zhu <teawater@gmail.com>
8096 * linux-low.c (linux_create_inferior): Save return value to ret.
8097
66f1260e
HZ
80982011-12-18 Hui Zhu <teawater@gmail.com>
8099
8100 * linux-low.c (linux_create_inferior): Save return value to ret.
8101
e77616d7
DE
81022011-12-16 Doug Evans <dje@google.com>
8103
e7b06c57
DE
8104 * linux-low.c (linux_create_inferior): If stdio connection,
8105 redirect stdin from /dev/null, stdout to stderr.
8106 * remote-utils.c (remote_is_stdio): New static global.
8107 (remote_connection_is_stdio): New function.
8108 (remote_prepare): Handle stdio connection.
8109 (remote_open): Ditto.
8110 (remote_close): Don't close stdin for stdio connections.
8111 (read_prim,write_prim): New functions. Replace all calls to
8112 read/write to these.
8113 * server.c (main): Watch for "-" argument. Move call to
8114 remote_prepare before start_inferior.
8115 * server.h (STDIO_CONNECTION_NAME): New macro.
8116 (remote_connection_is_stdio): Declare.
8117
e77616d7
DE
8118 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
8119 in debugging output.
8120
82067193
YQ
81212011-12-15 Yao Qi <yao@codesourcery.com>
8122
8123 * tracepoint.c: Include sys/syscall.h.
8124 (gdb_ust_thread): Remove preprocessor conditional.
8125
82bfbe7e
PA
81262011-12-14 Pedro Alves <pedro@codesourcery.com>
8127
8128 * linux-low.c (linux_detach_one_lwp): Call
8129 the_low_target.prepare_to_resume before detaching.
8130
712c6575
YQ
81312011-12-14 Yao Qi <yao@codesourcery.com>
8132
8133 * tracepoint.c (gdb_ust_thread): Don't ignore return value
8134 of write.
8135
d54d1edf
YQ
81362011-12-14 Yao Qi <yao@codesourcery.com>
8137
8138 * i386-low.c (i386_low_stopped_data_address): Initialize local
8139 variable `control'.
8140
6210a125
PA
81412011-12-13 Pedro Alves <pedro@codesourcery.com>
8142
8143 PR remote/13492
8144
8145 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
8146 DR_CONTROL unless necessary. Extend comments.
8147 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
8148 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
8149
2ece8244
YQ
81502011-12-13 Yao Qi <yao@codesourcery.com>
8151
8152 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
8153 macros.
8154 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
8155
784867a5
JK
81562011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
8157
8158 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
8159 Print new debug message for such case.
8160
6bf36717
JK
81612011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8162
8163 Fix overlapping memcpy.
8164 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
8165 the read_inferior_memory transfer.
8166 (delete_fast_tracepoint_jump): New variable buf. Use it for the
8167 write_inferior_memory transfer.
8168 (set_fast_tracepoint_jump): New variable buf. Use it for the
8169 read_inferior_memory and write_inferior_memory transfers.
8170 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
8171 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
8172 Use it for the write_inferior_memory transfer.
8173 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
8174 buffers.
8175
50275556
MR
81762011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8177
8178 * linux-low.c (fetch_register, store_register): Make code
8179 consistent, fix formatting.
8180
7325beb4
MR
81812011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8182
8183 * linux-low.c (usr_store_inferior_registers): Factor out code
8184 to handle individual registers into...
8185 (store_register): ... this new function.
8186
c642a434
UW
81872011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
8188
8189 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
8190 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
8191 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
8192 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
8193 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
8194 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
8195 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
8196 (srv_xmlfiles): Add new XML files.
8197
8198 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
8199 and <sys/uio.h>.
8200 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
8201 (init_registers_s390_linux32v1): Add prototype.
8202 (init_registers_s390_linux32v2): Likewise.
8203 (init_registers_s390_linux64v1): Likewise.
8204 (init_registers_s390_linux64v2): Likewise.
8205 (init_registers_s390x_linux64v1): Likewise.
8206 (init_registers_s390x_linux64v2): Likewise.
8207 (s390_num_regs): Increment to 52.
8208 (s390_regmap): Add orig_r2 register.
8209 (s390_num_regs_3264): Increment to 68.
8210 (s390_regmap_3264): Add orig_r2 register.
8211 (s390_collect_ptrace_register): Handle orig_r2 register.
8212 (s390_supply_ptrace_register): Likewise.
8213 (s390_fill_last_break): New function.
8214 (s390_store_last_break): Likewise.
8215 (s390_fill_system_call): New function.
8216 (s390_store_system_call): Likewise.
8217 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
8218 register sets.
8219 (s390_check_regset): New function.
8220 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
8221 NT_S390_SYSTEM_CALL regsets and use appropriate description.
8222 Update target_regsets for available register sets.
8223
2268b414
JK
82242011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
8225 Jan Kratochvil <jan.kratochvil@redhat.com>
8226
8227 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
8228 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
8229 New.
8230 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
8231 * linux-low.h (struct process_info_private): New member r_debug.
8232 * server.c (handle_qxfer_libraries): Call
8233 the_target->qxfer_libraries_svr4.
8234 (handle_qxfer_libraries_svr4): New function.
8235 (qxfer_packets): New entry "libraries-svr4".
8236 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
8237 * target.h (struct target_ops): New member qxfer_libraries_svr4.
8238 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
8239 PACKET_qXfer_libraries_svr4.
8240
d6db1fab
UW
82412011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
8242
8243 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
8244 PSW address/mask between 8-byte and 16-byte formats.
8245 (s390_supply_ptrace_register): Likewise.
8246 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
8247 basic addressing mode bit.
8248
242f5f1c
SS
82492011-11-24 Stan Shebs <stan@codesourcery.com>
8250
8251 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
8252
f196051f
SS
82532011-11-17 Stan Shebs <stan@codesourcery.com>
8254
8255 * tracepoint.c (struct tracepoint): New field traceframe_usage.
8256 (tracing_start_time): New global.
8257 (tracing_stop_time): New global.
8258 (tracing_user_name): New global.
8259 (tracing_notes): New global.
8260 (tracing_stop_note): New global.
8261 (cmd_qtstart): Set traceframe_usage, start_time.
8262 (stop_tracing): Set stop_time.
8263 (cmd_qtstatus): Report additional status.
8264 (cmd_qtp): New function.
8265 (handle_tracepoint_query): Call it.
8266 (cmd_qtnotes): New function.
8267 (handle_tracepoint_general_set): Call it.
8268 (get_timestamp): Rename from tsv_get_timestamp.
8269
405f8e94
SS
82702011-11-14 Stan Shebs <stan@codesourcery.com>
8271 Kwok Cheung Yeung <kcy@codesourcery.com>
8272
8273 * linux-x86-low.c (small_jump_insn): New.
8274 (i386_install_fast_tracepoint_jump_pad): Add arguments for
8275 trampoline and error message, build a trampoline and issue a small
8276 jump instruction to it.
8277 (x86_install_fast_tracepoint_jump_pad): Add arguments for
8278 trampoline and error message.
8279 (x86_get_min_fast_tracepoint_insn_len): New.
8280 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
8281 * linux-low.h (struct linux_target_ops): Add arguments to
8282 install_fast_tracepoint_jump_pad operation, add new operation.
8283 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
8284 arguments.
8285 (linux_get_min_fast_tracepoint_insn_len): New function.
8286 (linux_target_op): Add new operation.
8287 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
8288 (gdb_trampoline_buffer_end): Ditto.
8289 (gdb_trampoline_buffer_error): Ditto.
8290 (struct ipa_sym_addresses): Add fields for new IPA variables.
8291 (symbol_list): Add entries for new IPA variables.
8292 (struct tracepoint): Add fields to hold the address range of the
8293 trampoline used by the tracepoint.
8294 (trampoline_buffer_head): New static variable.
8295 (trampoline_buffer_tail): Ditto.
8296 (claim_trampoline_space): New function.
8297 (have_fast_tracepoint_trampoline_buffer): New function.
8298 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
8299 structure.
8300 (install_fast_tracepoint): Ditto, also add error buffer argument.
8301 (cmd_qtminftpilen): New function.
8302 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
8303 (fast_tracepoint_from_trampoline_address): New function.
8304 (fast_tracepoint_collecting): Handle trampoline as part of jump
8305 pad space.
8306 (set_trampoline_buffer_space): New function.
8307 (initialize_tracepoint): Initialize new IPA variables.
8308 * target.h (struct target_ops): Add arguments to
8309 install_fast_tracepoint_jump_pad operation, add new
8310 get_min_fast_tracepoint_insn_len operation.
8311 (target_get_min_fast_tracepoint_insn_len): New.
8312 (install_fast_tracepoint_jump_pad): Add arguments.
8313 * server.h (IPA_BUFSIZ): Define.
8314 * linux-i386-ipa.c: Include extra header files.
8315 (initialize_fast_tracepoint_trampoline_buffer): New function.
8316 (initialize_low_tracepoint): Call it.
8317 * server.h (set_trampoline_buffer_space): Declare.
8318 (claim_trampoline_space): Ditto.
8319 (have_fast_tracepoint_trampoline_buffer): Ditto.
8320
1e4d1764
YQ
83212011-11-14 Yao Qi <yao@codesourcery.com>
8322
8323 * server.c (handle_query): Handle InstallInTrace for qSupported.
8324 * tracepoint.c (add_tracepoint): Sort list.
8325 (install_tracepoint, download_tracepoint): New.
8326 (cmd_qtdp): Call them to install and download tracepoints.
8327 (sort_tracepoints): Removed.
8328 (cmd_qtstart): Update.
8329
5c73ff4e
YQ
83302011-11-14 Yao Qi <yao@codesourcery.com>
8331
8332 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
8333 * mem-break.h: Declare.
8334 * tracepoint.c (cmd_qtstart): Move some code to ...
8335 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
8336 New.
8337 (download_tracepoints): Move some code to ...
8338 (download_tracepoint_1): ... here. New.
8339
86a30030
YQ
83402011-11-08 Yao Qi <yao@codesourcery.com>
8341
8342 * remote-utils.c (relocate_instruction): A comment fix.
8343
8d26e50c
JB
83442011-11-07 Joel Brobecker <brobecker@adacore.com>
8345
8346 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
8347 (i386_dr_low_get_control, i386_dr_low_get_status): Use
8348 dr_status_mirror and dr_control_mirror from debug_reg_state.
8349 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
8350 (i386_initial_stuff): Remove use of deleted globals.
8351 (i386_get_thread_context, i386_set_thread_context,
8352 i386_thread_added): Use dr_status_mirror and dr_control_mirror
8353 from debug_reg_state.
8354
a59306a3
YQ
83552011-11-05 Yao Qi <yao@codesourcery.com>
8356
8357 * tracepoint.c (gdb_collect): Loop over tracepoints of same
8358 address as TPOINT's.
8359
3065dfb6
SS
83602011-11-02 Stan Shebs <stan@codesourcery.com>
8361
8362 * tracepoint.c (agent_mem_read_string): New function.
8363 (eval_agent_expr): Call it for tracenz.
8364 * server.c (handle_query): Report support for tracenz.
8365
fd0d8c7c
YQ
83662011-11-02 Yao Qi <yao@codesourcery.com>
8367
8368 * tracepoint.c (cmd_qtstart): Remove unused local variables.
8369
609086b1
YQ
83702011-11-02 Yao Qi <yao@codesourcery.com>
8371
8372 * target.h: Fix a typo in comment.
8373
b9fd1791
PA
83742011-10-31 Pedro Alves <pedro@codesourcery.com>
8375
8376 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
8377 clobber the breakpoints' shadows with fast tracepoint jumps.
8378 * mem-break.h (check_mem_write): Add `myaddr' parameter.
8379 * target.c (write_inferior_memory): Also pass MYADDR down to
8380 check_mem_write.
8381
03583c20
UW
83822011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
8383
8384 * configure.ac: Check support for personality routine.
8385 * configure: Regenerate.
8386 * config.in: Likewise.
8387 * linux-low.c: Include <sys/personality.h>.
8388 Define ADDR_NO_RANDOMIZE if necessary.
8389 (linux_create_inferior): Disable address space randomization when
8390 forking inferior, if requested.
8391 (linux_supports_disable_randomization): New function.
8392 (linux_target_ops): Install it.
8393 * server.h (disable_randomization): Declare.
8394 * server.c (disable_randomization): New global variable.
8395 (handle_general_set): Handle QDisableRandomization.
8396 (handle_query): Likewise for qSupported.
8397 (main): Support --disable-randomization and --no-disable-randomization
8398 command line arguments.
8399 * target.h (struct target_ops): Add supports_disable_randomization.
8400 (target_supports_disable_randomization): New macro.
8401
723b724b
MF
84022011-09-29 Mike Frysinger <vapier@gentoo.org>
8403
8404 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
8405 ifdef check.
8406 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
8407 [!PT_GETDSBT] (target_loadmap): New definition.
8408 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
8409 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
8410 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
8411 and PT_GETDSBT to LINUX_LOADMAP.
8412 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
8413 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
8414
55329a5c 84152011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
8416
8417 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
8418 (arm_linux_hwbp_cap): New static variable.
8419 (arm_linux_get_hwbp_cap): Replace by ...
8420 (arm_linux_init_hwbp_cap): ... this new function.
8421 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
8422 (arm_linux_get_hw_watchpoint_count): Likewise.
8423 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8424 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
8425 (arm_prepare_to_resume): Use perror_with_name instead of error.
8426
55329a5c 84272011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
8428
8429 * linux-arm-low.c: Include <signal.h>.
8430 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
8431 (struct arm_linux_hwbp_cap): New data type.
8432 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
8433 (struct arm_linux_hw_breakpoint): New data type.
8434 (MAX_BPTS, MAX_WPTS): Define.
8435 (struct arch_process_info, struct arch_lwp_info): New data types.
8436 (arm_linux_get_hwbp_cap): New function.
8437 (arm_linux_get_hw_breakpoint_count): Likewise.
8438 (arm_linux_get_hw_watchpoint_count): Likewise.
8439 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8440 (arm_hwbp_control_initialize): Likewise.
8441 (arm_hwbp_control_is_enabled): Likewise.
8442 (arm_hwbp_control_is_initialized): Likewise.
8443 (arm_hwbp_control_disable): Likewise.
8444 (arm_linux_hw_breakpoint_equal): Likewise.
8445 (arm_linux_hw_point_initialize): Likewise.
8446 (struct update_registers_data): New data structure.
8447 (update_registers_callback: New function.
8448 (arm_insert_point): Likewise.
8449 (arm_remove_point): Likewise.
8450 (arm_stopped_by_watchpoint): Likewise.
8451 (arm_stopped_data_address): Likewise.
8452 (arm_new_process): Likewise.
8453 (arm_new_thread): Likewise.
8454 (arm_prepare_to_resume): Likewise.
8455 (the_low_target): Register arm_insert_point, arm_remove_point,
8456 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
8457 arm_new_thread, and arm_prepare_to_resume.
8458
6b9801d4
SS
84592011-09-15 Stan Shebs <stan@codesourcery.com>
8460
8461 * server.h (struct emit_ops): Add compare-goto fields.
8462 * tracepoint.c (gdb_agent_op_sizes): New table.
8463 (emit_eq_goto): New function.
8464 (emit_ne_goto): New function.
8465 (emit_lt_goto): New function.
8466 (emit_le_goto): New function.
8467 (emit_gt_goto): New function.
8468 (emit_ge_goto): New function.
8469 (is_goto_target): New function.
8470 (compile_bytecodes): Recognize special cases of compare-goto
8471 combinations and call specialized emitters for them.
8472 * linux-x86-low.c (amd64_emit_eq_goto): New function.
8473 (amd64_emit_ne_goto): New function.
8474 (amd64_emit_lt_goto): New function.
8475 (amd64_emit_le_goto): New function.
8476 (amd64_emit_gt_goto): New function.
8477 (amd64_emit_ge_goto): New function.
8478 (amd64_emit_ops): Add the new functions.
8479 (i386_emit_eq_goto): New function.
8480 (i386_emit_ne_goto): New function.
8481 (i386_emit_lt_goto): New function.
8482 (i386_emit_le_goto): New function.
8483 (i386_emit_gt_goto): New function.
8484 (i386_emit_ge_goto): New function.
8485 (i386_emit_ops): Add the new functions.
8486
bf15cbda
SS
84872011-09-08 Stan Shebs <stan@codesourcery.com>
8488
8489 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
8490 (i386_emit_epilogue): Restore %ebx.
8491
943ca1dd
JZ
84922011-08-31 Jie Zhang <jzhang918@gmail.com>
8493
8494 * server.c (step_thread): Remove definition.
8495 (process_serial_event): Don't handle Hs.
8496 * server.h (step_thread): Remove declaration.
8497 * target.c (set_desired_inferior): Remove use of step_thread.
8498
e3deef73
LM
84992011-08-24 Luis Machado <lgustavo@codesourcery.com>
8500
8501 * linux-low.c: Include linux-procfs.h.
8502 (linux_attach_lwp_1): Update comments.
8503 (linux_attach): Scan for existing threads when attaching to a
8504 process that is the tgid.
8505 * Makefile.in: Update dependencies.
8506
13da1c97
LM
85072011-08-24 Luis Machado <lgustavo@codesourcery.com>
8508
8509 * configure.srv: Add linux-procfs.o dependencies.
8510
881127c9
YQ
85112011-08-14 Yao Qi <yao@codesourcery.com>
8512
8513 * target.h (struct target_ops): Fix indent.
8514 * win32-low.c (win32_target_ops): Fix comment.
8515
58dbd541
YQ
85162011-08-14 Andrew Jenner <andrew@codesourcery.com>
8517 Yao Qi <yao@codesourcery.com>
8518
8519 * Makefile.in (clean): Remove tic6x-*.c files.
8520 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
8521 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
8522 (tic6x-c64xp-linux.c): Likewise.
8523 * configure.srv: Add support for tic6x-*-uclinux.
8524 * linux-tic6x-low.c: New.
8525 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
8526
78d85199
YQ
85272011-08-14 Andrew Stubbs <ams@codesourcery.com>
8528 Yao Qi <yao@codesourcery.com>
8529
8530 * target.h (struct target_ops): Add read_loadmap.
8531 * linux-low.c (struct target_loadseg): New type.
8532 (struct target_loadmap): New type.
8533 (linux_read_loadmap): New function.
8534 (linux_target_ops): Add linux_read_loadmap.
8535 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
8536 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
8537 to NULL.
78d85199 8538
a959a88d
EZ
85392011-08-05 Eli Zaretskii <eliz@gnu.org>
8540
8541 * win32-low.c: Include <stdint.h>.
8542
1ced966e
PA
85432011-07-22 Pedro Alves <pedro@codesourcery.com>
8544
8545 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
8546 to the inferior here.
8547 (i386_remove_aligned_watchpoint): Ditto.
8548 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
8549 fit part of the watchpoint in the debug registers.
8550 (i386_update_inferior_debug_regs): New.
8551 (i386_low_insert_watchpoint): Work on a local mirror of the debug
8552 registers, and only update the inferior on success.
8553 (i386_low_remove_watchpoint): Ditto.
8554
d26e3629
KY
85552011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
8556
8557 * linux-low.c (compare_ints, unique, list_threads, show_process,
8558 linux_core_of_thread): Delete.
8559 (linux_target_ops): Change linux_core_of_thread to
8560 linux_common_core_of_thread.
8561 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
8562 * utils.c (malloc_failure): Change type of argument.
8563 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
8564 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
8565 common/linux-osdata.c, common/ptid.c and common/buffer.c.
8566 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
8567 (IPA_OBJS): Add common-utils-ipa.o.
8568 (ptid_h, linux_osdata_h): New macros.
8569 (server_h): Add common/common-utils.h, common/xml-utils.h,
8570 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
8571 common/ptid.h.
8572 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
8573 ptid.o, buffer.o): New rules.
8574 (linux-low.o): Add common/linux-osdata.h as a dependency.
8575 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
8576 * configure.ac: Add AC_HEADER_DIRENT check.
8577 * config.in: Regenerate.
8578 * configure: Regenerate.
8579 * remote-utils.c (xml_escape_text): Delete.
8580 (buffer_grow, buffer_free, buffer_init, buffer_finish,
8581 buffer_xml_printf): Move to common/buffer.c.
8582 * server.c (main): Remove call to initialize_inferiors.
8583 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
8584 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
8585 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
8586 internal_error, gdb_assert, gdb_assert_fail): Delete.
8587 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
8588 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
8589 common/buffer.h.
8590 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
8591 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
8592 initialize_inferiors): Delete.
8593
2275a1a7
PA
85942011-07-20 Pedro Alves <pedro@codesourcery.com>
8595
8596 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
8597 symbol error.
8598
0a5b1e09
PA
85992011-05-31 Pedro Alves <pedro@codesourcery.com>
8600
8601 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
8602 assertion.
8603 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
8604
6938fd34
YQ
86052011-05-26 Yao Qi <yao@codesourcery.com>
8606
8607 * Makefile.in (thread-db.o): Track dependence to
8608 common/gdb_thread_db.h.
8609 * thread-db.c: include gdb_thread_db.h from right place.
8610
b481f9e0
TT
86112011-05-16 Adrian Cornish <gnu@bluedreamer.com>
8612
8613 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
8614 __FILE__ and __LINE__ to internal_error.
8615
98a5dd13
DE
86162011-05-13 Doug Evans <dje@google.com>
8617
8618 * thread-db.c (try_thread_db_load_from_sdir): New function.
8619 (try_thread_db_load_from_dir): New function.
8620 (thread_db_load_search): Handle $sdir, ignore $pdir.
8621 Remove trying of system directories if search of
8622 libthread-db-search-path fails, that is now done via $sdir.
8623
d248b706
KY
86242011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
8625
8626 * server.c (handle_query): Add EnableDisableTracepoints to the list
8627 of supported features.
43aaf8b6 8628 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 8629 tracepoints.
43aaf8b6
PA
8630 (cmd_qtenable_disable): New.
8631 (cmd_qtstart): Install tracepoints even if disabled.
8632 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
8633 receiving a QTEnable or QTDisable packet.
8634 (gdb_collect): Skip data collection if fast tracepoint is disabled.
8635 (ust_marker_to_static_tracepoint): Do not ignore disabled static
8636 tracepoints.
8637 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 8638
84e578fb
DE
86392011-05-10 Doug Evans <dje@google.com>
8640
8641 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
8642
71f55dd8
DE
86432011-05-04 Doug Evans <dje@google.com>
8644
8645 * linux-low.c (linux_join): Skip process lookup.
8646 * spu-low.c (spu_join): Ditto.
8647 * server.c (join_inferiors_callback): Delete.
8648 (process_serial_event): For 'D' packet (detach) call join_inferior
8649 directly.
8650
4d393d60
JM
86512011-05-04 Joseph Myers <joseph@codesourcery.com>
8652
8653 * README: Don't mention xscale*-*-linux*.
8654 * configure.srv (xscale*-*-linux*): Don't handle target.
8655
b00ad6ff
NF
86562011-04-27 Nathan Froyd <froydnj@codesourcery.com>
8657
8658 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
8659 casting pointers.
8660 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
8661 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
8662 (i386_emit_void_call_2): Likewise.
8663
af96c192
YQ
86642011-04-26 Yao Qi <yao@codesourcery.com>
8665
43aaf8b6
PA
8666 * linux-low.c: Move common macros to linux-ptrace.h.
8667 Include linux-ptrace.h.
af96c192
YQ
8668 * Makefile.in (linux_ptrace_h): New.
8669 (linux-low.o): Depends on linux-ptrace.h.
8670
03f2bd59
JK
86712011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8672
8673 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
8674 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
8675 (remote_prepare): New function with most of the TCP code from ...
8676 (remote_open): ... here. Detect PORT here unconditionally. Move also
8677 setting transport_is_reliable.
8678 * server.c (run_once): New variable.
8679 (gdbserver_usage): Document it.
8680 (main): Set run_once for `--once'. Call remote_prepare. Exit after
8681 the first run if RUN_ONCE.
8682 * server.h (run_once, remote_prepare): New declarations.
8683
7a9dd1b2
TT
86842011-04-19 Tom Tromey <tromey@redhat.com>
8685
8686 * win32-low.c (handle_load_dll): Remove duplicate "the".
8687
81239425
PM
86882011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
8689
8690 Remove support for old Cygwin 1.5 versions.
8691 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
8692 function to avoid warning.
8693 (win32_add_one_solib): Use cygwin_conv_path function to avoid
8694 warning.
8695
9e0627f1
PM
86962011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
8697
8698 * gdbserver/server.h (Macro _): Define it if not available.
8699
588eebee
MS
87002011-03-14 Michael Snyder <msnyder@vmware.com>
8701
348af9f7 8702 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 8703
43f70d4c
JB
87042011-03-10 Joel Brobecker <brobecker@adacore.com>
8705
8706 * Makefile.in (maintainer-clean realclean distclean): Remove
8707 "make ... subdir_do" command.
8708
348af9f7
MS
87092011-03-10 Michael Snyder <msnyder@vmware.com>
8710
8711 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
8712
8713 * server.c (handle_v_run): Free alloced buffer on early return.
8714
e637a4f5
YQ
87152011-03-09 Yao Qi <yao@codesourcery.com>
8716
8717 Revert:
8718 2011-03-04 Yao Qi <yao@codesourcery.com>
8719
8720 * Makefile.in: Remove GNU make feature --directory.
8721
8722 2011-03-05 Yao Qi <yao@codesourcery.com>
8723
8724 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8725 (subdir_do): New make target. Copied from gdb/Makefile.
8726 (maintainer-clean, realclean, distclean, clean): Call corresponding
8727 make targets in common/Makefile.
8728
8729 2011-02-11 Yao Qi <yao@codesourcery.com>
8730
8731 * configure.ac: Call AC_PROG_RANLIB.
8732 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
8733 * configure: Regenerate.
8734
e6edda56
JK
87352011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8736
8737 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
8738
e5141119
JB
87392011-03-06 Yao Qi <yao@codesourcery.com>
8740
8741 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
8742
64794aa4
JB
87432011-03-05 Yao Qi <yao@codesourcery.com>
8744
8745 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8746 (subdir_do): New make target. Copied from gdb/Makefile.
8747 (maintainer-clean, realclean, distclean, clean): Call corresponding
8748 make targets in common/Makefile.
8749
7a762829
YQ
87502011-03-04 Yao Qi <yao@codesourcery.com>
8751
8752 * Makefile.in: Remove GNU make feature --directory.
8753
348af9f7
MS
87542011-03-04 Michael Snyder <msnyder@vmware.com>
8755
8756 * server.c (queue_stop_reply): Call xmalloc not malloc.
8757
87582011-03-02 Michael Snyder <msnyder@vmware.com>
8759
8760 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
8761
9f72fee2
MS
87622011-02-28 Michael Snyder <msnyder@vmware.com>
8763
588eebee
MS
8764 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
8765 (cmd_qtframe): Ditto.
8766 (cmd_qtbuffer): Ditto.
8767 (cmd_bigqtbuffer): Ditto.
8768
9f72fee2
MS
8769 * utils.c (decimal2str): Initialize 'width' to nine, then
8770 don't mess with it.
8771
8040bd49
UW
87722011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8773
8774 * hostio.c (require_data): Free *data, not data.
8775
7e52cbd0
JK
87762011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8777
8778 * hostio.c (require_data): Use free, not xfree.
8779
9130f83e
MS
87802011-02-27 Michael Snyder <msnyder@vmware.com>
8781
4b812f4e
MS
8782 * server.c (handle_query): Discard unused value.
8783
9130f83e
MS
8784 * hostio.c (require_data): Free malloc memory before returning
8785 error.
8786
69d37113
MS
87872011-02-26 Michael Snyder <msnyder@vmware.com>
8788
8789 * linux-low.c (list_threads): Call closedir for dirent.
8790
35f5825a
MS
87912011-02-27 Michael Snyder <msnyder@vmware.com>
8792
2a589cef
MS
8793 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
8794 a case statement falls through.
8795
0adea5f7
MS
8796 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
8797
35f5825a
MS
8798 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
8799 in comparison.
8800
238f1c74
MS
88012011-02-26 Michael Snyder <msnyder@vmware.com>
8802
8803 * utils.c (decimal2str): Eliminate dead code and dead param.
8804 (pulongest): Drop dead param from call to decimal2str.
8805 (plongest): Ditto.
8806
633ff500
JB
88072011-02-24 Joel Brobecker <brobecker@adacore.com>
8808
8809 Revert the following patch (not approved yet):
8810 2011-02-21 Hui Zhu <teawater@gmail.com>
8811 * tracepoint.c (tp_printf): New function.
8812 (eval_agent_expr): Handle gdb_agent_op_printf.
8813
f9c6ff72
HZ
88142011-02-21 Hui Zhu <teawater@gmail.com>
8815
8816 * tracepoint.c (tp_printf): New function.
8817 (eval_agent_expr): Handle gdb_agent_op_printf.
8818
94d5e490
TT
88192011-02-18 Tom Tromey <tromey@redhat.com>
8820
8821 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
8822 (tracepoint.o): Likewise.
8823 * tracepoint.c (enum gdb_agent_op): Use ax.def.
8824 (gdb_agent_op_names): Likewise.
8825
c7f96d2b
TT
88262011-02-18 Tom Tromey <tromey@redhat.com>
8827
8828 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
8829 gdb_agent_op_rot>: New constants.
8830 (gdb_agent_op_names): Add pick and roll.
8831 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
8832 cases.
8833
0feedb2c
JK
88342011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
8835
8836 * aclocal.m4: Regenerated with aclocal-1.11.1.
8837
b3b9301e
PA
88382011-02-14 Pedro Alves <pedro@codesourcery.com>
8839
8840 * server.c (handle_qxfer_traceframe_info): New.
8841 (qxfer_packets): Register "traceframe-info".
8842 (handle_query): Report support for qXfer:traceframe-info:read+.
8843 * tracepoint.c (match_blocktype): New.
8844 (traceframe_find_block_type): Rename to ...
8845 (traceframe_walk_blocks): ... this. Add callback filter argument,
8846 and use it.
8847 (traceframe_find_block_type): New, reimplemented on top of
8848 traceframe_walk_blocks.
8849 (build_traceframe_info_xml): New.
8850 (traceframe_read_info): New.
8851 * server.h (traceframe_read_info): Declare.
8852
4f3e6fb7
YQ
88532011-02-11 Yao Qi <yao@codesourcery.com>
8854
8855 * configure.ac: Call AC_PROG_RANLIB.
8856 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
8857 * configure: Regenerate.
8858
764880b7
PA
88592011-02-07 Pedro Alves <pedro@codesourcery.com>
8860
8861 * server.c (gdb_read_memory): Change return semantics to allow
8862 partial transfers.
8863 (handle_search_memory_1): Adjust.
8864 (process_serial_event) <'m' packet>: Handle partial transfers.
8865 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
8866
1c79eb8a
PA
88672011-01-28 Pedro Alves <pedro@codesourcery.com>
8868
8869 * regcache.c (init_register_cache): Initialize
8870 regcache->register_status.
8871 (free_register_cache): Release regcache->register_status.
8872 (regcache_cpy): Copy register_status.
8873 (registers_to_string): Print 'x's for unavailable registers.
8874 (supply_register): Mark the register's status valid or
8875 unavailable, depending on whether a buffer was passed in or not.
8876 (supply_register_zeroed): New.
8877 (supply_regblock): Mark the registers' status valid or
8878 unavailable, depending on whether a buffer was passed in or not.
8879 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
8880 (struct regcache): New `register_status' field.
8881 (supply_register_zeroed): Declare.
8882 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
8883 supply_register_zeroed, rather than passing a NULL buffer to
8884 supply_register.
8885 * tracepoint.c (fetch_traceframe_registers): Update comment.
8886
85724a0e
PA
88872011-01-28 Pedro Alves <pedro@codesourcery.com>
8888
8889 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
8890 buffer explicit.
8891
d08aafef
PA
88922011-01-25 Pedro Alves <pedro@codesourcery.com>
8893
8894 * server.h (decode_xfer_write): Change prototype.
8895 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
8896 and don't extract the annex here.
8897 * server.c (decode_xfer_read): Remove `annex' parameter,
8898 and don't extract the annex here.
8899 (decode_xfer): New.
8900 (struct qxfer): New.
8901 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
8902 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
8903 (handle_qxfer_statictrace): New functions, abstracted out from
8904 handle_query, and made to use the struct qxfer interface.
8905 (handle_threads_qxfer_proper): Rename to ...
8906 (handle_qxfer_threads_proper): ... this.
8907 (handle_threads_qxfer): Rename to ...
8908 (handle_qxfer_threads): ... this. Adjust.
8909 (qxfer_packets): New array.
8910 (handle_qxfer): New function.
8911 (handle_query): Use handle_qxfer.
8912
493e2a69
MS
89132011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
8914
8915 * gdbreplay.c: Shorten lines of >= 80 columns.
8916 * linux-low.c: Ditto.
8917 * linux-ppc-low.c: Ditto.
8918 * linux-s390-low.c: Ditto.
8919 * linux-sparc-low.c: Ditto.
8920 * linux-x86-low.c: Ditto.
8921 * linux-xtensa-low.c: Ditto.
8922 * mem-break.c: Ditto.
8923 * nto-low.c: Ditto.
8924 * regcache.h: Ditto.
8925 * remote-utils.c: Ditto.
8926 * server.c: Ditto.
8927 * server.h: Ditto.
8928 * thread-db.c: Ditto.
8929 * tracepoint.c: Ditto.
8930 * utils.c: Ditto.
8931 * win32-low.h: Ditto.
8932
44944448
JB
89332011-01-05 Joel Brobecker <brobecker@adacore.com>
8934
8935 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
8936 update.
8937
71ce852c
JB
89382011-01-01 Joel Brobecker <brobecker@adacore.com>
8939
8940 * server.c (gdbserver_version): Update copyright year in version
8941 output.
8942 * gdbreplay.c (gdbreplay_version): Ditto.
8943
eb826dc6
MF
89442010-12-29 Jie Zhang <jie.zhang@analog.com>
8945
8946 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
8947 * linux-bfin-low.c: New file.
8948 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
8949 PT_DATA_ADDR for BFIN targets.
8950 * Makefile.in (SFILES): Add linux-bfin-low.c.
8951 (clean): Remove reg-bfin.c.
8952 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
8953 * README: Mention supported Blackfin targets.
8954
39ab222a
MF
89552010-12-23 Mike Frysinger <vapier@gentoo.org>
8956
8957 * .gitignore: New file.
8958
a1f2ce7d
MF
89592010-11-16 Mike Frysinger <vapier@gentoo.org>
8960
8961 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
8962
f474844c
JZ
89632010-10-22 Jie Zhang <jie@codesourcery.com>
8964
8965 * Makefile.in: Add FLAGS_TO_PASS variable.
8966 (install): Remove dependency of install-only and recursively
8967 invoke make for install-only.
8968
f1048712
DE
89692010-10-04 Doug Evans <dje@google.com>
8970
8971 * Makefile.in (uninstall): Use $(DESTDIR).
8972
b53a1623
PA
89732010-09-24 Pedro Alves <pedro@codesourcery.com>
8974
e6ee044d
PA
8975 PR gdb/11842
8976
b53a1623
PA
8977 * linux-x86-low.c (compat_siginfo_from_siginfo)
8978 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
8979 si_code is < 0. Check for si_code == SI_TIMER before checking for
8980 si_code < 0.
8981
fa1bd1e4
JB
89822010-09-13 Joel Brobecker <brobecker@adacore.com>
8983
8984 * lynx-i386-low.c: New file.
8985 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
8986
47fac8f8
JB
89872010-09-13 Joel Brobecker <brobecker@adacore.com>
8988
8989 * lynx-low.c (ptrace_request_to_str): Remove handling for
8990 request values that have been removed in LynxOS 5.x.
8991
1adfc54d
JB
89922010-09-13 Joel Brobecker <brobecker@adacore.com>
8993
8994 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
8995 <ptrace.h>
8996
c2a66c29
NS
89972010-09-09 Nathan Sidwell <nathan@codesourcery.com>
8998
8999 * configure.ac: Add --enable-inprocess-agent option.
9000 * configure: Rebuilt.
9001
32fcada3
YQ
90022010-09-06 Yao Qi <yao@codesourcery.com>
9003
9004 * linux-low.c (linux_kill): Remove unused variable.
9005 (linux_stabilize_threads): Likewise.
9006 * server.c (start_inferior): Likewise.
9007 (queue_stop_reply_callback): Likewise.
9008 * tracepoint.c (do_action_at_tracepoint): Likewise.
9009
0cccb683
YQ
90102010-09-06 Yao Qi <yao@codesourcery.com>
9011
9012 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
9013 on return.
9014
423ec54c
JK
90152010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9016
9017 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
9018
12ac6819
PA
90192010-09-06 Pedro Alves <pedro@codesourcery.com>
9020
9021 * Makefile.in (install-only): Replace $IPA_DEPFILES with
9022 "$(IPA_DEPFILES)".
9023
8ed54b31
JB
90242010-09-01 Joel Brobecker <brobecker@adacore.com>
9025
9026 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
9027 gdbserver/lynx-ppc-low.c: New files.
9028 * Makefile.in (lynx_low_h): New variable.
9029 (lynx-low.o, lynx-ppc-low.o): New rules.
9030 * configure.ac: On LynxOS, link with -lnetinet.
9031 * configure.srv: Add handling of powerpc-*-lynxos* targets.
9032 * configure: regenerate.
9033
bb0116a4
JB
90342010-09-01 Joel Brobecker <brobecker@adacore.com>
9035
9036 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
9037 * configure.ac: Add check for vasprintf and vsnprintf.
9038 * configure, config.in: Regenerate.
9039 * server.h (vasprintf, vsnprintf): Add conditional declarations.
9040
a778ab81 90412010-09-01 Joel Brobecker <brobecker@adacore.com>
9042
9043 * gdbreplay.c: Move include of alloca.h up, next to include of
9044 malloc.h.
9045 * server.h: Add include of malloc.h.
9046 * mem-break.c: Remove include of malloc.h.
9047 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
9048
8b034a19 90492010-09-01 Joel Brobecker <brobecker@adacore.com>
9050
9051 * Makefile.in (memmem.o): Build with -Wno-error.
9052
90532010-09-01 Joel Brobecker <brobecker@adacore.com>
9054
9055 * utils.c (xsnprintf): Make non-static.
9056 * server.h: Add xsnprintf declaration.
9057 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
9058 replace calls to snprintf by calls to xsnprintf throughout.
9059
90602010-09-01 Joel Brobecker <brobecker@adacore.com>
9061
9062 * configure.ac: Add configure check for alloca.
9063 * configure, config.in: Regenerate.
9064 * server.h: Include alloca.h if it exists.
9065 * gdbreplay.c: Include alloca.h if it exists.
9066
1a981360
PA
90672010-08-28 Pedro Alves <pedro@codesourcery.com>
9068
9069 * linux-low.c (__SIGRTMIN): Define if not already defined.
9070 (linux_create_inferior): Check for __ANDROID__ rather than
9071 __SIGRTMIN.
9072 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
9073 are already deferred.
9074 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
9075 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
9076 stopped and already has a pending signal to report.
9077 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
9078 a pending signal to report or is moving out of a jump pad.
9079 (linux_init_signals): Check for __ANDROID__ rather than
9080 __SIGRTMIN.
9081
b4d51a55
PA
90822010-08-28 Pedro Alves <pedro@codesourcery.com>
9083
9084 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
9085 debug_threads check. Avoid a linear search when not doing debug
9086 output.
9087
ec48365d
PA
90882010-08-27 Pedro Alves <pedro@codesourcery.com>
9089
9090 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
9091 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
9092 (struct file_handler) <fd>: Change type to gdb_fildes_t.
9093 (process_event): Change local fd's type to gdb_fildes_t.
9094 (create_file_handler): Adjust prototype.
9095 (delete_file_handler): Adjust prototype.
9096 (handle_file_event): Adjust prototype. Use pfildes.
9097 (create_file_event): Adjsut prototype.
9098 * remote-utils.c (remote_desc, listen_desc): Change type to
9099 gdb_fildes_t.
9100 * server.h: New gdb_fildes_t typedef.
9101 [USE_WIN32API]: Include winsock2.h.
9102 (delete_file_handler, add_file_handler): Adjust prototypes.
9103 (pfildes): Declare.
9104 * utils.c (pfildes): New.
9105
854d88f0
PA
91062010-08-27 Pedro Alves <pedro@codesourcery.com>
9107
9108 * configure.ac (build_warnings): Add -Wno-char-subscripts.
9109 * configure: Regenerate.
9110
0146f85b
PA
91112010-08-27 Pedro Alves <pedro@codesourcery.com>
9112
9113 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
9114 (linux_done_accessing_memory): ... this.
9115 (linux_target_ops): Adjust.
9116 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
9117 * nto-low.c (nto_target_ops): Adjust comment.
9118 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
9119 * spu-low.c (spu_target_ops): Adjust comment.
9120 * target.h (target_ops): Rename unprepare_to_access_memory field
9121 to done_accessing_memory.
9122 (unprepare_to_access_memory): Rename to ...
9123 (done_accessing_memory): ... this.
9124
90d74c30
PA
91252010-08-26 Pedro Alves <pedro@codesourcery.com>
9126
9127 * linux-low.c (linux_prepare_to_access_memory): New.
9128 (linux_unprepare_to_access_memory): New.
9129 (linux_target_ops): Install them.
9130 * server.c (read_memory): Rename to ...
9131 (gdb_read_memory): ... this. Use
9132 prepare_to_access_memory/prepare_to_access_memory.
9133 (write_memory): Rename to ...
9134 (gdb_write_memory): ... this. Use
9135 prepare_to_access_memory/prepare_to_access_memory.
9136 (handle_search_memory_1): Adjust.
9137 (process_serial_event): Adjust.
9138 * target.h (struct target_ops): New fields
9139 prepare_to_access_memory and unprepare_to_access_memory.
9140 (prepare_to_access_memory, unprepare_to_access_memory): New.
9141 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
9142 prepare_to_access_memory/prepare_to_access_memory.
9143 * nto-low.c (nto_target_ops): Adjust.
9144 * spu-low.c (spu_target_ops): Adjust.
9145 * win32-low.c (win32_target_ops): Adjust.
9146
fd467969
PA
91472010-08-26 Pedro Alves <pedro@codesourcery.com>
9148
9149 * Makefile.in (WARN_CFLAGS): Get it from configure.
9150 (WERROR_CFLAGS): New.
9151 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
9152 * configure.ac: Introduce --enable-werror, which adds -Werror to
9153 the compiler command line. Enabled by default. Disable with
9154 --disable-werror. Add -Wdeclaration-after-statement
9155 Wpointer-arith and -Wformat-nonliteral to warning flags.
9156 * configure: Regenerate.
9157
331e2f5f
PA
91582010-08-26 Pedro Alves <pedro@codesourcery.com>
9159
9160 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
9161
e581f2b4
PA
91622010-08-26 Pedro Alves <pedro@codesourcery.com>
9163
9164 * gdbreplay.c (remote_error): New.
9165 (gdbchar): New.
9166 (expect): Use gdbchar. Check for error reading from GDB.
9167 Clarify sync error output.
9168 (play): Check for errors writing to GDB.
9169 * linux-low.c (sigchld_handler): Really ignore `write' errors.
9170 * remote-utils.c (getpkt): Check for errors writing to the remote
9171 descriptor.
9172
3c11dd79
PA
91732010-08-25 Pedro Alves <pedro@codesourcery.com>
9174
9175 * linux-low.c (linux_wait_1): Move non-debugging code out of
9176 `debug_threads' control.
9177
d20a8ad9
PA
91782010-08-25 Pedro Alves <pedro@codesourcery.com>
9179
9180 * linux-low.c (linux_wait_1): Don't set last_status here.
9181 * server.c (push_event, queue_stop_reply_callback): Assert we're
9182 not pushing a TARGET_WAITKIND_IGNORE event.
9183 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
9184 (myresume, handle_target_event): Set the thread's last_resume_kind
9185 and last_status from the target returned status.
9186
964e4306
PA
91872010-08-25 Pedro Alves <pedro@codesourcery.com>
9188
9189 PR threads/10729
9190
9191 * linux-x86-low.c (update_debug_registers_callback): New.
9192 (i386_dr_low_set_addr): Use it.
9193 (i386_dr_low_get_addr): New.
9194 (i386_dr_low_set_control): Use update_debug_registers_callback.
9195 (i386_dr_low_get_control): New.
9196 (i386_dr_low_get_status): Adjust.
9197 * linux-low.c (linux_stop_lwp): New.
9198 * linux-low.h (linux_stop_lwp): Declare.
9199
9200 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
9201 argument instead of a i386_debug_reg_state.
9202 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
9203 a i386_debug_reg_state.
9204 (i386_insert_aligned_watchpoint): Adjust.
9205 (i386_remove_aligned_watchpoint): Adjust.
9206 (i386_low_stopped_data_address): Read the debug registers from the
9207 inferior instead of from the mirrors.
9208 * i386-low.h (struct i386_debug_reg_state): Extend comment.
9209 (i386_dr_low_get_addr): Declare.
9210 (i386_dr_low_get_control): Declare.
9211 (i386_dr_low_get_status): Change prototype.
9212
9213 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
9214 (i386_dr_low_get_addr): New.
9215 (i386_dr_low_get_control): New.
9216 (i386_dr_low_get_status): Adjust prototype. Return
9217 dr_status_mirror.
9218 (i386_initial_stuff): Clear dr_status_mirror and
9219 dr_control_mirror.
9220 (i386_get_thread_context): Adjust.
9221 (i386_set_thread_context): Adjust.
9222 (i386_thread_added): Adjust.
9223
5f21a75b
PA
92242010-08-24 Pedro Alves <pedro@codesourcery.com>
9225
9226 * linux-low.h (linux_thread_area): Delete declaration.
9227
3e4c1235
TS
92282010-08-11 Thomas Schwinge <thomas@codesourcery.com>
9229
9230 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
9231 after its termination.
9232
1971b033
PA
92332010-08-09 Pedro Alves <pedro@codesourcery.com>
9234
9235 * linux-low.c (gdb_wants_lwp_stopped): Delete.
9236 (gdb_wants_all_stopped): Delete.
9237 (linux_wait_1): Don't call them.
9238 * server.c (handle_v_cont): Tag all threads as want-stopped.
9239 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
9240 stopped as "client-wants-stopped".
9241
310444ac
PA
92422010-07-31 Pedro Alves <pedro@codesourcery.com>
9243
9244 * Makefile.in (signals_h): New.
9245 (server_h): Depend on it.
9246 (server.o): Don't depend on $(signals_def).
9247 (signals.o): Depend on $(signals_def).
9248
a19cae16
JK
92492010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
9250
9251 * Makefile.in (signals_def): New.
9252 (server_h): Append include/gdb/signals.h and signals_def.
9253 (server.o): Append signals_def.
9254
30d50328
JK
92552010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9256
9257 * server.c (handle_target_event): Use target_signal_to_host for
9258 resume_info.sig initialization.
9259 * target.h (struct thread_resume) <sig>: New comment.
9260
5c3216e2
OS
92612010-07-20 Ozkan Sezer <sezeroz@gmail.com>
9262
c6f46ca0
OS
9263 * server.c (handle_query): strcpy() the returned string from paddress()
9264 instead of sprintf().
5c3216e2
OS
9265 * utils.c (paddress): Return phex_nz().
9266
6bd31874
JB
92672010-07-07 Joel Brobecker <brobecker@adacore.com>
9268
9269 * server.c (handle_v_cont): Call mourn_inferior if process
9270 just exited.
9271 (myresume): Likewise.
9272
0fb4aa4b
PA
92732010-07-01 Pedro Alves <pedro@codesourcery.com>
9274
9275 Static tracepoints, and integration with UST.
9276
9277 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
9278 * mem-break.c (uninsert_all_breakpoints)
9279 (reinsert_all_breakpoints): New.
9280 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
9281 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
9282 (gdb_agent_ust_loaded, helper_thread_id)
9283 (gdb_agent_helper_thread_id): New macros.
9284 (struct ipa_sym_addresses): Add addr_ust_loaded,
9285 addr_helper_thread_id, addr_cmd_buf.
9286 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
9287 (in_process_agent_loaded_ust): New.
9288 (write_e_ust_not_loaded): New.
9289 (maybe_write_ipa_ust_not_loaded): New.
9290 (struct collect_static_trace_data_action): New.
9291 (enum tracepoint_type) <static_tracepoint>: New.
9292 (struct tracepoint) <handle>: Mention static tracepoints.
9293 (struct static_tracepoint_ctx): New.
9294 (CMD_BUF_SIZE): New.
9295 (add_tracepoint_action): Handle static tracepoint actions.
9296 (unprobe_marker_at): New.
9297 (clear_installed_tracepoints): Handle static tracepoints.
9298 (cmd_qtdp): Handle static tracepoints.
9299 (probe_marker_at): New.
9300 (cmd_qtstart): Handle static tracepoints.
9301 (response_tracepoint): Handle static tracepoints.
9302 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
9303 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
9304 (get_context_regcache): Handle static tracepoints.
9305 (do_action_at_tracepoint): Handle static tracepoint actions.
9306 (traceframe_find_block_type): Handle static trace data blocks.
9307 (traceframe_read_sdata): New.
9308 (download_tracepoints): Download static tracepoint actions.
9309 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
9310 (GDB_PROBE_NAME): New.
9311 (ust_ops): New.
9312 (GET_UST_SYM): New.
9313 (USTF): New.
9314 (dlsym_ust): New.
9315 (ust_marker_to_static_tracepoint): New.
9316 (gdb_probe): New.
9317 (collect_ust_data_at_tracepoint): New.
9318 (gdb_ust_probe): New.
9319 (UNIX_PATH_MAX, SOCK_DIR): New.
9320 (gdb_ust_connect_sync_socket): New.
9321 (resume_thread, stop_thread): New.
9322 (run_inferior_command): New.
9323 (init_named_socket): New.
9324 (gdb_ust_socket_init): New.
9325 (cstr_to_hexstr): New.
9326 (next_st): New.
9327 (first_marker, next_marker): New.
9328 (response_ust_marker): New.
9329 (cmd_qtfstm, cmd_qtsstm): New.
9330 (unprobe_marker_at, probe_marker_at): New.
9331 (cmd_qtstmat, gdb_ust_thread): New.
9332 (gdb_ust_init): New.
9333 (initialize_tracepoint_ftlib): Call gdb_ust_init.
9334 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
9335 (ST_REGENTRY): New.
9336 (x86_64_st_collect_regmap): New.
9337 (X86_64_NUM_ST_COLLECT_GREGS): New.
9338 (AMD64_RIP_REGNUM): New.
9339 (supply_static_tracepoint_registers): New.
9340 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
9341 (ST_REGENTRY): New.
9342 (i386_st_collect_regmap): New.
9343 (i386_NUM_ST_COLLECT_GREGS): New.
9344 (supply_static_tracepoint_registers): New.
9345 * server.c (handle_query): Handle qXfer:statictrace:read.
9346 <qSupported>: Report support for StaticTracepoints, and
9347 qXfer:statictrace:read features.
9348 * server.h (traceframe_read_sdata)
9349 (supply_static_tracepoint_registers): Declare.
9350 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
9351 (unpack_varlen_hex): Include in IPA build.
9352 * Makefile.in (ustlibs, ustinc): New.
9353 (IPA_OBJS): Add remote-utils-ipa.o.
9354 ($(IPA_LIB)): Link -ldl and -lpthread.
9355 (UST_CFLAGS): New.
9356 (IPAGENT_CFLAGS): Add UST_CFLAGS.
9357 * config.in, configure: Regenerate.
9358
9e4344e5
PA
93592010-06-20 Ian Lance Taylor <iant@google.com>
9360 Pedro Alves <pedro@codesourcery.com>
9361
9362 * linux-x86-low.c (always_true): Delete.
9363 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
9364 trying to fool the compiler with always_true.
9365
c6beb2cb
PA
93662010-06-20 Pedro Alves <pedro@codesourcery.com>
9367
9368 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
9369 conditions in gdbserver.
9370
d2ed6730
UW
93712010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
9372
9373 * spu-low.c (spu_read_memory): Wrap around local store limit.
9374 (spu_write_memory): Likewise.
9375
4e29fb54
PA
93762010-06-15 Pedro Alves <pedro@codesourcery.com>
9377
9378 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
9379 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
9380 LONGEST uses.
9381 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
9382 uses.
9383 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
9384 uses with LONGEST uses.
9385
6a271cae
PA
93862010-06-14 Stan Shebs <stan@codesourcery.com>
9387 Pedro Alves <pedro@codesourcery.com>
9388
9389 Bytecode compiler.
9390
9391 * linux-x86-low.c: Include limits.h.
9392 (add_insns): New.
9393 (always_true): New.
9394 (EMIT_ASM): New.
9395 (EMIT_ASM32): New.
9396 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
9397 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
9398 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
9399 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
9400 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
9401 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
9402 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
9403 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
9404 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
9405 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
9406 (amd64_emit_void_call_2): New.
9407 (amd64_emit_ops): New.
9408 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
9409 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
9410 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
9411 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
9412 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
9413 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
9414 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
9415 (i386_emit_call, i386_emit_reg, i386_emit_pop)
9416 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
9417 (i386_emit_stack_adjust, i386_emit_int_call_1)
9418 (i386_emit_void_call_2): New.
9419 (i386_emit_ops): New.
9420 (x86_emit_ops): New.
9421 (the_low_target): Install x86_emit_ops.
9422 * server.h (struct emit_ops): New.
9423 (get_raw_reg_func_addr): Declare.
9424 (current_insn_ptr, emit_error): Declare.
9425 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
9426 (set_trace_state_variable_value): New defines.
9427 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
9428 addr_get_trace_state_variable_value and
9429 addr_set_trace_state_variable_value.
9430 (symbol_list): New fields for get_raw_reg,
9431 get_trace_state_variable_value and set_trace_state_variable_value.
9432 (condfn): New typedef.
9433 (struct tracepoint): New field `compiled_cond'.
9434 (do_action_at_tracepoint): Clear compiled_cond.
9435 (get_trace_state_variable_value, set_trace_state_variable_value):
9436 Export in the IPA.
9437 (condition_true_at_tracepoint): If there's a compiled condition,
9438 run that.
9439 (current_insn_ptr, emit_error): New globals.
9440 (struct bytecode_address): New.
9441 (get_raw_reg_func_addr): New.
9442 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
9443 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
9444 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
9445 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
9446 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
9447 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
9448 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
9449 (compile_tracepoint_condition, compile_bytecodes): New.
9450 * target.h (emit_ops): Forward declare.
9451 (struct target_ops): New field emit_ops.
9452 (target_emit_ops): New.
9453 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
9454 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
9455 * linux-low.c (linux_emit_ops): New.
9456 (linux_target_ops): Install it.
9457 * linux-low.h (struct linux_target_ops): New field emit_ops.
9458
92b72907
UW
94592010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
9460
9461 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
9462 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
9463
fa593d66
PA
94642010-06-01 Pedro Alves <pedro@codesourcery.com>
9465 Stan Shebs <stan@codesourcery.com>
9466
9467 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
9468 (all): Depend on $(extra_libraries).
9469 (install-only): Install the IPA.
9470 (IPA_OBJS, IPA_LIB): New.
9471 (clean): Remove the IPA lib.
9472 (IPAGENT_CFLAGS): New.
9473 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
9474 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
9475 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
9476 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
9477 * configure.ac: Check for atomic builtins support in the compiler.
9478 (IPA_DEPFILES, extra_libraries): Define.
9479 * configure.srv (ipa_obj): Add description.
9480 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
9481 (i[34567]86-*-linux*): Set ipa_obj.
9482 (x86_64-*-linux*): Set ipa_obj.
9483 * linux-low.c (stabilizing_threads): New.
9484 (supports_fast_tracepoints): New.
9485 (linux_detach): Stabilize threads before detaching.
9486 (handle_tracepoints): Handle internal tracing breakpoints. Assert
9487 the lwp is either not stabilizing, or is moving out of a jump pad.
9488 (linux_fast_tracepoint_collecting): New.
9489 (maybe_move_out_of_jump_pad): New.
9490 (enqueue_one_deferred_signal): New.
9491 (dequeue_one_deferred_signal): New.
9492 (linux_wait_for_event_1): If moving out of a jump pad, defer
9493 pending signals to later.
9494 (linux_stabilize_threads): New.
9495 (linux_wait_1): Check if threads need moving out of jump pads, and
9496 do it if so.
9497 (stuck_in_jump_pad_callback): New.
9498 (move_out_of_jump_pad_callback): New.
9499 (lwp_running): New.
9500 (linux_resume_one_lwp): Handle moving out of jump pads.
9501 (linux_set_resume_request): Dequeue deferred signals.
9502 (need_step_over_p): Also step over fast tracepoint jumps.
9503 (start_step_over): Also uninsert fast tracepoint jumps.
9504 (finish_step_over): Also reinsert fast tracepoint jumps.
9505 (linux_install_fast_tracepoint_jump): New.
9506 (linux_target_ops): Install linux_stabilize_threads and
9507 linux_install_fast_tracepoint_jump_pad.
9508 * linux-low.h (linux_target_ops) <get_thread_area,
9509 install_fast_tracepoint_jump_pad>: New fields.
9510 (struct lwp_info) <collecting_fast_tracepoint,
9511 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
9512 (linux_get_thread_area): Declare.
9513 * linux-x86-low.c (jump_insn): New.
9514 (x86_get_thread_area): New.
9515 (append_insns): New.
9516 (push_opcode): New.
9517 (amd64_install_fast_tracepoint_jump_pad): New.
9518 (i386_install_fast_tracepoint_jump_pad): New.
9519 (x86_install_fast_tracepoint_jump_pad): New.
9520 (the_low_target): Install x86_get_thread_area and
9521 x86_install_fast_tracepoint_jump_pad.
9522 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
9523 (struct fast_tracepoint_jump): New.
9524 (fast_tracepoint_jump_insn): New.
9525 (fast_tracepoint_jump_shadow): New.
9526 (find_fast_tracepoint_jump_at): New.
9527 (fast_tracepoint_jump_here): New.
9528 (delete_fast_tracepoint_jump): New.
9529 (set_fast_tracepoint_jump): New.
9530 (uninsert_fast_tracepoint_jumps_at): New.
9531 (reinsert_fast_tracepoint_jumps_at): New.
9532 (set_breakpoint_at): Use write_inferior_memory.
9533 (uninsert_raw_breakpoint): Use write_inferior_memory.
9534 (check_mem_read): Mask out fast tracepoint jumps.
9535 (check_mem_write): Mask out fast tracepoint jumps.
9536 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
9537 (set_fast_tracepoint_jump): Declare.
9538 (delete_fast_tracepoint_jump)
9539 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
9540 (reinsert_fast_tracepoint_jumps_at): Declare.
9541 * regcache.c: Don't compile many functions when building the
9542 in-process agent library.
9543 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
9544 the register buffer in the heap.
9545 (free_register_cache): If the register buffer isn't owned by the
9546 regcache, don't free it.
9547 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
9548 pre-existing register caches.
9549 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
9550 type.
9551 (convert_ascii_to_int): : Constify `from' parameter type.
9552 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
9553 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
9554 the needed buffer in-place.
9555 (relocate_instruction): New.
9556 * server.c (handle_query) <qSymbols>: If the target supports
9557 tracepoints, give it a chance of looking up symbols. Report
9558 support for fast tracepoints.
9559 (handle_status): Stabilize threads.
9560 (process_serial_event): Adjust.
9561 * server.h (struct fast_tracepoint_jump): Forward declare.
9562 (struct process_info) <fast_tracepoint_jumps>: New field.
9563 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
9564 (decode_X_packet, decode_M_packet): Adjust.
9565 (relocate_instruction): Declare.
9566 (in_process_agent_loaded): Declare.
9567 (tracepoint_look_up_symbols): Declare.
9568 (struct fast_tpoint_collect_status): Declare.
9569 (fast_tracepoint_collecting): Declare.
9570 (force_unlock_trace_buffer): Declare.
9571 (handle_tracepoint_bkpts): Declare.
9572 (initialize_low_tracepoint)
9573 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
9574 * target.h (struct target_ops) <stabilize_threads,
9575 install_fast_tracepoint_jump_pad>: New fields.
9576 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
9577 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
9578 [HAVE_STDINT_H]: Include stdint.h.
9579 (trace_debug_1): Rename to ...
9580 (trace_vdebug): ... this.
9581 (trace_debug): Rename to ...
9582 (trace_debug_1): ... this. Add `level' parameter.
9583 (trace_debug): New.
9584 (ATTR_USED, ATTR_NOINLINE): New.
9585 (IP_AGENT_EXPORT): New.
9586 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
9587 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
9588 (about_to_request_buffer_space, trace_buffer_is_full)
9589 (stopping_tracepoint, expr_eval_result, error_tracepoint)
9590 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
9591 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
9592 (traceframe_write_count, traceframes_created)
9593 (trace_state_variables)
9594 New renaming defines.
9595 (struct ipa_sym_addresses): New.
9596 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
9597 (symbol_list): New.
9598 (ipa_sym_addrs): New.
9599 (all_tracepoint_symbols_looked_up): New.
9600 (in_process_agent_loaded): New.
9601 (write_e_ipa_not_loaded): New.
9602 (maybe_write_ipa_not_loaded): New.
9603 (tracepoint_look_up_symbols): New.
9604 (debug_threads) [IN_PROCESS_AGENT]: New.
9605 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
9606 (UNKNOWN_SIDE_EFFECTS): New.
9607 (stop_tracing): New.
9608 (flush_trace_buffer): New.
9609 (stop_tracing_bkpt): New.
9610 (flush_trace_buffer_bkpt): New.
9611 (read_inferior_integer): New.
9612 (read_inferior_uinteger): New.
9613 (read_inferior_data_pointer): New.
9614 (write_inferior_data_pointer): New.
9615 (write_inferior_integer): New.
9616 (write_inferior_uinteger): New.
9617 (struct collect_static_trace_data_action): Delete.
9618 (enum tracepoint_type): New.
9619 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
9620 <actions_str, step_actions, step_actions_str>: Only include in
9621 GDBserver.
fa593d66
PA
9622 <orig_size, obj_addr_on_target, adjusted_insn_addr>
9623 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
9624 (tracepoints): Use IP_AGENT_EXPORT.
9625 (last_tracepoint): Don't include in the IPA.
9626 (stopping_tracepoint): Use IP_AGENT_EXPORT.
9627 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
9628 (alloced_trace_state_variables): New.
9629 (trace_state_variables): Use IP_AGENT_EXPORT.
9630 (traceframe_t): Delete unused variable.
9631 (circular_trace_buffer): Don't include in the IPA.
9632 (trace_buffer_start): Delete.
9633 (struct trace_buffer_control): New.
9634 (trace_buffer_free): Delete.
9635 (struct ipa_trace_buffer_control): New.
9636 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
9637 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
9638 New.
9639 (trace_buffer_ctrl): New.
9640 (TRACE_BUFFER_CTRL_CURR): New.
9641 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
9642 Reimplement as macros.
9643 (trace_buffer_wrap): Delete.
9644 (traceframe_write_count, traceframe_read_count)
9645 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
9646 (struct tracepoint_hit_ctx) <type>: New field.
9647 (struct fast_tracepoint_ctx): New.
9648 (memory_barrier): New.
9649 (cmpxchg): New.
9650 (record_tracepoint_error): Update atomically in the IPA.
9651 (clear_inferior_trace_buffer): New.
9652 (about_to_request_buffer_space): New.
9653 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
9654 updating the same buffer.
9655 (add_tracepoint): Default the tracepoint's type to trap
9656 tracepoint, and orig_size to -1.
9657 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
9658 internal variables.
9659 (create_trace_state_variable): New parameter `gdb'. Handle it.
9660 (clear_installed_tracepoints): Clear fast tracepoint jumps.
9661 (cmd_qtdp): Handle fast tracepoints.
9662 (cmd_qtdv): Adjust.
9663 (max_jump_pad_size): New.
9664 (gdb_jump_pad_head): New.
9665 (get_jump_space_head): New.
9666 (claim_jump_space): New.
9667 (sort_tracepoints): New.
9668 (MAX_JUMP_SIZE): New.
9669 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
9670 IPA.
9671 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
9672 support. Upload fast traceframes, and delete internal IPA
9673 breakpoints.
9674 (stop_tracing_handler): New.
9675 (flush_trace_buffer_handler): New.
9676 (cmd_qtstop): Upload fast tracepoints.
9677 (response_tracepoint): Handle fast tracepoints.
9678 (tracepoint_finished_step): Upload fast traceframes. Set the
9679 tracepoint hit context's tracepoint type.
9680 (handle_tracepoint_bkpts): New.
9681 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
9682 type. Add comment about fast tracepoints.
9683 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
9684 non-existing action_str field.
9685 (get_context_regcache): Handle fast tracepoints.
9686 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
9687 to the regcache.
9688 (fast_tracepoint_from_jump_pad_address): New.
9689 (fast_tracepoint_from_ipa_tpoint_address): New.
9690 (collecting_t): New.
9691 (force_unlock_trace_buffer): New.
9692 (fast_tracepoint_collecting): New.
9693 (collecting): New.
9694 (gdb_collect): New.
9695 (write_inferior_data_ptr): New.
9696 (target_tp_heap): New.
9697 (target_malloc): New.
9698 (download_agent_expr): New.
9699 (UALIGN): New.
9700 (download_tracepoints): New.
9701 (download_trace_state_variables): New.
9702 (upload_fast_traceframes): New.
9703 (IPA_FIRST_TRACEFRAME): New.
9704 (IPA_NEXT_TRACEFRAME_1): New.
9705 (IPA_NEXT_TRACEFRAME): New.
9706 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
9707 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
9708 (gdb_jump_pad_buffer_end): New.
9709 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
9710 (initialize_tracepoint): Adjust.
9711 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
9712 buffer. Initialize the low module.
9713 * utils.c (PREFIX, TOOLNAME): New.
9714 (malloc_failure): Use PREFIX.
9715 (error): In the IPA, an error causes an exit.
9716 (fatal, warning): Use PREFIX.
9717 (internal_error): Use TOOLNAME.
9718 (NUMCELLS): Increase to 10.
9719 * configure, config.in: Regenerate.
9720
d149dd1d
PA
97212010-06-01 Pedro Alves <pedro@codesourcery.com>
9722
9723 * server.c (handle_query) <qSupported>: Do two passes over the
9724 qSupported string to avoid nesting strtok.
9725
f6528abd
JK
97262010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9727
9728 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
9729 (CDEPS): New.
9730 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
9731 -Wl,--dynamic-list.
9732 * configure: Regenerate.
9733 * proc-service.list: New.
9734
ca2a87a0
JK
97352010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9736
9737 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
9738 New comment.
9739
363a6e9f
OS
97402010-05-26 Ozkan Sezer <sezeroz@gmail.com>
9741
9742 * gdbreplay.c (remote_open): Check error return from socket() call by
9743 its equality to -1 not by it being negative.
9744 * remote-utils.c (remote_open): Likewise.
9745
d23b6cb1
PA
97462010-05-23 Pedro Alves <pedro@codesourcery.com>
9747
9748 * config.h: Regenerate.
9749
28d3cf85
MK
97502010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9751
9752 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
9753 doesn't provide PTRACE_GET_THREAD_AREA.
9754
fea36a59
MK
97552010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9756
9757 * linux-m68k-low.c: Include <asm/ptrace.h>
9758 (ps_get_thread_area): Implement.
9759
24b066ba
DE
97602010-05-03 Doug Evans <dje@google.com>
9761
9762 * event-loop.c (struct callback_event): New struct.
9763 (callback_list): New global.
9764 (append_callback_event, delete_callback_event): New functions.
9765 (process_callback): New function.
9766 (start_event_loop): Call it.
9767 * remote-utils.c (NOT_SCHEDULED): Define.
9768 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
9769 moved out of readchar.
9770 (readchar): Rewrite. Call reschedule before returning.
9771 (reset_readchar): New function.
9772 (remote_close): Call it.
9773 (process_remaining, reschedule): New functions.
9774 * server.h (callback_handler_func): New typedef.
9775 (append_callback_event, delete_callback_event): Declare.
9776
9836d6ea
PA
97772010-05-03 Pedro Alves <pedro@codesourcery.com>
9778
9779 * proc-service.c (ps_pglobal_lookup): Use
9780 thread_db_look_up_one_symbol.
9781 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
9782 parameter. Use it instead of all_symbols_looked_up.
9783 * server.h (struct process_info) <all_symbols_looked_up>: Delete
9784 field.
9785 (all_symbols_looked_up): Don't declare.
9786 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
9787 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
9788 field.
9789 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
9790 Set all_symbols_looked_up here.
9791 (thread_db_look_up_one_symbol): New.
9792 (thread_db_get_tls_address): Adjust.
9793 (thread_db_load_search, try_thread_db_load_1): Always allocate the
9794 thread_db object on the heap, and tentatively set it in the
9795 process structure.
9796 (thread_db_init): Don't set all_symbols_looked_up here.
9797 * linux-low.h (thread_db_look_up_one_symbol): Declare.
9798
7984d532
PA
97992010-05-03 Pedro Alves <pedro@codesourcery.com>
9800
9801 * linux-low.c (linux_kill, linux_detach): Adjust.
9802 (status_pending_p_callback): Remove redundant statement. Check
9803 for !TARGET_WAITIKIND_IGNORE, instead of
9804 TARGET_WAITKIND_STOPPED.
9805 (handle_tracepoints): Make sure LWP is locked. Adjust.
9806 (linux_wait_for_event_1): Adjust.
9807 (linux_cancel_breakpoints): New.
9808 (unsuspend_one_lwp): New.
9809 (unsuspend_all_lwps): New.
9810 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
9811 (send_sigstop_callback): Change return type to int, add new
9812 `except' parameter and handle it.
9813 (suspend_and_send_sigstop_callback): New.
9814 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
9815 pass them down. If SUSPEND, also increment the lwp's suspend
9816 count.
9817 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
9818 (need_step_over_p): Don't consider suspended LWPs.
9819 (start_step_over): Adjust.
9820 (proceed_one_lwp): Change return type to int, add new `except'
9821 parameter and handle it.
9822 (unsuspend_and_proceed_one_lwp): New.
9823 (proceed_all_lwps): Use find_inferior instead of
9824 for_each_inferior.
9825 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
9826 also decrement the suspend count of LWPs. Pass `except' down,
9827 instead of hacking its suspend count.
9828 (linux_pause_all): Add `freeze' parameter. Adjust.
9829 (linux_unpause_all): New.
9830 (linux_target_ops): Install linux_unpause_all.
9831 * server.c (handle_status): Adjust.
9832 * target.h (struct target_ops): New fields `unpause_all' and
9833 `cancel_breakpoints'. Add new parameter to `pause_all'.
9834 (pause_all): Add new `freeze' parameter.
9835 (unpause_all): New.
9836 (cancel_breakpoints): New.
9837 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
9838 cancel breakpoints.
9839 (cmd_qtstart): Pause threads.
9840 (stop_tracing): Pause threads, and cancel breakpoints.
9841 * win32-low.c (win32_target_ops): Adjust.
9842
e471f25b
PA
98432010-05-03 Pedro Alves <pedro@codesourcery.com>
9844
9845 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
9846 the inferior right away from here...
9847 (linux_wait_1): ... to here, and adjust to check the thread's
9848 last_resume_kind instead of the lwp's step or stop_expected flags.
9849
1915ef4f
PA
98502010-05-02 Pedro Alves <pedro@codesourcery.com>
9851
9852 * README: Use consistent `GDB' and `GDBserver' spellings.
9853
f9e39928
PA
98542010-05-02 Pedro Alves <pedro@codesourcery.com>
9855
9856 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
9857 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
9858 (linux_detach_one_lwp): Assume the lwp is stopped.
9859 (any_thread_of): Delete.
9860 (linux_detach): Stop all lwps here. Don't blindly delete all
9861 breakpoints.
9862 (delete_lwp_callback): New.
9863 (linux_mourn): Delete all lwps of the process that is gone.
9864 (linux_wait_1): Don't delete the last lwp of the process here.
9865 * mem-break.h (mark_breakpoints_out): Declare.
9866 * mem-break.c (mark_breakpoints_out): New.
9867 (free_all_breakpoints): Use it.
9868 * server.c (handle_target_event): If the process is gone, mark
9869 breakpoints out.
9870 * thread-db.c (struct thread_db) <create_bp>: New field.
9871 (thread_db_enable_reporting): Fix prototype. Store a thread event
9872 breakpoint reference in the thread_db struct.
9873 (thread_db_load_search): Clear the thread_db object.
9874 (try_thread_db_load_1): Ditto.
9875 (switch_to_process): New.
9876 (disable_thread_event_reporting): Use it.
9877 (remove_thread_event_breakpoints): New.
9878 (thread_db_detach, thread_db_mourn): Use it.
9879
1e7fc18c
PA
98802010-05-01 Pedro Alves <pedro@codesourcery.com>
9881
9882 * linux-low.c (linux_enable_event_reporting): New.
9883 (linux_wait_for_event_1, handle_extended_wait): Use it.
9884
02fc4de7
PA
98852010-04-30 Pedro Alves <pedro@codesourcery.com>
9886
9887 * linux-low.c (linux_kill_one_lwp, linux_kill)
9888 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
9889 (send_sigstop): Take an lwp_info as parameter instead. Queue a
9890 SIGSTOP even if the LWP is stopped.
9891 (send_sigstop_callback): New.
9892 (stop_all_lwps): Use send_sigstop_callback instead.
9893 (linux_resume_one_thread): Adjust.
9894 (proceed_one_lwp): Still proceed an LWP that the client has
9895 requested to stop, if we haven't reported it as stopped yet. Make
9896 sure that LWPs the client want stopped, have a pending SIGSTOP.
9897
bc3b5632
DE
98982010-04-26 Doug Evans <dje@google.com>
9899
ae1ada35
DE
9900 * server.c (handle_general_set): Make static.
9901
bc3b5632
DE
9902 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
9903 Print received char after testing for error/eof instead of before.
9904 (input_interrupt): Tweak comment.
9905
65730243
DE
99062010-04-23 Doug Evans <dje@google.com>
9907
9908 * server.c (start_inferior): Print inferior argv if --debug.
9909
a8ae7dc0
AR
99102010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
9911
9912 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
9913 * nto-x86-low.c: Include server.h
9914
1c07cc19
PM
99152010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
9916
9917 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
9918 be consistent with other sources of this directory.
9919 (init_registers_amd64): Correct name of source file of this function
9920 in the comment.
9921
e0a61e09
PM
99222010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9923
9924 * configure.srv (x86_64-*-mingw*): New configuration for Windows
9925 64-bit executables.
9926
54709339
PM
99272010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9928
9929 * win32-i386-low.c: Add 64-bit support.
9930 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
9931 (init_registers_amd64): Declare.
9932 (mappings): Add 64-bit version of array.
9933 (init_windows_x86): New function.
9934 (the_low_target): Change init_arch field to init_windows_x86.
9935
e8f0053d
PM
99362010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9937
9938 * win32-low.c: Adapt to support also 64-bit architecture.
9939 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
9940 (get_image_name): Use SIZE_T type for local variable `done'.
9941 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
9942 (toolhelp_get_dll_name): Idem.
9943 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
9944 Use uintptr_t typecast to avoid warning.
9945 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
9946 (handle_exception): Use phex_nz to avoid warning.
9947 (win32_wait): Remove unused local variable `process'.
9948
c481e77e
PM
99492010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9950
9951 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
9952 `amd64-avx.o'.
9953
12ea4b69
PM
99542010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
9955
9956 * configure.ac: Use `ws2_32' library for srv_mingw.
9957 * configure: Regenerate.
9958 * gdbreplay.c: Include winsock2.h instead of winsock.h.
9959 * remote-utils.c: Likewise.
9960
f6d1620c
L
99612010-04-17 H.J. Lu <hongjiu.lu@intel.com>
9962
9963 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
9964 if __x86_64__ is defined.
9965
8e642873
PM
99662010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
9967
9968 * configure: Regenerate.
9969
711e434b
PM
99702010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
9971
9972 * server.c (handle_query): Handle 'qGetTIBAddr' query.
9973 * target.h (target_ops): New get_tib_address field.
9974 * win32-low.h (win32_thread_info): Add thread_local_base field.
9975 * win32-low.c (child_add_thread): Add tlb argument.
9976 Set thread_local_base field to TLB.
9977 (get_child_debug_event): Adapt to child_add_thread change.
9978 (win32_get_tib_address): New function.
9979 (win32_target_ops): Set get_tib_address field to
9980 win32_get_tib_address.
9981 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
9982
505106cd
PA
99832010-04-12 Pedro Alves <pedro@codesourcery.com>
9984
505106cd
PA
9985 * linux-low.c (linux_mourn): Also remove the process.
9986 * server.c (handle_target_event): Don't remove the process here.
9987 * nto-low.c (nto_mourn): New.
9988 (nto_target_ops): Install it.
9989 * spu-low.c (spu_mourn): New.
9990 (spu_target_ops): Install it.
9991 * win32-low.c (win32_mourn): New.
9992 (win32_target_ops): Install it.
9993
e8470a06
PA
99942010-04-12 Pedro Alves <pedro@codesourcery.com>
9995
9996 * server.h (buffer_xml_printf): Remove redundant `;'.
9997
45ba0d02
PA
99982010-04-12 Pedro Alves <pedro@codesourcery.com>
9999
10000 * regcache.c (set_register_cache): Invalidate regcaches before
10001 changing the register cache layout.
10002 (regcache_invalidate_one): Allow a NULL regcache.
10003 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
10004 regcaches before changing the register cache layout or the target
10005 regsets.
10006
59e04013
L
100072010-04-12 H.J. Lu <hongjiu.lu@intel.com>
10008
10009 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
10010 variable warning on Linux/x86-64.
10011
8336d594
PA
100122010-04-11 Pedro Alves <pedro@codesourcery.com>
10013
10014 GDBserver disconnected tracing support.
10015
10016 * linux-low.c (linux_remove_process): Delete.
10017 (add_lwp): Don't set last_resume_kind here.
10018 (linux_kill): Use `mourn'.
10019 (linux_detach): Use `thread_db_detach', and `mourn'.
10020 (linux_mourn): New.
10021 (linux_attach_lwp_1): Adjust comment.
10022 (linux_attach): last_resume_kind moved the thread_info; adjust.
10023 (status_pending_p_callback): Adjust.
10024 (linux_wait_for_event_1): Adjust.
10025 (count_events_callback, select_singlestep_lwp_callback)
10026 (select_event_lwp_callback, cancel_breakpoints_callback)
10027 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
10028 (proceed_one_lwp): Adjust.
10029 (linux_async): Add debug output.
10030 (linux_thread_stopped): New.
10031 (linux_pause_all): New.
10032 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
10033 linux_pause_all.
10034 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
10035 (thread_db_free): Delete declaration.
10036 (thread_db_detach, thread_db_mourn): Declare.
10037 * thread-db.c (thread_db_init): Use thread_db_mourn.
10038 (thread_db_free): Delete, split in two.
10039 (disable_thread_event_reporting): New.
10040 (thread_db_detach): New.
10041 (thread_db_mourn): New.
10042
10043 * server.h (struct thread_info) <last_resume_kind>: New field.
10044 <attached>: Add comment.
10045 <gdb_detached>: New field.
10046 (handler_func): Change return type to int.
10047 (handle_serial_event, handle_target_event): Ditto.
10048 (gdb_connected): Declare.
10049 (tracing): Delete.
10050 (disconnected_tracing): Declare.
10051 (stop_tracing): Declare.
10052
10053 * server.c (handle_query) <qSupported>: Report support for
10054 disconnected tracing.
10055 (queue_stop_reply_callback): Account for running threads.
10056 (gdb_wants_thread_stopped): New.
10057 (gdb_wants_all_threads_stopped): New.
10058 (gdb_reattached_process): New.
10059 (handle_status): Clear the `gdb_detached' flag of all processes.
10060 In all-stop, stop all threads.
10061 (main): Be sure to leave tfind mode. Handle disconnected tracing.
10062 (process_serial_event): If the remote connection breaks, or if an
10063 exit was forced with "monitor exit", force an event loop exit.
10064 Handle disconnected tracing on detach.
10065 (handle_serial_event): Adjust.
10066 (handle_target_event): If GDB isn't connected, forward events back
10067 to the inferior, unless the last process exited, in which case,
10068 exit gdbserver. Adjust interface.
10069
10070 * remote-utils.c (remote_open): Don't block in accept. Instead
10071 register an event loop source on the listen socket file
10072 descriptor. Refactor bits into ...
10073 (listen_desc): ... this new global.
10074 (gdb_connected): ... this new function.
10075 (enable_async_notification): ... this new function.
10076 (handle_accept_event): ... this new function.
10077 (remote_close): Clear remote_desc.
10078
10079 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
10080
10081 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
10082 New fields.
10083 (mourn_inferior): Define.
10084 (target_process_qsupported): Avoid the dangling else problem.
10085 (thread_stopped): Define.
10086 (pause_all): Define.
10087 (target_waitstatus_to_string): Declare.
10088 * target.c (target_waitstatus_to_string): New.
10089
10090 * tracepoint.c (tracing): Make extern.
10091 (disconnected_tracing): New.
10092 (stop_tracing): Make extern. Handle tracing stops due to GDB
10093 disconnecting.
10094 (cmd_qtdisconnected): New.
10095 (cmd_qtstatus): Report disconnected tracing status in trace reply.
10096 (handle_tracepoint_general_set): Handle QTDisconnected.
10097
10098 * event-loop.c (event_handler_func): Change return type to int.
10099 (process_event): Bail out if the event handler wants the event
10100 loop to stop.
10101 (handle_file_event): Ditto.
10102 (start_event_loop): Bail out if the event handler wants the event
10103 loop to stop.
10104
10105 * nto-low.c (nto_target_ops): Adjust.
10106 * spu-low.c (spu_wait): Don't remove the process here.
10107 (spu_target_ops): Adjust.
10108 * win32-low.c (win32_wait): Don't remove the process here.
10109 (win32_target_ops): Adjust.
10110
5d267c4c
PA
101112010-04-11 Pedro Alves <pedro@codesourcery.com>
10112
10113 * regcache.c (realloc_register_cache): Invalidate inferior's
10114 regcache before recreating it.
10115
623ccd72
PA
101162010-04-09 Pedro Alves <pedro@codesourcery.com>
10117
10118 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
10119
219f2f23
PA
101202010-04-09 Stan Shebs <stan@codesourcery.com>
10121 Pedro Alves <pedro@codesourcery.com>
10122
10123 * server.h (LONGEST): New.
10124 (struct thread_info) <while_stepping>: New field.
10125 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
10126 Declare.
10127 (initialize_tracepoint, handle_tracepoint_general_set)
10128 (handle_tracepoint_query, tracepoint_finished_step)
10129 (tracepoint_was_hit, release_while_stepping_state_list):
10130 (current_traceframe): Declare.
10131 * server.c (handle_general_set): Handle tracepoint packets.
10132 (read_memory): New.
10133 (write_memory): New.
10134 (handle_search_memory_1): Use read_memory.
10135 (handle_query): Report support for conditional tracepoints, trace
10136 state variables, and tracepoint sources. Handle tracepoint
10137 queries.
10138 (main): Initialize the tracepoints module.
10139 (process_serial_event): Handle traceframe reads/writes.
10140
10141 * linux-low.c (handle_tracepoints): New.
10142 (linux_wait_1): Call it.
10143 (linux_resume_one_lwp): Handle while-stepping.
10144 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
10145 (linux_target_ops): Install them.
10146 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
10147 New field.
10148 * linux-x86-low.c (x86_supports_tracepoints): New.
10149 (the_low_target). Install it.
10150
10151 * mem-break.h (delete_breakpoint): Declare.
10152 * mem-break.c (delete_breakpoint): Make external.
10153
10154 * target.h (struct target_ops): Add `supports_tracepoints',
10155 `read_pc', and `write_pc' fields.
10156 (target_supports_tracepoints): Define.
10157 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
10158 (phex_nz): New.
10159
10160 * regcache.h (struct regcache) <registers_owned>: New field.
10161 (init_register_cache, regcache_cpy): Declare.
10162 (regcache_read_pc, regcache_write_pc): Declare.
10163 (register_cache_size): Declare.
10164 (supply_regblock): Declare.
10165 * regcache.c (init_register_cache): New.
10166 (new_register_cache): Use it.
10167 (regcache_cpy): New.
10168 (register_cache_size): New.
10169 (supply_regblock): New.
10170 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 10171
219f2f23
PA
10172 * tracepoint.c: New.
10173
10174 * Makefile.in (OBS): Add tracepoint.o.
10175 (tracepoint.o): New rule.
10176
3a13a53b
L
101772010-04-08 H.J. Lu <hongjiu.lu@intel.com>
10178
10179 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
10180 (i386-mmx.o): New.
10181 (i386-mmx.c): Likewise.
10182 (i386-mmx-linux.o): Likewise.
10183 (i386-mmx-linux.c): Likewise.
10184
10185 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
10186 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
10187 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
10188 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
10189
10190 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
10191 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
10192 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
10193
1570b33e
L
101942010-04-07 H.J. Lu <hongjiu.lu@intel.com>
10195
10196 * Makefile.in (clean): Updated.
10197 (i386-avx.o): New.
10198 (i386-avx.c): Likewise.
10199 (i386-avx-linux.o): Likewise.
10200 (i386-avx-linux.c): Likewise.
10201 (amd64-avx.o): Likewise.
10202 (amd64-avx.c): Likewise.
10203 (amd64-avx-linux.o): Likewise.
10204 (amd64-avx-linux.c): Likewise.
10205
10206 * configure.srv (srv_i386_regobj): Add i386-avx.o.
10207 (srv_i386_linux_regobj): Add i386-avx-linux.o.
10208 (srv_amd64_regobj): Add amd64-avx.o.
10209 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
10210 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
10211 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
10212 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
10213 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
10214 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
10215 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
10216
10217 * i387-fp.c: Include "i386-xstate.h".
10218 (i387_xsave): New.
10219 (i387_cache_to_xsave): Likewise.
10220 (i387_xsave_to_cache): Likewise.
10221 (x86_xcr0): Likewise.
10222
10223 * i387-fp.h (i387_cache_to_xsave): Likewise.
10224 (i387_xsave_to_cache): Likewise.
10225 (x86_xcr0): Likewise.
10226
10227 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
10228 * linux-crisv32-low.c (target_regsets): Likewise.
10229 * linux-m68k-low.c (target_regsets): Likewise.
10230 * linux-mips-low.c (target_regsets): Likewise.
10231 * linux-ppc-low.c (target_regsets): Likewise.
10232 * linux-s390-low.c (target_regsets): Likewise.
10233 * linux-sh-low.c (target_regsets): Likewise.
10234 * linux-sparc-low.c (target_regsets): Likewise.
10235 * linux-xtensa-low.c (target_regsets): Likewise.
10236
10237 * linux-low.c: Include <sys/uio.h>.
10238 (regsets_fetch_inferior_registers): Support nt_type.
10239 (regsets_store_inferior_registers): Likewise.
10240 (linux_process_qsupported): New.
10241 (linux_target_ops): Add linux_process_qsupported.
10242
10243 * linux-low.h (regset_info): Add nt_type.
10244 (linux_target_ops): Add process_qsupported.
10245
10246 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
10247 and <sys/uio.h>.
10248 (init_registers_i386_avx_linux): New.
10249 (init_registers_amd64_avx_linux): Likewise.
10250 (xmltarget_i386_linux_no_xml): Likewise.
10251 (xmltarget_amd64_linux_no_xml): Likewise.
10252 (PTRACE_GETREGSET): Likewise.
10253 (PTRACE_SETREGSET): Likewise.
10254 (x86_fill_xstateregset): Likewise.
10255 (x86_store_xstateregset): Likewise.
10256 (use_xml): Likewise.
10257 (x86_linux_update_xmltarget): Likewise.
10258 (x86_linux_process_qsupported): Likewise.
10259 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
10260 (x86_arch_setup): Don't call init_registers_amd64_linux nor
10261 init_registers_i386_linux here. Call
10262 x86_linux_update_xmltarget.
10263 (the_low_target): Add x86_linux_process_qsupported.
10264
10265 * server.c (handle_query): Call target_process_qsupported.
10266
10267 * target.h (target_ops): Add process_qsupported.
10268 (target_process_qsupported): New.
10269
fc7238bb
PA
102702010-04-03 Pedro Alves <pedro@codesourcery.com>
10271
10272 * inferiors.c (add_thread): Set last_status kind to
10273 TARGET_WAITKIND_IGNORE.
10274 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
10275 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
10276 (linux_wait_1): Move `thread' local definition to block that uses
10277 it. Don't NULL initialize `event_child'.
10278 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
10279 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
10280 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
10281
bdabb078
PA
102822010-04-01 Pedro Alves <pedro@codesourcery.com>
10283
10284 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
10285 an extended waitstatus, or by a watchpoint.
10286 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
10287 thread was stepping or has been stopped by a watchpoint.
10288
d3bbe7a0
PA
102892010-04-01 Pedro Alves <pedro@codesourcery.com>
10290
10291 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
10292 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
10293 of another, then delete the previous, and validate all
10294 breakpoints.
10295 (validate_inserted_breakpoint): New.
10296 (delete_disabled_breakpoints): New.
10297 (validate_breakpoints): New.
10298 (check_mem_read): Validate breakpoints before trusting their
10299 shadow. Delete disabled breakpoints.
10300 (check_mem_write): Validate breakpoints before trusting they
10301 should be inserted. Delete disabled breakpoints.
10302 * mem-break.h (validate_breakpoints):
10303 * server.c (handle_query): Validate breakpoints when we see a
10304 qSymbol query.
10305
8b07ae33
PA
103062010-04-01 Pedro Alves <pedro@codesourcery.com>
10307
10308 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
10309 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
10310 if we could tell there's a GDB breakpoint at stop_pc.
10311 (need_step_over_p): Don't do a step over if we find a GDB
10312 breakpoint at the resume PC.
10313
10314 * mem-break.c (struct raw_breakpoint): New.
10315 (enum bkpt_type): New type `gdb_breakpoint'.
10316 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
10317 fields. New field `raw'.
10318 (find_raw_breakpoint_at): New.
10319 (set_raw_breakpoint_at): Handle refcounting. Create a raw
10320 breakpoint instead.
10321 (set_breakpoint_at): Adjust.
10322 (delete_raw_breakpoint): New.
10323 (release_breakpoint): New.
10324 (delete_breakpoint): Rename to...
10325 (delete_breakpoint_1): ... this. Add proc parameter. Use
10326 release_breakpoint. Return ENOENT.
10327 (delete_breakpoint): Reimplement.
10328 (find_breakpoint_at): Delete.
10329 (find_gdb_breakpoint_at): New.
10330 (delete_breakpoint_at): Delete.
10331 (set_gdb_breakpoint_at): New.
10332 (delete_gdb_breakpoint_at): New.
10333 (gdb_breakpoint_here): New.
10334 (set_reinsert_breakpoint): Use release_breakpoint.
10335 (uninsert_breakpoint): Rename to ...
10336 (uninsert_raw_breakpoint): ... this.
10337 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
10338 (reinsert_raw_breakpoint): Change parameter type to
10339 raw_breakpoint.
10340 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
10341 instead.
10342 (check_breakpoints): Adjust. Use release_breakpoint.
10343 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
10344 (breakpoint_inserted_here): Ditto.
10345 (check_mem_read): Adjust to iterate over raw breakpoints instead.
10346 Don't trust the breakpoint's shadow if it is not inserted.
10347 (check_mem_write): Adjust to iterate over raw breakpoints instead.
10348 (delete_all_breakpoints): Adjust.
10349 (free_all_breakpoints): Mark all breakpoints as uninserted, and
10350 use delete_breakpoint_1.
10351
10352 * mem-break.h (breakpoints_supported): Delete declaration.
10353 (set_gdb_breakpoint_at): Declare.
10354 (gdb_breakpoint_here): Declare.
10355 (delete_breakpoint_at): Delete.
10356 (delete_gdb_breakpoint_at): Declare.
10357
10358 * server.h (struct raw_breakpoint): Forward declare.
10359 (struct process_info): New field `raw_breakpoints'.
10360
10361 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
10362 breakpoints.
10363
6bf5e0ba
PA
103642010-03-24 Pedro Alves <pedro@codesourcery.com>
10365
10366 * linux-low.c (status_pending_p_callback): Fix comment.
10367 (linux_wait_for_event_1): Move most of the internal breakpoint
10368 handling from here...
10369 (linux_wait_1): ... to here.
10370 (count_events_callback): New.
10371 (select_singlestep_lwp_callback): New.
10372 (select_event_lwp_callback): New.
10373 (cancel_breakpoints_callback): New.
10374 (select_event_lwp): New.
10375 (linux_wait_1): Simplify internal breakpoint handling. Give equal
10376 priority to all LWPs that have had events that should be reported
10377 to the client. Cancel breakpoints when about to reporting the
10378 event to the client, not while stopping lwps. No longer cancel
10379 finished single-steps here.
10380 (cancel_finished_single_step): Delete.
10381 (cancel_finished_single_steps): Delete.
10382
414a389f
PA
103832010-03-24 Pedro Alves <pedro@codesourcery.com>
10384
10385 * mem-break.c (enum bkpt_type): New.
10386 (struct breakpoint): New field `type'.
10387 (set_breakpoint_at): Change return type to struct breakpoint
10388 pointer. Set type to `other_breakpoint' by default.
10389 (delete_breakpoint): Rewrite, supporting more than one breakpoint
10390 in the breakpoint list.
10391 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
10392 (reinsert_breakpoint): Rename to ...
10393 (reinsert_raw_breakpoint): ... this.
10394 (reinsert_breakpoints_at): Adjust.
10395 * mem-break.h (struct breakpoint): Declare.
10396 (set_breakpoint_at): Change return type to struct breakpoint
10397 pointer.
10398
2280c721
PA
103992010-03-24 Pedro Alves <pedro@codesourcery.com>
10400
10401 * server.c (handle_query): Assign, not compare.
10402
d50171e4
PA
104032010-03-24 Pedro Alves <pedro@codesourcery.com>
10404
10405 Teach linux gdbserver to step-over-breakpoints.
10406
10407 * linux-low.c (can_hardware_single_step): New.
10408 (supports_breakpoints): New.
10409 (handle_extended_wait): If stopping threads, read the stop pc of
10410 the new cloned LWP.
10411 (get_pc): New.
10412 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
10413 low target doesn't support retrieving the PC.
10414 (add_lwp): Set last_resume_kind to resume_continue.
10415 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
10416 (linux_attach): Don't clear stop_expected. Set the lwp's
10417 last_resume_kind to resume_stop.
10418 (linux_detach_one_lwp): Don't check for removed breakpoints.
10419 (check_removed_breakpoint): Delete.
10420 (status_pending_p): Rename to ...
10421 (status_pending_p_callback): ... this. Don't check for removed
10422 breakpoints. Don't consider threads that are stopped from GDB's
10423 perspective.
10424 (linux_wait_for_lwp): Always read the stop_pc here.
10425 (cancel_breakpoint): New.
10426 (step_over_bkpt): New global.
10427 (linux_wait_for_event_1): Implement stepping over breakpoints.
10428 (gdb_wants_lwp_stopped): New.
10429 (gdb_wants_all_stopped): New.
10430 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
10431 single-step traps here. Store the thread's last reported target
10432 wait status.
10433 (send_sigstop): Don't clear stop_expected. Always set it,
10434 instead.
10435 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
10436 (cancel_finished_single_step): New.
10437 (cancel_finished_single_steps): New.
10438 (wait_for_sigstop): Don't cancel finished single-step traps here.
10439 (linux_resume_one_lwp): Don't check for removed breakpoints.
10440 Don't set `step' on non-hardware step archs.
10441 (linux_set_resume_request): Ignore resume_stop requests if already
10442 stopping or stopped. Set the lwp's last_resume_kind.
10443 (resume_status_pending_p): Don't check for removed breakpoints.
10444 (need_step_over_p): New.
10445 (start_step_over): New.
10446 (finish_step_over): New.
10447 (linux_resume_one_thread): Always queue a sigstop for resume_stop
10448 requests. Clear the thread's last reported target waitstatus.
10449 Don't use the `suspended' flag. Don't consider pending breakpoints.
10450 (linux_resume): Start a step-over if necessary.
10451 (proceed_one_lwp): New.
10452 (proceed_all_lwps): New.
10453 (unstop_all_lwps): New.
10454 * linux-low.h (struct lwp_info): Rewrite comment for the
10455 `suspended' flag. Add the `stop_pc' field. Delete the
10456 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
10457 Add `'last_resume_kind' and `need_step_over' fields.
10458 * inferiors.c (struct thread_info): Delete, moved elsewhere.
10459 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
10460 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
10461 (set_raw_breakpoint_at): New.
10462 (set_breakpoint_at): Rewrite to use it.
10463 (reinsert_breakpoint_handler): Delete.
10464 (set_reinsert_breakpoint): New.
10465 (reinsert_breakpoint_by_bp): Delete.
10466 (delete_reinsert_breakpoints): New.
10467 (uninsert_breakpoint): Rewrite.
10468 (uninsert_breakpoints_at): New.
10469 (reinsert_breakpoint): Rewrite.
10470 (reinsert_breakpoints_at): New.
10471 (check_breakpoints): Rewrite.
10472 (breakpoint_here): New.
10473 (breakpoint_inserted_here): New.
10474 (check_mem_read): Adjust.
10475 * mem-break.h (breakpoints_supported, breakpoint_here)
10476 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
10477 (reinsert_breakpoint_by_bp): Delete declaration.
10478 (delete_reinsert_breakpoints): Declare.
10479 (reinsert_breakpoint): Delete declaration.
10480 (reinsert_breakpoints_at): Declare.
10481 (uninsert_breakpoint): Delete declaration.
10482 (uninsert_breakpoints_at): Declare.
10483 (check_breakpoints): Adjust prototype.
10484 * server.h: Adjust include order.
10485 (struct thread_info): Declare here. Add a `last_status' field.
10486
30ba68cb
MS
104872010-03-23 Michael Snyder <msnyder@vmware.com>
10488
10489 * server.c (crc32): New function.
10490 (handle_query): Add handling for 'qCRC:' request.
10491
b9a881c2
PA
104922010-03-23 Pedro Alves <pedro@codesourcery.com>
10493
10494 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
10495 lwp had been stopped by a watchpoint.
10496
e92d13d5
PA
104972010-03-16 Pedro Alves <pedro@codesourcery.com>
10498
10499 * server.h (internal_error): Declare.
10500 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
10501 * utils.c (internal_error): New function.
10502
64daa791
AS
105032010-03-15 Andreas Schwab <schwab@redhat.com>
10504
10505 * configure.srv: Fix typo setting srv_regobj.
10506
f52cd8cd
PA
105072010-03-15 Pedro Alves <pedro@codesourcery.com>
10508
10509 * linux-low.c (fetch_register): Avoid passing a non string literal
10510 format to `error'.
10511 (usr_store_inferior_registers): Ditto.
10512
93ae6fdc
PA
105132010-03-14 Pedro Alves <pedro@codesourcery.com>
10514
10515 * linux-low.c (linux_write_memory): Bail out early if peeking
10516 memory failed.
10517
c3adc08c
PA
105182010-03-14 Pedro Alves <pedro@codesourcery.com>
10519
10520 * linux-low.h (struct lwp_info): New fields
10521 `stopped_by_watchpoint' and `stopped_data_address'.
10522 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
10523 here, and cache them in the lwp object.
10524 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
10525 directly.
10526 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
10527 field.
10528 (linux_stopped_by_watchpoint): Rewrite.
10529 (linux_stopped_data_address): Rewrite.
10530
bce522a2
PA
105312010-03-06 Simo Melenius <simo.melenius@iki.fi>
10532
10533 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
10534 switching the current inferior, not before.
10535
90884b2b
L
105362010-03-01 H.J. Lu <hongjiu.lu@intel.com>
10537
10538 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
10539 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
10540 i386-linux.c and amd64-linux.c.
10541 (reg-i386.o): Removed.
10542 (reg-i386.c): Likewise.
10543 (reg-i386-linux.o): Likewise.
10544 (reg-i386-linux.c): Likewise.
10545 (reg-x86-64.o): Likewise.
10546 (reg-x86-64.c): Likewise.
10547 (reg-x86-64-linux.o): Likewise.
10548 (reg-x86-64-linux.c): Likewise.
10549 (i386.o): New.
10550 (i386.c): Likewise.
10551 (i386-linux.o): Likewise.
10552 (i386-linux.c): Likewise.
10553 (amd64.o): Likewise.
10554 (amd64.c): Likewise.
10555 (amd64-linux.o): Likewise.
10556 (amd64-linux.c): Likewise.
10557
10558 * configure.srv (srv_i386_regobj): New.
10559 (srv_i386_linux_regobj): Likewise.
10560 (srv_amd64_regobj): Likewise.
10561 (srv_amd64_linux_regobj): Likewise.
10562 (srv_i386_32bit_xmlfiles): Likewise.
10563 (srv_i386_64bit_xmlfiles): Likewise.
10564 (srv_i386_xmlfiles): Likewise.
10565 (srv_amd64_xmlfiles): Likewise.
10566 (srv_i386_linux_xmlfiles): Likewise.
10567 (srv_amd64_linux_xmlfiles): Likewise.
10568 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
10569 srv_xmlfiles to $srv_i386_xmlfiles.
10570 (i[34567]86-*-mingw32ce*): Likewise.
10571 (i[34567]86-*-mingw*): Likewise.
10572 (i[34567]86-*-nto*): Likewise.
10573 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
10574 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
10575 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
10576 (x86_64-*-linux*): Likewise.
10577
10578 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
10579 (init_registers_amd64_linux): New.
10580 (x86_arch_setup): Replace init_registers_x86_64_linux with
10581 init_registers_amd64_linux.
10582
193f13e6
MK
105832010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
10584
10585 * configure.ac: Check for libdl. If it is not available link against
10586 static libthread_db.
10587 * configure: Regenerate.
10588
85d721b8
PA
105892010-02-22 Pedro Alves <pedro@codesourcery.com>
10590
10591 PR9605
10592
10593 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
10594 handing a read watchpoint.
10595 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
10596
6076632b
DE
105972010-02-12 Doug Evans <dje@google.com>
10598
10599 * linux-low.c (linux_supports_tracefork_flag): Document.
10600 (linux_look_up_symbols): Add comment.
10601
3327ccf7
L
106022010-02-03 H.J. Lu <hongjiu.lu@intel.com>
10603
10604 * regcache.c (supply_register): Clear regcache if buf is NULL.
10605
0718675c 106062010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 10607 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
10608
10609 * inferiors.c (find_inferior): Add function documentation.
10610 (unloaded_dll): Handle the case where the unloaded dll has not
10611 been previously registered in the dll list.
10612
177321bd
DJ
106132010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10614
10615 * linux-arm-low.c (thumb_breakpoint_len): Delete.
10616 (thumb2_breakpoint): New.
10617 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
10618
2b009048
DJ
106192010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10620
10621 * linux-low.c (get_stop_pc): Check for SIGTRAP.
10622 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
10623 breakpoints.
10624
3be029c7
PA
106252010-01-21 Pedro Alves <pedro@codesourcery.com>
10626
10627 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
10628
18f5de3b
JK
106292010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10630
10631 * linux-s390-low.c (s390_collect_ptrace_register)
10632 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
10633
3743bb4f
DE
106342010-01-21 Doug Evans <dje@google.com>
10635
14ce3065
DE
10636 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
10637 (PTRACE_ARG4_TYPE): New macro.
10638 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
10639 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
10640 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
10641 (usr_store_inferior_registers): Ditto.
10642 (linux_read_memory, linux_write_memory): Ditto.
10643 (linux_test_for_tracefork): Ditto.
10644
3743bb4f
DE
10645 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
10646 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
10647
8b315be5
PA
106482010-01-21 Pedro Alves <pedro@codesourcery.com>
10649
10650 * proc-service.c (ps_lgetregs): Don't refetch registers from the
10651 target.
10652
85492558
PA
106532010-01-21 Pedro Alves <pedro@codesourcery.com>
10654
10655 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
10656 prototype to take a regcache. Adjust.
10657
442ea881
PA
106582010-01-20 Pedro Alves <pedro@codesourcery.com>
10659
10660 * regcache.h (struct thread_info): Forward declare.
10661 (struct regcache): New.
10662 (new_register_cache): Adjust prototype.
10663 (get_thread_regcache): Declare.
10664 (free_register_cache): Adjust prototype.
10665 (registers_to_string, registers_from_string): Ditto.
10666 (supply_register, supply_register_by_name, collect_register)
10667 (collect_register_as_string, collect_register_by_name): Ditto.
10668 * regcache.c (struct inferior_regcache_data): Delete.
10669 (get_regcache): Rename to ...
10670 (get_thread_regcache): ... this. Adjust. Switch inferior before
10671 fetching registers.
10672 (regcache_invalidate_one): Adjust.
10673 (regcache_invalidate): Fix prototype.
10674 (new_register_cache): Return the new register cache.
10675 (free_register_cache): Change prototype.
10676 (realloc_register_cache): Adjust.
10677 (registers_to_string): Change prototype to take a regcache. Adjust.
10678 (registers_from_string): Ditto.
10679 (register_data): Ditto.
10680 (supply_register): Ditto.
10681 (supply_register_by_name): Ditto.
10682 (collect_register): Ditto.
10683 (collect_register_as_string): Ditto.
10684 (collect_register_by_name): Ditto.
10685 * server.c (process_serial_event): Adjust.
10686 * linux-low.h (regset_fill_func, regset_store_func): Change
10687 prototype.
10688 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
10689 Change prototype.
10690 * linux-low.c (get_stop_pc): Adjust.
10691 (check_removed_breakpoint): Adjust.
10692 (linux_wait_for_event): Adjust.
10693 (linux_resume_one_lwp): Adjust.
10694 (fetch_register): Add regcache parameter. Adjust.
10695 (usr_store_inferior_registers): Ditto.
10696 (regsets_fetch_inferior_registers): Ditto.
10697 (regsets_store_inferior_registers): Ditto.
10698 (linux_fetch_registers, linux_store_registers): Ditto.
10699 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
10700 regcache. Adjust.
43aaf8b6
PA
10701 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
10702 Ditto.
442ea881
PA
10703 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
10704 prototype to take a regcache.
10705 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
10706 * remote-utils.c (convert_ascii_to_int, outreg)
10707 (prepare_resume_reply): Change prototype to take a regcache.
10708 Adjust.
10709 * target.h (struct target_ops) <fetch_registers, store_registers>:
10710 Change prototype to take a regcache.
10711 (fetch_inferior_registers, store_inferior_registers): Change
10712 prototype to take a regcache. Adjust.
10713 * proc-service.c (ps_lgetregs): Adjust.
10714 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
10715 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
10716 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
10717 take a regcache. Adjust.
10718 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
10719 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
10720 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
10721 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
10722 * linux-cris-low.c (cris_get_pc, cris_set_pc)
10723 (cris_cannot_fetch_register):
10724 (cris_breakpoint_at): Change prototype to take a regcache.
10725 Adjust.
10726 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
10727 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
10728 to take a regcache. Adjust.
10729 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
10730 Adjust.
10731 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
10732 take a regcache. Adjust.
10733 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
10734 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
10735 (m68k_set_pc): Change prototype to take a regcache. Adjust.
10736 * linux-mips-low.c (mips_get_pc):
10737 (mips_set_pc): Change prototype to take a regcache. Adjust.
10738 (mips_reinsert_addr): Adjust.
10739 (mips_collect_register): Change prototype to take a regcache.
10740 Adjust.
10741 (mips_supply_register):
10742 (mips_collect_register_32bit, mips_supply_register_32bit)
10743 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10744 (mips_store_fpregset): Ditto.
43aaf8b6
PA
10745 * linux-ppc-low.c (ppc_supply_ptrace_register)
10746 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
10747 (parse_spufs_run): Adjust.
10748 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
10749 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
10750 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
10751 take a regcache. Adjust.
10752 * linux-s390-low.c (s390_collect_ptrace_register)
10753 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
10754 (s390_set_pc): Change prototype to take a regcache. Adjust.
10755 (s390_arch_setup): Adjust.
10756 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
10757 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
10758 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10759 (sparc_fill_gregset, sparc_store_gregset_from_stack)
10760 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
10761 regcache. Adjust.
10762 (sparc_breakpoint_at): Adjust.
10763 * linux-xtensa-low.c (xtensa_fill_gregset):
10764 (xtensa_store_gregset):
10765 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
10766 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
10767 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
10768 prototype to take a regcache. Adjust.
10769 * win32-arm-low.c (arm_fetch_inferior_register)
10770 (arm_store_inferior_register): Change prototype to take a
10771 regcache. Adjust.
10772 * win32-i386-low.c (i386_fetch_inferior_register)
10773 (i386_store_inferior_register): Change prototype to take a
10774 regcache. Adjust.
10775 * win32-low.c (child_fetch_inferior_registers)
10776 (child_store_inferior_registers): Change prototype to take a
10777 regcache. Adjust.
10778 (win32_wait): Adjust.
10779 (win32_fetch_inferior_registers): Change prototype to take a
10780 regcache. Adjust.
10781 (win32_store_inferior_registers): Adjust.
10782 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
10783 store_inferior_register>: Change prototype to take a regcache.
10784
60c3d7b0
DE
107852010-01-20 Doug Evans <dje@google.com>
10786
10787 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
10788 #ifdef.
10789 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 10790 (W_STOPCODE): Provide definition if missing.
60c3d7b0 10791
dc146f7c
VP
107922010-01-13 Vladimir Prus <vladimir@codesourcery.com>
10793
10794 * linux-low.c (linux_core_of_thread): New.
10795 (compare_ints, show_process, list_threads): New.
10796 (linux_qxfer_osdata): Report threads and cores.
10797 (linux_target_op): Register linux_core_of_thread.
10798 * remote-utils.c (prepare_resume_reply): Report the core.
10799 (buffer_xml_printf): Support %d specifier.
10800 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
10801 New.
10802 (handle_query): Handle qXfer:threads. Announce availability
10803 thereof.
10804 * target.h (struct target_ops): New field core_of_thread.
10805
7803799a
UW
108062010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
10807
10808 * Makefile.in (clean): Remove new generated files.
10809 (reg-s390.o, reg-s390.c): Remove rules.
10810 (reg-s390x.o, reg-s390x.c): Likewise.
10811 (s390-linux32.o, s390-linux32.c): Add rules.
10812 (s390-linux64.o, s390-linux64.c): Likewise.
10813 (s390x-linux64.o, s390x-linux64.c): Likewise.
10814 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
10815 * linux-s390-low.c: Include <elf.h>.
10816 (HWCAP_S390_HIGH_GPRS): Define if undefined.
10817 (init_registers_s390): Remove prototype.
10818 (init_registers_s390x): Likewise.
10819 (init_registers_s390_linux32): Add prototype.
10820 (init_registers_s390_linux64): Likewise.
10821 (init_registers_s390x_linux64): Likewise.
10822 (s390_num_regs_3264): New define.
10823 (s390_regmap_3264): New global variable.
10824 (s390_cannot_fetch_register): Remove obsolete check.
10825 (s390_cannot_store_register): Likewise.
10826 (s390_collect_ptrace_register): Handle upper/lower register halves.
10827 (s390_supply_ptrace_register): Likewise.
10828 (s390_fill_gregset): Update to register number changes.
10829 (s390_get_hwcap): New routine.
10830 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
10831 Install appropriate regmap and register set.
10832
6e7ffa39
JB
108332010-01-01 Joel Brobecker <brobecker@adacore.com>
10834
10835 * server.c (gdbserver_version): Update copyright year to 2010.
10836 * gdbreplay.c (gdbreplay_version): Likewise.
10837
957f3f49
DE
108382009-12-28 Doug Evans <dje@google.com>
10839
10840 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
10841 elf/external.h. Include <elf.h> instead but only if necessary.
10842
ca5c370d
PA
108432009-12-28 Pedro Alves <pedro@codesourcery.com>
10844
10845 * linux-low.c (linux_remove_process): Remove `detaching'
10846 parameter. Don't release/detach from thread_db here.
10847 (linux_kill): Release/detach from thread_db here, ...
10848 (linux_detach): ... and here, before actually detaching.
10849 (linux_wait_1): ... and here, when a process exits.
10850 * thread-db.c (any_thread_of): New.
10851 (thread_db_free): Switch the current inferior to a thread of the
10852 passed in process.
10853
4ee62156
DE
108542009-12-21 Doug Evans <dje@google.com>
10855
d90e6a88
DE
10856 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
10857
c5f62d5f
DE
10858 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
10859 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
10860 warning ifndef __NR_tkill. Move setting of errno there too.
10861 Delete unnecessary resetting of errno after syscall.
10862 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
10863
10e86dd7
DE
10864 * configure.ac: Check for dladdr.
10865 * config.in: Regenerate.
10866 * configure: Regenerate.
10867 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
10868 (try_thread_db_load): Update.
10869
4ee62156
DE
10870 * linux-low.c (my_waitpid): Delete unnecessary prototype.
10871
00f515da
DE
108722009-12-18 Doug Evans <dje@google.com>
10873
e9464885
DE
10874 * event-loop.c: Include unistd.h if it exists.
10875
07d4f67e
DE
10876 * linux-low.c (my_waitpid): Move definition away from being in
10877 between linux_tracefork_child/linux_test_for_tracefork.
10878
00f515da
DE
10879 * gdb_proc_service.h (psaddr_t): Fix type.
10880 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
10881 signature to match glibc.
10882
1de1badb
DE
108832009-12-16 Doug Evans <dje@google.com>
10884
10885 * linux-low.c (linux_read_memory): Fix argument to read.
10886
aeeb81d1
PA
108872009-11-26 Pedro Alves <pedro@codesourcery.com>
10888
10889 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
10890 events, don't leave current_inferior pointing at null.
10891
10357975
PA
108922009-11-26 Pedro Alves <pedro@codesourcery.com>
10893
10894 * win32-low.c (LOG): Delete.
10895 (OUTMSG): Output to stderr.
10896 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
10897 on compile time LOG macro.
10898 (win32_wait): Fix debug output.
10899
cf6e3471
PA
109002009-11-26 Pedro Alves <pedro@codesourcery.com>
10901
10902 * win32-low.c (win32_add_one_solib): If the dll name is
10903 "ntdll.dll", prepend the system directory to the dll path.
10904
0c85e18e
MK
109052009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
10906
10907 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
10908
9ac544ce 109092009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 10910 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
10911
10912 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
10913 * configure.ac: Check for __mcoldfire__ and set
10914 gdb_cv_m68k_is_coldfire.
10915 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
10916 reg-cf.o and reg-m68k.o.
10917 * configure: Regenerated.
10918
fd7dd3e6
PA
109192009-11-16 Pedro Alves <pedro@codesourcery.com>
10920
10921 * linux-low.c (linux_remove_process): Add `detaching' parameter.
10922 Pass it to thread_db_free.
10923 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
10924 proper `detaching' argument to linux_remove_process.
10925 * linux-low.h (thread_db_free): Add `detaching' parameter.
10926 * thread-db.c (thread_db_init): Pass false as `detaching' argument
10927 to thread_db_free.
10928 (thread_db_free): Add `detaching' parameter. Only
10929 call td_ta_clear_event if detaching from process.
10930
75aa492e
MK
109312009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
10932
10933 * thread-db.c (thread_db_free): Fix typo.
10934
21e1bee4
PP
109352009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
10936
10937 PR gdb/10838
10938 * thread-db.c (thread_db_free): Call td_ta_clear_event.
10939
8838b45e
NS
109402009-11-03 Nathan Sidwell <nathan@codesourcery.com>
10941
10942 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
10943 with an i686 compiler.
10944 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
10945 needed.
10946 * configure: Rebuilt.
10947
8a35fb51
SL
109482009-10-29 Sandra Loosemore <sandra@codesourcery.com>
10949
10950 PR gdb/10783
10951
10952 * server.c (handle_search_memory_1): Correct read_addr initialization
10953 in loop for searching subsequent chunks.
10954
96f15937
PP
109552009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
10956
10957 * configure.ac: New --with-libthread-db option.
10958 * thread-db.c: Allow direct dependence on libthread_db.
10959 (thread_db_free): Adjust.
10960 * config.in: Regenerate.
10961 * configure: Likewise.
889bf7c5 10962
5f7d1694
PP
109632009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
10964
10965 PR gdb/10757
10966 * thread-db.c (attach_thread): New function.
10967 (maybe_attach_thread): Return success/failure.
10968 (find_new_threads_callback): Adjust.
889bf7c5
PA
10969 (thread_db_find_new_threads): Loop until no new threads.
10970
88e3b899
PA
109712009-10-13 Pedro Alves <pedro@codesourcery.com>
10972
10973 * proc-service.c (ps_lgetregs): Formatting.
10974
cdbfd419
PP
109752009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
10976
10977 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
10978 * configure.ac: Adjust.
10979 * linux-low.h (struct process_info_private): Move members to struct
10980 thread_db.
10981 (thread_db_free, thread_db_handle_monitor_command): New prototype.
10982 * linux-low.c (linux_remove_process): Adjust.
10983 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
10984 * server.c (handle_query): Move code ...
10985 (handle_monitor_command): ... here. New function.
10986 * target.h (struct target_ops): New member.
10987 * thread-db.c (struct thread_db): New.
10988 (libthread_db_search_path): New variable.
10989 (thread_db_create_event, thread_db_enable_reporting)
10990 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
10991 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
10992 (try_thread_db_load_1, dladdr_to_soname): New functions.
10993 (try_thread_db_load, thread_db_load_search): New functions.
10994 (thread_db_init): Search for libthread_db.
10995 (thread_db_free): New function.
10996 (thread_db_handle_monitor_command): Likewise.
10997 * config.in: Regenerate.
10998 * configure: Regenerate.
889bf7c5 10999
4168d2d6
UW
110002009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
11001
11002 * spu-low.c (spu_kill): Wait for inferior to terminate.
11003 Call clear_inferiors.
11004 (spu_detach): Call clear_inferiors.
11005
81ecdfbb
RW
110062009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11007
11008 * aclocal.m4: Regenerate.
11009 * config.in: Likewise.
11010 * configure: Likewise.
11011
0b9ff2c0
UW
110122009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11013
11014 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
11015 (parse_spufs_run): New function.
11016 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
11017 (ppc_breakpoint_at): Handle SPU breakpoints.
11018
efcbbd14
UW
110192009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11020
11021 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
11022 (SPUFS_MAGIC): Define.
11023 (spu_enumerate_spu_ids): New function.
11024 (linux_qxfer_spu): New function.
11025 (linux_target_ops): Install linux_qxfer_spu.
11026
f4d9bade
UW
110272009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11028
11029 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
11030 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
11031 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
11032 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
11033 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
11034 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
11035 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
11036 (init_registers_powerpc_cell32l): Add prototype.
11037 (init_registers_powerpc_cell64l): Likewise.
11038 (ppc_arch_setup): Detect Cell/B.E. architecture.
11039
96e946ca
RW
110402009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11041
11042 * Makefile.in (datarootdir): New variable.
11043
58d6951d
DJ
110442009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11045
11046 * linux-low.c (linux_write_memory): Update debugging output.
11047 * Makefile.in (clean): Add new descriptions.
11048 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
11049 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
11050 * configure.srv: Add new files for arm*-*-linux*.
11051 * linux-arm-low.c: Add new declarations.
11052 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
11053 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
11054 (HWCAP_VFPv3D16): New.
11055 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
11056 instead of __IWMMXT__.
11057 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
11058 (arm_arch_setup): New.
11059 (target_regsets): Remove #ifdef. Add VFP regset.
11060 (the_low_target): Use arm_arch_setup.
11061
12b42a12
DJ
110622009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11063
11064 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
11065 the main thread again.
11066
ac8c974e
AR
110672009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
11068
11069 Adding Neutrino gdbserver.
11070 * configure: Regenerated.
11071 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
11072 * configure.srv (i[34567]86-*-nto*): New target.
11073 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
11074 * remote-utils.c [__QNX__]: Include sys/iomgr.h
11075 (nto_comctrl) [__QNX__]: New function.
11076 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
11077
4424e0c3 110782009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
11079
11080 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
11081 srv_tgtobj.
11082
912cf4ba
PA
110832009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
11084 Pedro Alves <pedro@codesourcery.com>
11085
11086 * win32-i386-low.c (i386_get_thread_context): Handle systems that
11087 don't support CONTEXT_EXTENDED_REGISTERS.
11088 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
11089 (the_low_target): Install them.
11090 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
11091 failing with ERROR_PIPE_NOT_CONNECTED.
11092
aa5ca48f
DE
110932009-06-30 Doug Evans <dje@google.com>
11094 Pierre Muller <muller@ics.u-strasbg.fr>
11095
11096 Add h/w watchpoint support to x86-linux, win32-i386.
11097 * Makefile.in (SFILES): Add i386-low.c
11098 (i386_low_h): Define.
11099 (i386-low.o): Add dependencies.
11100 (linux-x86-low.o): Add i386-low.h dependency.
11101 (win32-i386-low.o): Ditto.
11102 * i386-low.c: New file.
11103 * i386-low.h: New file.
11104 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
11105 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
11106 * linux-low.c (linux_add_process): Initialize arch_private.
11107 (linux_remove_process): Free arch_private.
11108 (add_lwp): Initialize arch_private.
11109 (delete_lwp): Free arch_private.
11110 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
11111 provided.
11112 * linux-low.h (process_info_private): New member arch_private.
11113 (lwp_info): New member arch_private.
11114 (linux_target_ops): New members new_process, new_thread,
11115 prepare_to_resume.
11116 (ptid_of): New macro.
11117 * linux-x86-low.c: Include stddef.h, i386-low.h.
11118 (arch_process_info): New struct.
11119 (arch_lwp_info): New struct.
11120 (x86_linux_dr_get, x86_linux_dr_set): New functions.
11121 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11122 (i386_dr_low_get_status): New function.
11123 (x86_insert_point, x86_remove_point): New functions.
11124 (x86_stopped_by_watchpoint): New function.
11125 (x86_stopped_data_address): New function.
11126 (x86_linux_new_process, x86_linux_new_thread): New functions.
11127 (x86_linux_prepare_to_resume): New function.
11128 (the_low_target): Add entries for insert_point, remove_point,
11129 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
11130 prepare_to_resume.
11131 * server.c (debug_hw_points): New global.
11132 (monitor_show_help): Document set debug-hw-points.
11133 (handle_query): Process "set debug-hw-points".
11134 * server.h (debug_hw_points): Declare.
11135 (paddress): Declare.
11136 * utils.c (NUMCELLS, CELLSIZE): New macros.
11137 (get_sell, xsnprintf, paddress): New functions.
11138 * win32-arm-low.c (the_low_target): Add entries for insert_point,
11139 remove_point, stopped_by_watchpoint, stopped_data_address.
11140 * win32-i386-low.c: Include i386-low.h.
11141 (debug_reg_state): Replaces dr.
11142 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11143 (i386_dr_low_get_status): New function.
11144 (i386_insert_point, i386_remove_point): New functions.
11145 (i386_stopped_by_watchpoint): New function.
11146 (i386_stopped_data_address): New function.
11147 (i386_initial_stuff): Update.
11148 (get_thread_context,set_thread_context,i386_thread_added): Update.
11149 (the_low_target): Add entries for insert_point,
11150 remove_point, stopped_by_watchpoint, stopped_data_address.
11151 * win32-low.c (win32_insert_watchpoint): New function.
11152 (win32_remove_watchpoint): New function.
11153 (win32_stopped_by_watchpoint): New function.
11154 (win32_stopped_data_address): New function.
11155 (win32_target_ops): Add entries for insert_watchpoint,
11156 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
11157 * win32-low.h (win32_target_ops): New members insert_point,
11158 remove_point, stopped_by_watchpoint, stopped_data_address.
11159
d993e290
PA
111602009-06-25 Pedro Alves <pedro@codesourcery.com>
11161
11162 * server.c (process_serial_event): Re-return unsupported, not
11163 error, if the type isn't recognized. Re-allow supporting only
11164 insert or remove packets. Also call require_running for
11165 breakpoints. Add missing break statement to default case. Tidy.
11166 * target.h (struct target_ops): Rename insert_watchpoint to
11167 insert_point, and remove_watchpoint to remove_point.
11168
11169 * linux-low.h (struct linux_target_ops): Likewise.
11170 * linux-low.c (linux_insert_watchpoint): Rename to ...
11171 (linux_insert_point): ... this. Adjust.
11172 (linux_remove_watchpoint): Rename to ...
11173 (linux_remove_point): ... this. Adjust.
11174 (linux_target_ops): Adjust.
11175 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
11176 (cris_insert_point): ... this.
11177 (cris_remove_watchpoint): Rename to ...
11178 (cris_remove_point): ... this.
11179 (the_low_target): Adjust.
11180
0f54c268
PM
111812009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
11182
11183 * server.c (handle_v_kill): Pass signal_pid to
11184 kill_inferior if multi_process is zero.
11185
c6314022
AR
111862009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
11187
11188 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
11189 * target.h (target_ops): Comment for *_watchpoint to make it clear
11190 the functions can get types '0' and '1'.
11191
4463ce24
AR
111922009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
11193
11194 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
11195 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
11196 * regcache.c (get_regcache): Likewise.
11197 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
11198 * win32-low.c (child_fetch_inferior_registers): Remove check for
11199 regno 0.
11200
cf8fd78b
PA
112012009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
11202 Pedro Alves <pedro@codesourcery.com>
11203
11204 * target.h (struct target_ops) <supports_multi_process>: New
11205 callback.
11206 (target_supports_multi_process): New.
11207 * server.c (handle_query): Even if GDB reports support, only
11208 enable multi-process if the target also supports it. Report
11209 multi-process support only if the target backend supports it.
11210 * linux-low.c (linux_supports_multi_process): New function.
11211 (linux_target_ops): Install it as target_supports_multi_process
11212 callback.
11213
47c0c975
DE
112142009-05-24 Doug Evans <dje@google.com>
11215
e09875d4
DE
11216 Global renaming of find_thread_pid to find_thread_ptid.
11217 * server.h (find_thread_ptid): Renamed from find_thread_pid.
11218 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
11219 All callers updated.
11220
e27d73f6
DE
11221 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
11222 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
11223 directly.
11224
47c0c975
DE
11225 * linux-low.c (get_stop_pc): Print pc if debug_threads.
11226 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
11227 (linux_resume_one_lwp): Ditto.
11228
2acc282a
DE
112292009-05-23 Doug Evans <dje@google.com>
11230
11231 * linux-low.c (linux_resume_one_lwp): Change type of first arg
11232 from struct inferior_list_entry * to struct lwp_info *.
11233 All callers updated.
11234
9f1036c1
DE
112352009-05-13 Doug Evans <dje@google.com>
11236
11237 * linux-x86-low.c: Don't include assert.h.
11238 (x86_siginfo_fixup): Use fatal, not assert.
11239 (x86_arch_setup): Fix comment.
11240
d0722149
DE
112412009-05-12 Doug Evans <dje@google.com>
11242
11243 Biarch support for i386/amd64 gdbserver.
11244 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
11245 Add linux-x86-low.c.
11246 (linux-i386-low.o, linux-x86-64-low.o): Delete.
11247 (linux-x86-low.o): Add.
11248 * linux-x86-64-low.c: Delete.
11249 * linux-i386-low.c: Delete.
11250 * linux-x86-low.c: New file.
11251 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
11252 linux-x86-low.o.
11253 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
11254 linux-x86-low.o.
11255 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
11256 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
11257 (linux_child_pid_to_exec_file): New function.
11258 (elf_64_header_p, elf_64_file_p): New functions.
11259 (siginfo_fixup): New function.
11260 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
11261 give target a chance to convert layout.
11262 * linux-low.h (linux_target_ops): New member siginfo_fixup.
11263 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
11264
fdeb2a12
DE
112652009-05-07 Doug Evans <dje@google.com>
11266
11267 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
11268 (regsets_store_inferior_registers): Ditto.
11269
a6dbe5df
PA
112702009-05-06 Pedro Alves <pedro@codesourcery.com>
11271
11272 PR server/10048
11273
11274 * linux-low.c (must_set_ptrace_flags): Delete.
11275 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
11276 of the global.
11277 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
11278 `lwp->must_set_ptrace_flags' instead.
ba42693b 11279 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
11280 (linux_wait_1): ... not here.
11281
5091eb23
DE
112822009-04-30 Doug Evans <dje@google.com>
11283
9f767825
DE
11284 * inferiors.c (started_inferior_callback): New function.
11285 (attached_inferior_callback): New function.
11286 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
11287 * server.c (print_started_pid, print_attached_pid): New functions.
11288 (detach_or_kill_for_exit): New function.
11289 (main): Call it instead of for_each_inferior (kill_inferior_callback).
11290 * server.h (have_started_inferiors_p): Declare.
11291 (have_attached_inferiors_p): Declare.
11292
5091eb23
DE
11293 * inferiors.c (remove_process): Fix memory leak, free process.
11294 * linux-low.c (linux_remove_process): New function.
11295 (linux_kill): Call it instead of remove_process.
11296 (linux_detach, linux_wait_1): Ditto.
11297
155c8968
PA
112982009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
11299
11300 * configure.srv: Add x86 Windows CE target.
11301
7fe519cb
UW
113022009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11303
11304 * inferiors.c (get_thread_process): Make global.
11305 * server.h (get_thread_process): Add prototype.
11306 * thread-db.c (find_one_thread): Use get_thread_process
11307 instead of current_process.
11308 (thread_db_get_tls_address): Do not crash if called when
11309 thread layer is not yet initialized.
11310
5472f405
UW
113112009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11312
11313 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
11314 * spu-low.c (current_tid): Rename to ...
11315 (current_ptid): ... this.
11316 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
11317 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
11318 ptid_get_lwp (current_ptid) instead of current_tid.
11319 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
11320 instead of current_tid. Use find_process_pid to verify pid
11321 argument is valid. Pass proper argument to remove_process.
11322 (spu_thread_alive): Compare current_ptid instead of current_tid.
11323 (spu_resume): Likewise.
11324
55ac2b99
PA
113252009-04-02 Pedro Alves <pedro@codesourcery.com>
11326
11327 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
11328 variable.
11329
95954743
PA
113302009-04-01 Pedro Alves <pedro@codesourcery.com>
11331
11332 Implement the multiprocess extensions, and add linux multiprocess
11333 support.
11334
11335 * server.h (ULONGEST): Declare.
11336 (struct ptid, ptid_t): New.
11337 (minus_one_ptid, null_ptid): Declare.
11338 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11339 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
11340 (struct inferior_list_entry): Change `id' type from unsigned from
11341 to ptid_t.
11342 (struct sym_cache, struct breakpoint, struct
11343 process_info_private): Forward declare.
11344 (struct process_info): Declare.
11345 (current_process): Declare.
11346 (all_processes): Declare.
11347 (initialize_inferiors): Declare.
11348 (add_thread): Adjust to use ptid_t.
11349 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
11350 (add_process, remove_process, find_thread_pid): Declare.
11351 (find_inferior_id): Adjust to use ptid_t.
11352 (cont_thread, general_thread, step_thread): Change type to ptid_t.
11353 (multi_process): Declare.
11354 (push_event): Adjust to use ptid_t.
11355 (read_ptid, write_ptid): Declare.
11356 (prepare_resume_reply): Adjust to use ptid_t.
11357 (clear_symbol_cache): Declare.
11358 * inferiors.c (all_processes): New.
11359 (null_ptid, minus_one_ptid): New.
11360 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11361 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
11362 (add_thread): Change unsigned long to ptid. Remove gdb_id
11363 parameter. Adjust.
11364 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
11365 (gdb_id_to_thread): Rename to ...
11366 (find_thread_pid): ... this. Change unsigned long to ptid.
11367 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
11368 (loaded_dll, pull_pid_from_list): Adjust.
11369 (add_process, remove_process, find_process_pid)
11370 (get_thread_process, current_process, initialize_inferiors): New.
11371 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
11372 (struct target_waitstatus) <related_pid>: Ditto.
11373 (struct target_ops) <kill, detach>: Add `pid' argument. Change
11374 return type to int.
11375 (struct target_ops) <join>: Add `pid' argument.
11376 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
11377 (struct target_ops) <wait>: Add `ptid' field. Change return type
11378 to ptid.
11379 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
11380 (mywait): Add `ptid' argument. Change return type to ptid_t.
11381 (target_pid_to_str): Declare.
11382 * target.c (set_desired_inferior): Adjust to use ptids.
11383 (mywait): Add new `ptid' argument. Adjust.
11384 (target_pid_to_str): New.
11385 * mem-break.h (free_all_breakpoints): Declare.
11386 * mem-break.c (breakpoints): Delelete.
11387 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
11388 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
11389 to use per-process breakpoint list.
11390 (free_all_breakpoints): New.
11391 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
11392 (symbol_cache, all_symbols_looked_up): Delete.
11393 (hexchars): New.
11394 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
11395 read_ptid): New.
11396 (prepare_resume_reply): Change ptid argument's type from unsigned
11397 long to ptid_t. Adjust. Implement W;process and X;process.
11398 (free_sym_cache, clear_symbol_cache): New.
11399 (look_up_one_symbol): Adjust to per-process symbol cache. *
11400 * server.c (cont_thread, general_thread, step_thread): Change type
11401 to ptid_t.
11402 (attached): Delete.
11403 (multi_process): New.
11404 (last_ptid): Change type to ptid_t.
11405 (struct vstop_notif) <ptid>: Change type to ptid_t.
11406 (queue_stop_reply, push_event): Change `ptid' argument's type to
11407 ptid_t.
11408 (discard_queued_stop_replies): Add `pid' argument.
11409 (start_inferior): Adjust to use ptids. Adjust to mywait interface
11410 changes. Don't reference the `attached' global.
11411 (attach_inferior): Adjust to mywait interface changes.
11412 (handle_query): Adjust to use ptids. Parse GDB's qSupported
11413 features. Handle and report "multiprocess+". Handle
11414 "qAttached:PID".
11415 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
11416 changes.
11417 (handle_v_kill): New.
11418 (handle_v_stopped): Adjust to use target_pid_to_str.
11419 (handle_v_requests): Allow multiple attaches and runs when
11420 multiprocess extensions are in effect. Handle "vKill".
11421 (myresume): Adjust to use ptids.
11422 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
11423 (handle_status): Adjust to discard_queued_stop_replies interface
11424 change.
11425 (first_thread_of, kill_inferior_callback)
11426 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
11427 (main): Call initialize_inferiors. Adjust to use ptids, killing
11428 and detaching from all inferiors. Handle multiprocess packet
11429 variants.
11430 * linux-low.h: Include gdb_proc_service.h.
11431 (struct process_info_private): New.
11432 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
11433 <lwpid_of>: Use ptid_get_lwp.
11434 (get_lwp_thread): Adjust.
11435 (struct lwp_info): Add `dead' member.
11436 (find_lwp_pid): Declare.
11437 * linux-low.c (thread_db_active): Delete.
11438 (new_inferior): Adjust comment.
11439 (inferior_pid): Delete.
11440 (linux_add_process): New.
11441 (handle_extended_wait): Adjust.
11442 (add_lwp): Change unsigned long to ptid.
11443 (linux_create_inferior): Add process to processes table. Adjust
11444 to use ptids. Don't set new_inferior here.
11445 (linux_attach_lwp): Rename to ...
11446 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
11447 it. Adjust to use ptids.
11448 (linux_attach_lwp): New.
11449 (linux_attach): Add process to processes table. Don't set
11450 new_inferior here.
11451 (struct counter): New.
11452 (second_thread_of_pid_p, last_thread_of_process_p): New.
11453 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
11454 multiple processes.
11455 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
11456 processes. Remove process from process table.
11457 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
11458 to multiple processes.
11459 (any_thread_of): New.
11460 (linux_detach): Add `pid' argument, and handle it. Remove process
11461 from processes table.
11462 (linux_join): Add `pid' argument. Handle it.
11463 (linux_thread_alive): Change unsighed long argument to ptid_t.
11464 Consider dead lwps as not being alive.
11465 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
11466 threads we're not interested in.
11467 (same_lwp, find_lwp_pid): New.
11468 (linux_wait_for_lwp): Change `pid' argument's type from int to
11469 ptid_t. Adjust.
11470 (linux_wait_for_event): Rename to ...
11471 (linux_wait_for_event_1): ... this. Change `pid' argument's type
11472 from int to ptid_t. Adjust.
11473 (linux_wait_for_event): New.
11474 (linux_wait_1): Add `ptid' argument. Change return type to
11475 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
11476 that exit from the process table.
11477 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
11478 Adjust.
11479 (mark_lwp_dead): New.
11480 (wait_for_sigstop): Adjust to use ptids. If a process exits while
11481 stopping all threads, mark its main lwp as dead.
11482 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
11483 ptids.
11484 (fetch_register, usr_store_inferior_registers)
11485 (regsets_fetch_inferior_registers)
11486 (regsets_store_inferior_registers, linux_read_memory)
11487 (linux_write_memory): Inline `inferior_pid'.
11488 (linux_look_up_symbols): Adjust to use per-process
11489 `thread_db_active'.
11490 (linux_request_interrupt): Adjust to use ptids.
11491 (linux_read_auxv): Inline `inferior_pid'.
11492 (initialize_low): Don't reference thread_db_active.
11493 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
11494 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
11495 (ps_getpid): Return the pid of the current inferior.
11496 * thread-db.c (proc_handle, thread_agent): Delete.
11497 (thread_db_create_event, thread_db_enable_reporting): Adjust to
11498 per-process data.
11499 (find_one_thread): Change argument type to ptid_t. Adjust to
11500 per-process data.
11501 (maybe_attach_thread): Adjust to per-process data and ptids.
11502 (thread_db_find_new_threads): Ditto.
11503 (thread_db_init): Ditto.
11504 * spu-low.c (spu_create_inferior, spu_attach): Add process to
11505 processes table. Adjust to use ptids.
11506 (spu_kill, spu_detach): Adjust interface. Remove process from
11507 processes table.
11508 (spu_join, spu_thread_alive): Adjust interface.
11509 (spu_wait): Adjust interface. Remove process from processes
11510 table. Adjust to use ptids.
11511 * win32-low.c (current_inferior_tid): Delete.
11512 (current_inferior_ptid): New.
11513 (debug_event_ptid): New.
11514 (thread_rec): Take a ptid. Adjust.
11515 (child_add_thread): Add `pid' argument. Adjust to use ptids.
11516 (child_delete_thread): Ditto.
11517 (do_initial_child_stuff): Add `attached' argument. Add process to
11518 processes table.
11519 (child_fetch_inferior_registers, child_store_inferior_registers):
11520 Adjust.
11521 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
11522 (win32_attach): Pass 1 to do_initial_child_stuff.
11523 (win32_kill): Adjust interface. Remove process from processes
11524 table.
11525 (win32_detach): Ditto.
11526 (win32_join): Adjust interface.
11527 (win32_thread_alive): Take a ptid.
11528 (win32_resume): Adjust to use ptids.
11529 (get_child_debug_event): Ditto.
11530 (win32_wait): Adjust interface. Remove exiting process from
11531 processes table.
11532
bd99dc85
PA
115332009-04-01 Pedro Alves <pedro@codesourcery.com>
11534
11535 Non-stop mode support.
11536
11537 * server.h (non_stop): Declare.
11538 (gdb_client_data, handler_func): Declare.
11539 (delete_file_handler, add_file_handler, start_event_loop):
11540 Declare.
11541 (handle_serial_event, handle_target_event, push_event)
11542 (putpkt_notif): Declare.
11543 * target.h (enum resume_kind): New.
11544 (struct thread_resume): Replace `step' field by `kind' field.
11545 (TARGET_WNOHANG): Define.
11546 (struct target_ops) <wait>: Add `options' argument.
11547 <supports_non_stop, async, start_non_stop>: New fields.
11548 (target_supports_non_stop, target_async): New.
11549 (start_non_stop): Declare.
11550 (mywait): Add `options' argument.
11551 * target.c (mywait): Add `options' argument. Print child exit
11552 notifications here.
11553 (start_non_stop): New.
11554 * server.c (non_stop, own_buf, mem_buf): New globals.
11555 (struct vstop_notif): New.
11556 (notif_queue): New global.
11557 (queue_stop_reply, push_event, discard_queued_stop_replies)
11558 (send_next_stop_reply): New.
11559 (start_inferior): Adjust to use resume_kind. Adjust to mywait
11560 interface changes.
11561 (attach_inferior): In non-stop mode, don't wait for the target
11562 here.
11563 (handle_general_set): Handle QNonStop.
11564 (handle_query): When handling qC, return the current general
11565 thread, instead of the first thread of the list.
11566 (handle_query): If the backend supports non-stop mode, include
11567 QNonStop+ in the qSupported query response.
11568 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
11569 and non-stop mode.
11570 (handle_v_attach, handle_v_run): Handle non-stop mode.
11571 (handle_v_stopped): New.
11572 (handle_v_requests): Report support for vCont;t. Handle vStopped.
11573 (myresume): Adjust to use resume_kind. Handle non-stop.
11574 (queue_stop_reply_callback): New.
11575 (handle_status): Handle non-stop mode.
11576 (main): Clear non_stop flag on reconnection. Use the event-loop.
11577 Refactor serial protocol handling from here ...
11578 (process_serial_event): ... to this new function. When GDB
11579 selects any thread, select one here. In non-stop mode, wait until
11580 GDB acks all pending events before exiting.
11581 (handle_serial_event, handle_target_event): New.
11582 * remote-utils.c (remote_open): Install remote_desc in the event
11583 loop.
11584 (remote_close): Remove remote_desc from the event loop.
11585 (putpkt_binary): Rename to...
11586 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
11587 (putpkt_binary): New as wrapper around putpkt_binary_1.
11588 (putpkt_notif): New.
11589 (prepare_resume_reply): In non-stop mode, don't change the
11590 general_thread.
11591 * event-loop.c: New.
11592 * Makefile.in (OBJ): Add event-loop.o.
11593 (event-loop.o): New rule.
11594
11595 * linux-low.h (pid_of): Moved here.
11596 (lwpid_of): New.
11597 (get_lwp_thread): Use lwpid_of.
11598 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
11599 * linux-low.c (pid_of): Delete.
11600 (inferior_pid): Use lwpid_of.
11601 (linux_event_pipe): New.
11602 (target_is_async_p): New.
11603 (delete_lwp): New.
11604 (handle_extended_wait): Use lwpid_of.
11605 (add_lwp): Don't set lwpid field.
11606 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
11607 (linux_kill_one_lwp): If killing a running lwp, stop it first.
11608 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
11609 (linux_detach_one_lwp): If detaching from a running lwp, stop it
11610 first. Adjust to linux_wait_for_event interface changes. Use
11611 lwpid_of.
11612 (linux_detach): Don't delete the main lwp here.
11613 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
11614 (status_pending_p): Don't consider explicitly suspended lwps.
11615 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
11616 pointer. Add OPTIONS argument. Change return type to int. Use
11617 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
11618 (linux_wait_for_event): Take an integer pid instead of a lwp_info
11619 pointer. Add status pointer argument. Return a pid instead of a
11620 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
11621 changes. In non-stop mode, don't switch to a random thread.
11622 (linux_wait): Rename to...
11623 (linux_wait_1): ... this. Add target_options argument, and handle
11624 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
11625 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
11626 clean exit and signal exit code. Don't stop all threads in
11627 non-stop mode. In all-stop mode, only stop all threads when
11628 reporting a stop to GDB. Handle explicit thread stop requests.
11629 (async_file_flush, async_file_mark): New.
11630 (linux_wait): New.
11631 (send_sigstop): Use lwpid_of.
11632 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
11633 interface changes. In non-stop mode, don't switch to a random
11634 thread.
11635 (linux_resume_one_lwp): Use lwpid_of.
11636 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
11637 (linux_resume_one_thread): ... this. Handle resume_stop. In
11638 non-stop mode, don't look for pending flag in all threads.
11639 (resume_status_pending_p): Don't consider explicitly suspended
11640 threads.
11641 (my_waitpid): Reimplement. Emulate __WALL.
11642 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11643 Use lwpid_of.
11644 (sigchld_handler, linux_supports_non_stop, linux_async)
11645 (linux_start_non_stop): New.
11646 (linux_target_ops): Register linux_supports_non_stop, linux_async
11647 and linux_start_non_stop.
11648 (initialize_low): Install SIGCHLD handler.
11649 * thread-db.c (thread_db_create_event, find_one_thread)
11650 (thread_db_get_tls_address): Use lwpid_of.
11651 * win32-low.c (win32_detach): Adjust to use resume_kind.
11652 (win32_wait): Add `options' argument.
11653 * spu-low.c (spu_resume): Adjust to use resume_kind.
11654 (spu_wait): Add `options' argument.
11655
5b1c542e
PA
116562009-04-01 Pedro Alves <pedro@codesourcery.com>
11657
11658 Decouple target code from remote protocol.
11659
11660 * target.h (enum target_waitkind): New.
11661 (struct target_waitstatus): New.
11662 (struct target_ops) <wait>: Return an unsigned long. Take a
11663 target_waitstatus pointer instead of a char pointer.
11664 (mywait): Likewise.
11665 * target.c (mywait): Change prototype to return an unsigned long.
11666 Take a target_waitstatus pointer instead of a char pointer. Adjust.
11667 * server.h (thread_from_wait, old_thread_from_wait): Delete
11668 declarations.
11669 (prepare_resume_reply): Change prototype to take a
11670 target_waitstatus.
11671 * server.c (thread_from_wait, old_thread_from_wait): Delete.
11672 (last_status, last_ptid): New.
11673 (start_inferior): Remove "statusptr" argument. Adjust. Return a
11674 pid instead of a signal.
11675 (attach_inferior): Remove "status" and "signal" parameters.
11676 Adjust.
11677 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
11678 not as an address.
11679 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
11680 (handle_v_requests, myresume): Remove "status" and "signal"
11681 parameters. Adjust.
11682 (handle_status): New.
11683 (main): Delete local `status'. Adjust.
11684 * remote-utils.c: Include target.h.
11685 (prepare_resume_reply): Change prototype to take a
11686 target_waitstatus. Adjust.
11687
11688 * linux-low.c (linux_wait): Adjust to new target_ops->wait
11689 interface.
11690 * spu-low.c (spu_wait): Adjust.
11691 * win32-low.c (enum target_waitkind, struct target_waitstatus):
11692 Delete.
11693 (win32_wait): Adjust.
11694
2bd7c093
PA
116952009-04-01 Pedro Alves <pedro@codesourcery.com>
11696
11697 * target.h (struct thread_resume): Delete leave_stopped member.
11698 (struct target_ops): Add a `n' argument to the `resume' callback.
11699 * server.c (start_inferior): Adjust.
11700 (handle_v_cont, myresume): Adjust.
11701 * linux-low.c (check_removed_breakpoint): Adjust to resume
11702 interface change, and to removed leave_stopped field.
11703 (resume_ptr): Delete.
11704 (struct thread_resume_array): New.
11705 (linux_set_resume_request): Add new `arg' parameter. Adjust to
11706 resume interface change.
11707 (linux_continue_one_thread, linux_queue_one_thread)
11708 (resume_status_pending_p): Check if the resume field is NULL
11709 instead of checking the leave_stopped member.
11710 (linux_resume): Adjust to the target resume interface change.
11711 * spu-low.c (spu_resume): Adjust to the target resume interface
11712 change.
11713 * win32-low.c (win32_detach, win32_resume): Ditto.
11714
c35fafde
PA
117152009-04-01 Pedro Alves <pedro@codesourcery.com>
11716
11717 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
11718 flag.
11719 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
11720 pending.
11721 (linux_continue_one_thread): Only preserve the stepping flag if
11722 there's a pending breakpoint.
11723
0a59d50b
PA
117242009-03-31 Pedro Alves <pedro@codesourcery.com>
11725
11726 * server.c (main): After the inferior having exited, call
11727 remote_close before exiting gdbserver.
11728
f04c6d38
TJB
117292009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
11730
11731 Fix size of FPSCR in Power 7 processors.
11732 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
11733 (PPC_FEATURE_HAS_DFP): New #define.
11734 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
11735 size of the FPSCR.
11736
78e5cee6
PA
117372009-03-23 Pedro Alves <pedro@codesourcery.com>
11738
11739 * server.c (handle_query) Whitespace and formatting.
11740
1b3f6016
PA
117412009-03-22 Pedro Alves <pedro@codesourcery.com>
11742
11743 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
11744 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
11745 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
11746 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
11747 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
11748 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
11749 Makefile.in, configure.ac: Fix whitespace throughout.
11750 * configure: Regenerate.
11751
a07b2135
PA
117522009-03-22 Pedro Alves <pedro@codesourcery.com>
11753
11754 * inferiors.c (find_inferior): Make it safe for the callback
11755 function to delete the currently iterated inferior.
11756
67cc2626
PA
117572009-03-22 Pedro Alves <pedro@codesourcery.com>
11758
11759 * Makefile.in (linuw_low_h): Move higher.
11760 (thread-db.o): Depend on $(linux_low_h).
11761
54a0b537
PA
117622009-03-17 Pedro Alves <pedro@codesourcery.com>
11763
11764 Rename "process" to "lwp" throughout.
11765
11766 * linux-low.c (all_processes): Rename to...
11767 (all_lwps): ... this.
11768 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
11769 (add_process): Rename to ...
11770 (add_lwp): ... this. Adjust.
11771 (linux_create_inferior): Adjust.
11772 (linux_attach_lwp): Adjust.
11773 (linux_attach): Adjust.
11774 (linux_kill_one_process): Rename to ...
11775 (linux_kill_one_lwp): ... this. Adjust.
11776 (linux_kill): Adjust.
11777 (linux_detach_one_process): Rename to ...
11778 (linux_detach_one_lwp): ... this. Adjust.
11779 (linux_detach): Adjust.
11780 (check_removed_breakpoint): Adjust.
11781 (status_pending_p): Adjust.
11782 (linux_wait_for_process): Rename to ...
11783 (linux_wait_for_lwp): ... this. Adjust.
11784 (linux_wait_for_event): Adjust.
11785 (send_sigstop): Adjust.
11786 (wait_for_sigstop): Adjust.
11787 (stop_all_processes): Rename to ...
11788 (stop_all_lwps): ... this.
11789 (linux_resume_one_process): Rename to ...
11790 (linux_resume_one_lwp): ... this. Adjust.
11791 (linux_set_resume_request, linux_continue_one_thread)
11792 (linux_queue_one_thread, resume_status_pending_p)
11793 (usr_store_inferior_registers, regsets_store_inferior_registers)
11794 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11795 Adjust.
11796 * linux-low.h (get_process): Rename to ...
11797 (get_lwp): ... this. Adjust.
11798 (get_thread_process): Rename to ...
11799 (get_thread_lwp): ... this. Adjust.
11800 (get_process_thread): Rename to ...
11801 (get_lwp_thread): ... this. Adjust.
11802 (struct process_info): Rename to ...
11803 (struct lwp_info): ... this.
11804 (all_processes): Rename to ...
11805 (all_lwps): ... this.
11806 * proc-service.c (ps_lgetregs): Adjust.
11807 * thread-db.c (thread_db_create_event, find_one_thread)
11808 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
11809
0b16c5cf
PA
118102009-03-14 Pedro Alves <pedro@codesourcery.com>
11811
11812 * server.c (handle_query): Handle "qAttached".
11813
32de4b9d
NS
118142009-03-13 Nathan Sidwell <nathan@codesourcery.com>
11815
11816 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
11817 GPLv3, update license URL.
11818
2aecd87f
DE
118192009-03-01 Doug Evans <dje@google.com>
11820
93efd302 11821 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
11822 (server_h): Add gdb_signals.h.
11823 (signals.o): Update.
11824 * server.h (target_signal_from_host,target_signal_to_host_p)
11825 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
11826
86b1f9c5
PM
118272009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
11828
11829 * remote-utils.c (getpkt): Also generate remote-debug
11830 information if noack_mode is set.
11831
4aa995e1
PA
118322009-02-06 Pedro Alves <pedro@codesourcery.com>
11833
11834 * server.c (handle_query): Report qXfer:siginfo:read and
11835 qXfer:siginfo:write as supported and handle them.
11836 * target.h (struct target_ops) <qxfer_siginfo>: New field.
11837 * linux-low.c (linux_xfer_siginfo): New.
11838 (linux_target_ops): Set it.
11839
62709adf
PA
118402009-01-26 Pedro Alves <pedro@codesourcery.com>
11841
11842 * server.c (gdbserver_usage): Mention --remote-debug.
11843 (main): Accept '--remote-debug' switch.
11844
aef93bd7
DE
118452009-01-18 Doug Evans <dje@google.com>
11846
11847 * regcache.c (new_register_cache): No need to check result of xcalloc.
11848 * server.c (handle_search_memory): Back out calls to xmalloc,
11849 result is checked and error is returned to user upon failure.
11850 (handle_query): Ditto. Add more checks for result of malloc.
11851 (handle_v_cont): Check result of malloc, report error back to
11852 user upon failure.
11853 (handle_v_run): Ditto. Call freeargv.
11854 * server.h (freeargv): Declare.
11855 * utils.c (freeargv): New fn.
11856
54363045
DE
118572009-01-15 Doug Evans <dje@google.com>
11858
f626972c
DE
11859 * gdbreplay.c (perror_with_name): Make arg const char *.
11860 * server.h (target_signal_to_name): Make return type const char *.
0842e787 11861 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 11862 * utils.c (perror_with_name): Make arg const char *.
54363045 11863
18aae699
PA
118642009-01-14 Pedro Alves <pedro@codesourcery.com>
11865
11866 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
11867 when handling a EXIT_PROCESS_DEBUG_EVENT.
11868
ff703abe
JB
118692009-01-06 Joel Brobecker <brobecker@adacore.com>
11870
11871 * gdbreplay.c (gdbreplay_version): Update copyright year.
11872 * server.c (gdbserver_version): Likewise.
11873
f21cc1a2 118742009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
11875
11876 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 11877 (handle_extended_wait): Improve comment.
0e21c1ec 11878
bca929d3
DE
118792008-12-13 Doug Evans <dje@google.com>
11880
11881 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
11882 * server.h (ATTR_MALLOC): New macro.
11883 (xmalloc,xcalloc,xstrdup): Declare.
11884 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
11885 * inferiors.c: Ditto.
11886 * linux-low.c: Ditto.
11887 * mem-break.c: Ditto.
11888 * regcache.c: Ditto.
11889 * remote-utils.c: Ditto.
11890 * server.c: Ditto.
11891 * target.c: Ditto.
11892 * win32-low.c: Ditto.
11893
97438e3f
DE
118942008-12-12 Doug Evans <dje@google.com>
11895
896c7fbb
DE
11896 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
11897 in debugging printf.
11898
97438e3f
DE
11899 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
11900
e3b886f8
DE
119012008-12-09 Doug Evans <dje@google.com>
11902
11903 * linux-low.h (struct process_info): Delete member tid, unused.
11904 * thread-db.c (find_one_thread): Update.
11905 (maybe_attach_thread): Update.
11906
07e059b5
VP
119072008-12-02 Pedro Alves <pedro@codesourcery.com>
11908
889bf7c5
PA
11909 * target.h (struct target_ops): Add qxfer_osdata member.
11910 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
11911 and dirent.h.
11912 (linux_qxfer_osdata): New functions.
11913 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
11914 callback.
11915 * server.c (handle_query): Handle "qXfer:osdata:read:".
11916 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
11917 (buffer_xml_printf): New functions.
11918 * server.h (struct buffer): New.
11919 (buffer_grow_str, buffer_grow_str0): New macros.
11920 (buffer_grow, buffer_free, buffer_init, buffer_finish)
11921 (buffer_xml_printf): Declare.
07e059b5 11922
4cab47ab
DE
119232008-11-24 Doug Evans <dje@google.com>
11924
11925 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
11926
f142445f
DJ
119272008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
11928
11929 * server.c (handle_v_run): Always use the supplied argument list.
11930
d0107bb6 119312008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 11932
d0107bb6
BW
11933 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
11934 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 11935
2c4ad781
TJB
119362008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
11937
11938 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
11939 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
11940 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
11941 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
11942 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
11943 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
11944 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
11945 XML target descriptions.
11946 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
11947 when inferior is running on an ISA 2.05 or later processor. Add
11948 special case to return offset for full 64-bit slot of FPSCR when
11949 in 32-bits.
11950
dfb64f85
DJ
119512008-11-14 Daniel Gutson <dgutson@codesourcery.com>
11952
11953 * Makefile.in (SFILES, clean): Added sparc64 files.
11954 (reg-sparc64.o, reg-sparc64.c): New.
11955 * configure.srv (sparc*-*-linux*): New configuration.
11956 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
11957 syscall arguments for SPARC.
11958 (regsets_store_inferior_registers): Likewise.
11959 * linux-sparc-low.c: New file.
11960
66b6e1dd
DE
119612008-10-21 Doug Evans <dje@google.com>
11962
11963 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
11964 (READLINE_DIR,READLINE_DEP): Delete.
11965 (INTERNAL_CFLAGS): Update.
11966 (LINTFLAGS): Update.
11967
9b710a42
PA
119682008-10-10 Pedro Alves <pedro@codesourcery.com>
11969
11970 * server.c (handle_v_run): If GDB didn't specify an argv, use the
11971 whole argv from the last run, not just argv[0].
11972
5822d809
PA
119732008-09-08 Pedro Alves <pedro@codesourcery.com>
11974
11975 * regcache.c (new_register_cache): Return NULL if the register
11976 cache size isn't known yet.
11977 (free_register_cache): Avoid dereferencing a NULL regcache.
11978
74aac56f
DJ
119792008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11980
11981 * configure.srv: Merge MIPS and MIPS64.
11982
400b20f5
MR
119832008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
11984
11985 * Makefile.in (uninstall): Apply $(EXEEXT) too.
11986
677c5bb1
LM
119872008-08-18 Luis Machado <luisgpm@br.ibm.com>
11988
11989 * Makefile.in: Add required vsx dependencies.
11990
11991 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
11992 Declare init_registers_powerpc_vsx32l.
11993 Declare init_registers_powerpc_vsx64l.
11994 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
11995 (ppc_arch_setup): Check for VSX in hwcap.
11996 (ppc_fill_vsxregset): New function.
11997 (ppc_store_vsxregset): New function.
11998 Add new VSX entry in regset_info target_regsets.
11999
12000 * configure.srv: Add new VSX dependencies.
12001
a6f3e723
SL
120022008-08-12 Pedro Alves <pedro@codesourcery.com>
12003
12004 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
12005 (remote_open): Set or clear transport_is_reliable.
12006 (putpkt_binary): Don't expect acks in noack mode.
12007 (getpkt): Don't send ack/nac in noack mode.
12008 * server.c (handle_general_set): Handle QStartNoAckMode.
12009 (handle_query): If connected by tcp pass QStartNoAckMode+ in
12010 qSupported.
12011 (main): Reset noack_mode on every connection.
12012 * server.h (noack_mode): Declare.
12013
a417dc56
RW
120142008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12015
12016 * Makefile.in (GDBREPLAY_OBS): New variable.
12017 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
12018
3221518c
UW
120192008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
12020 Daniel Jacobowitz <dan@codesourcery.com>
12021
12022 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
12023 (usr_store_inferior_registers): Likewise.
12024 (regsets_store_inferior_registers): Likewise.
12025
ec56be1b
PA
120262008-07-31 Rolf Jansen <rj@surtec.com>
12027 Pedro Alves <pedro@codesourcery.com>
12028
12029 * configure.ac: Check for memmem declaration.
12030 * server.c [HAVE_MALLOC_H]: Include malloc.h.
12031 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
12032 (disable_packet_qfThreadInfo): Unconditionally compile.
12033 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
12034 * configure, config.in: Regenerate.
12035
2fe5e3ff
DE
120362008-07-28 Doug Kwan <dougkwan@google.com>
12037
12038 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
12039 (linux_write_memory): Remove declaration of errno.
12040
836acd6d
UW
120412008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
12042
12043 * linux-low.c (handle_extended_wait): Do not use "status"
12044 variable uninitialized.
12045
aeba519e
PA
120462008-07-07 Pedro Alves <pedro@codesourcery.com>
12047
12048 * server.c (handle_v_attach): Inhibit reporting dll changes.
12049
db42f210
PA
120502008-06-27 Pedro Alves <pedro@codesourcery.com>
12051
12052 * remote-utils.c (prepare_resume_reply): If requested, don't
12053 output "thread:TID" in the T stop reply.
12054
12055 * server.c (disable_packet_vCont, disable_packet_Tthread)
12056 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
12057 (handle_query): If requested, disable support for qC, qfThreadInfo
12058 and qsThreadInfo.
12059 (handle_v_requests): If requested, disable support for vCont.
12060 (gdbserver_show_disableable): New.
12061 (main): Handle --disable-packet and --disable-packet=LIST.
12062
12063 * server.h (disable_packet_vCont, disable_packet_Tthread)
12064 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
12065
8e4c5421
CD
120662008-06-20 Carlos O'Donell <carlos@codesourcery.com>
12067
12068 * server.c (gdbserver_usage): Mention --version.
12069
6e23a804
DJ
120702008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
12071
12072 * Makefile.in (gdbreplay.o): New rule.
12073
90aa6a40
JM
120742008-06-06 Joseph Myers <joseph@codesourcery.com>
12075
12076 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
12077 message, not gdbserver.
12078
c16158bc 120792008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
12080 Nathan Sidwell <nathan@codesourcery.com>
12081 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
12082
12083 * acinclude.m4: Include ../../config/acx.m4.
12084 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
12085 * configure, config.in: Regenerate.
12086 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
12087 * server.c (gdbserver_version): Print PKGVERSION.
12088 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
12089 (main): Adjust gdbserver_usage calls.
12090 * gdbreplay.c (version, host_name): Add declarations.
12091 (gdbreplay_version, gdbreplay_usage): New.
12092 (main): Accept --version and --help options.
12093
aeb75bf5
DJ
120942008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
12095
12096 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
12097 (arm_breakpoint_at): Handle Thumb.
12098 (the_low_target): Add comment.
12099
76b233dd
UW
121002008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
12101
12102 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
12103
08388c79
DE
121042008-05-09 Doug Evans <dje@google.com>
12105
a3c83fae
DE
12106 * server.h (decode_search_memory_packet): Declare.
12107 * remote-utils.c (decode_search_memory_packet): New fn.
12108 * server.c (handle_search_memory_1): New fn.
08388c79
DE
12109 (handle_search_memory): New fn.
12110 (handle_query): Process qSearch:memory packets.
12111
bb9c3d36
UW
121122008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
12113
12114 * regcache.c (registers_length): Remove.
12115 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
12116 full register packet.
12117 * regcache.h (registers_length): Remove prototype.
12118 * server.h (PBUFSIZ): Define to 16384.
12119
7284e1be
UW
121202008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
12121
12122 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
12123 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
12124 powerpc-64l.o, and powerpc-altivec64l.o.
12125 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
12126 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
12127 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
12128 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
12129 rs6000/power-linux.xml, and rs6000/power64-linux.xml
12130 to srv_xmlfiles.
12131
12132 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
12133 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
12134 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
12135 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
12136 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
12137 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
12138 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
12139 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
12140 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
12141 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
12142 (clean): Update.
12143
12144 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
12145 (init_registers_powerpc_32l): ... this new prototype.
12146 (init_registers_powerpc_32): Remove, replace by ...
12147 (init_registers_powerpc_altivec32l): ... this new prototype.
12148 (init_registers_powerpc_e500): Remove, replace by ...
12149 (init_registers_powerpc_e500l): ... this new prototype.
12150 (init_registers_ppc64): Remove, replace by ...
12151 (init_registers_powerpc_64l): ... this new prototype.
12152 (init_registers_powerpc_64): Remove, replace by ...
12153 (init_registers_powerpc_altivec64l): ... this new prototype.
12154 (ppc_num_regs): Set to 73.
12155 (PT_ORIG_R3, PT_TRAP): Define if necessary.
12156 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
12157 (ppc_cannot_store_register): Handle orig_r3 and trap.
12158 (ppc_arch_setup): Update init_registers_... calls.
12159 (ppc_fill_gregset): Handle orig_r3 and trap.
12160
12161 * inferiors.c (clear_inferiors): Reset current_inferior.
12162
fdc59709
PB
121632008-04-23 Paolo Bonzini <bonzini@gnu.org>
12164
889bf7c5
PA
12165 * acinclude.m4: Add override.m4.
12166 * configure: Regenerate.
fdc59709 12167
c9b2f845
UW
121682008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12169
12170 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
12171 initial call to init_register_ppc64.
12172
550512b8
UW
121732008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12174
43aaf8b6
PA
12175 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
12176 single powerpc*-*-linux* case.
550512b8
UW
12177 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
12178
b6430ec3
UW
121792008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
12180
12181 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 12182 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
12183 from reg_xmlfiles.
12184 * linux-ppc-low.c: Include <elf.h>.
12185 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
12186 (ppc_hwcap): New global variable.
12187 (ppc_regmap): Remove __SPE__ #ifdef sections.
12188 (ppc_regmap_e500): New global variable.
12189 (ppc_cannot_store_register): Update __SPE__ special case.
12190 (ppc_get_hwcap): New function.
12191 (ppc_arch_setup): Use it to determine whether inferior supports
12192 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
12193 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
12194 Do not access registers if target does not support AltiVec.
12195 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
12196 Do not access registers if target does not support SPE.
12197 (target_regsets): Unconditionally include AltiVec and SPE regsets.
12198
52fa2412
UW
121992008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
12200
12201 * linux-low.c (disabled_regsets, num_regsets): New.
12202 (use_regsets_p): Delete.
12203 (linux_wait_for_process): Clear disabled_regsets.
12204 (regsets_fetch_inferior_registers): Check and set it.
12205 (regsets_store_inferior_registers): Likewise.
12206 (linux_fetch_registers, linux_store_registers): Do not use
12207 use_regsets_p.
12208 (initialize_low): Allocate disabled_regsets.
12209
e28b3332
DJ
122102008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
12211
12212 * Makefile.in (LIBOBJS): New.
12213 (OBS): Use LIBOBJS.
12214 (memmem.o): New rule.
12215 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
12216 * configure: Regenerated.
12217
4536995d
UW
122182008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
12219
12220 * server.c (handle_query): Never return "unsupported" for
12221 qXfer:features:read queries.
12222
221c031f
UW
122232008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
12224
12225 * server.c (get_features_xml): Fix inverted condition.
12226 (handle_query): Always support qXfer:feature:read.
12227
ccd213ac
DJ
122282008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
12229
12230 * server.c (wrapper_argv): New.
12231 (start_inferior): Handle wrapper_argv. If set, expect an extra
12232 trap.
12233 (gdbserver_usage): Document --wrapper.
12234 (main): Parse --wrapper.
12235
6fe305f7
UW
122362008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12237
12238 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
12239 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
12240 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
12241 (ppc_set_pc): Likewise.
12242 (ppc_arch_setup): New function.
12243 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
12244 of collect_register.
889bf7c5 12245 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 12246
5b0a002e
UW
122472008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12248
12249 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
12250 instead of linux-ppc64-low.o.
12251 * linux-ppc64-low.c: Remove file.
12252 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
12253 (linux-ppc64-low.o): Remove rule.
12254
12255 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
12256 (init_registers_powerpc_64): Likewise.
12257 (ppc_regmap): Conditionally define depending on __powerpc64__.
12258 (ppc_cannot_store_register): Do not special-case "fpscr" when
12259 compiled on __powerpc64__.
12260 (ppc_collect_ptrace_register): New function.
12261 (ppc_supply_ptrace_register): New function.
12262 (ppc_breakpoint): Change type to "unsigned int".
12263 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
12264 (the_low_target): Conditionally provide initializers for the
889bf7c5 12265 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
12266 collect_ptrace_register and supply_ptrace_register members.
12267
9b4b61c8
UW
122682008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12269
12270 * regcache.h (gdbserver_xmltarget): Add extern declaration.
12271 * server.c (gdbserver_xmltarget): Define.
12272 (get_features_xml): Use it to replace "target.xml" and arch_string.
12273
12274 * configure.srv: Remove srv_xmltarget. Add XML files that were
12275 mentioned there to srv_xmlfiles instead. Remove conditional tests
12276 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
12277 srv_xmlfiles and srv_regobj to include all possible choices.
12278 * configure.ac (srv_xmltarget): Remove.
12279 (srv_xmlfiles): Do not add "target.xml".
12280 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
12281 checks for supplementary target information.
12282 * configure: Regenerate.
12283 * Makefile.in (XML_TARGET): Remove.
12284 (target.xml): Remove rule.
12285 (clean): Do not clean up target.xml.
12286 (.PRECIOUS): Do not mention target.xml.
12287
12288 * target.h (struct target_ops): Remove arch_string member.
12289 * linux-low.c (linux_arch_string): Remove.
12290 (linux_target_ops): Remove arch_string initializer.
12291 * linux-low.h (struct linux_target_ops): Remove arch_string member.
12292 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
12293 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
12294 * spu-low.c (spu_arch_string): Remove.
12295 (spu_target_ops): Remove arch_string initializer.
12296 * win32-low.c (win32_arch_string): Remove.
12297 (win32_target_ops): Remove arch_string initializer.
12298 * win32-low.h (struct win32_target_ops): Remove arch_string member.
12299 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
12300 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
12301
ee1a7ae4
UW
123022008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12303
12304 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
12305 by collect_ptrace_register and supply_ptrace_register hooks.
12306 * linux-low.c (fetch_register): Use supply_ptrace_register callback
12307 instead of checking for the_low_target.left_pad_xfer.
12308 (usr_store_inferior_registers): Use collect_ptrace_register callback
12309 instead of checking for the_low_target.left_pad_xfer.
12310
12311 * linux-s390-low.c (s390_collect_ptrace_register): New function.
12312 (s390_supply_ptrace_register): Likewise.
12313 (s390_fill_gregset): Call s390_collect_ptrace_register.
12314 (the_low_target): Update.
12315
12316 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
12317 (ppc_supply_ptrace_register): Likewise.
12318 (the_low_target): Update.
12319
12320 * linux-i386-low.c (the_low_target): Update.
12321 * linux-x86-64-low.c (the_low_target): Update.
12322
d61ddec4
UW
123232008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12324
12325 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
12326 reg-s390.o and reg-s390x.o.
12327
12328 * linux-low.c (new_inferior): New global variable.
12329 (linux_create_inferior, linux_attach): Set it.
12330 (linux_wait_for_process): Call the_low_target.arch_setup after the
12331 target has stopped for the first time.
12332 (initialize_low): Do not call the_low_target.arch_setup.
12333
12334 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
12335 (s390_set_pc): Likewise.
12336 (s390_arch_setup): New function.
12337 (the_low_target): Use s390_arch_setup as arch_setup routine.
12338
12339 * regcache.c (realloc_register_cache): New function.
12340 (set_register_cache): Call it for each existing regcache.
12341
d05b4ac3
UW
123422008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12343
12344 * server.h (init_registers): Remove prototype.
12345
12346 * linux-low.h (struct linux_target_ops): Add arch_setup field.
12347 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
12348 instead of init_registers ().
12349 * linux-arm-low.c (init_registers_arm): Add prototype.
12350 (init_registers_arm_with_iwmmxt): Likewise.
12351 (the_low_target): Add initializer for arch_setup field.
12352 * linux-cris-low.c (init_registers_cris): Add prototype.
12353 (the_low_target): Add initializer for arch_setup field.
12354 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
12355 (the_low_target): Add initializer for arch_setup field.
12356 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
12357 (the_low_target): Add initializer for arch_setup field.
12358 * linux-ia64-low.c (init_registers_ia64): Add prototype.
12359 (the_low_target): Add initializer for arch_setup field.
12360 * linux-m32r-low.c (init_registers_m32r): Add prototype.
12361 (the_low_target): Add initializer for arch_setup field.
12362 * linux-m68k-low.c (init_registers_m68k): Add prototype.
12363 (the_low_target): Add initializer for arch_setup field.
12364 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
12365 (init_registers_mips64_linux): Likewise.
12366 (the_low_target): Add initializer for arch_setup field.
12367 * linux-ppc-low.c (init_registers_ppc): Add prototype.
12368 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
12369 (the_low_target): Add initializer for arch_setup field.
12370 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
12371 (init_registers_powerpc_64): Likewise.
12372 (the_low_target): Add initializer for arch_setup field.
12373 * linux-s390-low.c (init_registers_s390): Add prototype.
12374 (init_registers_s390x): Likewise.
12375 (the_low_target): Add initializer for arch_setup field.
12376 * linux-sh-low.c (init_registers_sh): Add prototype.
12377 (the_low_target): Add initializer for arch_setup field.
12378 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
12379 (the_low_target): Add initializer for arch_setup field.
12380 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
12381 (the_low_target): Add initializer for arch_setup field.
12382
12383 * win32-low.h (struct win32_target_ops): Add arch_setup field.
12384 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
12385 instead of init_registers ().
12386 * win32-arm-low.c (init_registers_arm): Add prototype.
12387 (the_low_target): Add initializer for arch_setup field.
12388 * win32-i386-low.c (init_registers_i386): Add prototype.
12389 (the_low_target): Add initializer for arch_setup field.
12390
12391 * spu-low.c (init_registers_spu): Add prototype.
12392 (initialize_low): Call initialie_registers_spu () instead of
12393 initialize_registers ().
12394
fd96d250
PA
123952008-02-19 Pedro Alves <pedro@codesourcery.com>
12396
12397 * server.c (handle_v_requests): When handling the vRun and vAttach
12398 packets, if already debugging a process, don't kill it. Return an
12399 error instead.
12400
d41b6bb4
DJ
124012008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
12402
12403 * server.c (handle_query): Correct length check.
12404
5ac588cf
PA
124052008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
12406
12407 * win32-low.c (do_initial_child_stuff): Add process handle
12408 parameter. Set current_process_handle and current_process_id from the
12409 parameters. Clear globals.
12410 (win32_create_inferior): Don't set current_process_handle and
12411 current_process_id here. Instead pass them on the call to
12412 do_initial_child_stuff.
12413 (win32_attach): Likewise.
12414 (win32_clear_inferiors): New.
12415 (win32_kill): Don't close the current process handle or the
12416 current thread handle here. Instead call win32_clear_inferiors.
12417 (win32_detach): Don't open a new handle to the process. Call
12418 win32_clear_inferiors.
12419 (win32_join): Don't rely on current_process_handle; open a new
12420 handle using the process id.
12421 (win32_wait): Call win32_clear_inferiors when the inferior process
12422 has exited.
12423
ecd7ecbc
DJ
124242008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
12425
12426 * server.c (monitor_show_help): Add "exit".
12427
1525d545
MG
124282008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
12429
ecd7ecbc 12430 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
12431 (clean): Add reg-xtensa.c.
12432 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
12433 * configure.srv (xtensa*-*-linux*) New target.
12434 * linux-xtensa-low.c: New.
12435 * xtensa-xtregs.c: New.
1525d545 12436
59a016f0
PA
124372008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
12438
12439 * hostio.c: Don't include errno.h.
12440 (errno_to_fileio_errno): Move to hostio-errno.
12441 * hostio.c: (hostio_error): Remove the error parameter. Defer the
12442 error number outputting to the target->hostio_last_error callback.
12443 (hostio_packet_error): Use FILEIO_EINVAL directly.
12444 (handle_open, handle_pread, hostio_error, handle_unlink): Update
12445 calls to hostio_error.
12446 * hostio-errno.c: New.
12447 * server.h (hostio_last_error_from_errno): Declare.
12448 * target.h (target_ops): Add hostio_last_error member.
12449 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
12450 as hostio_last_error handler.
889bf7c5 12451 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
12452 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
12453 (wince_hostio_last_error): New functions.
12454 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
12455 as hostio_last_error handler.
12456 (win32_target_ops) [!_WIN32_WCE]: Register
12457 hostio_last_error_from_errno as hostio_last_error handler.
12458 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
12459 (hostio-errno.o): New rule.
12460 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
12461 * configure.srv (srv_hostio_err_objs): New variable. Default to
12462 hostio-errno.o.
12463 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
12464 * configure: Regenerate.
12465
2d717e4f
DJ
124662008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12467
12468 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
12469 (linux_kill, linux_detach): Clean up the process list.
12470 * remote-utils.c (remote_open): Improve port number parsing.
12471 (putpkt_binary, input_interrupt): Only send interrupts if the target
12472 is running.
12473 * server.c (extended_protocol): Make static.
12474 (attached): Define earlier.
12475 (exit_requested, response_needed, program_argv): New variables.
12476 (target_running): New.
12477 (start_inferior): Clear attached here.
12478 (attach_inferior): Set attached here.
12479 (require_running): Define.
12480 (handle_query): Use require_running and target_running. Implement
12481 "monitor exit".
12482 (handle_v_attach, handle_v_run): New.
12483 (handle_v_requests): Use require_running. Handle vAttach and vRun.
12484 (gdbserver_usage): Update.
12485 (main): Redo argument parsing. Handle --debug and --multi. Handle
12486 --attach along with other options or after the port. Save
12487 program_argv. Support no initial program. Resynchronize
12488 communication with GDB after an error. Handle "monitor exit".
12489 Use require_running and target_running. Always allow the extended
12490 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
12491 restart in extended mode.
12492 * README: Refer to the GDB manual. Update --attach usage.
12493
7407e2de
AS
124942007-12-20 Andreas Schwab <schwab@suse.de>
12495
12496 * linux-low.c (STACK_SIZE): Define.
12497 (linux_tracefork_child): Use it. Use __clone2 on ia64.
12498 (linux_test_for_tracefork): Likewise.
12499
b65d95c5
DJ
125002007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
12501
12502 * linux-low.c (linux_wait_for_event): Update messages. Do not
12503 reinsert auto-delete breakpoints.
12504 * mem-break.c (struct breakpoint): Change return type of handler to
12505 int.
12506 (set_breakpoint_at): Update handler type.
12507 (reinsert_breakpoint_handler): Return 1 instead of calling
12508 delete_breakpoint.
12509 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
12510 setting a new one.
12511 (check_breakpoints): Delete auto-delete breakpoints and return 2.
12512 * mem-break.h (set_breakpoint_at): Update handler type.
12513 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
12514 * win32-low.c (auto_delete_breakpoint): New.
12515 (get_child_debug_event): Use it.
12516
4e799345
DJ
125172007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
12518
12519 * configure.ac: Check for pread and pwrite.
12520 * hostio.c (handle_pread): Fall back to lseek and read.
12521 (handle_pwrite): Fall back to lseek and write.
12522 * config.in, configure: Regenerated.
12523
27524b67
DJ
125242007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
12525
12526 * server.c (myresume): Add own_buf argument.
12527 (main): Update calls.
12528
a20d5e98
DJ
125292007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
12530
12531 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
12532 * remote-utils.c (remote_open): Do not call disable_async_io.
12533 (block_async_io): Delete.
12534 (unblock_async_io): Make static.
12535 (initialize_async_io): New.
12536 * server.c (handle_v_cont): Handle async I/O here.
12537 (myresume): Likewise. Move other common resume tasks here...
12538 (main): ... from here. Call initialize_async_io. Disable async
12539 I/O before the main loop.
12540 * server.h (initialize_async_io): Declare.
12541 (block_async_io, unblock_async_io): Delete prototypes.
12542 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
12543
b79d787e
DJ
125442007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
12545
12546 * remote-utils.c (readchar): Allow binary data in received messages.
12547
d97903b2
PA
125482007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12549
12550 * win32-low.c (attaching): New global.
12551 (win32_create_inferior): Clear the `attaching' global.
12552 (win32_attach): Set the `attaching' global.
12553 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
12554 attaching. Only set a breakpoint at the entry point if not
12555 attaching.
12556
311de423
PA
125572007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12558
12559 * server.c (main): Don't report dll events on the initial
12560 connection on attaches.
12561
6c2d16d2
PA
125622007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12563
12564 * server.c (main): Relax numerical bases supported for the pid of
12565 the --attach command line argument.
12566
5ca906e6
PA
125672007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12568
12569 * win32-low.c (win32_attach): Call OpenProcess before
12570 DebugActiveProcess, not after. Add last error output to error
12571 call.
12572
9c6c8194
PA
125732007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12574
12575 * win32-low.c (win32_get_thread_context)
12576 (win32_set_thread_context): New functions.
12577 (thread_rec): Use win32_get_thread_context.
12578 (continue_one_thread, win32_resume): Use win32_set_thread_context.
12579 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
12580 field.
12581
4d5d1aaa
PA
125822007-12-03 Leo Zayas
12583 Pedro Alves <pedro_alves@portugalmail.pt>
12584
12585 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
12586 global variables.
12587 (child_add_thread): Minor cleanup.
12588 (child_continue): Resume artificially suspended threads before
12589 calling ContinueDebugEvent.
12590 (suspend_one_thread): New.
12591 (fake_breakpoint_event): New.
12592 (get_child_debug_event): Change return type to int. Check here if
12593 gdb sent an interrupt request. If a soft interrupt was requested,
12594 fake a breakpoint event. Return 0 if there is no event to handle,
12595 and 1 otherwise.
12596 (win32_wait): Don't check here if gdb sent an interrupt request.
12597 Ensure there is a valid event to handle.
12598 (win32_request_interrupt): Add soft interruption method as last
12599 resort.
12600
c436e841
PA
126012007-12-03 Leo Zayas
12602 Pedro Alves <pedro_alves@portugalmail.pt>
12603
12604 * win32-low.h (win32_thread_info): Add descriptions to the
12605 structure members. Replace `suspend_count' counter by a
12606 `suspended' flag.
12607 * win32-low.c (thread_rec): Update condition of when to get the
12608 context from the inferior. Rely on ContextFlags being set if it
12609 has already been retrieved. Only suspend the inferior thread if
12610 we haven't already. Warn if that fails.
12611 (continue_one_thread): s/suspend_count/suspended/. Only call
12612 ResumeThread once. Warn if that fails.
12613
e7b5fa67
PA
126142007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12615
12616 * win32-low.c (win32_wait): Don't read from the inferior when it
12617 has already exited.
12618
a385171d
PA
126192007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12620
12621 * Makefile.in (win32_low_h): New variable.
12622 (win32-low.o): Add dependency on $(win32_low_h).
12623 (win32-arm-low.o, win32-i386-low.o): New rules.
12624
f80c84b3
DJ
126252007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12626
12627 * hostio.c: Correct copyright year.
12628
a6b151f1
DJ
126292007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12630
12631 * Makefile.in (OBS): Add hostio.o.
12632 (hostio.o): New rule.
12633 * server.h (handle_vFile): Declare.
12634 * hostio.c: New file.
12635 * server.c (handle_v_requests): Take packet_len and new_packet_len
12636 for binary packets. Call handle_vFile.
12637 (main): Update call to handle_v_requests.
12638
f9387fc3
DJ
126392007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
12640
12641 * linux-low.c: Include <sched.h>.
12642
51c2684e
DJ
126432007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
12644
12645 * linux-low.c (linux_tracefork_grandchild): New.
12646 (linux_tracefork_child): Use clone.
12647 (linux_test_for_tracefork): Use clone; allocate and free a stack.
12648
75f83163
JB
126492007-10-31 Joel Brobecker <brobecker@adacore.com>
12650
12651 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
12652
da5898ce
DJ
126532007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
12654
12655 * linux-low.c (handle_extended_wait): Handle unexpected signals.
12656
24a09b5f
DJ
126572007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
12658
12659 * inferiors.c (change_inferior_id): Delete.
12660 (add_pid_to_list, pull_pid_from_list): New.
12661 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
12662 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
12663 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
12664 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
12665 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
12666 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
12667 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
12668 (using_threads): Always set to 1.
12669 (handle_extended_wait): New.
12670 (add_process): Do not set TID.
12671 (linux_create_inferior): Set must_set_ptrace_flags.
12672 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
12673 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
12674 (linux_thread_alive): Rename TID argument to LWPID.
12675 (linux_wait_for_process): Handle unknown processes. Do not use TID.
12676 (linux_wait_for_event): Do not use TID or check using_threads. Update
12677 call to dead_thread_notify. Call handle_extended_wait.
12678 (linux_create_inferior): Use PTRACE_SETOPTIONS.
12679 (send_sigstop): Delete sigstop_sent.
12680 (wait_for_sigstop): Avoid TID.
12681 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
12682 (linux_test_for_tracefork): New.
12683 (linux_lookup_signals): Use thread_db_active and
12684 linux_supports_tracefork_flag.
12685 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
12686 * linux-low.h (get_process_thread): Avoid TID.
12687 (struct process_ifo): Move thread_known and tid to the end. Remove
12688 sigstop_sent.
12689 (linux_attach_lwp, thread_db_init): Update prototypes.
12690 * server.h (change_inferior_id): Delete prototype.
12691 (add_pid_to_list, pull_pid_from_list): New prototypes.
12692 * thread-db.c (thread_db_use_events): New.
12693 (find_first_thread): Rename to...
12694 (find_one_thread): ...this. Update callers and messages. Do not
12695 call fatal. Check thread_db_use_events. Do not call
12696 change_inferior_id or new_thread_notify.
12697 (maybe_attach_thread): Update. Do not call new_thread_notify.
12698 (thread_db_init): Set thread_db_use_events. Check use_events.
12699 * utils.c (fatal, warning): Correct message prefix.
12700
30ed0a8f
DJ
127012007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
12702
12703 * Makefile.in (clean): Remove new files.
12704 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
12705 (powerpc-64.o, powerpc-64.c): New rules.
12706 * configure.srv: Use alternate register sets for powerpc64-*-linux*
12707 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
12708 with SPE.
12709 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
12710 SPE targets.
12711 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
12712 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
12713 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
12714 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
12715 (target_regsets): Add AltiVec and SPE register sets.
12716 * configure.ac: Check for AltiVec and SPE.
12717 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
12718 (ppc_fill_vrregset, ppc_store_vrregset): New.
12719 (target_regsets): Add AltiVec register set.
12720 * configure: Regenerated.
12721
fd462a61
DJ
127222007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
12723
12724 * linux-low.c (O_LARGEFILE): Define.
12725 (linux_read_memory): Use /proc/PID/mem.
12726 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
12727 * configure, config.in: Regenerated.
12728
69f223ed
DJ
127292007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12730
12731 * linux-low.c (linux_wait_for_event): Do not pass signals while
12732 single-stepping.
12733
aec18585
PA
127342007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12735
12736 * win32-low.c (create_process): New.
12737 (win32_create_inferior): Use create_process instead of
12738 CreateProcess. If create_process failed retry appending an ".exe"
12739 suffix. Store the GetLastError result immediatelly after
12740 create_process calls and use it on the call to error.
12741
34d86ddd
PA
127422007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12743
12744 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
12745
5a0e3bd0
JB
127462007-08-23 Joel Brobecker <brobecker@adacore.com>
12747
12748 * configure.ac: Switch license to GPLv3.
12749
f88c79e6
MS
127502007-08-01 Michael Snyder <msnyder@access-company.com>
12751
12752 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
12753
6b3d9b83
PA
127542007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
12755
12756 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
12757 typedef.
12758 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
12759 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
12760 CloseToolhelp32Snapshot.
12761 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
12762 CloseToolhelp32Snapshot.
12763
c588c53c
MS
127642007-07-27 Michael Snyder <michael.snyder@access-company.com>
12765
12766 * server.c (main): Check for inferior exit before main loop.
12767
aa0403d9
PA
127682007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
12769
12770 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
12771 instead of on tmp_desc.
12772
255e7678
DJ
127732007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
12774 Daniel Jacobowitz <dan@codesourcery.com>
12775
12776 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
12777 (add_thread): Minor cleanups.
12778 (clear_inferiors): Move lower in the file. Clear the DLL
12779 list.
12780 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
12781 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
12782 (xml_escape_text): New.
12783 * server.c (handle_query): Handle qXfer:libraries:read. Report it
12784 for qSupported.
12785 (handle_v_cont): Report errors.
12786 (gdbserver_version): Update.
12787 (main): Correct size of own_buf. Do not report initial DLL events.
12788 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
12789 (unloaded_dll, xml_escape_text): New.
12790 * win32-low.c (enum target_waitkind): Update comments.
12791 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
12792 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
12793 (win32_EnumProcessModules, win32_GetModuleInformation)
12794 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
12795 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
12796 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
12797 (win32_Module32First, win32_Module32Next, load_toolhelp)
12798 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
12799 (get_child_debug_event): Handle DLL events.
12800 (win32_wait): Likewise.
12801
0d37add9
DJ
128022007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12803
12804 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
12805 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
12806
45e2715e
PA
128072007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12808
12809 * win32-low.c (handle_output_debug_string): Ignore event if not
12810 waiting.
12811
c5674cf1
PA
128122007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12813
12814 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
12815
2bbe3cc1
DJ
128162007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
12817
12818 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
12819
ae13219e
DJ
128202007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
12821
12822 * inferiors.c (change_inferior_id): Add comment.
12823 * linux-low.c (check_removed_breakpoint): Add an early
12824 prototype. Improve debug output.
12825 (linux_attach): Doc update.
12826 (linux_detach_one_process, linux_detach): Clean up before releasing
12827 each process.
12828 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
12829 * linux-low.h (struct process_info): Doc improvement.
12830 * mem-break.c (delete_all_breakpoints): New.
12831 * mem-break.h (delete_all_breakpoints): New prototype.
12832 * thread-db.c (find_first_thread): New.
12833 (thread_db_create_event): Call it instead of
12834 thread_db_find_new_threads. Clean up unused variables.
12835 (maybe_attach_thread): Remove first thread handling.
12836 (thread_db_find_new_threads): Use find_first_thread.
12837 (thread_db_get_tls_address): Likewise.
12838
4105de34
DJ
128392007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
12840
12841 * thread-db.c (thread_db_find_new_threads): Add prototype.
12842 (thread_db_create_event): Check for the main thread before adding
12843 a new thread.
12844 (maybe_attach_thread): Only enable event reporting if TID == 0.
12845 (thread_db_get_tls_address): Check for new threads.
12846
2b876972
DJ
128472007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
12848
12849 * linux-low.c (linux_create_inferior): Try execv before execvp.
12850 * spu-low.c (spu_create_inferior): Likewise.
12851
7a245884
DJ
128522007-06-13 Mike Frysinger <vapier@gentoo.org>
12853
12854 * linux-low.c (linux_create_inferior): Change execv to execvp.
12855 * spu-low.c (spu_create_inferior): Likewies.
12856
117ce543
DJ
128572007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
12858
12859 * Makefile.in (clean): Clean new files instead of deleted ones.
12860 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
12861 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
12862 rules.
12863 * configure.srv: Specify XML files and new regformats for MIPS and
12864 MIPS64 GNU/Linux.
12865 * linux-mips-low.c (mips_num_regs): Set to only used registers.
12866 (mips_regmap): Do not fetch $0. Remove unused registers. Add
12867 an entry for the restart register.
12868 (mips_cannot_fetch_register, mips_cannot_store_register)
12869 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
12870 register names to match the XML descriptions.
12871 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
12872 restart register instead of $0.
12873
0e7f50da
UW
128742007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
12875 Markus Deuling <deuling@de.ibm.com>
12876
12877 * remote-utils.c (decode_xfer_write): New function.
12878 * server.h (decode_xfer_write): Add prototype.
12879 * server.c (handle_query): Add PACKET_LEN argument. Support
12880 qXfer:spu:read and qXfer:spu:write packets.
12881 (main): Pass packet_len to handle_query.
12882 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
12883 * target.h (target_ops): Add qxfer_spu.
12884
374c1d38
UW
128852007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
12886
12887 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
12888 accessing non-seekable spufs files.
12889
bb63802a
UW
128902007-05-16 Markus Deuling <deuling@de.ibm.com>
12891
889bf7c5 12892 * server.c (handle_query): Add reply for qC packet.
bb63802a 12893
7390519e
PA
128942007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12895 Leo Zayas <lerele@champenstudios@com>
12896
12897 * server.h (check_remote_input_interrupt_request): New function.
12898 * remote_utils.c (INVALID_DESCRIPTOR): New define.
12899 (remote_desc): Initialize with INVALID_DESCRIPTOR.
12900 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
12901 (check_remote_input_interrupt_request): New function.
12902 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 12903 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
12904 winapi_GenerateConsoleCtrlEvent): New typedefs.
12905 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
12906 to 250 ms.
12907 (win32_wait): Check for remote interrupt request
12908 with check_remote_input_interrupt_request.
12909 (win32_request_interrupt): New function.
12910 (win32_target_op): Set request_interrupt to win32_request_interrupt.
12911
34b34921
PA
129122007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12913
12914 * win32-low.c (debug_registers_changed,
12915 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
12916 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
12917 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
12918 (thread_rec): Get context using the low target.
12919 (child_add_thread): Call thread_added on the low target,
12920 which does the same thing.
12921 (regptr): Delete.
12922 (do_initial_child_stuff): Remove debug registers references.
12923 Set context using the low target. Resume threads after
12924 setting the contexts.
12925 (child_continue): Remove dead variable. Remove debug
12926 registers references.
12927 (child_fetch_inferior_registers): Go through the low target.
12928 (do_child_store_inferior_registers): Remove.
12929 (child_store_inferior_registers): Go through the low target.
12930 (win32_resume): Remove debug registers references.
12931 Set context using the low target.
12932 (handle_exception): Change return type to void. Don't record
12933 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
12934 first chance exception.
889bf7c5 12935 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
12936 goto loop. Always return after waiting for debug event.
12937 (win32_wait): Convert to switch statement. Handle spurious
12938 events.
12939
12940 * win32-i386-low.c (debug_registers_changed,
12941 debug_registers_used): New.
12942 (initial_stuff): Rename to ...
12943 (i386_initial_stuff): ... this. Clear debug registers
12944 state variables.
12945 (store_debug_registers): Delete.
12946 (i386_get_thread_context): New.
12947 (load_debug_registers): Delete.
12948 (i386_set_thread_context): New.
12949 (i386_thread_added): New.
12950 (single_step): Rename to ...
12951 (i386_single_step): ... this.
12952 (do_fetch_inferior_registers): Rename to ...
12953 (i386_fetch_inferior_register): ... this.
12954 (i386_store_inferior_register): New.
12955 (the_low_target): Adapt to new interface.
12956
12957 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
12958 (arm_get_thread_context): New.
12959 (arm_set_thread_context): New.
12960 (regptr): New.
12961 (do_fetch_inferior_registers): Rename to ...
12962 (arm_fetch_inferior_register): ... this.
12963 (arm_store_inferior_register): New.
12964 (arm_wince_breakpoint): Reimplement as unsigned long.
12965 (arm_wince_breakpoint_len): Define.
12966 (the_low_target): Adapt to new interface.
12967
12968 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
12969 load_debug_registers. Add get_thread_context, set_thread_context,
12970 thread_added and store_inferior_register. Rename
12971 fetch_inferior_registers to fetch_inferior_register.
12972 (regptr): Remove declaration.
12973
dd6953e1
PA
129742007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12975
12976 * linux-low.c (linux_detach): Change return type to int. Return 0.
12977 * spu-low.c (spu_detach): Likewise.
12978
444d6139
PA
129792007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12980
12981 * target.h (target_ops): Change return type of detach to int.
12982 Add join.
12983 (join_inferior): New.
12984 * server.c (main): Don't skip detach support on mingw32.
12985 If the inferior doesn't support detaching return error.
12986 Call join_inferior instead of using waitpid.
12987 * linux-low.c (linux_join): New.
12988 (linux_target_op): Add linux_join.
12989 * spu-low.c (spu_join): New.
12990 (spu_target_ops): Add spu_join.
12991 * win32-low.c (win32_detach): Adapt to new interface.
12992 Reopen current_process_handle before detaching. Issue a child
12993 resume before detaching.
12994 (win32_join): New.
12995 (win32_target_op): Add win32_join.
12996
1d5315fe
PA
129972007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12998
12999 * win32-low.c (win32-attach): Fix return value.
13000 * target.h (target_ops): Describe ATTACH return values.
13001
bf914831
PA
130022007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13003
13004 * win32-low.c (GETPROCADDRESS): Define.
13005 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
13006 (winapi_DebugSetProcessKillOnExit): Likewise.
13007 (win32_create_inferior): Force usage of ansi CreateProcessA.
13008 (win32_attach): Use GETPROCADDRESS.
13009 (win32_detach): Likewise.
13010
f72f3e60
PA
130112007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13012
13013 * win32-low.c (win32_wait): Don't use WSTOPSIG.
13014
ed50f18f
PA
130152007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
13016
13017 * win32-low.c: Commit leftover changes from 2007-03-29.
13018
0c2ead7e
DJ
130192007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13020
13021 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
13022 fields short instead of int. Add explicit padding.
13023 (i387_cache_to_fsave): Remove unnecessary casts.
13024 (i387_fsave_to_cache): Doc fix.
13025 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
13026
73725ff3
DJ
130272007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13028
13029 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
13030 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
13031
d99f33d8
PA
130322007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13033
13034 * configure.srv (arm*-*-mingw32ce*): Move near the other
13035 arm targets.
13036
68070c10
PA
130372007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13038
2482afc6 13039 * configure.ac: Add errno checking.
68070c10
PA
13040 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
13041 sys/file.h and malloc.h.
13042 (AC_CHECK_DECLS): Add perror.
13043 (srv_mingwce): Handle.
2482afc6 13044 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
13045 win32-i386-low.o to srv_tgtobj.
13046 (i[34567]86-*-mingw*): Likewise.
13047 (arm*-*-mingw32ce*): Add case.
13048 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13049 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
13050 [__MINGW32CE__] (strerror): New function.
13051 [__MINGW32CE__] (errno): Define to GetLastError.
13052 [__MINGW32CE__] (COUNTOF): New macro.
13053 (remote_open): Remove extra close call.
13054 * mem-break.c (delete_breakpoint_at): New function.
13055 * mem-break.h (delete_breakpoint_at): Declare.
13056 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13057 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
13058 [USE_WIN32API] (read, write): Add char* casts.
13059 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
13060 * server.h: Include wincecompat.h on Windows CE.
13061 [HAVE_ERRNO_H]: Check.
13062 (perror): Declare if not declared.
13063 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
13064 (perror_with_name): Remove errno declaration.
13065 * wincecompat.h: New.
13066 * wincecompat.c: New.
13067 * win32-low.h: New.
13068 * win32-arm-low.c: New.
13069 * win32-i386-low.c: New.
13070 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
13071 (OUTMSG2): Make it safe.
13072 (_T): New macro.
13073 (COUNTOF): New macro.
13074 (NUM_REGS): Get it from the low target.
13075 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
13076 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
13077 (thread_rec): Let low target handle debug registers.
13078 (child_add_thread): Likewise.
13079 (child_init_thread_list): Likewise.
13080 (continue_one_thread): Likewise.
13081 (regptr): New.
13082 (do_child_fetch_inferior_registers): Move to ...
13083 * win32-i386-low.c: ... here, and rename to ...
13084 (do_fetch_inferior_registers): ... this.
889bf7c5 13085 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
13086 Go through the low target.
13087 (do_child_store_inferior_registers): Use regptr.
13088 (strwinerror): New function.
13089 (win32_create_inferior): Handle Windows CE.
13090 Use strwinerror instead of strerror on Windows error
13091 codes. Add program to the error output.
13092 Don't close the main thread handle on Windows CE.
13093 (win32_attach): Use coredll.dll on Windows CE.
13094 (win32_kill): Close current process and current
13095 thread handles.
13096 (win32_detach): Use coredll.dll on Windows CE.
13097 (win32_resume): Let low target handle debug registers, and
13098 step request.
13099 (handle_exception): Add/Remove initial breakpoint. Avoid
13100 non-existant WSTOPSIG on Windows CE.
13101 (win32_read_inferior_memory): Cast to remove warning.
13102 (win32_arch_string): Go through the low target.
13103 (initialize_low): Call set_breakpoint_data with the low
13104 target's breakpoint.
13105 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
13106 FOP_REGNUM, mappings): Move to ...
13107 * win32-i386-low.c: ... here.
13108 * win32-low.c (win32_thread_info): Move to ...
13109 * win32-low.h: ... here.
13110 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
13111 win32-arm-low.c and wincecompat.c.
13112 (all:): Add $EXEEXT.
13113 (install-only:): Likewise.
13114 (gdbserver:): Likewise.
13115 (gdbreplay:): Likewise.
13116 * config.in: Regenerate.
13117 * configure: Regenerate.
13118
41093d81
PA
131192007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13120
13121 * win32-low.c: Rename typedef thread_info to
13122 win32_thread_info throughout.
13123
544afa54
PA
131242007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13125
13126 * win32-i386-low.c: Rename to ...
13127 * win32-low.c: ... this.
13128 * configure.srv: Replace win32-i386-low.o with win32-low.o.
13129 * Makefile.in: Likewise.
13130
bce7165d
PA
131312007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
13132
13133 * remote-utils.c (monitor_output): Constify msg parameter.
13134 * server.h (monitor_output): Likewise.
13135 * win32-i386-low.c (handle_output_debug_string): New.
13136 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
13137 handle_output_debug_string.
13138 (get_child_debug_event): Likewise.
13139
506c7aa0
DJ
131402007-03-27 Mat Hostetter <mat@lcs.mit.edu>
13141
13142 * server.c (main): Correct strtoul check.
13143
42c81e2a
DJ
131442007-03-27 Jon Ringle <jon@ringle.org>
13145
13146 * linux-low.c: Check __ARCH_HAS_MMU__ also.
13147
9453113a
DJ
131482007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
13149
13150 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
13151
64a69107
DJ
131522007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
13153
13154 * terminal.h: Check HAVE_SGTTY_H.
13155
131562007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
13157
13158 * remote-utils.c (remote_open): Print out the assigned port number.
13159
c74d0ad8
DJ
131602007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
13161
13162 * remote-utils.c (monitor_output): New function.
13163 * server.c (debug_threads): Define here.
13164 (monitor_show_help): New function.
13165 (handle_query): Handle qRcmd.
13166 (main): Do not handle 'd' packet.
13167 * server.h (debug_threads, remote_debug, monitor_output): Declare.
13168 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
13169 of debug_threads.
13170
de7c3b4a
PA
131712007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13172
13173 * Makefile.in (EXEEXT): New.
13174 (clean): Use $(EXEEXT).
13175
ef57601b
PA
131762007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13177
13178 * target.h (target_ops): Rename send_signal to request_interrupt,
13179 and remove enum target_signal parameter.
13180 * linux-low.c (linux_request_interrupt): Rename from
13181 linux_send_signal, and always send SIGINT.
13182 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
13183 and always send SIGINT.
13184 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
13185 of send_signal.
13186 (input_interrupt): Likewise.
13187
820f2bda
PA
131882007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13189
13190 * server.c (get_features_xml): Check if target implemented
13191 arch_string.
13192 * win32-i386-low.c (win32_arch_string): New.
13193 (win32_target_ops): Add win32_arch_string as arch_string member.
13194
ab39bf24
UW
131952007-02-22 Markus Deuling <deuling@de.ibm.com>
13196
13197 * spu-low.c (spu_arch_string): New.
13198 (spu_target_ops): Add spu_arch_string.
13199
61ff6e04
DJ
132002007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
13201
13202 * remote-utils.c: Remove HAVE_TERMINAL_H check.
13203 * configure.ac: Do not check for terminal.h.
13204 * configure, config.in: Regenerated.
13205
fb1e4ffc
DJ
132062007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13207
13208 * Makefile.in (OBS): Add $(XML_BUILTIN).
13209 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
13210 (clean): Update.
13211 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
13212 (arm-with-iwmmxt.c): New.
13213 * config.in, configure: Regenerate.
13214 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
13215 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
13216 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
13217 (arm*-*-linux*): Add iWMMXt and regset support.
13218 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
13219 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
13220 (arm_store_wmmxregset, target_regsets): New.
13221 * server.c (get_features_xml): Take annex argument. Check builtin
13222 XML documents.
13223 (handle_query): Handle multiple annexes.
13224
0f48aa01
DJ
132252007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13226
13227 * remote-utils.c [USE_WIN32API] (read, write): Define.
13228 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
13229 write.
13230
23181151
DJ
132312007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
13232
13233 * linux-i386-low.c (the_low_target): Set arch_string.
13234 * linux-x86-64-low.c (the_low_target): Likewise.
13235 * linux-low.c (linux_arch_string): New.
13236 (linux_target_ops): Add it.
13237 * linux-low.h (struct linux_target_ops): Add arch_string.
13238 * server.c (write_qxfer_response): Use const void * for DATA.
13239 (get_features_xml): New.
13240 (handle_query): Handle qXfer:features:read. Report it for qSupported.
13241 * target.h (struct target_ops): Add arch_string method.
13242
9d606399
DJ
132432007-01-03 Denis Pilat <denis.pilat@st.com>
13244 Daniel Jacobowitz <dan@codesourcery.com>
13245
13246 * linux-low.c (linux_kill): Handle being called with no threads.
13247 * win32-i386-low.c (win32_kill): Likewise.
13248 (get_child_debug_event): Clear current_process_handle.
13249
132502006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
13251 Daniel Jacobowitz <dan@codesourcery.com>
13252
13253 * remote-utils.c (remote_open): Check the type of specified
13254 serial port devices before opening them.
13255 * server.c (main): Kill the inferior if an error occurs during
13256 the first remote_open.
13257
a5e13d24
DJ
132582006-12-05 Markus Deuling <deuling@de.ibm.com>
13259
13260 * README: Update supported targets.
13261
186947f7
DJ
132622006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
13263
13264 * Makefile.in (clean): Remove reg-mips64.c.
13265 (reg-mips64.c, reg-mips64.o): New rules.
13266 * configure.srv: Handle mips64. Include regset support for mips.
13267 * linux-mips-low.c (union mips_register): New.
13268 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
13269 (mips_breakpoint, mips_breakpoint_at): Use int.
13270 (mips_collect_register, mips_supply_register)
13271 (mips_collect_register_32bit, mips_supply_register_32bit)
13272 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13273 (mips_store_fpregset, target_regsets): New.
13274 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
13275
a13e2c95
UW
132762006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
13277
13278 * configure.srv: Add target "spu*-*-*".
13279 * Makefile.in (clean): Remove reg-spu.c.
13280 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
13281 * spu-low.c: New file.
13282
cb7283db
DJ
132832006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13284
13285 * configure.ac: Correct td_thr_tls_get_addr test.
13286 * configure: Regenerated.
13287
89be2091
DJ
132882006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13289
13290 * linux-low.c (linux_wait_for_event): Reformat. Use the
13291 pass_signals array.
13292 * remote-utils.c (decode_address_to_semicolon): New.
13293 * server.c (pass_signals, handle_general_set): New.
13294 (handle_query): Mention QPassSignals for qSupported.
13295 (main): Call handle_general_set.
13296 * server.h (pass_signals, decode_address_to_semicolon): New.
13297
000ef4f0
DJ
132982006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
13299
13300 * server.c (handle_query): Correct error handling for read_auxv.
13301
b7149293
UW
133022005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
13303
13304 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
13305 and srv_linux_thread_db to yes.
13306 * linux-s390-low.c (s390_fill_gregset): New function.
13307 (target_regsets): Define data structure.
13308
dae5f5cf
DJ
133092006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
13310
13311 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
13312 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
13313 * config.in, configure: Regenerated.
13314 * inferiors.c (gdb_id_to_thread): New function.
13315 (gdb_id_to_thread_id): Use it.
13316 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
13317 * linux-low.h (struct process_info): Add th member.
13318 (thread_db_get_tls_address): New prototype.
13319 * remote-utils.c (decode_address): Make non-static.
13320 * server.c (handle_query): Handle qGetTLSAddr.
13321 * server.h (gdb_id_to_thread, decode_address): New prototypes.
13322 * target.h (struct target_ops): Add get_tls_address.
13323 * thread-db.c (maybe_attach_thread): Save the thread handle.
13324 (thread_db_get_tls_address): New.
13325
32ca6d61
DJ
133262006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
13327
13328 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
13329 (linux_resume_one_process): Take a siginfo_t *. Update all
13330 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
13331 (struct pending_signals): Add a siginfo_t.
13332 (linux_wait_for_process): Always set last_status.
13333 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
13334 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
13335 * linux-low.h (struct process_info): Add last_status.
13336
5ffff7c1
DJ
133372006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
13338
13339 * remote-utils.c (try_rle): New function.
13340 (putpkt_binary): Use it.
13341
8695c747
DJ
133422006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
13343
13344 * Makefile.in (clean): Clean reg-x86-64-linux.c.
13345 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
13346 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
13347 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
13348 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
13349 point registers.
13350
290fadea
RS
133512006-08-08 Richard Sandiford <richard@codesourcery.com>
13352
13353 * server.c (terminal_fd): New variable.
13354 (old_foreground_pgrp): Likewise.
13355 (restore_old_foreground_pgrp): New function.
13356 (start_inferior): Record the terminal file descriptor in terminal_fd
13357 and its original foreground group in old_foreground_pgrp. Register
13358 restore_old_foreground_pgrp with atexit().
13359
9f2e1e63
DJ
133602006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
13361
13362 * server.c (handle_query): Correct qPart to qXfer.
13363
b80864fb
DJ
133642006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
13365
13366 * configure.ac: Check for more headers which are missing on
13367 Windows. Automatically supply -lwsock32 and USE_WIN32API.
13368 * configure.srv: Add Cygwin and mingw32.
13369 * remote-utils.c: Don't include headers unconditionally which
13370 are missing on mingw32. Include <winsock.h> for mingw32.
13371 (remote_open): Adjust for mingw32 support. Flush
13372 standard error after writing to it.
13373 (remote_close, putpkt_binary, input_interrupt, block_async_io)
13374 (unblock_async_io, enable_async_io, disable_async_io)
13375 (readchar, getpkt): Update for Winsock support.
13376 (prepare_resume_reply): Expect a protocol signal number.
13377 * server.c: Disable <sys/wait.h> on mingw32.
13378 (start_inferior): Adjust for mingw32 support. Flush
13379 standard error after writing to it.
13380 (attach_inferior): Likewise. Use protocol signal
13381 numbers.
13382 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
13383 and names.
13384 * win32-i386-low.c: New file.
13385 * Makefile.in (XM_CLIBS): Set.
13386 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
13387 (win32-i386-low.o): New dependency rule.
13388 * linux-low.c (linux_wait): Use target signal numbers.
13389 * target.h (struct target_ops): Doc fix.
13390 * server.h (target_signal_to_name): New prototype.
13391 * gdbreplay.c: Don't include headers unconditionally which
13392 are missing on mingw32. Include <winsock.h> for mingw32.
13393 (remote_close, remote_open): Adjust for Winsock support.
13394 * configure, config.in: Regenerated.
13395
0876f84a
DJ
133962006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13397
13398 * server.c (decode_xfer_read, write_qxfer_response): New.
13399 (handle_query): Take a packet length argument. Handle
13400 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
13401 the qSupported response.
13402 (main): Update call to handle_query.
13403
01f9e8fa
DJ
134042006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
13405
13406 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
13407 (putpkt_binary): Renamed from putpkt and adjusted for binary
13408 data.
13409 (putpkt): New wrapper for putpkt_binary.
13410 (readchar): Don't mask off the high bit.
13411 (decode_X_packet): New function.
13412 * server.c (main): Call putpkt_binary if a handler sets the packet
13413 length. Save the length of the incoming packet. Handle 'X'.
13414 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
13415
be2a5f71
DJ
134162006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
13417
13418 * server.c (handle_query): Handle qSupported.
13419
ea025f5f
DJ
134202006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13421
13422 * remote-utils.c (all_symbols_looked_up): New variable.
13423 (look_up_one_symbol): Check it.
13424 * server.h (look_up_one_symbol): New declaration.
13425 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
13426
9308fc88
DJ
134272006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13428
13429 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 13430 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
13431 (PTRACE_GET_THREAD_AREA): Define.
13432 (ps_get_thread_area): New function.
13433
52fb6437
NS
134342006-05-09 Nathan Sidwell <nathan@codesourcery.com>
13435
13436 * configure.srv (m68k*-*-uclinux*): New target.
13437 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
13438 (linux_resume_one_process): Remove extraneous cast.
13439 (linux_read_offsets): New.
13440 (linux_target_op): Add linux_read_offsets on mmuless systems.
13441 * server.c (handle_query): Add qOffsets logic.
13442 * target.h (struct target_ops): Add read_offsets.
13443
21b0f40c
DJ
134442006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13445
13446 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
13447 (PTRACE_GET_THREAD_AREA): Define.
13448 (ps_get_thread_area): New function.
13449 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
13450 (linux-x86-64-low.o): Update.
13451
0050a760
DJ
134522006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13453
13454 * configure.ac: Remove checks for prfpregset_t.
13455 * gdb_proc_service.h: New file.
13456 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
13457 new "gdb_proc_service.h".
13458 * proc-service.c: Likewise.
13459 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
13460 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
13461 * Makefile.in (gdb_proc_service_h): Updated.
13462 * configure, config.in: Regenerated.
13463
b92a518e
DJ
134642006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13465
13466 * remote-utils.c (prepare_resume_reply): Move declaration
13467 of gdb_id_from_wait to the top of the block.
13468
545587ee
DJ
134692006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
13470
13471 * linux-low.c (regsets_store_inferior_registers): Read the regset
13472 from the target before filling it.
13473
9db87ebd
DJ
134742006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13475
13476 * server.c (attach_inferior): Return SIGTRAP for a successful
13477 attach.
13478
dd24457d
DJ
134792006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13480
13481 * Makefile.in (OBS): Add version.o.
13482 (STAGESTUFF): Delete.
13483 (version.o): Add dependencies.
13484 (version.c): Replace rule.
13485 (clean): Remove version.c.
13486 * server.c (gdbserver_version): New.
13487 (gdbserver_usage): Use printf.
13488 (main): Handle --version and --help.
13489 * server.h (version, host_name): Add declarations.
13490
6f0f660e
EZ
134912005-12-23 Eli Zaretskii <eliz@gnu.org>
13492
889bf7c5
PA
13493 * linux-arm-low.c:
13494 * linux-arm-low.c:
13495 * inferiors.c:
13496 * i387-fp.h:
13497 * i387-fp.c:
13498 * gdbreplay.c:
13499 * regcache.c:
13500 * proc-service.c:
13501 * mem-break.h:
13502 * mem-break.c:
13503 * linux-x86-64-low.c:
13504 * linux-sh-low.c:
13505 * linux-s390-low.c:
13506 * linux-ppc64-low.c:
13507 * linux-ppc-low.c:
13508 * linux-mips-low.c:
13509 * linux-m68k-low.c:
13510 * linux-m32r-low.c:
13511 * linux-low.h:
13512 * linux-low.c:
13513 * linux-ia64-low.c:
13514 * linux-i386-low.c:
13515 * linux-crisv32-low.c:
13516 * thread-db.c:
13517 * terminal.h:
13518 * target.h:
13519 * target.c:
13520 * server.h:
13521 * server.c:
13522 * remote-utils.c:
13523 * regcache.h:
13524 * utils.c:
13525 * Makefile.in:
13526 * configure.ac:
6f0f660e
EZ
13527 * gdbserver.1: Add (C) after Copyright. Update the FSF
13528 address.
13529
9d1fb177
DJ
135302005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
13531
13532 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
13533 (arm_breakpoint_at): Recognize both breakpoints.
13534 (the_low_target): Use the correct breakpoint instruction.
13535
011a70c2
DJ
135362005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
13537
13538 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
13539 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
13540 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
13541 (the_low_target): Update.
13542
7fb85e41
AS
135432005-10-25 Andreas Schwab <schwab@suse.de>
13544
13545 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
13546
13547 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
13548 (ia64_num_regs): Reduce to 462.
13549
3db0444b
DJ
135502005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
13551
13552 * acinclude.m4: Correct quoting.
13553 * aclocal.m4: Regenerated.
13554
13555 Suggested by SZOKOVACS Robert <szo@ies.hu>:
13556 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
13557 (thread_db_init): Call thread_db_err_str.
13558 * configure.ac: Check for TD_VERSION.
13559 * config.in, configure: Regenerated.
13560
bee0189a
DJ
135612005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13562
13563 * server.h (error, fatal, warning): Add ATTR_FORMAT.
13564
e9d25b98
DJ
135652005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13566
13567 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
13568 is not available. Define HAVE_PTRACE_GETREGS if it is.
13569 * config.in, configure: Regenerated.
13570 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
13571 * linux-i386-low.c, linux-m68k-low.c: Update to use
13572 HAVE_PTRACE_GETREGS.
13573 * linux-low.c (regsets_fetch_inferior_registers)
13574 (regsets_store_inferior_registers): Only return 0 if we processed
13575 GENERAL_REGS.
13576 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
13577 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
13578
a06660f7
DJ
135792005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13580
13581 * inferiors.c (struct thread_info): Add gdb_id.
13582 (add_thread): Add gdb_id argument.
13583 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
13584 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
13585 calls to add_thread.
13586 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
13587 * server.c (handle_query): Use thread_to_gdb_id.
13588 (handle_v_cont, main): Use gdb_id_to_thread_id.
13589 * server.h (add_thread): Update prototype.
13590 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
13591 prototypes.
13592
5a1f5858
DJ
135932005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13594
13595 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
13596 left-padded registers.
13597 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
13598 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
13599
e122f1f5
SE
136002005-07-01 Steve Ellcey <sje@cup.hp.com>
13601
13602 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
13603 * configure: Regenerate.
13604 * config.in: Regenerate.
13605 * server.h (NEED_DECLARATION_STRERROR):
13606 Replace with !HAVE_DECL_STRERROR.
13607
d592fa2f
DJ
136082005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
13609
13610 * linux-low.c (linux_wait, linux_send_signal): Don't test
13611 an unsigned long variable for > 0 if it could be MAX_ULONG.
13612 * server.c (myresume): Likewise.
13613 * target.c (set_desired_inferior): Likewise.
13614
ccbd4912
MK
136152005-06-13 Mark Kettenis <kettenis@gnu.org>
13616
13617 * configure.ac: Simplify and improve check for socklen_t.
13618 * configure, config.in: Regenerate.
13619
f450004a
DJ
136202005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
13621
13622 * acconfig.h: Remove.
13623 * configure.ac: Add a test for socklen_t. Use three-argument
13624 AC_DEFINE throughout.
13625 * config.in: Regenerated using autoheader 2.59.
13626 * configure: Regenerated.
13627
13628 * gdbreplay.c (socklen_t): Provide a default.
13629 (remote_open): Use socklen_t.
13630 * remote-utils.c (socklen_t): Provide a default.
13631 (remote_open): Use socklen_t.
13632 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
13633 unsigned char.
13634
13635 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
13636 char for buffers.
13637 * linux-low.c (linux_read_memory, linux_write_memory)
13638 (linux_read_auxv): Likewise.
13639 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
13640 (check_mem_write): Likewise.
13641 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
13642 Likewise.
13643 * regcache.c (struct inferior_rgcache_data, registers_to_string)
13644 (registers_from_string, register_data): Likewise.
13645 * server.c (handle_query, main): Likewise.
13646 * server.h (convert_ascii_to_int, convert_int_to_ascii)
13647 (decode_M_packet): Likewise.
13648 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
13649 * target.h (struct target_ops): Update read_memory, write_memory,
13650 and read_auxv.
13651 (read_inferior_memory, write_inferior_memory): Update.
13652 * linux-low.h (struct linux_target_ops): Change type of breakpoint
13653 to unsigned char *.
13654 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
13655 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
13656 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
13657 linux-s390-low.c, linux-sh-low.c: Update for changes in
13658 read_inferior_memory and the_low_target->breakpoint.
13659
eee84df1
DJ
136602005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
13661
13662 * Makefile.in (SFILES): Add linux-ppc64-low.c.
13663 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
13664 * configure.srv: Add powerpc64-*-linux*.
13665 * linux-ppc64-low.c: New file.
13666
45b134e5
OF
136672005-05-23 Orjan Friberg <orjanf@axis.com>
13668
13669 * linux-cris-low.c: New file with support for CRIS.
13670 * linux-crisv32-low.c: Ditto for CRISv32.
13671 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
13672 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 13673 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
13674 reg-crisv32.o, and reg-crisv32.c to make rules.
13675 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
13676 recognized targets.
13677
48d93c75
UW
136782005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
13679
13680 * linux-low.c (fetch_register): Ensure buffer size is a multiple
13681 of sizeof (PTRACE_XFER_TYPE).
13682 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
13683
e013ee27
OF
136842005-05-12 Orjan Friberg <orjanf@axis.com>
13685
889bf7c5 13686 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
13687 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
13688 pointers for hardware watchpoint support.
13689 * linux-low.h (struct linux_target_ops): Ditto.
13690 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
13691 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
13692 to linux_target_ops.
13693 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
13694 reply packet.
13695 * server.c (main): Recognize 'Z' and 'z' packets.
13696
b0ded00b
UW
136972005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
13698
13699 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
13700 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
13701 (the_low_target): Add new members.
13702
8643e2ad
DJ
137032005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13704
13705 * proc-service.c (ps_lgetregs): Search all_processes instead of
13706 all_threads.
13707
fc620387
DJ
137082005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13709
13710 * server.c (start_inferior): Change return type to int.
13711 (attach_inferior): Change sigptr to int *.
13712 (handle_v_cont, handle_v_requests): Change signal to int *.
13713 (main): Change signal to int.
13714
137152005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
13716
13717 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
13718 * configure.srv: Add m32r*-*-linux*.
13719 * linux-m32r-low.c: New file.
13720
e0e76420
DJ
137212005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
13722
13723 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
13724
a1928bad
DJ
137252005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13726
13727 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
13728 Take unsigned long arguments for PIDs.
13729 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
13730 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
13731 (wait_for_sigstop, linux_resume_one_process)
13732 (regsets_fetch_inferior_registers, linux_send_signal)
13733 (linux_read_auxv): Likewise. Update the types of variables holding
13734 PIDs. Update format string specifiers.
13735 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
13736 * remote-utils.c (prepare_resume_reply): Likewise.
13737 * server.c (cont_thread, general_thread, step_thread)
13738 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
13739 unsigned long.
13740 (handle_query): Update format specifiers.
13741 (handle_v_cont, main): Use strtoul for thread IDs.
13742 * server.h (struct inferior_list_entry): Use unsigned long for ID.
13743 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
13744 (general_thread, step_thread, thread_from_wait)
13745 (old_thread_from_wait): Update.
13746 * target.h (struct thread_resume): Use unsigned long for THREAD.
13747 (struct target_ops): Use unsigned long for arguments to attach and
13748 thread_alive.
13749
dcdb98d2
DJ
137502005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
13751
13752 * acinclude.m4: Include bfd/bfd.m4 directly.
13753 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
13754 <agriffis@toolchain.org>.
13755 * aclocal.m4, configure: Regenerated.
13756
bec39cab
AC
137572005-01-07 Andrew Cagney <cagney@gnu.org>
13758
13759 * configure.ac: Rename configure.in, require autoconf 2.59.
13760 * configure: Re-generate.
13761
434c4c77
DJ
137622004-12-08 Daniel Jacobowitz <dan@debian.org>
13763
13764 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
13765 LIBS when finished.
13766 * aclocal.m4: Regenerated.
13767 * configure: Regenerated.
13768
db1d3e1b
AS
137692004-11-21 Andreas Schwab <schwab@suse.de>
13770
13771 * linux-m68k-low.c (m68k_num_gregs): Define.
13772 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
13773 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
13774 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
13775 (m68k_breakpoint_at): New. Add to the_low_target.
13776
13777 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
13778 srv_linux_thread_db to yes.
13779
43360365
JB
137802004-10-20 Joel Brobecker <brobecker@gnat.com>
13781
13782 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
13783 (ARCH_SET_FS): Likewise.
13784 (ARCH_GET_FS): Likewise.
13785 (ARCH_GET_GS): Likewise.
13786
fd500816
DJ
137872004-10-16 Daniel Jacobowitz <dan@debian.org>
13788
13789 * linux-i386-low.c (ps_get_thread_area): New.
13790 * linux-x86-64-low.c (ps_get_thread_area): New.
13791 * linux-low.c: Include <sys/syscall.h>.
13792 (linux_kill_one_process): Don't kill the first thread here.
13793 (linux_kill): Kill the first thread here.
13794 (kill_lwp): New function.
13795 (send_sigstop, linux_send_signal): Use it.
13796 * proc-service.c: Clean up #ifdefs.
13797 (fpregset_info): Delete.
13798 (ps_lgetregs): Update and enable implementation.
13799 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
13800 implementations.
13801 * remote-utils.c (struct sym_cache, symbol_cache): New.
13802 (input_interrupt): Print a clearer message.
13803 (async_io_enabled): New variable.
13804 (enable_async_io, disable_async_io): Use it. Update comments.
13805 (look_up_one_symbol): Use the symbol cache.
13806 * thread-db.c (thread_db_look_up_symbols): New function.
13807 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
13808
f6de3c42
DJ
138092004-10-16 Daniel Jacobowitz <dan@debian.org>
13810
13811 * configure.in: Test for -rdynamic.
13812 * configure: Regenerated.
13813 * Makefile (INTERNAL_LDFLAGS): New.
13814 (gdbserver, gdbreplay): Use it.
13815
2c0fc042
AC
138162004-09-02 Andrew Cagney <cagney@gnu.org>
13817
13818 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
13819
075b3282
DJ
138202004-03-23 Daniel Jacobowitz <drow@mvista.com>
13821
13822 * linux-low.c (linux_wait): Clear all_processes list also.
13823
fa6a77dc
DJ
138242004-03-12 Daniel Jacobowitz <drow@mvista.com>
13825
13826 * linux-low.c: Include <errno.h>. Remove extern declaration of
13827 errno.
13828
6d782a97
DJ
138292004-03-12 Daniel Jacobowitz <drow@mvista.com>
13830
13831 * gdbreplay.c, server.h, utils.c: Update copyright years.
13832
3a7fb99b
DJ
138332004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
13834
13835 * server.c (main): Print child status or termination signal from
13836 variable 'signal', not 'sig'.
13837
c3e735a6
DJ
138382004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
13839
13840 * linux-low.c (linux_read_memory): Change return type to
13841 int. Check for and return error from ptrace().
13842 * target.c (read_inferior_memory): Change return type to int. Pass
13843 back return status from the_target->read_memory().
13844 * target.h (struct target_ops): Adapt *read_memory() prototype.
13845 Update comment.
13846 (read_inferior_memory): Adapt prototype.
13847 * server.c (main): Return an error packet if
13848 read_inferior_memory() returns an error.
13849
a59d1c82
DJ
138502004-03-04 Daniel Jacobowitz <drow@mvista.com>
13851
13852 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
13853 Unify with other clean targets.
13854
dc3f8883
DJ
138552004-02-29 Daniel Jacobowitz <drow@mvista.com>
13856
13857 * server.c (handle_v_cont): Call set_desired_inferior.
13858
89a208da
DJ
138592004-02-29 Daniel Jacobowitz <drow@mvista.com>
13860
13861 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
13862
62ea82f5
DJ
138632004-02-29 Daniel Jacobowitz <drow@mvista.com>
13864
13865 * linux-low.c (linux_wait): Unblock async I/O.
13866 (linux_resume): Block and enable async I/O.
13867 * remote-utils.c (block_async_io, unblock_async_io): New functions.
13868 * server.h (block_async_io, unblock_async_io): Add prototypes.
13869
6910d122
DJ
138702004-02-29 Daniel Jacobowitz <drow@mvista.com>
13871
13872 * remote-utils.c (remote_open): Print a status notice after
13873 opening a TCP port.
13874 * server.c (attach_inferior): Print a status notice after
13875 attaching.
13876
138772004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
13878
13879 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
13880
c89dc5d4
DJ
138812004-02-26 Daniel Jacobowitz <drow@mvista.com>
13882
13883 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
13884 error packet.
13885 * server.c, target.h: Update copyright years.
13886
4b8dad4a
RM
138872004-02-25 Roland McGrath <roland@redhat.com>
13888
13889 * target.h (struct target_ops): New member `read_auxv'.
13890 * server.c (handle_query): Handle qPart:auxv:read: query using that.
13891 * linux-low.c (linux_read_auxv): New function.
13892 (linux_target_ops): Initialize `read_auxv' member to that.
13893
d7446758
JB
138942004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
13895
13896 Committed by Jim Blandy <jimb@redhat.com>.
13897
13898 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 13899 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
13900 instead of GPR_SIZE to distiguish s390 and s390x targets.
13901
5544ad89
DJ
139022004-01-31 Daniel Jacobowitz <drow@mvista.com>
13903
13904 * linux-low.c: Update copyright year.
13905 (check_removed_breakpoint): Clear pending_is_breakpoint.
13906 (linux_set_resume_request, linux_queue_one_thread)
13907 (resume_status_pending_p): New functions.
13908 (linux_continue_one_thread): Use process->resume.
13909 (linux_resume): Only resume threads if there are no pending events.
13910 * linux-low.h (struct process_info): Add resume request
13911 pointer.
13912
2a68b70e
DJ
139132004-01-30 Daniel Jacobowitz <drow@mvista.com>
13914
13915 * regcache.c (new_register_cache): Clear the allocated register
13916 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
13917
64386c31
DJ
139182003-10-13 Daniel Jacobowitz <drow@mvista.com>
13919
13920 * linux-low.c (linux_resume): Take a struct thread_resume *
13921 argument.
13922 (linux_wait): Update call.
13923 (resume_ptr): New static variable.
13924 (linux_continue_one_thread): Renamed from
13925 linux_continue_one_process. Use resume_ptr.
13926 (linux_resume): Use linux_continue_one_thread.
13927 * server.c (handle_v_cont, handle_v_requests): New functions.
13928 (myresume): New function.
13929 (main): Handle 'v' case.
13930 * target.h (struct thread_resume): New type.
13931 (struct target_ops): Change argument of "resume" to struct
13932 thread_resume *.
13933 (myresume): Delete macro.
13934
c938e9b0
L
139352003-08-08 H.J. Lu <hongjiu.lu@intel.com>
13936
13937 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
13938 (uninstall): Support DESTDIR.
13939
7f313d07
BC
13940Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
13941
13942 * configure.srv: Add xscale*linux copy of arm*linux entry.
13943
3b2fc2ea
DJ
139442003-07-24 Daniel Jacobowitz <drow@mvista.com>
13945
13946 * linux-arm-low.c (arm_reinsert_addr): New function.
13947 (the_low_target): Add arm_reinsert_addr.
13948
1c0a559e
MK
139492003-07-08 Mark Kettenis <kettenis@gnu.org>
13950
13951 * mem-break.c: Remove whitespace at end of file.
13952
43d5792c
DJ
139532003-06-28 Daniel Jacobowitz <drow@mvista.com>
13954
13955 * configure.in: Check whether we need to prototype strerror.
13956 * server.h: Optionally prototype strerror.
13957 * gdbreplay.c (perror_with_name): Use strerror.
13958 * linux-low.c (linux_attach_lwp): Use strerror.
13959 * utils.c (perror_with_name): Use strerror.
13960 * config.in, configure: Regenerated.
13961
c8a86edf
DJ
139622003-06-28 Daniel Jacobowitz <drow@mvista.com>
13963
13964 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
13965 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
13966
73d37363
DJ
139672003-06-20 Daniel Jacobowitz <drow@mvista.com>
13968
13969 * Makefile.in (SFILES): Update.
13970 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
13971 low-sun3.c: Remove files.
13972
6ad8ae5c
DJ
139732003-06-17 Daniel Jacobowitz <drow@mvista.com>
13974
13975 * linux-low.c: Move comment to linux_thread_alive where it belonged.
13976 (linux_detach_one_process, linux_detach): New functions.
13977 (linux_target_ops): Add linux_detach.
13978 * server.c (main): Handle 'D' packet.
13979 * target.h (struct target_ops): Add "detach" member.
13980 (detach_inferior): Define.
13981
1581182a
MK
139822003-06-13 Mark Kettenis <kettenis@gnu.org>
13983
13984 From Kelley Cook <kelleycook@wideopenwest.com>:
13985 * configure.srv: Accept i[34567]86 variants.
13986
e5379b03
DJ
139872003-06-05 Daniel Jacobowitz <drow@mvista.com>
13988
13989 * linux-low.c (linux_wait_for_event): Correct comment typos.
13990 (linux_resume_one_process): Call check_removed_breakpoint.
13991 (linux_send_signal): New function.
13992 (linux_target_ops): Add linux_send_signal.
13993 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
13994 of kill.
13995 * target.h (struct target_ops): Add send_signal.
13996
2ff29de4
JB
139972003-05-29 Jim Blandy <jimb@redhat.com>
13998
13999 * linux-low.c (usr_store_inferior_registers): Transfer buf in
14000 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
14001 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
14002 away part of the register's value.
14003
254787d4
DJ
140042003-03-26 Daniel Jacobowitz <drow@mvista.com>
14005
14006 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
14007 (linux_wait_for_event, linux_init_signals): Likewise.
14008
94e10508
DJ
140092003-03-17 Daniel Jacobowitz <drow@mvista.com>
14010
14011 * configure.in: Check for stdlib.h.
14012 * configure: Regenerated.
14013 * config.in: Regenerated.
14014
4c0711e0
DJ
140152003-01-04 Andreas Schwab <schwab@suse.de>
14016
14017 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
14018
ef66e766
AC
140192003-01-02 Andrew Cagney <ac131313@redhat.com>
14020
14021 * Makefile.in: Remove obsolete code.
14022
a1358604
DJ
140232002-11-20 Daniel Jacobowitz <drow@mvista.com>
14024
14025 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
14026 defined(PT_FPR0_HI).
14027
23ce3b1c
DJ
140282002-11-17 Stuart Hughes <seh@zee2.com>
14029
14030 * linux-arm-low.c (arm_num_regs): Increase.
14031 (arm_regmap): Include status register.
14032
140332002-11-17 Daniel Jacobowitz <drow@mvista.com>
14034
14035 * linux-low.c (register_addr): Remove incorrect -1 check.
14036
a9fa9f7d
DJ
140372002-08-29 Daniel Jacobowitz <drow@mvista.com>
14038
14039 * linux-low.c (linux_create_inferior): Call setpgid. Return
14040 the new PID.
14041 (unstopped_p, linux_signal_pid): Remove.
14042 (linux_target_ops): Remove linux_signal_pid.
14043 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
14044 global instead of target method.
14045 * target.h (struct target_ops): Remove signal_pid. Update comment
14046 for create_inferior.
14047 * server.c (signal_pid): New variable.
14048 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 14049 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
14050 (attach_inferior): Set signal_pid.
14051
17574093
DJ
140522002-08-23 Daniel Jacobowitz <drow@mvista.com>
14053
14054 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
14055
140562002-08-20 Jim Blandy <jimb@redhat.com>
14057
14058 * Makefile.in (LDFLAGS): Allow the configure script to establish a
14059 default for this.
14060
140612002-08-01 Andrew Cagney <cagney@redhat.com>
14062
14063 * Makefile.in: Make chill references obsolete.
14064
140652002-07-24 Kevin Buettner <kevinb@redhat.com>
14066
14067 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
14068 * configure: Regenerate.
14069 * config.in: Regenerate.
14070
140712002-07-09 David O'Brien <obrien@FreeBSD.org>
14072
14073 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
14074 (perror_with_name, remote_close, remote_open, expect, play): Static.
14075
140762002-07-04 Michal Ludvig <mludvig@suse.cz>
14077
4b8dad4a 14078 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
14079 byte offsets instead of an array of indexes.
14080 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
14081
140822002-06-13 Daniel Jacobowitz <drow@mvista.com>
14083
14084 * regcache.c: Add comment.
14085
140862002-06-11 Daniel Jacobowitz <drow@mvista.com>
14087
14088 * thread-db.c: New file.
14089 * proc-service.c: New file.
14090 * acinclude.m4: New file.
14091 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
14092 proc-service.o, and thread-db.o.
14093 (linux-low.o): Add USE_THREAD_DB.
14094 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
14095 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
14096 * aclocal.m4: Regenerated.
14097 * config.in: Regenerated.
14098 * configure: Regenerated.
14099 * configure.in: Check for proc_service.h, sys/procfs.h,
14100 thread_db.h, and linux/elf.h headrs.
14101 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
14102 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
14103 Check for -lthread_db and thread support.
14104 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
14105 PowerPC, and SuperH.
14106 * i387-fp.c: Constify arguments.
14107 * i387-fp.h: Likewise.
14108 * inferiors.c: (struct thread_info): Renamed from
14109 `struct inferior_info'. Remove PID member. Use generic inferior
14110 list header. All uses updated.
14111 (inferiors, signal_pid): Removed.
14112 (all_threads): New variable.
14113 (get_thread): Define.
14114 (add_inferior_to_list): New function.
14115 (for_each_inferior): New function.
14116 (change_inferior_id): New function.
14117 (add_inferior): Removed.
14118 (remove_inferior): New function.
14119 (add_thread): New function.
14120 (free_one_thread): New function.
14121 (remove_thread): New function.
14122 (clear_inferiors): Use for_each_inferior and free_one_thread.
14123 (find_inferior): New function.
14124 (find_inferior_id): New function.
14125 (inferior_target_data): Update argument type.
14126 (set_inferior_target_data): Likewise.
14127 (inferior_regcache_data): Likewise.
14128 (set_inferior_regcache_data): Likewise.
14129 * linux-low.c (linux_bp_reinsert): Remove.
14130 (all_processes, stopping_threads, using_thrads)
14131 (struct pending_signals, debug_threads, pid_of): New.
14132 (inferior_pid): Replace with macro.
14133 (struct inferior_linux_data): Remove.
14134 (get_stop_pc, add_process): New functions.
14135 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
14136 Use add_process and add_thread.
14137 (linux_attach_lwp): New function, based on old linux_attach. Use
14138 add_process and add_thread. Set stop_expected for new threads.
14139 (linux_attach): New function.
14140 (linux_kill_one_process): New function.
14141 (linux_kill): Kill all LWPs.
14142 (linux_thread_alive): Use find_inferior_id.
14143 (check_removed_breakpoints, status_pending_p): New functions.
14144 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
14145 Update. Use WNOHANG. Wait for cloned processes also. Update process
14146 struct for the found process.
14147 (linux_wait_for_event): New function.
14148 (linux_wait): Use it. Support LWPs.
14149 (send_sigstop, wait_for_sigstop, stop_all_processes)
14150 (linux_resume_one_process, linux_continue_one_process): New functions.
14151 (linux_resume): Support LWPs.
14152 (REGISTER_RAW_SIZE): Remove.
14153 (fetch_register): Use register_size instead. Call supply_register.
14154 (usr_store_inferior_registers): Likewise. Call collect_register.
14155 Fix recursive case.
14156 (regsets_fetch_inferior_registers): Improve error message.
14157 (regsets_store_inferior_registers): Add debugging.
14158 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
14159 (unstopped_p, linux_signal_pid): New functions.
14160 (linux_target_ops): Add linux_signal_pid.
14161 (linux_init_signals): New function.
14162 (initialize_low): Call it. Initialize using_threads.
14163 * regcache.c (inferior_regcache_data): Add valid
14164 flag.
14165 (get_regcache): Fetch registers lazily. Add fetch argument
14166 and update all callers.
14167 (regcache_invalidate_one, regcache_invalidate): New
14168 functions.
14169 (new_register_cache): Renamed from create_register_cache.
14170 Return the new regcache.
14171 (free_register_cache): Change argument to a void *.
14172 (registers_to_string, registers_from_string): Call get_regcache
14173 with fetch flag set.
14174 (register_data): Make static. Pass fetch flag to get_regcache.
14175 (supply_register): Call get_regcache with fetch flag clear.
14176 (collect_register): Call get_regcache with fetch flag set.
14177 (collect_register_as_string): New function.
14178 * regcache.h: Update.
14179 * remote-utils.c (putpkt): Flush after debug output and use
14180 stderr.
14181 Handle input interrupts while waiting for an ACK.
14182 (input_interrupt): Use signal_pid method.
14183 (getpkt): Flush after debug output and use stderr.
14184 (outreg): Use collect_register_as_string.
14185 (new_thread_notify, dead_thread_notify): New functions.
14186 (prepare_resume_reply): Check using_threads. Set thread_from_wait
14187 and general_thread.
14188 (look_up_one_symbol): Flush after debug output.
14189 * server.c (step_thread, server_waiting): New variables.
14190 (start_inferior): Don't use signal_pid. Update call to mywait.
14191 (attach_inferior): Update call to mywait.
14192 (handle_query): Handle qfThreadInfo and qsThreadInfo.
14193 (main): Don't fetch/store registers explicitly. Use
14194 set_desired_inferior. Support proposed ``Hs'' packet. Update
14195 calls to mywait.
14196 * server.h: Update.
14197 (struct inferior_list, struct_inferior_list_entry): New.
14198 * target.c (set_desired_inferior): New.
14199 (write_inferior_memory): Constify.
14200 (mywait): New function.
14201 * target.h: Update.
14202 (struct target_ops): New signal_pid method.
14203 (mywait): Removed macro, added prototype.
14204
14205 * linux-low.h (regset_func): Removed.
14206 (regset_fill_func, regset_store_func): New.
14207 (enum regset_type): New.
14208 (struct regset_info): Add type field. Use new operation types.
14209 (struct linux_target_ops): stop_pc renamed to get_pc.
14210 Add decr_pc_after_break and breakpoint_at.
14211 (get_process, get_thread_proess, get_process_thread)
14212 (strut process_info, all_processes, linux_attach_lwp)
14213 (thread_db_init): New.
14214
14215 * linux-arm-low.c (arm_get_pc, arm_set_pc,
14216 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
14217 (the_low_target): Add new members.
14218 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
14219 (i386_store_fpxregset): Constify.
14220 (target_regsets): Add new kind identifier.
14221 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
14222 (i386_set_pc): Add debugging.
14223 (i386_breakpoint_at): New function.
14224 (the_low_target): Add new members.
14225 * linux-mips-low.c (mips_get_pc, mips_set_pc)
14226 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
14227 (mips_breakpoint_at): New.
14228 (the_low_target): Add new members.
14229 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
14230 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
14231 (the_low_target): Add new members.
14232 * linux-sh-low.c (sh_get_pc, sh_set_pc)
14233 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
14234 (the_low_target): Add new members.
14235 * linux-x86-64-low.c (target_regsets): Add new kind
14236 identifier.
14237
142382002-05-15 Daniel Jacobowitz <drow@mvista.com>
14239
14240 From Martin Pool <mbp@samba.org>:
14241 * server.c (gdbserver_usage): New function.
14242 (main): Call it.
14243
142442002-05-14 Daniel Jacobowitz <drow@mvista.com>
14245
14246 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
14247 stop_at -> stop_pc.
14248
142492002-05-04 Andrew Cagney <ac131313@redhat.com>
14250
14251 * Makefile.in: Remove obsolete code.
14252
142532002-04-24 Michal Ludvig <mludvig@suse.cz>
14254
14255 * linux-low.c (regsets_fetch_inferior_registers),
14256 (regsets_store_inferior_registers): Removed cast to int from
14257 ptrace() calls.
14258 * regcache.h: Added declaration of struct inferior_info.
14259
142602002-04-20 Daniel Jacobowitz <drow@mvista.com>
14261
14262 * inferiors.c (struct inferior_info): Add regcache_data.
14263 (add_inferior): Call create_register_cache.
14264 (clear_inferiors): Call free_register_cache.
14265 (inferior_regcache_data, set_inferior_regcache_data): New functions.
14266 * regcache.c (struct inferior_regcache_data): New.
14267 (registers): Remove.
14268 (get_regcache): New function.
14269 (create_register_cache, free_register_cache): New functions.
14270 (set_register_cache): Don't initialize the register cache here.
14271 (registers_to_string, registers_from_string, register_data): Call
14272 get_regcache.
14273 * regcache.h: Add prototypes.
14274 * server.h: Likewise.
14275
142762002-04-20 Daniel Jacobowitz <drow@mvista.com>
14277
14278 * mem-break.c: New file.
14279 * mem-break.h: New file.
14280 * Makefile.in: Add mem-break.o rule; update server.h
14281 dependencies.
14282 * inferiors.c (struct inferior_info): Add target_data
14283 member.
14284 (clear_inferiors): Free target_data member if set.
14285 (inferior_target_data, set_inferior_target_data): New functions.
14286 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
14287 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
14288 * linux-low.c (linux_bp_reinsert): New variable.
14289 (struct inferior_linux_data): New.
14290 (linux_create_inferior): Use set_inferior_target_data.
14291 (linux_attach): Likewise. Call add_inferior.
14292 (linux_wait_for_one_inferior): New function.
14293 (linux_wait): Call it.
14294 (linux_write_memory): Add const.
14295 (initialize_low): Call set_breakpoint_data.
14296 * linux-low.h (struct linux_target_ops): Add breakpoint
14297 handling members.
14298 * server.c (attach_inferior): Remove extra add_inferior
14299 call.
14300 * server.h: Include mem-break.h. Update inferior.c
14301 prototypes.
14302 * target.c (read_inferior_memory)
14303 (write_inferior_memory): New functions.
14304 * target.h (read_inferior_memory)
14305 (write_inferior_memory): Change macros to prototypes.
14306 (struct target_ops): Update comments. Add const to write_memory
14307 definition.
14308
143092002-04-11 Daniel Jacobowitz <drow@mvista.com>
14310
14311 * linux-low.c (usr_store_inferior_registers): Support
14312 registers which are allowed to fail to store.
14313 * linux-low.h (linux_target_ops): Likewise.
14314 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
14315 (ppc_cannot_store_register): FPSCR may not be storable.
14316
143172002-04-09 Daniel Jacobowitz <drow@mvista.com>
14318
14319 * server.h: Include <string.h> if HAVE_STRING_H.
14320 * ChangeLog: Correct paths in last ChangeLog entry.
14321
143222002-04-09 Daniel Jacobowitz <drow@mvista.com>
14323
14324 * linux-low.h: Remove obsolete prototypes.
14325 (struct linux_target_ops): New.
14326 (extern the_low_target): New.
14327 * linux-low.c (num_regs, regmap): Remove declarations.
14328 (register_addr): Use the_low_target explicitly.
14329 (fetch_register): Likewise.
14330 (usr_fetch_inferior_registers): Likewise.
14331 (usr_store_inferior_registers): Likewise.
14332 * linux-arm-low.c (num_regs): Remove.
14333 (arm_num_regs): Define.
14334 (arm_regmap): Renamed from regmap, made static.
14335 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
14336 made static.
14337 (arm_cannot_store_register): Renamed from cannot_store_register,
14338 made static.
14339 (the_low_target): New.
14340 * linux-i386-low.c (num_regs): Remove.
14341 (i386_num_regs): Define.
14342 (i386_regmap): Renamed from regmap, made static.
14343 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
14344 made static.
14345 (i386_cannot_store_register): Renamed from cannot_store_register,
14346 made static.
14347 (the_low_target): New.
14348 * linux-ia64-low.c (num_regs): Remove.
14349 (ia64_num_regs): Define.
14350 (ia64_regmap): Renamed from regmap, made static.
14351 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
14352 made static.
14353 (ia64_cannot_store_register): Renamed from cannot_store_register,
14354 made static.
14355 (the_low_target): New.
14356 * linux-m68k-low.c (num_regs): Remove.
14357 (m68k_num_regs): Define.
14358 (m68k_regmap): Renamed from regmap, made static.
14359 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
14360 made static.
14361 (m68k_cannot_store_register): Renamed from cannot_store_register,
14362 made static.
14363 (the_low_target): New.
14364 * linux-mips-low.c (num_regs): Remove.
14365 (mips_num_regs): Define.
14366 (mips_regmap): Renamed from regmap, made static.
14367 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
14368 made static.
14369 (mips_cannot_store_register): Renamed from cannot_store_register,
14370 made static.
14371 (the_low_target): New.
14372 * linux-ppc-low.c (num_regs): Remove.
14373 (ppc_num_regs): Define.
14374 (ppc_regmap): Renamed from regmap, made static.
14375 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
14376 made static.
14377 (ppc_cannot_store_register): Renamed from cannot_store_register,
14378 made static.
14379 (the_low_target): New.
14380 * linux-s390-low.c (num_regs): Remove.
14381 (s390_num_regs): Define.
14382 (s390_regmap): Renamed from regmap, made static.
14383 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
14384 made static.
14385 (s390_cannot_store_register): Renamed from cannot_store_register,
14386 made static.
14387 (the_low_target): New.
14388 * linux-sh-low.c (num_regs): Remove.
14389 (sh_num_regs): Define.
14390 (sh_regmap): Renamed from regmap, made static.
14391 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
14392 made static.
14393 (sh_cannot_store_register): Renamed from cannot_store_register,
14394 made static.
14395 (the_low_target): New.
14396 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
14397 (the_low_target): New.
14398
143992002-04-09 Daniel Jacobowitz <drow@mvista.com>
14400
14401 * Makefile.in: Add stamp-h target.
14402 * configure.in: Create stamp-h.
14403 * configure: Regenerated.
14404
144052002-04-09 Daniel Jacobowitz <drow@mvista.com>
14406
14407 * inferiors.c: New file.
14408 * target.c: New file.
14409 * target.h: New file.
14410 * Makefile.in: Add target.o and inferiors.o. Update
14411 dependencies.
14412 * linux-low.c (inferior_pid): New static variable,
14413 moved from server.c.
14414 (linux_create_inferior): Renamed from create_inferior.
14415 Call add_inferior. Return 0 on success instead of a PID.
14416 (linux_attach): Renamed from myattach.
14417 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
14418 (linux_thread_alive): Renamed from mythread_alive.
14419 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
14420 child dies.
14421 (linux_resume): Renamed from myresume. Add missing ``return 0''.
14422 (regsets_store_inferior_registers): Correct error message.
14423 Add missing ``return 0''.
14424 (linux_fetch_registers): Renamed from fetch_inferior_registers.
14425 (linux_store_registers): Renamed from store_inferior_registers.
14426 (linux_read_memory): Renamed from read_inferior_memory.
14427 (linux_write_memory): Renamed from write_inferior_memory.
14428 (linux_target_ops): New structure.
14429 (initialize_low): Call set_target_ops ().
14430 * remote-utils.c (unhexify): New function.
14431 (hexify): New function.
14432 (input_interrupt): Send signals to ``signal_pid''.
14433 * server.c (inferior_pid): Remove.
14434 (start_inferior): Update create_inferior call.
14435 (attach_inferior): Call add_inferior.
14436 (handle_query): New function.
14437 (main): Call handle_query for `q' packets.
14438 * server.h: Include "target.h". Remove obsolete prototypes.
14439 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
14440
144412002-04-09 Daniel Jacobowitz <drow@mvista.com>
14442
14443 * Makefile.in: Add WARN_CFLAGS. Update configury
14444 dependencies.
14445 * configure.in: Check for <string.h>
14446 * configure: Regenerate.
14447 * config.in: Regenerate.
14448 * gdbreplay.c: Include needed system headers.
14449 (remote_open): Remove strchr prototype.
14450 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
14451 * regcache.c (supply_register): Change buf argument to const void *.
14452 (supply_register_by_name): Likewise.
14453 (collect_register): Change buf argument to void *.
14454 (collect_register_by_name): Likewise.
14455 * regcache.h: Add missing prototypes.
14456 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
14457 * server.c (handle_query): New function.
14458 (attached): New static variable, moved out of main.
14459 (main): Quiet longjmp clobber warnings.
14460 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
14461 * utils.c (error): Remove NORETURN.
14462 (fatal): Likewise.
This page took 2.505486 seconds and 4 git commands to generate.