Update and add .gitignore's
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
74172ecf
SM
12016-09-21 Simon Marchi <simon.marchi@ericsson.com>
2
3 * .gitinore: Ignore more files.
4
fc6cda2e
YQ
52016-09-21 Yao Qi <yao.qi@linaro.org>
6
7 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
8 23.
9
bc1e6c81
SDJ
102016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
11
12 * server.c (start_inferior): Call target_mourn_inferior instead of
13 mourn_inferior; pass ptid_t argument to it.
14 (resume): Likewise.
15 (handle_target_event): Likewise.
16 * target.c (target_mourn_inferior): New function.
17 * target.h (mourn_inferior): Delete macro.
18
0e00e962
AA
192016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
20
21 * linux-low.c (lwp_is_stepping): New function.
22
1d8cb77d
CL
232016-09-06 Carl Love <cel@us.ibm.com>
24
25 * server.c (start_inferior): Fixed comment, requested comment change
26 didn't get updated correctly. Removed reference to ptrace () call as
27 it is only true on Linux systems.
28
7313bced
CL
292016-09-06 Carl Love <cel@us.ibm.com>
30
31 * server.c (start_inferior): Do not call
32 function target_post_create_inferior () if the
33 inferior process has already exited.
34
cf6de44d
PA
352016-09-05 Pedro Alves <palves@redhat.com>
36
37 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
38 (COMPILE.pre, CC_LD): Use CXX directly.
39 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
40 * acinclude.m4: Don't include build-with-cxx.m4.
41 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
42 * configure: Regenerate.
43
c1da6748
AT
442016-09-02 Akash Trehan <akash.trehan123@gmail.com>
45
46 PR gdb/19495
47 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
48 call writing data to own_buf.
49
f2b9e3df
SDJ
502016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
51
52 * target.c (mywait): Call target_wait instead of
53 the_target->wait.
54 (target_wait): New function.
55
049a8570
SDJ
562016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
57
58 * server.c (start_inferior): New variable 'ptid'. Replace calls
59 to the_target->resume by target_continue{,_no_signal}, depending
60 on the case.
61 * target.c (target_stop_and_wait): Call target_continue_no_signal
62 instead of the_target->resume.
63 (target_continue): New function.
64
3aa5cfa0
AT
652016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
66
67 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
68
754653a7
AZ
692016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
70
71 PR server/20491
72 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
73 ps_prochandle.
74 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
75 * linux-arm-low.c (ps_get_thread_area): Likewise.
76 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
77 * linux-m68k-low.c (ps_get_thread_area): Likewise.
78 * linux-mips-low.c (ps_get_thread_area): Likewise.
79 * linux-nios2-low.c (ps_get_thread_area): Likewise.
80 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
81 * linux-x86-low.c (ps_get_thread_area): Likewise.
82 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
83
ed036b40
PA
842016-08-19 Pedro Alves <palves@redhat.com>
85
86 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
87
c8ef42ee
PA
882016-08-19 Pedro Alves <palves@redhat.com>
89
90 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
91 comment. Use memcpy instead of casting through unsigned long.
92
9c235a72
PA
932016-08-19 Pedro Alves <palves@redhat.com>
94
95 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
96 allocating around 0x80000000.
97
201506da
PA
982016-08-19 Pedro Alves <palves@redhat.com>
99
100 PR gdb/20415
101 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
102 (x32-avx512-linux-ipa.o): New rules.
103 * configure.ac (x86_64-*-linux*): New x32 check.
104 * configure.srv (ipa_x32_linux_regobj): New.
105 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
106 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
107 descriptions.
108 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
109 descriptions.
110 * configure: Regenerate.
111
f348d89a
PA
1122016-08-09 Pedro Alves <palves@redhat.com>
113
114 PR gdb/18653
115 * Makefile.in (OBS): Add signals-state-save-restore.o.
116 (signals-state-save-restore.o): New rule.
117 * config.in: Regenerate.
118 * configure: Regenerate.
119 * linux-low.c: Include "signals-state-save-restore.h".
120 (linux_create_inferior): Call
121 restore_original_signals_state.
122 * server.c: Include "dispositions-save-restore.h".
123 (captured_main): Call save_original_signals_state.
124
1baf5149
PA
1252016-08-05 Pedro Alves <palves@redhat.com>
126
127 * configure: Regenerate.
128
fcd4a73d
YQ
1292016-08-04 Yao Qi <yao.qi@linaro.org>
130
131 * linux-low.c (regsets_fetch_inferior_registers): Check
132 errno is ESRCH or not.
133
979659d0
YQ
1342016-08-02 Yao Qi <yao.qi@linaro.org>
135
136 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
137 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
138 (thread_db_load_search): Update.
139 (try_thread_db_load_1): Don't look for td_ta_event_addr,
140 td_ta_set_event and td_ta_event_getmsg.
141
6598661d
PA
1422016-07-26 Pedro Alves <palves@redhat.com>
143
144 PR server/20414
145 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
146 of unsigned long for 64-bit registers and use uint32_t instead of
147 unsigned int for 32-bit registers.
148
9cf12d57
PA
1492016-07-26 Pedro Alves <palves@redhat.com>
150
151 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
152 to 'ptrace'.
153
305450ed
TT
1542016-07-21 Tom Tromey <tom@tromey.com>
155
156 * configure: Rebuild.
157
2583da7c
YQ
1582016-07-21 Yao Qi <yao.qi@linaro.org>
159
160 * mem-break.c (find_gdb_breakpoint): Cast bp to
161 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
162
21536b36
YQ
1632016-07-21 Yao Qi <yao.qi@linaro.org>
164
165 * server.c (handle_v_requests): Support s and S actions
166 if target_supports_software_single_step return true.
167
8901d193
YQ
1682016-07-21 Yao Qi <yao.qi@linaro.org>
169
170 * linux-low.c (resume_stopped_resumed_lwps): If resume request
171 is resume_step, call maybe_hw_step.
172 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
173 and unstop them.
174 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
175 breakpoints or not.
176 (proceed_one_lwp): If resume request is resume_step, install
177 reinsert breakpoints and call maybe_hw_step.
178
0e9a339e
YQ
1792016-07-21 Yao Qi <yao.qi@linaro.org>
180
181 * linux-low.c (proceed_one_lwp): Declare.
182 (linux_resume_one_thread): Remove local variable 'step'.
183 Lift code enqueue signal. Call proceed_one_lwp instead of
184 linux_resume_one_lwp.
185
4281b351
YQ
1862016-07-21 Yao Qi <yao.qi@linaro.org>
187
188 * linux-low.c (linux_resume_one_thread): Call
189 enqueue_pending_signal.
190
984a2c04
YQ
1912016-07-21 Yao Qi <yao.qi@linaro.org>
192
193 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
194 * inferiors.c (do_restore_current_thread_cleanup): New function.
195 (make_cleanup_restore_current_thread): Likewise.
196 * linux-low.c (install_software_single_step_breakpoints): Call
197 make_cleanup_restore_current_thread. Switch current_thread to
198 thread.
199
bec903c9
YQ
2002016-07-21 Yao Qi <yao.qi@linaro.org>
201
202 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
203 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
204 (clone_one_breakpoint): Likewise.
205 (delete_reinsert_breakpoints): Change parameter to thread.
206 Callers updated.
207 (has_reinsert_breakpoints): Likewise.
208 (uninsert_reinsert_breakpoints): Likewise.
209 (reinsert_reinsert_breakpoints): Likewise.
210 * mem-break.h (set_reinsert_breakpoint): Update declaration.
211 (delete_reinsert_breakpoints): Likewise.
212 (reinsert_reinsert_breakpoints): Likewise.
213 (uninsert_reinsert_breakpoints): Likewise.
214 (has_reinsert_breakpoints): Likewise.
215
63c40ec7
YQ
2162016-07-21 Yao Qi <yao.qi@linaro.org>
217
218 * inferiors.c (get_thread_process): Make parameter const.
219 * inferiors.h (get_thread_process): Update declaration.
220 * mem-break.c (clone_all_breakpoints): Remove all parameters.
221 Add new parameters child_thread and parent_thread. Callers
222 updated.
223 * mem-break.h (clone_all_breakpoints): Update declaration.
224
9aa76cd0
YQ
2252016-07-21 Yao Qi <yao.qi@linaro.org>
226
227 * mem-break.c (struct breakpoint) <cond_list>: Remove.
228 <command_list, handler>: Remove.
229 (struct gdb_breakpoint): New.
230 (struct other_breakpoint): New.
231 (struct reinsert_breakpoint): New.
232 (is_gdb_breakpoint): New function.
233 (any_persistent_commands): Update command_list if
234 is_gdb_breakpoint returns true.
235 (set_breakpoint): Create breakpoints according to their types.
236 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
237 (set_gdb_breakpoint_1): Likewise.
238 (set_gdb_breakpoint): Likewise.
239 (clear_breakpoint_conditions): Change parameter type to
240 'struct gdb_breakpoint *'.
241 (clear_breakpoint_commands): Likewise.
242 (clear_breakpoint_conditions_and_commands): Likewise.
243 (add_condition_to_breakpoint): Likewise.
244 (add_breakpoint_condition): Likewise.
245 (add_commands_to_breakpoint): Likewise.
246 (check_breakpoints): Check other_breakpoint.
247 (clone_one_breakpoint): Clone breakpopint according to its type.
248 * mem-break.h (struct gdb_breakpoint): Declare.
249 (set_gdb_breakpoint): Update declaration.
250 (clear_breakpoint_conditions_and_commands): Likewise.
251 (add_breakpoint_condition): Likewise.
252 (add_breakpoint_commands): Likewise.
253 * server.c (process_point_options): Change parameter type to
254 'struct gdb_breakpoint *'.
255
811f8301
YQ
2562016-07-21 Yao Qi <yao.qi@linaro.org>
257
258 * mem-break.c (set_breakpoint_at): Rename it to ...
259 (set_breakpoint_type_at): ... it.
260 (set_breakpoint_at): Call set_breakpoint_type_at.
261 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
262 * mem-break.h (set_breakpoint_at): Update comments.
263
b1c51e36
CLT
2642016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
265
266 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
267 to buf parameter.
268 (nios2_store_gregset): Likewise.
269
ced2dffb
PA
2702016-07-01 Pedro Alves <palves@redhat.com>
271 Antoine Tremblay <antoine.tremblay@ericsson.com>
272
273 * linux-low.c: Change interface to take the target lwp_info
274 pointer directly and return void. Handle detaching from a zombie
275 thread.
276 (linux_detach_lwp_callback): New function.
277 (linux_detach): Detach from the leader thread after detaching from
278 the clone threads.
279
2ac09a5b
YQ
2802016-06-28 Yao Qi <yao.qi@linaro.org>
281
282 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
283 for variable new_offset.
284 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
285 (aarch64_ftrace_insn_reloc_cb): Likewise.
286 (aarch64_ftrace_insn_reloc_tb): Likewise.
287 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
288 PRIx64 instead of PRIx32.
289
79e7fd4f
YQ
2902016-06-28 Yao Qi <yao.qi@linaro.org>
291
292 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
293 (the_low_target): Install arm_get_syscall_trapinfo.
294
061fc021
YQ
2952016-06-28 Yao Qi <yao.qi@linaro.org>
296
297 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
298 function.
299 (the_low_target): Install aarch64_get_syscall_trapinfo.
300
4cc32bec
YQ
3012016-06-28 Yao Qi <yao.qi@linaro.org>
302
303 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
304 Callers updated.
305 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
306 Remove parameter sysno.
307 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
308 sysret.
309
782c1122
AA
3102016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
311
312 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
313 (s390_emit_ne_goto): Likewise.
314 (s390_emit_lt_goto): Likewise.
315 (s390_emit_le_goto): Likewise.
316 (s390_emit_gt_goto): Likewise.
317 (s390_emit_ge_goto): Likewise.
318 (s390x_emit_eq_goto): Likewise.
319 (s390x_emit_ne_goto): Likewise.
320 (s390x_emit_lt_goto): Likewise.
321 (s390x_emit_le_goto): Likewise.
322 (s390x_emit_gt_goto): Likewise.
323 (s390x_emit_ge_goto): Likewise.
324 (s390_emit_ops_impl): Mark variable static.
325 (s390x_emit_ops): Likewise.
326
2e7b624b
YQ
3272016-06-17 Yao Qi <yao.qi@linaro.org>
328
329 * linux-low.c (handle_extended_wait): Call
330 uninsert_reinsert_breakpoints for the parent process. Remove
331 reinsert breakpoints from the child process. Reinsert them to
332 the parent process when vfork is done.
333 * mem-break.c (uninsert_reinsert_breakpoints): New function.
334 (reinsert_reinsert_breakpoints): New function.
335 * mem-break.h (uninsert_reinsert_breakpoints): Declare
336 (reinsert_reinsert_breakpoints): Declare.
337
8a81c5d7
YQ
3382016-06-17 Yao Qi <yao.qi@linaro.org>
339
340 * linux-low.c (handle_extended_wait): If the parent is doing
341 step-over, remove the reinsert breakpoints from the forked child.
342
f50bf8e5
YQ
3432016-06-17 Yao Qi <yao.qi@linaro.org>
344
345 * linux-low.c (unsuspend_all_lwps): Declare.
346 (linux_low_filter_event): If thread exited, call finish_step_over.
347 If step-over is finished, unsuspend other threads.
348
8376a3cb
YQ
3492016-06-17 Yao Qi <yao.qi@linaro.org>
350
351 * linux-low.c (linux_resume_one_lwp_throw): Assert
352 has_reinsert_breakpoints returns false.
353 * mem-break.c (delete_disabled_breakpoints): Assert
354 bp type isn't reinsert_breakpoint.
355
f79b145d
YQ
3562016-06-17 Yao Qi <yao.qi@linaro.org>
357
358 * linux-low.c (maybe_hw_step): New function.
359 (linux_resume_one_lwp_throw): Call maybe_hw_step.
360 (finish_step_over): Switch current_thread to lwp temporarily,
361 and assert has_reinsert_breakpoints returns true.
362 (proceed_one_lwp): Call maybe_hw_step.
363 * mem-break.c (has_reinsert_breakpoints): New function.
364 * mem-break.h (has_reinsert_breakpoints): Declare.
365
0ae534d2
JT
3662016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
367
368 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
369
fcdad592
YQ
3702016-05-17 Yao Qi <yao.qi@linaro.org>
371
372 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
373 instead of find_inferior.
374
9e784964
YQ
3752016-05-05 Yao Qi <yao.qi@linaro.org>
376
377 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
378 Initialize res to zero.
379
cf2ebb6e
YQ
3802016-05-05 Yao Qi <yao.qi@linaro.org>
381
382 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
383 to uint32_t.
384
c1aebf87
UW
3852016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
386
387 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
388 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
389 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
390
35fd2deb 3912016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 392 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
393
394 * tracepoint.c (write_inferior_int8): New function.
395 (cmd_qtenable_disable): Write enable flag using
396 write_inferior_int8.
397
484b3c32
YQ
3982016-04-25 Yao Qi <yao.qi@linaro.org>
399
400 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
401 (need_step_over_p): Return zero if the LWP has pending signals
402 can be delivered on software single step target.
403
85ba7d86
YQ
4042016-04-25 Yao Qi <yao.qi@linaro.org>
405
406 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
407 return instead of error.
408
3539aa13
YQ
4092016-04-22 Yao Qi <yao.qi@linaro.org>
410
411 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
412 to 23.
413
5b061e98
YQ
4142016-04-22 Yao Qi <yao.qi@linaro.org>
415
416 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
417 signal when stepping over breakpoint with software single
418 step.
419
3451269c
PA
4202016-04-21 Pedro Alves <palves@redhat.com>
421
422 * linux-s390-low.c (s390_collect_ptrace_register)
423 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
424 add casts.
425 (s390_check_regset): Use void * instead of gdb_byte *.
426
a2358508
PA
4272016-04-20 Pedro Alves <palves@redhat.com>
428
429 * configure: Renegerate.
430
6885166d
YQ
4312016-04-20 Yao Qi <yao.qi@linaro.org>
432
433 * linux-aarch32-low.c: Include "arch/arm-linux.h".
434 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
435 number 16.
436 (arm_store_gregset): Likewise.
437
2b863f51
WT
4382016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
439
440 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
441 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
442 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
443 (amd64-avx-mpx-linux.c): New rules.
444 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
445 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
446 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
447 (srv_amd64_regobj): Add amd64-avx-mpx.o.
448 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
449 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
450 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
451 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
452 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
453 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
454 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
455 * linux-x86-low.c (x86_linux_read_description): Add case for
456 X86_XSTATE_AVX_MPX_MASK.
457 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
458 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
459 init_registers_i386_avx_mpx_linux.
460 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
461 (initialize_low_tracepoint): Call
462 init_registers_i386_avx_mpx_linux.
463 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
464 (initialize_low_tracepoint): Call
465 init_registers_amd64_avx_mpx_linux.
466 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
467 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
468 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
469 declarations.
470
9b30624b
PA
4712016-04-18 Pedro Alves <palves@redhat.com>
472
473 * configure: Regenerate.
474
45e3745e
AT
4752016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
476
477 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
478 (aarch64_emit_sub): Likewise.
479
2afc13ff
PA
4802016-04-12 Pedro Alves <palves@redhat.com>
481
482 * utils.c (prepare_to_throw_exception): Delete.
483
6e774b13
SM
4842016-04-05 Simon Marchi <simon.marchi@ericsson.com>
485
486 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
487
4dca19f8
MK
4882016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
489
490 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
491
d0a9981f
MK
4922016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
493
494 * linux-aarch64-ipa.c: Add <elf.h> include.
495 * linux-ppc-ipa.c: Add <elf.h> include.
496 * linux-s390-ipa.c: Add <elf.h> include.
497
252db07e
MK
4982016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
499
500 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
501 (get_raw_reg_ptr): Likewise.
502 (get_trace_state_variable_value_ptr): Likewise.
503 (set_trace_state_variable_value_ptr): Likewise.
504 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
505 char *.
506
14e2b6d9
MK
5072016-03-31 Wei-cheng Wang <cole945@gmail.com>
508 Marcin Kościelnicki <koriakin@0x04.net>
509
510 PR/17221
511 * linux-ppc-low.c (emit_insns): New function.
512 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
513 (ppc_emit_prologue): New function.
514 (ppc_emit_epilogue): New function.
515 (ppc_emit_add): New function.
516 (ppc_emit_sub): New function.
517 (ppc_emit_mul): New function.
518 (ppc_emit_lsh): New function.
519 (ppc_emit_rsh_signed): New function.
520 (ppc_emit_rsh_unsigned): New function.
521 (ppc_emit_ext): New function.
522 (ppc_emit_zero_ext): New function.
523 (ppc_emit_log_not): New function.
524 (ppc_emit_bit_and): New function.
525 (ppc_emit_bit_or): New function.
526 (ppc_emit_bit_xor): New function.
527 (ppc_emit_bit_not): New function.
528 (ppc_emit_equal): New function.
529 (ppc_emit_less_signed): New function.
530 (ppc_emit_less_unsigned): New function.
531 (ppc_emit_ref): New function.
532 (ppc_emit_const): New function.
533 (ppc_emit_reg): New function.
534 (ppc_emit_pop): New function.
535 (ppc_emit_stack_flush): New function.
536 (ppc_emit_swap): New function.
537 (ppc_emit_stack_adjust): New function.
538 (ppc_emit_call): New function.
539 (ppc_emit_int_call_1): New function.
540 (ppc_emit_void_call_2): New function.
541 (ppc_emit_if_goto): New function.
542 (ppc_emit_goto): New function.
543 (ppc_emit_eq_goto): New function.
544 (ppc_emit_ne_goto): New function.
545 (ppc_emit_lt_goto): New function.
546 (ppc_emit_le_goto): New function.
547 (ppc_emit_gt_goto): New function.
548 (ppc_emit_ge_goto): New function.
549 (ppc_write_goto_address): New function.
550 (ppc_emit_ops_impl): New static variable.
551 (ppc64v1_emit_prologue): New function.
552 (ppc64v2_emit_prologue): New function.
553 (ppc64_emit_epilogue): New function.
554 (ppc64_emit_add): New function.
555 (ppc64_emit_sub): New function.
556 (ppc64_emit_mul): New function.
557 (ppc64_emit_lsh): New function.
558 (ppc64_emit_rsh_signed): New function.
559 (ppc64_emit_rsh_unsigned): New function.
560 (ppc64_emit_ext): New function.
561 (ppc64_emit_zero_ext): New function.
562 (ppc64_emit_log_not): New function.
563 (ppc64_emit_bit_and): New function.
564 (ppc64_emit_bit_or): New function.
565 (ppc64_emit_bit_xor): New function.
566 (ppc64_emit_bit_not): New function.
567 (ppc64_emit_equal): New function.
568 (ppc64_emit_less_signed): New function.
569 (ppc64_emit_less_unsigned): New function.
570 (ppc64_emit_ref): New function.
571 (ppc64_emit_const): New function.
572 (ppc64v1_emit_reg): New function.
573 (ppc64v2_emit_reg): New function.
574 (ppc64_emit_pop): New function.
575 (ppc64_emit_stack_flush): New function.
576 (ppc64_emit_swap): New function.
577 (ppc64v1_emit_call): New function.
578 (ppc64v2_emit_call): New function.
579 (ppc64v1_emit_int_call_1): New function.
580 (ppc64v2_emit_int_call_1): New function.
581 (ppc64v1_emit_void_call_2): New function.
582 (ppc64v2_emit_void_call_2): New function.
583 (ppc64_emit_if_goto): New function.
584 (ppc64_emit_eq_goto): New function.
585 (ppc64_emit_ne_goto): New function.
586 (ppc64_emit_lt_goto): New function.
587 (ppc64_emit_le_goto): New function.
588 (ppc64_emit_gt_goto): New function.
589 (ppc64_emit_ge_goto): New function.
590 (ppc64v1_emit_ops_impl): New static variable.
591 (ppc64v2_emit_ops_impl): New static variable.
592 (ppc_emit_ops): New function.
593 (linux_low_target): Wire in ppc_emit_ops.
594
a2174ba4
MK
5952016-03-31 Wei-cheng Wang <cole945@gmail.com>
596 Marcin Kościelnicki <koriakin@0x04.net>
597
598 PR/17221
599 * Makefile.in: Add powerpc-*-ipa.o
600 * configure.srv: Add ipa_obj for powerpc*-linux.
601 * linux-ppc-ipa.c: New file.
602 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
603 includes.
604 (PPC_FIELD): New macro.
605 (PPC_SEXT): New macro.
606 (PPC_OP6): New macro.
607 (PPC_BO): New macro.
608 (PPC_LI): New macro.
609 (PPC_BD): New macro.
610 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
611 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
612 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
613 (ppc_get_thread_area): New function.
614 (is_elfv2_inferior): New function.
615 (gen_ds_form): New function.
616 (GEN_STD): New macro.
617 (GEN_STDU): New macro.
618 (GEN_LD): New macro.
619 (GEN_LDU): New macro.
620 (gen_d_form): New function.
621 (GEN_ADDI): New macro.
622 (GEN_ADDIS): New macro.
623 (GEN_LI): New macro.
624 (GEN_LIS): New macro.
625 (GEN_ORI): New macro.
626 (GEN_ORIS): New macro.
627 (GEN_LWZ): New macro.
628 (GEN_STW): New macro.
629 (GEN_STWU): New macro.
630 (gen_xfx_form): New function.
631 (GEN_MFSPR): New macro.
632 (GEN_MTSPR): New macro.
633 (GEN_MFCR): New macro.
634 (GEN_MTCR): New macro.
635 (GEN_SYNC): New macro.
636 (GEN_LWSYNC): New macro.
637 (gen_x_form): New function.
638 (GEN_OR): New macro.
639 (GEN_MR): New macro.
640 (GEN_LWARX): New macro.
641 (GEN_STWCX): New macro.
642 (GEN_CMPW): New macro.
643 (gen_md_form): New function.
644 (GEN_RLDICL): New macro.
645 (GEN_RLDICR): New macro.
646 (gen_i_form): New function.
647 (GEN_B): New macro.
648 (GEN_BL): New macro.
649 (gen_b_form): New function.
650 (GEN_BNE): New macro.
651 (GEN_LOAD): New macro.
652 (GEN_STORE): New macro.
653 (gen_limm): New function.
654 (gen_atomic_xchg): New function.
655 (gen_call): New function.
656 (ppc_relocate_instruction): New function.
657 (ppc_install_fast_tracepoint_jump_pad): New function.
658 (ppc_get_min_fast_tracepoint_insn_len): New function.
659 (ppc_get_ipa_tdesc_idx): New function.
660 (the_low_target): Wire in the new functions.
661 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
662 tdescs.
663 * linux-ppc-tdesc.h: New file.
664
a13c4696
MK
6652016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
666
667 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
668 (alloc_jump_pad_buffer): New function.
669 * linux-amd64-ipa.c: Add <sys/mman.h> include.
670 (alloc_jump_pad_buffer): New function.
671 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
672 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
673 (alloc_jump_pad_buffer): New function.
674 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
675 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
676 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
677 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
678
1cda1512
MK
6792016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
680
681 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
682 * linux-amd64-ipa.c: Likewise.
683 * linux-i386-ipa.c: Likewise.
684 * linux-s390-ipa.c: Likewise.
685 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
686 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
687 set_trace_state_variable_value_ptr.
688 (struct ipa_sym_addresses): Likewise.
689 (symbol_list): Likewise.
690 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
691 accessing gdb_collect directly.
692 (gdb_collect_ptr_type): New typedef.
693 (get_raw_reg_ptr_type): New typedef.
694 (get_trace_state_variable_value_ptr_type): New typedef.
695 (set_trace_state_variable_value_ptr_type): New typedef.
696 (gdb_collect_ptr): New global.
697 (get_raw_reg_ptr): New global.
698 (get_trace_state_variable_value_ptr): New global.
699 (set_trace_state_variable_value_ptr): New global.
700 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
701 accessing get_raw_reg directly.
702 (get_get_tsv_func_addr): Likewise for
703 get_trace_state_variable_value_ptr.
704 (get_set_tsv_func_addr): Likewise for
705 set_trace_state_variable_value_ptr.
706 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
707
72fb5488
SM
7082016-03-30 Simon Marchi <simon.marchi@ericsson.com>
709
710 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
711
28170b88
MK
7122016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
713
714 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
715 packets.
716 (relocate_instruction): Remove own_buf.
717 * server.c (own_buf): Make global.
718 (handle_v_requests): Make global.
719 * server.h (own_buf): New declaration.
720 (handle_v_requests): New prototype.
721
f39e8743
MK
7222016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
723
724 PR 18377
725 * linux-s390-low.c (add_insns): New function.
726 (s390_emit_prologue): New function.
727 (s390_emit_epilogue): New function.
728 (s390_emit_add): New function.
729 (s390_emit_sub): New function.
730 (s390_emit_mul): New function.
731 (s390_emit_lsh): New function.
732 (s390_emit_rsh_signed): New function.
733 (s390_emit_rsh_unsigned): New function.
734 (s390_emit_ext): New function.
735 (s390_emit_log_not): New function.
736 (s390_emit_bit_and): New function.
737 (s390_emit_bit_or): New function.
738 (s390_emit_bit_xor): New function.
739 (s390_emit_bit_not): New function.
740 (s390_emit_equal): New function.
741 (s390_emit_less_signed): New function.
742 (s390_emit_less_unsigned): New function.
743 (s390_emit_ref): New function.
744 (s390_emit_if_goto): New function.
745 (s390_emit_goto): New function.
746 (s390_write_goto_address): New function.
747 (s390_emit_litpool): New function.
748 (s390_emit_const): New function.
749 (s390_emit_call): New function.
750 (s390_emit_reg): New function.
751 (s390_emit_pop): New function.
752 (s390_emit_stack_flush): New function.
753 (s390_emit_zero_ext): New function.
754 (s390_emit_swap): New function.
755 (s390_emit_stack_adjust): New function.
756 (s390_emit_set_r2): New function.
757 (s390_emit_int_call_1): New function.
758 (s390_emit_void_call_2): New function.
759 (s390_emit_eq_goto): New function.
760 (s390_emit_ne_goto): New function.
761 (s390_emit_lt_goto): New function.
762 (s390_emit_le_goto): New function.
763 (s390_emit_gt_goto): New function.
764 (s390_emit_ge_goto): New function.
765 (s390x_emit_prologue): New function.
766 (s390x_emit_epilogue): New function.
767 (s390x_emit_add): New function.
768 (s390x_emit_sub): New function.
769 (s390x_emit_mul): New function.
770 (s390x_emit_lsh): New function.
771 (s390x_emit_rsh_signed): New function.
772 (s390x_emit_rsh_unsigned): New function.
773 (s390x_emit_ext): New function.
774 (s390x_emit_log_not): New function.
775 (s390x_emit_bit_and): New function.
776 (s390x_emit_bit_or): New function.
777 (s390x_emit_bit_xor): New function.
778 (s390x_emit_bit_not): New function.
779 (s390x_emit_equal): New function.
780 (s390x_emit_less_signed): New function.
781 (s390x_emit_less_unsigned): New function.
782 (s390x_emit_ref): New function.
783 (s390x_emit_if_goto): New function.
784 (s390x_emit_const): New function.
785 (s390x_emit_call): New function.
786 (s390x_emit_reg): New function.
787 (s390x_emit_pop): New function.
788 (s390x_emit_stack_flush): New function.
789 (s390x_emit_zero_ext): New function.
790 (s390x_emit_swap): New function.
791 (s390x_emit_stack_adjust): New function.
792 (s390x_emit_int_call_1): New function.
793 (s390x_emit_void_call_2): New function.
794 (s390x_emit_eq_goto): New function.
795 (s390x_emit_ne_goto): New function.
796 (s390x_emit_lt_goto): New function.
797 (s390x_emit_le_goto): New function.
798 (s390x_emit_gt_goto): New function.
799 (s390x_emit_ge_goto): New function.
800 (s390_emit_ops): New function.
801 (struct linux_target_ops): Fill in emit_ops hook.
802
abd9baf9
MK
8032016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
804
805 PR 18377
806 * Makefile.in: Add s390 IPA files.
807 * configure.srv: Build IPA for s390.
808 * linux-s390-ipa.c: New file.
809 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
810 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
811 (tdesc_s390_linux32): Likewise.
812 (init_registers_s390_linux32v1): Likewise.
813 (tdesc_s390_linux32v1): Likewise.
814 (init_registers_s390_linux32v2): Likewise.
815 (tdesc_s390_linux32v2): Likewise.
816 (init_registers_s390_linux64): Likewise.
817 (tdesc_s390_linux64): Likewise.
818 (init_registers_s390_linux64v1): Likewise.
819 (tdesc_s390_linux64v1): Likewise.
820 (init_registers_s390_linux64v2): Likewise.
821 (tdesc_s390_linux64v2): Likewise.
822 (init_registers_s390_te_linux64): Likewise.
823 (tdesc_s390_te_linux64): Likewise.
824 (init_registers_s390_vx_linux64): Likewise.
825 (tdesc_s390_vx_linux64): Likewise.
826 (init_registers_s390_tevx_linux64): Likewise.
827 (tdesc_s390_tevx_linux64): Likewise.
828 (init_registers_s390x_linux64): Likewise.
829 (tdesc_s390x_linux64): Likewise.
830 (init_registers_s390x_linux64v1): Likewise.
831 (tdesc_s390x_linux64v1): Likewise.
832 (init_registers_s390x_linux64v2): Likewise.
833 (tdesc_s390x_linux64v2): Likewise.
834 (init_registers_s390x_te_linux64): Likewise.
835 (tdesc_s390x_te_linux64): Likewise.
836 (init_registers_s390x_vx_linux64): Likewise.
837 (tdesc_s390x_vx_linux64): Likewise.
838 (init_registers_s390x_tevx_linux64): Likewise.
839 (tdesc_s390x_tevx_linux64): Likewise.
840 (have_hwcap_s390_vx): New static variable.
841 (s390_arch_setup): Fill have_hwcap_s390_vx.
842 (s390_get_thread_area): New function.
843 (s390_ft_entry_gpr_esa): New const.
844 (s390_ft_entry_gpr_zarch): New const.
845 (s390_ft_entry_misc): New const.
846 (s390_ft_entry_fr): New const.
847 (s390_ft_entry_vr): New const.
848 (s390_ft_main_31): New const.
849 (s390_ft_main_64): New const.
850 (s390_ft_exit_fr): New const.
851 (s390_ft_exit_vr): New const.
852 (s390_ft_exit_misc): New const.
853 (s390_ft_exit_gpr_esa): New const.
854 (s390_ft_exit_gpr_zarch): New const.
855 (append_insns): New function.
856 (s390_relocate_instruction): New function.
857 (s390_install_fast_tracepoint_jump_pad): New function.
858 (s390_get_min_fast_tracepoint_insn_len): New function.
859 (s390_get_ipa_tdesc_idx): New function.
860 (struct linux_target_ops): Wire in the above functions.
861 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
862 * linux-s390-tdesc.h: New file.
863
a4105d04
MK
8642016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
865
866 * linux-s390-low.c (s390_supports_tracepoints): New function.
867 (struct linux_target_ops): Fill supports_tracepoints hook.
868
35ac8b3e
YQ
8692016-03-18 Yao Qi <yao.qi@linaro.org>
870
871 * linux-low.c (lwp_signal_can_be_delivered): New function.
872 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
873
94610ec4
YQ
8742016-03-18 Yao Qi <yao.qi@linaro.org>
875
876 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
877 0 if signal is enqueued. Remove 'signal' from one debugging
878 message. Move one debugging message to some lines below.
879 Remove code setting 'signal' to 0.
880
80aea927
YQ
8812016-03-18 Yao Qi <yao.qi@linaro.org>
882
883 * linux-low.c (linux_low_filter_event): Remove redundant
884 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
885
b04fd3be
MK
8862016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
887
888 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
889 (struct linux_target_ops): Wire in the above.
890
c40c8d4b
YQ
8912016-03-03 Yao Qi <yao.qi@linaro.org>
892
893 * linux-low.c: Update comments to start_step_over.
894
0f8288ae
YQ
8952016-03-03 Yao Qi <yao.qi@linaro.org>
896
897 PR server/19736
898 * linux-low.c (handle_extended_wait): Set child suspended
899 if event_lwp->bp_reinsert isn't zero.
900
fdbd04a8
YQ
9012016-03-02 Yao Qi <yao.qi@linaro.org>
902
903 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
904 enqueue_pending_signal.
905
6896a8fa
MK
9062016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
907
908 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
909 is actually loaded.
910
ab503087
MK
9112016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
912
913 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
914 (s390_regmap_3264) [!__s390x__]: New global.
915 (s390_collect_ptrace_register): Skip map entries containing -1.
916 (s390_supply_ptrace_register): Ditto.
917 (s390_fill_gprs_high): New function.
918 (s390_store_gprs_high): New function.
919 (s390_regsets): Add NT_S390_HIGH_GPRS.
920 (s390_get_hwcap): Enable on 31-bit.
921 (have_hwcap_s390_high_gprs): Enable on 31-bit.
922 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
923 Detect NT_S390_HIGH_GPRS.
924 (s390_usrregs_info_3264): Enable on 31-bit.
925 (s390_regs_info): Enable regs_info_3264 on 31-bit.
926 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
927
ae91f625
MK
9282016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
929
930 PR gdb/13808
931 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
932 * configure.srv: Ditto.
933 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
934 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
935 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
936 (init_registers_amd64_linux): Remove prototype.
937 (tdesc_amd64_linux): Remove declaration.
938 (get_ipa_tdesc): New function.
939 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
940 initialize remaining tdescs.
941 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
942 (init_registers_i386_linux): Remove prototype.
943 (tdesc_i386_linux): Remove declaration.
944 (get_ipa_tdesc): New function.
945 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
946 initialize remaining tdescs.
947 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
948 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
949 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
950 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
951 (x86_get_ipa_tdesc_idx): New function.
952 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
953 * linux-x86-tdesc.h: New file.
954 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
955 (target_get_ipa_tdesc_idx): New macro.
956 * tracepoint.c (ipa_tdesc_idx): New macro.
957 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
958 (symbol_list): Add ipa_tdesc_idx.
959 (cmd_qtstart): Write ipa_tdesc_idx in the target.
960 (ipa_tdesc): Remove.
961 (ipa_tdesc_idx): New variable.
962 (get_context_regcache): Use get_ipa_tdesc.
963 (gdb_collect): Ditto.
964 (gdb_probe): Ditto.
965 * tracepoint.h (get_ipa_tdesc): New prototype.
966 (ipa_tdesc): Remove.
967
e7ad2f14
PA
9682016-02-24 Pedro Alves <palves@redhat.com>
969
970 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
971 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
972 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
973 Factor out common code between the USE_SIGTRAP_SIGINFO and
974 !USE_SIGTRAP_SIGINFO blocks.
975 (linux_low_filter_event): Call save_stop_reason instead of
976 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
977 Update comments.
978 (linux_wait_1): Update comments.
979
657f9cde
WW
9802016-02-24 Wei-cheng Wang <cole945@gmail.com>
981
982 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
983 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
984 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
985 ppc_insert_point, ppc_remove_point.
986
b00b61e1
MK
9872016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
988
989 * linux-s390-low.c (s390_supports_z_point_type): New function.
990 (struct linux_target_ops): Wire s390_supports_z_point_type in.
991
553cb527
YQ
9922016-02-16 Yao Qi <yao.qi@linaro.org>
993
994 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
995 PC. Get pc from regcache_read_pc.
996
a5652c21
YQ
9972016-02-12 Yao Qi <yao.qi@linaro.org>
998
999 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
1000 or linux_get_pc_32bit.
1001 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
1002
ed443b61
YQ
10032016-02-12 Yao Qi <yao.qi@linaro.org>
1004
1005 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
1006 arm_linux_get_next_pcs_fixup.
1007
020ecd38
MK
10082016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
1009
1010 * tracepoint.c (x_tracepoint_action_download): Change
1011 write_inferior_data_ptr to write_inferior_data_pointer.
1012 (cmd_qtstart): Likewise.
1013 (write_inferior_data_ptr): Remove.
1014 (download_agent_expr): Change write_inferior_data_ptr to
1015 write_inferior_data_pointer.
1016 (download_tracepoint_1): Likewise.
1017 (download_tracepoint): Likewise.
1018 (download_trace_state_variables): Likewise.
1019
7cae9051
WW
10202016-02-11 Wei-cheng Wang <cole945@gmail.com>
1021 Marcin Kościelnicki <koriakin@0x04.net>
1022
1023 * tracepoint.c (struct tracepoint_action_ops): Remove.
1024 (struct tracepoint_action): Remove ops.
1025 (m_tracepoint_action_download, r_tracepoint_action_download)
1026 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
1027 size and offset accordingly.
1028 (m_tracepoint_action_ops, r_tracepoint_action_ops)
1029 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
1030 (tracepoint_action_send, tracepoint_action_download): New functions.
1031 Helpers for trace action handlers.
1032 (add_tracepoint_action): Remove setup actions ops.
1033 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
1034
9f6a71b4
YQ
10352016-02-10 Yao Qi <yao.qi@linaro.org>
1036
1037 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
1038
1e94266c
SM
10392016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1040
1041 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
1042 to AC_OUTPUT.
1043 * configure: Regenerate.
1044
8adce034
SM
10452016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1046
1047 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
1048 void * to gdb_byte *.
1049 * linux-low.c (siginfo_fixup): Likewise.
1050 (linux_xfer_siginfo): Likewise.
1051 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
1052 Likewise.
1053 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1054
93813b37
WT
10552016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
1056
1057 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
1058 to srv_tgtobj.
1059 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
1060 to srv_tgtobj.
1061 * linux-x86-low.c [__x86_64__]: Include
1062 "nat/amd64-linux-siginfo.h".
1063 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
1064 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
1065 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
1066 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
1067 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
1068 (cpt_si_fd, si_timerid, si_overrun): Move from
1069 nat/amd64-linux-siginfo.c.
1070 * Makefile.in (amd64-linux-siginfo.o:): New rule.
1071
8424cc97
SM
10722016-01-28 Simon Marchi <simon.marchi@ericsson.com>
1073
1074 * server.c (skip_to_semicolon): Remove.
1075 (process_point_options): Use strchrnul instead of
1076 skip_to_semicolon.
1077
4d18591b
YQ
10782016-01-26 Yao Qi <yao.qi@linaro.org>
1079
1080 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
1081 * linux-low.c (install_software_single_step_breakpoints): Don't
1082 call regcache_read_pc.
1083 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
1084 argument pc.
1085
d8020970
YQ
10862016-01-26 Yao Qi <yao.qi@linaro.org>
1087
1088 * linux-low.c (install_software_single_step_breakpoints): Call
1089 regcache_read_pc instead of get_pc.
1090
8b207339
YQ
10912016-01-26 Yao Qi <yao.qi@linaro.org>
1092
1093 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
1094 (unblock_async_io): Rename to ...
1095 (block_unblock_async_io): ... it. New function.
1096 (enable_async_io): Don't install SIGIO handler. Unblock it
1097 instead.
1098 (disable_async_io): Don't ignore SIGIO. Block it instead.
1099 (initialize_async_io): Install SIGIO handler. Don't call
1100 unblock_async_io.
1101
18879fef
YQ
11022016-01-26 Yao Qi <yao.qi@linaro.org>
1103
1104 * remote-utils.c (getpkt): If the buffer isn't empty, and the
1105 first character is '\003', call *the_target->request_interrupt.
1106
a0f8e08a
YQ
11072016-01-25 Yao Qi <yao.qi@linaro.org>
1108
1109 * remote-utils.c (new_thread_notify): Remove.
1110 (dead_thread_notify): Likewise.
1111 * remote-utils.h (new_thread_notify): Remove declaration.
1112 (dead_thread_notify): Likewise.
1113
cc5fd9ab
MK
11142016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
1115
1116 * gdb.trace/pending.exp: Fix expected message on continue.
1117
99e8eb11
MK
11182016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
1119
1120 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
1121 it works properly on big-endian machines where sizeof (CORE_ADDR)
1122 != sizeof (void *).
1123
a994041d
PA
11242016-01-21 Pedro Alves <palves@redhat.com>
1125
1126 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
1127 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
1128 * configure: Regenerate.
1129
f7a6a40d
YQ
11302016-01-21 Yao Qi <yao.qi@linaro.org>
1131
1132 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
1133 is_thumb and set it according to CPSR saved on the stack.
1134 (get_next_pcs_syscall_next_pc): Pass is_thumb to
1135 arm_sigreturn_next_pc.
1136
6f69e520
YQ
11372016-01-18 Yao Qi <yao.qi@linaro.org>
1138
1139 * linux-low.c (linux_set_pc_64bit): New function.
1140 (linux_get_pc_64bit): New function.
1141 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
1142 Declare.
1143 * linux-sparc-low.c (debug_threads): Remove declaration.
1144 (sparc_get_pc): Remove.
1145 (the_low_target): Use linux_get_pc_64bit instead of
1146 sparc_get_pc.
1147 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
1148 (the_low_target): Use linux_get_pc_64bit and
1149 linux_set_pc_64bit.
1150
276d4552
YQ
11512016-01-18 Yao Qi <yao.qi@linaro.org>
1152
1153 * linux-arm-low.c (debug_threads): Remove declaration.
1154 (arm_get_pc, arm_set_pc): Remove.
1155 (the_low_target): Use linux_get_pc_32bit and
1156 linux_set_pc_32bit.
1157 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
1158 (the_low_target): Use linux_get_pc_32bit and
1159 linux_set_pc_32bit.
1160 * linux-cris-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-crisv32-low.c (debug_threads): Remove declaration.
1165 (cris_get_pc, cris_set_pc): Remove.
1166 (the_low_target): Use linux_get_pc_32bit and
1167 linux_set_pc_32bit.
1168 * linux-low.c: Include inttypes.h.
1169 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
1170 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
1171 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
1172 (the_low_target): Use linux_get_pc_32bit and
1173 linux_set_pc_32bit.
1174 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
1175 (the_low_target): Use linux_get_pc_32bit and
1176 linux_set_pc_32bit.
1177 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
1178 (the_low_target): Use linux_get_pc_32bit and
1179 linux_set_pc_32bit.
1180 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
1181 (the_low_target): Use linux_get_pc_32bit and
1182 linux_set_pc_32bit.
1183 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
1184 (the_low_target): Use linux_get_pc_32bit and
1185 linux_set_pc_32bit.
1186
eb0edac8
GB
11872016-01-18 Gary Benson <gbenson@redhat.com>
1188
1189 * configure.ac (AC_FUNC_FORK): New check.
1190 * config.in: Regenerate.
1191 * configure: Likewise.
1192
1b451dda
YQ
11932016-01-14 Yao Qi <yao.qi@linaro.org>
1194
1195 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
1196 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
1197 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
1198 arm_get_next_pcs_ctor.
1199
82075af2
JS
12002016-01-12 Josh Stone <jistone@redhat.com>
1201 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1202
1203 * inferiors.h: Include "gdb_vecs.h".
1204 (struct process_info): Add syscalls_to_catch.
1205 * inferiors.c (remove_process): Free syscalls_to_catch.
1206 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
1207 syscall_return stops.
1208 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
1209 * server.c (handle_general_set): Handle QCatchSyscalls.
1210 (handle_query): Report support for QCatchSyscalls.
1211 * target.h (struct target_ops): Add supports_catch_syscall.
1212 (target_supports_catch_syscall): New macro.
1213 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
1214 (struct lwp_info): Add syscall_state.
1215 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
1216 Maintain syscall_state and syscalls_to_catch across exec.
1217 (get_syscall_trapinfo): New function, proxy to the_low_target.
1218 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
1219 (linux_low_filter_event): Toggle syscall_state entry/return for
1220 syscall traps, and set it ignored for all others.
1221 (gdb_catching_syscalls_p): New function.
1222 (gdb_catch_this_syscall_p): New function.
1223 (linux_wait_1): Handle SYSCALL_SIGTRAP.
1224 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
1225 (linux_supports_catch_syscall): New function.
1226 (linux_target_ops): Install it.
1227 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
1228 (the_low_target): Install it.
1229
8f13a3ce
MF
12302016-01-12 Mike Frysinger <vapier@gentoo.org>
1231
1232 * acinclude.m4: Include new ../warning.m4 file.
1233 * configure: Regenerated.
1234 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
1235
5b3da067
MF
12362016-01-12 Mike Frysinger <vapier@gentoo.org>
1237
1238 * ax.c (is_goto_target): Mark static.
1239 * linux-low.c (register_addr): Likewise.
1240 (linux_fetch_registers, linux_store_registers): Likewise.
1241 * mem-break.c (any_persistent_commands): Fix old prototype.
1242 (add_commands_to_breakpoint): Mark static.
1243 * regcache.c (find_register_by_name): Delete unused func.
1244 * remote-utils.c (hex_or_minus_one): Mark static.
1245 * server.c (monitor_show_help): Mark static.
1246 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
1247 handle_v_requests): Likewise.
1248
bc504a31
PA
12492016-01-12 Pedro Alves <palves@redhat.com>
1250
1251 Remove use of the registered trademark symbol throughout.
1252
5a0dd67a
YQ
12532016-01-08 Yao Qi <yao.qi@linaro.org>
1254
1255 * remote-utils.c (getpkt): If c is '\003', call target hook
1256 request_interrupt.
1257
b2ca446f
YQ
12582016-01-06 Yao Qi <yao.qi@linaro.org>
1259
1260 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
1261 linux-aarch32-low.c.
1262 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1263 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1264 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1265 (thumb2_breakpoint): Declare.
1266 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
1267 linux-aarch32-low.h.
1268 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1269 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1270 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1271
edd88788
JB
12722016-01-01 Joel Brobecker <brobecker@adacore.com>
1273
1274 * gdbreplay.c (gdbreplay_version): Change copyright year in
1275 version message.
1276 * server.c (gdbserver_version): Likewise.
1277
65da7f14
PP
12782015-12-28 Patrick Palka <patrick@parcs.ath.cx>
1279
1280 * server.c (crc32_table): Delete.
1281 (crc32): Use libiberty's xcrc32 function.
1282
4abd5ed2
JB
12832015-12-22 Joel Brobecker <brobecker@adacore.com>
1284
1285 * lynx-low.c (lynx_delete_thread_callback): New function.
1286 (lynx_mourn): Properly delete our process and all of its
1287 threads. Remove call to clear_inferiors.
1288
0e50fe5c
JB
12892015-12-22 Joel Brobecker <brobecker@adacore.com>
1290
1291 * target.c (thread_search_callback): Add check that
1292 the thread_stopped target callback is not NULL before
1293 calling it.
1294
35adc03f
YQ
12952015-12-21 Yao Qi <yao.qi@linaro.org>
1296
1297 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
1298 arm breakpoint.
1299
bd2b2909
AT
13002015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1301
1302 * server.c (handle_query): Call target_supports_software_single_step.
1303
7fe5e27e
AT
13042015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1305
1306 * linux-low.c (single_step): New function.
1307 (linux_resume_one_lwp_throw): Call single_step.
1308 (start_step_over): Likewise.
1309
d9311bfa
AT
13102015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1311
1312 * Makefile.in (SFILES): Append arch/arm-linux.c,
1313 arch/arm-get-next-pcs.c.
1314 (arm-linux.o): New rule.
1315 (arm-get-next-pcs.o): New rule.
1316 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
1317 arm-linux.o.
1318 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
1319 to linux-aarch32-low.c.
1320 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1321 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1322 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1323 (thumb2_breakpoint_len): Likewise.
1324 (arm_is_thumb_mode): Make non-static.
1325 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
1326 from linux-aarch32-low.c.
1327 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1328 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1329 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1330 (thumb2_breakpoint_len): Likewise.
1331 (arm_is_thumb_mode): New declaration.
1332 * linux-arm-low.c: Include arch/arm-linux.h
1333 aarch/arm-get-next-pcs.h, sys/syscall.h.
1334 (get_next_pcs_ops): New struct.
1335 (get_next_pcs_addr_bits_remove): New function.
1336 (get_next_pcs_is_thumb): New function.
1337 (get_next_pcs_read_memory_unsigned_integer): Likewise.
1338 (arm_sigreturn_next_pc): Likewise.
1339 (get_next_pcs_syscall_next_pc): Likewise.
1340 (arm_gdbserver_get_next_pcs): Likewise.
1341 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
1342 Initialize.
1343 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
1344 * server.h: Include gdb_vecs.h.
1345
68ce2059
AT
13462015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1347
1348 * Makefile.in (SFILES): Append common/common-regcache.c.
1349 (OBS): Append common-regcache.o.
1350 (common-regcache.o): New rule.
1351 * regcache.c (init_register_cache): Initialize cache to
1352 REG_UNAVAILABLE.
1353 (regcache_raw_read_unsigned): New function.
1354 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
1355 register_status enum.
1356
fa5308bd
AT
13572015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1358
1359 * linux-aarch64-low.c (the_low_targets): Rename
1360 breakpoint_reinsert_addr to get_next_pcs.
1361 * linux-arm-low.c (the_low_targets): Likewise.
1362 * linux-bfin-low.c (the_low_targets): Likewise.
1363 * linux-cris-low.c (the_low_targets): Likewise.
1364 * linux-crisv32-low.c (the_low_targets): Likewise.
1365 * linux-low.c (can_software_single_step): Likewise.
1366 (install_software_single_step_breakpoints): New function.
1367 (start_step_over): Use install_software_single_step_breakpoints.
1368 * linux-low.h: New CORE_ADDR vector.
1369 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
1370 get_next_pcs.
1371 * linux-mips-low.c (the_low_targets): Likewise.
1372 * linux-nios2-low.c (the_low_targets): Likewise.
1373 * linux-sparc-low.c (the_low_targets): Likewise.
1374
4a6ed09b
PA
13752015-12-17 Pedro Alves <palves@redhat.com>
1376
1377 * linux-low.c (linux_kill_one_lwp): Remove references to
1378 LinuxThreads.
1379 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
1380 to 'kill'.
1381 (linux_init_signals): Delete.
1382 (initialize_low): Adjust.
1383 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
1384
7544db95
PA
13852015-12-16 Pedro Alves <palves@redhat.com>
1386
1387 * configure.ac (compiler warning flags): When testing a
1388 -Wno-foo option, check whether -Wfoo works instead.
1389 * configure: Regenerate.
1390
8020350c
DB
13912015-12-11 Don Breazeal <donb@codesourcery.com>
1392
1393 * server.c (process_serial_event): Don't exit from gdbserver
1394 in remote mode if there are still active inferiors.
1395
db91f502
YQ
13962015-12-11 Yao Qi <yao.qi@linaro.org>
1397
1398 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
1399 arm_breakpoint_at if the process is 32-bit.
1400
b37a6290
YQ
14012015-12-11 Yao Qi <yao.qi@linaro.org>
1402
1403 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
1404 arm breakpoint.
1405
17b1509a
YQ
14062015-12-07 Yao Qi <yao.qi@linaro.org>
1407
1408 * configure.srv: Append arm.o to srv_tgtobj for
1409 aarch64*-*-linux* target.
1410 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
1411 from linux-arm-low.c.
1412 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1413 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1414 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1415 (thumb2_breakpoint_len): Likewise.
1416 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
1417 (arm_breakpoint_kinds): Likewise.
1418 (arm_breakpoint_kind_from_pc): Likewise.
1419 (arm_sw_breakpoint_from_kind): Likewise.
1420 (arm_breakpoint_kind_from_current_state): Likewise.
1421 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
1422 (arm_sw_breakpoint_from_kind): Declare.
1423 (arm_breakpoint_kind_from_current_state): Declare.
1424 (arm_breakpoint_at): Declare.
1425 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
1426 arm_sw_breakpoint_from_kind if process is 32-bit.
1427 (aarch64_breakpoint_kind_from_pc): New function.
1428 (aarch64_breakpoint_kind_from_current_state): New function.
1429 (the_low_target): Initialize fields breakpoint_kind_from_pc
1430 and breakpoint_kind_from_current_state.
1431 * linux-arm-low.c (arm_breakpoint_kinds): Move to
1432 linux-aarch32-low.c.
1433 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
1434 (arm_breakpoint, arm_breakpoint_len): Likewise.
1435 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
1436 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1437 (arm_is_thumb_mode): Likewise.
1438 (arm_breakpoint_at): Likewise.
1439 (arm_breakpoint_kind_from_pc): Likewise.
1440 (arm_sw_breakpoint_from_kind): Likewise.
1441 (arm_breakpoint_kind_from_current_state): Likewise.
1442
1443 Revert:
1444 2015-08-04 Yao Qi <yao.qi@linaro.org>
1445
1446 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1447 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1448 * server.c (extended_protocol): Remove "static".
1449 * server.h (extended_protocol): Declare it.
1450
ece66d65
JS
14512015-12-04 Josh Stone <jistone@redhat.com>
1452
1453 * target.h (struct target_ops) <arch_setup>: Rename to ...
1454 (struct target_ops) <post_create_inferior>: ... this.
1455 (target_arch_setup): Rename to ...
1456 (target_post_create_inferior): ... this, calling post_create_inferior.
1457 * server.c (start_inferior): Update target_arch_setup calls to
1458 target_post_create_inferior.
1459 * linux-low.c (linux_low_ptrace_options): Forward declare.
1460 (linux_arch_setup): Update its comment for general use.
1461 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
1462 (struct linux_target_ops): Use linux_post_create_inferior.
1463 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
1464 to post_create_inferior.
1465 * nto-low.c (struct nto_target_ops): Likewise.
1466 * spu-low.c (struct spu_target_ops): Likewise.
1467 * win32-low.c (struct win32_target_ops): Likewise.
1468
e58c48b4
AT
14692015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
1470
1471 * linux-arm-low.c: Remove duplicate arch/arm.h include.
1472
fbec8956
AT
14732015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1474
1475 * linux-arm-low.c (arm_reinsert_addr): Remove function.
1476 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
1477 * linux-cris-low.c (cris_reinsert_addr> Remove function.
1478 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1479 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
1480 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1481 * linux-mips-low.c (mips_reinsert_addr): Remove function.
1482 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1483 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
1484 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1485 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
1486 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1487
9b4c5f87
AT
14882015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1489
1490 * linux-low.c (linux_look_up_symbols): Don't call
1491 linux_supports_traceclone.
1492 * linux-low.h (thread_db_init): Remove use_events argument.
1493 * thread-db.c (thread_db_use_event): Remove global variable.
1494 (struct thread_db) <td_thr_event_enable_p>: Remove field.
1495 (struct thread_db) <td_create_bp>: Remove field.
1496 (thread_db_create_event): Remove function.
1497 (thread_db_enable_reporting): Likewise.
1498 (find_one_thread): Don't check for thread_db_use_events.
1499 (attach_thread): Likewise.
1500 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
1501 (try_thread_db_load_1): Don't check for thread_db_use_events.
1502 (thread_db_init): Remove use_events argument and thread events
1503 handling.
1504 (remove_thread_event_breakpoints): Remove function.
1505 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
1506
7d00775e
AT
15072015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1508
1509 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
1510 New function.
1511 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1512 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
1513 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1514 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
1515 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
1516 Initialize.
1517 * linux-crisv32-low.c (cris_supports_hardware_single_step):
1518 New function.
1519 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1520 * linux-low.c (can_hardware_single_step): Use
1521 supports_hardware_single_step.
1522 (can_software_single_step): New function.
1523 (start_step_over): Call can_software_single_step.
1524 (linux_supports_hardware_single_step): New function.
1525 (struct target_ops) <supports_software_single_step>: Initialize.
1526 * linux-low.h (struct linux_target_ops)
1527 <supports_hardware_single_step>: Initialize.
1528 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
1529 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1530 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
1531 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
1532 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
1533 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1534 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
1535 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1536 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
1537 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
1538 Initialize.
1539 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
1540 (struct linux_target_ops) <tile_supports_hardware_single_step>:
1541 Initialize.
1542 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
1543 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1544 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
1545 New function.
1546 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1547 * target.h (struct target_ops): <supports_software_single_step>:
1548 New field.
1549 (target_supports_software_single_step): New macro.
1550
2d97cd35
AT
15512015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1552
1553 * linux-low.c (linux_wait_1): Fix pc advance condition.
1554 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
1555 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
1556
769ef81f
AT
15572015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1558
1559 * linux-arm-low.c (arm_is_thumb_mode): New function.
1560 (arm_breakpoint_at): Use arm_is_thumb_mode.
1561 (arm_breakpoint_kind_from_current_state): New function.
1562 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
1563 Initialize.
1564 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
1565 (linux_breakpoint_kind_from_current_state): New function.
1566 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
1567 * linux-low.h (struct linux_target_ops)
1568 <breakpoint_kind_from_current_state>: New field.
1569 * target.h (struct target_ops): Likewise.
1570 (target_breakpoint_kind_from_current_state): New macro.
1571
1bebeeca
PA
15722015-11-30 Pedro Alves <palves@redhat.com>
1573
1574 * linux-low.c (linux_resume): Wake up the event loop before
1575 returning.
1576
a67a9fae
PA
15772015-11-30 Pedro Alves <palves@redhat.com>
1578
1579 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
1580 check.
1581 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
1582 to -1.
1583 * target.c (struct thread_search): New structure.
1584 (thread_search_callback): New function.
1585 (prev_general_thread): New global.
1586 (prepare_to_access_memory, done_accessing_memory): New functions.
1587 * target.h (prepare_to_access_memory, done_accessing_memory):
1588 Replace macros with function declarations.
1589
f2faf941
PA
15902015-11-30 Pedro Alves <palves@redhat.com>
1591
1592 PR 14618
1593 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
1594 report TARGET_WAITKIND_NO_RESUMED.
1595 * remote-utils.c (prepare_resume_reply): Handle
1596 TARGET_WAITKIND_NO_RESUMED.
1597 * server.c (report_no_resumed): New global.
1598 (handle_query) <qSupported>: Handle "no-resumed+". Report
1599 "no-resumed+" support.
1600 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
1601 return error if the client doesn't support no-resumed events.
1602 (push_stop_notification): New function.
1603 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
1604 events if the client supports them.
1605
a681f9c9
PA
16062015-11-30 Pedro Alves <palves@redhat.com>
1607
1608 * linux-low.c (thread_still_has_status_pending_p): Don't check
1609 vCont;t here.
1610 (lwp_resumed): New function.
1611 (status_pending_p_callback): Return early if the LWP is not
1612 supposed to be resumed.
1613
65706a29
PA
16142015-11-30 Pedro Alves <palves@redhat.com>
1615
1616 * linux-low.c (handle_extended_wait): Assert that the LWP's
1617 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
1618 thread create events, leave the new child's status pending.
1619 (linux_low_filter_event): If GDB wants to hear about thread exit
1620 events, leave the LWP marked dead and don't delete it.
1621 (linux_wait_for_event_filtered): Don't check for thread exit.
1622 (filter_exit_event): New function.
1623 (linux_wait_1): Use it, when returning an exit event.
1624 (linux_resume_one_lwp_throw): Assert that the LWP's
1625 waitstatus is TARGET_WAITKIND_IGNORE.
1626 * remote-utils.c (prepare_resume_reply): Handle
1627 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
1628 * server.c (report_thread_events): New global.
1629 (handle_general_set): Handle QThreadEvents.
1630 (handle_query) <qSupported>: Handle and report QThreadEvents+;
1631 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
1632 TARGET_WAITKIND_THREAD_EXITED.
1633 * server.h (report_thread_events): Declare.
1634
56cf4bed
PA
16352015-11-30 Pedro Alves <palves@redhat.com>
1636
1637 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
1638 the thread's last_resume_kind was resume_stop.
1639
500c1d85
PA
16402015-11-30 Pedro Alves <palves@redhat.com>
1641
1642 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
1643 before returning.
1644
de979965
PA
16452015-11-30 Pedro Alves <palves@redhat.com>
1646
1647 * server.c (handle_v_requests): Handle vCtrlC.
1648
34c65914
PA
16492015-11-30 Pedro Alves <palves@redhat.com>
1650
1651 * gdbthread.h (find_any_thread_of_pid): Declare.
1652 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
1653 functions.
1654 * server.c (handle_query): If current_thread is NULL, look for
1655 another thread of the selected process.
1656
79efa585 16572015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 1658 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
1659
1660 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
1661 * server.c (handle_qxfer_threads_worker): Refactor to include thread
1662 name in reply.
1663 * target.h (struct target_ops) <thread_name>: New field.
1664 (target_thread_name): New macro.
1665
80d82c19
JB
16662015-11-23 Joel Brobecker <brobecker@adacore.com>
1667
1668 * regcache.h (regcache_invalidate_pid): Add declaration.
1669 * regcache.c (regcache_invalidate_pid): New function, extracted
1670 from regcache_invalidate.
1671 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
1672 Add trivial documentation comment.
1673 * lynx-low.c: Use regcache_invalidate_pid instead of
1674 regcache_invalidate.
1675
64da5dd5
JB
16762015-11-23 Joel Brobecker <brobecker@adacore.com>
1677
1678 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
1679 and Elf64_auxv_t if the target is Android.
1680
37ce4055
DE
16812015-11-22 Doug Evans <xdje42@gmail.com>
1682
1683 * target.h: #include <sys/types.h>.
1684
06e03fff
PA
16852015-11-19 Pedro Alves <palves@redhat.com>
1686
1687 * linux-low.c (linux_process_qsupported): Change prototype.
1688 Adjust.
1689 * linux-low.h (struct linux_target_ops) <process_qsupported>:
1690 Change prototype.
1691 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
1692 and adjust to loop over all features.
1693 * server.c (handle_query) <qSupported>: Adjust to call
1694 target_process_qsupported once, passing it a vector of unprocessed
1695 features.
1696 * target.h (struct target_ops) <process_qsupported>: Change
1697 prototype.
1698 (target_process_qsupported): Adjust.
1699
9a084706
PA
17002015-11-19 Pedro Alves <palves@redhat.com>
1701
1702 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
1703 mode.
1704 * configure: Regenerate.
1705
dad44a1f
PA
17062015-11-19 Pedro Alves <palves@redhat.com>
1707
1708 * configure: Regenerate.
1709
231c0592
YQ
17102015-11-19 Yao Qi <yao.qi@linaro.org>
1711
1712 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
1713 type to uint32_t.
1714
6c1c9a8b
YQ
17152015-11-19 Yao Qi <yao.qi@linaro.org>
1716
1717 * linux-aarch64-low.c (enum aarch64_operand_type): New.
1718 (struct aarch64_operand): Move enum out.
1719
9caa3311
YQ
17202015-11-19 Yao Qi <yao.qi@linaro.org>
1721
1722 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
1723 struct user_fpsimd_state *.
1724 (aarch64_store_fpregset): Likewise.
1725
6a69a054
YQ
17262015-11-19 Yao Qi <yao.qi@linaro.org>
1727
1728 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
1729 struct user_pt_regs *.
1730 (aarch64_store_gregset): Likewise.
1731
1798301e
PA
17322015-11-18 Pedro Alves <palves@redhat.com>
1733
1734 * Makefile.in (all_object_files): Add $IPA_OBJS.
1735
ce7715e2
PA
17362015-11-17 Pedro Alves <palves@redhat.com>
1737
1738 * win32-low.c (win32_resume): Use gdb_signal_from_host,
1739 GDB_SIGNAL_0 and gdb_signal_to_string.
1740
c0879059
PA
17412015-11-17 Pedro Alves <palves@redhat.com>
1742
1743 * win32-low.c (handle_output_debug_string): Remove parameter.
1744 (win32_kill): Remove our_status local and adjust call to
1745 handle_output_debug_string.
1746 (get_child_debug_event): Adjust call to
1747 handle_output_debug_string.
1748
1996e237
SM
17492015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1750
1751 * linux-mips-low.c (mips_fill_gregset): Add cast.
1752 (mips_store_gregset): Likewise.
1753 (mips_fill_fpregset): Likewise.
1754 (mips_store_fpregset): Likewise.
1755
cbec665b
SM
17562015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1757
1758 * linux-mips-low.c (mips_add_watchpoint): Rename private to
1759 priv.
1760
eb3e3c67
SM
17612015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1762
1763 * linux-mips-low.c (mips_linux_new_thread): Change type of
1764 watch_type to enum target_hw_bp_type.
1765
171de4b8
SM
17662015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1767
1768 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
1769 Change return type to arm_hwbp_type.
1770
04248ead
SM
17712015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1772
1773 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
1774 (arm_store_gregset): Likewise.
1775 * linux-arm-low.c (arm_get_hwcap): Likewise.
1776 (arm_read_description): Likewise.
1777
04b3479c
SM
17782015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1779
1780 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
1781
2bc84e8a
SM
17822015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1783
1784 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
1785 (ppc_fill_vsxregset): Likewise.
1786 (ppc_store_vsxregset): Likewise.
1787 (ppc_fill_vrregset): Likewise.
1788 (ppc_store_vrregset): Likewise.
1789 (ppc_fill_evrregset): Likewise.
1790 (ppc_store_evrregset): Likewise.
1791
e6c5bb05
SM
17922015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1793
1794 * linux-ppc-low.c (ppc_usrregs_info): Remove
1795 forward-declaration.
1796 (ppc_arch_setup): Move lower in file.
1797
7ea45d72
SM
17982015-10-30 Simon Marchi <simon.marchi@ericsson.com>
1799
1800 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
1801 (ps_pdwrite): Likewise.
1802
69291610
HW
18032015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
1804
1805 * linux-arm-low.c (arm_new_thread): Move pointer dereference
1806 to after assert checks.
1807
b42945fd
SM
18082015-10-29 Simon Marchi <simon.marchi@ericsson.com>
1809
1810 * proc-service.c (ps_pdread): Add/adjust casts.
1811 (ps_pdwrite): Add/adjust casts.
1812
d6f85c84
SM
18132015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1814
1815 * server.c (handle_search_memory_1): Cast return value of
1816 memmem.
1817
f98cd059
SM
18182015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1819
1820 * server.c (write_qxfer_response): Change type of data to
1821 gdb_byte *.
1822
d2412fa5
PA
18232015-10-29 Pedro Alves <palves@redhat.com>
1824
1825 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
1826
c17414a2
PA
18272015-10-29 Pedro Alves <palves@redhat.com>
1828
1829 * tracepoint.c (clear_installed_tracepoints): Add casts.
1830
e053fbc4
PA
18312015-10-29 Pedro Alves <palves@redhat.com>
1832
1833 * server.c (handle_v_cont, process_serial_event): Add enum
1834 gdb_signal casts to signal parsing code.
1835
add67df8
PA
18362015-10-29 Pedro Alves <palves@redhat.com>
1837
1838 * linux-low.h (NULL_REGSET): Define.
1839 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1840 * linux-arm-low.c (arm_regsets): Likewise.
1841 * linux-crisv32-low.c (cris_regsets): Likewise.
1842 * linux-m68k-low.c (m68k_regsets): Likewise.
1843 * linux-mips-low.c (mips_regsets): Likewise.
1844 * linux-nios2-low.c (nios2_regsets): Likewise.
1845 * linux-ppc-low.c (ppc_regsets): Likewise.
1846 * linux-s390-low.c (s390_regsets): Likewise.
1847 * linux-sh-low.c (sh_regsets): Likewise.
1848 * linux-sparc-low.c (sparc_regsets): Likewise.
1849 * linux-tic6x-low.c (tic6x_regsets): Likewise.
1850 * linux-tile-low.c (tile_regsets): Likewise.
1851 * linux-x86-low.c (x86_regsets): Likewise.
1852 * linux-xtensa-low.c (xtensa_regsets): Likewise.
1853
50bc912a
PA
18542015-10-29 Pedro Alves <palves@redhat.com>
1855
1856 * linux-low.h (NULL_REGSET): Define.
1857 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1858 * linux-arm-low.c (arm_regsets): Likewise.
1859 * linux-crisv32-low.c (cris_regsets): Likewise.
1860 * linux-m68k-low.c (m68k_regsets): Likewise.
1861 * linux-mips-low.c (mips_regsets): Likewise.
1862 * linux-nios2-low.c (nios2_regsets): Likewise.
1863 * linux-ppc-low.c (ppc_regsets): Likewise.
1864 * linux-s390-low.c (s390_regsets): Likewise.
1865 * linux-sh-low.c (sh_regsets): Likewise.
1866 * linux-sparc-low.c (sparc_regsets): Likewise.
1867 * linux-tic6x-low.c (tic6x_regsets): Likewise.
1868 * linux-tile-low.c (tile_regsets): Likewise.
1869 * linux-x86-low.c (x86_regsets): Likewise.
1870 * linux-xtensa-low.c (xtensa_regsets): Likewise.
1871
682b2546
DE
18722015-10-26 Doug Evans <dje@google.com>
1873
1874 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
1875
963843d4
DE
18762015-10-26 Doug Evans <dje@google.com>
1877
1878 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
1879
d41401ac
DE
18802015-10-26 Doug Evans <dje@google.com>
1881
1882 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
1883 for debug_printf.
1884 (attach_thread, find_new_threads_callback): Ditto.
1885
3db28855
AT
18862015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1887
1888 * mem-break.h (set_breakpoint_data): Remove.
1889
fb78e89c
AT
18902015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1891
1892 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
1893 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
1894 (initialize_low): Remove set_breakpoint_data call.
1895 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
1896 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
1897 (initialize_low): Remove set_breakpoint_data call.
1898 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
1899 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
1900 (initialize_low): Remove set_breakpoint_data call.
1901
2e6ee069
AT
19022015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1903
1904 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
1905 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
1906 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
1907 * target.h (target_breakpoint_kind_from_pc): New macro.
1908
1652a986
AT
19092015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
1910
1911 * linux-low.c (default_breakpoint_kind_from_pc): New function.
1912 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
1913 the default breakpoint kind.
1914
abeead09
AT
19152015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1916
1917 * linux-arm-low.c (arm_supports_z_point_type): Add software
1918 breakpoint support.
1919
b0b4b501
AT
19202015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1921
1922 * linux-arm-low.c: Refactor breakpoint definitions.
1923 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
1924 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
1925
8689682c
AT
19262015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1927
1928 * Makefile.in: Add arm.c/o.
1929 * configure.srv: Likewise.
1930 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
1931 (arm_breakpoint_kind_from_pc): New function.
1932 (arm_sw_breakpoint_from_kind): Return proper kind.
1933 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
1934
27165294
AT
19352015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1936
1937 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
1938 removal.
1939 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
1940 (struct raw_breakpoint) <size>: Remove.
1941 (struct raw_breakpoint) <kind>: Add.
1942 (bp_size): New function.
1943 (bp_opcode): Likewise.
1944 (find_raw_breakpoint_at): Adjust for kind.
1945 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
1946 (remove_memory_breakpoint): Adjust for kind call bp_size.
1947 (set_raw_breakpoint_at): Adjust for kind.
1948 (set_breakpoint): Likewise.
1949 (set_breakpoint_at): Call breakpoint_kind_from_pc.
1950 (delete_raw_breakpoint): Adjust for kind.
1951 (delete_breakpoint): Likewise.
1952 (find_gdb_breakpoint): Likewise.
1953 (set_gdb_breakpoint_1): Likewise.
1954 (set_gdb_breakpoint): Likewise.
1955 (delete_gdb_breakpoint_1): Likewise.
1956 (delete_gdb_breakpoint): Likewise.
1957 (uninsert_raw_breakpoint): Likewise.
1958 (reinsert_raw_breakpoint): Likewise.
1959 (set_breakpoint_data): Remove.
1960 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
1961 (check_mem_read): Adjust for kind call bp_size.
1962 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
1963 (clone_one_breakpoint): Adjust for kind.
1964 * mem-break.h (set_gdb_breakpoint): Likewise.
1965 (delete_gdb_breakpoint): Likewise.
1966 * server.c (process_serial_event): Likewise.
1967
dd373349
AT
19682015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1969
1970 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
1971 (struct linux_target_ops) <breakpoint>: Remove.
1972 (struct linux_target_ops) <breakpoint_len>: Remove.
1973 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1974 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1975 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
1976 (arm_sw_breakpoint_from_kind): New function.
1977 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
1978 (struct linux_target_ops) <breakpoint>: Remove.
1979 (struct linux_target_ops) <breakpoint_len>: Remove.
1980 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1981 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1982 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
1983 (struct linux_target_ops) <breakpoint>: Remove.
1984 (struct linux_target_ops) <breakpoint_len>: Remove.
1985 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1986 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1987 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
1988 (struct linux_target_ops) <breakpoint>: Remove.
1989 (struct linux_target_ops) <breakpoint_len>: Remove.
1990 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1991 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1992 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
1993 and sw_breakpoint_from_kind to increment the pc.
1994 (linux_breakpoint_kind_from_pc): New function.
1995 (linux_sw_breakpoint_from_kind): New function.
1996 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
1997 (initialize_low): Call breakpoint_kind_from_pc and
1998 sw_breakpoint_from_kind to replace breakpoint_data/len.
1999 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
2000 New field.
2001 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
2002 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
2003 (struct linux_target_ops) <breakpoint>: Remove.
2004 (struct linux_target_ops) <breakpoint_len>: Remove.
2005 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2006 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2007 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
2008 (struct linux_target_ops) <breakpoint>: Remove.
2009 (struct linux_target_ops) <breakpoint_len>: Remove.
2010 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2011 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2012 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
2013 (struct linux_target_ops) <breakpoint>: Remove.
2014 (struct linux_target_ops) <breakpoint_len>: Remove.
2015 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2016 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2017 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
2018 (struct linux_target_ops) <breakpoint>: Remove.
2019 (struct linux_target_ops) <breakpoint_len>: Remove.
2020 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2021 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2022 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
2023 (struct linux_target_ops) <breakpoint>: Remove.
2024 (struct linux_target_ops) <breakpoint_len>: Remove.
2025 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2026 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2027 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
2028 (struct linux_target_ops) <breakpoint>: Remove.
2029 (struct linux_target_ops) <breakpoint_len>: Remove.
2030 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2031 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2032 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
2033 (struct linux_target_ops) <breakpoint>: Remove.
2034 (struct linux_target_ops) <breakpoint_len>: Remove.
2035 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2036 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2037 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
2038 (struct linux_target_ops) <breakpoint>: Remove.
2039 (struct linux_target_ops) <breakpoint_len>: Remove.
2040 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2041 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2042 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
2043 (struct linux_target_ops) <breakpoint>: Remove.
2044 (struct linux_target_ops) <breakpoint_len>: Remove.
2045 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2046 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2047 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
2048 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
2049 (struct linux_target_ops) <breakpoint>: Remove.
2050 (struct linux_target_ops) <breakpoint_len>: Remove.
2051 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2052 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2053 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
2054 (struct linux_target_ops) <breakpoint>: Remove.
2055 (struct linux_target_ops) <breakpoint_len>: Remove.
2056 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2057 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2058
4cd98a19
AT
20592015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2060
2061 * linux-cris-low.c (cris_get_pc): Remove void arg.
2062
774ee6d2
AR
20632015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2064
2065 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
2066 variable name.
2067
833dcd29
AR
20682015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2069
2070 * inferiors.c (thread_pid_matches_callback): New function.
2071 (find_thread_process): New function.
2072 (remove_thread): Reset current_thread.
2073 (remove_process): Assert threads have been removed first.
2074
8d689ee5
YQ
20752015-10-15 Yao Qi <yao.qi@linaro.org>
2076
2077 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
2078 if it is 3.
2079 (aarch64_remove_point): Likewise.
2080 * regcache.c (regcache_register_size): New function.
2081
1c2e1515
YQ
20822015-10-12 Yao Qi <yao.qi@linaro.org>
2083
2084 * linux-aarch64-low.c: Update all callers as emit_load_store
2085 is renamed to aarch64_emit_load_store.
2086
e1c587c3
YQ
20872015-10-12 Yao Qi <yao.qi@linaro.org>
2088
2089 * linux-aarch64-low.c: Update all callers of function renaming
2090 from emit_insn to aarch64_emit_insn.
2091
b6542f81
YQ
20922015-10-12 Yao Qi <yao.qi@linaro.org>
2093
2094 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
2095 arch/aarch64-insn.h.
2096 (struct aarch64_memory_operand): Likewise.
2097 (ENCODE): Likewise.
2098 (emit_insn): Move to arch/aarch64-insn.c.
2099 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
2100 (emit_load_store): Move to arch/aarch64-insn.c.
2101 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
2102 (can_encode_int32): Remove.
2103
246994ce
YQ
21042015-10-12 Yao Qi <yao.qi@linaro.org>
2105
2106 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
2107 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
2108 (aarch64_relocate_instruction): Likewise.
2109 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
2110 (struct aarch64_insn_visitor): Likewise.
2111
0badd99f
YQ
21122015-10-12 Yao Qi <yao.qi@linaro.org>
2113
2114 * linux-aarch64-low.c (struct aarch64_insn_data): New.
2115 (struct aarch64_insn_visitor): New.
2116 (struct aarch64_insn_relocation_data): New.
2117 (aarch64_ftrace_insn_reloc_b): New function.
2118 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2119 (aarch64_ftrace_insn_reloc_cb): Likewise.
2120 (aarch64_ftrace_insn_reloc_tb): Likewise.
2121 (aarch64_ftrace_insn_reloc_adr): Likewise.
2122 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
2123 (aarch64_ftrace_insn_reloc_others): Likewise.
2124 (visitor): New.
2125 (aarch64_relocate_instruction): Use visitor.
2126
dfaffe9d
YQ
21272015-10-12 Yao Qi <yao.qi@linaro.org>
2128
2129 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
2130 int. Add argument buf.
2131 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
2132 aarch64_relocate_instruction.
2133
70b439f0
YQ
21342015-10-12 Yao Qi <yao.qi@linaro.org>
2135
2136 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
2137 argument insn. Remove local variable insn. Don't call
2138 target_read_uint32.
2139 (aarch64_install_fast_tracepoint_jump_pad): Call
2140 target_read_uint32.
2141
7781c06f
YQ
21422015-09-30 Yao Qi <yao.qi@linaro.org>
2143
2144 * linux-aarch64-low.c (emit_movk): Shorten a long line.
2145 (emit_load_store_pair): Likewise.
2146
9a3c8263
SM
21472015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2148
2149 * dll.c (match_dll): Add cast(s).
2150 (unloaded_dll): Likewise.
2151 * linux-low.c (second_thread_of_pid_p): Likewise.
2152 (delete_lwp_callback): Likewise.
2153 (count_events_callback): Likewise.
2154 (select_event_lwp_callback): Likewise.
2155 (linux_set_resume_request): Likewise.
2156 * server.c (accumulate_file_name_length): Likewise.
2157 (emit_dll_description): Likewise.
2158 (handle_qxfer_threads_worker): Likewise.
2159 (visit_actioned_threads): Likewise.
2160 * thread-db.c (any_thread_of): Likewise.
2161 * tracepoint.c (same_process_p): Likewise.
2162 (match_blocktype): Likewise.
2163 (build_traceframe_info_xml): Likewise.
2164
224c3ddb
SM
21652015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2166
2167 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
2168 assignment.
2169 (gdb_unparse_agent_expr): Likewise.
2170 * hostio.c (require_data): Likewise.
2171 (handle_pread): Likewise.
2172 * linux-low.c (disable_regset): Likewise.
2173 (fetch_register): Likewise.
2174 (store_register): Likewise.
2175 (get_dynamic): Likewise.
2176 (linux_qxfer_libraries_svr4): Likewise.
2177 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
2178 (set_fast_tracepoint_jump): Likewise.
2179 (uninsert_fast_tracepoint_jumps_at): Likewise.
2180 (reinsert_fast_tracepoint_jumps_at): Likewise.
2181 (validate_inserted_breakpoint): Likewise.
2182 (clone_agent_expr): Likewise.
2183 * regcache.c (init_register_cache): Likewise.
2184 * remote-utils.c (putpkt_binary_1): Likewise.
2185 (decode_M_packet): Likewise.
2186 (decode_X_packet): Likewise.
2187 (look_up_one_symbol): Likewise.
2188 (relocate_instruction): Likewise.
2189 (monitor_output): Likewise.
2190 * server.c (handle_search_memory): Likewise.
2191 (handle_qxfer_exec_file): Likewise.
2192 (handle_qxfer_libraries): Likewise.
2193 (handle_qxfer): Likewise.
2194 (handle_query): Likewise.
2195 (handle_v_cont): Likewise.
2196 (handle_v_run): Likewise.
2197 (captured_main): Likewise.
2198 * target.c (write_inferior_memory): Likewise.
2199 * thread-db.c (try_thread_db_load_from_dir): Likewise.
2200 * tracepoint.c (init_trace_buffer): Likewise.
2201 (add_tracepoint_action): Likewise.
2202 (add_traceframe): Likewise.
2203 (add_traceframe_block): Likewise.
2204 (cmd_qtdpsrc): Likewise.
2205 (cmd_qtdv): Likewise.
2206 (cmd_qtstatus): Likewise.
2207 (response_source): Likewise.
2208 (response_tsv): Likewise.
2209 (cmd_qtnotes): Likewise.
2210 (gdb_collect): Likewise.
2211 (initialize_tracepoint): Likewise.
2212
afbe19f8
PL
22132015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2214
2215 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
2216 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
2217 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
2218 <NOP>: New.
2219 (enum aarch64_condition_codes): New enum.
2220 (w0): New static global.
2221 (fp): Likewise.
2222 (lr): Likewise.
2223 (struct aarch64_memory_operand) <type>: New
2224 MEMORY_OPERAND_POSTINDEX type.
2225 (postindex_memory_operand): New helper function.
2226 (emit_ret): New function.
2227 (emit_load_store_pair): New function, factored out of emit_stp
2228 with support for MEMORY_OPERAND_POSTINDEX.
2229 (emit_stp): Rewrite using emit_load_store_pair.
2230 (emit_ldp): New function.
2231 (emit_load_store): Likewise.
2232 (emit_ldr): Mention post-index instruction in comment.
2233 (emit_ldrh): New function.
2234 (emit_ldrb): New function.
2235 (emit_ldrsw): Mention post-index instruction in comment.
2236 (emit_str): Likewise.
2237 (emit_subs): New function.
2238 (emit_cmp): Likewise.
2239 (emit_and): Likewise.
2240 (emit_orr): Likewise.
2241 (emit_orn): Likewise.
2242 (emit_eor): Likewise.
2243 (emit_mvn): Likewise.
2244 (emit_lslv): Likewise.
2245 (emit_lsrv): Likewise.
2246 (emit_asrv): Likewise.
2247 (emit_mul): Likewise.
2248 (emit_sbfm): Likewise.
2249 (emit_sbfx): Likewise.
2250 (emit_ubfm): Likewise.
2251 (emit_ubfx): Likewise.
2252 (emit_csinc): Likewise.
2253 (emit_cset): Likewise.
2254 (emit_nop): Likewise.
2255 (emit_ops_insns): New helper function.
2256 (emit_pop): Likewise.
2257 (emit_push): Likewise.
2258 (aarch64_emit_prologue): New function.
2259 (aarch64_emit_epilogue): Likewise.
2260 (aarch64_emit_add): Likewise.
2261 (aarch64_emit_sub): Likewise.
2262 (aarch64_emit_mul): Likewise.
2263 (aarch64_emit_lsh): Likewise.
2264 (aarch64_emit_rsh_signed): Likewise.
2265 (aarch64_emit_rsh_unsigned): Likewise.
2266 (aarch64_emit_ext): Likewise.
2267 (aarch64_emit_log_not): Likewise.
2268 (aarch64_emit_bit_and): Likewise.
2269 (aarch64_emit_bit_or): Likewise.
2270 (aarch64_emit_bit_xor): Likewise.
2271 (aarch64_emit_bit_not): Likewise.
2272 (aarch64_emit_equal): Likewise.
2273 (aarch64_emit_less_signed): Likewise.
2274 (aarch64_emit_less_unsigned): Likewise.
2275 (aarch64_emit_ref): Likewise.
2276 (aarch64_emit_if_goto): Likewise.
2277 (aarch64_emit_goto): Likewise.
2278 (aarch64_write_goto_address): Likewise.
2279 (aarch64_emit_const): Likewise.
2280 (aarch64_emit_call): Likewise.
2281 (aarch64_emit_reg): Likewise.
2282 (aarch64_emit_pop): Likewise.
2283 (aarch64_emit_stack_flush): Likewise.
2284 (aarch64_emit_zero_ext): Likewise.
2285 (aarch64_emit_swap): Likewise.
2286 (aarch64_emit_stack_adjust): Likewise.
2287 (aarch64_emit_int_call_1): Likewise.
2288 (aarch64_emit_void_call_2): Likewise.
2289 (aarch64_emit_eq_goto): Likewise.
2290 (aarch64_emit_ne_goto): Likewise.
2291 (aarch64_emit_lt_goto): Likewise.
2292 (aarch64_emit_le_goto): Likewise.
2293 (aarch64_emit_gt_goto): Likewise.
2294 (aarch64_emit_ge_got): Likewise.
2295 (aarch64_emit_ops_impl): New static global variable.
2296 (aarch64_emit_ops): New target function, return
2297 &aarch64_emit_ops_impl.
2298 (struct linux_target_ops): Install it.
2299
bb903df0
PL
23002015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2301
2302 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
2303 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
2304 aarch64-ipa.o.
2305 * linux-aarch64-ipa.c: New file.
2306 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
2307 and endian.h.
2308 (aarch64_get_thread_area): New target method.
2309 (extract_signed_bitfield): New helper function.
2310 (aarch64_decode_ldr_literal): New function.
2311 (enum aarch64_opcodes): New enum.
2312 (struct aarch64_register): New struct.
2313 (struct aarch64_operand): New struct.
2314 (x0): New static global.
2315 (x1): Likewise.
2316 (x2): Likewise.
2317 (x3): Likewise.
2318 (x4): Likewise.
2319 (w2): Likewise.
2320 (ip0): Likewise.
2321 (sp): Likewise.
2322 (xzr): Likewise.
2323 (aarch64_register): New helper function.
2324 (register_operand): Likewise.
2325 (immediate_operand): Likewise.
2326 (struct aarch64_memory_operand): New struct.
2327 (offset_memory_operand): New helper function.
2328 (preindex_memory_operand): Likewise.
2329 (enum aarch64_system_control_registers): New enum.
2330 (ENCODE): New macro.
2331 (emit_insn): New helper function.
2332 (emit_b): New function.
2333 (emit_bcond): Likewise.
2334 (emit_cb): Likewise.
2335 (emit_tb): Likewise.
2336 (emit_blr): Likewise.
2337 (emit_stp): Likewise.
2338 (emit_ldp_q_offset): Likewise.
2339 (emit_stp_q_offset): Likewise.
2340 (emit_load_store): Likewise.
2341 (emit_ldr): Likewise.
2342 (emit_ldrsw): Likewise.
2343 (emit_str): Likewise.
2344 (emit_ldaxr): Likewise.
2345 (emit_stxr): Likewise.
2346 (emit_stlr): Likewise.
2347 (emit_data_processing_reg): Likewise.
2348 (emit_data_processing): Likewise.
2349 (emit_add): Likewise.
2350 (emit_sub): Likewise.
2351 (emit_mov): Likewise.
2352 (emit_movk): Likewise.
2353 (emit_mov_addr): Likewise.
2354 (emit_mrs): Likewise.
2355 (emit_msr): Likewise.
2356 (emit_sevl): Likewise.
2357 (emit_wfe): Likewise.
2358 (append_insns): Likewise.
2359 (can_encode_int32_in): New helper function.
2360 (aarch64_relocate_instruction): New function.
2361 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
2362 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
2363 (struct linux_target_ops): Install aarch64_get_thread_area,
2364 aarch64_install_fast_tracepoint_jump_pad and
2365 aarch64_get_min_fast_tracepoint_insn_len.
2366
787749ea
PL
23672015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2368
2369 * Makefile.in (aarch64-insn.o): New rule.
2370 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
2371
9812b2e6
YQ
23722015-09-21 Yao Qi <yao.qi@linaro.org>
2373
2374 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
2375
18fe412b
YQ
23762015-09-21 Yao Qi <yao.qi@linaro.org>
2377
2378 * tracepoint.c (max_jump_pad_size): Remove.
2379
a0cc84cd
YQ
23802015-09-18 Yao Qi <yao.qi@linaro.org>
2381
2382 * linux-aarch64-low.c: Don't include sys/uio.h.
2383 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
2384
d78908cf
WW
23852015-09-16 Wei-cheng Wang <cole945@gmail.com>
2386
2387 * tracepoint.c (eval_result_type): Change prototype.
2388 (condition_true_at_tracepoint): Fix argument to compiled_cond.
2389
d57e0d50
PA
23902015-09-15 Pedro Alves <palves@redhat.com>
2391
2392 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
2393 Check whether to report exec events instead of checking whether
2394 multiprocess is enabled.
2395
5a676acc
PA
23962015-09-15 Pedro Alves <palves@redhat.com>
2397
2398 PR remote/18965
2399 * remote-utils.c (prepare_resume_reply): Merge
2400 TARGET_WAITKIND_VFORK_DONE switch case with the
2401 TARGET_WAITKIND_FORKED case.
2402
7c5d0fad
YQ
24032015-09-15 Yao Qi <yao.qi@linaro.org>
2404
2405 * server.c (handle_query): Check string comparison using
2406 "else if" instead of "if".
2407
750ce8d1
YQ
24082015-09-15 Yao Qi <yao.qi@linaro.org>
2409
2410 * server.c (vCont_supported): New global variable.
2411 (handle_query): Set vCont_supported to 1 if "vContSupported+"
2412 matches. Append ";vContSupported+" to own_buf.
2413 (handle_v_requests): Append ";s;S" to own_buf if target supports
2414 hardware single step or vCont_supported is false.
2415 (capture_main): Set vCont_supported to zero.
2416
70b90b91
YQ
24172015-09-15 Yao Qi <yao.qi@linaro.org>
2418
2419 * linux-low.c (linux_supports_conditional_breakpoints): Rename
2420 it to ...
2421 (linux_supports_hardware_single_step): ... New function.
2422 (linux_target_ops): Update.
2423 * lynx-low.c (lynx_target_ops): Set field
2424 supports_hardware_single_step to target_can_do_hardware_single_step.
2425 * nto-low.c (nto_target_ops): Likewise.
2426 * spu-low.c (spu_target_ops): Likewise.
2427 * win32-low.c (win32_target_ops): Likewise.
2428 * target.c (target_can_do_hardware_single_step): New function.
2429 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2430 Remove. <supports_hardware_single_step>: New field.
2431 (target_supports_conditional_breakpoints): Remove.
2432 (target_supports_hardware_single_step): New macro.
2433 (target_can_do_hardware_single_step): Declare.
2434 * server.c (handle_query): Use target_supports_hardware_single_step
2435 instead of target_supports_conditional_breakpoints.
2436
ade90bde
YQ
24372015-09-15 Yao Qi <yao.qi@linaro.org>
2438
2439 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
2440 function.
2441 (struct linux_target_ops the_low_target): Install
2442 aarch64_linux_siginfo_fixup.
2443
94585166
DB
24442015-09-11 Don Breazeal <donb@codesourcery.com>
2445 Luis Machado <lgustavo@codesourcery.com>
2446
2447 * linux-low.c (linux_mourn): Static declaration.
2448 (linux_arch_setup): Move in front of
2449 handle_extended_wait.
2450 (linux_arch_setup_thread): New function.
2451 (handle_extended_wait): Handle exec events. Call
2452 linux_arch_setup_thread. Make event_lwp argument a
2453 pointer-to-a-pointer.
2454 (check_zombie_leaders): Do not check stopped threads.
2455 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
2456 (linux_low_filter_event): Add lwp and thread for exec'ing
2457 non-leader thread if leader thread has been deleted.
2458 Refactor code into linux_arch_setup_thread and call it.
2459 Pass child lwp pointer by reference to handle_extended_wait.
2460 (linux_wait_for_event_filtered): Update comment.
2461 (linux_wait_1): Prevent clobbering exec event status.
2462 (linux_supports_exec_events): New function.
2463 (linux_target_ops) <supports_exec_events>: Initialize new member.
2464 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
2465 new member.
2466 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
2467 * server.c (report_exec_events): New global variable.
2468 (handle_query): Handle qSupported query for exec-events feature.
2469 (captured_main): Initialize report_exec_events.
2470 * server.h (report_exec_events): Declare new global variable.
2471 * target.h (struct target_ops) <supports_exec_events>: New
2472 member.
2473 (target_supports_exec_events): New macro.
2474 * win32-low.c (win32_target_ops) <supports_exec_events>:
2475 Initialize new member.
2476
0568462b
MM
24772015-09-09 Markus Metzger <markus.t.metzger@intel.com>
2478
2479 * linux-low.c (linux_low_enable_btrace): Remove.
2480 (linux_target_ops): Replace linux_low_enable_btrace with
2481 linux_enable_btrace.
2482
39edd165
YQ
24832015-09-03 Yao Qi <yao.qi@linaro.org>
2484
2485 * linux-aarch64-low.c (aarch64_insert_point): Call
2486 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
2487 returns true.
2488
1db33b5a
UW
24892015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2490
2491 * linux-low.c (check_stopped_by_breakpoint): Use
2492 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
2493
ab290430
PA
24942015-08-27 Pedro Alves <palves@redhat.com>
2495
2496 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
2497
8d749320
SM
24982015-08-26 Simon Marchi <simon.marchi@ericsson.com>
2499
6711b7f8
SM
2500 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
2501 the XNEW-family equivalent.
8d749320
SM
2502 (compile_bytecodes): Likewise.
2503 * dll.c (loaded_dll): Likewise.
2504 * event-loop.c (append_callback_event): Likewise.
2505 (create_file_handler): Likewise.
2506 (create_file_event): Likewise.
2507 * hostio.c (handle_open): Likewise.
2508 * inferiors.c (add_thread): Likewise.
2509 (add_process): Likewise.
2510 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
2511 * linux-arm-low.c (arm_new_process): Likewise.
2512 (arm_new_thread): Likewise.
2513 * linux-low.c (add_to_pid_list): Likewise.
2514 (linux_add_process): Likewise.
2515 (handle_extended_wait): Likewise.
2516 (add_lwp): Likewise.
2517 (enqueue_one_deferred_signal): Likewise.
2518 (enqueue_pending_signal): Likewise.
2519 (linux_resume_one_lwp_throw): Likewise.
2520 (linux_resume_one_thread): Likewise.
2521 (linux_read_memory): Likewise.
2522 (linux_write_memory): Likewise.
2523 * linux-mips-low.c (mips_linux_new_process): Likewise.
2524 (mips_linux_new_thread): Likewise.
2525 (mips_add_watchpoint): Likewise.
2526 * linux-x86-low.c (initialize_low_arch): Likewise.
2527 * lynx-low.c (lynx_add_process): Likewise.
2528 * mem-break.c (set_raw_breakpoint_at): Likewise.
2529 (set_breakpoint): Likewise.
2530 (add_condition_to_breakpoint): Likewise.
2531 (add_commands_to_breakpoint): Likewise.
2532 (clone_agent_expr): Likewise.
2533 (clone_one_breakpoint): Likewise.
2534 * regcache.c (new_register_cache): Likewise.
2535 * remote-utils.c (look_up_one_symbol): Likewise.
2536 * server.c (queue_stop_reply): Likewise.
2537 (start_inferior): Likewise.
2538 (queue_stop_reply_callback): Likewise.
2539 (handle_target_event): Likewise.
2540 * spu-low.c (fetch_ppc_memory): Likewise.
2541 (store_ppc_memory): Likewise.
2542 * target.c (set_target_ops): Likewise.
2543 * thread-db.c (thread_db_load_search): Likewise.
2544 (try_thread_db_load_1): Likewise.
2545 * tracepoint.c (add_tracepoint): Likewise.
2546 (add_tracepoint_action): Likewise.
2547 (create_trace_state_variable): Likewise.
2548 (cmd_qtdpsrc): Likewise.
2549 (cmd_qtro): Likewise.
2550 (add_while_stepping_state): Likewise.
2551 * win32-low.c (child_add_thread): Likewise.
2552 (get_image_name): Likewise.
2553
ed8b7b42
YQ
25542015-08-25 Yao Qi <yao.qi@linaro.org>
2555
2556 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
2557
db3cb7cb
YQ
25582015-08-25 Yao Qi <yao.qi@linaro.org>
2559
2560 * Makefile.in (aarch64-linux.o): New rule.
2561 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
2562 srv_tgtobj.
2563 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
2564 (aarch64_init_debug_reg_state): Make it extern.
2565 (aarch64_linux_prepare_to_resume): Remove.
2566
f6011a1c
YQ
25672015-08-25 Yao Qi <yao.qi@linaro.org>
2568
2569 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
2570 lwp_arch_private_info and ptid_of_lwp.
2571
88e2cf7e
YQ
25722015-08-25 Yao Qi <yao.qi@linaro.org>
2573
2574 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
2575 Find proc_info by find_process_pid. All callers updated.
2576
5e35436e
YQ
25772015-08-25 Yao Qi <yao.qi@linaro.org>
2578
2579 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
2580 Remove.
2581 (debug_reg_change_callback): Remove.
2582 (aarch64_notify_debug_reg_change): Remove.
2583
4a8a7965
YQ
25842015-08-25 Yao Qi <yao.qi@linaro.org>
2585
2586 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
2587 Call current_lwp_ptid.
2588
32a271ee
YQ
25892015-08-25 Yao Qi <yao.qi@linaro.org>
2590
2591 * linux-aarch64-low.c (debug_reg_change_callback): Use
2592 debug_printf.
2593
0d51c8d7
YQ
25942015-08-25 Yao Qi <yao.qi@linaro.org>
2595
2596 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
2597
31a43dd5
YQ
25982015-08-25 Yao Qi <yao.qi@linaro.org>
2599
2600 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
2601
8ee52567
YQ
26022015-08-25 Yao Qi <yao.qi@linaro.org>
2603
2604 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
2605 the code.
2606
ff3f0f45
YQ
26072015-08-25 Yao Qi <yao.qi@linaro.org>
2608
2609 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
2610 Remove.
2611 (debug_reg_change_callback): Remove argument entry and add argument
2612 lwp. Remove local variable thread. Don't print thread id in the
2613 debugging output. Don't check whether pid of thread equals to pid.
2614 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
2615 iterate_over_lwps instead find_inferior.
2616
3d40fbb5
PA
26172015-08-24 Pedro Alves <palves@redhat.com>
2618
2619 * inferiors.c (get_first_process): New function.
2620 * inferiors.h (get_first_process): New declaration.
2621 * remote-utils.c (read_ptid): Default to the first process in the
2622 list, instead of to the current thread's process.
2623
438e1e42
PA
26242015-08-24 Pedro Alves <palves@redhat.com>
2625
2626 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
2627 * event-loop.c: Likewise.
2628 * remote-utils.c: Likewise.
2629 * tracepoint.c: Likewise.
2630
a8c6d4fc
PA
26312015-08-24 Pedro Alves <palves@redhat.com>
2632
2633 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
2634 ptid_get_lwp.
2635
99b0bb12
PA
26362015-08-21 Pedro Alves <palves@redhat.com>
2637
2638 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
2639 instead of literal 1.
2640
f8904751
PA
26412015-08-21 Pedro Alves <palves@redhat.com>
2642
2643 * tdesc.c (default_description): Explicitly zero-initialize.
2644
465a859e
PA
26452015-08-21 Pedro Alves <palves@redhat.com>
2646
2647 PR gdb/18749
2648 * inferiors.c (remove_thread): Discard any pending stop reply for
2649 this thread.
2650 * server.c (remove_all_on_match_pid): Rename to ...
2651 (remove_all_on_match_ptid): ... this. Work with a filter ptid
2652 instead of a pid.
2653 (discard_queued_stop_replies): Change parameter to a ptid. Now
2654 extern.
2655 (handle_v_kill, kill_inferior_callback, captured_main)
2656 (process_serial_event): Adjust.
2657 * server.h (discard_queued_stop_replies): Declare.
2658
f0db101d
PA
26592015-08-21 Pedro Alves <palves@redhat.com>
2660
2661 * linux-low.c (wait_for_sigstop): Always switch to no thread
2662 selected if the previously current thread dies.
2663 * lynx-low.c (lynx_request_interrupt): Use the first thread's
2664 process instead of the current thread's.
2665 * remote-utils.c (input_interrupt): Don't check if there's no
2666 current thread.
2667 * server.c (gdb_read_memory, gdb_write_memory): If setting the
2668 current thread to the general thread fails, error out.
2669 (handle_qxfer_auxv, handle_qxfer_libraries)
2670 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
2671 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
2672 (handle_query): Check if there's a thread selected instead of
2673 checking whether there's any thread in the thread list.
2674 (handle_qxfer_threads, handle_qxfer_btrace)
2675 (handle_qxfer_btrace_conf): Don't error out early if there's no
2676 thread in the thread list.
2677 (handle_v_cont, myresume): Don't set the current thread to the
2678 continue thread.
2679 (process_serial_event) <Hg handling>: Also set thread_id if the
2680 previous general thread is still alive.
2681 (process_serial_event) <g/G handling>: If setting the current
2682 thread to the general thread fails, error out.
2683 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
2684 thread's lwp instead of the current thread's.
2685 * target.c (set_desired_thread): If the desired thread was not
2686 found, leave the current thread pointing to NULL. Return an int
2687 (boolean) indicating success.
2688 * target.h (set_desired_thread): Change return type to int.
2689
40045d91
MF
26902015-08-20 Max Filippov <jcmvbkbc@gmail.com>
2691
2692 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
2693 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
2694 #includes.
2695 (ps_get_thread_area): New function.
2696
45face3b
GB
26972015-08-19 Gary Benson <gbenson@redhat.com>
2698
2699 * hostio.c (handle_pread): Do not attempt to read more data
2700 than hostio_reply_with_data can fit in a packet.
2701
16d5f642
JB
27022015-08-18 Joel Brobecker <brobecker@adacore.com>
2703
2704 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
2705
a738da3a
MF
27062015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
2707
2708 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
2709
33ebda9d
PA
27102015-08-06 Pedro Alves <palves@redhat.com>
2711
2712 * tracepoint.c (expr_eval_result): Now an int.
2713
a44892be
PA
27142015-08-06 Pedro Alves <palves@redhat.com>
2715
2716 * gdbthread.h (struct regcache): Forward declare.
2717 (struct thread_info) <regcache_data>: Now a struct regcache
2718 pointer.
2719 * inferiors.c (inferior_regcache_data)
2720 (set_inferior_regcache_data): Now work with struct regcache
2721 pointers.
2722 * inferiors.h (struct regcache): Forward declare.
2723 (inferior_regcache_data, set_inferior_regcache_data): Now work
2724 with struct regcache pointers.
2725 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
2726 (free_register_cache_thread): Remove struct regcache pointer
2727 casts.
2728
608a1e46
PA
27292015-08-06 Pedro Alves <palves@redhat.com>
2730
2731 * server.c (captured_main): On error, print the exception message
2732 to stderr, and if run_once is set, throw a quit.
2733
f0ce0d3a
PA
27342015-08-06 Pedro Alves <palves@redhat.com>
2735
2736 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
2737 the current thread.
2738
bf47e248
PA
27392015-08-06 Pedro Alves <palves@redhat.com>
2740
2741 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
2742 reading beyond the passed in buffer length.
2743
b6b9ffcc
PL
27442015-08-06 Pierre Langlois <pierre.langlois@arm.com>
2745
2746 * tracepoint.c (symbol_list) <required>: Remove.
2747
863d01bd
PA
27482015-08-06 Pedro Alves <palves@redhat.com>
2749
2750 * linux-low.c (handle_extended_wait): Set the fork child's suspend
2751 count if stopping and suspending threads.
2752 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
2753 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
2754 (linux_detach): Complete an ongoing step-over.
2755 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
2756 throughout.
2757 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
2758 (linux_wait_1): If passing a signal to the inferior after
2759 finishing a step-over, unsuspend and re-resume all lwps. If we
2760 see a single-step event but the thread should be continuing, don't
2761 pass the trap to gdb.
2762 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
2763 internal_error instead of gdb_assert.
2764 (enqueue_pending_signal): New function.
2765 (check_ptrace_stopped_lwp_gone): Add debug output.
2766 (start_step_over): Use internal_error instead of gdb_assert.
2767 (complete_ongoing_step_over): New function.
2768 (linux_resume_one_thread): Don't resume a suspended thread.
2769 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
2770 it stepping.
2771
00db26fa
PA
27722015-08-06 Pedro Alves <palves@redhat.com>
2773
2774 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
2775 (linux_thread_alive): Use lwp_is_marked_dead.
2776 (extended_event_reported): Delete.
2777 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
2778 instead of extended_event_reported.
2779 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
2780 as well.
2781 (lwp_is_marked_dead): New function.
2782 (lwp_running): Use lwp_is_marked_dead.
2783 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
2784 comment.
2785
ad071a30
PA
27862015-08-06 Pedro Alves <palves@redhat.com>
2787
2788 * linux-low.c (linux_wait_1): Move fork event output out of the
2789 !report_to_gdb check. Pass event_child->waitstatus to
2790 target_waitstatus_to_string instead of ourstatus.
2791
524b57e6
YQ
27922015-08-04 Yao Qi <yao.qi@linaro.org>
2793
2794 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
2795 if current_thread is 32 bit.
2796
6085d6f6
YQ
27972015-08-04 Yao Qi <yao.qi@linaro.org>
2798
2799 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2800 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2801 * server.c (extended_protocol): Remove "static".
2802 * server.h (extended_protocol): Declare it.
2803
8a7e4587
YQ
28042015-08-04 Yao Qi <yao.qi@linaro.org>
2805
2806 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
2807 both aarch64 and aarch32.
2808 (aarch64_set_pc): Likewise.
2809
3b53ae99
YQ
28102015-08-04 Yao Qi <yao.qi@linaro.org>
2811
2812 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
2813 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
2814 arm-with-neon.xml to srv_xmlfiles.
2815 * linux-aarch64-low.c: Include linux-aarch32-low.h.
2816 (is_64bit_tdesc): New function.
2817 (aarch64_linux_read_description): New function.
2818 (aarch64_arch_setup): Call aarch64_linux_read_description.
2819 (regs_info): Rename to regs_info_aarch64.
2820 (aarch64_regs_info): Return right regs_info.
2821 (initialize_low_arch): Call initialize_low_arch_aarch32.
2822
bd9e6534
YQ
28232015-08-04 Yao Qi <yao.qi@linaro.org>
2824
2825 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
2826 * linux-aarch32-low.c: New file.
2827 * linux-aarch32-low.h: New file.
2828 * linux-arm-low.c (arm_fill_gregset): Move it to
2829 linux-aarch32-low.c.
2830 (arm_store_gregset): Likewise.
2831 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
2832 (arm_store_vfpregset): Call arm_store_vfpregset_num.
2833 (arm_arch_setup): Check if PTRACE_GETREGSET works.
2834 (regs_info): Rename to regs_info_arm.
2835 (arm_regs_info): Return regs_info_aarch32 if
2836 have_ptrace_getregset is 1 and target description is
2837 arm_with_neon or arm_with_vfpv3.
2838 (initialize_low_arch): Don't call init_registers_arm_with_neon.
2839 Call initialize_low_arch_aarch32 instead.
2840
ded48a5e
YQ
28412015-08-04 Yao Qi <yao.qi@linaro.org>
2842
2843 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
2844 * linux-low.c: ... here.
2845 * linux-low.h (have_ptrace_getregset): Declare it.
2846
96e9210f
PA
28472015-08-04 Pedro Alves <palves@redhat.com>
2848
2849 * thread-db.c (struct thread_db): Use new typedefs.
2850 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
2851 CHK calls.
2852 (disable_thread_event_reporting): Cast result of dlsym to
2853 destination function pointer type.
2854 (thread_db_mourn): Use td_ta_delete_ftype.
2855
af60a1ef
SL
28562015-08-03 Sandra Loosemore <sandra@codesourcery.com>
2857
2858 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
2859 arch variant.
2860 (CDX_BREAKPOINT): Define for R2.
2861 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
2862 (the_low_target): Add comments.
2863
e8b41681
YQ
28642015-07-30 Yao Qi <yao.qi@linaro.org>
2865
2866 * linux-arm-low.c (arm_hwcap): Remove it.
2867 (arm_read_description): New local variable arm_hwcap. Don't
2868 set arm_hwcap to zero.
2869
89abb039
YQ
28702015-07-30 Yao Qi <yao.qi@linaro.org>
2871
2872 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
2873 Use regcache->tdesc instead.
2874 (arm_store_wmmxregset): Likewise.
2875 (arm_fill_vfpregset): Likewise.
2876 (arm_store_vfpregset): Likewise.
2877
deca266c
YQ
28782015-07-30 Yao Qi <yao.qi@linaro.org>
2879
2880 * linux-arm-low.c: Include arch/arm.h.
2881 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
2882 (arm_store_gregset): Likewise.
2883
aa58a496
SM
28842015-07-29 Simon Marchi <simon.marchi@ericsson.com>
2885
2886 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
2887 ptrace's 4th parameter.
2888
50904b25
YQ
28892015-07-27 Yao Qi <yao.qi@linaro.org>
2890
2891 * configure.srv (case aarch64*-*-linux*): Don't set
2892 srv_linux_usrregs.
2893
5826e159
PA
28942015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
2895
2896 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
2897 sys/ptrace.h.
2898 * linux-arm-low.c: Likewise.
2899 * linux-cris-low.c: Likewise.
2900 * linux-crisv32-low.c: Likewise.
2901 * linux-low.c: Likewise.
2902 * linux-m68k-low.c: Likewise.
2903 * linux-mips-low.c: Likewise.
2904 * linux-nios2-low.c: Likewise.
2905 * linux-s390-low.c: Likewise.
2906 * linux-sparc-low.c: Likewise.
2907 * linux-tic6x-low.c: Likewise.
2908 * linux-tile-low.c: Likewise.
2909 * linux-x86-low.c: Likewise.
2910
54019719
PA
29112015-07-24 Pedro Alves <palves@redhat.com>
2912
2913 * config.in: Regenerate.
2914 * configure: Regenerate.
2915
eb7aa561
PA
29162015-07-24 Pedro Alves <palves@redhat.com>
2917
2918 * acinclude.m4: Include ../ptrace.m4.
2919 * configure.ac: Call GDB_AC_PTRACE.
2920 * config.in, configure: Regenerate.
2921
55d7b841
YQ
29222015-07-24 Yao Qi <yao.qi@linaro.org>
2923
2924 * linux-low.c (linux_create_inferior): Remove setting to
2925 proc->priv->new_inferior.
2926 (linux_attach): Likewise.
2927 (linux_low_filter_event): Likewise.
2928 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
2929
c06cbd92
YQ
29302015-07-24 Yao Qi <yao.qi@linaro.org>
2931
2932 * linux-low.c (linux_arch_setup): New function.
2933 (linux_low_filter_event): If proc->tdesc is NULL and
2934 proc->attached is true, call the_low_target.arch_setup.
2935 Otherwise, keep status pending, and return.
2936 (linux_resume_one_lwp_throw): Don't call get_pc if
2937 thread->while_stepping isn't NULL. Don't call
2938 get_thread_regcache if proc->tdesc is NULL.
2939 (need_step_over_p): Return 0 if proc->tdesc is NULL.
2940 (linux_target_ops): Install arch_setup.
2941 * server.c (start_inferior): Call the_target->arch_setup.
2942 * target.h (struct target_ops) <arch_setup>: New field.
2943 (target_arch_setup): New marco.
2944 * lynx-low.c (lynx_target_ops): Update.
2945 * nto-low.c (nto_target_ops): Update.
2946 * spu-low.c (spu_target_ops): Update.
2947 * win32-low.c (win32_target_ops): Update.
2948
5ae3ebba
YQ
29492015-07-24 Yao Qi <yao.qi@linaro.org>
2950
2951 * linux-low.c (linux_add_process): Don't set
2952 proc->priv->new_inferior.
2953 (linux_create_inferior): Set proc->priv->new_inferior to 1.
2954 (linux_attach): Likewise.
2955
eb97750b
YQ
29562015-07-24 Yao Qi <yao.qi@linaro.org>
2957
2958 * server.c (start_inferior): Code refactor.
2959
51aee833
YQ
29602015-07-24 Yao Qi <yao.qi@linaro.org>
2961
2962 * server.c (process_serial_event): Set general_thread.
2963
af1b22f3
YQ
29642015-07-21 Yao Qi <yao.qi@linaro.org>
2965
2966 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
2967 aarch64_linux_get_debug_reg_capacity.
2968
554717a3
YQ
29692015-07-17 Yao Qi <yao.qi@linaro.org>
2970
2971 * Makefile.in (aarch64-linux-hw-point.o): New rule.
2972 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
2973 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
2974 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
2975 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
2976 (AARCH64_HWP_ALIGNMENT): Likewise.
2977 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
2978 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
2979 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
2980 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
2981 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
2982 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
2983 (struct aarch64_debug_reg_state): Likewise.
2984 (struct arch_lwp_info): Likewise.
2985 (aarch64_align_watchpoint): Likewise.
2986 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
2987 (aarch64_watchpoint_length): Likewise.
2988 (aarch64_point_encode_ctrl_reg): Likewise
2989 (aarch64_point_is_aligned): Likewise.
2990 (aarch64_align_watchpoint): Likewise.
2991 (aarch64_linux_set_debug_regs):
2992 (aarch64_dr_state_insert_one_point): Likewise.
2993 (aarch64_dr_state_remove_one_point): Likewise.
2994 (aarch64_handle_breakpoint): Likewise.
2995 (aarch64_handle_aligned_watchpoint): Likewise.
2996 (aarch64_handle_unaligned_watchpoint): Likewise.
2997 (aarch64_handle_watchpoint): Likewise.
2998
c67ca4de
YQ
29992015-07-17 Yao Qi <yao.qi@linaro.org>
3000
3001 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
3002 and don't aarch64_get_debug_reg_state. All callers update.
3003 (aarch64_handle_aligned_watchpoint): Likewise.
3004 (aarch64_handle_unaligned_watchpoint): Likewise.
3005 (aarch64_handle_watchpoint): Likewise.
3006 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
3007 (aarch64_remove_point): Likewise.
3008
25abf979
YQ
30092015-07-17 Yao Qi <yao.qi@linaro.org>
3010
3011 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
3012 debug_printf.
3013 (aarch64_handle_unaligned_watchpoint): Likewise.
3014
db1ff28b
JK
30152015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3016
3017 Revert the previous 3 commits:
3018 Move gdb_regex* to common/
3019 Move linux_find_memory_regions_full & co.
3020 gdbserver build-id attribute generator
3021
700ca40f
JK
30222015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3023 Jan Kratochvil <jan.kratochvil@redhat.com>
3024
3025 gdbserver build-id attribute generator.
3026 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
3027 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
3028 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
3029 (find_phdr): New.
3030 (get_dynamic): Use find_pdhr to traverse program headers.
3031 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
3032 (compare_mapping_entry_range, struct find_memory_region_callback_data)
3033 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
3034 (get_hex_build_id): New.
3035 (linux_qxfer_libraries_svr4): Add optional build-id attribute
3036 to reply XML document.
3037
9904185c
JK
30382015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3039 Jan Kratochvil <jan.kratochvil@redhat.com>
3040
3041 * target.c: Include target/target-utils.h and fcntl.h.
3042 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
3043 (target_fileio_read_stralloc): New functions.
3044
6e5b4429
JK
30452015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3046
3047 * Makefile.in (OBS): Add gdb_regex.o.
3048 (gdb_regex.o): New.
3049 * config.in: Rebuilt.
3050 * configure: Rebuilt.
3051
ddc98fbf
JK
30522015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3053 Jan Kratochvil <jan.kratochvil@redhat.com>
3054
3055 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
3056 * Makefile.in (OBS): Add target-utils.o.
3057 (linux-maps.o, target-utils.o): New.
3058 * configure.srv (srv_linux_obj): Add linux-maps.o.
3059
e57bb7a0
PL
30602015-07-15 Pierre Langlois <pierre.langlois@arm.com>
3061
3062 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
3063 function, return 1.
3064 (the_low_target): Install it.
3065
586b02a9
PA
30662015-07-14 Pedro Alves <palves@redhat.com>
3067
3068 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
3069 Instead, ignore ECHILD, and throw an error for other errnos.
3070
58c1b36c
PA
30712015-07-10 Pedro Alves <palves@redhat.com>
3072
3073 * event-loop.c (struct callback_event) <data>: Change type to
3074 gdb_client_data instance instead of gdb_client_data pointer.
3075 (append_callback_event): Adjust.
3076
421530db
PL
30772015-07-10 Pierre Langlois <pierre.langlois@arm.com>
3078
3079 * linux-aarch64-low.c: Add comments for each linux_target_ops
3080 method. Remove comments already covered in target_ops and
3081 linux_target_ops definitions.
3082 (the_low_target): Add comments for each unimplemented method.
3083
c2d65f38
YQ
30842015-07-09 Yao Qi <yao.qi@linaro.org>
3085
3086 * linux-aarch64-low.c (aarch64_regmap): Remove.
3087 (aarch64_usrregs_info): Remove.
3088 (regs_info): Set field usrregs to NULL.
3089
b20a6524
MM
30902015-07-02 Markus Metzger <markus.t.metzger@intel.com>
3091
3092 * linux-low.c: Include "rsp-low.h"
3093 (linux_low_encode_pt_config, linux_low_encode_raw): New.
3094 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
3095 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
3096 (handle_btrace_enable_pt): New.
3097 (handle_btrace_general_set): Support "pt".
3098 (handle_btrace_conf_general_set): Support "pt:size".
3099
96c97461
PL
31002015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3101
3102 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
3103 Z_PACKET_SW_BP.
3104
37d66942
PL
31052015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3106
3107 * linux-aarch64-low.c: Remove comment about endianness.
3108 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
3109 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
3110 memcmp.
3111
dc06243f
GB
31122015-06-24 Gary Benson <gbenson@redhat.com>
3113
3114 * linux-i386-ipa.c (stdint.h): Do not include.
3115 * lynx-i386-low.c (stdint.h): Likewise.
3116 * lynx-ppc-low.c (stdint.h): Likewise.
3117 * mem-break.c (stdint.h): Likewise.
3118 * thread-db.c (stdint.h): Likewise.
3119 * tracepoint.c (stdint.h): Likewise.
3120 * win32-low.c (stdint.h): Likewise.
3121
124e13d9
SM
31222015-06-18 Simon Marchi <simon.marchi@ericsson.com>
3123
3124 * server.c (write_qxfer_response): Update call to
3125 remote_escape_output.
3126
909c2cda
JK
31272015-06-15 Aleksandar Ristovski <aristovski@qnx.com
3128 Jan Kratochvil <jan.kratochvil@redhat.com>
3129
3130 Merge multiple hex conversions.
3131 * gdbreplay.c (tohex): Rename to 'fromhex'.
3132 (logchar): Use fromhex.
3133
24c05f46
JK
31342015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
3135
3136 * server.c (handle_qxfer_libraries): Set `version' attribute for
3137 <library-list>.
3138
14d2069a
GB
31392015-06-10 Gary Benson <gbenson@redhat.com>
3140
3141 * target.h (struct target_ops) <multifs_open>: New field.
3142 <multifs_unlink>: Likewise.
3143 <multifs_readlink>: Likewise.
3144 * linux-low.c (nat/linux-namespaces.h): New include.
3145 (linux_target_ops): Initialize the_target->multifs_open,
3146 the_target->multifs_unlink and the_target->multifs_readlink.
3147 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
3148 * hostio.c (hostio_fs_pid): New static variable.
3149 (hostio_handle_new_gdb_connection): New function.
3150 (handle_setfs): Likewise.
3151 (handle_open): Use the_target->multifs_open as appropriate.
3152 (handle_unlink): Use the_target->multifs_unlink as appropriate.
3153 (handle_readlink): Use the_target->multifs_readlink as
3154 appropriate.
3155 (handle_vFile): Handle vFile:setfs packets.
3156 * server.c (handle_query): Call hostio_handle_new_gdb_connection
3157 after target_handle_new_gdb_connection.
3158
4b8b5e72
GB
31592015-06-10 Gary Benson <gbenson@redhat.com>
3160
3161 * configure.ac (AC_CHECK_FUNCS): Add setns.
3162 * config.in: Regenerate.
3163 * configure: Likewise.
3164 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
3165 (linux-namespaces.o): New rule.
3166 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
3167
3ac2e371
GB
31682015-06-09 Gary Benson <gbenson@redhat.com>
3169
3170 * hostio.c (handle_open): Process mode argument with
3171 fileio_to_host_mode.
3172
ca9b78ce
YQ
31732015-06-01 Yao Qi <yao.qi@linaro.org>
3174
3175 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
3176 * linux-x86-low.c: Likewise.
3177
bfacd19d
DB
31782015-05-28 Don Breazeal <donb@codesourcery.com>
3179
3180 * linux-low.c (handle_extended_wait): Initialize
3181 thread_info.last_resume_kind for new fork children.
3182
452003ef
PA
31832015-05-15 Pedro Alves <palves@redhat.com>
3184
3185 * target.h (target_handle_new_gdb_connection): Rewrite using if
3186 wrapped in do/while.
3187
1041a03c
JB
31882015-05-14 Joel Brobecker <brobecker@adacore.com>
3189
3190 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
3191 * configure, config.in: Regenerate.
3192 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
3193 Declare typedef.
3194
c269dbdb
DB
31952015-05-12 Don Breazeal <donb@codesourcery.com>
3196
3197 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
3198 PTRACE_EVENT_VFORK_DONE.
3199 (linux_low_ptrace_options, extended_event_reported): Add vfork
3200 events.
3201 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
3202 and "vforkdone" for RSP 'T' Stop Reply Packet.
3203 * server.h (report_vfork_events): Declare
3204 global variable.
3205
3a8a0396
DB
32062015-05-12 Don Breazeal <donb@codesourcery.com>
3207
3208 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
3209 (the_low_target) <new_fork>: Initialize new member.
3210 * linux-arm-low.c (arm_new_fork): New function.
3211 (the_low_target) <new_fork>: Initialize new member.
3212 * linux-low.c (handle_extended_wait): Call new target function
3213 new_fork.
3214 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
3215 * linux-mips-low.c (mips_add_watchpoint): New function
3216 extracted from mips_insert_point.
3217 (the_low_target) <new_fork>: Initialize new member.
3218 (mips_linux_new_fork): New function.
3219 (mips_insert_point): Call mips_add_watchpoint.
3220 * linux-x86-low.c (x86_linux_new_fork): New function.
3221 (the_low_target) <new_fork>: Initialize new member.
3222
de0d863e
DB
32232015-05-12 Don Breazeal <donb@codesourcery.com>
3224
3225 * linux-low.c (handle_extended_wait): Implement return value,
3226 rename argument 'event_child' to 'event_lwp', handle
3227 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
3228 (linux_low_ptrace_options): New function.
3229 (linux_low_filter_event): Call linux_low_ptrace_options,
3230 use different argument fo linux_enable_event_reporting,
3231 use return value from handle_extended_wait.
3232 (extended_event_reported): New function.
3233 (linux_wait_1): Call extended_event_reported and set
3234 status to report fork events.
3235 (linux_write_memory): Add pid to debug message.
3236 (reset_lwp_ptrace_options_callback): New function.
3237 (linux_handle_new_gdb_connection): New function.
3238 (linux_target_ops): Initialize new structure member.
3239 * linux-low.h (struct lwp_info) <waitstatus>: New member.
3240 * lynx-low.c: Initialize new structure member.
3241 * remote-utils.c (prepare_resume_reply): Implement stop reason
3242 "fork" for "T" stop message.
3243 * server.c (handle_query): Call handle_new_gdb_connection.
3244 * server.h (report_fork_events): Declare global flag.
3245 * target.h (struct target_ops) <handle_new_gdb_connection>:
3246 New member.
3247 (target_handle_new_gdb_connection): New macro.
3248 * win32-low.c: Initialize new structure member.
3249
ddcbc397
DB
32502015-05-12 Don Breazeal <donb@codesourcery.com>
3251
3252 * mem-break.c (APPEND_TO_LIST): Define macro.
3253 (clone_agent_expr): New function.
3254 (clone_one_breakpoint): New function.
3255 (clone_all_breakpoints): New function.
3256 * mem-break.h: Declare new functions.
3257
89245bc0
DB
32582015-05-12 Don Breazeal <donb@codesourcery.com>
3259
3260 * linux-low.c (linux_supports_fork_events): New function.
3261 (linux_supports_vfork_events): New function.
3262 (linux_target_ops): Initialize new structure members.
3263 (initialize_low): Call linux_check_ptrace_features.
3264 * lynx-low.c (lynx_target_ops): Initialize new structure
3265 members.
3266 * server.c (report_fork_events, report_vfork_events):
3267 New global flags.
3268 (handle_query): Add new features to qSupported packet and
3269 response.
3270 (captured_main): Initialize new global variables.
3271 * target.h (struct target_ops) <supports_fork_events>:
3272 New member.
3273 <supports_vfork_events>: New member.
3274 (target_supports_fork_events): New macro.
3275 (target_supports_vfork_events): New macro.
3276 * win32-low.c (win32_target_ops): Initialize new structure
3277 members.
3278
835205d0
GB
32792015-05-12 Gary Benson <gbenson@redhat.com>
3280
3281 * server.c (handle_qxfer_exec_file): Use current process
3282 if annex is empty.
3283
21e94bd9
SL
32842015-05-08 Sandra Loosemore <sandra@codesourcery.com>
3285
3286 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
3287 Remove HAVE_PTRACE_GETREGS conditionals.
3288 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
3289 instead of PTRACE_GETREGS and PTRACE_SETREGS.
3290
45614f15
YQ
32912015-05-08 Yao Qi <yao.qi@linaro.org>
3292
3293 * linux-low.c (linux_supports_conditional_breakpoints): New
3294 function.
3295 (linux_target_ops): Install new target method.
3296 * lynx-low.c (lynx_target_ops): Install NULL hook for
3297 supports_conditional_breakpoints.
3298 * nto-low.c (nto_target_ops): Likewise.
3299 * spu-low.c (spu_target_ops): Likewise.
3300 * win32-low.c (win32_target_ops): Likewise.
3301 * server.c (handle_query): Check
3302 target_supports_conditional_breakpoints.
3303 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3304 New field.
3305 (target_supports_conditional_breakpoints): New macro.
3306
80ad801e
PA
33072015-05-06 Pedro Alves <palves@redhat.com>
3308
3309 PR server/18081
3310 * server.c (start_inferior): If the process exits, mourn it.
3311
819843c7
GB
33122015-04-21 Gary Benson <gbenson@redhat.com>
3313
3314 * hostio.c (fileio_open_flags_to_host): Factored out to
3315 fileio_to_host_openflags in common/fileio.c. Single use
3316 updated.
3317
a2d5a9d7
MF
33182015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3319
3320 * linux-xtensa-low.c (xtensa_fill_gregset)
3321 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
3322 XCHAL_HAVE_LOOP.
3323
deb44829
MF
33242015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3325
3326 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
3327 (regs_info): Replace usrregs pointer with NULL.
3328
e57f1de3
GB
33292015-04-17 Gary Benson <gbenson@redhat.com>
3330
3331 * target.h (struct target_ops) <pid_to_exec_file>: New field.
3332 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
3333 * server.c (handle_qxfer_exec_file): New function.
3334 (qxfer_packets): Add exec-file entry.
3335 (handle_query): Report qXfer:exec-file:read as supported packet.
3336
62828379
RN
33372015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
3338
3339 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
3340
b88bb450
GB
33412015-04-09 Gary Benson <gbenson@redhat.com>
3342
3343 * hostio-errno.c (errno_to_fileio_error): Remove function.
3344 Update caller to use remote_fileio_to_fio_error.
3345
c8f4bfdd
YQ
33462015-04-09 Yao Qi <yao.qi@linaro.org>
3347
3348 * linux-low.c (linux_insert_point): Call
3349 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
3350 (linux_remove_point): Call remove_memory_breakpoint if type is
3351 raw_bkpt_type_sw.
3352 * linux-x86-low.c (x86_insert_point): Don't call
3353 insert_memory_breakpoint.
3354 (x86_remove_point): Don't call remove_memory_breakpoint.
3355
41f98f02
PA
33562015-04-01 Pedro Alves <palves@redhat.com>
3357 Cleber Rosa <crosa@redhat.com>
3358
3359 * server.c (gdbserver_usage): Reorganize and extend the usage
3360 message.
3361
2bf6fb9d
PA
33622015-03-24 Pedro Alves <palves@redhat.com>
3363
3364 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
3365 output. Also dump TRAP_TRACE.
3366 (linux_low_filter_event): In debug output, distinguish a
3367 resume_stop SIGSTOP from a delayed SIGSTOP.
3368
369f6daa
GB
33692015-03-24 Gary Benson <gbenson@redhat.com>
3370
3371 * linux-x86-low.c (x86_linux_new_thread): Moved to
3372 nat/x86-linux.c.
3373 (x86_linux_prepare_to_resume): Likewise.
3374
8e5d4070
GB
33752015-03-24 Gary Benson <gbenson@redhat.com>
3376
3377 * Makefile.in (x86-linux-dregs.o): New rule.
3378 * configure.srv: Add x86-linux-dregs.o to relevant targets.
3379 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
3380 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
3381 (x86_linux_dr_get): Likewise.
3382 (x86_linux_dr_set): Likewise.
3383 (update_debug_registers_callback): Likewise.
3384 (x86_linux_dr_set_addr): Likewise.
3385 (x86_linux_dr_get_addr): Likewise.
3386 (x86_linux_dr_set_control): Likewise.
3387 (x86_linux_dr_get_control): Likewise.
3388 (x86_linux_dr_get_status): Likewise.
3389 (x86_linux_update_debug_registers): Likewise.
3390
2b95d440
GB
33912015-03-24 Gary Benson <gbenson@redhat.com>
3392
3393 * linux-x86-low.c (x86_linux_update_debug_registers):
3394 New function, factored out from...
3395 (x86_linux_prepare_to_resume): ...this.
3396
14b0bc68
GB
33972015-03-24 Gary Benson <gbenson@redhat.com>
3398
3399 * linux-x86-low.c (x86_linux_dr_get): Update comments.
3400 (x86_linux_dr_set): Likewise.
3401 (update_debug_registers_callback): Likewise.
3402 (x86_linux_dr_set_addr): Likewise.
3403 (x86_linux_dr_get_addr): Likewise.
3404 (x86_linux_dr_set_control): Likewise.
3405 (x86_linux_dr_get_control): Likewise.
3406 (x86_linux_dr_get_status): Likewise.
3407 (x86_linux_prepare_to_resume): Likewise.
3408
5dfe6ca8
GB
34092015-03-24 Gary Benson <gbenson@redhat.com>
3410
3411 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
3412 Use perror_with_name. Pass string through gettext.
3413 (x86_linux_dr_set): Likewise.
3414
d33472ad
GB
34152015-03-24 Gary Benson <gbenson@redhat.com>
3416
3417 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
3418 (x86_linux_dr_set_addr): ...this.
3419 (x86_dr_low_get_addr): Rename to...
3420 (x86_linux_dr_get_addr): ...this.
3421 (x86_dr_low_set_control): Rename to...
3422 (x86_linux_dr_set_control): ...this.
3423 (x86_dr_low_get_control): Rename to...
3424 (x86_linux_dr_get_control): ...this.
3425 (x86_dr_low_get_status): Rename to...
3426 (x86_linux_dr_get_status): ...this.
3427 (x86_dr_low): Update with new function names.
3428
4b134ca1
GB
34292015-03-24 Gary Benson <gbenson@redhat.com>
3430
3431 * Makefile.in (x86-linux.o): New rule.
3432 * configure.srv: Add x86-linux.o to relevant targets.
3433 * linux-low.c (lwp_set_arch_private_info): New function.
3434 (lwp_arch_private_info): Likewise.
3435 * linux-x86-low.c: Include nat/x86-linux.h.
3436 (arch_lwp_info): Removed structure.
3437 (update_debug_registers_callback):
3438 Use lwp_set_debug_registers_changed.
3439 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
3440 and lwp_set_debug_registers_changed.
3441 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
3442
34c703da
GB
34432015-03-24 Gary Benson <gbenson@redhat.com>
3444
3445 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
3446 * linux-arm-low.c (arm_new_thread): Likewise.
3447 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
3448 * linux-mips-low.c (mips_linux_new_thread): Likewise.
3449 * linux-x86-low.c (x86_linux_new_thread): Likewise.
3450 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
3451
cff068da
GB
34522015-03-24 Gary Benson <gbenson@redhat.com>
3453
3454 * linux-low.c (ptid_of_lwp): New function.
3455 (lwp_is_stopped): Likewise.
3456 (lwp_stop_reason): Likewise.
3457 * linux-x86-low.c (update_debug_registers_callback):
3458 Use lwp_is_stopped.
3459 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
3460 lwp_stop_reason.
3461
b2f7c7e8
GB
34622015-03-24 Gary Benson <gbenson@redhat.com>
3463
3464 * linux-low.h (linux_stop_lwp): Remove declaration.
3465
6d4ee8c6
GB
34662015-03-24 Gary Benson <gbenson@redhat.com>
3467
3468 * linux-low.h: Include nat/linux-nat.h.
3469 * linux-low.c (iterate_over_lwps_args): New structure.
3470 (iterate_over_lwps_filter): New function.
3471 (iterate_over_lwps): Likewise.
3472 * linux-x86-low.c (update_debug_registers_callback):
3473 Update signature to what iterate_over_lwps expects.
3474 Remove PID check that iterate_over_lwps now performs.
3475 (x86_dr_low_set_addr): Use iterate_over_lwps.
3476 (x86_dr_low_set_control): Likewise.
3477
70a0bb6b
GB
34782015-03-24 Gary Benson <gbenson@redhat.com>
3479
3480 * linux-x86-low.c (x86_debug_reg_state): New function.
3481 (x86_linux_prepare_to_resume): Use the above.
3482
7b669087
GB
34832015-03-24 Gary Benson <gbenson@redhat.com>
3484
3485 * linux-low.c (current_lwp_ptid): New function.
3486 * linux-x86-low.c: Include nat/linux-nat.h.
3487 (x86_dr_low_get_addr): Use current_lwp_ptid.
3488 (x86_dr_low_get_control): Likewise.
3489 (x86_dr_low_get_status): Likewise.
3490
eef49a3d
PA
34912015-03-20 Pedro Alves <palves@redhat.com>
3492
3493 * tracepoint.c (cmd_qtstatus): Make "str" const.
3494
b2333d22
PA
34952015-03-20 Pedro Alves <palves@redhat.com>
3496
3497 * server.c (handle_general_set): Make "req_str" const.
3498
23f238d3
PA
34992015-03-19 Pedro Alves <palves@redhat.com>
3500
3501 * linux-low.c (linux_resume_one_lwp): Rename to ...
3502 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
3503 instead call perror_with_name.
3504 (check_ptrace_stopped_lwp_gone): New function.
3505 (linux_resume_one_lwp): Reimplement as wrapper around
3506 linux_resume_one_lwp_throw that swallows errors if the LWP is
3507 gone.
3508
91baf43f
PA
35092015-03-19 Pedro Alves <palves@redhat.com>
3510
3511 * linux-low.c (count_events_callback, select_event_lwp_callback):
3512 No longer check whether the thread has resume_stop as last resume
3513 kind.
3514
8bf3b159
PA
35152015-03-19 Pedro Alves <palves@redhat.com>
3516
3517 * linux-low.c (count_events_callback, select_event_lwp_callback):
3518 Use the lwp's status_pending_p field, not the thread's.
3519
b90fc188
PA
35202015-03-19 Pedro Alves <palves@redhat.com>
3521
3522 * linux-low.c (select_event_lwp_callback): Update comments to
3523 no longer mention SIGTRAP.
3524
464b0089
GB
35252015-03-18 Gary Benson <gbenson@redhat.com>
3526
3527 * server.c (handle_query): Do not report vFile:fstat as supported.
3528
aa9e327f
GB
35292015-03-11 Gary Benson <gbenson@redhat.com>
3530
3531 * hostio.c (sys/types.h): New include.
3532 (sys/stat.h): Likewise.
3533 (common-remote-fileio.h): Likewise.
3534 (handle_fstat): New function.
3535 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 3536
791c0056
GB
35372015-03-11 Gary Benson <gbenson@redhat.com>
3538
3539 * configure.ac (AC_CHECK_MEMBERS): Add checks for
3540 struct stat.st_blocks and struct stat.st_blksize.
3541 * configure: Regenerate.
3542 * config.in: Likewise.
3543 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
3544 (OBS): Add common-remote-fileio.o.
3545 (common-remote-fileio.o): New rule.
3546
9a9df970
PA
35472015-03-09 Pedro Alves <palves@redhat.com>
3548
3549 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
3550 'struct sockaddr' pointer in 'accept' call.
3551
9eb1356e
PA
35522015-03-09 Pedro Alves <palves@redhat.com>
3553
3554 Revert:
3555 2015-03-07 Pedro Alves <palves@redhat.com>
3556 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3557 or <winsock2.h> here. Instead include "gdb_socket.h".
3558 (remote_open): Use union gdb_sockaddr_u.
3559 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3560 or <winsock2.h> here. Instead include "gdb_socket.h".
3561 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3562 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3563 or <sys/un.h>.
3564 (init_named_socket, gdb_agent_helper_thread): Use union
3565 gdb_sockaddr_u.
3566
aac331e4
PA
35672015-03-07 Pedro Alves <palves@redhat.com>
3568
3569 * configure.ac (build_warnings): Move
3570 -Wdeclaration-after-statement to the C-specific set.
3571 * configure: Regenerate.
3572
366c75fc
PA
35732015-03-07 Pedro Alves <palves@redhat.com>
3574
3575 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3576 or <winsock2.h> here. Instead include "gdb_socket.h".
3577 (remote_open): Use union gdb_sockaddr_u.
3578 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3579 or <winsock2.h> here. Instead include "gdb_socket.h".
3580 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3581 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3582 or <sys/un.h>.
3583 (init_named_socket, gdb_agent_helper_thread): Use union
3584 gdb_sockaddr_u.
3585
492d29ea
PA
35862015-03-07 Pedro Alves <palves@redhat.com>
3587
3588 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
3589 instead.
3590
60a191ed
YQ
35912015-03-06 Yao Qi <yao.qi@linaro.org>
3592
3593 * linux-aarch64-low.c (aarch64_insert_point): Use
3594 show_debug_regs as a boolean.
3595 (aarch64_remove_point): Likewise.
3596
f5771b1d
PA
35972015-03-05 Pedro Alves <palves@redhat.com>
3598
3599 * lynx-low.c (lynx_target_ops): Install NULL hooks for
3600 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
3601 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
3602 * nto-low.c (nto_target_ops): Likewise.
3603 * spu-low.c (spu_target_ops): Likewise.
3604 * win32-low.c (win32_target_ops): Likewise.
3605
3e572f71
PA
36062015-03-04 Pedro Alves <palves@redhat.com>
3607
72f4393d 3608 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
3609 Decide whether a breakpoint triggered based on the SIGTRAP's
3610 siginfo.si_code.
72f4393d
L
3611 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
3612 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
3613 (linux_low_filter_event): Check for breakpoints before checking
3614 watchpoints.
3615 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
3616 siginfo.si_code.
72f4393d
L
3617 (linux_stopped_by_sw_breakpoint)
3618 (linux_supports_stopped_by_sw_breakpoint)
3619 (linux_stopped_by_hw_breakpoint)
3620 (linux_supports_stopped_by_hw_breakpoint): New functions.
3621 (linux_target_ops): Install new target methods.
3e572f71 3622
1ec68e26
PA
36232015-03-04 Pedro Alves <palves@redhat.com>
3624
3625 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
3626 * server.c (swbreak_feature, hwbreak_feature): New globals.
3627 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
3628 (captured_main): Clear swbreak_feature and hwbreak_feature.
3629 * server.h (swbreak_feature, hwbreak_feature): Declare.
3630 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
3631 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
3632 supports_stopped_by_hw_breakpoint>: New fields.
3633 (target_supports_stopped_by_sw_breakpoint)
3634 (target_stopped_by_sw_breakpoint)
3635 (target_supports_stopped_by_hw_breakpoint)
3636 (target_stopped_by_hw_breakpoint): Declare.
3637
15c66dd6
PA
36382015-03-04 Pedro Alves <palves@redhat.com>
3639
3640 enum lwp_stop_reason -> enum target_stop_reason
3641 * linux-low.c (check_stopped_by_breakpoint): Adjust.
3642 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
3643 (linux_wait_1, stuck_in_jump_pad_callback)
3644 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
3645 (linux_stopped_by_watchpoint):
3646 * linux-low.h (enum lwp_stop_reason): Delete.
3647 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
3648 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3649
98fc70d6
YQ
36502015-03-04 Yao Qi <yao.qi@linaro.org>
3651
3652 * Makefile.in (SFILES): Add linux-aarch64-low.c.
3653
dd2ac174
GB
36542015-03-03 Gary Benson <gbenson@redhat.com>
3655
3656 * hostio.c (handle_vFile): Fix prefix lengths.
3657
d68e53f4
MM
36582015-03-03 Markus Metzger <markus.t.metzger@intel.com>
3659
3660 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
3661 ptr_bits.
3662
bf2d68ab
AA
36632015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
3664
3665 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
3666 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
3667 (clean): Add "rm -f" for above C files.
3668 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
3669 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
3670 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
3671 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
3672 * linux-s390-low.c (HWCAP_S390_VX): New macro.
3673 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
3674 (init_registers_s390x_vx_linux64)
3675 (init_registers_s390x_tevx_linux64)
3676 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
3677 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
3678 declarations.
3679 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
3680 (s390_store_vxrs_high): New functions.
3681 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
3682 NT_S390_VXRS_HIGH.
3683 (s390_arch_setup): Add logic for selecting one of the new target
3684 descriptions. Activate the new vector regsets if applicable.
3685 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
3686 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
3687 and init_registers_s390x_tevx_linux64.
3688
c966a859
PA
36892015-03-01 Pedro Alves <palves@redhat.com>
3690
3691 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
3692 parameter.
3693
4180215b
PA
36942015-02-27 Pedro Alves <palves@redhat.com>
3695
3696 * linux-x86-low.c (u_debugreg_offset): New function.
3697 (x86_linux_dr_get, x86_linux_dr_set): Use it.
3698
749bab01
PA
36992015-02-27 Pedro Alves <palves@redhat.com>
3700
3701 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
3702 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
3703 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
3704 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3705 (ps_lsetfpregs, ps_getpid)
3706 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
3707 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
3708 (ps_lsetxregs, ps_plog): Declare.
3709
3c14e5a3
PA
37102015-02-27 Pedro Alves <palves@redhat.com>
3711
3712 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
3713 IP_AGENT_EXPORT_FUNC.
3714 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
3715 IP_AGENT_EXPORT_FUNC.
3716 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
3717 (IP_AGENT_EXPORT): Delete.
3718 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3719 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3720 (gdb_trampoline_buffer_error, collecting, gdb_collect)
3721 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
3722 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
3723 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
3724 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
3725 (traceframe_read_count, traceframe_write_count)
3726 (traceframes_created, trace_state_variables, get_raw_reg)
3727 (get_trace_state_variable_value, set_trace_state_variable_value)
3728 (ust_loaded, helper_thread_id, cmd_buf): Use
3729 IPA_SYM_EXPORTED_NAME.
3730 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
3731 (tracepoints) Use IP_AGENT_EXPORT_VAR.
3732 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
3733 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3734 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
3735 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
3736 EXTERN_C_PUSH/EXTERN_C_POP.
3737 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
3738 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
3739 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3740 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
3741 (traceframe_write_count, traceframe_read_count)
3742 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
3743 (about_to_request_buffer_space, get_trace_state_variable_value)
3744 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
3745 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
3746 EXTERN_C_PUSH/EXTERN_C_POP.
3747 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
3748 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
3749 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
3750 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3751 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3752 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3753 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
3754 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
3755 Define.
3756 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
3757 (IP_AGENT_EXPORT_VAR_DECL): Define.
3758 (tracing): Declare.
3759 (gdb_agent_get_raw_reg): Declare.
3760
fe978cb0
PA
37612015-02-27 Tom Tromey <tromey@redhat.com>
3762 Pedro Alves <palves@redhat.com>
3763
3764 Rename symbols whose names are reserved C++ keywords throughout.
3765
3bc3d82a
PA
37662015-02-27 Pedro Alves <palves@redhat.com>
3767
3768 * Makefile.in (COMPILER): New, get it from autoconf.
3769 (CXX): Get from autoconf instead.
3770 (COMPILE.pre): Use COMPILER.
3771 (CC-LD): Rename to ...
3772 (CC_LD): ... this. Use COMPILER.
3773 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
3774 (CXX_FOR_TARGET): Default to g++ instead of gcc.
3775 * acinclude.m4: Include build-with-cxx.m4.
3776 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
3777 Disable -Werror by default if building in C++ mode.
3778 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
3779 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
3780 the C++ compiler. Save/restore CXXFLAGS too.
3781 * configure: Regenerate.
3782
07697489
PA
37832015-02-27 Pedro Alves <palves@redhat.com>
3784
3785 * acinclude.m4: Include libiberty.m4.
3786 * configure.ac: Call libiberty_INIT.
3787 * config.in, configure: Regenerate.
3788
9beb7c4e
PA
37892015-02-26 Pedro Alves <palves@redhat.com>
3790
3791 * linux-low.c (linux_wait_1): When incrementing the PC past a
3792 program breakpoint always use the_low_target.breakpoint_len as
3793 increment, rather than the maximum between that and
3794 the_low_target.decr_pc_after_break.
3795
8090aef2
PA
37962015-02-23 Pedro Alves <palves@redhat.com>
3797
3798 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
3799 thread was doing a step-over; always adjust the PC if
3800 we stepped over a permanent breakpoint.
3801 (linux_wait_1): If we stepped over breakpoint that was on top of a
3802 permanent breakpoint, manually advance the PC past it.
3803
bc9540e8
PA
38042015-02-23 Pedro Alves <palves@redhat.com>
3805
3806 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
3807 modes.
3808 (x86_fill_gregset, x86_store_gregset): Use it when handling
3809 $orig_eax.
3810
2db9a427
PA
38112015-02-20 Pedro Alves <palves@redhat.com>
3812
3813 * thread-db.c: Include "nat/linux-procfs.h".
3814 (thread_db_init): Skip listing new threads if the kernel supports
3815 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
3816
afa8d396
PA
38172015-02-20 Pedro Alves <palves@redhat.com>
3818
3819 * linux-low.c (status_pending_p_callback): Use ptid_match.
3820
c9587f88
AT
38212015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
3822
3823 PR breakpoints/16812
3824 * linux-low.c (wstatus_maybe_breakpoint): Remove.
3825 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
3826 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
3827
b05ec7a5
AT
38282015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
3829
3830 PR breakpoints/15956
3831 * tracepoint.c (cmd_qtinit): Add check for current_thread.
3832
d33501a5
MM
38332015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3834
3835 * linux-low.c (linux_low_btrace_conf): Print size.
3836 * server.c (handle_btrace_conf_general_set): New.
3837 (hanle_general_set): Call handle_btrace_conf_general_set.
3838 (handle_query): Report Qbtrace-conf:bts:size as supported.
3839
f4abbc16
MM
38402015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3841
3842 * linux-low.c (linux_low_enable_btrace): Update parameters.
3843 (linux_low_btrace_conf): New.
3844 (linux_target_ops)<to_btrace_conf>: Initialize.
3845 * server.c (current_btrace_conf): New.
3846 (handle_btrace_enable): Rename to ...
3847 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
3848 to target_enable_btrace. Update comment. Update users.
3849 (handle_qxfer_btrace_conf): New.
3850 (qxfer_packets): Add btrace-conf entry.
3851 (handle_query): Report qXfer:btrace-conf:read as supported packet.
3852 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
3853 (target_ops)<read_btrace_conf>: New.
3854 (target_enable_btrace): Update parameters.
3855 (target_read_btrace_conf): New.
3856
043c3577
MM
38572015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3858
3859 * server.c (handle_btrace_general_set): Remove call to
3860 target_supports_btrace.
3861 (supported_btrace_packets): New.
3862 (handle_query): Call supported_btrace_packets.
3863 * target.h: include btrace-common.h.
3864 (btrace_target_info): Removed.
3865 (supports_btrace, target_supports_btrace): Update parameters.
3866
734b0e4b
MM
38672015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3868
3869 * Makefile.in (SFILES): Add common/btrace-common.c.
3870 (OBS): Add common/btrace-common.o.
3871 (btrace-common.o): Add build rules.
3872 * linux-low: Include btrace-common.h.
3873 (linux_low_read_btrace): Use struct btrace_data. Call
3874 btrace_data_init and btrace_data_fini.
3875
d6c146e9
PA
38762015-02-06 Pedro Alves <palves@redhat.com>
3877
3878 * thread-db.c (find_new_threads_callback): Add debug output.
3879
20ba1ce6
PA
38802015-02-04 Pedro Alves <palves@redhat.com>
3881
3882 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
3883 (resume_stopped_resumed_lwps): New function.
3884 (linux_wait_for_event_filtered): Use it.
3885
8cc73a39
SDJ
38862015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
3887
3888 * Makefile.in (SFILES): Add linux-personality.c.
3889 (linux-personality.o): New rule.
3890 * configure.srv (srv_linux_obj): Add linux-personality.o to the
3891 list of objects to be built.
3892 * linux-low.c: Include nat/linux-personality.h.
3893 (linux_create_inferior): Remove code to disable address space
3894 randomization (moved to ../nat/linux-personality.c). Create
3895 cleanup to disable address space randomization.
3896
fb23d554
SDJ
38972015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
3898
3899 * Makefile.in (posix-strerror.o): New rule.
3900 (mingw-strerror.o): Likewise.
3901 * configure: Regenerated.
3902 * configure.ac: Source file ../common/common.host. Initialize new
3903 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
3904
cdf43629
YQ
39052015-01-14 Yao Qi <yao@codesourcery.com>
3906
3907 * Makefile.in (SFILES): Add nat/ppc-linux.c.
3908 (ppc-linux.o): New rule.
3909 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
3910 * configure.ac: AC_CHECK_FUNCS(getauxval).
3911 * config.in: Re-generated.
3912 * configure: Re-generated.
3913 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
3914 ppc64_64bit_inferior_p
3915
514c5338
YQ
39162015-01-14 Yao Qi <yao@codesourcery.com>
3917
3918 * linux-ppc-low.c: Include "nat/ppc-linux.h".
3919 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
3920 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
3921 (PT_ORIG_R3, PT_TRAP): Likewise.
3922 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
3923 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
3924 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
3925
3368c1e5
JB
39262015-01-10 Joel Brobecker <brobecker@adacore.com>
3927
3928 * i387-fp.c (i387_cache_to_xsave): In look over
3929 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
3930 zmmh_low_space field by use of zmmh_high_space.
3931
582511be
PA
39322015-01-09 Pedro Alves <palves@redhat.com>
3933
3934 * linux-low.c (step_over_bkpt): Move higher up in the file.
3935 (handle_extended_wait): Don't store the stop_pc here.
3936 (get_stop_pc): Adjust comments and rename to ...
3937 (check_stopped_by_breakpoint): ... this. Record whether the LWP
3938 stopped for a software breakpoint or hardware breakpoint.
3939 (thread_still_has_status_pending_p): New function.
3940 (status_pending_p_callback): Use
3941 thread_still_has_status_pending_p. If the event is no longer
3942 interesting, resume the LWP.
3943 (handle_tracepoints): Add assert.
3944 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
3945 (wstatus_maybe_breakpoint): New function.
3946 (cancel_breakpoint): Delete function.
3947 (check_stopped_by_watchpoint): New function, factored out from
3948 linux_low_filter_event.
3949 (lp_status_maybe_breakpoint): Delete function.
3950 (linux_low_filter_event): Remove filter_ptid argument.
3951 Leave thread group exits pending here. Store the LWP's stop PC.
3952 Always leave events pending.
3953 (linux_wait_for_event_filtered): Pull all events out of the
3954 kernel, and leave them all pending.
3955 (count_events_callback, select_event_lwp_callback): Consider all
3956 events.
3957 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
3958 (select_event_lwp): Only give preference to the stepping LWP in
3959 all-stop mode. Adjust comments.
3960 (ignore_event): New function.
3961 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
3962 references to cancel_breakpoints. Adjust to renames. Also give
3963 equal priority to all LWPs that have had events in non-stop mode.
3964 If reporting a software breakpoint event, unadjust the LWP's PC.
3965 (linux_wait): If linux_wait_1 returned an ignored event, retry.
3966 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
3967 Adjust.
3968 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
3969 (resume_status_pending_p): Use thread_still_has_status_pending_p.
3970 (linux_stopped_by_watchpoint): Adjust.
3971 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
3972 * linux-low.h (enum lwp_stop_reason): New.
3973 (struct lwp_info) <stop_pc>: Adjust comment.
3974 <stopped_by_watchpoint>: Delete field.
3975 <stop_reason>: New field.
3976 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3977 * mem-break.c (software_breakpoint_inserted_here)
3978 (hardware_breakpoint_inserted_here): New function.
3979 * mem-break.h (software_breakpoint_inserted_here)
3980 (hardware_breakpoint_inserted_here): Declare.
3981 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
3982 (cancel_breakpoints): Delete.
3983 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
3984 (upload_fast_traceframes): Remove references to
3985 cancel_breakpoints.
3986
a33e3959
PA
39872015-01-09 Pedro Alves <palves@redhat.com>
3988
3989 * thread-db.c (find_new_threads_callback): Ignore thread if the
3990 kernel thread ID is -1.
3991
8784d563
PA
39922015-01-09 Pedro Alves <palves@redhat.com>
3993
3994 * linux-low.c (linux_attach_fail_reason_string): Move to
3995 nat/linux-ptrace.c, and rename.
3996 (linux_attach_lwp): Update comment.
3997 (attach_proc_task_lwp_callback): New function.
3998 (linux_attach): Adjust to rename and use
3999 linux_proc_attach_tgid_threads.
4000 (linux_attach_fail_reason_string): Delete declaration.
4001
76f2b779
JB
40022015-01-01 Joel Brobecker <brobecker@adacore.com>
4003
4004 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
4005 * server.c (gdbserver_version): Likewise.
4006
fafcc06a
SDJ
40072014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
4008
4009 * remote-utils.c: Include ctype.h.
4010 (input_interrupt): Explicitly handle the case when the char
4011 received is the NUL byte. Improve the printing of non-ASCII
4012 characters.
4013
beed38b8
JB
40142014-12-16 Joel Brobecker <brobecker@adacore.com>
4015
4016 * linux-low.c (linux_low_filter_event): Update call to
4017 linux_enable_event_reporting following the addition of
4018 a new parameter to that function.
4019
bf330350
CU
40202014-12-16 Catalin Udma <catalin.udma@freescale.com>
4021
4022 PR server/17457
4023 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
4024 (AARCH64_FPCR_REGNO): Likewise.
4025 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
4026 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
4027 (aarch64_store_fpregset): Likewise.
4028
5227d625
JB
40292014-12-15 Joel Brobecker <brobecker@adacore.com>
4030
4031 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
4032 Remove FIXME comment about assumption about N.
4033
f93b65a0
JB
40342014-12-13 Joel Brobecker <brobecker@adacore.com>
4035
4036 * configure.ac: If large-file support is disabled in GDBserver,
4037 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
4038 * configure: Regenerate.
4039
e5a9158d
AA
40402014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4041
4042 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
4043 warning upon ENODATA from ptrace.
4044 * linux-s390-low.c (s390_store_tdb): New.
4045 (s390_regsets): Add regset for NT_S390_TDB.
4046
feea5f36
AA
40472014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4048
4049 * linux-low.c (regsets_store_inferior_registers): Skip regsets
4050 without a fill_function.
4051 * linux-s390-low.c (s390_fill_last_break): Remove.
4052 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
4053 (s390_arch_setup): Use regset's size instead of fill_function for
4054 loop end condition.
4055
098dbe61
AA
40562014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4057
4058 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
4059 the regset's store function when ptrace returned an error.
4060 * regcache.c (get_thread_regcache): Invalidate register cache
4061 before fetching inferior's registers.
4062
28eef672
AA
40632014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4064
4065 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
4066 while-loop as for-loop.
4067 (regsets_store_inferior_registers): Likewise.
4068
bdca27a2
YQ
40692014-11-28 Yao Qi <yao@codesourcery.com>
4070
4071 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
4072 * config.in, configure: Re-generate.
4073 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
4074 is defined.
4075
9c232dda
YQ
40762014-11-21 Yao Qi <yao@codesourcery.com>
4077
4078 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
4079 (AC_CHECK_HEADERS): Remove malloc.h.
4080 * configure: Re-generated.
4081 * config.in: Re-generated.
4082 * server.h: Don't include alloca.h and malloc.h.
4083 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
4084 Don't include malloc.h.
4085
43968415
JB
40862014-11-17 Joel Brobecker <brobecker@adacore.com>
4087
4088 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
4089 corresponding ERRNO check in same block.
4090
40e91bc7
PA
40912014-11-12 Pedro Alves <palves@redhat.com>
4092
4093 * server.c (cont_thread): Update comment.
4094 (start_inferior, attach_inferior): No longer clear cont_thread.
4095 (handle_v_cont): No longer set cont_thread.
4096 (captured_main): Clear cont_thread each time a GDB connects.
4097
c2c118cf
PA
40982014-11-12 Pedro Alves <palves@redhat.com>
4099
4100 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
4101 thread, and don't resume all threads if the Hc thread has exited.
4102
78708b7c
PA
41032014-11-12 Pedro Alves <palves@redhat.com>
4104
4105 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
4106 the process group instead of to a specific LWP.
4107
a2abc7de
PA
41082014-10-15 Pedro Alves <palves@redhat.com>
4109
4110 PR server/17487
4111 * win32-arm-low.c (arm_set_thread_context): Remove current_event
4112 parameter.
4113 (arm_set_thread_context): Delete.
4114 (the_low_target): Adjust.
4115 * win32-i386-low.c (debug_registers_changed)
4116 (debug_registers_used): Delete.
4117 (update_debug_registers_callback): New function.
4118 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
4119 needing to update their debug registers.
4120 (win32_get_current_dr): New function.
4121 (x86_dr_low_get_addr, x86_dr_low_get_control)
4122 (x86_dr_low_get_status): Fetch the debug register from the thread
4123 record's context.
4124 (i386_initial_stuff): Adjust.
4125 (i386_get_thread_context): Remove current_event parameter. Don't
4126 clear debug_registers_changed nor copy DR values to
4127 debug_reg_state.
4128 (i386_set_thread_context): Delete.
4129 (i386_prepare_to_resume): New function.
4130 (i386_thread_added): Mark the thread as needing to update irs
4131 debug registers.
4132 (the_low_target): Remove i386_set_thread_context and install
4133 i386_prepare_to_resume.
4134 * win32-low.c (win32_get_thread_context): Adjust.
4135 (win32_set_thread_context): Use SetThreadContext
4136 directly.
4137 (win32_prepare_to_resume): New function.
4138 (win32_require_context): New function, factored out from ...
4139 (thread_rec): ... this.
4140 (continue_one_thread): Call win32_prepare_to_resume on each thread
4141 we're about to continue.
4142 (win32_resume): Call win32_prepare_to_resume on the event thread.
4143 * win32-low.h (struct win32_thread_info)
4144 <debug_registers_changed>: New field.
4145 (struct win32_target_ops): Change prototype of set_thread_context,
4146 delete set_thread_context and add prepare_to_resume.
4147 (win32_require_context): New declaration.
4148
a442d071
GB
41492014-10-08 Gary Benson <gbenson@redhat.com>
4150
4151 * server.h: Do not include common-exceptions.h.
4152
6f1947e8
GB
41532014-10-08 Gary Benson <gbenson@redhat.com>
4154
4155 * server.h: Do not include cleanups.h.
4156
63b434a4
JH
41572014-09-30 James Hogan <james.hogan@imgtec.com>
4158
4159 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
4160 mips64-dsp-linux.c.
4161
c4d9ceb6
YQ
41622014-09-23 Yao Qi <yao@codesourcery.com>
4163
4164 * linux-low.c (lp_status_maybe_breakpoint): New function.
4165 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
4166 (count_events_callback): Likewise.
4167 (select_event_lwp_callback): Likewise.
4168 (cancel_breakpoints_callback): Likewise.
4169
89a5711c
DB
41702014-09-19 Don Breazeal <donb@codesourcery.com>
4171
4172 * linux-low.c (handle_extended_wait): Call
4173 linux_ptrace_get_extended_event.
4174 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
4175 linux_is_extended_waitstatus.
4176
bffc0964
JB
41772014-09-16 Joel Brobecker <brobecker@adacore.com>
4178
4179 * Makefile.in (CPPFLAGS): Define.
4180 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
4181 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
4182
0bfdf32f
GB
41832014-09-16 Gary Benson <gbenson@redhat.com>
4184
4185 * inferiors.h (current_inferior): Renamed as...
4186 (current_thread): New variable. All uses updated.
4187 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
4188 (maybe_move_out_of_jump_pad): Likewise.
4189 (cancel_breakpoint): Likewise.
4190 (linux_low_filter_event): Likewise.
4191 (wait_for_sigstop): Likewise.
4192 (linux_resume_one_lwp): Likewise.
4193 (need_step_over_p): Likewise.
4194 (start_step_over): Likewise.
4195 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
4196 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
4197 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
4198 and save_inferior as saved_thread.
4199 * regcache.c (get_thread_regcache): Renamed saved_inferior as
4200 saved_thread.
4201 (regcache_invalidate_thread): Likewise.
4202 * remote-utils.c (prepare_resume_reply): Likewise.
4203 * thread-db.c (thread_db_get_tls_address): Likewise.
4204 (disable_thread_event_reporting): Likewise.
4205 (remove_thread_event_breakpoints): Likewise.
4206 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
4207 as saved_thread.
4208 * target.h (set_desired_inferior): Renamed as...
4209 (set_desired_thread): New declaration. All uses updated.
4210 * server.c (myresume): Updated comment to reference thread instead
4211 of inferior.
4212 (handle_serial_event): Likewise.
4213 (handle_target_event): Likewise.
4214
361c8ade
GB
42152014-09-12 Tom Tromey <tromey@redhat.com>
4216 Gary Benson <gbenson@redhat.com>
4217
4218 * regcache.h: Include common-regcache.h.
4219 (regcache_read_pc): Don't declare.
4220 * regcache.c (get_thread_regcache_for_ptid): New function.
4221
bd9269f7
GB
42222014-09-11 Tom Tromey <tromey@redhat.com>
4223 Gary Benson <gbenson@redhat.com>
4224
4225 * symbol.c: New file.
4226 * Makefile.in (SFILES): Add symbol.c.
4227 (OBS): Add symbol.o.
4228
f8c1d06b
GB
42292014-09-11 Gary Benson <gbenson@redhat.com>
4230
4231 * target.c (target_stop_ptid, target_continue_ptid): New
4232 functions.
4233
721ec300
GB
42342014-09-11 Tom Tromey <tromey@redhat.com>
4235 Gary Benson <gbenson@redhat.com>
4236
4237 * target.h: Include target/target.h.
4238 * target.c (target_read_memory, target_read_uint32)
4239 (target_write_memory): New functions.
4240
c5e92cca
GB
42412014-09-11 Gary Benson <gbenson@redhat.com>
4242
4243 * server.h (debug_hw_points): Don't declare.
4244 * server.c (debug_hw_points): Don't define. Replace all uses
4245 with show_debug_regs.
4246 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
4247 all uses with show_debug_regs.
4248
2e4bb98a
EBM
42492014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
4250
4251 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
4252 endianness into account.
4253 (ppc_supply_ptrace_register): Likewise.
4254
ac740bc7
JH
42552014-09-03 James Hogan <james.hogan@imgtec.com>
4256
4257 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
4258 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
4259
97ea6506
GB
42602014-09-03 Gary Benson <gbenson@redhat.com>
4261
4262 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
4263 ALL_DEBUG_ADDRESS_REGISTERS.
4264
df7e5265
GB
42652014-09-02 Gary Benson <gbenson@redhat.com>
4266
4267 * i386-low.h: Renamed as...
4268 * x86-low.h: New file. All type, function and variable name
4269 prefixes changed from "i386_" to "x86_". All references updated.
4270 * i386-low.c: Renamed as...
4271 * x86-low.c: New file. All type, function and variable name
4272 prefixes changed from "i386_" to "x86_". All references updated.
4273
ed859da7
GB
42742014-09-02 Gary Benson <gbenson@redhat.com>
4275
4276 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
4277 (x86_linux_new_thread): Likewise.
4278
860789c7
GB
42792014-08-29 Gary Benson <gbenson@redhat.com>
4280
4281 * server.h (setjmp.h): Do not include.
4282 (toplevel): Do not declare.
4283 (common-exceptions.h): Include.
4284 (cleanups.h): Likewise.
4285 * server.c (toplevel): Do not define.
4286 (exit_code): New static global.
4287 (detach_or_kill_for_exit_cleanup): New function.
4288 (main): New function. Original main renamed to...
4289 (captured_main): New function.
4290 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
4291
ff55e1b5
GB
42922014-08-29 Gary Benson <gbenson@redhat.com>
4293
4294 * Makefile.in (SFILES): Add common/common-exceptions.c.
4295 (OBS): Add common-exceptions.o.
4296 (common-exceptions.o): New rule.
4297 * utils.c (prepare_to_throw_exception): New function.
4298
e9bcb658
GB
42992014-08-29 Gary Benson <gbenson@redhat.com>
4300
4301 * config.in: Regenerate.
4302 * configure: Likewise.
4303
e3180625
GB
43042014-08-29 Gary Benson <gbenson@redhat.com>
4305
4306 * Makefile.in (SFILES): Add common/cleanups.c.
4307 (OBS): cleanups.o.
4308 (cleanups.o): New rule.
4309
e3d6ba5d
GB
43102014-08-29 Gary Benson <gbenson@redhat.com>
4311
4312 * utils.c (internal_vwarning): New function.
4313
7096e886
GB
43142014-08-28 Gary Benson <gbenson@redhat.com>
4315
4316 * utils.h (fatal): Remove declaration.
4317 * utils.c (fatal): Remove function.
4318
14ce3192
GB
43192014-08-28 Gary Benson <gbenson@redhat.com>
4320
4321 * tracepoint.c (gdb_agent_init): Replace fatal with
4322 perror_with_name.
4323 (initialize_tracepoint): Likewise.
4324
50278d59
GB
43252014-08-28 Gary Benson <gbenson@redhat.com>
4326
4327 * remote-utils.c (remote_prepare): Replace fatal with error.
4328
aa96c426
GB
43292014-08-28 Gary Benson <gbenson@redhat.com>
4330
4331 * linux-low.c (linux_async): Replace fatal with warning.
4332 Tidy up and return.
4333 (linux_start_non_stop): Return -1 if linux_async failed.
4334
f7160e97
GB
43352014-08-28 Gary Benson <gbenson@redhat.com>
4336
4337 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
4338 gdb_assert.
4339 (i386_dr_low_get_addr): Remove vague comment.
4340 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
4341 gdb_assert.
4342
38e08fca
GB
43432014-08-28 Gary Benson <gbenson@redhat.com>
4344
4345 * inferiors.c (get_thread_process): Replace check with gdb_assert.
4346 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
4347 internal_error.
4348 (linux_resume_one_lwp): Likewise.
4349 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
4350 gdb_assert.
4351 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
4352 with internal_error.
4353 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
4354 (init_register_cache): Replace fatal with gdb_assert_not_reached.
4355 (find_register_by_name): Replace fatal with internal_error.
4356 (find_regno): Likewise.
4357 * tdesc.c (init_target_desc): Replace check with gdb_assert.
4358 * thread-db.c (thread_db_create_event): Likewise.
4359 (thread_db_load_search): Likewise.
4360 (try_thread_db_load_1): Likewise.
4361 * tracepoint.c (get_jump_space_head): Replace fatal with
4362 internal_error.
4363 (claim_trampoline_space): Likewise.
4364 (have_fast_tracepoint_trampoline_buffer): Likewise.
4365 (cmd_qtstart): Likewise.
4366 (stop_tracing): Likewise.
4367 (fast_tracepoint_collecting): Likewise.
4368 (target_malloc): Likewise.
4369 (download_tracepoint): Likewise.
4370 (download_trace_state_variables): Replace check with gdb_assert.
4371 (upload_fast_traceframes): Replace fatal with internal_error.
4372
34abf635
GB
43732014-08-19 Tom Tromey <tromey@redhat.com>
4374 Gary Benson <gbenson@redhat.com>
4375
4376 * Makefile.in (SFILES): Add common/common-debug.c.
4377 (OBS): Add common-debug.o.
4378 (common-debug.o): New rule.
4379 * debug.h (debug_printf): Don't declare.
4380 * debug.c (debug_printf): Renamed and rewritten as...
4381 (debug_vprintf): New function.
4382
f6e94d78
GB
43832014-08-19 Gary Benson <gbenson@redhat.com>
4384
4385 * utils.h: Do not include print-utils.h.
4386
9239eeab
GB
43872014-08-19 Tom Tromey <tromey@redhat.com>
4388 Gary Benson <gbenson@redhat.com>
4389
4390 * server.h: Add static assertion.
4391 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
4392
ef87c8bb
GB
43932014-08-19 Tom Tromey <tromey@redhat.com>
4394 Gary Benson <gbenson@redhat.com>
4395
4396 * Makefile.in (SFILES): Add common/errors.c.
4397 (OBS): Add errors.o.
4398 (IPA_OBS): Add errors-ipa.o.
4399 (errors.o): New rule.
4400 (errors-ipa.o): Likewise.
4401 * utils.h (perror_with_name, error, warning): Don't declare.
4402 * utils.c (warning): Renamed and rewritten as...
4403 (vwarning): New function.
4404 (error): Renamed and rewritten as...
4405 (verror): New function.
4406 (internal_error): Renamed and rewritten as...
4407 (internal_verror): New function.
4408
bb974a24
GB
44092014-08-07 Gary Benson <gbenson@redhat.com>
4410
4411 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
4412 * configure: Regenerate.
4413 * config.in: Likewise.
4414 * server.h: Do not include errno.h.
4415 * event-loop.c: Likewise.
4416 * hostio-errno.c: Likewise.
4417 * linux-low.c: Likewise.
4418 * remote-utils.c: Likewise.
4419 * spu-low.c: Likewise.
4420 * utils.c: Likewise.
4421 * gdbreplay.c: Unconditionally include errno.h.
4422
6d3d12eb
GB
44232014-08-07 Gary Benson <gbenson@redhat.com>
4424
4425 * server.h: Do not include string.h.
4426 * event-loop.c: Likewise.
4427 * linux-low.c: Likewise.
4428 * regcache.c: Likewise.
4429 * remote-utils.c: Likewise.
4430 * spu-low.c: Likewise.
4431 * utils.c: Likewise.
4432
dccbb609
GB
44332014-08-07 Gary Benson <gbenson@redhat.com>
4434
4435 * server.h: Do not include gdb_assert.h.
4436
e76df0d0
GB
44372014-08-07 Gary Benson <gbenson@redhat.com>
4438
4439 * server.h: Do not include common-utils.h.
4440
4cb9c816
GB
44412014-08-07 Gary Benson <gbenson@redhat.com>
4442
4443 * server.h: Do not include ptid.h.
4444 * notif.h: Likewise.
4445
3995eeee
GB
44462014-08-07 Gary Benson <gbenson@redhat.com>
4447
4448 * server.h: Do not include gdb_locale.h.
4449
cb9f1a9b
GB
44502014-08-07 Gary Benson <gbenson@redhat.com>
4451
4452 * server.h: Do not include gdb/signals.h.
4453 * win32-low.c: Likewise.
4454
a5fceff8
GB
44552014-08-07 Gary Benson <gbenson@redhat.com>
4456
4457 * server.h: Do not include pathmax.h.
4458
b9391142
GB
44592014-08-07 Gary Benson <gbenson@redhat.com>
4460
4461 * server.h: Do not include libiberty.h.
4462 * linux-bfin-low.c: Likewise.
4463
0e443c87
GB
44642014-08-07 Gary Benson <gbenson@redhat.com>
4465
4466 * server.h: Do not include ansidecl.h.
4467
8ebb3f56
GB
44682014-08-07 Gary Benson <gbenson@redhat.com>
4469
4470 * linux-x86-low.c: Do not include stddef.h.
4471 * lynx-ppc-low.c: Likewise.
4472 * tracepoint.c: Likewise.
4473
8980bdf6
GB
44742014-08-07 Gary Benson <gbenson@redhat.com>
4475
4476 * server.h: Do not include stdarg.h.
4477 * nto-low.c: Likewise.
4478
d7096f71
GB
44792014-08-07 Gary Benson <gbenson@redhat.com>
4480
4481 * server.h: Do not include stdlib.h.
4482 * inferiors.c: Likewise.
4483 * linux-low.c: Likewise.
4484 * regcache.c: Likewise.
4485 * spu-low.c: Likewise.
4486 * tracepoint.c: Likewise.
4487 * utils.c: Likewise.
4488
d02f550d
GB
44892014-08-07 Gary Benson <gbenson@redhat.com>
4490
4491 * server.h: Do not include stdio.h.
4492 * linux-low.c: Likewise.
4493 * remote-utils.c: Likewise.
4494 * spu-low.c: Likewise.
4495 * utils.c: Likewise.
4496 * wincecompat.c: Likewise.
4497
87f6c4e3
GB
44982014-08-06 Gary Benson <gbenson@redhat.com>
4499
4500 * regcache.c (init_register_cache): Move conditionals inside if.
4501
7089dca4
GB
45022014-08-06 Gary Benson <gbenson@redhat.com>
4503
4504 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
4505
462f517e
GB
45062014-07-31 Gary Benson <gbenson@redhat.com>
4507
4508 * ax.h: Do not include server.h.
4509 * gdbthread.h: Likewise.
4510 * lynx-low.h: Likewise.
4511 * notif.h: Likewise.
4512
976411d6
GB
45132014-07-30 Gary Benson <gbenson@redhat.com>
4514
4515 * server.h: Include common-defs.h.
4516 Do not include config.h or build-gnulib-gdbserver/config.h.
4517
d41f6d8e
GB
45182014-07-30 Gary Benson <gbenson@redhat.com>
4519
4520 * hostio-errno.c: Move server.h to top of includes list.
4521 * inferiors.c: Likewise.
4522 * linux-x86-low.c: Likewise.
4523 * notif.c: Include server.h.
4524
314c6a35
TT
45252014-07-24 Tom Tromey <tromey@redhat.com>
4526 Gary Benson <gbenson@redhat.com>
4527
4528 * server.h (CORE_ADDR): Now unsigned.
4529
69ff6be5
PA
45302014-07-16 Pedro Alves <palves@redhat.com>
4531
4532 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
4533
ce9e3fe7
PA
45342014-07-15 Pedro Alves <palves@redhat.com>
4535
4536 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
4537 copy.
4538
e76126e8
PA
45392014-07-11 Pedro Alves <palves@redhat.com>
4540
4541 * linux-low.c (kill_wait_lwp): New function, based on
4542 kill_one_lwp_callback, but use my_waitpid directly.
4543 (kill_one_lwp_callback, linux_kill): Use it.
4544
8e9db26e
PA
45452014-06-23 Pedro Alves <palves@redhat.com>
4546
4547 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
4548 before setting DR0..DR3.
4549
698b3e08
GB
45502014-06-20 Gary Benson <gbenson@redhat.com>
4551
4552 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
4553 * configure: Regenerated.
4554 * config.in: Likewise.
4555
125f8a3d
GB
45562014-06-20 Gary Benson <gbenson@redhat.com>
4557
4558 * Makefile.in (SFILES): Update locations for files moved
4559 from common to nat.
4560 (object file files): Reordered.
4561
42995dbd
GB
45622014-06-20 Gary Benson <gbenson@redhat.com>
4563
4564 * i386-low.h (i386_dr_low_can_set_addr): Removed.
4565 (i386_dr_low_set_addr): Likewise.
4566 (i386_dr_low_get_addr): Likewise.
4567 (i386_dr_low_can_set_control): Likewise.
4568 (i386_dr_low_set_control): Likewise.
4569 (i386_dr_low_get_control): Likewise.
4570 (i386_dr_low_get_status): Likewise.
4571 (i386_get_debug_register_length): Likewise.
4572 * linux-x86-low.c (i386_dr_low_set_addr):
4573 Changed signature. Made static.
4574 (i386_dr_low_get_addr): Likewise.
4575 (i386_dr_low_set_control): Likewise.
4576 (i386_dr_low_get_control): Likewise.
4577 (i386_dr_low_get_status): Likewise.
4578 (i386_dr_low): New global variable.
4579 * win32-i386-low.c (i386_dr_low_set_addr):
4580 Changed signature. Made static.
4581 (i386_dr_low_get_addr): Likewise.
4582 (i386_dr_low_set_control): Likewise.
4583 (i386_dr_low_get_control): Likewise.
4584 (i386_dr_low_get_status): Likewise.
4585 (i386_dr_low): New global variable.
4586
e1d2394b
MS
45872014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
4588
4589 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
4590 * Makefile.in (AR, AR_FLAGS): Define.
4591 * configure: Regenerate.
4592
3a8ee006
GB
45932014-06-19 Gary Benson <gbenson@redhat.com>
4594
4595 * Makefile.in (i386-dregs.o): New rule.
4596 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
4597 * i386-low.c (target.h): Remove include.
4598 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
4599 (DR_CONTROL_SHIFT): Likewise.
4600 (DR_CONTROL_SIZE): Likewise.
4601 (DR_RW_EXECUTE): Likewise.
4602 (DR_RW_WRITE): Likewise.
4603 (DR_RW_READ): Likewise.
4604 (DR_RW_IORW): Likewise.
4605 (DR_LEN_1): Likewise.
4606 (DR_LEN_2): Likewise.
4607 (DR_LEN_4): Likewise.
4608 (DR_LEN_8): Likewise.
4609 (DR_LOCAL_ENABLE_SHIFT): Likewise.
4610 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
4611 (DR_ENABLE_SIZE): Likewise.
4612 (DR_LOCAL_SLOWDOWN): Likewise.
4613 (DR_GLOBAL_SLOWDOWN): Likewise.
4614 (DR_CONTROL_RESERVED): Likewise.
4615 (I386_DR_CONTROL_MASK): Likewise.
4616 (I386_DR_VACANT): Likewise.
4617 (I386_DR_LOCAL_ENABLE): Likewise.
4618 (I386_DR_GLOBAL_ENABLE): Likewise.
4619 (I386_DR_DISABLE): Likewise.
4620 (I386_DR_SET_RW_LEN): Likewise.
4621 (I386_DR_GET_RW_LEN): Likewise.
4622 (I386_DR_WATCH_HIT): Likewise.
4623 (i386_wp_op_t): Likewise.
4624 (i386_show_dr): Likewise.
4625 (i386_length_and_rw_bits): Likewise.
4626 (i386_insert_aligned_watchpoint): Likewise.
4627 (i386_remove_aligned_watchpoint): Likewise.
4628 (i386_handle_nonaligned_watchpoint): Likewise.
4629 i386_update_inferior_debug_regs(): Likewise.
4630 (i386_dr_insert_watchpoint): Likewise.
4631 (i386_dr_remove_watchpoint): Likewise.
4632 (i386_dr_region_ok_for_watchpoint): Likewise.
4633 (i386_dr_stopped_data_address): Likewise.
4634 (i386_dr_stopped_by_watchpoint): Likewise.
4635
8f26655c
GB
46362014-06-19 Gary Benson <gbenson@redhat.com>
4637
4638 * i386-low.c (i386_dr_show): Renamed to
4639 i386_show_dr and made static. All uses updated.
4640 (i386_dr_length_and_rw_bits): Renamed to
4641 i386_length_and_rw_bits and made static.
4642 All uses updated.
4643 (i386_dr_insert_aligned_watchpoint): Renamed to
4644 i386_insert_aligned_watchpoint and made static.
4645 All uses updated.
4646 (i386_dr_remove_aligned_watchpoint): Renamed to
4647 i386_remove_aligned_watchpoint and made static.
4648 All uses updated.
4649 (i386_dr_update_inferior_debug_regs): Renamed to
4650 i386_update_inferior_debug_regs and made static.
4651 All uses updated.
4652
b9228891
GB
46532014-06-18 Gary Benson <gbenson@redhat.com>
4654
5171def3
GB
4655 * i386-low.h (i386_dr_low_can_set_addr): New macro.
4656 (i386_dr_low_can_set_control): Likewise.
4657 (i386_get_debug_register_length): Likewise.
4658 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
4659 (i386_dr_low_can_set_control): Likewise.
4660 (i386_get_debug_register_length): Likewise.
4661
46622014-06-17 Gary Benson <gbenson@redhat.com>
4663
b9228891
GB
4664 * i386-low.h (i386-dregs.h): New include.
4665 (DR_FIRSTADDR): Now in i386-dregs.h.
4666 (DR_LASTADDR): Likewise.
4667 (DR_NADDR): Likewise.
4668 (DR_STATUS): Likewise.
4669 (DR_CONTROL): Likewise.
4670 (i386_debug_reg_state): Likewise.
4671 (i386_dr_insert_watchpoint): Likewise.
4672 (i386_dr_remove_watchpoint): Likewise.
4673 (i386_dr_region_ok_for_watchpoint): Likewise.
4674 (i386_dr_stopped_data_address): Likewise.
4675 (i386_dr_stopped_by_watchpoint): Likewise.
4676 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
4677
4be83cc2
GB
46782014-06-18 Gary Benson <gbenson@redhat.com>
4679
4680 * i386-low.h (i386_low_insert_watchpoint): Renamed to
4681 i386_dr_insert_watchpoint.
4682 (i386_low_remove_watchpoint): Renamed to
4683 i386_dr_remove_watchpoint.
4684 (i386_low_region_ok_for_watchpoint): Renamed to
4685 i386_dr_region_ok_for_watchpoint.
4686 (i386_low_stopped_data_address): Renamed to
4687 i386_dr_stopped_data_address.
4688 (i386_low_stopped_by_watchpoint): Renamed to
4689 i386_dr_stopped_by_watchpoint.
4690 * i386-low.c (i386_show_dr): Renamed to
4691 i386_dr_show and made nonstatic. All uses updated.
4692 (i386_length_and_rw_bits): Renamed to
4693 i386_dr_length_and_rw_bits and made nonstatic.
4694 All uses updated.
4695 (i386_insert_aligned_watchpoint): Renamed to
4696 i386_dr_insert_aligned_watchpoint and made nonstatic.
4697 All uses updated.
4698 (i386_remove_aligned_watchpoint): Renamed to
4699 i386_dr_remove_aligned_watchpoint and made nonstatic.
4700 All uses updated.
4701 (i386_update_inferior_debug_regs): Renamed to
4702 i386_dr_update_inferior_debug_regs and made nonstatic.
4703 All uses updated.
4704 (i386_low_insert_watchpoint): Renamed to
4705 i386_dr_insert_watchpoint. All uses updated.
4706 (i386_low_remove_watchpoint): Renamed to
4707 i386_dr_remove_watchpoint. All uses updated.
4708 (i386_low_region_ok_for_watchpoint): Renamed to
4709 i386_dr_region_ok_for_watchpoint. All uses updated.
4710 (i386_low_stopped_data_address): Renamed to
4711 i386_dr_stopped_data_address. All uses updated.
4712 (i386_low_stopped_by_watchpoint): Renamed to
4713 i386_dr_stopped_by_watchpoint. All uses updated.
4714
131aa0d4
GB
47152014-06-18 Gary Benson <gbenson@redhat.com>
4716
4717 * i386-low.c (i386_dr_low_can_set_addr): New macro.
4718 (i386_dr_low_can_set_control): Likewise.
4719 (i386_insert_aligned_watchpoint): New check.
4720
d9305f7f
GB
47212014-06-18 Gary Benson <gbenson@redhat.com>
4722
4723 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
4724 Renamed to state.
4725
e927c9fc
GB
47262014-06-18 Gary Benson <gbenson@redhat.com>
4727
4728 * i386-low.c (i386_length_and_rw_bits): Use internal_error
4729 instead of fatal and error.
4730 (i386_handle_nonaligned_watchpoint): Likewise.
4731
1b6d4134
GB
47322014-06-18 Gary Benson <gbenson@redhat.com>
4733
4734 * i386-low.c (i386_get_debug_register_length): New macro.
4735 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
4736 (i386_show_dr): Use debug_printf instead of fprintf. Use
4737 phex to format values.
4738
6e62758f
GB
47392014-06-18 Gary Benson <gbenson@redhat.com>
4740
4741 * i386-low.h: Comment changes.
4742 * i386-low.c: Likewise.
4743
fc6e2f03
GB
47442014-06-18 Gary Benson <gbenson@redhat.com>
4745
4746 * i386-low.c: Whitespace changes.
4747
f9d1eeed
TT
47482014-06-12 Tom Tromey <tromey@redhat.com>
4749
4750 * utils.c (freeargv): Remove.
4751
0b04e523
TT
47522014-06-12 Tom Tromey <tromey@redhat.com>
4753
4754 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
4755 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
4756 (parse_debug_format_options): Likewise.
4757 (gdbserver_usage): Likewise.
4758 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
4759 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
4760 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
4761 against libiberty.
4762 ($(LIBGNU)): Depend on libiberty.
4763 (all-lib): Recurse into all subdirs.
4764 (install-only): Invoke "install" target in subdirs.
4765 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
4766 targets.
4767 * configure: Rebuild.
4768 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
4769 for vasprintf, vsnprintf, or gettimeofday.
4770 * configure.srv: Don't add safe-ctype.o or lbasename.o to
4771 srv_tgtobj.
4772
270c9937
JB
47732014-06-05 Joel Brobecker <brobecker@adacore.com>
4774
4775 * development.sh: Delete.
4776 * Makefile.in (config.status): Adjust dependency on development.sh.
4777 * configure.ac: Adjust development.sh source call.
4778 * configure: Regenerate.
4779
0a261ed8
PA
47802014-06-02 Pedro Alves <palves@redhat.com>
4781
4782 * ax.c (gdb_free_agent_expr): New function.
4783 * ax.h (gdb_free_agent_expr): New declaration.
4784 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
4785 list.
4786 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
4787 static.
4788 (clear_breakpoint_conditions_and_commands): New function.
4789 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
4790 (clear_breakpoint_conditions_and_commands): New declaration.
4791
e9dae05e
RR
47922014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
4793
4794 * linux-aarch64-low.c (asm/ptrace.h): Include.
4795
5876f503
JK
47962014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
4797
4798 Fix TLS access for -static -pthread.
4799 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
4800 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
4801 (thread_db_load_search, try_thread_db_load_1): Initialize it.
4802
802e8e6d
PA
48032014-05-20 Pedro Alves <palves@redhat.com>
4804
4805 * linux-aarch64-low.c (aarch64_insert_point)
4806 (aarch64_remove_point): No longer check whether the type is
4807 supported here. Adjust to new interface.
4808 (the_low_target): Install aarch64_supports_z_point_type as
4809 supports_z_point_type method.
4810 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
4811 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
4812 instead of a Z packet char. Adjust.
4813 (arm_supports_z_point_type): New function.
4814 (arm_insert_point, arm_remove_point): Adjust to new interface.
4815 (the_low_target): Install arm_supports_z_point_type.
4816 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
4817 (cris_insert_point, cris_remove_point): Adjust to new interface.
4818 Don't check whether the type is supported here.
4819 (the_low_target): Install cris_supports_z_point_type.
4820 * linux-low.c (linux_supports_z_point_type): New function.
4821 (linux_insert_point, linux_remove_point): Adjust to new interface.
4822 * linux-low.h (struct linux_target_ops) <insert_point,
4823 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
4824 raw_breakpoint pointer parameter.
4825 <supports_z_point_type>: New method.
4826 * linux-mips-low.c (mips_supports_z_point_type): New function.
4827 (mips_insert_point, mips_remove_point): Adjust to new interface.
4828 Use mips_supports_z_point_type.
4829 (the_low_target): Install mips_supports_z_point_type.
4830 * linux-ppc-low.c (the_low_target): Install NULL as
4831 supports_z_point_type method.
4832 * linux-s390-low.c (the_low_target): Install NULL as
4833 supports_z_point_type method.
4834 * linux-sparc-low.c (the_low_target): Install NULL as
4835 supports_z_point_type method.
4836 * linux-x86-low.c (x86_supports_z_point_type): New function.
4837 (x86_insert_point): Adjust to new insert_point interface. Use
4838 insert_memory_breakpoint. Adjust to new
4839 i386_low_insert_watchpoint interface.
4840 (x86_remove_point): Adjust to remove_point interface. Use
4841 remove_memory_breakpoint. Adjust to new
4842 i386_low_remove_watchpoint interface.
4843 (the_low_target): Install x86_supports_z_point_type.
4844 * lynx-low.c (lynx_target_ops): Install NULL as
4845 supports_z_point_type callback.
4846 * nto-low.c (nto_supports_z_point_type): New.
4847 (nto_insert_point, nto_remove_point): Adjust to new interface.
4848 (nto_target_ops): Install nto_supports_z_point_type.
4849 * mem-break.c: Adjust intro comment.
4850 (struct raw_breakpoint) <raw_type, size>: New fields.
4851 <inserted>: Update comment.
4852 <shlib_disabled>: Delete field.
4853 (enum bkpt_type) <gdb_breakpoint>: Delete value.
4854 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
4855 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
4856 (raw_bkpt_type_to_target_hw_bp_type): New function.
4857 (find_enabled_raw_code_breakpoint_at): New function.
4858 (find_raw_breakpoint_at): New type and size parameters. Use them.
4859 (insert_memory_breakpoint): New function, based off
4860 set_raw_breakpoint_at.
4861 (remove_memory_breakpoint): New function.
4862 (set_raw_breakpoint_at): Reimplement.
4863 (set_breakpoint): New, based on set_breakpoint_at.
4864 (set_breakpoint_at): Reimplement.
4865 (delete_raw_breakpoint): Go through the_target->remove_point
4866 instead of assuming memory breakpoints.
4867 (find_gdb_breakpoint_at): Delete.
4868 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
4869 (find_gdb_breakpoint): New function.
4870 (set_gdb_breakpoint_at): Delete.
4871 (z_type_supported): New function.
4872 (set_gdb_breakpoint_1): New function, loosely based off
4873 set_gdb_breakpoint_at.
4874 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
4875 (delete_gdb_breakpoint_at): Delete.
4876 (delete_gdb_breakpoint_1): New function, loosely based off
4877 delete_gdb_breakpoint_at.
4878 (delete_gdb_breakpoint): New function.
4879 (clear_gdb_breakpoint_conditions): Rename to ...
4880 (clear_breakpoint_conditions): ... this. Don't handle a NULL
4881 breakpoint.
4882 (add_condition_to_breakpoint): Make static.
4883 (add_breakpoint_condition): Take a struct breakpoint pointer
4884 instead of an address. Adjust.
4885 (gdb_condition_true_at_breakpoint): Rename to ...
4886 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
4887 z_type parameter.
4888 (gdb_condition_true_at_breakpoint): Reimplement.
4889 (add_breakpoint_commands): Take a struct breakpoint pointer
4890 instead of an address. Adjust.
4891 (gdb_no_commands_at_breakpoint): Rename to ...
4892 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
4893 parameter. Return true if no breakpoint was found. Change debug
4894 output.
4895 (gdb_no_commands_at_breakpoint): Reimplement.
4896 (run_breakpoint_commands): Rename to ...
4897 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
4898 and change return type to boolean.
4899 (run_breakpoint_commands): New function.
4900 (gdb_breakpoint_here): Also check for Z1 breakpoints.
4901 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
4902 breakpoint. Go through the_target->remove_point instead of
4903 assuming memory breakpoint.
4904 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
4905 software and hardware breakpoints.
4906 (reinsert_raw_breakpoint): Go through the_target->insert_point
4907 instead of assuming memory breakpoint.
4908 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
4909 software and hardware breakpoints.
4910 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
4911 Check both software and hardware breakpoints.
4912 (validate_inserted_breakpoint): Assert the breakpoint is a
4913 software breakpoint. Set the inserted flag to -1 instead of
4914 setting shlib_disabled.
4915 (delete_disabled_breakpoints): Adjust.
4916 (validate_breakpoints): Only validate software breakpoints.
4917 Adjust to inserted flag change.
4918 (check_mem_read, check_mem_write): Skip breakpoint types other
4919 than software breakpoints. Adjust to inserted flag change.
4920 * mem-break.h (enum raw_bkpt_type): New enum.
4921 (raw_breakpoint, struct process_info): Forward declare.
4922 (Z_packet_to_target_hw_bp_type): Delete declaration.
4923 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
4924 (set_gdb_breakpoint, delete_gdb_breakpoint)
4925 (clear_breakpoint_conditions): New declarations.
4926 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
4927 (breakpoint_inserted_here): Update comment.
4928 (add_breakpoint_condition, add_breakpoint_commands): Replace
4929 address parameter with a breakpoint pointer parameter.
4930 (gdb_breakpoint_here): Update comment.
4931 (delete_gdb_breakpoint_at): Delete.
4932 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
4933 * server.c (process_point_options): Take a struct breakpoint
4934 pointer instead of an address. Adjust.
4935 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
4936 delete_gdb_breakpoint.
4937 * spu-low.c (spu_target_ops): Install NULL as
4938 supports_z_point_type method.
4939 * target.h: Include mem-break.h.
4940 (struct target_ops) <prepare_to_access_memory>: Update comment.
4941 <supports_z_point_type>: New field.
4942 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
4943 instead of a char. Also take a raw breakpoint pointer.
4944 * win32-arm-low.c (the_low_target): Install NULL as
4945 supports_z_point_type.
4946 * win32-i386-low.c (i386_supports_z_point_type): New function.
4947 (i386_insert_point, i386_remove_point): Adjust to new interface.
4948 (the_low_target): Install i386_supports_z_point_type.
4949 * win32-low.c (win32_supports_z_point_type): New function.
4950 (win32_insert_point, win32_remove_point): Adjust to new interface.
4951 (win32_target_ops): Install win32_supports_z_point_type.
4952 * win32-low.h (struct win32_target_ops):
4953 <supports_z_point_type>: New method.
4954 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
4955 instead of a char. Also take a raw breakpoint pointer.
4956
932539e3
PA
49572014-05-20 Pedro Alves <palves@redhat.com>
4958
4959 * mem-break.h: Include break-common.h.
4960 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
4961 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
4962 (Z_packet_to_target_hw_bp_type): New declaration.
4963 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
4964 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
4965 (Z_PACKET_ACCESS_WP): Delete macros.
4966 (Z_packet_to_hw_type): Delete function.
4967 * i386-low.h: Don't include break-common.h here.
4968 (Z_packet_to_hw_type): Delete declaration.
4969 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
4970 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
4971 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
4972 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
4973 * linux-aarch64-low.c: Don't include break-common.h here.
4974 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
4975 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
4976 (Z_packet_to_target_hw_bp_type): Delete function.
4977 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
4978 function.
4979 (mips_insert_point, mips_remove_point): Use
4980 Z_packet_to_target_hw_bp_type.
4981
4ff0d3d8
PA
49822014-05-20 Pedro Alves <palves@redhat.com>
4983
4984 * linux-aarch64-low.c: Include break-common.h.
4985 (enum target_point_type): Delete.
4986 (Z_packet_to_point_type): Rename to ...
4987 (Z_packet_to_target_hw_bp_type): ... this, and return a
4988 target_hw_bp_type instead.
4989 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
4990 instead of an enum target_point_type.
4991 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
4992 breakpoint type.
4993 (aarch64_dr_state_insert_one_point)
4994 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
4995 (aarch64_handle_aligned_watchpoint)
4996 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
4997 Take an enum target_hw_bp_type instead of an enum
4998 target_point_type.
4999 (aarch64_supports_z_point_type): New function.
5000 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
5001 use Z_packet_to_target_hw_bp_type.
5002
786dc519
JB
50032014-05-20 Joel Brobecker <brobecker@adacore.com>
5004
5005 * configure.ac: Only use -Werror by default when DEVELOPMENT
5006 is true.
5007 * configure: Regenerate.
5008
9e0aa64f
JK
50092014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
5010
5011 Fix gdbserver qGetTLSAddr for x86_64 -m32.
5012 * linux-x86-low.c (X86_64_USER_REGS): New.
5013 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
5014
2b577b92
YQ
50152014-04-28 Yao Qi <yao@codesourcery.com>
5016
5017 * Makefile.in (i386-avx512.c): Fix the typo of generated file
5018 name.
5019
94611da2
PA
50202014-04-25 Pedro Alves <palves@redhat.com>
5021
5022 PR server/16255
5023 * linux-low.c (linux_attach_fail_reason_string): New function.
5024 (linux_attach_lwp): Delete.
5025 (linux_attach_lwp_1): Rename to ...
5026 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
5027 argument. Remove "initial" parameter. Return int instead of
5028 void. Don't error or warn here.
5029 (linux_attach): Adjust to call linux_attach_lwp. Call error on
5030 failure to attach to the tgid. Call warning when failing to
5031 attach to an lwp.
5032 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
5033 argument. Remove "initial" parameter. Return int instead of
5034 void. Don't error or warn here.
5035 (linux_attach_fail_reason_string): New declaration.
5036 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
5037 interface change. Use linux_attach_fail_reason_string.
5038
01f9f808
MS
50392014-04-24 Michael Sturm <michael.sturm@mintel.com>
5040 Walfred Tedeschi <walfred.tedeschi@intel.com>
5041
5042 * Makefile.in: Added rules to handle new files
5043 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
5044 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
5045 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
5046 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
5047 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
5048 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
5049 x32-avx512-linux.o.
5050 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
5051 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
5052 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
5053 i386/x32-avx512.xml.
5054 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
5055 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
5056 i386/x32-avx512-linux.xml.
5057 * i387-fp.c (num_avx512_k_registers): New constant for number
5058 of K registers.
5059 (num_avx512_zmmh_low_registers): New constant for number of
5060 lower ZMM registers (0-15).
5061 (num_avx512_zmmh_high_registers): New constant for number of
5062 higher ZMM registers (16-31).
5063 (num_avx512_ymmh_registers): New contant for number of higher
5064 YMM registers (ymm16-31 added by avx521 on x86_64).
5065 (num_avx512_xmm_registers): New constant for number of higher
5066 XMM registers (xmm16-31 added by AVX512 on x86_64).
5067 (struct i387_xsave): Add space for AVX512 registers.
5068 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
5069 Add code to handle AVX512 registers.
5070 (i387_xsave_to_cache): Add code to handle AVX512 registers.
5071 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
5072 prototypei from generated file.
5073 (tdesc_amd64_avx512_linux): Likewise.
5074 (init_registers_x32_avx512_linux): Likewise.
5075 (tdesc_x32_avx512_linux): Likewise.
5076 (init_registers_i386_avx512_linux): Likewise.
5077 (tdesc_i386_avx512_linux): Likewise.
5078 (x86_64_regmap): Add AVX512 registers.
5079 (x86_linux_read_description): Add code to handle AVX512 XSTATE
5080 mask.
5081 (initialize_low_arch): Add code to initialize AVX512 registers.
5082
51aa91f9
PA
50832014-04-23 Pedro Alves <palves@redhat.com>
5084
5085 * mem-break.c (find_gdb_breakpoint_at): Make static.
5086 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
5087
a4165e94
PA
50882014-04-23 Pedro Alves <palves@redhat.com>
5089
5090 * i386-low.c: Don't include break-common.h here.
5091 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5092 prototype to take target_hw_bp_type as argument instead of a Z
5093 packet char.
5094 * i386-low.h: Include break-common.h here.
5095 (Z_packet_to_hw_type): Declare.
5096 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5097 prototypes.
5098 * linux-x86-low.c (x86_insert_point): Convert the packet number to
5099 a target_hw_bp_type before calling i386_low_insert_watchpoint.
5100 (x86_remove_point): Convert the packet number to a
5101 target_hw_bp_type before calling i386_low_remove_watchpoint.
5102 * win32-i386-low.c (i386_insert_point): Convert the packet number
5103 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
5104 (i386_remove_point): Convert the packet number to a
5105 target_hw_bp_type before calling i386_low_remove_watchpoint.
5106
b8acf843
PA
51072014-04-23 Pedro Alves <palves@redhat.com>
5108
5109 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
5110
d708bcd1
PA
51112014-04-10 Pedro Alves <palves@redhat.com>
5112
5113 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5114 Check if the condition or command is NULL before checking if the
5115 breakpoint is known. On success, return true.
5116 * mem-break.h (add_breakpoint_condition): Document return.
5117 (add_breakpoint_commands): Add describing comment.
5118 * server.c (skip_to_semicolon): New function.
5119 (process_point_options): Use it.
5120
2eec7d5b
PA
51212014-04-09 Pedro Alves <palves@redhat.com>
5122
5123 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
5124 to lwpid_of.
5125
fa96cb38
PA
51262014-02-27 Pedro Alves <palves@redhat.com>
5127
5128 PR 12702
5129 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
5130 macros.
5131 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
5132 output.
5133 (last_thread_of_process_p): Take a PID argument instead of a
5134 thread pointer.
5135 (linux_wait_for_lwp): Delete.
5136 (num_lwps, check_zombie_leaders, not_stopped_callback): New
5137 functions.
5138 (linux_low_filter_event): New function, party factored out from
5139 linux_wait_for_event.
5140 (linux_wait_for_event): Rename to ...
5141 (linux_wait_for_event_filtered): ... this. Add new filter ptid
5142 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
5143 sigsuspend. Check for zombie leaders.
5144 (linux_wait_for_event): Reimplement as wrapper around
5145 linux_wait_for_event_filtered.
5146 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
5147 a normal or signal exit is seen, it's the whole process exiting.
5148 (wait_for_sigstop): No longer a for_each_inferior callback.
5149 Rewrite on top of linux_wait_for_event_filtered.
5150 (stop_all_lwps): Call wait_for_sigstop directly.
5151 * server.c (resume, handle_target_event): Handle
5152 TARGET_WAITKIND_NO_RESUMED.
5153
d763de10
JB
51542014-02-26 Joel Brobecker <brobecker@adacore.com>
5155
5156 * win32-low.c (psapi_get_dll_name,
5157 * win32_CreateToolhelp32Snapshot): Delete.
5158 (win32_CreateToolhelp32Snapshot, win32_Module32First)
5159 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
5160 Delete.
5161 (handle_load_dll): Add function description.
5162 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
5163
850a0f76
JB
51642014-02-26 Joel Brobecker <brobecker@adacore.com>
5165
5166 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
5167 Add comment.
5168 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
5169 base address when calling win32_add_one_solib.
5170 (handle_load_dll): Delete local variable load_addr.
5171 Remove 0x1000 offset applied to DLL base address when calling
5172 win32_add_one_solib.
5173 (handle_unload_dll): Add comment.
5174
f25b3fc3
JB
51752014-02-26 Joel Brobecker <brobecker@adacore.com>
5176
5177 * win32-low.c (win32_add_all_dlls): Renames
5178 win32_ensure_ntdll_loaded. Rewrite function documentation.
5179 Adjust implementation to always load all DLLs.
5180 Add 0x1000 offset to DLL base address when calling
5181 win32_add_one_solib.
5182 (child_initialization_done): New static global.
5183 (do_initial_child_stuff): Set child_initialization_done to
5184 zero during child initialization, and 1 after. Replace call
5185 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
5186 Add comment.
5187 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
5188 (handle_unload_dll): Add function documentation.
5189 (get_child_debug_event): Ignore load and unload DLL events
5190 during child initialization.
5191
d86d4aaf
DE
51922014-02-20 Doug Evans <dje@google.com>
5193
3bc32da3 5194 Remove global all_lwps.
d86d4aaf
DE
5195 * inferiors.h (ptid_of): Move here from linux-low.h.
5196 (pid_of, lwpid_of): Ditto.
5197 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
5198 parameter is a struct thread_info * now.
5199 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
5200 directly. Pass &all_threads to find_inferior instead of &all_lwps.
5201 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
5202 directly.
5203 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
5204 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
5205 * linux-arm-low.c (update_registers_callback): Update, "entry"
5206 parameter is a struct thread_info * now.
5207 Fetch lwpid from current_inferior directly.
5208 (arm_insert_point): Pass &all_threads to find_inferior instead of
5209 &all_lwps.
5210 (arm_remove_point): Ditto.
5211 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
5212 (arm_prepare_to_resume): Fetch pid from thread.
5213 (arm_read_description): Fetch lwpid from current_inferior directly.
5214 * linux-low.c (all_lwps): Delete.
5215 (delete_lwp): Delete call to remove_inferior.
5216 (handle_extended_wait): Fetch lwpid from thread.
5217 (add_lwp): Don't set lwp->entry.id. Remove call to
5218 add_inferior_to_list.
5219 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
5220 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
5221 (kill_one_lwp_callback): Ditto.
5222 (linux_kill): Don't dereference NULL pointer.
5223 Fetch ptid,lwpid from thread.
5224 (get_detach_signal): Fetch ptid from thread.
5225 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
5226 Simplify call to regcache_invalidate_thread.
5227 (delete_lwp_callback): Update, "entry" parameter is a
5228 struct thread_info * now. Fetch pid from thread.
5229 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
5230 (status_pending_p_callback): Update, "entry" parameter is a
5231 struct thread_info * now. Fetch ptid from thread.
5232 (find_lwp_pid): Update, "entry" parameter is a
5233 struct thread_info * now.
5234 (linux_wait_for_lwp): Fetch pid from thread.
5235 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
5236 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
5237 (enqueue_one_deferred_signal): Fetch lwpid from thread.
5238 (dequeue_one_deferred_signal): Ditto.
5239 (cancel_breakpoint): Fetch ptid from current_inferior.
5240 (linux_wait_for_event): Pass &all_threads to find_inferior,
5241 not &all_lwps. Fetch ptid, lwpid from thread.
5242 (count_events_callback): Update, "entry" parameter is a
5243 struct thread_info * now.
5244 (select_singlestep_lwp_callback): Ditto.
5245 (select_event_lwp_callback): Ditto.
5246 (cancel_breakpoints_callback): Ditto.
5247 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
5248 not &all_lwps.
5249 (select_event_lwp): Ditto. Fetch ptid from event_thread.
5250 (unsuspend_one_lwp): Update, "entry" parameter is a
5251 struct thread_info * now.
5252 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
5253 not &all_lwps.
5254 (linux_stabilize_threads): Ditto. And for for_each_inferior.
5255 Fetch lwpid from thread, not lwp.
5256 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
5257 Pass &all_threads to find_inferior, not &all_lwps.
5258 (send_sigstop): Fetch lwpid from thread, not lwp.
5259 (send_sigstop_callback): Update, "entry" parameter is a
5260 struct thread_info * now.
5261 (suspend_and_send_sigstop_callback): Ditto.
5262 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
5263 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
5264 struct thread_info * now.
5265 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
5266 from thread, lwp.
5267 (lwp_running): Update, "entry" parameter is a
5268 struct thread_info * now.
5269 (stop_all_lwps): Fetch ptid from thread.
5270 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
5271 (linux_resume_one_lwp): Fetch lwpid from thread.
5272 (linux_set_resume_request): Update, "entry" parameter is a
5273 struct thread_info * now. Fetch pid, lwpid from thread.
5274 (resume_status_pending_p): Update, "entry" parameter is a
5275 struct thread_info * now.
5276 (need_step_over_p): Ditto. Fetch lwpid from thread.
5277 (start_step_over): Fetch lwpid from thread.
5278 (linux_resume_one_thread): Update, "entry" parameter is a
5279 struct thread_info * now. Fetch lwpid from thread.
5280 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
5281 (proceed_one_lwp): Update, "entry" parameter is a
5282 struct thread_info * now. Fetch lwpid from thread.
5283 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
5284 struct thread_info * now.
5285 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
5286 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
5287 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
5288 directly.
5289 (regsets_store_inferior_registers): Ditto.
5290 (fetch_register, store_register): Ditto.
5291 (linux_read_memory, linux_write_memory): Ditto.
5292 (linux_request_interrupt): Ditto.
5293 (linux_read_auxv): Ditto.
5294 (linux_xfer_siginfo): Ditto.
5295 (linux_qxfer_spu): Ditto.
5296 (linux_qxfer_libraries_svr4): Ditto.
5297 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
5298 moved to inferiors.h.
5299 (get_lwp): Delete.
5300 (get_thread_lwp): Update.
5301 (struct lwp_info): Delete member "entry". Simplify comment for
5302 member "thread".
5303 (all_lwps): Delete.
5304 * linux-mips-low.c (mips_read_description): Fetch lwpid from
5305 current_inferior directly.
5306 (update_watch_registers_callback): Update, "entry" parameter is a
5307 struct thread_info * now. Fetch pid from thread.
5308 (mips_linux_prepare_to_resume): Fetch ptid from thread.
5309 (mips_insert_point): Fetch lwpid from current_inferior.
5310 Pass &all_threads to find_inferior, not &all_lwps.
5311 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
5312 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
5313 directly.
5314 (mips_stopped_data_address): Ditto.
5315 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
5316 directly.
5317 * linux-tile-low.c (tile_arch_setup): Ditto.
5318 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
5319 (update_debug_registers_callback): Update, "entry" parameter is a
5320 struct thread_info * now. Fetch pid from thread.
5321 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
5322 Pass &all_threads to find_inferior, not &all_lwps.
5323 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
5324 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
5325 Pass &all_threads to find_inferior, not &all_lwps.
5326 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
5327 (i386_dr_low_get_status): Ditto.
5328 (x86_linux_prepare_to_resume): Fetch ptid from thread.
5329 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
5330 (x86_linux_read_description): Ditto.
5331 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
5332
3b8361aa
DE
53332014-02-20 Doug Evans <dje@google.com>
5334
5335 * inferiors.c (get_first_inferior): Fix buglet.
5336
f7667f0d
DE
53372014-02-19 Doug Evans <dje@google.com>
5338
5339 * gdbthread.h (add_thread): Change result type to struct thread_info *.
5340 * inferiors.c (add_thread): Change result type to struct thread_info *.
5341 All callers updated.
5342 (add_lwp): Call add_thread here instead of in callers.
5343 All callers updated.
5344 * linux-low.h (get_lwp_thread): Rewrite.
5345 (struct lwp_info): New member "thread".
5346
b3312d80
DE
53472014-02-19 Doug Evans <dje@google.com>
5348
5349 * linux-low.c (add_lwp): Change result to struct lwp_info *.
5350 All callers updated.
5351
ecc6f45c
DE
53522014-02-19 Doug Evans <dje@google.com>
5353
5354 * inferiors.c (add_thread): Fix whitespace.
5355
649ebbca
DE
53562014-02-19 Doug Evans <dje@google.com>
5357
5358 * dll.c (clear_dlls): Replace accessing list implemention details
5359 with API function.
5360 * gdbthread.h (get_first_thread): Declare.
5361 * inferiors.c (for_each_inferior_with_data): New function.
5362 (get_first_thread): New function.
5363 (find_thread_ptid): Simplify.
5364 (get_first_inferior): New function.
5365 (clear_list): Delete.
5366 (one_inferior_p): New function.
5367 (clear_inferior_list): New function.
5368 (clear_inferiors): Update.
5369 * inferiors.h (for_each_inferior_with_data): Declare.
5370 (clear_inferior_list): Declare.
5371 (one_inferior_p): Declare.
5372 (get_first_inferior): Declare.
5373 * linux-low.c (linux_wait_for_event): Replace accessing list
5374 implemention details with API function.
5375 * server.c (target_running): Ditto.
5376 (accumulate_file_name_length): New function.
5377 (emit_dll_description): New function.
5378 (handle_qxfer_libraries): Replace accessing list implemention
5379 details with API function.
5380 (handle_qxfer_threads_worker): New function.
5381 (handle_qxfer_threads_proper): Replace accessing list implemention
5382 details with API function.
5383 (handle_query): Ditto.
5384 (visit_actioned_threads_callback_ftype): New typedef.
5385 (visit_actioned_threads_data): New struct.
5386 (visit_actioned_threads): Rewrite to be find_inferior callback.
5387 (resume): Call find_inferior.
5388 (handle_status): Replace accessing list implemention
5389 details with API function.
5390 (process_serial_event): Replace accessing list implemention details
5391 with API function.
5392 * target.c (set_desired_inferior): Replace accessing list implemention
5393 details with API function.
5394 * tracepoint.c (same_process_p): New function.
5395 (gdb_agent_about_to_close): Replace accessing list implemention
5396 details with API function.
5397 * win32-low.c (child_delete_thread): Replace accessing list
5398 implemention details with API function.
5399 (match_dll_by_basename): New function.
5400 (dll_is_loaded_by_basename): New function.
5401 (win32_ensure_ntdll_loaded): Replace accessing list implemention
5402 details call to dll_is_loaded_by_basename.
5403
80894984
DE
54042014-02-19 Doug Evans <dje@google.com>
5405
5406 * dll.h (struct dll_info): Add comment.
5407 * gdbthread.h (struct thread_info): Add comment.
5408 (current_ptid): Simplify.
5409 * inferiors.c (add_process): Update.
5410 (remove_process): Update.
5411 * inferiors.h (struct process_info): Rename member "head" to "entry".
5412 * linux-low.c (delete_lwp): Update.
5413 (add_lwp): Update.
5414 (last_thread_of_process_p): Update.
5415 (kill_one_lwp_callback, linux_kill): Update.
5416 (status_pending_p_callback): Update.
5417 (wait_for_sigstop): Update. Simplify read of ptid.
5418 (start_step_over): Update.
5419 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
5420 (get_lwp_thread): Update.
5421 (struct lwp_info): Rename member "head" to "entry".
5422 * regcache.h (inferior_list_entry): Delete.
5423 * server.c (kill_inferior_callback): Update.
5424 (detach_or_kill_inferior_callback): Update.
5425 (print_started_pid): Update.
5426 (print_attached_pid): Update.
5427 (process_serial_event): Simplify read of ptid.
5428 * thread-db.c (thread_db_create_event): Update.
5429 (thread_db_get_tls_address): Update.
5430 * win32-low.c (current_inferior_ptid): Simplify.
5431
46917d26
TT
54322014-02-19 Tom Tromey <tromey@redhat.com>
5433
5434 * target.h (struct target_ops) <supports_btrace>: Add target_ops
5435 argument.
5436 (target_supports_btrace): Update.
5437
0759a81e
YQ
54382014-02-14 Yao Qi <yao@codesourcery.com>
5439
5440 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
5441 (rsp-low-ipa.o): New target.
5442
a7191e8b
TT
54432014-02-12 Tom Tromey <tromey@redhat.com>
5444
5445 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
5446 convert_ascii_to_int.
5447 * regcache.c (registers_to_string): Likewise.
5448 * remote-utils.c (decode_M_packet): Likewise.
5449 * server.c (process_serial_event): Likewise.
5450
ff0e980e
TT
54512014-02-12 Tom Tromey <tromey@redhat.com>
5452
5453 * server.c (handle_query, handle_v_run): Use hex2bin, not
5454 unhexify.
5455 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
5456
e9371aff
TT
54572014-02-12 Tom Tromey <tromey@redhat.com>
5458
5459 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
5460 convert_int_to_ascii.
5461 * regcache.c (registers_to_string, collect_register_as_string):
5462 Likewise.
5463 * remote-utils.c (look_up_one_symbol, relocate_instruction):
5464 Likewise.
5465 * server.c (process_serial_event): Likewise.
5466 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
5467 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
5468
971dc0b8
TT
54692014-02-12 Tom Tromey <tromey@redhat.com>
5470
5471 * remote-utils.c (look_up_one_symbol, monitor_output): Use
5472 bin2hex, not hexify.
5473 * tracepoint.c (cmd_qtstatus): Likewise.
5474
0a822afb
TT
54752014-02-12 Tom Tromey <tromey@redhat.com>
5476
5477 * remote-utils.c (monitor_output): Pass explicit length to
5478 hexify.
5479
9c3d6531
TT
54802014-02-12 Tom Tromey <tromey@redhat.com>
5481
5482 * tracepoint.c: Include rsp-low.h.
5483 * server.c: Include rsp-low.h.
5484 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
5485 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
5486 declare.
5487 * remote-utils.c: Include rsp-low.h.
5488 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
5489 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
5490 (convert_int_to_ascii, convert_ascii_to_int): Move to
5491 common/rsp-low.c.
5492 * regcache.c: Include rsp-low.h.
5493 * ax.c: Include rsp-low.h.
5494 * Makefile.in (SFILES): Add common/rsp-low.c.
5495 (OBS): Add rsp-low.o.
5496 (rsp-low.o): New target.
5497
01fd3ea5
TT
54982014-02-12 Tom Tromey <tromey@redhat.com>
5499
5500 * utils.h (pulongest, plongest, phex_nz): Don't declare.
5501 Include print-utils.h.
5502 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
5503 (plongest, thirty_two, phex_nz): Remove.
5504 * Makefile.in (SFILES): Add common/print-utils.c.
5505 (OBS): Add print-utils.o.
5506 (print-utils-ipa.o): New target.
5507 (print-utils.o): New target.
5508 (IPA_OBJS): Add print-utils-ipa.o.
5509
e99dc820
TT
55102014-02-06 Tom Tromey <tromey@redhat.com>
5511
5512 * Makefile.in (SFILES): Fix indentation.
5513
ee1e2d4f
DE
55142014-02-05 Doug Evans <dje@google.com>
5515
5516 * linux-low.c (linux_wait_for_event): Improve comment.
5517 (linux_wait_1): Keep current_inferior in sync with event_child.
5518
f5a02773
DE
55192014-01-22 Doug Evans <dje@google.com>
5520
5521 * gdbthread.h (gdb_id_to_thread): Delete, unused.
5522
87ce2a04
DE
55232014-01-22 Doug Evans <dje@google.com>
5524
5525 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
5526 * configure: Regenerate.
5527 * config.in: Regenerate.
5528 * Makefile.in (SFILES): Add debug.c.
5529 (OBS): Add debug.o.
5530 * debug.c: New file.
5531 * debug.h: New file.
5532 * linux-aarch64-low.c (*): Update all debugging printfs to use
5533 debug_printf instead of fprintf.
5534 * linux-arm-low.c (*): Ditto.
5535 * linux-cris-low.c (*): Ditto.
5536 * linux-crisv32-low.c (*): Ditto.
5537 * linux-m32r-low.c (*): Ditto.
5538 * linux-sparc-low.c (*): Ditto.
5539 * linux-x86.c (*): Ditto.
5540 * linux-low.c (*): Ditto.
5541 (linux_wait_1): Add calls to debug_enter, debug_exit.
5542 (linux_wait): Remove redundant debugging printf.
5543 (stop_all_lwps): Add calls to debug_enter, debug_exit.
5544 (linux_resume, unstop_all_lwps): Ditto.
5545 * mem-break.c (*): Update all debugging printfs to use
5546 debug_printf instead of fprintf.
5547 * remote-utils.c (*): Ditto.
5548 * thread-db.c (*): Ditto.
5549 * server.c #include <ctype.h>, "gdb_vecs.h".
5550 (debug_threads): Moved to debug.c.
5551 (*): Update all debugging printfs to use debug_printf instead of
5552 fprintf.
5553 (start_inferior): Replace call to fflush with call to debug_flush.
5554 (monitor_show_help): Mention set debug-format.
5555 (parse_debug_format_options): New function.
5556 (handle_monitor_command): Handle "monitor set debug-format".
5557 (gdbserver_usage): Mention --debug-format.
5558 (main): Parse --debug-format.
5559 * server.h (debug_threads): Declaration moved to debug.h.
5560 #include "debug.h".
5561 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
5562 trace_debug_1 that uses debug_printf.
5563 (tracepoint_look_up_symbols): Update all debugging printfs to use
5564 debug_printf instead of fprintf.
5565
e671835b
BS
55662014-01-20 Baruch Siach <baruch@tkos.co.il>
5567
5568 * linux-xtensa-low.c: Include asm/ptrace.h instead of
5569 sys/ptrace.h.
5570
b5737fa9
PA
55712014-01-17 Pedro Alves <palves@redhat.com>
5572
ea38d2a9 5573 PR build/16445
c7faa97a
PA
5574 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
5575 defined after including gdb_proc_service.h.
b5737fa9 5576
40ed484e
DE
55772014-01-16 Doug Evans <dje@google.com>
5578
5579 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
5580 (match_dll): Use it.
5581
969c39fb
MM
55822014-01-16 Markus Metzger <markus.t.metzger@intel.com>
5583
5584 * target.h (target_ops) <read_btrace>: Change parameters and
5585 return type to allow error reporting.
5586 * server.c (handle_qxfer_btrace): Support delta reads. Pass
5587 trace reading errors on.
5588 * linux-low.c (linux_low_read_btrace): Pass trace reading
5589 errors on.
5590 (linux_low_disable_btrace): New.
5591
ab7f45ba
DE
55922014-01-15 Doug Evans <dje@google.com>
5593
5594 * inferiors.c (thread_id_to_gdb_id): Delete.
5595 * inferiors.h (thread_id_to_gdb_id): Delete.
5596
66af0f44
EZ
55972014-01-13 Eli Zaretskii <eliz@gnu.org>
5598
5599 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
5600 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
5601 versions.
5602
9939e131
PA
56032014-01-08 Pedro Alves <palves@redhat.com>
5604
5605 * server.c (handle_status): Don't discard previous queued stop
5606 replies or thread's pending status here.
5607 (main) <disconnection>: Do it here instead.
5608
b7ea362b
PA
56092014-01-08 Pedro Alves <palves@redhat.com>
5610
5611 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
5612 * server.c (visit_actioned_threads, handle_pending_status): New
5613 function.
5614 (handle_v_cont): Factor out parts to ...
5615 (resume): ... this new function. If in all-stop, and a thread
5616 being resumed has a pending status, report it without actually
5617 resuming.
5618 (myresume): Adjust to use the new 'resume' function.
5619 (clear_pending_status_callback, set_pending_status_callback)
5620 (find_status_pending_thread_callback): New functions.
5621 (handle_status): Handle the case of multiple threads having
5622 interesting statuses to report. Report threads' real last signal
5623 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
5624 with an interesting thread to report the status for, instead of
5625 always reporting the status of the first thread.
5626
28498c42
JB
56272014-01-01 Joel Brobecker <brobecker@adacore.com>
5628
5629 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
5630 * gdbreplay.c (gdbreplay_version): Likewise.
5631
f45c82da
YZ
56322013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
5633
5634 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
5635 iov.iov_len with the real length in use.
5636
379a5e2d
JB
56372013-12-13 Joel Brobecker <brobecker@adacore.com>
5638
5639 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
5640 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
5641 for all targets that use win32-low.c.
5642 * win32-low.c (win32_ensure_ntdll_loaded): New function.
5643 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
5644
4210d83e
PA
56452013-12-13 Pedro Alves <palves@redhat.com>
5646
5647 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
5648 if equal to TARGET_WAITKIND_LOADED.
5649 * win32-low.c (cached_status): New static global.
5650 (win32_wait): Add declaration.
5651 (do_initial_child_stuff): Flush all initial pending debug events
5652 up to the initial breakpoint.
5653 (win32_wait): If CACHED_STATUS was set, return that instead
5654 of doing a real wait. Remove the code resuming the execution
5655 of the inferior after receiving a TARGET_WAITKIND_LOADED event
5656 during the initial phase. Also remove the code changing
5657 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
5658 TARGET_WAITKIND_STOPPED.
5659
e7f0d979
YQ
56602013-12-11 Yao Qi <yao@codesourcery.com>
5661
5662 * notif.c (handle_notif_ack): Return 0 if no notification
5663 matches.
5664
ebcf782c
DE
56652013-11-20 Doug Evans <dje@google.com>
5666
5667 * linux-low.c (linux_set_resume_request): Fix comment.
5668
20ad9378
DE
56692013-11-20 Doug Evans <dje@google.com>
5670
5671 * linux-low.c (resume_status_pending_p): Tweak comment.
5672
a196ebeb
WT
56732013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5674
5675 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
5676 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
5677 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
5678 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
5679 (srv_amd64_regobj): Add amd64-mpx.o.
5680 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
5681 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
5682 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
5683 * i387-fp.c (num_pl_bnd_register) Added constant.
5684 (num_pl_bnd_cfg_registers) Added constant.
5685 (struct i387_xsave) Added reserved area and MPX fields.
5686 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
5687 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
5688 function.
5689 (tdesc_i386_mpx_linux): Add MPX amd64 target.
5690 (init_registers_amd64_mpx_linux): Declare new function.
5691 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
5692 (x86_64_regmap): Add MPX registers.
5693 (x86_linux_read_description): Add MPX case.
5694 (initialize_low_arch): Initialize MPX targets.
5695
0080a2f6
TT
56962013-11-18 Tom Tromey <tromey@redhat.com>
5697
5698 * configure: Rebuild.
5699 * configure.ac: Don't check for stdlib.h.
5700 * gdbreplay.c: Unconditionally include stdlib.h.
5701
2978b111
TT
57022013-11-18 Tom Tromey <tromey@redhat.com>
5703
5704 * config.in: Rebuild.
5705 * configure: Rebuild.
5706 * configure.ac: Don't use AC_HEADER_DIRENT.
5707
a3d08894
TT
57082013-11-18 Tom Tromey <tromey@redhat.com>
5709
5710 * server.h: Don't check HAVE_STRING_H.
5711 * gdbreplay.c: Don't check HAVE_STRING_H.
5712 * configure: Rebuild.
5713
0a5dd17d
TT
57142013-11-18 Tom Tromey <tromey@redhat.com>
5715
5716 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
5717 LIBGNU.
5718
1bd2f0ba
TT
57192013-11-08 Tom Tromey <tromey@redhat.com>
5720
5721 * configure, config.in: Rebuild.
5722 * configure.ac: Remove unused configury.
5723
3266f10b
TT
57242013-11-08 Tom Tromey <tromey@redhat.com>
5725
5726 * acinclude.m4: Include common.m4, codeset.m4.
5727 * configure, config.in: Rebuild.
5728 * configure.ac: Use GDB_AC_COMMON.
5729
6682d959
AA
57302013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
5731
5732 * linux-s390-low.c (HWCAP_S390_TE): New define.
5733 (s390_arch_setup): Consider the TE field in the HWCAP for
5734 determining 'have_regset_tdb'.
5735
fd0a4d76
SDJ
57362013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
5737
5738 PR gdb/16014
5739 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
5740 call to sizeof.
5741
1a3d890b
PA
57422013-10-02 Pedro Alves <palves@redhat.com>
5743
5744 * server.c (process_serial_event): Don't output "GDBserver
5745 exiting" if GDB is connected through stdio.
5746 * target.c (mywait): Likewise, be silent if GDB is connected
5747 through stdio.
5748
97ad4581
JB
57492013-10-01 Joel Brobecker <brobecker@adacore.com>
5750
5751 * lynx-low.c (lynx_add_threads_after_attach): New function.
5752 (lynx_attach): Remove call to add_thread. Add call to
5753 lynx_add_threads_after_attach instead.
5754
5b4e221c
MF
57552013-09-28 Mike Frysinger <vapier@gentoo.org>
5756
5757 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
5758 * config.in, configure: Regenerated.
5759
ee47b2f8
YQ
57602013-09-18 Yao Qi <yao@codesourcery.com>
5761
5762 PR server/15959
5763 * server.c (start_inferior): Clear 'resume_info'.
5764
d6707650 57652013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 5766
d6707650
JW
5767 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
5768 for each register.
5769
9243dd0e 57702013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 5771
9243dd0e
JW
5772 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
5773 linux-tile-low.o to srv_tgtobj.
5774
c623a6ef
WN
57752013-09-16 Will Newton <will.newton@linaro.org>
5776
5777 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
5778 out regs.
5779
fb71d39e
PA
57802013-09-06 Pedro Alves <palves@redhat.com>
5781
5782 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
5783 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
5784 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
5785 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
5786 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
5787 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
5788
8e7e9910
PA
57892013-09-06 Pedro Alves <palves@redhat.com>
5790
5791 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
5792 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
5793
7c3a12ca
PA
57942013-09-06 Pedro Alves <palves@redhat.com>
5795
5796 * linux-amd64-ipa.c: Include tracepoint.h.
5797 * linux-i386-ipa.c: Include tracepoint.h.
5798
8eb3d7b6
RW
57992013-09-06 Ricard Wanderlof <ricardw@axis.com>
5800
5801 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
5802 (ps_get_thread_area): New function.
5803
eddddb9d
RW
58042013-09-06 Ricard Wanderlof <ricardw@axis.com>
5805
5806 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
5807 (initialize_low_arch): Call init_registers_crisv32 rather than
5808 init_register_crisv32.
5809
533b0600
PA
58102013-09-05 Pedro Alves <palves@redhat.com>
5811
5812 * server.h (handle_vFile, hostio_last_error_from_errno): Move
5813 to ...
5814 * hostio.h: ... this new file.
5815 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
5816 win32-low.c: Include hostio.h.
5817
0ce3d3b5
PA
58182013-09-05 Pedro Alves <palves@redhat.com>
5819
5820 * server.h (gdb_client_data, handler_func, callback_handler_func)
5821 (delete_file_handler, add_file_handler, append_callback_event)
5822 (delete_callback_event, start_event_loop, initialize_event_loop):
5823 Move to event-loop.h and include it.
5824 * event-loop.h: New file.
5825
799cdc37
PA
58262013-09-05 Pedro Alves <palves@redhat.com>
5827
5828 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
5829 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
5830 (loaded_dll, unloaded_dll): Move to ...
5831 * dll.h: ... this new file.
5832 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
5833
6a6bbd9d
PA
58342013-09-05 Pedro Alves <palves@redhat.com>
5835
5836 * server.h (current_process, get_thread_process, all_processes)
5837 (add_inferior_to_list, for_each_inferior, current_inferior)
5838 (remove_inferior, add_process, remove_process, find_process_pid)
5839 (have_started_inferiors_p, have_attached_inferiors_p)
5840 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
5841 (clear_inferiors, find_inferior, find_inferior_id)
5842 (inferior_target_data, set_inferior_target_data)
5843 (inferior_regcache_data, set_inferior_regcache_data): Move to
5844 inferiors.h, and include it.
5845 * inferiors.h: New file.
5846
f699aaba
PA
58472013-09-05 Pedro Alves <palves@redhat.com>
5848
5849 * server.h (struct emit_ops, current_insn_ptr, emit_error):
5850 Move ...
72f4393d 5851 * ax.h: ... here.
f699aaba 5852
c144c7a0
PA
58532013-09-05 Pedro Alves <palves@redhat.com>
5854
5855 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
5856 tracepoint.h.
5857 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
5858 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
5859 (handle_tracepoint_general_set, handle_tracepoint_query)
5860 (tracepoint_finished_step, tracepoint_was_hit)
5861 (release_while_stepping_state_list, current_traceframe)
5862 (in_readonly_region, traceframe_read_mem)
5863 (fetch_traceframe_registers, traceframe_read_sdata)
5864 (traceframe_read_info, struct fast_tpoint_collect_status)
5865 (fast_tracepoint_collecting, force_unlock_trace_buffer)
5866 (handle_tracepoit_bkpts, initialize_low_tracepoint)
5867 (supply_fast_tracepoint_registers)
5868 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
5869 (ipa_tdesc, claim_trampoline_space)
5870 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
5871 (agent_mem_read, agent_get_trace_state_variable_value)
5872 (agent_set_trace_state_variable_value, agent_tsv_read)
5873 (agent_mem_read_string, get_raw_reg_func_addr)
5874 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
5875 * tracepoint.h: ... this new file.
5876
ff42e6ab
PA
58772013-09-05 Pedro Alves <palves@redhat.com>
5878
5879 * server.h (perror_with_name, error, fatal, warning, paddress)
5880 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
5881 include it.
5882 * utils.h: New file.
5883
541af0f4
PA
58842013-09-05 Pedro Alves <palves@redhat.com>
5885
5886 * server.h (remote_debug, noack_mode, transport_is_reliable)
5887 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
5888 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
5889 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
5890 (write_enn, initialize_async_io, enable_async_io)
5891 (disable_async_io, check_remote_input_interrupt_request)
5892 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
5893 (dead_thread_notify, prepare_resume_reply)
5894 (decode_address_to_semicolon, decode_address, decode_m_packet)
5895 (decode_M_packet, decode_X_packet, decode_xfer_write)
5896 (decode_search_memory_packet, unhexify, hexify)
5897 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
5898 (look_up_one_symbol, relocate_instruction)
5899 (monitor_output): Move to remote-utils.h, and include it.
5900 * remote-utils.h: New file.
5901
eebdf26b
PA
59022013-09-05 Pedro Alves <palves@redhat.com>
5903
5904 * server.h (_): Delete.
5905
3aafd2ff
PA
59062013-09-02 Pedro Alves <palves@redhat.com>
5907
5908 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
5909 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
5910 allocated.
5911 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
5912
cee83bcb
PM
59132013-09-02 Pierre Muller <muller@sourceware.org>
5914
5915 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
5916 or WriteProcessMemory complete successfully and handle
5917 ERROR_PARTIAL_COPY error.
5918
9a13b2fa
PA
59192013-09-02 Pedro Alves <palves@redhat.com>
5920
5921 * server.c (gdb_read_memory): Return -1 on traceframe memory read
5922 error instead of EIO.
5923
602e3198
JK
59242013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5925
5926 PR server/15604
5927 * linux-low.c: Include filestuff.h.
5928 (linux_create_inferior) <pid == 0>: Call close_most_fds.
5929 * lynx-low.c: Include filestuff.h.
5930 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
5931 * server.c: Include filestuff.h.
5932 (main): Call notice_open_fds.
5933 * spu-low.c: Include filestuff.h.
5934 (spu_create_inferior) <pid == 0>: Call close_most_fds.
5935
96d7229d
LM
59362013-08-22 Luis Machado <lgustavo@codesourcery.com>
5937
5938 * Makefile.in: Explain why ../target and ../nat are not
5939 listed as include file search paths.
5940 (linux-waitpid.o): New object file rule.
5941 * configure.srv (srv_native_linux_obj): New variable.
5942 Replace all occurrences of linux native object files with
5943 $srv_native_linux_obj.
5944 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
5945 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
5946 (linux_enable_event_reporting): Remove declaration.
5947 (my_waitpid): Moved to common/linux-waitpid.c.
5948 (linux_wait_for_event): Pass ptid when calling
5949 linux_enable_event_reporting.
5950 (linux_supports_tracefork_flag): Remove.
5951 (linux_enable_event_reporting): Likewise.
5952 (linux_tracefork_grandchild): Remove.
5953 (STACK_SIZE): Moved to common/linux-ptrace.c.
5954 (linux_tracefork_child): Remove.
5955 (linux_test_for_tracefork): Remove.
5956 (linux_look_up_symbols): Call linux_supports_traceclone.
5957 (initialize_low): Remove call to linux_test_for_tracefork.
5958 * linux-low.h (PTRACE_TYPE_ARG3): Move to
5959 common/linux-ptrace.h.
5960 (PTRACE_TYPE_ARG4): Likewise.
5961 Include linux-ptrace.h.
5962
32940073
PA
59632013-08-21 Pedro Alves <palves@redhat.com>
5964
5965 * config.in: Renegerate.
5966
33b60d58 59672013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 5968
33b60d58
LM
5969 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
5970 (SFILES): Remove $(srcdir)/common/target-common.c and
5971 add $(srcdir)/target/waitstatus.c.
5972 (OBS): Remove target-common.o and add waitstatus.o.
5973 (server_h): Remove $(srcdir)/../common/target-common.h and
5974 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
5975 and $(srcdir)/../target/waitstatus.h.
5976 (target-common.o): Remove.
5977 (waitstatus.o): New target object file.
5978 * target.h: Do not include target-common.h and
5979 include target/resume.h, target/wait.h and
5980 target/waitstatus.h.
5981
b8e1b30e
LM
59822013-08-13 Luis Machado <lgustavo@codesourcery.com>
5983
5984 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5985 to PTRACE_TYPE_ARG3.
5986 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5987 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
5988 PTRACE_TYPE_ARG4.
5989 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
5990 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
5991
7a60ad40
YQ
59922013-07-27 Jie Zhang <jie@codesourcery.com>
5993 Daniel Jacobowitz <dan@codesourcery.com>
5994 Yao Qi <yao@codesourcery.com>
5995
5996 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
5997 (mips-linux-watch.o): New rule.
5998 (mips_linux_watch_h): New variable.
5999 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
6000 srv_tgtobj.
6001 * linux-mips-low.c: Include mips-linux-watch.h.
6002 (struct arch_process_info, struct arch_lwp_info): New.
6003 (update_watch_registers_callback): New function.
6004 (mips_linux_new_process, mips_linux_new_thread) New functions.
6005 (mips_linux_prepare_to_resume, mips_insert_point): New
6006 functions.
6007 (mips_remove_point, mips_stopped_by_watchpoint): New
6008 functions.
6009 (rsp_bp_type_to_target_hw_bp_type): New function.
6010 (mips_stopped_data_address): New function.
6011 (the_low_target): Add watchpoint support functions.
6012
de6f69ad
YQ
60132013-07-27 Yao Qi <yao@codesourcery.com>
6014
6015 * i386-low.c: Include break-common.h.
6016 (enum target_hw_bp_type): Remove.
6017
3360c0bf
LM
60182013-07-24 Luis Machado <lgustavo@codesourcery.com>
6019
6020 * Makefile.in (SFILES): /common/target-common.c.
6021 (OBS): Add target-common.o.
6022 (server_h): Add $(srcdir)/../common/target-common.h.
6023 (target-common.o): New target.
6024 * server.c (queue_stop_reply_callback): Free
6025 status string after use.
6026 * target.c (target_waitstatus_to_string): Remove.
6027 * target.h: Include target-common.h.
6028 (resume_kind): Likewise.
6029 (target_waitkind): Likewise.
6030 (target_waitstatus): Likewise.
6031 (TARGET_WNOHANG): Likewise.
6032
bd885420
YQ
60332013-07-04 Yao Qi <yao@codesourcery.com>
6034
6035 * Makefile.in (host_alias): Use @host_noncanonical@.
6036 (target_alias): Use @target_noncanonical@.
6037 * configure.ac: Use ACX_NONCANONICAL_TARGET and
6038 ACX_NONCANONICAL_HOST.
6039 * configure: Regenerated.
6040
6041 Revert:
6042 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6043
6044 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6045 * configure: Rebuild.
6046 * Makefile.in (version_host, version_target): Get from configure.
6047 (version.c): Use $(version_host) and $(version_target).
6048
17ef446e
PA
60492013-07-03 Pedro Alves <palves@redhat.com>
6050
6051 * Makefile.in (config.status): Depend on development.sh.
6052 * acinclude.m4: Include libmcheck.m4.
6053 * configure: Regenerate.
6054
7a9a7487
MG
60552013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6056
6057 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
6058 attribute inside the parentheses.
6059 (winapi_DebugSetProcessKillOnExit): Ditto.
6060 (winapi_DebugBreakProcess): Ditto.
6061 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 6062
49b64de6
MG
60632013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6064
6065 * notif.h (notif_event): Add a dummy member to avoid compiler
6066 errors.
6067
d5749ee7
PA
60682013-07-01 Pedro Alves <palves@redhat.com>
6069
6070 * hostio.c (HOSTIO_PATH_MAX): Define.
6071 (require_filename, handle_open, handle_unlink, handle_readlink):
6072 Use it.
6073
d8d2a3ee
PA
60742013-07-01 Pedro Alves <palves@redhat.com>
6075
6076 * server.h: Include "pathmax.h".
6077 * linux-low.c: Don't include sys/param.h.
6078 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
6079 MAXPATHLEN.
6080 * win32-low.c: Don't include sys/param.h.
6081 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
6082
bc7dea8d
PA
60832013-07-01 Pedro Alves <palves@redhat.com>
6084
6085 * event-loop.c: Don't check HAVE_UNISTD_H before including
6086 <unistd.h>.
6087 * gdbreplay.c: Likewise.
6088 * remote-utils.c: Likewise.
6089 * server.c: Likewise.
6090 * configure.ac: Don't check for unistd.h.
6091 * configure: Regenerate.
6092
d6c2da54
TT
60932013-06-28 Tom Tromey <tromey@redhat.com>
6094
6095 * Makefile.in (version.c): Use version.in, not
6096 common/version.in.
6097
257b6bec
MG
60982013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6099
6100 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6101 * configure: Rebuild.
6102 * Makefile.in (version_host, version_target): Get from configure.
6103 (version.c): Use $(version_host) and $(version_target).
6104
86ebe149
DK
61052013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6106
6107 Fix trace-status to output user name without trailing colon.
6108 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
6109
f30aa5af
DK
61102013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6111
6112 Fix trace-status to output proper start-time and stop-time.
6113 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
6114 output start time and stop time in hex as gdb expects.
6115
28a93511
YQ
61162013-06-26 Pedro Alves <pedro@codesourcery.com>
6117
6118 * tracepoint.c (build_traceframe_info_xml): Output trace state
6119 variables present in the trace buffer.
6120
01208463
TT
61212013-06-24 Tom Tromey <tromey@redhat.com>
6122
6123 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
6124 create-version.sh.
6125 (version.o): Remove.
6126 * gdbreplay.c: Include version.h.
6127 (version, host_name): Don't declare.
6128 * server.h: Include version.h.
6129 (version, host_name): Don't declare.
6130
760256f9
PA
61312013-06-12 Pedro Alves <palves@redhat.com>
6132
6133 * linux-x86-low.c (linux_is_elf64): Delete global.
6134 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
6135 with local linux_pid_exe_is_elf_64_file use.
6136
030031ee
PA
61372013-06-11 Pedro Alves <palves@redhat.com>
6138
6139 * linux-low.c (regset_disabled, disable_regset): New functions.
6140 (regsets_fetch_inferior_registers)
6141 (regsets_store_inferior_registers): Use them.
6142 (initialize_regsets_info); Don't allocate the disabled_regsets
6143 array here.
6144 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
6145 comment.
6146
5da6eb0a
PA
61472013-06-11 Pedro Alves <palves@redhat.com>
6148
6149 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
6150 xmalloc.
6151
7e5aaa09
PA
61522013-06-11 Pedro Alves <palves@redhat.com>
6153
6154 * linux-x86-low.c (initialize_low_arch): Call
6155 init_registers_x32_avx_linux.
6156
d878444c
JK
61572013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
6158
6159 Fix compatibility with Android Bionic.
6160 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
6161 it is not empty.
6162
3aee8918
PA
61632013-06-07 Pedro Alves <palves@redhat.com>
6164
5f2b57b5 6165 PR server/14823
3aee8918
PA
6166 * Makefile.in (OBS): Add tdesc.o.
6167 (IPA_OBJS): Add tdesc-ipa.o.
6168 (tdesc-ipa.o): New rule.
6169 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
6170 interface.
6171 * linux-low.c (new_inferior): Delete.
6172 (disabled_regsets, num_regsets): Delete.
6173 (linux_add_process): Adjust to set the new per-process
6174 new_inferior flag.
6175 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
6176 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
6177 was a stop. When calling arch_setup, switch the current inferior
6178 to the thread that got an event.
6179 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
6180 (regsets_fetch_inferior_registers)
6181 (regsets_store_inferior_registers): New regsets_info parameter.
6182 Adjust to use it.
6183 (linux_register_in_regsets): New regs_info parameter. Adjust to
6184 use it.
6185 (register_addr, fetch_register, store_register): New usrregs_info
6186 parameter. Adjust to use it.
6187 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
6188 parameter regs_info. Adjust to use it.
6189 (linux_fetch_registers): Get the current inferior's regs_info, and
6190 adjust to use it.
6191 (linux_store_registers): Ditto.
6192 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
6193 (initialize_low): Don't initialize the target_regsets here. Call
6194 initialize_low_arch.
6195 * linux-low.h (target_regsets): Delete declaration.
6196 (struct regsets_info): New.
6197 (struct usrregs_info): New.
6198 (struct regs_info): New.
6199 (struct process_info_private) <new_inferior>: New field.
6200 (struct linux_target_ops): Delete the num_regs, regmap, and
6201 regset_bitmap fields. New field regs_info.
6202 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
6203 * i387-fp.c (num_xmm_registers): Delete.
6204 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
6205 calls to new interface.
6206 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
6207 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
6208 Infer the number of xmm registers from the regcache's target
6209 description.
6210 * i387-fp.h (num_xmm_registers): Delete.
6211 * inferiors.c (add_thread): Don't install the thread's regcache
6212 here.
6213 * proc-service.c (gregset_info): Fetch the current inferior's
6214 regs_info. Adjust to use it.
6215 * regcache.c: Include tdesc.h.
6216 (register_bytes, reg_defs, num_registers)
6217 (gdbserver_expedite_regs): Delete.
6218 (get_thread_regcache): If the thread doesn't have a regcache yet,
6219 create one, instead of aborting gdbserver.
6220 (regcache_invalidate_one): Rename to ...
6221 (regcache_invalidate_thread): ... this.
6222 (regcache_invalidate_one): New.
6223 (regcache_invalidate): Only invalidate registers of the current
6224 process.
6225 (init_register_cache): Add target_desc parameter, and use it.
6226 (new_register_cache): Ditto. Assert the target description has a
6227 non zero registers_size.
6228 (regcache_cpy): Add assertions. Adjust.
6229 (realloc_register_cache, set_register_cache): Delete.
6230 (registers_to_string, registers_from_string): Adjust.
6231 (find_register_by_name, find_regno, find_register_by_number)
6232 (register_cache_size): Add target_desc parameter, and use it.
6233 (free_register_cache_thread, free_register_cache_thread_one)
6234 (regcache_release, register_cache_size): New.
6235 (register_size): Add target_desc parameter, and use it.
6236 (register_data, supply_register, supply_register_zeroed)
6237 (supply_regblock, supply_register_by_name, collect_register)
6238 (collect_register_as_string, collect_register_by_name): Adjust.
6239 * regcache.h (struct target_desc): Forward declare.
6240 (struct regcache) <tdesc>: New field.
6241 (init_register_cache, new_register_cache): Add target_desc
6242 parameter.
6243 (regcache_invalidate_thread): Declare.
6244 (regcache_invalidate_one): Delete declaration.
6245 (regcache_release): Declare.
6246 (find_register_by_number, register_cache_size, register_size)
6247 (find_regno): Add target_desc parameter.
6248 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
6249 declarations.
6250 * remote-utils.c: Include tdesc.h.
6251 (outreg, prepare_resume_reply): Adjust.
6252 * server.c: Include tdesc.h.
6253 (gdbserver_xmltarget): Delete declaration.
6254 (get_features_xml, process_serial_event): Adjust.
6255 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
6256 declare.
6257 (struct process_info) <tdesc>: New field.
6258 (ipa_tdesc): Declare.
6259 * tdesc.c: New file.
6260 * tdesc.h: New file.
6261 * tracepoint.c: Include tdesc.h.
6262 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
6263 (get_context_regcache): Adjust to pass ipa_tdesc down.
6264 (do_action_at_tracepoint): Adjust to get the register cache size
6265 from the context regcache's description.
6266 (traceframe_walk_blocks): Adjust to get the register cache size
6267 from the current trace frame's description.
6268 (traceframe_get_pc): Adjust to get current trace frame's
6269 description and pass it down.
6270 (gdb_collect): Adjust to get the register cache size from the
6271 IPA's description.
6272 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
6273 (gdbserver_xmltarget): Delete.
6274 (initialize_low_tracepoint): Set the ipa's target description.
6275 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
6276 (initialize_low_tracepoint): Set the ipa's target description.
6277 * linux-x86-low.c: Include tdesc.h.
6278 [__x86_64__] (is_64bit_tdesc): New.
6279 (ps_get_thread_area, x86_get_thread_area): Use it.
6280 (i386_cannot_store_register): Rename to ...
6281 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
6282 (i386_cannot_fetch_register): Rename to ...
6283 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
6284 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
6285 to new interface.
6286 (target_regsets): Rename to ...
6287 (x86_regsets): ... this.
6288 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
6289 interface.
6290 (x86_siginfo_fixup): Use is_64bit_tdesc.
6291 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
6292 (tdesc_x32_avx_linux, tdesc_x32_linux)
6293 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
6294 Declare.
6295 (x86_linux_update_xmltarget): Delete.
6296 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
6297 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
6298 (AMD64_LINUX_USER64_CS): New.
6299 (x86_linux_read_description): New, based on
6300 x86_linux_update_xmltarget.
6301 (same_process_callback): New.
6302 (x86_arch_setup_process_callback): New.
6303 (x86_linux_update_xmltarget): New.
6304 (x86_regsets_info): New.
6305 (amd64_linux_regs_info): New.
6306 (i386_linux_usrregs_info): New.
6307 (i386_linux_regs_info): New.
6308 (x86_linux_regs_info): New.
6309 (x86_arch_setup): Reimplement.
6310 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
6311 (x86_emit_ops): Ditto.
6312 (the_low_target): Adjust. Install x86_linux_regs_info,
6313 x86_cannot_fetch_register, and x86_cannot_store_register.
6314 (initialize_low_arch): New.
6315 * linux-ia64-low.c (tdesc_ia64): Declare.
6316 (ia64_fetch_register): Adjust.
6317 (ia64_usrregs_info, regs_info): New globals.
6318 (ia64_regs_info): New function.
6319 (the_low_target): Adjust.
6320 (initialize_low_arch): New function.
6321 * linux-sparc-low.c (tdesc_sparc64): Declare.
6322 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
6323 Adjust.
6324 (sparc_arch_setup): New function.
6325 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
6326 (the_low_target): Adjust.
6327 (initialize_low_arch): New function.
6328 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
6329 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
6330 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
6331 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
6332 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
6333 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
6334 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
6335 (tdesc_powerpc_isa205_vsx64l): Declare.
6336 (ppc_cannot_store_register, ppc_collect_ptrace_register)
6337 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
6338 (ppc_set_pc, ppc_get_hwcap): Adjust.
6339 (ppc_usrregs_info): Forward declare.
6340 (!__powerpc64__) ppc_regmap_adjusted: New global.
6341 (ppc_arch_setup): Adjust to the current process'es target
6342 description.
6343 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
6344 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
6345 (ppc_store_evrregset): Adjust.
6346 (target_regsets): Rename to ...
6347 (ppc_regsets): ... this, and make static.
6348 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
6349 (ppc_regs_info): New function.
6350 (the_low_target): Adjust.
6351 (initialize_low_arch): New function.
6352 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
6353 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
6354 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
6355 (tdesc_s390x_linux64v2): Declare.
6356 (s390_collect_ptrace_register, s390_supply_ptrace_register)
6357 (s390_fill_gregset, s390_store_last_break): Adjust.
6358 (target_regsets): Rename to ...
6359 (s390_regsets): ... this, and make static.
6360 (s390_get_pc, s390_set_pc): Adjust.
6361 (s390_get_hwcap): New target_desc parameter, and use it.
6362 [__s390x__] (have_hwcap_s390_high_gprs): New global.
6363 (s390_arch_setup): Adjust to set the current process'es target
6364 description. Don't adjust the regmap.
6365 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
6366 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
6367 (regs_info_3264): New globals.
6368 (s390_regs_info): New function.
6369 (the_low_target): Adjust.
6370 (initialize_low_arch): New function.
6371 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
6372 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
6373 [__mips64] (init_registers_mips_linux)
6374 (init_registers_mips_dsp_linux): Delete defines.
6375 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
6376 (have_dsp): New global.
6377 (mips_read_description): New, based on mips_arch_setup.
6378 (mips_arch_setup): Reimplement.
6379 (get_usrregs_info): New function.
6380 (mips_cannot_fetch_register, mips_cannot_store_register)
6381 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
6382 (mips_fill_fpregset, mips_store_fpregset): Adjust.
6383 (target_regsets): Rename to ...
6384 (mips_regsets): ... this, and make static.
6385 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
6386 (dsp_regs_info, regs_info): New globals.
6387 (mips_regs_info): New function.
6388 (the_low_target): Adjust.
6389 (initialize_low_arch): New function.
6390 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
6391 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
6392 Declare.
6393 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
6394 (arm_read_description): New, with bits factored from
6395 arm_arch_setup.
6396 (arm_arch_setup): Reimplement.
6397 (target_regsets): Rename to ...
6398 (arm_regsets): ... this, and make static.
6399 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
6400 (arm_regs_info): New function.
6401 (the_low_target): Adjust.
6402 (initialize_low_arch): New function.
6403 * linux-m68k-low.c (tdesc_m68k): Declare.
6404 (target_regsets): Rename to ...
6405 (m68k_regsets): ... this, and make static.
6406 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
6407 (m68k_regs_info): New function.
6408 (m68k_arch_setup): New function.
6409 (the_low_target): Adjust.
6410 (initialize_low_arch): New function.
6411 * linux-sh-low.c (tdesc_sharch): Declare.
6412 (target_regsets): Rename to ...
6413 (sh_regsets): ... this, and make static.
6414 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
6415 (sh_regs_info, sh_arch_setup): New functions.
6416 (the_low_target): Adjust.
6417 (initialize_low_arch): New function.
6418 * linux-bfin-low.c (tdesc_bfin): Declare.
6419 (bfin_arch_setup): New function.
6420 (bfin_usrregs_info, regs_info): New globals.
6421 (bfin_regs_info): New function.
6422 (the_low_target): Adjust.
6423 (initialize_low_arch): New function.
6424 * linux-cris-low.c (tdesc_cris): Declare.
6425 (cris_arch_setup): New function.
6426 (cris_usrregs_info, regs_info): New globals.
6427 (cris_regs_info): New function.
6428 (the_low_target): Adjust.
6429 (initialize_low_arch): New function.
6430 * linux-cris-low.c (tdesc_crisv32): Declare.
6431 (cris_arch_setup): New function.
6432 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
6433 (cris_regs_info): New function.
6434 (the_low_target): Adjust.
6435 (initialize_low_arch): New function.
6436 * linux-m32r-low.c (tdesc_m32r): Declare.
6437 (m32r_arch_setup): New function.
6438 (m32r_usrregs_info, regs_info): New globals.
6439 (m32r_regs_info): Adjust.
6440 (initialize_low_arch): New function.
6441 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
6442 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
6443 (tic6x_usrregs_info): Forward declare.
6444 (tic6x_read_description): New function, based on ...
6445 (tic6x_arch_setup): ... this. Reimplement.
6446 (target_regsets): Rename to ...
6447 (tic6x_regsets): ... this, and make static.
6448 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
6449 (tic6x_regs_info): New function.
6450 (the_low_target): Adjust.
6451 (initialize_low_arch): New function.
6452 * linux-xtensa-low.c (tdesc_xtensa): Declare.
6453 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
6454 (target_regsets): Rename to ...
6455 (xtensa_regsets): ... this, and make static.
6456 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
6457 globals.
6458 (xtensa_arch_setup, xtensa_regs_info): New functions.
6459 (the_low_target): Adjust.
6460 (initialize_low_arch): New function.
6461 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
6462 (nios2_arch_setup): Set the current process'es tdesc.
6463 (target_regsets): Rename to ...
6464 (nios2_regsets): ... this.
6465 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
6466 (nios2_regs_info): New function.
6467 (the_low_target): Adjust.
6468 (initialize_low_arch): New function.
a261b8f5
PA
6469 * linux-aarch64-low.c (tdesc_aarch64): Declare.
6470 (aarch64_arch_setup): Set the current process'es tdesc.
6471 (target_regsets): Rename to ...
6472 (aarch64_regsets): ... this.
6473 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
6474 (aarch64_regs_info): New function.
6475 (the_low_target): Adjust.
6476 (initialize_low_arch): New function.
3aee8918
PA
6477 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
6478 globals.
6479 (target_regsets): Rename to ...
6480 (tile_regsets): ... this.
6481 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
6482 (tile_regs_info): New function.
6483 (tile_arch_setup): Set the current process'es tdesc.
6484 (the_low_target): Adjust.
6485 (initialize_low_arch): New function.
6486 * spu-low.c (tdesc_spu): Declare.
6487 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
6488 * win32-arm-low.c (tdesc_arm): Declare.
6489 (arm_arch_setup): New function.
6490 (the_low_target): Install arm_arch_setup instead of
6491 init_registers_arm.
6492 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
6493 (init_windows_x86): Rename to ...
6494 (i386_arch_setup): ... this. Set `win32_tdesc'.
6495 (the_low_target): Adjust.
6496 * win32-low.c (win32_tdesc): New global.
6497 (child_add_thread): Don't create the thread cache here.
6498 (do_initial_child_stuff): Set the new process'es tdesc.
6499 * win32-low.h (struct target_desc): Forward declare.
6500 (win32_tdesc): Declare.
6501 * lynx-i386-low.c (tdesc_i386): Declare global.
6502 (lynx_i386_arch_setup): Set `lynx_tdesc'.
6503 * lynx-low.c (lynx_tdesc): New global.
6504 (lynx_add_process): Set the new process'es tdesc.
6505 * lynx-low.h (struct target_desc): Forward declare.
6506 (lynx_tdesc): Declare global.
6507 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
6508 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
6509 * nto-low.c (nto_tdesc): New global.
6510 (do_attach): Set the new process'es tdesc.
6511 * nto-low.h (struct target_desc): Forward declare.
6512 (nto_tdesc): Declare.
6513 * nto-x86-low.c (tdesc_i386): Declare.
6514 (nto_x86_arch_setup): Set `nto_tdesc'.
6515
b1fbec62
GB
65162013-06-04 Gary Benson <gbenson@redhat.com>
6517
6518 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
6519 to qSupported response when appropriate.
6520 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
6521 with nonzero-length annex.
6522 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
6523 arguments supplied in annex.
6524
d1ec4ce7
DE
65252013-05-31 Doug Evans <dje@google.com>
6526
ac44adcb 6527 PR server/15594
d1ec4ce7
DE
6528 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
6529 64 bits in 64-cross-32 environment.
6530
9b25f2d3
PA
65312013-05-28 Pedro Alves <palves@redhat.com>
6532
6533 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
6534 (aarch64-without-fpu.c): Delete rule.
6535 * configure.srv (aarch64*-*-linux*): Remove references to
6536 aarch64-without-fpu.o and aarch64-without-fpu.xml.
6537 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
6538 declaration.
6539
6740dc9c
PA
65402013-05-24 Pedro Alves <palves@redhat.com>
6541
6542 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
6543 instead of strchr/decode_address. Error if the range isn't split
6544 with a ','. Don't assume there's be a ':' in the action.
6545
c2d6af84
PA
65462013-05-23 Yao Qi <yao@codesourcery.com>
6547 Pedro Alves <palves@redhat.com>
6548
6549 * linux-low.c (lwp_in_step_range): New function.
6550 (linux_wait_1): If the thread was range stepping and stopped
6551 outside the stepping range, report the stop to GDB. Otherwise,
6552 continue stepping. Add range stepping debug output.
6553 (linux_set_resume_request): Copy the step range from the resume
6554 request to the lwp.
6555 (linux_supports_range_stepping): New.
6556 (linux_target_ops) <supports_range_stepping>: Set to
6557 linux_supports_range_stepping.
6558 * linux-low.h (struct linux_target_ops)
6559 <supports_range_stepping>: New field.
6560 (struct lwp_info) <step_range_start, step_range_end>: New fields.
6561 * linux-x86-low.c (x86_supports_range_stepping): New.
6562 (the_low_target) <supports_range_stepping>: Set to
6563 x86_supports_range_stepping.
6564 * server.c (handle_v_cont): Handle 'r' action.
6565 (handle_v_requests): Append ";r" if the target supports range
6566 stepping.
6567 * target.h (struct thread_resume) <step_range_start,
6568 step_range_end>: New fields.
6569 (struct target_ops) <supports_range_stepping>:
6570 New field.
6571 (target_supports_range_stepping): New macro.
6572
58794e1a
JB
65732013-05-17 Joel Brobecker <brobecker@adacore.com>
6574
6575 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
6576 confusion in comment.
6577
d631c5a7
JB
65782013-05-17 Joel Brobecker <brobecker@adacore.com>
6579
6580 * lynx-low.c (struct process_info_private): New type.
6581 (lynx_add_process): New function.
6582 (lynx_create_inferior, lynx_attach): Replace calls to
6583 add_process by calls to lynx_add_process.
6584 (lynx_resume): If PTID is null, then try using
6585 current_process()->private->last_wait_event_ptid.
6586 Add comments.
6587 (lynx_clear_inferiors): Delete. The contents of that function
6588 has been inlined in lynx_mourn;
6589 (lynx_wait_1): Save the ptid in the process's private data.
6590 (lynx_mourn): Free the process' private data. Replace call
6591 to lynx_clear_inferiors by call to clear_inferiors.
6592
96f7a20f
YQ
65932013-05-17 Yao Qi <yao@codesourcery.com>
6594
6595 * i386-low.c (i386_length_and_rw_bits): Move the comment to
6596 the right place.
6597
db0dfaa0
LM
65982013-05-16 Luis Machado <lgustavo@codesourcery.com>
6599
6600 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
6601 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
6602 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
6603 PT_TEXT_END_ADDR guards. Update comments.
6604 (linux_target_op) <read_offsets>: Conditionally define to
6605 linux_read_offsets if the target is UCLIBC and if it defines
6606 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
6607
68f5f838
SL
66082013-05-06 Sandra Loosemore <sandra@codesourcery.com>
6609 Andrew Jenner <andrew@codesourcery.com>
6610
6611 * Makefile.in (SFILES): Add linux-nios2-low.c.
6612 (clean): Add action to delete nios2-linux.c.
6613 (nios2-linux.c): New rule.
6614 * configure.srv: Add nios2*-*-linux*.
6615 * linux-nios2-low.c: New.
6616
1ebff1fd
HAQ
66172013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
6618
6619 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
6620
f6150862
HZ
66212013-04-25 Hui Zhu <hui@codesourcery.com>
6622
6623 PR gdb/15186
f6150862
HZ
6624 * ax.c (ax_printf): Add fflush.
6625
614c279d
TT
66262013-04-22 Tom Tromey <tromey@redhat.com>
6627
6628 * Makefile.in (SFILES): Add filestuff.c.
6629 (OBS): Add filestuff.o.
6630 (filestuff.o): New target.
6631 * config.in, configure: Rebuild.
6632 * configure.ac: Check for fdwalk, pipe2.
6633
7d4e5717
PA
66342013-04-17 Pedro Alves <palves@redhat.com>
6635
6636 * configure.ac (USE_THREAD_DB): Delete variable.
6637 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
6638 Don't AC_SUBST USE_THREAD_DB.
6639 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
6640 * config.in, configure: Regenerate.
6641
d5c93e41
PA
66422013-04-16 Pedro Alves <palves@redhat.com>
6643
6644 * linux-low.h (struct lwp_info) <thread_known>: Move under
6645 the USE_THREAD_DB #ifdef.
6646
04f5fe89
PA
66472013-04-16 Pedro Alves <palves@redhat.com>
6648
6649 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
6650 (linux-low.o): Delete rule.
6651 * linux-low.h: Always include "gdb_thread_db.h" instead of
6652 conditionally including thread_db.h.
6653 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
6654 HAVE_THREAD_DB_H.
6655
480b27bf
JK
66562013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6657
6658 * Makefile.in (install-only): Fix make install regression.
6659
43662968
JK
66602013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
6661
6662 Convert man pages to texinfo, new gdbinit.5 texinfo page.
6663 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
6664 installation.
6665 * gdbserver.1: Remove.
6666
3e74e146
PA
66672013-03-22 Pedro Alves <palves@redhat.com>
6668
6669 * linux-low.c (handle_extended_wait): Don't call
6670 linux_enable_event_reporting.
6671
a8347a2a
TT
66722013-03-15 Tony Theodore <tonyt@logyst.com>
6673
6674 PR build/9098:
6675 * Makefile.in (SHELL): Use @SHELL@.
6676
eeb56fa7
SDJ
66772013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
6678
6679 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
6680 compiler warning.
6681
4fa7e2ff
JB
66822013-03-13 Joel Brobecker <brobecker@adacore.com>
6683
6684 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
6685 Remove extraneous NULL element.
6686
8ddb1965
YQ
66872013-03-13 Yao Qi <yao@codesourcery.com>
6688
6689 * tracepoint.c (traceframe_read_tsv): Look for the last matched
6690 'V' block in trace frame.
6691
9accd112
MM
66922013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6693
6694 * target.h (struct target_ops): Add btrace ops.
6695 (target_supports_btrace): New macro.
6696 (target_enable_btrace): New macro.
6697 (target_disable_btrace): New macro.
6698 (target_read_btrace): New macro.
6699 * gdbthread.h (struct thread_info): Add btrace field.
6700 * server.c: Include btrace-common.h.
6701 (handle_btrace_general_set): New function.
6702 (handle_btrace_enable): New function.
6703 (handle_btrace_disable): New function.
6704 (handle_general_set): Call handle_btrace_general_set.
6705 (handle_qxfer_btrace): New function.
6706 (struct qxfer qxfer_packets[]): Add btrace entry.
6707 * inferiors.c (remove_thread): Disable btrace.
6708 * linux-low: Include linux-btrace.h.
6709 (linux_low_enable_btrace): New function.
6710 (linux_low_read_btrace): New function.
6711 (linux_target_ops): Add btrace ops.
6712 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
6713 Add srv_linux_btrace=yes.
6714 (x86_64-*-linux*): Add linux-btrace.o.
6715 Add srv_linux_btrace=yes.
6716 * configure.ac: Define HAVE_LINUX_BTRACE.
6717 * config.in: Regenerated.
6718 * configure: Regenerated.
6719
5cc22e4c
MM
67202013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6721
6722 * server.c (handle_qxfer): Preserve error message if -3 is
6723 returned.
6724 (qxfer): Document the -3 return value.
6725
7c97f91e
MM
67262013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6727
6728 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
6729 (linux_btrace_h): New variable.
6730 (linux-btrace.o): New rule.
6731
be9a119c 67322013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
6733 Hafiz Abid Qadeer <abidh@codesourcery.com>
6734
6735 * tracepoint.c (trace_buffer_size): New global.
6736 (DEFAULT_TRACE_BUFFER_SIZE): New define.
6737 (init_trace_buffer): Change to one-argument function. Allocate
6738 trace buffer memory.
6739 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
6740 handle QTBuffer:size packet.
6741 (cmd_bigqtbuffer_size): New function.
6742 (initialize_tracepoint): Call init_trace_buffer with
6743 DEFAULT_TRACE_BUFFER_SIZE.
6744 * server.c (handle_query): Add QTBuffer:size in the
6745 supported packets.
6746
e64f7499
YQ
67472013-03-07 Yao Qi <yao@codesourcery.com>
6748
6749 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
6750 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
6751 of -1.
6752 (cmd_qtsp): Adjust condition. Do post increment.
6753 Set cur_action and cur_step_action back to 0.
6754
f0ae6fc3
PA
67552013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
6756
6757 PR server/15236
6758 * linux-low.c (linux_write_memory): Return early success if LEN is
6759 zero.
6760
b5b0b0af
CV
67612013-03-05 Corinna Vinschen <vinschen@redhat.de>
6762
334ad4a8 6763 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 6764
589bc927
TT
67652013-02-28 Tom Tromey <tromey@redhat.com>
6766
6767 * configure.ac: Invoke AC_SYS_LARGEFILE.
6768 * configure, config.in: Rebuild.
6769
dfe07582
CV
67702013-02-28 Corinna Vinschen <vinschen@redhat.com>
6771
6772 * win32-low.c: Throughout, fix format strings and casts of
6773 printf-like functions to avoid type related warnings on all
6774 platforms.
6775 (get_child_debug_event): Print dwDebugEventCode as hex since
6776 that's how it's usually documented.
6777
736cd585
YQ
67782013-02-28 Yao Qi <yao@codesourcery.com>
6779
6780 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
6781 pulongest.
6782
e1f58301
JW
67832013-02-27 Jiong Wang <jiwang@tilera.com>
6784
6785 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
6786 (reg-tilegx32.c): New rule.
6787 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
6788 * linux-tile-low.c (tile_arch_setup): New function. Invoke
6789 different register info initializer according to elf class.
6790 (init_registers_tilgx32): New function. The tilegx32 register info
6791 initializer.
6792 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
6793 (tile_store_gregset): Likewise.
6794
d171ca78
YQ
67952013-02-27 Yao Qi <yao@codesourcery.com>
6796
6797 * server.c (process_point_options): Print debug message when
6798 debug_threads is true.
6799
282bbdf3
YQ
68002013-02-26 Yao Qi <yao@codesourcery.com>
6801
6802 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
6803
aca22551
PA
68042013-02-19 Pedro Alves <palves@redhat.com>
6805 Kai Tietz <ktietz@redhat.com>
6806
6807 PR gdb/15161
6808
6809 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
6810 instead of strtoul to extract address from packet.
6811 (process_serial_event) <'z'>: Likewise.
6812
4f3cee1c
YQ
68132013-02-18 Yao Qi <yao@codesourcery.com>
6814
6815 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
6816
8e1d55a3
PA
68172013-02-14 Pedro Alves <palves@redhat.com>
6818
6819 Plug memory leak.
6820
6821 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
6822 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
6823
458820da
PA
68242013-02-14 Pedro Alves <palves@redhat.com>
6825
6826 * tracepoint.c (cmd_qtdpsrc): Use savestring.
6827
baea0dae
PA
68282013-02-14 Pedro Alves <palves@redhat.com>
6829
6830 * tracepoint.c (save_string): Delete.
6831 (add_tracepoint_action): Use savestring instead of save_string.
6832
0b1afbb3
PA
68332013-02-12 Pedro Alves <palves@redhat.com>
6834
6835 * linux-xtensa-low.c: Ditto.
6836 * xtensa-xtregs.c: Ditto.
6837
8a4ac37e
PA
68382013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
6839
6840 * thread-db.c (thread_db_get_tls_address): NULL pointer check
6841 thread_db.
6842
148de6bb
MS
68432013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
6844
6845 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
6846 aarch64_num_wp_regs and aarch64_num_bp_regs to
6847 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
6848
55fac6e0
MS
68492013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
6850
6851 * linux-aarch64-low.c (ps_get_thread_area): Replace
6852 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
6853
176eb98c
MS
68542013-02-04 Jim MacArthur <jim.macarthur@arm.com>
6855 Marcus Shawcroft <marcus.shawcroft@arm.com>
6856 Nigel Stephens <nigel.stephens@arm.com>
6857 Yufeng Zhang <yufeng.zhang@arm.com>
6858
6859 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
6860 (aarch64.c, aarch64-without-fpu.c): New targets.
6861 * configure.srv (aarch64*-*-linux*): New.
6862 * linux-aarch64-low.c: New file.
6863
56f7af9c
MS
68642013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
6865
43aaf8b6 6866 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
6867 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
6868 (dequeue_one_deferred_signal, linux_resume_one_thread)
6869 (fetch_register, linux_write_memory, linux_enable_event_reporting)
6870 (linux_tracefork_grandchild, linux_test_for_tracefork)
6871 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
6872 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
6873 where the argument is 0.
6874
60f662b0
YQ
68752013-01-25 Yao Qi <yao@codesourcery.com>
6876
6877 * event-loop.c: Include "queue.h".
6878 (gdb_event_p): New typedef.
6879 (struct gdb_event) <next_event>: Remove.
6880 (event_queue): Change to QUEUE(gdb_event_p).
6881 (async_queue_event): Remove.
6882 (gdb_event_xfree): New.
6883 (initialize_event_loop): New.
6884 (process_event): Use API from QUEUE.
6885 (wait_for_event): Likewise.
6886 * server.c (main): Call initialize_event_loop.
6887 * server.h (initialize_event_loop): Declare.
6888
5ae4861a
YQ
68892013-01-18 Yao Qi <yao@codesourcery.com>
6890
6891 * ax.h (struct eval_agent_expr_context): New.
6892 (gdb_eval_agent_expr): Update declaration.
6893 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
6894 TFRAME. Add new argument CTX.
6895 * server.h (struct eval_agent_expr_context): Declare.
6896 (agent_mem_read, agent_tsv_read): Update declaration.
6897 (agent_mem_read_string): Likewise.
6898 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
6899 (add_traceframe_block): Add new argument TPOINT.
6900 Increase TPOINT->traceframe_usage.
6901 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
6902 eval_tracepoint_agent_expr.
6903 (condition_true_at_tracepoint): Likewise.
6904 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
6905 (agent_mem_read_string, agent_tsv_read): Likewise.
6906
85e00e85
YQ
69072013-01-16 Yao Qi <yao@codesourcery.com>
6908
6909 * linux-low.c (linux_resume_one_lwp): Don't check
6910 'lwp->bp_reinsert != 0'.
6911
4039cf45
JB
69122013-01-07 Joel Brobecker <brobecker@adacore.com>
6913 Pedro Alves <palves@redhat.com>
6914
6915 * lynx-low.c (ptrace_request_to_str): Define a temporary
6916 macro and use it to simplify this function's implementation.
6917
9044dee2
JB
69182013-01-07 Joel Brobecker <brobecker@adacore.com>
6919
6920 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
6921 sets errno.
6922
e6352c8f
JB
69232013-01-07 Joel Brobecker <brobecker@adacore.com>
6924
6925 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
6926
50681a27
JB
69272013-01-07 Joel Brobecker <brobecker@adacore.com>
6928
6929 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
6930
3f6e77ef
JB
69312013-01-07 Joel Brobecker <brobecker@adacore.com>
6932
6933 * lynx-low.c (lynx_resume): Use the resume_info parameter
6934 to determine the ptid for the lynx_ptrace call, unless
6935 it is equal to minus_one_ptid, in which case we use the
6936 ptid of the current_inferior.
6937 (lynx_wait_1): After having received a thread create/exit
6938 event, resume the inferior's execution using the signaling
6939 thread's ptid, rather than the old ptid.
6940
7fda33ae
JB
69412013-01-07 Joel Brobecker <brobecker@adacore.com>
6942
6943 * lynx-low.c (lynx_resume): Delete variable ret.
6944
b9786c74
JB
69452013-01-01 Joel Brobecker <brobecker@adacore.com>
6946
6947 * gdbreplay.c (gdbreplay_version): Update copyright year.
6948 * server.c (gdbserver_version): Likewise.
6949
8b93d60f
JB
69502012-12-17 Joel Brobecker <brobecker@adacore.com>
6951
6952 * lynx-low.c (lynx_wait_1): Add debug trace before adding
6953 new thread.
6954
037335a7
JB
69552012-12-17 Joel Brobecker <brobecker@adacore.com>
6956
6957 * lynx-low.c (ptrace_request_to_str): Add handling for
6958 PTRACE_GETTRACESIG.
6959
52d4cbd8
JB
69602012-12-17 Joel Brobecker <brobecker@adacore.com>
6961
6962 * lynx-low.c (lynx_attach): Delete variable new_process.
6963
ab8f6ca9
JB
69642012-12-17 Joel Brobecker <brobecker@adacore.com>
6965
6966 * lynx-low.c (lynx_create_inferior): Delete variable
6967 new_process.
6968
78cbc024
JB
69692012-12-17 Joel Brobecker <brobecker@adacore.com>
6970
6971 * lynx-low.c (ptrace_request_to_str): Do not handle
6972 PTRACE_GETTHREADLIST if this macro does not exist.
6973
14a00470
YQ
69742012-12-15 Yao Qi <yao@codesourcery.com>
6975
6976 * Makefile.in (OBS): Add notif.o.
6977 * notif.c, notif.h: New.
6978 * server.c: Include "notif.h".
6979 (struct vstop_notif) <next>: Remove.
6980 <base>: New field.
6981 (queue_stop_reply): Update.
6982 (push_event, send_next_stop_reply): Remove.
6983 (discard_queued_stop_replies): Update.
6984 (notif_stop): New variable.
6985 (handle_v_stopped): Remove.
6986 (handle_v_requests): Don't call handle_v_stopped. Call
6987 handle_ack_notif instead.
6988 (queue_stop_reply_callback): Call notif_event_enque instead
6989 of queue_stop_reply.
6990 (handle_status): Don't call send_next_stop_reply, call
6991 notif_write_event instead.
6992 (kill_inferior_callback): Likewise.
6993 (detach_or_kill_inferior_callback): Likewise.
6994 (main): Call initialize_notif.
6995 (process_serial_event): Call QUEUE_is_empty.
6996 (handle_target_event): Call notif_push instead of push event.
6997 * server.h (push_event): Remove declaration.
6998
61c125b9
TT
69992012-12-10 Tom Tromey <tromey@redhat.com>
7000
7001 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
7002 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
7003 macros.
7004 (.c.o): Rewrite.
7005 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
7006 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
7007 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
7008 (amd64-linux-ipa.o, ax.o): Rewrite.
7009 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
7010 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
7011 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
7012 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
7013 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
7014 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
7015 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
7016 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
7017 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
7018 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
7019 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
7020 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
7021 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
7022 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
7023 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
7024 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
7025 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
7026 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
7027 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
7028 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
7029 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
7030 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
7031 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
7032 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
7033 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
7034 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
7035 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
7036 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
7037 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
7038 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
7039 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
7040 (reg-tilegx.o): Remove.
7041 (all_object_files): New macro.
7042 Include .deps files.
7043 * aclocal.m4, configure: Rebuild.
7044 * acinclude.m4: Include depstand.m4, lead-dot.m4.
7045 * configure.ac: Invoke ZW_CREATE_DEPDIR,
7046 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
7047
e90e9ad9
TT
70482012-12-05 Tom Tromey <tromey@redhat.com>
7049
7050 PR gdb/14917:
7051 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
7052
02d403bf 70532012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
7054
7055 * configure.ac: Check for linux/perf_event.h.
7056 * config.in: Regenerated.
7057 * configure: Regenerated.
7058
0270a750
PA
70592012-11-26 Maxime Villard <rustyBSD@gmx.fr>
7060
7061 * hostio.c (handle_readlink): Decrease buffer size
7062 parameter passed to readlink by one byte.
7063
8c29b58e
YQ
70642012-11-26 Yao Qi <yao@codesourcery.com>
7065
7066 * configure.ac (build_warnings): Append '-Wempty-body'.
7067 * configure: Regenerated.
7068 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
7069 body.
7070
8bdce1ff
PM
70712012-11-15 Pierre Muller <muller@sourceware.org>
7072
7073 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
7074 * config.in: Regenerate.
7075 * configure: Regenerate.
7076 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
7077 Use "gdb_wait.h" header instead of <sys/wait.h> header.
7078 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7079 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
7080 header.
7081 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
7082 instead of <sys/wait.h> header.
7083 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7084
02d403bf 70852012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
7086
7087 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
7088 (various make rules): Remove -DGDBSERVER
7089
fbd5db48
YQ
70902012-11-09 Yao Qi <yao@codesourcery.com>
7091
7092 * spu-low.c (current_ptid): Move it to ..
7093 * gdbthread.h: ... here. New.
7094 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
7095 * server.c (myresume, process_serial_event): Likewise.
7096 * thread-db.c (thread_db_find_new_threads): Likewise.
7097 * tracepoint.c (run_inferior_command): Likewise.
7098
b3dc46ff
AB
70992012-10-01 Andrew Burgess <aburgess@broadcom.com>
7100
7101 * server.c (handle_search_memory_1): Include access length in
7102 warning message.
7103
07c04788
HPN
71042012-09-05 Michael Brandt <michael.brandt@axis.com>
7105
7106 * linux-crisv32-low.c: Fix compile errors.
7107
918d227b
YQ
71082012-09-04 Yao Qi <yao@codesourcery.com>
7109
7110 * tracepoint.c (cmd_qtsv): Adjust debug message.
7111 Don't check CUR_TPOINT.
7112
18c1b81a
YQ
71132012-08-28 Yao Qi <yao@codesourcery.com>
7114
7115 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
7116 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
7117 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
7118 Remove declarations of xmalloc, xreallloc, xstrdup and
7119 freeargv.
7120 * Makefile.in (libiberty_h): New.
7121 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
7122 (linux-bfin-low.o): Append dependency 'libiberty.h'.
7123
dc82f37b
YQ
71242012-08-23 Yao Qi <yao@codesourcery.com>
7125
7126 * server.h: Remove declaration of 'xsnprintf'.
7127
406b1477
KS
71282012-08-22 Keith Seitz <keiths@redhat.com>
7129
7130 * server.h: Include build-gnulib-gbserver/config.h.
7131 * gdbreplay.c: Likewise.
7132
e6712ff1
DE
71332012-08-08 Doug Evans <dje@google.com>
7134
7135 * Makefile.in (SFILES): Add gdb_vecs.c.
7136 (OBS): Add gdb_vecs.o.
7137 (gdb_vecs_h, host_defs_h): New variables.
7138 (thread-db.o): Add $(gdb_vecs_h) dependency.
7139 (gdb_vecs.o): New rule.
7140 * thread-db.c: #include "gdb_vecs.h".
7141 (thread_db_load_search): Use a vector to iterate over path elements.
7142 Handle text appearing after "$pdir".
7143
7144 * configure.ac: Add check for strstr.
7145 * config.in: Regenerate.
7146 * configure: Regenerate.
7147
7c3270ae
UW
71482012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
7149
7150 * hostio.c (handle_pread): If pread fails, fall back to attempting
7151 lseek/read.
7152 (handle_pwrite): Likewise for pwrite.
7153
b62e2b27
UW
71542012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
7155
7156 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
7157 between unsupported TYPE and unimplementable ADDR/LEN combination.
7158 (arm_insert_point): Act on new return value.
7159
78a99e91
PA
71602012-07-31 Pedro Alves <palves@redhat.com>
7161
7162 * server.c (process_point_options): Only skip tokens if we find
7163 one that is unrecognized. Don't treat 'X' specially while
7164 skipping unrecognized tokens.
7165
fcf303ab
UW
71662012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
7167
7168 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
7169 to 4-byte-align HW breakpoint addresses for Thumb.
7170
7255706c
YQ
71712012-07-27 Yao Qi <yao@codesourcery.com>
7172
7173 PR remote/14161.
7174
7175 * server.h: Declare gdb_agent_about_to_close.
7176 * target.c (kill_inferior): Include "agent.h".
7177 New. Send command 'kill'.
7178 * target.h (kill_inferior): Removed macro.
7179 * tracepoint.c (gdb_agent_about_to_close): New.
7180 (gdb_agent_helper_thread): Handle command 'close'.
7181 Wait endlessly until the inferior stops.
7182 Install gdb_agent_remove_socket to atexit hook.
7183 (agent_socket_name): New static variable.
7184 (gdb_agent_socket_init): Replace local variable 'name' with
7185 'agent_socket_name'.
7186 (gdb_agent_remove_socket): New.
7187
5a3f286f
YQ
71882012-07-27 Yao Qi <yao@codesourcery.com>
7189
7190 * server.c (process_point_options): Stop at 'X' when parsing.
7191
961bd387
ME
71922012-07-19 Michael Eager <eager@eagercon.com>
7193
a261b8f5 7194 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
7195 to hw_execute.
7196 * linux-x86-low.c (x86_insert_point, x86_remove_point):
7197 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
7198 hardware breakpoint.
7199
aa7c7447
JK
72002012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7201
7202 * gdbserver/linux-low.c (initialize_low): Call
7203 linux_ptrace_init_warnings.
7204
7f216e7c
DE
72052012-07-02 Doug Evans <dje@google.com>
7206
7207 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
7208 pointer to int.
7209
d3ce09f5
SS
72102012-07-02 Stan Shebs <stan@codesourcery.com>
7211
7212 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
7213 (ax.o): Add it to build rule.
7214 (ax-ipa.o): Ditto.
7215 (OBS): Add format.o.
7216 (IPA_OBS): Add format.o.
7217 * server.c (handle_query): Claim support for breakpoint commands.
7218 (process_point_options): Add command case.
7219 (process_serial_event): Leave running if there are printfs in
7220 effect.
7221 * mem-break.h (any_persistent_commands): Declare.
7222 (add_breakpoint_commands): Declare.
7223 (gdb_no_commands_at_breakpoint): Declare.
7224 (run_breakpoint_commands): Declare.
7225 * mem-break.c (struct point_command_list): New struct.
7226 (struct breakpoint): New field command_list.
7227 (any_persistent_commands): New function.
7228 (add_commands_to_breakpoint): New function.
7229 (add_breakpoint_commands): New function.
7230 (gdb_no_commands_at_breakpoint): New function.
7231 (run_breakpoint_commands): New function.
7232 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
7233 locally.
7234 * ax.c: Include format.h.
7235 (ax_printf): New function.
7236 (gdb_eval_agent_expr): Add printf opcode.
7237
2f8f6aed
YQ
72382012-06-13 Yao Qi <yao@codesourcery.com>
7239
7240 * server.c (start_inferior): Remove duplicated writes to fields
7241 'last_resume_kind' and 'last_status' of 'current_inferior'.
7242
0c9070b3
YQ
72432012-06-12 Yao Qi <yao@codesourcery.com>
7244 Pedro Alves <palves@redhat.com>
7245
7246 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
7247 comment.
7248 * server.c (handle_v_cont): Extend comment.
7249
c52daf70
YQ
72502012-06-11 Yao Qi <yao@codesourcery.com>
7251
7252 * linux-low.c (linux_attach): Add 'static'.
7253
d38bbb0a
YQ
72542012-06-06 Yao Qi <yao@codesourcery.com>
7255
7256 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
7257
89dc0afd
JK
72582012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7259
7260 Fix gcc -flto compilation warning.
7261 * server.c (main): Make variable multi_mode and attach volatile.
7262
75f62ce7
TJB
72632012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7264
7265 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
7266 if the platform doesn't know about it.
7267
65f479b6
PA
72682012-05-30 Jeff Kenton <jkenton@tilera.com>
7269
7270 * Makefile.in (SFILES): Add linux-tile-low.c.
7271 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
7272 * configure.srv: Handle tilegx-*-linux*.
7273 * linux-tile-low.c: New file.
7274
0c5bf5a9
JK
72752012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7276
7277 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
7278
a493e3e2
PA
72792012-05-24 Pedro Alves <palves@redhat.com>
7280
7281 PR gdb/7205
7282
43aaf8b6 7283 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 7284
2ea28649
PA
72852012-05-24 Pedro Alves <palves@redhat.com>
7286
7287 PR gdb/7205
7288
7289 Replace target_signal with gdb_signal throughout.
7290
8d409d16
MR
72912012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
7292
7293 * linux-low.c (linux_store_registers): Avoid the copying sequence
7294 when no data has been retrieved by ptrace.
7295
23512c01
MGD
72962012-05-22 Will Deacon <will.deacon@arm.com>
7297
7298 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
7299 Include asm/ptrace.h.
7300 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
7301 already defined.
7302
4934b29e
MR
73032012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
7304
7305 * linux-low.c (linux_store_registers): Don't re-retrieve data
7306 with ptrace that has already been obtained from /proc. Always
7307 copy any data retrieved with ptrace to the buffer supplied.
7308
bde24c0a
PA
73092012-05-11 Yao Qi <yao@codesourcery.com>
7310 Pedro Alves <palves@redhat.com>
7311
7312 * linux-low.c (enum stopping_threads_kind): New.
7313 (stopping_threads): Change type to `enum stopping_threads_kind'.
7314 (handle_extended_wait): If stopping and suspending threads, leave
7315 the new_lwp suspended too.
7316 (linux_wait_for_event): Adjust.
7317 (stop_all_lwps): Set `stopping_threads' to
7318 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
7319 whether we're suspending threads or just stopping them. Assert no
7320 recursion happens.
7321
623b6bdf
YQ
73222012-04-29 Yao Qi <yao@codesourcery.com>
7323
7324 * server.h: Move some code to ...
7325 * gdbthread.h: ... here. New.
7326 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
7327 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
7328 (nto-low.o, win32-low.o): Likewise.
7329 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
7330 * regcache.c, remote-utils.c, server.c: Likewise.
7331 * target.c, tracepoint.c, win32-low.c: Likewise.
7332
f15f9948
TJB
73332012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7334
7335 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
7336 (PTRACE_ARG4_TYPE): Likewise.
7337 (PTRACE_XFER_TYPE): Likewise.
7338 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
7339 ptrace to PTRACE_ARG3_TYPE.
7340 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
7341 (PTRACE_ARG4_TYPE): Likewise.
7342 (PTRACE_XFER_TYPE): Likewise.
7343 (linux_detach_one_lwp): Cast fourth argument of
7344 ptrace to long then PTRACE_ARG4_TYPE.
7345 (regsets_fetch_inferior_registers): Cast third argument of
7346 ptrace to long then PTRACE_ARG3_TYPE.
7347 (regsets_store_inferior_registers): Likewise.
7348
38ea300a
PA
73492012-04-20 Pedro Alves <palves@redhat.com>
7350
7351 * configure: Regenerate.
7352
c971b7fa
PA
73532012-04-19 Pedro Alves <palves@redhat.com>
7354
43aaf8b6 7355 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 7356 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
7357 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
7358 (all, install-only, uninstall, clean-info, all-lib, clean): No
7359 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
7360 (maintainer-clean realclean distclean): Use subdir_do.
7361 (subdir_do): New.
7362 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 7363 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
7364 * acinclude.m4: Include acx_configure_dir.m4.
7365 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
7366 calls. Call AC_PROG_RANLIB. Configure gnulib using
7367 ACX_CONFIGURE_DIR.
7368 (GNULIB): New.
7369 (GNULIB_STDINT_H): Adjust.
7370 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
7371 * gdbreplay.c: Include build-gnulib/config.h.
7372 * server.h: Likewise.
7373 * aclocal.m4: Regenerate.
7374 * config.in: Regenerate.
7375 * configure: Regenerate.
c971b7fa 7376
809277f8
PA
73772012-04-19 Pedro Alves <palves@redhat.com>
7378
7379 * Makefile.in (LIBGNU, INCGNU): Adjust.
7380 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
7381 (all, install-only, uninstall, clean-info, all-lib, clean)
7382 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
7383 * configure.ac: Adjust AC_OUTPUT output.
7384 * aclocal.m4: Regenerate.
7385 * configure: Regenerate.
7386
fd9bb8b8
PA
73872012-04-19 Pedro Alves <palves@redhat.com>
7388
7389 * Makefile.in (generated_files): New.
7390 (server_h): Remove the explicit dependency on config.h, and depend
7391 on $generated_files.
7392
1c298c66
PA
73932012-04-19 Pedro Alves <palves@redhat.com>
7394
7395 * Makefile.in (INCGNU): Add -Ignulib.
7396
57c4b50b
PA
73972012-04-19 Pedro Alves <palves@redhat.com>
7398
7399 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
7400 (INCGNU): ... this, and spell out -I here.
7401 (GNULIB_LIB): Rename to ...
7402 (LIBGNU): ... this.
7403 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
7404
1030e047
PA
74052012-04-19 Pedro Alves <palves@redhat.com>
7406
7407 * config.in: Regenerate.
7408
447d4319
PA
74092012-04-19 Pedro Alves <palves@redhat.com>
7410
7411 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
7412 * server.h (memmem): Remove declaration.
7413 * config.in: Regenerate.
7414 * configure: Regenerate.
7415
aad9eab9
YQ
74162012-04-19 Yao Qi <yao@codesourcery.com>
7417
7418 * Makefile.in (SFILES): Add common/vec.c.
7419 (OBS): Add vec.o.
7420 (vec.o): New rule.
7421
3e10640f
YQ
74222012-04-19 Yao Qi <yao@codesourcery.com>
7423
7424 * remote-utils.c (prepare_resume_reply): Replace with macro
7425 target_core_of_thread.
7426 * server.c (handle_qxfer_threads_proper): Likewise.
7427 * target.h (traget_core_of_thread): New macro.
7428
71622373
PA
74292012-04-18 Pedro Alves <palves@redhat.com>
7430
7431 * aclocal.m4: Regenerate.
7432 * configure: Regenerate.
7433
80d26939
YQ
74342012-04-16 Yao Qi <yao@codesourcery.com>
7435
7436 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
7437 duplicated on address.
7438
42476b70
YQ
74392012-04-16 Yao Qi <yao@codesourcery.com>
7440
7441 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
7442 (struct tracepoint_action_ops) <send>: New field.
7443 (m_tracepoint_action_send, r_tracepoint_action_send): New.
7444 (agent_expr_send, x_tracepoint_action_send): New.
7445 (l_tracepoint_action_send): New.
7446 (cmd_qtdp): Download and install tracepoint
7447 according to `use_agent'.
7448 (run_inferior_command): Add one more parameter `len'.
7449 Update callers.
7450 (tracepoint_send_agent): New.
7451 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
7452
7bc83639
YQ
74532012-04-16 Yao Qi <yao@codesourcery.com>
7454
7455 * tracepoint.c (download_tracepoints): Moved to ...
7456 (cmd_qtstart): ... here.
7457
5f18041e
YQ
74582012-04-14 Yao Qi <yao@codesourcery.com>
7459
7460 * tracepoint.c: Include inttypes.h.
7461 (struct collect_memory_action): Use sized types.
7462 (struct tracepoint): Likewise.
7463 (cmd_qtdp, stop_tracing): Update print specifiers.
7464 (cmd_qtp, response_tracepoint): Likewise.
7465 (collect_data_at_tracepoint): Likewise.
7466 (collect_data_at_step): Likewise.
7467
55a8c076
YQ
74682012-04-14 Yao Qi <yao@codesourcery.com>
7469
7470 Import gnulib module inttypes.
7471 * aclocal.m4, config.in, configure: Regenerated.
7472
dc750257
YQ
74732012-04-14 Yao Qi <yao@codesourcery.com>
7474
7475 * Makefile.in (maintainer-clean, realclean, distclean): Remove
7476 Makefile and config.status at last.
7477
0ab5faf9
YQ
74782012-04-13 Yao Qi <yao@codesourcery.com>
7479
7480 * tracepoint.c: Include stdint.h unconditionally.
7481
18f5fd81
TJB
74822012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7483
7484 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
7485 on BFD_HAVE_SYS_PROCFS_TYPE.
7486 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
7487 * configure: Regenerate.
7488 * config.in: Likewise.
7489
4d47af5c
L
74902012-04-13 H.J. Lu <hongjiu.lu@intel.com>
7491
7492 * Makefile.in (clean): Also remove x32.c x32-linux.c
7493 x32-avx.c x32-avx-linux.c.
7494 (x32.o): New target.
7495 (x32.c): Likewise.
7496 (x32-linux.o): Likewise.
7497 (x32-linux.c): Likewise.
7498 (x32-avx.o): Likewise.
7499 (x32-avx.c): Likewise.
7500 (x32-avx-linux.o): Likewise.
7501 (x32-avx-linux.c): Likewise.
7502
7503 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
7504 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
7505 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
7506 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
7507 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
7508 i386/x32-avx-linux.xml.
7509
7510 * linux-x86-low.c (init_registers_x32_linux): New prototype.
7511 (init_registers_x32_avx_linux): Likwise.
7512 (x86_linux_update_xmltarget): Call init_registers_x32_linux
7513 or init_registers_x32_avx_linux if linux_is_elf64 is false.
7514
ecedbe58
PA
75152012-04-13 Pedro Alves <palves@redhat.com>
7516
7517 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
7518 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
7519 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
7520 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
7521 the sub-make.
7522
c92b5177
L
75232012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7524
7525 * linux-x86-low.c (compat_x32_clock_t): New.
7526 (compat_x32_siginfo_t): Likewise.
7527 (compat_x32_siginfo_from_siginfo): Likewise.
7528 (siginfo_from_compat_x32_siginfo): Likewise.
7529 (linux_is_elf64): Likewise.
7530 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
7531 and siginfo_from_compat_x32_siginfo for x32.
7532 (x86_arch_setup): Set linux_is_elf64.
7533
214d508e
L
75342012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7535
7536 PR gdb/13969
7537 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
7538 e_machine field.
7539 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
7540 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
7541 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
7542 compatible with process.
7543
c9a1864a
YQ
75442012-04-12 Yao Qi <yao@codesourcery.com>
7545
7546 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
7547 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
7548 (install-only, install-info, clean): Handle sub dir gnulib.
7549 (all-lib, am--refresh): New targets.
7550 (memmem.o): Remove target.
7551 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
7552 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
7553 (AC_REPLACE_FUNCS): Remove memmem.
7554 Invoke gl_INIT and AM_INIT_AUTOMAKE.
7555 (AC_OUTPUT): Generate Makefile in gnulib/.
7556 * aclocal.m4, config.in, configure: Regenerated.
7557
367ba2c2
MR
75582012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
7559
7560 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
7561
9d236627
PA
75622012-04-05 Pedro Alves <palves@redhat.com>
7563
7564 -Werror=strict-aliasing
7565
7566 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
7567 pointer.
7568
111217b3
PA
75692012-04-04 Pedro Alves <palves@redhat.com>
7570
7571 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7572 (sparc_store_gregset_from_stack, sparc_store_gregset)
7573 (sparc_breakpoint_at): Fix formatting.
7574
8365dcf5
TJB
75752012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7576
7577 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
7578 are available.
7579 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
7580 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
7581 * config.in: Regenerate.
7582 * configure: Likewise.
7583
689cc2ae
PA
75842012-03-29 Pedro Alves <palves@redhat.com>
7585
7586 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
7587 Correct ptrace arguments.
7588
c14dfd32
PA
75892012-03-28 Pedro Alves <palves@redhat.com>
7590
7591 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
7592 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
7593 (IA64_FR1_REGNUM): New defines.
7594 (ia64_fetch_register): New.
7595 (the_low_target): Install it.
7596 * linux-low.h (struct linux_target_ops) <fetch_register>: New
7597 field.
7598 * linux-low.c (linux_fetch_registers): Try the
7599 the_low_target.fetch_register hook first.
7600
7601 * linux-arm-low.c (the_low_target): Adjust.
7602 * linux-bfin-low.c (the_low_target): Adjust.
7603 * linux-cris-low.c (the_low_target): Adjust.
7604 * linux-crisv32-low.c (the_low_target): Adjust.
7605 * linux-m32r-low.c (the_low_target): Adjust.
7606 * linux-m68k-low.c (the_low_target): Adjust.
7607 * linux-mips-low.c (the_low_target): Adjust.
7608 * linux-ppc-low.c (the_low_target): Adjust.
7609 * linux-s390-low.c (the_low_target): Adjust.
7610 * linux-sh-low.c (the_low_target): Adjust.
7611 * linux-sparc-low.c (the_low_target): Adjust.
7612 * linux-tic6x-low.c (the_low_target): Adjust.
7613 * linux-x86-low.c (the_low_target): Adjust.
7614 * linux-xtensa-low.c (the_low_target): Adjust.
7615
63c88e13
PA
76162012-03-26 Pedro Alves <palves@redhat.com>
7617
7618 * server.c (handle_qxfer_libraries): Don't bail early if
7619 the_target->qxfer_libraries_svr4 is not NULL.
7620
fb723180
PA
76212012-03-26 Pedro Alves <palves@redhat.com>
7622
7623 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
7624
0afae3cf
PA
76252012-03-23 Pedro Alves <palves@redhat.com>
7626
7627 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
7628 "library-list-svr4" element's start tag when the the DSO list is
7629 empty.
7630
485f1ee4
PA
76312012-03-23 Pedro Alves <palves@redhat.com>
7632
7633 * linux-low.c (read_one_ptr): Read the inferior's pointer through
7634 a variable whose type size is the same as the inferior's pointer
7635 size.
7636
a5362b9a
TS
76372012-03-21 Thomas Schwinge <thomas@codesourcery.com>
7638
7639 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
7640 struct siginfo.
7641 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
7642 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
7643 * linux-low.h: Include <signal.h>.
7644 (struct siginfo): Remove forward declaration.
7645 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
7646 struct siginfo.
7647
d226c142
MF
76482012-03-21 Mike Frysinger <vapier@gentoo.org>
7649
7650 * .gitignore: Ignore more files.
7651
122f36ef
PA
76522012-03-19 Pedro Alves <palves@redhat.com>
7653 Jan Kratochvil <jan.kratochvil@redhat.com>
7654
7655 * server.c (cont_thread, general_thread): Add describing comments.
7656 (start_inferior): Clear `cont_thread'.
7657 (handle_v_cont): Don't set `cont_thread' if resuming all threads
7658 of a process.
7659
fc3e5175
YQ
76602012-03-15 Yao Qi <yao@codesourcery.com>
7661
7662 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
7663 handling to ...
7664 (cmd_qtdp): ... here.
7665
8d0d92cd
YQ
76662012-03-15 Yao Qi <yao@codesourcery.com>
7667
7668 * tracepoint.c (struct tracepoint_action_ops): New.
7669 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
7670 (m_tracepoint_action_download): New.
7671 (r_tracepoint_action_download): New.
7672 (x_tracepoint_action_download): New.
7673 (l_tracepoint_action_download): New.
7674 (add_tracepoint_action): Install `action->ops' according type.
7675 (download_tracepoint_1): Move code `download' function pointer
7676 of various tracepoint_action_ops.
7677
87b0bb13
JK
76782012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7679
7680 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
7681 linux_ptrace_attach_warnings.
7682
5f572dec
JK
76832012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7684
7685 * Makefile.in (linux-ptrace.o): New.
7686 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
7687 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
7688 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
7689 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
7690 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
7691 of these targets.
7692 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
7693
f4647387
YQ
76942012-03-08 Yao Qi <yao@codesourcery.com>
7695 Pedro Alves <palves@redhat.com>
7696
7697 Fix PR server/13392.
7698 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
7699 offset of JMP insn.
7700 * tracepoint.c (remove_tracepoint): New.
7701 (cmd_qtdp): Call remove_tracepoint when failed to install.
7702
9b224c5e
PA
77032012-03-07 Pedro Alves <palves@redhat.com>
7704
7705 * linux-low.c (get_detach_signal): New.
7706 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
7707 Pass on pending signals to PTRACE_DETACH. Check the result of the
7708 ptrace call.
7709 * server.c (program_signals, program_signals_p): New.
7710 (handle_general_set): Handle QProgramSignals.
7711 * server.h (program_signals, program_signals_p): Declare.
7712
e237a7e2
JK
77132012-03-05 Pedro Alves <palves@redhat.com>
7714 Jan Kratochvil <jan.kratochvil@redhat.com>
7715
7716 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
7717 New comment why.
7718
5808517f
YQ
77192012-03-03 Yao Qi <yao@codesourcery.com>
7720
7721 * tracepoint.c (tracepoint_look_up_symbols): Update call to
7722 agent_look_up_symbols.
7723
58b4daa5
YQ
77242012-03-03 Yao Qi <yao@codesourcery.com>
7725
7726 * Makefile.in (linux-low.o): Keep dependence on agent.h.
7727 (linux-x86-low.o): Likewise.
7728 * server.h: Remove in_process_agent_loaded.
7729 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
7730 common/agent.c.
7731 Update callers.
7732
8ffcbaaf
YQ
77332012-03-03 Yao Qi <yao@codesourcery.com>
7734
7735 * tracepoint.c (gdb_agent_capability): New global.
7736 (in_process_agent_loaded_ust): Renamed to
7737 `in_process_agent_supports_ust'.
7738 Update callers.
7739 (in_process_agent_supports_ust): Call agent_capability_check.
7740 (clear_installed_tracepoints): Assert that agent supports
7741 agent.
7742
d1feda86
YQ
77432012-03-03 Yao Qi <yao@codesourcery.com>
7744
7745 * linux-low.c (linux_supports_agent): New.
7746 (linux_target_ops): Initialize field `supports_agent' with
7747 linux_supports_agent.
7748 * target.h (struct target_ops) <supports_agent>: New.
7749 (target_supports_agent): New macro.
7750 * server.c (handle_general_set): Handle packet 'QAgent'.
7751 (handle_query): Send `QAgent+'.
7752 * Makefile.in (server.o): Depends on agent.h.
7753
2fa291ac
YQ
77542012-03-03 Yao Qi <yao@codesourcery.com>
7755
7756 * Makefile.in (OBS): Add agent.o.
7757 Add new rule for agent.o.
7758 Track dependence of tracepoint.c on agent.h.
7759 * tracepoint.c (run_inferior_command_1):
7760 (run_inferior_command): Call agent_run_command.
7761 (gdb_ust_connect_sync_socket): Deleted. Move it to
7762 common/agent.c.
7763 (resume_thread, stop_thread): Likewise.
7764 (gdb_ust_socket_init): Renamed to ...
7765 (gdb_agent_socket_init): ... New.
7766 (gdb_ust_thread): Renamed to ...
7767 (gdb_agent_helper_thread): ... New.
7768 (gdb_ust_init): Move some code to ...
7769 (gdb_agent_init): ... here. New.
7770 [HAVE_UST]: Call gdb_ust_init.
7771 (initialize_tracepoint_ftlib): Call gdb_agent_init.
7772 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
7773 * config.in, configure: Regenerated.
7774
05044653
PA
77752012-03-02 Pedro Alves <palves@redhat.com>
7776
7777 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
7778 * linux-low.c (struct simple_pid_list): New.
7779 (stopped_pids): New a struct simple_pid_list pointer.
7780 (add_to_pid_list, pull_pid_from_list): New.
7781 (handle_extended_wait): Don't assume the first signal new children
7782 report is SIGSTOP. Adjust call to pull_pid_from_list.
7783 (linux_wait_for_lwp): Adjust.
7784
8d00225b
YQ
77852012-03-02 Yao Qi <yao@codesourcery.com>
7786
7787 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
7788 debug log.
7789
19560ba5
YQ
77902012-03-02 Yao Qi <yao@codesourcery.com>
7791
7792 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
7793 `stop_pc' and `tpoint'. Update caller.
7794
1faeff08
MR
77952012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
7796
7797 * linux-low.h (linux_target_ops): Add regset_bitmap member.
7798 * linux-low.c (use_linux_regsets): New macro.
7799 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
7800 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
7801 (linux_register_in_regsets): New function.
7802 (usr_fetch_inferior_registers): Skip registers covered by
7803 regsets.
7804 (usr_store_inferior_registers): Likewise.
7805 (usr_fetch_inferior_registers): New macro.
7806 (usr_store_inferior_registers): Likewise.
7807 (linux_fetch_registers): Handle mixed regset/non-regset targets.
7808 (linux_store_registers): Likewise.
7809 * linux-mips-low.c (init_registers_mips_dsp_linux): New
7810 prototype.
7811 (init_registers_mips64_dsp_linux): Likewise.
7812 (init_registers_mips_linux): New macro.
7813 (init_registers_mips_dsp_linux): Likewise.
7814 (mips_dsp_num_regs): Likewise.
7815 (DSP_BASE, DSP_CONTROL): New fallback macros.
7816 (mips_base_regs): New macro.
7817 (mips_regmap): Use it. Fix the size.
7818 (mips_dsp_regmap): New variable.
7819 (mips_dsp_regset_bitmap): Likewise.
7820 (mips_arch_setup): New function.
7821 (mips_cannot_fetch_register): Use the_low_target.regmap rather
7822 than mips_regmap.
7823 (mips_cannot_store_register): Likewise.
7824 (the_low_target): Update .arch_setup, .num_regs and .regmap
7825 initializers. Add .regset_bitmap initializer.
7826 * linux-arm-low.c (the_low_target): Add .regset_bitmap
7827 initializer.
7828 * linux-bfin-low.c (the_low_target): Likewise.
7829 * linux-cris-low.c (the_low_target): Likewise.
7830 * linux-crisv32-low.c (the_low_target): Likewise.
7831 * linux-ia64-low.c (the_low_target): Likewise.
7832 * linux-m32r-low.c (the_low_target): Likewise.
7833 * linux-m68k-low.c (the_low_target): Likewise.
7834 * linux-ppc-low.c (the_low_target): Likewise.
7835 * linux-s390-low.c (the_low_target): Likewise.
7836 * linux-sh-low.c (the_low_target): Likewise.
7837 * linux-sparc-low.c (the_low_target): Likewise.
7838 * linux-tic6x-low.c (the_low_target): Likewise.
7839 * linux-x86-low.c (the_low_target): Likewise.
7840 * linux-xtensa-low.c (the_low_target): Likewise.
7841 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
7842 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
7843 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
7844 srv_xmlfiles.
7845 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
7846 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
7847
c03e6ccc
YQ
78482012-02-29 Yao Qi <yao@codesourcery.com>
7849 Pedro Alves <palves@redhat.com>
7850
7851 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
7852 `step_over_finished' is true.
7853
644cebc9
PA
78542012-02-27 Pedro Alves <palves@redhat.com>
7855
7856 * linux-low.c (pid_is_stopped): Delete, moved to common/.
7857 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
7858
c14d7ab2
PA
78592012-02-27 Pedro Alves <palves@redhat.com>
7860
7861 PR server/9684
7862 * linux-low.c (pid_is_stopped): New.
7863 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
7864
412c89dd
LM
78652012-02-25 Luis Machado <lgustavo@codesourcery.com>
7866
7867 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
7868 of conditions.
7869
b745defe
MR
78702012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
7871
7872 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
7873
9f3a5c85
LM
78742012-02-24 Luis Machado <lgustavo@codesourcery>
7875
7876 * server.c (handle_query): Advertise support for target-side
7877 breakpoint condition evaluation.
7878 (process_point_options): New function.
7879 (process_serial_event): When inserting a breakpoint, check for
7880 a target-side condition that should be evaluated.
7881
7882 * mem-break.c: Include regcache.h and ax.h.
7883 (point_cond_list_t): New data structure.
7884 (breakpoint) <cond_list>: New field.
7885 (find_gdb_breakpoint_at): Make non-static.
7886 (delete_gdb_breakpoint_at): Clear any target-side
7887 conditions.
7888 (clear_gdb_breakpoint_conditions): New function.
7889 (add_condition_to_breakpoint): Likewise.
7890 (add_breakpoint_condition): Likewise.
7891 (gdb_condition_true_at_breakpoint): Likewise.
7892 (gdb_breakpoint_here): Return result directly instead
7893 of going through a local variable.
7894
7895 * mem-break.h (find_gdb_breakpoint_at): New prototype.
7896 (clear_gdb_breakpoint_conditions): Likewise.
7897 (add_breakpoint_condition): Likewise.
7898 (gdb_condition_true_at_breakpoint): Likewise.
7899
7900 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
7901 (need_step_over_p): Take target-side breakpoint condition into
7902 consideration.
7903
5e1dc496
LM
79042012-02-24 Luis Machado <lgustavo@codesourcery>
7905
7906 * server.h: Include tracepoint.h.
7907 (agent_mem_read, agent_get_trace_state_variable_value,
7908 agent_set_trace_state_variable_value,
7909 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
7910 get_set_tsv_func_addr): New prototypes.
7911
7912 * ax.h: New include file.
7913 * ax.c: New source file.
7914
7915 * tracepoint.c: Include ax.h.
7916 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
7917 agent_expr, eval_result_type): Move to ax.h.
7918 (parse_agent_expr): Rename to ...
7919 (gdb_parse_agent_expr): ... this, make it non-static and move
7920 to ax.h.
7921 (unparse_agent_expr) Rename to ...
7922 (gdb_unparse_agent_expr): ... this, make it non-static and move
7923 to ax.h.
7924 (eval_agent_expr): Rename to ...
7925 (eval_tracepoint_agent_expr): ... this.
7926 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
7927 forward declarations.
7928 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
7929 (agent_get_trace_state_variable_value): New function.
7930 (agent_set_trace_state_variable_value): New function.
7931 (cmd_qtdp): Call gdb_parse_agent_expr (...).
7932 (response_tracepoint): Call gdb_unparse_agent_expr (...).
7933 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
7934 (condition_true_at_tracepoint): Likewise.
7935 (parse_agent_expr): Rename to ...
7936 (gdb_parse_agent_expr): ... this and move to ax.c.
7937 (unparse_agent_expr): Rename to ...
7938 (gdb_unparse_agent_expr): ... this and move to ax.c.
7939 (gdb_agent_op_name): Move to ax.c.
7940 (eval_agent_expr): Rename to ...
7941 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
7942 and move to ax.c.
7943 (eval_tracepoint_agent_expr): New function.
7944 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 7945 non-static.
5e1dc496
LM
7946 (current_insn_ptr, emit_error, struct bytecode_address): Move to
7947 ax.c.
7948 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
7949 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
7950 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
7951 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
7952 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
7953 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
7954 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
7955 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
7956 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
7957 (compile_bytecodes): Remove forward declaration.
7958 (is_goto_target): Move to ax.c.
7959 (compile_bytecodes): Move to ax.c and call
7960 agent_get_trace_state_variable_value (...) and
7961 agent_set_trace_state_variable_value (...).
7962
7963 * Makefile.in: Update ax.c and IPA dependencies.
7964
277e4e52
PA
79652012-02-24 Pedro Alves <palves@redhat.com>
7966
7967 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
7968 (cmd_bigqtbuffer_circular): ... this. Only handle
7969 'QTBuffer:circular:'.
7970 (handle_tracepoint_general_set): Adjust.
7971
bf4c19f7
YQ
79722012-02-16 Yao Qi <yao@codesourcery.com>
7973
7974 * inferiors.c: Move code to ...
7975 * dll.c: .... here. New.
7976 * server.h: Declare clear_dlls.
7977 * Makefile.in (SFILES): Add dll.c.
7978 (OBS): Add dll.o
7979 (dll.o): New rule.
7980
d73f2619
YQ
79812012-02-11 Yao Qi <yao@codesourcery.com>
7982
7983 * server.c: (handle_monitor_command): Add a new parameter
7984 `own_buf'.
7985 (handle_query): Update caller.
7986
f8255c2a
JB
79872012-02-09 Joel Brobecker <brobecker@adacore.com>
7988
7989 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
7990 * configure, config.in: Regenerate.
7991 * hostio.c: Provide an alternate implementation if HAVE_READLINK
7992 is not defined.
7993
da84f473
PA
79942012-02-02 Pedro Alves <palves@redhat.com>
7995
7996 Try SIGKILL first, then PTRACE_KILL.
7997 * linux-low.c (linux_kill_one_lwp): New.
7998 (linux_kill_one_lwp): Rename to ...
7999 (kill_one_lwp_callback): ... this. Use the new
8000 linux_kill_one_lwp.
8001
e886a173
PA
80022012-02-02 Pedro Alves <palves@redhat.com>
8003
8004 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
8005 inferior.
8006
be07f1a2
PA
80072012-01-27 Pedro Alves <palves@redhat.com>
8008
8009 * linux-low.c (linux_child_pid_to_exec_file): Delete.
8010 (elf_64_file_p): Make static.
8011 (linux_pid_exe_is_elf_64_file): New.
8012 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
8013 Delete declarations.
8014 (linux_pid_exe_is_elf_64_file): Declare.
8015 * linux-x86-low.c (x86_arch_setup): Use
8016 linux_pid_exe_is_elf_64_file.
8017
d8301ad1
JK
80182012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8019
8020 * linux-low.c (linux_wait_for_event_1): Rename to ...
8021 (linux_wait_for_event): ... here and merge it with former
8022 linux_wait_for_event - new variable wait_ptid, use it.
8023 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
8024
01b17894
PA
80252012-01-23 Pedro Alves <palves@redhat.com>
8026
8027 * server.c (main): Avoid yet another case of infinite loop while
8028 detaching/killing after a longjmp.
8029
e825046f
JK
80302012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8031
8032 Code cleanup.
8033 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
8034
b9e7b9c3
UW
80352012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
8036
8037 * hostio.c (handle_readlink): New function.
8038 (handle_vFile): Call it to handle "vFile:readlink" packets.
8039
901f9912
UW
80402012-01-20 Pedro Alves <palves@redhat.com>
8041 Ulrich Weigand <ulrich.weigand@linaro.org>
8042
8043 * server.c (handle_v_requests): Only support vAttach and vRun to
8044 start multiple processes when in extended protocol mode.
8045
fc1ab1a0
PA
80462012-01-17 Pedro Alves <palves@redhat.com>
8047
8048 * tracepoint.c (initialize_tracepoint): Use mmap instead of
8049 memalign plus mprotect to allocate the scratch buffer.
8050
7d5d4e98
PA
80512012-01-13 Pedro Alves <palves@redhat.com>
8052
8053 * server.c (attach_inferior): Clear `cont_thread'.
8054
f128d5e9
PA
80552012-01-13 Pedro Alves <palves@redhat.com>
8056
8057 * server.c (main): Avoid infinite loop while detaching/killing
8058 after a longjmp.
8059
06db92f0
DE
80602012-01-09 Doug Evans <dje@google.com>
8061
8062 * server.c (start_inferior): Set last_ptid in --wrapper case.
8063
32d92999
YQ
80642012-01-06 Yao Qi <yao@codesourcery.com>
8065
8066 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
8067 defined.
8068 [IN_PROCESS_AGENT] (debug_agent): New global variable.
8069
5e0a92a9
YQ
80702012-01-04 Yao Qi <yao@codesourcery.com>
8071
8072 * tracepoint.c (cmd_qtdp): Print debug message
8073 for static tracepoint.
8074
ae639e8c
YQ
80752012-01-04 Yao Qi <yao@codesourcery.com>
8076
8077 * tracepoint.c (trace_vdebug): Differentiate debug message
8078 between gdbserver and IPA.
8079
f72429c5
YQ
80802012-01-03 Yao Qi <yao@codesourcery.com>
8081
8082 * tracepoint.c (tracepoint_was_hit): Don't collect for
8083 static tracepoint.
8084
12c3e59c
JB
80852012-01-02 Joel Brobecker <brobecker@adacore.com>
8086
8087 * terminal.h: Reformat copyright header.
8088
67827812
JB
80892012-01-02 Joel Brobecker <brobecker@adacore.com>
8090
8091 * server.c (gdbserver_version): Update copyright year.
8092 * gdbreplay.c (gdbreplay_version): Likewise.
8093
3e52c33d
JK
80942011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
8095
8096 * linux-low.c (linux_create_inferior): Put empty if clause for write.
8097
8098 Revert:
8099 2011-12-18 Hui Zhu <teawater@gmail.com>
8100 * linux-low.c (linux_create_inferior): Save return value to ret.
8101
66f1260e
HZ
81022011-12-18 Hui Zhu <teawater@gmail.com>
8103
8104 * linux-low.c (linux_create_inferior): Save return value to ret.
8105
e77616d7
DE
81062011-12-16 Doug Evans <dje@google.com>
8107
e7b06c57
DE
8108 * linux-low.c (linux_create_inferior): If stdio connection,
8109 redirect stdin from /dev/null, stdout to stderr.
8110 * remote-utils.c (remote_is_stdio): New static global.
8111 (remote_connection_is_stdio): New function.
8112 (remote_prepare): Handle stdio connection.
8113 (remote_open): Ditto.
8114 (remote_close): Don't close stdin for stdio connections.
8115 (read_prim,write_prim): New functions. Replace all calls to
8116 read/write to these.
8117 * server.c (main): Watch for "-" argument. Move call to
8118 remote_prepare before start_inferior.
8119 * server.h (STDIO_CONNECTION_NAME): New macro.
8120 (remote_connection_is_stdio): Declare.
8121
e77616d7
DE
8122 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
8123 in debugging output.
8124
82067193
YQ
81252011-12-15 Yao Qi <yao@codesourcery.com>
8126
8127 * tracepoint.c: Include sys/syscall.h.
8128 (gdb_ust_thread): Remove preprocessor conditional.
8129
82bfbe7e
PA
81302011-12-14 Pedro Alves <pedro@codesourcery.com>
8131
8132 * linux-low.c (linux_detach_one_lwp): Call
8133 the_low_target.prepare_to_resume before detaching.
8134
712c6575
YQ
81352011-12-14 Yao Qi <yao@codesourcery.com>
8136
8137 * tracepoint.c (gdb_ust_thread): Don't ignore return value
8138 of write.
8139
d54d1edf
YQ
81402011-12-14 Yao Qi <yao@codesourcery.com>
8141
8142 * i386-low.c (i386_low_stopped_data_address): Initialize local
8143 variable `control'.
8144
6210a125
PA
81452011-12-13 Pedro Alves <pedro@codesourcery.com>
8146
8147 PR remote/13492
8148
8149 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
8150 DR_CONTROL unless necessary. Extend comments.
8151 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
8152 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
8153
2ece8244
YQ
81542011-12-13 Yao Qi <yao@codesourcery.com>
8155
8156 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
8157 macros.
8158 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
8159
784867a5
JK
81602011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
8161
8162 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
8163 Print new debug message for such case.
8164
6bf36717
JK
81652011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8166
8167 Fix overlapping memcpy.
8168 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
8169 the read_inferior_memory transfer.
8170 (delete_fast_tracepoint_jump): New variable buf. Use it for the
8171 write_inferior_memory transfer.
8172 (set_fast_tracepoint_jump): New variable buf. Use it for the
8173 read_inferior_memory and write_inferior_memory transfers.
8174 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
8175 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
8176 Use it for the write_inferior_memory transfer.
8177 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
8178 buffers.
8179
50275556
MR
81802011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8181
8182 * linux-low.c (fetch_register, store_register): Make code
8183 consistent, fix formatting.
8184
7325beb4
MR
81852011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8186
8187 * linux-low.c (usr_store_inferior_registers): Factor out code
8188 to handle individual registers into...
8189 (store_register): ... this new function.
8190
c642a434
UW
81912011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
8192
8193 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
8194 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
8195 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
8196 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
8197 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
8198 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
8199 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
8200 (srv_xmlfiles): Add new XML files.
8201
8202 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
8203 and <sys/uio.h>.
8204 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
8205 (init_registers_s390_linux32v1): Add prototype.
8206 (init_registers_s390_linux32v2): Likewise.
8207 (init_registers_s390_linux64v1): Likewise.
8208 (init_registers_s390_linux64v2): Likewise.
8209 (init_registers_s390x_linux64v1): Likewise.
8210 (init_registers_s390x_linux64v2): Likewise.
8211 (s390_num_regs): Increment to 52.
8212 (s390_regmap): Add orig_r2 register.
8213 (s390_num_regs_3264): Increment to 68.
8214 (s390_regmap_3264): Add orig_r2 register.
8215 (s390_collect_ptrace_register): Handle orig_r2 register.
8216 (s390_supply_ptrace_register): Likewise.
8217 (s390_fill_last_break): New function.
8218 (s390_store_last_break): Likewise.
8219 (s390_fill_system_call): New function.
8220 (s390_store_system_call): Likewise.
8221 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
8222 register sets.
8223 (s390_check_regset): New function.
8224 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
8225 NT_S390_SYSTEM_CALL regsets and use appropriate description.
8226 Update target_regsets for available register sets.
8227
2268b414
JK
82282011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
8229 Jan Kratochvil <jan.kratochvil@redhat.com>
8230
8231 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
8232 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
8233 New.
8234 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
8235 * linux-low.h (struct process_info_private): New member r_debug.
8236 * server.c (handle_qxfer_libraries): Call
8237 the_target->qxfer_libraries_svr4.
8238 (handle_qxfer_libraries_svr4): New function.
8239 (qxfer_packets): New entry "libraries-svr4".
8240 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
8241 * target.h (struct target_ops): New member qxfer_libraries_svr4.
8242 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
8243 PACKET_qXfer_libraries_svr4.
8244
d6db1fab
UW
82452011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
8246
8247 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
8248 PSW address/mask between 8-byte and 16-byte formats.
8249 (s390_supply_ptrace_register): Likewise.
8250 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
8251 basic addressing mode bit.
8252
242f5f1c
SS
82532011-11-24 Stan Shebs <stan@codesourcery.com>
8254
8255 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
8256
f196051f
SS
82572011-11-17 Stan Shebs <stan@codesourcery.com>
8258
8259 * tracepoint.c (struct tracepoint): New field traceframe_usage.
8260 (tracing_start_time): New global.
8261 (tracing_stop_time): New global.
8262 (tracing_user_name): New global.
8263 (tracing_notes): New global.
8264 (tracing_stop_note): New global.
8265 (cmd_qtstart): Set traceframe_usage, start_time.
8266 (stop_tracing): Set stop_time.
8267 (cmd_qtstatus): Report additional status.
8268 (cmd_qtp): New function.
8269 (handle_tracepoint_query): Call it.
8270 (cmd_qtnotes): New function.
8271 (handle_tracepoint_general_set): Call it.
8272 (get_timestamp): Rename from tsv_get_timestamp.
8273
405f8e94
SS
82742011-11-14 Stan Shebs <stan@codesourcery.com>
8275 Kwok Cheung Yeung <kcy@codesourcery.com>
8276
8277 * linux-x86-low.c (small_jump_insn): New.
8278 (i386_install_fast_tracepoint_jump_pad): Add arguments for
8279 trampoline and error message, build a trampoline and issue a small
8280 jump instruction to it.
8281 (x86_install_fast_tracepoint_jump_pad): Add arguments for
8282 trampoline and error message.
8283 (x86_get_min_fast_tracepoint_insn_len): New.
8284 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
8285 * linux-low.h (struct linux_target_ops): Add arguments to
8286 install_fast_tracepoint_jump_pad operation, add new operation.
8287 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
8288 arguments.
8289 (linux_get_min_fast_tracepoint_insn_len): New function.
8290 (linux_target_op): Add new operation.
8291 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
8292 (gdb_trampoline_buffer_end): Ditto.
8293 (gdb_trampoline_buffer_error): Ditto.
8294 (struct ipa_sym_addresses): Add fields for new IPA variables.
8295 (symbol_list): Add entries for new IPA variables.
8296 (struct tracepoint): Add fields to hold the address range of the
8297 trampoline used by the tracepoint.
8298 (trampoline_buffer_head): New static variable.
8299 (trampoline_buffer_tail): Ditto.
8300 (claim_trampoline_space): New function.
8301 (have_fast_tracepoint_trampoline_buffer): New function.
8302 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
8303 structure.
8304 (install_fast_tracepoint): Ditto, also add error buffer argument.
8305 (cmd_qtminftpilen): New function.
8306 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
8307 (fast_tracepoint_from_trampoline_address): New function.
8308 (fast_tracepoint_collecting): Handle trampoline as part of jump
8309 pad space.
8310 (set_trampoline_buffer_space): New function.
8311 (initialize_tracepoint): Initialize new IPA variables.
8312 * target.h (struct target_ops): Add arguments to
8313 install_fast_tracepoint_jump_pad operation, add new
8314 get_min_fast_tracepoint_insn_len operation.
8315 (target_get_min_fast_tracepoint_insn_len): New.
8316 (install_fast_tracepoint_jump_pad): Add arguments.
8317 * server.h (IPA_BUFSIZ): Define.
8318 * linux-i386-ipa.c: Include extra header files.
8319 (initialize_fast_tracepoint_trampoline_buffer): New function.
8320 (initialize_low_tracepoint): Call it.
8321 * server.h (set_trampoline_buffer_space): Declare.
8322 (claim_trampoline_space): Ditto.
8323 (have_fast_tracepoint_trampoline_buffer): Ditto.
8324
1e4d1764
YQ
83252011-11-14 Yao Qi <yao@codesourcery.com>
8326
8327 * server.c (handle_query): Handle InstallInTrace for qSupported.
8328 * tracepoint.c (add_tracepoint): Sort list.
8329 (install_tracepoint, download_tracepoint): New.
8330 (cmd_qtdp): Call them to install and download tracepoints.
8331 (sort_tracepoints): Removed.
8332 (cmd_qtstart): Update.
8333
5c73ff4e
YQ
83342011-11-14 Yao Qi <yao@codesourcery.com>
8335
8336 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
8337 * mem-break.h: Declare.
8338 * tracepoint.c (cmd_qtstart): Move some code to ...
8339 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
8340 New.
8341 (download_tracepoints): Move some code to ...
8342 (download_tracepoint_1): ... here. New.
8343
86a30030
YQ
83442011-11-08 Yao Qi <yao@codesourcery.com>
8345
8346 * remote-utils.c (relocate_instruction): A comment fix.
8347
8d26e50c
JB
83482011-11-07 Joel Brobecker <brobecker@adacore.com>
8349
8350 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
8351 (i386_dr_low_get_control, i386_dr_low_get_status): Use
8352 dr_status_mirror and dr_control_mirror from debug_reg_state.
8353 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
8354 (i386_initial_stuff): Remove use of deleted globals.
8355 (i386_get_thread_context, i386_set_thread_context,
8356 i386_thread_added): Use dr_status_mirror and dr_control_mirror
8357 from debug_reg_state.
8358
a59306a3
YQ
83592011-11-05 Yao Qi <yao@codesourcery.com>
8360
8361 * tracepoint.c (gdb_collect): Loop over tracepoints of same
8362 address as TPOINT's.
8363
3065dfb6
SS
83642011-11-02 Stan Shebs <stan@codesourcery.com>
8365
8366 * tracepoint.c (agent_mem_read_string): New function.
8367 (eval_agent_expr): Call it for tracenz.
8368 * server.c (handle_query): Report support for tracenz.
8369
fd0d8c7c
YQ
83702011-11-02 Yao Qi <yao@codesourcery.com>
8371
8372 * tracepoint.c (cmd_qtstart): Remove unused local variables.
8373
609086b1
YQ
83742011-11-02 Yao Qi <yao@codesourcery.com>
8375
8376 * target.h: Fix a typo in comment.
8377
b9fd1791
PA
83782011-10-31 Pedro Alves <pedro@codesourcery.com>
8379
8380 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
8381 clobber the breakpoints' shadows with fast tracepoint jumps.
8382 * mem-break.h (check_mem_write): Add `myaddr' parameter.
8383 * target.c (write_inferior_memory): Also pass MYADDR down to
8384 check_mem_write.
8385
03583c20
UW
83862011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
8387
8388 * configure.ac: Check support for personality routine.
8389 * configure: Regenerate.
8390 * config.in: Likewise.
8391 * linux-low.c: Include <sys/personality.h>.
8392 Define ADDR_NO_RANDOMIZE if necessary.
8393 (linux_create_inferior): Disable address space randomization when
8394 forking inferior, if requested.
8395 (linux_supports_disable_randomization): New function.
8396 (linux_target_ops): Install it.
8397 * server.h (disable_randomization): Declare.
8398 * server.c (disable_randomization): New global variable.
8399 (handle_general_set): Handle QDisableRandomization.
8400 (handle_query): Likewise for qSupported.
8401 (main): Support --disable-randomization and --no-disable-randomization
8402 command line arguments.
8403 * target.h (struct target_ops): Add supports_disable_randomization.
8404 (target_supports_disable_randomization): New macro.
8405
723b724b
MF
84062011-09-29 Mike Frysinger <vapier@gentoo.org>
8407
8408 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
8409 ifdef check.
8410 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
8411 [!PT_GETDSBT] (target_loadmap): New definition.
8412 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
8413 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
8414 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
8415 and PT_GETDSBT to LINUX_LOADMAP.
8416 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
8417 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
8418
55329a5c 84192011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
8420
8421 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
8422 (arm_linux_hwbp_cap): New static variable.
8423 (arm_linux_get_hwbp_cap): Replace by ...
8424 (arm_linux_init_hwbp_cap): ... this new function.
8425 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
8426 (arm_linux_get_hw_watchpoint_count): Likewise.
8427 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8428 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
8429 (arm_prepare_to_resume): Use perror_with_name instead of error.
8430
55329a5c 84312011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
8432
8433 * linux-arm-low.c: Include <signal.h>.
8434 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
8435 (struct arm_linux_hwbp_cap): New data type.
8436 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
8437 (struct arm_linux_hw_breakpoint): New data type.
8438 (MAX_BPTS, MAX_WPTS): Define.
8439 (struct arch_process_info, struct arch_lwp_info): New data types.
8440 (arm_linux_get_hwbp_cap): New function.
8441 (arm_linux_get_hw_breakpoint_count): Likewise.
8442 (arm_linux_get_hw_watchpoint_count): Likewise.
8443 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8444 (arm_hwbp_control_initialize): Likewise.
8445 (arm_hwbp_control_is_enabled): Likewise.
8446 (arm_hwbp_control_is_initialized): Likewise.
8447 (arm_hwbp_control_disable): Likewise.
8448 (arm_linux_hw_breakpoint_equal): Likewise.
8449 (arm_linux_hw_point_initialize): Likewise.
8450 (struct update_registers_data): New data structure.
8451 (update_registers_callback: New function.
8452 (arm_insert_point): Likewise.
8453 (arm_remove_point): Likewise.
8454 (arm_stopped_by_watchpoint): Likewise.
8455 (arm_stopped_data_address): Likewise.
8456 (arm_new_process): Likewise.
8457 (arm_new_thread): Likewise.
8458 (arm_prepare_to_resume): Likewise.
8459 (the_low_target): Register arm_insert_point, arm_remove_point,
8460 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
8461 arm_new_thread, and arm_prepare_to_resume.
8462
6b9801d4
SS
84632011-09-15 Stan Shebs <stan@codesourcery.com>
8464
8465 * server.h (struct emit_ops): Add compare-goto fields.
8466 * tracepoint.c (gdb_agent_op_sizes): New table.
8467 (emit_eq_goto): New function.
8468 (emit_ne_goto): New function.
8469 (emit_lt_goto): New function.
8470 (emit_le_goto): New function.
8471 (emit_gt_goto): New function.
8472 (emit_ge_goto): New function.
8473 (is_goto_target): New function.
8474 (compile_bytecodes): Recognize special cases of compare-goto
8475 combinations and call specialized emitters for them.
8476 * linux-x86-low.c (amd64_emit_eq_goto): New function.
8477 (amd64_emit_ne_goto): New function.
8478 (amd64_emit_lt_goto): New function.
8479 (amd64_emit_le_goto): New function.
8480 (amd64_emit_gt_goto): New function.
8481 (amd64_emit_ge_goto): New function.
8482 (amd64_emit_ops): Add the new functions.
8483 (i386_emit_eq_goto): New function.
8484 (i386_emit_ne_goto): New function.
8485 (i386_emit_lt_goto): New function.
8486 (i386_emit_le_goto): New function.
8487 (i386_emit_gt_goto): New function.
8488 (i386_emit_ge_goto): New function.
8489 (i386_emit_ops): Add the new functions.
8490
bf15cbda
SS
84912011-09-08 Stan Shebs <stan@codesourcery.com>
8492
8493 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
8494 (i386_emit_epilogue): Restore %ebx.
8495
943ca1dd
JZ
84962011-08-31 Jie Zhang <jzhang918@gmail.com>
8497
8498 * server.c (step_thread): Remove definition.
8499 (process_serial_event): Don't handle Hs.
8500 * server.h (step_thread): Remove declaration.
8501 * target.c (set_desired_inferior): Remove use of step_thread.
8502
e3deef73
LM
85032011-08-24 Luis Machado <lgustavo@codesourcery.com>
8504
8505 * linux-low.c: Include linux-procfs.h.
8506 (linux_attach_lwp_1): Update comments.
8507 (linux_attach): Scan for existing threads when attaching to a
8508 process that is the tgid.
8509 * Makefile.in: Update dependencies.
8510
13da1c97
LM
85112011-08-24 Luis Machado <lgustavo@codesourcery.com>
8512
8513 * configure.srv: Add linux-procfs.o dependencies.
8514
881127c9
YQ
85152011-08-14 Yao Qi <yao@codesourcery.com>
8516
8517 * target.h (struct target_ops): Fix indent.
8518 * win32-low.c (win32_target_ops): Fix comment.
8519
58dbd541
YQ
85202011-08-14 Andrew Jenner <andrew@codesourcery.com>
8521 Yao Qi <yao@codesourcery.com>
8522
8523 * Makefile.in (clean): Remove tic6x-*.c files.
8524 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
8525 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
8526 (tic6x-c64xp-linux.c): Likewise.
8527 * configure.srv: Add support for tic6x-*-uclinux.
8528 * linux-tic6x-low.c: New.
8529 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
8530
78d85199
YQ
85312011-08-14 Andrew Stubbs <ams@codesourcery.com>
8532 Yao Qi <yao@codesourcery.com>
8533
8534 * target.h (struct target_ops): Add read_loadmap.
8535 * linux-low.c (struct target_loadseg): New type.
8536 (struct target_loadmap): New type.
8537 (linux_read_loadmap): New function.
8538 (linux_target_ops): Add linux_read_loadmap.
8539 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
8540 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
8541 to NULL.
78d85199 8542
a959a88d
EZ
85432011-08-05 Eli Zaretskii <eliz@gnu.org>
8544
8545 * win32-low.c: Include <stdint.h>.
8546
1ced966e
PA
85472011-07-22 Pedro Alves <pedro@codesourcery.com>
8548
8549 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
8550 to the inferior here.
8551 (i386_remove_aligned_watchpoint): Ditto.
8552 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
8553 fit part of the watchpoint in the debug registers.
8554 (i386_update_inferior_debug_regs): New.
8555 (i386_low_insert_watchpoint): Work on a local mirror of the debug
8556 registers, and only update the inferior on success.
8557 (i386_low_remove_watchpoint): Ditto.
8558
d26e3629
KY
85592011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
8560
8561 * linux-low.c (compare_ints, unique, list_threads, show_process,
8562 linux_core_of_thread): Delete.
8563 (linux_target_ops): Change linux_core_of_thread to
8564 linux_common_core_of_thread.
8565 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
8566 * utils.c (malloc_failure): Change type of argument.
8567 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
8568 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
8569 common/linux-osdata.c, common/ptid.c and common/buffer.c.
8570 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
8571 (IPA_OBJS): Add common-utils-ipa.o.
8572 (ptid_h, linux_osdata_h): New macros.
8573 (server_h): Add common/common-utils.h, common/xml-utils.h,
8574 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
8575 common/ptid.h.
8576 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
8577 ptid.o, buffer.o): New rules.
8578 (linux-low.o): Add common/linux-osdata.h as a dependency.
8579 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
8580 * configure.ac: Add AC_HEADER_DIRENT check.
8581 * config.in: Regenerate.
8582 * configure: Regenerate.
8583 * remote-utils.c (xml_escape_text): Delete.
8584 (buffer_grow, buffer_free, buffer_init, buffer_finish,
8585 buffer_xml_printf): Move to common/buffer.c.
8586 * server.c (main): Remove call to initialize_inferiors.
8587 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
8588 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
8589 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
8590 internal_error, gdb_assert, gdb_assert_fail): Delete.
8591 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
8592 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
8593 common/buffer.h.
8594 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
8595 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
8596 initialize_inferiors): Delete.
8597
2275a1a7
PA
85982011-07-20 Pedro Alves <pedro@codesourcery.com>
8599
8600 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
8601 symbol error.
8602
0a5b1e09
PA
86032011-05-31 Pedro Alves <pedro@codesourcery.com>
8604
8605 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
8606 assertion.
8607 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
8608
6938fd34
YQ
86092011-05-26 Yao Qi <yao@codesourcery.com>
8610
8611 * Makefile.in (thread-db.o): Track dependence to
8612 common/gdb_thread_db.h.
8613 * thread-db.c: include gdb_thread_db.h from right place.
8614
b481f9e0
TT
86152011-05-16 Adrian Cornish <gnu@bluedreamer.com>
8616
8617 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
8618 __FILE__ and __LINE__ to internal_error.
8619
98a5dd13
DE
86202011-05-13 Doug Evans <dje@google.com>
8621
8622 * thread-db.c (try_thread_db_load_from_sdir): New function.
8623 (try_thread_db_load_from_dir): New function.
8624 (thread_db_load_search): Handle $sdir, ignore $pdir.
8625 Remove trying of system directories if search of
8626 libthread-db-search-path fails, that is now done via $sdir.
8627
d248b706
KY
86282011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
8629
8630 * server.c (handle_query): Add EnableDisableTracepoints to the list
8631 of supported features.
43aaf8b6 8632 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 8633 tracepoints.
43aaf8b6
PA
8634 (cmd_qtenable_disable): New.
8635 (cmd_qtstart): Install tracepoints even if disabled.
8636 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
8637 receiving a QTEnable or QTDisable packet.
8638 (gdb_collect): Skip data collection if fast tracepoint is disabled.
8639 (ust_marker_to_static_tracepoint): Do not ignore disabled static
8640 tracepoints.
8641 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 8642
84e578fb
DE
86432011-05-10 Doug Evans <dje@google.com>
8644
8645 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
8646
71f55dd8
DE
86472011-05-04 Doug Evans <dje@google.com>
8648
8649 * linux-low.c (linux_join): Skip process lookup.
8650 * spu-low.c (spu_join): Ditto.
8651 * server.c (join_inferiors_callback): Delete.
8652 (process_serial_event): For 'D' packet (detach) call join_inferior
8653 directly.
8654
4d393d60
JM
86552011-05-04 Joseph Myers <joseph@codesourcery.com>
8656
8657 * README: Don't mention xscale*-*-linux*.
8658 * configure.srv (xscale*-*-linux*): Don't handle target.
8659
b00ad6ff
NF
86602011-04-27 Nathan Froyd <froydnj@codesourcery.com>
8661
8662 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
8663 casting pointers.
8664 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
8665 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
8666 (i386_emit_void_call_2): Likewise.
8667
af96c192
YQ
86682011-04-26 Yao Qi <yao@codesourcery.com>
8669
43aaf8b6
PA
8670 * linux-low.c: Move common macros to linux-ptrace.h.
8671 Include linux-ptrace.h.
af96c192
YQ
8672 * Makefile.in (linux_ptrace_h): New.
8673 (linux-low.o): Depends on linux-ptrace.h.
8674
03f2bd59
JK
86752011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8676
8677 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
8678 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
8679 (remote_prepare): New function with most of the TCP code from ...
8680 (remote_open): ... here. Detect PORT here unconditionally. Move also
8681 setting transport_is_reliable.
8682 * server.c (run_once): New variable.
8683 (gdbserver_usage): Document it.
8684 (main): Set run_once for `--once'. Call remote_prepare. Exit after
8685 the first run if RUN_ONCE.
8686 * server.h (run_once, remote_prepare): New declarations.
8687
7a9dd1b2
TT
86882011-04-19 Tom Tromey <tromey@redhat.com>
8689
8690 * win32-low.c (handle_load_dll): Remove duplicate "the".
8691
81239425
PM
86922011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
8693
8694 Remove support for old Cygwin 1.5 versions.
8695 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
8696 function to avoid warning.
8697 (win32_add_one_solib): Use cygwin_conv_path function to avoid
8698 warning.
8699
9e0627f1
PM
87002011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
8701
8702 * gdbserver/server.h (Macro _): Define it if not available.
8703
588eebee
MS
87042011-03-14 Michael Snyder <msnyder@vmware.com>
8705
348af9f7 8706 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 8707
43f70d4c
JB
87082011-03-10 Joel Brobecker <brobecker@adacore.com>
8709
8710 * Makefile.in (maintainer-clean realclean distclean): Remove
8711 "make ... subdir_do" command.
8712
348af9f7
MS
87132011-03-10 Michael Snyder <msnyder@vmware.com>
8714
8715 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
8716
8717 * server.c (handle_v_run): Free alloced buffer on early return.
8718
e637a4f5
YQ
87192011-03-09 Yao Qi <yao@codesourcery.com>
8720
8721 Revert:
8722 2011-03-04 Yao Qi <yao@codesourcery.com>
8723
8724 * Makefile.in: Remove GNU make feature --directory.
8725
8726 2011-03-05 Yao Qi <yao@codesourcery.com>
8727
8728 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8729 (subdir_do): New make target. Copied from gdb/Makefile.
8730 (maintainer-clean, realclean, distclean, clean): Call corresponding
8731 make targets in common/Makefile.
8732
8733 2011-02-11 Yao Qi <yao@codesourcery.com>
8734
8735 * configure.ac: Call AC_PROG_RANLIB.
8736 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
8737 * configure: Regenerate.
8738
e6edda56
JK
87392011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8740
8741 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
8742
e5141119
JB
87432011-03-06 Yao Qi <yao@codesourcery.com>
8744
8745 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
8746
64794aa4
JB
87472011-03-05 Yao Qi <yao@codesourcery.com>
8748
8749 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8750 (subdir_do): New make target. Copied from gdb/Makefile.
8751 (maintainer-clean, realclean, distclean, clean): Call corresponding
8752 make targets in common/Makefile.
8753
7a762829
YQ
87542011-03-04 Yao Qi <yao@codesourcery.com>
8755
8756 * Makefile.in: Remove GNU make feature --directory.
8757
348af9f7
MS
87582011-03-04 Michael Snyder <msnyder@vmware.com>
8759
8760 * server.c (queue_stop_reply): Call xmalloc not malloc.
8761
87622011-03-02 Michael Snyder <msnyder@vmware.com>
8763
8764 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
8765
9f72fee2
MS
87662011-02-28 Michael Snyder <msnyder@vmware.com>
8767
588eebee
MS
8768 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
8769 (cmd_qtframe): Ditto.
8770 (cmd_qtbuffer): Ditto.
8771 (cmd_bigqtbuffer): Ditto.
8772
9f72fee2
MS
8773 * utils.c (decimal2str): Initialize 'width' to nine, then
8774 don't mess with it.
8775
8040bd49
UW
87762011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8777
8778 * hostio.c (require_data): Free *data, not data.
8779
7e52cbd0
JK
87802011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8781
8782 * hostio.c (require_data): Use free, not xfree.
8783
9130f83e
MS
87842011-02-27 Michael Snyder <msnyder@vmware.com>
8785
4b812f4e
MS
8786 * server.c (handle_query): Discard unused value.
8787
9130f83e
MS
8788 * hostio.c (require_data): Free malloc memory before returning
8789 error.
8790
69d37113
MS
87912011-02-26 Michael Snyder <msnyder@vmware.com>
8792
8793 * linux-low.c (list_threads): Call closedir for dirent.
8794
35f5825a
MS
87952011-02-27 Michael Snyder <msnyder@vmware.com>
8796
2a589cef
MS
8797 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
8798 a case statement falls through.
8799
0adea5f7
MS
8800 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
8801
35f5825a
MS
8802 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
8803 in comparison.
8804
238f1c74
MS
88052011-02-26 Michael Snyder <msnyder@vmware.com>
8806
8807 * utils.c (decimal2str): Eliminate dead code and dead param.
8808 (pulongest): Drop dead param from call to decimal2str.
8809 (plongest): Ditto.
8810
633ff500
JB
88112011-02-24 Joel Brobecker <brobecker@adacore.com>
8812
8813 Revert the following patch (not approved yet):
8814 2011-02-21 Hui Zhu <teawater@gmail.com>
8815 * tracepoint.c (tp_printf): New function.
8816 (eval_agent_expr): Handle gdb_agent_op_printf.
8817
f9c6ff72
HZ
88182011-02-21 Hui Zhu <teawater@gmail.com>
8819
8820 * tracepoint.c (tp_printf): New function.
8821 (eval_agent_expr): Handle gdb_agent_op_printf.
8822
94d5e490
TT
88232011-02-18 Tom Tromey <tromey@redhat.com>
8824
8825 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
8826 (tracepoint.o): Likewise.
8827 * tracepoint.c (enum gdb_agent_op): Use ax.def.
8828 (gdb_agent_op_names): Likewise.
8829
c7f96d2b
TT
88302011-02-18 Tom Tromey <tromey@redhat.com>
8831
8832 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
8833 gdb_agent_op_rot>: New constants.
8834 (gdb_agent_op_names): Add pick and roll.
8835 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
8836 cases.
8837
0feedb2c
JK
88382011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
8839
8840 * aclocal.m4: Regenerated with aclocal-1.11.1.
8841
b3b9301e
PA
88422011-02-14 Pedro Alves <pedro@codesourcery.com>
8843
8844 * server.c (handle_qxfer_traceframe_info): New.
8845 (qxfer_packets): Register "traceframe-info".
8846 (handle_query): Report support for qXfer:traceframe-info:read+.
8847 * tracepoint.c (match_blocktype): New.
8848 (traceframe_find_block_type): Rename to ...
8849 (traceframe_walk_blocks): ... this. Add callback filter argument,
8850 and use it.
8851 (traceframe_find_block_type): New, reimplemented on top of
8852 traceframe_walk_blocks.
8853 (build_traceframe_info_xml): New.
8854 (traceframe_read_info): New.
8855 * server.h (traceframe_read_info): Declare.
8856
4f3e6fb7
YQ
88572011-02-11 Yao Qi <yao@codesourcery.com>
8858
8859 * configure.ac: Call AC_PROG_RANLIB.
8860 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
8861 * configure: Regenerate.
8862
764880b7
PA
88632011-02-07 Pedro Alves <pedro@codesourcery.com>
8864
8865 * server.c (gdb_read_memory): Change return semantics to allow
8866 partial transfers.
8867 (handle_search_memory_1): Adjust.
8868 (process_serial_event) <'m' packet>: Handle partial transfers.
8869 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
8870
1c79eb8a
PA
88712011-01-28 Pedro Alves <pedro@codesourcery.com>
8872
8873 * regcache.c (init_register_cache): Initialize
8874 regcache->register_status.
8875 (free_register_cache): Release regcache->register_status.
8876 (regcache_cpy): Copy register_status.
8877 (registers_to_string): Print 'x's for unavailable registers.
8878 (supply_register): Mark the register's status valid or
8879 unavailable, depending on whether a buffer was passed in or not.
8880 (supply_register_zeroed): New.
8881 (supply_regblock): Mark the registers' status valid or
8882 unavailable, depending on whether a buffer was passed in or not.
8883 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
8884 (struct regcache): New `register_status' field.
8885 (supply_register_zeroed): Declare.
8886 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
8887 supply_register_zeroed, rather than passing a NULL buffer to
8888 supply_register.
8889 * tracepoint.c (fetch_traceframe_registers): Update comment.
8890
85724a0e
PA
88912011-01-28 Pedro Alves <pedro@codesourcery.com>
8892
8893 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
8894 buffer explicit.
8895
d08aafef
PA
88962011-01-25 Pedro Alves <pedro@codesourcery.com>
8897
8898 * server.h (decode_xfer_write): Change prototype.
8899 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
8900 and don't extract the annex here.
8901 * server.c (decode_xfer_read): Remove `annex' parameter,
8902 and don't extract the annex here.
8903 (decode_xfer): New.
8904 (struct qxfer): New.
8905 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
8906 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
8907 (handle_qxfer_statictrace): New functions, abstracted out from
8908 handle_query, and made to use the struct qxfer interface.
8909 (handle_threads_qxfer_proper): Rename to ...
8910 (handle_qxfer_threads_proper): ... this.
8911 (handle_threads_qxfer): Rename to ...
8912 (handle_qxfer_threads): ... this. Adjust.
8913 (qxfer_packets): New array.
8914 (handle_qxfer): New function.
8915 (handle_query): Use handle_qxfer.
8916
493e2a69
MS
89172011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
8918
8919 * gdbreplay.c: Shorten lines of >= 80 columns.
8920 * linux-low.c: Ditto.
8921 * linux-ppc-low.c: Ditto.
8922 * linux-s390-low.c: Ditto.
8923 * linux-sparc-low.c: Ditto.
8924 * linux-x86-low.c: Ditto.
8925 * linux-xtensa-low.c: Ditto.
8926 * mem-break.c: Ditto.
8927 * nto-low.c: Ditto.
8928 * regcache.h: Ditto.
8929 * remote-utils.c: Ditto.
8930 * server.c: Ditto.
8931 * server.h: Ditto.
8932 * thread-db.c: Ditto.
8933 * tracepoint.c: Ditto.
8934 * utils.c: Ditto.
8935 * win32-low.h: Ditto.
8936
44944448
JB
89372011-01-05 Joel Brobecker <brobecker@adacore.com>
8938
8939 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
8940 update.
8941
71ce852c
JB
89422011-01-01 Joel Brobecker <brobecker@adacore.com>
8943
8944 * server.c (gdbserver_version): Update copyright year in version
8945 output.
8946 * gdbreplay.c (gdbreplay_version): Ditto.
8947
eb826dc6
MF
89482010-12-29 Jie Zhang <jie.zhang@analog.com>
8949
8950 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
8951 * linux-bfin-low.c: New file.
8952 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
8953 PT_DATA_ADDR for BFIN targets.
8954 * Makefile.in (SFILES): Add linux-bfin-low.c.
8955 (clean): Remove reg-bfin.c.
8956 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
8957 * README: Mention supported Blackfin targets.
8958
39ab222a
MF
89592010-12-23 Mike Frysinger <vapier@gentoo.org>
8960
8961 * .gitignore: New file.
8962
a1f2ce7d
MF
89632010-11-16 Mike Frysinger <vapier@gentoo.org>
8964
8965 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
8966
f474844c
JZ
89672010-10-22 Jie Zhang <jie@codesourcery.com>
8968
8969 * Makefile.in: Add FLAGS_TO_PASS variable.
8970 (install): Remove dependency of install-only and recursively
8971 invoke make for install-only.
8972
f1048712
DE
89732010-10-04 Doug Evans <dje@google.com>
8974
8975 * Makefile.in (uninstall): Use $(DESTDIR).
8976
b53a1623
PA
89772010-09-24 Pedro Alves <pedro@codesourcery.com>
8978
e6ee044d
PA
8979 PR gdb/11842
8980
b53a1623
PA
8981 * linux-x86-low.c (compat_siginfo_from_siginfo)
8982 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
8983 si_code is < 0. Check for si_code == SI_TIMER before checking for
8984 si_code < 0.
8985
fa1bd1e4
JB
89862010-09-13 Joel Brobecker <brobecker@adacore.com>
8987
8988 * lynx-i386-low.c: New file.
8989 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
8990
47fac8f8
JB
89912010-09-13 Joel Brobecker <brobecker@adacore.com>
8992
8993 * lynx-low.c (ptrace_request_to_str): Remove handling for
8994 request values that have been removed in LynxOS 5.x.
8995
1adfc54d
JB
89962010-09-13 Joel Brobecker <brobecker@adacore.com>
8997
8998 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
8999 <ptrace.h>
9000
c2a66c29
NS
90012010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9002
9003 * configure.ac: Add --enable-inprocess-agent option.
9004 * configure: Rebuilt.
9005
32fcada3
YQ
90062010-09-06 Yao Qi <yao@codesourcery.com>
9007
9008 * linux-low.c (linux_kill): Remove unused variable.
9009 (linux_stabilize_threads): Likewise.
9010 * server.c (start_inferior): Likewise.
9011 (queue_stop_reply_callback): Likewise.
9012 * tracepoint.c (do_action_at_tracepoint): Likewise.
9013
0cccb683
YQ
90142010-09-06 Yao Qi <yao@codesourcery.com>
9015
9016 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
9017 on return.
9018
423ec54c
JK
90192010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9020
9021 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
9022
12ac6819
PA
90232010-09-06 Pedro Alves <pedro@codesourcery.com>
9024
9025 * Makefile.in (install-only): Replace $IPA_DEPFILES with
9026 "$(IPA_DEPFILES)".
9027
8ed54b31
JB
90282010-09-01 Joel Brobecker <brobecker@adacore.com>
9029
9030 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
9031 gdbserver/lynx-ppc-low.c: New files.
9032 * Makefile.in (lynx_low_h): New variable.
9033 (lynx-low.o, lynx-ppc-low.o): New rules.
9034 * configure.ac: On LynxOS, link with -lnetinet.
9035 * configure.srv: Add handling of powerpc-*-lynxos* targets.
9036 * configure: regenerate.
9037
bb0116a4
JB
90382010-09-01 Joel Brobecker <brobecker@adacore.com>
9039
9040 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
9041 * configure.ac: Add check for vasprintf and vsnprintf.
9042 * configure, config.in: Regenerate.
9043 * server.h (vasprintf, vsnprintf): Add conditional declarations.
9044
a778ab81 90452010-09-01 Joel Brobecker <brobecker@adacore.com>
9046
9047 * gdbreplay.c: Move include of alloca.h up, next to include of
9048 malloc.h.
9049 * server.h: Add include of malloc.h.
9050 * mem-break.c: Remove include of malloc.h.
9051 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
9052
8b034a19 90532010-09-01 Joel Brobecker <brobecker@adacore.com>
9054
9055 * Makefile.in (memmem.o): Build with -Wno-error.
9056
90572010-09-01 Joel Brobecker <brobecker@adacore.com>
9058
9059 * utils.c (xsnprintf): Make non-static.
9060 * server.h: Add xsnprintf declaration.
9061 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
9062 replace calls to snprintf by calls to xsnprintf throughout.
9063
90642010-09-01 Joel Brobecker <brobecker@adacore.com>
9065
9066 * configure.ac: Add configure check for alloca.
9067 * configure, config.in: Regenerate.
9068 * server.h: Include alloca.h if it exists.
9069 * gdbreplay.c: Include alloca.h if it exists.
9070
1a981360
PA
90712010-08-28 Pedro Alves <pedro@codesourcery.com>
9072
9073 * linux-low.c (__SIGRTMIN): Define if not already defined.
9074 (linux_create_inferior): Check for __ANDROID__ rather than
9075 __SIGRTMIN.
9076 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
9077 are already deferred.
9078 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
9079 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
9080 stopped and already has a pending signal to report.
9081 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
9082 a pending signal to report or is moving out of a jump pad.
9083 (linux_init_signals): Check for __ANDROID__ rather than
9084 __SIGRTMIN.
9085
b4d51a55
PA
90862010-08-28 Pedro Alves <pedro@codesourcery.com>
9087
9088 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
9089 debug_threads check. Avoid a linear search when not doing debug
9090 output.
9091
ec48365d
PA
90922010-08-27 Pedro Alves <pedro@codesourcery.com>
9093
9094 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
9095 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
9096 (struct file_handler) <fd>: Change type to gdb_fildes_t.
9097 (process_event): Change local fd's type to gdb_fildes_t.
9098 (create_file_handler): Adjust prototype.
9099 (delete_file_handler): Adjust prototype.
9100 (handle_file_event): Adjust prototype. Use pfildes.
9101 (create_file_event): Adjsut prototype.
9102 * remote-utils.c (remote_desc, listen_desc): Change type to
9103 gdb_fildes_t.
9104 * server.h: New gdb_fildes_t typedef.
9105 [USE_WIN32API]: Include winsock2.h.
9106 (delete_file_handler, add_file_handler): Adjust prototypes.
9107 (pfildes): Declare.
9108 * utils.c (pfildes): New.
9109
854d88f0
PA
91102010-08-27 Pedro Alves <pedro@codesourcery.com>
9111
9112 * configure.ac (build_warnings): Add -Wno-char-subscripts.
9113 * configure: Regenerate.
9114
0146f85b
PA
91152010-08-27 Pedro Alves <pedro@codesourcery.com>
9116
9117 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
9118 (linux_done_accessing_memory): ... this.
9119 (linux_target_ops): Adjust.
9120 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
9121 * nto-low.c (nto_target_ops): Adjust comment.
9122 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
9123 * spu-low.c (spu_target_ops): Adjust comment.
9124 * target.h (target_ops): Rename unprepare_to_access_memory field
9125 to done_accessing_memory.
9126 (unprepare_to_access_memory): Rename to ...
9127 (done_accessing_memory): ... this.
9128
90d74c30
PA
91292010-08-26 Pedro Alves <pedro@codesourcery.com>
9130
9131 * linux-low.c (linux_prepare_to_access_memory): New.
9132 (linux_unprepare_to_access_memory): New.
9133 (linux_target_ops): Install them.
9134 * server.c (read_memory): Rename to ...
9135 (gdb_read_memory): ... this. Use
9136 prepare_to_access_memory/prepare_to_access_memory.
9137 (write_memory): Rename to ...
9138 (gdb_write_memory): ... this. Use
9139 prepare_to_access_memory/prepare_to_access_memory.
9140 (handle_search_memory_1): Adjust.
9141 (process_serial_event): Adjust.
9142 * target.h (struct target_ops): New fields
9143 prepare_to_access_memory and unprepare_to_access_memory.
9144 (prepare_to_access_memory, unprepare_to_access_memory): New.
9145 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
9146 prepare_to_access_memory/prepare_to_access_memory.
9147 * nto-low.c (nto_target_ops): Adjust.
9148 * spu-low.c (spu_target_ops): Adjust.
9149 * win32-low.c (win32_target_ops): Adjust.
9150
fd467969
PA
91512010-08-26 Pedro Alves <pedro@codesourcery.com>
9152
9153 * Makefile.in (WARN_CFLAGS): Get it from configure.
9154 (WERROR_CFLAGS): New.
9155 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
9156 * configure.ac: Introduce --enable-werror, which adds -Werror to
9157 the compiler command line. Enabled by default. Disable with
9158 --disable-werror. Add -Wdeclaration-after-statement
9159 Wpointer-arith and -Wformat-nonliteral to warning flags.
9160 * configure: Regenerate.
9161
331e2f5f
PA
91622010-08-26 Pedro Alves <pedro@codesourcery.com>
9163
9164 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
9165
e581f2b4
PA
91662010-08-26 Pedro Alves <pedro@codesourcery.com>
9167
9168 * gdbreplay.c (remote_error): New.
9169 (gdbchar): New.
9170 (expect): Use gdbchar. Check for error reading from GDB.
9171 Clarify sync error output.
9172 (play): Check for errors writing to GDB.
9173 * linux-low.c (sigchld_handler): Really ignore `write' errors.
9174 * remote-utils.c (getpkt): Check for errors writing to the remote
9175 descriptor.
9176
3c11dd79
PA
91772010-08-25 Pedro Alves <pedro@codesourcery.com>
9178
9179 * linux-low.c (linux_wait_1): Move non-debugging code out of
9180 `debug_threads' control.
9181
d20a8ad9
PA
91822010-08-25 Pedro Alves <pedro@codesourcery.com>
9183
9184 * linux-low.c (linux_wait_1): Don't set last_status here.
9185 * server.c (push_event, queue_stop_reply_callback): Assert we're
9186 not pushing a TARGET_WAITKIND_IGNORE event.
9187 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
9188 (myresume, handle_target_event): Set the thread's last_resume_kind
9189 and last_status from the target returned status.
9190
964e4306
PA
91912010-08-25 Pedro Alves <pedro@codesourcery.com>
9192
9193 PR threads/10729
9194
9195 * linux-x86-low.c (update_debug_registers_callback): New.
9196 (i386_dr_low_set_addr): Use it.
9197 (i386_dr_low_get_addr): New.
9198 (i386_dr_low_set_control): Use update_debug_registers_callback.
9199 (i386_dr_low_get_control): New.
9200 (i386_dr_low_get_status): Adjust.
9201 * linux-low.c (linux_stop_lwp): New.
9202 * linux-low.h (linux_stop_lwp): Declare.
9203
9204 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
9205 argument instead of a i386_debug_reg_state.
9206 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
9207 a i386_debug_reg_state.
9208 (i386_insert_aligned_watchpoint): Adjust.
9209 (i386_remove_aligned_watchpoint): Adjust.
9210 (i386_low_stopped_data_address): Read the debug registers from the
9211 inferior instead of from the mirrors.
9212 * i386-low.h (struct i386_debug_reg_state): Extend comment.
9213 (i386_dr_low_get_addr): Declare.
9214 (i386_dr_low_get_control): Declare.
9215 (i386_dr_low_get_status): Change prototype.
9216
9217 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
9218 (i386_dr_low_get_addr): New.
9219 (i386_dr_low_get_control): New.
9220 (i386_dr_low_get_status): Adjust prototype. Return
9221 dr_status_mirror.
9222 (i386_initial_stuff): Clear dr_status_mirror and
9223 dr_control_mirror.
9224 (i386_get_thread_context): Adjust.
9225 (i386_set_thread_context): Adjust.
9226 (i386_thread_added): Adjust.
9227
5f21a75b
PA
92282010-08-24 Pedro Alves <pedro@codesourcery.com>
9229
9230 * linux-low.h (linux_thread_area): Delete declaration.
9231
3e4c1235
TS
92322010-08-11 Thomas Schwinge <thomas@codesourcery.com>
9233
9234 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
9235 after its termination.
9236
1971b033
PA
92372010-08-09 Pedro Alves <pedro@codesourcery.com>
9238
9239 * linux-low.c (gdb_wants_lwp_stopped): Delete.
9240 (gdb_wants_all_stopped): Delete.
9241 (linux_wait_1): Don't call them.
9242 * server.c (handle_v_cont): Tag all threads as want-stopped.
9243 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
9244 stopped as "client-wants-stopped".
9245
310444ac
PA
92462010-07-31 Pedro Alves <pedro@codesourcery.com>
9247
9248 * Makefile.in (signals_h): New.
9249 (server_h): Depend on it.
9250 (server.o): Don't depend on $(signals_def).
9251 (signals.o): Depend on $(signals_def).
9252
a19cae16
JK
92532010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
9254
9255 * Makefile.in (signals_def): New.
9256 (server_h): Append include/gdb/signals.h and signals_def.
9257 (server.o): Append signals_def.
9258
30d50328
JK
92592010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9260
9261 * server.c (handle_target_event): Use target_signal_to_host for
9262 resume_info.sig initialization.
9263 * target.h (struct thread_resume) <sig>: New comment.
9264
5c3216e2
OS
92652010-07-20 Ozkan Sezer <sezeroz@gmail.com>
9266
c6f46ca0
OS
9267 * server.c (handle_query): strcpy() the returned string from paddress()
9268 instead of sprintf().
5c3216e2
OS
9269 * utils.c (paddress): Return phex_nz().
9270
6bd31874
JB
92712010-07-07 Joel Brobecker <brobecker@adacore.com>
9272
9273 * server.c (handle_v_cont): Call mourn_inferior if process
9274 just exited.
9275 (myresume): Likewise.
9276
0fb4aa4b
PA
92772010-07-01 Pedro Alves <pedro@codesourcery.com>
9278
9279 Static tracepoints, and integration with UST.
9280
9281 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
9282 * mem-break.c (uninsert_all_breakpoints)
9283 (reinsert_all_breakpoints): New.
9284 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
9285 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
9286 (gdb_agent_ust_loaded, helper_thread_id)
9287 (gdb_agent_helper_thread_id): New macros.
9288 (struct ipa_sym_addresses): Add addr_ust_loaded,
9289 addr_helper_thread_id, addr_cmd_buf.
9290 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
9291 (in_process_agent_loaded_ust): New.
9292 (write_e_ust_not_loaded): New.
9293 (maybe_write_ipa_ust_not_loaded): New.
9294 (struct collect_static_trace_data_action): New.
9295 (enum tracepoint_type) <static_tracepoint>: New.
9296 (struct tracepoint) <handle>: Mention static tracepoints.
9297 (struct static_tracepoint_ctx): New.
9298 (CMD_BUF_SIZE): New.
9299 (add_tracepoint_action): Handle static tracepoint actions.
9300 (unprobe_marker_at): New.
9301 (clear_installed_tracepoints): Handle static tracepoints.
9302 (cmd_qtdp): Handle static tracepoints.
9303 (probe_marker_at): New.
9304 (cmd_qtstart): Handle static tracepoints.
9305 (response_tracepoint): Handle static tracepoints.
9306 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
9307 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
9308 (get_context_regcache): Handle static tracepoints.
9309 (do_action_at_tracepoint): Handle static tracepoint actions.
9310 (traceframe_find_block_type): Handle static trace data blocks.
9311 (traceframe_read_sdata): New.
9312 (download_tracepoints): Download static tracepoint actions.
9313 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
9314 (GDB_PROBE_NAME): New.
9315 (ust_ops): New.
9316 (GET_UST_SYM): New.
9317 (USTF): New.
9318 (dlsym_ust): New.
9319 (ust_marker_to_static_tracepoint): New.
9320 (gdb_probe): New.
9321 (collect_ust_data_at_tracepoint): New.
9322 (gdb_ust_probe): New.
9323 (UNIX_PATH_MAX, SOCK_DIR): New.
9324 (gdb_ust_connect_sync_socket): New.
9325 (resume_thread, stop_thread): New.
9326 (run_inferior_command): New.
9327 (init_named_socket): New.
9328 (gdb_ust_socket_init): New.
9329 (cstr_to_hexstr): New.
9330 (next_st): New.
9331 (first_marker, next_marker): New.
9332 (response_ust_marker): New.
9333 (cmd_qtfstm, cmd_qtsstm): New.
9334 (unprobe_marker_at, probe_marker_at): New.
9335 (cmd_qtstmat, gdb_ust_thread): New.
9336 (gdb_ust_init): New.
9337 (initialize_tracepoint_ftlib): Call gdb_ust_init.
9338 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
9339 (ST_REGENTRY): New.
9340 (x86_64_st_collect_regmap): New.
9341 (X86_64_NUM_ST_COLLECT_GREGS): New.
9342 (AMD64_RIP_REGNUM): New.
9343 (supply_static_tracepoint_registers): New.
9344 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
9345 (ST_REGENTRY): New.
9346 (i386_st_collect_regmap): New.
9347 (i386_NUM_ST_COLLECT_GREGS): New.
9348 (supply_static_tracepoint_registers): New.
9349 * server.c (handle_query): Handle qXfer:statictrace:read.
9350 <qSupported>: Report support for StaticTracepoints, and
9351 qXfer:statictrace:read features.
9352 * server.h (traceframe_read_sdata)
9353 (supply_static_tracepoint_registers): Declare.
9354 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
9355 (unpack_varlen_hex): Include in IPA build.
9356 * Makefile.in (ustlibs, ustinc): New.
9357 (IPA_OBJS): Add remote-utils-ipa.o.
9358 ($(IPA_LIB)): Link -ldl and -lpthread.
9359 (UST_CFLAGS): New.
9360 (IPAGENT_CFLAGS): Add UST_CFLAGS.
9361 * config.in, configure: Regenerate.
9362
9e4344e5
PA
93632010-06-20 Ian Lance Taylor <iant@google.com>
9364 Pedro Alves <pedro@codesourcery.com>
9365
9366 * linux-x86-low.c (always_true): Delete.
9367 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
9368 trying to fool the compiler with always_true.
9369
c6beb2cb
PA
93702010-06-20 Pedro Alves <pedro@codesourcery.com>
9371
9372 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
9373 conditions in gdbserver.
9374
d2ed6730
UW
93752010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
9376
9377 * spu-low.c (spu_read_memory): Wrap around local store limit.
9378 (spu_write_memory): Likewise.
9379
4e29fb54
PA
93802010-06-15 Pedro Alves <pedro@codesourcery.com>
9381
9382 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
9383 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
9384 LONGEST uses.
9385 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
9386 uses.
9387 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
9388 uses with LONGEST uses.
9389
6a271cae
PA
93902010-06-14 Stan Shebs <stan@codesourcery.com>
9391 Pedro Alves <pedro@codesourcery.com>
9392
9393 Bytecode compiler.
9394
9395 * linux-x86-low.c: Include limits.h.
9396 (add_insns): New.
9397 (always_true): New.
9398 (EMIT_ASM): New.
9399 (EMIT_ASM32): New.
9400 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
9401 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
9402 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
9403 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
9404 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
9405 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
9406 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
9407 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
9408 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
9409 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
9410 (amd64_emit_void_call_2): New.
9411 (amd64_emit_ops): New.
9412 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
9413 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
9414 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
9415 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
9416 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
9417 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
9418 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
9419 (i386_emit_call, i386_emit_reg, i386_emit_pop)
9420 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
9421 (i386_emit_stack_adjust, i386_emit_int_call_1)
9422 (i386_emit_void_call_2): New.
9423 (i386_emit_ops): New.
9424 (x86_emit_ops): New.
9425 (the_low_target): Install x86_emit_ops.
9426 * server.h (struct emit_ops): New.
9427 (get_raw_reg_func_addr): Declare.
9428 (current_insn_ptr, emit_error): Declare.
9429 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
9430 (set_trace_state_variable_value): New defines.
9431 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
9432 addr_get_trace_state_variable_value and
9433 addr_set_trace_state_variable_value.
9434 (symbol_list): New fields for get_raw_reg,
9435 get_trace_state_variable_value and set_trace_state_variable_value.
9436 (condfn): New typedef.
9437 (struct tracepoint): New field `compiled_cond'.
9438 (do_action_at_tracepoint): Clear compiled_cond.
9439 (get_trace_state_variable_value, set_trace_state_variable_value):
9440 Export in the IPA.
9441 (condition_true_at_tracepoint): If there's a compiled condition,
9442 run that.
9443 (current_insn_ptr, emit_error): New globals.
9444 (struct bytecode_address): New.
9445 (get_raw_reg_func_addr): New.
9446 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
9447 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
9448 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
9449 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
9450 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
9451 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
9452 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
9453 (compile_tracepoint_condition, compile_bytecodes): New.
9454 * target.h (emit_ops): Forward declare.
9455 (struct target_ops): New field emit_ops.
9456 (target_emit_ops): New.
9457 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
9458 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
9459 * linux-low.c (linux_emit_ops): New.
9460 (linux_target_ops): Install it.
9461 * linux-low.h (struct linux_target_ops): New field emit_ops.
9462
92b72907
UW
94632010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
9464
9465 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
9466 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
9467
fa593d66
PA
94682010-06-01 Pedro Alves <pedro@codesourcery.com>
9469 Stan Shebs <stan@codesourcery.com>
9470
9471 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
9472 (all): Depend on $(extra_libraries).
9473 (install-only): Install the IPA.
9474 (IPA_OBJS, IPA_LIB): New.
9475 (clean): Remove the IPA lib.
9476 (IPAGENT_CFLAGS): New.
9477 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
9478 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
9479 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
9480 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
9481 * configure.ac: Check for atomic builtins support in the compiler.
9482 (IPA_DEPFILES, extra_libraries): Define.
9483 * configure.srv (ipa_obj): Add description.
9484 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
9485 (i[34567]86-*-linux*): Set ipa_obj.
9486 (x86_64-*-linux*): Set ipa_obj.
9487 * linux-low.c (stabilizing_threads): New.
9488 (supports_fast_tracepoints): New.
9489 (linux_detach): Stabilize threads before detaching.
9490 (handle_tracepoints): Handle internal tracing breakpoints. Assert
9491 the lwp is either not stabilizing, or is moving out of a jump pad.
9492 (linux_fast_tracepoint_collecting): New.
9493 (maybe_move_out_of_jump_pad): New.
9494 (enqueue_one_deferred_signal): New.
9495 (dequeue_one_deferred_signal): New.
9496 (linux_wait_for_event_1): If moving out of a jump pad, defer
9497 pending signals to later.
9498 (linux_stabilize_threads): New.
9499 (linux_wait_1): Check if threads need moving out of jump pads, and
9500 do it if so.
9501 (stuck_in_jump_pad_callback): New.
9502 (move_out_of_jump_pad_callback): New.
9503 (lwp_running): New.
9504 (linux_resume_one_lwp): Handle moving out of jump pads.
9505 (linux_set_resume_request): Dequeue deferred signals.
9506 (need_step_over_p): Also step over fast tracepoint jumps.
9507 (start_step_over): Also uninsert fast tracepoint jumps.
9508 (finish_step_over): Also reinsert fast tracepoint jumps.
9509 (linux_install_fast_tracepoint_jump): New.
9510 (linux_target_ops): Install linux_stabilize_threads and
9511 linux_install_fast_tracepoint_jump_pad.
9512 * linux-low.h (linux_target_ops) <get_thread_area,
9513 install_fast_tracepoint_jump_pad>: New fields.
9514 (struct lwp_info) <collecting_fast_tracepoint,
9515 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
9516 (linux_get_thread_area): Declare.
9517 * linux-x86-low.c (jump_insn): New.
9518 (x86_get_thread_area): New.
9519 (append_insns): New.
9520 (push_opcode): New.
9521 (amd64_install_fast_tracepoint_jump_pad): New.
9522 (i386_install_fast_tracepoint_jump_pad): New.
9523 (x86_install_fast_tracepoint_jump_pad): New.
9524 (the_low_target): Install x86_get_thread_area and
9525 x86_install_fast_tracepoint_jump_pad.
9526 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
9527 (struct fast_tracepoint_jump): New.
9528 (fast_tracepoint_jump_insn): New.
9529 (fast_tracepoint_jump_shadow): New.
9530 (find_fast_tracepoint_jump_at): New.
9531 (fast_tracepoint_jump_here): New.
9532 (delete_fast_tracepoint_jump): New.
9533 (set_fast_tracepoint_jump): New.
9534 (uninsert_fast_tracepoint_jumps_at): New.
9535 (reinsert_fast_tracepoint_jumps_at): New.
9536 (set_breakpoint_at): Use write_inferior_memory.
9537 (uninsert_raw_breakpoint): Use write_inferior_memory.
9538 (check_mem_read): Mask out fast tracepoint jumps.
9539 (check_mem_write): Mask out fast tracepoint jumps.
9540 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
9541 (set_fast_tracepoint_jump): Declare.
9542 (delete_fast_tracepoint_jump)
9543 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
9544 (reinsert_fast_tracepoint_jumps_at): Declare.
9545 * regcache.c: Don't compile many functions when building the
9546 in-process agent library.
9547 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
9548 the register buffer in the heap.
9549 (free_register_cache): If the register buffer isn't owned by the
9550 regcache, don't free it.
9551 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
9552 pre-existing register caches.
9553 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
9554 type.
9555 (convert_ascii_to_int): : Constify `from' parameter type.
9556 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
9557 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
9558 the needed buffer in-place.
9559 (relocate_instruction): New.
9560 * server.c (handle_query) <qSymbols>: If the target supports
9561 tracepoints, give it a chance of looking up symbols. Report
9562 support for fast tracepoints.
9563 (handle_status): Stabilize threads.
9564 (process_serial_event): Adjust.
9565 * server.h (struct fast_tracepoint_jump): Forward declare.
9566 (struct process_info) <fast_tracepoint_jumps>: New field.
9567 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
9568 (decode_X_packet, decode_M_packet): Adjust.
9569 (relocate_instruction): Declare.
9570 (in_process_agent_loaded): Declare.
9571 (tracepoint_look_up_symbols): Declare.
9572 (struct fast_tpoint_collect_status): Declare.
9573 (fast_tracepoint_collecting): Declare.
9574 (force_unlock_trace_buffer): Declare.
9575 (handle_tracepoint_bkpts): Declare.
9576 (initialize_low_tracepoint)
9577 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
9578 * target.h (struct target_ops) <stabilize_threads,
9579 install_fast_tracepoint_jump_pad>: New fields.
9580 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
9581 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
9582 [HAVE_STDINT_H]: Include stdint.h.
9583 (trace_debug_1): Rename to ...
9584 (trace_vdebug): ... this.
9585 (trace_debug): Rename to ...
9586 (trace_debug_1): ... this. Add `level' parameter.
9587 (trace_debug): New.
9588 (ATTR_USED, ATTR_NOINLINE): New.
9589 (IP_AGENT_EXPORT): New.
9590 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
9591 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
9592 (about_to_request_buffer_space, trace_buffer_is_full)
9593 (stopping_tracepoint, expr_eval_result, error_tracepoint)
9594 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
9595 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
9596 (traceframe_write_count, traceframes_created)
9597 (trace_state_variables)
9598 New renaming defines.
9599 (struct ipa_sym_addresses): New.
9600 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
9601 (symbol_list): New.
9602 (ipa_sym_addrs): New.
9603 (all_tracepoint_symbols_looked_up): New.
9604 (in_process_agent_loaded): New.
9605 (write_e_ipa_not_loaded): New.
9606 (maybe_write_ipa_not_loaded): New.
9607 (tracepoint_look_up_symbols): New.
9608 (debug_threads) [IN_PROCESS_AGENT]: New.
9609 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
9610 (UNKNOWN_SIDE_EFFECTS): New.
9611 (stop_tracing): New.
9612 (flush_trace_buffer): New.
9613 (stop_tracing_bkpt): New.
9614 (flush_trace_buffer_bkpt): New.
9615 (read_inferior_integer): New.
9616 (read_inferior_uinteger): New.
9617 (read_inferior_data_pointer): New.
9618 (write_inferior_data_pointer): New.
9619 (write_inferior_integer): New.
9620 (write_inferior_uinteger): New.
9621 (struct collect_static_trace_data_action): Delete.
9622 (enum tracepoint_type): New.
9623 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
9624 <actions_str, step_actions, step_actions_str>: Only include in
9625 GDBserver.
fa593d66
PA
9626 <orig_size, obj_addr_on_target, adjusted_insn_addr>
9627 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
9628 (tracepoints): Use IP_AGENT_EXPORT.
9629 (last_tracepoint): Don't include in the IPA.
9630 (stopping_tracepoint): Use IP_AGENT_EXPORT.
9631 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
9632 (alloced_trace_state_variables): New.
9633 (trace_state_variables): Use IP_AGENT_EXPORT.
9634 (traceframe_t): Delete unused variable.
9635 (circular_trace_buffer): Don't include in the IPA.
9636 (trace_buffer_start): Delete.
9637 (struct trace_buffer_control): New.
9638 (trace_buffer_free): Delete.
9639 (struct ipa_trace_buffer_control): New.
9640 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
9641 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
9642 New.
9643 (trace_buffer_ctrl): New.
9644 (TRACE_BUFFER_CTRL_CURR): New.
9645 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
9646 Reimplement as macros.
9647 (trace_buffer_wrap): Delete.
9648 (traceframe_write_count, traceframe_read_count)
9649 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
9650 (struct tracepoint_hit_ctx) <type>: New field.
9651 (struct fast_tracepoint_ctx): New.
9652 (memory_barrier): New.
9653 (cmpxchg): New.
9654 (record_tracepoint_error): Update atomically in the IPA.
9655 (clear_inferior_trace_buffer): New.
9656 (about_to_request_buffer_space): New.
9657 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
9658 updating the same buffer.
9659 (add_tracepoint): Default the tracepoint's type to trap
9660 tracepoint, and orig_size to -1.
9661 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
9662 internal variables.
9663 (create_trace_state_variable): New parameter `gdb'. Handle it.
9664 (clear_installed_tracepoints): Clear fast tracepoint jumps.
9665 (cmd_qtdp): Handle fast tracepoints.
9666 (cmd_qtdv): Adjust.
9667 (max_jump_pad_size): New.
9668 (gdb_jump_pad_head): New.
9669 (get_jump_space_head): New.
9670 (claim_jump_space): New.
9671 (sort_tracepoints): New.
9672 (MAX_JUMP_SIZE): New.
9673 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
9674 IPA.
9675 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
9676 support. Upload fast traceframes, and delete internal IPA
9677 breakpoints.
9678 (stop_tracing_handler): New.
9679 (flush_trace_buffer_handler): New.
9680 (cmd_qtstop): Upload fast tracepoints.
9681 (response_tracepoint): Handle fast tracepoints.
9682 (tracepoint_finished_step): Upload fast traceframes. Set the
9683 tracepoint hit context's tracepoint type.
9684 (handle_tracepoint_bkpts): New.
9685 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
9686 type. Add comment about fast tracepoints.
9687 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
9688 non-existing action_str field.
9689 (get_context_regcache): Handle fast tracepoints.
9690 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
9691 to the regcache.
9692 (fast_tracepoint_from_jump_pad_address): New.
9693 (fast_tracepoint_from_ipa_tpoint_address): New.
9694 (collecting_t): New.
9695 (force_unlock_trace_buffer): New.
9696 (fast_tracepoint_collecting): New.
9697 (collecting): New.
9698 (gdb_collect): New.
9699 (write_inferior_data_ptr): New.
9700 (target_tp_heap): New.
9701 (target_malloc): New.
9702 (download_agent_expr): New.
9703 (UALIGN): New.
9704 (download_tracepoints): New.
9705 (download_trace_state_variables): New.
9706 (upload_fast_traceframes): New.
9707 (IPA_FIRST_TRACEFRAME): New.
9708 (IPA_NEXT_TRACEFRAME_1): New.
9709 (IPA_NEXT_TRACEFRAME): New.
9710 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
9711 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
9712 (gdb_jump_pad_buffer_end): New.
9713 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
9714 (initialize_tracepoint): Adjust.
9715 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
9716 buffer. Initialize the low module.
9717 * utils.c (PREFIX, TOOLNAME): New.
9718 (malloc_failure): Use PREFIX.
9719 (error): In the IPA, an error causes an exit.
9720 (fatal, warning): Use PREFIX.
9721 (internal_error): Use TOOLNAME.
9722 (NUMCELLS): Increase to 10.
9723 * configure, config.in: Regenerate.
9724
d149dd1d
PA
97252010-06-01 Pedro Alves <pedro@codesourcery.com>
9726
9727 * server.c (handle_query) <qSupported>: Do two passes over the
9728 qSupported string to avoid nesting strtok.
9729
f6528abd
JK
97302010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9731
9732 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
9733 (CDEPS): New.
9734 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
9735 -Wl,--dynamic-list.
9736 * configure: Regenerate.
9737 * proc-service.list: New.
9738
ca2a87a0
JK
97392010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9740
9741 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
9742 New comment.
9743
363a6e9f
OS
97442010-05-26 Ozkan Sezer <sezeroz@gmail.com>
9745
9746 * gdbreplay.c (remote_open): Check error return from socket() call by
9747 its equality to -1 not by it being negative.
9748 * remote-utils.c (remote_open): Likewise.
9749
d23b6cb1
PA
97502010-05-23 Pedro Alves <pedro@codesourcery.com>
9751
9752 * config.h: Regenerate.
9753
28d3cf85
MK
97542010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9755
9756 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
9757 doesn't provide PTRACE_GET_THREAD_AREA.
9758
fea36a59
MK
97592010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9760
9761 * linux-m68k-low.c: Include <asm/ptrace.h>
9762 (ps_get_thread_area): Implement.
9763
24b066ba
DE
97642010-05-03 Doug Evans <dje@google.com>
9765
9766 * event-loop.c (struct callback_event): New struct.
9767 (callback_list): New global.
9768 (append_callback_event, delete_callback_event): New functions.
9769 (process_callback): New function.
9770 (start_event_loop): Call it.
9771 * remote-utils.c (NOT_SCHEDULED): Define.
9772 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
9773 moved out of readchar.
9774 (readchar): Rewrite. Call reschedule before returning.
9775 (reset_readchar): New function.
9776 (remote_close): Call it.
9777 (process_remaining, reschedule): New functions.
9778 * server.h (callback_handler_func): New typedef.
9779 (append_callback_event, delete_callback_event): Declare.
9780
9836d6ea
PA
97812010-05-03 Pedro Alves <pedro@codesourcery.com>
9782
9783 * proc-service.c (ps_pglobal_lookup): Use
9784 thread_db_look_up_one_symbol.
9785 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
9786 parameter. Use it instead of all_symbols_looked_up.
9787 * server.h (struct process_info) <all_symbols_looked_up>: Delete
9788 field.
9789 (all_symbols_looked_up): Don't declare.
9790 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
9791 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
9792 field.
9793 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
9794 Set all_symbols_looked_up here.
9795 (thread_db_look_up_one_symbol): New.
9796 (thread_db_get_tls_address): Adjust.
9797 (thread_db_load_search, try_thread_db_load_1): Always allocate the
9798 thread_db object on the heap, and tentatively set it in the
9799 process structure.
9800 (thread_db_init): Don't set all_symbols_looked_up here.
9801 * linux-low.h (thread_db_look_up_one_symbol): Declare.
9802
7984d532
PA
98032010-05-03 Pedro Alves <pedro@codesourcery.com>
9804
9805 * linux-low.c (linux_kill, linux_detach): Adjust.
9806 (status_pending_p_callback): Remove redundant statement. Check
9807 for !TARGET_WAITIKIND_IGNORE, instead of
9808 TARGET_WAITKIND_STOPPED.
9809 (handle_tracepoints): Make sure LWP is locked. Adjust.
9810 (linux_wait_for_event_1): Adjust.
9811 (linux_cancel_breakpoints): New.
9812 (unsuspend_one_lwp): New.
9813 (unsuspend_all_lwps): New.
9814 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
9815 (send_sigstop_callback): Change return type to int, add new
9816 `except' parameter and handle it.
9817 (suspend_and_send_sigstop_callback): New.
9818 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
9819 pass them down. If SUSPEND, also increment the lwp's suspend
9820 count.
9821 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
9822 (need_step_over_p): Don't consider suspended LWPs.
9823 (start_step_over): Adjust.
9824 (proceed_one_lwp): Change return type to int, add new `except'
9825 parameter and handle it.
9826 (unsuspend_and_proceed_one_lwp): New.
9827 (proceed_all_lwps): Use find_inferior instead of
9828 for_each_inferior.
9829 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
9830 also decrement the suspend count of LWPs. Pass `except' down,
9831 instead of hacking its suspend count.
9832 (linux_pause_all): Add `freeze' parameter. Adjust.
9833 (linux_unpause_all): New.
9834 (linux_target_ops): Install linux_unpause_all.
9835 * server.c (handle_status): Adjust.
9836 * target.h (struct target_ops): New fields `unpause_all' and
9837 `cancel_breakpoints'. Add new parameter to `pause_all'.
9838 (pause_all): Add new `freeze' parameter.
9839 (unpause_all): New.
9840 (cancel_breakpoints): New.
9841 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
9842 cancel breakpoints.
9843 (cmd_qtstart): Pause threads.
9844 (stop_tracing): Pause threads, and cancel breakpoints.
9845 * win32-low.c (win32_target_ops): Adjust.
9846
e471f25b
PA
98472010-05-03 Pedro Alves <pedro@codesourcery.com>
9848
9849 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
9850 the inferior right away from here...
9851 (linux_wait_1): ... to here, and adjust to check the thread's
9852 last_resume_kind instead of the lwp's step or stop_expected flags.
9853
1915ef4f
PA
98542010-05-02 Pedro Alves <pedro@codesourcery.com>
9855
9856 * README: Use consistent `GDB' and `GDBserver' spellings.
9857
f9e39928
PA
98582010-05-02 Pedro Alves <pedro@codesourcery.com>
9859
9860 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
9861 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
9862 (linux_detach_one_lwp): Assume the lwp is stopped.
9863 (any_thread_of): Delete.
9864 (linux_detach): Stop all lwps here. Don't blindly delete all
9865 breakpoints.
9866 (delete_lwp_callback): New.
9867 (linux_mourn): Delete all lwps of the process that is gone.
9868 (linux_wait_1): Don't delete the last lwp of the process here.
9869 * mem-break.h (mark_breakpoints_out): Declare.
9870 * mem-break.c (mark_breakpoints_out): New.
9871 (free_all_breakpoints): Use it.
9872 * server.c (handle_target_event): If the process is gone, mark
9873 breakpoints out.
9874 * thread-db.c (struct thread_db) <create_bp>: New field.
9875 (thread_db_enable_reporting): Fix prototype. Store a thread event
9876 breakpoint reference in the thread_db struct.
9877 (thread_db_load_search): Clear the thread_db object.
9878 (try_thread_db_load_1): Ditto.
9879 (switch_to_process): New.
9880 (disable_thread_event_reporting): Use it.
9881 (remove_thread_event_breakpoints): New.
9882 (thread_db_detach, thread_db_mourn): Use it.
9883
1e7fc18c
PA
98842010-05-01 Pedro Alves <pedro@codesourcery.com>
9885
9886 * linux-low.c (linux_enable_event_reporting): New.
9887 (linux_wait_for_event_1, handle_extended_wait): Use it.
9888
02fc4de7
PA
98892010-04-30 Pedro Alves <pedro@codesourcery.com>
9890
9891 * linux-low.c (linux_kill_one_lwp, linux_kill)
9892 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
9893 (send_sigstop): Take an lwp_info as parameter instead. Queue a
9894 SIGSTOP even if the LWP is stopped.
9895 (send_sigstop_callback): New.
9896 (stop_all_lwps): Use send_sigstop_callback instead.
9897 (linux_resume_one_thread): Adjust.
9898 (proceed_one_lwp): Still proceed an LWP that the client has
9899 requested to stop, if we haven't reported it as stopped yet. Make
9900 sure that LWPs the client want stopped, have a pending SIGSTOP.
9901
bc3b5632
DE
99022010-04-26 Doug Evans <dje@google.com>
9903
ae1ada35
DE
9904 * server.c (handle_general_set): Make static.
9905
bc3b5632
DE
9906 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
9907 Print received char after testing for error/eof instead of before.
9908 (input_interrupt): Tweak comment.
9909
65730243
DE
99102010-04-23 Doug Evans <dje@google.com>
9911
9912 * server.c (start_inferior): Print inferior argv if --debug.
9913
a8ae7dc0
AR
99142010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
9915
9916 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
9917 * nto-x86-low.c: Include server.h
9918
1c07cc19
PM
99192010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
9920
9921 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
9922 be consistent with other sources of this directory.
9923 (init_registers_amd64): Correct name of source file of this function
9924 in the comment.
9925
e0a61e09
PM
99262010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9927
9928 * configure.srv (x86_64-*-mingw*): New configuration for Windows
9929 64-bit executables.
9930
54709339
PM
99312010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9932
9933 * win32-i386-low.c: Add 64-bit support.
9934 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
9935 (init_registers_amd64): Declare.
9936 (mappings): Add 64-bit version of array.
9937 (init_windows_x86): New function.
9938 (the_low_target): Change init_arch field to init_windows_x86.
9939
e8f0053d
PM
99402010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9941
9942 * win32-low.c: Adapt to support also 64-bit architecture.
9943 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
9944 (get_image_name): Use SIZE_T type for local variable `done'.
9945 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
9946 (toolhelp_get_dll_name): Idem.
9947 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
9948 Use uintptr_t typecast to avoid warning.
9949 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
9950 (handle_exception): Use phex_nz to avoid warning.
9951 (win32_wait): Remove unused local variable `process'.
9952
c481e77e
PM
99532010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9954
9955 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
9956 `amd64-avx.o'.
9957
12ea4b69
PM
99582010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
9959
9960 * configure.ac: Use `ws2_32' library for srv_mingw.
9961 * configure: Regenerate.
9962 * gdbreplay.c: Include winsock2.h instead of winsock.h.
9963 * remote-utils.c: Likewise.
9964
f6d1620c
L
99652010-04-17 H.J. Lu <hongjiu.lu@intel.com>
9966
9967 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
9968 if __x86_64__ is defined.
9969
8e642873
PM
99702010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
9971
9972 * configure: Regenerate.
9973
711e434b
PM
99742010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
9975
9976 * server.c (handle_query): Handle 'qGetTIBAddr' query.
9977 * target.h (target_ops): New get_tib_address field.
9978 * win32-low.h (win32_thread_info): Add thread_local_base field.
9979 * win32-low.c (child_add_thread): Add tlb argument.
9980 Set thread_local_base field to TLB.
9981 (get_child_debug_event): Adapt to child_add_thread change.
9982 (win32_get_tib_address): New function.
9983 (win32_target_ops): Set get_tib_address field to
9984 win32_get_tib_address.
9985 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
9986
505106cd
PA
99872010-04-12 Pedro Alves <pedro@codesourcery.com>
9988
505106cd
PA
9989 * linux-low.c (linux_mourn): Also remove the process.
9990 * server.c (handle_target_event): Don't remove the process here.
9991 * nto-low.c (nto_mourn): New.
9992 (nto_target_ops): Install it.
9993 * spu-low.c (spu_mourn): New.
9994 (spu_target_ops): Install it.
9995 * win32-low.c (win32_mourn): New.
9996 (win32_target_ops): Install it.
9997
e8470a06
PA
99982010-04-12 Pedro Alves <pedro@codesourcery.com>
9999
10000 * server.h (buffer_xml_printf): Remove redundant `;'.
10001
45ba0d02
PA
100022010-04-12 Pedro Alves <pedro@codesourcery.com>
10003
10004 * regcache.c (set_register_cache): Invalidate regcaches before
10005 changing the register cache layout.
10006 (regcache_invalidate_one): Allow a NULL regcache.
10007 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
10008 regcaches before changing the register cache layout or the target
10009 regsets.
10010
59e04013
L
100112010-04-12 H.J. Lu <hongjiu.lu@intel.com>
10012
10013 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
10014 variable warning on Linux/x86-64.
10015
8336d594
PA
100162010-04-11 Pedro Alves <pedro@codesourcery.com>
10017
10018 GDBserver disconnected tracing support.
10019
10020 * linux-low.c (linux_remove_process): Delete.
10021 (add_lwp): Don't set last_resume_kind here.
10022 (linux_kill): Use `mourn'.
10023 (linux_detach): Use `thread_db_detach', and `mourn'.
10024 (linux_mourn): New.
10025 (linux_attach_lwp_1): Adjust comment.
10026 (linux_attach): last_resume_kind moved the thread_info; adjust.
10027 (status_pending_p_callback): Adjust.
10028 (linux_wait_for_event_1): Adjust.
10029 (count_events_callback, select_singlestep_lwp_callback)
10030 (select_event_lwp_callback, cancel_breakpoints_callback)
10031 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
10032 (proceed_one_lwp): Adjust.
10033 (linux_async): Add debug output.
10034 (linux_thread_stopped): New.
10035 (linux_pause_all): New.
10036 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
10037 linux_pause_all.
10038 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
10039 (thread_db_free): Delete declaration.
10040 (thread_db_detach, thread_db_mourn): Declare.
10041 * thread-db.c (thread_db_init): Use thread_db_mourn.
10042 (thread_db_free): Delete, split in two.
10043 (disable_thread_event_reporting): New.
10044 (thread_db_detach): New.
10045 (thread_db_mourn): New.
10046
10047 * server.h (struct thread_info) <last_resume_kind>: New field.
10048 <attached>: Add comment.
10049 <gdb_detached>: New field.
10050 (handler_func): Change return type to int.
10051 (handle_serial_event, handle_target_event): Ditto.
10052 (gdb_connected): Declare.
10053 (tracing): Delete.
10054 (disconnected_tracing): Declare.
10055 (stop_tracing): Declare.
10056
10057 * server.c (handle_query) <qSupported>: Report support for
10058 disconnected tracing.
10059 (queue_stop_reply_callback): Account for running threads.
10060 (gdb_wants_thread_stopped): New.
10061 (gdb_wants_all_threads_stopped): New.
10062 (gdb_reattached_process): New.
10063 (handle_status): Clear the `gdb_detached' flag of all processes.
10064 In all-stop, stop all threads.
10065 (main): Be sure to leave tfind mode. Handle disconnected tracing.
10066 (process_serial_event): If the remote connection breaks, or if an
10067 exit was forced with "monitor exit", force an event loop exit.
10068 Handle disconnected tracing on detach.
10069 (handle_serial_event): Adjust.
10070 (handle_target_event): If GDB isn't connected, forward events back
10071 to the inferior, unless the last process exited, in which case,
10072 exit gdbserver. Adjust interface.
10073
10074 * remote-utils.c (remote_open): Don't block in accept. Instead
10075 register an event loop source on the listen socket file
10076 descriptor. Refactor bits into ...
10077 (listen_desc): ... this new global.
10078 (gdb_connected): ... this new function.
10079 (enable_async_notification): ... this new function.
10080 (handle_accept_event): ... this new function.
10081 (remote_close): Clear remote_desc.
10082
10083 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
10084
10085 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
10086 New fields.
10087 (mourn_inferior): Define.
10088 (target_process_qsupported): Avoid the dangling else problem.
10089 (thread_stopped): Define.
10090 (pause_all): Define.
10091 (target_waitstatus_to_string): Declare.
10092 * target.c (target_waitstatus_to_string): New.
10093
10094 * tracepoint.c (tracing): Make extern.
10095 (disconnected_tracing): New.
10096 (stop_tracing): Make extern. Handle tracing stops due to GDB
10097 disconnecting.
10098 (cmd_qtdisconnected): New.
10099 (cmd_qtstatus): Report disconnected tracing status in trace reply.
10100 (handle_tracepoint_general_set): Handle QTDisconnected.
10101
10102 * event-loop.c (event_handler_func): Change return type to int.
10103 (process_event): Bail out if the event handler wants the event
10104 loop to stop.
10105 (handle_file_event): Ditto.
10106 (start_event_loop): Bail out if the event handler wants the event
10107 loop to stop.
10108
10109 * nto-low.c (nto_target_ops): Adjust.
10110 * spu-low.c (spu_wait): Don't remove the process here.
10111 (spu_target_ops): Adjust.
10112 * win32-low.c (win32_wait): Don't remove the process here.
10113 (win32_target_ops): Adjust.
10114
5d267c4c
PA
101152010-04-11 Pedro Alves <pedro@codesourcery.com>
10116
10117 * regcache.c (realloc_register_cache): Invalidate inferior's
10118 regcache before recreating it.
10119
623ccd72
PA
101202010-04-09 Pedro Alves <pedro@codesourcery.com>
10121
10122 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
10123
219f2f23
PA
101242010-04-09 Stan Shebs <stan@codesourcery.com>
10125 Pedro Alves <pedro@codesourcery.com>
10126
10127 * server.h (LONGEST): New.
10128 (struct thread_info) <while_stepping>: New field.
10129 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
10130 Declare.
10131 (initialize_tracepoint, handle_tracepoint_general_set)
10132 (handle_tracepoint_query, tracepoint_finished_step)
10133 (tracepoint_was_hit, release_while_stepping_state_list):
10134 (current_traceframe): Declare.
10135 * server.c (handle_general_set): Handle tracepoint packets.
10136 (read_memory): New.
10137 (write_memory): New.
10138 (handle_search_memory_1): Use read_memory.
10139 (handle_query): Report support for conditional tracepoints, trace
10140 state variables, and tracepoint sources. Handle tracepoint
10141 queries.
10142 (main): Initialize the tracepoints module.
10143 (process_serial_event): Handle traceframe reads/writes.
10144
10145 * linux-low.c (handle_tracepoints): New.
10146 (linux_wait_1): Call it.
10147 (linux_resume_one_lwp): Handle while-stepping.
10148 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
10149 (linux_target_ops): Install them.
10150 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
10151 New field.
10152 * linux-x86-low.c (x86_supports_tracepoints): New.
10153 (the_low_target). Install it.
10154
10155 * mem-break.h (delete_breakpoint): Declare.
10156 * mem-break.c (delete_breakpoint): Make external.
10157
10158 * target.h (struct target_ops): Add `supports_tracepoints',
10159 `read_pc', and `write_pc' fields.
10160 (target_supports_tracepoints): Define.
10161 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
10162 (phex_nz): New.
10163
10164 * regcache.h (struct regcache) <registers_owned>: New field.
10165 (init_register_cache, regcache_cpy): Declare.
10166 (regcache_read_pc, regcache_write_pc): Declare.
10167 (register_cache_size): Declare.
10168 (supply_regblock): Declare.
10169 * regcache.c (init_register_cache): New.
10170 (new_register_cache): Use it.
10171 (regcache_cpy): New.
10172 (register_cache_size): New.
10173 (supply_regblock): New.
10174 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 10175
219f2f23
PA
10176 * tracepoint.c: New.
10177
10178 * Makefile.in (OBS): Add tracepoint.o.
10179 (tracepoint.o): New rule.
10180
3a13a53b
L
101812010-04-08 H.J. Lu <hongjiu.lu@intel.com>
10182
10183 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
10184 (i386-mmx.o): New.
10185 (i386-mmx.c): Likewise.
10186 (i386-mmx-linux.o): Likewise.
10187 (i386-mmx-linux.c): Likewise.
10188
10189 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
10190 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
10191 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
10192 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
10193
10194 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
10195 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
10196 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
10197
1570b33e
L
101982010-04-07 H.J. Lu <hongjiu.lu@intel.com>
10199
10200 * Makefile.in (clean): Updated.
10201 (i386-avx.o): New.
10202 (i386-avx.c): Likewise.
10203 (i386-avx-linux.o): Likewise.
10204 (i386-avx-linux.c): Likewise.
10205 (amd64-avx.o): Likewise.
10206 (amd64-avx.c): Likewise.
10207 (amd64-avx-linux.o): Likewise.
10208 (amd64-avx-linux.c): Likewise.
10209
10210 * configure.srv (srv_i386_regobj): Add i386-avx.o.
10211 (srv_i386_linux_regobj): Add i386-avx-linux.o.
10212 (srv_amd64_regobj): Add amd64-avx.o.
10213 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
10214 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
10215 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
10216 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
10217 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
10218 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
10219 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
10220
10221 * i387-fp.c: Include "i386-xstate.h".
10222 (i387_xsave): New.
10223 (i387_cache_to_xsave): Likewise.
10224 (i387_xsave_to_cache): Likewise.
10225 (x86_xcr0): Likewise.
10226
10227 * i387-fp.h (i387_cache_to_xsave): Likewise.
10228 (i387_xsave_to_cache): Likewise.
10229 (x86_xcr0): Likewise.
10230
10231 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
10232 * linux-crisv32-low.c (target_regsets): Likewise.
10233 * linux-m68k-low.c (target_regsets): Likewise.
10234 * linux-mips-low.c (target_regsets): Likewise.
10235 * linux-ppc-low.c (target_regsets): Likewise.
10236 * linux-s390-low.c (target_regsets): Likewise.
10237 * linux-sh-low.c (target_regsets): Likewise.
10238 * linux-sparc-low.c (target_regsets): Likewise.
10239 * linux-xtensa-low.c (target_regsets): Likewise.
10240
10241 * linux-low.c: Include <sys/uio.h>.
10242 (regsets_fetch_inferior_registers): Support nt_type.
10243 (regsets_store_inferior_registers): Likewise.
10244 (linux_process_qsupported): New.
10245 (linux_target_ops): Add linux_process_qsupported.
10246
10247 * linux-low.h (regset_info): Add nt_type.
10248 (linux_target_ops): Add process_qsupported.
10249
10250 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
10251 and <sys/uio.h>.
10252 (init_registers_i386_avx_linux): New.
10253 (init_registers_amd64_avx_linux): Likewise.
10254 (xmltarget_i386_linux_no_xml): Likewise.
10255 (xmltarget_amd64_linux_no_xml): Likewise.
10256 (PTRACE_GETREGSET): Likewise.
10257 (PTRACE_SETREGSET): Likewise.
10258 (x86_fill_xstateregset): Likewise.
10259 (x86_store_xstateregset): Likewise.
10260 (use_xml): Likewise.
10261 (x86_linux_update_xmltarget): Likewise.
10262 (x86_linux_process_qsupported): Likewise.
10263 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
10264 (x86_arch_setup): Don't call init_registers_amd64_linux nor
10265 init_registers_i386_linux here. Call
10266 x86_linux_update_xmltarget.
10267 (the_low_target): Add x86_linux_process_qsupported.
10268
10269 * server.c (handle_query): Call target_process_qsupported.
10270
10271 * target.h (target_ops): Add process_qsupported.
10272 (target_process_qsupported): New.
10273
fc7238bb
PA
102742010-04-03 Pedro Alves <pedro@codesourcery.com>
10275
10276 * inferiors.c (add_thread): Set last_status kind to
10277 TARGET_WAITKIND_IGNORE.
10278 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
10279 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
10280 (linux_wait_1): Move `thread' local definition to block that uses
10281 it. Don't NULL initialize `event_child'.
10282 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
10283 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
10284 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
10285
bdabb078
PA
102862010-04-01 Pedro Alves <pedro@codesourcery.com>
10287
10288 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
10289 an extended waitstatus, or by a watchpoint.
10290 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
10291 thread was stepping or has been stopped by a watchpoint.
10292
d3bbe7a0
PA
102932010-04-01 Pedro Alves <pedro@codesourcery.com>
10294
10295 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
10296 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
10297 of another, then delete the previous, and validate all
10298 breakpoints.
10299 (validate_inserted_breakpoint): New.
10300 (delete_disabled_breakpoints): New.
10301 (validate_breakpoints): New.
10302 (check_mem_read): Validate breakpoints before trusting their
10303 shadow. Delete disabled breakpoints.
10304 (check_mem_write): Validate breakpoints before trusting they
10305 should be inserted. Delete disabled breakpoints.
10306 * mem-break.h (validate_breakpoints):
10307 * server.c (handle_query): Validate breakpoints when we see a
10308 qSymbol query.
10309
8b07ae33
PA
103102010-04-01 Pedro Alves <pedro@codesourcery.com>
10311
10312 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
10313 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
10314 if we could tell there's a GDB breakpoint at stop_pc.
10315 (need_step_over_p): Don't do a step over if we find a GDB
10316 breakpoint at the resume PC.
10317
10318 * mem-break.c (struct raw_breakpoint): New.
10319 (enum bkpt_type): New type `gdb_breakpoint'.
10320 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
10321 fields. New field `raw'.
10322 (find_raw_breakpoint_at): New.
10323 (set_raw_breakpoint_at): Handle refcounting. Create a raw
10324 breakpoint instead.
10325 (set_breakpoint_at): Adjust.
10326 (delete_raw_breakpoint): New.
10327 (release_breakpoint): New.
10328 (delete_breakpoint): Rename to...
10329 (delete_breakpoint_1): ... this. Add proc parameter. Use
10330 release_breakpoint. Return ENOENT.
10331 (delete_breakpoint): Reimplement.
10332 (find_breakpoint_at): Delete.
10333 (find_gdb_breakpoint_at): New.
10334 (delete_breakpoint_at): Delete.
10335 (set_gdb_breakpoint_at): New.
10336 (delete_gdb_breakpoint_at): New.
10337 (gdb_breakpoint_here): New.
10338 (set_reinsert_breakpoint): Use release_breakpoint.
10339 (uninsert_breakpoint): Rename to ...
10340 (uninsert_raw_breakpoint): ... this.
10341 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
10342 (reinsert_raw_breakpoint): Change parameter type to
10343 raw_breakpoint.
10344 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
10345 instead.
10346 (check_breakpoints): Adjust. Use release_breakpoint.
10347 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
10348 (breakpoint_inserted_here): Ditto.
10349 (check_mem_read): Adjust to iterate over raw breakpoints instead.
10350 Don't trust the breakpoint's shadow if it is not inserted.
10351 (check_mem_write): Adjust to iterate over raw breakpoints instead.
10352 (delete_all_breakpoints): Adjust.
10353 (free_all_breakpoints): Mark all breakpoints as uninserted, and
10354 use delete_breakpoint_1.
10355
10356 * mem-break.h (breakpoints_supported): Delete declaration.
10357 (set_gdb_breakpoint_at): Declare.
10358 (gdb_breakpoint_here): Declare.
10359 (delete_breakpoint_at): Delete.
10360 (delete_gdb_breakpoint_at): Declare.
10361
10362 * server.h (struct raw_breakpoint): Forward declare.
10363 (struct process_info): New field `raw_breakpoints'.
10364
10365 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
10366 breakpoints.
10367
6bf5e0ba
PA
103682010-03-24 Pedro Alves <pedro@codesourcery.com>
10369
10370 * linux-low.c (status_pending_p_callback): Fix comment.
10371 (linux_wait_for_event_1): Move most of the internal breakpoint
10372 handling from here...
10373 (linux_wait_1): ... to here.
10374 (count_events_callback): New.
10375 (select_singlestep_lwp_callback): New.
10376 (select_event_lwp_callback): New.
10377 (cancel_breakpoints_callback): New.
10378 (select_event_lwp): New.
10379 (linux_wait_1): Simplify internal breakpoint handling. Give equal
10380 priority to all LWPs that have had events that should be reported
10381 to the client. Cancel breakpoints when about to reporting the
10382 event to the client, not while stopping lwps. No longer cancel
10383 finished single-steps here.
10384 (cancel_finished_single_step): Delete.
10385 (cancel_finished_single_steps): Delete.
10386
414a389f
PA
103872010-03-24 Pedro Alves <pedro@codesourcery.com>
10388
10389 * mem-break.c (enum bkpt_type): New.
10390 (struct breakpoint): New field `type'.
10391 (set_breakpoint_at): Change return type to struct breakpoint
10392 pointer. Set type to `other_breakpoint' by default.
10393 (delete_breakpoint): Rewrite, supporting more than one breakpoint
10394 in the breakpoint list.
10395 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
10396 (reinsert_breakpoint): Rename to ...
10397 (reinsert_raw_breakpoint): ... this.
10398 (reinsert_breakpoints_at): Adjust.
10399 * mem-break.h (struct breakpoint): Declare.
10400 (set_breakpoint_at): Change return type to struct breakpoint
10401 pointer.
10402
2280c721
PA
104032010-03-24 Pedro Alves <pedro@codesourcery.com>
10404
10405 * server.c (handle_query): Assign, not compare.
10406
d50171e4
PA
104072010-03-24 Pedro Alves <pedro@codesourcery.com>
10408
10409 Teach linux gdbserver to step-over-breakpoints.
10410
10411 * linux-low.c (can_hardware_single_step): New.
10412 (supports_breakpoints): New.
10413 (handle_extended_wait): If stopping threads, read the stop pc of
10414 the new cloned LWP.
10415 (get_pc): New.
10416 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
10417 low target doesn't support retrieving the PC.
10418 (add_lwp): Set last_resume_kind to resume_continue.
10419 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
10420 (linux_attach): Don't clear stop_expected. Set the lwp's
10421 last_resume_kind to resume_stop.
10422 (linux_detach_one_lwp): Don't check for removed breakpoints.
10423 (check_removed_breakpoint): Delete.
10424 (status_pending_p): Rename to ...
10425 (status_pending_p_callback): ... this. Don't check for removed
10426 breakpoints. Don't consider threads that are stopped from GDB's
10427 perspective.
10428 (linux_wait_for_lwp): Always read the stop_pc here.
10429 (cancel_breakpoint): New.
10430 (step_over_bkpt): New global.
10431 (linux_wait_for_event_1): Implement stepping over breakpoints.
10432 (gdb_wants_lwp_stopped): New.
10433 (gdb_wants_all_stopped): New.
10434 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
10435 single-step traps here. Store the thread's last reported target
10436 wait status.
10437 (send_sigstop): Don't clear stop_expected. Always set it,
10438 instead.
10439 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
10440 (cancel_finished_single_step): New.
10441 (cancel_finished_single_steps): New.
10442 (wait_for_sigstop): Don't cancel finished single-step traps here.
10443 (linux_resume_one_lwp): Don't check for removed breakpoints.
10444 Don't set `step' on non-hardware step archs.
10445 (linux_set_resume_request): Ignore resume_stop requests if already
10446 stopping or stopped. Set the lwp's last_resume_kind.
10447 (resume_status_pending_p): Don't check for removed breakpoints.
10448 (need_step_over_p): New.
10449 (start_step_over): New.
10450 (finish_step_over): New.
10451 (linux_resume_one_thread): Always queue a sigstop for resume_stop
10452 requests. Clear the thread's last reported target waitstatus.
10453 Don't use the `suspended' flag. Don't consider pending breakpoints.
10454 (linux_resume): Start a step-over if necessary.
10455 (proceed_one_lwp): New.
10456 (proceed_all_lwps): New.
10457 (unstop_all_lwps): New.
10458 * linux-low.h (struct lwp_info): Rewrite comment for the
10459 `suspended' flag. Add the `stop_pc' field. Delete the
10460 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
10461 Add `'last_resume_kind' and `need_step_over' fields.
10462 * inferiors.c (struct thread_info): Delete, moved elsewhere.
10463 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
10464 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
10465 (set_raw_breakpoint_at): New.
10466 (set_breakpoint_at): Rewrite to use it.
10467 (reinsert_breakpoint_handler): Delete.
10468 (set_reinsert_breakpoint): New.
10469 (reinsert_breakpoint_by_bp): Delete.
10470 (delete_reinsert_breakpoints): New.
10471 (uninsert_breakpoint): Rewrite.
10472 (uninsert_breakpoints_at): New.
10473 (reinsert_breakpoint): Rewrite.
10474 (reinsert_breakpoints_at): New.
10475 (check_breakpoints): Rewrite.
10476 (breakpoint_here): New.
10477 (breakpoint_inserted_here): New.
10478 (check_mem_read): Adjust.
10479 * mem-break.h (breakpoints_supported, breakpoint_here)
10480 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
10481 (reinsert_breakpoint_by_bp): Delete declaration.
10482 (delete_reinsert_breakpoints): Declare.
10483 (reinsert_breakpoint): Delete declaration.
10484 (reinsert_breakpoints_at): Declare.
10485 (uninsert_breakpoint): Delete declaration.
10486 (uninsert_breakpoints_at): Declare.
10487 (check_breakpoints): Adjust prototype.
10488 * server.h: Adjust include order.
10489 (struct thread_info): Declare here. Add a `last_status' field.
10490
30ba68cb
MS
104912010-03-23 Michael Snyder <msnyder@vmware.com>
10492
10493 * server.c (crc32): New function.
10494 (handle_query): Add handling for 'qCRC:' request.
10495
b9a881c2
PA
104962010-03-23 Pedro Alves <pedro@codesourcery.com>
10497
10498 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
10499 lwp had been stopped by a watchpoint.
10500
e92d13d5
PA
105012010-03-16 Pedro Alves <pedro@codesourcery.com>
10502
10503 * server.h (internal_error): Declare.
10504 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
10505 * utils.c (internal_error): New function.
10506
64daa791
AS
105072010-03-15 Andreas Schwab <schwab@redhat.com>
10508
10509 * configure.srv: Fix typo setting srv_regobj.
10510
f52cd8cd
PA
105112010-03-15 Pedro Alves <pedro@codesourcery.com>
10512
10513 * linux-low.c (fetch_register): Avoid passing a non string literal
10514 format to `error'.
10515 (usr_store_inferior_registers): Ditto.
10516
93ae6fdc
PA
105172010-03-14 Pedro Alves <pedro@codesourcery.com>
10518
10519 * linux-low.c (linux_write_memory): Bail out early if peeking
10520 memory failed.
10521
c3adc08c
PA
105222010-03-14 Pedro Alves <pedro@codesourcery.com>
10523
10524 * linux-low.h (struct lwp_info): New fields
10525 `stopped_by_watchpoint' and `stopped_data_address'.
10526 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
10527 here, and cache them in the lwp object.
10528 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
10529 directly.
10530 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
10531 field.
10532 (linux_stopped_by_watchpoint): Rewrite.
10533 (linux_stopped_data_address): Rewrite.
10534
bce522a2
PA
105352010-03-06 Simo Melenius <simo.melenius@iki.fi>
10536
10537 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
10538 switching the current inferior, not before.
10539
90884b2b
L
105402010-03-01 H.J. Lu <hongjiu.lu@intel.com>
10541
10542 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
10543 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
10544 i386-linux.c and amd64-linux.c.
10545 (reg-i386.o): Removed.
10546 (reg-i386.c): Likewise.
10547 (reg-i386-linux.o): Likewise.
10548 (reg-i386-linux.c): Likewise.
10549 (reg-x86-64.o): Likewise.
10550 (reg-x86-64.c): Likewise.
10551 (reg-x86-64-linux.o): Likewise.
10552 (reg-x86-64-linux.c): Likewise.
10553 (i386.o): New.
10554 (i386.c): Likewise.
10555 (i386-linux.o): Likewise.
10556 (i386-linux.c): Likewise.
10557 (amd64.o): Likewise.
10558 (amd64.c): Likewise.
10559 (amd64-linux.o): Likewise.
10560 (amd64-linux.c): Likewise.
10561
10562 * configure.srv (srv_i386_regobj): New.
10563 (srv_i386_linux_regobj): Likewise.
10564 (srv_amd64_regobj): Likewise.
10565 (srv_amd64_linux_regobj): Likewise.
10566 (srv_i386_32bit_xmlfiles): Likewise.
10567 (srv_i386_64bit_xmlfiles): Likewise.
10568 (srv_i386_xmlfiles): Likewise.
10569 (srv_amd64_xmlfiles): Likewise.
10570 (srv_i386_linux_xmlfiles): Likewise.
10571 (srv_amd64_linux_xmlfiles): Likewise.
10572 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
10573 srv_xmlfiles to $srv_i386_xmlfiles.
10574 (i[34567]86-*-mingw32ce*): Likewise.
10575 (i[34567]86-*-mingw*): Likewise.
10576 (i[34567]86-*-nto*): Likewise.
10577 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
10578 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
10579 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
10580 (x86_64-*-linux*): Likewise.
10581
10582 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
10583 (init_registers_amd64_linux): New.
10584 (x86_arch_setup): Replace init_registers_x86_64_linux with
10585 init_registers_amd64_linux.
10586
193f13e6
MK
105872010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
10588
10589 * configure.ac: Check for libdl. If it is not available link against
10590 static libthread_db.
10591 * configure: Regenerate.
10592
85d721b8
PA
105932010-02-22 Pedro Alves <pedro@codesourcery.com>
10594
10595 PR9605
10596
10597 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
10598 handing a read watchpoint.
10599 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
10600
6076632b
DE
106012010-02-12 Doug Evans <dje@google.com>
10602
10603 * linux-low.c (linux_supports_tracefork_flag): Document.
10604 (linux_look_up_symbols): Add comment.
10605
3327ccf7
L
106062010-02-03 H.J. Lu <hongjiu.lu@intel.com>
10607
10608 * regcache.c (supply_register): Clear regcache if buf is NULL.
10609
0718675c 106102010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 10611 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
10612
10613 * inferiors.c (find_inferior): Add function documentation.
10614 (unloaded_dll): Handle the case where the unloaded dll has not
10615 been previously registered in the dll list.
10616
177321bd
DJ
106172010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10618
10619 * linux-arm-low.c (thumb_breakpoint_len): Delete.
10620 (thumb2_breakpoint): New.
10621 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
10622
2b009048
DJ
106232010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10624
10625 * linux-low.c (get_stop_pc): Check for SIGTRAP.
10626 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
10627 breakpoints.
10628
3be029c7
PA
106292010-01-21 Pedro Alves <pedro@codesourcery.com>
10630
10631 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
10632
18f5de3b
JK
106332010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10634
10635 * linux-s390-low.c (s390_collect_ptrace_register)
10636 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
10637
3743bb4f
DE
106382010-01-21 Doug Evans <dje@google.com>
10639
14ce3065
DE
10640 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
10641 (PTRACE_ARG4_TYPE): New macro.
10642 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
10643 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
10644 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
10645 (usr_store_inferior_registers): Ditto.
10646 (linux_read_memory, linux_write_memory): Ditto.
10647 (linux_test_for_tracefork): Ditto.
10648
3743bb4f
DE
10649 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
10650 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
10651
8b315be5
PA
106522010-01-21 Pedro Alves <pedro@codesourcery.com>
10653
10654 * proc-service.c (ps_lgetregs): Don't refetch registers from the
10655 target.
10656
85492558
PA
106572010-01-21 Pedro Alves <pedro@codesourcery.com>
10658
10659 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
10660 prototype to take a regcache. Adjust.
10661
442ea881
PA
106622010-01-20 Pedro Alves <pedro@codesourcery.com>
10663
10664 * regcache.h (struct thread_info): Forward declare.
10665 (struct regcache): New.
10666 (new_register_cache): Adjust prototype.
10667 (get_thread_regcache): Declare.
10668 (free_register_cache): Adjust prototype.
10669 (registers_to_string, registers_from_string): Ditto.
10670 (supply_register, supply_register_by_name, collect_register)
10671 (collect_register_as_string, collect_register_by_name): Ditto.
10672 * regcache.c (struct inferior_regcache_data): Delete.
10673 (get_regcache): Rename to ...
10674 (get_thread_regcache): ... this. Adjust. Switch inferior before
10675 fetching registers.
10676 (regcache_invalidate_one): Adjust.
10677 (regcache_invalidate): Fix prototype.
10678 (new_register_cache): Return the new register cache.
10679 (free_register_cache): Change prototype.
10680 (realloc_register_cache): Adjust.
10681 (registers_to_string): Change prototype to take a regcache. Adjust.
10682 (registers_from_string): Ditto.
10683 (register_data): Ditto.
10684 (supply_register): Ditto.
10685 (supply_register_by_name): Ditto.
10686 (collect_register): Ditto.
10687 (collect_register_as_string): Ditto.
10688 (collect_register_by_name): Ditto.
10689 * server.c (process_serial_event): Adjust.
10690 * linux-low.h (regset_fill_func, regset_store_func): Change
10691 prototype.
10692 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
10693 Change prototype.
10694 * linux-low.c (get_stop_pc): Adjust.
10695 (check_removed_breakpoint): Adjust.
10696 (linux_wait_for_event): Adjust.
10697 (linux_resume_one_lwp): Adjust.
10698 (fetch_register): Add regcache parameter. Adjust.
10699 (usr_store_inferior_registers): Ditto.
10700 (regsets_fetch_inferior_registers): Ditto.
10701 (regsets_store_inferior_registers): Ditto.
10702 (linux_fetch_registers, linux_store_registers): Ditto.
10703 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
10704 regcache. Adjust.
43aaf8b6
PA
10705 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
10706 Ditto.
442ea881
PA
10707 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
10708 prototype to take a regcache.
10709 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
10710 * remote-utils.c (convert_ascii_to_int, outreg)
10711 (prepare_resume_reply): Change prototype to take a regcache.
10712 Adjust.
10713 * target.h (struct target_ops) <fetch_registers, store_registers>:
10714 Change prototype to take a regcache.
10715 (fetch_inferior_registers, store_inferior_registers): Change
10716 prototype to take a regcache. Adjust.
10717 * proc-service.c (ps_lgetregs): Adjust.
10718 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
10719 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
10720 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
10721 take a regcache. Adjust.
10722 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
10723 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
10724 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
10725 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
10726 * linux-cris-low.c (cris_get_pc, cris_set_pc)
10727 (cris_cannot_fetch_register):
10728 (cris_breakpoint_at): Change prototype to take a regcache.
10729 Adjust.
10730 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
10731 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
10732 to take a regcache. Adjust.
10733 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
10734 Adjust.
10735 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
10736 take a regcache. Adjust.
10737 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
10738 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
10739 (m68k_set_pc): Change prototype to take a regcache. Adjust.
10740 * linux-mips-low.c (mips_get_pc):
10741 (mips_set_pc): Change prototype to take a regcache. Adjust.
10742 (mips_reinsert_addr): Adjust.
10743 (mips_collect_register): Change prototype to take a regcache.
10744 Adjust.
10745 (mips_supply_register):
10746 (mips_collect_register_32bit, mips_supply_register_32bit)
10747 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10748 (mips_store_fpregset): Ditto.
43aaf8b6
PA
10749 * linux-ppc-low.c (ppc_supply_ptrace_register)
10750 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
10751 (parse_spufs_run): Adjust.
10752 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
10753 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
10754 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
10755 take a regcache. Adjust.
10756 * linux-s390-low.c (s390_collect_ptrace_register)
10757 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
10758 (s390_set_pc): Change prototype to take a regcache. Adjust.
10759 (s390_arch_setup): Adjust.
10760 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
10761 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
10762 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10763 (sparc_fill_gregset, sparc_store_gregset_from_stack)
10764 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
10765 regcache. Adjust.
10766 (sparc_breakpoint_at): Adjust.
10767 * linux-xtensa-low.c (xtensa_fill_gregset):
10768 (xtensa_store_gregset):
10769 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
10770 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
10771 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
10772 prototype to take a regcache. Adjust.
10773 * win32-arm-low.c (arm_fetch_inferior_register)
10774 (arm_store_inferior_register): Change prototype to take a
10775 regcache. Adjust.
10776 * win32-i386-low.c (i386_fetch_inferior_register)
10777 (i386_store_inferior_register): Change prototype to take a
10778 regcache. Adjust.
10779 * win32-low.c (child_fetch_inferior_registers)
10780 (child_store_inferior_registers): Change prototype to take a
10781 regcache. Adjust.
10782 (win32_wait): Adjust.
10783 (win32_fetch_inferior_registers): Change prototype to take a
10784 regcache. Adjust.
10785 (win32_store_inferior_registers): Adjust.
10786 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
10787 store_inferior_register>: Change prototype to take a regcache.
10788
60c3d7b0
DE
107892010-01-20 Doug Evans <dje@google.com>
10790
10791 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
10792 #ifdef.
10793 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 10794 (W_STOPCODE): Provide definition if missing.
60c3d7b0 10795
dc146f7c
VP
107962010-01-13 Vladimir Prus <vladimir@codesourcery.com>
10797
10798 * linux-low.c (linux_core_of_thread): New.
10799 (compare_ints, show_process, list_threads): New.
10800 (linux_qxfer_osdata): Report threads and cores.
10801 (linux_target_op): Register linux_core_of_thread.
10802 * remote-utils.c (prepare_resume_reply): Report the core.
10803 (buffer_xml_printf): Support %d specifier.
10804 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
10805 New.
10806 (handle_query): Handle qXfer:threads. Announce availability
10807 thereof.
10808 * target.h (struct target_ops): New field core_of_thread.
10809
7803799a
UW
108102010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
10811
10812 * Makefile.in (clean): Remove new generated files.
10813 (reg-s390.o, reg-s390.c): Remove rules.
10814 (reg-s390x.o, reg-s390x.c): Likewise.
10815 (s390-linux32.o, s390-linux32.c): Add rules.
10816 (s390-linux64.o, s390-linux64.c): Likewise.
10817 (s390x-linux64.o, s390x-linux64.c): Likewise.
10818 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
10819 * linux-s390-low.c: Include <elf.h>.
10820 (HWCAP_S390_HIGH_GPRS): Define if undefined.
10821 (init_registers_s390): Remove prototype.
10822 (init_registers_s390x): Likewise.
10823 (init_registers_s390_linux32): Add prototype.
10824 (init_registers_s390_linux64): Likewise.
10825 (init_registers_s390x_linux64): Likewise.
10826 (s390_num_regs_3264): New define.
10827 (s390_regmap_3264): New global variable.
10828 (s390_cannot_fetch_register): Remove obsolete check.
10829 (s390_cannot_store_register): Likewise.
10830 (s390_collect_ptrace_register): Handle upper/lower register halves.
10831 (s390_supply_ptrace_register): Likewise.
10832 (s390_fill_gregset): Update to register number changes.
10833 (s390_get_hwcap): New routine.
10834 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
10835 Install appropriate regmap and register set.
10836
6e7ffa39
JB
108372010-01-01 Joel Brobecker <brobecker@adacore.com>
10838
10839 * server.c (gdbserver_version): Update copyright year to 2010.
10840 * gdbreplay.c (gdbreplay_version): Likewise.
10841
957f3f49
DE
108422009-12-28 Doug Evans <dje@google.com>
10843
10844 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
10845 elf/external.h. Include <elf.h> instead but only if necessary.
10846
ca5c370d
PA
108472009-12-28 Pedro Alves <pedro@codesourcery.com>
10848
10849 * linux-low.c (linux_remove_process): Remove `detaching'
10850 parameter. Don't release/detach from thread_db here.
10851 (linux_kill): Release/detach from thread_db here, ...
10852 (linux_detach): ... and here, before actually detaching.
10853 (linux_wait_1): ... and here, when a process exits.
10854 * thread-db.c (any_thread_of): New.
10855 (thread_db_free): Switch the current inferior to a thread of the
10856 passed in process.
10857
4ee62156
DE
108582009-12-21 Doug Evans <dje@google.com>
10859
d90e6a88
DE
10860 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
10861
c5f62d5f
DE
10862 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
10863 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
10864 warning ifndef __NR_tkill. Move setting of errno there too.
10865 Delete unnecessary resetting of errno after syscall.
10866 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
10867
10e86dd7
DE
10868 * configure.ac: Check for dladdr.
10869 * config.in: Regenerate.
10870 * configure: Regenerate.
10871 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
10872 (try_thread_db_load): Update.
10873
4ee62156
DE
10874 * linux-low.c (my_waitpid): Delete unnecessary prototype.
10875
00f515da
DE
108762009-12-18 Doug Evans <dje@google.com>
10877
e9464885
DE
10878 * event-loop.c: Include unistd.h if it exists.
10879
07d4f67e
DE
10880 * linux-low.c (my_waitpid): Move definition away from being in
10881 between linux_tracefork_child/linux_test_for_tracefork.
10882
00f515da
DE
10883 * gdb_proc_service.h (psaddr_t): Fix type.
10884 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
10885 signature to match glibc.
10886
1de1badb
DE
108872009-12-16 Doug Evans <dje@google.com>
10888
10889 * linux-low.c (linux_read_memory): Fix argument to read.
10890
aeeb81d1
PA
108912009-11-26 Pedro Alves <pedro@codesourcery.com>
10892
10893 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
10894 events, don't leave current_inferior pointing at null.
10895
10357975
PA
108962009-11-26 Pedro Alves <pedro@codesourcery.com>
10897
10898 * win32-low.c (LOG): Delete.
10899 (OUTMSG): Output to stderr.
10900 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
10901 on compile time LOG macro.
10902 (win32_wait): Fix debug output.
10903
cf6e3471
PA
109042009-11-26 Pedro Alves <pedro@codesourcery.com>
10905
10906 * win32-low.c (win32_add_one_solib): If the dll name is
10907 "ntdll.dll", prepend the system directory to the dll path.
10908
0c85e18e
MK
109092009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
10910
10911 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
10912
9ac544ce 109132009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 10914 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
10915
10916 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
10917 * configure.ac: Check for __mcoldfire__ and set
10918 gdb_cv_m68k_is_coldfire.
10919 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
10920 reg-cf.o and reg-m68k.o.
10921 * configure: Regenerated.
10922
fd7dd3e6
PA
109232009-11-16 Pedro Alves <pedro@codesourcery.com>
10924
10925 * linux-low.c (linux_remove_process): Add `detaching' parameter.
10926 Pass it to thread_db_free.
10927 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
10928 proper `detaching' argument to linux_remove_process.
10929 * linux-low.h (thread_db_free): Add `detaching' parameter.
10930 * thread-db.c (thread_db_init): Pass false as `detaching' argument
10931 to thread_db_free.
10932 (thread_db_free): Add `detaching' parameter. Only
10933 call td_ta_clear_event if detaching from process.
10934
75aa492e
MK
109352009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
10936
10937 * thread-db.c (thread_db_free): Fix typo.
10938
21e1bee4
PP
109392009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
10940
10941 PR gdb/10838
10942 * thread-db.c (thread_db_free): Call td_ta_clear_event.
10943
8838b45e
NS
109442009-11-03 Nathan Sidwell <nathan@codesourcery.com>
10945
10946 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
10947 with an i686 compiler.
10948 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
10949 needed.
10950 * configure: Rebuilt.
10951
8a35fb51
SL
109522009-10-29 Sandra Loosemore <sandra@codesourcery.com>
10953
10954 PR gdb/10783
10955
10956 * server.c (handle_search_memory_1): Correct read_addr initialization
10957 in loop for searching subsequent chunks.
10958
96f15937
PP
109592009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
10960
10961 * configure.ac: New --with-libthread-db option.
10962 * thread-db.c: Allow direct dependence on libthread_db.
10963 (thread_db_free): Adjust.
10964 * config.in: Regenerate.
10965 * configure: Likewise.
889bf7c5 10966
5f7d1694
PP
109672009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
10968
10969 PR gdb/10757
10970 * thread-db.c (attach_thread): New function.
10971 (maybe_attach_thread): Return success/failure.
10972 (find_new_threads_callback): Adjust.
889bf7c5
PA
10973 (thread_db_find_new_threads): Loop until no new threads.
10974
88e3b899
PA
109752009-10-13 Pedro Alves <pedro@codesourcery.com>
10976
10977 * proc-service.c (ps_lgetregs): Formatting.
10978
cdbfd419
PP
109792009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
10980
10981 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
10982 * configure.ac: Adjust.
10983 * linux-low.h (struct process_info_private): Move members to struct
10984 thread_db.
10985 (thread_db_free, thread_db_handle_monitor_command): New prototype.
10986 * linux-low.c (linux_remove_process): Adjust.
10987 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
10988 * server.c (handle_query): Move code ...
10989 (handle_monitor_command): ... here. New function.
10990 * target.h (struct target_ops): New member.
10991 * thread-db.c (struct thread_db): New.
10992 (libthread_db_search_path): New variable.
10993 (thread_db_create_event, thread_db_enable_reporting)
10994 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
10995 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
10996 (try_thread_db_load_1, dladdr_to_soname): New functions.
10997 (try_thread_db_load, thread_db_load_search): New functions.
10998 (thread_db_init): Search for libthread_db.
10999 (thread_db_free): New function.
11000 (thread_db_handle_monitor_command): Likewise.
11001 * config.in: Regenerate.
11002 * configure: Regenerate.
889bf7c5 11003
4168d2d6
UW
110042009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
11005
11006 * spu-low.c (spu_kill): Wait for inferior to terminate.
11007 Call clear_inferiors.
11008 (spu_detach): Call clear_inferiors.
11009
81ecdfbb
RW
110102009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11011
11012 * aclocal.m4: Regenerate.
11013 * config.in: Likewise.
11014 * configure: Likewise.
11015
0b9ff2c0
UW
110162009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11017
11018 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
11019 (parse_spufs_run): New function.
11020 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
11021 (ppc_breakpoint_at): Handle SPU breakpoints.
11022
efcbbd14
UW
110232009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11024
11025 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
11026 (SPUFS_MAGIC): Define.
11027 (spu_enumerate_spu_ids): New function.
11028 (linux_qxfer_spu): New function.
11029 (linux_target_ops): Install linux_qxfer_spu.
11030
f4d9bade
UW
110312009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11032
11033 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
11034 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
11035 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
11036 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
11037 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
11038 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
11039 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
11040 (init_registers_powerpc_cell32l): Add prototype.
11041 (init_registers_powerpc_cell64l): Likewise.
11042 (ppc_arch_setup): Detect Cell/B.E. architecture.
11043
96e946ca
RW
110442009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11045
11046 * Makefile.in (datarootdir): New variable.
11047
58d6951d
DJ
110482009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11049
11050 * linux-low.c (linux_write_memory): Update debugging output.
11051 * Makefile.in (clean): Add new descriptions.
11052 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
11053 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
11054 * configure.srv: Add new files for arm*-*-linux*.
11055 * linux-arm-low.c: Add new declarations.
11056 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
11057 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
11058 (HWCAP_VFPv3D16): New.
11059 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
11060 instead of __IWMMXT__.
11061 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
11062 (arm_arch_setup): New.
11063 (target_regsets): Remove #ifdef. Add VFP regset.
11064 (the_low_target): Use arm_arch_setup.
11065
12b42a12
DJ
110662009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11067
11068 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
11069 the main thread again.
11070
ac8c974e
AR
110712009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
11072
11073 Adding Neutrino gdbserver.
11074 * configure: Regenerated.
11075 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
11076 * configure.srv (i[34567]86-*-nto*): New target.
11077 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
11078 * remote-utils.c [__QNX__]: Include sys/iomgr.h
11079 (nto_comctrl) [__QNX__]: New function.
11080 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
11081
4424e0c3 110822009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
11083
11084 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
11085 srv_tgtobj.
11086
912cf4ba
PA
110872009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
11088 Pedro Alves <pedro@codesourcery.com>
11089
11090 * win32-i386-low.c (i386_get_thread_context): Handle systems that
11091 don't support CONTEXT_EXTENDED_REGISTERS.
11092 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
11093 (the_low_target): Install them.
11094 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
11095 failing with ERROR_PIPE_NOT_CONNECTED.
11096
aa5ca48f
DE
110972009-06-30 Doug Evans <dje@google.com>
11098 Pierre Muller <muller@ics.u-strasbg.fr>
11099
11100 Add h/w watchpoint support to x86-linux, win32-i386.
11101 * Makefile.in (SFILES): Add i386-low.c
11102 (i386_low_h): Define.
11103 (i386-low.o): Add dependencies.
11104 (linux-x86-low.o): Add i386-low.h dependency.
11105 (win32-i386-low.o): Ditto.
11106 * i386-low.c: New file.
11107 * i386-low.h: New file.
11108 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
11109 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
11110 * linux-low.c (linux_add_process): Initialize arch_private.
11111 (linux_remove_process): Free arch_private.
11112 (add_lwp): Initialize arch_private.
11113 (delete_lwp): Free arch_private.
11114 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
11115 provided.
11116 * linux-low.h (process_info_private): New member arch_private.
11117 (lwp_info): New member arch_private.
11118 (linux_target_ops): New members new_process, new_thread,
11119 prepare_to_resume.
11120 (ptid_of): New macro.
11121 * linux-x86-low.c: Include stddef.h, i386-low.h.
11122 (arch_process_info): New struct.
11123 (arch_lwp_info): New struct.
11124 (x86_linux_dr_get, x86_linux_dr_set): New functions.
11125 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11126 (i386_dr_low_get_status): New function.
11127 (x86_insert_point, x86_remove_point): New functions.
11128 (x86_stopped_by_watchpoint): New function.
11129 (x86_stopped_data_address): New function.
11130 (x86_linux_new_process, x86_linux_new_thread): New functions.
11131 (x86_linux_prepare_to_resume): New function.
11132 (the_low_target): Add entries for insert_point, remove_point,
11133 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
11134 prepare_to_resume.
11135 * server.c (debug_hw_points): New global.
11136 (monitor_show_help): Document set debug-hw-points.
11137 (handle_query): Process "set debug-hw-points".
11138 * server.h (debug_hw_points): Declare.
11139 (paddress): Declare.
11140 * utils.c (NUMCELLS, CELLSIZE): New macros.
11141 (get_sell, xsnprintf, paddress): New functions.
11142 * win32-arm-low.c (the_low_target): Add entries for insert_point,
11143 remove_point, stopped_by_watchpoint, stopped_data_address.
11144 * win32-i386-low.c: Include i386-low.h.
11145 (debug_reg_state): Replaces dr.
11146 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11147 (i386_dr_low_get_status): New function.
11148 (i386_insert_point, i386_remove_point): New functions.
11149 (i386_stopped_by_watchpoint): New function.
11150 (i386_stopped_data_address): New function.
11151 (i386_initial_stuff): Update.
11152 (get_thread_context,set_thread_context,i386_thread_added): Update.
11153 (the_low_target): Add entries for insert_point,
11154 remove_point, stopped_by_watchpoint, stopped_data_address.
11155 * win32-low.c (win32_insert_watchpoint): New function.
11156 (win32_remove_watchpoint): New function.
11157 (win32_stopped_by_watchpoint): New function.
11158 (win32_stopped_data_address): New function.
11159 (win32_target_ops): Add entries for insert_watchpoint,
11160 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
11161 * win32-low.h (win32_target_ops): New members insert_point,
11162 remove_point, stopped_by_watchpoint, stopped_data_address.
11163
d993e290
PA
111642009-06-25 Pedro Alves <pedro@codesourcery.com>
11165
11166 * server.c (process_serial_event): Re-return unsupported, not
11167 error, if the type isn't recognized. Re-allow supporting only
11168 insert or remove packets. Also call require_running for
11169 breakpoints. Add missing break statement to default case. Tidy.
11170 * target.h (struct target_ops): Rename insert_watchpoint to
11171 insert_point, and remove_watchpoint to remove_point.
11172
11173 * linux-low.h (struct linux_target_ops): Likewise.
11174 * linux-low.c (linux_insert_watchpoint): Rename to ...
11175 (linux_insert_point): ... this. Adjust.
11176 (linux_remove_watchpoint): Rename to ...
11177 (linux_remove_point): ... this. Adjust.
11178 (linux_target_ops): Adjust.
11179 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
11180 (cris_insert_point): ... this.
11181 (cris_remove_watchpoint): Rename to ...
11182 (cris_remove_point): ... this.
11183 (the_low_target): Adjust.
11184
0f54c268
PM
111852009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
11186
11187 * server.c (handle_v_kill): Pass signal_pid to
11188 kill_inferior if multi_process is zero.
11189
c6314022
AR
111902009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
11191
11192 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
11193 * target.h (target_ops): Comment for *_watchpoint to make it clear
11194 the functions can get types '0' and '1'.
11195
4463ce24
AR
111962009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
11197
11198 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
11199 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
11200 * regcache.c (get_regcache): Likewise.
11201 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
11202 * win32-low.c (child_fetch_inferior_registers): Remove check for
11203 regno 0.
11204
cf8fd78b
PA
112052009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
11206 Pedro Alves <pedro@codesourcery.com>
11207
11208 * target.h (struct target_ops) <supports_multi_process>: New
11209 callback.
11210 (target_supports_multi_process): New.
11211 * server.c (handle_query): Even if GDB reports support, only
11212 enable multi-process if the target also supports it. Report
11213 multi-process support only if the target backend supports it.
11214 * linux-low.c (linux_supports_multi_process): New function.
11215 (linux_target_ops): Install it as target_supports_multi_process
11216 callback.
11217
47c0c975
DE
112182009-05-24 Doug Evans <dje@google.com>
11219
e09875d4
DE
11220 Global renaming of find_thread_pid to find_thread_ptid.
11221 * server.h (find_thread_ptid): Renamed from find_thread_pid.
11222 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
11223 All callers updated.
11224
e27d73f6
DE
11225 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
11226 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
11227 directly.
11228
47c0c975
DE
11229 * linux-low.c (get_stop_pc): Print pc if debug_threads.
11230 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
11231 (linux_resume_one_lwp): Ditto.
11232
2acc282a
DE
112332009-05-23 Doug Evans <dje@google.com>
11234
11235 * linux-low.c (linux_resume_one_lwp): Change type of first arg
11236 from struct inferior_list_entry * to struct lwp_info *.
11237 All callers updated.
11238
9f1036c1
DE
112392009-05-13 Doug Evans <dje@google.com>
11240
11241 * linux-x86-low.c: Don't include assert.h.
11242 (x86_siginfo_fixup): Use fatal, not assert.
11243 (x86_arch_setup): Fix comment.
11244
d0722149
DE
112452009-05-12 Doug Evans <dje@google.com>
11246
11247 Biarch support for i386/amd64 gdbserver.
11248 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
11249 Add linux-x86-low.c.
11250 (linux-i386-low.o, linux-x86-64-low.o): Delete.
11251 (linux-x86-low.o): Add.
11252 * linux-x86-64-low.c: Delete.
11253 * linux-i386-low.c: Delete.
11254 * linux-x86-low.c: New file.
11255 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
11256 linux-x86-low.o.
11257 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
11258 linux-x86-low.o.
11259 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
11260 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
11261 (linux_child_pid_to_exec_file): New function.
11262 (elf_64_header_p, elf_64_file_p): New functions.
11263 (siginfo_fixup): New function.
11264 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
11265 give target a chance to convert layout.
11266 * linux-low.h (linux_target_ops): New member siginfo_fixup.
11267 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
11268
fdeb2a12
DE
112692009-05-07 Doug Evans <dje@google.com>
11270
11271 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
11272 (regsets_store_inferior_registers): Ditto.
11273
a6dbe5df
PA
112742009-05-06 Pedro Alves <pedro@codesourcery.com>
11275
11276 PR server/10048
11277
11278 * linux-low.c (must_set_ptrace_flags): Delete.
11279 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
11280 of the global.
11281 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
11282 `lwp->must_set_ptrace_flags' instead.
ba42693b 11283 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
11284 (linux_wait_1): ... not here.
11285
5091eb23
DE
112862009-04-30 Doug Evans <dje@google.com>
11287
9f767825
DE
11288 * inferiors.c (started_inferior_callback): New function.
11289 (attached_inferior_callback): New function.
11290 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
11291 * server.c (print_started_pid, print_attached_pid): New functions.
11292 (detach_or_kill_for_exit): New function.
11293 (main): Call it instead of for_each_inferior (kill_inferior_callback).
11294 * server.h (have_started_inferiors_p): Declare.
11295 (have_attached_inferiors_p): Declare.
11296
5091eb23
DE
11297 * inferiors.c (remove_process): Fix memory leak, free process.
11298 * linux-low.c (linux_remove_process): New function.
11299 (linux_kill): Call it instead of remove_process.
11300 (linux_detach, linux_wait_1): Ditto.
11301
155c8968
PA
113022009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
11303
11304 * configure.srv: Add x86 Windows CE target.
11305
7fe519cb
UW
113062009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11307
11308 * inferiors.c (get_thread_process): Make global.
11309 * server.h (get_thread_process): Add prototype.
11310 * thread-db.c (find_one_thread): Use get_thread_process
11311 instead of current_process.
11312 (thread_db_get_tls_address): Do not crash if called when
11313 thread layer is not yet initialized.
11314
5472f405
UW
113152009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11316
11317 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
11318 * spu-low.c (current_tid): Rename to ...
11319 (current_ptid): ... this.
11320 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
11321 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
11322 ptid_get_lwp (current_ptid) instead of current_tid.
11323 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
11324 instead of current_tid. Use find_process_pid to verify pid
11325 argument is valid. Pass proper argument to remove_process.
11326 (spu_thread_alive): Compare current_ptid instead of current_tid.
11327 (spu_resume): Likewise.
11328
55ac2b99
PA
113292009-04-02 Pedro Alves <pedro@codesourcery.com>
11330
11331 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
11332 variable.
11333
95954743
PA
113342009-04-01 Pedro Alves <pedro@codesourcery.com>
11335
11336 Implement the multiprocess extensions, and add linux multiprocess
11337 support.
11338
11339 * server.h (ULONGEST): Declare.
11340 (struct ptid, ptid_t): New.
11341 (minus_one_ptid, null_ptid): Declare.
11342 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11343 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
11344 (struct inferior_list_entry): Change `id' type from unsigned from
11345 to ptid_t.
11346 (struct sym_cache, struct breakpoint, struct
11347 process_info_private): Forward declare.
11348 (struct process_info): Declare.
11349 (current_process): Declare.
11350 (all_processes): Declare.
11351 (initialize_inferiors): Declare.
11352 (add_thread): Adjust to use ptid_t.
11353 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
11354 (add_process, remove_process, find_thread_pid): Declare.
11355 (find_inferior_id): Adjust to use ptid_t.
11356 (cont_thread, general_thread, step_thread): Change type to ptid_t.
11357 (multi_process): Declare.
11358 (push_event): Adjust to use ptid_t.
11359 (read_ptid, write_ptid): Declare.
11360 (prepare_resume_reply): Adjust to use ptid_t.
11361 (clear_symbol_cache): Declare.
11362 * inferiors.c (all_processes): New.
11363 (null_ptid, minus_one_ptid): New.
11364 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11365 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
11366 (add_thread): Change unsigned long to ptid. Remove gdb_id
11367 parameter. Adjust.
11368 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
11369 (gdb_id_to_thread): Rename to ...
11370 (find_thread_pid): ... this. Change unsigned long to ptid.
11371 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
11372 (loaded_dll, pull_pid_from_list): Adjust.
11373 (add_process, remove_process, find_process_pid)
11374 (get_thread_process, current_process, initialize_inferiors): New.
11375 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
11376 (struct target_waitstatus) <related_pid>: Ditto.
11377 (struct target_ops) <kill, detach>: Add `pid' argument. Change
11378 return type to int.
11379 (struct target_ops) <join>: Add `pid' argument.
11380 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
11381 (struct target_ops) <wait>: Add `ptid' field. Change return type
11382 to ptid.
11383 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
11384 (mywait): Add `ptid' argument. Change return type to ptid_t.
11385 (target_pid_to_str): Declare.
11386 * target.c (set_desired_inferior): Adjust to use ptids.
11387 (mywait): Add new `ptid' argument. Adjust.
11388 (target_pid_to_str): New.
11389 * mem-break.h (free_all_breakpoints): Declare.
11390 * mem-break.c (breakpoints): Delelete.
11391 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
11392 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
11393 to use per-process breakpoint list.
11394 (free_all_breakpoints): New.
11395 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
11396 (symbol_cache, all_symbols_looked_up): Delete.
11397 (hexchars): New.
11398 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
11399 read_ptid): New.
11400 (prepare_resume_reply): Change ptid argument's type from unsigned
11401 long to ptid_t. Adjust. Implement W;process and X;process.
11402 (free_sym_cache, clear_symbol_cache): New.
11403 (look_up_one_symbol): Adjust to per-process symbol cache. *
11404 * server.c (cont_thread, general_thread, step_thread): Change type
11405 to ptid_t.
11406 (attached): Delete.
11407 (multi_process): New.
11408 (last_ptid): Change type to ptid_t.
11409 (struct vstop_notif) <ptid>: Change type to ptid_t.
11410 (queue_stop_reply, push_event): Change `ptid' argument's type to
11411 ptid_t.
11412 (discard_queued_stop_replies): Add `pid' argument.
11413 (start_inferior): Adjust to use ptids. Adjust to mywait interface
11414 changes. Don't reference the `attached' global.
11415 (attach_inferior): Adjust to mywait interface changes.
11416 (handle_query): Adjust to use ptids. Parse GDB's qSupported
11417 features. Handle and report "multiprocess+". Handle
11418 "qAttached:PID".
11419 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
11420 changes.
11421 (handle_v_kill): New.
11422 (handle_v_stopped): Adjust to use target_pid_to_str.
11423 (handle_v_requests): Allow multiple attaches and runs when
11424 multiprocess extensions are in effect. Handle "vKill".
11425 (myresume): Adjust to use ptids.
11426 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
11427 (handle_status): Adjust to discard_queued_stop_replies interface
11428 change.
11429 (first_thread_of, kill_inferior_callback)
11430 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
11431 (main): Call initialize_inferiors. Adjust to use ptids, killing
11432 and detaching from all inferiors. Handle multiprocess packet
11433 variants.
11434 * linux-low.h: Include gdb_proc_service.h.
11435 (struct process_info_private): New.
11436 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
11437 <lwpid_of>: Use ptid_get_lwp.
11438 (get_lwp_thread): Adjust.
11439 (struct lwp_info): Add `dead' member.
11440 (find_lwp_pid): Declare.
11441 * linux-low.c (thread_db_active): Delete.
11442 (new_inferior): Adjust comment.
11443 (inferior_pid): Delete.
11444 (linux_add_process): New.
11445 (handle_extended_wait): Adjust.
11446 (add_lwp): Change unsigned long to ptid.
11447 (linux_create_inferior): Add process to processes table. Adjust
11448 to use ptids. Don't set new_inferior here.
11449 (linux_attach_lwp): Rename to ...
11450 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
11451 it. Adjust to use ptids.
11452 (linux_attach_lwp): New.
11453 (linux_attach): Add process to processes table. Don't set
11454 new_inferior here.
11455 (struct counter): New.
11456 (second_thread_of_pid_p, last_thread_of_process_p): New.
11457 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
11458 multiple processes.
11459 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
11460 processes. Remove process from process table.
11461 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
11462 to multiple processes.
11463 (any_thread_of): New.
11464 (linux_detach): Add `pid' argument, and handle it. Remove process
11465 from processes table.
11466 (linux_join): Add `pid' argument. Handle it.
11467 (linux_thread_alive): Change unsighed long argument to ptid_t.
11468 Consider dead lwps as not being alive.
11469 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
11470 threads we're not interested in.
11471 (same_lwp, find_lwp_pid): New.
11472 (linux_wait_for_lwp): Change `pid' argument's type from int to
11473 ptid_t. Adjust.
11474 (linux_wait_for_event): Rename to ...
11475 (linux_wait_for_event_1): ... this. Change `pid' argument's type
11476 from int to ptid_t. Adjust.
11477 (linux_wait_for_event): New.
11478 (linux_wait_1): Add `ptid' argument. Change return type to
11479 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
11480 that exit from the process table.
11481 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
11482 Adjust.
11483 (mark_lwp_dead): New.
11484 (wait_for_sigstop): Adjust to use ptids. If a process exits while
11485 stopping all threads, mark its main lwp as dead.
11486 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
11487 ptids.
11488 (fetch_register, usr_store_inferior_registers)
11489 (regsets_fetch_inferior_registers)
11490 (regsets_store_inferior_registers, linux_read_memory)
11491 (linux_write_memory): Inline `inferior_pid'.
11492 (linux_look_up_symbols): Adjust to use per-process
11493 `thread_db_active'.
11494 (linux_request_interrupt): Adjust to use ptids.
11495 (linux_read_auxv): Inline `inferior_pid'.
11496 (initialize_low): Don't reference thread_db_active.
11497 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
11498 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
11499 (ps_getpid): Return the pid of the current inferior.
11500 * thread-db.c (proc_handle, thread_agent): Delete.
11501 (thread_db_create_event, thread_db_enable_reporting): Adjust to
11502 per-process data.
11503 (find_one_thread): Change argument type to ptid_t. Adjust to
11504 per-process data.
11505 (maybe_attach_thread): Adjust to per-process data and ptids.
11506 (thread_db_find_new_threads): Ditto.
11507 (thread_db_init): Ditto.
11508 * spu-low.c (spu_create_inferior, spu_attach): Add process to
11509 processes table. Adjust to use ptids.
11510 (spu_kill, spu_detach): Adjust interface. Remove process from
11511 processes table.
11512 (spu_join, spu_thread_alive): Adjust interface.
11513 (spu_wait): Adjust interface. Remove process from processes
11514 table. Adjust to use ptids.
11515 * win32-low.c (current_inferior_tid): Delete.
11516 (current_inferior_ptid): New.
11517 (debug_event_ptid): New.
11518 (thread_rec): Take a ptid. Adjust.
11519 (child_add_thread): Add `pid' argument. Adjust to use ptids.
11520 (child_delete_thread): Ditto.
11521 (do_initial_child_stuff): Add `attached' argument. Add process to
11522 processes table.
11523 (child_fetch_inferior_registers, child_store_inferior_registers):
11524 Adjust.
11525 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
11526 (win32_attach): Pass 1 to do_initial_child_stuff.
11527 (win32_kill): Adjust interface. Remove process from processes
11528 table.
11529 (win32_detach): Ditto.
11530 (win32_join): Adjust interface.
11531 (win32_thread_alive): Take a ptid.
11532 (win32_resume): Adjust to use ptids.
11533 (get_child_debug_event): Ditto.
11534 (win32_wait): Adjust interface. Remove exiting process from
11535 processes table.
11536
bd99dc85
PA
115372009-04-01 Pedro Alves <pedro@codesourcery.com>
11538
11539 Non-stop mode support.
11540
11541 * server.h (non_stop): Declare.
11542 (gdb_client_data, handler_func): Declare.
11543 (delete_file_handler, add_file_handler, start_event_loop):
11544 Declare.
11545 (handle_serial_event, handle_target_event, push_event)
11546 (putpkt_notif): Declare.
11547 * target.h (enum resume_kind): New.
11548 (struct thread_resume): Replace `step' field by `kind' field.
11549 (TARGET_WNOHANG): Define.
11550 (struct target_ops) <wait>: Add `options' argument.
11551 <supports_non_stop, async, start_non_stop>: New fields.
11552 (target_supports_non_stop, target_async): New.
11553 (start_non_stop): Declare.
11554 (mywait): Add `options' argument.
11555 * target.c (mywait): Add `options' argument. Print child exit
11556 notifications here.
11557 (start_non_stop): New.
11558 * server.c (non_stop, own_buf, mem_buf): New globals.
11559 (struct vstop_notif): New.
11560 (notif_queue): New global.
11561 (queue_stop_reply, push_event, discard_queued_stop_replies)
11562 (send_next_stop_reply): New.
11563 (start_inferior): Adjust to use resume_kind. Adjust to mywait
11564 interface changes.
11565 (attach_inferior): In non-stop mode, don't wait for the target
11566 here.
11567 (handle_general_set): Handle QNonStop.
11568 (handle_query): When handling qC, return the current general
11569 thread, instead of the first thread of the list.
11570 (handle_query): If the backend supports non-stop mode, include
11571 QNonStop+ in the qSupported query response.
11572 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
11573 and non-stop mode.
11574 (handle_v_attach, handle_v_run): Handle non-stop mode.
11575 (handle_v_stopped): New.
11576 (handle_v_requests): Report support for vCont;t. Handle vStopped.
11577 (myresume): Adjust to use resume_kind. Handle non-stop.
11578 (queue_stop_reply_callback): New.
11579 (handle_status): Handle non-stop mode.
11580 (main): Clear non_stop flag on reconnection. Use the event-loop.
11581 Refactor serial protocol handling from here ...
11582 (process_serial_event): ... to this new function. When GDB
11583 selects any thread, select one here. In non-stop mode, wait until
11584 GDB acks all pending events before exiting.
11585 (handle_serial_event, handle_target_event): New.
11586 * remote-utils.c (remote_open): Install remote_desc in the event
11587 loop.
11588 (remote_close): Remove remote_desc from the event loop.
11589 (putpkt_binary): Rename to...
11590 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
11591 (putpkt_binary): New as wrapper around putpkt_binary_1.
11592 (putpkt_notif): New.
11593 (prepare_resume_reply): In non-stop mode, don't change the
11594 general_thread.
11595 * event-loop.c: New.
11596 * Makefile.in (OBJ): Add event-loop.o.
11597 (event-loop.o): New rule.
11598
11599 * linux-low.h (pid_of): Moved here.
11600 (lwpid_of): New.
11601 (get_lwp_thread): Use lwpid_of.
11602 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
11603 * linux-low.c (pid_of): Delete.
11604 (inferior_pid): Use lwpid_of.
11605 (linux_event_pipe): New.
11606 (target_is_async_p): New.
11607 (delete_lwp): New.
11608 (handle_extended_wait): Use lwpid_of.
11609 (add_lwp): Don't set lwpid field.
11610 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
11611 (linux_kill_one_lwp): If killing a running lwp, stop it first.
11612 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
11613 (linux_detach_one_lwp): If detaching from a running lwp, stop it
11614 first. Adjust to linux_wait_for_event interface changes. Use
11615 lwpid_of.
11616 (linux_detach): Don't delete the main lwp here.
11617 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
11618 (status_pending_p): Don't consider explicitly suspended lwps.
11619 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
11620 pointer. Add OPTIONS argument. Change return type to int. Use
11621 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
11622 (linux_wait_for_event): Take an integer pid instead of a lwp_info
11623 pointer. Add status pointer argument. Return a pid instead of a
11624 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
11625 changes. In non-stop mode, don't switch to a random thread.
11626 (linux_wait): Rename to...
11627 (linux_wait_1): ... this. Add target_options argument, and handle
11628 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
11629 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
11630 clean exit and signal exit code. Don't stop all threads in
11631 non-stop mode. In all-stop mode, only stop all threads when
11632 reporting a stop to GDB. Handle explicit thread stop requests.
11633 (async_file_flush, async_file_mark): New.
11634 (linux_wait): New.
11635 (send_sigstop): Use lwpid_of.
11636 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
11637 interface changes. In non-stop mode, don't switch to a random
11638 thread.
11639 (linux_resume_one_lwp): Use lwpid_of.
11640 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
11641 (linux_resume_one_thread): ... this. Handle resume_stop. In
11642 non-stop mode, don't look for pending flag in all threads.
11643 (resume_status_pending_p): Don't consider explicitly suspended
11644 threads.
11645 (my_waitpid): Reimplement. Emulate __WALL.
11646 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11647 Use lwpid_of.
11648 (sigchld_handler, linux_supports_non_stop, linux_async)
11649 (linux_start_non_stop): New.
11650 (linux_target_ops): Register linux_supports_non_stop, linux_async
11651 and linux_start_non_stop.
11652 (initialize_low): Install SIGCHLD handler.
11653 * thread-db.c (thread_db_create_event, find_one_thread)
11654 (thread_db_get_tls_address): Use lwpid_of.
11655 * win32-low.c (win32_detach): Adjust to use resume_kind.
11656 (win32_wait): Add `options' argument.
11657 * spu-low.c (spu_resume): Adjust to use resume_kind.
11658 (spu_wait): Add `options' argument.
11659
5b1c542e
PA
116602009-04-01 Pedro Alves <pedro@codesourcery.com>
11661
11662 Decouple target code from remote protocol.
11663
11664 * target.h (enum target_waitkind): New.
11665 (struct target_waitstatus): New.
11666 (struct target_ops) <wait>: Return an unsigned long. Take a
11667 target_waitstatus pointer instead of a char pointer.
11668 (mywait): Likewise.
11669 * target.c (mywait): Change prototype to return an unsigned long.
11670 Take a target_waitstatus pointer instead of a char pointer. Adjust.
11671 * server.h (thread_from_wait, old_thread_from_wait): Delete
11672 declarations.
11673 (prepare_resume_reply): Change prototype to take a
11674 target_waitstatus.
11675 * server.c (thread_from_wait, old_thread_from_wait): Delete.
11676 (last_status, last_ptid): New.
11677 (start_inferior): Remove "statusptr" argument. Adjust. Return a
11678 pid instead of a signal.
11679 (attach_inferior): Remove "status" and "signal" parameters.
11680 Adjust.
11681 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
11682 not as an address.
11683 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
11684 (handle_v_requests, myresume): Remove "status" and "signal"
11685 parameters. Adjust.
11686 (handle_status): New.
11687 (main): Delete local `status'. Adjust.
11688 * remote-utils.c: Include target.h.
11689 (prepare_resume_reply): Change prototype to take a
11690 target_waitstatus. Adjust.
11691
11692 * linux-low.c (linux_wait): Adjust to new target_ops->wait
11693 interface.
11694 * spu-low.c (spu_wait): Adjust.
11695 * win32-low.c (enum target_waitkind, struct target_waitstatus):
11696 Delete.
11697 (win32_wait): Adjust.
11698
2bd7c093
PA
116992009-04-01 Pedro Alves <pedro@codesourcery.com>
11700
11701 * target.h (struct thread_resume): Delete leave_stopped member.
11702 (struct target_ops): Add a `n' argument to the `resume' callback.
11703 * server.c (start_inferior): Adjust.
11704 (handle_v_cont, myresume): Adjust.
11705 * linux-low.c (check_removed_breakpoint): Adjust to resume
11706 interface change, and to removed leave_stopped field.
11707 (resume_ptr): Delete.
11708 (struct thread_resume_array): New.
11709 (linux_set_resume_request): Add new `arg' parameter. Adjust to
11710 resume interface change.
11711 (linux_continue_one_thread, linux_queue_one_thread)
11712 (resume_status_pending_p): Check if the resume field is NULL
11713 instead of checking the leave_stopped member.
11714 (linux_resume): Adjust to the target resume interface change.
11715 * spu-low.c (spu_resume): Adjust to the target resume interface
11716 change.
11717 * win32-low.c (win32_detach, win32_resume): Ditto.
11718
c35fafde
PA
117192009-04-01 Pedro Alves <pedro@codesourcery.com>
11720
11721 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
11722 flag.
11723 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
11724 pending.
11725 (linux_continue_one_thread): Only preserve the stepping flag if
11726 there's a pending breakpoint.
11727
0a59d50b
PA
117282009-03-31 Pedro Alves <pedro@codesourcery.com>
11729
11730 * server.c (main): After the inferior having exited, call
11731 remote_close before exiting gdbserver.
11732
f04c6d38
TJB
117332009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
11734
11735 Fix size of FPSCR in Power 7 processors.
11736 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
11737 (PPC_FEATURE_HAS_DFP): New #define.
11738 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
11739 size of the FPSCR.
11740
78e5cee6
PA
117412009-03-23 Pedro Alves <pedro@codesourcery.com>
11742
11743 * server.c (handle_query) Whitespace and formatting.
11744
1b3f6016
PA
117452009-03-22 Pedro Alves <pedro@codesourcery.com>
11746
11747 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
11748 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
11749 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
11750 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
11751 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
11752 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
11753 Makefile.in, configure.ac: Fix whitespace throughout.
11754 * configure: Regenerate.
11755
a07b2135
PA
117562009-03-22 Pedro Alves <pedro@codesourcery.com>
11757
11758 * inferiors.c (find_inferior): Make it safe for the callback
11759 function to delete the currently iterated inferior.
11760
67cc2626
PA
117612009-03-22 Pedro Alves <pedro@codesourcery.com>
11762
11763 * Makefile.in (linuw_low_h): Move higher.
11764 (thread-db.o): Depend on $(linux_low_h).
11765
54a0b537
PA
117662009-03-17 Pedro Alves <pedro@codesourcery.com>
11767
11768 Rename "process" to "lwp" throughout.
11769
11770 * linux-low.c (all_processes): Rename to...
11771 (all_lwps): ... this.
11772 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
11773 (add_process): Rename to ...
11774 (add_lwp): ... this. Adjust.
11775 (linux_create_inferior): Adjust.
11776 (linux_attach_lwp): Adjust.
11777 (linux_attach): Adjust.
11778 (linux_kill_one_process): Rename to ...
11779 (linux_kill_one_lwp): ... this. Adjust.
11780 (linux_kill): Adjust.
11781 (linux_detach_one_process): Rename to ...
11782 (linux_detach_one_lwp): ... this. Adjust.
11783 (linux_detach): Adjust.
11784 (check_removed_breakpoint): Adjust.
11785 (status_pending_p): Adjust.
11786 (linux_wait_for_process): Rename to ...
11787 (linux_wait_for_lwp): ... this. Adjust.
11788 (linux_wait_for_event): Adjust.
11789 (send_sigstop): Adjust.
11790 (wait_for_sigstop): Adjust.
11791 (stop_all_processes): Rename to ...
11792 (stop_all_lwps): ... this.
11793 (linux_resume_one_process): Rename to ...
11794 (linux_resume_one_lwp): ... this. Adjust.
11795 (linux_set_resume_request, linux_continue_one_thread)
11796 (linux_queue_one_thread, resume_status_pending_p)
11797 (usr_store_inferior_registers, regsets_store_inferior_registers)
11798 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11799 Adjust.
11800 * linux-low.h (get_process): Rename to ...
11801 (get_lwp): ... this. Adjust.
11802 (get_thread_process): Rename to ...
11803 (get_thread_lwp): ... this. Adjust.
11804 (get_process_thread): Rename to ...
11805 (get_lwp_thread): ... this. Adjust.
11806 (struct process_info): Rename to ...
11807 (struct lwp_info): ... this.
11808 (all_processes): Rename to ...
11809 (all_lwps): ... this.
11810 * proc-service.c (ps_lgetregs): Adjust.
11811 * thread-db.c (thread_db_create_event, find_one_thread)
11812 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
11813
0b16c5cf
PA
118142009-03-14 Pedro Alves <pedro@codesourcery.com>
11815
11816 * server.c (handle_query): Handle "qAttached".
11817
32de4b9d
NS
118182009-03-13 Nathan Sidwell <nathan@codesourcery.com>
11819
11820 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
11821 GPLv3, update license URL.
11822
2aecd87f
DE
118232009-03-01 Doug Evans <dje@google.com>
11824
93efd302 11825 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
11826 (server_h): Add gdb_signals.h.
11827 (signals.o): Update.
11828 * server.h (target_signal_from_host,target_signal_to_host_p)
11829 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
11830
86b1f9c5
PM
118312009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
11832
11833 * remote-utils.c (getpkt): Also generate remote-debug
11834 information if noack_mode is set.
11835
4aa995e1
PA
118362009-02-06 Pedro Alves <pedro@codesourcery.com>
11837
11838 * server.c (handle_query): Report qXfer:siginfo:read and
11839 qXfer:siginfo:write as supported and handle them.
11840 * target.h (struct target_ops) <qxfer_siginfo>: New field.
11841 * linux-low.c (linux_xfer_siginfo): New.
11842 (linux_target_ops): Set it.
11843
62709adf
PA
118442009-01-26 Pedro Alves <pedro@codesourcery.com>
11845
11846 * server.c (gdbserver_usage): Mention --remote-debug.
11847 (main): Accept '--remote-debug' switch.
11848
aef93bd7
DE
118492009-01-18 Doug Evans <dje@google.com>
11850
11851 * regcache.c (new_register_cache): No need to check result of xcalloc.
11852 * server.c (handle_search_memory): Back out calls to xmalloc,
11853 result is checked and error is returned to user upon failure.
11854 (handle_query): Ditto. Add more checks for result of malloc.
11855 (handle_v_cont): Check result of malloc, report error back to
11856 user upon failure.
11857 (handle_v_run): Ditto. Call freeargv.
11858 * server.h (freeargv): Declare.
11859 * utils.c (freeargv): New fn.
11860
54363045
DE
118612009-01-15 Doug Evans <dje@google.com>
11862
f626972c
DE
11863 * gdbreplay.c (perror_with_name): Make arg const char *.
11864 * server.h (target_signal_to_name): Make return type const char *.
0842e787 11865 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 11866 * utils.c (perror_with_name): Make arg const char *.
54363045 11867
18aae699
PA
118682009-01-14 Pedro Alves <pedro@codesourcery.com>
11869
11870 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
11871 when handling a EXIT_PROCESS_DEBUG_EVENT.
11872
ff703abe
JB
118732009-01-06 Joel Brobecker <brobecker@adacore.com>
11874
11875 * gdbreplay.c (gdbreplay_version): Update copyright year.
11876 * server.c (gdbserver_version): Likewise.
11877
f21cc1a2 118782009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
11879
11880 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 11881 (handle_extended_wait): Improve comment.
0e21c1ec 11882
bca929d3
DE
118832008-12-13 Doug Evans <dje@google.com>
11884
11885 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
11886 * server.h (ATTR_MALLOC): New macro.
11887 (xmalloc,xcalloc,xstrdup): Declare.
11888 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
11889 * inferiors.c: Ditto.
11890 * linux-low.c: Ditto.
11891 * mem-break.c: Ditto.
11892 * regcache.c: Ditto.
11893 * remote-utils.c: Ditto.
11894 * server.c: Ditto.
11895 * target.c: Ditto.
11896 * win32-low.c: Ditto.
11897
97438e3f
DE
118982008-12-12 Doug Evans <dje@google.com>
11899
896c7fbb
DE
11900 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
11901 in debugging printf.
11902
97438e3f
DE
11903 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
11904
e3b886f8
DE
119052008-12-09 Doug Evans <dje@google.com>
11906
11907 * linux-low.h (struct process_info): Delete member tid, unused.
11908 * thread-db.c (find_one_thread): Update.
11909 (maybe_attach_thread): Update.
11910
07e059b5
VP
119112008-12-02 Pedro Alves <pedro@codesourcery.com>
11912
889bf7c5
PA
11913 * target.h (struct target_ops): Add qxfer_osdata member.
11914 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
11915 and dirent.h.
11916 (linux_qxfer_osdata): New functions.
11917 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
11918 callback.
11919 * server.c (handle_query): Handle "qXfer:osdata:read:".
11920 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
11921 (buffer_xml_printf): New functions.
11922 * server.h (struct buffer): New.
11923 (buffer_grow_str, buffer_grow_str0): New macros.
11924 (buffer_grow, buffer_free, buffer_init, buffer_finish)
11925 (buffer_xml_printf): Declare.
07e059b5 11926
4cab47ab
DE
119272008-11-24 Doug Evans <dje@google.com>
11928
11929 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
11930
f142445f
DJ
119312008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
11932
11933 * server.c (handle_v_run): Always use the supplied argument list.
11934
d0107bb6 119352008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 11936
d0107bb6
BW
11937 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
11938 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 11939
2c4ad781
TJB
119402008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
11941
11942 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
11943 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
11944 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
11945 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
11946 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
11947 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
11948 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
11949 XML target descriptions.
11950 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
11951 when inferior is running on an ISA 2.05 or later processor. Add
11952 special case to return offset for full 64-bit slot of FPSCR when
11953 in 32-bits.
11954
dfb64f85
DJ
119552008-11-14 Daniel Gutson <dgutson@codesourcery.com>
11956
11957 * Makefile.in (SFILES, clean): Added sparc64 files.
11958 (reg-sparc64.o, reg-sparc64.c): New.
11959 * configure.srv (sparc*-*-linux*): New configuration.
11960 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
11961 syscall arguments for SPARC.
11962 (regsets_store_inferior_registers): Likewise.
11963 * linux-sparc-low.c: New file.
11964
66b6e1dd
DE
119652008-10-21 Doug Evans <dje@google.com>
11966
11967 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
11968 (READLINE_DIR,READLINE_DEP): Delete.
11969 (INTERNAL_CFLAGS): Update.
11970 (LINTFLAGS): Update.
11971
9b710a42
PA
119722008-10-10 Pedro Alves <pedro@codesourcery.com>
11973
11974 * server.c (handle_v_run): If GDB didn't specify an argv, use the
11975 whole argv from the last run, not just argv[0].
11976
5822d809
PA
119772008-09-08 Pedro Alves <pedro@codesourcery.com>
11978
11979 * regcache.c (new_register_cache): Return NULL if the register
11980 cache size isn't known yet.
11981 (free_register_cache): Avoid dereferencing a NULL regcache.
11982
74aac56f
DJ
119832008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11984
11985 * configure.srv: Merge MIPS and MIPS64.
11986
400b20f5
MR
119872008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
11988
11989 * Makefile.in (uninstall): Apply $(EXEEXT) too.
11990
677c5bb1
LM
119912008-08-18 Luis Machado <luisgpm@br.ibm.com>
11992
11993 * Makefile.in: Add required vsx dependencies.
11994
11995 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
11996 Declare init_registers_powerpc_vsx32l.
11997 Declare init_registers_powerpc_vsx64l.
11998 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
11999 (ppc_arch_setup): Check for VSX in hwcap.
12000 (ppc_fill_vsxregset): New function.
12001 (ppc_store_vsxregset): New function.
12002 Add new VSX entry in regset_info target_regsets.
12003
12004 * configure.srv: Add new VSX dependencies.
12005
a6f3e723
SL
120062008-08-12 Pedro Alves <pedro@codesourcery.com>
12007
12008 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
12009 (remote_open): Set or clear transport_is_reliable.
12010 (putpkt_binary): Don't expect acks in noack mode.
12011 (getpkt): Don't send ack/nac in noack mode.
12012 * server.c (handle_general_set): Handle QStartNoAckMode.
12013 (handle_query): If connected by tcp pass QStartNoAckMode+ in
12014 qSupported.
12015 (main): Reset noack_mode on every connection.
12016 * server.h (noack_mode): Declare.
12017
a417dc56
RW
120182008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12019
12020 * Makefile.in (GDBREPLAY_OBS): New variable.
12021 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
12022
3221518c
UW
120232008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
12024 Daniel Jacobowitz <dan@codesourcery.com>
12025
12026 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
12027 (usr_store_inferior_registers): Likewise.
12028 (regsets_store_inferior_registers): Likewise.
12029
ec56be1b
PA
120302008-07-31 Rolf Jansen <rj@surtec.com>
12031 Pedro Alves <pedro@codesourcery.com>
12032
12033 * configure.ac: Check for memmem declaration.
12034 * server.c [HAVE_MALLOC_H]: Include malloc.h.
12035 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
12036 (disable_packet_qfThreadInfo): Unconditionally compile.
12037 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
12038 * configure, config.in: Regenerate.
12039
2fe5e3ff
DE
120402008-07-28 Doug Kwan <dougkwan@google.com>
12041
12042 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
12043 (linux_write_memory): Remove declaration of errno.
12044
836acd6d
UW
120452008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
12046
12047 * linux-low.c (handle_extended_wait): Do not use "status"
12048 variable uninitialized.
12049
aeba519e
PA
120502008-07-07 Pedro Alves <pedro@codesourcery.com>
12051
12052 * server.c (handle_v_attach): Inhibit reporting dll changes.
12053
db42f210
PA
120542008-06-27 Pedro Alves <pedro@codesourcery.com>
12055
12056 * remote-utils.c (prepare_resume_reply): If requested, don't
12057 output "thread:TID" in the T stop reply.
12058
12059 * server.c (disable_packet_vCont, disable_packet_Tthread)
12060 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
12061 (handle_query): If requested, disable support for qC, qfThreadInfo
12062 and qsThreadInfo.
12063 (handle_v_requests): If requested, disable support for vCont.
12064 (gdbserver_show_disableable): New.
12065 (main): Handle --disable-packet and --disable-packet=LIST.
12066
12067 * server.h (disable_packet_vCont, disable_packet_Tthread)
12068 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
12069
8e4c5421
CD
120702008-06-20 Carlos O'Donell <carlos@codesourcery.com>
12071
12072 * server.c (gdbserver_usage): Mention --version.
12073
6e23a804
DJ
120742008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
12075
12076 * Makefile.in (gdbreplay.o): New rule.
12077
90aa6a40
JM
120782008-06-06 Joseph Myers <joseph@codesourcery.com>
12079
12080 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
12081 message, not gdbserver.
12082
c16158bc 120832008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
12084 Nathan Sidwell <nathan@codesourcery.com>
12085 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
12086
12087 * acinclude.m4: Include ../../config/acx.m4.
12088 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
12089 * configure, config.in: Regenerate.
12090 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
12091 * server.c (gdbserver_version): Print PKGVERSION.
12092 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
12093 (main): Adjust gdbserver_usage calls.
12094 * gdbreplay.c (version, host_name): Add declarations.
12095 (gdbreplay_version, gdbreplay_usage): New.
12096 (main): Accept --version and --help options.
12097
aeb75bf5
DJ
120982008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
12099
12100 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
12101 (arm_breakpoint_at): Handle Thumb.
12102 (the_low_target): Add comment.
12103
76b233dd
UW
121042008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
12105
12106 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
12107
08388c79
DE
121082008-05-09 Doug Evans <dje@google.com>
12109
a3c83fae
DE
12110 * server.h (decode_search_memory_packet): Declare.
12111 * remote-utils.c (decode_search_memory_packet): New fn.
12112 * server.c (handle_search_memory_1): New fn.
08388c79
DE
12113 (handle_search_memory): New fn.
12114 (handle_query): Process qSearch:memory packets.
12115
bb9c3d36
UW
121162008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
12117
12118 * regcache.c (registers_length): Remove.
12119 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
12120 full register packet.
12121 * regcache.h (registers_length): Remove prototype.
12122 * server.h (PBUFSIZ): Define to 16384.
12123
7284e1be
UW
121242008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
12125
12126 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
12127 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
12128 powerpc-64l.o, and powerpc-altivec64l.o.
12129 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
12130 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
12131 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
12132 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
12133 rs6000/power-linux.xml, and rs6000/power64-linux.xml
12134 to srv_xmlfiles.
12135
12136 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
12137 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
12138 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
12139 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
12140 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
12141 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
12142 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
12143 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
12144 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
12145 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
12146 (clean): Update.
12147
12148 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
12149 (init_registers_powerpc_32l): ... this new prototype.
12150 (init_registers_powerpc_32): Remove, replace by ...
12151 (init_registers_powerpc_altivec32l): ... this new prototype.
12152 (init_registers_powerpc_e500): Remove, replace by ...
12153 (init_registers_powerpc_e500l): ... this new prototype.
12154 (init_registers_ppc64): Remove, replace by ...
12155 (init_registers_powerpc_64l): ... this new prototype.
12156 (init_registers_powerpc_64): Remove, replace by ...
12157 (init_registers_powerpc_altivec64l): ... this new prototype.
12158 (ppc_num_regs): Set to 73.
12159 (PT_ORIG_R3, PT_TRAP): Define if necessary.
12160 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
12161 (ppc_cannot_store_register): Handle orig_r3 and trap.
12162 (ppc_arch_setup): Update init_registers_... calls.
12163 (ppc_fill_gregset): Handle orig_r3 and trap.
12164
12165 * inferiors.c (clear_inferiors): Reset current_inferior.
12166
fdc59709
PB
121672008-04-23 Paolo Bonzini <bonzini@gnu.org>
12168
889bf7c5
PA
12169 * acinclude.m4: Add override.m4.
12170 * configure: Regenerate.
fdc59709 12171
c9b2f845
UW
121722008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12173
12174 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
12175 initial call to init_register_ppc64.
12176
550512b8
UW
121772008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12178
43aaf8b6
PA
12179 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
12180 single powerpc*-*-linux* case.
550512b8
UW
12181 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
12182
b6430ec3
UW
121832008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
12184
12185 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 12186 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
12187 from reg_xmlfiles.
12188 * linux-ppc-low.c: Include <elf.h>.
12189 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
12190 (ppc_hwcap): New global variable.
12191 (ppc_regmap): Remove __SPE__ #ifdef sections.
12192 (ppc_regmap_e500): New global variable.
12193 (ppc_cannot_store_register): Update __SPE__ special case.
12194 (ppc_get_hwcap): New function.
12195 (ppc_arch_setup): Use it to determine whether inferior supports
12196 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
12197 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
12198 Do not access registers if target does not support AltiVec.
12199 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
12200 Do not access registers if target does not support SPE.
12201 (target_regsets): Unconditionally include AltiVec and SPE regsets.
12202
52fa2412
UW
122032008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
12204
12205 * linux-low.c (disabled_regsets, num_regsets): New.
12206 (use_regsets_p): Delete.
12207 (linux_wait_for_process): Clear disabled_regsets.
12208 (regsets_fetch_inferior_registers): Check and set it.
12209 (regsets_store_inferior_registers): Likewise.
12210 (linux_fetch_registers, linux_store_registers): Do not use
12211 use_regsets_p.
12212 (initialize_low): Allocate disabled_regsets.
12213
e28b3332
DJ
122142008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
12215
12216 * Makefile.in (LIBOBJS): New.
12217 (OBS): Use LIBOBJS.
12218 (memmem.o): New rule.
12219 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
12220 * configure: Regenerated.
12221
4536995d
UW
122222008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
12223
12224 * server.c (handle_query): Never return "unsupported" for
12225 qXfer:features:read queries.
12226
221c031f
UW
122272008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
12228
12229 * server.c (get_features_xml): Fix inverted condition.
12230 (handle_query): Always support qXfer:feature:read.
12231
ccd213ac
DJ
122322008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
12233
12234 * server.c (wrapper_argv): New.
12235 (start_inferior): Handle wrapper_argv. If set, expect an extra
12236 trap.
12237 (gdbserver_usage): Document --wrapper.
12238 (main): Parse --wrapper.
12239
6fe305f7
UW
122402008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12241
12242 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
12243 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
12244 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
12245 (ppc_set_pc): Likewise.
12246 (ppc_arch_setup): New function.
12247 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
12248 of collect_register.
889bf7c5 12249 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 12250
5b0a002e
UW
122512008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12252
12253 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
12254 instead of linux-ppc64-low.o.
12255 * linux-ppc64-low.c: Remove file.
12256 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
12257 (linux-ppc64-low.o): Remove rule.
12258
12259 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
12260 (init_registers_powerpc_64): Likewise.
12261 (ppc_regmap): Conditionally define depending on __powerpc64__.
12262 (ppc_cannot_store_register): Do not special-case "fpscr" when
12263 compiled on __powerpc64__.
12264 (ppc_collect_ptrace_register): New function.
12265 (ppc_supply_ptrace_register): New function.
12266 (ppc_breakpoint): Change type to "unsigned int".
12267 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
12268 (the_low_target): Conditionally provide initializers for the
889bf7c5 12269 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
12270 collect_ptrace_register and supply_ptrace_register members.
12271
9b4b61c8
UW
122722008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12273
12274 * regcache.h (gdbserver_xmltarget): Add extern declaration.
12275 * server.c (gdbserver_xmltarget): Define.
12276 (get_features_xml): Use it to replace "target.xml" and arch_string.
12277
12278 * configure.srv: Remove srv_xmltarget. Add XML files that were
12279 mentioned there to srv_xmlfiles instead. Remove conditional tests
12280 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
12281 srv_xmlfiles and srv_regobj to include all possible choices.
12282 * configure.ac (srv_xmltarget): Remove.
12283 (srv_xmlfiles): Do not add "target.xml".
12284 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
12285 checks for supplementary target information.
12286 * configure: Regenerate.
12287 * Makefile.in (XML_TARGET): Remove.
12288 (target.xml): Remove rule.
12289 (clean): Do not clean up target.xml.
12290 (.PRECIOUS): Do not mention target.xml.
12291
12292 * target.h (struct target_ops): Remove arch_string member.
12293 * linux-low.c (linux_arch_string): Remove.
12294 (linux_target_ops): Remove arch_string initializer.
12295 * linux-low.h (struct linux_target_ops): Remove arch_string member.
12296 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
12297 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
12298 * spu-low.c (spu_arch_string): Remove.
12299 (spu_target_ops): Remove arch_string initializer.
12300 * win32-low.c (win32_arch_string): Remove.
12301 (win32_target_ops): Remove arch_string initializer.
12302 * win32-low.h (struct win32_target_ops): Remove arch_string member.
12303 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
12304 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
12305
ee1a7ae4
UW
123062008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12307
12308 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
12309 by collect_ptrace_register and supply_ptrace_register hooks.
12310 * linux-low.c (fetch_register): Use supply_ptrace_register callback
12311 instead of checking for the_low_target.left_pad_xfer.
12312 (usr_store_inferior_registers): Use collect_ptrace_register callback
12313 instead of checking for the_low_target.left_pad_xfer.
12314
12315 * linux-s390-low.c (s390_collect_ptrace_register): New function.
12316 (s390_supply_ptrace_register): Likewise.
12317 (s390_fill_gregset): Call s390_collect_ptrace_register.
12318 (the_low_target): Update.
12319
12320 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
12321 (ppc_supply_ptrace_register): Likewise.
12322 (the_low_target): Update.
12323
12324 * linux-i386-low.c (the_low_target): Update.
12325 * linux-x86-64-low.c (the_low_target): Update.
12326
d61ddec4
UW
123272008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12328
12329 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
12330 reg-s390.o and reg-s390x.o.
12331
12332 * linux-low.c (new_inferior): New global variable.
12333 (linux_create_inferior, linux_attach): Set it.
12334 (linux_wait_for_process): Call the_low_target.arch_setup after the
12335 target has stopped for the first time.
12336 (initialize_low): Do not call the_low_target.arch_setup.
12337
12338 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
12339 (s390_set_pc): Likewise.
12340 (s390_arch_setup): New function.
12341 (the_low_target): Use s390_arch_setup as arch_setup routine.
12342
12343 * regcache.c (realloc_register_cache): New function.
12344 (set_register_cache): Call it for each existing regcache.
12345
d05b4ac3
UW
123462008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12347
12348 * server.h (init_registers): Remove prototype.
12349
12350 * linux-low.h (struct linux_target_ops): Add arch_setup field.
12351 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
12352 instead of init_registers ().
12353 * linux-arm-low.c (init_registers_arm): Add prototype.
12354 (init_registers_arm_with_iwmmxt): Likewise.
12355 (the_low_target): Add initializer for arch_setup field.
12356 * linux-cris-low.c (init_registers_cris): Add prototype.
12357 (the_low_target): Add initializer for arch_setup field.
12358 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
12359 (the_low_target): Add initializer for arch_setup field.
12360 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
12361 (the_low_target): Add initializer for arch_setup field.
12362 * linux-ia64-low.c (init_registers_ia64): Add prototype.
12363 (the_low_target): Add initializer for arch_setup field.
12364 * linux-m32r-low.c (init_registers_m32r): Add prototype.
12365 (the_low_target): Add initializer for arch_setup field.
12366 * linux-m68k-low.c (init_registers_m68k): Add prototype.
12367 (the_low_target): Add initializer for arch_setup field.
12368 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
12369 (init_registers_mips64_linux): Likewise.
12370 (the_low_target): Add initializer for arch_setup field.
12371 * linux-ppc-low.c (init_registers_ppc): Add prototype.
12372 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
12373 (the_low_target): Add initializer for arch_setup field.
12374 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
12375 (init_registers_powerpc_64): Likewise.
12376 (the_low_target): Add initializer for arch_setup field.
12377 * linux-s390-low.c (init_registers_s390): Add prototype.
12378 (init_registers_s390x): Likewise.
12379 (the_low_target): Add initializer for arch_setup field.
12380 * linux-sh-low.c (init_registers_sh): Add prototype.
12381 (the_low_target): Add initializer for arch_setup field.
12382 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
12383 (the_low_target): Add initializer for arch_setup field.
12384 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
12385 (the_low_target): Add initializer for arch_setup field.
12386
12387 * win32-low.h (struct win32_target_ops): Add arch_setup field.
12388 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
12389 instead of init_registers ().
12390 * win32-arm-low.c (init_registers_arm): Add prototype.
12391 (the_low_target): Add initializer for arch_setup field.
12392 * win32-i386-low.c (init_registers_i386): Add prototype.
12393 (the_low_target): Add initializer for arch_setup field.
12394
12395 * spu-low.c (init_registers_spu): Add prototype.
12396 (initialize_low): Call initialie_registers_spu () instead of
12397 initialize_registers ().
12398
fd96d250
PA
123992008-02-19 Pedro Alves <pedro@codesourcery.com>
12400
12401 * server.c (handle_v_requests): When handling the vRun and vAttach
12402 packets, if already debugging a process, don't kill it. Return an
12403 error instead.
12404
d41b6bb4
DJ
124052008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
12406
12407 * server.c (handle_query): Correct length check.
12408
5ac588cf
PA
124092008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
12410
12411 * win32-low.c (do_initial_child_stuff): Add process handle
12412 parameter. Set current_process_handle and current_process_id from the
12413 parameters. Clear globals.
12414 (win32_create_inferior): Don't set current_process_handle and
12415 current_process_id here. Instead pass them on the call to
12416 do_initial_child_stuff.
12417 (win32_attach): Likewise.
12418 (win32_clear_inferiors): New.
12419 (win32_kill): Don't close the current process handle or the
12420 current thread handle here. Instead call win32_clear_inferiors.
12421 (win32_detach): Don't open a new handle to the process. Call
12422 win32_clear_inferiors.
12423 (win32_join): Don't rely on current_process_handle; open a new
12424 handle using the process id.
12425 (win32_wait): Call win32_clear_inferiors when the inferior process
12426 has exited.
12427
ecd7ecbc
DJ
124282008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
12429
12430 * server.c (monitor_show_help): Add "exit".
12431
1525d545
MG
124322008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
12433
ecd7ecbc 12434 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
12435 (clean): Add reg-xtensa.c.
12436 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
12437 * configure.srv (xtensa*-*-linux*) New target.
12438 * linux-xtensa-low.c: New.
12439 * xtensa-xtregs.c: New.
1525d545 12440
59a016f0
PA
124412008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
12442
12443 * hostio.c: Don't include errno.h.
12444 (errno_to_fileio_errno): Move to hostio-errno.
12445 * hostio.c: (hostio_error): Remove the error parameter. Defer the
12446 error number outputting to the target->hostio_last_error callback.
12447 (hostio_packet_error): Use FILEIO_EINVAL directly.
12448 (handle_open, handle_pread, hostio_error, handle_unlink): Update
12449 calls to hostio_error.
12450 * hostio-errno.c: New.
12451 * server.h (hostio_last_error_from_errno): Declare.
12452 * target.h (target_ops): Add hostio_last_error member.
12453 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
12454 as hostio_last_error handler.
889bf7c5 12455 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
12456 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
12457 (wince_hostio_last_error): New functions.
12458 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
12459 as hostio_last_error handler.
12460 (win32_target_ops) [!_WIN32_WCE]: Register
12461 hostio_last_error_from_errno as hostio_last_error handler.
12462 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
12463 (hostio-errno.o): New rule.
12464 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
12465 * configure.srv (srv_hostio_err_objs): New variable. Default to
12466 hostio-errno.o.
12467 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
12468 * configure: Regenerate.
12469
2d717e4f
DJ
124702008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12471
12472 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
12473 (linux_kill, linux_detach): Clean up the process list.
12474 * remote-utils.c (remote_open): Improve port number parsing.
12475 (putpkt_binary, input_interrupt): Only send interrupts if the target
12476 is running.
12477 * server.c (extended_protocol): Make static.
12478 (attached): Define earlier.
12479 (exit_requested, response_needed, program_argv): New variables.
12480 (target_running): New.
12481 (start_inferior): Clear attached here.
12482 (attach_inferior): Set attached here.
12483 (require_running): Define.
12484 (handle_query): Use require_running and target_running. Implement
12485 "monitor exit".
12486 (handle_v_attach, handle_v_run): New.
12487 (handle_v_requests): Use require_running. Handle vAttach and vRun.
12488 (gdbserver_usage): Update.
12489 (main): Redo argument parsing. Handle --debug and --multi. Handle
12490 --attach along with other options or after the port. Save
12491 program_argv. Support no initial program. Resynchronize
12492 communication with GDB after an error. Handle "monitor exit".
12493 Use require_running and target_running. Always allow the extended
12494 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
12495 restart in extended mode.
12496 * README: Refer to the GDB manual. Update --attach usage.
12497
7407e2de
AS
124982007-12-20 Andreas Schwab <schwab@suse.de>
12499
12500 * linux-low.c (STACK_SIZE): Define.
12501 (linux_tracefork_child): Use it. Use __clone2 on ia64.
12502 (linux_test_for_tracefork): Likewise.
12503
b65d95c5
DJ
125042007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
12505
12506 * linux-low.c (linux_wait_for_event): Update messages. Do not
12507 reinsert auto-delete breakpoints.
12508 * mem-break.c (struct breakpoint): Change return type of handler to
12509 int.
12510 (set_breakpoint_at): Update handler type.
12511 (reinsert_breakpoint_handler): Return 1 instead of calling
12512 delete_breakpoint.
12513 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
12514 setting a new one.
12515 (check_breakpoints): Delete auto-delete breakpoints and return 2.
12516 * mem-break.h (set_breakpoint_at): Update handler type.
12517 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
12518 * win32-low.c (auto_delete_breakpoint): New.
12519 (get_child_debug_event): Use it.
12520
4e799345
DJ
125212007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
12522
12523 * configure.ac: Check for pread and pwrite.
12524 * hostio.c (handle_pread): Fall back to lseek and read.
12525 (handle_pwrite): Fall back to lseek and write.
12526 * config.in, configure: Regenerated.
12527
27524b67
DJ
125282007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
12529
12530 * server.c (myresume): Add own_buf argument.
12531 (main): Update calls.
12532
a20d5e98
DJ
125332007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
12534
12535 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
12536 * remote-utils.c (remote_open): Do not call disable_async_io.
12537 (block_async_io): Delete.
12538 (unblock_async_io): Make static.
12539 (initialize_async_io): New.
12540 * server.c (handle_v_cont): Handle async I/O here.
12541 (myresume): Likewise. Move other common resume tasks here...
12542 (main): ... from here. Call initialize_async_io. Disable async
12543 I/O before the main loop.
12544 * server.h (initialize_async_io): Declare.
12545 (block_async_io, unblock_async_io): Delete prototypes.
12546 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
12547
b79d787e
DJ
125482007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
12549
12550 * remote-utils.c (readchar): Allow binary data in received messages.
12551
d97903b2
PA
125522007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12553
12554 * win32-low.c (attaching): New global.
12555 (win32_create_inferior): Clear the `attaching' global.
12556 (win32_attach): Set the `attaching' global.
12557 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
12558 attaching. Only set a breakpoint at the entry point if not
12559 attaching.
12560
311de423
PA
125612007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12562
12563 * server.c (main): Don't report dll events on the initial
12564 connection on attaches.
12565
6c2d16d2
PA
125662007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12567
12568 * server.c (main): Relax numerical bases supported for the pid of
12569 the --attach command line argument.
12570
5ca906e6
PA
125712007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12572
12573 * win32-low.c (win32_attach): Call OpenProcess before
12574 DebugActiveProcess, not after. Add last error output to error
12575 call.
12576
9c6c8194
PA
125772007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12578
12579 * win32-low.c (win32_get_thread_context)
12580 (win32_set_thread_context): New functions.
12581 (thread_rec): Use win32_get_thread_context.
12582 (continue_one_thread, win32_resume): Use win32_set_thread_context.
12583 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
12584 field.
12585
4d5d1aaa
PA
125862007-12-03 Leo Zayas
12587 Pedro Alves <pedro_alves@portugalmail.pt>
12588
12589 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
12590 global variables.
12591 (child_add_thread): Minor cleanup.
12592 (child_continue): Resume artificially suspended threads before
12593 calling ContinueDebugEvent.
12594 (suspend_one_thread): New.
12595 (fake_breakpoint_event): New.
12596 (get_child_debug_event): Change return type to int. Check here if
12597 gdb sent an interrupt request. If a soft interrupt was requested,
12598 fake a breakpoint event. Return 0 if there is no event to handle,
12599 and 1 otherwise.
12600 (win32_wait): Don't check here if gdb sent an interrupt request.
12601 Ensure there is a valid event to handle.
12602 (win32_request_interrupt): Add soft interruption method as last
12603 resort.
12604
c436e841
PA
126052007-12-03 Leo Zayas
12606 Pedro Alves <pedro_alves@portugalmail.pt>
12607
12608 * win32-low.h (win32_thread_info): Add descriptions to the
12609 structure members. Replace `suspend_count' counter by a
12610 `suspended' flag.
12611 * win32-low.c (thread_rec): Update condition of when to get the
12612 context from the inferior. Rely on ContextFlags being set if it
12613 has already been retrieved. Only suspend the inferior thread if
12614 we haven't already. Warn if that fails.
12615 (continue_one_thread): s/suspend_count/suspended/. Only call
12616 ResumeThread once. Warn if that fails.
12617
e7b5fa67
PA
126182007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12619
12620 * win32-low.c (win32_wait): Don't read from the inferior when it
12621 has already exited.
12622
a385171d
PA
126232007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12624
12625 * Makefile.in (win32_low_h): New variable.
12626 (win32-low.o): Add dependency on $(win32_low_h).
12627 (win32-arm-low.o, win32-i386-low.o): New rules.
12628
f80c84b3
DJ
126292007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12630
12631 * hostio.c: Correct copyright year.
12632
a6b151f1
DJ
126332007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12634
12635 * Makefile.in (OBS): Add hostio.o.
12636 (hostio.o): New rule.
12637 * server.h (handle_vFile): Declare.
12638 * hostio.c: New file.
12639 * server.c (handle_v_requests): Take packet_len and new_packet_len
12640 for binary packets. Call handle_vFile.
12641 (main): Update call to handle_v_requests.
12642
f9387fc3
DJ
126432007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
12644
12645 * linux-low.c: Include <sched.h>.
12646
51c2684e
DJ
126472007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
12648
12649 * linux-low.c (linux_tracefork_grandchild): New.
12650 (linux_tracefork_child): Use clone.
12651 (linux_test_for_tracefork): Use clone; allocate and free a stack.
12652
75f83163
JB
126532007-10-31 Joel Brobecker <brobecker@adacore.com>
12654
12655 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
12656
da5898ce
DJ
126572007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
12658
12659 * linux-low.c (handle_extended_wait): Handle unexpected signals.
12660
24a09b5f
DJ
126612007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
12662
12663 * inferiors.c (change_inferior_id): Delete.
12664 (add_pid_to_list, pull_pid_from_list): New.
12665 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
12666 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
12667 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
12668 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
12669 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
12670 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
12671 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
12672 (using_threads): Always set to 1.
12673 (handle_extended_wait): New.
12674 (add_process): Do not set TID.
12675 (linux_create_inferior): Set must_set_ptrace_flags.
12676 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
12677 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
12678 (linux_thread_alive): Rename TID argument to LWPID.
12679 (linux_wait_for_process): Handle unknown processes. Do not use TID.
12680 (linux_wait_for_event): Do not use TID or check using_threads. Update
12681 call to dead_thread_notify. Call handle_extended_wait.
12682 (linux_create_inferior): Use PTRACE_SETOPTIONS.
12683 (send_sigstop): Delete sigstop_sent.
12684 (wait_for_sigstop): Avoid TID.
12685 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
12686 (linux_test_for_tracefork): New.
12687 (linux_lookup_signals): Use thread_db_active and
12688 linux_supports_tracefork_flag.
12689 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
12690 * linux-low.h (get_process_thread): Avoid TID.
12691 (struct process_ifo): Move thread_known and tid to the end. Remove
12692 sigstop_sent.
12693 (linux_attach_lwp, thread_db_init): Update prototypes.
12694 * server.h (change_inferior_id): Delete prototype.
12695 (add_pid_to_list, pull_pid_from_list): New prototypes.
12696 * thread-db.c (thread_db_use_events): New.
12697 (find_first_thread): Rename to...
12698 (find_one_thread): ...this. Update callers and messages. Do not
12699 call fatal. Check thread_db_use_events. Do not call
12700 change_inferior_id or new_thread_notify.
12701 (maybe_attach_thread): Update. Do not call new_thread_notify.
12702 (thread_db_init): Set thread_db_use_events. Check use_events.
12703 * utils.c (fatal, warning): Correct message prefix.
12704
30ed0a8f
DJ
127052007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
12706
12707 * Makefile.in (clean): Remove new files.
12708 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
12709 (powerpc-64.o, powerpc-64.c): New rules.
12710 * configure.srv: Use alternate register sets for powerpc64-*-linux*
12711 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
12712 with SPE.
12713 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
12714 SPE targets.
12715 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
12716 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
12717 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
12718 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
12719 (target_regsets): Add AltiVec and SPE register sets.
12720 * configure.ac: Check for AltiVec and SPE.
12721 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
12722 (ppc_fill_vrregset, ppc_store_vrregset): New.
12723 (target_regsets): Add AltiVec register set.
12724 * configure: Regenerated.
12725
fd462a61
DJ
127262007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
12727
12728 * linux-low.c (O_LARGEFILE): Define.
12729 (linux_read_memory): Use /proc/PID/mem.
12730 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
12731 * configure, config.in: Regenerated.
12732
69f223ed
DJ
127332007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12734
12735 * linux-low.c (linux_wait_for_event): Do not pass signals while
12736 single-stepping.
12737
aec18585
PA
127382007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12739
12740 * win32-low.c (create_process): New.
12741 (win32_create_inferior): Use create_process instead of
12742 CreateProcess. If create_process failed retry appending an ".exe"
12743 suffix. Store the GetLastError result immediatelly after
12744 create_process calls and use it on the call to error.
12745
34d86ddd
PA
127462007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12747
12748 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
12749
5a0e3bd0
JB
127502007-08-23 Joel Brobecker <brobecker@adacore.com>
12751
12752 * configure.ac: Switch license to GPLv3.
12753
f88c79e6
MS
127542007-08-01 Michael Snyder <msnyder@access-company.com>
12755
12756 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
12757
6b3d9b83
PA
127582007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
12759
12760 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
12761 typedef.
12762 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
12763 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
12764 CloseToolhelp32Snapshot.
12765 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
12766 CloseToolhelp32Snapshot.
12767
c588c53c
MS
127682007-07-27 Michael Snyder <michael.snyder@access-company.com>
12769
12770 * server.c (main): Check for inferior exit before main loop.
12771
aa0403d9
PA
127722007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
12773
12774 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
12775 instead of on tmp_desc.
12776
255e7678
DJ
127772007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
12778 Daniel Jacobowitz <dan@codesourcery.com>
12779
12780 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
12781 (add_thread): Minor cleanups.
12782 (clear_inferiors): Move lower in the file. Clear the DLL
12783 list.
12784 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
12785 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
12786 (xml_escape_text): New.
12787 * server.c (handle_query): Handle qXfer:libraries:read. Report it
12788 for qSupported.
12789 (handle_v_cont): Report errors.
12790 (gdbserver_version): Update.
12791 (main): Correct size of own_buf. Do not report initial DLL events.
12792 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
12793 (unloaded_dll, xml_escape_text): New.
12794 * win32-low.c (enum target_waitkind): Update comments.
12795 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
12796 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
12797 (win32_EnumProcessModules, win32_GetModuleInformation)
12798 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
12799 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
12800 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
12801 (win32_Module32First, win32_Module32Next, load_toolhelp)
12802 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
12803 (get_child_debug_event): Handle DLL events.
12804 (win32_wait): Likewise.
12805
0d37add9
DJ
128062007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12807
12808 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
12809 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
12810
45e2715e
PA
128112007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12812
12813 * win32-low.c (handle_output_debug_string): Ignore event if not
12814 waiting.
12815
c5674cf1
PA
128162007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12817
12818 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
12819
2bbe3cc1
DJ
128202007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
12821
12822 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
12823
ae13219e
DJ
128242007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
12825
12826 * inferiors.c (change_inferior_id): Add comment.
12827 * linux-low.c (check_removed_breakpoint): Add an early
12828 prototype. Improve debug output.
12829 (linux_attach): Doc update.
12830 (linux_detach_one_process, linux_detach): Clean up before releasing
12831 each process.
12832 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
12833 * linux-low.h (struct process_info): Doc improvement.
12834 * mem-break.c (delete_all_breakpoints): New.
12835 * mem-break.h (delete_all_breakpoints): New prototype.
12836 * thread-db.c (find_first_thread): New.
12837 (thread_db_create_event): Call it instead of
12838 thread_db_find_new_threads. Clean up unused variables.
12839 (maybe_attach_thread): Remove first thread handling.
12840 (thread_db_find_new_threads): Use find_first_thread.
12841 (thread_db_get_tls_address): Likewise.
12842
4105de34
DJ
128432007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
12844
12845 * thread-db.c (thread_db_find_new_threads): Add prototype.
12846 (thread_db_create_event): Check for the main thread before adding
12847 a new thread.
12848 (maybe_attach_thread): Only enable event reporting if TID == 0.
12849 (thread_db_get_tls_address): Check for new threads.
12850
2b876972
DJ
128512007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
12852
12853 * linux-low.c (linux_create_inferior): Try execv before execvp.
12854 * spu-low.c (spu_create_inferior): Likewise.
12855
7a245884
DJ
128562007-06-13 Mike Frysinger <vapier@gentoo.org>
12857
12858 * linux-low.c (linux_create_inferior): Change execv to execvp.
12859 * spu-low.c (spu_create_inferior): Likewies.
12860
117ce543
DJ
128612007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
12862
12863 * Makefile.in (clean): Clean new files instead of deleted ones.
12864 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
12865 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
12866 rules.
12867 * configure.srv: Specify XML files and new regformats for MIPS and
12868 MIPS64 GNU/Linux.
12869 * linux-mips-low.c (mips_num_regs): Set to only used registers.
12870 (mips_regmap): Do not fetch $0. Remove unused registers. Add
12871 an entry for the restart register.
12872 (mips_cannot_fetch_register, mips_cannot_store_register)
12873 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
12874 register names to match the XML descriptions.
12875 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
12876 restart register instead of $0.
12877
0e7f50da
UW
128782007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
12879 Markus Deuling <deuling@de.ibm.com>
12880
12881 * remote-utils.c (decode_xfer_write): New function.
12882 * server.h (decode_xfer_write): Add prototype.
12883 * server.c (handle_query): Add PACKET_LEN argument. Support
12884 qXfer:spu:read and qXfer:spu:write packets.
12885 (main): Pass packet_len to handle_query.
12886 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
12887 * target.h (target_ops): Add qxfer_spu.
12888
374c1d38
UW
128892007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
12890
12891 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
12892 accessing non-seekable spufs files.
12893
bb63802a
UW
128942007-05-16 Markus Deuling <deuling@de.ibm.com>
12895
889bf7c5 12896 * server.c (handle_query): Add reply for qC packet.
bb63802a 12897
7390519e
PA
128982007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12899 Leo Zayas <lerele@champenstudios@com>
12900
12901 * server.h (check_remote_input_interrupt_request): New function.
12902 * remote_utils.c (INVALID_DESCRIPTOR): New define.
12903 (remote_desc): Initialize with INVALID_DESCRIPTOR.
12904 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
12905 (check_remote_input_interrupt_request): New function.
12906 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 12907 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
12908 winapi_GenerateConsoleCtrlEvent): New typedefs.
12909 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
12910 to 250 ms.
12911 (win32_wait): Check for remote interrupt request
12912 with check_remote_input_interrupt_request.
12913 (win32_request_interrupt): New function.
12914 (win32_target_op): Set request_interrupt to win32_request_interrupt.
12915
34b34921
PA
129162007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12917
12918 * win32-low.c (debug_registers_changed,
12919 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
12920 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
12921 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
12922 (thread_rec): Get context using the low target.
12923 (child_add_thread): Call thread_added on the low target,
12924 which does the same thing.
12925 (regptr): Delete.
12926 (do_initial_child_stuff): Remove debug registers references.
12927 Set context using the low target. Resume threads after
12928 setting the contexts.
12929 (child_continue): Remove dead variable. Remove debug
12930 registers references.
12931 (child_fetch_inferior_registers): Go through the low target.
12932 (do_child_store_inferior_registers): Remove.
12933 (child_store_inferior_registers): Go through the low target.
12934 (win32_resume): Remove debug registers references.
12935 Set context using the low target.
12936 (handle_exception): Change return type to void. Don't record
12937 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
12938 first chance exception.
889bf7c5 12939 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
12940 goto loop. Always return after waiting for debug event.
12941 (win32_wait): Convert to switch statement. Handle spurious
12942 events.
12943
12944 * win32-i386-low.c (debug_registers_changed,
12945 debug_registers_used): New.
12946 (initial_stuff): Rename to ...
12947 (i386_initial_stuff): ... this. Clear debug registers
12948 state variables.
12949 (store_debug_registers): Delete.
12950 (i386_get_thread_context): New.
12951 (load_debug_registers): Delete.
12952 (i386_set_thread_context): New.
12953 (i386_thread_added): New.
12954 (single_step): Rename to ...
12955 (i386_single_step): ... this.
12956 (do_fetch_inferior_registers): Rename to ...
12957 (i386_fetch_inferior_register): ... this.
12958 (i386_store_inferior_register): New.
12959 (the_low_target): Adapt to new interface.
12960
12961 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
12962 (arm_get_thread_context): New.
12963 (arm_set_thread_context): New.
12964 (regptr): New.
12965 (do_fetch_inferior_registers): Rename to ...
12966 (arm_fetch_inferior_register): ... this.
12967 (arm_store_inferior_register): New.
12968 (arm_wince_breakpoint): Reimplement as unsigned long.
12969 (arm_wince_breakpoint_len): Define.
12970 (the_low_target): Adapt to new interface.
12971
12972 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
12973 load_debug_registers. Add get_thread_context, set_thread_context,
12974 thread_added and store_inferior_register. Rename
12975 fetch_inferior_registers to fetch_inferior_register.
12976 (regptr): Remove declaration.
12977
dd6953e1
PA
129782007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12979
12980 * linux-low.c (linux_detach): Change return type to int. Return 0.
12981 * spu-low.c (spu_detach): Likewise.
12982
444d6139
PA
129832007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12984
12985 * target.h (target_ops): Change return type of detach to int.
12986 Add join.
12987 (join_inferior): New.
12988 * server.c (main): Don't skip detach support on mingw32.
12989 If the inferior doesn't support detaching return error.
12990 Call join_inferior instead of using waitpid.
12991 * linux-low.c (linux_join): New.
12992 (linux_target_op): Add linux_join.
12993 * spu-low.c (spu_join): New.
12994 (spu_target_ops): Add spu_join.
12995 * win32-low.c (win32_detach): Adapt to new interface.
12996 Reopen current_process_handle before detaching. Issue a child
12997 resume before detaching.
12998 (win32_join): New.
12999 (win32_target_op): Add win32_join.
13000
1d5315fe
PA
130012007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13002
13003 * win32-low.c (win32-attach): Fix return value.
13004 * target.h (target_ops): Describe ATTACH return values.
13005
bf914831
PA
130062007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13007
13008 * win32-low.c (GETPROCADDRESS): Define.
13009 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
13010 (winapi_DebugSetProcessKillOnExit): Likewise.
13011 (win32_create_inferior): Force usage of ansi CreateProcessA.
13012 (win32_attach): Use GETPROCADDRESS.
13013 (win32_detach): Likewise.
13014
f72f3e60
PA
130152007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13016
13017 * win32-low.c (win32_wait): Don't use WSTOPSIG.
13018
ed50f18f
PA
130192007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
13020
13021 * win32-low.c: Commit leftover changes from 2007-03-29.
13022
0c2ead7e
DJ
130232007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13024
13025 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
13026 fields short instead of int. Add explicit padding.
13027 (i387_cache_to_fsave): Remove unnecessary casts.
13028 (i387_fsave_to_cache): Doc fix.
13029 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
13030
73725ff3
DJ
130312007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13032
13033 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
13034 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
13035
d99f33d8
PA
130362007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13037
13038 * configure.srv (arm*-*-mingw32ce*): Move near the other
13039 arm targets.
13040
68070c10
PA
130412007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13042
2482afc6 13043 * configure.ac: Add errno checking.
68070c10
PA
13044 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
13045 sys/file.h and malloc.h.
13046 (AC_CHECK_DECLS): Add perror.
13047 (srv_mingwce): Handle.
2482afc6 13048 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
13049 win32-i386-low.o to srv_tgtobj.
13050 (i[34567]86-*-mingw*): Likewise.
13051 (arm*-*-mingw32ce*): Add case.
13052 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13053 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
13054 [__MINGW32CE__] (strerror): New function.
13055 [__MINGW32CE__] (errno): Define to GetLastError.
13056 [__MINGW32CE__] (COUNTOF): New macro.
13057 (remote_open): Remove extra close call.
13058 * mem-break.c (delete_breakpoint_at): New function.
13059 * mem-break.h (delete_breakpoint_at): Declare.
13060 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13061 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
13062 [USE_WIN32API] (read, write): Add char* casts.
13063 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
13064 * server.h: Include wincecompat.h on Windows CE.
13065 [HAVE_ERRNO_H]: Check.
13066 (perror): Declare if not declared.
13067 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
13068 (perror_with_name): Remove errno declaration.
13069 * wincecompat.h: New.
13070 * wincecompat.c: New.
13071 * win32-low.h: New.
13072 * win32-arm-low.c: New.
13073 * win32-i386-low.c: New.
13074 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
13075 (OUTMSG2): Make it safe.
13076 (_T): New macro.
13077 (COUNTOF): New macro.
13078 (NUM_REGS): Get it from the low target.
13079 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
13080 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
13081 (thread_rec): Let low target handle debug registers.
13082 (child_add_thread): Likewise.
13083 (child_init_thread_list): Likewise.
13084 (continue_one_thread): Likewise.
13085 (regptr): New.
13086 (do_child_fetch_inferior_registers): Move to ...
13087 * win32-i386-low.c: ... here, and rename to ...
13088 (do_fetch_inferior_registers): ... this.
889bf7c5 13089 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
13090 Go through the low target.
13091 (do_child_store_inferior_registers): Use regptr.
13092 (strwinerror): New function.
13093 (win32_create_inferior): Handle Windows CE.
13094 Use strwinerror instead of strerror on Windows error
13095 codes. Add program to the error output.
13096 Don't close the main thread handle on Windows CE.
13097 (win32_attach): Use coredll.dll on Windows CE.
13098 (win32_kill): Close current process and current
13099 thread handles.
13100 (win32_detach): Use coredll.dll on Windows CE.
13101 (win32_resume): Let low target handle debug registers, and
13102 step request.
13103 (handle_exception): Add/Remove initial breakpoint. Avoid
13104 non-existant WSTOPSIG on Windows CE.
13105 (win32_read_inferior_memory): Cast to remove warning.
13106 (win32_arch_string): Go through the low target.
13107 (initialize_low): Call set_breakpoint_data with the low
13108 target's breakpoint.
13109 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
13110 FOP_REGNUM, mappings): Move to ...
13111 * win32-i386-low.c: ... here.
13112 * win32-low.c (win32_thread_info): Move to ...
13113 * win32-low.h: ... here.
13114 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
13115 win32-arm-low.c and wincecompat.c.
13116 (all:): Add $EXEEXT.
13117 (install-only:): Likewise.
13118 (gdbserver:): Likewise.
13119 (gdbreplay:): Likewise.
13120 * config.in: Regenerate.
13121 * configure: Regenerate.
13122
41093d81
PA
131232007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13124
13125 * win32-low.c: Rename typedef thread_info to
13126 win32_thread_info throughout.
13127
544afa54
PA
131282007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13129
13130 * win32-i386-low.c: Rename to ...
13131 * win32-low.c: ... this.
13132 * configure.srv: Replace win32-i386-low.o with win32-low.o.
13133 * Makefile.in: Likewise.
13134
bce7165d
PA
131352007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
13136
13137 * remote-utils.c (monitor_output): Constify msg parameter.
13138 * server.h (monitor_output): Likewise.
13139 * win32-i386-low.c (handle_output_debug_string): New.
13140 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
13141 handle_output_debug_string.
13142 (get_child_debug_event): Likewise.
13143
506c7aa0
DJ
131442007-03-27 Mat Hostetter <mat@lcs.mit.edu>
13145
13146 * server.c (main): Correct strtoul check.
13147
42c81e2a
DJ
131482007-03-27 Jon Ringle <jon@ringle.org>
13149
13150 * linux-low.c: Check __ARCH_HAS_MMU__ also.
13151
9453113a
DJ
131522007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
13153
13154 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
13155
64a69107
DJ
131562007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
13157
13158 * terminal.h: Check HAVE_SGTTY_H.
13159
131602007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
13161
13162 * remote-utils.c (remote_open): Print out the assigned port number.
13163
c74d0ad8
DJ
131642007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
13165
13166 * remote-utils.c (monitor_output): New function.
13167 * server.c (debug_threads): Define here.
13168 (monitor_show_help): New function.
13169 (handle_query): Handle qRcmd.
13170 (main): Do not handle 'd' packet.
13171 * server.h (debug_threads, remote_debug, monitor_output): Declare.
13172 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
13173 of debug_threads.
13174
de7c3b4a
PA
131752007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13176
13177 * Makefile.in (EXEEXT): New.
13178 (clean): Use $(EXEEXT).
13179
ef57601b
PA
131802007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13181
13182 * target.h (target_ops): Rename send_signal to request_interrupt,
13183 and remove enum target_signal parameter.
13184 * linux-low.c (linux_request_interrupt): Rename from
13185 linux_send_signal, and always send SIGINT.
13186 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
13187 and always send SIGINT.
13188 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
13189 of send_signal.
13190 (input_interrupt): Likewise.
13191
820f2bda
PA
131922007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13193
13194 * server.c (get_features_xml): Check if target implemented
13195 arch_string.
13196 * win32-i386-low.c (win32_arch_string): New.
13197 (win32_target_ops): Add win32_arch_string as arch_string member.
13198
ab39bf24
UW
131992007-02-22 Markus Deuling <deuling@de.ibm.com>
13200
13201 * spu-low.c (spu_arch_string): New.
13202 (spu_target_ops): Add spu_arch_string.
13203
61ff6e04
DJ
132042007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
13205
13206 * remote-utils.c: Remove HAVE_TERMINAL_H check.
13207 * configure.ac: Do not check for terminal.h.
13208 * configure, config.in: Regenerated.
13209
fb1e4ffc
DJ
132102007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13211
13212 * Makefile.in (OBS): Add $(XML_BUILTIN).
13213 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
13214 (clean): Update.
13215 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
13216 (arm-with-iwmmxt.c): New.
13217 * config.in, configure: Regenerate.
13218 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
13219 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
13220 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
13221 (arm*-*-linux*): Add iWMMXt and regset support.
13222 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
13223 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
13224 (arm_store_wmmxregset, target_regsets): New.
13225 * server.c (get_features_xml): Take annex argument. Check builtin
13226 XML documents.
13227 (handle_query): Handle multiple annexes.
13228
0f48aa01
DJ
132292007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13230
13231 * remote-utils.c [USE_WIN32API] (read, write): Define.
13232 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
13233 write.
13234
23181151
DJ
132352007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
13236
13237 * linux-i386-low.c (the_low_target): Set arch_string.
13238 * linux-x86-64-low.c (the_low_target): Likewise.
13239 * linux-low.c (linux_arch_string): New.
13240 (linux_target_ops): Add it.
13241 * linux-low.h (struct linux_target_ops): Add arch_string.
13242 * server.c (write_qxfer_response): Use const void * for DATA.
13243 (get_features_xml): New.
13244 (handle_query): Handle qXfer:features:read. Report it for qSupported.
13245 * target.h (struct target_ops): Add arch_string method.
13246
9d606399
DJ
132472007-01-03 Denis Pilat <denis.pilat@st.com>
13248 Daniel Jacobowitz <dan@codesourcery.com>
13249
13250 * linux-low.c (linux_kill): Handle being called with no threads.
13251 * win32-i386-low.c (win32_kill): Likewise.
13252 (get_child_debug_event): Clear current_process_handle.
13253
132542006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
13255 Daniel Jacobowitz <dan@codesourcery.com>
13256
13257 * remote-utils.c (remote_open): Check the type of specified
13258 serial port devices before opening them.
13259 * server.c (main): Kill the inferior if an error occurs during
13260 the first remote_open.
13261
a5e13d24
DJ
132622006-12-05 Markus Deuling <deuling@de.ibm.com>
13263
13264 * README: Update supported targets.
13265
186947f7
DJ
132662006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
13267
13268 * Makefile.in (clean): Remove reg-mips64.c.
13269 (reg-mips64.c, reg-mips64.o): New rules.
13270 * configure.srv: Handle mips64. Include regset support for mips.
13271 * linux-mips-low.c (union mips_register): New.
13272 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
13273 (mips_breakpoint, mips_breakpoint_at): Use int.
13274 (mips_collect_register, mips_supply_register)
13275 (mips_collect_register_32bit, mips_supply_register_32bit)
13276 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13277 (mips_store_fpregset, target_regsets): New.
13278 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
13279
a13e2c95
UW
132802006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
13281
13282 * configure.srv: Add target "spu*-*-*".
13283 * Makefile.in (clean): Remove reg-spu.c.
13284 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
13285 * spu-low.c: New file.
13286
cb7283db
DJ
132872006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13288
13289 * configure.ac: Correct td_thr_tls_get_addr test.
13290 * configure: Regenerated.
13291
89be2091
DJ
132922006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13293
13294 * linux-low.c (linux_wait_for_event): Reformat. Use the
13295 pass_signals array.
13296 * remote-utils.c (decode_address_to_semicolon): New.
13297 * server.c (pass_signals, handle_general_set): New.
13298 (handle_query): Mention QPassSignals for qSupported.
13299 (main): Call handle_general_set.
13300 * server.h (pass_signals, decode_address_to_semicolon): New.
13301
000ef4f0
DJ
133022006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
13303
13304 * server.c (handle_query): Correct error handling for read_auxv.
13305
b7149293
UW
133062005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
13307
13308 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
13309 and srv_linux_thread_db to yes.
13310 * linux-s390-low.c (s390_fill_gregset): New function.
13311 (target_regsets): Define data structure.
13312
dae5f5cf
DJ
133132006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
13314
13315 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
13316 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
13317 * config.in, configure: Regenerated.
13318 * inferiors.c (gdb_id_to_thread): New function.
13319 (gdb_id_to_thread_id): Use it.
13320 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
13321 * linux-low.h (struct process_info): Add th member.
13322 (thread_db_get_tls_address): New prototype.
13323 * remote-utils.c (decode_address): Make non-static.
13324 * server.c (handle_query): Handle qGetTLSAddr.
13325 * server.h (gdb_id_to_thread, decode_address): New prototypes.
13326 * target.h (struct target_ops): Add get_tls_address.
13327 * thread-db.c (maybe_attach_thread): Save the thread handle.
13328 (thread_db_get_tls_address): New.
13329
32ca6d61
DJ
133302006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
13331
13332 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
13333 (linux_resume_one_process): Take a siginfo_t *. Update all
13334 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
13335 (struct pending_signals): Add a siginfo_t.
13336 (linux_wait_for_process): Always set last_status.
13337 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
13338 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
13339 * linux-low.h (struct process_info): Add last_status.
13340
5ffff7c1
DJ
133412006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
13342
13343 * remote-utils.c (try_rle): New function.
13344 (putpkt_binary): Use it.
13345
8695c747
DJ
133462006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
13347
13348 * Makefile.in (clean): Clean reg-x86-64-linux.c.
13349 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
13350 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
13351 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
13352 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
13353 point registers.
13354
290fadea
RS
133552006-08-08 Richard Sandiford <richard@codesourcery.com>
13356
13357 * server.c (terminal_fd): New variable.
13358 (old_foreground_pgrp): Likewise.
13359 (restore_old_foreground_pgrp): New function.
13360 (start_inferior): Record the terminal file descriptor in terminal_fd
13361 and its original foreground group in old_foreground_pgrp. Register
13362 restore_old_foreground_pgrp with atexit().
13363
9f2e1e63
DJ
133642006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
13365
13366 * server.c (handle_query): Correct qPart to qXfer.
13367
b80864fb
DJ
133682006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
13369
13370 * configure.ac: Check for more headers which are missing on
13371 Windows. Automatically supply -lwsock32 and USE_WIN32API.
13372 * configure.srv: Add Cygwin and mingw32.
13373 * remote-utils.c: Don't include headers unconditionally which
13374 are missing on mingw32. Include <winsock.h> for mingw32.
13375 (remote_open): Adjust for mingw32 support. Flush
13376 standard error after writing to it.
13377 (remote_close, putpkt_binary, input_interrupt, block_async_io)
13378 (unblock_async_io, enable_async_io, disable_async_io)
13379 (readchar, getpkt): Update for Winsock support.
13380 (prepare_resume_reply): Expect a protocol signal number.
13381 * server.c: Disable <sys/wait.h> on mingw32.
13382 (start_inferior): Adjust for mingw32 support. Flush
13383 standard error after writing to it.
13384 (attach_inferior): Likewise. Use protocol signal
13385 numbers.
13386 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
13387 and names.
13388 * win32-i386-low.c: New file.
13389 * Makefile.in (XM_CLIBS): Set.
13390 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
13391 (win32-i386-low.o): New dependency rule.
13392 * linux-low.c (linux_wait): Use target signal numbers.
13393 * target.h (struct target_ops): Doc fix.
13394 * server.h (target_signal_to_name): New prototype.
13395 * gdbreplay.c: Don't include headers unconditionally which
13396 are missing on mingw32. Include <winsock.h> for mingw32.
13397 (remote_close, remote_open): Adjust for Winsock support.
13398 * configure, config.in: Regenerated.
13399
0876f84a
DJ
134002006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13401
13402 * server.c (decode_xfer_read, write_qxfer_response): New.
13403 (handle_query): Take a packet length argument. Handle
13404 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
13405 the qSupported response.
13406 (main): Update call to handle_query.
13407
01f9e8fa
DJ
134082006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
13409
13410 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
13411 (putpkt_binary): Renamed from putpkt and adjusted for binary
13412 data.
13413 (putpkt): New wrapper for putpkt_binary.
13414 (readchar): Don't mask off the high bit.
13415 (decode_X_packet): New function.
13416 * server.c (main): Call putpkt_binary if a handler sets the packet
13417 length. Save the length of the incoming packet. Handle 'X'.
13418 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
13419
be2a5f71
DJ
134202006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
13421
13422 * server.c (handle_query): Handle qSupported.
13423
ea025f5f
DJ
134242006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13425
13426 * remote-utils.c (all_symbols_looked_up): New variable.
13427 (look_up_one_symbol): Check it.
13428 * server.h (look_up_one_symbol): New declaration.
13429 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
13430
9308fc88
DJ
134312006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13432
13433 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 13434 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
13435 (PTRACE_GET_THREAD_AREA): Define.
13436 (ps_get_thread_area): New function.
13437
52fb6437
NS
134382006-05-09 Nathan Sidwell <nathan@codesourcery.com>
13439
13440 * configure.srv (m68k*-*-uclinux*): New target.
13441 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
13442 (linux_resume_one_process): Remove extraneous cast.
13443 (linux_read_offsets): New.
13444 (linux_target_op): Add linux_read_offsets on mmuless systems.
13445 * server.c (handle_query): Add qOffsets logic.
13446 * target.h (struct target_ops): Add read_offsets.
13447
21b0f40c
DJ
134482006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13449
13450 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
13451 (PTRACE_GET_THREAD_AREA): Define.
13452 (ps_get_thread_area): New function.
13453 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
13454 (linux-x86-64-low.o): Update.
13455
0050a760
DJ
134562006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13457
13458 * configure.ac: Remove checks for prfpregset_t.
13459 * gdb_proc_service.h: New file.
13460 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
13461 new "gdb_proc_service.h".
13462 * proc-service.c: Likewise.
13463 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
13464 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
13465 * Makefile.in (gdb_proc_service_h): Updated.
13466 * configure, config.in: Regenerated.
13467
b92a518e
DJ
134682006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13469
13470 * remote-utils.c (prepare_resume_reply): Move declaration
13471 of gdb_id_from_wait to the top of the block.
13472
545587ee
DJ
134732006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
13474
13475 * linux-low.c (regsets_store_inferior_registers): Read the regset
13476 from the target before filling it.
13477
9db87ebd
DJ
134782006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13479
13480 * server.c (attach_inferior): Return SIGTRAP for a successful
13481 attach.
13482
dd24457d
DJ
134832006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13484
13485 * Makefile.in (OBS): Add version.o.
13486 (STAGESTUFF): Delete.
13487 (version.o): Add dependencies.
13488 (version.c): Replace rule.
13489 (clean): Remove version.c.
13490 * server.c (gdbserver_version): New.
13491 (gdbserver_usage): Use printf.
13492 (main): Handle --version and --help.
13493 * server.h (version, host_name): Add declarations.
13494
6f0f660e
EZ
134952005-12-23 Eli Zaretskii <eliz@gnu.org>
13496
889bf7c5
PA
13497 * linux-arm-low.c:
13498 * linux-arm-low.c:
13499 * inferiors.c:
13500 * i387-fp.h:
13501 * i387-fp.c:
13502 * gdbreplay.c:
13503 * regcache.c:
13504 * proc-service.c:
13505 * mem-break.h:
13506 * mem-break.c:
13507 * linux-x86-64-low.c:
13508 * linux-sh-low.c:
13509 * linux-s390-low.c:
13510 * linux-ppc64-low.c:
13511 * linux-ppc-low.c:
13512 * linux-mips-low.c:
13513 * linux-m68k-low.c:
13514 * linux-m32r-low.c:
13515 * linux-low.h:
13516 * linux-low.c:
13517 * linux-ia64-low.c:
13518 * linux-i386-low.c:
13519 * linux-crisv32-low.c:
13520 * thread-db.c:
13521 * terminal.h:
13522 * target.h:
13523 * target.c:
13524 * server.h:
13525 * server.c:
13526 * remote-utils.c:
13527 * regcache.h:
13528 * utils.c:
13529 * Makefile.in:
13530 * configure.ac:
6f0f660e
EZ
13531 * gdbserver.1: Add (C) after Copyright. Update the FSF
13532 address.
13533
9d1fb177
DJ
135342005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
13535
13536 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
13537 (arm_breakpoint_at): Recognize both breakpoints.
13538 (the_low_target): Use the correct breakpoint instruction.
13539
011a70c2
DJ
135402005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
13541
13542 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
13543 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
13544 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
13545 (the_low_target): Update.
13546
7fb85e41
AS
135472005-10-25 Andreas Schwab <schwab@suse.de>
13548
13549 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
13550
13551 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
13552 (ia64_num_regs): Reduce to 462.
13553
3db0444b
DJ
135542005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
13555
13556 * acinclude.m4: Correct quoting.
13557 * aclocal.m4: Regenerated.
13558
13559 Suggested by SZOKOVACS Robert <szo@ies.hu>:
13560 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
13561 (thread_db_init): Call thread_db_err_str.
13562 * configure.ac: Check for TD_VERSION.
13563 * config.in, configure: Regenerated.
13564
bee0189a
DJ
135652005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13566
13567 * server.h (error, fatal, warning): Add ATTR_FORMAT.
13568
e9d25b98
DJ
135692005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13570
13571 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
13572 is not available. Define HAVE_PTRACE_GETREGS if it is.
13573 * config.in, configure: Regenerated.
13574 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
13575 * linux-i386-low.c, linux-m68k-low.c: Update to use
13576 HAVE_PTRACE_GETREGS.
13577 * linux-low.c (regsets_fetch_inferior_registers)
13578 (regsets_store_inferior_registers): Only return 0 if we processed
13579 GENERAL_REGS.
13580 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
13581 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
13582
a06660f7
DJ
135832005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13584
13585 * inferiors.c (struct thread_info): Add gdb_id.
13586 (add_thread): Add gdb_id argument.
13587 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
13588 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
13589 calls to add_thread.
13590 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
13591 * server.c (handle_query): Use thread_to_gdb_id.
13592 (handle_v_cont, main): Use gdb_id_to_thread_id.
13593 * server.h (add_thread): Update prototype.
13594 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
13595 prototypes.
13596
5a1f5858
DJ
135972005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13598
13599 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
13600 left-padded registers.
13601 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
13602 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
13603
e122f1f5
SE
136042005-07-01 Steve Ellcey <sje@cup.hp.com>
13605
13606 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
13607 * configure: Regenerate.
13608 * config.in: Regenerate.
13609 * server.h (NEED_DECLARATION_STRERROR):
13610 Replace with !HAVE_DECL_STRERROR.
13611
d592fa2f
DJ
136122005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
13613
13614 * linux-low.c (linux_wait, linux_send_signal): Don't test
13615 an unsigned long variable for > 0 if it could be MAX_ULONG.
13616 * server.c (myresume): Likewise.
13617 * target.c (set_desired_inferior): Likewise.
13618
ccbd4912
MK
136192005-06-13 Mark Kettenis <kettenis@gnu.org>
13620
13621 * configure.ac: Simplify and improve check for socklen_t.
13622 * configure, config.in: Regenerate.
13623
f450004a
DJ
136242005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
13625
13626 * acconfig.h: Remove.
13627 * configure.ac: Add a test for socklen_t. Use three-argument
13628 AC_DEFINE throughout.
13629 * config.in: Regenerated using autoheader 2.59.
13630 * configure: Regenerated.
13631
13632 * gdbreplay.c (socklen_t): Provide a default.
13633 (remote_open): Use socklen_t.
13634 * remote-utils.c (socklen_t): Provide a default.
13635 (remote_open): Use socklen_t.
13636 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
13637 unsigned char.
13638
13639 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
13640 char for buffers.
13641 * linux-low.c (linux_read_memory, linux_write_memory)
13642 (linux_read_auxv): Likewise.
13643 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
13644 (check_mem_write): Likewise.
13645 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
13646 Likewise.
13647 * regcache.c (struct inferior_rgcache_data, registers_to_string)
13648 (registers_from_string, register_data): Likewise.
13649 * server.c (handle_query, main): Likewise.
13650 * server.h (convert_ascii_to_int, convert_int_to_ascii)
13651 (decode_M_packet): Likewise.
13652 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
13653 * target.h (struct target_ops): Update read_memory, write_memory,
13654 and read_auxv.
13655 (read_inferior_memory, write_inferior_memory): Update.
13656 * linux-low.h (struct linux_target_ops): Change type of breakpoint
13657 to unsigned char *.
13658 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
13659 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
13660 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
13661 linux-s390-low.c, linux-sh-low.c: Update for changes in
13662 read_inferior_memory and the_low_target->breakpoint.
13663
eee84df1
DJ
136642005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
13665
13666 * Makefile.in (SFILES): Add linux-ppc64-low.c.
13667 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
13668 * configure.srv: Add powerpc64-*-linux*.
13669 * linux-ppc64-low.c: New file.
13670
45b134e5
OF
136712005-05-23 Orjan Friberg <orjanf@axis.com>
13672
13673 * linux-cris-low.c: New file with support for CRIS.
13674 * linux-crisv32-low.c: Ditto for CRISv32.
13675 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
13676 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 13677 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
13678 reg-crisv32.o, and reg-crisv32.c to make rules.
13679 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
13680 recognized targets.
13681
48d93c75
UW
136822005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
13683
13684 * linux-low.c (fetch_register): Ensure buffer size is a multiple
13685 of sizeof (PTRACE_XFER_TYPE).
13686 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
13687
e013ee27
OF
136882005-05-12 Orjan Friberg <orjanf@axis.com>
13689
889bf7c5 13690 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
13691 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
13692 pointers for hardware watchpoint support.
13693 * linux-low.h (struct linux_target_ops): Ditto.
13694 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
13695 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
13696 to linux_target_ops.
13697 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
13698 reply packet.
13699 * server.c (main): Recognize 'Z' and 'z' packets.
13700
b0ded00b
UW
137012005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
13702
13703 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
13704 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
13705 (the_low_target): Add new members.
13706
8643e2ad
DJ
137072005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13708
13709 * proc-service.c (ps_lgetregs): Search all_processes instead of
13710 all_threads.
13711
fc620387
DJ
137122005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13713
13714 * server.c (start_inferior): Change return type to int.
13715 (attach_inferior): Change sigptr to int *.
13716 (handle_v_cont, handle_v_requests): Change signal to int *.
13717 (main): Change signal to int.
13718
137192005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
13720
13721 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
13722 * configure.srv: Add m32r*-*-linux*.
13723 * linux-m32r-low.c: New file.
13724
e0e76420
DJ
137252005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
13726
13727 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
13728
a1928bad
DJ
137292005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13730
13731 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
13732 Take unsigned long arguments for PIDs.
13733 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
13734 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
13735 (wait_for_sigstop, linux_resume_one_process)
13736 (regsets_fetch_inferior_registers, linux_send_signal)
13737 (linux_read_auxv): Likewise. Update the types of variables holding
13738 PIDs. Update format string specifiers.
13739 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
13740 * remote-utils.c (prepare_resume_reply): Likewise.
13741 * server.c (cont_thread, general_thread, step_thread)
13742 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
13743 unsigned long.
13744 (handle_query): Update format specifiers.
13745 (handle_v_cont, main): Use strtoul for thread IDs.
13746 * server.h (struct inferior_list_entry): Use unsigned long for ID.
13747 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
13748 (general_thread, step_thread, thread_from_wait)
13749 (old_thread_from_wait): Update.
13750 * target.h (struct thread_resume): Use unsigned long for THREAD.
13751 (struct target_ops): Use unsigned long for arguments to attach and
13752 thread_alive.
13753
dcdb98d2
DJ
137542005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
13755
13756 * acinclude.m4: Include bfd/bfd.m4 directly.
13757 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
13758 <agriffis@toolchain.org>.
13759 * aclocal.m4, configure: Regenerated.
13760
bec39cab
AC
137612005-01-07 Andrew Cagney <cagney@gnu.org>
13762
13763 * configure.ac: Rename configure.in, require autoconf 2.59.
13764 * configure: Re-generate.
13765
434c4c77
DJ
137662004-12-08 Daniel Jacobowitz <dan@debian.org>
13767
13768 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
13769 LIBS when finished.
13770 * aclocal.m4: Regenerated.
13771 * configure: Regenerated.
13772
db1d3e1b
AS
137732004-11-21 Andreas Schwab <schwab@suse.de>
13774
13775 * linux-m68k-low.c (m68k_num_gregs): Define.
13776 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
13777 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
13778 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
13779 (m68k_breakpoint_at): New. Add to the_low_target.
13780
13781 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
13782 srv_linux_thread_db to yes.
13783
43360365
JB
137842004-10-20 Joel Brobecker <brobecker@gnat.com>
13785
13786 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
13787 (ARCH_SET_FS): Likewise.
13788 (ARCH_GET_FS): Likewise.
13789 (ARCH_GET_GS): Likewise.
13790
fd500816
DJ
137912004-10-16 Daniel Jacobowitz <dan@debian.org>
13792
13793 * linux-i386-low.c (ps_get_thread_area): New.
13794 * linux-x86-64-low.c (ps_get_thread_area): New.
13795 * linux-low.c: Include <sys/syscall.h>.
13796 (linux_kill_one_process): Don't kill the first thread here.
13797 (linux_kill): Kill the first thread here.
13798 (kill_lwp): New function.
13799 (send_sigstop, linux_send_signal): Use it.
13800 * proc-service.c: Clean up #ifdefs.
13801 (fpregset_info): Delete.
13802 (ps_lgetregs): Update and enable implementation.
13803 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
13804 implementations.
13805 * remote-utils.c (struct sym_cache, symbol_cache): New.
13806 (input_interrupt): Print a clearer message.
13807 (async_io_enabled): New variable.
13808 (enable_async_io, disable_async_io): Use it. Update comments.
13809 (look_up_one_symbol): Use the symbol cache.
13810 * thread-db.c (thread_db_look_up_symbols): New function.
13811 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
13812
f6de3c42
DJ
138132004-10-16 Daniel Jacobowitz <dan@debian.org>
13814
13815 * configure.in: Test for -rdynamic.
13816 * configure: Regenerated.
13817 * Makefile (INTERNAL_LDFLAGS): New.
13818 (gdbserver, gdbreplay): Use it.
13819
2c0fc042
AC
138202004-09-02 Andrew Cagney <cagney@gnu.org>
13821
13822 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
13823
075b3282
DJ
138242004-03-23 Daniel Jacobowitz <drow@mvista.com>
13825
13826 * linux-low.c (linux_wait): Clear all_processes list also.
13827
fa6a77dc
DJ
138282004-03-12 Daniel Jacobowitz <drow@mvista.com>
13829
13830 * linux-low.c: Include <errno.h>. Remove extern declaration of
13831 errno.
13832
6d782a97
DJ
138332004-03-12 Daniel Jacobowitz <drow@mvista.com>
13834
13835 * gdbreplay.c, server.h, utils.c: Update copyright years.
13836
3a7fb99b
DJ
138372004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
13838
13839 * server.c (main): Print child status or termination signal from
13840 variable 'signal', not 'sig'.
13841
c3e735a6
DJ
138422004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
13843
13844 * linux-low.c (linux_read_memory): Change return type to
13845 int. Check for and return error from ptrace().
13846 * target.c (read_inferior_memory): Change return type to int. Pass
13847 back return status from the_target->read_memory().
13848 * target.h (struct target_ops): Adapt *read_memory() prototype.
13849 Update comment.
13850 (read_inferior_memory): Adapt prototype.
13851 * server.c (main): Return an error packet if
13852 read_inferior_memory() returns an error.
13853
a59d1c82
DJ
138542004-03-04 Daniel Jacobowitz <drow@mvista.com>
13855
13856 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
13857 Unify with other clean targets.
13858
dc3f8883
DJ
138592004-02-29 Daniel Jacobowitz <drow@mvista.com>
13860
13861 * server.c (handle_v_cont): Call set_desired_inferior.
13862
89a208da
DJ
138632004-02-29 Daniel Jacobowitz <drow@mvista.com>
13864
13865 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
13866
62ea82f5
DJ
138672004-02-29 Daniel Jacobowitz <drow@mvista.com>
13868
13869 * linux-low.c (linux_wait): Unblock async I/O.
13870 (linux_resume): Block and enable async I/O.
13871 * remote-utils.c (block_async_io, unblock_async_io): New functions.
13872 * server.h (block_async_io, unblock_async_io): Add prototypes.
13873
6910d122
DJ
138742004-02-29 Daniel Jacobowitz <drow@mvista.com>
13875
13876 * remote-utils.c (remote_open): Print a status notice after
13877 opening a TCP port.
13878 * server.c (attach_inferior): Print a status notice after
13879 attaching.
13880
138812004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
13882
13883 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
13884
c89dc5d4
DJ
138852004-02-26 Daniel Jacobowitz <drow@mvista.com>
13886
13887 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
13888 error packet.
13889 * server.c, target.h: Update copyright years.
13890
4b8dad4a
RM
138912004-02-25 Roland McGrath <roland@redhat.com>
13892
13893 * target.h (struct target_ops): New member `read_auxv'.
13894 * server.c (handle_query): Handle qPart:auxv:read: query using that.
13895 * linux-low.c (linux_read_auxv): New function.
13896 (linux_target_ops): Initialize `read_auxv' member to that.
13897
d7446758
JB
138982004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
13899
13900 Committed by Jim Blandy <jimb@redhat.com>.
13901
13902 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 13903 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
13904 instead of GPR_SIZE to distiguish s390 and s390x targets.
13905
5544ad89
DJ
139062004-01-31 Daniel Jacobowitz <drow@mvista.com>
13907
13908 * linux-low.c: Update copyright year.
13909 (check_removed_breakpoint): Clear pending_is_breakpoint.
13910 (linux_set_resume_request, linux_queue_one_thread)
13911 (resume_status_pending_p): New functions.
13912 (linux_continue_one_thread): Use process->resume.
13913 (linux_resume): Only resume threads if there are no pending events.
13914 * linux-low.h (struct process_info): Add resume request
13915 pointer.
13916
2a68b70e
DJ
139172004-01-30 Daniel Jacobowitz <drow@mvista.com>
13918
13919 * regcache.c (new_register_cache): Clear the allocated register
13920 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
13921
64386c31
DJ
139222003-10-13 Daniel Jacobowitz <drow@mvista.com>
13923
13924 * linux-low.c (linux_resume): Take a struct thread_resume *
13925 argument.
13926 (linux_wait): Update call.
13927 (resume_ptr): New static variable.
13928 (linux_continue_one_thread): Renamed from
13929 linux_continue_one_process. Use resume_ptr.
13930 (linux_resume): Use linux_continue_one_thread.
13931 * server.c (handle_v_cont, handle_v_requests): New functions.
13932 (myresume): New function.
13933 (main): Handle 'v' case.
13934 * target.h (struct thread_resume): New type.
13935 (struct target_ops): Change argument of "resume" to struct
13936 thread_resume *.
13937 (myresume): Delete macro.
13938
c938e9b0
L
139392003-08-08 H.J. Lu <hongjiu.lu@intel.com>
13940
13941 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
13942 (uninstall): Support DESTDIR.
13943
7f313d07
BC
13944Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
13945
13946 * configure.srv: Add xscale*linux copy of arm*linux entry.
13947
3b2fc2ea
DJ
139482003-07-24 Daniel Jacobowitz <drow@mvista.com>
13949
13950 * linux-arm-low.c (arm_reinsert_addr): New function.
13951 (the_low_target): Add arm_reinsert_addr.
13952
1c0a559e
MK
139532003-07-08 Mark Kettenis <kettenis@gnu.org>
13954
13955 * mem-break.c: Remove whitespace at end of file.
13956
43d5792c
DJ
139572003-06-28 Daniel Jacobowitz <drow@mvista.com>
13958
13959 * configure.in: Check whether we need to prototype strerror.
13960 * server.h: Optionally prototype strerror.
13961 * gdbreplay.c (perror_with_name): Use strerror.
13962 * linux-low.c (linux_attach_lwp): Use strerror.
13963 * utils.c (perror_with_name): Use strerror.
13964 * config.in, configure: Regenerated.
13965
c8a86edf
DJ
139662003-06-28 Daniel Jacobowitz <drow@mvista.com>
13967
13968 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
13969 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
13970
73d37363
DJ
139712003-06-20 Daniel Jacobowitz <drow@mvista.com>
13972
13973 * Makefile.in (SFILES): Update.
13974 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
13975 low-sun3.c: Remove files.
13976
6ad8ae5c
DJ
139772003-06-17 Daniel Jacobowitz <drow@mvista.com>
13978
13979 * linux-low.c: Move comment to linux_thread_alive where it belonged.
13980 (linux_detach_one_process, linux_detach): New functions.
13981 (linux_target_ops): Add linux_detach.
13982 * server.c (main): Handle 'D' packet.
13983 * target.h (struct target_ops): Add "detach" member.
13984 (detach_inferior): Define.
13985
1581182a
MK
139862003-06-13 Mark Kettenis <kettenis@gnu.org>
13987
13988 From Kelley Cook <kelleycook@wideopenwest.com>:
13989 * configure.srv: Accept i[34567]86 variants.
13990
e5379b03
DJ
139912003-06-05 Daniel Jacobowitz <drow@mvista.com>
13992
13993 * linux-low.c (linux_wait_for_event): Correct comment typos.
13994 (linux_resume_one_process): Call check_removed_breakpoint.
13995 (linux_send_signal): New function.
13996 (linux_target_ops): Add linux_send_signal.
13997 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
13998 of kill.
13999 * target.h (struct target_ops): Add send_signal.
14000
2ff29de4
JB
140012003-05-29 Jim Blandy <jimb@redhat.com>
14002
14003 * linux-low.c (usr_store_inferior_registers): Transfer buf in
14004 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
14005 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
14006 away part of the register's value.
14007
254787d4
DJ
140082003-03-26 Daniel Jacobowitz <drow@mvista.com>
14009
14010 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
14011 (linux_wait_for_event, linux_init_signals): Likewise.
14012
94e10508
DJ
140132003-03-17 Daniel Jacobowitz <drow@mvista.com>
14014
14015 * configure.in: Check for stdlib.h.
14016 * configure: Regenerated.
14017 * config.in: Regenerated.
14018
4c0711e0
DJ
140192003-01-04 Andreas Schwab <schwab@suse.de>
14020
14021 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
14022
ef66e766
AC
140232003-01-02 Andrew Cagney <ac131313@redhat.com>
14024
14025 * Makefile.in: Remove obsolete code.
14026
a1358604
DJ
140272002-11-20 Daniel Jacobowitz <drow@mvista.com>
14028
14029 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
14030 defined(PT_FPR0_HI).
14031
23ce3b1c
DJ
140322002-11-17 Stuart Hughes <seh@zee2.com>
14033
14034 * linux-arm-low.c (arm_num_regs): Increase.
14035 (arm_regmap): Include status register.
14036
140372002-11-17 Daniel Jacobowitz <drow@mvista.com>
14038
14039 * linux-low.c (register_addr): Remove incorrect -1 check.
14040
a9fa9f7d
DJ
140412002-08-29 Daniel Jacobowitz <drow@mvista.com>
14042
14043 * linux-low.c (linux_create_inferior): Call setpgid. Return
14044 the new PID.
14045 (unstopped_p, linux_signal_pid): Remove.
14046 (linux_target_ops): Remove linux_signal_pid.
14047 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
14048 global instead of target method.
14049 * target.h (struct target_ops): Remove signal_pid. Update comment
14050 for create_inferior.
14051 * server.c (signal_pid): New variable.
14052 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 14053 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
14054 (attach_inferior): Set signal_pid.
14055
17574093
DJ
140562002-08-23 Daniel Jacobowitz <drow@mvista.com>
14057
14058 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
14059
140602002-08-20 Jim Blandy <jimb@redhat.com>
14061
14062 * Makefile.in (LDFLAGS): Allow the configure script to establish a
14063 default for this.
14064
140652002-08-01 Andrew Cagney <cagney@redhat.com>
14066
14067 * Makefile.in: Make chill references obsolete.
14068
140692002-07-24 Kevin Buettner <kevinb@redhat.com>
14070
14071 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
14072 * configure: Regenerate.
14073 * config.in: Regenerate.
14074
140752002-07-09 David O'Brien <obrien@FreeBSD.org>
14076
14077 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
14078 (perror_with_name, remote_close, remote_open, expect, play): Static.
14079
140802002-07-04 Michal Ludvig <mludvig@suse.cz>
14081
4b8dad4a 14082 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
14083 byte offsets instead of an array of indexes.
14084 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
14085
140862002-06-13 Daniel Jacobowitz <drow@mvista.com>
14087
14088 * regcache.c: Add comment.
14089
140902002-06-11 Daniel Jacobowitz <drow@mvista.com>
14091
14092 * thread-db.c: New file.
14093 * proc-service.c: New file.
14094 * acinclude.m4: New file.
14095 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
14096 proc-service.o, and thread-db.o.
14097 (linux-low.o): Add USE_THREAD_DB.
14098 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
14099 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
14100 * aclocal.m4: Regenerated.
14101 * config.in: Regenerated.
14102 * configure: Regenerated.
14103 * configure.in: Check for proc_service.h, sys/procfs.h,
14104 thread_db.h, and linux/elf.h headrs.
14105 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
14106 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
14107 Check for -lthread_db and thread support.
14108 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
14109 PowerPC, and SuperH.
14110 * i387-fp.c: Constify arguments.
14111 * i387-fp.h: Likewise.
14112 * inferiors.c: (struct thread_info): Renamed from
14113 `struct inferior_info'. Remove PID member. Use generic inferior
14114 list header. All uses updated.
14115 (inferiors, signal_pid): Removed.
14116 (all_threads): New variable.
14117 (get_thread): Define.
14118 (add_inferior_to_list): New function.
14119 (for_each_inferior): New function.
14120 (change_inferior_id): New function.
14121 (add_inferior): Removed.
14122 (remove_inferior): New function.
14123 (add_thread): New function.
14124 (free_one_thread): New function.
14125 (remove_thread): New function.
14126 (clear_inferiors): Use for_each_inferior and free_one_thread.
14127 (find_inferior): New function.
14128 (find_inferior_id): New function.
14129 (inferior_target_data): Update argument type.
14130 (set_inferior_target_data): Likewise.
14131 (inferior_regcache_data): Likewise.
14132 (set_inferior_regcache_data): Likewise.
14133 * linux-low.c (linux_bp_reinsert): Remove.
14134 (all_processes, stopping_threads, using_thrads)
14135 (struct pending_signals, debug_threads, pid_of): New.
14136 (inferior_pid): Replace with macro.
14137 (struct inferior_linux_data): Remove.
14138 (get_stop_pc, add_process): New functions.
14139 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
14140 Use add_process and add_thread.
14141 (linux_attach_lwp): New function, based on old linux_attach. Use
14142 add_process and add_thread. Set stop_expected for new threads.
14143 (linux_attach): New function.
14144 (linux_kill_one_process): New function.
14145 (linux_kill): Kill all LWPs.
14146 (linux_thread_alive): Use find_inferior_id.
14147 (check_removed_breakpoints, status_pending_p): New functions.
14148 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
14149 Update. Use WNOHANG. Wait for cloned processes also. Update process
14150 struct for the found process.
14151 (linux_wait_for_event): New function.
14152 (linux_wait): Use it. Support LWPs.
14153 (send_sigstop, wait_for_sigstop, stop_all_processes)
14154 (linux_resume_one_process, linux_continue_one_process): New functions.
14155 (linux_resume): Support LWPs.
14156 (REGISTER_RAW_SIZE): Remove.
14157 (fetch_register): Use register_size instead. Call supply_register.
14158 (usr_store_inferior_registers): Likewise. Call collect_register.
14159 Fix recursive case.
14160 (regsets_fetch_inferior_registers): Improve error message.
14161 (regsets_store_inferior_registers): Add debugging.
14162 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
14163 (unstopped_p, linux_signal_pid): New functions.
14164 (linux_target_ops): Add linux_signal_pid.
14165 (linux_init_signals): New function.
14166 (initialize_low): Call it. Initialize using_threads.
14167 * regcache.c (inferior_regcache_data): Add valid
14168 flag.
14169 (get_regcache): Fetch registers lazily. Add fetch argument
14170 and update all callers.
14171 (regcache_invalidate_one, regcache_invalidate): New
14172 functions.
14173 (new_register_cache): Renamed from create_register_cache.
14174 Return the new regcache.
14175 (free_register_cache): Change argument to a void *.
14176 (registers_to_string, registers_from_string): Call get_regcache
14177 with fetch flag set.
14178 (register_data): Make static. Pass fetch flag to get_regcache.
14179 (supply_register): Call get_regcache with fetch flag clear.
14180 (collect_register): Call get_regcache with fetch flag set.
14181 (collect_register_as_string): New function.
14182 * regcache.h: Update.
14183 * remote-utils.c (putpkt): Flush after debug output and use
14184 stderr.
14185 Handle input interrupts while waiting for an ACK.
14186 (input_interrupt): Use signal_pid method.
14187 (getpkt): Flush after debug output and use stderr.
14188 (outreg): Use collect_register_as_string.
14189 (new_thread_notify, dead_thread_notify): New functions.
14190 (prepare_resume_reply): Check using_threads. Set thread_from_wait
14191 and general_thread.
14192 (look_up_one_symbol): Flush after debug output.
14193 * server.c (step_thread, server_waiting): New variables.
14194 (start_inferior): Don't use signal_pid. Update call to mywait.
14195 (attach_inferior): Update call to mywait.
14196 (handle_query): Handle qfThreadInfo and qsThreadInfo.
14197 (main): Don't fetch/store registers explicitly. Use
14198 set_desired_inferior. Support proposed ``Hs'' packet. Update
14199 calls to mywait.
14200 * server.h: Update.
14201 (struct inferior_list, struct_inferior_list_entry): New.
14202 * target.c (set_desired_inferior): New.
14203 (write_inferior_memory): Constify.
14204 (mywait): New function.
14205 * target.h: Update.
14206 (struct target_ops): New signal_pid method.
14207 (mywait): Removed macro, added prototype.
14208
14209 * linux-low.h (regset_func): Removed.
14210 (regset_fill_func, regset_store_func): New.
14211 (enum regset_type): New.
14212 (struct regset_info): Add type field. Use new operation types.
14213 (struct linux_target_ops): stop_pc renamed to get_pc.
14214 Add decr_pc_after_break and breakpoint_at.
14215 (get_process, get_thread_proess, get_process_thread)
14216 (strut process_info, all_processes, linux_attach_lwp)
14217 (thread_db_init): New.
14218
14219 * linux-arm-low.c (arm_get_pc, arm_set_pc,
14220 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
14221 (the_low_target): Add new members.
14222 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
14223 (i386_store_fpxregset): Constify.
14224 (target_regsets): Add new kind identifier.
14225 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
14226 (i386_set_pc): Add debugging.
14227 (i386_breakpoint_at): New function.
14228 (the_low_target): Add new members.
14229 * linux-mips-low.c (mips_get_pc, mips_set_pc)
14230 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
14231 (mips_breakpoint_at): New.
14232 (the_low_target): Add new members.
14233 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
14234 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
14235 (the_low_target): Add new members.
14236 * linux-sh-low.c (sh_get_pc, sh_set_pc)
14237 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
14238 (the_low_target): Add new members.
14239 * linux-x86-64-low.c (target_regsets): Add new kind
14240 identifier.
14241
142422002-05-15 Daniel Jacobowitz <drow@mvista.com>
14243
14244 From Martin Pool <mbp@samba.org>:
14245 * server.c (gdbserver_usage): New function.
14246 (main): Call it.
14247
142482002-05-14 Daniel Jacobowitz <drow@mvista.com>
14249
14250 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
14251 stop_at -> stop_pc.
14252
142532002-05-04 Andrew Cagney <ac131313@redhat.com>
14254
14255 * Makefile.in: Remove obsolete code.
14256
142572002-04-24 Michal Ludvig <mludvig@suse.cz>
14258
14259 * linux-low.c (regsets_fetch_inferior_registers),
14260 (regsets_store_inferior_registers): Removed cast to int from
14261 ptrace() calls.
14262 * regcache.h: Added declaration of struct inferior_info.
14263
142642002-04-20 Daniel Jacobowitz <drow@mvista.com>
14265
14266 * inferiors.c (struct inferior_info): Add regcache_data.
14267 (add_inferior): Call create_register_cache.
14268 (clear_inferiors): Call free_register_cache.
14269 (inferior_regcache_data, set_inferior_regcache_data): New functions.
14270 * regcache.c (struct inferior_regcache_data): New.
14271 (registers): Remove.
14272 (get_regcache): New function.
14273 (create_register_cache, free_register_cache): New functions.
14274 (set_register_cache): Don't initialize the register cache here.
14275 (registers_to_string, registers_from_string, register_data): Call
14276 get_regcache.
14277 * regcache.h: Add prototypes.
14278 * server.h: Likewise.
14279
142802002-04-20 Daniel Jacobowitz <drow@mvista.com>
14281
14282 * mem-break.c: New file.
14283 * mem-break.h: New file.
14284 * Makefile.in: Add mem-break.o rule; update server.h
14285 dependencies.
14286 * inferiors.c (struct inferior_info): Add target_data
14287 member.
14288 (clear_inferiors): Free target_data member if set.
14289 (inferior_target_data, set_inferior_target_data): New functions.
14290 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
14291 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
14292 * linux-low.c (linux_bp_reinsert): New variable.
14293 (struct inferior_linux_data): New.
14294 (linux_create_inferior): Use set_inferior_target_data.
14295 (linux_attach): Likewise. Call add_inferior.
14296 (linux_wait_for_one_inferior): New function.
14297 (linux_wait): Call it.
14298 (linux_write_memory): Add const.
14299 (initialize_low): Call set_breakpoint_data.
14300 * linux-low.h (struct linux_target_ops): Add breakpoint
14301 handling members.
14302 * server.c (attach_inferior): Remove extra add_inferior
14303 call.
14304 * server.h: Include mem-break.h. Update inferior.c
14305 prototypes.
14306 * target.c (read_inferior_memory)
14307 (write_inferior_memory): New functions.
14308 * target.h (read_inferior_memory)
14309 (write_inferior_memory): Change macros to prototypes.
14310 (struct target_ops): Update comments. Add const to write_memory
14311 definition.
14312
143132002-04-11 Daniel Jacobowitz <drow@mvista.com>
14314
14315 * linux-low.c (usr_store_inferior_registers): Support
14316 registers which are allowed to fail to store.
14317 * linux-low.h (linux_target_ops): Likewise.
14318 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
14319 (ppc_cannot_store_register): FPSCR may not be storable.
14320
143212002-04-09 Daniel Jacobowitz <drow@mvista.com>
14322
14323 * server.h: Include <string.h> if HAVE_STRING_H.
14324 * ChangeLog: Correct paths in last ChangeLog entry.
14325
143262002-04-09 Daniel Jacobowitz <drow@mvista.com>
14327
14328 * linux-low.h: Remove obsolete prototypes.
14329 (struct linux_target_ops): New.
14330 (extern the_low_target): New.
14331 * linux-low.c (num_regs, regmap): Remove declarations.
14332 (register_addr): Use the_low_target explicitly.
14333 (fetch_register): Likewise.
14334 (usr_fetch_inferior_registers): Likewise.
14335 (usr_store_inferior_registers): Likewise.
14336 * linux-arm-low.c (num_regs): Remove.
14337 (arm_num_regs): Define.
14338 (arm_regmap): Renamed from regmap, made static.
14339 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
14340 made static.
14341 (arm_cannot_store_register): Renamed from cannot_store_register,
14342 made static.
14343 (the_low_target): New.
14344 * linux-i386-low.c (num_regs): Remove.
14345 (i386_num_regs): Define.
14346 (i386_regmap): Renamed from regmap, made static.
14347 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
14348 made static.
14349 (i386_cannot_store_register): Renamed from cannot_store_register,
14350 made static.
14351 (the_low_target): New.
14352 * linux-ia64-low.c (num_regs): Remove.
14353 (ia64_num_regs): Define.
14354 (ia64_regmap): Renamed from regmap, made static.
14355 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
14356 made static.
14357 (ia64_cannot_store_register): Renamed from cannot_store_register,
14358 made static.
14359 (the_low_target): New.
14360 * linux-m68k-low.c (num_regs): Remove.
14361 (m68k_num_regs): Define.
14362 (m68k_regmap): Renamed from regmap, made static.
14363 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
14364 made static.
14365 (m68k_cannot_store_register): Renamed from cannot_store_register,
14366 made static.
14367 (the_low_target): New.
14368 * linux-mips-low.c (num_regs): Remove.
14369 (mips_num_regs): Define.
14370 (mips_regmap): Renamed from regmap, made static.
14371 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
14372 made static.
14373 (mips_cannot_store_register): Renamed from cannot_store_register,
14374 made static.
14375 (the_low_target): New.
14376 * linux-ppc-low.c (num_regs): Remove.
14377 (ppc_num_regs): Define.
14378 (ppc_regmap): Renamed from regmap, made static.
14379 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
14380 made static.
14381 (ppc_cannot_store_register): Renamed from cannot_store_register,
14382 made static.
14383 (the_low_target): New.
14384 * linux-s390-low.c (num_regs): Remove.
14385 (s390_num_regs): Define.
14386 (s390_regmap): Renamed from regmap, made static.
14387 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
14388 made static.
14389 (s390_cannot_store_register): Renamed from cannot_store_register,
14390 made static.
14391 (the_low_target): New.
14392 * linux-sh-low.c (num_regs): Remove.
14393 (sh_num_regs): Define.
14394 (sh_regmap): Renamed from regmap, made static.
14395 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
14396 made static.
14397 (sh_cannot_store_register): Renamed from cannot_store_register,
14398 made static.
14399 (the_low_target): New.
14400 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
14401 (the_low_target): New.
14402
144032002-04-09 Daniel Jacobowitz <drow@mvista.com>
14404
14405 * Makefile.in: Add stamp-h target.
14406 * configure.in: Create stamp-h.
14407 * configure: Regenerated.
14408
144092002-04-09 Daniel Jacobowitz <drow@mvista.com>
14410
14411 * inferiors.c: New file.
14412 * target.c: New file.
14413 * target.h: New file.
14414 * Makefile.in: Add target.o and inferiors.o. Update
14415 dependencies.
14416 * linux-low.c (inferior_pid): New static variable,
14417 moved from server.c.
14418 (linux_create_inferior): Renamed from create_inferior.
14419 Call add_inferior. Return 0 on success instead of a PID.
14420 (linux_attach): Renamed from myattach.
14421 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
14422 (linux_thread_alive): Renamed from mythread_alive.
14423 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
14424 child dies.
14425 (linux_resume): Renamed from myresume. Add missing ``return 0''.
14426 (regsets_store_inferior_registers): Correct error message.
14427 Add missing ``return 0''.
14428 (linux_fetch_registers): Renamed from fetch_inferior_registers.
14429 (linux_store_registers): Renamed from store_inferior_registers.
14430 (linux_read_memory): Renamed from read_inferior_memory.
14431 (linux_write_memory): Renamed from write_inferior_memory.
14432 (linux_target_ops): New structure.
14433 (initialize_low): Call set_target_ops ().
14434 * remote-utils.c (unhexify): New function.
14435 (hexify): New function.
14436 (input_interrupt): Send signals to ``signal_pid''.
14437 * server.c (inferior_pid): Remove.
14438 (start_inferior): Update create_inferior call.
14439 (attach_inferior): Call add_inferior.
14440 (handle_query): New function.
14441 (main): Call handle_query for `q' packets.
14442 * server.h: Include "target.h". Remove obsolete prototypes.
14443 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
14444
144452002-04-09 Daniel Jacobowitz <drow@mvista.com>
14446
14447 * Makefile.in: Add WARN_CFLAGS. Update configury
14448 dependencies.
14449 * configure.in: Check for <string.h>
14450 * configure: Regenerate.
14451 * config.in: Regenerate.
14452 * gdbreplay.c: Include needed system headers.
14453 (remote_open): Remove strchr prototype.
14454 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
14455 * regcache.c (supply_register): Change buf argument to const void *.
14456 (supply_register_by_name): Likewise.
14457 (collect_register): Change buf argument to void *.
14458 (collect_register_by_name): Likewise.
14459 * regcache.h: Add missing prototypes.
14460 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
14461 * server.c (handle_query): New function.
14462 (attached): New static variable, moved out of main.
14463 (main): Quiet longjmp clobber warnings.
14464 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
14465 * utils.c (error): Remove NORETURN.
14466 (fatal): Likewise.
This page took 2.748722 seconds and 4 git commands to generate.