]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
Make TRY/CATCH use real C++ try/catch in C++ mode
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
492d29ea
PA
12015-03-07 Pedro Alves <palves@redhat.com>
2
3 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4 instead.
5
60a191ed
YQ
62015-03-06 Yao Qi <yao.qi@linaro.org>
7
8 * linux-aarch64-low.c (aarch64_insert_point): Use
9 show_debug_regs as a boolean.
10 (aarch64_remove_point): Likewise.
11
f5771b1d
PA
122015-03-05 Pedro Alves <palves@redhat.com>
13
14 * lynx-low.c (lynx_target_ops): Install NULL hooks for
15 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
16 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
17 * nto-low.c (nto_target_ops): Likewise.
18 * spu-low.c (spu_target_ops): Likewise.
19 * win32-low.c (win32_target_ops): Likewise.
20
3e572f71
PA
212015-03-04 Pedro Alves <palves@redhat.com>
22
23 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
24 Decide whether a breakpoint triggered based on the SIGTRAP's
25 siginfo.si_code.
26 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
27 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
28 (linux_low_filter_event): Check for breakpoints before checking
29 watchpoints.
30 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
31 siginfo.si_code.
32 (linux_stopped_by_sw_breakpoint)
33 (linux_supports_stopped_by_sw_breakpoint)
34 (linux_stopped_by_hw_breakpoint)
35 (linux_supports_stopped_by_hw_breakpoint): New functions.
36 (linux_target_ops): Install new target methods.
37
1ec68e26
PA
382015-03-04 Pedro Alves <palves@redhat.com>
39
40 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
41 * server.c (swbreak_feature, hwbreak_feature): New globals.
42 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
43 (captured_main): Clear swbreak_feature and hwbreak_feature.
44 * server.h (swbreak_feature, hwbreak_feature): Declare.
45 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
46 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
47 supports_stopped_by_hw_breakpoint>: New fields.
48 (target_supports_stopped_by_sw_breakpoint)
49 (target_stopped_by_sw_breakpoint)
50 (target_supports_stopped_by_hw_breakpoint)
51 (target_stopped_by_hw_breakpoint): Declare.
52
15c66dd6
PA
532015-03-04 Pedro Alves <palves@redhat.com>
54
55 enum lwp_stop_reason -> enum target_stop_reason
56 * linux-low.c (check_stopped_by_breakpoint): Adjust.
57 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
58 (linux_wait_1, stuck_in_jump_pad_callback)
59 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
60 (linux_stopped_by_watchpoint):
61 * linux-low.h (enum lwp_stop_reason): Delete.
62 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
63 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
64
98fc70d6
YQ
652015-03-04 Yao Qi <yao.qi@linaro.org>
66
67 * Makefile.in (SFILES): Add linux-aarch64-low.c.
68
dd2ac174
GB
692015-03-03 Gary Benson <gbenson@redhat.com>
70
71 * hostio.c (handle_vFile): Fix prefix lengths.
72
d68e53f4
MM
732015-03-03 Markus Metzger <markus.t.metzger@intel.com>
74
75 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
76 ptr_bits.
77
bf2d68ab
AA
782015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
79
80 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
81 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
82 (clean): Add "rm -f" for above C files.
83 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
84 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
85 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
86 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
87 * linux-s390-low.c (HWCAP_S390_VX): New macro.
88 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
89 (init_registers_s390x_vx_linux64)
90 (init_registers_s390x_tevx_linux64)
91 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
92 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
93 declarations.
94 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
95 (s390_store_vxrs_high): New functions.
96 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
97 NT_S390_VXRS_HIGH.
98 (s390_arch_setup): Add logic for selecting one of the new target
99 descriptions. Activate the new vector regsets if applicable.
100 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
101 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
102 and init_registers_s390x_tevx_linux64.
103
c966a859
PA
1042015-03-01 Pedro Alves <palves@redhat.com>
105
106 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
107 parameter.
108
4180215b
PA
1092015-02-27 Pedro Alves <palves@redhat.com>
110
111 * linux-x86-low.c (u_debugreg_offset): New function.
112 (x86_linux_dr_get, x86_linux_dr_set): Use it.
113
749bab01
PA
1142015-02-27 Pedro Alves <palves@redhat.com>
115
116 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
117 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
118 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
119 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
120 (ps_lsetfpregs, ps_getpid)
121 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
122 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
123 (ps_lsetxregs, ps_plog): Declare.
124
3c14e5a3
PA
1252015-02-27 Pedro Alves <palves@redhat.com>
126
127 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
128 IP_AGENT_EXPORT_FUNC.
129 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
130 IP_AGENT_EXPORT_FUNC.
131 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
132 (IP_AGENT_EXPORT): Delete.
133 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
134 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
135 (gdb_trampoline_buffer_error, collecting, gdb_collect)
136 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
137 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
138 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
139 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
140 (traceframe_read_count, traceframe_write_count)
141 (traceframes_created, trace_state_variables, get_raw_reg)
142 (get_trace_state_variable_value, set_trace_state_variable_value)
143 (ust_loaded, helper_thread_id, cmd_buf): Use
144 IPA_SYM_EXPORTED_NAME.
145 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
146 (tracepoints) Use IP_AGENT_EXPORT_VAR.
147 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
148 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
149 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
150 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
151 EXTERN_C_PUSH/EXTERN_C_POP.
152 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
153 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
154 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
155 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
156 (traceframe_write_count, traceframe_read_count)
157 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
158 (about_to_request_buffer_space, get_trace_state_variable_value)
159 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
160 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
161 EXTERN_C_PUSH/EXTERN_C_POP.
162 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
163 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
164 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
165 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
166 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
167 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
168 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
169 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
170 Define.
171 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
172 (IP_AGENT_EXPORT_VAR_DECL): Define.
173 (tracing): Declare.
174 (gdb_agent_get_raw_reg): Declare.
175
fe978cb0
PA
1762015-02-27 Tom Tromey <tromey@redhat.com>
177 Pedro Alves <palves@redhat.com>
178
179 Rename symbols whose names are reserved C++ keywords throughout.
180
3bc3d82a
PA
1812015-02-27 Pedro Alves <palves@redhat.com>
182
183 * Makefile.in (COMPILER): New, get it from autoconf.
184 (CXX): Get from autoconf instead.
185 (COMPILE.pre): Use COMPILER.
186 (CC-LD): Rename to ...
187 (CC_LD): ... this. Use COMPILER.
188 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
189 (CXX_FOR_TARGET): Default to g++ instead of gcc.
190 * acinclude.m4: Include build-with-cxx.m4.
191 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
192 Disable -Werror by default if building in C++ mode.
193 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
194 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
195 the C++ compiler. Save/restore CXXFLAGS too.
196 * configure: Regenerate.
197
07697489
PA
1982015-02-27 Pedro Alves <palves@redhat.com>
199
200 * acinclude.m4: Include libiberty.m4.
201 * configure.ac: Call libiberty_INIT.
202 * config.in, configure: Regenerate.
203
9beb7c4e
PA
2042015-02-26 Pedro Alves <palves@redhat.com>
205
206 * linux-low.c (linux_wait_1): When incrementing the PC past a
207 program breakpoint always use the_low_target.breakpoint_len as
208 increment, rather than the maximum between that and
209 the_low_target.decr_pc_after_break.
210
8090aef2
PA
2112015-02-23 Pedro Alves <palves@redhat.com>
212
213 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
214 thread was doing a step-over; always adjust the PC if
215 we stepped over a permanent breakpoint.
216 (linux_wait_1): If we stepped over breakpoint that was on top of a
217 permanent breakpoint, manually advance the PC past it.
218
bc9540e8
PA
2192015-02-23 Pedro Alves <palves@redhat.com>
220
221 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
222 modes.
223 (x86_fill_gregset, x86_store_gregset): Use it when handling
224 $orig_eax.
225
2db9a427
PA
2262015-02-20 Pedro Alves <palves@redhat.com>
227
228 * thread-db.c: Include "nat/linux-procfs.h".
229 (thread_db_init): Skip listing new threads if the kernel supports
230 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
231
afa8d396
PA
2322015-02-20 Pedro Alves <palves@redhat.com>
233
234 * linux-low.c (status_pending_p_callback): Use ptid_match.
235
c9587f88
AT
2362015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
237
238 PR breakpoints/16812
239 * linux-low.c (wstatus_maybe_breakpoint): Remove.
240 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
241 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
242
b05ec7a5
AT
2432015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
244
245 PR breakpoints/15956
246 * tracepoint.c (cmd_qtinit): Add check for current_thread.
247
d33501a5
MM
2482015-02-09 Markus Metzger <markus.t.metzger@intel.com>
249
250 * linux-low.c (linux_low_btrace_conf): Print size.
251 * server.c (handle_btrace_conf_general_set): New.
252 (hanle_general_set): Call handle_btrace_conf_general_set.
253 (handle_query): Report Qbtrace-conf:bts:size as supported.
254
f4abbc16
MM
2552015-02-09 Markus Metzger <markus.t.metzger@intel.com>
256
257 * linux-low.c (linux_low_enable_btrace): Update parameters.
258 (linux_low_btrace_conf): New.
259 (linux_target_ops)<to_btrace_conf>: Initialize.
260 * server.c (current_btrace_conf): New.
261 (handle_btrace_enable): Rename to ...
262 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
263 to target_enable_btrace. Update comment. Update users.
264 (handle_qxfer_btrace_conf): New.
265 (qxfer_packets): Add btrace-conf entry.
266 (handle_query): Report qXfer:btrace-conf:read as supported packet.
267 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
268 (target_ops)<read_btrace_conf>: New.
269 (target_enable_btrace): Update parameters.
270 (target_read_btrace_conf): New.
271
043c3577
MM
2722015-02-09 Markus Metzger <markus.t.metzger@intel.com>
273
274 * server.c (handle_btrace_general_set): Remove call to
275 target_supports_btrace.
276 (supported_btrace_packets): New.
277 (handle_query): Call supported_btrace_packets.
278 * target.h: include btrace-common.h.
279 (btrace_target_info): Removed.
280 (supports_btrace, target_supports_btrace): Update parameters.
281
734b0e4b
MM
2822015-02-09 Markus Metzger <markus.t.metzger@intel.com>
283
284 * Makefile.in (SFILES): Add common/btrace-common.c.
285 (OBS): Add common/btrace-common.o.
286 (btrace-common.o): Add build rules.
287 * linux-low: Include btrace-common.h.
288 (linux_low_read_btrace): Use struct btrace_data. Call
289 btrace_data_init and btrace_data_fini.
290
d6c146e9
PA
2912015-02-06 Pedro Alves <palves@redhat.com>
292
293 * thread-db.c (find_new_threads_callback): Add debug output.
294
20ba1ce6
PA
2952015-02-04 Pedro Alves <palves@redhat.com>
296
297 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
298 (resume_stopped_resumed_lwps): New function.
299 (linux_wait_for_event_filtered): Use it.
300
8cc73a39
SDJ
3012015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
302
303 * Makefile.in (SFILES): Add linux-personality.c.
304 (linux-personality.o): New rule.
305 * configure.srv (srv_linux_obj): Add linux-personality.o to the
306 list of objects to be built.
307 * linux-low.c: Include nat/linux-personality.h.
308 (linux_create_inferior): Remove code to disable address space
309 randomization (moved to ../nat/linux-personality.c). Create
310 cleanup to disable address space randomization.
311
fb23d554
SDJ
3122015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
313
314 * Makefile.in (posix-strerror.o): New rule.
315 (mingw-strerror.o): Likewise.
316 * configure: Regenerated.
317 * configure.ac: Source file ../common/common.host. Initialize new
318 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
319
cdf43629
YQ
3202015-01-14 Yao Qi <yao@codesourcery.com>
321
322 * Makefile.in (SFILES): Add nat/ppc-linux.c.
323 (ppc-linux.o): New rule.
324 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
325 * configure.ac: AC_CHECK_FUNCS(getauxval).
326 * config.in: Re-generated.
327 * configure: Re-generated.
328 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
329 ppc64_64bit_inferior_p
330
514c5338
YQ
3312015-01-14 Yao Qi <yao@codesourcery.com>
332
333 * linux-ppc-low.c: Include "nat/ppc-linux.h".
334 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
335 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
336 (PT_ORIG_R3, PT_TRAP): Likewise.
337 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
338 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
339 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
340
3368c1e5
JB
3412015-01-10 Joel Brobecker <brobecker@adacore.com>
342
343 * i387-fp.c (i387_cache_to_xsave): In look over
344 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
345 zmmh_low_space field by use of zmmh_high_space.
346
582511be
PA
3472015-01-09 Pedro Alves <palves@redhat.com>
348
349 * linux-low.c (step_over_bkpt): Move higher up in the file.
350 (handle_extended_wait): Don't store the stop_pc here.
351 (get_stop_pc): Adjust comments and rename to ...
352 (check_stopped_by_breakpoint): ... this. Record whether the LWP
353 stopped for a software breakpoint or hardware breakpoint.
354 (thread_still_has_status_pending_p): New function.
355 (status_pending_p_callback): Use
356 thread_still_has_status_pending_p. If the event is no longer
357 interesting, resume the LWP.
358 (handle_tracepoints): Add assert.
359 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
360 (wstatus_maybe_breakpoint): New function.
361 (cancel_breakpoint): Delete function.
362 (check_stopped_by_watchpoint): New function, factored out from
363 linux_low_filter_event.
364 (lp_status_maybe_breakpoint): Delete function.
365 (linux_low_filter_event): Remove filter_ptid argument.
366 Leave thread group exits pending here. Store the LWP's stop PC.
367 Always leave events pending.
368 (linux_wait_for_event_filtered): Pull all events out of the
369 kernel, and leave them all pending.
370 (count_events_callback, select_event_lwp_callback): Consider all
371 events.
372 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
373 (select_event_lwp): Only give preference to the stepping LWP in
374 all-stop mode. Adjust comments.
375 (ignore_event): New function.
376 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
377 references to cancel_breakpoints. Adjust to renames. Also give
378 equal priority to all LWPs that have had events in non-stop mode.
379 If reporting a software breakpoint event, unadjust the LWP's PC.
380 (linux_wait): If linux_wait_1 returned an ignored event, retry.
381 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
382 Adjust.
383 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
384 (resume_status_pending_p): Use thread_still_has_status_pending_p.
385 (linux_stopped_by_watchpoint): Adjust.
386 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
387 * linux-low.h (enum lwp_stop_reason): New.
388 (struct lwp_info) <stop_pc>: Adjust comment.
389 <stopped_by_watchpoint>: Delete field.
390 <stop_reason>: New field.
391 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
392 * mem-break.c (software_breakpoint_inserted_here)
393 (hardware_breakpoint_inserted_here): New function.
394 * mem-break.h (software_breakpoint_inserted_here)
395 (hardware_breakpoint_inserted_here): Declare.
396 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
397 (cancel_breakpoints): Delete.
398 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
399 (upload_fast_traceframes): Remove references to
400 cancel_breakpoints.
401
a33e3959
PA
4022015-01-09 Pedro Alves <palves@redhat.com>
403
404 * thread-db.c (find_new_threads_callback): Ignore thread if the
405 kernel thread ID is -1.
406
8784d563
PA
4072015-01-09 Pedro Alves <palves@redhat.com>
408
409 * linux-low.c (linux_attach_fail_reason_string): Move to
410 nat/linux-ptrace.c, and rename.
411 (linux_attach_lwp): Update comment.
412 (attach_proc_task_lwp_callback): New function.
413 (linux_attach): Adjust to rename and use
414 linux_proc_attach_tgid_threads.
415 (linux_attach_fail_reason_string): Delete declaration.
416
76f2b779
JB
4172015-01-01 Joel Brobecker <brobecker@adacore.com>
418
419 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
420 * server.c (gdbserver_version): Likewise.
421
fafcc06a
SDJ
4222014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
423
424 * remote-utils.c: Include ctype.h.
425 (input_interrupt): Explicitly handle the case when the char
426 received is the NUL byte. Improve the printing of non-ASCII
427 characters.
428
beed38b8
JB
4292014-12-16 Joel Brobecker <brobecker@adacore.com>
430
431 * linux-low.c (linux_low_filter_event): Update call to
432 linux_enable_event_reporting following the addition of
433 a new parameter to that function.
434
bf330350
CU
4352014-12-16 Catalin Udma <catalin.udma@freescale.com>
436
437 PR server/17457
438 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
439 (AARCH64_FPCR_REGNO): Likewise.
440 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
441 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
442 (aarch64_store_fpregset): Likewise.
443
5227d625
JB
4442014-12-15 Joel Brobecker <brobecker@adacore.com>
445
446 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
447 Remove FIXME comment about assumption about N.
448
f93b65a0
JB
4492014-12-13 Joel Brobecker <brobecker@adacore.com>
450
451 * configure.ac: If large-file support is disabled in GDBserver,
452 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
453 * configure: Regenerate.
454
e5a9158d
AA
4552014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
456
457 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
458 warning upon ENODATA from ptrace.
459 * linux-s390-low.c (s390_store_tdb): New.
460 (s390_regsets): Add regset for NT_S390_TDB.
461
feea5f36
AA
4622014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
463
464 * linux-low.c (regsets_store_inferior_registers): Skip regsets
465 without a fill_function.
466 * linux-s390-low.c (s390_fill_last_break): Remove.
467 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
468 (s390_arch_setup): Use regset's size instead of fill_function for
469 loop end condition.
470
098dbe61
AA
4712014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
472
473 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
474 the regset's store function when ptrace returned an error.
475 * regcache.c (get_thread_regcache): Invalidate register cache
476 before fetching inferior's registers.
477
28eef672
AA
4782014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
479
480 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
481 while-loop as for-loop.
482 (regsets_store_inferior_registers): Likewise.
483
bdca27a2
YQ
4842014-11-28 Yao Qi <yao@codesourcery.com>
485
486 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
487 * config.in, configure: Re-generate.
488 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
489 is defined.
490
9c232dda
YQ
4912014-11-21 Yao Qi <yao@codesourcery.com>
492
493 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
494 (AC_CHECK_HEADERS): Remove malloc.h.
495 * configure: Re-generated.
496 * config.in: Re-generated.
497 * server.h: Don't include alloca.h and malloc.h.
498 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
499 Don't include malloc.h.
500
43968415
JB
5012014-11-17 Joel Brobecker <brobecker@adacore.com>
502
503 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
504 corresponding ERRNO check in same block.
505
40e91bc7
PA
5062014-11-12 Pedro Alves <palves@redhat.com>
507
508 * server.c (cont_thread): Update comment.
509 (start_inferior, attach_inferior): No longer clear cont_thread.
510 (handle_v_cont): No longer set cont_thread.
511 (captured_main): Clear cont_thread each time a GDB connects.
512
c2c118cf
PA
5132014-11-12 Pedro Alves <palves@redhat.com>
514
515 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
516 thread, and don't resume all threads if the Hc thread has exited.
517
78708b7c
PA
5182014-11-12 Pedro Alves <palves@redhat.com>
519
520 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
521 the process group instead of to a specific LWP.
522
a2abc7de
PA
5232014-10-15 Pedro Alves <palves@redhat.com>
524
525 PR server/17487
526 * win32-arm-low.c (arm_set_thread_context): Remove current_event
527 parameter.
528 (arm_set_thread_context): Delete.
529 (the_low_target): Adjust.
530 * win32-i386-low.c (debug_registers_changed)
531 (debug_registers_used): Delete.
532 (update_debug_registers_callback): New function.
533 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
534 needing to update their debug registers.
535 (win32_get_current_dr): New function.
536 (x86_dr_low_get_addr, x86_dr_low_get_control)
537 (x86_dr_low_get_status): Fetch the debug register from the thread
538 record's context.
539 (i386_initial_stuff): Adjust.
540 (i386_get_thread_context): Remove current_event parameter. Don't
541 clear debug_registers_changed nor copy DR values to
542 debug_reg_state.
543 (i386_set_thread_context): Delete.
544 (i386_prepare_to_resume): New function.
545 (i386_thread_added): Mark the thread as needing to update irs
546 debug registers.
547 (the_low_target): Remove i386_set_thread_context and install
548 i386_prepare_to_resume.
549 * win32-low.c (win32_get_thread_context): Adjust.
550 (win32_set_thread_context): Use SetThreadContext
551 directly.
552 (win32_prepare_to_resume): New function.
553 (win32_require_context): New function, factored out from ...
554 (thread_rec): ... this.
555 (continue_one_thread): Call win32_prepare_to_resume on each thread
556 we're about to continue.
557 (win32_resume): Call win32_prepare_to_resume on the event thread.
558 * win32-low.h (struct win32_thread_info)
559 <debug_registers_changed>: New field.
560 (struct win32_target_ops): Change prototype of set_thread_context,
561 delete set_thread_context and add prepare_to_resume.
562 (win32_require_context): New declaration.
563
a442d071
GB
5642014-10-08 Gary Benson <gbenson@redhat.com>
565
566 * server.h: Do not include common-exceptions.h.
567
6f1947e8
GB
5682014-10-08 Gary Benson <gbenson@redhat.com>
569
570 * server.h: Do not include cleanups.h.
571
63b434a4
JH
5722014-09-30 James Hogan <james.hogan@imgtec.com>
573
574 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
575 mips64-dsp-linux.c.
576
c4d9ceb6
YQ
5772014-09-23 Yao Qi <yao@codesourcery.com>
578
579 * linux-low.c (lp_status_maybe_breakpoint): New function.
580 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
581 (count_events_callback): Likewise.
582 (select_event_lwp_callback): Likewise.
583 (cancel_breakpoints_callback): Likewise.
584
89a5711c
DB
5852014-09-19 Don Breazeal <donb@codesourcery.com>
586
587 * linux-low.c (handle_extended_wait): Call
588 linux_ptrace_get_extended_event.
589 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
590 linux_is_extended_waitstatus.
591
bffc0964
JB
5922014-09-16 Joel Brobecker <brobecker@adacore.com>
593
594 * Makefile.in (CPPFLAGS): Define.
595 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
596 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
597
0bfdf32f
GB
5982014-09-16 Gary Benson <gbenson@redhat.com>
599
600 * inferiors.h (current_inferior): Renamed as...
601 (current_thread): New variable. All uses updated.
602 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
603 (maybe_move_out_of_jump_pad): Likewise.
604 (cancel_breakpoint): Likewise.
605 (linux_low_filter_event): Likewise.
606 (wait_for_sigstop): Likewise.
607 (linux_resume_one_lwp): Likewise.
608 (need_step_over_p): Likewise.
609 (start_step_over): Likewise.
610 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
611 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
612 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
613 and save_inferior as saved_thread.
614 * regcache.c (get_thread_regcache): Renamed saved_inferior as
615 saved_thread.
616 (regcache_invalidate_thread): Likewise.
617 * remote-utils.c (prepare_resume_reply): Likewise.
618 * thread-db.c (thread_db_get_tls_address): Likewise.
619 (disable_thread_event_reporting): Likewise.
620 (remove_thread_event_breakpoints): Likewise.
621 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
622 as saved_thread.
623 * target.h (set_desired_inferior): Renamed as...
624 (set_desired_thread): New declaration. All uses updated.
625 * server.c (myresume): Updated comment to reference thread instead
626 of inferior.
627 (handle_serial_event): Likewise.
628 (handle_target_event): Likewise.
629
361c8ade
GB
6302014-09-12 Tom Tromey <tromey@redhat.com>
631 Gary Benson <gbenson@redhat.com>
632
633 * regcache.h: Include common-regcache.h.
634 (regcache_read_pc): Don't declare.
635 * regcache.c (get_thread_regcache_for_ptid): New function.
636
bd9269f7
GB
6372014-09-11 Tom Tromey <tromey@redhat.com>
638 Gary Benson <gbenson@redhat.com>
639
640 * symbol.c: New file.
641 * Makefile.in (SFILES): Add symbol.c.
642 (OBS): Add symbol.o.
643
f8c1d06b
GB
6442014-09-11 Gary Benson <gbenson@redhat.com>
645
646 * target.c (target_stop_ptid, target_continue_ptid): New
647 functions.
648
721ec300
GB
6492014-09-11 Tom Tromey <tromey@redhat.com>
650 Gary Benson <gbenson@redhat.com>
651
652 * target.h: Include target/target.h.
653 * target.c (target_read_memory, target_read_uint32)
654 (target_write_memory): New functions.
655
c5e92cca
GB
6562014-09-11 Gary Benson <gbenson@redhat.com>
657
658 * server.h (debug_hw_points): Don't declare.
659 * server.c (debug_hw_points): Don't define. Replace all uses
660 with show_debug_regs.
661 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
662 all uses with show_debug_regs.
663
2e4bb98a
EBM
6642014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
665
666 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
667 endianness into account.
668 (ppc_supply_ptrace_register): Likewise.
669
ac740bc7
JH
6702014-09-03 James Hogan <james.hogan@imgtec.com>
671
672 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
673 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
674
97ea6506
GB
6752014-09-03 Gary Benson <gbenson@redhat.com>
676
677 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
678 ALL_DEBUG_ADDRESS_REGISTERS.
679
df7e5265
GB
6802014-09-02 Gary Benson <gbenson@redhat.com>
681
682 * i386-low.h: Renamed as...
683 * x86-low.h: New file. All type, function and variable name
684 prefixes changed from "i386_" to "x86_". All references updated.
685 * i386-low.c: Renamed as...
686 * x86-low.c: New file. All type, function and variable name
687 prefixes changed from "i386_" to "x86_". All references updated.
688
ed859da7
GB
6892014-09-02 Gary Benson <gbenson@redhat.com>
690
691 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
692 (x86_linux_new_thread): Likewise.
693
860789c7
GB
6942014-08-29 Gary Benson <gbenson@redhat.com>
695
696 * server.h (setjmp.h): Do not include.
697 (toplevel): Do not declare.
698 (common-exceptions.h): Include.
699 (cleanups.h): Likewise.
700 * server.c (toplevel): Do not define.
701 (exit_code): New static global.
702 (detach_or_kill_for_exit_cleanup): New function.
703 (main): New function. Original main renamed to...
704 (captured_main): New function.
705 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
706
ff55e1b5
GB
7072014-08-29 Gary Benson <gbenson@redhat.com>
708
709 * Makefile.in (SFILES): Add common/common-exceptions.c.
710 (OBS): Add common-exceptions.o.
711 (common-exceptions.o): New rule.
712 * utils.c (prepare_to_throw_exception): New function.
713
e9bcb658
GB
7142014-08-29 Gary Benson <gbenson@redhat.com>
715
716 * config.in: Regenerate.
717 * configure: Likewise.
718
e3180625
GB
7192014-08-29 Gary Benson <gbenson@redhat.com>
720
721 * Makefile.in (SFILES): Add common/cleanups.c.
722 (OBS): cleanups.o.
723 (cleanups.o): New rule.
724
e3d6ba5d
GB
7252014-08-29 Gary Benson <gbenson@redhat.com>
726
727 * utils.c (internal_vwarning): New function.
728
7096e886
GB
7292014-08-28 Gary Benson <gbenson@redhat.com>
730
731 * utils.h (fatal): Remove declaration.
732 * utils.c (fatal): Remove function.
733
14ce3192
GB
7342014-08-28 Gary Benson <gbenson@redhat.com>
735
736 * tracepoint.c (gdb_agent_init): Replace fatal with
737 perror_with_name.
738 (initialize_tracepoint): Likewise.
739
50278d59
GB
7402014-08-28 Gary Benson <gbenson@redhat.com>
741
742 * remote-utils.c (remote_prepare): Replace fatal with error.
743
aa96c426
GB
7442014-08-28 Gary Benson <gbenson@redhat.com>
745
746 * linux-low.c (linux_async): Replace fatal with warning.
747 Tidy up and return.
748 (linux_start_non_stop): Return -1 if linux_async failed.
749
f7160e97
GB
7502014-08-28 Gary Benson <gbenson@redhat.com>
751
752 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
753 gdb_assert.
754 (i386_dr_low_get_addr): Remove vague comment.
755 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
756 gdb_assert.
757
38e08fca
GB
7582014-08-28 Gary Benson <gbenson@redhat.com>
759
760 * inferiors.c (get_thread_process): Replace check with gdb_assert.
761 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
762 internal_error.
763 (linux_resume_one_lwp): Likewise.
764 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
765 gdb_assert.
766 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
767 with internal_error.
768 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
769 (init_register_cache): Replace fatal with gdb_assert_not_reached.
770 (find_register_by_name): Replace fatal with internal_error.
771 (find_regno): Likewise.
772 * tdesc.c (init_target_desc): Replace check with gdb_assert.
773 * thread-db.c (thread_db_create_event): Likewise.
774 (thread_db_load_search): Likewise.
775 (try_thread_db_load_1): Likewise.
776 * tracepoint.c (get_jump_space_head): Replace fatal with
777 internal_error.
778 (claim_trampoline_space): Likewise.
779 (have_fast_tracepoint_trampoline_buffer): Likewise.
780 (cmd_qtstart): Likewise.
781 (stop_tracing): Likewise.
782 (fast_tracepoint_collecting): Likewise.
783 (target_malloc): Likewise.
784 (download_tracepoint): Likewise.
785 (download_trace_state_variables): Replace check with gdb_assert.
786 (upload_fast_traceframes): Replace fatal with internal_error.
787
34abf635
GB
7882014-08-19 Tom Tromey <tromey@redhat.com>
789 Gary Benson <gbenson@redhat.com>
790
791 * Makefile.in (SFILES): Add common/common-debug.c.
792 (OBS): Add common-debug.o.
793 (common-debug.o): New rule.
794 * debug.h (debug_printf): Don't declare.
795 * debug.c (debug_printf): Renamed and rewritten as...
796 (debug_vprintf): New function.
797
f6e94d78
GB
7982014-08-19 Gary Benson <gbenson@redhat.com>
799
800 * utils.h: Do not include print-utils.h.
801
9239eeab
GB
8022014-08-19 Tom Tromey <tromey@redhat.com>
803 Gary Benson <gbenson@redhat.com>
804
805 * server.h: Add static assertion.
806 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
807
ef87c8bb
GB
8082014-08-19 Tom Tromey <tromey@redhat.com>
809 Gary Benson <gbenson@redhat.com>
810
811 * Makefile.in (SFILES): Add common/errors.c.
812 (OBS): Add errors.o.
813 (IPA_OBS): Add errors-ipa.o.
814 (errors.o): New rule.
815 (errors-ipa.o): Likewise.
816 * utils.h (perror_with_name, error, warning): Don't declare.
817 * utils.c (warning): Renamed and rewritten as...
818 (vwarning): New function.
819 (error): Renamed and rewritten as...
820 (verror): New function.
821 (internal_error): Renamed and rewritten as...
822 (internal_verror): New function.
823
bb974a24
GB
8242014-08-07 Gary Benson <gbenson@redhat.com>
825
826 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
827 * configure: Regenerate.
828 * config.in: Likewise.
829 * server.h: Do not include errno.h.
830 * event-loop.c: Likewise.
831 * hostio-errno.c: Likewise.
832 * linux-low.c: Likewise.
833 * remote-utils.c: Likewise.
834 * spu-low.c: Likewise.
835 * utils.c: Likewise.
836 * gdbreplay.c: Unconditionally include errno.h.
837
6d3d12eb
GB
8382014-08-07 Gary Benson <gbenson@redhat.com>
839
840 * server.h: Do not include string.h.
841 * event-loop.c: Likewise.
842 * linux-low.c: Likewise.
843 * regcache.c: Likewise.
844 * remote-utils.c: Likewise.
845 * spu-low.c: Likewise.
846 * utils.c: Likewise.
847
dccbb609
GB
8482014-08-07 Gary Benson <gbenson@redhat.com>
849
850 * server.h: Do not include gdb_assert.h.
851
e76df0d0
GB
8522014-08-07 Gary Benson <gbenson@redhat.com>
853
854 * server.h: Do not include common-utils.h.
855
4cb9c816
GB
8562014-08-07 Gary Benson <gbenson@redhat.com>
857
858 * server.h: Do not include ptid.h.
859 * notif.h: Likewise.
860
3995eeee
GB
8612014-08-07 Gary Benson <gbenson@redhat.com>
862
863 * server.h: Do not include gdb_locale.h.
864
cb9f1a9b
GB
8652014-08-07 Gary Benson <gbenson@redhat.com>
866
867 * server.h: Do not include gdb/signals.h.
868 * win32-low.c: Likewise.
869
a5fceff8
GB
8702014-08-07 Gary Benson <gbenson@redhat.com>
871
872 * server.h: Do not include pathmax.h.
873
b9391142
GB
8742014-08-07 Gary Benson <gbenson@redhat.com>
875
876 * server.h: Do not include libiberty.h.
877 * linux-bfin-low.c: Likewise.
878
0e443c87
GB
8792014-08-07 Gary Benson <gbenson@redhat.com>
880
881 * server.h: Do not include ansidecl.h.
882
8ebb3f56
GB
8832014-08-07 Gary Benson <gbenson@redhat.com>
884
885 * linux-x86-low.c: Do not include stddef.h.
886 * lynx-ppc-low.c: Likewise.
887 * tracepoint.c: Likewise.
888
8980bdf6
GB
8892014-08-07 Gary Benson <gbenson@redhat.com>
890
891 * server.h: Do not include stdarg.h.
892 * nto-low.c: Likewise.
893
d7096f71
GB
8942014-08-07 Gary Benson <gbenson@redhat.com>
895
896 * server.h: Do not include stdlib.h.
897 * inferiors.c: Likewise.
898 * linux-low.c: Likewise.
899 * regcache.c: Likewise.
900 * spu-low.c: Likewise.
901 * tracepoint.c: Likewise.
902 * utils.c: Likewise.
903
d02f550d
GB
9042014-08-07 Gary Benson <gbenson@redhat.com>
905
906 * server.h: Do not include stdio.h.
907 * linux-low.c: Likewise.
908 * remote-utils.c: Likewise.
909 * spu-low.c: Likewise.
910 * utils.c: Likewise.
911 * wincecompat.c: Likewise.
912
87f6c4e3
GB
9132014-08-06 Gary Benson <gbenson@redhat.com>
914
915 * regcache.c (init_register_cache): Move conditionals inside if.
916
7089dca4
GB
9172014-08-06 Gary Benson <gbenson@redhat.com>
918
919 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
920
462f517e
GB
9212014-07-31 Gary Benson <gbenson@redhat.com>
922
923 * ax.h: Do not include server.h.
924 * gdbthread.h: Likewise.
925 * lynx-low.h: Likewise.
926 * notif.h: Likewise.
927
976411d6
GB
9282014-07-30 Gary Benson <gbenson@redhat.com>
929
930 * server.h: Include common-defs.h.
931 Do not include config.h or build-gnulib-gdbserver/config.h.
932
d41f6d8e
GB
9332014-07-30 Gary Benson <gbenson@redhat.com>
934
935 * hostio-errno.c: Move server.h to top of includes list.
936 * inferiors.c: Likewise.
937 * linux-x86-low.c: Likewise.
938 * notif.c: Include server.h.
939
314c6a35
TT
9402014-07-24 Tom Tromey <tromey@redhat.com>
941 Gary Benson <gbenson@redhat.com>
942
943 * server.h (CORE_ADDR): Now unsigned.
944
69ff6be5
PA
9452014-07-16 Pedro Alves <palves@redhat.com>
946
947 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
948
ce9e3fe7
PA
9492014-07-15 Pedro Alves <palves@redhat.com>
950
951 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
952 copy.
953
e76126e8
PA
9542014-07-11 Pedro Alves <palves@redhat.com>
955
956 * linux-low.c (kill_wait_lwp): New function, based on
957 kill_one_lwp_callback, but use my_waitpid directly.
958 (kill_one_lwp_callback, linux_kill): Use it.
959
8e9db26e
PA
9602014-06-23 Pedro Alves <palves@redhat.com>
961
962 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
963 before setting DR0..DR3.
964
698b3e08
GB
9652014-06-20 Gary Benson <gbenson@redhat.com>
966
967 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
968 * configure: Regenerated.
969 * config.in: Likewise.
970
125f8a3d
GB
9712014-06-20 Gary Benson <gbenson@redhat.com>
972
973 * Makefile.in (SFILES): Update locations for files moved
974 from common to nat.
975 (object file files): Reordered.
976
42995dbd
GB
9772014-06-20 Gary Benson <gbenson@redhat.com>
978
979 * i386-low.h (i386_dr_low_can_set_addr): Removed.
980 (i386_dr_low_set_addr): Likewise.
981 (i386_dr_low_get_addr): Likewise.
982 (i386_dr_low_can_set_control): Likewise.
983 (i386_dr_low_set_control): Likewise.
984 (i386_dr_low_get_control): Likewise.
985 (i386_dr_low_get_status): Likewise.
986 (i386_get_debug_register_length): Likewise.
987 * linux-x86-low.c (i386_dr_low_set_addr):
988 Changed signature. Made static.
989 (i386_dr_low_get_addr): Likewise.
990 (i386_dr_low_set_control): Likewise.
991 (i386_dr_low_get_control): Likewise.
992 (i386_dr_low_get_status): Likewise.
993 (i386_dr_low): New global variable.
994 * win32-i386-low.c (i386_dr_low_set_addr):
995 Changed signature. Made static.
996 (i386_dr_low_get_addr): Likewise.
997 (i386_dr_low_set_control): Likewise.
998 (i386_dr_low_get_control): Likewise.
999 (i386_dr_low_get_status): Likewise.
1000 (i386_dr_low): New global variable.
1001
e1d2394b
MS
10022014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
1003
1004 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1005 * Makefile.in (AR, AR_FLAGS): Define.
1006 * configure: Regenerate.
1007
3a8ee006
GB
10082014-06-19 Gary Benson <gbenson@redhat.com>
1009
1010 * Makefile.in (i386-dregs.o): New rule.
1011 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
1012 * i386-low.c (target.h): Remove include.
1013 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
1014 (DR_CONTROL_SHIFT): Likewise.
1015 (DR_CONTROL_SIZE): Likewise.
1016 (DR_RW_EXECUTE): Likewise.
1017 (DR_RW_WRITE): Likewise.
1018 (DR_RW_READ): Likewise.
1019 (DR_RW_IORW): Likewise.
1020 (DR_LEN_1): Likewise.
1021 (DR_LEN_2): Likewise.
1022 (DR_LEN_4): Likewise.
1023 (DR_LEN_8): Likewise.
1024 (DR_LOCAL_ENABLE_SHIFT): Likewise.
1025 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1026 (DR_ENABLE_SIZE): Likewise.
1027 (DR_LOCAL_SLOWDOWN): Likewise.
1028 (DR_GLOBAL_SLOWDOWN): Likewise.
1029 (DR_CONTROL_RESERVED): Likewise.
1030 (I386_DR_CONTROL_MASK): Likewise.
1031 (I386_DR_VACANT): Likewise.
1032 (I386_DR_LOCAL_ENABLE): Likewise.
1033 (I386_DR_GLOBAL_ENABLE): Likewise.
1034 (I386_DR_DISABLE): Likewise.
1035 (I386_DR_SET_RW_LEN): Likewise.
1036 (I386_DR_GET_RW_LEN): Likewise.
1037 (I386_DR_WATCH_HIT): Likewise.
1038 (i386_wp_op_t): Likewise.
1039 (i386_show_dr): Likewise.
1040 (i386_length_and_rw_bits): Likewise.
1041 (i386_insert_aligned_watchpoint): Likewise.
1042 (i386_remove_aligned_watchpoint): Likewise.
1043 (i386_handle_nonaligned_watchpoint): Likewise.
1044 i386_update_inferior_debug_regs(): Likewise.
1045 (i386_dr_insert_watchpoint): Likewise.
1046 (i386_dr_remove_watchpoint): Likewise.
1047 (i386_dr_region_ok_for_watchpoint): Likewise.
1048 (i386_dr_stopped_data_address): Likewise.
1049 (i386_dr_stopped_by_watchpoint): Likewise.
1050
8f26655c
GB
10512014-06-19 Gary Benson <gbenson@redhat.com>
1052
1053 * i386-low.c (i386_dr_show): Renamed to
1054 i386_show_dr and made static. All uses updated.
1055 (i386_dr_length_and_rw_bits): Renamed to
1056 i386_length_and_rw_bits and made static.
1057 All uses updated.
1058 (i386_dr_insert_aligned_watchpoint): Renamed to
1059 i386_insert_aligned_watchpoint and made static.
1060 All uses updated.
1061 (i386_dr_remove_aligned_watchpoint): Renamed to
1062 i386_remove_aligned_watchpoint and made static.
1063 All uses updated.
1064 (i386_dr_update_inferior_debug_regs): Renamed to
1065 i386_update_inferior_debug_regs and made static.
1066 All uses updated.
1067
b9228891
GB
10682014-06-18 Gary Benson <gbenson@redhat.com>
1069
5171def3
GB
1070 * i386-low.h (i386_dr_low_can_set_addr): New macro.
1071 (i386_dr_low_can_set_control): Likewise.
1072 (i386_get_debug_register_length): Likewise.
1073 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
1074 (i386_dr_low_can_set_control): Likewise.
1075 (i386_get_debug_register_length): Likewise.
1076
10772014-06-17 Gary Benson <gbenson@redhat.com>
1078
b9228891
GB
1079 * i386-low.h (i386-dregs.h): New include.
1080 (DR_FIRSTADDR): Now in i386-dregs.h.
1081 (DR_LASTADDR): Likewise.
1082 (DR_NADDR): Likewise.
1083 (DR_STATUS): Likewise.
1084 (DR_CONTROL): Likewise.
1085 (i386_debug_reg_state): Likewise.
1086 (i386_dr_insert_watchpoint): Likewise.
1087 (i386_dr_remove_watchpoint): Likewise.
1088 (i386_dr_region_ok_for_watchpoint): Likewise.
1089 (i386_dr_stopped_data_address): Likewise.
1090 (i386_dr_stopped_by_watchpoint): Likewise.
1091 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
1092
4be83cc2
GB
10932014-06-18 Gary Benson <gbenson@redhat.com>
1094
1095 * i386-low.h (i386_low_insert_watchpoint): Renamed to
1096 i386_dr_insert_watchpoint.
1097 (i386_low_remove_watchpoint): Renamed to
1098 i386_dr_remove_watchpoint.
1099 (i386_low_region_ok_for_watchpoint): Renamed to
1100 i386_dr_region_ok_for_watchpoint.
1101 (i386_low_stopped_data_address): Renamed to
1102 i386_dr_stopped_data_address.
1103 (i386_low_stopped_by_watchpoint): Renamed to
1104 i386_dr_stopped_by_watchpoint.
1105 * i386-low.c (i386_show_dr): Renamed to
1106 i386_dr_show and made nonstatic. All uses updated.
1107 (i386_length_and_rw_bits): Renamed to
1108 i386_dr_length_and_rw_bits and made nonstatic.
1109 All uses updated.
1110 (i386_insert_aligned_watchpoint): Renamed to
1111 i386_dr_insert_aligned_watchpoint and made nonstatic.
1112 All uses updated.
1113 (i386_remove_aligned_watchpoint): Renamed to
1114 i386_dr_remove_aligned_watchpoint and made nonstatic.
1115 All uses updated.
1116 (i386_update_inferior_debug_regs): Renamed to
1117 i386_dr_update_inferior_debug_regs and made nonstatic.
1118 All uses updated.
1119 (i386_low_insert_watchpoint): Renamed to
1120 i386_dr_insert_watchpoint. All uses updated.
1121 (i386_low_remove_watchpoint): Renamed to
1122 i386_dr_remove_watchpoint. All uses updated.
1123 (i386_low_region_ok_for_watchpoint): Renamed to
1124 i386_dr_region_ok_for_watchpoint. All uses updated.
1125 (i386_low_stopped_data_address): Renamed to
1126 i386_dr_stopped_data_address. All uses updated.
1127 (i386_low_stopped_by_watchpoint): Renamed to
1128 i386_dr_stopped_by_watchpoint. All uses updated.
1129
131aa0d4
GB
11302014-06-18 Gary Benson <gbenson@redhat.com>
1131
1132 * i386-low.c (i386_dr_low_can_set_addr): New macro.
1133 (i386_dr_low_can_set_control): Likewise.
1134 (i386_insert_aligned_watchpoint): New check.
1135
d9305f7f
GB
11362014-06-18 Gary Benson <gbenson@redhat.com>
1137
1138 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
1139 Renamed to state.
1140
e927c9fc
GB
11412014-06-18 Gary Benson <gbenson@redhat.com>
1142
1143 * i386-low.c (i386_length_and_rw_bits): Use internal_error
1144 instead of fatal and error.
1145 (i386_handle_nonaligned_watchpoint): Likewise.
1146
1b6d4134
GB
11472014-06-18 Gary Benson <gbenson@redhat.com>
1148
1149 * i386-low.c (i386_get_debug_register_length): New macro.
1150 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
1151 (i386_show_dr): Use debug_printf instead of fprintf. Use
1152 phex to format values.
1153
6e62758f
GB
11542014-06-18 Gary Benson <gbenson@redhat.com>
1155
1156 * i386-low.h: Comment changes.
1157 * i386-low.c: Likewise.
1158
fc6e2f03
GB
11592014-06-18 Gary Benson <gbenson@redhat.com>
1160
1161 * i386-low.c: Whitespace changes.
1162
f9d1eeed
TT
11632014-06-12 Tom Tromey <tromey@redhat.com>
1164
1165 * utils.c (freeargv): Remove.
1166
0b04e523
TT
11672014-06-12 Tom Tromey <tromey@redhat.com>
1168
1169 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
1170 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
1171 (parse_debug_format_options): Likewise.
1172 (gdbserver_usage): Likewise.
1173 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
1174 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
1175 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
1176 against libiberty.
1177 ($(LIBGNU)): Depend on libiberty.
1178 (all-lib): Recurse into all subdirs.
1179 (install-only): Invoke "install" target in subdirs.
1180 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1181 targets.
1182 * configure: Rebuild.
1183 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
1184 for vasprintf, vsnprintf, or gettimeofday.
1185 * configure.srv: Don't add safe-ctype.o or lbasename.o to
1186 srv_tgtobj.
1187
270c9937
JB
11882014-06-05 Joel Brobecker <brobecker@adacore.com>
1189
1190 * development.sh: Delete.
1191 * Makefile.in (config.status): Adjust dependency on development.sh.
1192 * configure.ac: Adjust development.sh source call.
1193 * configure: Regenerate.
1194
0a261ed8
PA
11952014-06-02 Pedro Alves <palves@redhat.com>
1196
1197 * ax.c (gdb_free_agent_expr): New function.
1198 * ax.h (gdb_free_agent_expr): New declaration.
1199 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1200 list.
1201 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1202 static.
1203 (clear_breakpoint_conditions_and_commands): New function.
1204 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1205 (clear_breakpoint_conditions_and_commands): New declaration.
1206
e9dae05e
RR
12072014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1208
1209 * linux-aarch64-low.c (asm/ptrace.h): Include.
1210
5876f503
JK
12112014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1212
1213 Fix TLS access for -static -pthread.
1214 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1215 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1216 (thread_db_load_search, try_thread_db_load_1): Initialize it.
1217
802e8e6d
PA
12182014-05-20 Pedro Alves <palves@redhat.com>
1219
1220 * linux-aarch64-low.c (aarch64_insert_point)
1221 (aarch64_remove_point): No longer check whether the type is
1222 supported here. Adjust to new interface.
1223 (the_low_target): Install aarch64_supports_z_point_type as
1224 supports_z_point_type method.
1225 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
1226 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
1227 instead of a Z packet char. Adjust.
1228 (arm_supports_z_point_type): New function.
1229 (arm_insert_point, arm_remove_point): Adjust to new interface.
1230 (the_low_target): Install arm_supports_z_point_type.
1231 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1232 (cris_insert_point, cris_remove_point): Adjust to new interface.
1233 Don't check whether the type is supported here.
1234 (the_low_target): Install cris_supports_z_point_type.
1235 * linux-low.c (linux_supports_z_point_type): New function.
1236 (linux_insert_point, linux_remove_point): Adjust to new interface.
1237 * linux-low.h (struct linux_target_ops) <insert_point,
1238 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1239 raw_breakpoint pointer parameter.
1240 <supports_z_point_type>: New method.
1241 * linux-mips-low.c (mips_supports_z_point_type): New function.
1242 (mips_insert_point, mips_remove_point): Adjust to new interface.
1243 Use mips_supports_z_point_type.
1244 (the_low_target): Install mips_supports_z_point_type.
1245 * linux-ppc-low.c (the_low_target): Install NULL as
1246 supports_z_point_type method.
1247 * linux-s390-low.c (the_low_target): Install NULL as
1248 supports_z_point_type method.
1249 * linux-sparc-low.c (the_low_target): Install NULL as
1250 supports_z_point_type method.
1251 * linux-x86-low.c (x86_supports_z_point_type): New function.
1252 (x86_insert_point): Adjust to new insert_point interface. Use
1253 insert_memory_breakpoint. Adjust to new
1254 i386_low_insert_watchpoint interface.
1255 (x86_remove_point): Adjust to remove_point interface. Use
1256 remove_memory_breakpoint. Adjust to new
1257 i386_low_remove_watchpoint interface.
1258 (the_low_target): Install x86_supports_z_point_type.
1259 * lynx-low.c (lynx_target_ops): Install NULL as
1260 supports_z_point_type callback.
1261 * nto-low.c (nto_supports_z_point_type): New.
1262 (nto_insert_point, nto_remove_point): Adjust to new interface.
1263 (nto_target_ops): Install nto_supports_z_point_type.
1264 * mem-break.c: Adjust intro comment.
1265 (struct raw_breakpoint) <raw_type, size>: New fields.
1266 <inserted>: Update comment.
1267 <shlib_disabled>: Delete field.
1268 (enum bkpt_type) <gdb_breakpoint>: Delete value.
1269 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1270 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1271 (raw_bkpt_type_to_target_hw_bp_type): New function.
1272 (find_enabled_raw_code_breakpoint_at): New function.
1273 (find_raw_breakpoint_at): New type and size parameters. Use them.
1274 (insert_memory_breakpoint): New function, based off
1275 set_raw_breakpoint_at.
1276 (remove_memory_breakpoint): New function.
1277 (set_raw_breakpoint_at): Reimplement.
1278 (set_breakpoint): New, based on set_breakpoint_at.
1279 (set_breakpoint_at): Reimplement.
1280 (delete_raw_breakpoint): Go through the_target->remove_point
1281 instead of assuming memory breakpoints.
1282 (find_gdb_breakpoint_at): Delete.
1283 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1284 (find_gdb_breakpoint): New function.
1285 (set_gdb_breakpoint_at): Delete.
1286 (z_type_supported): New function.
1287 (set_gdb_breakpoint_1): New function, loosely based off
1288 set_gdb_breakpoint_at.
1289 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1290 (delete_gdb_breakpoint_at): Delete.
1291 (delete_gdb_breakpoint_1): New function, loosely based off
1292 delete_gdb_breakpoint_at.
1293 (delete_gdb_breakpoint): New function.
1294 (clear_gdb_breakpoint_conditions): Rename to ...
1295 (clear_breakpoint_conditions): ... this. Don't handle a NULL
1296 breakpoint.
1297 (add_condition_to_breakpoint): Make static.
1298 (add_breakpoint_condition): Take a struct breakpoint pointer
1299 instead of an address. Adjust.
1300 (gdb_condition_true_at_breakpoint): Rename to ...
1301 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1302 z_type parameter.
1303 (gdb_condition_true_at_breakpoint): Reimplement.
1304 (add_breakpoint_commands): Take a struct breakpoint pointer
1305 instead of an address. Adjust.
1306 (gdb_no_commands_at_breakpoint): Rename to ...
1307 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
1308 parameter. Return true if no breakpoint was found. Change debug
1309 output.
1310 (gdb_no_commands_at_breakpoint): Reimplement.
1311 (run_breakpoint_commands): Rename to ...
1312 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
1313 and change return type to boolean.
1314 (run_breakpoint_commands): New function.
1315 (gdb_breakpoint_here): Also check for Z1 breakpoints.
1316 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
1317 breakpoint. Go through the_target->remove_point instead of
1318 assuming memory breakpoint.
1319 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
1320 software and hardware breakpoints.
1321 (reinsert_raw_breakpoint): Go through the_target->insert_point
1322 instead of assuming memory breakpoint.
1323 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
1324 software and hardware breakpoints.
1325 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
1326 Check both software and hardware breakpoints.
1327 (validate_inserted_breakpoint): Assert the breakpoint is a
1328 software breakpoint. Set the inserted flag to -1 instead of
1329 setting shlib_disabled.
1330 (delete_disabled_breakpoints): Adjust.
1331 (validate_breakpoints): Only validate software breakpoints.
1332 Adjust to inserted flag change.
1333 (check_mem_read, check_mem_write): Skip breakpoint types other
1334 than software breakpoints. Adjust to inserted flag change.
1335 * mem-break.h (enum raw_bkpt_type): New enum.
1336 (raw_breakpoint, struct process_info): Forward declare.
1337 (Z_packet_to_target_hw_bp_type): Delete declaration.
1338 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
1339 (set_gdb_breakpoint, delete_gdb_breakpoint)
1340 (clear_breakpoint_conditions): New declarations.
1341 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
1342 (breakpoint_inserted_here): Update comment.
1343 (add_breakpoint_condition, add_breakpoint_commands): Replace
1344 address parameter with a breakpoint pointer parameter.
1345 (gdb_breakpoint_here): Update comment.
1346 (delete_gdb_breakpoint_at): Delete.
1347 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
1348 * server.c (process_point_options): Take a struct breakpoint
1349 pointer instead of an address. Adjust.
1350 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
1351 delete_gdb_breakpoint.
1352 * spu-low.c (spu_target_ops): Install NULL as
1353 supports_z_point_type method.
1354 * target.h: Include mem-break.h.
1355 (struct target_ops) <prepare_to_access_memory>: Update comment.
1356 <supports_z_point_type>: New field.
1357 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1358 instead of a char. Also take a raw breakpoint pointer.
1359 * win32-arm-low.c (the_low_target): Install NULL as
1360 supports_z_point_type.
1361 * win32-i386-low.c (i386_supports_z_point_type): New function.
1362 (i386_insert_point, i386_remove_point): Adjust to new interface.
1363 (the_low_target): Install i386_supports_z_point_type.
1364 * win32-low.c (win32_supports_z_point_type): New function.
1365 (win32_insert_point, win32_remove_point): Adjust to new interface.
1366 (win32_target_ops): Install win32_supports_z_point_type.
1367 * win32-low.h (struct win32_target_ops):
1368 <supports_z_point_type>: New method.
1369 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1370 instead of a char. Also take a raw breakpoint pointer.
1371
932539e3
PA
13722014-05-20 Pedro Alves <palves@redhat.com>
1373
1374 * mem-break.h: Include break-common.h.
1375 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1376 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
1377 (Z_packet_to_target_hw_bp_type): New declaration.
1378 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
1379 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
1380 (Z_PACKET_ACCESS_WP): Delete macros.
1381 (Z_packet_to_hw_type): Delete function.
1382 * i386-low.h: Don't include break-common.h here.
1383 (Z_packet_to_hw_type): Delete declaration.
1384 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
1385 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1386 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
1387 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1388 * linux-aarch64-low.c: Don't include break-common.h here.
1389 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1390 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
1391 (Z_packet_to_target_hw_bp_type): Delete function.
1392 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
1393 function.
1394 (mips_insert_point, mips_remove_point): Use
1395 Z_packet_to_target_hw_bp_type.
1396
4ff0d3d8
PA
13972014-05-20 Pedro Alves <palves@redhat.com>
1398
1399 * linux-aarch64-low.c: Include break-common.h.
1400 (enum target_point_type): Delete.
1401 (Z_packet_to_point_type): Rename to ...
1402 (Z_packet_to_target_hw_bp_type): ... this, and return a
1403 target_hw_bp_type instead.
1404 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
1405 instead of an enum target_point_type.
1406 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
1407 breakpoint type.
1408 (aarch64_dr_state_insert_one_point)
1409 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
1410 (aarch64_handle_aligned_watchpoint)
1411 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
1412 Take an enum target_hw_bp_type instead of an enum
1413 target_point_type.
1414 (aarch64_supports_z_point_type): New function.
1415 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
1416 use Z_packet_to_target_hw_bp_type.
1417
786dc519
JB
14182014-05-20 Joel Brobecker <brobecker@adacore.com>
1419
1420 * configure.ac: Only use -Werror by default when DEVELOPMENT
1421 is true.
1422 * configure: Regenerate.
1423
9e0aa64f
JK
14242014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
1425
1426 Fix gdbserver qGetTLSAddr for x86_64 -m32.
1427 * linux-x86-low.c (X86_64_USER_REGS): New.
1428 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
1429
2b577b92
YQ
14302014-04-28 Yao Qi <yao@codesourcery.com>
1431
1432 * Makefile.in (i386-avx512.c): Fix the typo of generated file
1433 name.
1434
94611da2
PA
14352014-04-25 Pedro Alves <palves@redhat.com>
1436
1437 PR server/16255
1438 * linux-low.c (linux_attach_fail_reason_string): New function.
1439 (linux_attach_lwp): Delete.
1440 (linux_attach_lwp_1): Rename to ...
1441 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
1442 argument. Remove "initial" parameter. Return int instead of
1443 void. Don't error or warn here.
1444 (linux_attach): Adjust to call linux_attach_lwp. Call error on
1445 failure to attach to the tgid. Call warning when failing to
1446 attach to an lwp.
1447 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
1448 argument. Remove "initial" parameter. Return int instead of
1449 void. Don't error or warn here.
1450 (linux_attach_fail_reason_string): New declaration.
1451 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
1452 interface change. Use linux_attach_fail_reason_string.
1453
01f9f808
MS
14542014-04-24 Michael Sturm <michael.sturm@mintel.com>
1455 Walfred Tedeschi <walfred.tedeschi@intel.com>
1456
1457 * Makefile.in: Added rules to handle new files
1458 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
1459 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
1460 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
1461 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
1462 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
1463 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
1464 x32-avx512-linux.o.
1465 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
1466 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
1467 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
1468 i386/x32-avx512.xml.
1469 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
1470 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
1471 i386/x32-avx512-linux.xml.
1472 * i387-fp.c (num_avx512_k_registers): New constant for number
1473 of K registers.
1474 (num_avx512_zmmh_low_registers): New constant for number of
1475 lower ZMM registers (0-15).
1476 (num_avx512_zmmh_high_registers): New constant for number of
1477 higher ZMM registers (16-31).
1478 (num_avx512_ymmh_registers): New contant for number of higher
1479 YMM registers (ymm16-31 added by avx521 on x86_64).
1480 (num_avx512_xmm_registers): New constant for number of higher
1481 XMM registers (xmm16-31 added by AVX512 on x86_64).
1482 (struct i387_xsave): Add space for AVX512 registers.
1483 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
1484 Add code to handle AVX512 registers.
1485 (i387_xsave_to_cache): Add code to handle AVX512 registers.
1486 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
1487 prototypei from generated file.
1488 (tdesc_amd64_avx512_linux): Likewise.
1489 (init_registers_x32_avx512_linux): Likewise.
1490 (tdesc_x32_avx512_linux): Likewise.
1491 (init_registers_i386_avx512_linux): Likewise.
1492 (tdesc_i386_avx512_linux): Likewise.
1493 (x86_64_regmap): Add AVX512 registers.
1494 (x86_linux_read_description): Add code to handle AVX512 XSTATE
1495 mask.
1496 (initialize_low_arch): Add code to initialize AVX512 registers.
1497
51aa91f9
PA
14982014-04-23 Pedro Alves <palves@redhat.com>
1499
1500 * mem-break.c (find_gdb_breakpoint_at): Make static.
1501 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
1502
a4165e94
PA
15032014-04-23 Pedro Alves <palves@redhat.com>
1504
1505 * i386-low.c: Don't include break-common.h here.
1506 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1507 prototype to take target_hw_bp_type as argument instead of a Z
1508 packet char.
1509 * i386-low.h: Include break-common.h here.
1510 (Z_packet_to_hw_type): Declare.
1511 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1512 prototypes.
1513 * linux-x86-low.c (x86_insert_point): Convert the packet number to
1514 a target_hw_bp_type before calling i386_low_insert_watchpoint.
1515 (x86_remove_point): Convert the packet number to a
1516 target_hw_bp_type before calling i386_low_remove_watchpoint.
1517 * win32-i386-low.c (i386_insert_point): Convert the packet number
1518 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
1519 (i386_remove_point): Convert the packet number to a
1520 target_hw_bp_type before calling i386_low_remove_watchpoint.
1521
b8acf843
PA
15222014-04-23 Pedro Alves <palves@redhat.com>
1523
1524 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
1525
d708bcd1
PA
15262014-04-10 Pedro Alves <palves@redhat.com>
1527
1528 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1529 Check if the condition or command is NULL before checking if the
1530 breakpoint is known. On success, return true.
1531 * mem-break.h (add_breakpoint_condition): Document return.
1532 (add_breakpoint_commands): Add describing comment.
1533 * server.c (skip_to_semicolon): New function.
1534 (process_point_options): Use it.
1535
2eec7d5b
PA
15362014-04-09 Pedro Alves <palves@redhat.com>
1537
1538 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
1539 to lwpid_of.
1540
fa96cb38
PA
15412014-02-27 Pedro Alves <palves@redhat.com>
1542
1543 PR 12702
1544 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
1545 macros.
1546 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
1547 output.
1548 (last_thread_of_process_p): Take a PID argument instead of a
1549 thread pointer.
1550 (linux_wait_for_lwp): Delete.
1551 (num_lwps, check_zombie_leaders, not_stopped_callback): New
1552 functions.
1553 (linux_low_filter_event): New function, party factored out from
1554 linux_wait_for_event.
1555 (linux_wait_for_event): Rename to ...
1556 (linux_wait_for_event_filtered): ... this. Add new filter ptid
1557 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
1558 sigsuspend. Check for zombie leaders.
1559 (linux_wait_for_event): Reimplement as wrapper around
1560 linux_wait_for_event_filtered.
1561 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
1562 a normal or signal exit is seen, it's the whole process exiting.
1563 (wait_for_sigstop): No longer a for_each_inferior callback.
1564 Rewrite on top of linux_wait_for_event_filtered.
1565 (stop_all_lwps): Call wait_for_sigstop directly.
1566 * server.c (resume, handle_target_event): Handle
1567 TARGET_WAITKIND_NO_RESUMED.
1568
d763de10
JB
15692014-02-26 Joel Brobecker <brobecker@adacore.com>
1570
1571 * win32-low.c (psapi_get_dll_name,
1572 * win32_CreateToolhelp32Snapshot): Delete.
1573 (win32_CreateToolhelp32Snapshot, win32_Module32First)
1574 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
1575 Delete.
1576 (handle_load_dll): Add function description.
1577 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
1578
850a0f76
JB
15792014-02-26 Joel Brobecker <brobecker@adacore.com>
1580
1581 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
1582 Add comment.
1583 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
1584 base address when calling win32_add_one_solib.
1585 (handle_load_dll): Delete local variable load_addr.
1586 Remove 0x1000 offset applied to DLL base address when calling
1587 win32_add_one_solib.
1588 (handle_unload_dll): Add comment.
1589
f25b3fc3
JB
15902014-02-26 Joel Brobecker <brobecker@adacore.com>
1591
1592 * win32-low.c (win32_add_all_dlls): Renames
1593 win32_ensure_ntdll_loaded. Rewrite function documentation.
1594 Adjust implementation to always load all DLLs.
1595 Add 0x1000 offset to DLL base address when calling
1596 win32_add_one_solib.
1597 (child_initialization_done): New static global.
1598 (do_initial_child_stuff): Set child_initialization_done to
1599 zero during child initialization, and 1 after. Replace call
1600 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
1601 Add comment.
1602 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
1603 (handle_unload_dll): Add function documentation.
1604 (get_child_debug_event): Ignore load and unload DLL events
1605 during child initialization.
1606
d86d4aaf
DE
16072014-02-20 Doug Evans <dje@google.com>
1608
3bc32da3 1609 Remove global all_lwps.
d86d4aaf
DE
1610 * inferiors.h (ptid_of): Move here from linux-low.h.
1611 (pid_of, lwpid_of): Ditto.
1612 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
1613 parameter is a struct thread_info * now.
1614 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
1615 directly. Pass &all_threads to find_inferior instead of &all_lwps.
1616 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
1617 directly.
1618 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
1619 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
1620 * linux-arm-low.c (update_registers_callback): Update, "entry"
1621 parameter is a struct thread_info * now.
1622 Fetch lwpid from current_inferior directly.
1623 (arm_insert_point): Pass &all_threads to find_inferior instead of
1624 &all_lwps.
1625 (arm_remove_point): Ditto.
1626 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
1627 (arm_prepare_to_resume): Fetch pid from thread.
1628 (arm_read_description): Fetch lwpid from current_inferior directly.
1629 * linux-low.c (all_lwps): Delete.
1630 (delete_lwp): Delete call to remove_inferior.
1631 (handle_extended_wait): Fetch lwpid from thread.
1632 (add_lwp): Don't set lwp->entry.id. Remove call to
1633 add_inferior_to_list.
1634 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
1635 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
1636 (kill_one_lwp_callback): Ditto.
1637 (linux_kill): Don't dereference NULL pointer.
1638 Fetch ptid,lwpid from thread.
1639 (get_detach_signal): Fetch ptid from thread.
1640 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
1641 Simplify call to regcache_invalidate_thread.
1642 (delete_lwp_callback): Update, "entry" parameter is a
1643 struct thread_info * now. Fetch pid from thread.
1644 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
1645 (status_pending_p_callback): Update, "entry" parameter is a
1646 struct thread_info * now. Fetch ptid from thread.
1647 (find_lwp_pid): Update, "entry" parameter is a
1648 struct thread_info * now.
1649 (linux_wait_for_lwp): Fetch pid from thread.
1650 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
1651 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
1652 (enqueue_one_deferred_signal): Fetch lwpid from thread.
1653 (dequeue_one_deferred_signal): Ditto.
1654 (cancel_breakpoint): Fetch ptid from current_inferior.
1655 (linux_wait_for_event): Pass &all_threads to find_inferior,
1656 not &all_lwps. Fetch ptid, lwpid from thread.
1657 (count_events_callback): Update, "entry" parameter is a
1658 struct thread_info * now.
1659 (select_singlestep_lwp_callback): Ditto.
1660 (select_event_lwp_callback): Ditto.
1661 (cancel_breakpoints_callback): Ditto.
1662 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
1663 not &all_lwps.
1664 (select_event_lwp): Ditto. Fetch ptid from event_thread.
1665 (unsuspend_one_lwp): Update, "entry" parameter is a
1666 struct thread_info * now.
1667 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
1668 not &all_lwps.
1669 (linux_stabilize_threads): Ditto. And for for_each_inferior.
1670 Fetch lwpid from thread, not lwp.
1671 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
1672 Pass &all_threads to find_inferior, not &all_lwps.
1673 (send_sigstop): Fetch lwpid from thread, not lwp.
1674 (send_sigstop_callback): Update, "entry" parameter is a
1675 struct thread_info * now.
1676 (suspend_and_send_sigstop_callback): Ditto.
1677 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
1678 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
1679 struct thread_info * now.
1680 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
1681 from thread, lwp.
1682 (lwp_running): Update, "entry" parameter is a
1683 struct thread_info * now.
1684 (stop_all_lwps): Fetch ptid from thread.
1685 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
1686 (linux_resume_one_lwp): Fetch lwpid from thread.
1687 (linux_set_resume_request): Update, "entry" parameter is a
1688 struct thread_info * now. Fetch pid, lwpid from thread.
1689 (resume_status_pending_p): Update, "entry" parameter is a
1690 struct thread_info * now.
1691 (need_step_over_p): Ditto. Fetch lwpid from thread.
1692 (start_step_over): Fetch lwpid from thread.
1693 (linux_resume_one_thread): Update, "entry" parameter is a
1694 struct thread_info * now. Fetch lwpid from thread.
1695 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
1696 (proceed_one_lwp): Update, "entry" parameter is a
1697 struct thread_info * now. Fetch lwpid from thread.
1698 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
1699 struct thread_info * now.
1700 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
1701 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
1702 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
1703 directly.
1704 (regsets_store_inferior_registers): Ditto.
1705 (fetch_register, store_register): Ditto.
1706 (linux_read_memory, linux_write_memory): Ditto.
1707 (linux_request_interrupt): Ditto.
1708 (linux_read_auxv): Ditto.
1709 (linux_xfer_siginfo): Ditto.
1710 (linux_qxfer_spu): Ditto.
1711 (linux_qxfer_libraries_svr4): Ditto.
1712 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
1713 moved to inferiors.h.
1714 (get_lwp): Delete.
1715 (get_thread_lwp): Update.
1716 (struct lwp_info): Delete member "entry". Simplify comment for
1717 member "thread".
1718 (all_lwps): Delete.
1719 * linux-mips-low.c (mips_read_description): Fetch lwpid from
1720 current_inferior directly.
1721 (update_watch_registers_callback): Update, "entry" parameter is a
1722 struct thread_info * now. Fetch pid from thread.
1723 (mips_linux_prepare_to_resume): Fetch ptid from thread.
1724 (mips_insert_point): Fetch lwpid from current_inferior.
1725 Pass &all_threads to find_inferior, not &all_lwps.
1726 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
1727 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
1728 directly.
1729 (mips_stopped_data_address): Ditto.
1730 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
1731 directly.
1732 * linux-tile-low.c (tile_arch_setup): Ditto.
1733 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
1734 (update_debug_registers_callback): Update, "entry" parameter is a
1735 struct thread_info * now. Fetch pid from thread.
1736 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
1737 Pass &all_threads to find_inferior, not &all_lwps.
1738 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
1739 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
1740 Pass &all_threads to find_inferior, not &all_lwps.
1741 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
1742 (i386_dr_low_get_status): Ditto.
1743 (x86_linux_prepare_to_resume): Fetch ptid from thread.
1744 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
1745 (x86_linux_read_description): Ditto.
1746 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
1747
3b8361aa
DE
17482014-02-20 Doug Evans <dje@google.com>
1749
1750 * inferiors.c (get_first_inferior): Fix buglet.
1751
f7667f0d
DE
17522014-02-19 Doug Evans <dje@google.com>
1753
1754 * gdbthread.h (add_thread): Change result type to struct thread_info *.
1755 * inferiors.c (add_thread): Change result type to struct thread_info *.
1756 All callers updated.
1757 (add_lwp): Call add_thread here instead of in callers.
1758 All callers updated.
1759 * linux-low.h (get_lwp_thread): Rewrite.
1760 (struct lwp_info): New member "thread".
1761
b3312d80
DE
17622014-02-19 Doug Evans <dje@google.com>
1763
1764 * linux-low.c (add_lwp): Change result to struct lwp_info *.
1765 All callers updated.
1766
ecc6f45c
DE
17672014-02-19 Doug Evans <dje@google.com>
1768
1769 * inferiors.c (add_thread): Fix whitespace.
1770
649ebbca
DE
17712014-02-19 Doug Evans <dje@google.com>
1772
1773 * dll.c (clear_dlls): Replace accessing list implemention details
1774 with API function.
1775 * gdbthread.h (get_first_thread): Declare.
1776 * inferiors.c (for_each_inferior_with_data): New function.
1777 (get_first_thread): New function.
1778 (find_thread_ptid): Simplify.
1779 (get_first_inferior): New function.
1780 (clear_list): Delete.
1781 (one_inferior_p): New function.
1782 (clear_inferior_list): New function.
1783 (clear_inferiors): Update.
1784 * inferiors.h (for_each_inferior_with_data): Declare.
1785 (clear_inferior_list): Declare.
1786 (one_inferior_p): Declare.
1787 (get_first_inferior): Declare.
1788 * linux-low.c (linux_wait_for_event): Replace accessing list
1789 implemention details with API function.
1790 * server.c (target_running): Ditto.
1791 (accumulate_file_name_length): New function.
1792 (emit_dll_description): New function.
1793 (handle_qxfer_libraries): Replace accessing list implemention
1794 details with API function.
1795 (handle_qxfer_threads_worker): New function.
1796 (handle_qxfer_threads_proper): Replace accessing list implemention
1797 details with API function.
1798 (handle_query): Ditto.
1799 (visit_actioned_threads_callback_ftype): New typedef.
1800 (visit_actioned_threads_data): New struct.
1801 (visit_actioned_threads): Rewrite to be find_inferior callback.
1802 (resume): Call find_inferior.
1803 (handle_status): Replace accessing list implemention
1804 details with API function.
1805 (process_serial_event): Replace accessing list implemention details
1806 with API function.
1807 * target.c (set_desired_inferior): Replace accessing list implemention
1808 details with API function.
1809 * tracepoint.c (same_process_p): New function.
1810 (gdb_agent_about_to_close): Replace accessing list implemention
1811 details with API function.
1812 * win32-low.c (child_delete_thread): Replace accessing list
1813 implemention details with API function.
1814 (match_dll_by_basename): New function.
1815 (dll_is_loaded_by_basename): New function.
1816 (win32_ensure_ntdll_loaded): Replace accessing list implemention
1817 details call to dll_is_loaded_by_basename.
1818
80894984
DE
18192014-02-19 Doug Evans <dje@google.com>
1820
1821 * dll.h (struct dll_info): Add comment.
1822 * gdbthread.h (struct thread_info): Add comment.
1823 (current_ptid): Simplify.
1824 * inferiors.c (add_process): Update.
1825 (remove_process): Update.
1826 * inferiors.h (struct process_info): Rename member "head" to "entry".
1827 * linux-low.c (delete_lwp): Update.
1828 (add_lwp): Update.
1829 (last_thread_of_process_p): Update.
1830 (kill_one_lwp_callback, linux_kill): Update.
1831 (status_pending_p_callback): Update.
1832 (wait_for_sigstop): Update. Simplify read of ptid.
1833 (start_step_over): Update.
1834 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
1835 (get_lwp_thread): Update.
1836 (struct lwp_info): Rename member "head" to "entry".
1837 * regcache.h (inferior_list_entry): Delete.
1838 * server.c (kill_inferior_callback): Update.
1839 (detach_or_kill_inferior_callback): Update.
1840 (print_started_pid): Update.
1841 (print_attached_pid): Update.
1842 (process_serial_event): Simplify read of ptid.
1843 * thread-db.c (thread_db_create_event): Update.
1844 (thread_db_get_tls_address): Update.
1845 * win32-low.c (current_inferior_ptid): Simplify.
1846
46917d26
TT
18472014-02-19 Tom Tromey <tromey@redhat.com>
1848
1849 * target.h (struct target_ops) <supports_btrace>: Add target_ops
1850 argument.
1851 (target_supports_btrace): Update.
1852
0759a81e
YQ
18532014-02-14 Yao Qi <yao@codesourcery.com>
1854
1855 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
1856 (rsp-low-ipa.o): New target.
1857
a7191e8b
TT
18582014-02-12 Tom Tromey <tromey@redhat.com>
1859
1860 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
1861 convert_ascii_to_int.
1862 * regcache.c (registers_to_string): Likewise.
1863 * remote-utils.c (decode_M_packet): Likewise.
1864 * server.c (process_serial_event): Likewise.
1865
ff0e980e
TT
18662014-02-12 Tom Tromey <tromey@redhat.com>
1867
1868 * server.c (handle_query, handle_v_run): Use hex2bin, not
1869 unhexify.
1870 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
1871
e9371aff
TT
18722014-02-12 Tom Tromey <tromey@redhat.com>
1873
1874 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
1875 convert_int_to_ascii.
1876 * regcache.c (registers_to_string, collect_register_as_string):
1877 Likewise.
1878 * remote-utils.c (look_up_one_symbol, relocate_instruction):
1879 Likewise.
1880 * server.c (process_serial_event): Likewise.
1881 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
1882 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
1883
971dc0b8
TT
18842014-02-12 Tom Tromey <tromey@redhat.com>
1885
1886 * remote-utils.c (look_up_one_symbol, monitor_output): Use
1887 bin2hex, not hexify.
1888 * tracepoint.c (cmd_qtstatus): Likewise.
1889
0a822afb
TT
18902014-02-12 Tom Tromey <tromey@redhat.com>
1891
1892 * remote-utils.c (monitor_output): Pass explicit length to
1893 hexify.
1894
9c3d6531
TT
18952014-02-12 Tom Tromey <tromey@redhat.com>
1896
1897 * tracepoint.c: Include rsp-low.h.
1898 * server.c: Include rsp-low.h.
1899 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
1900 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
1901 declare.
1902 * remote-utils.c: Include rsp-low.h.
1903 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
1904 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
1905 (convert_int_to_ascii, convert_ascii_to_int): Move to
1906 common/rsp-low.c.
1907 * regcache.c: Include rsp-low.h.
1908 * ax.c: Include rsp-low.h.
1909 * Makefile.in (SFILES): Add common/rsp-low.c.
1910 (OBS): Add rsp-low.o.
1911 (rsp-low.o): New target.
1912
01fd3ea5
TT
19132014-02-12 Tom Tromey <tromey@redhat.com>
1914
1915 * utils.h (pulongest, plongest, phex_nz): Don't declare.
1916 Include print-utils.h.
1917 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
1918 (plongest, thirty_two, phex_nz): Remove.
1919 * Makefile.in (SFILES): Add common/print-utils.c.
1920 (OBS): Add print-utils.o.
1921 (print-utils-ipa.o): New target.
1922 (print-utils.o): New target.
1923 (IPA_OBJS): Add print-utils-ipa.o.
1924
e99dc820
TT
19252014-02-06 Tom Tromey <tromey@redhat.com>
1926
1927 * Makefile.in (SFILES): Fix indentation.
1928
ee1e2d4f
DE
19292014-02-05 Doug Evans <dje@google.com>
1930
1931 * linux-low.c (linux_wait_for_event): Improve comment.
1932 (linux_wait_1): Keep current_inferior in sync with event_child.
1933
f5a02773
DE
19342014-01-22 Doug Evans <dje@google.com>
1935
1936 * gdbthread.h (gdb_id_to_thread): Delete, unused.
1937
87ce2a04
DE
19382014-01-22 Doug Evans <dje@google.com>
1939
1940 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
1941 * configure: Regenerate.
1942 * config.in: Regenerate.
1943 * Makefile.in (SFILES): Add debug.c.
1944 (OBS): Add debug.o.
1945 * debug.c: New file.
1946 * debug.h: New file.
1947 * linux-aarch64-low.c (*): Update all debugging printfs to use
1948 debug_printf instead of fprintf.
1949 * linux-arm-low.c (*): Ditto.
1950 * linux-cris-low.c (*): Ditto.
1951 * linux-crisv32-low.c (*): Ditto.
1952 * linux-m32r-low.c (*): Ditto.
1953 * linux-sparc-low.c (*): Ditto.
1954 * linux-x86.c (*): Ditto.
1955 * linux-low.c (*): Ditto.
1956 (linux_wait_1): Add calls to debug_enter, debug_exit.
1957 (linux_wait): Remove redundant debugging printf.
1958 (stop_all_lwps): Add calls to debug_enter, debug_exit.
1959 (linux_resume, unstop_all_lwps): Ditto.
1960 * mem-break.c (*): Update all debugging printfs to use
1961 debug_printf instead of fprintf.
1962 * remote-utils.c (*): Ditto.
1963 * thread-db.c (*): Ditto.
1964 * server.c #include <ctype.h>, "gdb_vecs.h".
1965 (debug_threads): Moved to debug.c.
1966 (*): Update all debugging printfs to use debug_printf instead of
1967 fprintf.
1968 (start_inferior): Replace call to fflush with call to debug_flush.
1969 (monitor_show_help): Mention set debug-format.
1970 (parse_debug_format_options): New function.
1971 (handle_monitor_command): Handle "monitor set debug-format".
1972 (gdbserver_usage): Mention --debug-format.
1973 (main): Parse --debug-format.
1974 * server.h (debug_threads): Declaration moved to debug.h.
1975 #include "debug.h".
1976 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
1977 trace_debug_1 that uses debug_printf.
1978 (tracepoint_look_up_symbols): Update all debugging printfs to use
1979 debug_printf instead of fprintf.
1980
e671835b
BS
19812014-01-20 Baruch Siach <baruch@tkos.co.il>
1982
1983 * linux-xtensa-low.c: Include asm/ptrace.h instead of
1984 sys/ptrace.h.
1985
b5737fa9
PA
19862014-01-17 Pedro Alves <palves@redhat.com>
1987
ea38d2a9 1988 PR build/16445
c7faa97a
PA
1989 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
1990 defined after including gdb_proc_service.h.
b5737fa9 1991
40ed484e
DE
19922014-01-16 Doug Evans <dje@google.com>
1993
1994 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
1995 (match_dll): Use it.
1996
969c39fb
MM
19972014-01-16 Markus Metzger <markus.t.metzger@intel.com>
1998
1999 * target.h (target_ops) <read_btrace>: Change parameters and
2000 return type to allow error reporting.
2001 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2002 trace reading errors on.
2003 * linux-low.c (linux_low_read_btrace): Pass trace reading
2004 errors on.
2005 (linux_low_disable_btrace): New.
2006
ab7f45ba
DE
20072014-01-15 Doug Evans <dje@google.com>
2008
2009 * inferiors.c (thread_id_to_gdb_id): Delete.
2010 * inferiors.h (thread_id_to_gdb_id): Delete.
2011
66af0f44
EZ
20122014-01-13 Eli Zaretskii <eliz@gnu.org>
2013
2014 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
2015 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
2016 versions.
2017
9939e131
PA
20182014-01-08 Pedro Alves <palves@redhat.com>
2019
2020 * server.c (handle_status): Don't discard previous queued stop
2021 replies or thread's pending status here.
2022 (main) <disconnection>: Do it here instead.
2023
b7ea362b
PA
20242014-01-08 Pedro Alves <palves@redhat.com>
2025
2026 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2027 * server.c (visit_actioned_threads, handle_pending_status): New
2028 function.
2029 (handle_v_cont): Factor out parts to ...
2030 (resume): ... this new function. If in all-stop, and a thread
2031 being resumed has a pending status, report it without actually
2032 resuming.
2033 (myresume): Adjust to use the new 'resume' function.
2034 (clear_pending_status_callback, set_pending_status_callback)
2035 (find_status_pending_thread_callback): New functions.
2036 (handle_status): Handle the case of multiple threads having
2037 interesting statuses to report. Report threads' real last signal
2038 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
2039 with an interesting thread to report the status for, instead of
2040 always reporting the status of the first thread.
2041
28498c42
JB
20422014-01-01 Joel Brobecker <brobecker@adacore.com>
2043
2044 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2045 * gdbreplay.c (gdbreplay_version): Likewise.
2046
f45c82da
YZ
20472013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
2048
2049 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2050 iov.iov_len with the real length in use.
2051
379a5e2d
JB
20522013-12-13 Joel Brobecker <brobecker@adacore.com>
2053
2054 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2055 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2056 for all targets that use win32-low.c.
2057 * win32-low.c (win32_ensure_ntdll_loaded): New function.
2058 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2059
4210d83e
PA
20602013-12-13 Pedro Alves <palves@redhat.com>
2061
2062 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
2063 if equal to TARGET_WAITKIND_LOADED.
2064 * win32-low.c (cached_status): New static global.
2065 (win32_wait): Add declaration.
2066 (do_initial_child_stuff): Flush all initial pending debug events
2067 up to the initial breakpoint.
2068 (win32_wait): If CACHED_STATUS was set, return that instead
2069 of doing a real wait. Remove the code resuming the execution
2070 of the inferior after receiving a TARGET_WAITKIND_LOADED event
2071 during the initial phase. Also remove the code changing
2072 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
2073 TARGET_WAITKIND_STOPPED.
2074
e7f0d979
YQ
20752013-12-11 Yao Qi <yao@codesourcery.com>
2076
2077 * notif.c (handle_notif_ack): Return 0 if no notification
2078 matches.
2079
ebcf782c
DE
20802013-11-20 Doug Evans <dje@google.com>
2081
2082 * linux-low.c (linux_set_resume_request): Fix comment.
2083
20ad9378
DE
20842013-11-20 Doug Evans <dje@google.com>
2085
2086 * linux-low.c (resume_status_pending_p): Tweak comment.
2087
a196ebeb
WT
20882013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2089
2090 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
2091 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
2092 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
2093 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
2094 (srv_amd64_regobj): Add amd64-mpx.o.
2095 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
2096 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
2097 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
2098 * i387-fp.c (num_pl_bnd_register) Added constant.
2099 (num_pl_bnd_cfg_registers) Added constant.
2100 (struct i387_xsave) Added reserved area and MPX fields.
2101 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
2102 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
2103 function.
2104 (tdesc_i386_mpx_linux): Add MPX amd64 target.
2105 (init_registers_amd64_mpx_linux): Declare new function.
2106 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
2107 (x86_64_regmap): Add MPX registers.
2108 (x86_linux_read_description): Add MPX case.
2109 (initialize_low_arch): Initialize MPX targets.
2110
0080a2f6
TT
21112013-11-18 Tom Tromey <tromey@redhat.com>
2112
2113 * configure: Rebuild.
2114 * configure.ac: Don't check for stdlib.h.
2115 * gdbreplay.c: Unconditionally include stdlib.h.
2116
2978b111
TT
21172013-11-18 Tom Tromey <tromey@redhat.com>
2118
2119 * config.in: Rebuild.
2120 * configure: Rebuild.
2121 * configure.ac: Don't use AC_HEADER_DIRENT.
2122
a3d08894
TT
21232013-11-18 Tom Tromey <tromey@redhat.com>
2124
2125 * server.h: Don't check HAVE_STRING_H.
2126 * gdbreplay.c: Don't check HAVE_STRING_H.
2127 * configure: Rebuild.
2128
0a5dd17d
TT
21292013-11-18 Tom Tromey <tromey@redhat.com>
2130
2131 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
2132 LIBGNU.
2133
1bd2f0ba
TT
21342013-11-08 Tom Tromey <tromey@redhat.com>
2135
2136 * configure, config.in: Rebuild.
2137 * configure.ac: Remove unused configury.
2138
3266f10b
TT
21392013-11-08 Tom Tromey <tromey@redhat.com>
2140
2141 * acinclude.m4: Include common.m4, codeset.m4.
2142 * configure, config.in: Rebuild.
2143 * configure.ac: Use GDB_AC_COMMON.
2144
6682d959
AA
21452013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
2146
2147 * linux-s390-low.c (HWCAP_S390_TE): New define.
2148 (s390_arch_setup): Consider the TE field in the HWCAP for
2149 determining 'have_regset_tdb'.
2150
fd0a4d76
SDJ
21512013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
2152
2153 PR gdb/16014
2154 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
2155 call to sizeof.
2156
1a3d890b
PA
21572013-10-02 Pedro Alves <palves@redhat.com>
2158
2159 * server.c (process_serial_event): Don't output "GDBserver
2160 exiting" if GDB is connected through stdio.
2161 * target.c (mywait): Likewise, be silent if GDB is connected
2162 through stdio.
2163
97ad4581
JB
21642013-10-01 Joel Brobecker <brobecker@adacore.com>
2165
2166 * lynx-low.c (lynx_add_threads_after_attach): New function.
2167 (lynx_attach): Remove call to add_thread. Add call to
2168 lynx_add_threads_after_attach instead.
2169
5b4e221c
MF
21702013-09-28 Mike Frysinger <vapier@gentoo.org>
2171
2172 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
2173 * config.in, configure: Regenerated.
2174
ee47b2f8
YQ
21752013-09-18 Yao Qi <yao@codesourcery.com>
2176
2177 PR server/15959
2178 * server.c (start_inferior): Clear 'resume_info'.
2179
d6707650 21802013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2181
d6707650
JW
2182 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2183 for each register.
2184
9243dd0e 21852013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2186
9243dd0e
JW
2187 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
2188 linux-tile-low.o to srv_tgtobj.
2189
c623a6ef
WN
21902013-09-16 Will Newton <will.newton@linaro.org>
2191
2192 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
2193 out regs.
2194
fb71d39e
PA
21952013-09-06 Pedro Alves <palves@redhat.com>
2196
2197 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2198 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2199 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2200 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2201 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2202 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2203
8e7e9910
PA
22042013-09-06 Pedro Alves <palves@redhat.com>
2205
2206 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2207 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2208
7c3a12ca
PA
22092013-09-06 Pedro Alves <palves@redhat.com>
2210
2211 * linux-amd64-ipa.c: Include tracepoint.h.
2212 * linux-i386-ipa.c: Include tracepoint.h.
2213
8eb3d7b6
RW
22142013-09-06 Ricard Wanderlof <ricardw@axis.com>
2215
2216 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2217 (ps_get_thread_area): New function.
2218
eddddb9d
RW
22192013-09-06 Ricard Wanderlof <ricardw@axis.com>
2220
2221 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
2222 (initialize_low_arch): Call init_registers_crisv32 rather than
2223 init_register_crisv32.
2224
533b0600
PA
22252013-09-05 Pedro Alves <palves@redhat.com>
2226
2227 * server.h (handle_vFile, hostio_last_error_from_errno): Move
2228 to ...
2229 * hostio.h: ... this new file.
2230 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2231 win32-low.c: Include hostio.h.
2232
0ce3d3b5
PA
22332013-09-05 Pedro Alves <palves@redhat.com>
2234
2235 * server.h (gdb_client_data, handler_func, callback_handler_func)
2236 (delete_file_handler, add_file_handler, append_callback_event)
2237 (delete_callback_event, start_event_loop, initialize_event_loop):
2238 Move to event-loop.h and include it.
2239 * event-loop.h: New file.
2240
799cdc37
PA
22412013-09-05 Pedro Alves <palves@redhat.com>
2242
2243 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2244 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2245 (loaded_dll, unloaded_dll): Move to ...
2246 * dll.h: ... this new file.
2247 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2248
6a6bbd9d
PA
22492013-09-05 Pedro Alves <palves@redhat.com>
2250
2251 * server.h (current_process, get_thread_process, all_processes)
2252 (add_inferior_to_list, for_each_inferior, current_inferior)
2253 (remove_inferior, add_process, remove_process, find_process_pid)
2254 (have_started_inferiors_p, have_attached_inferiors_p)
2255 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2256 (clear_inferiors, find_inferior, find_inferior_id)
2257 (inferior_target_data, set_inferior_target_data)
2258 (inferior_regcache_data, set_inferior_regcache_data): Move to
2259 inferiors.h, and include it.
2260 * inferiors.h: New file.
2261
f699aaba
PA
22622013-09-05 Pedro Alves <palves@redhat.com>
2263
2264 * server.h (struct emit_ops, current_insn_ptr, emit_error):
2265 Move ...
2266 * ax.h: ... here.
2267
c144c7a0
PA
22682013-09-05 Pedro Alves <palves@redhat.com>
2269
2270 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2271 tracepoint.h.
2272 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2273 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2274 (handle_tracepoint_general_set, handle_tracepoint_query)
2275 (tracepoint_finished_step, tracepoint_was_hit)
2276 (release_while_stepping_state_list, current_traceframe)
2277 (in_readonly_region, traceframe_read_mem)
2278 (fetch_traceframe_registers, traceframe_read_sdata)
2279 (traceframe_read_info, struct fast_tpoint_collect_status)
2280 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2281 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2282 (supply_fast_tracepoint_registers)
2283 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2284 (ipa_tdesc, claim_trampoline_space)
2285 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2286 (agent_mem_read, agent_get_trace_state_variable_value)
2287 (agent_set_trace_state_variable_value, agent_tsv_read)
2288 (agent_mem_read_string, get_raw_reg_func_addr)
2289 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2290 * tracepoint.h: ... this new file.
2291
ff42e6ab
PA
22922013-09-05 Pedro Alves <palves@redhat.com>
2293
2294 * server.h (perror_with_name, error, fatal, warning, paddress)
2295 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2296 include it.
2297 * utils.h: New file.
2298
541af0f4
PA
22992013-09-05 Pedro Alves <palves@redhat.com>
2300
2301 * server.h (remote_debug, noack_mode, transport_is_reliable)
2302 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
2303 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
2304 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
2305 (write_enn, initialize_async_io, enable_async_io)
2306 (disable_async_io, check_remote_input_interrupt_request)
2307 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
2308 (dead_thread_notify, prepare_resume_reply)
2309 (decode_address_to_semicolon, decode_address, decode_m_packet)
2310 (decode_M_packet, decode_X_packet, decode_xfer_write)
2311 (decode_search_memory_packet, unhexify, hexify)
2312 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
2313 (look_up_one_symbol, relocate_instruction)
2314 (monitor_output): Move to remote-utils.h, and include it.
2315 * remote-utils.h: New file.
2316
eebdf26b
PA
23172013-09-05 Pedro Alves <palves@redhat.com>
2318
2319 * server.h (_): Delete.
2320
3aafd2ff
PA
23212013-09-02 Pedro Alves <palves@redhat.com>
2322
2323 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
2324 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
2325 allocated.
2326 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
2327
cee83bcb
PM
23282013-09-02 Pierre Muller <muller@sourceware.org>
2329
2330 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
2331 or WriteProcessMemory complete successfully and handle
2332 ERROR_PARTIAL_COPY error.
2333
9a13b2fa
PA
23342013-09-02 Pedro Alves <palves@redhat.com>
2335
2336 * server.c (gdb_read_memory): Return -1 on traceframe memory read
2337 error instead of EIO.
2338
602e3198
JK
23392013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2340
2341 PR server/15604
2342 * linux-low.c: Include filestuff.h.
2343 (linux_create_inferior) <pid == 0>: Call close_most_fds.
2344 * lynx-low.c: Include filestuff.h.
2345 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
2346 * server.c: Include filestuff.h.
2347 (main): Call notice_open_fds.
2348 * spu-low.c: Include filestuff.h.
2349 (spu_create_inferior) <pid == 0>: Call close_most_fds.
2350
96d7229d
LM
23512013-08-22 Luis Machado <lgustavo@codesourcery.com>
2352
2353 * Makefile.in: Explain why ../target and ../nat are not
2354 listed as include file search paths.
2355 (linux-waitpid.o): New object file rule.
2356 * configure.srv (srv_native_linux_obj): New variable.
2357 Replace all occurrences of linux native object files with
2358 $srv_native_linux_obj.
2359 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
2360 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
2361 (linux_enable_event_reporting): Remove declaration.
2362 (my_waitpid): Moved to common/linux-waitpid.c.
2363 (linux_wait_for_event): Pass ptid when calling
2364 linux_enable_event_reporting.
2365 (linux_supports_tracefork_flag): Remove.
2366 (linux_enable_event_reporting): Likewise.
2367 (linux_tracefork_grandchild): Remove.
2368 (STACK_SIZE): Moved to common/linux-ptrace.c.
2369 (linux_tracefork_child): Remove.
2370 (linux_test_for_tracefork): Remove.
2371 (linux_look_up_symbols): Call linux_supports_traceclone.
2372 (initialize_low): Remove call to linux_test_for_tracefork.
2373 * linux-low.h (PTRACE_TYPE_ARG3): Move to
2374 common/linux-ptrace.h.
2375 (PTRACE_TYPE_ARG4): Likewise.
2376 Include linux-ptrace.h.
2377
32940073
PA
23782013-08-21 Pedro Alves <palves@redhat.com>
2379
2380 * config.in: Renegerate.
2381
33b60d58 23822013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 2383
33b60d58
LM
2384 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
2385 (SFILES): Remove $(srcdir)/common/target-common.c and
2386 add $(srcdir)/target/waitstatus.c.
2387 (OBS): Remove target-common.o and add waitstatus.o.
2388 (server_h): Remove $(srcdir)/../common/target-common.h and
2389 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
2390 and $(srcdir)/../target/waitstatus.h.
2391 (target-common.o): Remove.
2392 (waitstatus.o): New target object file.
2393 * target.h: Do not include target-common.h and
2394 include target/resume.h, target/wait.h and
2395 target/waitstatus.h.
2396
b8e1b30e
LM
23972013-08-13 Luis Machado <lgustavo@codesourcery.com>
2398
2399 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2400 to PTRACE_TYPE_ARG3.
2401 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2402 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
2403 PTRACE_TYPE_ARG4.
2404 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
2405 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
2406
7a60ad40
YQ
24072013-07-27 Jie Zhang <jie@codesourcery.com>
2408 Daniel Jacobowitz <dan@codesourcery.com>
2409 Yao Qi <yao@codesourcery.com>
2410
2411 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
2412 (mips-linux-watch.o): New rule.
2413 (mips_linux_watch_h): New variable.
2414 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
2415 srv_tgtobj.
2416 * linux-mips-low.c: Include mips-linux-watch.h.
2417 (struct arch_process_info, struct arch_lwp_info): New.
2418 (update_watch_registers_callback): New function.
2419 (mips_linux_new_process, mips_linux_new_thread) New functions.
2420 (mips_linux_prepare_to_resume, mips_insert_point): New
2421 functions.
2422 (mips_remove_point, mips_stopped_by_watchpoint): New
2423 functions.
2424 (rsp_bp_type_to_target_hw_bp_type): New function.
2425 (mips_stopped_data_address): New function.
2426 (the_low_target): Add watchpoint support functions.
2427
de6f69ad
YQ
24282013-07-27 Yao Qi <yao@codesourcery.com>
2429
2430 * i386-low.c: Include break-common.h.
2431 (enum target_hw_bp_type): Remove.
2432
3360c0bf
LM
24332013-07-24 Luis Machado <lgustavo@codesourcery.com>
2434
2435 * Makefile.in (SFILES): /common/target-common.c.
2436 (OBS): Add target-common.o.
2437 (server_h): Add $(srcdir)/../common/target-common.h.
2438 (target-common.o): New target.
2439 * server.c (queue_stop_reply_callback): Free
2440 status string after use.
2441 * target.c (target_waitstatus_to_string): Remove.
2442 * target.h: Include target-common.h.
2443 (resume_kind): Likewise.
2444 (target_waitkind): Likewise.
2445 (target_waitstatus): Likewise.
2446 (TARGET_WNOHANG): Likewise.
2447
bd885420
YQ
24482013-07-04 Yao Qi <yao@codesourcery.com>
2449
2450 * Makefile.in (host_alias): Use @host_noncanonical@.
2451 (target_alias): Use @target_noncanonical@.
2452 * configure.ac: Use ACX_NONCANONICAL_TARGET and
2453 ACX_NONCANONICAL_HOST.
2454 * configure: Regenerated.
2455
2456 Revert:
2457 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2458
2459 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2460 * configure: Rebuild.
2461 * Makefile.in (version_host, version_target): Get from configure.
2462 (version.c): Use $(version_host) and $(version_target).
2463
17ef446e
PA
24642013-07-03 Pedro Alves <palves@redhat.com>
2465
2466 * Makefile.in (config.status): Depend on development.sh.
2467 * acinclude.m4: Include libmcheck.m4.
2468 * configure: Regenerate.
2469
7a9a7487
MG
24702013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2471
2472 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
2473 attribute inside the parentheses.
2474 (winapi_DebugSetProcessKillOnExit): Ditto.
2475 (winapi_DebugBreakProcess): Ditto.
2476 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 2477
49b64de6
MG
24782013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2479
2480 * notif.h (notif_event): Add a dummy member to avoid compiler
2481 errors.
2482
d5749ee7
PA
24832013-07-01 Pedro Alves <palves@redhat.com>
2484
2485 * hostio.c (HOSTIO_PATH_MAX): Define.
2486 (require_filename, handle_open, handle_unlink, handle_readlink):
2487 Use it.
2488
d8d2a3ee
PA
24892013-07-01 Pedro Alves <palves@redhat.com>
2490
2491 * server.h: Include "pathmax.h".
2492 * linux-low.c: Don't include sys/param.h.
2493 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
2494 MAXPATHLEN.
2495 * win32-low.c: Don't include sys/param.h.
2496 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
2497
bc7dea8d
PA
24982013-07-01 Pedro Alves <palves@redhat.com>
2499
2500 * event-loop.c: Don't check HAVE_UNISTD_H before including
2501 <unistd.h>.
2502 * gdbreplay.c: Likewise.
2503 * remote-utils.c: Likewise.
2504 * server.c: Likewise.
2505 * configure.ac: Don't check for unistd.h.
2506 * configure: Regenerate.
2507
d6c2da54
TT
25082013-06-28 Tom Tromey <tromey@redhat.com>
2509
2510 * Makefile.in (version.c): Use version.in, not
2511 common/version.in.
2512
257b6bec
MG
25132013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2514
2515 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2516 * configure: Rebuild.
2517 * Makefile.in (version_host, version_target): Get from configure.
2518 (version.c): Use $(version_host) and $(version_target).
2519
86ebe149
DK
25202013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2521
2522 Fix trace-status to output user name without trailing colon.
2523 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
2524
f30aa5af
DK
25252013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2526
2527 Fix trace-status to output proper start-time and stop-time.
2528 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
2529 output start time and stop time in hex as gdb expects.
2530
28a93511
YQ
25312013-06-26 Pedro Alves <pedro@codesourcery.com>
2532
2533 * tracepoint.c (build_traceframe_info_xml): Output trace state
2534 variables present in the trace buffer.
2535
01208463
TT
25362013-06-24 Tom Tromey <tromey@redhat.com>
2537
2538 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
2539 create-version.sh.
2540 (version.o): Remove.
2541 * gdbreplay.c: Include version.h.
2542 (version, host_name): Don't declare.
2543 * server.h: Include version.h.
2544 (version, host_name): Don't declare.
2545
760256f9
PA
25462013-06-12 Pedro Alves <palves@redhat.com>
2547
2548 * linux-x86-low.c (linux_is_elf64): Delete global.
2549 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
2550 with local linux_pid_exe_is_elf_64_file use.
2551
030031ee
PA
25522013-06-11 Pedro Alves <palves@redhat.com>
2553
2554 * linux-low.c (regset_disabled, disable_regset): New functions.
2555 (regsets_fetch_inferior_registers)
2556 (regsets_store_inferior_registers): Use them.
2557 (initialize_regsets_info); Don't allocate the disabled_regsets
2558 array here.
2559 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
2560 comment.
2561
5da6eb0a
PA
25622013-06-11 Pedro Alves <palves@redhat.com>
2563
2564 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
2565 xmalloc.
2566
7e5aaa09
PA
25672013-06-11 Pedro Alves <palves@redhat.com>
2568
2569 * linux-x86-low.c (initialize_low_arch): Call
2570 init_registers_x32_avx_linux.
2571
d878444c
JK
25722013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
2573
2574 Fix compatibility with Android Bionic.
2575 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
2576 it is not empty.
2577
3aee8918
PA
25782013-06-07 Pedro Alves <palves@redhat.com>
2579
5f2b57b5 2580 PR server/14823
3aee8918
PA
2581 * Makefile.in (OBS): Add tdesc.o.
2582 (IPA_OBJS): Add tdesc-ipa.o.
2583 (tdesc-ipa.o): New rule.
2584 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
2585 interface.
2586 * linux-low.c (new_inferior): Delete.
2587 (disabled_regsets, num_regsets): Delete.
2588 (linux_add_process): Adjust to set the new per-process
2589 new_inferior flag.
2590 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
2591 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
2592 was a stop. When calling arch_setup, switch the current inferior
2593 to the thread that got an event.
2594 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
2595 (regsets_fetch_inferior_registers)
2596 (regsets_store_inferior_registers): New regsets_info parameter.
2597 Adjust to use it.
2598 (linux_register_in_regsets): New regs_info parameter. Adjust to
2599 use it.
2600 (register_addr, fetch_register, store_register): New usrregs_info
2601 parameter. Adjust to use it.
2602 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
2603 parameter regs_info. Adjust to use it.
2604 (linux_fetch_registers): Get the current inferior's regs_info, and
2605 adjust to use it.
2606 (linux_store_registers): Ditto.
2607 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
2608 (initialize_low): Don't initialize the target_regsets here. Call
2609 initialize_low_arch.
2610 * linux-low.h (target_regsets): Delete declaration.
2611 (struct regsets_info): New.
2612 (struct usrregs_info): New.
2613 (struct regs_info): New.
2614 (struct process_info_private) <new_inferior>: New field.
2615 (struct linux_target_ops): Delete the num_regs, regmap, and
2616 regset_bitmap fields. New field regs_info.
2617 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
2618 * i387-fp.c (num_xmm_registers): Delete.
2619 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
2620 calls to new interface.
2621 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
2622 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
2623 Infer the number of xmm registers from the regcache's target
2624 description.
2625 * i387-fp.h (num_xmm_registers): Delete.
2626 * inferiors.c (add_thread): Don't install the thread's regcache
2627 here.
2628 * proc-service.c (gregset_info): Fetch the current inferior's
2629 regs_info. Adjust to use it.
2630 * regcache.c: Include tdesc.h.
2631 (register_bytes, reg_defs, num_registers)
2632 (gdbserver_expedite_regs): Delete.
2633 (get_thread_regcache): If the thread doesn't have a regcache yet,
2634 create one, instead of aborting gdbserver.
2635 (regcache_invalidate_one): Rename to ...
2636 (regcache_invalidate_thread): ... this.
2637 (regcache_invalidate_one): New.
2638 (regcache_invalidate): Only invalidate registers of the current
2639 process.
2640 (init_register_cache): Add target_desc parameter, and use it.
2641 (new_register_cache): Ditto. Assert the target description has a
2642 non zero registers_size.
2643 (regcache_cpy): Add assertions. Adjust.
2644 (realloc_register_cache, set_register_cache): Delete.
2645 (registers_to_string, registers_from_string): Adjust.
2646 (find_register_by_name, find_regno, find_register_by_number)
2647 (register_cache_size): Add target_desc parameter, and use it.
2648 (free_register_cache_thread, free_register_cache_thread_one)
2649 (regcache_release, register_cache_size): New.
2650 (register_size): Add target_desc parameter, and use it.
2651 (register_data, supply_register, supply_register_zeroed)
2652 (supply_regblock, supply_register_by_name, collect_register)
2653 (collect_register_as_string, collect_register_by_name): Adjust.
2654 * regcache.h (struct target_desc): Forward declare.
2655 (struct regcache) <tdesc>: New field.
2656 (init_register_cache, new_register_cache): Add target_desc
2657 parameter.
2658 (regcache_invalidate_thread): Declare.
2659 (regcache_invalidate_one): Delete declaration.
2660 (regcache_release): Declare.
2661 (find_register_by_number, register_cache_size, register_size)
2662 (find_regno): Add target_desc parameter.
2663 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
2664 declarations.
2665 * remote-utils.c: Include tdesc.h.
2666 (outreg, prepare_resume_reply): Adjust.
2667 * server.c: Include tdesc.h.
2668 (gdbserver_xmltarget): Delete declaration.
2669 (get_features_xml, process_serial_event): Adjust.
2670 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
2671 declare.
2672 (struct process_info) <tdesc>: New field.
2673 (ipa_tdesc): Declare.
2674 * tdesc.c: New file.
2675 * tdesc.h: New file.
2676 * tracepoint.c: Include tdesc.h.
2677 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
2678 (get_context_regcache): Adjust to pass ipa_tdesc down.
2679 (do_action_at_tracepoint): Adjust to get the register cache size
2680 from the context regcache's description.
2681 (traceframe_walk_blocks): Adjust to get the register cache size
2682 from the current trace frame's description.
2683 (traceframe_get_pc): Adjust to get current trace frame's
2684 description and pass it down.
2685 (gdb_collect): Adjust to get the register cache size from the
2686 IPA's description.
2687 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
2688 (gdbserver_xmltarget): Delete.
2689 (initialize_low_tracepoint): Set the ipa's target description.
2690 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
2691 (initialize_low_tracepoint): Set the ipa's target description.
2692 * linux-x86-low.c: Include tdesc.h.
2693 [__x86_64__] (is_64bit_tdesc): New.
2694 (ps_get_thread_area, x86_get_thread_area): Use it.
2695 (i386_cannot_store_register): Rename to ...
2696 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
2697 (i386_cannot_fetch_register): Rename to ...
2698 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
2699 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
2700 to new interface.
2701 (target_regsets): Rename to ...
2702 (x86_regsets): ... this.
2703 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
2704 interface.
2705 (x86_siginfo_fixup): Use is_64bit_tdesc.
2706 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
2707 (tdesc_x32_avx_linux, tdesc_x32_linux)
2708 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
2709 Declare.
2710 (x86_linux_update_xmltarget): Delete.
2711 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
2712 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
2713 (AMD64_LINUX_USER64_CS): New.
2714 (x86_linux_read_description): New, based on
2715 x86_linux_update_xmltarget.
2716 (same_process_callback): New.
2717 (x86_arch_setup_process_callback): New.
2718 (x86_linux_update_xmltarget): New.
2719 (x86_regsets_info): New.
2720 (amd64_linux_regs_info): New.
2721 (i386_linux_usrregs_info): New.
2722 (i386_linux_regs_info): New.
2723 (x86_linux_regs_info): New.
2724 (x86_arch_setup): Reimplement.
2725 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
2726 (x86_emit_ops): Ditto.
2727 (the_low_target): Adjust. Install x86_linux_regs_info,
2728 x86_cannot_fetch_register, and x86_cannot_store_register.
2729 (initialize_low_arch): New.
2730 * linux-ia64-low.c (tdesc_ia64): Declare.
2731 (ia64_fetch_register): Adjust.
2732 (ia64_usrregs_info, regs_info): New globals.
2733 (ia64_regs_info): New function.
2734 (the_low_target): Adjust.
2735 (initialize_low_arch): New function.
2736 * linux-sparc-low.c (tdesc_sparc64): Declare.
2737 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
2738 Adjust.
2739 (sparc_arch_setup): New function.
2740 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
2741 (the_low_target): Adjust.
2742 (initialize_low_arch): New function.
2743 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
2744 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
2745 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
2746 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
2747 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
2748 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
2749 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
2750 (tdesc_powerpc_isa205_vsx64l): Declare.
2751 (ppc_cannot_store_register, ppc_collect_ptrace_register)
2752 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
2753 (ppc_set_pc, ppc_get_hwcap): Adjust.
2754 (ppc_usrregs_info): Forward declare.
2755 (!__powerpc64__) ppc_regmap_adjusted: New global.
2756 (ppc_arch_setup): Adjust to the current process'es target
2757 description.
2758 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
2759 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
2760 (ppc_store_evrregset): Adjust.
2761 (target_regsets): Rename to ...
2762 (ppc_regsets): ... this, and make static.
2763 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
2764 (ppc_regs_info): New function.
2765 (the_low_target): Adjust.
2766 (initialize_low_arch): New function.
2767 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
2768 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
2769 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
2770 (tdesc_s390x_linux64v2): Declare.
2771 (s390_collect_ptrace_register, s390_supply_ptrace_register)
2772 (s390_fill_gregset, s390_store_last_break): Adjust.
2773 (target_regsets): Rename to ...
2774 (s390_regsets): ... this, and make static.
2775 (s390_get_pc, s390_set_pc): Adjust.
2776 (s390_get_hwcap): New target_desc parameter, and use it.
2777 [__s390x__] (have_hwcap_s390_high_gprs): New global.
2778 (s390_arch_setup): Adjust to set the current process'es target
2779 description. Don't adjust the regmap.
2780 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
2781 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
2782 (regs_info_3264): New globals.
2783 (s390_regs_info): New function.
2784 (the_low_target): Adjust.
2785 (initialize_low_arch): New function.
2786 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
2787 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
2788 [__mips64] (init_registers_mips_linux)
2789 (init_registers_mips_dsp_linux): Delete defines.
2790 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
2791 (have_dsp): New global.
2792 (mips_read_description): New, based on mips_arch_setup.
2793 (mips_arch_setup): Reimplement.
2794 (get_usrregs_info): New function.
2795 (mips_cannot_fetch_register, mips_cannot_store_register)
2796 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
2797 (mips_fill_fpregset, mips_store_fpregset): Adjust.
2798 (target_regsets): Rename to ...
2799 (mips_regsets): ... this, and make static.
2800 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
2801 (dsp_regs_info, regs_info): New globals.
2802 (mips_regs_info): New function.
2803 (the_low_target): Adjust.
2804 (initialize_low_arch): New function.
2805 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
2806 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
2807 Declare.
2808 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
2809 (arm_read_description): New, with bits factored from
2810 arm_arch_setup.
2811 (arm_arch_setup): Reimplement.
2812 (target_regsets): Rename to ...
2813 (arm_regsets): ... this, and make static.
2814 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
2815 (arm_regs_info): New function.
2816 (the_low_target): Adjust.
2817 (initialize_low_arch): New function.
2818 * linux-m68k-low.c (tdesc_m68k): Declare.
2819 (target_regsets): Rename to ...
2820 (m68k_regsets): ... this, and make static.
2821 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
2822 (m68k_regs_info): New function.
2823 (m68k_arch_setup): New function.
2824 (the_low_target): Adjust.
2825 (initialize_low_arch): New function.
2826 * linux-sh-low.c (tdesc_sharch): Declare.
2827 (target_regsets): Rename to ...
2828 (sh_regsets): ... this, and make static.
2829 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
2830 (sh_regs_info, sh_arch_setup): New functions.
2831 (the_low_target): Adjust.
2832 (initialize_low_arch): New function.
2833 * linux-bfin-low.c (tdesc_bfin): Declare.
2834 (bfin_arch_setup): New function.
2835 (bfin_usrregs_info, regs_info): New globals.
2836 (bfin_regs_info): New function.
2837 (the_low_target): Adjust.
2838 (initialize_low_arch): New function.
2839 * linux-cris-low.c (tdesc_cris): Declare.
2840 (cris_arch_setup): New function.
2841 (cris_usrregs_info, regs_info): New globals.
2842 (cris_regs_info): New function.
2843 (the_low_target): Adjust.
2844 (initialize_low_arch): New function.
2845 * linux-cris-low.c (tdesc_crisv32): Declare.
2846 (cris_arch_setup): New function.
2847 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
2848 (cris_regs_info): New function.
2849 (the_low_target): Adjust.
2850 (initialize_low_arch): New function.
2851 * linux-m32r-low.c (tdesc_m32r): Declare.
2852 (m32r_arch_setup): New function.
2853 (m32r_usrregs_info, regs_info): New globals.
2854 (m32r_regs_info): Adjust.
2855 (initialize_low_arch): New function.
2856 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
2857 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
2858 (tic6x_usrregs_info): Forward declare.
2859 (tic6x_read_description): New function, based on ...
2860 (tic6x_arch_setup): ... this. Reimplement.
2861 (target_regsets): Rename to ...
2862 (tic6x_regsets): ... this, and make static.
2863 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
2864 (tic6x_regs_info): New function.
2865 (the_low_target): Adjust.
2866 (initialize_low_arch): New function.
2867 * linux-xtensa-low.c (tdesc_xtensa): Declare.
2868 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
2869 (target_regsets): Rename to ...
2870 (xtensa_regsets): ... this, and make static.
2871 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
2872 globals.
2873 (xtensa_arch_setup, xtensa_regs_info): New functions.
2874 (the_low_target): Adjust.
2875 (initialize_low_arch): New function.
2876 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
2877 (nios2_arch_setup): Set the current process'es tdesc.
2878 (target_regsets): Rename to ...
2879 (nios2_regsets): ... this.
2880 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
2881 (nios2_regs_info): New function.
2882 (the_low_target): Adjust.
2883 (initialize_low_arch): New function.
a261b8f5
PA
2884 * linux-aarch64-low.c (tdesc_aarch64): Declare.
2885 (aarch64_arch_setup): Set the current process'es tdesc.
2886 (target_regsets): Rename to ...
2887 (aarch64_regsets): ... this.
2888 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
2889 (aarch64_regs_info): New function.
2890 (the_low_target): Adjust.
2891 (initialize_low_arch): New function.
3aee8918
PA
2892 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
2893 globals.
2894 (target_regsets): Rename to ...
2895 (tile_regsets): ... this.
2896 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
2897 (tile_regs_info): New function.
2898 (tile_arch_setup): Set the current process'es tdesc.
2899 (the_low_target): Adjust.
2900 (initialize_low_arch): New function.
2901 * spu-low.c (tdesc_spu): Declare.
2902 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
2903 * win32-arm-low.c (tdesc_arm): Declare.
2904 (arm_arch_setup): New function.
2905 (the_low_target): Install arm_arch_setup instead of
2906 init_registers_arm.
2907 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
2908 (init_windows_x86): Rename to ...
2909 (i386_arch_setup): ... this. Set `win32_tdesc'.
2910 (the_low_target): Adjust.
2911 * win32-low.c (win32_tdesc): New global.
2912 (child_add_thread): Don't create the thread cache here.
2913 (do_initial_child_stuff): Set the new process'es tdesc.
2914 * win32-low.h (struct target_desc): Forward declare.
2915 (win32_tdesc): Declare.
2916 * lynx-i386-low.c (tdesc_i386): Declare global.
2917 (lynx_i386_arch_setup): Set `lynx_tdesc'.
2918 * lynx-low.c (lynx_tdesc): New global.
2919 (lynx_add_process): Set the new process'es tdesc.
2920 * lynx-low.h (struct target_desc): Forward declare.
2921 (lynx_tdesc): Declare global.
2922 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
2923 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
2924 * nto-low.c (nto_tdesc): New global.
2925 (do_attach): Set the new process'es tdesc.
2926 * nto-low.h (struct target_desc): Forward declare.
2927 (nto_tdesc): Declare.
2928 * nto-x86-low.c (tdesc_i386): Declare.
2929 (nto_x86_arch_setup): Set `nto_tdesc'.
2930
b1fbec62
GB
29312013-06-04 Gary Benson <gbenson@redhat.com>
2932
2933 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
2934 to qSupported response when appropriate.
2935 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
2936 with nonzero-length annex.
2937 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
2938 arguments supplied in annex.
2939
d1ec4ce7
DE
29402013-05-31 Doug Evans <dje@google.com>
2941
ac44adcb 2942 PR server/15594
d1ec4ce7
DE
2943 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
2944 64 bits in 64-cross-32 environment.
2945
9b25f2d3
PA
29462013-05-28 Pedro Alves <palves@redhat.com>
2947
2948 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
2949 (aarch64-without-fpu.c): Delete rule.
2950 * configure.srv (aarch64*-*-linux*): Remove references to
2951 aarch64-without-fpu.o and aarch64-without-fpu.xml.
2952 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
2953 declaration.
2954
6740dc9c
PA
29552013-05-24 Pedro Alves <palves@redhat.com>
2956
2957 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
2958 instead of strchr/decode_address. Error if the range isn't split
2959 with a ','. Don't assume there's be a ':' in the action.
2960
c2d6af84
PA
29612013-05-23 Yao Qi <yao@codesourcery.com>
2962 Pedro Alves <palves@redhat.com>
2963
2964 * linux-low.c (lwp_in_step_range): New function.
2965 (linux_wait_1): If the thread was range stepping and stopped
2966 outside the stepping range, report the stop to GDB. Otherwise,
2967 continue stepping. Add range stepping debug output.
2968 (linux_set_resume_request): Copy the step range from the resume
2969 request to the lwp.
2970 (linux_supports_range_stepping): New.
2971 (linux_target_ops) <supports_range_stepping>: Set to
2972 linux_supports_range_stepping.
2973 * linux-low.h (struct linux_target_ops)
2974 <supports_range_stepping>: New field.
2975 (struct lwp_info) <step_range_start, step_range_end>: New fields.
2976 * linux-x86-low.c (x86_supports_range_stepping): New.
2977 (the_low_target) <supports_range_stepping>: Set to
2978 x86_supports_range_stepping.
2979 * server.c (handle_v_cont): Handle 'r' action.
2980 (handle_v_requests): Append ";r" if the target supports range
2981 stepping.
2982 * target.h (struct thread_resume) <step_range_start,
2983 step_range_end>: New fields.
2984 (struct target_ops) <supports_range_stepping>:
2985 New field.
2986 (target_supports_range_stepping): New macro.
2987
58794e1a
JB
29882013-05-17 Joel Brobecker <brobecker@adacore.com>
2989
2990 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
2991 confusion in comment.
2992
d631c5a7
JB
29932013-05-17 Joel Brobecker <brobecker@adacore.com>
2994
2995 * lynx-low.c (struct process_info_private): New type.
2996 (lynx_add_process): New function.
2997 (lynx_create_inferior, lynx_attach): Replace calls to
2998 add_process by calls to lynx_add_process.
2999 (lynx_resume): If PTID is null, then try using
3000 current_process()->private->last_wait_event_ptid.
3001 Add comments.
3002 (lynx_clear_inferiors): Delete. The contents of that function
3003 has been inlined in lynx_mourn;
3004 (lynx_wait_1): Save the ptid in the process's private data.
3005 (lynx_mourn): Free the process' private data. Replace call
3006 to lynx_clear_inferiors by call to clear_inferiors.
3007
96f7a20f
YQ
30082013-05-17 Yao Qi <yao@codesourcery.com>
3009
3010 * i386-low.c (i386_length_and_rw_bits): Move the comment to
3011 the right place.
3012
db0dfaa0
LM
30132013-05-16 Luis Machado <lgustavo@codesourcery.com>
3014
3015 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
3016 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
3017 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
3018 PT_TEXT_END_ADDR guards. Update comments.
3019 (linux_target_op) <read_offsets>: Conditionally define to
3020 linux_read_offsets if the target is UCLIBC and if it defines
3021 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3022
68f5f838
SL
30232013-05-06 Sandra Loosemore <sandra@codesourcery.com>
3024 Andrew Jenner <andrew@codesourcery.com>
3025
3026 * Makefile.in (SFILES): Add linux-nios2-low.c.
3027 (clean): Add action to delete nios2-linux.c.
3028 (nios2-linux.c): New rule.
3029 * configure.srv: Add nios2*-*-linux*.
3030 * linux-nios2-low.c: New.
3031
1ebff1fd
HAQ
30322013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
3033
3034 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3035
f6150862
HZ
30362013-04-25 Hui Zhu <hui@codesourcery.com>
3037
3038 PR gdb/15186
f6150862
HZ
3039 * ax.c (ax_printf): Add fflush.
3040
614c279d
TT
30412013-04-22 Tom Tromey <tromey@redhat.com>
3042
3043 * Makefile.in (SFILES): Add filestuff.c.
3044 (OBS): Add filestuff.o.
3045 (filestuff.o): New target.
3046 * config.in, configure: Rebuild.
3047 * configure.ac: Check for fdwalk, pipe2.
3048
7d4e5717
PA
30492013-04-17 Pedro Alves <palves@redhat.com>
3050
3051 * configure.ac (USE_THREAD_DB): Delete variable.
3052 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3053 Don't AC_SUBST USE_THREAD_DB.
3054 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3055 * config.in, configure: Regenerate.
3056
d5c93e41
PA
30572013-04-16 Pedro Alves <palves@redhat.com>
3058
3059 * linux-low.h (struct lwp_info) <thread_known>: Move under
3060 the USE_THREAD_DB #ifdef.
3061
04f5fe89
PA
30622013-04-16 Pedro Alves <palves@redhat.com>
3063
3064 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
3065 (linux-low.o): Delete rule.
3066 * linux-low.h: Always include "gdb_thread_db.h" instead of
3067 conditionally including thread_db.h.
3068 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3069 HAVE_THREAD_DB_H.
3070
480b27bf
JK
30712013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3072
3073 * Makefile.in (install-only): Fix make install regression.
3074
43662968
JK
30752013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
3076
3077 Convert man pages to texinfo, new gdbinit.5 texinfo page.
3078 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
3079 installation.
3080 * gdbserver.1: Remove.
3081
3e74e146
PA
30822013-03-22 Pedro Alves <palves@redhat.com>
3083
3084 * linux-low.c (handle_extended_wait): Don't call
3085 linux_enable_event_reporting.
3086
a8347a2a
TT
30872013-03-15 Tony Theodore <tonyt@logyst.com>
3088
3089 PR build/9098:
3090 * Makefile.in (SHELL): Use @SHELL@.
3091
eeb56fa7
SDJ
30922013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
3093
3094 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
3095 compiler warning.
3096
4fa7e2ff
JB
30972013-03-13 Joel Brobecker <brobecker@adacore.com>
3098
3099 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
3100 Remove extraneous NULL element.
3101
8ddb1965
YQ
31022013-03-13 Yao Qi <yao@codesourcery.com>
3103
3104 * tracepoint.c (traceframe_read_tsv): Look for the last matched
3105 'V' block in trace frame.
3106
9accd112
MM
31072013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3108
3109 * target.h (struct target_ops): Add btrace ops.
3110 (target_supports_btrace): New macro.
3111 (target_enable_btrace): New macro.
3112 (target_disable_btrace): New macro.
3113 (target_read_btrace): New macro.
3114 * gdbthread.h (struct thread_info): Add btrace field.
3115 * server.c: Include btrace-common.h.
3116 (handle_btrace_general_set): New function.
3117 (handle_btrace_enable): New function.
3118 (handle_btrace_disable): New function.
3119 (handle_general_set): Call handle_btrace_general_set.
3120 (handle_qxfer_btrace): New function.
3121 (struct qxfer qxfer_packets[]): Add btrace entry.
3122 * inferiors.c (remove_thread): Disable btrace.
3123 * linux-low: Include linux-btrace.h.
3124 (linux_low_enable_btrace): New function.
3125 (linux_low_read_btrace): New function.
3126 (linux_target_ops): Add btrace ops.
3127 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
3128 Add srv_linux_btrace=yes.
3129 (x86_64-*-linux*): Add linux-btrace.o.
3130 Add srv_linux_btrace=yes.
3131 * configure.ac: Define HAVE_LINUX_BTRACE.
3132 * config.in: Regenerated.
3133 * configure: Regenerated.
3134
5cc22e4c
MM
31352013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3136
3137 * server.c (handle_qxfer): Preserve error message if -3 is
3138 returned.
3139 (qxfer): Document the -3 return value.
3140
7c97f91e
MM
31412013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3142
3143 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
3144 (linux_btrace_h): New variable.
3145 (linux-btrace.o): New rule.
3146
be9a119c 31472013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
3148 Hafiz Abid Qadeer <abidh@codesourcery.com>
3149
3150 * tracepoint.c (trace_buffer_size): New global.
3151 (DEFAULT_TRACE_BUFFER_SIZE): New define.
3152 (init_trace_buffer): Change to one-argument function. Allocate
3153 trace buffer memory.
3154 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
3155 handle QTBuffer:size packet.
3156 (cmd_bigqtbuffer_size): New function.
3157 (initialize_tracepoint): Call init_trace_buffer with
3158 DEFAULT_TRACE_BUFFER_SIZE.
3159 * server.c (handle_query): Add QTBuffer:size in the
3160 supported packets.
3161
e64f7499
YQ
31622013-03-07 Yao Qi <yao@codesourcery.com>
3163
3164 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
3165 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
3166 of -1.
3167 (cmd_qtsp): Adjust condition. Do post increment.
3168 Set cur_action and cur_step_action back to 0.
3169
f0ae6fc3
PA
31702013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
3171
3172 PR server/15236
3173 * linux-low.c (linux_write_memory): Return early success if LEN is
3174 zero.
3175
b5b0b0af
CV
31762013-03-05 Corinna Vinschen <vinschen@redhat.de>
3177
334ad4a8 3178 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 3179
589bc927
TT
31802013-02-28 Tom Tromey <tromey@redhat.com>
3181
3182 * configure.ac: Invoke AC_SYS_LARGEFILE.
3183 * configure, config.in: Rebuild.
3184
dfe07582
CV
31852013-02-28 Corinna Vinschen <vinschen@redhat.com>
3186
3187 * win32-low.c: Throughout, fix format strings and casts of
3188 printf-like functions to avoid type related warnings on all
3189 platforms.
3190 (get_child_debug_event): Print dwDebugEventCode as hex since
3191 that's how it's usually documented.
3192
736cd585
YQ
31932013-02-28 Yao Qi <yao@codesourcery.com>
3194
3195 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
3196 pulongest.
3197
e1f58301
JW
31982013-02-27 Jiong Wang <jiwang@tilera.com>
3199
3200 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3201 (reg-tilegx32.c): New rule.
3202 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3203 * linux-tile-low.c (tile_arch_setup): New function. Invoke
3204 different register info initializer according to elf class.
3205 (init_registers_tilgx32): New function. The tilegx32 register info
3206 initializer.
3207 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3208 (tile_store_gregset): Likewise.
3209
d171ca78
YQ
32102013-02-27 Yao Qi <yao@codesourcery.com>
3211
3212 * server.c (process_point_options): Print debug message when
3213 debug_threads is true.
3214
282bbdf3
YQ
32152013-02-26 Yao Qi <yao@codesourcery.com>
3216
3217 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
3218
aca22551
PA
32192013-02-19 Pedro Alves <palves@redhat.com>
3220 Kai Tietz <ktietz@redhat.com>
3221
3222 PR gdb/15161
3223
3224 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
3225 instead of strtoul to extract address from packet.
3226 (process_serial_event) <'z'>: Likewise.
3227
4f3cee1c
YQ
32282013-02-18 Yao Qi <yao@codesourcery.com>
3229
3230 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3231
8e1d55a3
PA
32322013-02-14 Pedro Alves <palves@redhat.com>
3233
3234 Plug memory leak.
3235
3236 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3237 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3238
458820da
PA
32392013-02-14 Pedro Alves <palves@redhat.com>
3240
3241 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3242
baea0dae
PA
32432013-02-14 Pedro Alves <palves@redhat.com>
3244
3245 * tracepoint.c (save_string): Delete.
3246 (add_tracepoint_action): Use savestring instead of save_string.
3247
0b1afbb3
PA
32482013-02-12 Pedro Alves <palves@redhat.com>
3249
3250 * linux-xtensa-low.c: Ditto.
3251 * xtensa-xtregs.c: Ditto.
3252
8a4ac37e
PA
32532013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3254
3255 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3256 thread_db.
3257
148de6bb
MS
32582013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3259
3260 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3261 aarch64_num_wp_regs and aarch64_num_bp_regs to
3262 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3263
55fac6e0
MS
32642013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3265
3266 * linux-aarch64-low.c (ps_get_thread_area): Replace
3267 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3268
176eb98c
MS
32692013-02-04 Jim MacArthur <jim.macarthur@arm.com>
3270 Marcus Shawcroft <marcus.shawcroft@arm.com>
3271 Nigel Stephens <nigel.stephens@arm.com>
3272 Yufeng Zhang <yufeng.zhang@arm.com>
3273
3274 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3275 (aarch64.c, aarch64-without-fpu.c): New targets.
3276 * configure.srv (aarch64*-*-linux*): New.
3277 * linux-aarch64-low.c: New file.
3278
56f7af9c
MS
32792013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3280
43aaf8b6 3281 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
3282 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3283 (dequeue_one_deferred_signal, linux_resume_one_thread)
3284 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3285 (linux_tracefork_grandchild, linux_test_for_tracefork)
3286 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3287 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3288 where the argument is 0.
3289
60f662b0
YQ
32902013-01-25 Yao Qi <yao@codesourcery.com>
3291
3292 * event-loop.c: Include "queue.h".
3293 (gdb_event_p): New typedef.
3294 (struct gdb_event) <next_event>: Remove.
3295 (event_queue): Change to QUEUE(gdb_event_p).
3296 (async_queue_event): Remove.
3297 (gdb_event_xfree): New.
3298 (initialize_event_loop): New.
3299 (process_event): Use API from QUEUE.
3300 (wait_for_event): Likewise.
3301 * server.c (main): Call initialize_event_loop.
3302 * server.h (initialize_event_loop): Declare.
3303
5ae4861a
YQ
33042013-01-18 Yao Qi <yao@codesourcery.com>
3305
3306 * ax.h (struct eval_agent_expr_context): New.
3307 (gdb_eval_agent_expr): Update declaration.
3308 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
3309 TFRAME. Add new argument CTX.
3310 * server.h (struct eval_agent_expr_context): Declare.
3311 (agent_mem_read, agent_tsv_read): Update declaration.
3312 (agent_mem_read_string): Likewise.
3313 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
3314 (add_traceframe_block): Add new argument TPOINT.
3315 Increase TPOINT->traceframe_usage.
3316 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
3317 eval_tracepoint_agent_expr.
3318 (condition_true_at_tracepoint): Likewise.
3319 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
3320 (agent_mem_read_string, agent_tsv_read): Likewise.
3321
85e00e85
YQ
33222013-01-16 Yao Qi <yao@codesourcery.com>
3323
3324 * linux-low.c (linux_resume_one_lwp): Don't check
3325 'lwp->bp_reinsert != 0'.
3326
4039cf45
JB
33272013-01-07 Joel Brobecker <brobecker@adacore.com>
3328 Pedro Alves <palves@redhat.com>
3329
3330 * lynx-low.c (ptrace_request_to_str): Define a temporary
3331 macro and use it to simplify this function's implementation.
3332
9044dee2
JB
33332013-01-07 Joel Brobecker <brobecker@adacore.com>
3334
3335 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
3336 sets errno.
3337
e6352c8f
JB
33382013-01-07 Joel Brobecker <brobecker@adacore.com>
3339
3340 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
3341
50681a27
JB
33422013-01-07 Joel Brobecker <brobecker@adacore.com>
3343
3344 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
3345
3f6e77ef
JB
33462013-01-07 Joel Brobecker <brobecker@adacore.com>
3347
3348 * lynx-low.c (lynx_resume): Use the resume_info parameter
3349 to determine the ptid for the lynx_ptrace call, unless
3350 it is equal to minus_one_ptid, in which case we use the
3351 ptid of the current_inferior.
3352 (lynx_wait_1): After having received a thread create/exit
3353 event, resume the inferior's execution using the signaling
3354 thread's ptid, rather than the old ptid.
3355
7fda33ae
JB
33562013-01-07 Joel Brobecker <brobecker@adacore.com>
3357
3358 * lynx-low.c (lynx_resume): Delete variable ret.
3359
b9786c74
JB
33602013-01-01 Joel Brobecker <brobecker@adacore.com>
3361
3362 * gdbreplay.c (gdbreplay_version): Update copyright year.
3363 * server.c (gdbserver_version): Likewise.
3364
8b93d60f
JB
33652012-12-17 Joel Brobecker <brobecker@adacore.com>
3366
3367 * lynx-low.c (lynx_wait_1): Add debug trace before adding
3368 new thread.
3369
037335a7
JB
33702012-12-17 Joel Brobecker <brobecker@adacore.com>
3371
3372 * lynx-low.c (ptrace_request_to_str): Add handling for
3373 PTRACE_GETTRACESIG.
3374
52d4cbd8
JB
33752012-12-17 Joel Brobecker <brobecker@adacore.com>
3376
3377 * lynx-low.c (lynx_attach): Delete variable new_process.
3378
ab8f6ca9
JB
33792012-12-17 Joel Brobecker <brobecker@adacore.com>
3380
3381 * lynx-low.c (lynx_create_inferior): Delete variable
3382 new_process.
3383
78cbc024
JB
33842012-12-17 Joel Brobecker <brobecker@adacore.com>
3385
3386 * lynx-low.c (ptrace_request_to_str): Do not handle
3387 PTRACE_GETTHREADLIST if this macro does not exist.
3388
14a00470
YQ
33892012-12-15 Yao Qi <yao@codesourcery.com>
3390
3391 * Makefile.in (OBS): Add notif.o.
3392 * notif.c, notif.h: New.
3393 * server.c: Include "notif.h".
3394 (struct vstop_notif) <next>: Remove.
3395 <base>: New field.
3396 (queue_stop_reply): Update.
3397 (push_event, send_next_stop_reply): Remove.
3398 (discard_queued_stop_replies): Update.
3399 (notif_stop): New variable.
3400 (handle_v_stopped): Remove.
3401 (handle_v_requests): Don't call handle_v_stopped. Call
3402 handle_ack_notif instead.
3403 (queue_stop_reply_callback): Call notif_event_enque instead
3404 of queue_stop_reply.
3405 (handle_status): Don't call send_next_stop_reply, call
3406 notif_write_event instead.
3407 (kill_inferior_callback): Likewise.
3408 (detach_or_kill_inferior_callback): Likewise.
3409 (main): Call initialize_notif.
3410 (process_serial_event): Call QUEUE_is_empty.
3411 (handle_target_event): Call notif_push instead of push event.
3412 * server.h (push_event): Remove declaration.
3413
61c125b9
TT
34142012-12-10 Tom Tromey <tromey@redhat.com>
3415
3416 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
3417 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
3418 macros.
3419 (.c.o): Rewrite.
3420 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
3421 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
3422 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
3423 (amd64-linux-ipa.o, ax.o): Rewrite.
3424 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
3425 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
3426 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
3427 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
3428 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
3429 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
3430 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
3431 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
3432 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
3433 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
3434 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
3435 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
3436 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
3437 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
3438 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
3439 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
3440 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
3441 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
3442 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
3443 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
3444 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
3445 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
3446 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
3447 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
3448 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
3449 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
3450 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
3451 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
3452 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
3453 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
3454 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
3455 (reg-tilegx.o): Remove.
3456 (all_object_files): New macro.
3457 Include .deps files.
3458 * aclocal.m4, configure: Rebuild.
3459 * acinclude.m4: Include depstand.m4, lead-dot.m4.
3460 * configure.ac: Invoke ZW_CREATE_DEPDIR,
3461 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
3462
e90e9ad9
TT
34632012-12-05 Tom Tromey <tromey@redhat.com>
3464
3465 PR gdb/14917:
3466 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
3467
02d403bf 34682012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
3469
3470 * configure.ac: Check for linux/perf_event.h.
3471 * config.in: Regenerated.
3472 * configure: Regenerated.
3473
0270a750
PA
34742012-11-26 Maxime Villard <rustyBSD@gmx.fr>
3475
3476 * hostio.c (handle_readlink): Decrease buffer size
3477 parameter passed to readlink by one byte.
3478
8c29b58e
YQ
34792012-11-26 Yao Qi <yao@codesourcery.com>
3480
3481 * configure.ac (build_warnings): Append '-Wempty-body'.
3482 * configure: Regenerated.
3483 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
3484 body.
3485
8bdce1ff
PM
34862012-11-15 Pierre Muller <muller@sourceware.org>
3487
3488 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
3489 * config.in: Regenerate.
3490 * configure: Regenerate.
3491 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
3492 Use "gdb_wait.h" header instead of <sys/wait.h> header.
3493 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3494 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
3495 header.
3496 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
3497 instead of <sys/wait.h> header.
3498 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3499
02d403bf 35002012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
3501
3502 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
3503 (various make rules): Remove -DGDBSERVER
3504
fbd5db48
YQ
35052012-11-09 Yao Qi <yao@codesourcery.com>
3506
3507 * spu-low.c (current_ptid): Move it to ..
3508 * gdbthread.h: ... here. New.
3509 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
3510 * server.c (myresume, process_serial_event): Likewise.
3511 * thread-db.c (thread_db_find_new_threads): Likewise.
3512 * tracepoint.c (run_inferior_command): Likewise.
3513
b3dc46ff
AB
35142012-10-01 Andrew Burgess <aburgess@broadcom.com>
3515
3516 * server.c (handle_search_memory_1): Include access length in
3517 warning message.
3518
07c04788
HPN
35192012-09-05 Michael Brandt <michael.brandt@axis.com>
3520
3521 * linux-crisv32-low.c: Fix compile errors.
3522
918d227b
YQ
35232012-09-04 Yao Qi <yao@codesourcery.com>
3524
3525 * tracepoint.c (cmd_qtsv): Adjust debug message.
3526 Don't check CUR_TPOINT.
3527
18c1b81a
YQ
35282012-08-28 Yao Qi <yao@codesourcery.com>
3529
3530 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
3531 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
3532 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
3533 Remove declarations of xmalloc, xreallloc, xstrdup and
3534 freeargv.
3535 * Makefile.in (libiberty_h): New.
3536 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
3537 (linux-bfin-low.o): Append dependency 'libiberty.h'.
3538
dc82f37b
YQ
35392012-08-23 Yao Qi <yao@codesourcery.com>
3540
3541 * server.h: Remove declaration of 'xsnprintf'.
3542
406b1477
KS
35432012-08-22 Keith Seitz <keiths@redhat.com>
3544
3545 * server.h: Include build-gnulib-gbserver/config.h.
3546 * gdbreplay.c: Likewise.
3547
e6712ff1
DE
35482012-08-08 Doug Evans <dje@google.com>
3549
3550 * Makefile.in (SFILES): Add gdb_vecs.c.
3551 (OBS): Add gdb_vecs.o.
3552 (gdb_vecs_h, host_defs_h): New variables.
3553 (thread-db.o): Add $(gdb_vecs_h) dependency.
3554 (gdb_vecs.o): New rule.
3555 * thread-db.c: #include "gdb_vecs.h".
3556 (thread_db_load_search): Use a vector to iterate over path elements.
3557 Handle text appearing after "$pdir".
3558
3559 * configure.ac: Add check for strstr.
3560 * config.in: Regenerate.
3561 * configure: Regenerate.
3562
7c3270ae
UW
35632012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
3564
3565 * hostio.c (handle_pread): If pread fails, fall back to attempting
3566 lseek/read.
3567 (handle_pwrite): Likewise for pwrite.
3568
b62e2b27
UW
35692012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
3570
3571 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
3572 between unsupported TYPE and unimplementable ADDR/LEN combination.
3573 (arm_insert_point): Act on new return value.
3574
78a99e91
PA
35752012-07-31 Pedro Alves <palves@redhat.com>
3576
3577 * server.c (process_point_options): Only skip tokens if we find
3578 one that is unrecognized. Don't treat 'X' specially while
3579 skipping unrecognized tokens.
3580
fcf303ab
UW
35812012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
3582
3583 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
3584 to 4-byte-align HW breakpoint addresses for Thumb.
3585
7255706c
YQ
35862012-07-27 Yao Qi <yao@codesourcery.com>
3587
3588 PR remote/14161.
3589
3590 * server.h: Declare gdb_agent_about_to_close.
3591 * target.c (kill_inferior): Include "agent.h".
3592 New. Send command 'kill'.
3593 * target.h (kill_inferior): Removed macro.
3594 * tracepoint.c (gdb_agent_about_to_close): New.
3595 (gdb_agent_helper_thread): Handle command 'close'.
3596 Wait endlessly until the inferior stops.
3597 Install gdb_agent_remove_socket to atexit hook.
3598 (agent_socket_name): New static variable.
3599 (gdb_agent_socket_init): Replace local variable 'name' with
3600 'agent_socket_name'.
3601 (gdb_agent_remove_socket): New.
3602
5a3f286f
YQ
36032012-07-27 Yao Qi <yao@codesourcery.com>
3604
3605 * server.c (process_point_options): Stop at 'X' when parsing.
3606
961bd387
ME
36072012-07-19 Michael Eager <eager@eagercon.com>
3608
a261b8f5 3609 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
3610 to hw_execute.
3611 * linux-x86-low.c (x86_insert_point, x86_remove_point):
3612 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
3613 hardware breakpoint.
3614
aa7c7447
JK
36152012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3616
3617 * gdbserver/linux-low.c (initialize_low): Call
3618 linux_ptrace_init_warnings.
3619
7f216e7c
DE
36202012-07-02 Doug Evans <dje@google.com>
3621
3622 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
3623 pointer to int.
3624
d3ce09f5
SS
36252012-07-02 Stan Shebs <stan@codesourcery.com>
3626
3627 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
3628 (ax.o): Add it to build rule.
3629 (ax-ipa.o): Ditto.
3630 (OBS): Add format.o.
3631 (IPA_OBS): Add format.o.
3632 * server.c (handle_query): Claim support for breakpoint commands.
3633 (process_point_options): Add command case.
3634 (process_serial_event): Leave running if there are printfs in
3635 effect.
3636 * mem-break.h (any_persistent_commands): Declare.
3637 (add_breakpoint_commands): Declare.
3638 (gdb_no_commands_at_breakpoint): Declare.
3639 (run_breakpoint_commands): Declare.
3640 * mem-break.c (struct point_command_list): New struct.
3641 (struct breakpoint): New field command_list.
3642 (any_persistent_commands): New function.
3643 (add_commands_to_breakpoint): New function.
3644 (add_breakpoint_commands): New function.
3645 (gdb_no_commands_at_breakpoint): New function.
3646 (run_breakpoint_commands): New function.
3647 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
3648 locally.
3649 * ax.c: Include format.h.
3650 (ax_printf): New function.
3651 (gdb_eval_agent_expr): Add printf opcode.
3652
2f8f6aed
YQ
36532012-06-13 Yao Qi <yao@codesourcery.com>
3654
3655 * server.c (start_inferior): Remove duplicated writes to fields
3656 'last_resume_kind' and 'last_status' of 'current_inferior'.
3657
0c9070b3
YQ
36582012-06-12 Yao Qi <yao@codesourcery.com>
3659 Pedro Alves <palves@redhat.com>
3660
3661 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
3662 comment.
3663 * server.c (handle_v_cont): Extend comment.
3664
c52daf70
YQ
36652012-06-11 Yao Qi <yao@codesourcery.com>
3666
3667 * linux-low.c (linux_attach): Add 'static'.
3668
d38bbb0a
YQ
36692012-06-06 Yao Qi <yao@codesourcery.com>
3670
3671 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
3672
89dc0afd
JK
36732012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
3674
3675 Fix gcc -flto compilation warning.
3676 * server.c (main): Make variable multi_mode and attach volatile.
3677
75f62ce7
TJB
36782012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3679
3680 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
3681 if the platform doesn't know about it.
3682
65f479b6
PA
36832012-05-30 Jeff Kenton <jkenton@tilera.com>
3684
3685 * Makefile.in (SFILES): Add linux-tile-low.c.
3686 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
3687 * configure.srv: Handle tilegx-*-linux*.
3688 * linux-tile-low.c: New file.
3689
0c5bf5a9
JK
36902012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3691
3692 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
3693
a493e3e2
PA
36942012-05-24 Pedro Alves <palves@redhat.com>
3695
3696 PR gdb/7205
3697
43aaf8b6 3698 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 3699
2ea28649
PA
37002012-05-24 Pedro Alves <palves@redhat.com>
3701
3702 PR gdb/7205
3703
3704 Replace target_signal with gdb_signal throughout.
3705
8d409d16
MR
37062012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
3707
3708 * linux-low.c (linux_store_registers): Avoid the copying sequence
3709 when no data has been retrieved by ptrace.
3710
23512c01
MGD
37112012-05-22 Will Deacon <will.deacon@arm.com>
3712
3713 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
3714 Include asm/ptrace.h.
3715 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
3716 already defined.
3717
4934b29e
MR
37182012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
3719
3720 * linux-low.c (linux_store_registers): Don't re-retrieve data
3721 with ptrace that has already been obtained from /proc. Always
3722 copy any data retrieved with ptrace to the buffer supplied.
3723
bde24c0a
PA
37242012-05-11 Yao Qi <yao@codesourcery.com>
3725 Pedro Alves <palves@redhat.com>
3726
3727 * linux-low.c (enum stopping_threads_kind): New.
3728 (stopping_threads): Change type to `enum stopping_threads_kind'.
3729 (handle_extended_wait): If stopping and suspending threads, leave
3730 the new_lwp suspended too.
3731 (linux_wait_for_event): Adjust.
3732 (stop_all_lwps): Set `stopping_threads' to
3733 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
3734 whether we're suspending threads or just stopping them. Assert no
3735 recursion happens.
3736
623b6bdf
YQ
37372012-04-29 Yao Qi <yao@codesourcery.com>
3738
3739 * server.h: Move some code to ...
3740 * gdbthread.h: ... here. New.
3741 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
3742 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
3743 (nto-low.o, win32-low.o): Likewise.
3744 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
3745 * regcache.c, remote-utils.c, server.c: Likewise.
3746 * target.c, tracepoint.c, win32-low.c: Likewise.
3747
f15f9948
TJB
37482012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3749
3750 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
3751 (PTRACE_ARG4_TYPE): Likewise.
3752 (PTRACE_XFER_TYPE): Likewise.
3753 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
3754 ptrace to PTRACE_ARG3_TYPE.
3755 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
3756 (PTRACE_ARG4_TYPE): Likewise.
3757 (PTRACE_XFER_TYPE): Likewise.
3758 (linux_detach_one_lwp): Cast fourth argument of
3759 ptrace to long then PTRACE_ARG4_TYPE.
3760 (regsets_fetch_inferior_registers): Cast third argument of
3761 ptrace to long then PTRACE_ARG3_TYPE.
3762 (regsets_store_inferior_registers): Likewise.
3763
38ea300a
PA
37642012-04-20 Pedro Alves <palves@redhat.com>
3765
3766 * configure: Regenerate.
3767
c971b7fa
PA
37682012-04-19 Pedro Alves <palves@redhat.com>
3769
43aaf8b6 3770 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 3771 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
3772 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
3773 (all, install-only, uninstall, clean-info, all-lib, clean): No
3774 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
3775 (maintainer-clean realclean distclean): Use subdir_do.
3776 (subdir_do): New.
3777 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 3778 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
3779 * acinclude.m4: Include acx_configure_dir.m4.
3780 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
3781 calls. Call AC_PROG_RANLIB. Configure gnulib using
3782 ACX_CONFIGURE_DIR.
3783 (GNULIB): New.
3784 (GNULIB_STDINT_H): Adjust.
3785 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
3786 * gdbreplay.c: Include build-gnulib/config.h.
3787 * server.h: Likewise.
3788 * aclocal.m4: Regenerate.
3789 * config.in: Regenerate.
3790 * configure: Regenerate.
c971b7fa 3791
809277f8
PA
37922012-04-19 Pedro Alves <palves@redhat.com>
3793
3794 * Makefile.in (LIBGNU, INCGNU): Adjust.
3795 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
3796 (all, install-only, uninstall, clean-info, all-lib, clean)
3797 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
3798 * configure.ac: Adjust AC_OUTPUT output.
3799 * aclocal.m4: Regenerate.
3800 * configure: Regenerate.
3801
fd9bb8b8
PA
38022012-04-19 Pedro Alves <palves@redhat.com>
3803
3804 * Makefile.in (generated_files): New.
3805 (server_h): Remove the explicit dependency on config.h, and depend
3806 on $generated_files.
3807
1c298c66
PA
38082012-04-19 Pedro Alves <palves@redhat.com>
3809
3810 * Makefile.in (INCGNU): Add -Ignulib.
3811
57c4b50b
PA
38122012-04-19 Pedro Alves <palves@redhat.com>
3813
3814 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
3815 (INCGNU): ... this, and spell out -I here.
3816 (GNULIB_LIB): Rename to ...
3817 (LIBGNU): ... this.
3818 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
3819
1030e047
PA
38202012-04-19 Pedro Alves <palves@redhat.com>
3821
3822 * config.in: Regenerate.
3823
447d4319
PA
38242012-04-19 Pedro Alves <palves@redhat.com>
3825
3826 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
3827 * server.h (memmem): Remove declaration.
3828 * config.in: Regenerate.
3829 * configure: Regenerate.
3830
aad9eab9
YQ
38312012-04-19 Yao Qi <yao@codesourcery.com>
3832
3833 * Makefile.in (SFILES): Add common/vec.c.
3834 (OBS): Add vec.o.
3835 (vec.o): New rule.
3836
3e10640f
YQ
38372012-04-19 Yao Qi <yao@codesourcery.com>
3838
3839 * remote-utils.c (prepare_resume_reply): Replace with macro
3840 target_core_of_thread.
3841 * server.c (handle_qxfer_threads_proper): Likewise.
3842 * target.h (traget_core_of_thread): New macro.
3843
71622373
PA
38442012-04-18 Pedro Alves <palves@redhat.com>
3845
3846 * aclocal.m4: Regenerate.
3847 * configure: Regenerate.
3848
80d26939
YQ
38492012-04-16 Yao Qi <yao@codesourcery.com>
3850
3851 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
3852 duplicated on address.
3853
42476b70
YQ
38542012-04-16 Yao Qi <yao@codesourcery.com>
3855
3856 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
3857 (struct tracepoint_action_ops) <send>: New field.
3858 (m_tracepoint_action_send, r_tracepoint_action_send): New.
3859 (agent_expr_send, x_tracepoint_action_send): New.
3860 (l_tracepoint_action_send): New.
3861 (cmd_qtdp): Download and install tracepoint
3862 according to `use_agent'.
3863 (run_inferior_command): Add one more parameter `len'.
3864 Update callers.
3865 (tracepoint_send_agent): New.
3866 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
3867
7bc83639
YQ
38682012-04-16 Yao Qi <yao@codesourcery.com>
3869
3870 * tracepoint.c (download_tracepoints): Moved to ...
3871 (cmd_qtstart): ... here.
3872
5f18041e
YQ
38732012-04-14 Yao Qi <yao@codesourcery.com>
3874
3875 * tracepoint.c: Include inttypes.h.
3876 (struct collect_memory_action): Use sized types.
3877 (struct tracepoint): Likewise.
3878 (cmd_qtdp, stop_tracing): Update print specifiers.
3879 (cmd_qtp, response_tracepoint): Likewise.
3880 (collect_data_at_tracepoint): Likewise.
3881 (collect_data_at_step): Likewise.
3882
55a8c076
YQ
38832012-04-14 Yao Qi <yao@codesourcery.com>
3884
3885 Import gnulib module inttypes.
3886 * aclocal.m4, config.in, configure: Regenerated.
3887
dc750257
YQ
38882012-04-14 Yao Qi <yao@codesourcery.com>
3889
3890 * Makefile.in (maintainer-clean, realclean, distclean): Remove
3891 Makefile and config.status at last.
3892
0ab5faf9
YQ
38932012-04-13 Yao Qi <yao@codesourcery.com>
3894
3895 * tracepoint.c: Include stdint.h unconditionally.
3896
18f5fd81
TJB
38972012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3898
3899 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
3900 on BFD_HAVE_SYS_PROCFS_TYPE.
3901 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
3902 * configure: Regenerate.
3903 * config.in: Likewise.
3904
4d47af5c
L
39052012-04-13 H.J. Lu <hongjiu.lu@intel.com>
3906
3907 * Makefile.in (clean): Also remove x32.c x32-linux.c
3908 x32-avx.c x32-avx-linux.c.
3909 (x32.o): New target.
3910 (x32.c): Likewise.
3911 (x32-linux.o): Likewise.
3912 (x32-linux.c): Likewise.
3913 (x32-avx.o): Likewise.
3914 (x32-avx.c): Likewise.
3915 (x32-avx-linux.o): Likewise.
3916 (x32-avx-linux.c): Likewise.
3917
3918 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
3919 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
3920 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
3921 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
3922 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
3923 i386/x32-avx-linux.xml.
3924
3925 * linux-x86-low.c (init_registers_x32_linux): New prototype.
3926 (init_registers_x32_avx_linux): Likwise.
3927 (x86_linux_update_xmltarget): Call init_registers_x32_linux
3928 or init_registers_x32_avx_linux if linux_is_elf64 is false.
3929
ecedbe58
PA
39302012-04-13 Pedro Alves <palves@redhat.com>
3931
3932 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
3933 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
3934 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
3935 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
3936 the sub-make.
3937
c92b5177
L
39382012-04-12 H.J. Lu <hongjiu.lu@intel.com>
3939
3940 * linux-x86-low.c (compat_x32_clock_t): New.
3941 (compat_x32_siginfo_t): Likewise.
3942 (compat_x32_siginfo_from_siginfo): Likewise.
3943 (siginfo_from_compat_x32_siginfo): Likewise.
3944 (linux_is_elf64): Likewise.
3945 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
3946 and siginfo_from_compat_x32_siginfo for x32.
3947 (x86_arch_setup): Set linux_is_elf64.
3948
214d508e
L
39492012-04-12 H.J. Lu <hongjiu.lu@intel.com>
3950
3951 PR gdb/13969
3952 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
3953 e_machine field.
3954 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
3955 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
3956 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
3957 compatible with process.
3958
c9a1864a
YQ
39592012-04-12 Yao Qi <yao@codesourcery.com>
3960
3961 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
3962 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
3963 (install-only, install-info, clean): Handle sub dir gnulib.
3964 (all-lib, am--refresh): New targets.
3965 (memmem.o): Remove target.
3966 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
3967 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
3968 (AC_REPLACE_FUNCS): Remove memmem.
3969 Invoke gl_INIT and AM_INIT_AUTOMAKE.
3970 (AC_OUTPUT): Generate Makefile in gnulib/.
3971 * aclocal.m4, config.in, configure: Regenerated.
3972
367ba2c2
MR
39732012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
3974
3975 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
3976
9d236627
PA
39772012-04-05 Pedro Alves <palves@redhat.com>
3978
3979 -Werror=strict-aliasing
3980
3981 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
3982 pointer.
3983
111217b3
PA
39842012-04-04 Pedro Alves <palves@redhat.com>
3985
3986 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
3987 (sparc_store_gregset_from_stack, sparc_store_gregset)
3988 (sparc_breakpoint_at): Fix formatting.
3989
8365dcf5
TJB
39902012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3991
3992 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
3993 are available.
3994 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
3995 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
3996 * config.in: Regenerate.
3997 * configure: Likewise.
3998
689cc2ae
PA
39992012-03-29 Pedro Alves <palves@redhat.com>
4000
4001 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4002 Correct ptrace arguments.
4003
c14dfd32
PA
40042012-03-28 Pedro Alves <palves@redhat.com>
4005
4006 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4007 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4008 (IA64_FR1_REGNUM): New defines.
4009 (ia64_fetch_register): New.
4010 (the_low_target): Install it.
4011 * linux-low.h (struct linux_target_ops) <fetch_register>: New
4012 field.
4013 * linux-low.c (linux_fetch_registers): Try the
4014 the_low_target.fetch_register hook first.
4015
4016 * linux-arm-low.c (the_low_target): Adjust.
4017 * linux-bfin-low.c (the_low_target): Adjust.
4018 * linux-cris-low.c (the_low_target): Adjust.
4019 * linux-crisv32-low.c (the_low_target): Adjust.
4020 * linux-m32r-low.c (the_low_target): Adjust.
4021 * linux-m68k-low.c (the_low_target): Adjust.
4022 * linux-mips-low.c (the_low_target): Adjust.
4023 * linux-ppc-low.c (the_low_target): Adjust.
4024 * linux-s390-low.c (the_low_target): Adjust.
4025 * linux-sh-low.c (the_low_target): Adjust.
4026 * linux-sparc-low.c (the_low_target): Adjust.
4027 * linux-tic6x-low.c (the_low_target): Adjust.
4028 * linux-x86-low.c (the_low_target): Adjust.
4029 * linux-xtensa-low.c (the_low_target): Adjust.
4030
63c88e13
PA
40312012-03-26 Pedro Alves <palves@redhat.com>
4032
4033 * server.c (handle_qxfer_libraries): Don't bail early if
4034 the_target->qxfer_libraries_svr4 is not NULL.
4035
fb723180
PA
40362012-03-26 Pedro Alves <palves@redhat.com>
4037
4038 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4039
0afae3cf
PA
40402012-03-23 Pedro Alves <palves@redhat.com>
4041
4042 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4043 "library-list-svr4" element's start tag when the the DSO list is
4044 empty.
4045
485f1ee4
PA
40462012-03-23 Pedro Alves <palves@redhat.com>
4047
4048 * linux-low.c (read_one_ptr): Read the inferior's pointer through
4049 a variable whose type size is the same as the inferior's pointer
4050 size.
4051
a5362b9a
TS
40522012-03-21 Thomas Schwinge <thomas@codesourcery.com>
4053
4054 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4055 struct siginfo.
4056 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4057 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4058 * linux-low.h: Include <signal.h>.
4059 (struct siginfo): Remove forward declaration.
4060 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
4061 struct siginfo.
4062
d226c142
MF
40632012-03-21 Mike Frysinger <vapier@gentoo.org>
4064
4065 * .gitignore: Ignore more files.
4066
122f36ef
PA
40672012-03-19 Pedro Alves <palves@redhat.com>
4068 Jan Kratochvil <jan.kratochvil@redhat.com>
4069
4070 * server.c (cont_thread, general_thread): Add describing comments.
4071 (start_inferior): Clear `cont_thread'.
4072 (handle_v_cont): Don't set `cont_thread' if resuming all threads
4073 of a process.
4074
fc3e5175
YQ
40752012-03-15 Yao Qi <yao@codesourcery.com>
4076
4077 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
4078 handling to ...
4079 (cmd_qtdp): ... here.
4080
8d0d92cd
YQ
40812012-03-15 Yao Qi <yao@codesourcery.com>
4082
4083 * tracepoint.c (struct tracepoint_action_ops): New.
4084 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
4085 (m_tracepoint_action_download): New.
4086 (r_tracepoint_action_download): New.
4087 (x_tracepoint_action_download): New.
4088 (l_tracepoint_action_download): New.
4089 (add_tracepoint_action): Install `action->ops' according type.
4090 (download_tracepoint_1): Move code `download' function pointer
4091 of various tracepoint_action_ops.
4092
87b0bb13
JK
40932012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4094
4095 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
4096 linux_ptrace_attach_warnings.
4097
5f572dec
JK
40982012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4099
4100 * Makefile.in (linux-ptrace.o): New.
4101 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
4102 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
4103 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
4104 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
4105 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
4106 of these targets.
4107 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
4108
f4647387
YQ
41092012-03-08 Yao Qi <yao@codesourcery.com>
4110 Pedro Alves <palves@redhat.com>
4111
4112 Fix PR server/13392.
4113 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
4114 offset of JMP insn.
4115 * tracepoint.c (remove_tracepoint): New.
4116 (cmd_qtdp): Call remove_tracepoint when failed to install.
4117
9b224c5e
PA
41182012-03-07 Pedro Alves <palves@redhat.com>
4119
4120 * linux-low.c (get_detach_signal): New.
4121 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
4122 Pass on pending signals to PTRACE_DETACH. Check the result of the
4123 ptrace call.
4124 * server.c (program_signals, program_signals_p): New.
4125 (handle_general_set): Handle QProgramSignals.
4126 * server.h (program_signals, program_signals_p): Declare.
4127
e237a7e2
JK
41282012-03-05 Pedro Alves <palves@redhat.com>
4129 Jan Kratochvil <jan.kratochvil@redhat.com>
4130
4131 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
4132 New comment why.
4133
5808517f
YQ
41342012-03-03 Yao Qi <yao@codesourcery.com>
4135
4136 * tracepoint.c (tracepoint_look_up_symbols): Update call to
4137 agent_look_up_symbols.
4138
58b4daa5
YQ
41392012-03-03 Yao Qi <yao@codesourcery.com>
4140
4141 * Makefile.in (linux-low.o): Keep dependence on agent.h.
4142 (linux-x86-low.o): Likewise.
4143 * server.h: Remove in_process_agent_loaded.
4144 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
4145 common/agent.c.
4146 Update callers.
4147
8ffcbaaf
YQ
41482012-03-03 Yao Qi <yao@codesourcery.com>
4149
4150 * tracepoint.c (gdb_agent_capability): New global.
4151 (in_process_agent_loaded_ust): Renamed to
4152 `in_process_agent_supports_ust'.
4153 Update callers.
4154 (in_process_agent_supports_ust): Call agent_capability_check.
4155 (clear_installed_tracepoints): Assert that agent supports
4156 agent.
4157
d1feda86
YQ
41582012-03-03 Yao Qi <yao@codesourcery.com>
4159
4160 * linux-low.c (linux_supports_agent): New.
4161 (linux_target_ops): Initialize field `supports_agent' with
4162 linux_supports_agent.
4163 * target.h (struct target_ops) <supports_agent>: New.
4164 (target_supports_agent): New macro.
4165 * server.c (handle_general_set): Handle packet 'QAgent'.
4166 (handle_query): Send `QAgent+'.
4167 * Makefile.in (server.o): Depends on agent.h.
4168
2fa291ac
YQ
41692012-03-03 Yao Qi <yao@codesourcery.com>
4170
4171 * Makefile.in (OBS): Add agent.o.
4172 Add new rule for agent.o.
4173 Track dependence of tracepoint.c on agent.h.
4174 * tracepoint.c (run_inferior_command_1):
4175 (run_inferior_command): Call agent_run_command.
4176 (gdb_ust_connect_sync_socket): Deleted. Move it to
4177 common/agent.c.
4178 (resume_thread, stop_thread): Likewise.
4179 (gdb_ust_socket_init): Renamed to ...
4180 (gdb_agent_socket_init): ... New.
4181 (gdb_ust_thread): Renamed to ...
4182 (gdb_agent_helper_thread): ... New.
4183 (gdb_ust_init): Move some code to ...
4184 (gdb_agent_init): ... here. New.
4185 [HAVE_UST]: Call gdb_ust_init.
4186 (initialize_tracepoint_ftlib): Call gdb_agent_init.
4187 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
4188 * config.in, configure: Regenerated.
4189
05044653
PA
41902012-03-02 Pedro Alves <palves@redhat.com>
4191
4192 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
4193 * linux-low.c (struct simple_pid_list): New.
4194 (stopped_pids): New a struct simple_pid_list pointer.
4195 (add_to_pid_list, pull_pid_from_list): New.
4196 (handle_extended_wait): Don't assume the first signal new children
4197 report is SIGSTOP. Adjust call to pull_pid_from_list.
4198 (linux_wait_for_lwp): Adjust.
4199
8d00225b
YQ
42002012-03-02 Yao Qi <yao@codesourcery.com>
4201
4202 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4203 debug log.
4204
19560ba5
YQ
42052012-03-02 Yao Qi <yao@codesourcery.com>
4206
4207 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4208 `stop_pc' and `tpoint'. Update caller.
4209
1faeff08
MR
42102012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
4211
4212 * linux-low.h (linux_target_ops): Add regset_bitmap member.
4213 * linux-low.c (use_linux_regsets): New macro.
4214 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4215 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4216 (linux_register_in_regsets): New function.
4217 (usr_fetch_inferior_registers): Skip registers covered by
4218 regsets.
4219 (usr_store_inferior_registers): Likewise.
4220 (usr_fetch_inferior_registers): New macro.
4221 (usr_store_inferior_registers): Likewise.
4222 (linux_fetch_registers): Handle mixed regset/non-regset targets.
4223 (linux_store_registers): Likewise.
4224 * linux-mips-low.c (init_registers_mips_dsp_linux): New
4225 prototype.
4226 (init_registers_mips64_dsp_linux): Likewise.
4227 (init_registers_mips_linux): New macro.
4228 (init_registers_mips_dsp_linux): Likewise.
4229 (mips_dsp_num_regs): Likewise.
4230 (DSP_BASE, DSP_CONTROL): New fallback macros.
4231 (mips_base_regs): New macro.
4232 (mips_regmap): Use it. Fix the size.
4233 (mips_dsp_regmap): New variable.
4234 (mips_dsp_regset_bitmap): Likewise.
4235 (mips_arch_setup): New function.
4236 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4237 than mips_regmap.
4238 (mips_cannot_store_register): Likewise.
4239 (the_low_target): Update .arch_setup, .num_regs and .regmap
4240 initializers. Add .regset_bitmap initializer.
4241 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4242 initializer.
4243 * linux-bfin-low.c (the_low_target): Likewise.
4244 * linux-cris-low.c (the_low_target): Likewise.
4245 * linux-crisv32-low.c (the_low_target): Likewise.
4246 * linux-ia64-low.c (the_low_target): Likewise.
4247 * linux-m32r-low.c (the_low_target): Likewise.
4248 * linux-m68k-low.c (the_low_target): Likewise.
4249 * linux-ppc-low.c (the_low_target): Likewise.
4250 * linux-s390-low.c (the_low_target): Likewise.
4251 * linux-sh-low.c (the_low_target): Likewise.
4252 * linux-sparc-low.c (the_low_target): Likewise.
4253 * linux-tic6x-low.c (the_low_target): Likewise.
4254 * linux-x86-low.c (the_low_target): Likewise.
4255 * linux-xtensa-low.c (the_low_target): Likewise.
4256 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4257 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4258 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4259 srv_xmlfiles.
4260 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4261 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4262
c03e6ccc
YQ
42632012-02-29 Yao Qi <yao@codesourcery.com>
4264 Pedro Alves <palves@redhat.com>
4265
4266 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4267 `step_over_finished' is true.
4268
644cebc9
PA
42692012-02-27 Pedro Alves <palves@redhat.com>
4270
4271 * linux-low.c (pid_is_stopped): Delete, moved to common/.
4272 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4273
c14d7ab2
PA
42742012-02-27 Pedro Alves <palves@redhat.com>
4275
4276 PR server/9684
4277 * linux-low.c (pid_is_stopped): New.
4278 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4279
412c89dd
LM
42802012-02-25 Luis Machado <lgustavo@codesourcery.com>
4281
4282 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4283 of conditions.
4284
b745defe
MR
42852012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4286
4287 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4288
9f3a5c85
LM
42892012-02-24 Luis Machado <lgustavo@codesourcery>
4290
4291 * server.c (handle_query): Advertise support for target-side
4292 breakpoint condition evaluation.
4293 (process_point_options): New function.
4294 (process_serial_event): When inserting a breakpoint, check for
4295 a target-side condition that should be evaluated.
4296
4297 * mem-break.c: Include regcache.h and ax.h.
4298 (point_cond_list_t): New data structure.
4299 (breakpoint) <cond_list>: New field.
4300 (find_gdb_breakpoint_at): Make non-static.
4301 (delete_gdb_breakpoint_at): Clear any target-side
4302 conditions.
4303 (clear_gdb_breakpoint_conditions): New function.
4304 (add_condition_to_breakpoint): Likewise.
4305 (add_breakpoint_condition): Likewise.
4306 (gdb_condition_true_at_breakpoint): Likewise.
4307 (gdb_breakpoint_here): Return result directly instead
4308 of going through a local variable.
4309
4310 * mem-break.h (find_gdb_breakpoint_at): New prototype.
4311 (clear_gdb_breakpoint_conditions): Likewise.
4312 (add_breakpoint_condition): Likewise.
4313 (gdb_condition_true_at_breakpoint): Likewise.
4314
4315 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
4316 (need_step_over_p): Take target-side breakpoint condition into
4317 consideration.
4318
5e1dc496
LM
43192012-02-24 Luis Machado <lgustavo@codesourcery>
4320
4321 * server.h: Include tracepoint.h.
4322 (agent_mem_read, agent_get_trace_state_variable_value,
4323 agent_set_trace_state_variable_value,
4324 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
4325 get_set_tsv_func_addr): New prototypes.
4326
4327 * ax.h: New include file.
4328 * ax.c: New source file.
4329
4330 * tracepoint.c: Include ax.h.
4331 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
4332 agent_expr, eval_result_type): Move to ax.h.
4333 (parse_agent_expr): Rename to ...
4334 (gdb_parse_agent_expr): ... this, make it non-static and move
4335 to ax.h.
4336 (unparse_agent_expr) Rename to ...
4337 (gdb_unparse_agent_expr): ... this, make it non-static and move
4338 to ax.h.
4339 (eval_agent_expr): Rename to ...
4340 (eval_tracepoint_agent_expr): ... this.
4341 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
4342 forward declarations.
4343 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
4344 (agent_get_trace_state_variable_value): New function.
4345 (agent_set_trace_state_variable_value): New function.
4346 (cmd_qtdp): Call gdb_parse_agent_expr (...).
4347 (response_tracepoint): Call gdb_unparse_agent_expr (...).
4348 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
4349 (condition_true_at_tracepoint): Likewise.
4350 (parse_agent_expr): Rename to ...
4351 (gdb_parse_agent_expr): ... this and move to ax.c.
4352 (unparse_agent_expr): Rename to ...
4353 (gdb_unparse_agent_expr): ... this and move to ax.c.
4354 (gdb_agent_op_name): Move to ax.c.
4355 (eval_agent_expr): Rename to ...
4356 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
4357 and move to ax.c.
4358 (eval_tracepoint_agent_expr): New function.
4359 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 4360 non-static.
5e1dc496
LM
4361 (current_insn_ptr, emit_error, struct bytecode_address): Move to
4362 ax.c.
4363 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
4364 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
4365 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
4366 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
4367 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
4368 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
4369 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
4370 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
4371 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
4372 (compile_bytecodes): Remove forward declaration.
4373 (is_goto_target): Move to ax.c.
4374 (compile_bytecodes): Move to ax.c and call
4375 agent_get_trace_state_variable_value (...) and
4376 agent_set_trace_state_variable_value (...).
4377
4378 * Makefile.in: Update ax.c and IPA dependencies.
4379
277e4e52
PA
43802012-02-24 Pedro Alves <palves@redhat.com>
4381
4382 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
4383 (cmd_bigqtbuffer_circular): ... this. Only handle
4384 'QTBuffer:circular:'.
4385 (handle_tracepoint_general_set): Adjust.
4386
bf4c19f7
YQ
43872012-02-16 Yao Qi <yao@codesourcery.com>
4388
4389 * inferiors.c: Move code to ...
4390 * dll.c: .... here. New.
4391 * server.h: Declare clear_dlls.
4392 * Makefile.in (SFILES): Add dll.c.
4393 (OBS): Add dll.o
4394 (dll.o): New rule.
4395
d73f2619
YQ
43962012-02-11 Yao Qi <yao@codesourcery.com>
4397
4398 * server.c: (handle_monitor_command): Add a new parameter
4399 `own_buf'.
4400 (handle_query): Update caller.
4401
f8255c2a
JB
44022012-02-09 Joel Brobecker <brobecker@adacore.com>
4403
4404 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
4405 * configure, config.in: Regenerate.
4406 * hostio.c: Provide an alternate implementation if HAVE_READLINK
4407 is not defined.
4408
da84f473
PA
44092012-02-02 Pedro Alves <palves@redhat.com>
4410
4411 Try SIGKILL first, then PTRACE_KILL.
4412 * linux-low.c (linux_kill_one_lwp): New.
4413 (linux_kill_one_lwp): Rename to ...
4414 (kill_one_lwp_callback): ... this. Use the new
4415 linux_kill_one_lwp.
4416
e886a173
PA
44172012-02-02 Pedro Alves <palves@redhat.com>
4418
4419 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
4420 inferior.
4421
be07f1a2
PA
44222012-01-27 Pedro Alves <palves@redhat.com>
4423
4424 * linux-low.c (linux_child_pid_to_exec_file): Delete.
4425 (elf_64_file_p): Make static.
4426 (linux_pid_exe_is_elf_64_file): New.
4427 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
4428 Delete declarations.
4429 (linux_pid_exe_is_elf_64_file): Declare.
4430 * linux-x86-low.c (x86_arch_setup): Use
4431 linux_pid_exe_is_elf_64_file.
4432
d8301ad1
JK
44332012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4434
4435 * linux-low.c (linux_wait_for_event_1): Rename to ...
4436 (linux_wait_for_event): ... here and merge it with former
4437 linux_wait_for_event - new variable wait_ptid, use it.
4438 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
4439
01b17894
PA
44402012-01-23 Pedro Alves <palves@redhat.com>
4441
4442 * server.c (main): Avoid yet another case of infinite loop while
4443 detaching/killing after a longjmp.
4444
e825046f
JK
44452012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4446
4447 Code cleanup.
4448 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
4449
b9e7b9c3
UW
44502012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
4451
4452 * hostio.c (handle_readlink): New function.
4453 (handle_vFile): Call it to handle "vFile:readlink" packets.
4454
901f9912
UW
44552012-01-20 Pedro Alves <palves@redhat.com>
4456 Ulrich Weigand <ulrich.weigand@linaro.org>
4457
4458 * server.c (handle_v_requests): Only support vAttach and vRun to
4459 start multiple processes when in extended protocol mode.
4460
fc1ab1a0
PA
44612012-01-17 Pedro Alves <palves@redhat.com>
4462
4463 * tracepoint.c (initialize_tracepoint): Use mmap instead of
4464 memalign plus mprotect to allocate the scratch buffer.
4465
7d5d4e98
PA
44662012-01-13 Pedro Alves <palves@redhat.com>
4467
4468 * server.c (attach_inferior): Clear `cont_thread'.
4469
f128d5e9
PA
44702012-01-13 Pedro Alves <palves@redhat.com>
4471
4472 * server.c (main): Avoid infinite loop while detaching/killing
4473 after a longjmp.
4474
06db92f0
DE
44752012-01-09 Doug Evans <dje@google.com>
4476
4477 * server.c (start_inferior): Set last_ptid in --wrapper case.
4478
32d92999
YQ
44792012-01-06 Yao Qi <yao@codesourcery.com>
4480
4481 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
4482 defined.
4483 [IN_PROCESS_AGENT] (debug_agent): New global variable.
4484
5e0a92a9
YQ
44852012-01-04 Yao Qi <yao@codesourcery.com>
4486
4487 * tracepoint.c (cmd_qtdp): Print debug message
4488 for static tracepoint.
4489
ae639e8c
YQ
44902012-01-04 Yao Qi <yao@codesourcery.com>
4491
4492 * tracepoint.c (trace_vdebug): Differentiate debug message
4493 between gdbserver and IPA.
4494
f72429c5
YQ
44952012-01-03 Yao Qi <yao@codesourcery.com>
4496
4497 * tracepoint.c (tracepoint_was_hit): Don't collect for
4498 static tracepoint.
4499
12c3e59c
JB
45002012-01-02 Joel Brobecker <brobecker@adacore.com>
4501
4502 * terminal.h: Reformat copyright header.
4503
67827812
JB
45042012-01-02 Joel Brobecker <brobecker@adacore.com>
4505
4506 * server.c (gdbserver_version): Update copyright year.
4507 * gdbreplay.c (gdbreplay_version): Likewise.
4508
3e52c33d
JK
45092011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
4510
4511 * linux-low.c (linux_create_inferior): Put empty if clause for write.
4512
4513 Revert:
4514 2011-12-18 Hui Zhu <teawater@gmail.com>
4515 * linux-low.c (linux_create_inferior): Save return value to ret.
4516
66f1260e
HZ
45172011-12-18 Hui Zhu <teawater@gmail.com>
4518
4519 * linux-low.c (linux_create_inferior): Save return value to ret.
4520
e77616d7
DE
45212011-12-16 Doug Evans <dje@google.com>
4522
e7b06c57
DE
4523 * linux-low.c (linux_create_inferior): If stdio connection,
4524 redirect stdin from /dev/null, stdout to stderr.
4525 * remote-utils.c (remote_is_stdio): New static global.
4526 (remote_connection_is_stdio): New function.
4527 (remote_prepare): Handle stdio connection.
4528 (remote_open): Ditto.
4529 (remote_close): Don't close stdin for stdio connections.
4530 (read_prim,write_prim): New functions. Replace all calls to
4531 read/write to these.
4532 * server.c (main): Watch for "-" argument. Move call to
4533 remote_prepare before start_inferior.
4534 * server.h (STDIO_CONNECTION_NAME): New macro.
4535 (remote_connection_is_stdio): Declare.
4536
e77616d7
DE
4537 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
4538 in debugging output.
4539
82067193
YQ
45402011-12-15 Yao Qi <yao@codesourcery.com>
4541
4542 * tracepoint.c: Include sys/syscall.h.
4543 (gdb_ust_thread): Remove preprocessor conditional.
4544
82bfbe7e
PA
45452011-12-14 Pedro Alves <pedro@codesourcery.com>
4546
4547 * linux-low.c (linux_detach_one_lwp): Call
4548 the_low_target.prepare_to_resume before detaching.
4549
712c6575
YQ
45502011-12-14 Yao Qi <yao@codesourcery.com>
4551
4552 * tracepoint.c (gdb_ust_thread): Don't ignore return value
4553 of write.
4554
d54d1edf
YQ
45552011-12-14 Yao Qi <yao@codesourcery.com>
4556
4557 * i386-low.c (i386_low_stopped_data_address): Initialize local
4558 variable `control'.
4559
6210a125
PA
45602011-12-13 Pedro Alves <pedro@codesourcery.com>
4561
4562 PR remote/13492
4563
4564 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
4565 DR_CONTROL unless necessary. Extend comments.
4566 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
4567 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
4568
2ece8244
YQ
45692011-12-13 Yao Qi <yao@codesourcery.com>
4570
4571 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
4572 macros.
4573 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
4574
784867a5
JK
45752011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
4576
4577 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
4578 Print new debug message for such case.
4579
6bf36717
JK
45802011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4581
4582 Fix overlapping memcpy.
4583 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
4584 the read_inferior_memory transfer.
4585 (delete_fast_tracepoint_jump): New variable buf. Use it for the
4586 write_inferior_memory transfer.
4587 (set_fast_tracepoint_jump): New variable buf. Use it for the
4588 read_inferior_memory and write_inferior_memory transfers.
4589 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
4590 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
4591 Use it for the write_inferior_memory transfer.
4592 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
4593 buffers.
4594
50275556
MR
45952011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4596
4597 * linux-low.c (fetch_register, store_register): Make code
4598 consistent, fix formatting.
4599
7325beb4
MR
46002011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4601
4602 * linux-low.c (usr_store_inferior_registers): Factor out code
4603 to handle individual registers into...
4604 (store_register): ... this new function.
4605
c642a434
UW
46062011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
4607
4608 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
4609 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
4610 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
4611 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
4612 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
4613 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
4614 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
4615 (srv_xmlfiles): Add new XML files.
4616
4617 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
4618 and <sys/uio.h>.
4619 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
4620 (init_registers_s390_linux32v1): Add prototype.
4621 (init_registers_s390_linux32v2): Likewise.
4622 (init_registers_s390_linux64v1): Likewise.
4623 (init_registers_s390_linux64v2): Likewise.
4624 (init_registers_s390x_linux64v1): Likewise.
4625 (init_registers_s390x_linux64v2): Likewise.
4626 (s390_num_regs): Increment to 52.
4627 (s390_regmap): Add orig_r2 register.
4628 (s390_num_regs_3264): Increment to 68.
4629 (s390_regmap_3264): Add orig_r2 register.
4630 (s390_collect_ptrace_register): Handle orig_r2 register.
4631 (s390_supply_ptrace_register): Likewise.
4632 (s390_fill_last_break): New function.
4633 (s390_store_last_break): Likewise.
4634 (s390_fill_system_call): New function.
4635 (s390_store_system_call): Likewise.
4636 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
4637 register sets.
4638 (s390_check_regset): New function.
4639 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
4640 NT_S390_SYSTEM_CALL regsets and use appropriate description.
4641 Update target_regsets for available register sets.
4642
2268b414
JK
46432011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
4644 Jan Kratochvil <jan.kratochvil@redhat.com>
4645
4646 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
4647 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
4648 New.
4649 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
4650 * linux-low.h (struct process_info_private): New member r_debug.
4651 * server.c (handle_qxfer_libraries): Call
4652 the_target->qxfer_libraries_svr4.
4653 (handle_qxfer_libraries_svr4): New function.
4654 (qxfer_packets): New entry "libraries-svr4".
4655 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
4656 * target.h (struct target_ops): New member qxfer_libraries_svr4.
4657 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
4658 PACKET_qXfer_libraries_svr4.
4659
d6db1fab
UW
46602011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
4661
4662 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
4663 PSW address/mask between 8-byte and 16-byte formats.
4664 (s390_supply_ptrace_register): Likewise.
4665 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
4666 basic addressing mode bit.
4667
242f5f1c
SS
46682011-11-24 Stan Shebs <stan@codesourcery.com>
4669
4670 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
4671
f196051f
SS
46722011-11-17 Stan Shebs <stan@codesourcery.com>
4673
4674 * tracepoint.c (struct tracepoint): New field traceframe_usage.
4675 (tracing_start_time): New global.
4676 (tracing_stop_time): New global.
4677 (tracing_user_name): New global.
4678 (tracing_notes): New global.
4679 (tracing_stop_note): New global.
4680 (cmd_qtstart): Set traceframe_usage, start_time.
4681 (stop_tracing): Set stop_time.
4682 (cmd_qtstatus): Report additional status.
4683 (cmd_qtp): New function.
4684 (handle_tracepoint_query): Call it.
4685 (cmd_qtnotes): New function.
4686 (handle_tracepoint_general_set): Call it.
4687 (get_timestamp): Rename from tsv_get_timestamp.
4688
405f8e94
SS
46892011-11-14 Stan Shebs <stan@codesourcery.com>
4690 Kwok Cheung Yeung <kcy@codesourcery.com>
4691
4692 * linux-x86-low.c (small_jump_insn): New.
4693 (i386_install_fast_tracepoint_jump_pad): Add arguments for
4694 trampoline and error message, build a trampoline and issue a small
4695 jump instruction to it.
4696 (x86_install_fast_tracepoint_jump_pad): Add arguments for
4697 trampoline and error message.
4698 (x86_get_min_fast_tracepoint_insn_len): New.
4699 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
4700 * linux-low.h (struct linux_target_ops): Add arguments to
4701 install_fast_tracepoint_jump_pad operation, add new operation.
4702 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
4703 arguments.
4704 (linux_get_min_fast_tracepoint_insn_len): New function.
4705 (linux_target_op): Add new operation.
4706 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
4707 (gdb_trampoline_buffer_end): Ditto.
4708 (gdb_trampoline_buffer_error): Ditto.
4709 (struct ipa_sym_addresses): Add fields for new IPA variables.
4710 (symbol_list): Add entries for new IPA variables.
4711 (struct tracepoint): Add fields to hold the address range of the
4712 trampoline used by the tracepoint.
4713 (trampoline_buffer_head): New static variable.
4714 (trampoline_buffer_tail): Ditto.
4715 (claim_trampoline_space): New function.
4716 (have_fast_tracepoint_trampoline_buffer): New function.
4717 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
4718 structure.
4719 (install_fast_tracepoint): Ditto, also add error buffer argument.
4720 (cmd_qtminftpilen): New function.
4721 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
4722 (fast_tracepoint_from_trampoline_address): New function.
4723 (fast_tracepoint_collecting): Handle trampoline as part of jump
4724 pad space.
4725 (set_trampoline_buffer_space): New function.
4726 (initialize_tracepoint): Initialize new IPA variables.
4727 * target.h (struct target_ops): Add arguments to
4728 install_fast_tracepoint_jump_pad operation, add new
4729 get_min_fast_tracepoint_insn_len operation.
4730 (target_get_min_fast_tracepoint_insn_len): New.
4731 (install_fast_tracepoint_jump_pad): Add arguments.
4732 * server.h (IPA_BUFSIZ): Define.
4733 * linux-i386-ipa.c: Include extra header files.
4734 (initialize_fast_tracepoint_trampoline_buffer): New function.
4735 (initialize_low_tracepoint): Call it.
4736 * server.h (set_trampoline_buffer_space): Declare.
4737 (claim_trampoline_space): Ditto.
4738 (have_fast_tracepoint_trampoline_buffer): Ditto.
4739
1e4d1764
YQ
47402011-11-14 Yao Qi <yao@codesourcery.com>
4741
4742 * server.c (handle_query): Handle InstallInTrace for qSupported.
4743 * tracepoint.c (add_tracepoint): Sort list.
4744 (install_tracepoint, download_tracepoint): New.
4745 (cmd_qtdp): Call them to install and download tracepoints.
4746 (sort_tracepoints): Removed.
4747 (cmd_qtstart): Update.
4748
5c73ff4e
YQ
47492011-11-14 Yao Qi <yao@codesourcery.com>
4750
4751 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
4752 * mem-break.h: Declare.
4753 * tracepoint.c (cmd_qtstart): Move some code to ...
4754 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
4755 New.
4756 (download_tracepoints): Move some code to ...
4757 (download_tracepoint_1): ... here. New.
4758
86a30030
YQ
47592011-11-08 Yao Qi <yao@codesourcery.com>
4760
4761 * remote-utils.c (relocate_instruction): A comment fix.
4762
8d26e50c
JB
47632011-11-07 Joel Brobecker <brobecker@adacore.com>
4764
4765 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
4766 (i386_dr_low_get_control, i386_dr_low_get_status): Use
4767 dr_status_mirror and dr_control_mirror from debug_reg_state.
4768 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
4769 (i386_initial_stuff): Remove use of deleted globals.
4770 (i386_get_thread_context, i386_set_thread_context,
4771 i386_thread_added): Use dr_status_mirror and dr_control_mirror
4772 from debug_reg_state.
4773
a59306a3
YQ
47742011-11-05 Yao Qi <yao@codesourcery.com>
4775
4776 * tracepoint.c (gdb_collect): Loop over tracepoints of same
4777 address as TPOINT's.
4778
3065dfb6
SS
47792011-11-02 Stan Shebs <stan@codesourcery.com>
4780
4781 * tracepoint.c (agent_mem_read_string): New function.
4782 (eval_agent_expr): Call it for tracenz.
4783 * server.c (handle_query): Report support for tracenz.
4784
fd0d8c7c
YQ
47852011-11-02 Yao Qi <yao@codesourcery.com>
4786
4787 * tracepoint.c (cmd_qtstart): Remove unused local variables.
4788
609086b1
YQ
47892011-11-02 Yao Qi <yao@codesourcery.com>
4790
4791 * target.h: Fix a typo in comment.
4792
b9fd1791
PA
47932011-10-31 Pedro Alves <pedro@codesourcery.com>
4794
4795 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
4796 clobber the breakpoints' shadows with fast tracepoint jumps.
4797 * mem-break.h (check_mem_write): Add `myaddr' parameter.
4798 * target.c (write_inferior_memory): Also pass MYADDR down to
4799 check_mem_write.
4800
03583c20
UW
48012011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
4802
4803 * configure.ac: Check support for personality routine.
4804 * configure: Regenerate.
4805 * config.in: Likewise.
4806 * linux-low.c: Include <sys/personality.h>.
4807 Define ADDR_NO_RANDOMIZE if necessary.
4808 (linux_create_inferior): Disable address space randomization when
4809 forking inferior, if requested.
4810 (linux_supports_disable_randomization): New function.
4811 (linux_target_ops): Install it.
4812 * server.h (disable_randomization): Declare.
4813 * server.c (disable_randomization): New global variable.
4814 (handle_general_set): Handle QDisableRandomization.
4815 (handle_query): Likewise for qSupported.
4816 (main): Support --disable-randomization and --no-disable-randomization
4817 command line arguments.
4818 * target.h (struct target_ops): Add supports_disable_randomization.
4819 (target_supports_disable_randomization): New macro.
4820
723b724b
MF
48212011-09-29 Mike Frysinger <vapier@gentoo.org>
4822
4823 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
4824 ifdef check.
4825 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
4826 [!PT_GETDSBT] (target_loadmap): New definition.
4827 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
4828 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
4829 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
4830 and PT_GETDSBT to LINUX_LOADMAP.
4831 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
4832 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
4833
55329a5c 48342011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
4835
4836 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
4837 (arm_linux_hwbp_cap): New static variable.
4838 (arm_linux_get_hwbp_cap): Replace by ...
4839 (arm_linux_init_hwbp_cap): ... this new function.
4840 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
4841 (arm_linux_get_hw_watchpoint_count): Likewise.
4842 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4843 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
4844 (arm_prepare_to_resume): Use perror_with_name instead of error.
4845
55329a5c 48462011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
4847
4848 * linux-arm-low.c: Include <signal.h>.
4849 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
4850 (struct arm_linux_hwbp_cap): New data type.
4851 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
4852 (struct arm_linux_hw_breakpoint): New data type.
4853 (MAX_BPTS, MAX_WPTS): Define.
4854 (struct arch_process_info, struct arch_lwp_info): New data types.
4855 (arm_linux_get_hwbp_cap): New function.
4856 (arm_linux_get_hw_breakpoint_count): Likewise.
4857 (arm_linux_get_hw_watchpoint_count): Likewise.
4858 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4859 (arm_hwbp_control_initialize): Likewise.
4860 (arm_hwbp_control_is_enabled): Likewise.
4861 (arm_hwbp_control_is_initialized): Likewise.
4862 (arm_hwbp_control_disable): Likewise.
4863 (arm_linux_hw_breakpoint_equal): Likewise.
4864 (arm_linux_hw_point_initialize): Likewise.
4865 (struct update_registers_data): New data structure.
4866 (update_registers_callback: New function.
4867 (arm_insert_point): Likewise.
4868 (arm_remove_point): Likewise.
4869 (arm_stopped_by_watchpoint): Likewise.
4870 (arm_stopped_data_address): Likewise.
4871 (arm_new_process): Likewise.
4872 (arm_new_thread): Likewise.
4873 (arm_prepare_to_resume): Likewise.
4874 (the_low_target): Register arm_insert_point, arm_remove_point,
4875 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
4876 arm_new_thread, and arm_prepare_to_resume.
4877
6b9801d4
SS
48782011-09-15 Stan Shebs <stan@codesourcery.com>
4879
4880 * server.h (struct emit_ops): Add compare-goto fields.
4881 * tracepoint.c (gdb_agent_op_sizes): New table.
4882 (emit_eq_goto): New function.
4883 (emit_ne_goto): New function.
4884 (emit_lt_goto): New function.
4885 (emit_le_goto): New function.
4886 (emit_gt_goto): New function.
4887 (emit_ge_goto): New function.
4888 (is_goto_target): New function.
4889 (compile_bytecodes): Recognize special cases of compare-goto
4890 combinations and call specialized emitters for them.
4891 * linux-x86-low.c (amd64_emit_eq_goto): New function.
4892 (amd64_emit_ne_goto): New function.
4893 (amd64_emit_lt_goto): New function.
4894 (amd64_emit_le_goto): New function.
4895 (amd64_emit_gt_goto): New function.
4896 (amd64_emit_ge_goto): New function.
4897 (amd64_emit_ops): Add the new functions.
4898 (i386_emit_eq_goto): New function.
4899 (i386_emit_ne_goto): New function.
4900 (i386_emit_lt_goto): New function.
4901 (i386_emit_le_goto): New function.
4902 (i386_emit_gt_goto): New function.
4903 (i386_emit_ge_goto): New function.
4904 (i386_emit_ops): Add the new functions.
4905
bf15cbda
SS
49062011-09-08 Stan Shebs <stan@codesourcery.com>
4907
4908 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
4909 (i386_emit_epilogue): Restore %ebx.
4910
943ca1dd
JZ
49112011-08-31 Jie Zhang <jzhang918@gmail.com>
4912
4913 * server.c (step_thread): Remove definition.
4914 (process_serial_event): Don't handle Hs.
4915 * server.h (step_thread): Remove declaration.
4916 * target.c (set_desired_inferior): Remove use of step_thread.
4917
e3deef73
LM
49182011-08-24 Luis Machado <lgustavo@codesourcery.com>
4919
4920 * linux-low.c: Include linux-procfs.h.
4921 (linux_attach_lwp_1): Update comments.
4922 (linux_attach): Scan for existing threads when attaching to a
4923 process that is the tgid.
4924 * Makefile.in: Update dependencies.
4925
13da1c97
LM
49262011-08-24 Luis Machado <lgustavo@codesourcery.com>
4927
4928 * configure.srv: Add linux-procfs.o dependencies.
4929
881127c9
YQ
49302011-08-14 Yao Qi <yao@codesourcery.com>
4931
4932 * target.h (struct target_ops): Fix indent.
4933 * win32-low.c (win32_target_ops): Fix comment.
4934
58dbd541
YQ
49352011-08-14 Andrew Jenner <andrew@codesourcery.com>
4936 Yao Qi <yao@codesourcery.com>
4937
4938 * Makefile.in (clean): Remove tic6x-*.c files.
4939 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
4940 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
4941 (tic6x-c64xp-linux.c): Likewise.
4942 * configure.srv: Add support for tic6x-*-uclinux.
4943 * linux-tic6x-low.c: New.
4944 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
4945
78d85199
YQ
49462011-08-14 Andrew Stubbs <ams@codesourcery.com>
4947 Yao Qi <yao@codesourcery.com>
4948
4949 * target.h (struct target_ops): Add read_loadmap.
4950 * linux-low.c (struct target_loadseg): New type.
4951 (struct target_loadmap): New type.
4952 (linux_read_loadmap): New function.
4953 (linux_target_ops): Add linux_read_loadmap.
4954 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
4955 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
4956 to NULL.
78d85199 4957
a959a88d
EZ
49582011-08-05 Eli Zaretskii <eliz@gnu.org>
4959
4960 * win32-low.c: Include <stdint.h>.
4961
1ced966e
PA
49622011-07-22 Pedro Alves <pedro@codesourcery.com>
4963
4964 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
4965 to the inferior here.
4966 (i386_remove_aligned_watchpoint): Ditto.
4967 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
4968 fit part of the watchpoint in the debug registers.
4969 (i386_update_inferior_debug_regs): New.
4970 (i386_low_insert_watchpoint): Work on a local mirror of the debug
4971 registers, and only update the inferior on success.
4972 (i386_low_remove_watchpoint): Ditto.
4973
d26e3629
KY
49742011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
4975
4976 * linux-low.c (compare_ints, unique, list_threads, show_process,
4977 linux_core_of_thread): Delete.
4978 (linux_target_ops): Change linux_core_of_thread to
4979 linux_common_core_of_thread.
4980 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
4981 * utils.c (malloc_failure): Change type of argument.
4982 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
4983 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
4984 common/linux-osdata.c, common/ptid.c and common/buffer.c.
4985 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
4986 (IPA_OBJS): Add common-utils-ipa.o.
4987 (ptid_h, linux_osdata_h): New macros.
4988 (server_h): Add common/common-utils.h, common/xml-utils.h,
4989 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
4990 common/ptid.h.
4991 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
4992 ptid.o, buffer.o): New rules.
4993 (linux-low.o): Add common/linux-osdata.h as a dependency.
4994 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
4995 * configure.ac: Add AC_HEADER_DIRENT check.
4996 * config.in: Regenerate.
4997 * configure: Regenerate.
4998 * remote-utils.c (xml_escape_text): Delete.
4999 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5000 buffer_xml_printf): Move to common/buffer.c.
5001 * server.c (main): Remove call to initialize_inferiors.
5002 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5003 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5004 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5005 internal_error, gdb_assert, gdb_assert_fail): Delete.
5006 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5007 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5008 common/buffer.h.
5009 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5010 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5011 initialize_inferiors): Delete.
5012
2275a1a7
PA
50132011-07-20 Pedro Alves <pedro@codesourcery.com>
5014
5015 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
5016 symbol error.
5017
0a5b1e09
PA
50182011-05-31 Pedro Alves <pedro@codesourcery.com>
5019
5020 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5021 assertion.
5022 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5023
6938fd34
YQ
50242011-05-26 Yao Qi <yao@codesourcery.com>
5025
5026 * Makefile.in (thread-db.o): Track dependence to
5027 common/gdb_thread_db.h.
5028 * thread-db.c: include gdb_thread_db.h from right place.
5029
b481f9e0
TT
50302011-05-16 Adrian Cornish <gnu@bluedreamer.com>
5031
5032 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5033 __FILE__ and __LINE__ to internal_error.
5034
98a5dd13
DE
50352011-05-13 Doug Evans <dje@google.com>
5036
5037 * thread-db.c (try_thread_db_load_from_sdir): New function.
5038 (try_thread_db_load_from_dir): New function.
5039 (thread_db_load_search): Handle $sdir, ignore $pdir.
5040 Remove trying of system directories if search of
5041 libthread-db-search-path fails, that is now done via $sdir.
5042
d248b706
KY
50432011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
5044
5045 * server.c (handle_query): Add EnableDisableTracepoints to the list
5046 of supported features.
43aaf8b6 5047 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 5048 tracepoints.
43aaf8b6
PA
5049 (cmd_qtenable_disable): New.
5050 (cmd_qtstart): Install tracepoints even if disabled.
5051 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5052 receiving a QTEnable or QTDisable packet.
5053 (gdb_collect): Skip data collection if fast tracepoint is disabled.
5054 (ust_marker_to_static_tracepoint): Do not ignore disabled static
5055 tracepoints.
5056 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 5057
84e578fb
DE
50582011-05-10 Doug Evans <dje@google.com>
5059
5060 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
5061
71f55dd8
DE
50622011-05-04 Doug Evans <dje@google.com>
5063
5064 * linux-low.c (linux_join): Skip process lookup.
5065 * spu-low.c (spu_join): Ditto.
5066 * server.c (join_inferiors_callback): Delete.
5067 (process_serial_event): For 'D' packet (detach) call join_inferior
5068 directly.
5069
4d393d60
JM
50702011-05-04 Joseph Myers <joseph@codesourcery.com>
5071
5072 * README: Don't mention xscale*-*-linux*.
5073 * configure.srv (xscale*-*-linux*): Don't handle target.
5074
b00ad6ff
NF
50752011-04-27 Nathan Froyd <froydnj@codesourcery.com>
5076
5077 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
5078 casting pointers.
5079 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
5080 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
5081 (i386_emit_void_call_2): Likewise.
5082
af96c192
YQ
50832011-04-26 Yao Qi <yao@codesourcery.com>
5084
43aaf8b6
PA
5085 * linux-low.c: Move common macros to linux-ptrace.h.
5086 Include linux-ptrace.h.
af96c192
YQ
5087 * Makefile.in (linux_ptrace_h): New.
5088 (linux-low.o): Depends on linux-ptrace.h.
5089
03f2bd59
JK
50902011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5091
5092 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
5093 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
5094 (remote_prepare): New function with most of the TCP code from ...
5095 (remote_open): ... here. Detect PORT here unconditionally. Move also
5096 setting transport_is_reliable.
5097 * server.c (run_once): New variable.
5098 (gdbserver_usage): Document it.
5099 (main): Set run_once for `--once'. Call remote_prepare. Exit after
5100 the first run if RUN_ONCE.
5101 * server.h (run_once, remote_prepare): New declarations.
5102
7a9dd1b2
TT
51032011-04-19 Tom Tromey <tromey@redhat.com>
5104
5105 * win32-low.c (handle_load_dll): Remove duplicate "the".
5106
81239425
PM
51072011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
5108
5109 Remove support for old Cygwin 1.5 versions.
5110 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
5111 function to avoid warning.
5112 (win32_add_one_solib): Use cygwin_conv_path function to avoid
5113 warning.
5114
9e0627f1
PM
51152011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
5116
5117 * gdbserver/server.h (Macro _): Define it if not available.
5118
588eebee
MS
51192011-03-14 Michael Snyder <msnyder@vmware.com>
5120
348af9f7 5121 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 5122
43f70d4c
JB
51232011-03-10 Joel Brobecker <brobecker@adacore.com>
5124
5125 * Makefile.in (maintainer-clean realclean distclean): Remove
5126 "make ... subdir_do" command.
5127
348af9f7
MS
51282011-03-10 Michael Snyder <msnyder@vmware.com>
5129
5130 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
5131
5132 * server.c (handle_v_run): Free alloced buffer on early return.
5133
e637a4f5
YQ
51342011-03-09 Yao Qi <yao@codesourcery.com>
5135
5136 Revert:
5137 2011-03-04 Yao Qi <yao@codesourcery.com>
5138
5139 * Makefile.in: Remove GNU make feature --directory.
5140
5141 2011-03-05 Yao Qi <yao@codesourcery.com>
5142
5143 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5144 (subdir_do): New make target. Copied from gdb/Makefile.
5145 (maintainer-clean, realclean, distclean, clean): Call corresponding
5146 make targets in common/Makefile.
5147
5148 2011-02-11 Yao Qi <yao@codesourcery.com>
5149
5150 * configure.ac: Call AC_PROG_RANLIB.
5151 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5152 * configure: Regenerate.
5153
e6edda56
JK
51542011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5155
5156 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
5157
e5141119
JB
51582011-03-06 Yao Qi <yao@codesourcery.com>
5159
5160 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
5161
64794aa4
JB
51622011-03-05 Yao Qi <yao@codesourcery.com>
5163
5164 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5165 (subdir_do): New make target. Copied from gdb/Makefile.
5166 (maintainer-clean, realclean, distclean, clean): Call corresponding
5167 make targets in common/Makefile.
5168
7a762829
YQ
51692011-03-04 Yao Qi <yao@codesourcery.com>
5170
5171 * Makefile.in: Remove GNU make feature --directory.
5172
348af9f7
MS
51732011-03-04 Michael Snyder <msnyder@vmware.com>
5174
5175 * server.c (queue_stop_reply): Call xmalloc not malloc.
5176
51772011-03-02 Michael Snyder <msnyder@vmware.com>
5178
5179 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5180
9f72fee2
MS
51812011-02-28 Michael Snyder <msnyder@vmware.com>
5182
588eebee
MS
5183 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5184 (cmd_qtframe): Ditto.
5185 (cmd_qtbuffer): Ditto.
5186 (cmd_bigqtbuffer): Ditto.
5187
9f72fee2
MS
5188 * utils.c (decimal2str): Initialize 'width' to nine, then
5189 don't mess with it.
5190
8040bd49
UW
51912011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5192
5193 * hostio.c (require_data): Free *data, not data.
5194
7e52cbd0
JK
51952011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5196
5197 * hostio.c (require_data): Use free, not xfree.
5198
9130f83e
MS
51992011-02-27 Michael Snyder <msnyder@vmware.com>
5200
4b812f4e
MS
5201 * server.c (handle_query): Discard unused value.
5202
9130f83e
MS
5203 * hostio.c (require_data): Free malloc memory before returning
5204 error.
5205
69d37113
MS
52062011-02-26 Michael Snyder <msnyder@vmware.com>
5207
5208 * linux-low.c (list_threads): Call closedir for dirent.
5209
35f5825a
MS
52102011-02-27 Michael Snyder <msnyder@vmware.com>
5211
2a589cef
MS
5212 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5213 a case statement falls through.
5214
0adea5f7
MS
5215 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5216
35f5825a
MS
5217 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
5218 in comparison.
5219
238f1c74
MS
52202011-02-26 Michael Snyder <msnyder@vmware.com>
5221
5222 * utils.c (decimal2str): Eliminate dead code and dead param.
5223 (pulongest): Drop dead param from call to decimal2str.
5224 (plongest): Ditto.
5225
633ff500
JB
52262011-02-24 Joel Brobecker <brobecker@adacore.com>
5227
5228 Revert the following patch (not approved yet):
5229 2011-02-21 Hui Zhu <teawater@gmail.com>
5230 * tracepoint.c (tp_printf): New function.
5231 (eval_agent_expr): Handle gdb_agent_op_printf.
5232
f9c6ff72
HZ
52332011-02-21 Hui Zhu <teawater@gmail.com>
5234
5235 * tracepoint.c (tp_printf): New function.
5236 (eval_agent_expr): Handle gdb_agent_op_printf.
5237
94d5e490
TT
52382011-02-18 Tom Tromey <tromey@redhat.com>
5239
5240 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5241 (tracepoint.o): Likewise.
5242 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5243 (gdb_agent_op_names): Likewise.
5244
c7f96d2b
TT
52452011-02-18 Tom Tromey <tromey@redhat.com>
5246
5247 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5248 gdb_agent_op_rot>: New constants.
5249 (gdb_agent_op_names): Add pick and roll.
5250 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5251 cases.
5252
0feedb2c
JK
52532011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5254
5255 * aclocal.m4: Regenerated with aclocal-1.11.1.
5256
b3b9301e
PA
52572011-02-14 Pedro Alves <pedro@codesourcery.com>
5258
5259 * server.c (handle_qxfer_traceframe_info): New.
5260 (qxfer_packets): Register "traceframe-info".
5261 (handle_query): Report support for qXfer:traceframe-info:read+.
5262 * tracepoint.c (match_blocktype): New.
5263 (traceframe_find_block_type): Rename to ...
5264 (traceframe_walk_blocks): ... this. Add callback filter argument,
5265 and use it.
5266 (traceframe_find_block_type): New, reimplemented on top of
5267 traceframe_walk_blocks.
5268 (build_traceframe_info_xml): New.
5269 (traceframe_read_info): New.
5270 * server.h (traceframe_read_info): Declare.
5271
4f3e6fb7
YQ
52722011-02-11 Yao Qi <yao@codesourcery.com>
5273
5274 * configure.ac: Call AC_PROG_RANLIB.
5275 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5276 * configure: Regenerate.
5277
764880b7
PA
52782011-02-07 Pedro Alves <pedro@codesourcery.com>
5279
5280 * server.c (gdb_read_memory): Change return semantics to allow
5281 partial transfers.
5282 (handle_search_memory_1): Adjust.
5283 (process_serial_event) <'m' packet>: Handle partial transfers.
5284 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5285
1c79eb8a
PA
52862011-01-28 Pedro Alves <pedro@codesourcery.com>
5287
5288 * regcache.c (init_register_cache): Initialize
5289 regcache->register_status.
5290 (free_register_cache): Release regcache->register_status.
5291 (regcache_cpy): Copy register_status.
5292 (registers_to_string): Print 'x's for unavailable registers.
5293 (supply_register): Mark the register's status valid or
5294 unavailable, depending on whether a buffer was passed in or not.
5295 (supply_register_zeroed): New.
5296 (supply_regblock): Mark the registers' status valid or
5297 unavailable, depending on whether a buffer was passed in or not.
5298 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5299 (struct regcache): New `register_status' field.
5300 (supply_register_zeroed): Declare.
5301 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5302 supply_register_zeroed, rather than passing a NULL buffer to
5303 supply_register.
5304 * tracepoint.c (fetch_traceframe_registers): Update comment.
5305
85724a0e
PA
53062011-01-28 Pedro Alves <pedro@codesourcery.com>
5307
5308 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
5309 buffer explicit.
5310
d08aafef
PA
53112011-01-25 Pedro Alves <pedro@codesourcery.com>
5312
5313 * server.h (decode_xfer_write): Change prototype.
5314 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
5315 and don't extract the annex here.
5316 * server.c (decode_xfer_read): Remove `annex' parameter,
5317 and don't extract the annex here.
5318 (decode_xfer): New.
5319 (struct qxfer): New.
5320 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
5321 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
5322 (handle_qxfer_statictrace): New functions, abstracted out from
5323 handle_query, and made to use the struct qxfer interface.
5324 (handle_threads_qxfer_proper): Rename to ...
5325 (handle_qxfer_threads_proper): ... this.
5326 (handle_threads_qxfer): Rename to ...
5327 (handle_qxfer_threads): ... this. Adjust.
5328 (qxfer_packets): New array.
5329 (handle_qxfer): New function.
5330 (handle_query): Use handle_qxfer.
5331
493e2a69
MS
53322011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
5333
5334 * gdbreplay.c: Shorten lines of >= 80 columns.
5335 * linux-low.c: Ditto.
5336 * linux-ppc-low.c: Ditto.
5337 * linux-s390-low.c: Ditto.
5338 * linux-sparc-low.c: Ditto.
5339 * linux-x86-low.c: Ditto.
5340 * linux-xtensa-low.c: Ditto.
5341 * mem-break.c: Ditto.
5342 * nto-low.c: Ditto.
5343 * regcache.h: Ditto.
5344 * remote-utils.c: Ditto.
5345 * server.c: Ditto.
5346 * server.h: Ditto.
5347 * thread-db.c: Ditto.
5348 * tracepoint.c: Ditto.
5349 * utils.c: Ditto.
5350 * win32-low.h: Ditto.
5351
44944448
JB
53522011-01-05 Joel Brobecker <brobecker@adacore.com>
5353
5354 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
5355 update.
5356
71ce852c
JB
53572011-01-01 Joel Brobecker <brobecker@adacore.com>
5358
5359 * server.c (gdbserver_version): Update copyright year in version
5360 output.
5361 * gdbreplay.c (gdbreplay_version): Ditto.
5362
eb826dc6
MF
53632010-12-29 Jie Zhang <jie.zhang@analog.com>
5364
5365 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
5366 * linux-bfin-low.c: New file.
5367 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
5368 PT_DATA_ADDR for BFIN targets.
5369 * Makefile.in (SFILES): Add linux-bfin-low.c.
5370 (clean): Remove reg-bfin.c.
5371 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
5372 * README: Mention supported Blackfin targets.
5373
39ab222a
MF
53742010-12-23 Mike Frysinger <vapier@gentoo.org>
5375
5376 * .gitignore: New file.
5377
a1f2ce7d
MF
53782010-11-16 Mike Frysinger <vapier@gentoo.org>
5379
5380 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
5381
f474844c
JZ
53822010-10-22 Jie Zhang <jie@codesourcery.com>
5383
5384 * Makefile.in: Add FLAGS_TO_PASS variable.
5385 (install): Remove dependency of install-only and recursively
5386 invoke make for install-only.
5387
f1048712
DE
53882010-10-04 Doug Evans <dje@google.com>
5389
5390 * Makefile.in (uninstall): Use $(DESTDIR).
5391
b53a1623
PA
53922010-09-24 Pedro Alves <pedro@codesourcery.com>
5393
e6ee044d
PA
5394 PR gdb/11842
5395
b53a1623
PA
5396 * linux-x86-low.c (compat_siginfo_from_siginfo)
5397 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
5398 si_code is < 0. Check for si_code == SI_TIMER before checking for
5399 si_code < 0.
5400
fa1bd1e4
JB
54012010-09-13 Joel Brobecker <brobecker@adacore.com>
5402
5403 * lynx-i386-low.c: New file.
5404 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
5405
47fac8f8
JB
54062010-09-13 Joel Brobecker <brobecker@adacore.com>
5407
5408 * lynx-low.c (ptrace_request_to_str): Remove handling for
5409 request values that have been removed in LynxOS 5.x.
5410
1adfc54d
JB
54112010-09-13 Joel Brobecker <brobecker@adacore.com>
5412
5413 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
5414 <ptrace.h>
5415
c2a66c29
NS
54162010-09-09 Nathan Sidwell <nathan@codesourcery.com>
5417
5418 * configure.ac: Add --enable-inprocess-agent option.
5419 * configure: Rebuilt.
5420
32fcada3
YQ
54212010-09-06 Yao Qi <yao@codesourcery.com>
5422
5423 * linux-low.c (linux_kill): Remove unused variable.
5424 (linux_stabilize_threads): Likewise.
5425 * server.c (start_inferior): Likewise.
5426 (queue_stop_reply_callback): Likewise.
5427 * tracepoint.c (do_action_at_tracepoint): Likewise.
5428
0cccb683
YQ
54292010-09-06 Yao Qi <yao@codesourcery.com>
5430
5431 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
5432 on return.
5433
423ec54c
JK
54342010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5435
5436 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
5437
12ac6819
PA
54382010-09-06 Pedro Alves <pedro@codesourcery.com>
5439
5440 * Makefile.in (install-only): Replace $IPA_DEPFILES with
5441 "$(IPA_DEPFILES)".
5442
8ed54b31
JB
54432010-09-01 Joel Brobecker <brobecker@adacore.com>
5444
5445 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
5446 gdbserver/lynx-ppc-low.c: New files.
5447 * Makefile.in (lynx_low_h): New variable.
5448 (lynx-low.o, lynx-ppc-low.o): New rules.
5449 * configure.ac: On LynxOS, link with -lnetinet.
5450 * configure.srv: Add handling of powerpc-*-lynxos* targets.
5451 * configure: regenerate.
5452
bb0116a4
JB
54532010-09-01 Joel Brobecker <brobecker@adacore.com>
5454
5455 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
5456 * configure.ac: Add check for vasprintf and vsnprintf.
5457 * configure, config.in: Regenerate.
5458 * server.h (vasprintf, vsnprintf): Add conditional declarations.
5459
a778ab81 54602010-09-01 Joel Brobecker <brobecker@adacore.com>
5461
5462 * gdbreplay.c: Move include of alloca.h up, next to include of
5463 malloc.h.
5464 * server.h: Add include of malloc.h.
5465 * mem-break.c: Remove include of malloc.h.
5466 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
5467
8b034a19 54682010-09-01 Joel Brobecker <brobecker@adacore.com>
5469
5470 * Makefile.in (memmem.o): Build with -Wno-error.
5471
54722010-09-01 Joel Brobecker <brobecker@adacore.com>
5473
5474 * utils.c (xsnprintf): Make non-static.
5475 * server.h: Add xsnprintf declaration.
5476 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
5477 replace calls to snprintf by calls to xsnprintf throughout.
5478
54792010-09-01 Joel Brobecker <brobecker@adacore.com>
5480
5481 * configure.ac: Add configure check for alloca.
5482 * configure, config.in: Regenerate.
5483 * server.h: Include alloca.h if it exists.
5484 * gdbreplay.c: Include alloca.h if it exists.
5485
1a981360
PA
54862010-08-28 Pedro Alves <pedro@codesourcery.com>
5487
5488 * linux-low.c (__SIGRTMIN): Define if not already defined.
5489 (linux_create_inferior): Check for __ANDROID__ rather than
5490 __SIGRTMIN.
5491 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
5492 are already deferred.
5493 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
5494 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
5495 stopped and already has a pending signal to report.
5496 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
5497 a pending signal to report or is moving out of a jump pad.
5498 (linux_init_signals): Check for __ANDROID__ rather than
5499 __SIGRTMIN.
5500
b4d51a55
PA
55012010-08-28 Pedro Alves <pedro@codesourcery.com>
5502
5503 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
5504 debug_threads check. Avoid a linear search when not doing debug
5505 output.
5506
ec48365d
PA
55072010-08-27 Pedro Alves <pedro@codesourcery.com>
5508
5509 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
5510 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
5511 (struct file_handler) <fd>: Change type to gdb_fildes_t.
5512 (process_event): Change local fd's type to gdb_fildes_t.
5513 (create_file_handler): Adjust prototype.
5514 (delete_file_handler): Adjust prototype.
5515 (handle_file_event): Adjust prototype. Use pfildes.
5516 (create_file_event): Adjsut prototype.
5517 * remote-utils.c (remote_desc, listen_desc): Change type to
5518 gdb_fildes_t.
5519 * server.h: New gdb_fildes_t typedef.
5520 [USE_WIN32API]: Include winsock2.h.
5521 (delete_file_handler, add_file_handler): Adjust prototypes.
5522 (pfildes): Declare.
5523 * utils.c (pfildes): New.
5524
854d88f0
PA
55252010-08-27 Pedro Alves <pedro@codesourcery.com>
5526
5527 * configure.ac (build_warnings): Add -Wno-char-subscripts.
5528 * configure: Regenerate.
5529
0146f85b
PA
55302010-08-27 Pedro Alves <pedro@codesourcery.com>
5531
5532 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
5533 (linux_done_accessing_memory): ... this.
5534 (linux_target_ops): Adjust.
5535 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
5536 * nto-low.c (nto_target_ops): Adjust comment.
5537 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
5538 * spu-low.c (spu_target_ops): Adjust comment.
5539 * target.h (target_ops): Rename unprepare_to_access_memory field
5540 to done_accessing_memory.
5541 (unprepare_to_access_memory): Rename to ...
5542 (done_accessing_memory): ... this.
5543
90d74c30
PA
55442010-08-26 Pedro Alves <pedro@codesourcery.com>
5545
5546 * linux-low.c (linux_prepare_to_access_memory): New.
5547 (linux_unprepare_to_access_memory): New.
5548 (linux_target_ops): Install them.
5549 * server.c (read_memory): Rename to ...
5550 (gdb_read_memory): ... this. Use
5551 prepare_to_access_memory/prepare_to_access_memory.
5552 (write_memory): Rename to ...
5553 (gdb_write_memory): ... this. Use
5554 prepare_to_access_memory/prepare_to_access_memory.
5555 (handle_search_memory_1): Adjust.
5556 (process_serial_event): Adjust.
5557 * target.h (struct target_ops): New fields
5558 prepare_to_access_memory and unprepare_to_access_memory.
5559 (prepare_to_access_memory, unprepare_to_access_memory): New.
5560 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
5561 prepare_to_access_memory/prepare_to_access_memory.
5562 * nto-low.c (nto_target_ops): Adjust.
5563 * spu-low.c (spu_target_ops): Adjust.
5564 * win32-low.c (win32_target_ops): Adjust.
5565
fd467969
PA
55662010-08-26 Pedro Alves <pedro@codesourcery.com>
5567
5568 * Makefile.in (WARN_CFLAGS): Get it from configure.
5569 (WERROR_CFLAGS): New.
5570 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
5571 * configure.ac: Introduce --enable-werror, which adds -Werror to
5572 the compiler command line. Enabled by default. Disable with
5573 --disable-werror. Add -Wdeclaration-after-statement
5574 Wpointer-arith and -Wformat-nonliteral to warning flags.
5575 * configure: Regenerate.
5576
331e2f5f
PA
55772010-08-26 Pedro Alves <pedro@codesourcery.com>
5578
5579 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
5580
e581f2b4
PA
55812010-08-26 Pedro Alves <pedro@codesourcery.com>
5582
5583 * gdbreplay.c (remote_error): New.
5584 (gdbchar): New.
5585 (expect): Use gdbchar. Check for error reading from GDB.
5586 Clarify sync error output.
5587 (play): Check for errors writing to GDB.
5588 * linux-low.c (sigchld_handler): Really ignore `write' errors.
5589 * remote-utils.c (getpkt): Check for errors writing to the remote
5590 descriptor.
5591
3c11dd79
PA
55922010-08-25 Pedro Alves <pedro@codesourcery.com>
5593
5594 * linux-low.c (linux_wait_1): Move non-debugging code out of
5595 `debug_threads' control.
5596
d20a8ad9
PA
55972010-08-25 Pedro Alves <pedro@codesourcery.com>
5598
5599 * linux-low.c (linux_wait_1): Don't set last_status here.
5600 * server.c (push_event, queue_stop_reply_callback): Assert we're
5601 not pushing a TARGET_WAITKIND_IGNORE event.
5602 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
5603 (myresume, handle_target_event): Set the thread's last_resume_kind
5604 and last_status from the target returned status.
5605
964e4306
PA
56062010-08-25 Pedro Alves <pedro@codesourcery.com>
5607
5608 PR threads/10729
5609
5610 * linux-x86-low.c (update_debug_registers_callback): New.
5611 (i386_dr_low_set_addr): Use it.
5612 (i386_dr_low_get_addr): New.
5613 (i386_dr_low_set_control): Use update_debug_registers_callback.
5614 (i386_dr_low_get_control): New.
5615 (i386_dr_low_get_status): Adjust.
5616 * linux-low.c (linux_stop_lwp): New.
5617 * linux-low.h (linux_stop_lwp): Declare.
5618
5619 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
5620 argument instead of a i386_debug_reg_state.
5621 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
5622 a i386_debug_reg_state.
5623 (i386_insert_aligned_watchpoint): Adjust.
5624 (i386_remove_aligned_watchpoint): Adjust.
5625 (i386_low_stopped_data_address): Read the debug registers from the
5626 inferior instead of from the mirrors.
5627 * i386-low.h (struct i386_debug_reg_state): Extend comment.
5628 (i386_dr_low_get_addr): Declare.
5629 (i386_dr_low_get_control): Declare.
5630 (i386_dr_low_get_status): Change prototype.
5631
5632 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
5633 (i386_dr_low_get_addr): New.
5634 (i386_dr_low_get_control): New.
5635 (i386_dr_low_get_status): Adjust prototype. Return
5636 dr_status_mirror.
5637 (i386_initial_stuff): Clear dr_status_mirror and
5638 dr_control_mirror.
5639 (i386_get_thread_context): Adjust.
5640 (i386_set_thread_context): Adjust.
5641 (i386_thread_added): Adjust.
5642
5f21a75b
PA
56432010-08-24 Pedro Alves <pedro@codesourcery.com>
5644
5645 * linux-low.h (linux_thread_area): Delete declaration.
5646
3e4c1235
TS
56472010-08-11 Thomas Schwinge <thomas@codesourcery.com>
5648
5649 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
5650 after its termination.
5651
1971b033
PA
56522010-08-09 Pedro Alves <pedro@codesourcery.com>
5653
5654 * linux-low.c (gdb_wants_lwp_stopped): Delete.
5655 (gdb_wants_all_stopped): Delete.
5656 (linux_wait_1): Don't call them.
5657 * server.c (handle_v_cont): Tag all threads as want-stopped.
5658 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
5659 stopped as "client-wants-stopped".
5660
310444ac
PA
56612010-07-31 Pedro Alves <pedro@codesourcery.com>
5662
5663 * Makefile.in (signals_h): New.
5664 (server_h): Depend on it.
5665 (server.o): Don't depend on $(signals_def).
5666 (signals.o): Depend on $(signals_def).
5667
a19cae16
JK
56682010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
5669
5670 * Makefile.in (signals_def): New.
5671 (server_h): Append include/gdb/signals.h and signals_def.
5672 (server.o): Append signals_def.
5673
30d50328
JK
56742010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5675
5676 * server.c (handle_target_event): Use target_signal_to_host for
5677 resume_info.sig initialization.
5678 * target.h (struct thread_resume) <sig>: New comment.
5679
5c3216e2
OS
56802010-07-20 Ozkan Sezer <sezeroz@gmail.com>
5681
c6f46ca0
OS
5682 * server.c (handle_query): strcpy() the returned string from paddress()
5683 instead of sprintf().
5c3216e2
OS
5684 * utils.c (paddress): Return phex_nz().
5685
6bd31874
JB
56862010-07-07 Joel Brobecker <brobecker@adacore.com>
5687
5688 * server.c (handle_v_cont): Call mourn_inferior if process
5689 just exited.
5690 (myresume): Likewise.
5691
0fb4aa4b
PA
56922010-07-01 Pedro Alves <pedro@codesourcery.com>
5693
5694 Static tracepoints, and integration with UST.
5695
5696 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
5697 * mem-break.c (uninsert_all_breakpoints)
5698 (reinsert_all_breakpoints): New.
5699 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
5700 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
5701 (gdb_agent_ust_loaded, helper_thread_id)
5702 (gdb_agent_helper_thread_id): New macros.
5703 (struct ipa_sym_addresses): Add addr_ust_loaded,
5704 addr_helper_thread_id, addr_cmd_buf.
5705 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
5706 (in_process_agent_loaded_ust): New.
5707 (write_e_ust_not_loaded): New.
5708 (maybe_write_ipa_ust_not_loaded): New.
5709 (struct collect_static_trace_data_action): New.
5710 (enum tracepoint_type) <static_tracepoint>: New.
5711 (struct tracepoint) <handle>: Mention static tracepoints.
5712 (struct static_tracepoint_ctx): New.
5713 (CMD_BUF_SIZE): New.
5714 (add_tracepoint_action): Handle static tracepoint actions.
5715 (unprobe_marker_at): New.
5716 (clear_installed_tracepoints): Handle static tracepoints.
5717 (cmd_qtdp): Handle static tracepoints.
5718 (probe_marker_at): New.
5719 (cmd_qtstart): Handle static tracepoints.
5720 (response_tracepoint): Handle static tracepoints.
5721 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
5722 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
5723 (get_context_regcache): Handle static tracepoints.
5724 (do_action_at_tracepoint): Handle static tracepoint actions.
5725 (traceframe_find_block_type): Handle static trace data blocks.
5726 (traceframe_read_sdata): New.
5727 (download_tracepoints): Download static tracepoint actions.
5728 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
5729 (GDB_PROBE_NAME): New.
5730 (ust_ops): New.
5731 (GET_UST_SYM): New.
5732 (USTF): New.
5733 (dlsym_ust): New.
5734 (ust_marker_to_static_tracepoint): New.
5735 (gdb_probe): New.
5736 (collect_ust_data_at_tracepoint): New.
5737 (gdb_ust_probe): New.
5738 (UNIX_PATH_MAX, SOCK_DIR): New.
5739 (gdb_ust_connect_sync_socket): New.
5740 (resume_thread, stop_thread): New.
5741 (run_inferior_command): New.
5742 (init_named_socket): New.
5743 (gdb_ust_socket_init): New.
5744 (cstr_to_hexstr): New.
5745 (next_st): New.
5746 (first_marker, next_marker): New.
5747 (response_ust_marker): New.
5748 (cmd_qtfstm, cmd_qtsstm): New.
5749 (unprobe_marker_at, probe_marker_at): New.
5750 (cmd_qtstmat, gdb_ust_thread): New.
5751 (gdb_ust_init): New.
5752 (initialize_tracepoint_ftlib): Call gdb_ust_init.
5753 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
5754 (ST_REGENTRY): New.
5755 (x86_64_st_collect_regmap): New.
5756 (X86_64_NUM_ST_COLLECT_GREGS): New.
5757 (AMD64_RIP_REGNUM): New.
5758 (supply_static_tracepoint_registers): New.
5759 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
5760 (ST_REGENTRY): New.
5761 (i386_st_collect_regmap): New.
5762 (i386_NUM_ST_COLLECT_GREGS): New.
5763 (supply_static_tracepoint_registers): New.
5764 * server.c (handle_query): Handle qXfer:statictrace:read.
5765 <qSupported>: Report support for StaticTracepoints, and
5766 qXfer:statictrace:read features.
5767 * server.h (traceframe_read_sdata)
5768 (supply_static_tracepoint_registers): Declare.
5769 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
5770 (unpack_varlen_hex): Include in IPA build.
5771 * Makefile.in (ustlibs, ustinc): New.
5772 (IPA_OBJS): Add remote-utils-ipa.o.
5773 ($(IPA_LIB)): Link -ldl and -lpthread.
5774 (UST_CFLAGS): New.
5775 (IPAGENT_CFLAGS): Add UST_CFLAGS.
5776 * config.in, configure: Regenerate.
5777
9e4344e5
PA
57782010-06-20 Ian Lance Taylor <iant@google.com>
5779 Pedro Alves <pedro@codesourcery.com>
5780
5781 * linux-x86-low.c (always_true): Delete.
5782 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
5783 trying to fool the compiler with always_true.
5784
c6beb2cb
PA
57852010-06-20 Pedro Alves <pedro@codesourcery.com>
5786
5787 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
5788 conditions in gdbserver.
5789
d2ed6730
UW
57902010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
5791
5792 * spu-low.c (spu_read_memory): Wrap around local store limit.
5793 (spu_write_memory): Likewise.
5794
4e29fb54
PA
57952010-06-15 Pedro Alves <pedro@codesourcery.com>
5796
5797 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
5798 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
5799 LONGEST uses.
5800 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
5801 uses.
5802 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
5803 uses with LONGEST uses.
5804
6a271cae
PA
58052010-06-14 Stan Shebs <stan@codesourcery.com>
5806 Pedro Alves <pedro@codesourcery.com>
5807
5808 Bytecode compiler.
5809
5810 * linux-x86-low.c: Include limits.h.
5811 (add_insns): New.
5812 (always_true): New.
5813 (EMIT_ASM): New.
5814 (EMIT_ASM32): New.
5815 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
5816 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
5817 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
5818 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
5819 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
5820 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
5821 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
5822 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
5823 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
5824 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
5825 (amd64_emit_void_call_2): New.
5826 (amd64_emit_ops): New.
5827 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
5828 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
5829 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
5830 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
5831 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
5832 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
5833 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
5834 (i386_emit_call, i386_emit_reg, i386_emit_pop)
5835 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
5836 (i386_emit_stack_adjust, i386_emit_int_call_1)
5837 (i386_emit_void_call_2): New.
5838 (i386_emit_ops): New.
5839 (x86_emit_ops): New.
5840 (the_low_target): Install x86_emit_ops.
5841 * server.h (struct emit_ops): New.
5842 (get_raw_reg_func_addr): Declare.
5843 (current_insn_ptr, emit_error): Declare.
5844 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
5845 (set_trace_state_variable_value): New defines.
5846 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
5847 addr_get_trace_state_variable_value and
5848 addr_set_trace_state_variable_value.
5849 (symbol_list): New fields for get_raw_reg,
5850 get_trace_state_variable_value and set_trace_state_variable_value.
5851 (condfn): New typedef.
5852 (struct tracepoint): New field `compiled_cond'.
5853 (do_action_at_tracepoint): Clear compiled_cond.
5854 (get_trace_state_variable_value, set_trace_state_variable_value):
5855 Export in the IPA.
5856 (condition_true_at_tracepoint): If there's a compiled condition,
5857 run that.
5858 (current_insn_ptr, emit_error): New globals.
5859 (struct bytecode_address): New.
5860 (get_raw_reg_func_addr): New.
5861 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
5862 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
5863 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
5864 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
5865 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
5866 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
5867 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
5868 (compile_tracepoint_condition, compile_bytecodes): New.
5869 * target.h (emit_ops): Forward declare.
5870 (struct target_ops): New field emit_ops.
5871 (target_emit_ops): New.
5872 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
5873 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
5874 * linux-low.c (linux_emit_ops): New.
5875 (linux_target_ops): Install it.
5876 * linux-low.h (struct linux_target_ops): New field emit_ops.
5877
92b72907
UW
58782010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
5879
5880 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
5881 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
5882
fa593d66
PA
58832010-06-01 Pedro Alves <pedro@codesourcery.com>
5884 Stan Shebs <stan@codesourcery.com>
5885
5886 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
5887 (all): Depend on $(extra_libraries).
5888 (install-only): Install the IPA.
5889 (IPA_OBJS, IPA_LIB): New.
5890 (clean): Remove the IPA lib.
5891 (IPAGENT_CFLAGS): New.
5892 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
5893 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
5894 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
5895 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
5896 * configure.ac: Check for atomic builtins support in the compiler.
5897 (IPA_DEPFILES, extra_libraries): Define.
5898 * configure.srv (ipa_obj): Add description.
5899 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
5900 (i[34567]86-*-linux*): Set ipa_obj.
5901 (x86_64-*-linux*): Set ipa_obj.
5902 * linux-low.c (stabilizing_threads): New.
5903 (supports_fast_tracepoints): New.
5904 (linux_detach): Stabilize threads before detaching.
5905 (handle_tracepoints): Handle internal tracing breakpoints. Assert
5906 the lwp is either not stabilizing, or is moving out of a jump pad.
5907 (linux_fast_tracepoint_collecting): New.
5908 (maybe_move_out_of_jump_pad): New.
5909 (enqueue_one_deferred_signal): New.
5910 (dequeue_one_deferred_signal): New.
5911 (linux_wait_for_event_1): If moving out of a jump pad, defer
5912 pending signals to later.
5913 (linux_stabilize_threads): New.
5914 (linux_wait_1): Check if threads need moving out of jump pads, and
5915 do it if so.
5916 (stuck_in_jump_pad_callback): New.
5917 (move_out_of_jump_pad_callback): New.
5918 (lwp_running): New.
5919 (linux_resume_one_lwp): Handle moving out of jump pads.
5920 (linux_set_resume_request): Dequeue deferred signals.
5921 (need_step_over_p): Also step over fast tracepoint jumps.
5922 (start_step_over): Also uninsert fast tracepoint jumps.
5923 (finish_step_over): Also reinsert fast tracepoint jumps.
5924 (linux_install_fast_tracepoint_jump): New.
5925 (linux_target_ops): Install linux_stabilize_threads and
5926 linux_install_fast_tracepoint_jump_pad.
5927 * linux-low.h (linux_target_ops) <get_thread_area,
5928 install_fast_tracepoint_jump_pad>: New fields.
5929 (struct lwp_info) <collecting_fast_tracepoint,
5930 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
5931 (linux_get_thread_area): Declare.
5932 * linux-x86-low.c (jump_insn): New.
5933 (x86_get_thread_area): New.
5934 (append_insns): New.
5935 (push_opcode): New.
5936 (amd64_install_fast_tracepoint_jump_pad): New.
5937 (i386_install_fast_tracepoint_jump_pad): New.
5938 (x86_install_fast_tracepoint_jump_pad): New.
5939 (the_low_target): Install x86_get_thread_area and
5940 x86_install_fast_tracepoint_jump_pad.
5941 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
5942 (struct fast_tracepoint_jump): New.
5943 (fast_tracepoint_jump_insn): New.
5944 (fast_tracepoint_jump_shadow): New.
5945 (find_fast_tracepoint_jump_at): New.
5946 (fast_tracepoint_jump_here): New.
5947 (delete_fast_tracepoint_jump): New.
5948 (set_fast_tracepoint_jump): New.
5949 (uninsert_fast_tracepoint_jumps_at): New.
5950 (reinsert_fast_tracepoint_jumps_at): New.
5951 (set_breakpoint_at): Use write_inferior_memory.
5952 (uninsert_raw_breakpoint): Use write_inferior_memory.
5953 (check_mem_read): Mask out fast tracepoint jumps.
5954 (check_mem_write): Mask out fast tracepoint jumps.
5955 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
5956 (set_fast_tracepoint_jump): Declare.
5957 (delete_fast_tracepoint_jump)
5958 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
5959 (reinsert_fast_tracepoint_jumps_at): Declare.
5960 * regcache.c: Don't compile many functions when building the
5961 in-process agent library.
5962 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
5963 the register buffer in the heap.
5964 (free_register_cache): If the register buffer isn't owned by the
5965 regcache, don't free it.
5966 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
5967 pre-existing register caches.
5968 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
5969 type.
5970 (convert_ascii_to_int): : Constify `from' parameter type.
5971 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
5972 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
5973 the needed buffer in-place.
5974 (relocate_instruction): New.
5975 * server.c (handle_query) <qSymbols>: If the target supports
5976 tracepoints, give it a chance of looking up symbols. Report
5977 support for fast tracepoints.
5978 (handle_status): Stabilize threads.
5979 (process_serial_event): Adjust.
5980 * server.h (struct fast_tracepoint_jump): Forward declare.
5981 (struct process_info) <fast_tracepoint_jumps>: New field.
5982 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
5983 (decode_X_packet, decode_M_packet): Adjust.
5984 (relocate_instruction): Declare.
5985 (in_process_agent_loaded): Declare.
5986 (tracepoint_look_up_symbols): Declare.
5987 (struct fast_tpoint_collect_status): Declare.
5988 (fast_tracepoint_collecting): Declare.
5989 (force_unlock_trace_buffer): Declare.
5990 (handle_tracepoint_bkpts): Declare.
5991 (initialize_low_tracepoint)
5992 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
5993 * target.h (struct target_ops) <stabilize_threads,
5994 install_fast_tracepoint_jump_pad>: New fields.
5995 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
5996 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
5997 [HAVE_STDINT_H]: Include stdint.h.
5998 (trace_debug_1): Rename to ...
5999 (trace_vdebug): ... this.
6000 (trace_debug): Rename to ...
6001 (trace_debug_1): ... this. Add `level' parameter.
6002 (trace_debug): New.
6003 (ATTR_USED, ATTR_NOINLINE): New.
6004 (IP_AGENT_EXPORT): New.
6005 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6006 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6007 (about_to_request_buffer_space, trace_buffer_is_full)
6008 (stopping_tracepoint, expr_eval_result, error_tracepoint)
6009 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6010 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6011 (traceframe_write_count, traceframes_created)
6012 (trace_state_variables)
6013 New renaming defines.
6014 (struct ipa_sym_addresses): New.
6015 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
6016 (symbol_list): New.
6017 (ipa_sym_addrs): New.
6018 (all_tracepoint_symbols_looked_up): New.
6019 (in_process_agent_loaded): New.
6020 (write_e_ipa_not_loaded): New.
6021 (maybe_write_ipa_not_loaded): New.
6022 (tracepoint_look_up_symbols): New.
6023 (debug_threads) [IN_PROCESS_AGENT]: New.
6024 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6025 (UNKNOWN_SIDE_EFFECTS): New.
6026 (stop_tracing): New.
6027 (flush_trace_buffer): New.
6028 (stop_tracing_bkpt): New.
6029 (flush_trace_buffer_bkpt): New.
6030 (read_inferior_integer): New.
6031 (read_inferior_uinteger): New.
6032 (read_inferior_data_pointer): New.
6033 (write_inferior_data_pointer): New.
6034 (write_inferior_integer): New.
6035 (write_inferior_uinteger): New.
6036 (struct collect_static_trace_data_action): Delete.
6037 (enum tracepoint_type): New.
6038 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
6039 <actions_str, step_actions, step_actions_str>: Only include in
6040 GDBserver.
fa593d66
PA
6041 <orig_size, obj_addr_on_target, adjusted_insn_addr>
6042 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6043 (tracepoints): Use IP_AGENT_EXPORT.
6044 (last_tracepoint): Don't include in the IPA.
6045 (stopping_tracepoint): Use IP_AGENT_EXPORT.
6046 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6047 (alloced_trace_state_variables): New.
6048 (trace_state_variables): Use IP_AGENT_EXPORT.
6049 (traceframe_t): Delete unused variable.
6050 (circular_trace_buffer): Don't include in the IPA.
6051 (trace_buffer_start): Delete.
6052 (struct trace_buffer_control): New.
6053 (trace_buffer_free): Delete.
6054 (struct ipa_trace_buffer_control): New.
6055 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6056 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6057 New.
6058 (trace_buffer_ctrl): New.
6059 (TRACE_BUFFER_CTRL_CURR): New.
6060 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
6061 Reimplement as macros.
6062 (trace_buffer_wrap): Delete.
6063 (traceframe_write_count, traceframe_read_count)
6064 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
6065 (struct tracepoint_hit_ctx) <type>: New field.
6066 (struct fast_tracepoint_ctx): New.
6067 (memory_barrier): New.
6068 (cmpxchg): New.
6069 (record_tracepoint_error): Update atomically in the IPA.
6070 (clear_inferior_trace_buffer): New.
6071 (about_to_request_buffer_space): New.
6072 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
6073 updating the same buffer.
6074 (add_tracepoint): Default the tracepoint's type to trap
6075 tracepoint, and orig_size to -1.
6076 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
6077 internal variables.
6078 (create_trace_state_variable): New parameter `gdb'. Handle it.
6079 (clear_installed_tracepoints): Clear fast tracepoint jumps.
6080 (cmd_qtdp): Handle fast tracepoints.
6081 (cmd_qtdv): Adjust.
6082 (max_jump_pad_size): New.
6083 (gdb_jump_pad_head): New.
6084 (get_jump_space_head): New.
6085 (claim_jump_space): New.
6086 (sort_tracepoints): New.
6087 (MAX_JUMP_SIZE): New.
6088 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
6089 IPA.
6090 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
6091 support. Upload fast traceframes, and delete internal IPA
6092 breakpoints.
6093 (stop_tracing_handler): New.
6094 (flush_trace_buffer_handler): New.
6095 (cmd_qtstop): Upload fast tracepoints.
6096 (response_tracepoint): Handle fast tracepoints.
6097 (tracepoint_finished_step): Upload fast traceframes. Set the
6098 tracepoint hit context's tracepoint type.
6099 (handle_tracepoint_bkpts): New.
6100 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
6101 type. Add comment about fast tracepoints.
6102 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
6103 non-existing action_str field.
6104 (get_context_regcache): Handle fast tracepoints.
6105 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
6106 to the regcache.
6107 (fast_tracepoint_from_jump_pad_address): New.
6108 (fast_tracepoint_from_ipa_tpoint_address): New.
6109 (collecting_t): New.
6110 (force_unlock_trace_buffer): New.
6111 (fast_tracepoint_collecting): New.
6112 (collecting): New.
6113 (gdb_collect): New.
6114 (write_inferior_data_ptr): New.
6115 (target_tp_heap): New.
6116 (target_malloc): New.
6117 (download_agent_expr): New.
6118 (UALIGN): New.
6119 (download_tracepoints): New.
6120 (download_trace_state_variables): New.
6121 (upload_fast_traceframes): New.
6122 (IPA_FIRST_TRACEFRAME): New.
6123 (IPA_NEXT_TRACEFRAME_1): New.
6124 (IPA_NEXT_TRACEFRAME): New.
6125 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
6126 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
6127 (gdb_jump_pad_buffer_end): New.
6128 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
6129 (initialize_tracepoint): Adjust.
6130 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
6131 buffer. Initialize the low module.
6132 * utils.c (PREFIX, TOOLNAME): New.
6133 (malloc_failure): Use PREFIX.
6134 (error): In the IPA, an error causes an exit.
6135 (fatal, warning): Use PREFIX.
6136 (internal_error): Use TOOLNAME.
6137 (NUMCELLS): Increase to 10.
6138 * configure, config.in: Regenerate.
6139
d149dd1d
PA
61402010-06-01 Pedro Alves <pedro@codesourcery.com>
6141
6142 * server.c (handle_query) <qSupported>: Do two passes over the
6143 qSupported string to avoid nesting strtok.
6144
f6528abd
JK
61452010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6146
6147 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
6148 (CDEPS): New.
6149 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
6150 -Wl,--dynamic-list.
6151 * configure: Regenerate.
6152 * proc-service.list: New.
6153
ca2a87a0
JK
61542010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6155
6156 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
6157 New comment.
6158
363a6e9f
OS
61592010-05-26 Ozkan Sezer <sezeroz@gmail.com>
6160
6161 * gdbreplay.c (remote_open): Check error return from socket() call by
6162 its equality to -1 not by it being negative.
6163 * remote-utils.c (remote_open): Likewise.
6164
d23b6cb1
PA
61652010-05-23 Pedro Alves <pedro@codesourcery.com>
6166
6167 * config.h: Regenerate.
6168
28d3cf85
MK
61692010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6170
6171 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
6172 doesn't provide PTRACE_GET_THREAD_AREA.
6173
fea36a59
MK
61742010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6175
6176 * linux-m68k-low.c: Include <asm/ptrace.h>
6177 (ps_get_thread_area): Implement.
6178
24b066ba
DE
61792010-05-03 Doug Evans <dje@google.com>
6180
6181 * event-loop.c (struct callback_event): New struct.
6182 (callback_list): New global.
6183 (append_callback_event, delete_callback_event): New functions.
6184 (process_callback): New function.
6185 (start_event_loop): Call it.
6186 * remote-utils.c (NOT_SCHEDULED): Define.
6187 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
6188 moved out of readchar.
6189 (readchar): Rewrite. Call reschedule before returning.
6190 (reset_readchar): New function.
6191 (remote_close): Call it.
6192 (process_remaining, reschedule): New functions.
6193 * server.h (callback_handler_func): New typedef.
6194 (append_callback_event, delete_callback_event): Declare.
6195
9836d6ea
PA
61962010-05-03 Pedro Alves <pedro@codesourcery.com>
6197
6198 * proc-service.c (ps_pglobal_lookup): Use
6199 thread_db_look_up_one_symbol.
6200 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6201 parameter. Use it instead of all_symbols_looked_up.
6202 * server.h (struct process_info) <all_symbols_looked_up>: Delete
6203 field.
6204 (all_symbols_looked_up): Don't declare.
6205 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6206 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6207 field.
6208 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6209 Set all_symbols_looked_up here.
6210 (thread_db_look_up_one_symbol): New.
6211 (thread_db_get_tls_address): Adjust.
6212 (thread_db_load_search, try_thread_db_load_1): Always allocate the
6213 thread_db object on the heap, and tentatively set it in the
6214 process structure.
6215 (thread_db_init): Don't set all_symbols_looked_up here.
6216 * linux-low.h (thread_db_look_up_one_symbol): Declare.
6217
7984d532
PA
62182010-05-03 Pedro Alves <pedro@codesourcery.com>
6219
6220 * linux-low.c (linux_kill, linux_detach): Adjust.
6221 (status_pending_p_callback): Remove redundant statement. Check
6222 for !TARGET_WAITIKIND_IGNORE, instead of
6223 TARGET_WAITKIND_STOPPED.
6224 (handle_tracepoints): Make sure LWP is locked. Adjust.
6225 (linux_wait_for_event_1): Adjust.
6226 (linux_cancel_breakpoints): New.
6227 (unsuspend_one_lwp): New.
6228 (unsuspend_all_lwps): New.
6229 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
6230 (send_sigstop_callback): Change return type to int, add new
6231 `except' parameter and handle it.
6232 (suspend_and_send_sigstop_callback): New.
6233 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6234 pass them down. If SUSPEND, also increment the lwp's suspend
6235 count.
6236 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6237 (need_step_over_p): Don't consider suspended LWPs.
6238 (start_step_over): Adjust.
6239 (proceed_one_lwp): Change return type to int, add new `except'
6240 parameter and handle it.
6241 (unsuspend_and_proceed_one_lwp): New.
6242 (proceed_all_lwps): Use find_inferior instead of
6243 for_each_inferior.
6244 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6245 also decrement the suspend count of LWPs. Pass `except' down,
6246 instead of hacking its suspend count.
6247 (linux_pause_all): Add `freeze' parameter. Adjust.
6248 (linux_unpause_all): New.
6249 (linux_target_ops): Install linux_unpause_all.
6250 * server.c (handle_status): Adjust.
6251 * target.h (struct target_ops): New fields `unpause_all' and
6252 `cancel_breakpoints'. Add new parameter to `pause_all'.
6253 (pause_all): Add new `freeze' parameter.
6254 (unpause_all): New.
6255 (cancel_breakpoints): New.
6256 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6257 cancel breakpoints.
6258 (cmd_qtstart): Pause threads.
6259 (stop_tracing): Pause threads, and cancel breakpoints.
6260 * win32-low.c (win32_target_ops): Adjust.
6261
e471f25b
PA
62622010-05-03 Pedro Alves <pedro@codesourcery.com>
6263
6264 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6265 the inferior right away from here...
6266 (linux_wait_1): ... to here, and adjust to check the thread's
6267 last_resume_kind instead of the lwp's step or stop_expected flags.
6268
1915ef4f
PA
62692010-05-02 Pedro Alves <pedro@codesourcery.com>
6270
6271 * README: Use consistent `GDB' and `GDBserver' spellings.
6272
f9e39928
PA
62732010-05-02 Pedro Alves <pedro@codesourcery.com>
6274
6275 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6276 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
6277 (linux_detach_one_lwp): Assume the lwp is stopped.
6278 (any_thread_of): Delete.
6279 (linux_detach): Stop all lwps here. Don't blindly delete all
6280 breakpoints.
6281 (delete_lwp_callback): New.
6282 (linux_mourn): Delete all lwps of the process that is gone.
6283 (linux_wait_1): Don't delete the last lwp of the process here.
6284 * mem-break.h (mark_breakpoints_out): Declare.
6285 * mem-break.c (mark_breakpoints_out): New.
6286 (free_all_breakpoints): Use it.
6287 * server.c (handle_target_event): If the process is gone, mark
6288 breakpoints out.
6289 * thread-db.c (struct thread_db) <create_bp>: New field.
6290 (thread_db_enable_reporting): Fix prototype. Store a thread event
6291 breakpoint reference in the thread_db struct.
6292 (thread_db_load_search): Clear the thread_db object.
6293 (try_thread_db_load_1): Ditto.
6294 (switch_to_process): New.
6295 (disable_thread_event_reporting): Use it.
6296 (remove_thread_event_breakpoints): New.
6297 (thread_db_detach, thread_db_mourn): Use it.
6298
1e7fc18c
PA
62992010-05-01 Pedro Alves <pedro@codesourcery.com>
6300
6301 * linux-low.c (linux_enable_event_reporting): New.
6302 (linux_wait_for_event_1, handle_extended_wait): Use it.
6303
02fc4de7
PA
63042010-04-30 Pedro Alves <pedro@codesourcery.com>
6305
6306 * linux-low.c (linux_kill_one_lwp, linux_kill)
6307 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
6308 (send_sigstop): Take an lwp_info as parameter instead. Queue a
6309 SIGSTOP even if the LWP is stopped.
6310 (send_sigstop_callback): New.
6311 (stop_all_lwps): Use send_sigstop_callback instead.
6312 (linux_resume_one_thread): Adjust.
6313 (proceed_one_lwp): Still proceed an LWP that the client has
6314 requested to stop, if we haven't reported it as stopped yet. Make
6315 sure that LWPs the client want stopped, have a pending SIGSTOP.
6316
bc3b5632
DE
63172010-04-26 Doug Evans <dje@google.com>
6318
ae1ada35
DE
6319 * server.c (handle_general_set): Make static.
6320
bc3b5632
DE
6321 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
6322 Print received char after testing for error/eof instead of before.
6323 (input_interrupt): Tweak comment.
6324
65730243
DE
63252010-04-23 Doug Evans <dje@google.com>
6326
6327 * server.c (start_inferior): Print inferior argv if --debug.
6328
a8ae7dc0
AR
63292010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
6330
6331 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
6332 * nto-x86-low.c: Include server.h
6333
1c07cc19
PM
63342010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
6335
6336 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
6337 be consistent with other sources of this directory.
6338 (init_registers_amd64): Correct name of source file of this function
6339 in the comment.
6340
e0a61e09
PM
63412010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6342
6343 * configure.srv (x86_64-*-mingw*): New configuration for Windows
6344 64-bit executables.
6345
54709339
PM
63462010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6347
6348 * win32-i386-low.c: Add 64-bit support.
6349 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
6350 (init_registers_amd64): Declare.
6351 (mappings): Add 64-bit version of array.
6352 (init_windows_x86): New function.
6353 (the_low_target): Change init_arch field to init_windows_x86.
6354
e8f0053d
PM
63552010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6356
6357 * win32-low.c: Adapt to support also 64-bit architecture.
6358 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
6359 (get_image_name): Use SIZE_T type for local variable `done'.
6360 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
6361 (toolhelp_get_dll_name): Idem.
6362 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
6363 Use uintptr_t typecast to avoid warning.
6364 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
6365 (handle_exception): Use phex_nz to avoid warning.
6366 (win32_wait): Remove unused local variable `process'.
6367
c481e77e
PM
63682010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6369
6370 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
6371 `amd64-avx.o'.
6372
12ea4b69
PM
63732010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
6374
6375 * configure.ac: Use `ws2_32' library for srv_mingw.
6376 * configure: Regenerate.
6377 * gdbreplay.c: Include winsock2.h instead of winsock.h.
6378 * remote-utils.c: Likewise.
6379
f6d1620c
L
63802010-04-17 H.J. Lu <hongjiu.lu@intel.com>
6381
6382 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
6383 if __x86_64__ is defined.
6384
8e642873
PM
63852010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6386
6387 * configure: Regenerate.
6388
711e434b
PM
63892010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6390
6391 * server.c (handle_query): Handle 'qGetTIBAddr' query.
6392 * target.h (target_ops): New get_tib_address field.
6393 * win32-low.h (win32_thread_info): Add thread_local_base field.
6394 * win32-low.c (child_add_thread): Add tlb argument.
6395 Set thread_local_base field to TLB.
6396 (get_child_debug_event): Adapt to child_add_thread change.
6397 (win32_get_tib_address): New function.
6398 (win32_target_ops): Set get_tib_address field to
6399 win32_get_tib_address.
6400 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
6401
505106cd
PA
64022010-04-12 Pedro Alves <pedro@codesourcery.com>
6403
505106cd
PA
6404 * linux-low.c (linux_mourn): Also remove the process.
6405 * server.c (handle_target_event): Don't remove the process here.
6406 * nto-low.c (nto_mourn): New.
6407 (nto_target_ops): Install it.
6408 * spu-low.c (spu_mourn): New.
6409 (spu_target_ops): Install it.
6410 * win32-low.c (win32_mourn): New.
6411 (win32_target_ops): Install it.
6412
e8470a06
PA
64132010-04-12 Pedro Alves <pedro@codesourcery.com>
6414
6415 * server.h (buffer_xml_printf): Remove redundant `;'.
6416
45ba0d02
PA
64172010-04-12 Pedro Alves <pedro@codesourcery.com>
6418
6419 * regcache.c (set_register_cache): Invalidate regcaches before
6420 changing the register cache layout.
6421 (regcache_invalidate_one): Allow a NULL regcache.
6422 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
6423 regcaches before changing the register cache layout or the target
6424 regsets.
6425
59e04013
L
64262010-04-12 H.J. Lu <hongjiu.lu@intel.com>
6427
6428 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
6429 variable warning on Linux/x86-64.
6430
8336d594
PA
64312010-04-11 Pedro Alves <pedro@codesourcery.com>
6432
6433 GDBserver disconnected tracing support.
6434
6435 * linux-low.c (linux_remove_process): Delete.
6436 (add_lwp): Don't set last_resume_kind here.
6437 (linux_kill): Use `mourn'.
6438 (linux_detach): Use `thread_db_detach', and `mourn'.
6439 (linux_mourn): New.
6440 (linux_attach_lwp_1): Adjust comment.
6441 (linux_attach): last_resume_kind moved the thread_info; adjust.
6442 (status_pending_p_callback): Adjust.
6443 (linux_wait_for_event_1): Adjust.
6444 (count_events_callback, select_singlestep_lwp_callback)
6445 (select_event_lwp_callback, cancel_breakpoints_callback)
6446 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
6447 (proceed_one_lwp): Adjust.
6448 (linux_async): Add debug output.
6449 (linux_thread_stopped): New.
6450 (linux_pause_all): New.
6451 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
6452 linux_pause_all.
6453 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
6454 (thread_db_free): Delete declaration.
6455 (thread_db_detach, thread_db_mourn): Declare.
6456 * thread-db.c (thread_db_init): Use thread_db_mourn.
6457 (thread_db_free): Delete, split in two.
6458 (disable_thread_event_reporting): New.
6459 (thread_db_detach): New.
6460 (thread_db_mourn): New.
6461
6462 * server.h (struct thread_info) <last_resume_kind>: New field.
6463 <attached>: Add comment.
6464 <gdb_detached>: New field.
6465 (handler_func): Change return type to int.
6466 (handle_serial_event, handle_target_event): Ditto.
6467 (gdb_connected): Declare.
6468 (tracing): Delete.
6469 (disconnected_tracing): Declare.
6470 (stop_tracing): Declare.
6471
6472 * server.c (handle_query) <qSupported>: Report support for
6473 disconnected tracing.
6474 (queue_stop_reply_callback): Account for running threads.
6475 (gdb_wants_thread_stopped): New.
6476 (gdb_wants_all_threads_stopped): New.
6477 (gdb_reattached_process): New.
6478 (handle_status): Clear the `gdb_detached' flag of all processes.
6479 In all-stop, stop all threads.
6480 (main): Be sure to leave tfind mode. Handle disconnected tracing.
6481 (process_serial_event): If the remote connection breaks, or if an
6482 exit was forced with "monitor exit", force an event loop exit.
6483 Handle disconnected tracing on detach.
6484 (handle_serial_event): Adjust.
6485 (handle_target_event): If GDB isn't connected, forward events back
6486 to the inferior, unless the last process exited, in which case,
6487 exit gdbserver. Adjust interface.
6488
6489 * remote-utils.c (remote_open): Don't block in accept. Instead
6490 register an event loop source on the listen socket file
6491 descriptor. Refactor bits into ...
6492 (listen_desc): ... this new global.
6493 (gdb_connected): ... this new function.
6494 (enable_async_notification): ... this new function.
6495 (handle_accept_event): ... this new function.
6496 (remote_close): Clear remote_desc.
6497
6498 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
6499
6500 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
6501 New fields.
6502 (mourn_inferior): Define.
6503 (target_process_qsupported): Avoid the dangling else problem.
6504 (thread_stopped): Define.
6505 (pause_all): Define.
6506 (target_waitstatus_to_string): Declare.
6507 * target.c (target_waitstatus_to_string): New.
6508
6509 * tracepoint.c (tracing): Make extern.
6510 (disconnected_tracing): New.
6511 (stop_tracing): Make extern. Handle tracing stops due to GDB
6512 disconnecting.
6513 (cmd_qtdisconnected): New.
6514 (cmd_qtstatus): Report disconnected tracing status in trace reply.
6515 (handle_tracepoint_general_set): Handle QTDisconnected.
6516
6517 * event-loop.c (event_handler_func): Change return type to int.
6518 (process_event): Bail out if the event handler wants the event
6519 loop to stop.
6520 (handle_file_event): Ditto.
6521 (start_event_loop): Bail out if the event handler wants the event
6522 loop to stop.
6523
6524 * nto-low.c (nto_target_ops): Adjust.
6525 * spu-low.c (spu_wait): Don't remove the process here.
6526 (spu_target_ops): Adjust.
6527 * win32-low.c (win32_wait): Don't remove the process here.
6528 (win32_target_ops): Adjust.
6529
5d267c4c
PA
65302010-04-11 Pedro Alves <pedro@codesourcery.com>
6531
6532 * regcache.c (realloc_register_cache): Invalidate inferior's
6533 regcache before recreating it.
6534
623ccd72
PA
65352010-04-09 Pedro Alves <pedro@codesourcery.com>
6536
6537 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
6538
219f2f23
PA
65392010-04-09 Stan Shebs <stan@codesourcery.com>
6540 Pedro Alves <pedro@codesourcery.com>
6541
6542 * server.h (LONGEST): New.
6543 (struct thread_info) <while_stepping>: New field.
6544 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
6545 Declare.
6546 (initialize_tracepoint, handle_tracepoint_general_set)
6547 (handle_tracepoint_query, tracepoint_finished_step)
6548 (tracepoint_was_hit, release_while_stepping_state_list):
6549 (current_traceframe): Declare.
6550 * server.c (handle_general_set): Handle tracepoint packets.
6551 (read_memory): New.
6552 (write_memory): New.
6553 (handle_search_memory_1): Use read_memory.
6554 (handle_query): Report support for conditional tracepoints, trace
6555 state variables, and tracepoint sources. Handle tracepoint
6556 queries.
6557 (main): Initialize the tracepoints module.
6558 (process_serial_event): Handle traceframe reads/writes.
6559
6560 * linux-low.c (handle_tracepoints): New.
6561 (linux_wait_1): Call it.
6562 (linux_resume_one_lwp): Handle while-stepping.
6563 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
6564 (linux_target_ops): Install them.
6565 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
6566 New field.
6567 * linux-x86-low.c (x86_supports_tracepoints): New.
6568 (the_low_target). Install it.
6569
6570 * mem-break.h (delete_breakpoint): Declare.
6571 * mem-break.c (delete_breakpoint): Make external.
6572
6573 * target.h (struct target_ops): Add `supports_tracepoints',
6574 `read_pc', and `write_pc' fields.
6575 (target_supports_tracepoints): Define.
6576 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
6577 (phex_nz): New.
6578
6579 * regcache.h (struct regcache) <registers_owned>: New field.
6580 (init_register_cache, regcache_cpy): Declare.
6581 (regcache_read_pc, regcache_write_pc): Declare.
6582 (register_cache_size): Declare.
6583 (supply_regblock): Declare.
6584 * regcache.c (init_register_cache): New.
6585 (new_register_cache): Use it.
6586 (regcache_cpy): New.
6587 (register_cache_size): New.
6588 (supply_regblock): New.
6589 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 6590
219f2f23
PA
6591 * tracepoint.c: New.
6592
6593 * Makefile.in (OBS): Add tracepoint.o.
6594 (tracepoint.o): New rule.
6595
3a13a53b
L
65962010-04-08 H.J. Lu <hongjiu.lu@intel.com>
6597
6598 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
6599 (i386-mmx.o): New.
6600 (i386-mmx.c): Likewise.
6601 (i386-mmx-linux.o): Likewise.
6602 (i386-mmx-linux.c): Likewise.
6603
6604 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
6605 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
6606 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
6607 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
6608
6609 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
6610 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
6611 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
6612
1570b33e
L
66132010-04-07 H.J. Lu <hongjiu.lu@intel.com>
6614
6615 * Makefile.in (clean): Updated.
6616 (i386-avx.o): New.
6617 (i386-avx.c): Likewise.
6618 (i386-avx-linux.o): Likewise.
6619 (i386-avx-linux.c): Likewise.
6620 (amd64-avx.o): Likewise.
6621 (amd64-avx.c): Likewise.
6622 (amd64-avx-linux.o): Likewise.
6623 (amd64-avx-linux.c): Likewise.
6624
6625 * configure.srv (srv_i386_regobj): Add i386-avx.o.
6626 (srv_i386_linux_regobj): Add i386-avx-linux.o.
6627 (srv_amd64_regobj): Add amd64-avx.o.
6628 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
6629 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
6630 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
6631 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
6632 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
6633 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
6634 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
6635
6636 * i387-fp.c: Include "i386-xstate.h".
6637 (i387_xsave): New.
6638 (i387_cache_to_xsave): Likewise.
6639 (i387_xsave_to_cache): Likewise.
6640 (x86_xcr0): Likewise.
6641
6642 * i387-fp.h (i387_cache_to_xsave): Likewise.
6643 (i387_xsave_to_cache): Likewise.
6644 (x86_xcr0): Likewise.
6645
6646 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
6647 * linux-crisv32-low.c (target_regsets): Likewise.
6648 * linux-m68k-low.c (target_regsets): Likewise.
6649 * linux-mips-low.c (target_regsets): Likewise.
6650 * linux-ppc-low.c (target_regsets): Likewise.
6651 * linux-s390-low.c (target_regsets): Likewise.
6652 * linux-sh-low.c (target_regsets): Likewise.
6653 * linux-sparc-low.c (target_regsets): Likewise.
6654 * linux-xtensa-low.c (target_regsets): Likewise.
6655
6656 * linux-low.c: Include <sys/uio.h>.
6657 (regsets_fetch_inferior_registers): Support nt_type.
6658 (regsets_store_inferior_registers): Likewise.
6659 (linux_process_qsupported): New.
6660 (linux_target_ops): Add linux_process_qsupported.
6661
6662 * linux-low.h (regset_info): Add nt_type.
6663 (linux_target_ops): Add process_qsupported.
6664
6665 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
6666 and <sys/uio.h>.
6667 (init_registers_i386_avx_linux): New.
6668 (init_registers_amd64_avx_linux): Likewise.
6669 (xmltarget_i386_linux_no_xml): Likewise.
6670 (xmltarget_amd64_linux_no_xml): Likewise.
6671 (PTRACE_GETREGSET): Likewise.
6672 (PTRACE_SETREGSET): Likewise.
6673 (x86_fill_xstateregset): Likewise.
6674 (x86_store_xstateregset): Likewise.
6675 (use_xml): Likewise.
6676 (x86_linux_update_xmltarget): Likewise.
6677 (x86_linux_process_qsupported): Likewise.
6678 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
6679 (x86_arch_setup): Don't call init_registers_amd64_linux nor
6680 init_registers_i386_linux here. Call
6681 x86_linux_update_xmltarget.
6682 (the_low_target): Add x86_linux_process_qsupported.
6683
6684 * server.c (handle_query): Call target_process_qsupported.
6685
6686 * target.h (target_ops): Add process_qsupported.
6687 (target_process_qsupported): New.
6688
fc7238bb
PA
66892010-04-03 Pedro Alves <pedro@codesourcery.com>
6690
6691 * inferiors.c (add_thread): Set last_status kind to
6692 TARGET_WAITKIND_IGNORE.
6693 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
6694 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
6695 (linux_wait_1): Move `thread' local definition to block that uses
6696 it. Don't NULL initialize `event_child'.
6697 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
6698 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
6699 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
6700
bdabb078
PA
67012010-04-01 Pedro Alves <pedro@codesourcery.com>
6702
6703 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
6704 an extended waitstatus, or by a watchpoint.
6705 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
6706 thread was stepping or has been stopped by a watchpoint.
6707
d3bbe7a0
PA
67082010-04-01 Pedro Alves <pedro@codesourcery.com>
6709
6710 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
6711 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
6712 of another, then delete the previous, and validate all
6713 breakpoints.
6714 (validate_inserted_breakpoint): New.
6715 (delete_disabled_breakpoints): New.
6716 (validate_breakpoints): New.
6717 (check_mem_read): Validate breakpoints before trusting their
6718 shadow. Delete disabled breakpoints.
6719 (check_mem_write): Validate breakpoints before trusting they
6720 should be inserted. Delete disabled breakpoints.
6721 * mem-break.h (validate_breakpoints):
6722 * server.c (handle_query): Validate breakpoints when we see a
6723 qSymbol query.
6724
8b07ae33
PA
67252010-04-01 Pedro Alves <pedro@codesourcery.com>
6726
6727 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
6728 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
6729 if we could tell there's a GDB breakpoint at stop_pc.
6730 (need_step_over_p): Don't do a step over if we find a GDB
6731 breakpoint at the resume PC.
6732
6733 * mem-break.c (struct raw_breakpoint): New.
6734 (enum bkpt_type): New type `gdb_breakpoint'.
6735 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
6736 fields. New field `raw'.
6737 (find_raw_breakpoint_at): New.
6738 (set_raw_breakpoint_at): Handle refcounting. Create a raw
6739 breakpoint instead.
6740 (set_breakpoint_at): Adjust.
6741 (delete_raw_breakpoint): New.
6742 (release_breakpoint): New.
6743 (delete_breakpoint): Rename to...
6744 (delete_breakpoint_1): ... this. Add proc parameter. Use
6745 release_breakpoint. Return ENOENT.
6746 (delete_breakpoint): Reimplement.
6747 (find_breakpoint_at): Delete.
6748 (find_gdb_breakpoint_at): New.
6749 (delete_breakpoint_at): Delete.
6750 (set_gdb_breakpoint_at): New.
6751 (delete_gdb_breakpoint_at): New.
6752 (gdb_breakpoint_here): New.
6753 (set_reinsert_breakpoint): Use release_breakpoint.
6754 (uninsert_breakpoint): Rename to ...
6755 (uninsert_raw_breakpoint): ... this.
6756 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
6757 (reinsert_raw_breakpoint): Change parameter type to
6758 raw_breakpoint.
6759 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
6760 instead.
6761 (check_breakpoints): Adjust. Use release_breakpoint.
6762 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
6763 (breakpoint_inserted_here): Ditto.
6764 (check_mem_read): Adjust to iterate over raw breakpoints instead.
6765 Don't trust the breakpoint's shadow if it is not inserted.
6766 (check_mem_write): Adjust to iterate over raw breakpoints instead.
6767 (delete_all_breakpoints): Adjust.
6768 (free_all_breakpoints): Mark all breakpoints as uninserted, and
6769 use delete_breakpoint_1.
6770
6771 * mem-break.h (breakpoints_supported): Delete declaration.
6772 (set_gdb_breakpoint_at): Declare.
6773 (gdb_breakpoint_here): Declare.
6774 (delete_breakpoint_at): Delete.
6775 (delete_gdb_breakpoint_at): Declare.
6776
6777 * server.h (struct raw_breakpoint): Forward declare.
6778 (struct process_info): New field `raw_breakpoints'.
6779
6780 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
6781 breakpoints.
6782
6bf5e0ba
PA
67832010-03-24 Pedro Alves <pedro@codesourcery.com>
6784
6785 * linux-low.c (status_pending_p_callback): Fix comment.
6786 (linux_wait_for_event_1): Move most of the internal breakpoint
6787 handling from here...
6788 (linux_wait_1): ... to here.
6789 (count_events_callback): New.
6790 (select_singlestep_lwp_callback): New.
6791 (select_event_lwp_callback): New.
6792 (cancel_breakpoints_callback): New.
6793 (select_event_lwp): New.
6794 (linux_wait_1): Simplify internal breakpoint handling. Give equal
6795 priority to all LWPs that have had events that should be reported
6796 to the client. Cancel breakpoints when about to reporting the
6797 event to the client, not while stopping lwps. No longer cancel
6798 finished single-steps here.
6799 (cancel_finished_single_step): Delete.
6800 (cancel_finished_single_steps): Delete.
6801
414a389f
PA
68022010-03-24 Pedro Alves <pedro@codesourcery.com>
6803
6804 * mem-break.c (enum bkpt_type): New.
6805 (struct breakpoint): New field `type'.
6806 (set_breakpoint_at): Change return type to struct breakpoint
6807 pointer. Set type to `other_breakpoint' by default.
6808 (delete_breakpoint): Rewrite, supporting more than one breakpoint
6809 in the breakpoint list.
6810 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
6811 (reinsert_breakpoint): Rename to ...
6812 (reinsert_raw_breakpoint): ... this.
6813 (reinsert_breakpoints_at): Adjust.
6814 * mem-break.h (struct breakpoint): Declare.
6815 (set_breakpoint_at): Change return type to struct breakpoint
6816 pointer.
6817
2280c721
PA
68182010-03-24 Pedro Alves <pedro@codesourcery.com>
6819
6820 * server.c (handle_query): Assign, not compare.
6821
d50171e4
PA
68222010-03-24 Pedro Alves <pedro@codesourcery.com>
6823
6824 Teach linux gdbserver to step-over-breakpoints.
6825
6826 * linux-low.c (can_hardware_single_step): New.
6827 (supports_breakpoints): New.
6828 (handle_extended_wait): If stopping threads, read the stop pc of
6829 the new cloned LWP.
6830 (get_pc): New.
6831 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
6832 low target doesn't support retrieving the PC.
6833 (add_lwp): Set last_resume_kind to resume_continue.
6834 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
6835 (linux_attach): Don't clear stop_expected. Set the lwp's
6836 last_resume_kind to resume_stop.
6837 (linux_detach_one_lwp): Don't check for removed breakpoints.
6838 (check_removed_breakpoint): Delete.
6839 (status_pending_p): Rename to ...
6840 (status_pending_p_callback): ... this. Don't check for removed
6841 breakpoints. Don't consider threads that are stopped from GDB's
6842 perspective.
6843 (linux_wait_for_lwp): Always read the stop_pc here.
6844 (cancel_breakpoint): New.
6845 (step_over_bkpt): New global.
6846 (linux_wait_for_event_1): Implement stepping over breakpoints.
6847 (gdb_wants_lwp_stopped): New.
6848 (gdb_wants_all_stopped): New.
6849 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
6850 single-step traps here. Store the thread's last reported target
6851 wait status.
6852 (send_sigstop): Don't clear stop_expected. Always set it,
6853 instead.
6854 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
6855 (cancel_finished_single_step): New.
6856 (cancel_finished_single_steps): New.
6857 (wait_for_sigstop): Don't cancel finished single-step traps here.
6858 (linux_resume_one_lwp): Don't check for removed breakpoints.
6859 Don't set `step' on non-hardware step archs.
6860 (linux_set_resume_request): Ignore resume_stop requests if already
6861 stopping or stopped. Set the lwp's last_resume_kind.
6862 (resume_status_pending_p): Don't check for removed breakpoints.
6863 (need_step_over_p): New.
6864 (start_step_over): New.
6865 (finish_step_over): New.
6866 (linux_resume_one_thread): Always queue a sigstop for resume_stop
6867 requests. Clear the thread's last reported target waitstatus.
6868 Don't use the `suspended' flag. Don't consider pending breakpoints.
6869 (linux_resume): Start a step-over if necessary.
6870 (proceed_one_lwp): New.
6871 (proceed_all_lwps): New.
6872 (unstop_all_lwps): New.
6873 * linux-low.h (struct lwp_info): Rewrite comment for the
6874 `suspended' flag. Add the `stop_pc' field. Delete the
6875 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
6876 Add `'last_resume_kind' and `need_step_over' fields.
6877 * inferiors.c (struct thread_info): Delete, moved elsewhere.
6878 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
6879 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
6880 (set_raw_breakpoint_at): New.
6881 (set_breakpoint_at): Rewrite to use it.
6882 (reinsert_breakpoint_handler): Delete.
6883 (set_reinsert_breakpoint): New.
6884 (reinsert_breakpoint_by_bp): Delete.
6885 (delete_reinsert_breakpoints): New.
6886 (uninsert_breakpoint): Rewrite.
6887 (uninsert_breakpoints_at): New.
6888 (reinsert_breakpoint): Rewrite.
6889 (reinsert_breakpoints_at): New.
6890 (check_breakpoints): Rewrite.
6891 (breakpoint_here): New.
6892 (breakpoint_inserted_here): New.
6893 (check_mem_read): Adjust.
6894 * mem-break.h (breakpoints_supported, breakpoint_here)
6895 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
6896 (reinsert_breakpoint_by_bp): Delete declaration.
6897 (delete_reinsert_breakpoints): Declare.
6898 (reinsert_breakpoint): Delete declaration.
6899 (reinsert_breakpoints_at): Declare.
6900 (uninsert_breakpoint): Delete declaration.
6901 (uninsert_breakpoints_at): Declare.
6902 (check_breakpoints): Adjust prototype.
6903 * server.h: Adjust include order.
6904 (struct thread_info): Declare here. Add a `last_status' field.
6905
30ba68cb
MS
69062010-03-23 Michael Snyder <msnyder@vmware.com>
6907
6908 * server.c (crc32): New function.
6909 (handle_query): Add handling for 'qCRC:' request.
6910
b9a881c2
PA
69112010-03-23 Pedro Alves <pedro@codesourcery.com>
6912
6913 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
6914 lwp had been stopped by a watchpoint.
6915
e92d13d5
PA
69162010-03-16 Pedro Alves <pedro@codesourcery.com>
6917
6918 * server.h (internal_error): Declare.
6919 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
6920 * utils.c (internal_error): New function.
6921
64daa791
AS
69222010-03-15 Andreas Schwab <schwab@redhat.com>
6923
6924 * configure.srv: Fix typo setting srv_regobj.
6925
f52cd8cd
PA
69262010-03-15 Pedro Alves <pedro@codesourcery.com>
6927
6928 * linux-low.c (fetch_register): Avoid passing a non string literal
6929 format to `error'.
6930 (usr_store_inferior_registers): Ditto.
6931
93ae6fdc
PA
69322010-03-14 Pedro Alves <pedro@codesourcery.com>
6933
6934 * linux-low.c (linux_write_memory): Bail out early if peeking
6935 memory failed.
6936
c3adc08c
PA
69372010-03-14 Pedro Alves <pedro@codesourcery.com>
6938
6939 * linux-low.h (struct lwp_info): New fields
6940 `stopped_by_watchpoint' and `stopped_data_address'.
6941 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
6942 here, and cache them in the lwp object.
6943 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
6944 directly.
6945 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
6946 field.
6947 (linux_stopped_by_watchpoint): Rewrite.
6948 (linux_stopped_data_address): Rewrite.
6949
bce522a2
PA
69502010-03-06 Simo Melenius <simo.melenius@iki.fi>
6951
6952 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
6953 switching the current inferior, not before.
6954
90884b2b
L
69552010-03-01 H.J. Lu <hongjiu.lu@intel.com>
6956
6957 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
6958 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
6959 i386-linux.c and amd64-linux.c.
6960 (reg-i386.o): Removed.
6961 (reg-i386.c): Likewise.
6962 (reg-i386-linux.o): Likewise.
6963 (reg-i386-linux.c): Likewise.
6964 (reg-x86-64.o): Likewise.
6965 (reg-x86-64.c): Likewise.
6966 (reg-x86-64-linux.o): Likewise.
6967 (reg-x86-64-linux.c): Likewise.
6968 (i386.o): New.
6969 (i386.c): Likewise.
6970 (i386-linux.o): Likewise.
6971 (i386-linux.c): Likewise.
6972 (amd64.o): Likewise.
6973 (amd64.c): Likewise.
6974 (amd64-linux.o): Likewise.
6975 (amd64-linux.c): Likewise.
6976
6977 * configure.srv (srv_i386_regobj): New.
6978 (srv_i386_linux_regobj): Likewise.
6979 (srv_amd64_regobj): Likewise.
6980 (srv_amd64_linux_regobj): Likewise.
6981 (srv_i386_32bit_xmlfiles): Likewise.
6982 (srv_i386_64bit_xmlfiles): Likewise.
6983 (srv_i386_xmlfiles): Likewise.
6984 (srv_amd64_xmlfiles): Likewise.
6985 (srv_i386_linux_xmlfiles): Likewise.
6986 (srv_amd64_linux_xmlfiles): Likewise.
6987 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
6988 srv_xmlfiles to $srv_i386_xmlfiles.
6989 (i[34567]86-*-mingw32ce*): Likewise.
6990 (i[34567]86-*-mingw*): Likewise.
6991 (i[34567]86-*-nto*): Likewise.
6992 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
6993 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
6994 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
6995 (x86_64-*-linux*): Likewise.
6996
6997 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
6998 (init_registers_amd64_linux): New.
6999 (x86_arch_setup): Replace init_registers_x86_64_linux with
7000 init_registers_amd64_linux.
7001
193f13e6
MK
70022010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
7003
7004 * configure.ac: Check for libdl. If it is not available link against
7005 static libthread_db.
7006 * configure: Regenerate.
7007
85d721b8
PA
70082010-02-22 Pedro Alves <pedro@codesourcery.com>
7009
7010 PR9605
7011
7012 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
7013 handing a read watchpoint.
7014 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
7015
6076632b
DE
70162010-02-12 Doug Evans <dje@google.com>
7017
7018 * linux-low.c (linux_supports_tracefork_flag): Document.
7019 (linux_look_up_symbols): Add comment.
7020
3327ccf7
L
70212010-02-03 H.J. Lu <hongjiu.lu@intel.com>
7022
7023 * regcache.c (supply_register): Clear regcache if buf is NULL.
7024
0718675c 70252010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 7026 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
7027
7028 * inferiors.c (find_inferior): Add function documentation.
7029 (unloaded_dll): Handle the case where the unloaded dll has not
7030 been previously registered in the dll list.
7031
177321bd
DJ
70322010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7033
7034 * linux-arm-low.c (thumb_breakpoint_len): Delete.
7035 (thumb2_breakpoint): New.
7036 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7037
2b009048
DJ
70382010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7039
7040 * linux-low.c (get_stop_pc): Check for SIGTRAP.
7041 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7042 breakpoints.
7043
3be029c7
PA
70442010-01-21 Pedro Alves <pedro@codesourcery.com>
7045
7046 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7047
18f5de3b
JK
70482010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7049
7050 * linux-s390-low.c (s390_collect_ptrace_register)
7051 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7052
3743bb4f
DE
70532010-01-21 Doug Evans <dje@google.com>
7054
14ce3065
DE
7055 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7056 (PTRACE_ARG4_TYPE): New macro.
7057 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7058 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
7059 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
7060 (usr_store_inferior_registers): Ditto.
7061 (linux_read_memory, linux_write_memory): Ditto.
7062 (linux_test_for_tracefork): Ditto.
7063
3743bb4f
DE
7064 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
7065 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
7066
8b315be5
PA
70672010-01-21 Pedro Alves <pedro@codesourcery.com>
7068
7069 * proc-service.c (ps_lgetregs): Don't refetch registers from the
7070 target.
7071
85492558
PA
70722010-01-21 Pedro Alves <pedro@codesourcery.com>
7073
7074 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
7075 prototype to take a regcache. Adjust.
7076
442ea881
PA
70772010-01-20 Pedro Alves <pedro@codesourcery.com>
7078
7079 * regcache.h (struct thread_info): Forward declare.
7080 (struct regcache): New.
7081 (new_register_cache): Adjust prototype.
7082 (get_thread_regcache): Declare.
7083 (free_register_cache): Adjust prototype.
7084 (registers_to_string, registers_from_string): Ditto.
7085 (supply_register, supply_register_by_name, collect_register)
7086 (collect_register_as_string, collect_register_by_name): Ditto.
7087 * regcache.c (struct inferior_regcache_data): Delete.
7088 (get_regcache): Rename to ...
7089 (get_thread_regcache): ... this. Adjust. Switch inferior before
7090 fetching registers.
7091 (regcache_invalidate_one): Adjust.
7092 (regcache_invalidate): Fix prototype.
7093 (new_register_cache): Return the new register cache.
7094 (free_register_cache): Change prototype.
7095 (realloc_register_cache): Adjust.
7096 (registers_to_string): Change prototype to take a regcache. Adjust.
7097 (registers_from_string): Ditto.
7098 (register_data): Ditto.
7099 (supply_register): Ditto.
7100 (supply_register_by_name): Ditto.
7101 (collect_register): Ditto.
7102 (collect_register_as_string): Ditto.
7103 (collect_register_by_name): Ditto.
7104 * server.c (process_serial_event): Adjust.
7105 * linux-low.h (regset_fill_func, regset_store_func): Change
7106 prototype.
7107 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
7108 Change prototype.
7109 * linux-low.c (get_stop_pc): Adjust.
7110 (check_removed_breakpoint): Adjust.
7111 (linux_wait_for_event): Adjust.
7112 (linux_resume_one_lwp): Adjust.
7113 (fetch_register): Add regcache parameter. Adjust.
7114 (usr_store_inferior_registers): Ditto.
7115 (regsets_fetch_inferior_registers): Ditto.
7116 (regsets_store_inferior_registers): Ditto.
7117 (linux_fetch_registers, linux_store_registers): Ditto.
7118 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
7119 regcache. Adjust.
43aaf8b6
PA
7120 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
7121 Ditto.
442ea881
PA
7122 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
7123 prototype to take a regcache.
7124 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
7125 * remote-utils.c (convert_ascii_to_int, outreg)
7126 (prepare_resume_reply): Change prototype to take a regcache.
7127 Adjust.
7128 * target.h (struct target_ops) <fetch_registers, store_registers>:
7129 Change prototype to take a regcache.
7130 (fetch_inferior_registers, store_inferior_registers): Change
7131 prototype to take a regcache. Adjust.
7132 * proc-service.c (ps_lgetregs): Adjust.
7133 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
7134 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
7135 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
7136 take a regcache. Adjust.
7137 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
7138 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
7139 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
7140 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
7141 * linux-cris-low.c (cris_get_pc, cris_set_pc)
7142 (cris_cannot_fetch_register):
7143 (cris_breakpoint_at): Change prototype to take a regcache.
7144 Adjust.
7145 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
7146 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
7147 to take a regcache. Adjust.
7148 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
7149 Adjust.
7150 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
7151 take a regcache. Adjust.
7152 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
7153 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
7154 (m68k_set_pc): Change prototype to take a regcache. Adjust.
7155 * linux-mips-low.c (mips_get_pc):
7156 (mips_set_pc): Change prototype to take a regcache. Adjust.
7157 (mips_reinsert_addr): Adjust.
7158 (mips_collect_register): Change prototype to take a regcache.
7159 Adjust.
7160 (mips_supply_register):
7161 (mips_collect_register_32bit, mips_supply_register_32bit)
7162 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7163 (mips_store_fpregset): Ditto.
43aaf8b6
PA
7164 * linux-ppc-low.c (ppc_supply_ptrace_register)
7165 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
7166 (parse_spufs_run): Adjust.
7167 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
7168 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
7169 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
7170 take a regcache. Adjust.
7171 * linux-s390-low.c (s390_collect_ptrace_register)
7172 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
7173 (s390_set_pc): Change prototype to take a regcache. Adjust.
7174 (s390_arch_setup): Adjust.
7175 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
7176 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
7177 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7178 (sparc_fill_gregset, sparc_store_gregset_from_stack)
7179 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7180 regcache. Adjust.
7181 (sparc_breakpoint_at): Adjust.
7182 * linux-xtensa-low.c (xtensa_fill_gregset):
7183 (xtensa_store_gregset):
7184 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7185 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
7186 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
7187 prototype to take a regcache. Adjust.
7188 * win32-arm-low.c (arm_fetch_inferior_register)
7189 (arm_store_inferior_register): Change prototype to take a
7190 regcache. Adjust.
7191 * win32-i386-low.c (i386_fetch_inferior_register)
7192 (i386_store_inferior_register): Change prototype to take a
7193 regcache. Adjust.
7194 * win32-low.c (child_fetch_inferior_registers)
7195 (child_store_inferior_registers): Change prototype to take a
7196 regcache. Adjust.
7197 (win32_wait): Adjust.
7198 (win32_fetch_inferior_registers): Change prototype to take a
7199 regcache. Adjust.
7200 (win32_store_inferior_registers): Adjust.
7201 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7202 store_inferior_register>: Change prototype to take a regcache.
7203
60c3d7b0
DE
72042010-01-20 Doug Evans <dje@google.com>
7205
7206 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7207 #ifdef.
7208 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 7209 (W_STOPCODE): Provide definition if missing.
60c3d7b0 7210
dc146f7c
VP
72112010-01-13 Vladimir Prus <vladimir@codesourcery.com>
7212
7213 * linux-low.c (linux_core_of_thread): New.
7214 (compare_ints, show_process, list_threads): New.
7215 (linux_qxfer_osdata): Report threads and cores.
7216 (linux_target_op): Register linux_core_of_thread.
7217 * remote-utils.c (prepare_resume_reply): Report the core.
7218 (buffer_xml_printf): Support %d specifier.
7219 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
7220 New.
7221 (handle_query): Handle qXfer:threads. Announce availability
7222 thereof.
7223 * target.h (struct target_ops): New field core_of_thread.
7224
7803799a
UW
72252010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
7226
7227 * Makefile.in (clean): Remove new generated files.
7228 (reg-s390.o, reg-s390.c): Remove rules.
7229 (reg-s390x.o, reg-s390x.c): Likewise.
7230 (s390-linux32.o, s390-linux32.c): Add rules.
7231 (s390-linux64.o, s390-linux64.c): Likewise.
7232 (s390x-linux64.o, s390x-linux64.c): Likewise.
7233 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7234 * linux-s390-low.c: Include <elf.h>.
7235 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7236 (init_registers_s390): Remove prototype.
7237 (init_registers_s390x): Likewise.
7238 (init_registers_s390_linux32): Add prototype.
7239 (init_registers_s390_linux64): Likewise.
7240 (init_registers_s390x_linux64): Likewise.
7241 (s390_num_regs_3264): New define.
7242 (s390_regmap_3264): New global variable.
7243 (s390_cannot_fetch_register): Remove obsolete check.
7244 (s390_cannot_store_register): Likewise.
7245 (s390_collect_ptrace_register): Handle upper/lower register halves.
7246 (s390_supply_ptrace_register): Likewise.
7247 (s390_fill_gregset): Update to register number changes.
7248 (s390_get_hwcap): New routine.
7249 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7250 Install appropriate regmap and register set.
7251
6e7ffa39
JB
72522010-01-01 Joel Brobecker <brobecker@adacore.com>
7253
7254 * server.c (gdbserver_version): Update copyright year to 2010.
7255 * gdbreplay.c (gdbreplay_version): Likewise.
7256
957f3f49
DE
72572009-12-28 Doug Evans <dje@google.com>
7258
7259 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7260 elf/external.h. Include <elf.h> instead but only if necessary.
7261
ca5c370d
PA
72622009-12-28 Pedro Alves <pedro@codesourcery.com>
7263
7264 * linux-low.c (linux_remove_process): Remove `detaching'
7265 parameter. Don't release/detach from thread_db here.
7266 (linux_kill): Release/detach from thread_db here, ...
7267 (linux_detach): ... and here, before actually detaching.
7268 (linux_wait_1): ... and here, when a process exits.
7269 * thread-db.c (any_thread_of): New.
7270 (thread_db_free): Switch the current inferior to a thread of the
7271 passed in process.
7272
4ee62156
DE
72732009-12-21 Doug Evans <dje@google.com>
7274
d90e6a88
DE
7275 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7276
c5f62d5f
DE
7277 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7278 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7279 warning ifndef __NR_tkill. Move setting of errno there too.
7280 Delete unnecessary resetting of errno after syscall.
7281 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7282
10e86dd7
DE
7283 * configure.ac: Check for dladdr.
7284 * config.in: Regenerate.
7285 * configure: Regenerate.
7286 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7287 (try_thread_db_load): Update.
7288
4ee62156
DE
7289 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7290
00f515da
DE
72912009-12-18 Doug Evans <dje@google.com>
7292
e9464885
DE
7293 * event-loop.c: Include unistd.h if it exists.
7294
07d4f67e
DE
7295 * linux-low.c (my_waitpid): Move definition away from being in
7296 between linux_tracefork_child/linux_test_for_tracefork.
7297
00f515da
DE
7298 * gdb_proc_service.h (psaddr_t): Fix type.
7299 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7300 signature to match glibc.
7301
1de1badb
DE
73022009-12-16 Doug Evans <dje@google.com>
7303
7304 * linux-low.c (linux_read_memory): Fix argument to read.
7305
aeeb81d1
PA
73062009-11-26 Pedro Alves <pedro@codesourcery.com>
7307
7308 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
7309 events, don't leave current_inferior pointing at null.
7310
10357975
PA
73112009-11-26 Pedro Alves <pedro@codesourcery.com>
7312
7313 * win32-low.c (LOG): Delete.
7314 (OUTMSG): Output to stderr.
7315 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
7316 on compile time LOG macro.
7317 (win32_wait): Fix debug output.
7318
cf6e3471
PA
73192009-11-26 Pedro Alves <pedro@codesourcery.com>
7320
7321 * win32-low.c (win32_add_one_solib): If the dll name is
7322 "ntdll.dll", prepend the system directory to the dll path.
7323
0c85e18e
MK
73242009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
7325
7326 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
7327
9ac544ce 73282009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 7329 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
7330
7331 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
7332 * configure.ac: Check for __mcoldfire__ and set
7333 gdb_cv_m68k_is_coldfire.
7334 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
7335 reg-cf.o and reg-m68k.o.
7336 * configure: Regenerated.
7337
fd7dd3e6
PA
73382009-11-16 Pedro Alves <pedro@codesourcery.com>
7339
7340 * linux-low.c (linux_remove_process): Add `detaching' parameter.
7341 Pass it to thread_db_free.
7342 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
7343 proper `detaching' argument to linux_remove_process.
7344 * linux-low.h (thread_db_free): Add `detaching' parameter.
7345 * thread-db.c (thread_db_init): Pass false as `detaching' argument
7346 to thread_db_free.
7347 (thread_db_free): Add `detaching' parameter. Only
7348 call td_ta_clear_event if detaching from process.
7349
75aa492e
MK
73502009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
7351
7352 * thread-db.c (thread_db_free): Fix typo.
7353
21e1bee4
PP
73542009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
7355
7356 PR gdb/10838
7357 * thread-db.c (thread_db_free): Call td_ta_clear_event.
7358
8838b45e
NS
73592009-11-03 Nathan Sidwell <nathan@codesourcery.com>
7360
7361 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
7362 with an i686 compiler.
7363 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
7364 needed.
7365 * configure: Rebuilt.
7366
8a35fb51
SL
73672009-10-29 Sandra Loosemore <sandra@codesourcery.com>
7368
7369 PR gdb/10783
7370
7371 * server.c (handle_search_memory_1): Correct read_addr initialization
7372 in loop for searching subsequent chunks.
7373
96f15937
PP
73742009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
7375
7376 * configure.ac: New --with-libthread-db option.
7377 * thread-db.c: Allow direct dependence on libthread_db.
7378 (thread_db_free): Adjust.
7379 * config.in: Regenerate.
7380 * configure: Likewise.
889bf7c5 7381
5f7d1694
PP
73822009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
7383
7384 PR gdb/10757
7385 * thread-db.c (attach_thread): New function.
7386 (maybe_attach_thread): Return success/failure.
7387 (find_new_threads_callback): Adjust.
889bf7c5
PA
7388 (thread_db_find_new_threads): Loop until no new threads.
7389
88e3b899
PA
73902009-10-13 Pedro Alves <pedro@codesourcery.com>
7391
7392 * proc-service.c (ps_lgetregs): Formatting.
7393
cdbfd419
PP
73942009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
7395
7396 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
7397 * configure.ac: Adjust.
7398 * linux-low.h (struct process_info_private): Move members to struct
7399 thread_db.
7400 (thread_db_free, thread_db_handle_monitor_command): New prototype.
7401 * linux-low.c (linux_remove_process): Adjust.
7402 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
7403 * server.c (handle_query): Move code ...
7404 (handle_monitor_command): ... here. New function.
7405 * target.h (struct target_ops): New member.
7406 * thread-db.c (struct thread_db): New.
7407 (libthread_db_search_path): New variable.
7408 (thread_db_create_event, thread_db_enable_reporting)
7409 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
7410 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
7411 (try_thread_db_load_1, dladdr_to_soname): New functions.
7412 (try_thread_db_load, thread_db_load_search): New functions.
7413 (thread_db_init): Search for libthread_db.
7414 (thread_db_free): New function.
7415 (thread_db_handle_monitor_command): Likewise.
7416 * config.in: Regenerate.
7417 * configure: Regenerate.
889bf7c5 7418
4168d2d6
UW
74192009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
7420
7421 * spu-low.c (spu_kill): Wait for inferior to terminate.
7422 Call clear_inferiors.
7423 (spu_detach): Call clear_inferiors.
7424
81ecdfbb
RW
74252009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7426
7427 * aclocal.m4: Regenerate.
7428 * config.in: Likewise.
7429 * configure: Likewise.
7430
0b9ff2c0
UW
74312009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7432
7433 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
7434 (parse_spufs_run): New function.
7435 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
7436 (ppc_breakpoint_at): Handle SPU breakpoints.
7437
efcbbd14
UW
74382009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7439
7440 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
7441 (SPUFS_MAGIC): Define.
7442 (spu_enumerate_spu_ids): New function.
7443 (linux_qxfer_spu): New function.
7444 (linux_target_ops): Install linux_qxfer_spu.
7445
f4d9bade
UW
74462009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7447
7448 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
7449 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
7450 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
7451 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
7452 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
7453 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
7454 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
7455 (init_registers_powerpc_cell32l): Add prototype.
7456 (init_registers_powerpc_cell64l): Likewise.
7457 (ppc_arch_setup): Detect Cell/B.E. architecture.
7458
96e946ca
RW
74592009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7460
7461 * Makefile.in (datarootdir): New variable.
7462
58d6951d
DJ
74632009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7464
7465 * linux-low.c (linux_write_memory): Update debugging output.
7466 * Makefile.in (clean): Add new descriptions.
7467 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
7468 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
7469 * configure.srv: Add new files for arm*-*-linux*.
7470 * linux-arm-low.c: Add new declarations.
7471 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
7472 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
7473 (HWCAP_VFPv3D16): New.
7474 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
7475 instead of __IWMMXT__.
7476 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
7477 (arm_arch_setup): New.
7478 (target_regsets): Remove #ifdef. Add VFP regset.
7479 (the_low_target): Use arm_arch_setup.
7480
12b42a12
DJ
74812009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7482
7483 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
7484 the main thread again.
7485
ac8c974e
AR
74862009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
7487
7488 Adding Neutrino gdbserver.
7489 * configure: Regenerated.
7490 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
7491 * configure.srv (i[34567]86-*-nto*): New target.
7492 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
7493 * remote-utils.c [__QNX__]: Include sys/iomgr.h
7494 (nto_comctrl) [__QNX__]: New function.
7495 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
7496
4424e0c3 74972009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
7498
7499 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
7500 srv_tgtobj.
7501
912cf4ba
PA
75022009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
7503 Pedro Alves <pedro@codesourcery.com>
7504
7505 * win32-i386-low.c (i386_get_thread_context): Handle systems that
7506 don't support CONTEXT_EXTENDED_REGISTERS.
7507 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
7508 (the_low_target): Install them.
7509 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
7510 failing with ERROR_PIPE_NOT_CONNECTED.
7511
aa5ca48f
DE
75122009-06-30 Doug Evans <dje@google.com>
7513 Pierre Muller <muller@ics.u-strasbg.fr>
7514
7515 Add h/w watchpoint support to x86-linux, win32-i386.
7516 * Makefile.in (SFILES): Add i386-low.c
7517 (i386_low_h): Define.
7518 (i386-low.o): Add dependencies.
7519 (linux-x86-low.o): Add i386-low.h dependency.
7520 (win32-i386-low.o): Ditto.
7521 * i386-low.c: New file.
7522 * i386-low.h: New file.
7523 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
7524 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
7525 * linux-low.c (linux_add_process): Initialize arch_private.
7526 (linux_remove_process): Free arch_private.
7527 (add_lwp): Initialize arch_private.
7528 (delete_lwp): Free arch_private.
7529 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
7530 provided.
7531 * linux-low.h (process_info_private): New member arch_private.
7532 (lwp_info): New member arch_private.
7533 (linux_target_ops): New members new_process, new_thread,
7534 prepare_to_resume.
7535 (ptid_of): New macro.
7536 * linux-x86-low.c: Include stddef.h, i386-low.h.
7537 (arch_process_info): New struct.
7538 (arch_lwp_info): New struct.
7539 (x86_linux_dr_get, x86_linux_dr_set): New functions.
7540 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7541 (i386_dr_low_get_status): New function.
7542 (x86_insert_point, x86_remove_point): New functions.
7543 (x86_stopped_by_watchpoint): New function.
7544 (x86_stopped_data_address): New function.
7545 (x86_linux_new_process, x86_linux_new_thread): New functions.
7546 (x86_linux_prepare_to_resume): New function.
7547 (the_low_target): Add entries for insert_point, remove_point,
7548 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
7549 prepare_to_resume.
7550 * server.c (debug_hw_points): New global.
7551 (monitor_show_help): Document set debug-hw-points.
7552 (handle_query): Process "set debug-hw-points".
7553 * server.h (debug_hw_points): Declare.
7554 (paddress): Declare.
7555 * utils.c (NUMCELLS, CELLSIZE): New macros.
7556 (get_sell, xsnprintf, paddress): New functions.
7557 * win32-arm-low.c (the_low_target): Add entries for insert_point,
7558 remove_point, stopped_by_watchpoint, stopped_data_address.
7559 * win32-i386-low.c: Include i386-low.h.
7560 (debug_reg_state): Replaces dr.
7561 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7562 (i386_dr_low_get_status): New function.
7563 (i386_insert_point, i386_remove_point): New functions.
7564 (i386_stopped_by_watchpoint): New function.
7565 (i386_stopped_data_address): New function.
7566 (i386_initial_stuff): Update.
7567 (get_thread_context,set_thread_context,i386_thread_added): Update.
7568 (the_low_target): Add entries for insert_point,
7569 remove_point, stopped_by_watchpoint, stopped_data_address.
7570 * win32-low.c (win32_insert_watchpoint): New function.
7571 (win32_remove_watchpoint): New function.
7572 (win32_stopped_by_watchpoint): New function.
7573 (win32_stopped_data_address): New function.
7574 (win32_target_ops): Add entries for insert_watchpoint,
7575 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
7576 * win32-low.h (win32_target_ops): New members insert_point,
7577 remove_point, stopped_by_watchpoint, stopped_data_address.
7578
d993e290
PA
75792009-06-25 Pedro Alves <pedro@codesourcery.com>
7580
7581 * server.c (process_serial_event): Re-return unsupported, not
7582 error, if the type isn't recognized. Re-allow supporting only
7583 insert or remove packets. Also call require_running for
7584 breakpoints. Add missing break statement to default case. Tidy.
7585 * target.h (struct target_ops): Rename insert_watchpoint to
7586 insert_point, and remove_watchpoint to remove_point.
7587
7588 * linux-low.h (struct linux_target_ops): Likewise.
7589 * linux-low.c (linux_insert_watchpoint): Rename to ...
7590 (linux_insert_point): ... this. Adjust.
7591 (linux_remove_watchpoint): Rename to ...
7592 (linux_remove_point): ... this. Adjust.
7593 (linux_target_ops): Adjust.
7594 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
7595 (cris_insert_point): ... this.
7596 (cris_remove_watchpoint): Rename to ...
7597 (cris_remove_point): ... this.
7598 (the_low_target): Adjust.
7599
0f54c268
PM
76002009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
7601
7602 * server.c (handle_v_kill): Pass signal_pid to
7603 kill_inferior if multi_process is zero.
7604
c6314022
AR
76052009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
7606
7607 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
7608 * target.h (target_ops): Comment for *_watchpoint to make it clear
7609 the functions can get types '0' and '1'.
7610
4463ce24
AR
76112009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
7612
7613 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
7614 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
7615 * regcache.c (get_regcache): Likewise.
7616 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
7617 * win32-low.c (child_fetch_inferior_registers): Remove check for
7618 regno 0.
7619
cf8fd78b
PA
76202009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
7621 Pedro Alves <pedro@codesourcery.com>
7622
7623 * target.h (struct target_ops) <supports_multi_process>: New
7624 callback.
7625 (target_supports_multi_process): New.
7626 * server.c (handle_query): Even if GDB reports support, only
7627 enable multi-process if the target also supports it. Report
7628 multi-process support only if the target backend supports it.
7629 * linux-low.c (linux_supports_multi_process): New function.
7630 (linux_target_ops): Install it as target_supports_multi_process
7631 callback.
7632
47c0c975
DE
76332009-05-24 Doug Evans <dje@google.com>
7634
e09875d4
DE
7635 Global renaming of find_thread_pid to find_thread_ptid.
7636 * server.h (find_thread_ptid): Renamed from find_thread_pid.
7637 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
7638 All callers updated.
7639
e27d73f6
DE
7640 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
7641 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
7642 directly.
7643
47c0c975
DE
7644 * linux-low.c (get_stop_pc): Print pc if debug_threads.
7645 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
7646 (linux_resume_one_lwp): Ditto.
7647
2acc282a
DE
76482009-05-23 Doug Evans <dje@google.com>
7649
7650 * linux-low.c (linux_resume_one_lwp): Change type of first arg
7651 from struct inferior_list_entry * to struct lwp_info *.
7652 All callers updated.
7653
9f1036c1
DE
76542009-05-13 Doug Evans <dje@google.com>
7655
7656 * linux-x86-low.c: Don't include assert.h.
7657 (x86_siginfo_fixup): Use fatal, not assert.
7658 (x86_arch_setup): Fix comment.
7659
d0722149
DE
76602009-05-12 Doug Evans <dje@google.com>
7661
7662 Biarch support for i386/amd64 gdbserver.
7663 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
7664 Add linux-x86-low.c.
7665 (linux-i386-low.o, linux-x86-64-low.o): Delete.
7666 (linux-x86-low.o): Add.
7667 * linux-x86-64-low.c: Delete.
7668 * linux-i386-low.c: Delete.
7669 * linux-x86-low.c: New file.
7670 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
7671 linux-x86-low.o.
7672 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
7673 linux-x86-low.o.
7674 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
7675 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
7676 (linux_child_pid_to_exec_file): New function.
7677 (elf_64_header_p, elf_64_file_p): New functions.
7678 (siginfo_fixup): New function.
7679 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
7680 give target a chance to convert layout.
7681 * linux-low.h (linux_target_ops): New member siginfo_fixup.
7682 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
7683
fdeb2a12
DE
76842009-05-07 Doug Evans <dje@google.com>
7685
7686 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
7687 (regsets_store_inferior_registers): Ditto.
7688
a6dbe5df
PA
76892009-05-06 Pedro Alves <pedro@codesourcery.com>
7690
7691 PR server/10048
7692
7693 * linux-low.c (must_set_ptrace_flags): Delete.
7694 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
7695 of the global.
7696 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
7697 `lwp->must_set_ptrace_flags' instead.
ba42693b 7698 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
7699 (linux_wait_1): ... not here.
7700
5091eb23
DE
77012009-04-30 Doug Evans <dje@google.com>
7702
9f767825
DE
7703 * inferiors.c (started_inferior_callback): New function.
7704 (attached_inferior_callback): New function.
7705 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
7706 * server.c (print_started_pid, print_attached_pid): New functions.
7707 (detach_or_kill_for_exit): New function.
7708 (main): Call it instead of for_each_inferior (kill_inferior_callback).
7709 * server.h (have_started_inferiors_p): Declare.
7710 (have_attached_inferiors_p): Declare.
7711
5091eb23
DE
7712 * inferiors.c (remove_process): Fix memory leak, free process.
7713 * linux-low.c (linux_remove_process): New function.
7714 (linux_kill): Call it instead of remove_process.
7715 (linux_detach, linux_wait_1): Ditto.
7716
155c8968
PA
77172009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
7718
7719 * configure.srv: Add x86 Windows CE target.
7720
7fe519cb
UW
77212009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7722
7723 * inferiors.c (get_thread_process): Make global.
7724 * server.h (get_thread_process): Add prototype.
7725 * thread-db.c (find_one_thread): Use get_thread_process
7726 instead of current_process.
7727 (thread_db_get_tls_address): Do not crash if called when
7728 thread layer is not yet initialized.
7729
5472f405
UW
77302009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7731
7732 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
7733 * spu-low.c (current_tid): Rename to ...
7734 (current_ptid): ... this.
7735 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
7736 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
7737 ptid_get_lwp (current_ptid) instead of current_tid.
7738 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
7739 instead of current_tid. Use find_process_pid to verify pid
7740 argument is valid. Pass proper argument to remove_process.
7741 (spu_thread_alive): Compare current_ptid instead of current_tid.
7742 (spu_resume): Likewise.
7743
55ac2b99
PA
77442009-04-02 Pedro Alves <pedro@codesourcery.com>
7745
7746 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
7747 variable.
7748
95954743
PA
77492009-04-01 Pedro Alves <pedro@codesourcery.com>
7750
7751 Implement the multiprocess extensions, and add linux multiprocess
7752 support.
7753
7754 * server.h (ULONGEST): Declare.
7755 (struct ptid, ptid_t): New.
7756 (minus_one_ptid, null_ptid): Declare.
7757 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7758 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
7759 (struct inferior_list_entry): Change `id' type from unsigned from
7760 to ptid_t.
7761 (struct sym_cache, struct breakpoint, struct
7762 process_info_private): Forward declare.
7763 (struct process_info): Declare.
7764 (current_process): Declare.
7765 (all_processes): Declare.
7766 (initialize_inferiors): Declare.
7767 (add_thread): Adjust to use ptid_t.
7768 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
7769 (add_process, remove_process, find_thread_pid): Declare.
7770 (find_inferior_id): Adjust to use ptid_t.
7771 (cont_thread, general_thread, step_thread): Change type to ptid_t.
7772 (multi_process): Declare.
7773 (push_event): Adjust to use ptid_t.
7774 (read_ptid, write_ptid): Declare.
7775 (prepare_resume_reply): Adjust to use ptid_t.
7776 (clear_symbol_cache): Declare.
7777 * inferiors.c (all_processes): New.
7778 (null_ptid, minus_one_ptid): New.
7779 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7780 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
7781 (add_thread): Change unsigned long to ptid. Remove gdb_id
7782 parameter. Adjust.
7783 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
7784 (gdb_id_to_thread): Rename to ...
7785 (find_thread_pid): ... this. Change unsigned long to ptid.
7786 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
7787 (loaded_dll, pull_pid_from_list): Adjust.
7788 (add_process, remove_process, find_process_pid)
7789 (get_thread_process, current_process, initialize_inferiors): New.
7790 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
7791 (struct target_waitstatus) <related_pid>: Ditto.
7792 (struct target_ops) <kill, detach>: Add `pid' argument. Change
7793 return type to int.
7794 (struct target_ops) <join>: Add `pid' argument.
7795 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
7796 (struct target_ops) <wait>: Add `ptid' field. Change return type
7797 to ptid.
7798 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
7799 (mywait): Add `ptid' argument. Change return type to ptid_t.
7800 (target_pid_to_str): Declare.
7801 * target.c (set_desired_inferior): Adjust to use ptids.
7802 (mywait): Add new `ptid' argument. Adjust.
7803 (target_pid_to_str): New.
7804 * mem-break.h (free_all_breakpoints): Declare.
7805 * mem-break.c (breakpoints): Delelete.
7806 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
7807 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
7808 to use per-process breakpoint list.
7809 (free_all_breakpoints): New.
7810 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
7811 (symbol_cache, all_symbols_looked_up): Delete.
7812 (hexchars): New.
7813 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
7814 read_ptid): New.
7815 (prepare_resume_reply): Change ptid argument's type from unsigned
7816 long to ptid_t. Adjust. Implement W;process and X;process.
7817 (free_sym_cache, clear_symbol_cache): New.
7818 (look_up_one_symbol): Adjust to per-process symbol cache. *
7819 * server.c (cont_thread, general_thread, step_thread): Change type
7820 to ptid_t.
7821 (attached): Delete.
7822 (multi_process): New.
7823 (last_ptid): Change type to ptid_t.
7824 (struct vstop_notif) <ptid>: Change type to ptid_t.
7825 (queue_stop_reply, push_event): Change `ptid' argument's type to
7826 ptid_t.
7827 (discard_queued_stop_replies): Add `pid' argument.
7828 (start_inferior): Adjust to use ptids. Adjust to mywait interface
7829 changes. Don't reference the `attached' global.
7830 (attach_inferior): Adjust to mywait interface changes.
7831 (handle_query): Adjust to use ptids. Parse GDB's qSupported
7832 features. Handle and report "multiprocess+". Handle
7833 "qAttached:PID".
7834 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
7835 changes.
7836 (handle_v_kill): New.
7837 (handle_v_stopped): Adjust to use target_pid_to_str.
7838 (handle_v_requests): Allow multiple attaches and runs when
7839 multiprocess extensions are in effect. Handle "vKill".
7840 (myresume): Adjust to use ptids.
7841 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
7842 (handle_status): Adjust to discard_queued_stop_replies interface
7843 change.
7844 (first_thread_of, kill_inferior_callback)
7845 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
7846 (main): Call initialize_inferiors. Adjust to use ptids, killing
7847 and detaching from all inferiors. Handle multiprocess packet
7848 variants.
7849 * linux-low.h: Include gdb_proc_service.h.
7850 (struct process_info_private): New.
7851 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
7852 <lwpid_of>: Use ptid_get_lwp.
7853 (get_lwp_thread): Adjust.
7854 (struct lwp_info): Add `dead' member.
7855 (find_lwp_pid): Declare.
7856 * linux-low.c (thread_db_active): Delete.
7857 (new_inferior): Adjust comment.
7858 (inferior_pid): Delete.
7859 (linux_add_process): New.
7860 (handle_extended_wait): Adjust.
7861 (add_lwp): Change unsigned long to ptid.
7862 (linux_create_inferior): Add process to processes table. Adjust
7863 to use ptids. Don't set new_inferior here.
7864 (linux_attach_lwp): Rename to ...
7865 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
7866 it. Adjust to use ptids.
7867 (linux_attach_lwp): New.
7868 (linux_attach): Add process to processes table. Don't set
7869 new_inferior here.
7870 (struct counter): New.
7871 (second_thread_of_pid_p, last_thread_of_process_p): New.
7872 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
7873 multiple processes.
7874 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
7875 processes. Remove process from process table.
7876 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
7877 to multiple processes.
7878 (any_thread_of): New.
7879 (linux_detach): Add `pid' argument, and handle it. Remove process
7880 from processes table.
7881 (linux_join): Add `pid' argument. Handle it.
7882 (linux_thread_alive): Change unsighed long argument to ptid_t.
7883 Consider dead lwps as not being alive.
7884 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
7885 threads we're not interested in.
7886 (same_lwp, find_lwp_pid): New.
7887 (linux_wait_for_lwp): Change `pid' argument's type from int to
7888 ptid_t. Adjust.
7889 (linux_wait_for_event): Rename to ...
7890 (linux_wait_for_event_1): ... this. Change `pid' argument's type
7891 from int to ptid_t. Adjust.
7892 (linux_wait_for_event): New.
7893 (linux_wait_1): Add `ptid' argument. Change return type to
7894 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
7895 that exit from the process table.
7896 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
7897 Adjust.
7898 (mark_lwp_dead): New.
7899 (wait_for_sigstop): Adjust to use ptids. If a process exits while
7900 stopping all threads, mark its main lwp as dead.
7901 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
7902 ptids.
7903 (fetch_register, usr_store_inferior_registers)
7904 (regsets_fetch_inferior_registers)
7905 (regsets_store_inferior_registers, linux_read_memory)
7906 (linux_write_memory): Inline `inferior_pid'.
7907 (linux_look_up_symbols): Adjust to use per-process
7908 `thread_db_active'.
7909 (linux_request_interrupt): Adjust to use ptids.
7910 (linux_read_auxv): Inline `inferior_pid'.
7911 (initialize_low): Don't reference thread_db_active.
7912 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
7913 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
7914 (ps_getpid): Return the pid of the current inferior.
7915 * thread-db.c (proc_handle, thread_agent): Delete.
7916 (thread_db_create_event, thread_db_enable_reporting): Adjust to
7917 per-process data.
7918 (find_one_thread): Change argument type to ptid_t. Adjust to
7919 per-process data.
7920 (maybe_attach_thread): Adjust to per-process data and ptids.
7921 (thread_db_find_new_threads): Ditto.
7922 (thread_db_init): Ditto.
7923 * spu-low.c (spu_create_inferior, spu_attach): Add process to
7924 processes table. Adjust to use ptids.
7925 (spu_kill, spu_detach): Adjust interface. Remove process from
7926 processes table.
7927 (spu_join, spu_thread_alive): Adjust interface.
7928 (spu_wait): Adjust interface. Remove process from processes
7929 table. Adjust to use ptids.
7930 * win32-low.c (current_inferior_tid): Delete.
7931 (current_inferior_ptid): New.
7932 (debug_event_ptid): New.
7933 (thread_rec): Take a ptid. Adjust.
7934 (child_add_thread): Add `pid' argument. Adjust to use ptids.
7935 (child_delete_thread): Ditto.
7936 (do_initial_child_stuff): Add `attached' argument. Add process to
7937 processes table.
7938 (child_fetch_inferior_registers, child_store_inferior_registers):
7939 Adjust.
7940 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
7941 (win32_attach): Pass 1 to do_initial_child_stuff.
7942 (win32_kill): Adjust interface. Remove process from processes
7943 table.
7944 (win32_detach): Ditto.
7945 (win32_join): Adjust interface.
7946 (win32_thread_alive): Take a ptid.
7947 (win32_resume): Adjust to use ptids.
7948 (get_child_debug_event): Ditto.
7949 (win32_wait): Adjust interface. Remove exiting process from
7950 processes table.
7951
bd99dc85
PA
79522009-04-01 Pedro Alves <pedro@codesourcery.com>
7953
7954 Non-stop mode support.
7955
7956 * server.h (non_stop): Declare.
7957 (gdb_client_data, handler_func): Declare.
7958 (delete_file_handler, add_file_handler, start_event_loop):
7959 Declare.
7960 (handle_serial_event, handle_target_event, push_event)
7961 (putpkt_notif): Declare.
7962 * target.h (enum resume_kind): New.
7963 (struct thread_resume): Replace `step' field by `kind' field.
7964 (TARGET_WNOHANG): Define.
7965 (struct target_ops) <wait>: Add `options' argument.
7966 <supports_non_stop, async, start_non_stop>: New fields.
7967 (target_supports_non_stop, target_async): New.
7968 (start_non_stop): Declare.
7969 (mywait): Add `options' argument.
7970 * target.c (mywait): Add `options' argument. Print child exit
7971 notifications here.
7972 (start_non_stop): New.
7973 * server.c (non_stop, own_buf, mem_buf): New globals.
7974 (struct vstop_notif): New.
7975 (notif_queue): New global.
7976 (queue_stop_reply, push_event, discard_queued_stop_replies)
7977 (send_next_stop_reply): New.
7978 (start_inferior): Adjust to use resume_kind. Adjust to mywait
7979 interface changes.
7980 (attach_inferior): In non-stop mode, don't wait for the target
7981 here.
7982 (handle_general_set): Handle QNonStop.
7983 (handle_query): When handling qC, return the current general
7984 thread, instead of the first thread of the list.
7985 (handle_query): If the backend supports non-stop mode, include
7986 QNonStop+ in the qSupported query response.
7987 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
7988 and non-stop mode.
7989 (handle_v_attach, handle_v_run): Handle non-stop mode.
7990 (handle_v_stopped): New.
7991 (handle_v_requests): Report support for vCont;t. Handle vStopped.
7992 (myresume): Adjust to use resume_kind. Handle non-stop.
7993 (queue_stop_reply_callback): New.
7994 (handle_status): Handle non-stop mode.
7995 (main): Clear non_stop flag on reconnection. Use the event-loop.
7996 Refactor serial protocol handling from here ...
7997 (process_serial_event): ... to this new function. When GDB
7998 selects any thread, select one here. In non-stop mode, wait until
7999 GDB acks all pending events before exiting.
8000 (handle_serial_event, handle_target_event): New.
8001 * remote-utils.c (remote_open): Install remote_desc in the event
8002 loop.
8003 (remote_close): Remove remote_desc from the event loop.
8004 (putpkt_binary): Rename to...
8005 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8006 (putpkt_binary): New as wrapper around putpkt_binary_1.
8007 (putpkt_notif): New.
8008 (prepare_resume_reply): In non-stop mode, don't change the
8009 general_thread.
8010 * event-loop.c: New.
8011 * Makefile.in (OBJ): Add event-loop.o.
8012 (event-loop.o): New rule.
8013
8014 * linux-low.h (pid_of): Moved here.
8015 (lwpid_of): New.
8016 (get_lwp_thread): Use lwpid_of.
8017 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
8018 * linux-low.c (pid_of): Delete.
8019 (inferior_pid): Use lwpid_of.
8020 (linux_event_pipe): New.
8021 (target_is_async_p): New.
8022 (delete_lwp): New.
8023 (handle_extended_wait): Use lwpid_of.
8024 (add_lwp): Don't set lwpid field.
8025 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
8026 (linux_kill_one_lwp): If killing a running lwp, stop it first.
8027 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
8028 (linux_detach_one_lwp): If detaching from a running lwp, stop it
8029 first. Adjust to linux_wait_for_event interface changes. Use
8030 lwpid_of.
8031 (linux_detach): Don't delete the main lwp here.
8032 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
8033 (status_pending_p): Don't consider explicitly suspended lwps.
8034 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8035 pointer. Add OPTIONS argument. Change return type to int. Use
8036 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
8037 (linux_wait_for_event): Take an integer pid instead of a lwp_info
8038 pointer. Add status pointer argument. Return a pid instead of a
8039 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
8040 changes. In non-stop mode, don't switch to a random thread.
8041 (linux_wait): Rename to...
8042 (linux_wait_1): ... this. Add target_options argument, and handle
8043 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
8044 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
8045 clean exit and signal exit code. Don't stop all threads in
8046 non-stop mode. In all-stop mode, only stop all threads when
8047 reporting a stop to GDB. Handle explicit thread stop requests.
8048 (async_file_flush, async_file_mark): New.
8049 (linux_wait): New.
8050 (send_sigstop): Use lwpid_of.
8051 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
8052 interface changes. In non-stop mode, don't switch to a random
8053 thread.
8054 (linux_resume_one_lwp): Use lwpid_of.
8055 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8056 (linux_resume_one_thread): ... this. Handle resume_stop. In
8057 non-stop mode, don't look for pending flag in all threads.
8058 (resume_status_pending_p): Don't consider explicitly suspended
8059 threads.
8060 (my_waitpid): Reimplement. Emulate __WALL.
8061 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8062 Use lwpid_of.
8063 (sigchld_handler, linux_supports_non_stop, linux_async)
8064 (linux_start_non_stop): New.
8065 (linux_target_ops): Register linux_supports_non_stop, linux_async
8066 and linux_start_non_stop.
8067 (initialize_low): Install SIGCHLD handler.
8068 * thread-db.c (thread_db_create_event, find_one_thread)
8069 (thread_db_get_tls_address): Use lwpid_of.
8070 * win32-low.c (win32_detach): Adjust to use resume_kind.
8071 (win32_wait): Add `options' argument.
8072 * spu-low.c (spu_resume): Adjust to use resume_kind.
8073 (spu_wait): Add `options' argument.
8074
5b1c542e
PA
80752009-04-01 Pedro Alves <pedro@codesourcery.com>
8076
8077 Decouple target code from remote protocol.
8078
8079 * target.h (enum target_waitkind): New.
8080 (struct target_waitstatus): New.
8081 (struct target_ops) <wait>: Return an unsigned long. Take a
8082 target_waitstatus pointer instead of a char pointer.
8083 (mywait): Likewise.
8084 * target.c (mywait): Change prototype to return an unsigned long.
8085 Take a target_waitstatus pointer instead of a char pointer. Adjust.
8086 * server.h (thread_from_wait, old_thread_from_wait): Delete
8087 declarations.
8088 (prepare_resume_reply): Change prototype to take a
8089 target_waitstatus.
8090 * server.c (thread_from_wait, old_thread_from_wait): Delete.
8091 (last_status, last_ptid): New.
8092 (start_inferior): Remove "statusptr" argument. Adjust. Return a
8093 pid instead of a signal.
8094 (attach_inferior): Remove "status" and "signal" parameters.
8095 Adjust.
8096 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
8097 not as an address.
8098 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
8099 (handle_v_requests, myresume): Remove "status" and "signal"
8100 parameters. Adjust.
8101 (handle_status): New.
8102 (main): Delete local `status'. Adjust.
8103 * remote-utils.c: Include target.h.
8104 (prepare_resume_reply): Change prototype to take a
8105 target_waitstatus. Adjust.
8106
8107 * linux-low.c (linux_wait): Adjust to new target_ops->wait
8108 interface.
8109 * spu-low.c (spu_wait): Adjust.
8110 * win32-low.c (enum target_waitkind, struct target_waitstatus):
8111 Delete.
8112 (win32_wait): Adjust.
8113
2bd7c093
PA
81142009-04-01 Pedro Alves <pedro@codesourcery.com>
8115
8116 * target.h (struct thread_resume): Delete leave_stopped member.
8117 (struct target_ops): Add a `n' argument to the `resume' callback.
8118 * server.c (start_inferior): Adjust.
8119 (handle_v_cont, myresume): Adjust.
8120 * linux-low.c (check_removed_breakpoint): Adjust to resume
8121 interface change, and to removed leave_stopped field.
8122 (resume_ptr): Delete.
8123 (struct thread_resume_array): New.
8124 (linux_set_resume_request): Add new `arg' parameter. Adjust to
8125 resume interface change.
8126 (linux_continue_one_thread, linux_queue_one_thread)
8127 (resume_status_pending_p): Check if the resume field is NULL
8128 instead of checking the leave_stopped member.
8129 (linux_resume): Adjust to the target resume interface change.
8130 * spu-low.c (spu_resume): Adjust to the target resume interface
8131 change.
8132 * win32-low.c (win32_detach, win32_resume): Ditto.
8133
c35fafde
PA
81342009-04-01 Pedro Alves <pedro@codesourcery.com>
8135
8136 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
8137 flag.
8138 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
8139 pending.
8140 (linux_continue_one_thread): Only preserve the stepping flag if
8141 there's a pending breakpoint.
8142
0a59d50b
PA
81432009-03-31 Pedro Alves <pedro@codesourcery.com>
8144
8145 * server.c (main): After the inferior having exited, call
8146 remote_close before exiting gdbserver.
8147
f04c6d38
TJB
81482009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
8149
8150 Fix size of FPSCR in Power 7 processors.
8151 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
8152 (PPC_FEATURE_HAS_DFP): New #define.
8153 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
8154 size of the FPSCR.
8155
78e5cee6
PA
81562009-03-23 Pedro Alves <pedro@codesourcery.com>
8157
8158 * server.c (handle_query) Whitespace and formatting.
8159
1b3f6016
PA
81602009-03-22 Pedro Alves <pedro@codesourcery.com>
8161
8162 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
8163 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
8164 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
8165 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
8166 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
8167 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
8168 Makefile.in, configure.ac: Fix whitespace throughout.
8169 * configure: Regenerate.
8170
a07b2135
PA
81712009-03-22 Pedro Alves <pedro@codesourcery.com>
8172
8173 * inferiors.c (find_inferior): Make it safe for the callback
8174 function to delete the currently iterated inferior.
8175
67cc2626
PA
81762009-03-22 Pedro Alves <pedro@codesourcery.com>
8177
8178 * Makefile.in (linuw_low_h): Move higher.
8179 (thread-db.o): Depend on $(linux_low_h).
8180
54a0b537
PA
81812009-03-17 Pedro Alves <pedro@codesourcery.com>
8182
8183 Rename "process" to "lwp" throughout.
8184
8185 * linux-low.c (all_processes): Rename to...
8186 (all_lwps): ... this.
8187 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
8188 (add_process): Rename to ...
8189 (add_lwp): ... this. Adjust.
8190 (linux_create_inferior): Adjust.
8191 (linux_attach_lwp): Adjust.
8192 (linux_attach): Adjust.
8193 (linux_kill_one_process): Rename to ...
8194 (linux_kill_one_lwp): ... this. Adjust.
8195 (linux_kill): Adjust.
8196 (linux_detach_one_process): Rename to ...
8197 (linux_detach_one_lwp): ... this. Adjust.
8198 (linux_detach): Adjust.
8199 (check_removed_breakpoint): Adjust.
8200 (status_pending_p): Adjust.
8201 (linux_wait_for_process): Rename to ...
8202 (linux_wait_for_lwp): ... this. Adjust.
8203 (linux_wait_for_event): Adjust.
8204 (send_sigstop): Adjust.
8205 (wait_for_sigstop): Adjust.
8206 (stop_all_processes): Rename to ...
8207 (stop_all_lwps): ... this.
8208 (linux_resume_one_process): Rename to ...
8209 (linux_resume_one_lwp): ... this. Adjust.
8210 (linux_set_resume_request, linux_continue_one_thread)
8211 (linux_queue_one_thread, resume_status_pending_p)
8212 (usr_store_inferior_registers, regsets_store_inferior_registers)
8213 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8214 Adjust.
8215 * linux-low.h (get_process): Rename to ...
8216 (get_lwp): ... this. Adjust.
8217 (get_thread_process): Rename to ...
8218 (get_thread_lwp): ... this. Adjust.
8219 (get_process_thread): Rename to ...
8220 (get_lwp_thread): ... this. Adjust.
8221 (struct process_info): Rename to ...
8222 (struct lwp_info): ... this.
8223 (all_processes): Rename to ...
8224 (all_lwps): ... this.
8225 * proc-service.c (ps_lgetregs): Adjust.
8226 * thread-db.c (thread_db_create_event, find_one_thread)
8227 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
8228
0b16c5cf
PA
82292009-03-14 Pedro Alves <pedro@codesourcery.com>
8230
8231 * server.c (handle_query): Handle "qAttached".
8232
32de4b9d
NS
82332009-03-13 Nathan Sidwell <nathan@codesourcery.com>
8234
8235 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8236 GPLv3, update license URL.
8237
2aecd87f
DE
82382009-03-01 Doug Evans <dje@google.com>
8239
93efd302 8240 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
8241 (server_h): Add gdb_signals.h.
8242 (signals.o): Update.
8243 * server.h (target_signal_from_host,target_signal_to_host_p)
8244 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8245
86b1f9c5
PM
82462009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8247
8248 * remote-utils.c (getpkt): Also generate remote-debug
8249 information if noack_mode is set.
8250
4aa995e1
PA
82512009-02-06 Pedro Alves <pedro@codesourcery.com>
8252
8253 * server.c (handle_query): Report qXfer:siginfo:read and
8254 qXfer:siginfo:write as supported and handle them.
8255 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8256 * linux-low.c (linux_xfer_siginfo): New.
8257 (linux_target_ops): Set it.
8258
62709adf
PA
82592009-01-26 Pedro Alves <pedro@codesourcery.com>
8260
8261 * server.c (gdbserver_usage): Mention --remote-debug.
8262 (main): Accept '--remote-debug' switch.
8263
aef93bd7
DE
82642009-01-18 Doug Evans <dje@google.com>
8265
8266 * regcache.c (new_register_cache): No need to check result of xcalloc.
8267 * server.c (handle_search_memory): Back out calls to xmalloc,
8268 result is checked and error is returned to user upon failure.
8269 (handle_query): Ditto. Add more checks for result of malloc.
8270 (handle_v_cont): Check result of malloc, report error back to
8271 user upon failure.
8272 (handle_v_run): Ditto. Call freeargv.
8273 * server.h (freeargv): Declare.
8274 * utils.c (freeargv): New fn.
8275
54363045
DE
82762009-01-15 Doug Evans <dje@google.com>
8277
f626972c
DE
8278 * gdbreplay.c (perror_with_name): Make arg const char *.
8279 * server.h (target_signal_to_name): Make return type const char *.
0842e787 8280 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 8281 * utils.c (perror_with_name): Make arg const char *.
54363045 8282
18aae699
PA
82832009-01-14 Pedro Alves <pedro@codesourcery.com>
8284
8285 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8286 when handling a EXIT_PROCESS_DEBUG_EVENT.
8287
ff703abe
JB
82882009-01-06 Joel Brobecker <brobecker@adacore.com>
8289
8290 * gdbreplay.c (gdbreplay_version): Update copyright year.
8291 * server.c (gdbserver_version): Likewise.
8292
f21cc1a2 82932009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
8294
8295 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 8296 (handle_extended_wait): Improve comment.
0e21c1ec 8297
bca929d3
DE
82982008-12-13 Doug Evans <dje@google.com>
8299
8300 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8301 * server.h (ATTR_MALLOC): New macro.
8302 (xmalloc,xcalloc,xstrdup): Declare.
8303 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
8304 * inferiors.c: Ditto.
8305 * linux-low.c: Ditto.
8306 * mem-break.c: Ditto.
8307 * regcache.c: Ditto.
8308 * remote-utils.c: Ditto.
8309 * server.c: Ditto.
8310 * target.c: Ditto.
8311 * win32-low.c: Ditto.
8312
97438e3f
DE
83132008-12-12 Doug Evans <dje@google.com>
8314
896c7fbb
DE
8315 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
8316 in debugging printf.
8317
97438e3f
DE
8318 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
8319
e3b886f8
DE
83202008-12-09 Doug Evans <dje@google.com>
8321
8322 * linux-low.h (struct process_info): Delete member tid, unused.
8323 * thread-db.c (find_one_thread): Update.
8324 (maybe_attach_thread): Update.
8325
07e059b5
VP
83262008-12-02 Pedro Alves <pedro@codesourcery.com>
8327
889bf7c5
PA
8328 * target.h (struct target_ops): Add qxfer_osdata member.
8329 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
8330 and dirent.h.
8331 (linux_qxfer_osdata): New functions.
8332 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
8333 callback.
8334 * server.c (handle_query): Handle "qXfer:osdata:read:".
8335 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
8336 (buffer_xml_printf): New functions.
8337 * server.h (struct buffer): New.
8338 (buffer_grow_str, buffer_grow_str0): New macros.
8339 (buffer_grow, buffer_free, buffer_init, buffer_finish)
8340 (buffer_xml_printf): Declare.
07e059b5 8341
4cab47ab
DE
83422008-11-24 Doug Evans <dje@google.com>
8343
8344 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
8345
f142445f
DJ
83462008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
8347
8348 * server.c (handle_v_run): Always use the supplied argument list.
8349
d0107bb6 83502008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 8351
d0107bb6
BW
8352 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
8353 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 8354
2c4ad781
TJB
83552008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
8356
8357 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
8358 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
8359 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
8360 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
8361 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
8362 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
8363 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
8364 XML target descriptions.
8365 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
8366 when inferior is running on an ISA 2.05 or later processor. Add
8367 special case to return offset for full 64-bit slot of FPSCR when
8368 in 32-bits.
8369
dfb64f85
DJ
83702008-11-14 Daniel Gutson <dgutson@codesourcery.com>
8371
8372 * Makefile.in (SFILES, clean): Added sparc64 files.
8373 (reg-sparc64.o, reg-sparc64.c): New.
8374 * configure.srv (sparc*-*-linux*): New configuration.
8375 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
8376 syscall arguments for SPARC.
8377 (regsets_store_inferior_registers): Likewise.
8378 * linux-sparc-low.c: New file.
8379
66b6e1dd
DE
83802008-10-21 Doug Evans <dje@google.com>
8381
8382 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
8383 (READLINE_DIR,READLINE_DEP): Delete.
8384 (INTERNAL_CFLAGS): Update.
8385 (LINTFLAGS): Update.
8386
9b710a42
PA
83872008-10-10 Pedro Alves <pedro@codesourcery.com>
8388
8389 * server.c (handle_v_run): If GDB didn't specify an argv, use the
8390 whole argv from the last run, not just argv[0].
8391
5822d809
PA
83922008-09-08 Pedro Alves <pedro@codesourcery.com>
8393
8394 * regcache.c (new_register_cache): Return NULL if the register
8395 cache size isn't known yet.
8396 (free_register_cache): Avoid dereferencing a NULL regcache.
8397
74aac56f
DJ
83982008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8399
8400 * configure.srv: Merge MIPS and MIPS64.
8401
400b20f5
MR
84022008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
8403
8404 * Makefile.in (uninstall): Apply $(EXEEXT) too.
8405
677c5bb1
LM
84062008-08-18 Luis Machado <luisgpm@br.ibm.com>
8407
8408 * Makefile.in: Add required vsx dependencies.
8409
8410 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
8411 Declare init_registers_powerpc_vsx32l.
8412 Declare init_registers_powerpc_vsx64l.
8413 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
8414 (ppc_arch_setup): Check for VSX in hwcap.
8415 (ppc_fill_vsxregset): New function.
8416 (ppc_store_vsxregset): New function.
8417 Add new VSX entry in regset_info target_regsets.
8418
8419 * configure.srv: Add new VSX dependencies.
8420
a6f3e723
SL
84212008-08-12 Pedro Alves <pedro@codesourcery.com>
8422
8423 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
8424 (remote_open): Set or clear transport_is_reliable.
8425 (putpkt_binary): Don't expect acks in noack mode.
8426 (getpkt): Don't send ack/nac in noack mode.
8427 * server.c (handle_general_set): Handle QStartNoAckMode.
8428 (handle_query): If connected by tcp pass QStartNoAckMode+ in
8429 qSupported.
8430 (main): Reset noack_mode on every connection.
8431 * server.h (noack_mode): Declare.
8432
a417dc56
RW
84332008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8434
8435 * Makefile.in (GDBREPLAY_OBS): New variable.
8436 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
8437
3221518c
UW
84382008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
8439 Daniel Jacobowitz <dan@codesourcery.com>
8440
8441 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
8442 (usr_store_inferior_registers): Likewise.
8443 (regsets_store_inferior_registers): Likewise.
8444
ec56be1b
PA
84452008-07-31 Rolf Jansen <rj@surtec.com>
8446 Pedro Alves <pedro@codesourcery.com>
8447
8448 * configure.ac: Check for memmem declaration.
8449 * server.c [HAVE_MALLOC_H]: Include malloc.h.
8450 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
8451 (disable_packet_qfThreadInfo): Unconditionally compile.
8452 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
8453 * configure, config.in: Regenerate.
8454
2fe5e3ff
DE
84552008-07-28 Doug Kwan <dougkwan@google.com>
8456
8457 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
8458 (linux_write_memory): Remove declaration of errno.
8459
836acd6d
UW
84602008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
8461
8462 * linux-low.c (handle_extended_wait): Do not use "status"
8463 variable uninitialized.
8464
aeba519e
PA
84652008-07-07 Pedro Alves <pedro@codesourcery.com>
8466
8467 * server.c (handle_v_attach): Inhibit reporting dll changes.
8468
db42f210
PA
84692008-06-27 Pedro Alves <pedro@codesourcery.com>
8470
8471 * remote-utils.c (prepare_resume_reply): If requested, don't
8472 output "thread:TID" in the T stop reply.
8473
8474 * server.c (disable_packet_vCont, disable_packet_Tthread)
8475 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
8476 (handle_query): If requested, disable support for qC, qfThreadInfo
8477 and qsThreadInfo.
8478 (handle_v_requests): If requested, disable support for vCont.
8479 (gdbserver_show_disableable): New.
8480 (main): Handle --disable-packet and --disable-packet=LIST.
8481
8482 * server.h (disable_packet_vCont, disable_packet_Tthread)
8483 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
8484
8e4c5421
CD
84852008-06-20 Carlos O'Donell <carlos@codesourcery.com>
8486
8487 * server.c (gdbserver_usage): Mention --version.
8488
6e23a804
DJ
84892008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
8490
8491 * Makefile.in (gdbreplay.o): New rule.
8492
90aa6a40
JM
84932008-06-06 Joseph Myers <joseph@codesourcery.com>
8494
8495 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
8496 message, not gdbserver.
8497
c16158bc 84982008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
8499 Nathan Sidwell <nathan@codesourcery.com>
8500 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
8501
8502 * acinclude.m4: Include ../../config/acx.m4.
8503 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
8504 * configure, config.in: Regenerate.
8505 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
8506 * server.c (gdbserver_version): Print PKGVERSION.
8507 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
8508 (main): Adjust gdbserver_usage calls.
8509 * gdbreplay.c (version, host_name): Add declarations.
8510 (gdbreplay_version, gdbreplay_usage): New.
8511 (main): Accept --version and --help options.
8512
aeb75bf5
DJ
85132008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
8514
8515 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
8516 (arm_breakpoint_at): Handle Thumb.
8517 (the_low_target): Add comment.
8518
76b233dd
UW
85192008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
8520
8521 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
8522
08388c79
DE
85232008-05-09 Doug Evans <dje@google.com>
8524
a3c83fae
DE
8525 * server.h (decode_search_memory_packet): Declare.
8526 * remote-utils.c (decode_search_memory_packet): New fn.
8527 * server.c (handle_search_memory_1): New fn.
08388c79
DE
8528 (handle_search_memory): New fn.
8529 (handle_query): Process qSearch:memory packets.
8530
bb9c3d36
UW
85312008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
8532
8533 * regcache.c (registers_length): Remove.
8534 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
8535 full register packet.
8536 * regcache.h (registers_length): Remove prototype.
8537 * server.h (PBUFSIZ): Define to 16384.
8538
7284e1be
UW
85392008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
8540
8541 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
8542 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
8543 powerpc-64l.o, and powerpc-altivec64l.o.
8544 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
8545 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
8546 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
8547 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
8548 rs6000/power-linux.xml, and rs6000/power64-linux.xml
8549 to srv_xmlfiles.
8550
8551 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
8552 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
8553 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
8554 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
8555 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
8556 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
8557 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
8558 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
8559 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
8560 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
8561 (clean): Update.
8562
8563 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
8564 (init_registers_powerpc_32l): ... this new prototype.
8565 (init_registers_powerpc_32): Remove, replace by ...
8566 (init_registers_powerpc_altivec32l): ... this new prototype.
8567 (init_registers_powerpc_e500): Remove, replace by ...
8568 (init_registers_powerpc_e500l): ... this new prototype.
8569 (init_registers_ppc64): Remove, replace by ...
8570 (init_registers_powerpc_64l): ... this new prototype.
8571 (init_registers_powerpc_64): Remove, replace by ...
8572 (init_registers_powerpc_altivec64l): ... this new prototype.
8573 (ppc_num_regs): Set to 73.
8574 (PT_ORIG_R3, PT_TRAP): Define if necessary.
8575 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
8576 (ppc_cannot_store_register): Handle orig_r3 and trap.
8577 (ppc_arch_setup): Update init_registers_... calls.
8578 (ppc_fill_gregset): Handle orig_r3 and trap.
8579
8580 * inferiors.c (clear_inferiors): Reset current_inferior.
8581
fdc59709
PB
85822008-04-23 Paolo Bonzini <bonzini@gnu.org>
8583
889bf7c5
PA
8584 * acinclude.m4: Add override.m4.
8585 * configure: Regenerate.
fdc59709 8586
c9b2f845
UW
85872008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8588
8589 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
8590 initial call to init_register_ppc64.
8591
550512b8
UW
85922008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8593
43aaf8b6
PA
8594 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
8595 single powerpc*-*-linux* case.
550512b8
UW
8596 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
8597
b6430ec3
UW
85982008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
8599
8600 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 8601 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
8602 from reg_xmlfiles.
8603 * linux-ppc-low.c: Include <elf.h>.
8604 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
8605 (ppc_hwcap): New global variable.
8606 (ppc_regmap): Remove __SPE__ #ifdef sections.
8607 (ppc_regmap_e500): New global variable.
8608 (ppc_cannot_store_register): Update __SPE__ special case.
8609 (ppc_get_hwcap): New function.
8610 (ppc_arch_setup): Use it to determine whether inferior supports
8611 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
8612 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
8613 Do not access registers if target does not support AltiVec.
8614 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
8615 Do not access registers if target does not support SPE.
8616 (target_regsets): Unconditionally include AltiVec and SPE regsets.
8617
52fa2412
UW
86182008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
8619
8620 * linux-low.c (disabled_regsets, num_regsets): New.
8621 (use_regsets_p): Delete.
8622 (linux_wait_for_process): Clear disabled_regsets.
8623 (regsets_fetch_inferior_registers): Check and set it.
8624 (regsets_store_inferior_registers): Likewise.
8625 (linux_fetch_registers, linux_store_registers): Do not use
8626 use_regsets_p.
8627 (initialize_low): Allocate disabled_regsets.
8628
e28b3332
DJ
86292008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
8630
8631 * Makefile.in (LIBOBJS): New.
8632 (OBS): Use LIBOBJS.
8633 (memmem.o): New rule.
8634 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
8635 * configure: Regenerated.
8636
4536995d
UW
86372008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
8638
8639 * server.c (handle_query): Never return "unsupported" for
8640 qXfer:features:read queries.
8641
221c031f
UW
86422008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
8643
8644 * server.c (get_features_xml): Fix inverted condition.
8645 (handle_query): Always support qXfer:feature:read.
8646
ccd213ac
DJ
86472008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
8648
8649 * server.c (wrapper_argv): New.
8650 (start_inferior): Handle wrapper_argv. If set, expect an extra
8651 trap.
8652 (gdbserver_usage): Document --wrapper.
8653 (main): Parse --wrapper.
8654
6fe305f7
UW
86552008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8656
8657 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
8658 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
8659 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
8660 (ppc_set_pc): Likewise.
8661 (ppc_arch_setup): New function.
8662 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
8663 of collect_register.
889bf7c5 8664 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 8665
5b0a002e
UW
86662008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8667
8668 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
8669 instead of linux-ppc64-low.o.
8670 * linux-ppc64-low.c: Remove file.
8671 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
8672 (linux-ppc64-low.o): Remove rule.
8673
8674 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
8675 (init_registers_powerpc_64): Likewise.
8676 (ppc_regmap): Conditionally define depending on __powerpc64__.
8677 (ppc_cannot_store_register): Do not special-case "fpscr" when
8678 compiled on __powerpc64__.
8679 (ppc_collect_ptrace_register): New function.
8680 (ppc_supply_ptrace_register): New function.
8681 (ppc_breakpoint): Change type to "unsigned int".
8682 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
8683 (the_low_target): Conditionally provide initializers for the
889bf7c5 8684 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
8685 collect_ptrace_register and supply_ptrace_register members.
8686
9b4b61c8
UW
86872008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8688
8689 * regcache.h (gdbserver_xmltarget): Add extern declaration.
8690 * server.c (gdbserver_xmltarget): Define.
8691 (get_features_xml): Use it to replace "target.xml" and arch_string.
8692
8693 * configure.srv: Remove srv_xmltarget. Add XML files that were
8694 mentioned there to srv_xmlfiles instead. Remove conditional tests
8695 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
8696 srv_xmlfiles and srv_regobj to include all possible choices.
8697 * configure.ac (srv_xmltarget): Remove.
8698 (srv_xmlfiles): Do not add "target.xml".
8699 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
8700 checks for supplementary target information.
8701 * configure: Regenerate.
8702 * Makefile.in (XML_TARGET): Remove.
8703 (target.xml): Remove rule.
8704 (clean): Do not clean up target.xml.
8705 (.PRECIOUS): Do not mention target.xml.
8706
8707 * target.h (struct target_ops): Remove arch_string member.
8708 * linux-low.c (linux_arch_string): Remove.
8709 (linux_target_ops): Remove arch_string initializer.
8710 * linux-low.h (struct linux_target_ops): Remove arch_string member.
8711 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
8712 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
8713 * spu-low.c (spu_arch_string): Remove.
8714 (spu_target_ops): Remove arch_string initializer.
8715 * win32-low.c (win32_arch_string): Remove.
8716 (win32_target_ops): Remove arch_string initializer.
8717 * win32-low.h (struct win32_target_ops): Remove arch_string member.
8718 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
8719 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
8720
ee1a7ae4
UW
87212008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8722
8723 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
8724 by collect_ptrace_register and supply_ptrace_register hooks.
8725 * linux-low.c (fetch_register): Use supply_ptrace_register callback
8726 instead of checking for the_low_target.left_pad_xfer.
8727 (usr_store_inferior_registers): Use collect_ptrace_register callback
8728 instead of checking for the_low_target.left_pad_xfer.
8729
8730 * linux-s390-low.c (s390_collect_ptrace_register): New function.
8731 (s390_supply_ptrace_register): Likewise.
8732 (s390_fill_gregset): Call s390_collect_ptrace_register.
8733 (the_low_target): Update.
8734
8735 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
8736 (ppc_supply_ptrace_register): Likewise.
8737 (the_low_target): Update.
8738
8739 * linux-i386-low.c (the_low_target): Update.
8740 * linux-x86-64-low.c (the_low_target): Update.
8741
d61ddec4
UW
87422008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8743
8744 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
8745 reg-s390.o and reg-s390x.o.
8746
8747 * linux-low.c (new_inferior): New global variable.
8748 (linux_create_inferior, linux_attach): Set it.
8749 (linux_wait_for_process): Call the_low_target.arch_setup after the
8750 target has stopped for the first time.
8751 (initialize_low): Do not call the_low_target.arch_setup.
8752
8753 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
8754 (s390_set_pc): Likewise.
8755 (s390_arch_setup): New function.
8756 (the_low_target): Use s390_arch_setup as arch_setup routine.
8757
8758 * regcache.c (realloc_register_cache): New function.
8759 (set_register_cache): Call it for each existing regcache.
8760
d05b4ac3
UW
87612008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8762
8763 * server.h (init_registers): Remove prototype.
8764
8765 * linux-low.h (struct linux_target_ops): Add arch_setup field.
8766 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
8767 instead of init_registers ().
8768 * linux-arm-low.c (init_registers_arm): Add prototype.
8769 (init_registers_arm_with_iwmmxt): Likewise.
8770 (the_low_target): Add initializer for arch_setup field.
8771 * linux-cris-low.c (init_registers_cris): Add prototype.
8772 (the_low_target): Add initializer for arch_setup field.
8773 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
8774 (the_low_target): Add initializer for arch_setup field.
8775 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
8776 (the_low_target): Add initializer for arch_setup field.
8777 * linux-ia64-low.c (init_registers_ia64): Add prototype.
8778 (the_low_target): Add initializer for arch_setup field.
8779 * linux-m32r-low.c (init_registers_m32r): Add prototype.
8780 (the_low_target): Add initializer for arch_setup field.
8781 * linux-m68k-low.c (init_registers_m68k): Add prototype.
8782 (the_low_target): Add initializer for arch_setup field.
8783 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
8784 (init_registers_mips64_linux): Likewise.
8785 (the_low_target): Add initializer for arch_setup field.
8786 * linux-ppc-low.c (init_registers_ppc): Add prototype.
8787 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
8788 (the_low_target): Add initializer for arch_setup field.
8789 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
8790 (init_registers_powerpc_64): Likewise.
8791 (the_low_target): Add initializer for arch_setup field.
8792 * linux-s390-low.c (init_registers_s390): Add prototype.
8793 (init_registers_s390x): Likewise.
8794 (the_low_target): Add initializer for arch_setup field.
8795 * linux-sh-low.c (init_registers_sh): Add prototype.
8796 (the_low_target): Add initializer for arch_setup field.
8797 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
8798 (the_low_target): Add initializer for arch_setup field.
8799 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
8800 (the_low_target): Add initializer for arch_setup field.
8801
8802 * win32-low.h (struct win32_target_ops): Add arch_setup field.
8803 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
8804 instead of init_registers ().
8805 * win32-arm-low.c (init_registers_arm): Add prototype.
8806 (the_low_target): Add initializer for arch_setup field.
8807 * win32-i386-low.c (init_registers_i386): Add prototype.
8808 (the_low_target): Add initializer for arch_setup field.
8809
8810 * spu-low.c (init_registers_spu): Add prototype.
8811 (initialize_low): Call initialie_registers_spu () instead of
8812 initialize_registers ().
8813
fd96d250
PA
88142008-02-19 Pedro Alves <pedro@codesourcery.com>
8815
8816 * server.c (handle_v_requests): When handling the vRun and vAttach
8817 packets, if already debugging a process, don't kill it. Return an
8818 error instead.
8819
d41b6bb4
DJ
88202008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
8821
8822 * server.c (handle_query): Correct length check.
8823
5ac588cf
PA
88242008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
8825
8826 * win32-low.c (do_initial_child_stuff): Add process handle
8827 parameter. Set current_process_handle and current_process_id from the
8828 parameters. Clear globals.
8829 (win32_create_inferior): Don't set current_process_handle and
8830 current_process_id here. Instead pass them on the call to
8831 do_initial_child_stuff.
8832 (win32_attach): Likewise.
8833 (win32_clear_inferiors): New.
8834 (win32_kill): Don't close the current process handle or the
8835 current thread handle here. Instead call win32_clear_inferiors.
8836 (win32_detach): Don't open a new handle to the process. Call
8837 win32_clear_inferiors.
8838 (win32_join): Don't rely on current_process_handle; open a new
8839 handle using the process id.
8840 (win32_wait): Call win32_clear_inferiors when the inferior process
8841 has exited.
8842
ecd7ecbc
DJ
88432008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
8844
8845 * server.c (monitor_show_help): Add "exit".
8846
1525d545
MG
88472008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
8848
ecd7ecbc 8849 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
8850 (clean): Add reg-xtensa.c.
8851 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
8852 * configure.srv (xtensa*-*-linux*) New target.
8853 * linux-xtensa-low.c: New.
8854 * xtensa-xtregs.c: New.
1525d545 8855
59a016f0
PA
88562008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
8857
8858 * hostio.c: Don't include errno.h.
8859 (errno_to_fileio_errno): Move to hostio-errno.
8860 * hostio.c: (hostio_error): Remove the error parameter. Defer the
8861 error number outputting to the target->hostio_last_error callback.
8862 (hostio_packet_error): Use FILEIO_EINVAL directly.
8863 (handle_open, handle_pread, hostio_error, handle_unlink): Update
8864 calls to hostio_error.
8865 * hostio-errno.c: New.
8866 * server.h (hostio_last_error_from_errno): Declare.
8867 * target.h (target_ops): Add hostio_last_error member.
8868 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
8869 as hostio_last_error handler.
889bf7c5 8870 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
8871 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
8872 (wince_hostio_last_error): New functions.
8873 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
8874 as hostio_last_error handler.
8875 (win32_target_ops) [!_WIN32_WCE]: Register
8876 hostio_last_error_from_errno as hostio_last_error handler.
8877 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
8878 (hostio-errno.o): New rule.
8879 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
8880 * configure.srv (srv_hostio_err_objs): New variable. Default to
8881 hostio-errno.o.
8882 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
8883 * configure: Regenerate.
8884
2d717e4f
DJ
88852008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8886
8887 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
8888 (linux_kill, linux_detach): Clean up the process list.
8889 * remote-utils.c (remote_open): Improve port number parsing.
8890 (putpkt_binary, input_interrupt): Only send interrupts if the target
8891 is running.
8892 * server.c (extended_protocol): Make static.
8893 (attached): Define earlier.
8894 (exit_requested, response_needed, program_argv): New variables.
8895 (target_running): New.
8896 (start_inferior): Clear attached here.
8897 (attach_inferior): Set attached here.
8898 (require_running): Define.
8899 (handle_query): Use require_running and target_running. Implement
8900 "monitor exit".
8901 (handle_v_attach, handle_v_run): New.
8902 (handle_v_requests): Use require_running. Handle vAttach and vRun.
8903 (gdbserver_usage): Update.
8904 (main): Redo argument parsing. Handle --debug and --multi. Handle
8905 --attach along with other options or after the port. Save
8906 program_argv. Support no initial program. Resynchronize
8907 communication with GDB after an error. Handle "monitor exit".
8908 Use require_running and target_running. Always allow the extended
8909 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
8910 restart in extended mode.
8911 * README: Refer to the GDB manual. Update --attach usage.
8912
7407e2de
AS
89132007-12-20 Andreas Schwab <schwab@suse.de>
8914
8915 * linux-low.c (STACK_SIZE): Define.
8916 (linux_tracefork_child): Use it. Use __clone2 on ia64.
8917 (linux_test_for_tracefork): Likewise.
8918
b65d95c5
DJ
89192007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
8920
8921 * linux-low.c (linux_wait_for_event): Update messages. Do not
8922 reinsert auto-delete breakpoints.
8923 * mem-break.c (struct breakpoint): Change return type of handler to
8924 int.
8925 (set_breakpoint_at): Update handler type.
8926 (reinsert_breakpoint_handler): Return 1 instead of calling
8927 delete_breakpoint.
8928 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
8929 setting a new one.
8930 (check_breakpoints): Delete auto-delete breakpoints and return 2.
8931 * mem-break.h (set_breakpoint_at): Update handler type.
8932 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
8933 * win32-low.c (auto_delete_breakpoint): New.
8934 (get_child_debug_event): Use it.
8935
4e799345
DJ
89362007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
8937
8938 * configure.ac: Check for pread and pwrite.
8939 * hostio.c (handle_pread): Fall back to lseek and read.
8940 (handle_pwrite): Fall back to lseek and write.
8941 * config.in, configure: Regenerated.
8942
27524b67
DJ
89432007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
8944
8945 * server.c (myresume): Add own_buf argument.
8946 (main): Update calls.
8947
a20d5e98
DJ
89482007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
8949
8950 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
8951 * remote-utils.c (remote_open): Do not call disable_async_io.
8952 (block_async_io): Delete.
8953 (unblock_async_io): Make static.
8954 (initialize_async_io): New.
8955 * server.c (handle_v_cont): Handle async I/O here.
8956 (myresume): Likewise. Move other common resume tasks here...
8957 (main): ... from here. Call initialize_async_io. Disable async
8958 I/O before the main loop.
8959 * server.h (initialize_async_io): Declare.
8960 (block_async_io, unblock_async_io): Delete prototypes.
8961 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
8962
b79d787e
DJ
89632007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
8964
8965 * remote-utils.c (readchar): Allow binary data in received messages.
8966
d97903b2
PA
89672007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8968
8969 * win32-low.c (attaching): New global.
8970 (win32_create_inferior): Clear the `attaching' global.
8971 (win32_attach): Set the `attaching' global.
8972 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
8973 attaching. Only set a breakpoint at the entry point if not
8974 attaching.
8975
311de423
PA
89762007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8977
8978 * server.c (main): Don't report dll events on the initial
8979 connection on attaches.
8980
6c2d16d2
PA
89812007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8982
8983 * server.c (main): Relax numerical bases supported for the pid of
8984 the --attach command line argument.
8985
5ca906e6
PA
89862007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8987
8988 * win32-low.c (win32_attach): Call OpenProcess before
8989 DebugActiveProcess, not after. Add last error output to error
8990 call.
8991
9c6c8194
PA
89922007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8993
8994 * win32-low.c (win32_get_thread_context)
8995 (win32_set_thread_context): New functions.
8996 (thread_rec): Use win32_get_thread_context.
8997 (continue_one_thread, win32_resume): Use win32_set_thread_context.
8998 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
8999 field.
9000
4d5d1aaa
PA
90012007-12-03 Leo Zayas
9002 Pedro Alves <pedro_alves@portugalmail.pt>
9003
9004 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9005 global variables.
9006 (child_add_thread): Minor cleanup.
9007 (child_continue): Resume artificially suspended threads before
9008 calling ContinueDebugEvent.
9009 (suspend_one_thread): New.
9010 (fake_breakpoint_event): New.
9011 (get_child_debug_event): Change return type to int. Check here if
9012 gdb sent an interrupt request. If a soft interrupt was requested,
9013 fake a breakpoint event. Return 0 if there is no event to handle,
9014 and 1 otherwise.
9015 (win32_wait): Don't check here if gdb sent an interrupt request.
9016 Ensure there is a valid event to handle.
9017 (win32_request_interrupt): Add soft interruption method as last
9018 resort.
9019
c436e841
PA
90202007-12-03 Leo Zayas
9021 Pedro Alves <pedro_alves@portugalmail.pt>
9022
9023 * win32-low.h (win32_thread_info): Add descriptions to the
9024 structure members. Replace `suspend_count' counter by a
9025 `suspended' flag.
9026 * win32-low.c (thread_rec): Update condition of when to get the
9027 context from the inferior. Rely on ContextFlags being set if it
9028 has already been retrieved. Only suspend the inferior thread if
9029 we haven't already. Warn if that fails.
9030 (continue_one_thread): s/suspend_count/suspended/. Only call
9031 ResumeThread once. Warn if that fails.
9032
e7b5fa67
PA
90332007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9034
9035 * win32-low.c (win32_wait): Don't read from the inferior when it
9036 has already exited.
9037
a385171d
PA
90382007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9039
9040 * Makefile.in (win32_low_h): New variable.
9041 (win32-low.o): Add dependency on $(win32_low_h).
9042 (win32-arm-low.o, win32-i386-low.o): New rules.
9043
f80c84b3
DJ
90442007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9045
9046 * hostio.c: Correct copyright year.
9047
a6b151f1
DJ
90482007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9049
9050 * Makefile.in (OBS): Add hostio.o.
9051 (hostio.o): New rule.
9052 * server.h (handle_vFile): Declare.
9053 * hostio.c: New file.
9054 * server.c (handle_v_requests): Take packet_len and new_packet_len
9055 for binary packets. Call handle_vFile.
9056 (main): Update call to handle_v_requests.
9057
f9387fc3
DJ
90582007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
9059
9060 * linux-low.c: Include <sched.h>.
9061
51c2684e
DJ
90622007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
9063
9064 * linux-low.c (linux_tracefork_grandchild): New.
9065 (linux_tracefork_child): Use clone.
9066 (linux_test_for_tracefork): Use clone; allocate and free a stack.
9067
75f83163
JB
90682007-10-31 Joel Brobecker <brobecker@adacore.com>
9069
9070 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9071
da5898ce
DJ
90722007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
9073
9074 * linux-low.c (handle_extended_wait): Handle unexpected signals.
9075
24a09b5f
DJ
90762007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
9077
9078 * inferiors.c (change_inferior_id): Delete.
9079 (add_pid_to_list, pull_pid_from_list): New.
9080 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
9081 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
9082 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
9083 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
9084 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
9085 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
9086 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
9087 (using_threads): Always set to 1.
9088 (handle_extended_wait): New.
9089 (add_process): Do not set TID.
9090 (linux_create_inferior): Set must_set_ptrace_flags.
9091 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
9092 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
9093 (linux_thread_alive): Rename TID argument to LWPID.
9094 (linux_wait_for_process): Handle unknown processes. Do not use TID.
9095 (linux_wait_for_event): Do not use TID or check using_threads. Update
9096 call to dead_thread_notify. Call handle_extended_wait.
9097 (linux_create_inferior): Use PTRACE_SETOPTIONS.
9098 (send_sigstop): Delete sigstop_sent.
9099 (wait_for_sigstop): Avoid TID.
9100 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
9101 (linux_test_for_tracefork): New.
9102 (linux_lookup_signals): Use thread_db_active and
9103 linux_supports_tracefork_flag.
9104 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
9105 * linux-low.h (get_process_thread): Avoid TID.
9106 (struct process_ifo): Move thread_known and tid to the end. Remove
9107 sigstop_sent.
9108 (linux_attach_lwp, thread_db_init): Update prototypes.
9109 * server.h (change_inferior_id): Delete prototype.
9110 (add_pid_to_list, pull_pid_from_list): New prototypes.
9111 * thread-db.c (thread_db_use_events): New.
9112 (find_first_thread): Rename to...
9113 (find_one_thread): ...this. Update callers and messages. Do not
9114 call fatal. Check thread_db_use_events. Do not call
9115 change_inferior_id or new_thread_notify.
9116 (maybe_attach_thread): Update. Do not call new_thread_notify.
9117 (thread_db_init): Set thread_db_use_events. Check use_events.
9118 * utils.c (fatal, warning): Correct message prefix.
9119
30ed0a8f
DJ
91202007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
9121
9122 * Makefile.in (clean): Remove new files.
9123 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
9124 (powerpc-64.o, powerpc-64.c): New rules.
9125 * configure.srv: Use alternate register sets for powerpc64-*-linux*
9126 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
9127 with SPE.
9128 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
9129 SPE targets.
9130 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
9131 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
9132 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
9133 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
9134 (target_regsets): Add AltiVec and SPE register sets.
9135 * configure.ac: Check for AltiVec and SPE.
9136 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
9137 (ppc_fill_vrregset, ppc_store_vrregset): New.
9138 (target_regsets): Add AltiVec register set.
9139 * configure: Regenerated.
9140
fd462a61
DJ
91412007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
9142
9143 * linux-low.c (O_LARGEFILE): Define.
9144 (linux_read_memory): Use /proc/PID/mem.
9145 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
9146 * configure, config.in: Regenerated.
9147
69f223ed
DJ
91482007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9149
9150 * linux-low.c (linux_wait_for_event): Do not pass signals while
9151 single-stepping.
9152
aec18585
PA
91532007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9154
9155 * win32-low.c (create_process): New.
9156 (win32_create_inferior): Use create_process instead of
9157 CreateProcess. If create_process failed retry appending an ".exe"
9158 suffix. Store the GetLastError result immediatelly after
9159 create_process calls and use it on the call to error.
9160
34d86ddd
PA
91612007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9162
9163 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
9164
5a0e3bd0
JB
91652007-08-23 Joel Brobecker <brobecker@adacore.com>
9166
9167 * configure.ac: Switch license to GPLv3.
9168
f88c79e6
MS
91692007-08-01 Michael Snyder <msnyder@access-company.com>
9170
9171 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
9172
6b3d9b83
PA
91732007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
9174
9175 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
9176 typedef.
9177 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
9178 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
9179 CloseToolhelp32Snapshot.
9180 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9181 CloseToolhelp32Snapshot.
9182
c588c53c
MS
91832007-07-27 Michael Snyder <michael.snyder@access-company.com>
9184
9185 * server.c (main): Check for inferior exit before main loop.
9186
aa0403d9
PA
91872007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
9188
9189 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
9190 instead of on tmp_desc.
9191
255e7678
DJ
91922007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
9193 Daniel Jacobowitz <dan@codesourcery.com>
9194
9195 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
9196 (add_thread): Minor cleanups.
9197 (clear_inferiors): Move lower in the file. Clear the DLL
9198 list.
9199 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9200 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9201 (xml_escape_text): New.
9202 * server.c (handle_query): Handle qXfer:libraries:read. Report it
9203 for qSupported.
9204 (handle_v_cont): Report errors.
9205 (gdbserver_version): Update.
9206 (main): Correct size of own_buf. Do not report initial DLL events.
9207 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9208 (unloaded_dll, xml_escape_text): New.
9209 * win32-low.c (enum target_waitkind): Update comments.
9210 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9211 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9212 (win32_EnumProcessModules, win32_GetModuleInformation)
9213 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9214 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9215 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9216 (win32_Module32First, win32_Module32Next, load_toolhelp)
9217 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
9218 (get_child_debug_event): Handle DLL events.
9219 (win32_wait): Likewise.
9220
0d37add9
DJ
92212007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9222
9223 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
9224 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
9225
45e2715e
PA
92262007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9227
9228 * win32-low.c (handle_output_debug_string): Ignore event if not
9229 waiting.
9230
c5674cf1
PA
92312007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9232
9233 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9234
2bbe3cc1
DJ
92352007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9236
9237 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9238
ae13219e
DJ
92392007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9240
9241 * inferiors.c (change_inferior_id): Add comment.
9242 * linux-low.c (check_removed_breakpoint): Add an early
9243 prototype. Improve debug output.
9244 (linux_attach): Doc update.
9245 (linux_detach_one_process, linux_detach): Clean up before releasing
9246 each process.
9247 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9248 * linux-low.h (struct process_info): Doc improvement.
9249 * mem-break.c (delete_all_breakpoints): New.
9250 * mem-break.h (delete_all_breakpoints): New prototype.
9251 * thread-db.c (find_first_thread): New.
9252 (thread_db_create_event): Call it instead of
9253 thread_db_find_new_threads. Clean up unused variables.
9254 (maybe_attach_thread): Remove first thread handling.
9255 (thread_db_find_new_threads): Use find_first_thread.
9256 (thread_db_get_tls_address): Likewise.
9257
4105de34
DJ
92582007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9259
9260 * thread-db.c (thread_db_find_new_threads): Add prototype.
9261 (thread_db_create_event): Check for the main thread before adding
9262 a new thread.
9263 (maybe_attach_thread): Only enable event reporting if TID == 0.
9264 (thread_db_get_tls_address): Check for new threads.
9265
2b876972
DJ
92662007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
9267
9268 * linux-low.c (linux_create_inferior): Try execv before execvp.
9269 * spu-low.c (spu_create_inferior): Likewise.
9270
7a245884
DJ
92712007-06-13 Mike Frysinger <vapier@gentoo.org>
9272
9273 * linux-low.c (linux_create_inferior): Change execv to execvp.
9274 * spu-low.c (spu_create_inferior): Likewies.
9275
117ce543
DJ
92762007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
9277
9278 * Makefile.in (clean): Clean new files instead of deleted ones.
9279 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9280 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9281 rules.
9282 * configure.srv: Specify XML files and new regformats for MIPS and
9283 MIPS64 GNU/Linux.
9284 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9285 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9286 an entry for the restart register.
9287 (mips_cannot_fetch_register, mips_cannot_store_register)
9288 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9289 register names to match the XML descriptions.
9290 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9291 restart register instead of $0.
9292
0e7f50da
UW
92932007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9294 Markus Deuling <deuling@de.ibm.com>
9295
9296 * remote-utils.c (decode_xfer_write): New function.
9297 * server.h (decode_xfer_write): Add prototype.
9298 * server.c (handle_query): Add PACKET_LEN argument. Support
9299 qXfer:spu:read and qXfer:spu:write packets.
9300 (main): Pass packet_len to handle_query.
9301 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9302 * target.h (target_ops): Add qxfer_spu.
9303
374c1d38
UW
93042007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9305
9306 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
9307 accessing non-seekable spufs files.
9308
bb63802a
UW
93092007-05-16 Markus Deuling <deuling@de.ibm.com>
9310
889bf7c5 9311 * server.c (handle_query): Add reply for qC packet.
bb63802a 9312
7390519e
PA
93132007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9314 Leo Zayas <lerele@champenstudios@com>
9315
9316 * server.h (check_remote_input_interrupt_request): New function.
9317 * remote_utils.c (INVALID_DESCRIPTOR): New define.
9318 (remote_desc): Initialize with INVALID_DESCRIPTOR.
9319 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
9320 (check_remote_input_interrupt_request): New function.
9321 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 9322 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
9323 winapi_GenerateConsoleCtrlEvent): New typedefs.
9324 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
9325 to 250 ms.
9326 (win32_wait): Check for remote interrupt request
9327 with check_remote_input_interrupt_request.
9328 (win32_request_interrupt): New function.
9329 (win32_target_op): Set request_interrupt to win32_request_interrupt.
9330
34b34921
PA
93312007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9332
9333 * win32-low.c (debug_registers_changed,
9334 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
9335 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
9336 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
9337 (thread_rec): Get context using the low target.
9338 (child_add_thread): Call thread_added on the low target,
9339 which does the same thing.
9340 (regptr): Delete.
9341 (do_initial_child_stuff): Remove debug registers references.
9342 Set context using the low target. Resume threads after
9343 setting the contexts.
9344 (child_continue): Remove dead variable. Remove debug
9345 registers references.
9346 (child_fetch_inferior_registers): Go through the low target.
9347 (do_child_store_inferior_registers): Remove.
9348 (child_store_inferior_registers): Go through the low target.
9349 (win32_resume): Remove debug registers references.
9350 Set context using the low target.
9351 (handle_exception): Change return type to void. Don't record
9352 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
9353 first chance exception.
889bf7c5 9354 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
9355 goto loop. Always return after waiting for debug event.
9356 (win32_wait): Convert to switch statement. Handle spurious
9357 events.
9358
9359 * win32-i386-low.c (debug_registers_changed,
9360 debug_registers_used): New.
9361 (initial_stuff): Rename to ...
9362 (i386_initial_stuff): ... this. Clear debug registers
9363 state variables.
9364 (store_debug_registers): Delete.
9365 (i386_get_thread_context): New.
9366 (load_debug_registers): Delete.
9367 (i386_set_thread_context): New.
9368 (i386_thread_added): New.
9369 (single_step): Rename to ...
9370 (i386_single_step): ... this.
9371 (do_fetch_inferior_registers): Rename to ...
9372 (i386_fetch_inferior_register): ... this.
9373 (i386_store_inferior_register): New.
9374 (the_low_target): Adapt to new interface.
9375
9376 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
9377 (arm_get_thread_context): New.
9378 (arm_set_thread_context): New.
9379 (regptr): New.
9380 (do_fetch_inferior_registers): Rename to ...
9381 (arm_fetch_inferior_register): ... this.
9382 (arm_store_inferior_register): New.
9383 (arm_wince_breakpoint): Reimplement as unsigned long.
9384 (arm_wince_breakpoint_len): Define.
9385 (the_low_target): Adapt to new interface.
9386
9387 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
9388 load_debug_registers. Add get_thread_context, set_thread_context,
9389 thread_added and store_inferior_register. Rename
9390 fetch_inferior_registers to fetch_inferior_register.
9391 (regptr): Remove declaration.
9392
dd6953e1
PA
93932007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9394
9395 * linux-low.c (linux_detach): Change return type to int. Return 0.
9396 * spu-low.c (spu_detach): Likewise.
9397
444d6139
PA
93982007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9399
9400 * target.h (target_ops): Change return type of detach to int.
9401 Add join.
9402 (join_inferior): New.
9403 * server.c (main): Don't skip detach support on mingw32.
9404 If the inferior doesn't support detaching return error.
9405 Call join_inferior instead of using waitpid.
9406 * linux-low.c (linux_join): New.
9407 (linux_target_op): Add linux_join.
9408 * spu-low.c (spu_join): New.
9409 (spu_target_ops): Add spu_join.
9410 * win32-low.c (win32_detach): Adapt to new interface.
9411 Reopen current_process_handle before detaching. Issue a child
9412 resume before detaching.
9413 (win32_join): New.
9414 (win32_target_op): Add win32_join.
9415
1d5315fe
PA
94162007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9417
9418 * win32-low.c (win32-attach): Fix return value.
9419 * target.h (target_ops): Describe ATTACH return values.
9420
bf914831
PA
94212007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9422
9423 * win32-low.c (GETPROCADDRESS): Define.
9424 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
9425 (winapi_DebugSetProcessKillOnExit): Likewise.
9426 (win32_create_inferior): Force usage of ansi CreateProcessA.
9427 (win32_attach): Use GETPROCADDRESS.
9428 (win32_detach): Likewise.
9429
f72f3e60
PA
94302007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9431
9432 * win32-low.c (win32_wait): Don't use WSTOPSIG.
9433
ed50f18f
PA
94342007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
9435
9436 * win32-low.c: Commit leftover changes from 2007-03-29.
9437
0c2ead7e
DJ
94382007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9439
9440 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
9441 fields short instead of int. Add explicit padding.
9442 (i387_cache_to_fsave): Remove unnecessary casts.
9443 (i387_fsave_to_cache): Doc fix.
9444 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
9445
73725ff3
DJ
94462007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9447
9448 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
9449 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
9450
d99f33d8
PA
94512007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9452
9453 * configure.srv (arm*-*-mingw32ce*): Move near the other
9454 arm targets.
9455
68070c10
PA
94562007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9457
2482afc6 9458 * configure.ac: Add errno checking.
68070c10
PA
9459 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
9460 sys/file.h and malloc.h.
9461 (AC_CHECK_DECLS): Add perror.
9462 (srv_mingwce): Handle.
2482afc6 9463 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
9464 win32-i386-low.o to srv_tgtobj.
9465 (i[34567]86-*-mingw*): Likewise.
9466 (arm*-*-mingw32ce*): Add case.
9467 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9468 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
9469 [__MINGW32CE__] (strerror): New function.
9470 [__MINGW32CE__] (errno): Define to GetLastError.
9471 [__MINGW32CE__] (COUNTOF): New macro.
9472 (remote_open): Remove extra close call.
9473 * mem-break.c (delete_breakpoint_at): New function.
9474 * mem-break.h (delete_breakpoint_at): Declare.
9475 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9476 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
9477 [USE_WIN32API] (read, write): Add char* casts.
9478 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
9479 * server.h: Include wincecompat.h on Windows CE.
9480 [HAVE_ERRNO_H]: Check.
9481 (perror): Declare if not declared.
9482 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
9483 (perror_with_name): Remove errno declaration.
9484 * wincecompat.h: New.
9485 * wincecompat.c: New.
9486 * win32-low.h: New.
9487 * win32-arm-low.c: New.
9488 * win32-i386-low.c: New.
9489 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
9490 (OUTMSG2): Make it safe.
9491 (_T): New macro.
9492 (COUNTOF): New macro.
9493 (NUM_REGS): Get it from the low target.
9494 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
9495 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
9496 (thread_rec): Let low target handle debug registers.
9497 (child_add_thread): Likewise.
9498 (child_init_thread_list): Likewise.
9499 (continue_one_thread): Likewise.
9500 (regptr): New.
9501 (do_child_fetch_inferior_registers): Move to ...
9502 * win32-i386-low.c: ... here, and rename to ...
9503 (do_fetch_inferior_registers): ... this.
889bf7c5 9504 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
9505 Go through the low target.
9506 (do_child_store_inferior_registers): Use regptr.
9507 (strwinerror): New function.
9508 (win32_create_inferior): Handle Windows CE.
9509 Use strwinerror instead of strerror on Windows error
9510 codes. Add program to the error output.
9511 Don't close the main thread handle on Windows CE.
9512 (win32_attach): Use coredll.dll on Windows CE.
9513 (win32_kill): Close current process and current
9514 thread handles.
9515 (win32_detach): Use coredll.dll on Windows CE.
9516 (win32_resume): Let low target handle debug registers, and
9517 step request.
9518 (handle_exception): Add/Remove initial breakpoint. Avoid
9519 non-existant WSTOPSIG on Windows CE.
9520 (win32_read_inferior_memory): Cast to remove warning.
9521 (win32_arch_string): Go through the low target.
9522 (initialize_low): Call set_breakpoint_data with the low
9523 target's breakpoint.
9524 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
9525 FOP_REGNUM, mappings): Move to ...
9526 * win32-i386-low.c: ... here.
9527 * win32-low.c (win32_thread_info): Move to ...
9528 * win32-low.h: ... here.
9529 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
9530 win32-arm-low.c and wincecompat.c.
9531 (all:): Add $EXEEXT.
9532 (install-only:): Likewise.
9533 (gdbserver:): Likewise.
9534 (gdbreplay:): Likewise.
9535 * config.in: Regenerate.
9536 * configure: Regenerate.
9537
41093d81
PA
95382007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9539
9540 * win32-low.c: Rename typedef thread_info to
9541 win32_thread_info throughout.
9542
544afa54
PA
95432007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9544
9545 * win32-i386-low.c: Rename to ...
9546 * win32-low.c: ... this.
9547 * configure.srv: Replace win32-i386-low.o with win32-low.o.
9548 * Makefile.in: Likewise.
9549
bce7165d
PA
95502007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
9551
9552 * remote-utils.c (monitor_output): Constify msg parameter.
9553 * server.h (monitor_output): Likewise.
9554 * win32-i386-low.c (handle_output_debug_string): New.
9555 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
9556 handle_output_debug_string.
9557 (get_child_debug_event): Likewise.
9558
506c7aa0
DJ
95592007-03-27 Mat Hostetter <mat@lcs.mit.edu>
9560
9561 * server.c (main): Correct strtoul check.
9562
42c81e2a
DJ
95632007-03-27 Jon Ringle <jon@ringle.org>
9564
9565 * linux-low.c: Check __ARCH_HAS_MMU__ also.
9566
9453113a
DJ
95672007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
9568
9569 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
9570
64a69107
DJ
95712007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
9572
9573 * terminal.h: Check HAVE_SGTTY_H.
9574
95752007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
9576
9577 * remote-utils.c (remote_open): Print out the assigned port number.
9578
c74d0ad8
DJ
95792007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
9580
9581 * remote-utils.c (monitor_output): New function.
9582 * server.c (debug_threads): Define here.
9583 (monitor_show_help): New function.
9584 (handle_query): Handle qRcmd.
9585 (main): Do not handle 'd' packet.
9586 * server.h (debug_threads, remote_debug, monitor_output): Declare.
9587 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
9588 of debug_threads.
9589
de7c3b4a
PA
95902007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9591
9592 * Makefile.in (EXEEXT): New.
9593 (clean): Use $(EXEEXT).
9594
ef57601b
PA
95952007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9596
9597 * target.h (target_ops): Rename send_signal to request_interrupt,
9598 and remove enum target_signal parameter.
9599 * linux-low.c (linux_request_interrupt): Rename from
9600 linux_send_signal, and always send SIGINT.
9601 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
9602 and always send SIGINT.
9603 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
9604 of send_signal.
9605 (input_interrupt): Likewise.
9606
820f2bda
PA
96072007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9608
9609 * server.c (get_features_xml): Check if target implemented
9610 arch_string.
9611 * win32-i386-low.c (win32_arch_string): New.
9612 (win32_target_ops): Add win32_arch_string as arch_string member.
9613
ab39bf24
UW
96142007-02-22 Markus Deuling <deuling@de.ibm.com>
9615
9616 * spu-low.c (spu_arch_string): New.
9617 (spu_target_ops): Add spu_arch_string.
9618
61ff6e04
DJ
96192007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
9620
9621 * remote-utils.c: Remove HAVE_TERMINAL_H check.
9622 * configure.ac: Do not check for terminal.h.
9623 * configure, config.in: Regenerated.
9624
fb1e4ffc
DJ
96252007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9626
9627 * Makefile.in (OBS): Add $(XML_BUILTIN).
9628 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
9629 (clean): Update.
9630 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
9631 (arm-with-iwmmxt.c): New.
9632 * config.in, configure: Regenerate.
9633 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
9634 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
9635 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
9636 (arm*-*-linux*): Add iWMMXt and regset support.
9637 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
9638 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
9639 (arm_store_wmmxregset, target_regsets): New.
9640 * server.c (get_features_xml): Take annex argument. Check builtin
9641 XML documents.
9642 (handle_query): Handle multiple annexes.
9643
0f48aa01
DJ
96442007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9645
9646 * remote-utils.c [USE_WIN32API] (read, write): Define.
9647 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
9648 write.
9649
23181151
DJ
96502007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
9651
9652 * linux-i386-low.c (the_low_target): Set arch_string.
9653 * linux-x86-64-low.c (the_low_target): Likewise.
9654 * linux-low.c (linux_arch_string): New.
9655 (linux_target_ops): Add it.
9656 * linux-low.h (struct linux_target_ops): Add arch_string.
9657 * server.c (write_qxfer_response): Use const void * for DATA.
9658 (get_features_xml): New.
9659 (handle_query): Handle qXfer:features:read. Report it for qSupported.
9660 * target.h (struct target_ops): Add arch_string method.
9661
9d606399
DJ
96622007-01-03 Denis Pilat <denis.pilat@st.com>
9663 Daniel Jacobowitz <dan@codesourcery.com>
9664
9665 * linux-low.c (linux_kill): Handle being called with no threads.
9666 * win32-i386-low.c (win32_kill): Likewise.
9667 (get_child_debug_event): Clear current_process_handle.
9668
96692006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
9670 Daniel Jacobowitz <dan@codesourcery.com>
9671
9672 * remote-utils.c (remote_open): Check the type of specified
9673 serial port devices before opening them.
9674 * server.c (main): Kill the inferior if an error occurs during
9675 the first remote_open.
9676
a5e13d24
DJ
96772006-12-05 Markus Deuling <deuling@de.ibm.com>
9678
9679 * README: Update supported targets.
9680
186947f7
DJ
96812006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
9682
9683 * Makefile.in (clean): Remove reg-mips64.c.
9684 (reg-mips64.c, reg-mips64.o): New rules.
9685 * configure.srv: Handle mips64. Include regset support for mips.
9686 * linux-mips-low.c (union mips_register): New.
9687 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
9688 (mips_breakpoint, mips_breakpoint_at): Use int.
9689 (mips_collect_register, mips_supply_register)
9690 (mips_collect_register_32bit, mips_supply_register_32bit)
9691 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9692 (mips_store_fpregset, target_regsets): New.
9693 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
9694
a13e2c95
UW
96952006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
9696
9697 * configure.srv: Add target "spu*-*-*".
9698 * Makefile.in (clean): Remove reg-spu.c.
9699 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
9700 * spu-low.c: New file.
9701
cb7283db
DJ
97022006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9703
9704 * configure.ac: Correct td_thr_tls_get_addr test.
9705 * configure: Regenerated.
9706
89be2091
DJ
97072006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9708
9709 * linux-low.c (linux_wait_for_event): Reformat. Use the
9710 pass_signals array.
9711 * remote-utils.c (decode_address_to_semicolon): New.
9712 * server.c (pass_signals, handle_general_set): New.
9713 (handle_query): Mention QPassSignals for qSupported.
9714 (main): Call handle_general_set.
9715 * server.h (pass_signals, decode_address_to_semicolon): New.
9716
000ef4f0
DJ
97172006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
9718
9719 * server.c (handle_query): Correct error handling for read_auxv.
9720
b7149293
UW
97212005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
9722
9723 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
9724 and srv_linux_thread_db to yes.
9725 * linux-s390-low.c (s390_fill_gregset): New function.
9726 (target_regsets): Define data structure.
9727
dae5f5cf
DJ
97282006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
9729
9730 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
9731 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
9732 * config.in, configure: Regenerated.
9733 * inferiors.c (gdb_id_to_thread): New function.
9734 (gdb_id_to_thread_id): Use it.
9735 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
9736 * linux-low.h (struct process_info): Add th member.
9737 (thread_db_get_tls_address): New prototype.
9738 * remote-utils.c (decode_address): Make non-static.
9739 * server.c (handle_query): Handle qGetTLSAddr.
9740 * server.h (gdb_id_to_thread, decode_address): New prototypes.
9741 * target.h (struct target_ops): Add get_tls_address.
9742 * thread-db.c (maybe_attach_thread): Save the thread handle.
9743 (thread_db_get_tls_address): New.
9744
32ca6d61
DJ
97452006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
9746
9747 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
9748 (linux_resume_one_process): Take a siginfo_t *. Update all
9749 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
9750 (struct pending_signals): Add a siginfo_t.
9751 (linux_wait_for_process): Always set last_status.
9752 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
9753 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
9754 * linux-low.h (struct process_info): Add last_status.
9755
5ffff7c1
DJ
97562006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
9757
9758 * remote-utils.c (try_rle): New function.
9759 (putpkt_binary): Use it.
9760
8695c747
DJ
97612006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
9762
9763 * Makefile.in (clean): Clean reg-x86-64-linux.c.
9764 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
9765 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
9766 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
9767 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
9768 point registers.
9769
290fadea
RS
97702006-08-08 Richard Sandiford <richard@codesourcery.com>
9771
9772 * server.c (terminal_fd): New variable.
9773 (old_foreground_pgrp): Likewise.
9774 (restore_old_foreground_pgrp): New function.
9775 (start_inferior): Record the terminal file descriptor in terminal_fd
9776 and its original foreground group in old_foreground_pgrp. Register
9777 restore_old_foreground_pgrp with atexit().
9778
9f2e1e63
DJ
97792006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
9780
9781 * server.c (handle_query): Correct qPart to qXfer.
9782
b80864fb
DJ
97832006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
9784
9785 * configure.ac: Check for more headers which are missing on
9786 Windows. Automatically supply -lwsock32 and USE_WIN32API.
9787 * configure.srv: Add Cygwin and mingw32.
9788 * remote-utils.c: Don't include headers unconditionally which
9789 are missing on mingw32. Include <winsock.h> for mingw32.
9790 (remote_open): Adjust for mingw32 support. Flush
9791 standard error after writing to it.
9792 (remote_close, putpkt_binary, input_interrupt, block_async_io)
9793 (unblock_async_io, enable_async_io, disable_async_io)
9794 (readchar, getpkt): Update for Winsock support.
9795 (prepare_resume_reply): Expect a protocol signal number.
9796 * server.c: Disable <sys/wait.h> on mingw32.
9797 (start_inferior): Adjust for mingw32 support. Flush
9798 standard error after writing to it.
9799 (attach_inferior): Likewise. Use protocol signal
9800 numbers.
9801 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
9802 and names.
9803 * win32-i386-low.c: New file.
9804 * Makefile.in (XM_CLIBS): Set.
9805 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
9806 (win32-i386-low.o): New dependency rule.
9807 * linux-low.c (linux_wait): Use target signal numbers.
9808 * target.h (struct target_ops): Doc fix.
9809 * server.h (target_signal_to_name): New prototype.
9810 * gdbreplay.c: Don't include headers unconditionally which
9811 are missing on mingw32. Include <winsock.h> for mingw32.
9812 (remote_close, remote_open): Adjust for Winsock support.
9813 * configure, config.in: Regenerated.
9814
0876f84a
DJ
98152006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9816
9817 * server.c (decode_xfer_read, write_qxfer_response): New.
9818 (handle_query): Take a packet length argument. Handle
9819 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
9820 the qSupported response.
9821 (main): Update call to handle_query.
9822
01f9e8fa
DJ
98232006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
9824
9825 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
9826 (putpkt_binary): Renamed from putpkt and adjusted for binary
9827 data.
9828 (putpkt): New wrapper for putpkt_binary.
9829 (readchar): Don't mask off the high bit.
9830 (decode_X_packet): New function.
9831 * server.c (main): Call putpkt_binary if a handler sets the packet
9832 length. Save the length of the incoming packet. Handle 'X'.
9833 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
9834
be2a5f71
DJ
98352006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
9836
9837 * server.c (handle_query): Handle qSupported.
9838
ea025f5f
DJ
98392006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9840
9841 * remote-utils.c (all_symbols_looked_up): New variable.
9842 (look_up_one_symbol): Check it.
9843 * server.h (look_up_one_symbol): New declaration.
9844 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
9845
9308fc88
DJ
98462006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9847
9848 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 9849 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
9850 (PTRACE_GET_THREAD_AREA): Define.
9851 (ps_get_thread_area): New function.
9852
52fb6437
NS
98532006-05-09 Nathan Sidwell <nathan@codesourcery.com>
9854
9855 * configure.srv (m68k*-*-uclinux*): New target.
9856 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
9857 (linux_resume_one_process): Remove extraneous cast.
9858 (linux_read_offsets): New.
9859 (linux_target_op): Add linux_read_offsets on mmuless systems.
9860 * server.c (handle_query): Add qOffsets logic.
9861 * target.h (struct target_ops): Add read_offsets.
9862
21b0f40c
DJ
98632006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
9864
9865 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
9866 (PTRACE_GET_THREAD_AREA): Define.
9867 (ps_get_thread_area): New function.
9868 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
9869 (linux-x86-64-low.o): Update.
9870
0050a760
DJ
98712006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
9872
9873 * configure.ac: Remove checks for prfpregset_t.
9874 * gdb_proc_service.h: New file.
9875 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
9876 new "gdb_proc_service.h".
9877 * proc-service.c: Likewise.
9878 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
9879 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
9880 * Makefile.in (gdb_proc_service_h): Updated.
9881 * configure, config.in: Regenerated.
9882
b92a518e
DJ
98832006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
9884
9885 * remote-utils.c (prepare_resume_reply): Move declaration
9886 of gdb_id_from_wait to the top of the block.
9887
545587ee
DJ
98882006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
9889
9890 * linux-low.c (regsets_store_inferior_registers): Read the regset
9891 from the target before filling it.
9892
9db87ebd
DJ
98932006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9894
9895 * server.c (attach_inferior): Return SIGTRAP for a successful
9896 attach.
9897
dd24457d
DJ
98982006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9899
9900 * Makefile.in (OBS): Add version.o.
9901 (STAGESTUFF): Delete.
9902 (version.o): Add dependencies.
9903 (version.c): Replace rule.
9904 (clean): Remove version.c.
9905 * server.c (gdbserver_version): New.
9906 (gdbserver_usage): Use printf.
9907 (main): Handle --version and --help.
9908 * server.h (version, host_name): Add declarations.
9909
6f0f660e
EZ
99102005-12-23 Eli Zaretskii <eliz@gnu.org>
9911
889bf7c5
PA
9912 * linux-arm-low.c:
9913 * linux-arm-low.c:
9914 * inferiors.c:
9915 * i387-fp.h:
9916 * i387-fp.c:
9917 * gdbreplay.c:
9918 * regcache.c:
9919 * proc-service.c:
9920 * mem-break.h:
9921 * mem-break.c:
9922 * linux-x86-64-low.c:
9923 * linux-sh-low.c:
9924 * linux-s390-low.c:
9925 * linux-ppc64-low.c:
9926 * linux-ppc-low.c:
9927 * linux-mips-low.c:
9928 * linux-m68k-low.c:
9929 * linux-m32r-low.c:
9930 * linux-low.h:
9931 * linux-low.c:
9932 * linux-ia64-low.c:
9933 * linux-i386-low.c:
9934 * linux-crisv32-low.c:
9935 * thread-db.c:
9936 * terminal.h:
9937 * target.h:
9938 * target.c:
9939 * server.h:
9940 * server.c:
9941 * remote-utils.c:
9942 * regcache.h:
9943 * utils.c:
9944 * Makefile.in:
9945 * configure.ac:
6f0f660e
EZ
9946 * gdbserver.1: Add (C) after Copyright. Update the FSF
9947 address.
9948
9d1fb177
DJ
99492005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
9950
9951 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
9952 (arm_breakpoint_at): Recognize both breakpoints.
9953 (the_low_target): Use the correct breakpoint instruction.
9954
011a70c2
DJ
99552005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
9956
9957 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
9958 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
9959 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
9960 (the_low_target): Update.
9961
7fb85e41
AS
99622005-10-25 Andreas Schwab <schwab@suse.de>
9963
9964 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
9965
9966 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
9967 (ia64_num_regs): Reduce to 462.
9968
3db0444b
DJ
99692005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
9970
9971 * acinclude.m4: Correct quoting.
9972 * aclocal.m4: Regenerated.
9973
9974 Suggested by SZOKOVACS Robert <szo@ies.hu>:
9975 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
9976 (thread_db_init): Call thread_db_err_str.
9977 * configure.ac: Check for TD_VERSION.
9978 * config.in, configure: Regenerated.
9979
bee0189a
DJ
99802005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9981
9982 * server.h (error, fatal, warning): Add ATTR_FORMAT.
9983
e9d25b98
DJ
99842005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9985
9986 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
9987 is not available. Define HAVE_PTRACE_GETREGS if it is.
9988 * config.in, configure: Regenerated.
9989 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
9990 * linux-i386-low.c, linux-m68k-low.c: Update to use
9991 HAVE_PTRACE_GETREGS.
9992 * linux-low.c (regsets_fetch_inferior_registers)
9993 (regsets_store_inferior_registers): Only return 0 if we processed
9994 GENERAL_REGS.
9995 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
9996 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
9997
a06660f7
DJ
99982005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9999
10000 * inferiors.c (struct thread_info): Add gdb_id.
10001 (add_thread): Add gdb_id argument.
10002 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10003 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10004 calls to add_thread.
10005 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10006 * server.c (handle_query): Use thread_to_gdb_id.
10007 (handle_v_cont, main): Use gdb_id_to_thread_id.
10008 * server.h (add_thread): Update prototype.
10009 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10010 prototypes.
10011
5a1f5858
DJ
100122005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10013
10014 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
10015 left-padded registers.
10016 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
10017 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
10018
e122f1f5
SE
100192005-07-01 Steve Ellcey <sje@cup.hp.com>
10020
10021 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10022 * configure: Regenerate.
10023 * config.in: Regenerate.
10024 * server.h (NEED_DECLARATION_STRERROR):
10025 Replace with !HAVE_DECL_STRERROR.
10026
d592fa2f
DJ
100272005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
10028
10029 * linux-low.c (linux_wait, linux_send_signal): Don't test
10030 an unsigned long variable for > 0 if it could be MAX_ULONG.
10031 * server.c (myresume): Likewise.
10032 * target.c (set_desired_inferior): Likewise.
10033
ccbd4912
MK
100342005-06-13 Mark Kettenis <kettenis@gnu.org>
10035
10036 * configure.ac: Simplify and improve check for socklen_t.
10037 * configure, config.in: Regenerate.
10038
f450004a
DJ
100392005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
10040
10041 * acconfig.h: Remove.
10042 * configure.ac: Add a test for socklen_t. Use three-argument
10043 AC_DEFINE throughout.
10044 * config.in: Regenerated using autoheader 2.59.
10045 * configure: Regenerated.
10046
10047 * gdbreplay.c (socklen_t): Provide a default.
10048 (remote_open): Use socklen_t.
10049 * remote-utils.c (socklen_t): Provide a default.
10050 (remote_open): Use socklen_t.
10051 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10052 unsigned char.
10053
10054 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10055 char for buffers.
10056 * linux-low.c (linux_read_memory, linux_write_memory)
10057 (linux_read_auxv): Likewise.
10058 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
10059 (check_mem_write): Likewise.
10060 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
10061 Likewise.
10062 * regcache.c (struct inferior_rgcache_data, registers_to_string)
10063 (registers_from_string, register_data): Likewise.
10064 * server.c (handle_query, main): Likewise.
10065 * server.h (convert_ascii_to_int, convert_int_to_ascii)
10066 (decode_M_packet): Likewise.
10067 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10068 * target.h (struct target_ops): Update read_memory, write_memory,
10069 and read_auxv.
10070 (read_inferior_memory, write_inferior_memory): Update.
10071 * linux-low.h (struct linux_target_ops): Change type of breakpoint
10072 to unsigned char *.
10073 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
10074 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
10075 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
10076 linux-s390-low.c, linux-sh-low.c: Update for changes in
10077 read_inferior_memory and the_low_target->breakpoint.
10078
eee84df1
DJ
100792005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
10080
10081 * Makefile.in (SFILES): Add linux-ppc64-low.c.
10082 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
10083 * configure.srv: Add powerpc64-*-linux*.
10084 * linux-ppc64-low.c: New file.
10085
45b134e5
OF
100862005-05-23 Orjan Friberg <orjanf@axis.com>
10087
10088 * linux-cris-low.c: New file with support for CRIS.
10089 * linux-crisv32-low.c: Ditto for CRISv32.
10090 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
10091 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 10092 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
10093 reg-crisv32.o, and reg-crisv32.c to make rules.
10094 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
10095 recognized targets.
10096
48d93c75
UW
100972005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
10098
10099 * linux-low.c (fetch_register): Ensure buffer size is a multiple
10100 of sizeof (PTRACE_XFER_TYPE).
10101 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
10102
e013ee27
OF
101032005-05-12 Orjan Friberg <orjanf@axis.com>
10104
889bf7c5 10105 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
10106 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
10107 pointers for hardware watchpoint support.
10108 * linux-low.h (struct linux_target_ops): Ditto.
10109 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
10110 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
10111 to linux_target_ops.
10112 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
10113 reply packet.
10114 * server.c (main): Recognize 'Z' and 'z' packets.
10115
b0ded00b
UW
101162005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
10117
10118 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
10119 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
10120 (the_low_target): Add new members.
10121
8643e2ad
DJ
101222005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10123
10124 * proc-service.c (ps_lgetregs): Search all_processes instead of
10125 all_threads.
10126
fc620387
DJ
101272005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10128
10129 * server.c (start_inferior): Change return type to int.
10130 (attach_inferior): Change sigptr to int *.
10131 (handle_v_cont, handle_v_requests): Change signal to int *.
10132 (main): Change signal to int.
10133
101342005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
10135
10136 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
10137 * configure.srv: Add m32r*-*-linux*.
10138 * linux-m32r-low.c: New file.
10139
e0e76420
DJ
101402005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
10141
10142 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
10143
a1928bad
DJ
101442005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10145
10146 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
10147 Take unsigned long arguments for PIDs.
10148 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
10149 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
10150 (wait_for_sigstop, linux_resume_one_process)
10151 (regsets_fetch_inferior_registers, linux_send_signal)
10152 (linux_read_auxv): Likewise. Update the types of variables holding
10153 PIDs. Update format string specifiers.
10154 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
10155 * remote-utils.c (prepare_resume_reply): Likewise.
10156 * server.c (cont_thread, general_thread, step_thread)
10157 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
10158 unsigned long.
10159 (handle_query): Update format specifiers.
10160 (handle_v_cont, main): Use strtoul for thread IDs.
10161 * server.h (struct inferior_list_entry): Use unsigned long for ID.
10162 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
10163 (general_thread, step_thread, thread_from_wait)
10164 (old_thread_from_wait): Update.
10165 * target.h (struct thread_resume): Use unsigned long for THREAD.
10166 (struct target_ops): Use unsigned long for arguments to attach and
10167 thread_alive.
10168
dcdb98d2
DJ
101692005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
10170
10171 * acinclude.m4: Include bfd/bfd.m4 directly.
10172 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
10173 <agriffis@toolchain.org>.
10174 * aclocal.m4, configure: Regenerated.
10175
bec39cab
AC
101762005-01-07 Andrew Cagney <cagney@gnu.org>
10177
10178 * configure.ac: Rename configure.in, require autoconf 2.59.
10179 * configure: Re-generate.
10180
434c4c77
DJ
101812004-12-08 Daniel Jacobowitz <dan@debian.org>
10182
10183 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
10184 LIBS when finished.
10185 * aclocal.m4: Regenerated.
10186 * configure: Regenerated.
10187
db1d3e1b
AS
101882004-11-21 Andreas Schwab <schwab@suse.de>
10189
10190 * linux-m68k-low.c (m68k_num_gregs): Define.
10191 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
10192 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
10193 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
10194 (m68k_breakpoint_at): New. Add to the_low_target.
10195
10196 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10197 srv_linux_thread_db to yes.
10198
43360365
JB
101992004-10-20 Joel Brobecker <brobecker@gnat.com>
10200
10201 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10202 (ARCH_SET_FS): Likewise.
10203 (ARCH_GET_FS): Likewise.
10204 (ARCH_GET_GS): Likewise.
10205
fd500816
DJ
102062004-10-16 Daniel Jacobowitz <dan@debian.org>
10207
10208 * linux-i386-low.c (ps_get_thread_area): New.
10209 * linux-x86-64-low.c (ps_get_thread_area): New.
10210 * linux-low.c: Include <sys/syscall.h>.
10211 (linux_kill_one_process): Don't kill the first thread here.
10212 (linux_kill): Kill the first thread here.
10213 (kill_lwp): New function.
10214 (send_sigstop, linux_send_signal): Use it.
10215 * proc-service.c: Clean up #ifdefs.
10216 (fpregset_info): Delete.
10217 (ps_lgetregs): Update and enable implementation.
10218 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
10219 implementations.
10220 * remote-utils.c (struct sym_cache, symbol_cache): New.
10221 (input_interrupt): Print a clearer message.
10222 (async_io_enabled): New variable.
10223 (enable_async_io, disable_async_io): Use it. Update comments.
10224 (look_up_one_symbol): Use the symbol cache.
10225 * thread-db.c (thread_db_look_up_symbols): New function.
10226 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
10227
f6de3c42
DJ
102282004-10-16 Daniel Jacobowitz <dan@debian.org>
10229
10230 * configure.in: Test for -rdynamic.
10231 * configure: Regenerated.
10232 * Makefile (INTERNAL_LDFLAGS): New.
10233 (gdbserver, gdbreplay): Use it.
10234
2c0fc042
AC
102352004-09-02 Andrew Cagney <cagney@gnu.org>
10236
10237 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10238
075b3282
DJ
102392004-03-23 Daniel Jacobowitz <drow@mvista.com>
10240
10241 * linux-low.c (linux_wait): Clear all_processes list also.
10242
fa6a77dc
DJ
102432004-03-12 Daniel Jacobowitz <drow@mvista.com>
10244
10245 * linux-low.c: Include <errno.h>. Remove extern declaration of
10246 errno.
10247
6d782a97
DJ
102482004-03-12 Daniel Jacobowitz <drow@mvista.com>
10249
10250 * gdbreplay.c, server.h, utils.c: Update copyright years.
10251
3a7fb99b
DJ
102522004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10253
10254 * server.c (main): Print child status or termination signal from
10255 variable 'signal', not 'sig'.
10256
c3e735a6
DJ
102572004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10258
10259 * linux-low.c (linux_read_memory): Change return type to
10260 int. Check for and return error from ptrace().
10261 * target.c (read_inferior_memory): Change return type to int. Pass
10262 back return status from the_target->read_memory().
10263 * target.h (struct target_ops): Adapt *read_memory() prototype.
10264 Update comment.
10265 (read_inferior_memory): Adapt prototype.
10266 * server.c (main): Return an error packet if
10267 read_inferior_memory() returns an error.
10268
a59d1c82
DJ
102692004-03-04 Daniel Jacobowitz <drow@mvista.com>
10270
10271 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10272 Unify with other clean targets.
10273
dc3f8883
DJ
102742004-02-29 Daniel Jacobowitz <drow@mvista.com>
10275
10276 * server.c (handle_v_cont): Call set_desired_inferior.
10277
89a208da
DJ
102782004-02-29 Daniel Jacobowitz <drow@mvista.com>
10279
10280 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10281
62ea82f5
DJ
102822004-02-29 Daniel Jacobowitz <drow@mvista.com>
10283
10284 * linux-low.c (linux_wait): Unblock async I/O.
10285 (linux_resume): Block and enable async I/O.
10286 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10287 * server.h (block_async_io, unblock_async_io): Add prototypes.
10288
6910d122
DJ
102892004-02-29 Daniel Jacobowitz <drow@mvista.com>
10290
10291 * remote-utils.c (remote_open): Print a status notice after
10292 opening a TCP port.
10293 * server.c (attach_inferior): Print a status notice after
10294 attaching.
10295
102962004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
10297
10298 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10299
c89dc5d4
DJ
103002004-02-26 Daniel Jacobowitz <drow@mvista.com>
10301
10302 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
10303 error packet.
10304 * server.c, target.h: Update copyright years.
10305
4b8dad4a
RM
103062004-02-25 Roland McGrath <roland@redhat.com>
10307
10308 * target.h (struct target_ops): New member `read_auxv'.
10309 * server.c (handle_query): Handle qPart:auxv:read: query using that.
10310 * linux-low.c (linux_read_auxv): New function.
10311 (linux_target_ops): Initialize `read_auxv' member to that.
10312
d7446758
JB
103132004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10314
10315 Committed by Jim Blandy <jimb@redhat.com>.
10316
10317 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 10318 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
10319 instead of GPR_SIZE to distiguish s390 and s390x targets.
10320
5544ad89
DJ
103212004-01-31 Daniel Jacobowitz <drow@mvista.com>
10322
10323 * linux-low.c: Update copyright year.
10324 (check_removed_breakpoint): Clear pending_is_breakpoint.
10325 (linux_set_resume_request, linux_queue_one_thread)
10326 (resume_status_pending_p): New functions.
10327 (linux_continue_one_thread): Use process->resume.
10328 (linux_resume): Only resume threads if there are no pending events.
10329 * linux-low.h (struct process_info): Add resume request
10330 pointer.
10331
2a68b70e
DJ
103322004-01-30 Daniel Jacobowitz <drow@mvista.com>
10333
10334 * regcache.c (new_register_cache): Clear the allocated register
10335 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
10336
64386c31
DJ
103372003-10-13 Daniel Jacobowitz <drow@mvista.com>
10338
10339 * linux-low.c (linux_resume): Take a struct thread_resume *
10340 argument.
10341 (linux_wait): Update call.
10342 (resume_ptr): New static variable.
10343 (linux_continue_one_thread): Renamed from
10344 linux_continue_one_process. Use resume_ptr.
10345 (linux_resume): Use linux_continue_one_thread.
10346 * server.c (handle_v_cont, handle_v_requests): New functions.
10347 (myresume): New function.
10348 (main): Handle 'v' case.
10349 * target.h (struct thread_resume): New type.
10350 (struct target_ops): Change argument of "resume" to struct
10351 thread_resume *.
10352 (myresume): Delete macro.
10353
c938e9b0
L
103542003-08-08 H.J. Lu <hongjiu.lu@intel.com>
10355
10356 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
10357 (uninstall): Support DESTDIR.
10358
7f313d07
BC
10359Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
10360
10361 * configure.srv: Add xscale*linux copy of arm*linux entry.
10362
3b2fc2ea
DJ
103632003-07-24 Daniel Jacobowitz <drow@mvista.com>
10364
10365 * linux-arm-low.c (arm_reinsert_addr): New function.
10366 (the_low_target): Add arm_reinsert_addr.
10367
1c0a559e
MK
103682003-07-08 Mark Kettenis <kettenis@gnu.org>
10369
10370 * mem-break.c: Remove whitespace at end of file.
10371
43d5792c
DJ
103722003-06-28 Daniel Jacobowitz <drow@mvista.com>
10373
10374 * configure.in: Check whether we need to prototype strerror.
10375 * server.h: Optionally prototype strerror.
10376 * gdbreplay.c (perror_with_name): Use strerror.
10377 * linux-low.c (linux_attach_lwp): Use strerror.
10378 * utils.c (perror_with_name): Use strerror.
10379 * config.in, configure: Regenerated.
10380
c8a86edf
DJ
103812003-06-28 Daniel Jacobowitz <drow@mvista.com>
10382
10383 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
10384 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
10385
73d37363
DJ
103862003-06-20 Daniel Jacobowitz <drow@mvista.com>
10387
10388 * Makefile.in (SFILES): Update.
10389 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
10390 low-sun3.c: Remove files.
10391
6ad8ae5c
DJ
103922003-06-17 Daniel Jacobowitz <drow@mvista.com>
10393
10394 * linux-low.c: Move comment to linux_thread_alive where it belonged.
10395 (linux_detach_one_process, linux_detach): New functions.
10396 (linux_target_ops): Add linux_detach.
10397 * server.c (main): Handle 'D' packet.
10398 * target.h (struct target_ops): Add "detach" member.
10399 (detach_inferior): Define.
10400
1581182a
MK
104012003-06-13 Mark Kettenis <kettenis@gnu.org>
10402
10403 From Kelley Cook <kelleycook@wideopenwest.com>:
10404 * configure.srv: Accept i[34567]86 variants.
10405
e5379b03
DJ
104062003-06-05 Daniel Jacobowitz <drow@mvista.com>
10407
10408 * linux-low.c (linux_wait_for_event): Correct comment typos.
10409 (linux_resume_one_process): Call check_removed_breakpoint.
10410 (linux_send_signal): New function.
10411 (linux_target_ops): Add linux_send_signal.
10412 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
10413 of kill.
10414 * target.h (struct target_ops): Add send_signal.
10415
2ff29de4
JB
104162003-05-29 Jim Blandy <jimb@redhat.com>
10417
10418 * linux-low.c (usr_store_inferior_registers): Transfer buf in
10419 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
10420 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
10421 away part of the register's value.
10422
254787d4
DJ
104232003-03-26 Daniel Jacobowitz <drow@mvista.com>
10424
10425 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
10426 (linux_wait_for_event, linux_init_signals): Likewise.
10427
94e10508
DJ
104282003-03-17 Daniel Jacobowitz <drow@mvista.com>
10429
10430 * configure.in: Check for stdlib.h.
10431 * configure: Regenerated.
10432 * config.in: Regenerated.
10433
4c0711e0
DJ
104342003-01-04 Andreas Schwab <schwab@suse.de>
10435
10436 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
10437
ef66e766
AC
104382003-01-02 Andrew Cagney <ac131313@redhat.com>
10439
10440 * Makefile.in: Remove obsolete code.
10441
a1358604
DJ
104422002-11-20 Daniel Jacobowitz <drow@mvista.com>
10443
10444 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
10445 defined(PT_FPR0_HI).
10446
23ce3b1c
DJ
104472002-11-17 Stuart Hughes <seh@zee2.com>
10448
10449 * linux-arm-low.c (arm_num_regs): Increase.
10450 (arm_regmap): Include status register.
10451
104522002-11-17 Daniel Jacobowitz <drow@mvista.com>
10453
10454 * linux-low.c (register_addr): Remove incorrect -1 check.
10455
a9fa9f7d
DJ
104562002-08-29 Daniel Jacobowitz <drow@mvista.com>
10457
10458 * linux-low.c (linux_create_inferior): Call setpgid. Return
10459 the new PID.
10460 (unstopped_p, linux_signal_pid): Remove.
10461 (linux_target_ops): Remove linux_signal_pid.
10462 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
10463 global instead of target method.
10464 * target.h (struct target_ops): Remove signal_pid. Update comment
10465 for create_inferior.
10466 * server.c (signal_pid): New variable.
10467 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 10468 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
10469 (attach_inferior): Set signal_pid.
10470
17574093
DJ
104712002-08-23 Daniel Jacobowitz <drow@mvista.com>
10472
10473 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
10474
104752002-08-20 Jim Blandy <jimb@redhat.com>
10476
10477 * Makefile.in (LDFLAGS): Allow the configure script to establish a
10478 default for this.
10479
104802002-08-01 Andrew Cagney <cagney@redhat.com>
10481
10482 * Makefile.in: Make chill references obsolete.
10483
104842002-07-24 Kevin Buettner <kevinb@redhat.com>
10485
10486 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
10487 * configure: Regenerate.
10488 * config.in: Regenerate.
10489
104902002-07-09 David O'Brien <obrien@FreeBSD.org>
10491
10492 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
10493 (perror_with_name, remote_close, remote_open, expect, play): Static.
10494
104952002-07-04 Michal Ludvig <mludvig@suse.cz>
10496
4b8dad4a 10497 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
10498 byte offsets instead of an array of indexes.
10499 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
10500
105012002-06-13 Daniel Jacobowitz <drow@mvista.com>
10502
10503 * regcache.c: Add comment.
10504
105052002-06-11 Daniel Jacobowitz <drow@mvista.com>
10506
10507 * thread-db.c: New file.
10508 * proc-service.c: New file.
10509 * acinclude.m4: New file.
10510 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
10511 proc-service.o, and thread-db.o.
10512 (linux-low.o): Add USE_THREAD_DB.
10513 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
10514 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
10515 * aclocal.m4: Regenerated.
10516 * config.in: Regenerated.
10517 * configure: Regenerated.
10518 * configure.in: Check for proc_service.h, sys/procfs.h,
10519 thread_db.h, and linux/elf.h headrs.
10520 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
10521 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
10522 Check for -lthread_db and thread support.
10523 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
10524 PowerPC, and SuperH.
10525 * i387-fp.c: Constify arguments.
10526 * i387-fp.h: Likewise.
10527 * inferiors.c: (struct thread_info): Renamed from
10528 `struct inferior_info'. Remove PID member. Use generic inferior
10529 list header. All uses updated.
10530 (inferiors, signal_pid): Removed.
10531 (all_threads): New variable.
10532 (get_thread): Define.
10533 (add_inferior_to_list): New function.
10534 (for_each_inferior): New function.
10535 (change_inferior_id): New function.
10536 (add_inferior): Removed.
10537 (remove_inferior): New function.
10538 (add_thread): New function.
10539 (free_one_thread): New function.
10540 (remove_thread): New function.
10541 (clear_inferiors): Use for_each_inferior and free_one_thread.
10542 (find_inferior): New function.
10543 (find_inferior_id): New function.
10544 (inferior_target_data): Update argument type.
10545 (set_inferior_target_data): Likewise.
10546 (inferior_regcache_data): Likewise.
10547 (set_inferior_regcache_data): Likewise.
10548 * linux-low.c (linux_bp_reinsert): Remove.
10549 (all_processes, stopping_threads, using_thrads)
10550 (struct pending_signals, debug_threads, pid_of): New.
10551 (inferior_pid): Replace with macro.
10552 (struct inferior_linux_data): Remove.
10553 (get_stop_pc, add_process): New functions.
10554 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
10555 Use add_process and add_thread.
10556 (linux_attach_lwp): New function, based on old linux_attach. Use
10557 add_process and add_thread. Set stop_expected for new threads.
10558 (linux_attach): New function.
10559 (linux_kill_one_process): New function.
10560 (linux_kill): Kill all LWPs.
10561 (linux_thread_alive): Use find_inferior_id.
10562 (check_removed_breakpoints, status_pending_p): New functions.
10563 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
10564 Update. Use WNOHANG. Wait for cloned processes also. Update process
10565 struct for the found process.
10566 (linux_wait_for_event): New function.
10567 (linux_wait): Use it. Support LWPs.
10568 (send_sigstop, wait_for_sigstop, stop_all_processes)
10569 (linux_resume_one_process, linux_continue_one_process): New functions.
10570 (linux_resume): Support LWPs.
10571 (REGISTER_RAW_SIZE): Remove.
10572 (fetch_register): Use register_size instead. Call supply_register.
10573 (usr_store_inferior_registers): Likewise. Call collect_register.
10574 Fix recursive case.
10575 (regsets_fetch_inferior_registers): Improve error message.
10576 (regsets_store_inferior_registers): Add debugging.
10577 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
10578 (unstopped_p, linux_signal_pid): New functions.
10579 (linux_target_ops): Add linux_signal_pid.
10580 (linux_init_signals): New function.
10581 (initialize_low): Call it. Initialize using_threads.
10582 * regcache.c (inferior_regcache_data): Add valid
10583 flag.
10584 (get_regcache): Fetch registers lazily. Add fetch argument
10585 and update all callers.
10586 (regcache_invalidate_one, regcache_invalidate): New
10587 functions.
10588 (new_register_cache): Renamed from create_register_cache.
10589 Return the new regcache.
10590 (free_register_cache): Change argument to a void *.
10591 (registers_to_string, registers_from_string): Call get_regcache
10592 with fetch flag set.
10593 (register_data): Make static. Pass fetch flag to get_regcache.
10594 (supply_register): Call get_regcache with fetch flag clear.
10595 (collect_register): Call get_regcache with fetch flag set.
10596 (collect_register_as_string): New function.
10597 * regcache.h: Update.
10598 * remote-utils.c (putpkt): Flush after debug output and use
10599 stderr.
10600 Handle input interrupts while waiting for an ACK.
10601 (input_interrupt): Use signal_pid method.
10602 (getpkt): Flush after debug output and use stderr.
10603 (outreg): Use collect_register_as_string.
10604 (new_thread_notify, dead_thread_notify): New functions.
10605 (prepare_resume_reply): Check using_threads. Set thread_from_wait
10606 and general_thread.
10607 (look_up_one_symbol): Flush after debug output.
10608 * server.c (step_thread, server_waiting): New variables.
10609 (start_inferior): Don't use signal_pid. Update call to mywait.
10610 (attach_inferior): Update call to mywait.
10611 (handle_query): Handle qfThreadInfo and qsThreadInfo.
10612 (main): Don't fetch/store registers explicitly. Use
10613 set_desired_inferior. Support proposed ``Hs'' packet. Update
10614 calls to mywait.
10615 * server.h: Update.
10616 (struct inferior_list, struct_inferior_list_entry): New.
10617 * target.c (set_desired_inferior): New.
10618 (write_inferior_memory): Constify.
10619 (mywait): New function.
10620 * target.h: Update.
10621 (struct target_ops): New signal_pid method.
10622 (mywait): Removed macro, added prototype.
10623
10624 * linux-low.h (regset_func): Removed.
10625 (regset_fill_func, regset_store_func): New.
10626 (enum regset_type): New.
10627 (struct regset_info): Add type field. Use new operation types.
10628 (struct linux_target_ops): stop_pc renamed to get_pc.
10629 Add decr_pc_after_break and breakpoint_at.
10630 (get_process, get_thread_proess, get_process_thread)
10631 (strut process_info, all_processes, linux_attach_lwp)
10632 (thread_db_init): New.
10633
10634 * linux-arm-low.c (arm_get_pc, arm_set_pc,
10635 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
10636 (the_low_target): Add new members.
10637 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
10638 (i386_store_fpxregset): Constify.
10639 (target_regsets): Add new kind identifier.
10640 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
10641 (i386_set_pc): Add debugging.
10642 (i386_breakpoint_at): New function.
10643 (the_low_target): Add new members.
10644 * linux-mips-low.c (mips_get_pc, mips_set_pc)
10645 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
10646 (mips_breakpoint_at): New.
10647 (the_low_target): Add new members.
10648 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
10649 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
10650 (the_low_target): Add new members.
10651 * linux-sh-low.c (sh_get_pc, sh_set_pc)
10652 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
10653 (the_low_target): Add new members.
10654 * linux-x86-64-low.c (target_regsets): Add new kind
10655 identifier.
10656
106572002-05-15 Daniel Jacobowitz <drow@mvista.com>
10658
10659 From Martin Pool <mbp@samba.org>:
10660 * server.c (gdbserver_usage): New function.
10661 (main): Call it.
10662
106632002-05-14 Daniel Jacobowitz <drow@mvista.com>
10664
10665 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
10666 stop_at -> stop_pc.
10667
106682002-05-04 Andrew Cagney <ac131313@redhat.com>
10669
10670 * Makefile.in: Remove obsolete code.
10671
106722002-04-24 Michal Ludvig <mludvig@suse.cz>
10673
10674 * linux-low.c (regsets_fetch_inferior_registers),
10675 (regsets_store_inferior_registers): Removed cast to int from
10676 ptrace() calls.
10677 * regcache.h: Added declaration of struct inferior_info.
10678
106792002-04-20 Daniel Jacobowitz <drow@mvista.com>
10680
10681 * inferiors.c (struct inferior_info): Add regcache_data.
10682 (add_inferior): Call create_register_cache.
10683 (clear_inferiors): Call free_register_cache.
10684 (inferior_regcache_data, set_inferior_regcache_data): New functions.
10685 * regcache.c (struct inferior_regcache_data): New.
10686 (registers): Remove.
10687 (get_regcache): New function.
10688 (create_register_cache, free_register_cache): New functions.
10689 (set_register_cache): Don't initialize the register cache here.
10690 (registers_to_string, registers_from_string, register_data): Call
10691 get_regcache.
10692 * regcache.h: Add prototypes.
10693 * server.h: Likewise.
10694
106952002-04-20 Daniel Jacobowitz <drow@mvista.com>
10696
10697 * mem-break.c: New file.
10698 * mem-break.h: New file.
10699 * Makefile.in: Add mem-break.o rule; update server.h
10700 dependencies.
10701 * inferiors.c (struct inferior_info): Add target_data
10702 member.
10703 (clear_inferiors): Free target_data member if set.
10704 (inferior_target_data, set_inferior_target_data): New functions.
10705 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
10706 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
10707 * linux-low.c (linux_bp_reinsert): New variable.
10708 (struct inferior_linux_data): New.
10709 (linux_create_inferior): Use set_inferior_target_data.
10710 (linux_attach): Likewise. Call add_inferior.
10711 (linux_wait_for_one_inferior): New function.
10712 (linux_wait): Call it.
10713 (linux_write_memory): Add const.
10714 (initialize_low): Call set_breakpoint_data.
10715 * linux-low.h (struct linux_target_ops): Add breakpoint
10716 handling members.
10717 * server.c (attach_inferior): Remove extra add_inferior
10718 call.
10719 * server.h: Include mem-break.h. Update inferior.c
10720 prototypes.
10721 * target.c (read_inferior_memory)
10722 (write_inferior_memory): New functions.
10723 * target.h (read_inferior_memory)
10724 (write_inferior_memory): Change macros to prototypes.
10725 (struct target_ops): Update comments. Add const to write_memory
10726 definition.
10727
107282002-04-11 Daniel Jacobowitz <drow@mvista.com>
10729
10730 * linux-low.c (usr_store_inferior_registers): Support
10731 registers which are allowed to fail to store.
10732 * linux-low.h (linux_target_ops): Likewise.
10733 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
10734 (ppc_cannot_store_register): FPSCR may not be storable.
10735
107362002-04-09 Daniel Jacobowitz <drow@mvista.com>
10737
10738 * server.h: Include <string.h> if HAVE_STRING_H.
10739 * ChangeLog: Correct paths in last ChangeLog entry.
10740
107412002-04-09 Daniel Jacobowitz <drow@mvista.com>
10742
10743 * linux-low.h: Remove obsolete prototypes.
10744 (struct linux_target_ops): New.
10745 (extern the_low_target): New.
10746 * linux-low.c (num_regs, regmap): Remove declarations.
10747 (register_addr): Use the_low_target explicitly.
10748 (fetch_register): Likewise.
10749 (usr_fetch_inferior_registers): Likewise.
10750 (usr_store_inferior_registers): Likewise.
10751 * linux-arm-low.c (num_regs): Remove.
10752 (arm_num_regs): Define.
10753 (arm_regmap): Renamed from regmap, made static.
10754 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
10755 made static.
10756 (arm_cannot_store_register): Renamed from cannot_store_register,
10757 made static.
10758 (the_low_target): New.
10759 * linux-i386-low.c (num_regs): Remove.
10760 (i386_num_regs): Define.
10761 (i386_regmap): Renamed from regmap, made static.
10762 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
10763 made static.
10764 (i386_cannot_store_register): Renamed from cannot_store_register,
10765 made static.
10766 (the_low_target): New.
10767 * linux-ia64-low.c (num_regs): Remove.
10768 (ia64_num_regs): Define.
10769 (ia64_regmap): Renamed from regmap, made static.
10770 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
10771 made static.
10772 (ia64_cannot_store_register): Renamed from cannot_store_register,
10773 made static.
10774 (the_low_target): New.
10775 * linux-m68k-low.c (num_regs): Remove.
10776 (m68k_num_regs): Define.
10777 (m68k_regmap): Renamed from regmap, made static.
10778 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
10779 made static.
10780 (m68k_cannot_store_register): Renamed from cannot_store_register,
10781 made static.
10782 (the_low_target): New.
10783 * linux-mips-low.c (num_regs): Remove.
10784 (mips_num_regs): Define.
10785 (mips_regmap): Renamed from regmap, made static.
10786 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
10787 made static.
10788 (mips_cannot_store_register): Renamed from cannot_store_register,
10789 made static.
10790 (the_low_target): New.
10791 * linux-ppc-low.c (num_regs): Remove.
10792 (ppc_num_regs): Define.
10793 (ppc_regmap): Renamed from regmap, made static.
10794 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
10795 made static.
10796 (ppc_cannot_store_register): Renamed from cannot_store_register,
10797 made static.
10798 (the_low_target): New.
10799 * linux-s390-low.c (num_regs): Remove.
10800 (s390_num_regs): Define.
10801 (s390_regmap): Renamed from regmap, made static.
10802 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
10803 made static.
10804 (s390_cannot_store_register): Renamed from cannot_store_register,
10805 made static.
10806 (the_low_target): New.
10807 * linux-sh-low.c (num_regs): Remove.
10808 (sh_num_regs): Define.
10809 (sh_regmap): Renamed from regmap, made static.
10810 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
10811 made static.
10812 (sh_cannot_store_register): Renamed from cannot_store_register,
10813 made static.
10814 (the_low_target): New.
10815 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
10816 (the_low_target): New.
10817
108182002-04-09 Daniel Jacobowitz <drow@mvista.com>
10819
10820 * Makefile.in: Add stamp-h target.
10821 * configure.in: Create stamp-h.
10822 * configure: Regenerated.
10823
108242002-04-09 Daniel Jacobowitz <drow@mvista.com>
10825
10826 * inferiors.c: New file.
10827 * target.c: New file.
10828 * target.h: New file.
10829 * Makefile.in: Add target.o and inferiors.o. Update
10830 dependencies.
10831 * linux-low.c (inferior_pid): New static variable,
10832 moved from server.c.
10833 (linux_create_inferior): Renamed from create_inferior.
10834 Call add_inferior. Return 0 on success instead of a PID.
10835 (linux_attach): Renamed from myattach.
10836 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
10837 (linux_thread_alive): Renamed from mythread_alive.
10838 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
10839 child dies.
10840 (linux_resume): Renamed from myresume. Add missing ``return 0''.
10841 (regsets_store_inferior_registers): Correct error message.
10842 Add missing ``return 0''.
10843 (linux_fetch_registers): Renamed from fetch_inferior_registers.
10844 (linux_store_registers): Renamed from store_inferior_registers.
10845 (linux_read_memory): Renamed from read_inferior_memory.
10846 (linux_write_memory): Renamed from write_inferior_memory.
10847 (linux_target_ops): New structure.
10848 (initialize_low): Call set_target_ops ().
10849 * remote-utils.c (unhexify): New function.
10850 (hexify): New function.
10851 (input_interrupt): Send signals to ``signal_pid''.
10852 * server.c (inferior_pid): Remove.
10853 (start_inferior): Update create_inferior call.
10854 (attach_inferior): Call add_inferior.
10855 (handle_query): New function.
10856 (main): Call handle_query for `q' packets.
10857 * server.h: Include "target.h". Remove obsolete prototypes.
10858 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
10859
108602002-04-09 Daniel Jacobowitz <drow@mvista.com>
10861
10862 * Makefile.in: Add WARN_CFLAGS. Update configury
10863 dependencies.
10864 * configure.in: Check for <string.h>
10865 * configure: Regenerate.
10866 * config.in: Regenerate.
10867 * gdbreplay.c: Include needed system headers.
10868 (remote_open): Remove strchr prototype.
10869 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
10870 * regcache.c (supply_register): Change buf argument to const void *.
10871 (supply_register_by_name): Likewise.
10872 (collect_register): Change buf argument to void *.
10873 (collect_register_by_name): Likewise.
10874 * regcache.h: Add missing prototypes.
10875 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
10876 * server.c (handle_query): New function.
10877 (attached): New static variable, moved out of main.
10878 (main): Quiet longjmp clobber warnings.
10879 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
10880 * utils.c (error): Remove NORETURN.
10881 (fatal): Likewise.