]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
quit_force: Replace TRY_CATCH wrapper macros
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
60a191ed
YQ
12015-03-06 Yao Qi <yao.qi@linaro.org>
2
3 * linux-aarch64-low.c (aarch64_insert_point): Use
4 show_debug_regs as a boolean.
5 (aarch64_remove_point): Likewise.
6
f5771b1d
PA
72015-03-05 Pedro Alves <palves@redhat.com>
8
9 * lynx-low.c (lynx_target_ops): Install NULL hooks for
10 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
11 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
12 * nto-low.c (nto_target_ops): Likewise.
13 * spu-low.c (spu_target_ops): Likewise.
14 * win32-low.c (win32_target_ops): Likewise.
15
3e572f71
PA
162015-03-04 Pedro Alves <palves@redhat.com>
17
18 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
19 Decide whether a breakpoint triggered based on the SIGTRAP's
20 siginfo.si_code.
21 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
22 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
23 (linux_low_filter_event): Check for breakpoints before checking
24 watchpoints.
25 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
26 siginfo.si_code.
27 (linux_stopped_by_sw_breakpoint)
28 (linux_supports_stopped_by_sw_breakpoint)
29 (linux_stopped_by_hw_breakpoint)
30 (linux_supports_stopped_by_hw_breakpoint): New functions.
31 (linux_target_ops): Install new target methods.
32
1ec68e26
PA
332015-03-04 Pedro Alves <palves@redhat.com>
34
35 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
36 * server.c (swbreak_feature, hwbreak_feature): New globals.
37 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
38 (captured_main): Clear swbreak_feature and hwbreak_feature.
39 * server.h (swbreak_feature, hwbreak_feature): Declare.
40 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
41 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
42 supports_stopped_by_hw_breakpoint>: New fields.
43 (target_supports_stopped_by_sw_breakpoint)
44 (target_stopped_by_sw_breakpoint)
45 (target_supports_stopped_by_hw_breakpoint)
46 (target_stopped_by_hw_breakpoint): Declare.
47
15c66dd6
PA
482015-03-04 Pedro Alves <palves@redhat.com>
49
50 enum lwp_stop_reason -> enum target_stop_reason
51 * linux-low.c (check_stopped_by_breakpoint): Adjust.
52 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
53 (linux_wait_1, stuck_in_jump_pad_callback)
54 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
55 (linux_stopped_by_watchpoint):
56 * linux-low.h (enum lwp_stop_reason): Delete.
57 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
58 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
59
98fc70d6
YQ
602015-03-04 Yao Qi <yao.qi@linaro.org>
61
62 * Makefile.in (SFILES): Add linux-aarch64-low.c.
63
dd2ac174
GB
642015-03-03 Gary Benson <gbenson@redhat.com>
65
66 * hostio.c (handle_vFile): Fix prefix lengths.
67
d68e53f4
MM
682015-03-03 Markus Metzger <markus.t.metzger@intel.com>
69
70 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
71 ptr_bits.
72
bf2d68ab
AA
732015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
74
75 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
76 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
77 (clean): Add "rm -f" for above C files.
78 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
79 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
80 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
81 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
82 * linux-s390-low.c (HWCAP_S390_VX): New macro.
83 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
84 (init_registers_s390x_vx_linux64)
85 (init_registers_s390x_tevx_linux64)
86 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
87 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
88 declarations.
89 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
90 (s390_store_vxrs_high): New functions.
91 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
92 NT_S390_VXRS_HIGH.
93 (s390_arch_setup): Add logic for selecting one of the new target
94 descriptions. Activate the new vector regsets if applicable.
95 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
96 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
97 and init_registers_s390x_tevx_linux64.
98
c966a859
PA
992015-03-01 Pedro Alves <palves@redhat.com>
100
101 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
102 parameter.
103
4180215b
PA
1042015-02-27 Pedro Alves <palves@redhat.com>
105
106 * linux-x86-low.c (u_debugreg_offset): New function.
107 (x86_linux_dr_get, x86_linux_dr_set): Use it.
108
749bab01
PA
1092015-02-27 Pedro Alves <palves@redhat.com>
110
111 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
112 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
113 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
114 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
115 (ps_lsetfpregs, ps_getpid)
116 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
117 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
118 (ps_lsetxregs, ps_plog): Declare.
119
3c14e5a3
PA
1202015-02-27 Pedro Alves <palves@redhat.com>
121
122 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
123 IP_AGENT_EXPORT_FUNC.
124 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
125 IP_AGENT_EXPORT_FUNC.
126 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
127 (IP_AGENT_EXPORT): Delete.
128 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
129 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
130 (gdb_trampoline_buffer_error, collecting, gdb_collect)
131 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
132 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
133 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
134 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
135 (traceframe_read_count, traceframe_write_count)
136 (traceframes_created, trace_state_variables, get_raw_reg)
137 (get_trace_state_variable_value, set_trace_state_variable_value)
138 (ust_loaded, helper_thread_id, cmd_buf): Use
139 IPA_SYM_EXPORTED_NAME.
140 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
141 (tracepoints) Use IP_AGENT_EXPORT_VAR.
142 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
143 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
144 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
145 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
146 EXTERN_C_PUSH/EXTERN_C_POP.
147 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
148 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
149 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
150 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
151 (traceframe_write_count, traceframe_read_count)
152 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
153 (about_to_request_buffer_space, get_trace_state_variable_value)
154 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
155 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
156 EXTERN_C_PUSH/EXTERN_C_POP.
157 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
158 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
159 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
160 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
161 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
162 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
163 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
164 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
165 Define.
166 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
167 (IP_AGENT_EXPORT_VAR_DECL): Define.
168 (tracing): Declare.
169 (gdb_agent_get_raw_reg): Declare.
170
fe978cb0
PA
1712015-02-27 Tom Tromey <tromey@redhat.com>
172 Pedro Alves <palves@redhat.com>
173
174 Rename symbols whose names are reserved C++ keywords throughout.
175
3bc3d82a
PA
1762015-02-27 Pedro Alves <palves@redhat.com>
177
178 * Makefile.in (COMPILER): New, get it from autoconf.
179 (CXX): Get from autoconf instead.
180 (COMPILE.pre): Use COMPILER.
181 (CC-LD): Rename to ...
182 (CC_LD): ... this. Use COMPILER.
183 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
184 (CXX_FOR_TARGET): Default to g++ instead of gcc.
185 * acinclude.m4: Include build-with-cxx.m4.
186 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
187 Disable -Werror by default if building in C++ mode.
188 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
189 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
190 the C++ compiler. Save/restore CXXFLAGS too.
191 * configure: Regenerate.
192
07697489
PA
1932015-02-27 Pedro Alves <palves@redhat.com>
194
195 * acinclude.m4: Include libiberty.m4.
196 * configure.ac: Call libiberty_INIT.
197 * config.in, configure: Regenerate.
198
9beb7c4e
PA
1992015-02-26 Pedro Alves <palves@redhat.com>
200
201 * linux-low.c (linux_wait_1): When incrementing the PC past a
202 program breakpoint always use the_low_target.breakpoint_len as
203 increment, rather than the maximum between that and
204 the_low_target.decr_pc_after_break.
205
8090aef2
PA
2062015-02-23 Pedro Alves <palves@redhat.com>
207
208 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
209 thread was doing a step-over; always adjust the PC if
210 we stepped over a permanent breakpoint.
211 (linux_wait_1): If we stepped over breakpoint that was on top of a
212 permanent breakpoint, manually advance the PC past it.
213
bc9540e8
PA
2142015-02-23 Pedro Alves <palves@redhat.com>
215
216 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
217 modes.
218 (x86_fill_gregset, x86_store_gregset): Use it when handling
219 $orig_eax.
220
2db9a427
PA
2212015-02-20 Pedro Alves <palves@redhat.com>
222
223 * thread-db.c: Include "nat/linux-procfs.h".
224 (thread_db_init): Skip listing new threads if the kernel supports
225 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
226
afa8d396
PA
2272015-02-20 Pedro Alves <palves@redhat.com>
228
229 * linux-low.c (status_pending_p_callback): Use ptid_match.
230
c9587f88
AT
2312015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
232
233 PR breakpoints/16812
234 * linux-low.c (wstatus_maybe_breakpoint): Remove.
235 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
236 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
237
b05ec7a5
AT
2382015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
239
240 PR breakpoints/15956
241 * tracepoint.c (cmd_qtinit): Add check for current_thread.
242
d33501a5
MM
2432015-02-09 Markus Metzger <markus.t.metzger@intel.com>
244
245 * linux-low.c (linux_low_btrace_conf): Print size.
246 * server.c (handle_btrace_conf_general_set): New.
247 (hanle_general_set): Call handle_btrace_conf_general_set.
248 (handle_query): Report Qbtrace-conf:bts:size as supported.
249
f4abbc16
MM
2502015-02-09 Markus Metzger <markus.t.metzger@intel.com>
251
252 * linux-low.c (linux_low_enable_btrace): Update parameters.
253 (linux_low_btrace_conf): New.
254 (linux_target_ops)<to_btrace_conf>: Initialize.
255 * server.c (current_btrace_conf): New.
256 (handle_btrace_enable): Rename to ...
257 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
258 to target_enable_btrace. Update comment. Update users.
259 (handle_qxfer_btrace_conf): New.
260 (qxfer_packets): Add btrace-conf entry.
261 (handle_query): Report qXfer:btrace-conf:read as supported packet.
262 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
263 (target_ops)<read_btrace_conf>: New.
264 (target_enable_btrace): Update parameters.
265 (target_read_btrace_conf): New.
266
043c3577
MM
2672015-02-09 Markus Metzger <markus.t.metzger@intel.com>
268
269 * server.c (handle_btrace_general_set): Remove call to
270 target_supports_btrace.
271 (supported_btrace_packets): New.
272 (handle_query): Call supported_btrace_packets.
273 * target.h: include btrace-common.h.
274 (btrace_target_info): Removed.
275 (supports_btrace, target_supports_btrace): Update parameters.
276
734b0e4b
MM
2772015-02-09 Markus Metzger <markus.t.metzger@intel.com>
278
279 * Makefile.in (SFILES): Add common/btrace-common.c.
280 (OBS): Add common/btrace-common.o.
281 (btrace-common.o): Add build rules.
282 * linux-low: Include btrace-common.h.
283 (linux_low_read_btrace): Use struct btrace_data. Call
284 btrace_data_init and btrace_data_fini.
285
d6c146e9
PA
2862015-02-06 Pedro Alves <palves@redhat.com>
287
288 * thread-db.c (find_new_threads_callback): Add debug output.
289
20ba1ce6
PA
2902015-02-04 Pedro Alves <palves@redhat.com>
291
292 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
293 (resume_stopped_resumed_lwps): New function.
294 (linux_wait_for_event_filtered): Use it.
295
8cc73a39
SDJ
2962015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
297
298 * Makefile.in (SFILES): Add linux-personality.c.
299 (linux-personality.o): New rule.
300 * configure.srv (srv_linux_obj): Add linux-personality.o to the
301 list of objects to be built.
302 * linux-low.c: Include nat/linux-personality.h.
303 (linux_create_inferior): Remove code to disable address space
304 randomization (moved to ../nat/linux-personality.c). Create
305 cleanup to disable address space randomization.
306
fb23d554
SDJ
3072015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
308
309 * Makefile.in (posix-strerror.o): New rule.
310 (mingw-strerror.o): Likewise.
311 * configure: Regenerated.
312 * configure.ac: Source file ../common/common.host. Initialize new
313 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
314
cdf43629
YQ
3152015-01-14 Yao Qi <yao@codesourcery.com>
316
317 * Makefile.in (SFILES): Add nat/ppc-linux.c.
318 (ppc-linux.o): New rule.
319 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
320 * configure.ac: AC_CHECK_FUNCS(getauxval).
321 * config.in: Re-generated.
322 * configure: Re-generated.
323 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
324 ppc64_64bit_inferior_p
325
514c5338
YQ
3262015-01-14 Yao Qi <yao@codesourcery.com>
327
328 * linux-ppc-low.c: Include "nat/ppc-linux.h".
329 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
330 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
331 (PT_ORIG_R3, PT_TRAP): Likewise.
332 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
333 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
334 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
335
3368c1e5
JB
3362015-01-10 Joel Brobecker <brobecker@adacore.com>
337
338 * i387-fp.c (i387_cache_to_xsave): In look over
339 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
340 zmmh_low_space field by use of zmmh_high_space.
341
582511be
PA
3422015-01-09 Pedro Alves <palves@redhat.com>
343
344 * linux-low.c (step_over_bkpt): Move higher up in the file.
345 (handle_extended_wait): Don't store the stop_pc here.
346 (get_stop_pc): Adjust comments and rename to ...
347 (check_stopped_by_breakpoint): ... this. Record whether the LWP
348 stopped for a software breakpoint or hardware breakpoint.
349 (thread_still_has_status_pending_p): New function.
350 (status_pending_p_callback): Use
351 thread_still_has_status_pending_p. If the event is no longer
352 interesting, resume the LWP.
353 (handle_tracepoints): Add assert.
354 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
355 (wstatus_maybe_breakpoint): New function.
356 (cancel_breakpoint): Delete function.
357 (check_stopped_by_watchpoint): New function, factored out from
358 linux_low_filter_event.
359 (lp_status_maybe_breakpoint): Delete function.
360 (linux_low_filter_event): Remove filter_ptid argument.
361 Leave thread group exits pending here. Store the LWP's stop PC.
362 Always leave events pending.
363 (linux_wait_for_event_filtered): Pull all events out of the
364 kernel, and leave them all pending.
365 (count_events_callback, select_event_lwp_callback): Consider all
366 events.
367 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
368 (select_event_lwp): Only give preference to the stepping LWP in
369 all-stop mode. Adjust comments.
370 (ignore_event): New function.
371 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
372 references to cancel_breakpoints. Adjust to renames. Also give
373 equal priority to all LWPs that have had events in non-stop mode.
374 If reporting a software breakpoint event, unadjust the LWP's PC.
375 (linux_wait): If linux_wait_1 returned an ignored event, retry.
376 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
377 Adjust.
378 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
379 (resume_status_pending_p): Use thread_still_has_status_pending_p.
380 (linux_stopped_by_watchpoint): Adjust.
381 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
382 * linux-low.h (enum lwp_stop_reason): New.
383 (struct lwp_info) <stop_pc>: Adjust comment.
384 <stopped_by_watchpoint>: Delete field.
385 <stop_reason>: New field.
386 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
387 * mem-break.c (software_breakpoint_inserted_here)
388 (hardware_breakpoint_inserted_here): New function.
389 * mem-break.h (software_breakpoint_inserted_here)
390 (hardware_breakpoint_inserted_here): Declare.
391 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
392 (cancel_breakpoints): Delete.
393 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
394 (upload_fast_traceframes): Remove references to
395 cancel_breakpoints.
396
a33e3959
PA
3972015-01-09 Pedro Alves <palves@redhat.com>
398
399 * thread-db.c (find_new_threads_callback): Ignore thread if the
400 kernel thread ID is -1.
401
8784d563
PA
4022015-01-09 Pedro Alves <palves@redhat.com>
403
404 * linux-low.c (linux_attach_fail_reason_string): Move to
405 nat/linux-ptrace.c, and rename.
406 (linux_attach_lwp): Update comment.
407 (attach_proc_task_lwp_callback): New function.
408 (linux_attach): Adjust to rename and use
409 linux_proc_attach_tgid_threads.
410 (linux_attach_fail_reason_string): Delete declaration.
411
76f2b779
JB
4122015-01-01 Joel Brobecker <brobecker@adacore.com>
413
414 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
415 * server.c (gdbserver_version): Likewise.
416
fafcc06a
SDJ
4172014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
418
419 * remote-utils.c: Include ctype.h.
420 (input_interrupt): Explicitly handle the case when the char
421 received is the NUL byte. Improve the printing of non-ASCII
422 characters.
423
beed38b8
JB
4242014-12-16 Joel Brobecker <brobecker@adacore.com>
425
426 * linux-low.c (linux_low_filter_event): Update call to
427 linux_enable_event_reporting following the addition of
428 a new parameter to that function.
429
bf330350
CU
4302014-12-16 Catalin Udma <catalin.udma@freescale.com>
431
432 PR server/17457
433 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
434 (AARCH64_FPCR_REGNO): Likewise.
435 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
436 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
437 (aarch64_store_fpregset): Likewise.
438
5227d625
JB
4392014-12-15 Joel Brobecker <brobecker@adacore.com>
440
441 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
442 Remove FIXME comment about assumption about N.
443
f93b65a0
JB
4442014-12-13 Joel Brobecker <brobecker@adacore.com>
445
446 * configure.ac: If large-file support is disabled in GDBserver,
447 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
448 * configure: Regenerate.
449
e5a9158d
AA
4502014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
451
452 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
453 warning upon ENODATA from ptrace.
454 * linux-s390-low.c (s390_store_tdb): New.
455 (s390_regsets): Add regset for NT_S390_TDB.
456
feea5f36
AA
4572014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
458
459 * linux-low.c (regsets_store_inferior_registers): Skip regsets
460 without a fill_function.
461 * linux-s390-low.c (s390_fill_last_break): Remove.
462 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
463 (s390_arch_setup): Use regset's size instead of fill_function for
464 loop end condition.
465
098dbe61
AA
4662014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
467
468 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
469 the regset's store function when ptrace returned an error.
470 * regcache.c (get_thread_regcache): Invalidate register cache
471 before fetching inferior's registers.
472
28eef672
AA
4732014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
474
475 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
476 while-loop as for-loop.
477 (regsets_store_inferior_registers): Likewise.
478
bdca27a2
YQ
4792014-11-28 Yao Qi <yao@codesourcery.com>
480
481 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
482 * config.in, configure: Re-generate.
483 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
484 is defined.
485
9c232dda
YQ
4862014-11-21 Yao Qi <yao@codesourcery.com>
487
488 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
489 (AC_CHECK_HEADERS): Remove malloc.h.
490 * configure: Re-generated.
491 * config.in: Re-generated.
492 * server.h: Don't include alloca.h and malloc.h.
493 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
494 Don't include malloc.h.
495
43968415
JB
4962014-11-17 Joel Brobecker <brobecker@adacore.com>
497
498 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
499 corresponding ERRNO check in same block.
500
40e91bc7
PA
5012014-11-12 Pedro Alves <palves@redhat.com>
502
503 * server.c (cont_thread): Update comment.
504 (start_inferior, attach_inferior): No longer clear cont_thread.
505 (handle_v_cont): No longer set cont_thread.
506 (captured_main): Clear cont_thread each time a GDB connects.
507
c2c118cf
PA
5082014-11-12 Pedro Alves <palves@redhat.com>
509
510 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
511 thread, and don't resume all threads if the Hc thread has exited.
512
78708b7c
PA
5132014-11-12 Pedro Alves <palves@redhat.com>
514
515 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
516 the process group instead of to a specific LWP.
517
a2abc7de
PA
5182014-10-15 Pedro Alves <palves@redhat.com>
519
520 PR server/17487
521 * win32-arm-low.c (arm_set_thread_context): Remove current_event
522 parameter.
523 (arm_set_thread_context): Delete.
524 (the_low_target): Adjust.
525 * win32-i386-low.c (debug_registers_changed)
526 (debug_registers_used): Delete.
527 (update_debug_registers_callback): New function.
528 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
529 needing to update their debug registers.
530 (win32_get_current_dr): New function.
531 (x86_dr_low_get_addr, x86_dr_low_get_control)
532 (x86_dr_low_get_status): Fetch the debug register from the thread
533 record's context.
534 (i386_initial_stuff): Adjust.
535 (i386_get_thread_context): Remove current_event parameter. Don't
536 clear debug_registers_changed nor copy DR values to
537 debug_reg_state.
538 (i386_set_thread_context): Delete.
539 (i386_prepare_to_resume): New function.
540 (i386_thread_added): Mark the thread as needing to update irs
541 debug registers.
542 (the_low_target): Remove i386_set_thread_context and install
543 i386_prepare_to_resume.
544 * win32-low.c (win32_get_thread_context): Adjust.
545 (win32_set_thread_context): Use SetThreadContext
546 directly.
547 (win32_prepare_to_resume): New function.
548 (win32_require_context): New function, factored out from ...
549 (thread_rec): ... this.
550 (continue_one_thread): Call win32_prepare_to_resume on each thread
551 we're about to continue.
552 (win32_resume): Call win32_prepare_to_resume on the event thread.
553 * win32-low.h (struct win32_thread_info)
554 <debug_registers_changed>: New field.
555 (struct win32_target_ops): Change prototype of set_thread_context,
556 delete set_thread_context and add prepare_to_resume.
557 (win32_require_context): New declaration.
558
a442d071
GB
5592014-10-08 Gary Benson <gbenson@redhat.com>
560
561 * server.h: Do not include common-exceptions.h.
562
6f1947e8
GB
5632014-10-08 Gary Benson <gbenson@redhat.com>
564
565 * server.h: Do not include cleanups.h.
566
63b434a4
JH
5672014-09-30 James Hogan <james.hogan@imgtec.com>
568
569 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
570 mips64-dsp-linux.c.
571
c4d9ceb6
YQ
5722014-09-23 Yao Qi <yao@codesourcery.com>
573
574 * linux-low.c (lp_status_maybe_breakpoint): New function.
575 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
576 (count_events_callback): Likewise.
577 (select_event_lwp_callback): Likewise.
578 (cancel_breakpoints_callback): Likewise.
579
89a5711c
DB
5802014-09-19 Don Breazeal <donb@codesourcery.com>
581
582 * linux-low.c (handle_extended_wait): Call
583 linux_ptrace_get_extended_event.
584 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
585 linux_is_extended_waitstatus.
586
bffc0964
JB
5872014-09-16 Joel Brobecker <brobecker@adacore.com>
588
589 * Makefile.in (CPPFLAGS): Define.
590 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
591 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
592
0bfdf32f
GB
5932014-09-16 Gary Benson <gbenson@redhat.com>
594
595 * inferiors.h (current_inferior): Renamed as...
596 (current_thread): New variable. All uses updated.
597 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
598 (maybe_move_out_of_jump_pad): Likewise.
599 (cancel_breakpoint): Likewise.
600 (linux_low_filter_event): Likewise.
601 (wait_for_sigstop): Likewise.
602 (linux_resume_one_lwp): Likewise.
603 (need_step_over_p): Likewise.
604 (start_step_over): Likewise.
605 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
606 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
607 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
608 and save_inferior as saved_thread.
609 * regcache.c (get_thread_regcache): Renamed saved_inferior as
610 saved_thread.
611 (regcache_invalidate_thread): Likewise.
612 * remote-utils.c (prepare_resume_reply): Likewise.
613 * thread-db.c (thread_db_get_tls_address): Likewise.
614 (disable_thread_event_reporting): Likewise.
615 (remove_thread_event_breakpoints): Likewise.
616 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
617 as saved_thread.
618 * target.h (set_desired_inferior): Renamed as...
619 (set_desired_thread): New declaration. All uses updated.
620 * server.c (myresume): Updated comment to reference thread instead
621 of inferior.
622 (handle_serial_event): Likewise.
623 (handle_target_event): Likewise.
624
361c8ade
GB
6252014-09-12 Tom Tromey <tromey@redhat.com>
626 Gary Benson <gbenson@redhat.com>
627
628 * regcache.h: Include common-regcache.h.
629 (regcache_read_pc): Don't declare.
630 * regcache.c (get_thread_regcache_for_ptid): New function.
631
bd9269f7
GB
6322014-09-11 Tom Tromey <tromey@redhat.com>
633 Gary Benson <gbenson@redhat.com>
634
635 * symbol.c: New file.
636 * Makefile.in (SFILES): Add symbol.c.
637 (OBS): Add symbol.o.
638
f8c1d06b
GB
6392014-09-11 Gary Benson <gbenson@redhat.com>
640
641 * target.c (target_stop_ptid, target_continue_ptid): New
642 functions.
643
721ec300
GB
6442014-09-11 Tom Tromey <tromey@redhat.com>
645 Gary Benson <gbenson@redhat.com>
646
647 * target.h: Include target/target.h.
648 * target.c (target_read_memory, target_read_uint32)
649 (target_write_memory): New functions.
650
c5e92cca
GB
6512014-09-11 Gary Benson <gbenson@redhat.com>
652
653 * server.h (debug_hw_points): Don't declare.
654 * server.c (debug_hw_points): Don't define. Replace all uses
655 with show_debug_regs.
656 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
657 all uses with show_debug_regs.
658
2e4bb98a
EBM
6592014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
660
661 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
662 endianness into account.
663 (ppc_supply_ptrace_register): Likewise.
664
ac740bc7
JH
6652014-09-03 James Hogan <james.hogan@imgtec.com>
666
667 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
668 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
669
97ea6506
GB
6702014-09-03 Gary Benson <gbenson@redhat.com>
671
672 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
673 ALL_DEBUG_ADDRESS_REGISTERS.
674
df7e5265
GB
6752014-09-02 Gary Benson <gbenson@redhat.com>
676
677 * i386-low.h: Renamed as...
678 * x86-low.h: New file. All type, function and variable name
679 prefixes changed from "i386_" to "x86_". All references updated.
680 * i386-low.c: Renamed as...
681 * x86-low.c: New file. All type, function and variable name
682 prefixes changed from "i386_" to "x86_". All references updated.
683
ed859da7
GB
6842014-09-02 Gary Benson <gbenson@redhat.com>
685
686 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
687 (x86_linux_new_thread): Likewise.
688
860789c7
GB
6892014-08-29 Gary Benson <gbenson@redhat.com>
690
691 * server.h (setjmp.h): Do not include.
692 (toplevel): Do not declare.
693 (common-exceptions.h): Include.
694 (cleanups.h): Likewise.
695 * server.c (toplevel): Do not define.
696 (exit_code): New static global.
697 (detach_or_kill_for_exit_cleanup): New function.
698 (main): New function. Original main renamed to...
699 (captured_main): New function.
700 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
701
ff55e1b5
GB
7022014-08-29 Gary Benson <gbenson@redhat.com>
703
704 * Makefile.in (SFILES): Add common/common-exceptions.c.
705 (OBS): Add common-exceptions.o.
706 (common-exceptions.o): New rule.
707 * utils.c (prepare_to_throw_exception): New function.
708
e9bcb658
GB
7092014-08-29 Gary Benson <gbenson@redhat.com>
710
711 * config.in: Regenerate.
712 * configure: Likewise.
713
e3180625
GB
7142014-08-29 Gary Benson <gbenson@redhat.com>
715
716 * Makefile.in (SFILES): Add common/cleanups.c.
717 (OBS): cleanups.o.
718 (cleanups.o): New rule.
719
e3d6ba5d
GB
7202014-08-29 Gary Benson <gbenson@redhat.com>
721
722 * utils.c (internal_vwarning): New function.
723
7096e886
GB
7242014-08-28 Gary Benson <gbenson@redhat.com>
725
726 * utils.h (fatal): Remove declaration.
727 * utils.c (fatal): Remove function.
728
14ce3192
GB
7292014-08-28 Gary Benson <gbenson@redhat.com>
730
731 * tracepoint.c (gdb_agent_init): Replace fatal with
732 perror_with_name.
733 (initialize_tracepoint): Likewise.
734
50278d59
GB
7352014-08-28 Gary Benson <gbenson@redhat.com>
736
737 * remote-utils.c (remote_prepare): Replace fatal with error.
738
aa96c426
GB
7392014-08-28 Gary Benson <gbenson@redhat.com>
740
741 * linux-low.c (linux_async): Replace fatal with warning.
742 Tidy up and return.
743 (linux_start_non_stop): Return -1 if linux_async failed.
744
f7160e97
GB
7452014-08-28 Gary Benson <gbenson@redhat.com>
746
747 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
748 gdb_assert.
749 (i386_dr_low_get_addr): Remove vague comment.
750 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
751 gdb_assert.
752
38e08fca
GB
7532014-08-28 Gary Benson <gbenson@redhat.com>
754
755 * inferiors.c (get_thread_process): Replace check with gdb_assert.
756 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
757 internal_error.
758 (linux_resume_one_lwp): Likewise.
759 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
760 gdb_assert.
761 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
762 with internal_error.
763 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
764 (init_register_cache): Replace fatal with gdb_assert_not_reached.
765 (find_register_by_name): Replace fatal with internal_error.
766 (find_regno): Likewise.
767 * tdesc.c (init_target_desc): Replace check with gdb_assert.
768 * thread-db.c (thread_db_create_event): Likewise.
769 (thread_db_load_search): Likewise.
770 (try_thread_db_load_1): Likewise.
771 * tracepoint.c (get_jump_space_head): Replace fatal with
772 internal_error.
773 (claim_trampoline_space): Likewise.
774 (have_fast_tracepoint_trampoline_buffer): Likewise.
775 (cmd_qtstart): Likewise.
776 (stop_tracing): Likewise.
777 (fast_tracepoint_collecting): Likewise.
778 (target_malloc): Likewise.
779 (download_tracepoint): Likewise.
780 (download_trace_state_variables): Replace check with gdb_assert.
781 (upload_fast_traceframes): Replace fatal with internal_error.
782
34abf635
GB
7832014-08-19 Tom Tromey <tromey@redhat.com>
784 Gary Benson <gbenson@redhat.com>
785
786 * Makefile.in (SFILES): Add common/common-debug.c.
787 (OBS): Add common-debug.o.
788 (common-debug.o): New rule.
789 * debug.h (debug_printf): Don't declare.
790 * debug.c (debug_printf): Renamed and rewritten as...
791 (debug_vprintf): New function.
792
f6e94d78
GB
7932014-08-19 Gary Benson <gbenson@redhat.com>
794
795 * utils.h: Do not include print-utils.h.
796
9239eeab
GB
7972014-08-19 Tom Tromey <tromey@redhat.com>
798 Gary Benson <gbenson@redhat.com>
799
800 * server.h: Add static assertion.
801 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
802
ef87c8bb
GB
8032014-08-19 Tom Tromey <tromey@redhat.com>
804 Gary Benson <gbenson@redhat.com>
805
806 * Makefile.in (SFILES): Add common/errors.c.
807 (OBS): Add errors.o.
808 (IPA_OBS): Add errors-ipa.o.
809 (errors.o): New rule.
810 (errors-ipa.o): Likewise.
811 * utils.h (perror_with_name, error, warning): Don't declare.
812 * utils.c (warning): Renamed and rewritten as...
813 (vwarning): New function.
814 (error): Renamed and rewritten as...
815 (verror): New function.
816 (internal_error): Renamed and rewritten as...
817 (internal_verror): New function.
818
bb974a24
GB
8192014-08-07 Gary Benson <gbenson@redhat.com>
820
821 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
822 * configure: Regenerate.
823 * config.in: Likewise.
824 * server.h: Do not include errno.h.
825 * event-loop.c: Likewise.
826 * hostio-errno.c: Likewise.
827 * linux-low.c: Likewise.
828 * remote-utils.c: Likewise.
829 * spu-low.c: Likewise.
830 * utils.c: Likewise.
831 * gdbreplay.c: Unconditionally include errno.h.
832
6d3d12eb
GB
8332014-08-07 Gary Benson <gbenson@redhat.com>
834
835 * server.h: Do not include string.h.
836 * event-loop.c: Likewise.
837 * linux-low.c: Likewise.
838 * regcache.c: Likewise.
839 * remote-utils.c: Likewise.
840 * spu-low.c: Likewise.
841 * utils.c: Likewise.
842
dccbb609
GB
8432014-08-07 Gary Benson <gbenson@redhat.com>
844
845 * server.h: Do not include gdb_assert.h.
846
e76df0d0
GB
8472014-08-07 Gary Benson <gbenson@redhat.com>
848
849 * server.h: Do not include common-utils.h.
850
4cb9c816
GB
8512014-08-07 Gary Benson <gbenson@redhat.com>
852
853 * server.h: Do not include ptid.h.
854 * notif.h: Likewise.
855
3995eeee
GB
8562014-08-07 Gary Benson <gbenson@redhat.com>
857
858 * server.h: Do not include gdb_locale.h.
859
cb9f1a9b
GB
8602014-08-07 Gary Benson <gbenson@redhat.com>
861
862 * server.h: Do not include gdb/signals.h.
863 * win32-low.c: Likewise.
864
a5fceff8
GB
8652014-08-07 Gary Benson <gbenson@redhat.com>
866
867 * server.h: Do not include pathmax.h.
868
b9391142
GB
8692014-08-07 Gary Benson <gbenson@redhat.com>
870
871 * server.h: Do not include libiberty.h.
872 * linux-bfin-low.c: Likewise.
873
0e443c87
GB
8742014-08-07 Gary Benson <gbenson@redhat.com>
875
876 * server.h: Do not include ansidecl.h.
877
8ebb3f56
GB
8782014-08-07 Gary Benson <gbenson@redhat.com>
879
880 * linux-x86-low.c: Do not include stddef.h.
881 * lynx-ppc-low.c: Likewise.
882 * tracepoint.c: Likewise.
883
8980bdf6
GB
8842014-08-07 Gary Benson <gbenson@redhat.com>
885
886 * server.h: Do not include stdarg.h.
887 * nto-low.c: Likewise.
888
d7096f71
GB
8892014-08-07 Gary Benson <gbenson@redhat.com>
890
891 * server.h: Do not include stdlib.h.
892 * inferiors.c: Likewise.
893 * linux-low.c: Likewise.
894 * regcache.c: Likewise.
895 * spu-low.c: Likewise.
896 * tracepoint.c: Likewise.
897 * utils.c: Likewise.
898
d02f550d
GB
8992014-08-07 Gary Benson <gbenson@redhat.com>
900
901 * server.h: Do not include stdio.h.
902 * linux-low.c: Likewise.
903 * remote-utils.c: Likewise.
904 * spu-low.c: Likewise.
905 * utils.c: Likewise.
906 * wincecompat.c: Likewise.
907
87f6c4e3
GB
9082014-08-06 Gary Benson <gbenson@redhat.com>
909
910 * regcache.c (init_register_cache): Move conditionals inside if.
911
7089dca4
GB
9122014-08-06 Gary Benson <gbenson@redhat.com>
913
914 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
915
462f517e
GB
9162014-07-31 Gary Benson <gbenson@redhat.com>
917
918 * ax.h: Do not include server.h.
919 * gdbthread.h: Likewise.
920 * lynx-low.h: Likewise.
921 * notif.h: Likewise.
922
976411d6
GB
9232014-07-30 Gary Benson <gbenson@redhat.com>
924
925 * server.h: Include common-defs.h.
926 Do not include config.h or build-gnulib-gdbserver/config.h.
927
d41f6d8e
GB
9282014-07-30 Gary Benson <gbenson@redhat.com>
929
930 * hostio-errno.c: Move server.h to top of includes list.
931 * inferiors.c: Likewise.
932 * linux-x86-low.c: Likewise.
933 * notif.c: Include server.h.
934
314c6a35
TT
9352014-07-24 Tom Tromey <tromey@redhat.com>
936 Gary Benson <gbenson@redhat.com>
937
938 * server.h (CORE_ADDR): Now unsigned.
939
69ff6be5
PA
9402014-07-16 Pedro Alves <palves@redhat.com>
941
942 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
943
ce9e3fe7
PA
9442014-07-15 Pedro Alves <palves@redhat.com>
945
946 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
947 copy.
948
e76126e8
PA
9492014-07-11 Pedro Alves <palves@redhat.com>
950
951 * linux-low.c (kill_wait_lwp): New function, based on
952 kill_one_lwp_callback, but use my_waitpid directly.
953 (kill_one_lwp_callback, linux_kill): Use it.
954
8e9db26e
PA
9552014-06-23 Pedro Alves <palves@redhat.com>
956
957 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
958 before setting DR0..DR3.
959
698b3e08
GB
9602014-06-20 Gary Benson <gbenson@redhat.com>
961
962 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
963 * configure: Regenerated.
964 * config.in: Likewise.
965
125f8a3d
GB
9662014-06-20 Gary Benson <gbenson@redhat.com>
967
968 * Makefile.in (SFILES): Update locations for files moved
969 from common to nat.
970 (object file files): Reordered.
971
42995dbd
GB
9722014-06-20 Gary Benson <gbenson@redhat.com>
973
974 * i386-low.h (i386_dr_low_can_set_addr): Removed.
975 (i386_dr_low_set_addr): Likewise.
976 (i386_dr_low_get_addr): Likewise.
977 (i386_dr_low_can_set_control): Likewise.
978 (i386_dr_low_set_control): Likewise.
979 (i386_dr_low_get_control): Likewise.
980 (i386_dr_low_get_status): Likewise.
981 (i386_get_debug_register_length): Likewise.
982 * linux-x86-low.c (i386_dr_low_set_addr):
983 Changed signature. Made static.
984 (i386_dr_low_get_addr): Likewise.
985 (i386_dr_low_set_control): Likewise.
986 (i386_dr_low_get_control): Likewise.
987 (i386_dr_low_get_status): Likewise.
988 (i386_dr_low): New global variable.
989 * win32-i386-low.c (i386_dr_low_set_addr):
990 Changed signature. Made static.
991 (i386_dr_low_get_addr): Likewise.
992 (i386_dr_low_set_control): Likewise.
993 (i386_dr_low_get_control): Likewise.
994 (i386_dr_low_get_status): Likewise.
995 (i386_dr_low): New global variable.
996
e1d2394b
MS
9972014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
998
999 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1000 * Makefile.in (AR, AR_FLAGS): Define.
1001 * configure: Regenerate.
1002
3a8ee006
GB
10032014-06-19 Gary Benson <gbenson@redhat.com>
1004
1005 * Makefile.in (i386-dregs.o): New rule.
1006 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
1007 * i386-low.c (target.h): Remove include.
1008 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
1009 (DR_CONTROL_SHIFT): Likewise.
1010 (DR_CONTROL_SIZE): Likewise.
1011 (DR_RW_EXECUTE): Likewise.
1012 (DR_RW_WRITE): Likewise.
1013 (DR_RW_READ): Likewise.
1014 (DR_RW_IORW): Likewise.
1015 (DR_LEN_1): Likewise.
1016 (DR_LEN_2): Likewise.
1017 (DR_LEN_4): Likewise.
1018 (DR_LEN_8): Likewise.
1019 (DR_LOCAL_ENABLE_SHIFT): Likewise.
1020 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1021 (DR_ENABLE_SIZE): Likewise.
1022 (DR_LOCAL_SLOWDOWN): Likewise.
1023 (DR_GLOBAL_SLOWDOWN): Likewise.
1024 (DR_CONTROL_RESERVED): Likewise.
1025 (I386_DR_CONTROL_MASK): Likewise.
1026 (I386_DR_VACANT): Likewise.
1027 (I386_DR_LOCAL_ENABLE): Likewise.
1028 (I386_DR_GLOBAL_ENABLE): Likewise.
1029 (I386_DR_DISABLE): Likewise.
1030 (I386_DR_SET_RW_LEN): Likewise.
1031 (I386_DR_GET_RW_LEN): Likewise.
1032 (I386_DR_WATCH_HIT): Likewise.
1033 (i386_wp_op_t): Likewise.
1034 (i386_show_dr): Likewise.
1035 (i386_length_and_rw_bits): Likewise.
1036 (i386_insert_aligned_watchpoint): Likewise.
1037 (i386_remove_aligned_watchpoint): Likewise.
1038 (i386_handle_nonaligned_watchpoint): Likewise.
1039 i386_update_inferior_debug_regs(): Likewise.
1040 (i386_dr_insert_watchpoint): Likewise.
1041 (i386_dr_remove_watchpoint): Likewise.
1042 (i386_dr_region_ok_for_watchpoint): Likewise.
1043 (i386_dr_stopped_data_address): Likewise.
1044 (i386_dr_stopped_by_watchpoint): Likewise.
1045
8f26655c
GB
10462014-06-19 Gary Benson <gbenson@redhat.com>
1047
1048 * i386-low.c (i386_dr_show): Renamed to
1049 i386_show_dr and made static. All uses updated.
1050 (i386_dr_length_and_rw_bits): Renamed to
1051 i386_length_and_rw_bits and made static.
1052 All uses updated.
1053 (i386_dr_insert_aligned_watchpoint): Renamed to
1054 i386_insert_aligned_watchpoint and made static.
1055 All uses updated.
1056 (i386_dr_remove_aligned_watchpoint): Renamed to
1057 i386_remove_aligned_watchpoint and made static.
1058 All uses updated.
1059 (i386_dr_update_inferior_debug_regs): Renamed to
1060 i386_update_inferior_debug_regs and made static.
1061 All uses updated.
1062
b9228891
GB
10632014-06-18 Gary Benson <gbenson@redhat.com>
1064
5171def3
GB
1065 * i386-low.h (i386_dr_low_can_set_addr): New macro.
1066 (i386_dr_low_can_set_control): Likewise.
1067 (i386_get_debug_register_length): Likewise.
1068 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
1069 (i386_dr_low_can_set_control): Likewise.
1070 (i386_get_debug_register_length): Likewise.
1071
10722014-06-17 Gary Benson <gbenson@redhat.com>
1073
b9228891
GB
1074 * i386-low.h (i386-dregs.h): New include.
1075 (DR_FIRSTADDR): Now in i386-dregs.h.
1076 (DR_LASTADDR): Likewise.
1077 (DR_NADDR): Likewise.
1078 (DR_STATUS): Likewise.
1079 (DR_CONTROL): Likewise.
1080 (i386_debug_reg_state): Likewise.
1081 (i386_dr_insert_watchpoint): Likewise.
1082 (i386_dr_remove_watchpoint): Likewise.
1083 (i386_dr_region_ok_for_watchpoint): Likewise.
1084 (i386_dr_stopped_data_address): Likewise.
1085 (i386_dr_stopped_by_watchpoint): Likewise.
1086 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
1087
4be83cc2
GB
10882014-06-18 Gary Benson <gbenson@redhat.com>
1089
1090 * i386-low.h (i386_low_insert_watchpoint): Renamed to
1091 i386_dr_insert_watchpoint.
1092 (i386_low_remove_watchpoint): Renamed to
1093 i386_dr_remove_watchpoint.
1094 (i386_low_region_ok_for_watchpoint): Renamed to
1095 i386_dr_region_ok_for_watchpoint.
1096 (i386_low_stopped_data_address): Renamed to
1097 i386_dr_stopped_data_address.
1098 (i386_low_stopped_by_watchpoint): Renamed to
1099 i386_dr_stopped_by_watchpoint.
1100 * i386-low.c (i386_show_dr): Renamed to
1101 i386_dr_show and made nonstatic. All uses updated.
1102 (i386_length_and_rw_bits): Renamed to
1103 i386_dr_length_and_rw_bits and made nonstatic.
1104 All uses updated.
1105 (i386_insert_aligned_watchpoint): Renamed to
1106 i386_dr_insert_aligned_watchpoint and made nonstatic.
1107 All uses updated.
1108 (i386_remove_aligned_watchpoint): Renamed to
1109 i386_dr_remove_aligned_watchpoint and made nonstatic.
1110 All uses updated.
1111 (i386_update_inferior_debug_regs): Renamed to
1112 i386_dr_update_inferior_debug_regs and made nonstatic.
1113 All uses updated.
1114 (i386_low_insert_watchpoint): Renamed to
1115 i386_dr_insert_watchpoint. All uses updated.
1116 (i386_low_remove_watchpoint): Renamed to
1117 i386_dr_remove_watchpoint. All uses updated.
1118 (i386_low_region_ok_for_watchpoint): Renamed to
1119 i386_dr_region_ok_for_watchpoint. All uses updated.
1120 (i386_low_stopped_data_address): Renamed to
1121 i386_dr_stopped_data_address. All uses updated.
1122 (i386_low_stopped_by_watchpoint): Renamed to
1123 i386_dr_stopped_by_watchpoint. All uses updated.
1124
131aa0d4
GB
11252014-06-18 Gary Benson <gbenson@redhat.com>
1126
1127 * i386-low.c (i386_dr_low_can_set_addr): New macro.
1128 (i386_dr_low_can_set_control): Likewise.
1129 (i386_insert_aligned_watchpoint): New check.
1130
d9305f7f
GB
11312014-06-18 Gary Benson <gbenson@redhat.com>
1132
1133 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
1134 Renamed to state.
1135
e927c9fc
GB
11362014-06-18 Gary Benson <gbenson@redhat.com>
1137
1138 * i386-low.c (i386_length_and_rw_bits): Use internal_error
1139 instead of fatal and error.
1140 (i386_handle_nonaligned_watchpoint): Likewise.
1141
1b6d4134
GB
11422014-06-18 Gary Benson <gbenson@redhat.com>
1143
1144 * i386-low.c (i386_get_debug_register_length): New macro.
1145 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
1146 (i386_show_dr): Use debug_printf instead of fprintf. Use
1147 phex to format values.
1148
6e62758f
GB
11492014-06-18 Gary Benson <gbenson@redhat.com>
1150
1151 * i386-low.h: Comment changes.
1152 * i386-low.c: Likewise.
1153
fc6e2f03
GB
11542014-06-18 Gary Benson <gbenson@redhat.com>
1155
1156 * i386-low.c: Whitespace changes.
1157
f9d1eeed
TT
11582014-06-12 Tom Tromey <tromey@redhat.com>
1159
1160 * utils.c (freeargv): Remove.
1161
0b04e523
TT
11622014-06-12 Tom Tromey <tromey@redhat.com>
1163
1164 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
1165 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
1166 (parse_debug_format_options): Likewise.
1167 (gdbserver_usage): Likewise.
1168 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
1169 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
1170 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
1171 against libiberty.
1172 ($(LIBGNU)): Depend on libiberty.
1173 (all-lib): Recurse into all subdirs.
1174 (install-only): Invoke "install" target in subdirs.
1175 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1176 targets.
1177 * configure: Rebuild.
1178 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
1179 for vasprintf, vsnprintf, or gettimeofday.
1180 * configure.srv: Don't add safe-ctype.o or lbasename.o to
1181 srv_tgtobj.
1182
270c9937
JB
11832014-06-05 Joel Brobecker <brobecker@adacore.com>
1184
1185 * development.sh: Delete.
1186 * Makefile.in (config.status): Adjust dependency on development.sh.
1187 * configure.ac: Adjust development.sh source call.
1188 * configure: Regenerate.
1189
0a261ed8
PA
11902014-06-02 Pedro Alves <palves@redhat.com>
1191
1192 * ax.c (gdb_free_agent_expr): New function.
1193 * ax.h (gdb_free_agent_expr): New declaration.
1194 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1195 list.
1196 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1197 static.
1198 (clear_breakpoint_conditions_and_commands): New function.
1199 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1200 (clear_breakpoint_conditions_and_commands): New declaration.
1201
e9dae05e
RR
12022014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1203
1204 * linux-aarch64-low.c (asm/ptrace.h): Include.
1205
5876f503
JK
12062014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1207
1208 Fix TLS access for -static -pthread.
1209 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1210 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1211 (thread_db_load_search, try_thread_db_load_1): Initialize it.
1212
802e8e6d
PA
12132014-05-20 Pedro Alves <palves@redhat.com>
1214
1215 * linux-aarch64-low.c (aarch64_insert_point)
1216 (aarch64_remove_point): No longer check whether the type is
1217 supported here. Adjust to new interface.
1218 (the_low_target): Install aarch64_supports_z_point_type as
1219 supports_z_point_type method.
1220 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
1221 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
1222 instead of a Z packet char. Adjust.
1223 (arm_supports_z_point_type): New function.
1224 (arm_insert_point, arm_remove_point): Adjust to new interface.
1225 (the_low_target): Install arm_supports_z_point_type.
1226 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1227 (cris_insert_point, cris_remove_point): Adjust to new interface.
1228 Don't check whether the type is supported here.
1229 (the_low_target): Install cris_supports_z_point_type.
1230 * linux-low.c (linux_supports_z_point_type): New function.
1231 (linux_insert_point, linux_remove_point): Adjust to new interface.
1232 * linux-low.h (struct linux_target_ops) <insert_point,
1233 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1234 raw_breakpoint pointer parameter.
1235 <supports_z_point_type>: New method.
1236 * linux-mips-low.c (mips_supports_z_point_type): New function.
1237 (mips_insert_point, mips_remove_point): Adjust to new interface.
1238 Use mips_supports_z_point_type.
1239 (the_low_target): Install mips_supports_z_point_type.
1240 * linux-ppc-low.c (the_low_target): Install NULL as
1241 supports_z_point_type method.
1242 * linux-s390-low.c (the_low_target): Install NULL as
1243 supports_z_point_type method.
1244 * linux-sparc-low.c (the_low_target): Install NULL as
1245 supports_z_point_type method.
1246 * linux-x86-low.c (x86_supports_z_point_type): New function.
1247 (x86_insert_point): Adjust to new insert_point interface. Use
1248 insert_memory_breakpoint. Adjust to new
1249 i386_low_insert_watchpoint interface.
1250 (x86_remove_point): Adjust to remove_point interface. Use
1251 remove_memory_breakpoint. Adjust to new
1252 i386_low_remove_watchpoint interface.
1253 (the_low_target): Install x86_supports_z_point_type.
1254 * lynx-low.c (lynx_target_ops): Install NULL as
1255 supports_z_point_type callback.
1256 * nto-low.c (nto_supports_z_point_type): New.
1257 (nto_insert_point, nto_remove_point): Adjust to new interface.
1258 (nto_target_ops): Install nto_supports_z_point_type.
1259 * mem-break.c: Adjust intro comment.
1260 (struct raw_breakpoint) <raw_type, size>: New fields.
1261 <inserted>: Update comment.
1262 <shlib_disabled>: Delete field.
1263 (enum bkpt_type) <gdb_breakpoint>: Delete value.
1264 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1265 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1266 (raw_bkpt_type_to_target_hw_bp_type): New function.
1267 (find_enabled_raw_code_breakpoint_at): New function.
1268 (find_raw_breakpoint_at): New type and size parameters. Use them.
1269 (insert_memory_breakpoint): New function, based off
1270 set_raw_breakpoint_at.
1271 (remove_memory_breakpoint): New function.
1272 (set_raw_breakpoint_at): Reimplement.
1273 (set_breakpoint): New, based on set_breakpoint_at.
1274 (set_breakpoint_at): Reimplement.
1275 (delete_raw_breakpoint): Go through the_target->remove_point
1276 instead of assuming memory breakpoints.
1277 (find_gdb_breakpoint_at): Delete.
1278 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1279 (find_gdb_breakpoint): New function.
1280 (set_gdb_breakpoint_at): Delete.
1281 (z_type_supported): New function.
1282 (set_gdb_breakpoint_1): New function, loosely based off
1283 set_gdb_breakpoint_at.
1284 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1285 (delete_gdb_breakpoint_at): Delete.
1286 (delete_gdb_breakpoint_1): New function, loosely based off
1287 delete_gdb_breakpoint_at.
1288 (delete_gdb_breakpoint): New function.
1289 (clear_gdb_breakpoint_conditions): Rename to ...
1290 (clear_breakpoint_conditions): ... this. Don't handle a NULL
1291 breakpoint.
1292 (add_condition_to_breakpoint): Make static.
1293 (add_breakpoint_condition): Take a struct breakpoint pointer
1294 instead of an address. Adjust.
1295 (gdb_condition_true_at_breakpoint): Rename to ...
1296 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1297 z_type parameter.
1298 (gdb_condition_true_at_breakpoint): Reimplement.
1299 (add_breakpoint_commands): Take a struct breakpoint pointer
1300 instead of an address. Adjust.
1301 (gdb_no_commands_at_breakpoint): Rename to ...
1302 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
1303 parameter. Return true if no breakpoint was found. Change debug
1304 output.
1305 (gdb_no_commands_at_breakpoint): Reimplement.
1306 (run_breakpoint_commands): Rename to ...
1307 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
1308 and change return type to boolean.
1309 (run_breakpoint_commands): New function.
1310 (gdb_breakpoint_here): Also check for Z1 breakpoints.
1311 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
1312 breakpoint. Go through the_target->remove_point instead of
1313 assuming memory breakpoint.
1314 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
1315 software and hardware breakpoints.
1316 (reinsert_raw_breakpoint): Go through the_target->insert_point
1317 instead of assuming memory breakpoint.
1318 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
1319 software and hardware breakpoints.
1320 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
1321 Check both software and hardware breakpoints.
1322 (validate_inserted_breakpoint): Assert the breakpoint is a
1323 software breakpoint. Set the inserted flag to -1 instead of
1324 setting shlib_disabled.
1325 (delete_disabled_breakpoints): Adjust.
1326 (validate_breakpoints): Only validate software breakpoints.
1327 Adjust to inserted flag change.
1328 (check_mem_read, check_mem_write): Skip breakpoint types other
1329 than software breakpoints. Adjust to inserted flag change.
1330 * mem-break.h (enum raw_bkpt_type): New enum.
1331 (raw_breakpoint, struct process_info): Forward declare.
1332 (Z_packet_to_target_hw_bp_type): Delete declaration.
1333 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
1334 (set_gdb_breakpoint, delete_gdb_breakpoint)
1335 (clear_breakpoint_conditions): New declarations.
1336 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
1337 (breakpoint_inserted_here): Update comment.
1338 (add_breakpoint_condition, add_breakpoint_commands): Replace
1339 address parameter with a breakpoint pointer parameter.
1340 (gdb_breakpoint_here): Update comment.
1341 (delete_gdb_breakpoint_at): Delete.
1342 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
1343 * server.c (process_point_options): Take a struct breakpoint
1344 pointer instead of an address. Adjust.
1345 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
1346 delete_gdb_breakpoint.
1347 * spu-low.c (spu_target_ops): Install NULL as
1348 supports_z_point_type method.
1349 * target.h: Include mem-break.h.
1350 (struct target_ops) <prepare_to_access_memory>: Update comment.
1351 <supports_z_point_type>: New field.
1352 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1353 instead of a char. Also take a raw breakpoint pointer.
1354 * win32-arm-low.c (the_low_target): Install NULL as
1355 supports_z_point_type.
1356 * win32-i386-low.c (i386_supports_z_point_type): New function.
1357 (i386_insert_point, i386_remove_point): Adjust to new interface.
1358 (the_low_target): Install i386_supports_z_point_type.
1359 * win32-low.c (win32_supports_z_point_type): New function.
1360 (win32_insert_point, win32_remove_point): Adjust to new interface.
1361 (win32_target_ops): Install win32_supports_z_point_type.
1362 * win32-low.h (struct win32_target_ops):
1363 <supports_z_point_type>: New method.
1364 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1365 instead of a char. Also take a raw breakpoint pointer.
1366
932539e3
PA
13672014-05-20 Pedro Alves <palves@redhat.com>
1368
1369 * mem-break.h: Include break-common.h.
1370 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1371 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
1372 (Z_packet_to_target_hw_bp_type): New declaration.
1373 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
1374 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
1375 (Z_PACKET_ACCESS_WP): Delete macros.
1376 (Z_packet_to_hw_type): Delete function.
1377 * i386-low.h: Don't include break-common.h here.
1378 (Z_packet_to_hw_type): Delete declaration.
1379 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
1380 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1381 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
1382 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1383 * linux-aarch64-low.c: Don't include break-common.h here.
1384 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1385 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
1386 (Z_packet_to_target_hw_bp_type): Delete function.
1387 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
1388 function.
1389 (mips_insert_point, mips_remove_point): Use
1390 Z_packet_to_target_hw_bp_type.
1391
4ff0d3d8
PA
13922014-05-20 Pedro Alves <palves@redhat.com>
1393
1394 * linux-aarch64-low.c: Include break-common.h.
1395 (enum target_point_type): Delete.
1396 (Z_packet_to_point_type): Rename to ...
1397 (Z_packet_to_target_hw_bp_type): ... this, and return a
1398 target_hw_bp_type instead.
1399 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
1400 instead of an enum target_point_type.
1401 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
1402 breakpoint type.
1403 (aarch64_dr_state_insert_one_point)
1404 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
1405 (aarch64_handle_aligned_watchpoint)
1406 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
1407 Take an enum target_hw_bp_type instead of an enum
1408 target_point_type.
1409 (aarch64_supports_z_point_type): New function.
1410 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
1411 use Z_packet_to_target_hw_bp_type.
1412
786dc519
JB
14132014-05-20 Joel Brobecker <brobecker@adacore.com>
1414
1415 * configure.ac: Only use -Werror by default when DEVELOPMENT
1416 is true.
1417 * configure: Regenerate.
1418
9e0aa64f
JK
14192014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
1420
1421 Fix gdbserver qGetTLSAddr for x86_64 -m32.
1422 * linux-x86-low.c (X86_64_USER_REGS): New.
1423 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
1424
2b577b92
YQ
14252014-04-28 Yao Qi <yao@codesourcery.com>
1426
1427 * Makefile.in (i386-avx512.c): Fix the typo of generated file
1428 name.
1429
94611da2
PA
14302014-04-25 Pedro Alves <palves@redhat.com>
1431
1432 PR server/16255
1433 * linux-low.c (linux_attach_fail_reason_string): New function.
1434 (linux_attach_lwp): Delete.
1435 (linux_attach_lwp_1): Rename to ...
1436 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
1437 argument. Remove "initial" parameter. Return int instead of
1438 void. Don't error or warn here.
1439 (linux_attach): Adjust to call linux_attach_lwp. Call error on
1440 failure to attach to the tgid. Call warning when failing to
1441 attach to an lwp.
1442 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
1443 argument. Remove "initial" parameter. Return int instead of
1444 void. Don't error or warn here.
1445 (linux_attach_fail_reason_string): New declaration.
1446 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
1447 interface change. Use linux_attach_fail_reason_string.
1448
01f9f808
MS
14492014-04-24 Michael Sturm <michael.sturm@mintel.com>
1450 Walfred Tedeschi <walfred.tedeschi@intel.com>
1451
1452 * Makefile.in: Added rules to handle new files
1453 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
1454 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
1455 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
1456 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
1457 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
1458 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
1459 x32-avx512-linux.o.
1460 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
1461 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
1462 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
1463 i386/x32-avx512.xml.
1464 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
1465 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
1466 i386/x32-avx512-linux.xml.
1467 * i387-fp.c (num_avx512_k_registers): New constant for number
1468 of K registers.
1469 (num_avx512_zmmh_low_registers): New constant for number of
1470 lower ZMM registers (0-15).
1471 (num_avx512_zmmh_high_registers): New constant for number of
1472 higher ZMM registers (16-31).
1473 (num_avx512_ymmh_registers): New contant for number of higher
1474 YMM registers (ymm16-31 added by avx521 on x86_64).
1475 (num_avx512_xmm_registers): New constant for number of higher
1476 XMM registers (xmm16-31 added by AVX512 on x86_64).
1477 (struct i387_xsave): Add space for AVX512 registers.
1478 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
1479 Add code to handle AVX512 registers.
1480 (i387_xsave_to_cache): Add code to handle AVX512 registers.
1481 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
1482 prototypei from generated file.
1483 (tdesc_amd64_avx512_linux): Likewise.
1484 (init_registers_x32_avx512_linux): Likewise.
1485 (tdesc_x32_avx512_linux): Likewise.
1486 (init_registers_i386_avx512_linux): Likewise.
1487 (tdesc_i386_avx512_linux): Likewise.
1488 (x86_64_regmap): Add AVX512 registers.
1489 (x86_linux_read_description): Add code to handle AVX512 XSTATE
1490 mask.
1491 (initialize_low_arch): Add code to initialize AVX512 registers.
1492
51aa91f9
PA
14932014-04-23 Pedro Alves <palves@redhat.com>
1494
1495 * mem-break.c (find_gdb_breakpoint_at): Make static.
1496 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
1497
a4165e94
PA
14982014-04-23 Pedro Alves <palves@redhat.com>
1499
1500 * i386-low.c: Don't include break-common.h here.
1501 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1502 prototype to take target_hw_bp_type as argument instead of a Z
1503 packet char.
1504 * i386-low.h: Include break-common.h here.
1505 (Z_packet_to_hw_type): Declare.
1506 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1507 prototypes.
1508 * linux-x86-low.c (x86_insert_point): Convert the packet number to
1509 a target_hw_bp_type before calling i386_low_insert_watchpoint.
1510 (x86_remove_point): Convert the packet number to a
1511 target_hw_bp_type before calling i386_low_remove_watchpoint.
1512 * win32-i386-low.c (i386_insert_point): Convert the packet number
1513 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
1514 (i386_remove_point): Convert the packet number to a
1515 target_hw_bp_type before calling i386_low_remove_watchpoint.
1516
b8acf843
PA
15172014-04-23 Pedro Alves <palves@redhat.com>
1518
1519 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
1520
d708bcd1
PA
15212014-04-10 Pedro Alves <palves@redhat.com>
1522
1523 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1524 Check if the condition or command is NULL before checking if the
1525 breakpoint is known. On success, return true.
1526 * mem-break.h (add_breakpoint_condition): Document return.
1527 (add_breakpoint_commands): Add describing comment.
1528 * server.c (skip_to_semicolon): New function.
1529 (process_point_options): Use it.
1530
2eec7d5b
PA
15312014-04-09 Pedro Alves <palves@redhat.com>
1532
1533 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
1534 to lwpid_of.
1535
fa96cb38
PA
15362014-02-27 Pedro Alves <palves@redhat.com>
1537
1538 PR 12702
1539 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
1540 macros.
1541 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
1542 output.
1543 (last_thread_of_process_p): Take a PID argument instead of a
1544 thread pointer.
1545 (linux_wait_for_lwp): Delete.
1546 (num_lwps, check_zombie_leaders, not_stopped_callback): New
1547 functions.
1548 (linux_low_filter_event): New function, party factored out from
1549 linux_wait_for_event.
1550 (linux_wait_for_event): Rename to ...
1551 (linux_wait_for_event_filtered): ... this. Add new filter ptid
1552 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
1553 sigsuspend. Check for zombie leaders.
1554 (linux_wait_for_event): Reimplement as wrapper around
1555 linux_wait_for_event_filtered.
1556 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
1557 a normal or signal exit is seen, it's the whole process exiting.
1558 (wait_for_sigstop): No longer a for_each_inferior callback.
1559 Rewrite on top of linux_wait_for_event_filtered.
1560 (stop_all_lwps): Call wait_for_sigstop directly.
1561 * server.c (resume, handle_target_event): Handle
1562 TARGET_WAITKIND_NO_RESUMED.
1563
d763de10
JB
15642014-02-26 Joel Brobecker <brobecker@adacore.com>
1565
1566 * win32-low.c (psapi_get_dll_name,
1567 * win32_CreateToolhelp32Snapshot): Delete.
1568 (win32_CreateToolhelp32Snapshot, win32_Module32First)
1569 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
1570 Delete.
1571 (handle_load_dll): Add function description.
1572 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
1573
850a0f76
JB
15742014-02-26 Joel Brobecker <brobecker@adacore.com>
1575
1576 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
1577 Add comment.
1578 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
1579 base address when calling win32_add_one_solib.
1580 (handle_load_dll): Delete local variable load_addr.
1581 Remove 0x1000 offset applied to DLL base address when calling
1582 win32_add_one_solib.
1583 (handle_unload_dll): Add comment.
1584
f25b3fc3
JB
15852014-02-26 Joel Brobecker <brobecker@adacore.com>
1586
1587 * win32-low.c (win32_add_all_dlls): Renames
1588 win32_ensure_ntdll_loaded. Rewrite function documentation.
1589 Adjust implementation to always load all DLLs.
1590 Add 0x1000 offset to DLL base address when calling
1591 win32_add_one_solib.
1592 (child_initialization_done): New static global.
1593 (do_initial_child_stuff): Set child_initialization_done to
1594 zero during child initialization, and 1 after. Replace call
1595 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
1596 Add comment.
1597 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
1598 (handle_unload_dll): Add function documentation.
1599 (get_child_debug_event): Ignore load and unload DLL events
1600 during child initialization.
1601
d86d4aaf
DE
16022014-02-20 Doug Evans <dje@google.com>
1603
3bc32da3 1604 Remove global all_lwps.
d86d4aaf
DE
1605 * inferiors.h (ptid_of): Move here from linux-low.h.
1606 (pid_of, lwpid_of): Ditto.
1607 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
1608 parameter is a struct thread_info * now.
1609 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
1610 directly. Pass &all_threads to find_inferior instead of &all_lwps.
1611 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
1612 directly.
1613 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
1614 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
1615 * linux-arm-low.c (update_registers_callback): Update, "entry"
1616 parameter is a struct thread_info * now.
1617 Fetch lwpid from current_inferior directly.
1618 (arm_insert_point): Pass &all_threads to find_inferior instead of
1619 &all_lwps.
1620 (arm_remove_point): Ditto.
1621 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
1622 (arm_prepare_to_resume): Fetch pid from thread.
1623 (arm_read_description): Fetch lwpid from current_inferior directly.
1624 * linux-low.c (all_lwps): Delete.
1625 (delete_lwp): Delete call to remove_inferior.
1626 (handle_extended_wait): Fetch lwpid from thread.
1627 (add_lwp): Don't set lwp->entry.id. Remove call to
1628 add_inferior_to_list.
1629 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
1630 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
1631 (kill_one_lwp_callback): Ditto.
1632 (linux_kill): Don't dereference NULL pointer.
1633 Fetch ptid,lwpid from thread.
1634 (get_detach_signal): Fetch ptid from thread.
1635 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
1636 Simplify call to regcache_invalidate_thread.
1637 (delete_lwp_callback): Update, "entry" parameter is a
1638 struct thread_info * now. Fetch pid from thread.
1639 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
1640 (status_pending_p_callback): Update, "entry" parameter is a
1641 struct thread_info * now. Fetch ptid from thread.
1642 (find_lwp_pid): Update, "entry" parameter is a
1643 struct thread_info * now.
1644 (linux_wait_for_lwp): Fetch pid from thread.
1645 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
1646 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
1647 (enqueue_one_deferred_signal): Fetch lwpid from thread.
1648 (dequeue_one_deferred_signal): Ditto.
1649 (cancel_breakpoint): Fetch ptid from current_inferior.
1650 (linux_wait_for_event): Pass &all_threads to find_inferior,
1651 not &all_lwps. Fetch ptid, lwpid from thread.
1652 (count_events_callback): Update, "entry" parameter is a
1653 struct thread_info * now.
1654 (select_singlestep_lwp_callback): Ditto.
1655 (select_event_lwp_callback): Ditto.
1656 (cancel_breakpoints_callback): Ditto.
1657 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
1658 not &all_lwps.
1659 (select_event_lwp): Ditto. Fetch ptid from event_thread.
1660 (unsuspend_one_lwp): Update, "entry" parameter is a
1661 struct thread_info * now.
1662 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
1663 not &all_lwps.
1664 (linux_stabilize_threads): Ditto. And for for_each_inferior.
1665 Fetch lwpid from thread, not lwp.
1666 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
1667 Pass &all_threads to find_inferior, not &all_lwps.
1668 (send_sigstop): Fetch lwpid from thread, not lwp.
1669 (send_sigstop_callback): Update, "entry" parameter is a
1670 struct thread_info * now.
1671 (suspend_and_send_sigstop_callback): Ditto.
1672 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
1673 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
1674 struct thread_info * now.
1675 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
1676 from thread, lwp.
1677 (lwp_running): Update, "entry" parameter is a
1678 struct thread_info * now.
1679 (stop_all_lwps): Fetch ptid from thread.
1680 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
1681 (linux_resume_one_lwp): Fetch lwpid from thread.
1682 (linux_set_resume_request): Update, "entry" parameter is a
1683 struct thread_info * now. Fetch pid, lwpid from thread.
1684 (resume_status_pending_p): Update, "entry" parameter is a
1685 struct thread_info * now.
1686 (need_step_over_p): Ditto. Fetch lwpid from thread.
1687 (start_step_over): Fetch lwpid from thread.
1688 (linux_resume_one_thread): Update, "entry" parameter is a
1689 struct thread_info * now. Fetch lwpid from thread.
1690 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
1691 (proceed_one_lwp): Update, "entry" parameter is a
1692 struct thread_info * now. Fetch lwpid from thread.
1693 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
1694 struct thread_info * now.
1695 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
1696 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
1697 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
1698 directly.
1699 (regsets_store_inferior_registers): Ditto.
1700 (fetch_register, store_register): Ditto.
1701 (linux_read_memory, linux_write_memory): Ditto.
1702 (linux_request_interrupt): Ditto.
1703 (linux_read_auxv): Ditto.
1704 (linux_xfer_siginfo): Ditto.
1705 (linux_qxfer_spu): Ditto.
1706 (linux_qxfer_libraries_svr4): Ditto.
1707 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
1708 moved to inferiors.h.
1709 (get_lwp): Delete.
1710 (get_thread_lwp): Update.
1711 (struct lwp_info): Delete member "entry". Simplify comment for
1712 member "thread".
1713 (all_lwps): Delete.
1714 * linux-mips-low.c (mips_read_description): Fetch lwpid from
1715 current_inferior directly.
1716 (update_watch_registers_callback): Update, "entry" parameter is a
1717 struct thread_info * now. Fetch pid from thread.
1718 (mips_linux_prepare_to_resume): Fetch ptid from thread.
1719 (mips_insert_point): Fetch lwpid from current_inferior.
1720 Pass &all_threads to find_inferior, not &all_lwps.
1721 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
1722 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
1723 directly.
1724 (mips_stopped_data_address): Ditto.
1725 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
1726 directly.
1727 * linux-tile-low.c (tile_arch_setup): Ditto.
1728 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
1729 (update_debug_registers_callback): Update, "entry" parameter is a
1730 struct thread_info * now. Fetch pid from thread.
1731 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
1732 Pass &all_threads to find_inferior, not &all_lwps.
1733 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
1734 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
1735 Pass &all_threads to find_inferior, not &all_lwps.
1736 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
1737 (i386_dr_low_get_status): Ditto.
1738 (x86_linux_prepare_to_resume): Fetch ptid from thread.
1739 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
1740 (x86_linux_read_description): Ditto.
1741 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
1742
3b8361aa
DE
17432014-02-20 Doug Evans <dje@google.com>
1744
1745 * inferiors.c (get_first_inferior): Fix buglet.
1746
f7667f0d
DE
17472014-02-19 Doug Evans <dje@google.com>
1748
1749 * gdbthread.h (add_thread): Change result type to struct thread_info *.
1750 * inferiors.c (add_thread): Change result type to struct thread_info *.
1751 All callers updated.
1752 (add_lwp): Call add_thread here instead of in callers.
1753 All callers updated.
1754 * linux-low.h (get_lwp_thread): Rewrite.
1755 (struct lwp_info): New member "thread".
1756
b3312d80
DE
17572014-02-19 Doug Evans <dje@google.com>
1758
1759 * linux-low.c (add_lwp): Change result to struct lwp_info *.
1760 All callers updated.
1761
ecc6f45c
DE
17622014-02-19 Doug Evans <dje@google.com>
1763
1764 * inferiors.c (add_thread): Fix whitespace.
1765
649ebbca
DE
17662014-02-19 Doug Evans <dje@google.com>
1767
1768 * dll.c (clear_dlls): Replace accessing list implemention details
1769 with API function.
1770 * gdbthread.h (get_first_thread): Declare.
1771 * inferiors.c (for_each_inferior_with_data): New function.
1772 (get_first_thread): New function.
1773 (find_thread_ptid): Simplify.
1774 (get_first_inferior): New function.
1775 (clear_list): Delete.
1776 (one_inferior_p): New function.
1777 (clear_inferior_list): New function.
1778 (clear_inferiors): Update.
1779 * inferiors.h (for_each_inferior_with_data): Declare.
1780 (clear_inferior_list): Declare.
1781 (one_inferior_p): Declare.
1782 (get_first_inferior): Declare.
1783 * linux-low.c (linux_wait_for_event): Replace accessing list
1784 implemention details with API function.
1785 * server.c (target_running): Ditto.
1786 (accumulate_file_name_length): New function.
1787 (emit_dll_description): New function.
1788 (handle_qxfer_libraries): Replace accessing list implemention
1789 details with API function.
1790 (handle_qxfer_threads_worker): New function.
1791 (handle_qxfer_threads_proper): Replace accessing list implemention
1792 details with API function.
1793 (handle_query): Ditto.
1794 (visit_actioned_threads_callback_ftype): New typedef.
1795 (visit_actioned_threads_data): New struct.
1796 (visit_actioned_threads): Rewrite to be find_inferior callback.
1797 (resume): Call find_inferior.
1798 (handle_status): Replace accessing list implemention
1799 details with API function.
1800 (process_serial_event): Replace accessing list implemention details
1801 with API function.
1802 * target.c (set_desired_inferior): Replace accessing list implemention
1803 details with API function.
1804 * tracepoint.c (same_process_p): New function.
1805 (gdb_agent_about_to_close): Replace accessing list implemention
1806 details with API function.
1807 * win32-low.c (child_delete_thread): Replace accessing list
1808 implemention details with API function.
1809 (match_dll_by_basename): New function.
1810 (dll_is_loaded_by_basename): New function.
1811 (win32_ensure_ntdll_loaded): Replace accessing list implemention
1812 details call to dll_is_loaded_by_basename.
1813
80894984
DE
18142014-02-19 Doug Evans <dje@google.com>
1815
1816 * dll.h (struct dll_info): Add comment.
1817 * gdbthread.h (struct thread_info): Add comment.
1818 (current_ptid): Simplify.
1819 * inferiors.c (add_process): Update.
1820 (remove_process): Update.
1821 * inferiors.h (struct process_info): Rename member "head" to "entry".
1822 * linux-low.c (delete_lwp): Update.
1823 (add_lwp): Update.
1824 (last_thread_of_process_p): Update.
1825 (kill_one_lwp_callback, linux_kill): Update.
1826 (status_pending_p_callback): Update.
1827 (wait_for_sigstop): Update. Simplify read of ptid.
1828 (start_step_over): Update.
1829 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
1830 (get_lwp_thread): Update.
1831 (struct lwp_info): Rename member "head" to "entry".
1832 * regcache.h (inferior_list_entry): Delete.
1833 * server.c (kill_inferior_callback): Update.
1834 (detach_or_kill_inferior_callback): Update.
1835 (print_started_pid): Update.
1836 (print_attached_pid): Update.
1837 (process_serial_event): Simplify read of ptid.
1838 * thread-db.c (thread_db_create_event): Update.
1839 (thread_db_get_tls_address): Update.
1840 * win32-low.c (current_inferior_ptid): Simplify.
1841
46917d26
TT
18422014-02-19 Tom Tromey <tromey@redhat.com>
1843
1844 * target.h (struct target_ops) <supports_btrace>: Add target_ops
1845 argument.
1846 (target_supports_btrace): Update.
1847
0759a81e
YQ
18482014-02-14 Yao Qi <yao@codesourcery.com>
1849
1850 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
1851 (rsp-low-ipa.o): New target.
1852
a7191e8b
TT
18532014-02-12 Tom Tromey <tromey@redhat.com>
1854
1855 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
1856 convert_ascii_to_int.
1857 * regcache.c (registers_to_string): Likewise.
1858 * remote-utils.c (decode_M_packet): Likewise.
1859 * server.c (process_serial_event): Likewise.
1860
ff0e980e
TT
18612014-02-12 Tom Tromey <tromey@redhat.com>
1862
1863 * server.c (handle_query, handle_v_run): Use hex2bin, not
1864 unhexify.
1865 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
1866
e9371aff
TT
18672014-02-12 Tom Tromey <tromey@redhat.com>
1868
1869 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
1870 convert_int_to_ascii.
1871 * regcache.c (registers_to_string, collect_register_as_string):
1872 Likewise.
1873 * remote-utils.c (look_up_one_symbol, relocate_instruction):
1874 Likewise.
1875 * server.c (process_serial_event): Likewise.
1876 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
1877 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
1878
971dc0b8
TT
18792014-02-12 Tom Tromey <tromey@redhat.com>
1880
1881 * remote-utils.c (look_up_one_symbol, monitor_output): Use
1882 bin2hex, not hexify.
1883 * tracepoint.c (cmd_qtstatus): Likewise.
1884
0a822afb
TT
18852014-02-12 Tom Tromey <tromey@redhat.com>
1886
1887 * remote-utils.c (monitor_output): Pass explicit length to
1888 hexify.
1889
9c3d6531
TT
18902014-02-12 Tom Tromey <tromey@redhat.com>
1891
1892 * tracepoint.c: Include rsp-low.h.
1893 * server.c: Include rsp-low.h.
1894 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
1895 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
1896 declare.
1897 * remote-utils.c: Include rsp-low.h.
1898 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
1899 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
1900 (convert_int_to_ascii, convert_ascii_to_int): Move to
1901 common/rsp-low.c.
1902 * regcache.c: Include rsp-low.h.
1903 * ax.c: Include rsp-low.h.
1904 * Makefile.in (SFILES): Add common/rsp-low.c.
1905 (OBS): Add rsp-low.o.
1906 (rsp-low.o): New target.
1907
01fd3ea5
TT
19082014-02-12 Tom Tromey <tromey@redhat.com>
1909
1910 * utils.h (pulongest, plongest, phex_nz): Don't declare.
1911 Include print-utils.h.
1912 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
1913 (plongest, thirty_two, phex_nz): Remove.
1914 * Makefile.in (SFILES): Add common/print-utils.c.
1915 (OBS): Add print-utils.o.
1916 (print-utils-ipa.o): New target.
1917 (print-utils.o): New target.
1918 (IPA_OBJS): Add print-utils-ipa.o.
1919
e99dc820
TT
19202014-02-06 Tom Tromey <tromey@redhat.com>
1921
1922 * Makefile.in (SFILES): Fix indentation.
1923
ee1e2d4f
DE
19242014-02-05 Doug Evans <dje@google.com>
1925
1926 * linux-low.c (linux_wait_for_event): Improve comment.
1927 (linux_wait_1): Keep current_inferior in sync with event_child.
1928
f5a02773
DE
19292014-01-22 Doug Evans <dje@google.com>
1930
1931 * gdbthread.h (gdb_id_to_thread): Delete, unused.
1932
87ce2a04
DE
19332014-01-22 Doug Evans <dje@google.com>
1934
1935 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
1936 * configure: Regenerate.
1937 * config.in: Regenerate.
1938 * Makefile.in (SFILES): Add debug.c.
1939 (OBS): Add debug.o.
1940 * debug.c: New file.
1941 * debug.h: New file.
1942 * linux-aarch64-low.c (*): Update all debugging printfs to use
1943 debug_printf instead of fprintf.
1944 * linux-arm-low.c (*): Ditto.
1945 * linux-cris-low.c (*): Ditto.
1946 * linux-crisv32-low.c (*): Ditto.
1947 * linux-m32r-low.c (*): Ditto.
1948 * linux-sparc-low.c (*): Ditto.
1949 * linux-x86.c (*): Ditto.
1950 * linux-low.c (*): Ditto.
1951 (linux_wait_1): Add calls to debug_enter, debug_exit.
1952 (linux_wait): Remove redundant debugging printf.
1953 (stop_all_lwps): Add calls to debug_enter, debug_exit.
1954 (linux_resume, unstop_all_lwps): Ditto.
1955 * mem-break.c (*): Update all debugging printfs to use
1956 debug_printf instead of fprintf.
1957 * remote-utils.c (*): Ditto.
1958 * thread-db.c (*): Ditto.
1959 * server.c #include <ctype.h>, "gdb_vecs.h".
1960 (debug_threads): Moved to debug.c.
1961 (*): Update all debugging printfs to use debug_printf instead of
1962 fprintf.
1963 (start_inferior): Replace call to fflush with call to debug_flush.
1964 (monitor_show_help): Mention set debug-format.
1965 (parse_debug_format_options): New function.
1966 (handle_monitor_command): Handle "monitor set debug-format".
1967 (gdbserver_usage): Mention --debug-format.
1968 (main): Parse --debug-format.
1969 * server.h (debug_threads): Declaration moved to debug.h.
1970 #include "debug.h".
1971 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
1972 trace_debug_1 that uses debug_printf.
1973 (tracepoint_look_up_symbols): Update all debugging printfs to use
1974 debug_printf instead of fprintf.
1975
e671835b
BS
19762014-01-20 Baruch Siach <baruch@tkos.co.il>
1977
1978 * linux-xtensa-low.c: Include asm/ptrace.h instead of
1979 sys/ptrace.h.
1980
b5737fa9
PA
19812014-01-17 Pedro Alves <palves@redhat.com>
1982
ea38d2a9 1983 PR build/16445
c7faa97a
PA
1984 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
1985 defined after including gdb_proc_service.h.
b5737fa9 1986
40ed484e
DE
19872014-01-16 Doug Evans <dje@google.com>
1988
1989 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
1990 (match_dll): Use it.
1991
969c39fb
MM
19922014-01-16 Markus Metzger <markus.t.metzger@intel.com>
1993
1994 * target.h (target_ops) <read_btrace>: Change parameters and
1995 return type to allow error reporting.
1996 * server.c (handle_qxfer_btrace): Support delta reads. Pass
1997 trace reading errors on.
1998 * linux-low.c (linux_low_read_btrace): Pass trace reading
1999 errors on.
2000 (linux_low_disable_btrace): New.
2001
ab7f45ba
DE
20022014-01-15 Doug Evans <dje@google.com>
2003
2004 * inferiors.c (thread_id_to_gdb_id): Delete.
2005 * inferiors.h (thread_id_to_gdb_id): Delete.
2006
66af0f44
EZ
20072014-01-13 Eli Zaretskii <eliz@gnu.org>
2008
2009 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
2010 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
2011 versions.
2012
9939e131
PA
20132014-01-08 Pedro Alves <palves@redhat.com>
2014
2015 * server.c (handle_status): Don't discard previous queued stop
2016 replies or thread's pending status here.
2017 (main) <disconnection>: Do it here instead.
2018
b7ea362b
PA
20192014-01-08 Pedro Alves <palves@redhat.com>
2020
2021 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2022 * server.c (visit_actioned_threads, handle_pending_status): New
2023 function.
2024 (handle_v_cont): Factor out parts to ...
2025 (resume): ... this new function. If in all-stop, and a thread
2026 being resumed has a pending status, report it without actually
2027 resuming.
2028 (myresume): Adjust to use the new 'resume' function.
2029 (clear_pending_status_callback, set_pending_status_callback)
2030 (find_status_pending_thread_callback): New functions.
2031 (handle_status): Handle the case of multiple threads having
2032 interesting statuses to report. Report threads' real last signal
2033 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
2034 with an interesting thread to report the status for, instead of
2035 always reporting the status of the first thread.
2036
28498c42
JB
20372014-01-01 Joel Brobecker <brobecker@adacore.com>
2038
2039 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2040 * gdbreplay.c (gdbreplay_version): Likewise.
2041
f45c82da
YZ
20422013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
2043
2044 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2045 iov.iov_len with the real length in use.
2046
379a5e2d
JB
20472013-12-13 Joel Brobecker <brobecker@adacore.com>
2048
2049 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2050 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2051 for all targets that use win32-low.c.
2052 * win32-low.c (win32_ensure_ntdll_loaded): New function.
2053 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2054
4210d83e
PA
20552013-12-13 Pedro Alves <palves@redhat.com>
2056
2057 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
2058 if equal to TARGET_WAITKIND_LOADED.
2059 * win32-low.c (cached_status): New static global.
2060 (win32_wait): Add declaration.
2061 (do_initial_child_stuff): Flush all initial pending debug events
2062 up to the initial breakpoint.
2063 (win32_wait): If CACHED_STATUS was set, return that instead
2064 of doing a real wait. Remove the code resuming the execution
2065 of the inferior after receiving a TARGET_WAITKIND_LOADED event
2066 during the initial phase. Also remove the code changing
2067 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
2068 TARGET_WAITKIND_STOPPED.
2069
e7f0d979
YQ
20702013-12-11 Yao Qi <yao@codesourcery.com>
2071
2072 * notif.c (handle_notif_ack): Return 0 if no notification
2073 matches.
2074
ebcf782c
DE
20752013-11-20 Doug Evans <dje@google.com>
2076
2077 * linux-low.c (linux_set_resume_request): Fix comment.
2078
20ad9378
DE
20792013-11-20 Doug Evans <dje@google.com>
2080
2081 * linux-low.c (resume_status_pending_p): Tweak comment.
2082
a196ebeb
WT
20832013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2084
2085 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
2086 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
2087 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
2088 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
2089 (srv_amd64_regobj): Add amd64-mpx.o.
2090 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
2091 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
2092 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
2093 * i387-fp.c (num_pl_bnd_register) Added constant.
2094 (num_pl_bnd_cfg_registers) Added constant.
2095 (struct i387_xsave) Added reserved area and MPX fields.
2096 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
2097 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
2098 function.
2099 (tdesc_i386_mpx_linux): Add MPX amd64 target.
2100 (init_registers_amd64_mpx_linux): Declare new function.
2101 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
2102 (x86_64_regmap): Add MPX registers.
2103 (x86_linux_read_description): Add MPX case.
2104 (initialize_low_arch): Initialize MPX targets.
2105
0080a2f6
TT
21062013-11-18 Tom Tromey <tromey@redhat.com>
2107
2108 * configure: Rebuild.
2109 * configure.ac: Don't check for stdlib.h.
2110 * gdbreplay.c: Unconditionally include stdlib.h.
2111
2978b111
TT
21122013-11-18 Tom Tromey <tromey@redhat.com>
2113
2114 * config.in: Rebuild.
2115 * configure: Rebuild.
2116 * configure.ac: Don't use AC_HEADER_DIRENT.
2117
a3d08894
TT
21182013-11-18 Tom Tromey <tromey@redhat.com>
2119
2120 * server.h: Don't check HAVE_STRING_H.
2121 * gdbreplay.c: Don't check HAVE_STRING_H.
2122 * configure: Rebuild.
2123
0a5dd17d
TT
21242013-11-18 Tom Tromey <tromey@redhat.com>
2125
2126 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
2127 LIBGNU.
2128
1bd2f0ba
TT
21292013-11-08 Tom Tromey <tromey@redhat.com>
2130
2131 * configure, config.in: Rebuild.
2132 * configure.ac: Remove unused configury.
2133
3266f10b
TT
21342013-11-08 Tom Tromey <tromey@redhat.com>
2135
2136 * acinclude.m4: Include common.m4, codeset.m4.
2137 * configure, config.in: Rebuild.
2138 * configure.ac: Use GDB_AC_COMMON.
2139
6682d959
AA
21402013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
2141
2142 * linux-s390-low.c (HWCAP_S390_TE): New define.
2143 (s390_arch_setup): Consider the TE field in the HWCAP for
2144 determining 'have_regset_tdb'.
2145
fd0a4d76
SDJ
21462013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
2147
2148 PR gdb/16014
2149 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
2150 call to sizeof.
2151
1a3d890b
PA
21522013-10-02 Pedro Alves <palves@redhat.com>
2153
2154 * server.c (process_serial_event): Don't output "GDBserver
2155 exiting" if GDB is connected through stdio.
2156 * target.c (mywait): Likewise, be silent if GDB is connected
2157 through stdio.
2158
97ad4581
JB
21592013-10-01 Joel Brobecker <brobecker@adacore.com>
2160
2161 * lynx-low.c (lynx_add_threads_after_attach): New function.
2162 (lynx_attach): Remove call to add_thread. Add call to
2163 lynx_add_threads_after_attach instead.
2164
5b4e221c
MF
21652013-09-28 Mike Frysinger <vapier@gentoo.org>
2166
2167 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
2168 * config.in, configure: Regenerated.
2169
ee47b2f8
YQ
21702013-09-18 Yao Qi <yao@codesourcery.com>
2171
2172 PR server/15959
2173 * server.c (start_inferior): Clear 'resume_info'.
2174
d6707650 21752013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2176
d6707650
JW
2177 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2178 for each register.
2179
9243dd0e 21802013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2181
9243dd0e
JW
2182 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
2183 linux-tile-low.o to srv_tgtobj.
2184
c623a6ef
WN
21852013-09-16 Will Newton <will.newton@linaro.org>
2186
2187 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
2188 out regs.
2189
fb71d39e
PA
21902013-09-06 Pedro Alves <palves@redhat.com>
2191
2192 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2193 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2194 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2195 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2196 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2197 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2198
8e7e9910
PA
21992013-09-06 Pedro Alves <palves@redhat.com>
2200
2201 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2202 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2203
7c3a12ca
PA
22042013-09-06 Pedro Alves <palves@redhat.com>
2205
2206 * linux-amd64-ipa.c: Include tracepoint.h.
2207 * linux-i386-ipa.c: Include tracepoint.h.
2208
8eb3d7b6
RW
22092013-09-06 Ricard Wanderlof <ricardw@axis.com>
2210
2211 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2212 (ps_get_thread_area): New function.
2213
eddddb9d
RW
22142013-09-06 Ricard Wanderlof <ricardw@axis.com>
2215
2216 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
2217 (initialize_low_arch): Call init_registers_crisv32 rather than
2218 init_register_crisv32.
2219
533b0600
PA
22202013-09-05 Pedro Alves <palves@redhat.com>
2221
2222 * server.h (handle_vFile, hostio_last_error_from_errno): Move
2223 to ...
2224 * hostio.h: ... this new file.
2225 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2226 win32-low.c: Include hostio.h.
2227
0ce3d3b5
PA
22282013-09-05 Pedro Alves <palves@redhat.com>
2229
2230 * server.h (gdb_client_data, handler_func, callback_handler_func)
2231 (delete_file_handler, add_file_handler, append_callback_event)
2232 (delete_callback_event, start_event_loop, initialize_event_loop):
2233 Move to event-loop.h and include it.
2234 * event-loop.h: New file.
2235
799cdc37
PA
22362013-09-05 Pedro Alves <palves@redhat.com>
2237
2238 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2239 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2240 (loaded_dll, unloaded_dll): Move to ...
2241 * dll.h: ... this new file.
2242 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2243
6a6bbd9d
PA
22442013-09-05 Pedro Alves <palves@redhat.com>
2245
2246 * server.h (current_process, get_thread_process, all_processes)
2247 (add_inferior_to_list, for_each_inferior, current_inferior)
2248 (remove_inferior, add_process, remove_process, find_process_pid)
2249 (have_started_inferiors_p, have_attached_inferiors_p)
2250 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2251 (clear_inferiors, find_inferior, find_inferior_id)
2252 (inferior_target_data, set_inferior_target_data)
2253 (inferior_regcache_data, set_inferior_regcache_data): Move to
2254 inferiors.h, and include it.
2255 * inferiors.h: New file.
2256
f699aaba
PA
22572013-09-05 Pedro Alves <palves@redhat.com>
2258
2259 * server.h (struct emit_ops, current_insn_ptr, emit_error):
2260 Move ...
2261 * ax.h: ... here.
2262
c144c7a0
PA
22632013-09-05 Pedro Alves <palves@redhat.com>
2264
2265 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2266 tracepoint.h.
2267 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2268 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2269 (handle_tracepoint_general_set, handle_tracepoint_query)
2270 (tracepoint_finished_step, tracepoint_was_hit)
2271 (release_while_stepping_state_list, current_traceframe)
2272 (in_readonly_region, traceframe_read_mem)
2273 (fetch_traceframe_registers, traceframe_read_sdata)
2274 (traceframe_read_info, struct fast_tpoint_collect_status)
2275 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2276 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2277 (supply_fast_tracepoint_registers)
2278 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2279 (ipa_tdesc, claim_trampoline_space)
2280 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2281 (agent_mem_read, agent_get_trace_state_variable_value)
2282 (agent_set_trace_state_variable_value, agent_tsv_read)
2283 (agent_mem_read_string, get_raw_reg_func_addr)
2284 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2285 * tracepoint.h: ... this new file.
2286
ff42e6ab
PA
22872013-09-05 Pedro Alves <palves@redhat.com>
2288
2289 * server.h (perror_with_name, error, fatal, warning, paddress)
2290 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2291 include it.
2292 * utils.h: New file.
2293
541af0f4
PA
22942013-09-05 Pedro Alves <palves@redhat.com>
2295
2296 * server.h (remote_debug, noack_mode, transport_is_reliable)
2297 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
2298 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
2299 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
2300 (write_enn, initialize_async_io, enable_async_io)
2301 (disable_async_io, check_remote_input_interrupt_request)
2302 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
2303 (dead_thread_notify, prepare_resume_reply)
2304 (decode_address_to_semicolon, decode_address, decode_m_packet)
2305 (decode_M_packet, decode_X_packet, decode_xfer_write)
2306 (decode_search_memory_packet, unhexify, hexify)
2307 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
2308 (look_up_one_symbol, relocate_instruction)
2309 (monitor_output): Move to remote-utils.h, and include it.
2310 * remote-utils.h: New file.
2311
eebdf26b
PA
23122013-09-05 Pedro Alves <palves@redhat.com>
2313
2314 * server.h (_): Delete.
2315
3aafd2ff
PA
23162013-09-02 Pedro Alves <palves@redhat.com>
2317
2318 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
2319 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
2320 allocated.
2321 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
2322
cee83bcb
PM
23232013-09-02 Pierre Muller <muller@sourceware.org>
2324
2325 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
2326 or WriteProcessMemory complete successfully and handle
2327 ERROR_PARTIAL_COPY error.
2328
9a13b2fa
PA
23292013-09-02 Pedro Alves <palves@redhat.com>
2330
2331 * server.c (gdb_read_memory): Return -1 on traceframe memory read
2332 error instead of EIO.
2333
602e3198
JK
23342013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2335
2336 PR server/15604
2337 * linux-low.c: Include filestuff.h.
2338 (linux_create_inferior) <pid == 0>: Call close_most_fds.
2339 * lynx-low.c: Include filestuff.h.
2340 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
2341 * server.c: Include filestuff.h.
2342 (main): Call notice_open_fds.
2343 * spu-low.c: Include filestuff.h.
2344 (spu_create_inferior) <pid == 0>: Call close_most_fds.
2345
96d7229d
LM
23462013-08-22 Luis Machado <lgustavo@codesourcery.com>
2347
2348 * Makefile.in: Explain why ../target and ../nat are not
2349 listed as include file search paths.
2350 (linux-waitpid.o): New object file rule.
2351 * configure.srv (srv_native_linux_obj): New variable.
2352 Replace all occurrences of linux native object files with
2353 $srv_native_linux_obj.
2354 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
2355 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
2356 (linux_enable_event_reporting): Remove declaration.
2357 (my_waitpid): Moved to common/linux-waitpid.c.
2358 (linux_wait_for_event): Pass ptid when calling
2359 linux_enable_event_reporting.
2360 (linux_supports_tracefork_flag): Remove.
2361 (linux_enable_event_reporting): Likewise.
2362 (linux_tracefork_grandchild): Remove.
2363 (STACK_SIZE): Moved to common/linux-ptrace.c.
2364 (linux_tracefork_child): Remove.
2365 (linux_test_for_tracefork): Remove.
2366 (linux_look_up_symbols): Call linux_supports_traceclone.
2367 (initialize_low): Remove call to linux_test_for_tracefork.
2368 * linux-low.h (PTRACE_TYPE_ARG3): Move to
2369 common/linux-ptrace.h.
2370 (PTRACE_TYPE_ARG4): Likewise.
2371 Include linux-ptrace.h.
2372
32940073
PA
23732013-08-21 Pedro Alves <palves@redhat.com>
2374
2375 * config.in: Renegerate.
2376
33b60d58 23772013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 2378
33b60d58
LM
2379 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
2380 (SFILES): Remove $(srcdir)/common/target-common.c and
2381 add $(srcdir)/target/waitstatus.c.
2382 (OBS): Remove target-common.o and add waitstatus.o.
2383 (server_h): Remove $(srcdir)/../common/target-common.h and
2384 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
2385 and $(srcdir)/../target/waitstatus.h.
2386 (target-common.o): Remove.
2387 (waitstatus.o): New target object file.
2388 * target.h: Do not include target-common.h and
2389 include target/resume.h, target/wait.h and
2390 target/waitstatus.h.
2391
b8e1b30e
LM
23922013-08-13 Luis Machado <lgustavo@codesourcery.com>
2393
2394 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2395 to PTRACE_TYPE_ARG3.
2396 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2397 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
2398 PTRACE_TYPE_ARG4.
2399 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
2400 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
2401
7a60ad40
YQ
24022013-07-27 Jie Zhang <jie@codesourcery.com>
2403 Daniel Jacobowitz <dan@codesourcery.com>
2404 Yao Qi <yao@codesourcery.com>
2405
2406 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
2407 (mips-linux-watch.o): New rule.
2408 (mips_linux_watch_h): New variable.
2409 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
2410 srv_tgtobj.
2411 * linux-mips-low.c: Include mips-linux-watch.h.
2412 (struct arch_process_info, struct arch_lwp_info): New.
2413 (update_watch_registers_callback): New function.
2414 (mips_linux_new_process, mips_linux_new_thread) New functions.
2415 (mips_linux_prepare_to_resume, mips_insert_point): New
2416 functions.
2417 (mips_remove_point, mips_stopped_by_watchpoint): New
2418 functions.
2419 (rsp_bp_type_to_target_hw_bp_type): New function.
2420 (mips_stopped_data_address): New function.
2421 (the_low_target): Add watchpoint support functions.
2422
de6f69ad
YQ
24232013-07-27 Yao Qi <yao@codesourcery.com>
2424
2425 * i386-low.c: Include break-common.h.
2426 (enum target_hw_bp_type): Remove.
2427
3360c0bf
LM
24282013-07-24 Luis Machado <lgustavo@codesourcery.com>
2429
2430 * Makefile.in (SFILES): /common/target-common.c.
2431 (OBS): Add target-common.o.
2432 (server_h): Add $(srcdir)/../common/target-common.h.
2433 (target-common.o): New target.
2434 * server.c (queue_stop_reply_callback): Free
2435 status string after use.
2436 * target.c (target_waitstatus_to_string): Remove.
2437 * target.h: Include target-common.h.
2438 (resume_kind): Likewise.
2439 (target_waitkind): Likewise.
2440 (target_waitstatus): Likewise.
2441 (TARGET_WNOHANG): Likewise.
2442
bd885420
YQ
24432013-07-04 Yao Qi <yao@codesourcery.com>
2444
2445 * Makefile.in (host_alias): Use @host_noncanonical@.
2446 (target_alias): Use @target_noncanonical@.
2447 * configure.ac: Use ACX_NONCANONICAL_TARGET and
2448 ACX_NONCANONICAL_HOST.
2449 * configure: Regenerated.
2450
2451 Revert:
2452 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2453
2454 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2455 * configure: Rebuild.
2456 * Makefile.in (version_host, version_target): Get from configure.
2457 (version.c): Use $(version_host) and $(version_target).
2458
17ef446e
PA
24592013-07-03 Pedro Alves <palves@redhat.com>
2460
2461 * Makefile.in (config.status): Depend on development.sh.
2462 * acinclude.m4: Include libmcheck.m4.
2463 * configure: Regenerate.
2464
7a9a7487
MG
24652013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2466
2467 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
2468 attribute inside the parentheses.
2469 (winapi_DebugSetProcessKillOnExit): Ditto.
2470 (winapi_DebugBreakProcess): Ditto.
2471 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 2472
49b64de6
MG
24732013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2474
2475 * notif.h (notif_event): Add a dummy member to avoid compiler
2476 errors.
2477
d5749ee7
PA
24782013-07-01 Pedro Alves <palves@redhat.com>
2479
2480 * hostio.c (HOSTIO_PATH_MAX): Define.
2481 (require_filename, handle_open, handle_unlink, handle_readlink):
2482 Use it.
2483
d8d2a3ee
PA
24842013-07-01 Pedro Alves <palves@redhat.com>
2485
2486 * server.h: Include "pathmax.h".
2487 * linux-low.c: Don't include sys/param.h.
2488 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
2489 MAXPATHLEN.
2490 * win32-low.c: Don't include sys/param.h.
2491 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
2492
bc7dea8d
PA
24932013-07-01 Pedro Alves <palves@redhat.com>
2494
2495 * event-loop.c: Don't check HAVE_UNISTD_H before including
2496 <unistd.h>.
2497 * gdbreplay.c: Likewise.
2498 * remote-utils.c: Likewise.
2499 * server.c: Likewise.
2500 * configure.ac: Don't check for unistd.h.
2501 * configure: Regenerate.
2502
d6c2da54
TT
25032013-06-28 Tom Tromey <tromey@redhat.com>
2504
2505 * Makefile.in (version.c): Use version.in, not
2506 common/version.in.
2507
257b6bec
MG
25082013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2509
2510 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2511 * configure: Rebuild.
2512 * Makefile.in (version_host, version_target): Get from configure.
2513 (version.c): Use $(version_host) and $(version_target).
2514
86ebe149
DK
25152013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2516
2517 Fix trace-status to output user name without trailing colon.
2518 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
2519
f30aa5af
DK
25202013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2521
2522 Fix trace-status to output proper start-time and stop-time.
2523 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
2524 output start time and stop time in hex as gdb expects.
2525
28a93511
YQ
25262013-06-26 Pedro Alves <pedro@codesourcery.com>
2527
2528 * tracepoint.c (build_traceframe_info_xml): Output trace state
2529 variables present in the trace buffer.
2530
01208463
TT
25312013-06-24 Tom Tromey <tromey@redhat.com>
2532
2533 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
2534 create-version.sh.
2535 (version.o): Remove.
2536 * gdbreplay.c: Include version.h.
2537 (version, host_name): Don't declare.
2538 * server.h: Include version.h.
2539 (version, host_name): Don't declare.
2540
760256f9
PA
25412013-06-12 Pedro Alves <palves@redhat.com>
2542
2543 * linux-x86-low.c (linux_is_elf64): Delete global.
2544 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
2545 with local linux_pid_exe_is_elf_64_file use.
2546
030031ee
PA
25472013-06-11 Pedro Alves <palves@redhat.com>
2548
2549 * linux-low.c (regset_disabled, disable_regset): New functions.
2550 (regsets_fetch_inferior_registers)
2551 (regsets_store_inferior_registers): Use them.
2552 (initialize_regsets_info); Don't allocate the disabled_regsets
2553 array here.
2554 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
2555 comment.
2556
5da6eb0a
PA
25572013-06-11 Pedro Alves <palves@redhat.com>
2558
2559 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
2560 xmalloc.
2561
7e5aaa09
PA
25622013-06-11 Pedro Alves <palves@redhat.com>
2563
2564 * linux-x86-low.c (initialize_low_arch): Call
2565 init_registers_x32_avx_linux.
2566
d878444c
JK
25672013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
2568
2569 Fix compatibility with Android Bionic.
2570 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
2571 it is not empty.
2572
3aee8918
PA
25732013-06-07 Pedro Alves <palves@redhat.com>
2574
5f2b57b5 2575 PR server/14823
3aee8918
PA
2576 * Makefile.in (OBS): Add tdesc.o.
2577 (IPA_OBJS): Add tdesc-ipa.o.
2578 (tdesc-ipa.o): New rule.
2579 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
2580 interface.
2581 * linux-low.c (new_inferior): Delete.
2582 (disabled_regsets, num_regsets): Delete.
2583 (linux_add_process): Adjust to set the new per-process
2584 new_inferior flag.
2585 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
2586 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
2587 was a stop. When calling arch_setup, switch the current inferior
2588 to the thread that got an event.
2589 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
2590 (regsets_fetch_inferior_registers)
2591 (regsets_store_inferior_registers): New regsets_info parameter.
2592 Adjust to use it.
2593 (linux_register_in_regsets): New regs_info parameter. Adjust to
2594 use it.
2595 (register_addr, fetch_register, store_register): New usrregs_info
2596 parameter. Adjust to use it.
2597 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
2598 parameter regs_info. Adjust to use it.
2599 (linux_fetch_registers): Get the current inferior's regs_info, and
2600 adjust to use it.
2601 (linux_store_registers): Ditto.
2602 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
2603 (initialize_low): Don't initialize the target_regsets here. Call
2604 initialize_low_arch.
2605 * linux-low.h (target_regsets): Delete declaration.
2606 (struct regsets_info): New.
2607 (struct usrregs_info): New.
2608 (struct regs_info): New.
2609 (struct process_info_private) <new_inferior>: New field.
2610 (struct linux_target_ops): Delete the num_regs, regmap, and
2611 regset_bitmap fields. New field regs_info.
2612 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
2613 * i387-fp.c (num_xmm_registers): Delete.
2614 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
2615 calls to new interface.
2616 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
2617 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
2618 Infer the number of xmm registers from the regcache's target
2619 description.
2620 * i387-fp.h (num_xmm_registers): Delete.
2621 * inferiors.c (add_thread): Don't install the thread's regcache
2622 here.
2623 * proc-service.c (gregset_info): Fetch the current inferior's
2624 regs_info. Adjust to use it.
2625 * regcache.c: Include tdesc.h.
2626 (register_bytes, reg_defs, num_registers)
2627 (gdbserver_expedite_regs): Delete.
2628 (get_thread_regcache): If the thread doesn't have a regcache yet,
2629 create one, instead of aborting gdbserver.
2630 (regcache_invalidate_one): Rename to ...
2631 (regcache_invalidate_thread): ... this.
2632 (regcache_invalidate_one): New.
2633 (regcache_invalidate): Only invalidate registers of the current
2634 process.
2635 (init_register_cache): Add target_desc parameter, and use it.
2636 (new_register_cache): Ditto. Assert the target description has a
2637 non zero registers_size.
2638 (regcache_cpy): Add assertions. Adjust.
2639 (realloc_register_cache, set_register_cache): Delete.
2640 (registers_to_string, registers_from_string): Adjust.
2641 (find_register_by_name, find_regno, find_register_by_number)
2642 (register_cache_size): Add target_desc parameter, and use it.
2643 (free_register_cache_thread, free_register_cache_thread_one)
2644 (regcache_release, register_cache_size): New.
2645 (register_size): Add target_desc parameter, and use it.
2646 (register_data, supply_register, supply_register_zeroed)
2647 (supply_regblock, supply_register_by_name, collect_register)
2648 (collect_register_as_string, collect_register_by_name): Adjust.
2649 * regcache.h (struct target_desc): Forward declare.
2650 (struct regcache) <tdesc>: New field.
2651 (init_register_cache, new_register_cache): Add target_desc
2652 parameter.
2653 (regcache_invalidate_thread): Declare.
2654 (regcache_invalidate_one): Delete declaration.
2655 (regcache_release): Declare.
2656 (find_register_by_number, register_cache_size, register_size)
2657 (find_regno): Add target_desc parameter.
2658 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
2659 declarations.
2660 * remote-utils.c: Include tdesc.h.
2661 (outreg, prepare_resume_reply): Adjust.
2662 * server.c: Include tdesc.h.
2663 (gdbserver_xmltarget): Delete declaration.
2664 (get_features_xml, process_serial_event): Adjust.
2665 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
2666 declare.
2667 (struct process_info) <tdesc>: New field.
2668 (ipa_tdesc): Declare.
2669 * tdesc.c: New file.
2670 * tdesc.h: New file.
2671 * tracepoint.c: Include tdesc.h.
2672 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
2673 (get_context_regcache): Adjust to pass ipa_tdesc down.
2674 (do_action_at_tracepoint): Adjust to get the register cache size
2675 from the context regcache's description.
2676 (traceframe_walk_blocks): Adjust to get the register cache size
2677 from the current trace frame's description.
2678 (traceframe_get_pc): Adjust to get current trace frame's
2679 description and pass it down.
2680 (gdb_collect): Adjust to get the register cache size from the
2681 IPA's description.
2682 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
2683 (gdbserver_xmltarget): Delete.
2684 (initialize_low_tracepoint): Set the ipa's target description.
2685 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
2686 (initialize_low_tracepoint): Set the ipa's target description.
2687 * linux-x86-low.c: Include tdesc.h.
2688 [__x86_64__] (is_64bit_tdesc): New.
2689 (ps_get_thread_area, x86_get_thread_area): Use it.
2690 (i386_cannot_store_register): Rename to ...
2691 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
2692 (i386_cannot_fetch_register): Rename to ...
2693 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
2694 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
2695 to new interface.
2696 (target_regsets): Rename to ...
2697 (x86_regsets): ... this.
2698 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
2699 interface.
2700 (x86_siginfo_fixup): Use is_64bit_tdesc.
2701 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
2702 (tdesc_x32_avx_linux, tdesc_x32_linux)
2703 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
2704 Declare.
2705 (x86_linux_update_xmltarget): Delete.
2706 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
2707 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
2708 (AMD64_LINUX_USER64_CS): New.
2709 (x86_linux_read_description): New, based on
2710 x86_linux_update_xmltarget.
2711 (same_process_callback): New.
2712 (x86_arch_setup_process_callback): New.
2713 (x86_linux_update_xmltarget): New.
2714 (x86_regsets_info): New.
2715 (amd64_linux_regs_info): New.
2716 (i386_linux_usrregs_info): New.
2717 (i386_linux_regs_info): New.
2718 (x86_linux_regs_info): New.
2719 (x86_arch_setup): Reimplement.
2720 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
2721 (x86_emit_ops): Ditto.
2722 (the_low_target): Adjust. Install x86_linux_regs_info,
2723 x86_cannot_fetch_register, and x86_cannot_store_register.
2724 (initialize_low_arch): New.
2725 * linux-ia64-low.c (tdesc_ia64): Declare.
2726 (ia64_fetch_register): Adjust.
2727 (ia64_usrregs_info, regs_info): New globals.
2728 (ia64_regs_info): New function.
2729 (the_low_target): Adjust.
2730 (initialize_low_arch): New function.
2731 * linux-sparc-low.c (tdesc_sparc64): Declare.
2732 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
2733 Adjust.
2734 (sparc_arch_setup): New function.
2735 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
2736 (the_low_target): Adjust.
2737 (initialize_low_arch): New function.
2738 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
2739 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
2740 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
2741 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
2742 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
2743 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
2744 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
2745 (tdesc_powerpc_isa205_vsx64l): Declare.
2746 (ppc_cannot_store_register, ppc_collect_ptrace_register)
2747 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
2748 (ppc_set_pc, ppc_get_hwcap): Adjust.
2749 (ppc_usrregs_info): Forward declare.
2750 (!__powerpc64__) ppc_regmap_adjusted: New global.
2751 (ppc_arch_setup): Adjust to the current process'es target
2752 description.
2753 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
2754 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
2755 (ppc_store_evrregset): Adjust.
2756 (target_regsets): Rename to ...
2757 (ppc_regsets): ... this, and make static.
2758 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
2759 (ppc_regs_info): New function.
2760 (the_low_target): Adjust.
2761 (initialize_low_arch): New function.
2762 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
2763 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
2764 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
2765 (tdesc_s390x_linux64v2): Declare.
2766 (s390_collect_ptrace_register, s390_supply_ptrace_register)
2767 (s390_fill_gregset, s390_store_last_break): Adjust.
2768 (target_regsets): Rename to ...
2769 (s390_regsets): ... this, and make static.
2770 (s390_get_pc, s390_set_pc): Adjust.
2771 (s390_get_hwcap): New target_desc parameter, and use it.
2772 [__s390x__] (have_hwcap_s390_high_gprs): New global.
2773 (s390_arch_setup): Adjust to set the current process'es target
2774 description. Don't adjust the regmap.
2775 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
2776 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
2777 (regs_info_3264): New globals.
2778 (s390_regs_info): New function.
2779 (the_low_target): Adjust.
2780 (initialize_low_arch): New function.
2781 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
2782 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
2783 [__mips64] (init_registers_mips_linux)
2784 (init_registers_mips_dsp_linux): Delete defines.
2785 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
2786 (have_dsp): New global.
2787 (mips_read_description): New, based on mips_arch_setup.
2788 (mips_arch_setup): Reimplement.
2789 (get_usrregs_info): New function.
2790 (mips_cannot_fetch_register, mips_cannot_store_register)
2791 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
2792 (mips_fill_fpregset, mips_store_fpregset): Adjust.
2793 (target_regsets): Rename to ...
2794 (mips_regsets): ... this, and make static.
2795 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
2796 (dsp_regs_info, regs_info): New globals.
2797 (mips_regs_info): New function.
2798 (the_low_target): Adjust.
2799 (initialize_low_arch): New function.
2800 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
2801 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
2802 Declare.
2803 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
2804 (arm_read_description): New, with bits factored from
2805 arm_arch_setup.
2806 (arm_arch_setup): Reimplement.
2807 (target_regsets): Rename to ...
2808 (arm_regsets): ... this, and make static.
2809 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
2810 (arm_regs_info): New function.
2811 (the_low_target): Adjust.
2812 (initialize_low_arch): New function.
2813 * linux-m68k-low.c (tdesc_m68k): Declare.
2814 (target_regsets): Rename to ...
2815 (m68k_regsets): ... this, and make static.
2816 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
2817 (m68k_regs_info): New function.
2818 (m68k_arch_setup): New function.
2819 (the_low_target): Adjust.
2820 (initialize_low_arch): New function.
2821 * linux-sh-low.c (tdesc_sharch): Declare.
2822 (target_regsets): Rename to ...
2823 (sh_regsets): ... this, and make static.
2824 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
2825 (sh_regs_info, sh_arch_setup): New functions.
2826 (the_low_target): Adjust.
2827 (initialize_low_arch): New function.
2828 * linux-bfin-low.c (tdesc_bfin): Declare.
2829 (bfin_arch_setup): New function.
2830 (bfin_usrregs_info, regs_info): New globals.
2831 (bfin_regs_info): New function.
2832 (the_low_target): Adjust.
2833 (initialize_low_arch): New function.
2834 * linux-cris-low.c (tdesc_cris): Declare.
2835 (cris_arch_setup): New function.
2836 (cris_usrregs_info, regs_info): New globals.
2837 (cris_regs_info): New function.
2838 (the_low_target): Adjust.
2839 (initialize_low_arch): New function.
2840 * linux-cris-low.c (tdesc_crisv32): Declare.
2841 (cris_arch_setup): New function.
2842 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
2843 (cris_regs_info): New function.
2844 (the_low_target): Adjust.
2845 (initialize_low_arch): New function.
2846 * linux-m32r-low.c (tdesc_m32r): Declare.
2847 (m32r_arch_setup): New function.
2848 (m32r_usrregs_info, regs_info): New globals.
2849 (m32r_regs_info): Adjust.
2850 (initialize_low_arch): New function.
2851 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
2852 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
2853 (tic6x_usrregs_info): Forward declare.
2854 (tic6x_read_description): New function, based on ...
2855 (tic6x_arch_setup): ... this. Reimplement.
2856 (target_regsets): Rename to ...
2857 (tic6x_regsets): ... this, and make static.
2858 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
2859 (tic6x_regs_info): New function.
2860 (the_low_target): Adjust.
2861 (initialize_low_arch): New function.
2862 * linux-xtensa-low.c (tdesc_xtensa): Declare.
2863 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
2864 (target_regsets): Rename to ...
2865 (xtensa_regsets): ... this, and make static.
2866 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
2867 globals.
2868 (xtensa_arch_setup, xtensa_regs_info): New functions.
2869 (the_low_target): Adjust.
2870 (initialize_low_arch): New function.
2871 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
2872 (nios2_arch_setup): Set the current process'es tdesc.
2873 (target_regsets): Rename to ...
2874 (nios2_regsets): ... this.
2875 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
2876 (nios2_regs_info): New function.
2877 (the_low_target): Adjust.
2878 (initialize_low_arch): New function.
a261b8f5
PA
2879 * linux-aarch64-low.c (tdesc_aarch64): Declare.
2880 (aarch64_arch_setup): Set the current process'es tdesc.
2881 (target_regsets): Rename to ...
2882 (aarch64_regsets): ... this.
2883 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
2884 (aarch64_regs_info): New function.
2885 (the_low_target): Adjust.
2886 (initialize_low_arch): New function.
3aee8918
PA
2887 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
2888 globals.
2889 (target_regsets): Rename to ...
2890 (tile_regsets): ... this.
2891 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
2892 (tile_regs_info): New function.
2893 (tile_arch_setup): Set the current process'es tdesc.
2894 (the_low_target): Adjust.
2895 (initialize_low_arch): New function.
2896 * spu-low.c (tdesc_spu): Declare.
2897 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
2898 * win32-arm-low.c (tdesc_arm): Declare.
2899 (arm_arch_setup): New function.
2900 (the_low_target): Install arm_arch_setup instead of
2901 init_registers_arm.
2902 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
2903 (init_windows_x86): Rename to ...
2904 (i386_arch_setup): ... this. Set `win32_tdesc'.
2905 (the_low_target): Adjust.
2906 * win32-low.c (win32_tdesc): New global.
2907 (child_add_thread): Don't create the thread cache here.
2908 (do_initial_child_stuff): Set the new process'es tdesc.
2909 * win32-low.h (struct target_desc): Forward declare.
2910 (win32_tdesc): Declare.
2911 * lynx-i386-low.c (tdesc_i386): Declare global.
2912 (lynx_i386_arch_setup): Set `lynx_tdesc'.
2913 * lynx-low.c (lynx_tdesc): New global.
2914 (lynx_add_process): Set the new process'es tdesc.
2915 * lynx-low.h (struct target_desc): Forward declare.
2916 (lynx_tdesc): Declare global.
2917 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
2918 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
2919 * nto-low.c (nto_tdesc): New global.
2920 (do_attach): Set the new process'es tdesc.
2921 * nto-low.h (struct target_desc): Forward declare.
2922 (nto_tdesc): Declare.
2923 * nto-x86-low.c (tdesc_i386): Declare.
2924 (nto_x86_arch_setup): Set `nto_tdesc'.
2925
b1fbec62
GB
29262013-06-04 Gary Benson <gbenson@redhat.com>
2927
2928 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
2929 to qSupported response when appropriate.
2930 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
2931 with nonzero-length annex.
2932 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
2933 arguments supplied in annex.
2934
d1ec4ce7
DE
29352013-05-31 Doug Evans <dje@google.com>
2936
ac44adcb 2937 PR server/15594
d1ec4ce7
DE
2938 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
2939 64 bits in 64-cross-32 environment.
2940
9b25f2d3
PA
29412013-05-28 Pedro Alves <palves@redhat.com>
2942
2943 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
2944 (aarch64-without-fpu.c): Delete rule.
2945 * configure.srv (aarch64*-*-linux*): Remove references to
2946 aarch64-without-fpu.o and aarch64-without-fpu.xml.
2947 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
2948 declaration.
2949
6740dc9c
PA
29502013-05-24 Pedro Alves <palves@redhat.com>
2951
2952 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
2953 instead of strchr/decode_address. Error if the range isn't split
2954 with a ','. Don't assume there's be a ':' in the action.
2955
c2d6af84
PA
29562013-05-23 Yao Qi <yao@codesourcery.com>
2957 Pedro Alves <palves@redhat.com>
2958
2959 * linux-low.c (lwp_in_step_range): New function.
2960 (linux_wait_1): If the thread was range stepping and stopped
2961 outside the stepping range, report the stop to GDB. Otherwise,
2962 continue stepping. Add range stepping debug output.
2963 (linux_set_resume_request): Copy the step range from the resume
2964 request to the lwp.
2965 (linux_supports_range_stepping): New.
2966 (linux_target_ops) <supports_range_stepping>: Set to
2967 linux_supports_range_stepping.
2968 * linux-low.h (struct linux_target_ops)
2969 <supports_range_stepping>: New field.
2970 (struct lwp_info) <step_range_start, step_range_end>: New fields.
2971 * linux-x86-low.c (x86_supports_range_stepping): New.
2972 (the_low_target) <supports_range_stepping>: Set to
2973 x86_supports_range_stepping.
2974 * server.c (handle_v_cont): Handle 'r' action.
2975 (handle_v_requests): Append ";r" if the target supports range
2976 stepping.
2977 * target.h (struct thread_resume) <step_range_start,
2978 step_range_end>: New fields.
2979 (struct target_ops) <supports_range_stepping>:
2980 New field.
2981 (target_supports_range_stepping): New macro.
2982
58794e1a
JB
29832013-05-17 Joel Brobecker <brobecker@adacore.com>
2984
2985 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
2986 confusion in comment.
2987
d631c5a7
JB
29882013-05-17 Joel Brobecker <brobecker@adacore.com>
2989
2990 * lynx-low.c (struct process_info_private): New type.
2991 (lynx_add_process): New function.
2992 (lynx_create_inferior, lynx_attach): Replace calls to
2993 add_process by calls to lynx_add_process.
2994 (lynx_resume): If PTID is null, then try using
2995 current_process()->private->last_wait_event_ptid.
2996 Add comments.
2997 (lynx_clear_inferiors): Delete. The contents of that function
2998 has been inlined in lynx_mourn;
2999 (lynx_wait_1): Save the ptid in the process's private data.
3000 (lynx_mourn): Free the process' private data. Replace call
3001 to lynx_clear_inferiors by call to clear_inferiors.
3002
96f7a20f
YQ
30032013-05-17 Yao Qi <yao@codesourcery.com>
3004
3005 * i386-low.c (i386_length_and_rw_bits): Move the comment to
3006 the right place.
3007
db0dfaa0
LM
30082013-05-16 Luis Machado <lgustavo@codesourcery.com>
3009
3010 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
3011 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
3012 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
3013 PT_TEXT_END_ADDR guards. Update comments.
3014 (linux_target_op) <read_offsets>: Conditionally define to
3015 linux_read_offsets if the target is UCLIBC and if it defines
3016 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3017
68f5f838
SL
30182013-05-06 Sandra Loosemore <sandra@codesourcery.com>
3019 Andrew Jenner <andrew@codesourcery.com>
3020
3021 * Makefile.in (SFILES): Add linux-nios2-low.c.
3022 (clean): Add action to delete nios2-linux.c.
3023 (nios2-linux.c): New rule.
3024 * configure.srv: Add nios2*-*-linux*.
3025 * linux-nios2-low.c: New.
3026
1ebff1fd
HAQ
30272013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
3028
3029 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3030
f6150862
HZ
30312013-04-25 Hui Zhu <hui@codesourcery.com>
3032
3033 PR gdb/15186
f6150862
HZ
3034 * ax.c (ax_printf): Add fflush.
3035
614c279d
TT
30362013-04-22 Tom Tromey <tromey@redhat.com>
3037
3038 * Makefile.in (SFILES): Add filestuff.c.
3039 (OBS): Add filestuff.o.
3040 (filestuff.o): New target.
3041 * config.in, configure: Rebuild.
3042 * configure.ac: Check for fdwalk, pipe2.
3043
7d4e5717
PA
30442013-04-17 Pedro Alves <palves@redhat.com>
3045
3046 * configure.ac (USE_THREAD_DB): Delete variable.
3047 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3048 Don't AC_SUBST USE_THREAD_DB.
3049 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3050 * config.in, configure: Regenerate.
3051
d5c93e41
PA
30522013-04-16 Pedro Alves <palves@redhat.com>
3053
3054 * linux-low.h (struct lwp_info) <thread_known>: Move under
3055 the USE_THREAD_DB #ifdef.
3056
04f5fe89
PA
30572013-04-16 Pedro Alves <palves@redhat.com>
3058
3059 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
3060 (linux-low.o): Delete rule.
3061 * linux-low.h: Always include "gdb_thread_db.h" instead of
3062 conditionally including thread_db.h.
3063 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3064 HAVE_THREAD_DB_H.
3065
480b27bf
JK
30662013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3067
3068 * Makefile.in (install-only): Fix make install regression.
3069
43662968
JK
30702013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
3071
3072 Convert man pages to texinfo, new gdbinit.5 texinfo page.
3073 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
3074 installation.
3075 * gdbserver.1: Remove.
3076
3e74e146
PA
30772013-03-22 Pedro Alves <palves@redhat.com>
3078
3079 * linux-low.c (handle_extended_wait): Don't call
3080 linux_enable_event_reporting.
3081
a8347a2a
TT
30822013-03-15 Tony Theodore <tonyt@logyst.com>
3083
3084 PR build/9098:
3085 * Makefile.in (SHELL): Use @SHELL@.
3086
eeb56fa7
SDJ
30872013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
3088
3089 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
3090 compiler warning.
3091
4fa7e2ff
JB
30922013-03-13 Joel Brobecker <brobecker@adacore.com>
3093
3094 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
3095 Remove extraneous NULL element.
3096
8ddb1965
YQ
30972013-03-13 Yao Qi <yao@codesourcery.com>
3098
3099 * tracepoint.c (traceframe_read_tsv): Look for the last matched
3100 'V' block in trace frame.
3101
9accd112
MM
31022013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3103
3104 * target.h (struct target_ops): Add btrace ops.
3105 (target_supports_btrace): New macro.
3106 (target_enable_btrace): New macro.
3107 (target_disable_btrace): New macro.
3108 (target_read_btrace): New macro.
3109 * gdbthread.h (struct thread_info): Add btrace field.
3110 * server.c: Include btrace-common.h.
3111 (handle_btrace_general_set): New function.
3112 (handle_btrace_enable): New function.
3113 (handle_btrace_disable): New function.
3114 (handle_general_set): Call handle_btrace_general_set.
3115 (handle_qxfer_btrace): New function.
3116 (struct qxfer qxfer_packets[]): Add btrace entry.
3117 * inferiors.c (remove_thread): Disable btrace.
3118 * linux-low: Include linux-btrace.h.
3119 (linux_low_enable_btrace): New function.
3120 (linux_low_read_btrace): New function.
3121 (linux_target_ops): Add btrace ops.
3122 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
3123 Add srv_linux_btrace=yes.
3124 (x86_64-*-linux*): Add linux-btrace.o.
3125 Add srv_linux_btrace=yes.
3126 * configure.ac: Define HAVE_LINUX_BTRACE.
3127 * config.in: Regenerated.
3128 * configure: Regenerated.
3129
5cc22e4c
MM
31302013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3131
3132 * server.c (handle_qxfer): Preserve error message if -3 is
3133 returned.
3134 (qxfer): Document the -3 return value.
3135
7c97f91e
MM
31362013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3137
3138 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
3139 (linux_btrace_h): New variable.
3140 (linux-btrace.o): New rule.
3141
be9a119c 31422013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
3143 Hafiz Abid Qadeer <abidh@codesourcery.com>
3144
3145 * tracepoint.c (trace_buffer_size): New global.
3146 (DEFAULT_TRACE_BUFFER_SIZE): New define.
3147 (init_trace_buffer): Change to one-argument function. Allocate
3148 trace buffer memory.
3149 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
3150 handle QTBuffer:size packet.
3151 (cmd_bigqtbuffer_size): New function.
3152 (initialize_tracepoint): Call init_trace_buffer with
3153 DEFAULT_TRACE_BUFFER_SIZE.
3154 * server.c (handle_query): Add QTBuffer:size in the
3155 supported packets.
3156
e64f7499
YQ
31572013-03-07 Yao Qi <yao@codesourcery.com>
3158
3159 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
3160 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
3161 of -1.
3162 (cmd_qtsp): Adjust condition. Do post increment.
3163 Set cur_action and cur_step_action back to 0.
3164
f0ae6fc3
PA
31652013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
3166
3167 PR server/15236
3168 * linux-low.c (linux_write_memory): Return early success if LEN is
3169 zero.
3170
b5b0b0af
CV
31712013-03-05 Corinna Vinschen <vinschen@redhat.de>
3172
334ad4a8 3173 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 3174
589bc927
TT
31752013-02-28 Tom Tromey <tromey@redhat.com>
3176
3177 * configure.ac: Invoke AC_SYS_LARGEFILE.
3178 * configure, config.in: Rebuild.
3179
dfe07582
CV
31802013-02-28 Corinna Vinschen <vinschen@redhat.com>
3181
3182 * win32-low.c: Throughout, fix format strings and casts of
3183 printf-like functions to avoid type related warnings on all
3184 platforms.
3185 (get_child_debug_event): Print dwDebugEventCode as hex since
3186 that's how it's usually documented.
3187
736cd585
YQ
31882013-02-28 Yao Qi <yao@codesourcery.com>
3189
3190 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
3191 pulongest.
3192
e1f58301
JW
31932013-02-27 Jiong Wang <jiwang@tilera.com>
3194
3195 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3196 (reg-tilegx32.c): New rule.
3197 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3198 * linux-tile-low.c (tile_arch_setup): New function. Invoke
3199 different register info initializer according to elf class.
3200 (init_registers_tilgx32): New function. The tilegx32 register info
3201 initializer.
3202 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3203 (tile_store_gregset): Likewise.
3204
d171ca78
YQ
32052013-02-27 Yao Qi <yao@codesourcery.com>
3206
3207 * server.c (process_point_options): Print debug message when
3208 debug_threads is true.
3209
282bbdf3
YQ
32102013-02-26 Yao Qi <yao@codesourcery.com>
3211
3212 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
3213
aca22551
PA
32142013-02-19 Pedro Alves <palves@redhat.com>
3215 Kai Tietz <ktietz@redhat.com>
3216
3217 PR gdb/15161
3218
3219 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
3220 instead of strtoul to extract address from packet.
3221 (process_serial_event) <'z'>: Likewise.
3222
4f3cee1c
YQ
32232013-02-18 Yao Qi <yao@codesourcery.com>
3224
3225 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3226
8e1d55a3
PA
32272013-02-14 Pedro Alves <palves@redhat.com>
3228
3229 Plug memory leak.
3230
3231 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3232 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3233
458820da
PA
32342013-02-14 Pedro Alves <palves@redhat.com>
3235
3236 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3237
baea0dae
PA
32382013-02-14 Pedro Alves <palves@redhat.com>
3239
3240 * tracepoint.c (save_string): Delete.
3241 (add_tracepoint_action): Use savestring instead of save_string.
3242
0b1afbb3
PA
32432013-02-12 Pedro Alves <palves@redhat.com>
3244
3245 * linux-xtensa-low.c: Ditto.
3246 * xtensa-xtregs.c: Ditto.
3247
8a4ac37e
PA
32482013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3249
3250 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3251 thread_db.
3252
148de6bb
MS
32532013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3254
3255 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3256 aarch64_num_wp_regs and aarch64_num_bp_regs to
3257 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3258
55fac6e0
MS
32592013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3260
3261 * linux-aarch64-low.c (ps_get_thread_area): Replace
3262 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3263
176eb98c
MS
32642013-02-04 Jim MacArthur <jim.macarthur@arm.com>
3265 Marcus Shawcroft <marcus.shawcroft@arm.com>
3266 Nigel Stephens <nigel.stephens@arm.com>
3267 Yufeng Zhang <yufeng.zhang@arm.com>
3268
3269 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3270 (aarch64.c, aarch64-without-fpu.c): New targets.
3271 * configure.srv (aarch64*-*-linux*): New.
3272 * linux-aarch64-low.c: New file.
3273
56f7af9c
MS
32742013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3275
43aaf8b6 3276 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
3277 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3278 (dequeue_one_deferred_signal, linux_resume_one_thread)
3279 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3280 (linux_tracefork_grandchild, linux_test_for_tracefork)
3281 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3282 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3283 where the argument is 0.
3284
60f662b0
YQ
32852013-01-25 Yao Qi <yao@codesourcery.com>
3286
3287 * event-loop.c: Include "queue.h".
3288 (gdb_event_p): New typedef.
3289 (struct gdb_event) <next_event>: Remove.
3290 (event_queue): Change to QUEUE(gdb_event_p).
3291 (async_queue_event): Remove.
3292 (gdb_event_xfree): New.
3293 (initialize_event_loop): New.
3294 (process_event): Use API from QUEUE.
3295 (wait_for_event): Likewise.
3296 * server.c (main): Call initialize_event_loop.
3297 * server.h (initialize_event_loop): Declare.
3298
5ae4861a
YQ
32992013-01-18 Yao Qi <yao@codesourcery.com>
3300
3301 * ax.h (struct eval_agent_expr_context): New.
3302 (gdb_eval_agent_expr): Update declaration.
3303 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
3304 TFRAME. Add new argument CTX.
3305 * server.h (struct eval_agent_expr_context): Declare.
3306 (agent_mem_read, agent_tsv_read): Update declaration.
3307 (agent_mem_read_string): Likewise.
3308 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
3309 (add_traceframe_block): Add new argument TPOINT.
3310 Increase TPOINT->traceframe_usage.
3311 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
3312 eval_tracepoint_agent_expr.
3313 (condition_true_at_tracepoint): Likewise.
3314 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
3315 (agent_mem_read_string, agent_tsv_read): Likewise.
3316
85e00e85
YQ
33172013-01-16 Yao Qi <yao@codesourcery.com>
3318
3319 * linux-low.c (linux_resume_one_lwp): Don't check
3320 'lwp->bp_reinsert != 0'.
3321
4039cf45
JB
33222013-01-07 Joel Brobecker <brobecker@adacore.com>
3323 Pedro Alves <palves@redhat.com>
3324
3325 * lynx-low.c (ptrace_request_to_str): Define a temporary
3326 macro and use it to simplify this function's implementation.
3327
9044dee2
JB
33282013-01-07 Joel Brobecker <brobecker@adacore.com>
3329
3330 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
3331 sets errno.
3332
e6352c8f
JB
33332013-01-07 Joel Brobecker <brobecker@adacore.com>
3334
3335 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
3336
50681a27
JB
33372013-01-07 Joel Brobecker <brobecker@adacore.com>
3338
3339 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
3340
3f6e77ef
JB
33412013-01-07 Joel Brobecker <brobecker@adacore.com>
3342
3343 * lynx-low.c (lynx_resume): Use the resume_info parameter
3344 to determine the ptid for the lynx_ptrace call, unless
3345 it is equal to minus_one_ptid, in which case we use the
3346 ptid of the current_inferior.
3347 (lynx_wait_1): After having received a thread create/exit
3348 event, resume the inferior's execution using the signaling
3349 thread's ptid, rather than the old ptid.
3350
7fda33ae
JB
33512013-01-07 Joel Brobecker <brobecker@adacore.com>
3352
3353 * lynx-low.c (lynx_resume): Delete variable ret.
3354
b9786c74
JB
33552013-01-01 Joel Brobecker <brobecker@adacore.com>
3356
3357 * gdbreplay.c (gdbreplay_version): Update copyright year.
3358 * server.c (gdbserver_version): Likewise.
3359
8b93d60f
JB
33602012-12-17 Joel Brobecker <brobecker@adacore.com>
3361
3362 * lynx-low.c (lynx_wait_1): Add debug trace before adding
3363 new thread.
3364
037335a7
JB
33652012-12-17 Joel Brobecker <brobecker@adacore.com>
3366
3367 * lynx-low.c (ptrace_request_to_str): Add handling for
3368 PTRACE_GETTRACESIG.
3369
52d4cbd8
JB
33702012-12-17 Joel Brobecker <brobecker@adacore.com>
3371
3372 * lynx-low.c (lynx_attach): Delete variable new_process.
3373
ab8f6ca9
JB
33742012-12-17 Joel Brobecker <brobecker@adacore.com>
3375
3376 * lynx-low.c (lynx_create_inferior): Delete variable
3377 new_process.
3378
78cbc024
JB
33792012-12-17 Joel Brobecker <brobecker@adacore.com>
3380
3381 * lynx-low.c (ptrace_request_to_str): Do not handle
3382 PTRACE_GETTHREADLIST if this macro does not exist.
3383
14a00470
YQ
33842012-12-15 Yao Qi <yao@codesourcery.com>
3385
3386 * Makefile.in (OBS): Add notif.o.
3387 * notif.c, notif.h: New.
3388 * server.c: Include "notif.h".
3389 (struct vstop_notif) <next>: Remove.
3390 <base>: New field.
3391 (queue_stop_reply): Update.
3392 (push_event, send_next_stop_reply): Remove.
3393 (discard_queued_stop_replies): Update.
3394 (notif_stop): New variable.
3395 (handle_v_stopped): Remove.
3396 (handle_v_requests): Don't call handle_v_stopped. Call
3397 handle_ack_notif instead.
3398 (queue_stop_reply_callback): Call notif_event_enque instead
3399 of queue_stop_reply.
3400 (handle_status): Don't call send_next_stop_reply, call
3401 notif_write_event instead.
3402 (kill_inferior_callback): Likewise.
3403 (detach_or_kill_inferior_callback): Likewise.
3404 (main): Call initialize_notif.
3405 (process_serial_event): Call QUEUE_is_empty.
3406 (handle_target_event): Call notif_push instead of push event.
3407 * server.h (push_event): Remove declaration.
3408
61c125b9
TT
34092012-12-10 Tom Tromey <tromey@redhat.com>
3410
3411 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
3412 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
3413 macros.
3414 (.c.o): Rewrite.
3415 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
3416 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
3417 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
3418 (amd64-linux-ipa.o, ax.o): Rewrite.
3419 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
3420 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
3421 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
3422 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
3423 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
3424 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
3425 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
3426 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
3427 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
3428 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
3429 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
3430 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
3431 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
3432 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
3433 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
3434 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
3435 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
3436 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
3437 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
3438 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
3439 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
3440 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
3441 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
3442 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
3443 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
3444 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
3445 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
3446 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
3447 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
3448 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
3449 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
3450 (reg-tilegx.o): Remove.
3451 (all_object_files): New macro.
3452 Include .deps files.
3453 * aclocal.m4, configure: Rebuild.
3454 * acinclude.m4: Include depstand.m4, lead-dot.m4.
3455 * configure.ac: Invoke ZW_CREATE_DEPDIR,
3456 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
3457
e90e9ad9
TT
34582012-12-05 Tom Tromey <tromey@redhat.com>
3459
3460 PR gdb/14917:
3461 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
3462
02d403bf 34632012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
3464
3465 * configure.ac: Check for linux/perf_event.h.
3466 * config.in: Regenerated.
3467 * configure: Regenerated.
3468
0270a750
PA
34692012-11-26 Maxime Villard <rustyBSD@gmx.fr>
3470
3471 * hostio.c (handle_readlink): Decrease buffer size
3472 parameter passed to readlink by one byte.
3473
8c29b58e
YQ
34742012-11-26 Yao Qi <yao@codesourcery.com>
3475
3476 * configure.ac (build_warnings): Append '-Wempty-body'.
3477 * configure: Regenerated.
3478 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
3479 body.
3480
8bdce1ff
PM
34812012-11-15 Pierre Muller <muller@sourceware.org>
3482
3483 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
3484 * config.in: Regenerate.
3485 * configure: Regenerate.
3486 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
3487 Use "gdb_wait.h" header instead of <sys/wait.h> header.
3488 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3489 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
3490 header.
3491 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
3492 instead of <sys/wait.h> header.
3493 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3494
02d403bf 34952012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
3496
3497 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
3498 (various make rules): Remove -DGDBSERVER
3499
fbd5db48
YQ
35002012-11-09 Yao Qi <yao@codesourcery.com>
3501
3502 * spu-low.c (current_ptid): Move it to ..
3503 * gdbthread.h: ... here. New.
3504 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
3505 * server.c (myresume, process_serial_event): Likewise.
3506 * thread-db.c (thread_db_find_new_threads): Likewise.
3507 * tracepoint.c (run_inferior_command): Likewise.
3508
b3dc46ff
AB
35092012-10-01 Andrew Burgess <aburgess@broadcom.com>
3510
3511 * server.c (handle_search_memory_1): Include access length in
3512 warning message.
3513
07c04788
HPN
35142012-09-05 Michael Brandt <michael.brandt@axis.com>
3515
3516 * linux-crisv32-low.c: Fix compile errors.
3517
918d227b
YQ
35182012-09-04 Yao Qi <yao@codesourcery.com>
3519
3520 * tracepoint.c (cmd_qtsv): Adjust debug message.
3521 Don't check CUR_TPOINT.
3522
18c1b81a
YQ
35232012-08-28 Yao Qi <yao@codesourcery.com>
3524
3525 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
3526 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
3527 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
3528 Remove declarations of xmalloc, xreallloc, xstrdup and
3529 freeargv.
3530 * Makefile.in (libiberty_h): New.
3531 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
3532 (linux-bfin-low.o): Append dependency 'libiberty.h'.
3533
dc82f37b
YQ
35342012-08-23 Yao Qi <yao@codesourcery.com>
3535
3536 * server.h: Remove declaration of 'xsnprintf'.
3537
406b1477
KS
35382012-08-22 Keith Seitz <keiths@redhat.com>
3539
3540 * server.h: Include build-gnulib-gbserver/config.h.
3541 * gdbreplay.c: Likewise.
3542
e6712ff1
DE
35432012-08-08 Doug Evans <dje@google.com>
3544
3545 * Makefile.in (SFILES): Add gdb_vecs.c.
3546 (OBS): Add gdb_vecs.o.
3547 (gdb_vecs_h, host_defs_h): New variables.
3548 (thread-db.o): Add $(gdb_vecs_h) dependency.
3549 (gdb_vecs.o): New rule.
3550 * thread-db.c: #include "gdb_vecs.h".
3551 (thread_db_load_search): Use a vector to iterate over path elements.
3552 Handle text appearing after "$pdir".
3553
3554 * configure.ac: Add check for strstr.
3555 * config.in: Regenerate.
3556 * configure: Regenerate.
3557
7c3270ae
UW
35582012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
3559
3560 * hostio.c (handle_pread): If pread fails, fall back to attempting
3561 lseek/read.
3562 (handle_pwrite): Likewise for pwrite.
3563
b62e2b27
UW
35642012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
3565
3566 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
3567 between unsupported TYPE and unimplementable ADDR/LEN combination.
3568 (arm_insert_point): Act on new return value.
3569
78a99e91
PA
35702012-07-31 Pedro Alves <palves@redhat.com>
3571
3572 * server.c (process_point_options): Only skip tokens if we find
3573 one that is unrecognized. Don't treat 'X' specially while
3574 skipping unrecognized tokens.
3575
fcf303ab
UW
35762012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
3577
3578 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
3579 to 4-byte-align HW breakpoint addresses for Thumb.
3580
7255706c
YQ
35812012-07-27 Yao Qi <yao@codesourcery.com>
3582
3583 PR remote/14161.
3584
3585 * server.h: Declare gdb_agent_about_to_close.
3586 * target.c (kill_inferior): Include "agent.h".
3587 New. Send command 'kill'.
3588 * target.h (kill_inferior): Removed macro.
3589 * tracepoint.c (gdb_agent_about_to_close): New.
3590 (gdb_agent_helper_thread): Handle command 'close'.
3591 Wait endlessly until the inferior stops.
3592 Install gdb_agent_remove_socket to atexit hook.
3593 (agent_socket_name): New static variable.
3594 (gdb_agent_socket_init): Replace local variable 'name' with
3595 'agent_socket_name'.
3596 (gdb_agent_remove_socket): New.
3597
5a3f286f
YQ
35982012-07-27 Yao Qi <yao@codesourcery.com>
3599
3600 * server.c (process_point_options): Stop at 'X' when parsing.
3601
961bd387
ME
36022012-07-19 Michael Eager <eager@eagercon.com>
3603
a261b8f5 3604 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
3605 to hw_execute.
3606 * linux-x86-low.c (x86_insert_point, x86_remove_point):
3607 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
3608 hardware breakpoint.
3609
aa7c7447
JK
36102012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3611
3612 * gdbserver/linux-low.c (initialize_low): Call
3613 linux_ptrace_init_warnings.
3614
7f216e7c
DE
36152012-07-02 Doug Evans <dje@google.com>
3616
3617 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
3618 pointer to int.
3619
d3ce09f5
SS
36202012-07-02 Stan Shebs <stan@codesourcery.com>
3621
3622 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
3623 (ax.o): Add it to build rule.
3624 (ax-ipa.o): Ditto.
3625 (OBS): Add format.o.
3626 (IPA_OBS): Add format.o.
3627 * server.c (handle_query): Claim support for breakpoint commands.
3628 (process_point_options): Add command case.
3629 (process_serial_event): Leave running if there are printfs in
3630 effect.
3631 * mem-break.h (any_persistent_commands): Declare.
3632 (add_breakpoint_commands): Declare.
3633 (gdb_no_commands_at_breakpoint): Declare.
3634 (run_breakpoint_commands): Declare.
3635 * mem-break.c (struct point_command_list): New struct.
3636 (struct breakpoint): New field command_list.
3637 (any_persistent_commands): New function.
3638 (add_commands_to_breakpoint): New function.
3639 (add_breakpoint_commands): New function.
3640 (gdb_no_commands_at_breakpoint): New function.
3641 (run_breakpoint_commands): New function.
3642 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
3643 locally.
3644 * ax.c: Include format.h.
3645 (ax_printf): New function.
3646 (gdb_eval_agent_expr): Add printf opcode.
3647
2f8f6aed
YQ
36482012-06-13 Yao Qi <yao@codesourcery.com>
3649
3650 * server.c (start_inferior): Remove duplicated writes to fields
3651 'last_resume_kind' and 'last_status' of 'current_inferior'.
3652
0c9070b3
YQ
36532012-06-12 Yao Qi <yao@codesourcery.com>
3654 Pedro Alves <palves@redhat.com>
3655
3656 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
3657 comment.
3658 * server.c (handle_v_cont): Extend comment.
3659
c52daf70
YQ
36602012-06-11 Yao Qi <yao@codesourcery.com>
3661
3662 * linux-low.c (linux_attach): Add 'static'.
3663
d38bbb0a
YQ
36642012-06-06 Yao Qi <yao@codesourcery.com>
3665
3666 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
3667
89dc0afd
JK
36682012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
3669
3670 Fix gcc -flto compilation warning.
3671 * server.c (main): Make variable multi_mode and attach volatile.
3672
75f62ce7
TJB
36732012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3674
3675 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
3676 if the platform doesn't know about it.
3677
65f479b6
PA
36782012-05-30 Jeff Kenton <jkenton@tilera.com>
3679
3680 * Makefile.in (SFILES): Add linux-tile-low.c.
3681 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
3682 * configure.srv: Handle tilegx-*-linux*.
3683 * linux-tile-low.c: New file.
3684
0c5bf5a9
JK
36852012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3686
3687 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
3688
a493e3e2
PA
36892012-05-24 Pedro Alves <palves@redhat.com>
3690
3691 PR gdb/7205
3692
43aaf8b6 3693 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 3694
2ea28649
PA
36952012-05-24 Pedro Alves <palves@redhat.com>
3696
3697 PR gdb/7205
3698
3699 Replace target_signal with gdb_signal throughout.
3700
8d409d16
MR
37012012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
3702
3703 * linux-low.c (linux_store_registers): Avoid the copying sequence
3704 when no data has been retrieved by ptrace.
3705
23512c01
MGD
37062012-05-22 Will Deacon <will.deacon@arm.com>
3707
3708 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
3709 Include asm/ptrace.h.
3710 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
3711 already defined.
3712
4934b29e
MR
37132012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
3714
3715 * linux-low.c (linux_store_registers): Don't re-retrieve data
3716 with ptrace that has already been obtained from /proc. Always
3717 copy any data retrieved with ptrace to the buffer supplied.
3718
bde24c0a
PA
37192012-05-11 Yao Qi <yao@codesourcery.com>
3720 Pedro Alves <palves@redhat.com>
3721
3722 * linux-low.c (enum stopping_threads_kind): New.
3723 (stopping_threads): Change type to `enum stopping_threads_kind'.
3724 (handle_extended_wait): If stopping and suspending threads, leave
3725 the new_lwp suspended too.
3726 (linux_wait_for_event): Adjust.
3727 (stop_all_lwps): Set `stopping_threads' to
3728 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
3729 whether we're suspending threads or just stopping them. Assert no
3730 recursion happens.
3731
623b6bdf
YQ
37322012-04-29 Yao Qi <yao@codesourcery.com>
3733
3734 * server.h: Move some code to ...
3735 * gdbthread.h: ... here. New.
3736 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
3737 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
3738 (nto-low.o, win32-low.o): Likewise.
3739 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
3740 * regcache.c, remote-utils.c, server.c: Likewise.
3741 * target.c, tracepoint.c, win32-low.c: Likewise.
3742
f15f9948
TJB
37432012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3744
3745 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
3746 (PTRACE_ARG4_TYPE): Likewise.
3747 (PTRACE_XFER_TYPE): Likewise.
3748 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
3749 ptrace to PTRACE_ARG3_TYPE.
3750 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
3751 (PTRACE_ARG4_TYPE): Likewise.
3752 (PTRACE_XFER_TYPE): Likewise.
3753 (linux_detach_one_lwp): Cast fourth argument of
3754 ptrace to long then PTRACE_ARG4_TYPE.
3755 (regsets_fetch_inferior_registers): Cast third argument of
3756 ptrace to long then PTRACE_ARG3_TYPE.
3757 (regsets_store_inferior_registers): Likewise.
3758
38ea300a
PA
37592012-04-20 Pedro Alves <palves@redhat.com>
3760
3761 * configure: Regenerate.
3762
c971b7fa
PA
37632012-04-19 Pedro Alves <palves@redhat.com>
3764
43aaf8b6 3765 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 3766 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
3767 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
3768 (all, install-only, uninstall, clean-info, all-lib, clean): No
3769 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
3770 (maintainer-clean realclean distclean): Use subdir_do.
3771 (subdir_do): New.
3772 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 3773 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
3774 * acinclude.m4: Include acx_configure_dir.m4.
3775 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
3776 calls. Call AC_PROG_RANLIB. Configure gnulib using
3777 ACX_CONFIGURE_DIR.
3778 (GNULIB): New.
3779 (GNULIB_STDINT_H): Adjust.
3780 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
3781 * gdbreplay.c: Include build-gnulib/config.h.
3782 * server.h: Likewise.
3783 * aclocal.m4: Regenerate.
3784 * config.in: Regenerate.
3785 * configure: Regenerate.
c971b7fa 3786
809277f8
PA
37872012-04-19 Pedro Alves <palves@redhat.com>
3788
3789 * Makefile.in (LIBGNU, INCGNU): Adjust.
3790 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
3791 (all, install-only, uninstall, clean-info, all-lib, clean)
3792 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
3793 * configure.ac: Adjust AC_OUTPUT output.
3794 * aclocal.m4: Regenerate.
3795 * configure: Regenerate.
3796
fd9bb8b8
PA
37972012-04-19 Pedro Alves <palves@redhat.com>
3798
3799 * Makefile.in (generated_files): New.
3800 (server_h): Remove the explicit dependency on config.h, and depend
3801 on $generated_files.
3802
1c298c66
PA
38032012-04-19 Pedro Alves <palves@redhat.com>
3804
3805 * Makefile.in (INCGNU): Add -Ignulib.
3806
57c4b50b
PA
38072012-04-19 Pedro Alves <palves@redhat.com>
3808
3809 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
3810 (INCGNU): ... this, and spell out -I here.
3811 (GNULIB_LIB): Rename to ...
3812 (LIBGNU): ... this.
3813 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
3814
1030e047
PA
38152012-04-19 Pedro Alves <palves@redhat.com>
3816
3817 * config.in: Regenerate.
3818
447d4319
PA
38192012-04-19 Pedro Alves <palves@redhat.com>
3820
3821 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
3822 * server.h (memmem): Remove declaration.
3823 * config.in: Regenerate.
3824 * configure: Regenerate.
3825
aad9eab9
YQ
38262012-04-19 Yao Qi <yao@codesourcery.com>
3827
3828 * Makefile.in (SFILES): Add common/vec.c.
3829 (OBS): Add vec.o.
3830 (vec.o): New rule.
3831
3e10640f
YQ
38322012-04-19 Yao Qi <yao@codesourcery.com>
3833
3834 * remote-utils.c (prepare_resume_reply): Replace with macro
3835 target_core_of_thread.
3836 * server.c (handle_qxfer_threads_proper): Likewise.
3837 * target.h (traget_core_of_thread): New macro.
3838
71622373
PA
38392012-04-18 Pedro Alves <palves@redhat.com>
3840
3841 * aclocal.m4: Regenerate.
3842 * configure: Regenerate.
3843
80d26939
YQ
38442012-04-16 Yao Qi <yao@codesourcery.com>
3845
3846 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
3847 duplicated on address.
3848
42476b70
YQ
38492012-04-16 Yao Qi <yao@codesourcery.com>
3850
3851 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
3852 (struct tracepoint_action_ops) <send>: New field.
3853 (m_tracepoint_action_send, r_tracepoint_action_send): New.
3854 (agent_expr_send, x_tracepoint_action_send): New.
3855 (l_tracepoint_action_send): New.
3856 (cmd_qtdp): Download and install tracepoint
3857 according to `use_agent'.
3858 (run_inferior_command): Add one more parameter `len'.
3859 Update callers.
3860 (tracepoint_send_agent): New.
3861 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
3862
7bc83639
YQ
38632012-04-16 Yao Qi <yao@codesourcery.com>
3864
3865 * tracepoint.c (download_tracepoints): Moved to ...
3866 (cmd_qtstart): ... here.
3867
5f18041e
YQ
38682012-04-14 Yao Qi <yao@codesourcery.com>
3869
3870 * tracepoint.c: Include inttypes.h.
3871 (struct collect_memory_action): Use sized types.
3872 (struct tracepoint): Likewise.
3873 (cmd_qtdp, stop_tracing): Update print specifiers.
3874 (cmd_qtp, response_tracepoint): Likewise.
3875 (collect_data_at_tracepoint): Likewise.
3876 (collect_data_at_step): Likewise.
3877
55a8c076
YQ
38782012-04-14 Yao Qi <yao@codesourcery.com>
3879
3880 Import gnulib module inttypes.
3881 * aclocal.m4, config.in, configure: Regenerated.
3882
dc750257
YQ
38832012-04-14 Yao Qi <yao@codesourcery.com>
3884
3885 * Makefile.in (maintainer-clean, realclean, distclean): Remove
3886 Makefile and config.status at last.
3887
0ab5faf9
YQ
38882012-04-13 Yao Qi <yao@codesourcery.com>
3889
3890 * tracepoint.c: Include stdint.h unconditionally.
3891
18f5fd81
TJB
38922012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3893
3894 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
3895 on BFD_HAVE_SYS_PROCFS_TYPE.
3896 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
3897 * configure: Regenerate.
3898 * config.in: Likewise.
3899
4d47af5c
L
39002012-04-13 H.J. Lu <hongjiu.lu@intel.com>
3901
3902 * Makefile.in (clean): Also remove x32.c x32-linux.c
3903 x32-avx.c x32-avx-linux.c.
3904 (x32.o): New target.
3905 (x32.c): Likewise.
3906 (x32-linux.o): Likewise.
3907 (x32-linux.c): Likewise.
3908 (x32-avx.o): Likewise.
3909 (x32-avx.c): Likewise.
3910 (x32-avx-linux.o): Likewise.
3911 (x32-avx-linux.c): Likewise.
3912
3913 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
3914 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
3915 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
3916 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
3917 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
3918 i386/x32-avx-linux.xml.
3919
3920 * linux-x86-low.c (init_registers_x32_linux): New prototype.
3921 (init_registers_x32_avx_linux): Likwise.
3922 (x86_linux_update_xmltarget): Call init_registers_x32_linux
3923 or init_registers_x32_avx_linux if linux_is_elf64 is false.
3924
ecedbe58
PA
39252012-04-13 Pedro Alves <palves@redhat.com>
3926
3927 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
3928 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
3929 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
3930 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
3931 the sub-make.
3932
c92b5177
L
39332012-04-12 H.J. Lu <hongjiu.lu@intel.com>
3934
3935 * linux-x86-low.c (compat_x32_clock_t): New.
3936 (compat_x32_siginfo_t): Likewise.
3937 (compat_x32_siginfo_from_siginfo): Likewise.
3938 (siginfo_from_compat_x32_siginfo): Likewise.
3939 (linux_is_elf64): Likewise.
3940 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
3941 and siginfo_from_compat_x32_siginfo for x32.
3942 (x86_arch_setup): Set linux_is_elf64.
3943
214d508e
L
39442012-04-12 H.J. Lu <hongjiu.lu@intel.com>
3945
3946 PR gdb/13969
3947 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
3948 e_machine field.
3949 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
3950 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
3951 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
3952 compatible with process.
3953
c9a1864a
YQ
39542012-04-12 Yao Qi <yao@codesourcery.com>
3955
3956 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
3957 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
3958 (install-only, install-info, clean): Handle sub dir gnulib.
3959 (all-lib, am--refresh): New targets.
3960 (memmem.o): Remove target.
3961 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
3962 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
3963 (AC_REPLACE_FUNCS): Remove memmem.
3964 Invoke gl_INIT and AM_INIT_AUTOMAKE.
3965 (AC_OUTPUT): Generate Makefile in gnulib/.
3966 * aclocal.m4, config.in, configure: Regenerated.
3967
367ba2c2
MR
39682012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
3969
3970 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
3971
9d236627
PA
39722012-04-05 Pedro Alves <palves@redhat.com>
3973
3974 -Werror=strict-aliasing
3975
3976 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
3977 pointer.
3978
111217b3
PA
39792012-04-04 Pedro Alves <palves@redhat.com>
3980
3981 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
3982 (sparc_store_gregset_from_stack, sparc_store_gregset)
3983 (sparc_breakpoint_at): Fix formatting.
3984
8365dcf5
TJB
39852012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3986
3987 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
3988 are available.
3989 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
3990 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
3991 * config.in: Regenerate.
3992 * configure: Likewise.
3993
689cc2ae
PA
39942012-03-29 Pedro Alves <palves@redhat.com>
3995
3996 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
3997 Correct ptrace arguments.
3998
c14dfd32
PA
39992012-03-28 Pedro Alves <palves@redhat.com>
4000
4001 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4002 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4003 (IA64_FR1_REGNUM): New defines.
4004 (ia64_fetch_register): New.
4005 (the_low_target): Install it.
4006 * linux-low.h (struct linux_target_ops) <fetch_register>: New
4007 field.
4008 * linux-low.c (linux_fetch_registers): Try the
4009 the_low_target.fetch_register hook first.
4010
4011 * linux-arm-low.c (the_low_target): Adjust.
4012 * linux-bfin-low.c (the_low_target): Adjust.
4013 * linux-cris-low.c (the_low_target): Adjust.
4014 * linux-crisv32-low.c (the_low_target): Adjust.
4015 * linux-m32r-low.c (the_low_target): Adjust.
4016 * linux-m68k-low.c (the_low_target): Adjust.
4017 * linux-mips-low.c (the_low_target): Adjust.
4018 * linux-ppc-low.c (the_low_target): Adjust.
4019 * linux-s390-low.c (the_low_target): Adjust.
4020 * linux-sh-low.c (the_low_target): Adjust.
4021 * linux-sparc-low.c (the_low_target): Adjust.
4022 * linux-tic6x-low.c (the_low_target): Adjust.
4023 * linux-x86-low.c (the_low_target): Adjust.
4024 * linux-xtensa-low.c (the_low_target): Adjust.
4025
63c88e13
PA
40262012-03-26 Pedro Alves <palves@redhat.com>
4027
4028 * server.c (handle_qxfer_libraries): Don't bail early if
4029 the_target->qxfer_libraries_svr4 is not NULL.
4030
fb723180
PA
40312012-03-26 Pedro Alves <palves@redhat.com>
4032
4033 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4034
0afae3cf
PA
40352012-03-23 Pedro Alves <palves@redhat.com>
4036
4037 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4038 "library-list-svr4" element's start tag when the the DSO list is
4039 empty.
4040
485f1ee4
PA
40412012-03-23 Pedro Alves <palves@redhat.com>
4042
4043 * linux-low.c (read_one_ptr): Read the inferior's pointer through
4044 a variable whose type size is the same as the inferior's pointer
4045 size.
4046
a5362b9a
TS
40472012-03-21 Thomas Schwinge <thomas@codesourcery.com>
4048
4049 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4050 struct siginfo.
4051 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4052 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4053 * linux-low.h: Include <signal.h>.
4054 (struct siginfo): Remove forward declaration.
4055 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
4056 struct siginfo.
4057
d226c142
MF
40582012-03-21 Mike Frysinger <vapier@gentoo.org>
4059
4060 * .gitignore: Ignore more files.
4061
122f36ef
PA
40622012-03-19 Pedro Alves <palves@redhat.com>
4063 Jan Kratochvil <jan.kratochvil@redhat.com>
4064
4065 * server.c (cont_thread, general_thread): Add describing comments.
4066 (start_inferior): Clear `cont_thread'.
4067 (handle_v_cont): Don't set `cont_thread' if resuming all threads
4068 of a process.
4069
fc3e5175
YQ
40702012-03-15 Yao Qi <yao@codesourcery.com>
4071
4072 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
4073 handling to ...
4074 (cmd_qtdp): ... here.
4075
8d0d92cd
YQ
40762012-03-15 Yao Qi <yao@codesourcery.com>
4077
4078 * tracepoint.c (struct tracepoint_action_ops): New.
4079 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
4080 (m_tracepoint_action_download): New.
4081 (r_tracepoint_action_download): New.
4082 (x_tracepoint_action_download): New.
4083 (l_tracepoint_action_download): New.
4084 (add_tracepoint_action): Install `action->ops' according type.
4085 (download_tracepoint_1): Move code `download' function pointer
4086 of various tracepoint_action_ops.
4087
87b0bb13
JK
40882012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4089
4090 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
4091 linux_ptrace_attach_warnings.
4092
5f572dec
JK
40932012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4094
4095 * Makefile.in (linux-ptrace.o): New.
4096 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
4097 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
4098 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
4099 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
4100 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
4101 of these targets.
4102 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
4103
f4647387
YQ
41042012-03-08 Yao Qi <yao@codesourcery.com>
4105 Pedro Alves <palves@redhat.com>
4106
4107 Fix PR server/13392.
4108 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
4109 offset of JMP insn.
4110 * tracepoint.c (remove_tracepoint): New.
4111 (cmd_qtdp): Call remove_tracepoint when failed to install.
4112
9b224c5e
PA
41132012-03-07 Pedro Alves <palves@redhat.com>
4114
4115 * linux-low.c (get_detach_signal): New.
4116 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
4117 Pass on pending signals to PTRACE_DETACH. Check the result of the
4118 ptrace call.
4119 * server.c (program_signals, program_signals_p): New.
4120 (handle_general_set): Handle QProgramSignals.
4121 * server.h (program_signals, program_signals_p): Declare.
4122
e237a7e2
JK
41232012-03-05 Pedro Alves <palves@redhat.com>
4124 Jan Kratochvil <jan.kratochvil@redhat.com>
4125
4126 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
4127 New comment why.
4128
5808517f
YQ
41292012-03-03 Yao Qi <yao@codesourcery.com>
4130
4131 * tracepoint.c (tracepoint_look_up_symbols): Update call to
4132 agent_look_up_symbols.
4133
58b4daa5
YQ
41342012-03-03 Yao Qi <yao@codesourcery.com>
4135
4136 * Makefile.in (linux-low.o): Keep dependence on agent.h.
4137 (linux-x86-low.o): Likewise.
4138 * server.h: Remove in_process_agent_loaded.
4139 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
4140 common/agent.c.
4141 Update callers.
4142
8ffcbaaf
YQ
41432012-03-03 Yao Qi <yao@codesourcery.com>
4144
4145 * tracepoint.c (gdb_agent_capability): New global.
4146 (in_process_agent_loaded_ust): Renamed to
4147 `in_process_agent_supports_ust'.
4148 Update callers.
4149 (in_process_agent_supports_ust): Call agent_capability_check.
4150 (clear_installed_tracepoints): Assert that agent supports
4151 agent.
4152
d1feda86
YQ
41532012-03-03 Yao Qi <yao@codesourcery.com>
4154
4155 * linux-low.c (linux_supports_agent): New.
4156 (linux_target_ops): Initialize field `supports_agent' with
4157 linux_supports_agent.
4158 * target.h (struct target_ops) <supports_agent>: New.
4159 (target_supports_agent): New macro.
4160 * server.c (handle_general_set): Handle packet 'QAgent'.
4161 (handle_query): Send `QAgent+'.
4162 * Makefile.in (server.o): Depends on agent.h.
4163
2fa291ac
YQ
41642012-03-03 Yao Qi <yao@codesourcery.com>
4165
4166 * Makefile.in (OBS): Add agent.o.
4167 Add new rule for agent.o.
4168 Track dependence of tracepoint.c on agent.h.
4169 * tracepoint.c (run_inferior_command_1):
4170 (run_inferior_command): Call agent_run_command.
4171 (gdb_ust_connect_sync_socket): Deleted. Move it to
4172 common/agent.c.
4173 (resume_thread, stop_thread): Likewise.
4174 (gdb_ust_socket_init): Renamed to ...
4175 (gdb_agent_socket_init): ... New.
4176 (gdb_ust_thread): Renamed to ...
4177 (gdb_agent_helper_thread): ... New.
4178 (gdb_ust_init): Move some code to ...
4179 (gdb_agent_init): ... here. New.
4180 [HAVE_UST]: Call gdb_ust_init.
4181 (initialize_tracepoint_ftlib): Call gdb_agent_init.
4182 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
4183 * config.in, configure: Regenerated.
4184
05044653
PA
41852012-03-02 Pedro Alves <palves@redhat.com>
4186
4187 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
4188 * linux-low.c (struct simple_pid_list): New.
4189 (stopped_pids): New a struct simple_pid_list pointer.
4190 (add_to_pid_list, pull_pid_from_list): New.
4191 (handle_extended_wait): Don't assume the first signal new children
4192 report is SIGSTOP. Adjust call to pull_pid_from_list.
4193 (linux_wait_for_lwp): Adjust.
4194
8d00225b
YQ
41952012-03-02 Yao Qi <yao@codesourcery.com>
4196
4197 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4198 debug log.
4199
19560ba5
YQ
42002012-03-02 Yao Qi <yao@codesourcery.com>
4201
4202 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4203 `stop_pc' and `tpoint'. Update caller.
4204
1faeff08
MR
42052012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
4206
4207 * linux-low.h (linux_target_ops): Add regset_bitmap member.
4208 * linux-low.c (use_linux_regsets): New macro.
4209 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4210 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4211 (linux_register_in_regsets): New function.
4212 (usr_fetch_inferior_registers): Skip registers covered by
4213 regsets.
4214 (usr_store_inferior_registers): Likewise.
4215 (usr_fetch_inferior_registers): New macro.
4216 (usr_store_inferior_registers): Likewise.
4217 (linux_fetch_registers): Handle mixed regset/non-regset targets.
4218 (linux_store_registers): Likewise.
4219 * linux-mips-low.c (init_registers_mips_dsp_linux): New
4220 prototype.
4221 (init_registers_mips64_dsp_linux): Likewise.
4222 (init_registers_mips_linux): New macro.
4223 (init_registers_mips_dsp_linux): Likewise.
4224 (mips_dsp_num_regs): Likewise.
4225 (DSP_BASE, DSP_CONTROL): New fallback macros.
4226 (mips_base_regs): New macro.
4227 (mips_regmap): Use it. Fix the size.
4228 (mips_dsp_regmap): New variable.
4229 (mips_dsp_regset_bitmap): Likewise.
4230 (mips_arch_setup): New function.
4231 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4232 than mips_regmap.
4233 (mips_cannot_store_register): Likewise.
4234 (the_low_target): Update .arch_setup, .num_regs and .regmap
4235 initializers. Add .regset_bitmap initializer.
4236 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4237 initializer.
4238 * linux-bfin-low.c (the_low_target): Likewise.
4239 * linux-cris-low.c (the_low_target): Likewise.
4240 * linux-crisv32-low.c (the_low_target): Likewise.
4241 * linux-ia64-low.c (the_low_target): Likewise.
4242 * linux-m32r-low.c (the_low_target): Likewise.
4243 * linux-m68k-low.c (the_low_target): Likewise.
4244 * linux-ppc-low.c (the_low_target): Likewise.
4245 * linux-s390-low.c (the_low_target): Likewise.
4246 * linux-sh-low.c (the_low_target): Likewise.
4247 * linux-sparc-low.c (the_low_target): Likewise.
4248 * linux-tic6x-low.c (the_low_target): Likewise.
4249 * linux-x86-low.c (the_low_target): Likewise.
4250 * linux-xtensa-low.c (the_low_target): Likewise.
4251 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4252 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4253 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4254 srv_xmlfiles.
4255 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4256 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4257
c03e6ccc
YQ
42582012-02-29 Yao Qi <yao@codesourcery.com>
4259 Pedro Alves <palves@redhat.com>
4260
4261 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4262 `step_over_finished' is true.
4263
644cebc9
PA
42642012-02-27 Pedro Alves <palves@redhat.com>
4265
4266 * linux-low.c (pid_is_stopped): Delete, moved to common/.
4267 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4268
c14d7ab2
PA
42692012-02-27 Pedro Alves <palves@redhat.com>
4270
4271 PR server/9684
4272 * linux-low.c (pid_is_stopped): New.
4273 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4274
412c89dd
LM
42752012-02-25 Luis Machado <lgustavo@codesourcery.com>
4276
4277 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4278 of conditions.
4279
b745defe
MR
42802012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4281
4282 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4283
9f3a5c85
LM
42842012-02-24 Luis Machado <lgustavo@codesourcery>
4285
4286 * server.c (handle_query): Advertise support for target-side
4287 breakpoint condition evaluation.
4288 (process_point_options): New function.
4289 (process_serial_event): When inserting a breakpoint, check for
4290 a target-side condition that should be evaluated.
4291
4292 * mem-break.c: Include regcache.h and ax.h.
4293 (point_cond_list_t): New data structure.
4294 (breakpoint) <cond_list>: New field.
4295 (find_gdb_breakpoint_at): Make non-static.
4296 (delete_gdb_breakpoint_at): Clear any target-side
4297 conditions.
4298 (clear_gdb_breakpoint_conditions): New function.
4299 (add_condition_to_breakpoint): Likewise.
4300 (add_breakpoint_condition): Likewise.
4301 (gdb_condition_true_at_breakpoint): Likewise.
4302 (gdb_breakpoint_here): Return result directly instead
4303 of going through a local variable.
4304
4305 * mem-break.h (find_gdb_breakpoint_at): New prototype.
4306 (clear_gdb_breakpoint_conditions): Likewise.
4307 (add_breakpoint_condition): Likewise.
4308 (gdb_condition_true_at_breakpoint): Likewise.
4309
4310 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
4311 (need_step_over_p): Take target-side breakpoint condition into
4312 consideration.
4313
5e1dc496
LM
43142012-02-24 Luis Machado <lgustavo@codesourcery>
4315
4316 * server.h: Include tracepoint.h.
4317 (agent_mem_read, agent_get_trace_state_variable_value,
4318 agent_set_trace_state_variable_value,
4319 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
4320 get_set_tsv_func_addr): New prototypes.
4321
4322 * ax.h: New include file.
4323 * ax.c: New source file.
4324
4325 * tracepoint.c: Include ax.h.
4326 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
4327 agent_expr, eval_result_type): Move to ax.h.
4328 (parse_agent_expr): Rename to ...
4329 (gdb_parse_agent_expr): ... this, make it non-static and move
4330 to ax.h.
4331 (unparse_agent_expr) Rename to ...
4332 (gdb_unparse_agent_expr): ... this, make it non-static and move
4333 to ax.h.
4334 (eval_agent_expr): Rename to ...
4335 (eval_tracepoint_agent_expr): ... this.
4336 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
4337 forward declarations.
4338 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
4339 (agent_get_trace_state_variable_value): New function.
4340 (agent_set_trace_state_variable_value): New function.
4341 (cmd_qtdp): Call gdb_parse_agent_expr (...).
4342 (response_tracepoint): Call gdb_unparse_agent_expr (...).
4343 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
4344 (condition_true_at_tracepoint): Likewise.
4345 (parse_agent_expr): Rename to ...
4346 (gdb_parse_agent_expr): ... this and move to ax.c.
4347 (unparse_agent_expr): Rename to ...
4348 (gdb_unparse_agent_expr): ... this and move to ax.c.
4349 (gdb_agent_op_name): Move to ax.c.
4350 (eval_agent_expr): Rename to ...
4351 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
4352 and move to ax.c.
4353 (eval_tracepoint_agent_expr): New function.
4354 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 4355 non-static.
5e1dc496
LM
4356 (current_insn_ptr, emit_error, struct bytecode_address): Move to
4357 ax.c.
4358 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
4359 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
4360 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
4361 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
4362 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
4363 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
4364 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
4365 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
4366 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
4367 (compile_bytecodes): Remove forward declaration.
4368 (is_goto_target): Move to ax.c.
4369 (compile_bytecodes): Move to ax.c and call
4370 agent_get_trace_state_variable_value (...) and
4371 agent_set_trace_state_variable_value (...).
4372
4373 * Makefile.in: Update ax.c and IPA dependencies.
4374
277e4e52
PA
43752012-02-24 Pedro Alves <palves@redhat.com>
4376
4377 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
4378 (cmd_bigqtbuffer_circular): ... this. Only handle
4379 'QTBuffer:circular:'.
4380 (handle_tracepoint_general_set): Adjust.
4381
bf4c19f7
YQ
43822012-02-16 Yao Qi <yao@codesourcery.com>
4383
4384 * inferiors.c: Move code to ...
4385 * dll.c: .... here. New.
4386 * server.h: Declare clear_dlls.
4387 * Makefile.in (SFILES): Add dll.c.
4388 (OBS): Add dll.o
4389 (dll.o): New rule.
4390
d73f2619
YQ
43912012-02-11 Yao Qi <yao@codesourcery.com>
4392
4393 * server.c: (handle_monitor_command): Add a new parameter
4394 `own_buf'.
4395 (handle_query): Update caller.
4396
f8255c2a
JB
43972012-02-09 Joel Brobecker <brobecker@adacore.com>
4398
4399 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
4400 * configure, config.in: Regenerate.
4401 * hostio.c: Provide an alternate implementation if HAVE_READLINK
4402 is not defined.
4403
da84f473
PA
44042012-02-02 Pedro Alves <palves@redhat.com>
4405
4406 Try SIGKILL first, then PTRACE_KILL.
4407 * linux-low.c (linux_kill_one_lwp): New.
4408 (linux_kill_one_lwp): Rename to ...
4409 (kill_one_lwp_callback): ... this. Use the new
4410 linux_kill_one_lwp.
4411
e886a173
PA
44122012-02-02 Pedro Alves <palves@redhat.com>
4413
4414 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
4415 inferior.
4416
be07f1a2
PA
44172012-01-27 Pedro Alves <palves@redhat.com>
4418
4419 * linux-low.c (linux_child_pid_to_exec_file): Delete.
4420 (elf_64_file_p): Make static.
4421 (linux_pid_exe_is_elf_64_file): New.
4422 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
4423 Delete declarations.
4424 (linux_pid_exe_is_elf_64_file): Declare.
4425 * linux-x86-low.c (x86_arch_setup): Use
4426 linux_pid_exe_is_elf_64_file.
4427
d8301ad1
JK
44282012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4429
4430 * linux-low.c (linux_wait_for_event_1): Rename to ...
4431 (linux_wait_for_event): ... here and merge it with former
4432 linux_wait_for_event - new variable wait_ptid, use it.
4433 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
4434
01b17894
PA
44352012-01-23 Pedro Alves <palves@redhat.com>
4436
4437 * server.c (main): Avoid yet another case of infinite loop while
4438 detaching/killing after a longjmp.
4439
e825046f
JK
44402012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4441
4442 Code cleanup.
4443 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
4444
b9e7b9c3
UW
44452012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
4446
4447 * hostio.c (handle_readlink): New function.
4448 (handle_vFile): Call it to handle "vFile:readlink" packets.
4449
901f9912
UW
44502012-01-20 Pedro Alves <palves@redhat.com>
4451 Ulrich Weigand <ulrich.weigand@linaro.org>
4452
4453 * server.c (handle_v_requests): Only support vAttach and vRun to
4454 start multiple processes when in extended protocol mode.
4455
fc1ab1a0
PA
44562012-01-17 Pedro Alves <palves@redhat.com>
4457
4458 * tracepoint.c (initialize_tracepoint): Use mmap instead of
4459 memalign plus mprotect to allocate the scratch buffer.
4460
7d5d4e98
PA
44612012-01-13 Pedro Alves <palves@redhat.com>
4462
4463 * server.c (attach_inferior): Clear `cont_thread'.
4464
f128d5e9
PA
44652012-01-13 Pedro Alves <palves@redhat.com>
4466
4467 * server.c (main): Avoid infinite loop while detaching/killing
4468 after a longjmp.
4469
06db92f0
DE
44702012-01-09 Doug Evans <dje@google.com>
4471
4472 * server.c (start_inferior): Set last_ptid in --wrapper case.
4473
32d92999
YQ
44742012-01-06 Yao Qi <yao@codesourcery.com>
4475
4476 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
4477 defined.
4478 [IN_PROCESS_AGENT] (debug_agent): New global variable.
4479
5e0a92a9
YQ
44802012-01-04 Yao Qi <yao@codesourcery.com>
4481
4482 * tracepoint.c (cmd_qtdp): Print debug message
4483 for static tracepoint.
4484
ae639e8c
YQ
44852012-01-04 Yao Qi <yao@codesourcery.com>
4486
4487 * tracepoint.c (trace_vdebug): Differentiate debug message
4488 between gdbserver and IPA.
4489
f72429c5
YQ
44902012-01-03 Yao Qi <yao@codesourcery.com>
4491
4492 * tracepoint.c (tracepoint_was_hit): Don't collect for
4493 static tracepoint.
4494
12c3e59c
JB
44952012-01-02 Joel Brobecker <brobecker@adacore.com>
4496
4497 * terminal.h: Reformat copyright header.
4498
67827812
JB
44992012-01-02 Joel Brobecker <brobecker@adacore.com>
4500
4501 * server.c (gdbserver_version): Update copyright year.
4502 * gdbreplay.c (gdbreplay_version): Likewise.
4503
3e52c33d
JK
45042011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
4505
4506 * linux-low.c (linux_create_inferior): Put empty if clause for write.
4507
4508 Revert:
4509 2011-12-18 Hui Zhu <teawater@gmail.com>
4510 * linux-low.c (linux_create_inferior): Save return value to ret.
4511
66f1260e
HZ
45122011-12-18 Hui Zhu <teawater@gmail.com>
4513
4514 * linux-low.c (linux_create_inferior): Save return value to ret.
4515
e77616d7
DE
45162011-12-16 Doug Evans <dje@google.com>
4517
e7b06c57
DE
4518 * linux-low.c (linux_create_inferior): If stdio connection,
4519 redirect stdin from /dev/null, stdout to stderr.
4520 * remote-utils.c (remote_is_stdio): New static global.
4521 (remote_connection_is_stdio): New function.
4522 (remote_prepare): Handle stdio connection.
4523 (remote_open): Ditto.
4524 (remote_close): Don't close stdin for stdio connections.
4525 (read_prim,write_prim): New functions. Replace all calls to
4526 read/write to these.
4527 * server.c (main): Watch for "-" argument. Move call to
4528 remote_prepare before start_inferior.
4529 * server.h (STDIO_CONNECTION_NAME): New macro.
4530 (remote_connection_is_stdio): Declare.
4531
e77616d7
DE
4532 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
4533 in debugging output.
4534
82067193
YQ
45352011-12-15 Yao Qi <yao@codesourcery.com>
4536
4537 * tracepoint.c: Include sys/syscall.h.
4538 (gdb_ust_thread): Remove preprocessor conditional.
4539
82bfbe7e
PA
45402011-12-14 Pedro Alves <pedro@codesourcery.com>
4541
4542 * linux-low.c (linux_detach_one_lwp): Call
4543 the_low_target.prepare_to_resume before detaching.
4544
712c6575
YQ
45452011-12-14 Yao Qi <yao@codesourcery.com>
4546
4547 * tracepoint.c (gdb_ust_thread): Don't ignore return value
4548 of write.
4549
d54d1edf
YQ
45502011-12-14 Yao Qi <yao@codesourcery.com>
4551
4552 * i386-low.c (i386_low_stopped_data_address): Initialize local
4553 variable `control'.
4554
6210a125
PA
45552011-12-13 Pedro Alves <pedro@codesourcery.com>
4556
4557 PR remote/13492
4558
4559 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
4560 DR_CONTROL unless necessary. Extend comments.
4561 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
4562 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
4563
2ece8244
YQ
45642011-12-13 Yao Qi <yao@codesourcery.com>
4565
4566 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
4567 macros.
4568 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
4569
784867a5
JK
45702011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
4571
4572 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
4573 Print new debug message for such case.
4574
6bf36717
JK
45752011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4576
4577 Fix overlapping memcpy.
4578 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
4579 the read_inferior_memory transfer.
4580 (delete_fast_tracepoint_jump): New variable buf. Use it for the
4581 write_inferior_memory transfer.
4582 (set_fast_tracepoint_jump): New variable buf. Use it for the
4583 read_inferior_memory and write_inferior_memory transfers.
4584 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
4585 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
4586 Use it for the write_inferior_memory transfer.
4587 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
4588 buffers.
4589
50275556
MR
45902011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4591
4592 * linux-low.c (fetch_register, store_register): Make code
4593 consistent, fix formatting.
4594
7325beb4
MR
45952011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4596
4597 * linux-low.c (usr_store_inferior_registers): Factor out code
4598 to handle individual registers into...
4599 (store_register): ... this new function.
4600
c642a434
UW
46012011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
4602
4603 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
4604 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
4605 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
4606 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
4607 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
4608 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
4609 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
4610 (srv_xmlfiles): Add new XML files.
4611
4612 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
4613 and <sys/uio.h>.
4614 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
4615 (init_registers_s390_linux32v1): Add prototype.
4616 (init_registers_s390_linux32v2): Likewise.
4617 (init_registers_s390_linux64v1): Likewise.
4618 (init_registers_s390_linux64v2): Likewise.
4619 (init_registers_s390x_linux64v1): Likewise.
4620 (init_registers_s390x_linux64v2): Likewise.
4621 (s390_num_regs): Increment to 52.
4622 (s390_regmap): Add orig_r2 register.
4623 (s390_num_regs_3264): Increment to 68.
4624 (s390_regmap_3264): Add orig_r2 register.
4625 (s390_collect_ptrace_register): Handle orig_r2 register.
4626 (s390_supply_ptrace_register): Likewise.
4627 (s390_fill_last_break): New function.
4628 (s390_store_last_break): Likewise.
4629 (s390_fill_system_call): New function.
4630 (s390_store_system_call): Likewise.
4631 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
4632 register sets.
4633 (s390_check_regset): New function.
4634 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
4635 NT_S390_SYSTEM_CALL regsets and use appropriate description.
4636 Update target_regsets for available register sets.
4637
2268b414
JK
46382011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
4639 Jan Kratochvil <jan.kratochvil@redhat.com>
4640
4641 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
4642 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
4643 New.
4644 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
4645 * linux-low.h (struct process_info_private): New member r_debug.
4646 * server.c (handle_qxfer_libraries): Call
4647 the_target->qxfer_libraries_svr4.
4648 (handle_qxfer_libraries_svr4): New function.
4649 (qxfer_packets): New entry "libraries-svr4".
4650 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
4651 * target.h (struct target_ops): New member qxfer_libraries_svr4.
4652 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
4653 PACKET_qXfer_libraries_svr4.
4654
d6db1fab
UW
46552011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
4656
4657 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
4658 PSW address/mask between 8-byte and 16-byte formats.
4659 (s390_supply_ptrace_register): Likewise.
4660 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
4661 basic addressing mode bit.
4662
242f5f1c
SS
46632011-11-24 Stan Shebs <stan@codesourcery.com>
4664
4665 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
4666
f196051f
SS
46672011-11-17 Stan Shebs <stan@codesourcery.com>
4668
4669 * tracepoint.c (struct tracepoint): New field traceframe_usage.
4670 (tracing_start_time): New global.
4671 (tracing_stop_time): New global.
4672 (tracing_user_name): New global.
4673 (tracing_notes): New global.
4674 (tracing_stop_note): New global.
4675 (cmd_qtstart): Set traceframe_usage, start_time.
4676 (stop_tracing): Set stop_time.
4677 (cmd_qtstatus): Report additional status.
4678 (cmd_qtp): New function.
4679 (handle_tracepoint_query): Call it.
4680 (cmd_qtnotes): New function.
4681 (handle_tracepoint_general_set): Call it.
4682 (get_timestamp): Rename from tsv_get_timestamp.
4683
405f8e94
SS
46842011-11-14 Stan Shebs <stan@codesourcery.com>
4685 Kwok Cheung Yeung <kcy@codesourcery.com>
4686
4687 * linux-x86-low.c (small_jump_insn): New.
4688 (i386_install_fast_tracepoint_jump_pad): Add arguments for
4689 trampoline and error message, build a trampoline and issue a small
4690 jump instruction to it.
4691 (x86_install_fast_tracepoint_jump_pad): Add arguments for
4692 trampoline and error message.
4693 (x86_get_min_fast_tracepoint_insn_len): New.
4694 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
4695 * linux-low.h (struct linux_target_ops): Add arguments to
4696 install_fast_tracepoint_jump_pad operation, add new operation.
4697 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
4698 arguments.
4699 (linux_get_min_fast_tracepoint_insn_len): New function.
4700 (linux_target_op): Add new operation.
4701 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
4702 (gdb_trampoline_buffer_end): Ditto.
4703 (gdb_trampoline_buffer_error): Ditto.
4704 (struct ipa_sym_addresses): Add fields for new IPA variables.
4705 (symbol_list): Add entries for new IPA variables.
4706 (struct tracepoint): Add fields to hold the address range of the
4707 trampoline used by the tracepoint.
4708 (trampoline_buffer_head): New static variable.
4709 (trampoline_buffer_tail): Ditto.
4710 (claim_trampoline_space): New function.
4711 (have_fast_tracepoint_trampoline_buffer): New function.
4712 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
4713 structure.
4714 (install_fast_tracepoint): Ditto, also add error buffer argument.
4715 (cmd_qtminftpilen): New function.
4716 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
4717 (fast_tracepoint_from_trampoline_address): New function.
4718 (fast_tracepoint_collecting): Handle trampoline as part of jump
4719 pad space.
4720 (set_trampoline_buffer_space): New function.
4721 (initialize_tracepoint): Initialize new IPA variables.
4722 * target.h (struct target_ops): Add arguments to
4723 install_fast_tracepoint_jump_pad operation, add new
4724 get_min_fast_tracepoint_insn_len operation.
4725 (target_get_min_fast_tracepoint_insn_len): New.
4726 (install_fast_tracepoint_jump_pad): Add arguments.
4727 * server.h (IPA_BUFSIZ): Define.
4728 * linux-i386-ipa.c: Include extra header files.
4729 (initialize_fast_tracepoint_trampoline_buffer): New function.
4730 (initialize_low_tracepoint): Call it.
4731 * server.h (set_trampoline_buffer_space): Declare.
4732 (claim_trampoline_space): Ditto.
4733 (have_fast_tracepoint_trampoline_buffer): Ditto.
4734
1e4d1764
YQ
47352011-11-14 Yao Qi <yao@codesourcery.com>
4736
4737 * server.c (handle_query): Handle InstallInTrace for qSupported.
4738 * tracepoint.c (add_tracepoint): Sort list.
4739 (install_tracepoint, download_tracepoint): New.
4740 (cmd_qtdp): Call them to install and download tracepoints.
4741 (sort_tracepoints): Removed.
4742 (cmd_qtstart): Update.
4743
5c73ff4e
YQ
47442011-11-14 Yao Qi <yao@codesourcery.com>
4745
4746 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
4747 * mem-break.h: Declare.
4748 * tracepoint.c (cmd_qtstart): Move some code to ...
4749 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
4750 New.
4751 (download_tracepoints): Move some code to ...
4752 (download_tracepoint_1): ... here. New.
4753
86a30030
YQ
47542011-11-08 Yao Qi <yao@codesourcery.com>
4755
4756 * remote-utils.c (relocate_instruction): A comment fix.
4757
8d26e50c
JB
47582011-11-07 Joel Brobecker <brobecker@adacore.com>
4759
4760 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
4761 (i386_dr_low_get_control, i386_dr_low_get_status): Use
4762 dr_status_mirror and dr_control_mirror from debug_reg_state.
4763 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
4764 (i386_initial_stuff): Remove use of deleted globals.
4765 (i386_get_thread_context, i386_set_thread_context,
4766 i386_thread_added): Use dr_status_mirror and dr_control_mirror
4767 from debug_reg_state.
4768
a59306a3
YQ
47692011-11-05 Yao Qi <yao@codesourcery.com>
4770
4771 * tracepoint.c (gdb_collect): Loop over tracepoints of same
4772 address as TPOINT's.
4773
3065dfb6
SS
47742011-11-02 Stan Shebs <stan@codesourcery.com>
4775
4776 * tracepoint.c (agent_mem_read_string): New function.
4777 (eval_agent_expr): Call it for tracenz.
4778 * server.c (handle_query): Report support for tracenz.
4779
fd0d8c7c
YQ
47802011-11-02 Yao Qi <yao@codesourcery.com>
4781
4782 * tracepoint.c (cmd_qtstart): Remove unused local variables.
4783
609086b1
YQ
47842011-11-02 Yao Qi <yao@codesourcery.com>
4785
4786 * target.h: Fix a typo in comment.
4787
b9fd1791
PA
47882011-10-31 Pedro Alves <pedro@codesourcery.com>
4789
4790 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
4791 clobber the breakpoints' shadows with fast tracepoint jumps.
4792 * mem-break.h (check_mem_write): Add `myaddr' parameter.
4793 * target.c (write_inferior_memory): Also pass MYADDR down to
4794 check_mem_write.
4795
03583c20
UW
47962011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
4797
4798 * configure.ac: Check support for personality routine.
4799 * configure: Regenerate.
4800 * config.in: Likewise.
4801 * linux-low.c: Include <sys/personality.h>.
4802 Define ADDR_NO_RANDOMIZE if necessary.
4803 (linux_create_inferior): Disable address space randomization when
4804 forking inferior, if requested.
4805 (linux_supports_disable_randomization): New function.
4806 (linux_target_ops): Install it.
4807 * server.h (disable_randomization): Declare.
4808 * server.c (disable_randomization): New global variable.
4809 (handle_general_set): Handle QDisableRandomization.
4810 (handle_query): Likewise for qSupported.
4811 (main): Support --disable-randomization and --no-disable-randomization
4812 command line arguments.
4813 * target.h (struct target_ops): Add supports_disable_randomization.
4814 (target_supports_disable_randomization): New macro.
4815
723b724b
MF
48162011-09-29 Mike Frysinger <vapier@gentoo.org>
4817
4818 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
4819 ifdef check.
4820 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
4821 [!PT_GETDSBT] (target_loadmap): New definition.
4822 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
4823 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
4824 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
4825 and PT_GETDSBT to LINUX_LOADMAP.
4826 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
4827 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
4828
55329a5c 48292011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
4830
4831 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
4832 (arm_linux_hwbp_cap): New static variable.
4833 (arm_linux_get_hwbp_cap): Replace by ...
4834 (arm_linux_init_hwbp_cap): ... this new function.
4835 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
4836 (arm_linux_get_hw_watchpoint_count): Likewise.
4837 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4838 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
4839 (arm_prepare_to_resume): Use perror_with_name instead of error.
4840
55329a5c 48412011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
4842
4843 * linux-arm-low.c: Include <signal.h>.
4844 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
4845 (struct arm_linux_hwbp_cap): New data type.
4846 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
4847 (struct arm_linux_hw_breakpoint): New data type.
4848 (MAX_BPTS, MAX_WPTS): Define.
4849 (struct arch_process_info, struct arch_lwp_info): New data types.
4850 (arm_linux_get_hwbp_cap): New function.
4851 (arm_linux_get_hw_breakpoint_count): Likewise.
4852 (arm_linux_get_hw_watchpoint_count): Likewise.
4853 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4854 (arm_hwbp_control_initialize): Likewise.
4855 (arm_hwbp_control_is_enabled): Likewise.
4856 (arm_hwbp_control_is_initialized): Likewise.
4857 (arm_hwbp_control_disable): Likewise.
4858 (arm_linux_hw_breakpoint_equal): Likewise.
4859 (arm_linux_hw_point_initialize): Likewise.
4860 (struct update_registers_data): New data structure.
4861 (update_registers_callback: New function.
4862 (arm_insert_point): Likewise.
4863 (arm_remove_point): Likewise.
4864 (arm_stopped_by_watchpoint): Likewise.
4865 (arm_stopped_data_address): Likewise.
4866 (arm_new_process): Likewise.
4867 (arm_new_thread): Likewise.
4868 (arm_prepare_to_resume): Likewise.
4869 (the_low_target): Register arm_insert_point, arm_remove_point,
4870 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
4871 arm_new_thread, and arm_prepare_to_resume.
4872
6b9801d4
SS
48732011-09-15 Stan Shebs <stan@codesourcery.com>
4874
4875 * server.h (struct emit_ops): Add compare-goto fields.
4876 * tracepoint.c (gdb_agent_op_sizes): New table.
4877 (emit_eq_goto): New function.
4878 (emit_ne_goto): New function.
4879 (emit_lt_goto): New function.
4880 (emit_le_goto): New function.
4881 (emit_gt_goto): New function.
4882 (emit_ge_goto): New function.
4883 (is_goto_target): New function.
4884 (compile_bytecodes): Recognize special cases of compare-goto
4885 combinations and call specialized emitters for them.
4886 * linux-x86-low.c (amd64_emit_eq_goto): New function.
4887 (amd64_emit_ne_goto): New function.
4888 (amd64_emit_lt_goto): New function.
4889 (amd64_emit_le_goto): New function.
4890 (amd64_emit_gt_goto): New function.
4891 (amd64_emit_ge_goto): New function.
4892 (amd64_emit_ops): Add the new functions.
4893 (i386_emit_eq_goto): New function.
4894 (i386_emit_ne_goto): New function.
4895 (i386_emit_lt_goto): New function.
4896 (i386_emit_le_goto): New function.
4897 (i386_emit_gt_goto): New function.
4898 (i386_emit_ge_goto): New function.
4899 (i386_emit_ops): Add the new functions.
4900
bf15cbda
SS
49012011-09-08 Stan Shebs <stan@codesourcery.com>
4902
4903 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
4904 (i386_emit_epilogue): Restore %ebx.
4905
943ca1dd
JZ
49062011-08-31 Jie Zhang <jzhang918@gmail.com>
4907
4908 * server.c (step_thread): Remove definition.
4909 (process_serial_event): Don't handle Hs.
4910 * server.h (step_thread): Remove declaration.
4911 * target.c (set_desired_inferior): Remove use of step_thread.
4912
e3deef73
LM
49132011-08-24 Luis Machado <lgustavo@codesourcery.com>
4914
4915 * linux-low.c: Include linux-procfs.h.
4916 (linux_attach_lwp_1): Update comments.
4917 (linux_attach): Scan for existing threads when attaching to a
4918 process that is the tgid.
4919 * Makefile.in: Update dependencies.
4920
13da1c97
LM
49212011-08-24 Luis Machado <lgustavo@codesourcery.com>
4922
4923 * configure.srv: Add linux-procfs.o dependencies.
4924
881127c9
YQ
49252011-08-14 Yao Qi <yao@codesourcery.com>
4926
4927 * target.h (struct target_ops): Fix indent.
4928 * win32-low.c (win32_target_ops): Fix comment.
4929
58dbd541
YQ
49302011-08-14 Andrew Jenner <andrew@codesourcery.com>
4931 Yao Qi <yao@codesourcery.com>
4932
4933 * Makefile.in (clean): Remove tic6x-*.c files.
4934 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
4935 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
4936 (tic6x-c64xp-linux.c): Likewise.
4937 * configure.srv: Add support for tic6x-*-uclinux.
4938 * linux-tic6x-low.c: New.
4939 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
4940
78d85199
YQ
49412011-08-14 Andrew Stubbs <ams@codesourcery.com>
4942 Yao Qi <yao@codesourcery.com>
4943
4944 * target.h (struct target_ops): Add read_loadmap.
4945 * linux-low.c (struct target_loadseg): New type.
4946 (struct target_loadmap): New type.
4947 (linux_read_loadmap): New function.
4948 (linux_target_ops): Add linux_read_loadmap.
4949 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
4950 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
4951 to NULL.
78d85199 4952
a959a88d
EZ
49532011-08-05 Eli Zaretskii <eliz@gnu.org>
4954
4955 * win32-low.c: Include <stdint.h>.
4956
1ced966e
PA
49572011-07-22 Pedro Alves <pedro@codesourcery.com>
4958
4959 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
4960 to the inferior here.
4961 (i386_remove_aligned_watchpoint): Ditto.
4962 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
4963 fit part of the watchpoint in the debug registers.
4964 (i386_update_inferior_debug_regs): New.
4965 (i386_low_insert_watchpoint): Work on a local mirror of the debug
4966 registers, and only update the inferior on success.
4967 (i386_low_remove_watchpoint): Ditto.
4968
d26e3629
KY
49692011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
4970
4971 * linux-low.c (compare_ints, unique, list_threads, show_process,
4972 linux_core_of_thread): Delete.
4973 (linux_target_ops): Change linux_core_of_thread to
4974 linux_common_core_of_thread.
4975 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
4976 * utils.c (malloc_failure): Change type of argument.
4977 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
4978 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
4979 common/linux-osdata.c, common/ptid.c and common/buffer.c.
4980 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
4981 (IPA_OBJS): Add common-utils-ipa.o.
4982 (ptid_h, linux_osdata_h): New macros.
4983 (server_h): Add common/common-utils.h, common/xml-utils.h,
4984 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
4985 common/ptid.h.
4986 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
4987 ptid.o, buffer.o): New rules.
4988 (linux-low.o): Add common/linux-osdata.h as a dependency.
4989 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
4990 * configure.ac: Add AC_HEADER_DIRENT check.
4991 * config.in: Regenerate.
4992 * configure: Regenerate.
4993 * remote-utils.c (xml_escape_text): Delete.
4994 (buffer_grow, buffer_free, buffer_init, buffer_finish,
4995 buffer_xml_printf): Move to common/buffer.c.
4996 * server.c (main): Remove call to initialize_inferiors.
4997 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
4998 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
4999 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5000 internal_error, gdb_assert, gdb_assert_fail): Delete.
5001 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5002 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5003 common/buffer.h.
5004 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5005 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5006 initialize_inferiors): Delete.
5007
2275a1a7
PA
50082011-07-20 Pedro Alves <pedro@codesourcery.com>
5009
5010 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
5011 symbol error.
5012
0a5b1e09
PA
50132011-05-31 Pedro Alves <pedro@codesourcery.com>
5014
5015 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5016 assertion.
5017 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5018
6938fd34
YQ
50192011-05-26 Yao Qi <yao@codesourcery.com>
5020
5021 * Makefile.in (thread-db.o): Track dependence to
5022 common/gdb_thread_db.h.
5023 * thread-db.c: include gdb_thread_db.h from right place.
5024
b481f9e0
TT
50252011-05-16 Adrian Cornish <gnu@bluedreamer.com>
5026
5027 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5028 __FILE__ and __LINE__ to internal_error.
5029
98a5dd13
DE
50302011-05-13 Doug Evans <dje@google.com>
5031
5032 * thread-db.c (try_thread_db_load_from_sdir): New function.
5033 (try_thread_db_load_from_dir): New function.
5034 (thread_db_load_search): Handle $sdir, ignore $pdir.
5035 Remove trying of system directories if search of
5036 libthread-db-search-path fails, that is now done via $sdir.
5037
d248b706
KY
50382011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
5039
5040 * server.c (handle_query): Add EnableDisableTracepoints to the list
5041 of supported features.
43aaf8b6 5042 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 5043 tracepoints.
43aaf8b6
PA
5044 (cmd_qtenable_disable): New.
5045 (cmd_qtstart): Install tracepoints even if disabled.
5046 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5047 receiving a QTEnable or QTDisable packet.
5048 (gdb_collect): Skip data collection if fast tracepoint is disabled.
5049 (ust_marker_to_static_tracepoint): Do not ignore disabled static
5050 tracepoints.
5051 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 5052
84e578fb
DE
50532011-05-10 Doug Evans <dje@google.com>
5054
5055 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
5056
71f55dd8
DE
50572011-05-04 Doug Evans <dje@google.com>
5058
5059 * linux-low.c (linux_join): Skip process lookup.
5060 * spu-low.c (spu_join): Ditto.
5061 * server.c (join_inferiors_callback): Delete.
5062 (process_serial_event): For 'D' packet (detach) call join_inferior
5063 directly.
5064
4d393d60
JM
50652011-05-04 Joseph Myers <joseph@codesourcery.com>
5066
5067 * README: Don't mention xscale*-*-linux*.
5068 * configure.srv (xscale*-*-linux*): Don't handle target.
5069
b00ad6ff
NF
50702011-04-27 Nathan Froyd <froydnj@codesourcery.com>
5071
5072 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
5073 casting pointers.
5074 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
5075 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
5076 (i386_emit_void_call_2): Likewise.
5077
af96c192
YQ
50782011-04-26 Yao Qi <yao@codesourcery.com>
5079
43aaf8b6
PA
5080 * linux-low.c: Move common macros to linux-ptrace.h.
5081 Include linux-ptrace.h.
af96c192
YQ
5082 * Makefile.in (linux_ptrace_h): New.
5083 (linux-low.o): Depends on linux-ptrace.h.
5084
03f2bd59
JK
50852011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5086
5087 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
5088 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
5089 (remote_prepare): New function with most of the TCP code from ...
5090 (remote_open): ... here. Detect PORT here unconditionally. Move also
5091 setting transport_is_reliable.
5092 * server.c (run_once): New variable.
5093 (gdbserver_usage): Document it.
5094 (main): Set run_once for `--once'. Call remote_prepare. Exit after
5095 the first run if RUN_ONCE.
5096 * server.h (run_once, remote_prepare): New declarations.
5097
7a9dd1b2
TT
50982011-04-19 Tom Tromey <tromey@redhat.com>
5099
5100 * win32-low.c (handle_load_dll): Remove duplicate "the".
5101
81239425
PM
51022011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
5103
5104 Remove support for old Cygwin 1.5 versions.
5105 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
5106 function to avoid warning.
5107 (win32_add_one_solib): Use cygwin_conv_path function to avoid
5108 warning.
5109
9e0627f1
PM
51102011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
5111
5112 * gdbserver/server.h (Macro _): Define it if not available.
5113
588eebee
MS
51142011-03-14 Michael Snyder <msnyder@vmware.com>
5115
348af9f7 5116 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 5117
43f70d4c
JB
51182011-03-10 Joel Brobecker <brobecker@adacore.com>
5119
5120 * Makefile.in (maintainer-clean realclean distclean): Remove
5121 "make ... subdir_do" command.
5122
348af9f7
MS
51232011-03-10 Michael Snyder <msnyder@vmware.com>
5124
5125 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
5126
5127 * server.c (handle_v_run): Free alloced buffer on early return.
5128
e637a4f5
YQ
51292011-03-09 Yao Qi <yao@codesourcery.com>
5130
5131 Revert:
5132 2011-03-04 Yao Qi <yao@codesourcery.com>
5133
5134 * Makefile.in: Remove GNU make feature --directory.
5135
5136 2011-03-05 Yao Qi <yao@codesourcery.com>
5137
5138 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5139 (subdir_do): New make target. Copied from gdb/Makefile.
5140 (maintainer-clean, realclean, distclean, clean): Call corresponding
5141 make targets in common/Makefile.
5142
5143 2011-02-11 Yao Qi <yao@codesourcery.com>
5144
5145 * configure.ac: Call AC_PROG_RANLIB.
5146 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5147 * configure: Regenerate.
5148
e6edda56
JK
51492011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5150
5151 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
5152
e5141119
JB
51532011-03-06 Yao Qi <yao@codesourcery.com>
5154
5155 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
5156
64794aa4
JB
51572011-03-05 Yao Qi <yao@codesourcery.com>
5158
5159 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5160 (subdir_do): New make target. Copied from gdb/Makefile.
5161 (maintainer-clean, realclean, distclean, clean): Call corresponding
5162 make targets in common/Makefile.
5163
7a762829
YQ
51642011-03-04 Yao Qi <yao@codesourcery.com>
5165
5166 * Makefile.in: Remove GNU make feature --directory.
5167
348af9f7
MS
51682011-03-04 Michael Snyder <msnyder@vmware.com>
5169
5170 * server.c (queue_stop_reply): Call xmalloc not malloc.
5171
51722011-03-02 Michael Snyder <msnyder@vmware.com>
5173
5174 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5175
9f72fee2
MS
51762011-02-28 Michael Snyder <msnyder@vmware.com>
5177
588eebee
MS
5178 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5179 (cmd_qtframe): Ditto.
5180 (cmd_qtbuffer): Ditto.
5181 (cmd_bigqtbuffer): Ditto.
5182
9f72fee2
MS
5183 * utils.c (decimal2str): Initialize 'width' to nine, then
5184 don't mess with it.
5185
8040bd49
UW
51862011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5187
5188 * hostio.c (require_data): Free *data, not data.
5189
7e52cbd0
JK
51902011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5191
5192 * hostio.c (require_data): Use free, not xfree.
5193
9130f83e
MS
51942011-02-27 Michael Snyder <msnyder@vmware.com>
5195
4b812f4e
MS
5196 * server.c (handle_query): Discard unused value.
5197
9130f83e
MS
5198 * hostio.c (require_data): Free malloc memory before returning
5199 error.
5200
69d37113
MS
52012011-02-26 Michael Snyder <msnyder@vmware.com>
5202
5203 * linux-low.c (list_threads): Call closedir for dirent.
5204
35f5825a
MS
52052011-02-27 Michael Snyder <msnyder@vmware.com>
5206
2a589cef
MS
5207 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5208 a case statement falls through.
5209
0adea5f7
MS
5210 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5211
35f5825a
MS
5212 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
5213 in comparison.
5214
238f1c74
MS
52152011-02-26 Michael Snyder <msnyder@vmware.com>
5216
5217 * utils.c (decimal2str): Eliminate dead code and dead param.
5218 (pulongest): Drop dead param from call to decimal2str.
5219 (plongest): Ditto.
5220
633ff500
JB
52212011-02-24 Joel Brobecker <brobecker@adacore.com>
5222
5223 Revert the following patch (not approved yet):
5224 2011-02-21 Hui Zhu <teawater@gmail.com>
5225 * tracepoint.c (tp_printf): New function.
5226 (eval_agent_expr): Handle gdb_agent_op_printf.
5227
f9c6ff72
HZ
52282011-02-21 Hui Zhu <teawater@gmail.com>
5229
5230 * tracepoint.c (tp_printf): New function.
5231 (eval_agent_expr): Handle gdb_agent_op_printf.
5232
94d5e490
TT
52332011-02-18 Tom Tromey <tromey@redhat.com>
5234
5235 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5236 (tracepoint.o): Likewise.
5237 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5238 (gdb_agent_op_names): Likewise.
5239
c7f96d2b
TT
52402011-02-18 Tom Tromey <tromey@redhat.com>
5241
5242 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5243 gdb_agent_op_rot>: New constants.
5244 (gdb_agent_op_names): Add pick and roll.
5245 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5246 cases.
5247
0feedb2c
JK
52482011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5249
5250 * aclocal.m4: Regenerated with aclocal-1.11.1.
5251
b3b9301e
PA
52522011-02-14 Pedro Alves <pedro@codesourcery.com>
5253
5254 * server.c (handle_qxfer_traceframe_info): New.
5255 (qxfer_packets): Register "traceframe-info".
5256 (handle_query): Report support for qXfer:traceframe-info:read+.
5257 * tracepoint.c (match_blocktype): New.
5258 (traceframe_find_block_type): Rename to ...
5259 (traceframe_walk_blocks): ... this. Add callback filter argument,
5260 and use it.
5261 (traceframe_find_block_type): New, reimplemented on top of
5262 traceframe_walk_blocks.
5263 (build_traceframe_info_xml): New.
5264 (traceframe_read_info): New.
5265 * server.h (traceframe_read_info): Declare.
5266
4f3e6fb7
YQ
52672011-02-11 Yao Qi <yao@codesourcery.com>
5268
5269 * configure.ac: Call AC_PROG_RANLIB.
5270 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5271 * configure: Regenerate.
5272
764880b7
PA
52732011-02-07 Pedro Alves <pedro@codesourcery.com>
5274
5275 * server.c (gdb_read_memory): Change return semantics to allow
5276 partial transfers.
5277 (handle_search_memory_1): Adjust.
5278 (process_serial_event) <'m' packet>: Handle partial transfers.
5279 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5280
1c79eb8a
PA
52812011-01-28 Pedro Alves <pedro@codesourcery.com>
5282
5283 * regcache.c (init_register_cache): Initialize
5284 regcache->register_status.
5285 (free_register_cache): Release regcache->register_status.
5286 (regcache_cpy): Copy register_status.
5287 (registers_to_string): Print 'x's for unavailable registers.
5288 (supply_register): Mark the register's status valid or
5289 unavailable, depending on whether a buffer was passed in or not.
5290 (supply_register_zeroed): New.
5291 (supply_regblock): Mark the registers' status valid or
5292 unavailable, depending on whether a buffer was passed in or not.
5293 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5294 (struct regcache): New `register_status' field.
5295 (supply_register_zeroed): Declare.
5296 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5297 supply_register_zeroed, rather than passing a NULL buffer to
5298 supply_register.
5299 * tracepoint.c (fetch_traceframe_registers): Update comment.
5300
85724a0e
PA
53012011-01-28 Pedro Alves <pedro@codesourcery.com>
5302
5303 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
5304 buffer explicit.
5305
d08aafef
PA
53062011-01-25 Pedro Alves <pedro@codesourcery.com>
5307
5308 * server.h (decode_xfer_write): Change prototype.
5309 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
5310 and don't extract the annex here.
5311 * server.c (decode_xfer_read): Remove `annex' parameter,
5312 and don't extract the annex here.
5313 (decode_xfer): New.
5314 (struct qxfer): New.
5315 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
5316 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
5317 (handle_qxfer_statictrace): New functions, abstracted out from
5318 handle_query, and made to use the struct qxfer interface.
5319 (handle_threads_qxfer_proper): Rename to ...
5320 (handle_qxfer_threads_proper): ... this.
5321 (handle_threads_qxfer): Rename to ...
5322 (handle_qxfer_threads): ... this. Adjust.
5323 (qxfer_packets): New array.
5324 (handle_qxfer): New function.
5325 (handle_query): Use handle_qxfer.
5326
493e2a69
MS
53272011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
5328
5329 * gdbreplay.c: Shorten lines of >= 80 columns.
5330 * linux-low.c: Ditto.
5331 * linux-ppc-low.c: Ditto.
5332 * linux-s390-low.c: Ditto.
5333 * linux-sparc-low.c: Ditto.
5334 * linux-x86-low.c: Ditto.
5335 * linux-xtensa-low.c: Ditto.
5336 * mem-break.c: Ditto.
5337 * nto-low.c: Ditto.
5338 * regcache.h: Ditto.
5339 * remote-utils.c: Ditto.
5340 * server.c: Ditto.
5341 * server.h: Ditto.
5342 * thread-db.c: Ditto.
5343 * tracepoint.c: Ditto.
5344 * utils.c: Ditto.
5345 * win32-low.h: Ditto.
5346
44944448
JB
53472011-01-05 Joel Brobecker <brobecker@adacore.com>
5348
5349 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
5350 update.
5351
71ce852c
JB
53522011-01-01 Joel Brobecker <brobecker@adacore.com>
5353
5354 * server.c (gdbserver_version): Update copyright year in version
5355 output.
5356 * gdbreplay.c (gdbreplay_version): Ditto.
5357
eb826dc6
MF
53582010-12-29 Jie Zhang <jie.zhang@analog.com>
5359
5360 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
5361 * linux-bfin-low.c: New file.
5362 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
5363 PT_DATA_ADDR for BFIN targets.
5364 * Makefile.in (SFILES): Add linux-bfin-low.c.
5365 (clean): Remove reg-bfin.c.
5366 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
5367 * README: Mention supported Blackfin targets.
5368
39ab222a
MF
53692010-12-23 Mike Frysinger <vapier@gentoo.org>
5370
5371 * .gitignore: New file.
5372
a1f2ce7d
MF
53732010-11-16 Mike Frysinger <vapier@gentoo.org>
5374
5375 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
5376
f474844c
JZ
53772010-10-22 Jie Zhang <jie@codesourcery.com>
5378
5379 * Makefile.in: Add FLAGS_TO_PASS variable.
5380 (install): Remove dependency of install-only and recursively
5381 invoke make for install-only.
5382
f1048712
DE
53832010-10-04 Doug Evans <dje@google.com>
5384
5385 * Makefile.in (uninstall): Use $(DESTDIR).
5386
b53a1623
PA
53872010-09-24 Pedro Alves <pedro@codesourcery.com>
5388
e6ee044d
PA
5389 PR gdb/11842
5390
b53a1623
PA
5391 * linux-x86-low.c (compat_siginfo_from_siginfo)
5392 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
5393 si_code is < 0. Check for si_code == SI_TIMER before checking for
5394 si_code < 0.
5395
fa1bd1e4
JB
53962010-09-13 Joel Brobecker <brobecker@adacore.com>
5397
5398 * lynx-i386-low.c: New file.
5399 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
5400
47fac8f8
JB
54012010-09-13 Joel Brobecker <brobecker@adacore.com>
5402
5403 * lynx-low.c (ptrace_request_to_str): Remove handling for
5404 request values that have been removed in LynxOS 5.x.
5405
1adfc54d
JB
54062010-09-13 Joel Brobecker <brobecker@adacore.com>
5407
5408 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
5409 <ptrace.h>
5410
c2a66c29
NS
54112010-09-09 Nathan Sidwell <nathan@codesourcery.com>
5412
5413 * configure.ac: Add --enable-inprocess-agent option.
5414 * configure: Rebuilt.
5415
32fcada3
YQ
54162010-09-06 Yao Qi <yao@codesourcery.com>
5417
5418 * linux-low.c (linux_kill): Remove unused variable.
5419 (linux_stabilize_threads): Likewise.
5420 * server.c (start_inferior): Likewise.
5421 (queue_stop_reply_callback): Likewise.
5422 * tracepoint.c (do_action_at_tracepoint): Likewise.
5423
0cccb683
YQ
54242010-09-06 Yao Qi <yao@codesourcery.com>
5425
5426 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
5427 on return.
5428
423ec54c
JK
54292010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5430
5431 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
5432
12ac6819
PA
54332010-09-06 Pedro Alves <pedro@codesourcery.com>
5434
5435 * Makefile.in (install-only): Replace $IPA_DEPFILES with
5436 "$(IPA_DEPFILES)".
5437
8ed54b31
JB
54382010-09-01 Joel Brobecker <brobecker@adacore.com>
5439
5440 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
5441 gdbserver/lynx-ppc-low.c: New files.
5442 * Makefile.in (lynx_low_h): New variable.
5443 (lynx-low.o, lynx-ppc-low.o): New rules.
5444 * configure.ac: On LynxOS, link with -lnetinet.
5445 * configure.srv: Add handling of powerpc-*-lynxos* targets.
5446 * configure: regenerate.
5447
bb0116a4
JB
54482010-09-01 Joel Brobecker <brobecker@adacore.com>
5449
5450 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
5451 * configure.ac: Add check for vasprintf and vsnprintf.
5452 * configure, config.in: Regenerate.
5453 * server.h (vasprintf, vsnprintf): Add conditional declarations.
5454
a778ab81 54552010-09-01 Joel Brobecker <brobecker@adacore.com>
5456
5457 * gdbreplay.c: Move include of alloca.h up, next to include of
5458 malloc.h.
5459 * server.h: Add include of malloc.h.
5460 * mem-break.c: Remove include of malloc.h.
5461 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
5462
8b034a19 54632010-09-01 Joel Brobecker <brobecker@adacore.com>
5464
5465 * Makefile.in (memmem.o): Build with -Wno-error.
5466
54672010-09-01 Joel Brobecker <brobecker@adacore.com>
5468
5469 * utils.c (xsnprintf): Make non-static.
5470 * server.h: Add xsnprintf declaration.
5471 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
5472 replace calls to snprintf by calls to xsnprintf throughout.
5473
54742010-09-01 Joel Brobecker <brobecker@adacore.com>
5475
5476 * configure.ac: Add configure check for alloca.
5477 * configure, config.in: Regenerate.
5478 * server.h: Include alloca.h if it exists.
5479 * gdbreplay.c: Include alloca.h if it exists.
5480
1a981360
PA
54812010-08-28 Pedro Alves <pedro@codesourcery.com>
5482
5483 * linux-low.c (__SIGRTMIN): Define if not already defined.
5484 (linux_create_inferior): Check for __ANDROID__ rather than
5485 __SIGRTMIN.
5486 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
5487 are already deferred.
5488 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
5489 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
5490 stopped and already has a pending signal to report.
5491 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
5492 a pending signal to report or is moving out of a jump pad.
5493 (linux_init_signals): Check for __ANDROID__ rather than
5494 __SIGRTMIN.
5495
b4d51a55
PA
54962010-08-28 Pedro Alves <pedro@codesourcery.com>
5497
5498 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
5499 debug_threads check. Avoid a linear search when not doing debug
5500 output.
5501
ec48365d
PA
55022010-08-27 Pedro Alves <pedro@codesourcery.com>
5503
5504 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
5505 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
5506 (struct file_handler) <fd>: Change type to gdb_fildes_t.
5507 (process_event): Change local fd's type to gdb_fildes_t.
5508 (create_file_handler): Adjust prototype.
5509 (delete_file_handler): Adjust prototype.
5510 (handle_file_event): Adjust prototype. Use pfildes.
5511 (create_file_event): Adjsut prototype.
5512 * remote-utils.c (remote_desc, listen_desc): Change type to
5513 gdb_fildes_t.
5514 * server.h: New gdb_fildes_t typedef.
5515 [USE_WIN32API]: Include winsock2.h.
5516 (delete_file_handler, add_file_handler): Adjust prototypes.
5517 (pfildes): Declare.
5518 * utils.c (pfildes): New.
5519
854d88f0
PA
55202010-08-27 Pedro Alves <pedro@codesourcery.com>
5521
5522 * configure.ac (build_warnings): Add -Wno-char-subscripts.
5523 * configure: Regenerate.
5524
0146f85b
PA
55252010-08-27 Pedro Alves <pedro@codesourcery.com>
5526
5527 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
5528 (linux_done_accessing_memory): ... this.
5529 (linux_target_ops): Adjust.
5530 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
5531 * nto-low.c (nto_target_ops): Adjust comment.
5532 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
5533 * spu-low.c (spu_target_ops): Adjust comment.
5534 * target.h (target_ops): Rename unprepare_to_access_memory field
5535 to done_accessing_memory.
5536 (unprepare_to_access_memory): Rename to ...
5537 (done_accessing_memory): ... this.
5538
90d74c30
PA
55392010-08-26 Pedro Alves <pedro@codesourcery.com>
5540
5541 * linux-low.c (linux_prepare_to_access_memory): New.
5542 (linux_unprepare_to_access_memory): New.
5543 (linux_target_ops): Install them.
5544 * server.c (read_memory): Rename to ...
5545 (gdb_read_memory): ... this. Use
5546 prepare_to_access_memory/prepare_to_access_memory.
5547 (write_memory): Rename to ...
5548 (gdb_write_memory): ... this. Use
5549 prepare_to_access_memory/prepare_to_access_memory.
5550 (handle_search_memory_1): Adjust.
5551 (process_serial_event): Adjust.
5552 * target.h (struct target_ops): New fields
5553 prepare_to_access_memory and unprepare_to_access_memory.
5554 (prepare_to_access_memory, unprepare_to_access_memory): New.
5555 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
5556 prepare_to_access_memory/prepare_to_access_memory.
5557 * nto-low.c (nto_target_ops): Adjust.
5558 * spu-low.c (spu_target_ops): Adjust.
5559 * win32-low.c (win32_target_ops): Adjust.
5560
fd467969
PA
55612010-08-26 Pedro Alves <pedro@codesourcery.com>
5562
5563 * Makefile.in (WARN_CFLAGS): Get it from configure.
5564 (WERROR_CFLAGS): New.
5565 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
5566 * configure.ac: Introduce --enable-werror, which adds -Werror to
5567 the compiler command line. Enabled by default. Disable with
5568 --disable-werror. Add -Wdeclaration-after-statement
5569 Wpointer-arith and -Wformat-nonliteral to warning flags.
5570 * configure: Regenerate.
5571
331e2f5f
PA
55722010-08-26 Pedro Alves <pedro@codesourcery.com>
5573
5574 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
5575
e581f2b4
PA
55762010-08-26 Pedro Alves <pedro@codesourcery.com>
5577
5578 * gdbreplay.c (remote_error): New.
5579 (gdbchar): New.
5580 (expect): Use gdbchar. Check for error reading from GDB.
5581 Clarify sync error output.
5582 (play): Check for errors writing to GDB.
5583 * linux-low.c (sigchld_handler): Really ignore `write' errors.
5584 * remote-utils.c (getpkt): Check for errors writing to the remote
5585 descriptor.
5586
3c11dd79
PA
55872010-08-25 Pedro Alves <pedro@codesourcery.com>
5588
5589 * linux-low.c (linux_wait_1): Move non-debugging code out of
5590 `debug_threads' control.
5591
d20a8ad9
PA
55922010-08-25 Pedro Alves <pedro@codesourcery.com>
5593
5594 * linux-low.c (linux_wait_1): Don't set last_status here.
5595 * server.c (push_event, queue_stop_reply_callback): Assert we're
5596 not pushing a TARGET_WAITKIND_IGNORE event.
5597 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
5598 (myresume, handle_target_event): Set the thread's last_resume_kind
5599 and last_status from the target returned status.
5600
964e4306
PA
56012010-08-25 Pedro Alves <pedro@codesourcery.com>
5602
5603 PR threads/10729
5604
5605 * linux-x86-low.c (update_debug_registers_callback): New.
5606 (i386_dr_low_set_addr): Use it.
5607 (i386_dr_low_get_addr): New.
5608 (i386_dr_low_set_control): Use update_debug_registers_callback.
5609 (i386_dr_low_get_control): New.
5610 (i386_dr_low_get_status): Adjust.
5611 * linux-low.c (linux_stop_lwp): New.
5612 * linux-low.h (linux_stop_lwp): Declare.
5613
5614 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
5615 argument instead of a i386_debug_reg_state.
5616 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
5617 a i386_debug_reg_state.
5618 (i386_insert_aligned_watchpoint): Adjust.
5619 (i386_remove_aligned_watchpoint): Adjust.
5620 (i386_low_stopped_data_address): Read the debug registers from the
5621 inferior instead of from the mirrors.
5622 * i386-low.h (struct i386_debug_reg_state): Extend comment.
5623 (i386_dr_low_get_addr): Declare.
5624 (i386_dr_low_get_control): Declare.
5625 (i386_dr_low_get_status): Change prototype.
5626
5627 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
5628 (i386_dr_low_get_addr): New.
5629 (i386_dr_low_get_control): New.
5630 (i386_dr_low_get_status): Adjust prototype. Return
5631 dr_status_mirror.
5632 (i386_initial_stuff): Clear dr_status_mirror and
5633 dr_control_mirror.
5634 (i386_get_thread_context): Adjust.
5635 (i386_set_thread_context): Adjust.
5636 (i386_thread_added): Adjust.
5637
5f21a75b
PA
56382010-08-24 Pedro Alves <pedro@codesourcery.com>
5639
5640 * linux-low.h (linux_thread_area): Delete declaration.
5641
3e4c1235
TS
56422010-08-11 Thomas Schwinge <thomas@codesourcery.com>
5643
5644 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
5645 after its termination.
5646
1971b033
PA
56472010-08-09 Pedro Alves <pedro@codesourcery.com>
5648
5649 * linux-low.c (gdb_wants_lwp_stopped): Delete.
5650 (gdb_wants_all_stopped): Delete.
5651 (linux_wait_1): Don't call them.
5652 * server.c (handle_v_cont): Tag all threads as want-stopped.
5653 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
5654 stopped as "client-wants-stopped".
5655
310444ac
PA
56562010-07-31 Pedro Alves <pedro@codesourcery.com>
5657
5658 * Makefile.in (signals_h): New.
5659 (server_h): Depend on it.
5660 (server.o): Don't depend on $(signals_def).
5661 (signals.o): Depend on $(signals_def).
5662
a19cae16
JK
56632010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
5664
5665 * Makefile.in (signals_def): New.
5666 (server_h): Append include/gdb/signals.h and signals_def.
5667 (server.o): Append signals_def.
5668
30d50328
JK
56692010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5670
5671 * server.c (handle_target_event): Use target_signal_to_host for
5672 resume_info.sig initialization.
5673 * target.h (struct thread_resume) <sig>: New comment.
5674
5c3216e2
OS
56752010-07-20 Ozkan Sezer <sezeroz@gmail.com>
5676
c6f46ca0
OS
5677 * server.c (handle_query): strcpy() the returned string from paddress()
5678 instead of sprintf().
5c3216e2
OS
5679 * utils.c (paddress): Return phex_nz().
5680
6bd31874
JB
56812010-07-07 Joel Brobecker <brobecker@adacore.com>
5682
5683 * server.c (handle_v_cont): Call mourn_inferior if process
5684 just exited.
5685 (myresume): Likewise.
5686
0fb4aa4b
PA
56872010-07-01 Pedro Alves <pedro@codesourcery.com>
5688
5689 Static tracepoints, and integration with UST.
5690
5691 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
5692 * mem-break.c (uninsert_all_breakpoints)
5693 (reinsert_all_breakpoints): New.
5694 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
5695 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
5696 (gdb_agent_ust_loaded, helper_thread_id)
5697 (gdb_agent_helper_thread_id): New macros.
5698 (struct ipa_sym_addresses): Add addr_ust_loaded,
5699 addr_helper_thread_id, addr_cmd_buf.
5700 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
5701 (in_process_agent_loaded_ust): New.
5702 (write_e_ust_not_loaded): New.
5703 (maybe_write_ipa_ust_not_loaded): New.
5704 (struct collect_static_trace_data_action): New.
5705 (enum tracepoint_type) <static_tracepoint>: New.
5706 (struct tracepoint) <handle>: Mention static tracepoints.
5707 (struct static_tracepoint_ctx): New.
5708 (CMD_BUF_SIZE): New.
5709 (add_tracepoint_action): Handle static tracepoint actions.
5710 (unprobe_marker_at): New.
5711 (clear_installed_tracepoints): Handle static tracepoints.
5712 (cmd_qtdp): Handle static tracepoints.
5713 (probe_marker_at): New.
5714 (cmd_qtstart): Handle static tracepoints.
5715 (response_tracepoint): Handle static tracepoints.
5716 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
5717 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
5718 (get_context_regcache): Handle static tracepoints.
5719 (do_action_at_tracepoint): Handle static tracepoint actions.
5720 (traceframe_find_block_type): Handle static trace data blocks.
5721 (traceframe_read_sdata): New.
5722 (download_tracepoints): Download static tracepoint actions.
5723 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
5724 (GDB_PROBE_NAME): New.
5725 (ust_ops): New.
5726 (GET_UST_SYM): New.
5727 (USTF): New.
5728 (dlsym_ust): New.
5729 (ust_marker_to_static_tracepoint): New.
5730 (gdb_probe): New.
5731 (collect_ust_data_at_tracepoint): New.
5732 (gdb_ust_probe): New.
5733 (UNIX_PATH_MAX, SOCK_DIR): New.
5734 (gdb_ust_connect_sync_socket): New.
5735 (resume_thread, stop_thread): New.
5736 (run_inferior_command): New.
5737 (init_named_socket): New.
5738 (gdb_ust_socket_init): New.
5739 (cstr_to_hexstr): New.
5740 (next_st): New.
5741 (first_marker, next_marker): New.
5742 (response_ust_marker): New.
5743 (cmd_qtfstm, cmd_qtsstm): New.
5744 (unprobe_marker_at, probe_marker_at): New.
5745 (cmd_qtstmat, gdb_ust_thread): New.
5746 (gdb_ust_init): New.
5747 (initialize_tracepoint_ftlib): Call gdb_ust_init.
5748 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
5749 (ST_REGENTRY): New.
5750 (x86_64_st_collect_regmap): New.
5751 (X86_64_NUM_ST_COLLECT_GREGS): New.
5752 (AMD64_RIP_REGNUM): New.
5753 (supply_static_tracepoint_registers): New.
5754 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
5755 (ST_REGENTRY): New.
5756 (i386_st_collect_regmap): New.
5757 (i386_NUM_ST_COLLECT_GREGS): New.
5758 (supply_static_tracepoint_registers): New.
5759 * server.c (handle_query): Handle qXfer:statictrace:read.
5760 <qSupported>: Report support for StaticTracepoints, and
5761 qXfer:statictrace:read features.
5762 * server.h (traceframe_read_sdata)
5763 (supply_static_tracepoint_registers): Declare.
5764 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
5765 (unpack_varlen_hex): Include in IPA build.
5766 * Makefile.in (ustlibs, ustinc): New.
5767 (IPA_OBJS): Add remote-utils-ipa.o.
5768 ($(IPA_LIB)): Link -ldl and -lpthread.
5769 (UST_CFLAGS): New.
5770 (IPAGENT_CFLAGS): Add UST_CFLAGS.
5771 * config.in, configure: Regenerate.
5772
9e4344e5
PA
57732010-06-20 Ian Lance Taylor <iant@google.com>
5774 Pedro Alves <pedro@codesourcery.com>
5775
5776 * linux-x86-low.c (always_true): Delete.
5777 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
5778 trying to fool the compiler with always_true.
5779
c6beb2cb
PA
57802010-06-20 Pedro Alves <pedro@codesourcery.com>
5781
5782 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
5783 conditions in gdbserver.
5784
d2ed6730
UW
57852010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
5786
5787 * spu-low.c (spu_read_memory): Wrap around local store limit.
5788 (spu_write_memory): Likewise.
5789
4e29fb54
PA
57902010-06-15 Pedro Alves <pedro@codesourcery.com>
5791
5792 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
5793 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
5794 LONGEST uses.
5795 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
5796 uses.
5797 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
5798 uses with LONGEST uses.
5799
6a271cae
PA
58002010-06-14 Stan Shebs <stan@codesourcery.com>
5801 Pedro Alves <pedro@codesourcery.com>
5802
5803 Bytecode compiler.
5804
5805 * linux-x86-low.c: Include limits.h.
5806 (add_insns): New.
5807 (always_true): New.
5808 (EMIT_ASM): New.
5809 (EMIT_ASM32): New.
5810 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
5811 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
5812 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
5813 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
5814 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
5815 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
5816 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
5817 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
5818 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
5819 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
5820 (amd64_emit_void_call_2): New.
5821 (amd64_emit_ops): New.
5822 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
5823 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
5824 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
5825 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
5826 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
5827 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
5828 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
5829 (i386_emit_call, i386_emit_reg, i386_emit_pop)
5830 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
5831 (i386_emit_stack_adjust, i386_emit_int_call_1)
5832 (i386_emit_void_call_2): New.
5833 (i386_emit_ops): New.
5834 (x86_emit_ops): New.
5835 (the_low_target): Install x86_emit_ops.
5836 * server.h (struct emit_ops): New.
5837 (get_raw_reg_func_addr): Declare.
5838 (current_insn_ptr, emit_error): Declare.
5839 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
5840 (set_trace_state_variable_value): New defines.
5841 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
5842 addr_get_trace_state_variable_value and
5843 addr_set_trace_state_variable_value.
5844 (symbol_list): New fields for get_raw_reg,
5845 get_trace_state_variable_value and set_trace_state_variable_value.
5846 (condfn): New typedef.
5847 (struct tracepoint): New field `compiled_cond'.
5848 (do_action_at_tracepoint): Clear compiled_cond.
5849 (get_trace_state_variable_value, set_trace_state_variable_value):
5850 Export in the IPA.
5851 (condition_true_at_tracepoint): If there's a compiled condition,
5852 run that.
5853 (current_insn_ptr, emit_error): New globals.
5854 (struct bytecode_address): New.
5855 (get_raw_reg_func_addr): New.
5856 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
5857 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
5858 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
5859 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
5860 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
5861 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
5862 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
5863 (compile_tracepoint_condition, compile_bytecodes): New.
5864 * target.h (emit_ops): Forward declare.
5865 (struct target_ops): New field emit_ops.
5866 (target_emit_ops): New.
5867 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
5868 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
5869 * linux-low.c (linux_emit_ops): New.
5870 (linux_target_ops): Install it.
5871 * linux-low.h (struct linux_target_ops): New field emit_ops.
5872
92b72907
UW
58732010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
5874
5875 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
5876 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
5877
fa593d66
PA
58782010-06-01 Pedro Alves <pedro@codesourcery.com>
5879 Stan Shebs <stan@codesourcery.com>
5880
5881 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
5882 (all): Depend on $(extra_libraries).
5883 (install-only): Install the IPA.
5884 (IPA_OBJS, IPA_LIB): New.
5885 (clean): Remove the IPA lib.
5886 (IPAGENT_CFLAGS): New.
5887 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
5888 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
5889 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
5890 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
5891 * configure.ac: Check for atomic builtins support in the compiler.
5892 (IPA_DEPFILES, extra_libraries): Define.
5893 * configure.srv (ipa_obj): Add description.
5894 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
5895 (i[34567]86-*-linux*): Set ipa_obj.
5896 (x86_64-*-linux*): Set ipa_obj.
5897 * linux-low.c (stabilizing_threads): New.
5898 (supports_fast_tracepoints): New.
5899 (linux_detach): Stabilize threads before detaching.
5900 (handle_tracepoints): Handle internal tracing breakpoints. Assert
5901 the lwp is either not stabilizing, or is moving out of a jump pad.
5902 (linux_fast_tracepoint_collecting): New.
5903 (maybe_move_out_of_jump_pad): New.
5904 (enqueue_one_deferred_signal): New.
5905 (dequeue_one_deferred_signal): New.
5906 (linux_wait_for_event_1): If moving out of a jump pad, defer
5907 pending signals to later.
5908 (linux_stabilize_threads): New.
5909 (linux_wait_1): Check if threads need moving out of jump pads, and
5910 do it if so.
5911 (stuck_in_jump_pad_callback): New.
5912 (move_out_of_jump_pad_callback): New.
5913 (lwp_running): New.
5914 (linux_resume_one_lwp): Handle moving out of jump pads.
5915 (linux_set_resume_request): Dequeue deferred signals.
5916 (need_step_over_p): Also step over fast tracepoint jumps.
5917 (start_step_over): Also uninsert fast tracepoint jumps.
5918 (finish_step_over): Also reinsert fast tracepoint jumps.
5919 (linux_install_fast_tracepoint_jump): New.
5920 (linux_target_ops): Install linux_stabilize_threads and
5921 linux_install_fast_tracepoint_jump_pad.
5922 * linux-low.h (linux_target_ops) <get_thread_area,
5923 install_fast_tracepoint_jump_pad>: New fields.
5924 (struct lwp_info) <collecting_fast_tracepoint,
5925 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
5926 (linux_get_thread_area): Declare.
5927 * linux-x86-low.c (jump_insn): New.
5928 (x86_get_thread_area): New.
5929 (append_insns): New.
5930 (push_opcode): New.
5931 (amd64_install_fast_tracepoint_jump_pad): New.
5932 (i386_install_fast_tracepoint_jump_pad): New.
5933 (x86_install_fast_tracepoint_jump_pad): New.
5934 (the_low_target): Install x86_get_thread_area and
5935 x86_install_fast_tracepoint_jump_pad.
5936 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
5937 (struct fast_tracepoint_jump): New.
5938 (fast_tracepoint_jump_insn): New.
5939 (fast_tracepoint_jump_shadow): New.
5940 (find_fast_tracepoint_jump_at): New.
5941 (fast_tracepoint_jump_here): New.
5942 (delete_fast_tracepoint_jump): New.
5943 (set_fast_tracepoint_jump): New.
5944 (uninsert_fast_tracepoint_jumps_at): New.
5945 (reinsert_fast_tracepoint_jumps_at): New.
5946 (set_breakpoint_at): Use write_inferior_memory.
5947 (uninsert_raw_breakpoint): Use write_inferior_memory.
5948 (check_mem_read): Mask out fast tracepoint jumps.
5949 (check_mem_write): Mask out fast tracepoint jumps.
5950 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
5951 (set_fast_tracepoint_jump): Declare.
5952 (delete_fast_tracepoint_jump)
5953 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
5954 (reinsert_fast_tracepoint_jumps_at): Declare.
5955 * regcache.c: Don't compile many functions when building the
5956 in-process agent library.
5957 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
5958 the register buffer in the heap.
5959 (free_register_cache): If the register buffer isn't owned by the
5960 regcache, don't free it.
5961 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
5962 pre-existing register caches.
5963 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
5964 type.
5965 (convert_ascii_to_int): : Constify `from' parameter type.
5966 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
5967 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
5968 the needed buffer in-place.
5969 (relocate_instruction): New.
5970 * server.c (handle_query) <qSymbols>: If the target supports
5971 tracepoints, give it a chance of looking up symbols. Report
5972 support for fast tracepoints.
5973 (handle_status): Stabilize threads.
5974 (process_serial_event): Adjust.
5975 * server.h (struct fast_tracepoint_jump): Forward declare.
5976 (struct process_info) <fast_tracepoint_jumps>: New field.
5977 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
5978 (decode_X_packet, decode_M_packet): Adjust.
5979 (relocate_instruction): Declare.
5980 (in_process_agent_loaded): Declare.
5981 (tracepoint_look_up_symbols): Declare.
5982 (struct fast_tpoint_collect_status): Declare.
5983 (fast_tracepoint_collecting): Declare.
5984 (force_unlock_trace_buffer): Declare.
5985 (handle_tracepoint_bkpts): Declare.
5986 (initialize_low_tracepoint)
5987 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
5988 * target.h (struct target_ops) <stabilize_threads,
5989 install_fast_tracepoint_jump_pad>: New fields.
5990 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
5991 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
5992 [HAVE_STDINT_H]: Include stdint.h.
5993 (trace_debug_1): Rename to ...
5994 (trace_vdebug): ... this.
5995 (trace_debug): Rename to ...
5996 (trace_debug_1): ... this. Add `level' parameter.
5997 (trace_debug): New.
5998 (ATTR_USED, ATTR_NOINLINE): New.
5999 (IP_AGENT_EXPORT): New.
6000 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6001 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6002 (about_to_request_buffer_space, trace_buffer_is_full)
6003 (stopping_tracepoint, expr_eval_result, error_tracepoint)
6004 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6005 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6006 (traceframe_write_count, traceframes_created)
6007 (trace_state_variables)
6008 New renaming defines.
6009 (struct ipa_sym_addresses): New.
6010 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
6011 (symbol_list): New.
6012 (ipa_sym_addrs): New.
6013 (all_tracepoint_symbols_looked_up): New.
6014 (in_process_agent_loaded): New.
6015 (write_e_ipa_not_loaded): New.
6016 (maybe_write_ipa_not_loaded): New.
6017 (tracepoint_look_up_symbols): New.
6018 (debug_threads) [IN_PROCESS_AGENT]: New.
6019 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6020 (UNKNOWN_SIDE_EFFECTS): New.
6021 (stop_tracing): New.
6022 (flush_trace_buffer): New.
6023 (stop_tracing_bkpt): New.
6024 (flush_trace_buffer_bkpt): New.
6025 (read_inferior_integer): New.
6026 (read_inferior_uinteger): New.
6027 (read_inferior_data_pointer): New.
6028 (write_inferior_data_pointer): New.
6029 (write_inferior_integer): New.
6030 (write_inferior_uinteger): New.
6031 (struct collect_static_trace_data_action): Delete.
6032 (enum tracepoint_type): New.
6033 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
6034 <actions_str, step_actions, step_actions_str>: Only include in
6035 GDBserver.
fa593d66
PA
6036 <orig_size, obj_addr_on_target, adjusted_insn_addr>
6037 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6038 (tracepoints): Use IP_AGENT_EXPORT.
6039 (last_tracepoint): Don't include in the IPA.
6040 (stopping_tracepoint): Use IP_AGENT_EXPORT.
6041 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6042 (alloced_trace_state_variables): New.
6043 (trace_state_variables): Use IP_AGENT_EXPORT.
6044 (traceframe_t): Delete unused variable.
6045 (circular_trace_buffer): Don't include in the IPA.
6046 (trace_buffer_start): Delete.
6047 (struct trace_buffer_control): New.
6048 (trace_buffer_free): Delete.
6049 (struct ipa_trace_buffer_control): New.
6050 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6051 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6052 New.
6053 (trace_buffer_ctrl): New.
6054 (TRACE_BUFFER_CTRL_CURR): New.
6055 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
6056 Reimplement as macros.
6057 (trace_buffer_wrap): Delete.
6058 (traceframe_write_count, traceframe_read_count)
6059 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
6060 (struct tracepoint_hit_ctx) <type>: New field.
6061 (struct fast_tracepoint_ctx): New.
6062 (memory_barrier): New.
6063 (cmpxchg): New.
6064 (record_tracepoint_error): Update atomically in the IPA.
6065 (clear_inferior_trace_buffer): New.
6066 (about_to_request_buffer_space): New.
6067 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
6068 updating the same buffer.
6069 (add_tracepoint): Default the tracepoint's type to trap
6070 tracepoint, and orig_size to -1.
6071 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
6072 internal variables.
6073 (create_trace_state_variable): New parameter `gdb'. Handle it.
6074 (clear_installed_tracepoints): Clear fast tracepoint jumps.
6075 (cmd_qtdp): Handle fast tracepoints.
6076 (cmd_qtdv): Adjust.
6077 (max_jump_pad_size): New.
6078 (gdb_jump_pad_head): New.
6079 (get_jump_space_head): New.
6080 (claim_jump_space): New.
6081 (sort_tracepoints): New.
6082 (MAX_JUMP_SIZE): New.
6083 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
6084 IPA.
6085 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
6086 support. Upload fast traceframes, and delete internal IPA
6087 breakpoints.
6088 (stop_tracing_handler): New.
6089 (flush_trace_buffer_handler): New.
6090 (cmd_qtstop): Upload fast tracepoints.
6091 (response_tracepoint): Handle fast tracepoints.
6092 (tracepoint_finished_step): Upload fast traceframes. Set the
6093 tracepoint hit context's tracepoint type.
6094 (handle_tracepoint_bkpts): New.
6095 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
6096 type. Add comment about fast tracepoints.
6097 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
6098 non-existing action_str field.
6099 (get_context_regcache): Handle fast tracepoints.
6100 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
6101 to the regcache.
6102 (fast_tracepoint_from_jump_pad_address): New.
6103 (fast_tracepoint_from_ipa_tpoint_address): New.
6104 (collecting_t): New.
6105 (force_unlock_trace_buffer): New.
6106 (fast_tracepoint_collecting): New.
6107 (collecting): New.
6108 (gdb_collect): New.
6109 (write_inferior_data_ptr): New.
6110 (target_tp_heap): New.
6111 (target_malloc): New.
6112 (download_agent_expr): New.
6113 (UALIGN): New.
6114 (download_tracepoints): New.
6115 (download_trace_state_variables): New.
6116 (upload_fast_traceframes): New.
6117 (IPA_FIRST_TRACEFRAME): New.
6118 (IPA_NEXT_TRACEFRAME_1): New.
6119 (IPA_NEXT_TRACEFRAME): New.
6120 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
6121 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
6122 (gdb_jump_pad_buffer_end): New.
6123 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
6124 (initialize_tracepoint): Adjust.
6125 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
6126 buffer. Initialize the low module.
6127 * utils.c (PREFIX, TOOLNAME): New.
6128 (malloc_failure): Use PREFIX.
6129 (error): In the IPA, an error causes an exit.
6130 (fatal, warning): Use PREFIX.
6131 (internal_error): Use TOOLNAME.
6132 (NUMCELLS): Increase to 10.
6133 * configure, config.in: Regenerate.
6134
d149dd1d
PA
61352010-06-01 Pedro Alves <pedro@codesourcery.com>
6136
6137 * server.c (handle_query) <qSupported>: Do two passes over the
6138 qSupported string to avoid nesting strtok.
6139
f6528abd
JK
61402010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6141
6142 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
6143 (CDEPS): New.
6144 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
6145 -Wl,--dynamic-list.
6146 * configure: Regenerate.
6147 * proc-service.list: New.
6148
ca2a87a0
JK
61492010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6150
6151 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
6152 New comment.
6153
363a6e9f
OS
61542010-05-26 Ozkan Sezer <sezeroz@gmail.com>
6155
6156 * gdbreplay.c (remote_open): Check error return from socket() call by
6157 its equality to -1 not by it being negative.
6158 * remote-utils.c (remote_open): Likewise.
6159
d23b6cb1
PA
61602010-05-23 Pedro Alves <pedro@codesourcery.com>
6161
6162 * config.h: Regenerate.
6163
28d3cf85
MK
61642010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6165
6166 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
6167 doesn't provide PTRACE_GET_THREAD_AREA.
6168
fea36a59
MK
61692010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6170
6171 * linux-m68k-low.c: Include <asm/ptrace.h>
6172 (ps_get_thread_area): Implement.
6173
24b066ba
DE
61742010-05-03 Doug Evans <dje@google.com>
6175
6176 * event-loop.c (struct callback_event): New struct.
6177 (callback_list): New global.
6178 (append_callback_event, delete_callback_event): New functions.
6179 (process_callback): New function.
6180 (start_event_loop): Call it.
6181 * remote-utils.c (NOT_SCHEDULED): Define.
6182 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
6183 moved out of readchar.
6184 (readchar): Rewrite. Call reschedule before returning.
6185 (reset_readchar): New function.
6186 (remote_close): Call it.
6187 (process_remaining, reschedule): New functions.
6188 * server.h (callback_handler_func): New typedef.
6189 (append_callback_event, delete_callback_event): Declare.
6190
9836d6ea
PA
61912010-05-03 Pedro Alves <pedro@codesourcery.com>
6192
6193 * proc-service.c (ps_pglobal_lookup): Use
6194 thread_db_look_up_one_symbol.
6195 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6196 parameter. Use it instead of all_symbols_looked_up.
6197 * server.h (struct process_info) <all_symbols_looked_up>: Delete
6198 field.
6199 (all_symbols_looked_up): Don't declare.
6200 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6201 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6202 field.
6203 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6204 Set all_symbols_looked_up here.
6205 (thread_db_look_up_one_symbol): New.
6206 (thread_db_get_tls_address): Adjust.
6207 (thread_db_load_search, try_thread_db_load_1): Always allocate the
6208 thread_db object on the heap, and tentatively set it in the
6209 process structure.
6210 (thread_db_init): Don't set all_symbols_looked_up here.
6211 * linux-low.h (thread_db_look_up_one_symbol): Declare.
6212
7984d532
PA
62132010-05-03 Pedro Alves <pedro@codesourcery.com>
6214
6215 * linux-low.c (linux_kill, linux_detach): Adjust.
6216 (status_pending_p_callback): Remove redundant statement. Check
6217 for !TARGET_WAITIKIND_IGNORE, instead of
6218 TARGET_WAITKIND_STOPPED.
6219 (handle_tracepoints): Make sure LWP is locked. Adjust.
6220 (linux_wait_for_event_1): Adjust.
6221 (linux_cancel_breakpoints): New.
6222 (unsuspend_one_lwp): New.
6223 (unsuspend_all_lwps): New.
6224 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
6225 (send_sigstop_callback): Change return type to int, add new
6226 `except' parameter and handle it.
6227 (suspend_and_send_sigstop_callback): New.
6228 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6229 pass them down. If SUSPEND, also increment the lwp's suspend
6230 count.
6231 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6232 (need_step_over_p): Don't consider suspended LWPs.
6233 (start_step_over): Adjust.
6234 (proceed_one_lwp): Change return type to int, add new `except'
6235 parameter and handle it.
6236 (unsuspend_and_proceed_one_lwp): New.
6237 (proceed_all_lwps): Use find_inferior instead of
6238 for_each_inferior.
6239 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6240 also decrement the suspend count of LWPs. Pass `except' down,
6241 instead of hacking its suspend count.
6242 (linux_pause_all): Add `freeze' parameter. Adjust.
6243 (linux_unpause_all): New.
6244 (linux_target_ops): Install linux_unpause_all.
6245 * server.c (handle_status): Adjust.
6246 * target.h (struct target_ops): New fields `unpause_all' and
6247 `cancel_breakpoints'. Add new parameter to `pause_all'.
6248 (pause_all): Add new `freeze' parameter.
6249 (unpause_all): New.
6250 (cancel_breakpoints): New.
6251 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6252 cancel breakpoints.
6253 (cmd_qtstart): Pause threads.
6254 (stop_tracing): Pause threads, and cancel breakpoints.
6255 * win32-low.c (win32_target_ops): Adjust.
6256
e471f25b
PA
62572010-05-03 Pedro Alves <pedro@codesourcery.com>
6258
6259 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6260 the inferior right away from here...
6261 (linux_wait_1): ... to here, and adjust to check the thread's
6262 last_resume_kind instead of the lwp's step or stop_expected flags.
6263
1915ef4f
PA
62642010-05-02 Pedro Alves <pedro@codesourcery.com>
6265
6266 * README: Use consistent `GDB' and `GDBserver' spellings.
6267
f9e39928
PA
62682010-05-02 Pedro Alves <pedro@codesourcery.com>
6269
6270 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6271 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
6272 (linux_detach_one_lwp): Assume the lwp is stopped.
6273 (any_thread_of): Delete.
6274 (linux_detach): Stop all lwps here. Don't blindly delete all
6275 breakpoints.
6276 (delete_lwp_callback): New.
6277 (linux_mourn): Delete all lwps of the process that is gone.
6278 (linux_wait_1): Don't delete the last lwp of the process here.
6279 * mem-break.h (mark_breakpoints_out): Declare.
6280 * mem-break.c (mark_breakpoints_out): New.
6281 (free_all_breakpoints): Use it.
6282 * server.c (handle_target_event): If the process is gone, mark
6283 breakpoints out.
6284 * thread-db.c (struct thread_db) <create_bp>: New field.
6285 (thread_db_enable_reporting): Fix prototype. Store a thread event
6286 breakpoint reference in the thread_db struct.
6287 (thread_db_load_search): Clear the thread_db object.
6288 (try_thread_db_load_1): Ditto.
6289 (switch_to_process): New.
6290 (disable_thread_event_reporting): Use it.
6291 (remove_thread_event_breakpoints): New.
6292 (thread_db_detach, thread_db_mourn): Use it.
6293
1e7fc18c
PA
62942010-05-01 Pedro Alves <pedro@codesourcery.com>
6295
6296 * linux-low.c (linux_enable_event_reporting): New.
6297 (linux_wait_for_event_1, handle_extended_wait): Use it.
6298
02fc4de7
PA
62992010-04-30 Pedro Alves <pedro@codesourcery.com>
6300
6301 * linux-low.c (linux_kill_one_lwp, linux_kill)
6302 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
6303 (send_sigstop): Take an lwp_info as parameter instead. Queue a
6304 SIGSTOP even if the LWP is stopped.
6305 (send_sigstop_callback): New.
6306 (stop_all_lwps): Use send_sigstop_callback instead.
6307 (linux_resume_one_thread): Adjust.
6308 (proceed_one_lwp): Still proceed an LWP that the client has
6309 requested to stop, if we haven't reported it as stopped yet. Make
6310 sure that LWPs the client want stopped, have a pending SIGSTOP.
6311
bc3b5632
DE
63122010-04-26 Doug Evans <dje@google.com>
6313
ae1ada35
DE
6314 * server.c (handle_general_set): Make static.
6315
bc3b5632
DE
6316 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
6317 Print received char after testing for error/eof instead of before.
6318 (input_interrupt): Tweak comment.
6319
65730243
DE
63202010-04-23 Doug Evans <dje@google.com>
6321
6322 * server.c (start_inferior): Print inferior argv if --debug.
6323
a8ae7dc0
AR
63242010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
6325
6326 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
6327 * nto-x86-low.c: Include server.h
6328
1c07cc19
PM
63292010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
6330
6331 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
6332 be consistent with other sources of this directory.
6333 (init_registers_amd64): Correct name of source file of this function
6334 in the comment.
6335
e0a61e09
PM
63362010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6337
6338 * configure.srv (x86_64-*-mingw*): New configuration for Windows
6339 64-bit executables.
6340
54709339
PM
63412010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6342
6343 * win32-i386-low.c: Add 64-bit support.
6344 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
6345 (init_registers_amd64): Declare.
6346 (mappings): Add 64-bit version of array.
6347 (init_windows_x86): New function.
6348 (the_low_target): Change init_arch field to init_windows_x86.
6349
e8f0053d
PM
63502010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6351
6352 * win32-low.c: Adapt to support also 64-bit architecture.
6353 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
6354 (get_image_name): Use SIZE_T type for local variable `done'.
6355 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
6356 (toolhelp_get_dll_name): Idem.
6357 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
6358 Use uintptr_t typecast to avoid warning.
6359 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
6360 (handle_exception): Use phex_nz to avoid warning.
6361 (win32_wait): Remove unused local variable `process'.
6362
c481e77e
PM
63632010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6364
6365 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
6366 `amd64-avx.o'.
6367
12ea4b69
PM
63682010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
6369
6370 * configure.ac: Use `ws2_32' library for srv_mingw.
6371 * configure: Regenerate.
6372 * gdbreplay.c: Include winsock2.h instead of winsock.h.
6373 * remote-utils.c: Likewise.
6374
f6d1620c
L
63752010-04-17 H.J. Lu <hongjiu.lu@intel.com>
6376
6377 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
6378 if __x86_64__ is defined.
6379
8e642873
PM
63802010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6381
6382 * configure: Regenerate.
6383
711e434b
PM
63842010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6385
6386 * server.c (handle_query): Handle 'qGetTIBAddr' query.
6387 * target.h (target_ops): New get_tib_address field.
6388 * win32-low.h (win32_thread_info): Add thread_local_base field.
6389 * win32-low.c (child_add_thread): Add tlb argument.
6390 Set thread_local_base field to TLB.
6391 (get_child_debug_event): Adapt to child_add_thread change.
6392 (win32_get_tib_address): New function.
6393 (win32_target_ops): Set get_tib_address field to
6394 win32_get_tib_address.
6395 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
6396
505106cd
PA
63972010-04-12 Pedro Alves <pedro@codesourcery.com>
6398
505106cd
PA
6399 * linux-low.c (linux_mourn): Also remove the process.
6400 * server.c (handle_target_event): Don't remove the process here.
6401 * nto-low.c (nto_mourn): New.
6402 (nto_target_ops): Install it.
6403 * spu-low.c (spu_mourn): New.
6404 (spu_target_ops): Install it.
6405 * win32-low.c (win32_mourn): New.
6406 (win32_target_ops): Install it.
6407
e8470a06
PA
64082010-04-12 Pedro Alves <pedro@codesourcery.com>
6409
6410 * server.h (buffer_xml_printf): Remove redundant `;'.
6411
45ba0d02
PA
64122010-04-12 Pedro Alves <pedro@codesourcery.com>
6413
6414 * regcache.c (set_register_cache): Invalidate regcaches before
6415 changing the register cache layout.
6416 (regcache_invalidate_one): Allow a NULL regcache.
6417 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
6418 regcaches before changing the register cache layout or the target
6419 regsets.
6420
59e04013
L
64212010-04-12 H.J. Lu <hongjiu.lu@intel.com>
6422
6423 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
6424 variable warning on Linux/x86-64.
6425
8336d594
PA
64262010-04-11 Pedro Alves <pedro@codesourcery.com>
6427
6428 GDBserver disconnected tracing support.
6429
6430 * linux-low.c (linux_remove_process): Delete.
6431 (add_lwp): Don't set last_resume_kind here.
6432 (linux_kill): Use `mourn'.
6433 (linux_detach): Use `thread_db_detach', and `mourn'.
6434 (linux_mourn): New.
6435 (linux_attach_lwp_1): Adjust comment.
6436 (linux_attach): last_resume_kind moved the thread_info; adjust.
6437 (status_pending_p_callback): Adjust.
6438 (linux_wait_for_event_1): Adjust.
6439 (count_events_callback, select_singlestep_lwp_callback)
6440 (select_event_lwp_callback, cancel_breakpoints_callback)
6441 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
6442 (proceed_one_lwp): Adjust.
6443 (linux_async): Add debug output.
6444 (linux_thread_stopped): New.
6445 (linux_pause_all): New.
6446 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
6447 linux_pause_all.
6448 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
6449 (thread_db_free): Delete declaration.
6450 (thread_db_detach, thread_db_mourn): Declare.
6451 * thread-db.c (thread_db_init): Use thread_db_mourn.
6452 (thread_db_free): Delete, split in two.
6453 (disable_thread_event_reporting): New.
6454 (thread_db_detach): New.
6455 (thread_db_mourn): New.
6456
6457 * server.h (struct thread_info) <last_resume_kind>: New field.
6458 <attached>: Add comment.
6459 <gdb_detached>: New field.
6460 (handler_func): Change return type to int.
6461 (handle_serial_event, handle_target_event): Ditto.
6462 (gdb_connected): Declare.
6463 (tracing): Delete.
6464 (disconnected_tracing): Declare.
6465 (stop_tracing): Declare.
6466
6467 * server.c (handle_query) <qSupported>: Report support for
6468 disconnected tracing.
6469 (queue_stop_reply_callback): Account for running threads.
6470 (gdb_wants_thread_stopped): New.
6471 (gdb_wants_all_threads_stopped): New.
6472 (gdb_reattached_process): New.
6473 (handle_status): Clear the `gdb_detached' flag of all processes.
6474 In all-stop, stop all threads.
6475 (main): Be sure to leave tfind mode. Handle disconnected tracing.
6476 (process_serial_event): If the remote connection breaks, or if an
6477 exit was forced with "monitor exit", force an event loop exit.
6478 Handle disconnected tracing on detach.
6479 (handle_serial_event): Adjust.
6480 (handle_target_event): If GDB isn't connected, forward events back
6481 to the inferior, unless the last process exited, in which case,
6482 exit gdbserver. Adjust interface.
6483
6484 * remote-utils.c (remote_open): Don't block in accept. Instead
6485 register an event loop source on the listen socket file
6486 descriptor. Refactor bits into ...
6487 (listen_desc): ... this new global.
6488 (gdb_connected): ... this new function.
6489 (enable_async_notification): ... this new function.
6490 (handle_accept_event): ... this new function.
6491 (remote_close): Clear remote_desc.
6492
6493 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
6494
6495 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
6496 New fields.
6497 (mourn_inferior): Define.
6498 (target_process_qsupported): Avoid the dangling else problem.
6499 (thread_stopped): Define.
6500 (pause_all): Define.
6501 (target_waitstatus_to_string): Declare.
6502 * target.c (target_waitstatus_to_string): New.
6503
6504 * tracepoint.c (tracing): Make extern.
6505 (disconnected_tracing): New.
6506 (stop_tracing): Make extern. Handle tracing stops due to GDB
6507 disconnecting.
6508 (cmd_qtdisconnected): New.
6509 (cmd_qtstatus): Report disconnected tracing status in trace reply.
6510 (handle_tracepoint_general_set): Handle QTDisconnected.
6511
6512 * event-loop.c (event_handler_func): Change return type to int.
6513 (process_event): Bail out if the event handler wants the event
6514 loop to stop.
6515 (handle_file_event): Ditto.
6516 (start_event_loop): Bail out if the event handler wants the event
6517 loop to stop.
6518
6519 * nto-low.c (nto_target_ops): Adjust.
6520 * spu-low.c (spu_wait): Don't remove the process here.
6521 (spu_target_ops): Adjust.
6522 * win32-low.c (win32_wait): Don't remove the process here.
6523 (win32_target_ops): Adjust.
6524
5d267c4c
PA
65252010-04-11 Pedro Alves <pedro@codesourcery.com>
6526
6527 * regcache.c (realloc_register_cache): Invalidate inferior's
6528 regcache before recreating it.
6529
623ccd72
PA
65302010-04-09 Pedro Alves <pedro@codesourcery.com>
6531
6532 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
6533
219f2f23
PA
65342010-04-09 Stan Shebs <stan@codesourcery.com>
6535 Pedro Alves <pedro@codesourcery.com>
6536
6537 * server.h (LONGEST): New.
6538 (struct thread_info) <while_stepping>: New field.
6539 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
6540 Declare.
6541 (initialize_tracepoint, handle_tracepoint_general_set)
6542 (handle_tracepoint_query, tracepoint_finished_step)
6543 (tracepoint_was_hit, release_while_stepping_state_list):
6544 (current_traceframe): Declare.
6545 * server.c (handle_general_set): Handle tracepoint packets.
6546 (read_memory): New.
6547 (write_memory): New.
6548 (handle_search_memory_1): Use read_memory.
6549 (handle_query): Report support for conditional tracepoints, trace
6550 state variables, and tracepoint sources. Handle tracepoint
6551 queries.
6552 (main): Initialize the tracepoints module.
6553 (process_serial_event): Handle traceframe reads/writes.
6554
6555 * linux-low.c (handle_tracepoints): New.
6556 (linux_wait_1): Call it.
6557 (linux_resume_one_lwp): Handle while-stepping.
6558 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
6559 (linux_target_ops): Install them.
6560 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
6561 New field.
6562 * linux-x86-low.c (x86_supports_tracepoints): New.
6563 (the_low_target). Install it.
6564
6565 * mem-break.h (delete_breakpoint): Declare.
6566 * mem-break.c (delete_breakpoint): Make external.
6567
6568 * target.h (struct target_ops): Add `supports_tracepoints',
6569 `read_pc', and `write_pc' fields.
6570 (target_supports_tracepoints): Define.
6571 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
6572 (phex_nz): New.
6573
6574 * regcache.h (struct regcache) <registers_owned>: New field.
6575 (init_register_cache, regcache_cpy): Declare.
6576 (regcache_read_pc, regcache_write_pc): Declare.
6577 (register_cache_size): Declare.
6578 (supply_regblock): Declare.
6579 * regcache.c (init_register_cache): New.
6580 (new_register_cache): Use it.
6581 (regcache_cpy): New.
6582 (register_cache_size): New.
6583 (supply_regblock): New.
6584 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 6585
219f2f23
PA
6586 * tracepoint.c: New.
6587
6588 * Makefile.in (OBS): Add tracepoint.o.
6589 (tracepoint.o): New rule.
6590
3a13a53b
L
65912010-04-08 H.J. Lu <hongjiu.lu@intel.com>
6592
6593 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
6594 (i386-mmx.o): New.
6595 (i386-mmx.c): Likewise.
6596 (i386-mmx-linux.o): Likewise.
6597 (i386-mmx-linux.c): Likewise.
6598
6599 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
6600 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
6601 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
6602 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
6603
6604 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
6605 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
6606 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
6607
1570b33e
L
66082010-04-07 H.J. Lu <hongjiu.lu@intel.com>
6609
6610 * Makefile.in (clean): Updated.
6611 (i386-avx.o): New.
6612 (i386-avx.c): Likewise.
6613 (i386-avx-linux.o): Likewise.
6614 (i386-avx-linux.c): Likewise.
6615 (amd64-avx.o): Likewise.
6616 (amd64-avx.c): Likewise.
6617 (amd64-avx-linux.o): Likewise.
6618 (amd64-avx-linux.c): Likewise.
6619
6620 * configure.srv (srv_i386_regobj): Add i386-avx.o.
6621 (srv_i386_linux_regobj): Add i386-avx-linux.o.
6622 (srv_amd64_regobj): Add amd64-avx.o.
6623 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
6624 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
6625 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
6626 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
6627 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
6628 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
6629 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
6630
6631 * i387-fp.c: Include "i386-xstate.h".
6632 (i387_xsave): New.
6633 (i387_cache_to_xsave): Likewise.
6634 (i387_xsave_to_cache): Likewise.
6635 (x86_xcr0): Likewise.
6636
6637 * i387-fp.h (i387_cache_to_xsave): Likewise.
6638 (i387_xsave_to_cache): Likewise.
6639 (x86_xcr0): Likewise.
6640
6641 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
6642 * linux-crisv32-low.c (target_regsets): Likewise.
6643 * linux-m68k-low.c (target_regsets): Likewise.
6644 * linux-mips-low.c (target_regsets): Likewise.
6645 * linux-ppc-low.c (target_regsets): Likewise.
6646 * linux-s390-low.c (target_regsets): Likewise.
6647 * linux-sh-low.c (target_regsets): Likewise.
6648 * linux-sparc-low.c (target_regsets): Likewise.
6649 * linux-xtensa-low.c (target_regsets): Likewise.
6650
6651 * linux-low.c: Include <sys/uio.h>.
6652 (regsets_fetch_inferior_registers): Support nt_type.
6653 (regsets_store_inferior_registers): Likewise.
6654 (linux_process_qsupported): New.
6655 (linux_target_ops): Add linux_process_qsupported.
6656
6657 * linux-low.h (regset_info): Add nt_type.
6658 (linux_target_ops): Add process_qsupported.
6659
6660 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
6661 and <sys/uio.h>.
6662 (init_registers_i386_avx_linux): New.
6663 (init_registers_amd64_avx_linux): Likewise.
6664 (xmltarget_i386_linux_no_xml): Likewise.
6665 (xmltarget_amd64_linux_no_xml): Likewise.
6666 (PTRACE_GETREGSET): Likewise.
6667 (PTRACE_SETREGSET): Likewise.
6668 (x86_fill_xstateregset): Likewise.
6669 (x86_store_xstateregset): Likewise.
6670 (use_xml): Likewise.
6671 (x86_linux_update_xmltarget): Likewise.
6672 (x86_linux_process_qsupported): Likewise.
6673 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
6674 (x86_arch_setup): Don't call init_registers_amd64_linux nor
6675 init_registers_i386_linux here. Call
6676 x86_linux_update_xmltarget.
6677 (the_low_target): Add x86_linux_process_qsupported.
6678
6679 * server.c (handle_query): Call target_process_qsupported.
6680
6681 * target.h (target_ops): Add process_qsupported.
6682 (target_process_qsupported): New.
6683
fc7238bb
PA
66842010-04-03 Pedro Alves <pedro@codesourcery.com>
6685
6686 * inferiors.c (add_thread): Set last_status kind to
6687 TARGET_WAITKIND_IGNORE.
6688 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
6689 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
6690 (linux_wait_1): Move `thread' local definition to block that uses
6691 it. Don't NULL initialize `event_child'.
6692 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
6693 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
6694 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
6695
bdabb078
PA
66962010-04-01 Pedro Alves <pedro@codesourcery.com>
6697
6698 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
6699 an extended waitstatus, or by a watchpoint.
6700 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
6701 thread was stepping or has been stopped by a watchpoint.
6702
d3bbe7a0
PA
67032010-04-01 Pedro Alves <pedro@codesourcery.com>
6704
6705 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
6706 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
6707 of another, then delete the previous, and validate all
6708 breakpoints.
6709 (validate_inserted_breakpoint): New.
6710 (delete_disabled_breakpoints): New.
6711 (validate_breakpoints): New.
6712 (check_mem_read): Validate breakpoints before trusting their
6713 shadow. Delete disabled breakpoints.
6714 (check_mem_write): Validate breakpoints before trusting they
6715 should be inserted. Delete disabled breakpoints.
6716 * mem-break.h (validate_breakpoints):
6717 * server.c (handle_query): Validate breakpoints when we see a
6718 qSymbol query.
6719
8b07ae33
PA
67202010-04-01 Pedro Alves <pedro@codesourcery.com>
6721
6722 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
6723 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
6724 if we could tell there's a GDB breakpoint at stop_pc.
6725 (need_step_over_p): Don't do a step over if we find a GDB
6726 breakpoint at the resume PC.
6727
6728 * mem-break.c (struct raw_breakpoint): New.
6729 (enum bkpt_type): New type `gdb_breakpoint'.
6730 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
6731 fields. New field `raw'.
6732 (find_raw_breakpoint_at): New.
6733 (set_raw_breakpoint_at): Handle refcounting. Create a raw
6734 breakpoint instead.
6735 (set_breakpoint_at): Adjust.
6736 (delete_raw_breakpoint): New.
6737 (release_breakpoint): New.
6738 (delete_breakpoint): Rename to...
6739 (delete_breakpoint_1): ... this. Add proc parameter. Use
6740 release_breakpoint. Return ENOENT.
6741 (delete_breakpoint): Reimplement.
6742 (find_breakpoint_at): Delete.
6743 (find_gdb_breakpoint_at): New.
6744 (delete_breakpoint_at): Delete.
6745 (set_gdb_breakpoint_at): New.
6746 (delete_gdb_breakpoint_at): New.
6747 (gdb_breakpoint_here): New.
6748 (set_reinsert_breakpoint): Use release_breakpoint.
6749 (uninsert_breakpoint): Rename to ...
6750 (uninsert_raw_breakpoint): ... this.
6751 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
6752 (reinsert_raw_breakpoint): Change parameter type to
6753 raw_breakpoint.
6754 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
6755 instead.
6756 (check_breakpoints): Adjust. Use release_breakpoint.
6757 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
6758 (breakpoint_inserted_here): Ditto.
6759 (check_mem_read): Adjust to iterate over raw breakpoints instead.
6760 Don't trust the breakpoint's shadow if it is not inserted.
6761 (check_mem_write): Adjust to iterate over raw breakpoints instead.
6762 (delete_all_breakpoints): Adjust.
6763 (free_all_breakpoints): Mark all breakpoints as uninserted, and
6764 use delete_breakpoint_1.
6765
6766 * mem-break.h (breakpoints_supported): Delete declaration.
6767 (set_gdb_breakpoint_at): Declare.
6768 (gdb_breakpoint_here): Declare.
6769 (delete_breakpoint_at): Delete.
6770 (delete_gdb_breakpoint_at): Declare.
6771
6772 * server.h (struct raw_breakpoint): Forward declare.
6773 (struct process_info): New field `raw_breakpoints'.
6774
6775 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
6776 breakpoints.
6777
6bf5e0ba
PA
67782010-03-24 Pedro Alves <pedro@codesourcery.com>
6779
6780 * linux-low.c (status_pending_p_callback): Fix comment.
6781 (linux_wait_for_event_1): Move most of the internal breakpoint
6782 handling from here...
6783 (linux_wait_1): ... to here.
6784 (count_events_callback): New.
6785 (select_singlestep_lwp_callback): New.
6786 (select_event_lwp_callback): New.
6787 (cancel_breakpoints_callback): New.
6788 (select_event_lwp): New.
6789 (linux_wait_1): Simplify internal breakpoint handling. Give equal
6790 priority to all LWPs that have had events that should be reported
6791 to the client. Cancel breakpoints when about to reporting the
6792 event to the client, not while stopping lwps. No longer cancel
6793 finished single-steps here.
6794 (cancel_finished_single_step): Delete.
6795 (cancel_finished_single_steps): Delete.
6796
414a389f
PA
67972010-03-24 Pedro Alves <pedro@codesourcery.com>
6798
6799 * mem-break.c (enum bkpt_type): New.
6800 (struct breakpoint): New field `type'.
6801 (set_breakpoint_at): Change return type to struct breakpoint
6802 pointer. Set type to `other_breakpoint' by default.
6803 (delete_breakpoint): Rewrite, supporting more than one breakpoint
6804 in the breakpoint list.
6805 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
6806 (reinsert_breakpoint): Rename to ...
6807 (reinsert_raw_breakpoint): ... this.
6808 (reinsert_breakpoints_at): Adjust.
6809 * mem-break.h (struct breakpoint): Declare.
6810 (set_breakpoint_at): Change return type to struct breakpoint
6811 pointer.
6812
2280c721
PA
68132010-03-24 Pedro Alves <pedro@codesourcery.com>
6814
6815 * server.c (handle_query): Assign, not compare.
6816
d50171e4
PA
68172010-03-24 Pedro Alves <pedro@codesourcery.com>
6818
6819 Teach linux gdbserver to step-over-breakpoints.
6820
6821 * linux-low.c (can_hardware_single_step): New.
6822 (supports_breakpoints): New.
6823 (handle_extended_wait): If stopping threads, read the stop pc of
6824 the new cloned LWP.
6825 (get_pc): New.
6826 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
6827 low target doesn't support retrieving the PC.
6828 (add_lwp): Set last_resume_kind to resume_continue.
6829 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
6830 (linux_attach): Don't clear stop_expected. Set the lwp's
6831 last_resume_kind to resume_stop.
6832 (linux_detach_one_lwp): Don't check for removed breakpoints.
6833 (check_removed_breakpoint): Delete.
6834 (status_pending_p): Rename to ...
6835 (status_pending_p_callback): ... this. Don't check for removed
6836 breakpoints. Don't consider threads that are stopped from GDB's
6837 perspective.
6838 (linux_wait_for_lwp): Always read the stop_pc here.
6839 (cancel_breakpoint): New.
6840 (step_over_bkpt): New global.
6841 (linux_wait_for_event_1): Implement stepping over breakpoints.
6842 (gdb_wants_lwp_stopped): New.
6843 (gdb_wants_all_stopped): New.
6844 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
6845 single-step traps here. Store the thread's last reported target
6846 wait status.
6847 (send_sigstop): Don't clear stop_expected. Always set it,
6848 instead.
6849 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
6850 (cancel_finished_single_step): New.
6851 (cancel_finished_single_steps): New.
6852 (wait_for_sigstop): Don't cancel finished single-step traps here.
6853 (linux_resume_one_lwp): Don't check for removed breakpoints.
6854 Don't set `step' on non-hardware step archs.
6855 (linux_set_resume_request): Ignore resume_stop requests if already
6856 stopping or stopped. Set the lwp's last_resume_kind.
6857 (resume_status_pending_p): Don't check for removed breakpoints.
6858 (need_step_over_p): New.
6859 (start_step_over): New.
6860 (finish_step_over): New.
6861 (linux_resume_one_thread): Always queue a sigstop for resume_stop
6862 requests. Clear the thread's last reported target waitstatus.
6863 Don't use the `suspended' flag. Don't consider pending breakpoints.
6864 (linux_resume): Start a step-over if necessary.
6865 (proceed_one_lwp): New.
6866 (proceed_all_lwps): New.
6867 (unstop_all_lwps): New.
6868 * linux-low.h (struct lwp_info): Rewrite comment for the
6869 `suspended' flag. Add the `stop_pc' field. Delete the
6870 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
6871 Add `'last_resume_kind' and `need_step_over' fields.
6872 * inferiors.c (struct thread_info): Delete, moved elsewhere.
6873 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
6874 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
6875 (set_raw_breakpoint_at): New.
6876 (set_breakpoint_at): Rewrite to use it.
6877 (reinsert_breakpoint_handler): Delete.
6878 (set_reinsert_breakpoint): New.
6879 (reinsert_breakpoint_by_bp): Delete.
6880 (delete_reinsert_breakpoints): New.
6881 (uninsert_breakpoint): Rewrite.
6882 (uninsert_breakpoints_at): New.
6883 (reinsert_breakpoint): Rewrite.
6884 (reinsert_breakpoints_at): New.
6885 (check_breakpoints): Rewrite.
6886 (breakpoint_here): New.
6887 (breakpoint_inserted_here): New.
6888 (check_mem_read): Adjust.
6889 * mem-break.h (breakpoints_supported, breakpoint_here)
6890 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
6891 (reinsert_breakpoint_by_bp): Delete declaration.
6892 (delete_reinsert_breakpoints): Declare.
6893 (reinsert_breakpoint): Delete declaration.
6894 (reinsert_breakpoints_at): Declare.
6895 (uninsert_breakpoint): Delete declaration.
6896 (uninsert_breakpoints_at): Declare.
6897 (check_breakpoints): Adjust prototype.
6898 * server.h: Adjust include order.
6899 (struct thread_info): Declare here. Add a `last_status' field.
6900
30ba68cb
MS
69012010-03-23 Michael Snyder <msnyder@vmware.com>
6902
6903 * server.c (crc32): New function.
6904 (handle_query): Add handling for 'qCRC:' request.
6905
b9a881c2
PA
69062010-03-23 Pedro Alves <pedro@codesourcery.com>
6907
6908 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
6909 lwp had been stopped by a watchpoint.
6910
e92d13d5
PA
69112010-03-16 Pedro Alves <pedro@codesourcery.com>
6912
6913 * server.h (internal_error): Declare.
6914 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
6915 * utils.c (internal_error): New function.
6916
64daa791
AS
69172010-03-15 Andreas Schwab <schwab@redhat.com>
6918
6919 * configure.srv: Fix typo setting srv_regobj.
6920
f52cd8cd
PA
69212010-03-15 Pedro Alves <pedro@codesourcery.com>
6922
6923 * linux-low.c (fetch_register): Avoid passing a non string literal
6924 format to `error'.
6925 (usr_store_inferior_registers): Ditto.
6926
93ae6fdc
PA
69272010-03-14 Pedro Alves <pedro@codesourcery.com>
6928
6929 * linux-low.c (linux_write_memory): Bail out early if peeking
6930 memory failed.
6931
c3adc08c
PA
69322010-03-14 Pedro Alves <pedro@codesourcery.com>
6933
6934 * linux-low.h (struct lwp_info): New fields
6935 `stopped_by_watchpoint' and `stopped_data_address'.
6936 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
6937 here, and cache them in the lwp object.
6938 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
6939 directly.
6940 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
6941 field.
6942 (linux_stopped_by_watchpoint): Rewrite.
6943 (linux_stopped_data_address): Rewrite.
6944
bce522a2
PA
69452010-03-06 Simo Melenius <simo.melenius@iki.fi>
6946
6947 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
6948 switching the current inferior, not before.
6949
90884b2b
L
69502010-03-01 H.J. Lu <hongjiu.lu@intel.com>
6951
6952 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
6953 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
6954 i386-linux.c and amd64-linux.c.
6955 (reg-i386.o): Removed.
6956 (reg-i386.c): Likewise.
6957 (reg-i386-linux.o): Likewise.
6958 (reg-i386-linux.c): Likewise.
6959 (reg-x86-64.o): Likewise.
6960 (reg-x86-64.c): Likewise.
6961 (reg-x86-64-linux.o): Likewise.
6962 (reg-x86-64-linux.c): Likewise.
6963 (i386.o): New.
6964 (i386.c): Likewise.
6965 (i386-linux.o): Likewise.
6966 (i386-linux.c): Likewise.
6967 (amd64.o): Likewise.
6968 (amd64.c): Likewise.
6969 (amd64-linux.o): Likewise.
6970 (amd64-linux.c): Likewise.
6971
6972 * configure.srv (srv_i386_regobj): New.
6973 (srv_i386_linux_regobj): Likewise.
6974 (srv_amd64_regobj): Likewise.
6975 (srv_amd64_linux_regobj): Likewise.
6976 (srv_i386_32bit_xmlfiles): Likewise.
6977 (srv_i386_64bit_xmlfiles): Likewise.
6978 (srv_i386_xmlfiles): Likewise.
6979 (srv_amd64_xmlfiles): Likewise.
6980 (srv_i386_linux_xmlfiles): Likewise.
6981 (srv_amd64_linux_xmlfiles): Likewise.
6982 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
6983 srv_xmlfiles to $srv_i386_xmlfiles.
6984 (i[34567]86-*-mingw32ce*): Likewise.
6985 (i[34567]86-*-mingw*): Likewise.
6986 (i[34567]86-*-nto*): Likewise.
6987 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
6988 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
6989 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
6990 (x86_64-*-linux*): Likewise.
6991
6992 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
6993 (init_registers_amd64_linux): New.
6994 (x86_arch_setup): Replace init_registers_x86_64_linux with
6995 init_registers_amd64_linux.
6996
193f13e6
MK
69972010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
6998
6999 * configure.ac: Check for libdl. If it is not available link against
7000 static libthread_db.
7001 * configure: Regenerate.
7002
85d721b8
PA
70032010-02-22 Pedro Alves <pedro@codesourcery.com>
7004
7005 PR9605
7006
7007 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
7008 handing a read watchpoint.
7009 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
7010
6076632b
DE
70112010-02-12 Doug Evans <dje@google.com>
7012
7013 * linux-low.c (linux_supports_tracefork_flag): Document.
7014 (linux_look_up_symbols): Add comment.
7015
3327ccf7
L
70162010-02-03 H.J. Lu <hongjiu.lu@intel.com>
7017
7018 * regcache.c (supply_register): Clear regcache if buf is NULL.
7019
0718675c 70202010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 7021 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
7022
7023 * inferiors.c (find_inferior): Add function documentation.
7024 (unloaded_dll): Handle the case where the unloaded dll has not
7025 been previously registered in the dll list.
7026
177321bd
DJ
70272010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7028
7029 * linux-arm-low.c (thumb_breakpoint_len): Delete.
7030 (thumb2_breakpoint): New.
7031 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7032
2b009048
DJ
70332010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7034
7035 * linux-low.c (get_stop_pc): Check for SIGTRAP.
7036 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7037 breakpoints.
7038
3be029c7
PA
70392010-01-21 Pedro Alves <pedro@codesourcery.com>
7040
7041 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7042
18f5de3b
JK
70432010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7044
7045 * linux-s390-low.c (s390_collect_ptrace_register)
7046 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7047
3743bb4f
DE
70482010-01-21 Doug Evans <dje@google.com>
7049
14ce3065
DE
7050 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7051 (PTRACE_ARG4_TYPE): New macro.
7052 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7053 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
7054 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
7055 (usr_store_inferior_registers): Ditto.
7056 (linux_read_memory, linux_write_memory): Ditto.
7057 (linux_test_for_tracefork): Ditto.
7058
3743bb4f
DE
7059 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
7060 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
7061
8b315be5
PA
70622010-01-21 Pedro Alves <pedro@codesourcery.com>
7063
7064 * proc-service.c (ps_lgetregs): Don't refetch registers from the
7065 target.
7066
85492558
PA
70672010-01-21 Pedro Alves <pedro@codesourcery.com>
7068
7069 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
7070 prototype to take a regcache. Adjust.
7071
442ea881
PA
70722010-01-20 Pedro Alves <pedro@codesourcery.com>
7073
7074 * regcache.h (struct thread_info): Forward declare.
7075 (struct regcache): New.
7076 (new_register_cache): Adjust prototype.
7077 (get_thread_regcache): Declare.
7078 (free_register_cache): Adjust prototype.
7079 (registers_to_string, registers_from_string): Ditto.
7080 (supply_register, supply_register_by_name, collect_register)
7081 (collect_register_as_string, collect_register_by_name): Ditto.
7082 * regcache.c (struct inferior_regcache_data): Delete.
7083 (get_regcache): Rename to ...
7084 (get_thread_regcache): ... this. Adjust. Switch inferior before
7085 fetching registers.
7086 (regcache_invalidate_one): Adjust.
7087 (regcache_invalidate): Fix prototype.
7088 (new_register_cache): Return the new register cache.
7089 (free_register_cache): Change prototype.
7090 (realloc_register_cache): Adjust.
7091 (registers_to_string): Change prototype to take a regcache. Adjust.
7092 (registers_from_string): Ditto.
7093 (register_data): Ditto.
7094 (supply_register): Ditto.
7095 (supply_register_by_name): Ditto.
7096 (collect_register): Ditto.
7097 (collect_register_as_string): Ditto.
7098 (collect_register_by_name): Ditto.
7099 * server.c (process_serial_event): Adjust.
7100 * linux-low.h (regset_fill_func, regset_store_func): Change
7101 prototype.
7102 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
7103 Change prototype.
7104 * linux-low.c (get_stop_pc): Adjust.
7105 (check_removed_breakpoint): Adjust.
7106 (linux_wait_for_event): Adjust.
7107 (linux_resume_one_lwp): Adjust.
7108 (fetch_register): Add regcache parameter. Adjust.
7109 (usr_store_inferior_registers): Ditto.
7110 (regsets_fetch_inferior_registers): Ditto.
7111 (regsets_store_inferior_registers): Ditto.
7112 (linux_fetch_registers, linux_store_registers): Ditto.
7113 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
7114 regcache. Adjust.
43aaf8b6
PA
7115 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
7116 Ditto.
442ea881
PA
7117 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
7118 prototype to take a regcache.
7119 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
7120 * remote-utils.c (convert_ascii_to_int, outreg)
7121 (prepare_resume_reply): Change prototype to take a regcache.
7122 Adjust.
7123 * target.h (struct target_ops) <fetch_registers, store_registers>:
7124 Change prototype to take a regcache.
7125 (fetch_inferior_registers, store_inferior_registers): Change
7126 prototype to take a regcache. Adjust.
7127 * proc-service.c (ps_lgetregs): Adjust.
7128 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
7129 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
7130 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
7131 take a regcache. Adjust.
7132 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
7133 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
7134 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
7135 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
7136 * linux-cris-low.c (cris_get_pc, cris_set_pc)
7137 (cris_cannot_fetch_register):
7138 (cris_breakpoint_at): Change prototype to take a regcache.
7139 Adjust.
7140 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
7141 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
7142 to take a regcache. Adjust.
7143 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
7144 Adjust.
7145 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
7146 take a regcache. Adjust.
7147 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
7148 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
7149 (m68k_set_pc): Change prototype to take a regcache. Adjust.
7150 * linux-mips-low.c (mips_get_pc):
7151 (mips_set_pc): Change prototype to take a regcache. Adjust.
7152 (mips_reinsert_addr): Adjust.
7153 (mips_collect_register): Change prototype to take a regcache.
7154 Adjust.
7155 (mips_supply_register):
7156 (mips_collect_register_32bit, mips_supply_register_32bit)
7157 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7158 (mips_store_fpregset): Ditto.
43aaf8b6
PA
7159 * linux-ppc-low.c (ppc_supply_ptrace_register)
7160 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
7161 (parse_spufs_run): Adjust.
7162 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
7163 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
7164 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
7165 take a regcache. Adjust.
7166 * linux-s390-low.c (s390_collect_ptrace_register)
7167 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
7168 (s390_set_pc): Change prototype to take a regcache. Adjust.
7169 (s390_arch_setup): Adjust.
7170 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
7171 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
7172 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7173 (sparc_fill_gregset, sparc_store_gregset_from_stack)
7174 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7175 regcache. Adjust.
7176 (sparc_breakpoint_at): Adjust.
7177 * linux-xtensa-low.c (xtensa_fill_gregset):
7178 (xtensa_store_gregset):
7179 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7180 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
7181 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
7182 prototype to take a regcache. Adjust.
7183 * win32-arm-low.c (arm_fetch_inferior_register)
7184 (arm_store_inferior_register): Change prototype to take a
7185 regcache. Adjust.
7186 * win32-i386-low.c (i386_fetch_inferior_register)
7187 (i386_store_inferior_register): Change prototype to take a
7188 regcache. Adjust.
7189 * win32-low.c (child_fetch_inferior_registers)
7190 (child_store_inferior_registers): Change prototype to take a
7191 regcache. Adjust.
7192 (win32_wait): Adjust.
7193 (win32_fetch_inferior_registers): Change prototype to take a
7194 regcache. Adjust.
7195 (win32_store_inferior_registers): Adjust.
7196 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7197 store_inferior_register>: Change prototype to take a regcache.
7198
60c3d7b0
DE
71992010-01-20 Doug Evans <dje@google.com>
7200
7201 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7202 #ifdef.
7203 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 7204 (W_STOPCODE): Provide definition if missing.
60c3d7b0 7205
dc146f7c
VP
72062010-01-13 Vladimir Prus <vladimir@codesourcery.com>
7207
7208 * linux-low.c (linux_core_of_thread): New.
7209 (compare_ints, show_process, list_threads): New.
7210 (linux_qxfer_osdata): Report threads and cores.
7211 (linux_target_op): Register linux_core_of_thread.
7212 * remote-utils.c (prepare_resume_reply): Report the core.
7213 (buffer_xml_printf): Support %d specifier.
7214 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
7215 New.
7216 (handle_query): Handle qXfer:threads. Announce availability
7217 thereof.
7218 * target.h (struct target_ops): New field core_of_thread.
7219
7803799a
UW
72202010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
7221
7222 * Makefile.in (clean): Remove new generated files.
7223 (reg-s390.o, reg-s390.c): Remove rules.
7224 (reg-s390x.o, reg-s390x.c): Likewise.
7225 (s390-linux32.o, s390-linux32.c): Add rules.
7226 (s390-linux64.o, s390-linux64.c): Likewise.
7227 (s390x-linux64.o, s390x-linux64.c): Likewise.
7228 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7229 * linux-s390-low.c: Include <elf.h>.
7230 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7231 (init_registers_s390): Remove prototype.
7232 (init_registers_s390x): Likewise.
7233 (init_registers_s390_linux32): Add prototype.
7234 (init_registers_s390_linux64): Likewise.
7235 (init_registers_s390x_linux64): Likewise.
7236 (s390_num_regs_3264): New define.
7237 (s390_regmap_3264): New global variable.
7238 (s390_cannot_fetch_register): Remove obsolete check.
7239 (s390_cannot_store_register): Likewise.
7240 (s390_collect_ptrace_register): Handle upper/lower register halves.
7241 (s390_supply_ptrace_register): Likewise.
7242 (s390_fill_gregset): Update to register number changes.
7243 (s390_get_hwcap): New routine.
7244 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7245 Install appropriate regmap and register set.
7246
6e7ffa39
JB
72472010-01-01 Joel Brobecker <brobecker@adacore.com>
7248
7249 * server.c (gdbserver_version): Update copyright year to 2010.
7250 * gdbreplay.c (gdbreplay_version): Likewise.
7251
957f3f49
DE
72522009-12-28 Doug Evans <dje@google.com>
7253
7254 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7255 elf/external.h. Include <elf.h> instead but only if necessary.
7256
ca5c370d
PA
72572009-12-28 Pedro Alves <pedro@codesourcery.com>
7258
7259 * linux-low.c (linux_remove_process): Remove `detaching'
7260 parameter. Don't release/detach from thread_db here.
7261 (linux_kill): Release/detach from thread_db here, ...
7262 (linux_detach): ... and here, before actually detaching.
7263 (linux_wait_1): ... and here, when a process exits.
7264 * thread-db.c (any_thread_of): New.
7265 (thread_db_free): Switch the current inferior to a thread of the
7266 passed in process.
7267
4ee62156
DE
72682009-12-21 Doug Evans <dje@google.com>
7269
d90e6a88
DE
7270 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7271
c5f62d5f
DE
7272 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7273 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7274 warning ifndef __NR_tkill. Move setting of errno there too.
7275 Delete unnecessary resetting of errno after syscall.
7276 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7277
10e86dd7
DE
7278 * configure.ac: Check for dladdr.
7279 * config.in: Regenerate.
7280 * configure: Regenerate.
7281 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7282 (try_thread_db_load): Update.
7283
4ee62156
DE
7284 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7285
00f515da
DE
72862009-12-18 Doug Evans <dje@google.com>
7287
e9464885
DE
7288 * event-loop.c: Include unistd.h if it exists.
7289
07d4f67e
DE
7290 * linux-low.c (my_waitpid): Move definition away from being in
7291 between linux_tracefork_child/linux_test_for_tracefork.
7292
00f515da
DE
7293 * gdb_proc_service.h (psaddr_t): Fix type.
7294 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7295 signature to match glibc.
7296
1de1badb
DE
72972009-12-16 Doug Evans <dje@google.com>
7298
7299 * linux-low.c (linux_read_memory): Fix argument to read.
7300
aeeb81d1
PA
73012009-11-26 Pedro Alves <pedro@codesourcery.com>
7302
7303 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
7304 events, don't leave current_inferior pointing at null.
7305
10357975
PA
73062009-11-26 Pedro Alves <pedro@codesourcery.com>
7307
7308 * win32-low.c (LOG): Delete.
7309 (OUTMSG): Output to stderr.
7310 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
7311 on compile time LOG macro.
7312 (win32_wait): Fix debug output.
7313
cf6e3471
PA
73142009-11-26 Pedro Alves <pedro@codesourcery.com>
7315
7316 * win32-low.c (win32_add_one_solib): If the dll name is
7317 "ntdll.dll", prepend the system directory to the dll path.
7318
0c85e18e
MK
73192009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
7320
7321 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
7322
9ac544ce 73232009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 7324 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
7325
7326 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
7327 * configure.ac: Check for __mcoldfire__ and set
7328 gdb_cv_m68k_is_coldfire.
7329 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
7330 reg-cf.o and reg-m68k.o.
7331 * configure: Regenerated.
7332
fd7dd3e6
PA
73332009-11-16 Pedro Alves <pedro@codesourcery.com>
7334
7335 * linux-low.c (linux_remove_process): Add `detaching' parameter.
7336 Pass it to thread_db_free.
7337 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
7338 proper `detaching' argument to linux_remove_process.
7339 * linux-low.h (thread_db_free): Add `detaching' parameter.
7340 * thread-db.c (thread_db_init): Pass false as `detaching' argument
7341 to thread_db_free.
7342 (thread_db_free): Add `detaching' parameter. Only
7343 call td_ta_clear_event if detaching from process.
7344
75aa492e
MK
73452009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
7346
7347 * thread-db.c (thread_db_free): Fix typo.
7348
21e1bee4
PP
73492009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
7350
7351 PR gdb/10838
7352 * thread-db.c (thread_db_free): Call td_ta_clear_event.
7353
8838b45e
NS
73542009-11-03 Nathan Sidwell <nathan@codesourcery.com>
7355
7356 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
7357 with an i686 compiler.
7358 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
7359 needed.
7360 * configure: Rebuilt.
7361
8a35fb51
SL
73622009-10-29 Sandra Loosemore <sandra@codesourcery.com>
7363
7364 PR gdb/10783
7365
7366 * server.c (handle_search_memory_1): Correct read_addr initialization
7367 in loop for searching subsequent chunks.
7368
96f15937
PP
73692009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
7370
7371 * configure.ac: New --with-libthread-db option.
7372 * thread-db.c: Allow direct dependence on libthread_db.
7373 (thread_db_free): Adjust.
7374 * config.in: Regenerate.
7375 * configure: Likewise.
889bf7c5 7376
5f7d1694
PP
73772009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
7378
7379 PR gdb/10757
7380 * thread-db.c (attach_thread): New function.
7381 (maybe_attach_thread): Return success/failure.
7382 (find_new_threads_callback): Adjust.
889bf7c5
PA
7383 (thread_db_find_new_threads): Loop until no new threads.
7384
88e3b899
PA
73852009-10-13 Pedro Alves <pedro@codesourcery.com>
7386
7387 * proc-service.c (ps_lgetregs): Formatting.
7388
cdbfd419
PP
73892009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
7390
7391 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
7392 * configure.ac: Adjust.
7393 * linux-low.h (struct process_info_private): Move members to struct
7394 thread_db.
7395 (thread_db_free, thread_db_handle_monitor_command): New prototype.
7396 * linux-low.c (linux_remove_process): Adjust.
7397 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
7398 * server.c (handle_query): Move code ...
7399 (handle_monitor_command): ... here. New function.
7400 * target.h (struct target_ops): New member.
7401 * thread-db.c (struct thread_db): New.
7402 (libthread_db_search_path): New variable.
7403 (thread_db_create_event, thread_db_enable_reporting)
7404 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
7405 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
7406 (try_thread_db_load_1, dladdr_to_soname): New functions.
7407 (try_thread_db_load, thread_db_load_search): New functions.
7408 (thread_db_init): Search for libthread_db.
7409 (thread_db_free): New function.
7410 (thread_db_handle_monitor_command): Likewise.
7411 * config.in: Regenerate.
7412 * configure: Regenerate.
889bf7c5 7413
4168d2d6
UW
74142009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
7415
7416 * spu-low.c (spu_kill): Wait for inferior to terminate.
7417 Call clear_inferiors.
7418 (spu_detach): Call clear_inferiors.
7419
81ecdfbb
RW
74202009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7421
7422 * aclocal.m4: Regenerate.
7423 * config.in: Likewise.
7424 * configure: Likewise.
7425
0b9ff2c0
UW
74262009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7427
7428 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
7429 (parse_spufs_run): New function.
7430 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
7431 (ppc_breakpoint_at): Handle SPU breakpoints.
7432
efcbbd14
UW
74332009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7434
7435 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
7436 (SPUFS_MAGIC): Define.
7437 (spu_enumerate_spu_ids): New function.
7438 (linux_qxfer_spu): New function.
7439 (linux_target_ops): Install linux_qxfer_spu.
7440
f4d9bade
UW
74412009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7442
7443 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
7444 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
7445 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
7446 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
7447 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
7448 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
7449 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
7450 (init_registers_powerpc_cell32l): Add prototype.
7451 (init_registers_powerpc_cell64l): Likewise.
7452 (ppc_arch_setup): Detect Cell/B.E. architecture.
7453
96e946ca
RW
74542009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7455
7456 * Makefile.in (datarootdir): New variable.
7457
58d6951d
DJ
74582009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7459
7460 * linux-low.c (linux_write_memory): Update debugging output.
7461 * Makefile.in (clean): Add new descriptions.
7462 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
7463 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
7464 * configure.srv: Add new files for arm*-*-linux*.
7465 * linux-arm-low.c: Add new declarations.
7466 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
7467 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
7468 (HWCAP_VFPv3D16): New.
7469 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
7470 instead of __IWMMXT__.
7471 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
7472 (arm_arch_setup): New.
7473 (target_regsets): Remove #ifdef. Add VFP regset.
7474 (the_low_target): Use arm_arch_setup.
7475
12b42a12
DJ
74762009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7477
7478 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
7479 the main thread again.
7480
ac8c974e
AR
74812009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
7482
7483 Adding Neutrino gdbserver.
7484 * configure: Regenerated.
7485 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
7486 * configure.srv (i[34567]86-*-nto*): New target.
7487 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
7488 * remote-utils.c [__QNX__]: Include sys/iomgr.h
7489 (nto_comctrl) [__QNX__]: New function.
7490 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
7491
4424e0c3 74922009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
7493
7494 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
7495 srv_tgtobj.
7496
912cf4ba
PA
74972009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
7498 Pedro Alves <pedro@codesourcery.com>
7499
7500 * win32-i386-low.c (i386_get_thread_context): Handle systems that
7501 don't support CONTEXT_EXTENDED_REGISTERS.
7502 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
7503 (the_low_target): Install them.
7504 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
7505 failing with ERROR_PIPE_NOT_CONNECTED.
7506
aa5ca48f
DE
75072009-06-30 Doug Evans <dje@google.com>
7508 Pierre Muller <muller@ics.u-strasbg.fr>
7509
7510 Add h/w watchpoint support to x86-linux, win32-i386.
7511 * Makefile.in (SFILES): Add i386-low.c
7512 (i386_low_h): Define.
7513 (i386-low.o): Add dependencies.
7514 (linux-x86-low.o): Add i386-low.h dependency.
7515 (win32-i386-low.o): Ditto.
7516 * i386-low.c: New file.
7517 * i386-low.h: New file.
7518 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
7519 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
7520 * linux-low.c (linux_add_process): Initialize arch_private.
7521 (linux_remove_process): Free arch_private.
7522 (add_lwp): Initialize arch_private.
7523 (delete_lwp): Free arch_private.
7524 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
7525 provided.
7526 * linux-low.h (process_info_private): New member arch_private.
7527 (lwp_info): New member arch_private.
7528 (linux_target_ops): New members new_process, new_thread,
7529 prepare_to_resume.
7530 (ptid_of): New macro.
7531 * linux-x86-low.c: Include stddef.h, i386-low.h.
7532 (arch_process_info): New struct.
7533 (arch_lwp_info): New struct.
7534 (x86_linux_dr_get, x86_linux_dr_set): New functions.
7535 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7536 (i386_dr_low_get_status): New function.
7537 (x86_insert_point, x86_remove_point): New functions.
7538 (x86_stopped_by_watchpoint): New function.
7539 (x86_stopped_data_address): New function.
7540 (x86_linux_new_process, x86_linux_new_thread): New functions.
7541 (x86_linux_prepare_to_resume): New function.
7542 (the_low_target): Add entries for insert_point, remove_point,
7543 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
7544 prepare_to_resume.
7545 * server.c (debug_hw_points): New global.
7546 (monitor_show_help): Document set debug-hw-points.
7547 (handle_query): Process "set debug-hw-points".
7548 * server.h (debug_hw_points): Declare.
7549 (paddress): Declare.
7550 * utils.c (NUMCELLS, CELLSIZE): New macros.
7551 (get_sell, xsnprintf, paddress): New functions.
7552 * win32-arm-low.c (the_low_target): Add entries for insert_point,
7553 remove_point, stopped_by_watchpoint, stopped_data_address.
7554 * win32-i386-low.c: Include i386-low.h.
7555 (debug_reg_state): Replaces dr.
7556 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7557 (i386_dr_low_get_status): New function.
7558 (i386_insert_point, i386_remove_point): New functions.
7559 (i386_stopped_by_watchpoint): New function.
7560 (i386_stopped_data_address): New function.
7561 (i386_initial_stuff): Update.
7562 (get_thread_context,set_thread_context,i386_thread_added): Update.
7563 (the_low_target): Add entries for insert_point,
7564 remove_point, stopped_by_watchpoint, stopped_data_address.
7565 * win32-low.c (win32_insert_watchpoint): New function.
7566 (win32_remove_watchpoint): New function.
7567 (win32_stopped_by_watchpoint): New function.
7568 (win32_stopped_data_address): New function.
7569 (win32_target_ops): Add entries for insert_watchpoint,
7570 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
7571 * win32-low.h (win32_target_ops): New members insert_point,
7572 remove_point, stopped_by_watchpoint, stopped_data_address.
7573
d993e290
PA
75742009-06-25 Pedro Alves <pedro@codesourcery.com>
7575
7576 * server.c (process_serial_event): Re-return unsupported, not
7577 error, if the type isn't recognized. Re-allow supporting only
7578 insert or remove packets. Also call require_running for
7579 breakpoints. Add missing break statement to default case. Tidy.
7580 * target.h (struct target_ops): Rename insert_watchpoint to
7581 insert_point, and remove_watchpoint to remove_point.
7582
7583 * linux-low.h (struct linux_target_ops): Likewise.
7584 * linux-low.c (linux_insert_watchpoint): Rename to ...
7585 (linux_insert_point): ... this. Adjust.
7586 (linux_remove_watchpoint): Rename to ...
7587 (linux_remove_point): ... this. Adjust.
7588 (linux_target_ops): Adjust.
7589 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
7590 (cris_insert_point): ... this.
7591 (cris_remove_watchpoint): Rename to ...
7592 (cris_remove_point): ... this.
7593 (the_low_target): Adjust.
7594
0f54c268
PM
75952009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
7596
7597 * server.c (handle_v_kill): Pass signal_pid to
7598 kill_inferior if multi_process is zero.
7599
c6314022
AR
76002009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
7601
7602 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
7603 * target.h (target_ops): Comment for *_watchpoint to make it clear
7604 the functions can get types '0' and '1'.
7605
4463ce24
AR
76062009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
7607
7608 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
7609 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
7610 * regcache.c (get_regcache): Likewise.
7611 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
7612 * win32-low.c (child_fetch_inferior_registers): Remove check for
7613 regno 0.
7614
cf8fd78b
PA
76152009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
7616 Pedro Alves <pedro@codesourcery.com>
7617
7618 * target.h (struct target_ops) <supports_multi_process>: New
7619 callback.
7620 (target_supports_multi_process): New.
7621 * server.c (handle_query): Even if GDB reports support, only
7622 enable multi-process if the target also supports it. Report
7623 multi-process support only if the target backend supports it.
7624 * linux-low.c (linux_supports_multi_process): New function.
7625 (linux_target_ops): Install it as target_supports_multi_process
7626 callback.
7627
47c0c975
DE
76282009-05-24 Doug Evans <dje@google.com>
7629
e09875d4
DE
7630 Global renaming of find_thread_pid to find_thread_ptid.
7631 * server.h (find_thread_ptid): Renamed from find_thread_pid.
7632 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
7633 All callers updated.
7634
e27d73f6
DE
7635 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
7636 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
7637 directly.
7638
47c0c975
DE
7639 * linux-low.c (get_stop_pc): Print pc if debug_threads.
7640 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
7641 (linux_resume_one_lwp): Ditto.
7642
2acc282a
DE
76432009-05-23 Doug Evans <dje@google.com>
7644
7645 * linux-low.c (linux_resume_one_lwp): Change type of first arg
7646 from struct inferior_list_entry * to struct lwp_info *.
7647 All callers updated.
7648
9f1036c1
DE
76492009-05-13 Doug Evans <dje@google.com>
7650
7651 * linux-x86-low.c: Don't include assert.h.
7652 (x86_siginfo_fixup): Use fatal, not assert.
7653 (x86_arch_setup): Fix comment.
7654
d0722149
DE
76552009-05-12 Doug Evans <dje@google.com>
7656
7657 Biarch support for i386/amd64 gdbserver.
7658 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
7659 Add linux-x86-low.c.
7660 (linux-i386-low.o, linux-x86-64-low.o): Delete.
7661 (linux-x86-low.o): Add.
7662 * linux-x86-64-low.c: Delete.
7663 * linux-i386-low.c: Delete.
7664 * linux-x86-low.c: New file.
7665 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
7666 linux-x86-low.o.
7667 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
7668 linux-x86-low.o.
7669 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
7670 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
7671 (linux_child_pid_to_exec_file): New function.
7672 (elf_64_header_p, elf_64_file_p): New functions.
7673 (siginfo_fixup): New function.
7674 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
7675 give target a chance to convert layout.
7676 * linux-low.h (linux_target_ops): New member siginfo_fixup.
7677 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
7678
fdeb2a12
DE
76792009-05-07 Doug Evans <dje@google.com>
7680
7681 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
7682 (regsets_store_inferior_registers): Ditto.
7683
a6dbe5df
PA
76842009-05-06 Pedro Alves <pedro@codesourcery.com>
7685
7686 PR server/10048
7687
7688 * linux-low.c (must_set_ptrace_flags): Delete.
7689 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
7690 of the global.
7691 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
7692 `lwp->must_set_ptrace_flags' instead.
ba42693b 7693 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
7694 (linux_wait_1): ... not here.
7695
5091eb23
DE
76962009-04-30 Doug Evans <dje@google.com>
7697
9f767825
DE
7698 * inferiors.c (started_inferior_callback): New function.
7699 (attached_inferior_callback): New function.
7700 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
7701 * server.c (print_started_pid, print_attached_pid): New functions.
7702 (detach_or_kill_for_exit): New function.
7703 (main): Call it instead of for_each_inferior (kill_inferior_callback).
7704 * server.h (have_started_inferiors_p): Declare.
7705 (have_attached_inferiors_p): Declare.
7706
5091eb23
DE
7707 * inferiors.c (remove_process): Fix memory leak, free process.
7708 * linux-low.c (linux_remove_process): New function.
7709 (linux_kill): Call it instead of remove_process.
7710 (linux_detach, linux_wait_1): Ditto.
7711
155c8968
PA
77122009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
7713
7714 * configure.srv: Add x86 Windows CE target.
7715
7fe519cb
UW
77162009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7717
7718 * inferiors.c (get_thread_process): Make global.
7719 * server.h (get_thread_process): Add prototype.
7720 * thread-db.c (find_one_thread): Use get_thread_process
7721 instead of current_process.
7722 (thread_db_get_tls_address): Do not crash if called when
7723 thread layer is not yet initialized.
7724
5472f405
UW
77252009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7726
7727 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
7728 * spu-low.c (current_tid): Rename to ...
7729 (current_ptid): ... this.
7730 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
7731 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
7732 ptid_get_lwp (current_ptid) instead of current_tid.
7733 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
7734 instead of current_tid. Use find_process_pid to verify pid
7735 argument is valid. Pass proper argument to remove_process.
7736 (spu_thread_alive): Compare current_ptid instead of current_tid.
7737 (spu_resume): Likewise.
7738
55ac2b99
PA
77392009-04-02 Pedro Alves <pedro@codesourcery.com>
7740
7741 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
7742 variable.
7743
95954743
PA
77442009-04-01 Pedro Alves <pedro@codesourcery.com>
7745
7746 Implement the multiprocess extensions, and add linux multiprocess
7747 support.
7748
7749 * server.h (ULONGEST): Declare.
7750 (struct ptid, ptid_t): New.
7751 (minus_one_ptid, null_ptid): Declare.
7752 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7753 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
7754 (struct inferior_list_entry): Change `id' type from unsigned from
7755 to ptid_t.
7756 (struct sym_cache, struct breakpoint, struct
7757 process_info_private): Forward declare.
7758 (struct process_info): Declare.
7759 (current_process): Declare.
7760 (all_processes): Declare.
7761 (initialize_inferiors): Declare.
7762 (add_thread): Adjust to use ptid_t.
7763 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
7764 (add_process, remove_process, find_thread_pid): Declare.
7765 (find_inferior_id): Adjust to use ptid_t.
7766 (cont_thread, general_thread, step_thread): Change type to ptid_t.
7767 (multi_process): Declare.
7768 (push_event): Adjust to use ptid_t.
7769 (read_ptid, write_ptid): Declare.
7770 (prepare_resume_reply): Adjust to use ptid_t.
7771 (clear_symbol_cache): Declare.
7772 * inferiors.c (all_processes): New.
7773 (null_ptid, minus_one_ptid): New.
7774 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7775 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
7776 (add_thread): Change unsigned long to ptid. Remove gdb_id
7777 parameter. Adjust.
7778 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
7779 (gdb_id_to_thread): Rename to ...
7780 (find_thread_pid): ... this. Change unsigned long to ptid.
7781 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
7782 (loaded_dll, pull_pid_from_list): Adjust.
7783 (add_process, remove_process, find_process_pid)
7784 (get_thread_process, current_process, initialize_inferiors): New.
7785 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
7786 (struct target_waitstatus) <related_pid>: Ditto.
7787 (struct target_ops) <kill, detach>: Add `pid' argument. Change
7788 return type to int.
7789 (struct target_ops) <join>: Add `pid' argument.
7790 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
7791 (struct target_ops) <wait>: Add `ptid' field. Change return type
7792 to ptid.
7793 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
7794 (mywait): Add `ptid' argument. Change return type to ptid_t.
7795 (target_pid_to_str): Declare.
7796 * target.c (set_desired_inferior): Adjust to use ptids.
7797 (mywait): Add new `ptid' argument. Adjust.
7798 (target_pid_to_str): New.
7799 * mem-break.h (free_all_breakpoints): Declare.
7800 * mem-break.c (breakpoints): Delelete.
7801 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
7802 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
7803 to use per-process breakpoint list.
7804 (free_all_breakpoints): New.
7805 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
7806 (symbol_cache, all_symbols_looked_up): Delete.
7807 (hexchars): New.
7808 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
7809 read_ptid): New.
7810 (prepare_resume_reply): Change ptid argument's type from unsigned
7811 long to ptid_t. Adjust. Implement W;process and X;process.
7812 (free_sym_cache, clear_symbol_cache): New.
7813 (look_up_one_symbol): Adjust to per-process symbol cache. *
7814 * server.c (cont_thread, general_thread, step_thread): Change type
7815 to ptid_t.
7816 (attached): Delete.
7817 (multi_process): New.
7818 (last_ptid): Change type to ptid_t.
7819 (struct vstop_notif) <ptid>: Change type to ptid_t.
7820 (queue_stop_reply, push_event): Change `ptid' argument's type to
7821 ptid_t.
7822 (discard_queued_stop_replies): Add `pid' argument.
7823 (start_inferior): Adjust to use ptids. Adjust to mywait interface
7824 changes. Don't reference the `attached' global.
7825 (attach_inferior): Adjust to mywait interface changes.
7826 (handle_query): Adjust to use ptids. Parse GDB's qSupported
7827 features. Handle and report "multiprocess+". Handle
7828 "qAttached:PID".
7829 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
7830 changes.
7831 (handle_v_kill): New.
7832 (handle_v_stopped): Adjust to use target_pid_to_str.
7833 (handle_v_requests): Allow multiple attaches and runs when
7834 multiprocess extensions are in effect. Handle "vKill".
7835 (myresume): Adjust to use ptids.
7836 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
7837 (handle_status): Adjust to discard_queued_stop_replies interface
7838 change.
7839 (first_thread_of, kill_inferior_callback)
7840 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
7841 (main): Call initialize_inferiors. Adjust to use ptids, killing
7842 and detaching from all inferiors. Handle multiprocess packet
7843 variants.
7844 * linux-low.h: Include gdb_proc_service.h.
7845 (struct process_info_private): New.
7846 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
7847 <lwpid_of>: Use ptid_get_lwp.
7848 (get_lwp_thread): Adjust.
7849 (struct lwp_info): Add `dead' member.
7850 (find_lwp_pid): Declare.
7851 * linux-low.c (thread_db_active): Delete.
7852 (new_inferior): Adjust comment.
7853 (inferior_pid): Delete.
7854 (linux_add_process): New.
7855 (handle_extended_wait): Adjust.
7856 (add_lwp): Change unsigned long to ptid.
7857 (linux_create_inferior): Add process to processes table. Adjust
7858 to use ptids. Don't set new_inferior here.
7859 (linux_attach_lwp): Rename to ...
7860 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
7861 it. Adjust to use ptids.
7862 (linux_attach_lwp): New.
7863 (linux_attach): Add process to processes table. Don't set
7864 new_inferior here.
7865 (struct counter): New.
7866 (second_thread_of_pid_p, last_thread_of_process_p): New.
7867 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
7868 multiple processes.
7869 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
7870 processes. Remove process from process table.
7871 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
7872 to multiple processes.
7873 (any_thread_of): New.
7874 (linux_detach): Add `pid' argument, and handle it. Remove process
7875 from processes table.
7876 (linux_join): Add `pid' argument. Handle it.
7877 (linux_thread_alive): Change unsighed long argument to ptid_t.
7878 Consider dead lwps as not being alive.
7879 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
7880 threads we're not interested in.
7881 (same_lwp, find_lwp_pid): New.
7882 (linux_wait_for_lwp): Change `pid' argument's type from int to
7883 ptid_t. Adjust.
7884 (linux_wait_for_event): Rename to ...
7885 (linux_wait_for_event_1): ... this. Change `pid' argument's type
7886 from int to ptid_t. Adjust.
7887 (linux_wait_for_event): New.
7888 (linux_wait_1): Add `ptid' argument. Change return type to
7889 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
7890 that exit from the process table.
7891 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
7892 Adjust.
7893 (mark_lwp_dead): New.
7894 (wait_for_sigstop): Adjust to use ptids. If a process exits while
7895 stopping all threads, mark its main lwp as dead.
7896 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
7897 ptids.
7898 (fetch_register, usr_store_inferior_registers)
7899 (regsets_fetch_inferior_registers)
7900 (regsets_store_inferior_registers, linux_read_memory)
7901 (linux_write_memory): Inline `inferior_pid'.
7902 (linux_look_up_symbols): Adjust to use per-process
7903 `thread_db_active'.
7904 (linux_request_interrupt): Adjust to use ptids.
7905 (linux_read_auxv): Inline `inferior_pid'.
7906 (initialize_low): Don't reference thread_db_active.
7907 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
7908 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
7909 (ps_getpid): Return the pid of the current inferior.
7910 * thread-db.c (proc_handle, thread_agent): Delete.
7911 (thread_db_create_event, thread_db_enable_reporting): Adjust to
7912 per-process data.
7913 (find_one_thread): Change argument type to ptid_t. Adjust to
7914 per-process data.
7915 (maybe_attach_thread): Adjust to per-process data and ptids.
7916 (thread_db_find_new_threads): Ditto.
7917 (thread_db_init): Ditto.
7918 * spu-low.c (spu_create_inferior, spu_attach): Add process to
7919 processes table. Adjust to use ptids.
7920 (spu_kill, spu_detach): Adjust interface. Remove process from
7921 processes table.
7922 (spu_join, spu_thread_alive): Adjust interface.
7923 (spu_wait): Adjust interface. Remove process from processes
7924 table. Adjust to use ptids.
7925 * win32-low.c (current_inferior_tid): Delete.
7926 (current_inferior_ptid): New.
7927 (debug_event_ptid): New.
7928 (thread_rec): Take a ptid. Adjust.
7929 (child_add_thread): Add `pid' argument. Adjust to use ptids.
7930 (child_delete_thread): Ditto.
7931 (do_initial_child_stuff): Add `attached' argument. Add process to
7932 processes table.
7933 (child_fetch_inferior_registers, child_store_inferior_registers):
7934 Adjust.
7935 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
7936 (win32_attach): Pass 1 to do_initial_child_stuff.
7937 (win32_kill): Adjust interface. Remove process from processes
7938 table.
7939 (win32_detach): Ditto.
7940 (win32_join): Adjust interface.
7941 (win32_thread_alive): Take a ptid.
7942 (win32_resume): Adjust to use ptids.
7943 (get_child_debug_event): Ditto.
7944 (win32_wait): Adjust interface. Remove exiting process from
7945 processes table.
7946
bd99dc85
PA
79472009-04-01 Pedro Alves <pedro@codesourcery.com>
7948
7949 Non-stop mode support.
7950
7951 * server.h (non_stop): Declare.
7952 (gdb_client_data, handler_func): Declare.
7953 (delete_file_handler, add_file_handler, start_event_loop):
7954 Declare.
7955 (handle_serial_event, handle_target_event, push_event)
7956 (putpkt_notif): Declare.
7957 * target.h (enum resume_kind): New.
7958 (struct thread_resume): Replace `step' field by `kind' field.
7959 (TARGET_WNOHANG): Define.
7960 (struct target_ops) <wait>: Add `options' argument.
7961 <supports_non_stop, async, start_non_stop>: New fields.
7962 (target_supports_non_stop, target_async): New.
7963 (start_non_stop): Declare.
7964 (mywait): Add `options' argument.
7965 * target.c (mywait): Add `options' argument. Print child exit
7966 notifications here.
7967 (start_non_stop): New.
7968 * server.c (non_stop, own_buf, mem_buf): New globals.
7969 (struct vstop_notif): New.
7970 (notif_queue): New global.
7971 (queue_stop_reply, push_event, discard_queued_stop_replies)
7972 (send_next_stop_reply): New.
7973 (start_inferior): Adjust to use resume_kind. Adjust to mywait
7974 interface changes.
7975 (attach_inferior): In non-stop mode, don't wait for the target
7976 here.
7977 (handle_general_set): Handle QNonStop.
7978 (handle_query): When handling qC, return the current general
7979 thread, instead of the first thread of the list.
7980 (handle_query): If the backend supports non-stop mode, include
7981 QNonStop+ in the qSupported query response.
7982 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
7983 and non-stop mode.
7984 (handle_v_attach, handle_v_run): Handle non-stop mode.
7985 (handle_v_stopped): New.
7986 (handle_v_requests): Report support for vCont;t. Handle vStopped.
7987 (myresume): Adjust to use resume_kind. Handle non-stop.
7988 (queue_stop_reply_callback): New.
7989 (handle_status): Handle non-stop mode.
7990 (main): Clear non_stop flag on reconnection. Use the event-loop.
7991 Refactor serial protocol handling from here ...
7992 (process_serial_event): ... to this new function. When GDB
7993 selects any thread, select one here. In non-stop mode, wait until
7994 GDB acks all pending events before exiting.
7995 (handle_serial_event, handle_target_event): New.
7996 * remote-utils.c (remote_open): Install remote_desc in the event
7997 loop.
7998 (remote_close): Remove remote_desc from the event loop.
7999 (putpkt_binary): Rename to...
8000 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8001 (putpkt_binary): New as wrapper around putpkt_binary_1.
8002 (putpkt_notif): New.
8003 (prepare_resume_reply): In non-stop mode, don't change the
8004 general_thread.
8005 * event-loop.c: New.
8006 * Makefile.in (OBJ): Add event-loop.o.
8007 (event-loop.o): New rule.
8008
8009 * linux-low.h (pid_of): Moved here.
8010 (lwpid_of): New.
8011 (get_lwp_thread): Use lwpid_of.
8012 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
8013 * linux-low.c (pid_of): Delete.
8014 (inferior_pid): Use lwpid_of.
8015 (linux_event_pipe): New.
8016 (target_is_async_p): New.
8017 (delete_lwp): New.
8018 (handle_extended_wait): Use lwpid_of.
8019 (add_lwp): Don't set lwpid field.
8020 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
8021 (linux_kill_one_lwp): If killing a running lwp, stop it first.
8022 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
8023 (linux_detach_one_lwp): If detaching from a running lwp, stop it
8024 first. Adjust to linux_wait_for_event interface changes. Use
8025 lwpid_of.
8026 (linux_detach): Don't delete the main lwp here.
8027 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
8028 (status_pending_p): Don't consider explicitly suspended lwps.
8029 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8030 pointer. Add OPTIONS argument. Change return type to int. Use
8031 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
8032 (linux_wait_for_event): Take an integer pid instead of a lwp_info
8033 pointer. Add status pointer argument. Return a pid instead of a
8034 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
8035 changes. In non-stop mode, don't switch to a random thread.
8036 (linux_wait): Rename to...
8037 (linux_wait_1): ... this. Add target_options argument, and handle
8038 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
8039 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
8040 clean exit and signal exit code. Don't stop all threads in
8041 non-stop mode. In all-stop mode, only stop all threads when
8042 reporting a stop to GDB. Handle explicit thread stop requests.
8043 (async_file_flush, async_file_mark): New.
8044 (linux_wait): New.
8045 (send_sigstop): Use lwpid_of.
8046 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
8047 interface changes. In non-stop mode, don't switch to a random
8048 thread.
8049 (linux_resume_one_lwp): Use lwpid_of.
8050 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8051 (linux_resume_one_thread): ... this. Handle resume_stop. In
8052 non-stop mode, don't look for pending flag in all threads.
8053 (resume_status_pending_p): Don't consider explicitly suspended
8054 threads.
8055 (my_waitpid): Reimplement. Emulate __WALL.
8056 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8057 Use lwpid_of.
8058 (sigchld_handler, linux_supports_non_stop, linux_async)
8059 (linux_start_non_stop): New.
8060 (linux_target_ops): Register linux_supports_non_stop, linux_async
8061 and linux_start_non_stop.
8062 (initialize_low): Install SIGCHLD handler.
8063 * thread-db.c (thread_db_create_event, find_one_thread)
8064 (thread_db_get_tls_address): Use lwpid_of.
8065 * win32-low.c (win32_detach): Adjust to use resume_kind.
8066 (win32_wait): Add `options' argument.
8067 * spu-low.c (spu_resume): Adjust to use resume_kind.
8068 (spu_wait): Add `options' argument.
8069
5b1c542e
PA
80702009-04-01 Pedro Alves <pedro@codesourcery.com>
8071
8072 Decouple target code from remote protocol.
8073
8074 * target.h (enum target_waitkind): New.
8075 (struct target_waitstatus): New.
8076 (struct target_ops) <wait>: Return an unsigned long. Take a
8077 target_waitstatus pointer instead of a char pointer.
8078 (mywait): Likewise.
8079 * target.c (mywait): Change prototype to return an unsigned long.
8080 Take a target_waitstatus pointer instead of a char pointer. Adjust.
8081 * server.h (thread_from_wait, old_thread_from_wait): Delete
8082 declarations.
8083 (prepare_resume_reply): Change prototype to take a
8084 target_waitstatus.
8085 * server.c (thread_from_wait, old_thread_from_wait): Delete.
8086 (last_status, last_ptid): New.
8087 (start_inferior): Remove "statusptr" argument. Adjust. Return a
8088 pid instead of a signal.
8089 (attach_inferior): Remove "status" and "signal" parameters.
8090 Adjust.
8091 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
8092 not as an address.
8093 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
8094 (handle_v_requests, myresume): Remove "status" and "signal"
8095 parameters. Adjust.
8096 (handle_status): New.
8097 (main): Delete local `status'. Adjust.
8098 * remote-utils.c: Include target.h.
8099 (prepare_resume_reply): Change prototype to take a
8100 target_waitstatus. Adjust.
8101
8102 * linux-low.c (linux_wait): Adjust to new target_ops->wait
8103 interface.
8104 * spu-low.c (spu_wait): Adjust.
8105 * win32-low.c (enum target_waitkind, struct target_waitstatus):
8106 Delete.
8107 (win32_wait): Adjust.
8108
2bd7c093
PA
81092009-04-01 Pedro Alves <pedro@codesourcery.com>
8110
8111 * target.h (struct thread_resume): Delete leave_stopped member.
8112 (struct target_ops): Add a `n' argument to the `resume' callback.
8113 * server.c (start_inferior): Adjust.
8114 (handle_v_cont, myresume): Adjust.
8115 * linux-low.c (check_removed_breakpoint): Adjust to resume
8116 interface change, and to removed leave_stopped field.
8117 (resume_ptr): Delete.
8118 (struct thread_resume_array): New.
8119 (linux_set_resume_request): Add new `arg' parameter. Adjust to
8120 resume interface change.
8121 (linux_continue_one_thread, linux_queue_one_thread)
8122 (resume_status_pending_p): Check if the resume field is NULL
8123 instead of checking the leave_stopped member.
8124 (linux_resume): Adjust to the target resume interface change.
8125 * spu-low.c (spu_resume): Adjust to the target resume interface
8126 change.
8127 * win32-low.c (win32_detach, win32_resume): Ditto.
8128
c35fafde
PA
81292009-04-01 Pedro Alves <pedro@codesourcery.com>
8130
8131 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
8132 flag.
8133 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
8134 pending.
8135 (linux_continue_one_thread): Only preserve the stepping flag if
8136 there's a pending breakpoint.
8137
0a59d50b
PA
81382009-03-31 Pedro Alves <pedro@codesourcery.com>
8139
8140 * server.c (main): After the inferior having exited, call
8141 remote_close before exiting gdbserver.
8142
f04c6d38
TJB
81432009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
8144
8145 Fix size of FPSCR in Power 7 processors.
8146 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
8147 (PPC_FEATURE_HAS_DFP): New #define.
8148 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
8149 size of the FPSCR.
8150
78e5cee6
PA
81512009-03-23 Pedro Alves <pedro@codesourcery.com>
8152
8153 * server.c (handle_query) Whitespace and formatting.
8154
1b3f6016
PA
81552009-03-22 Pedro Alves <pedro@codesourcery.com>
8156
8157 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
8158 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
8159 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
8160 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
8161 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
8162 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
8163 Makefile.in, configure.ac: Fix whitespace throughout.
8164 * configure: Regenerate.
8165
a07b2135
PA
81662009-03-22 Pedro Alves <pedro@codesourcery.com>
8167
8168 * inferiors.c (find_inferior): Make it safe for the callback
8169 function to delete the currently iterated inferior.
8170
67cc2626
PA
81712009-03-22 Pedro Alves <pedro@codesourcery.com>
8172
8173 * Makefile.in (linuw_low_h): Move higher.
8174 (thread-db.o): Depend on $(linux_low_h).
8175
54a0b537
PA
81762009-03-17 Pedro Alves <pedro@codesourcery.com>
8177
8178 Rename "process" to "lwp" throughout.
8179
8180 * linux-low.c (all_processes): Rename to...
8181 (all_lwps): ... this.
8182 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
8183 (add_process): Rename to ...
8184 (add_lwp): ... this. Adjust.
8185 (linux_create_inferior): Adjust.
8186 (linux_attach_lwp): Adjust.
8187 (linux_attach): Adjust.
8188 (linux_kill_one_process): Rename to ...
8189 (linux_kill_one_lwp): ... this. Adjust.
8190 (linux_kill): Adjust.
8191 (linux_detach_one_process): Rename to ...
8192 (linux_detach_one_lwp): ... this. Adjust.
8193 (linux_detach): Adjust.
8194 (check_removed_breakpoint): Adjust.
8195 (status_pending_p): Adjust.
8196 (linux_wait_for_process): Rename to ...
8197 (linux_wait_for_lwp): ... this. Adjust.
8198 (linux_wait_for_event): Adjust.
8199 (send_sigstop): Adjust.
8200 (wait_for_sigstop): Adjust.
8201 (stop_all_processes): Rename to ...
8202 (stop_all_lwps): ... this.
8203 (linux_resume_one_process): Rename to ...
8204 (linux_resume_one_lwp): ... this. Adjust.
8205 (linux_set_resume_request, linux_continue_one_thread)
8206 (linux_queue_one_thread, resume_status_pending_p)
8207 (usr_store_inferior_registers, regsets_store_inferior_registers)
8208 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8209 Adjust.
8210 * linux-low.h (get_process): Rename to ...
8211 (get_lwp): ... this. Adjust.
8212 (get_thread_process): Rename to ...
8213 (get_thread_lwp): ... this. Adjust.
8214 (get_process_thread): Rename to ...
8215 (get_lwp_thread): ... this. Adjust.
8216 (struct process_info): Rename to ...
8217 (struct lwp_info): ... this.
8218 (all_processes): Rename to ...
8219 (all_lwps): ... this.
8220 * proc-service.c (ps_lgetregs): Adjust.
8221 * thread-db.c (thread_db_create_event, find_one_thread)
8222 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
8223
0b16c5cf
PA
82242009-03-14 Pedro Alves <pedro@codesourcery.com>
8225
8226 * server.c (handle_query): Handle "qAttached".
8227
32de4b9d
NS
82282009-03-13 Nathan Sidwell <nathan@codesourcery.com>
8229
8230 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8231 GPLv3, update license URL.
8232
2aecd87f
DE
82332009-03-01 Doug Evans <dje@google.com>
8234
93efd302 8235 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
8236 (server_h): Add gdb_signals.h.
8237 (signals.o): Update.
8238 * server.h (target_signal_from_host,target_signal_to_host_p)
8239 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8240
86b1f9c5
PM
82412009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8242
8243 * remote-utils.c (getpkt): Also generate remote-debug
8244 information if noack_mode is set.
8245
4aa995e1
PA
82462009-02-06 Pedro Alves <pedro@codesourcery.com>
8247
8248 * server.c (handle_query): Report qXfer:siginfo:read and
8249 qXfer:siginfo:write as supported and handle them.
8250 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8251 * linux-low.c (linux_xfer_siginfo): New.
8252 (linux_target_ops): Set it.
8253
62709adf
PA
82542009-01-26 Pedro Alves <pedro@codesourcery.com>
8255
8256 * server.c (gdbserver_usage): Mention --remote-debug.
8257 (main): Accept '--remote-debug' switch.
8258
aef93bd7
DE
82592009-01-18 Doug Evans <dje@google.com>
8260
8261 * regcache.c (new_register_cache): No need to check result of xcalloc.
8262 * server.c (handle_search_memory): Back out calls to xmalloc,
8263 result is checked and error is returned to user upon failure.
8264 (handle_query): Ditto. Add more checks for result of malloc.
8265 (handle_v_cont): Check result of malloc, report error back to
8266 user upon failure.
8267 (handle_v_run): Ditto. Call freeargv.
8268 * server.h (freeargv): Declare.
8269 * utils.c (freeargv): New fn.
8270
54363045
DE
82712009-01-15 Doug Evans <dje@google.com>
8272
f626972c
DE
8273 * gdbreplay.c (perror_with_name): Make arg const char *.
8274 * server.h (target_signal_to_name): Make return type const char *.
0842e787 8275 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 8276 * utils.c (perror_with_name): Make arg const char *.
54363045 8277
18aae699
PA
82782009-01-14 Pedro Alves <pedro@codesourcery.com>
8279
8280 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8281 when handling a EXIT_PROCESS_DEBUG_EVENT.
8282
ff703abe
JB
82832009-01-06 Joel Brobecker <brobecker@adacore.com>
8284
8285 * gdbreplay.c (gdbreplay_version): Update copyright year.
8286 * server.c (gdbserver_version): Likewise.
8287
f21cc1a2 82882009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
8289
8290 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 8291 (handle_extended_wait): Improve comment.
0e21c1ec 8292
bca929d3
DE
82932008-12-13 Doug Evans <dje@google.com>
8294
8295 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8296 * server.h (ATTR_MALLOC): New macro.
8297 (xmalloc,xcalloc,xstrdup): Declare.
8298 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
8299 * inferiors.c: Ditto.
8300 * linux-low.c: Ditto.
8301 * mem-break.c: Ditto.
8302 * regcache.c: Ditto.
8303 * remote-utils.c: Ditto.
8304 * server.c: Ditto.
8305 * target.c: Ditto.
8306 * win32-low.c: Ditto.
8307
97438e3f
DE
83082008-12-12 Doug Evans <dje@google.com>
8309
896c7fbb
DE
8310 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
8311 in debugging printf.
8312
97438e3f
DE
8313 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
8314
e3b886f8
DE
83152008-12-09 Doug Evans <dje@google.com>
8316
8317 * linux-low.h (struct process_info): Delete member tid, unused.
8318 * thread-db.c (find_one_thread): Update.
8319 (maybe_attach_thread): Update.
8320
07e059b5
VP
83212008-12-02 Pedro Alves <pedro@codesourcery.com>
8322
889bf7c5
PA
8323 * target.h (struct target_ops): Add qxfer_osdata member.
8324 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
8325 and dirent.h.
8326 (linux_qxfer_osdata): New functions.
8327 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
8328 callback.
8329 * server.c (handle_query): Handle "qXfer:osdata:read:".
8330 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
8331 (buffer_xml_printf): New functions.
8332 * server.h (struct buffer): New.
8333 (buffer_grow_str, buffer_grow_str0): New macros.
8334 (buffer_grow, buffer_free, buffer_init, buffer_finish)
8335 (buffer_xml_printf): Declare.
07e059b5 8336
4cab47ab
DE
83372008-11-24 Doug Evans <dje@google.com>
8338
8339 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
8340
f142445f
DJ
83412008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
8342
8343 * server.c (handle_v_run): Always use the supplied argument list.
8344
d0107bb6 83452008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 8346
d0107bb6
BW
8347 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
8348 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 8349
2c4ad781
TJB
83502008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
8351
8352 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
8353 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
8354 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
8355 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
8356 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
8357 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
8358 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
8359 XML target descriptions.
8360 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
8361 when inferior is running on an ISA 2.05 or later processor. Add
8362 special case to return offset for full 64-bit slot of FPSCR when
8363 in 32-bits.
8364
dfb64f85
DJ
83652008-11-14 Daniel Gutson <dgutson@codesourcery.com>
8366
8367 * Makefile.in (SFILES, clean): Added sparc64 files.
8368 (reg-sparc64.o, reg-sparc64.c): New.
8369 * configure.srv (sparc*-*-linux*): New configuration.
8370 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
8371 syscall arguments for SPARC.
8372 (regsets_store_inferior_registers): Likewise.
8373 * linux-sparc-low.c: New file.
8374
66b6e1dd
DE
83752008-10-21 Doug Evans <dje@google.com>
8376
8377 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
8378 (READLINE_DIR,READLINE_DEP): Delete.
8379 (INTERNAL_CFLAGS): Update.
8380 (LINTFLAGS): Update.
8381
9b710a42
PA
83822008-10-10 Pedro Alves <pedro@codesourcery.com>
8383
8384 * server.c (handle_v_run): If GDB didn't specify an argv, use the
8385 whole argv from the last run, not just argv[0].
8386
5822d809
PA
83872008-09-08 Pedro Alves <pedro@codesourcery.com>
8388
8389 * regcache.c (new_register_cache): Return NULL if the register
8390 cache size isn't known yet.
8391 (free_register_cache): Avoid dereferencing a NULL regcache.
8392
74aac56f
DJ
83932008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8394
8395 * configure.srv: Merge MIPS and MIPS64.
8396
400b20f5
MR
83972008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
8398
8399 * Makefile.in (uninstall): Apply $(EXEEXT) too.
8400
677c5bb1
LM
84012008-08-18 Luis Machado <luisgpm@br.ibm.com>
8402
8403 * Makefile.in: Add required vsx dependencies.
8404
8405 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
8406 Declare init_registers_powerpc_vsx32l.
8407 Declare init_registers_powerpc_vsx64l.
8408 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
8409 (ppc_arch_setup): Check for VSX in hwcap.
8410 (ppc_fill_vsxregset): New function.
8411 (ppc_store_vsxregset): New function.
8412 Add new VSX entry in regset_info target_regsets.
8413
8414 * configure.srv: Add new VSX dependencies.
8415
a6f3e723
SL
84162008-08-12 Pedro Alves <pedro@codesourcery.com>
8417
8418 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
8419 (remote_open): Set or clear transport_is_reliable.
8420 (putpkt_binary): Don't expect acks in noack mode.
8421 (getpkt): Don't send ack/nac in noack mode.
8422 * server.c (handle_general_set): Handle QStartNoAckMode.
8423 (handle_query): If connected by tcp pass QStartNoAckMode+ in
8424 qSupported.
8425 (main): Reset noack_mode on every connection.
8426 * server.h (noack_mode): Declare.
8427
a417dc56
RW
84282008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8429
8430 * Makefile.in (GDBREPLAY_OBS): New variable.
8431 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
8432
3221518c
UW
84332008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
8434 Daniel Jacobowitz <dan@codesourcery.com>
8435
8436 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
8437 (usr_store_inferior_registers): Likewise.
8438 (regsets_store_inferior_registers): Likewise.
8439
ec56be1b
PA
84402008-07-31 Rolf Jansen <rj@surtec.com>
8441 Pedro Alves <pedro@codesourcery.com>
8442
8443 * configure.ac: Check for memmem declaration.
8444 * server.c [HAVE_MALLOC_H]: Include malloc.h.
8445 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
8446 (disable_packet_qfThreadInfo): Unconditionally compile.
8447 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
8448 * configure, config.in: Regenerate.
8449
2fe5e3ff
DE
84502008-07-28 Doug Kwan <dougkwan@google.com>
8451
8452 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
8453 (linux_write_memory): Remove declaration of errno.
8454
836acd6d
UW
84552008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
8456
8457 * linux-low.c (handle_extended_wait): Do not use "status"
8458 variable uninitialized.
8459
aeba519e
PA
84602008-07-07 Pedro Alves <pedro@codesourcery.com>
8461
8462 * server.c (handle_v_attach): Inhibit reporting dll changes.
8463
db42f210
PA
84642008-06-27 Pedro Alves <pedro@codesourcery.com>
8465
8466 * remote-utils.c (prepare_resume_reply): If requested, don't
8467 output "thread:TID" in the T stop reply.
8468
8469 * server.c (disable_packet_vCont, disable_packet_Tthread)
8470 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
8471 (handle_query): If requested, disable support for qC, qfThreadInfo
8472 and qsThreadInfo.
8473 (handle_v_requests): If requested, disable support for vCont.
8474 (gdbserver_show_disableable): New.
8475 (main): Handle --disable-packet and --disable-packet=LIST.
8476
8477 * server.h (disable_packet_vCont, disable_packet_Tthread)
8478 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
8479
8e4c5421
CD
84802008-06-20 Carlos O'Donell <carlos@codesourcery.com>
8481
8482 * server.c (gdbserver_usage): Mention --version.
8483
6e23a804
DJ
84842008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
8485
8486 * Makefile.in (gdbreplay.o): New rule.
8487
90aa6a40
JM
84882008-06-06 Joseph Myers <joseph@codesourcery.com>
8489
8490 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
8491 message, not gdbserver.
8492
c16158bc 84932008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
8494 Nathan Sidwell <nathan@codesourcery.com>
8495 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
8496
8497 * acinclude.m4: Include ../../config/acx.m4.
8498 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
8499 * configure, config.in: Regenerate.
8500 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
8501 * server.c (gdbserver_version): Print PKGVERSION.
8502 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
8503 (main): Adjust gdbserver_usage calls.
8504 * gdbreplay.c (version, host_name): Add declarations.
8505 (gdbreplay_version, gdbreplay_usage): New.
8506 (main): Accept --version and --help options.
8507
aeb75bf5
DJ
85082008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
8509
8510 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
8511 (arm_breakpoint_at): Handle Thumb.
8512 (the_low_target): Add comment.
8513
76b233dd
UW
85142008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
8515
8516 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
8517
08388c79
DE
85182008-05-09 Doug Evans <dje@google.com>
8519
a3c83fae
DE
8520 * server.h (decode_search_memory_packet): Declare.
8521 * remote-utils.c (decode_search_memory_packet): New fn.
8522 * server.c (handle_search_memory_1): New fn.
08388c79
DE
8523 (handle_search_memory): New fn.
8524 (handle_query): Process qSearch:memory packets.
8525
bb9c3d36
UW
85262008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
8527
8528 * regcache.c (registers_length): Remove.
8529 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
8530 full register packet.
8531 * regcache.h (registers_length): Remove prototype.
8532 * server.h (PBUFSIZ): Define to 16384.
8533
7284e1be
UW
85342008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
8535
8536 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
8537 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
8538 powerpc-64l.o, and powerpc-altivec64l.o.
8539 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
8540 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
8541 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
8542 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
8543 rs6000/power-linux.xml, and rs6000/power64-linux.xml
8544 to srv_xmlfiles.
8545
8546 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
8547 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
8548 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
8549 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
8550 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
8551 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
8552 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
8553 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
8554 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
8555 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
8556 (clean): Update.
8557
8558 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
8559 (init_registers_powerpc_32l): ... this new prototype.
8560 (init_registers_powerpc_32): Remove, replace by ...
8561 (init_registers_powerpc_altivec32l): ... this new prototype.
8562 (init_registers_powerpc_e500): Remove, replace by ...
8563 (init_registers_powerpc_e500l): ... this new prototype.
8564 (init_registers_ppc64): Remove, replace by ...
8565 (init_registers_powerpc_64l): ... this new prototype.
8566 (init_registers_powerpc_64): Remove, replace by ...
8567 (init_registers_powerpc_altivec64l): ... this new prototype.
8568 (ppc_num_regs): Set to 73.
8569 (PT_ORIG_R3, PT_TRAP): Define if necessary.
8570 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
8571 (ppc_cannot_store_register): Handle orig_r3 and trap.
8572 (ppc_arch_setup): Update init_registers_... calls.
8573 (ppc_fill_gregset): Handle orig_r3 and trap.
8574
8575 * inferiors.c (clear_inferiors): Reset current_inferior.
8576
fdc59709
PB
85772008-04-23 Paolo Bonzini <bonzini@gnu.org>
8578
889bf7c5
PA
8579 * acinclude.m4: Add override.m4.
8580 * configure: Regenerate.
fdc59709 8581
c9b2f845
UW
85822008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8583
8584 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
8585 initial call to init_register_ppc64.
8586
550512b8
UW
85872008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8588
43aaf8b6
PA
8589 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
8590 single powerpc*-*-linux* case.
550512b8
UW
8591 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
8592
b6430ec3
UW
85932008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
8594
8595 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 8596 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
8597 from reg_xmlfiles.
8598 * linux-ppc-low.c: Include <elf.h>.
8599 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
8600 (ppc_hwcap): New global variable.
8601 (ppc_regmap): Remove __SPE__ #ifdef sections.
8602 (ppc_regmap_e500): New global variable.
8603 (ppc_cannot_store_register): Update __SPE__ special case.
8604 (ppc_get_hwcap): New function.
8605 (ppc_arch_setup): Use it to determine whether inferior supports
8606 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
8607 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
8608 Do not access registers if target does not support AltiVec.
8609 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
8610 Do not access registers if target does not support SPE.
8611 (target_regsets): Unconditionally include AltiVec and SPE regsets.
8612
52fa2412
UW
86132008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
8614
8615 * linux-low.c (disabled_regsets, num_regsets): New.
8616 (use_regsets_p): Delete.
8617 (linux_wait_for_process): Clear disabled_regsets.
8618 (regsets_fetch_inferior_registers): Check and set it.
8619 (regsets_store_inferior_registers): Likewise.
8620 (linux_fetch_registers, linux_store_registers): Do not use
8621 use_regsets_p.
8622 (initialize_low): Allocate disabled_regsets.
8623
e28b3332
DJ
86242008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
8625
8626 * Makefile.in (LIBOBJS): New.
8627 (OBS): Use LIBOBJS.
8628 (memmem.o): New rule.
8629 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
8630 * configure: Regenerated.
8631
4536995d
UW
86322008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
8633
8634 * server.c (handle_query): Never return "unsupported" for
8635 qXfer:features:read queries.
8636
221c031f
UW
86372008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
8638
8639 * server.c (get_features_xml): Fix inverted condition.
8640 (handle_query): Always support qXfer:feature:read.
8641
ccd213ac
DJ
86422008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
8643
8644 * server.c (wrapper_argv): New.
8645 (start_inferior): Handle wrapper_argv. If set, expect an extra
8646 trap.
8647 (gdbserver_usage): Document --wrapper.
8648 (main): Parse --wrapper.
8649
6fe305f7
UW
86502008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8651
8652 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
8653 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
8654 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
8655 (ppc_set_pc): Likewise.
8656 (ppc_arch_setup): New function.
8657 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
8658 of collect_register.
889bf7c5 8659 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 8660
5b0a002e
UW
86612008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8662
8663 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
8664 instead of linux-ppc64-low.o.
8665 * linux-ppc64-low.c: Remove file.
8666 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
8667 (linux-ppc64-low.o): Remove rule.
8668
8669 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
8670 (init_registers_powerpc_64): Likewise.
8671 (ppc_regmap): Conditionally define depending on __powerpc64__.
8672 (ppc_cannot_store_register): Do not special-case "fpscr" when
8673 compiled on __powerpc64__.
8674 (ppc_collect_ptrace_register): New function.
8675 (ppc_supply_ptrace_register): New function.
8676 (ppc_breakpoint): Change type to "unsigned int".
8677 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
8678 (the_low_target): Conditionally provide initializers for the
889bf7c5 8679 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
8680 collect_ptrace_register and supply_ptrace_register members.
8681
9b4b61c8
UW
86822008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8683
8684 * regcache.h (gdbserver_xmltarget): Add extern declaration.
8685 * server.c (gdbserver_xmltarget): Define.
8686 (get_features_xml): Use it to replace "target.xml" and arch_string.
8687
8688 * configure.srv: Remove srv_xmltarget. Add XML files that were
8689 mentioned there to srv_xmlfiles instead. Remove conditional tests
8690 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
8691 srv_xmlfiles and srv_regobj to include all possible choices.
8692 * configure.ac (srv_xmltarget): Remove.
8693 (srv_xmlfiles): Do not add "target.xml".
8694 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
8695 checks for supplementary target information.
8696 * configure: Regenerate.
8697 * Makefile.in (XML_TARGET): Remove.
8698 (target.xml): Remove rule.
8699 (clean): Do not clean up target.xml.
8700 (.PRECIOUS): Do not mention target.xml.
8701
8702 * target.h (struct target_ops): Remove arch_string member.
8703 * linux-low.c (linux_arch_string): Remove.
8704 (linux_target_ops): Remove arch_string initializer.
8705 * linux-low.h (struct linux_target_ops): Remove arch_string member.
8706 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
8707 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
8708 * spu-low.c (spu_arch_string): Remove.
8709 (spu_target_ops): Remove arch_string initializer.
8710 * win32-low.c (win32_arch_string): Remove.
8711 (win32_target_ops): Remove arch_string initializer.
8712 * win32-low.h (struct win32_target_ops): Remove arch_string member.
8713 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
8714 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
8715
ee1a7ae4
UW
87162008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8717
8718 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
8719 by collect_ptrace_register and supply_ptrace_register hooks.
8720 * linux-low.c (fetch_register): Use supply_ptrace_register callback
8721 instead of checking for the_low_target.left_pad_xfer.
8722 (usr_store_inferior_registers): Use collect_ptrace_register callback
8723 instead of checking for the_low_target.left_pad_xfer.
8724
8725 * linux-s390-low.c (s390_collect_ptrace_register): New function.
8726 (s390_supply_ptrace_register): Likewise.
8727 (s390_fill_gregset): Call s390_collect_ptrace_register.
8728 (the_low_target): Update.
8729
8730 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
8731 (ppc_supply_ptrace_register): Likewise.
8732 (the_low_target): Update.
8733
8734 * linux-i386-low.c (the_low_target): Update.
8735 * linux-x86-64-low.c (the_low_target): Update.
8736
d61ddec4
UW
87372008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8738
8739 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
8740 reg-s390.o and reg-s390x.o.
8741
8742 * linux-low.c (new_inferior): New global variable.
8743 (linux_create_inferior, linux_attach): Set it.
8744 (linux_wait_for_process): Call the_low_target.arch_setup after the
8745 target has stopped for the first time.
8746 (initialize_low): Do not call the_low_target.arch_setup.
8747
8748 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
8749 (s390_set_pc): Likewise.
8750 (s390_arch_setup): New function.
8751 (the_low_target): Use s390_arch_setup as arch_setup routine.
8752
8753 * regcache.c (realloc_register_cache): New function.
8754 (set_register_cache): Call it for each existing regcache.
8755
d05b4ac3
UW
87562008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8757
8758 * server.h (init_registers): Remove prototype.
8759
8760 * linux-low.h (struct linux_target_ops): Add arch_setup field.
8761 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
8762 instead of init_registers ().
8763 * linux-arm-low.c (init_registers_arm): Add prototype.
8764 (init_registers_arm_with_iwmmxt): Likewise.
8765 (the_low_target): Add initializer for arch_setup field.
8766 * linux-cris-low.c (init_registers_cris): Add prototype.
8767 (the_low_target): Add initializer for arch_setup field.
8768 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
8769 (the_low_target): Add initializer for arch_setup field.
8770 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
8771 (the_low_target): Add initializer for arch_setup field.
8772 * linux-ia64-low.c (init_registers_ia64): Add prototype.
8773 (the_low_target): Add initializer for arch_setup field.
8774 * linux-m32r-low.c (init_registers_m32r): Add prototype.
8775 (the_low_target): Add initializer for arch_setup field.
8776 * linux-m68k-low.c (init_registers_m68k): Add prototype.
8777 (the_low_target): Add initializer for arch_setup field.
8778 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
8779 (init_registers_mips64_linux): Likewise.
8780 (the_low_target): Add initializer for arch_setup field.
8781 * linux-ppc-low.c (init_registers_ppc): Add prototype.
8782 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
8783 (the_low_target): Add initializer for arch_setup field.
8784 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
8785 (init_registers_powerpc_64): Likewise.
8786 (the_low_target): Add initializer for arch_setup field.
8787 * linux-s390-low.c (init_registers_s390): Add prototype.
8788 (init_registers_s390x): Likewise.
8789 (the_low_target): Add initializer for arch_setup field.
8790 * linux-sh-low.c (init_registers_sh): Add prototype.
8791 (the_low_target): Add initializer for arch_setup field.
8792 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
8793 (the_low_target): Add initializer for arch_setup field.
8794 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
8795 (the_low_target): Add initializer for arch_setup field.
8796
8797 * win32-low.h (struct win32_target_ops): Add arch_setup field.
8798 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
8799 instead of init_registers ().
8800 * win32-arm-low.c (init_registers_arm): Add prototype.
8801 (the_low_target): Add initializer for arch_setup field.
8802 * win32-i386-low.c (init_registers_i386): Add prototype.
8803 (the_low_target): Add initializer for arch_setup field.
8804
8805 * spu-low.c (init_registers_spu): Add prototype.
8806 (initialize_low): Call initialie_registers_spu () instead of
8807 initialize_registers ().
8808
fd96d250
PA
88092008-02-19 Pedro Alves <pedro@codesourcery.com>
8810
8811 * server.c (handle_v_requests): When handling the vRun and vAttach
8812 packets, if already debugging a process, don't kill it. Return an
8813 error instead.
8814
d41b6bb4
DJ
88152008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
8816
8817 * server.c (handle_query): Correct length check.
8818
5ac588cf
PA
88192008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
8820
8821 * win32-low.c (do_initial_child_stuff): Add process handle
8822 parameter. Set current_process_handle and current_process_id from the
8823 parameters. Clear globals.
8824 (win32_create_inferior): Don't set current_process_handle and
8825 current_process_id here. Instead pass them on the call to
8826 do_initial_child_stuff.
8827 (win32_attach): Likewise.
8828 (win32_clear_inferiors): New.
8829 (win32_kill): Don't close the current process handle or the
8830 current thread handle here. Instead call win32_clear_inferiors.
8831 (win32_detach): Don't open a new handle to the process. Call
8832 win32_clear_inferiors.
8833 (win32_join): Don't rely on current_process_handle; open a new
8834 handle using the process id.
8835 (win32_wait): Call win32_clear_inferiors when the inferior process
8836 has exited.
8837
ecd7ecbc
DJ
88382008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
8839
8840 * server.c (monitor_show_help): Add "exit".
8841
1525d545
MG
88422008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
8843
ecd7ecbc 8844 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
8845 (clean): Add reg-xtensa.c.
8846 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
8847 * configure.srv (xtensa*-*-linux*) New target.
8848 * linux-xtensa-low.c: New.
8849 * xtensa-xtregs.c: New.
1525d545 8850
59a016f0
PA
88512008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
8852
8853 * hostio.c: Don't include errno.h.
8854 (errno_to_fileio_errno): Move to hostio-errno.
8855 * hostio.c: (hostio_error): Remove the error parameter. Defer the
8856 error number outputting to the target->hostio_last_error callback.
8857 (hostio_packet_error): Use FILEIO_EINVAL directly.
8858 (handle_open, handle_pread, hostio_error, handle_unlink): Update
8859 calls to hostio_error.
8860 * hostio-errno.c: New.
8861 * server.h (hostio_last_error_from_errno): Declare.
8862 * target.h (target_ops): Add hostio_last_error member.
8863 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
8864 as hostio_last_error handler.
889bf7c5 8865 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
8866 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
8867 (wince_hostio_last_error): New functions.
8868 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
8869 as hostio_last_error handler.
8870 (win32_target_ops) [!_WIN32_WCE]: Register
8871 hostio_last_error_from_errno as hostio_last_error handler.
8872 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
8873 (hostio-errno.o): New rule.
8874 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
8875 * configure.srv (srv_hostio_err_objs): New variable. Default to
8876 hostio-errno.o.
8877 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
8878 * configure: Regenerate.
8879
2d717e4f
DJ
88802008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8881
8882 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
8883 (linux_kill, linux_detach): Clean up the process list.
8884 * remote-utils.c (remote_open): Improve port number parsing.
8885 (putpkt_binary, input_interrupt): Only send interrupts if the target
8886 is running.
8887 * server.c (extended_protocol): Make static.
8888 (attached): Define earlier.
8889 (exit_requested, response_needed, program_argv): New variables.
8890 (target_running): New.
8891 (start_inferior): Clear attached here.
8892 (attach_inferior): Set attached here.
8893 (require_running): Define.
8894 (handle_query): Use require_running and target_running. Implement
8895 "monitor exit".
8896 (handle_v_attach, handle_v_run): New.
8897 (handle_v_requests): Use require_running. Handle vAttach and vRun.
8898 (gdbserver_usage): Update.
8899 (main): Redo argument parsing. Handle --debug and --multi. Handle
8900 --attach along with other options or after the port. Save
8901 program_argv. Support no initial program. Resynchronize
8902 communication with GDB after an error. Handle "monitor exit".
8903 Use require_running and target_running. Always allow the extended
8904 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
8905 restart in extended mode.
8906 * README: Refer to the GDB manual. Update --attach usage.
8907
7407e2de
AS
89082007-12-20 Andreas Schwab <schwab@suse.de>
8909
8910 * linux-low.c (STACK_SIZE): Define.
8911 (linux_tracefork_child): Use it. Use __clone2 on ia64.
8912 (linux_test_for_tracefork): Likewise.
8913
b65d95c5
DJ
89142007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
8915
8916 * linux-low.c (linux_wait_for_event): Update messages. Do not
8917 reinsert auto-delete breakpoints.
8918 * mem-break.c (struct breakpoint): Change return type of handler to
8919 int.
8920 (set_breakpoint_at): Update handler type.
8921 (reinsert_breakpoint_handler): Return 1 instead of calling
8922 delete_breakpoint.
8923 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
8924 setting a new one.
8925 (check_breakpoints): Delete auto-delete breakpoints and return 2.
8926 * mem-break.h (set_breakpoint_at): Update handler type.
8927 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
8928 * win32-low.c (auto_delete_breakpoint): New.
8929 (get_child_debug_event): Use it.
8930
4e799345
DJ
89312007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
8932
8933 * configure.ac: Check for pread and pwrite.
8934 * hostio.c (handle_pread): Fall back to lseek and read.
8935 (handle_pwrite): Fall back to lseek and write.
8936 * config.in, configure: Regenerated.
8937
27524b67
DJ
89382007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
8939
8940 * server.c (myresume): Add own_buf argument.
8941 (main): Update calls.
8942
a20d5e98
DJ
89432007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
8944
8945 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
8946 * remote-utils.c (remote_open): Do not call disable_async_io.
8947 (block_async_io): Delete.
8948 (unblock_async_io): Make static.
8949 (initialize_async_io): New.
8950 * server.c (handle_v_cont): Handle async I/O here.
8951 (myresume): Likewise. Move other common resume tasks here...
8952 (main): ... from here. Call initialize_async_io. Disable async
8953 I/O before the main loop.
8954 * server.h (initialize_async_io): Declare.
8955 (block_async_io, unblock_async_io): Delete prototypes.
8956 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
8957
b79d787e
DJ
89582007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
8959
8960 * remote-utils.c (readchar): Allow binary data in received messages.
8961
d97903b2
PA
89622007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8963
8964 * win32-low.c (attaching): New global.
8965 (win32_create_inferior): Clear the `attaching' global.
8966 (win32_attach): Set the `attaching' global.
8967 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
8968 attaching. Only set a breakpoint at the entry point if not
8969 attaching.
8970
311de423
PA
89712007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8972
8973 * server.c (main): Don't report dll events on the initial
8974 connection on attaches.
8975
6c2d16d2
PA
89762007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8977
8978 * server.c (main): Relax numerical bases supported for the pid of
8979 the --attach command line argument.
8980
5ca906e6
PA
89812007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8982
8983 * win32-low.c (win32_attach): Call OpenProcess before
8984 DebugActiveProcess, not after. Add last error output to error
8985 call.
8986
9c6c8194
PA
89872007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8988
8989 * win32-low.c (win32_get_thread_context)
8990 (win32_set_thread_context): New functions.
8991 (thread_rec): Use win32_get_thread_context.
8992 (continue_one_thread, win32_resume): Use win32_set_thread_context.
8993 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
8994 field.
8995
4d5d1aaa
PA
89962007-12-03 Leo Zayas
8997 Pedro Alves <pedro_alves@portugalmail.pt>
8998
8999 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9000 global variables.
9001 (child_add_thread): Minor cleanup.
9002 (child_continue): Resume artificially suspended threads before
9003 calling ContinueDebugEvent.
9004 (suspend_one_thread): New.
9005 (fake_breakpoint_event): New.
9006 (get_child_debug_event): Change return type to int. Check here if
9007 gdb sent an interrupt request. If a soft interrupt was requested,
9008 fake a breakpoint event. Return 0 if there is no event to handle,
9009 and 1 otherwise.
9010 (win32_wait): Don't check here if gdb sent an interrupt request.
9011 Ensure there is a valid event to handle.
9012 (win32_request_interrupt): Add soft interruption method as last
9013 resort.
9014
c436e841
PA
90152007-12-03 Leo Zayas
9016 Pedro Alves <pedro_alves@portugalmail.pt>
9017
9018 * win32-low.h (win32_thread_info): Add descriptions to the
9019 structure members. Replace `suspend_count' counter by a
9020 `suspended' flag.
9021 * win32-low.c (thread_rec): Update condition of when to get the
9022 context from the inferior. Rely on ContextFlags being set if it
9023 has already been retrieved. Only suspend the inferior thread if
9024 we haven't already. Warn if that fails.
9025 (continue_one_thread): s/suspend_count/suspended/. Only call
9026 ResumeThread once. Warn if that fails.
9027
e7b5fa67
PA
90282007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9029
9030 * win32-low.c (win32_wait): Don't read from the inferior when it
9031 has already exited.
9032
a385171d
PA
90332007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9034
9035 * Makefile.in (win32_low_h): New variable.
9036 (win32-low.o): Add dependency on $(win32_low_h).
9037 (win32-arm-low.o, win32-i386-low.o): New rules.
9038
f80c84b3
DJ
90392007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9040
9041 * hostio.c: Correct copyright year.
9042
a6b151f1
DJ
90432007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9044
9045 * Makefile.in (OBS): Add hostio.o.
9046 (hostio.o): New rule.
9047 * server.h (handle_vFile): Declare.
9048 * hostio.c: New file.
9049 * server.c (handle_v_requests): Take packet_len and new_packet_len
9050 for binary packets. Call handle_vFile.
9051 (main): Update call to handle_v_requests.
9052
f9387fc3
DJ
90532007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
9054
9055 * linux-low.c: Include <sched.h>.
9056
51c2684e
DJ
90572007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
9058
9059 * linux-low.c (linux_tracefork_grandchild): New.
9060 (linux_tracefork_child): Use clone.
9061 (linux_test_for_tracefork): Use clone; allocate and free a stack.
9062
75f83163
JB
90632007-10-31 Joel Brobecker <brobecker@adacore.com>
9064
9065 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9066
da5898ce
DJ
90672007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
9068
9069 * linux-low.c (handle_extended_wait): Handle unexpected signals.
9070
24a09b5f
DJ
90712007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
9072
9073 * inferiors.c (change_inferior_id): Delete.
9074 (add_pid_to_list, pull_pid_from_list): New.
9075 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
9076 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
9077 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
9078 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
9079 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
9080 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
9081 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
9082 (using_threads): Always set to 1.
9083 (handle_extended_wait): New.
9084 (add_process): Do not set TID.
9085 (linux_create_inferior): Set must_set_ptrace_flags.
9086 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
9087 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
9088 (linux_thread_alive): Rename TID argument to LWPID.
9089 (linux_wait_for_process): Handle unknown processes. Do not use TID.
9090 (linux_wait_for_event): Do not use TID or check using_threads. Update
9091 call to dead_thread_notify. Call handle_extended_wait.
9092 (linux_create_inferior): Use PTRACE_SETOPTIONS.
9093 (send_sigstop): Delete sigstop_sent.
9094 (wait_for_sigstop): Avoid TID.
9095 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
9096 (linux_test_for_tracefork): New.
9097 (linux_lookup_signals): Use thread_db_active and
9098 linux_supports_tracefork_flag.
9099 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
9100 * linux-low.h (get_process_thread): Avoid TID.
9101 (struct process_ifo): Move thread_known and tid to the end. Remove
9102 sigstop_sent.
9103 (linux_attach_lwp, thread_db_init): Update prototypes.
9104 * server.h (change_inferior_id): Delete prototype.
9105 (add_pid_to_list, pull_pid_from_list): New prototypes.
9106 * thread-db.c (thread_db_use_events): New.
9107 (find_first_thread): Rename to...
9108 (find_one_thread): ...this. Update callers and messages. Do not
9109 call fatal. Check thread_db_use_events. Do not call
9110 change_inferior_id or new_thread_notify.
9111 (maybe_attach_thread): Update. Do not call new_thread_notify.
9112 (thread_db_init): Set thread_db_use_events. Check use_events.
9113 * utils.c (fatal, warning): Correct message prefix.
9114
30ed0a8f
DJ
91152007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
9116
9117 * Makefile.in (clean): Remove new files.
9118 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
9119 (powerpc-64.o, powerpc-64.c): New rules.
9120 * configure.srv: Use alternate register sets for powerpc64-*-linux*
9121 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
9122 with SPE.
9123 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
9124 SPE targets.
9125 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
9126 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
9127 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
9128 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
9129 (target_regsets): Add AltiVec and SPE register sets.
9130 * configure.ac: Check for AltiVec and SPE.
9131 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
9132 (ppc_fill_vrregset, ppc_store_vrregset): New.
9133 (target_regsets): Add AltiVec register set.
9134 * configure: Regenerated.
9135
fd462a61
DJ
91362007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
9137
9138 * linux-low.c (O_LARGEFILE): Define.
9139 (linux_read_memory): Use /proc/PID/mem.
9140 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
9141 * configure, config.in: Regenerated.
9142
69f223ed
DJ
91432007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9144
9145 * linux-low.c (linux_wait_for_event): Do not pass signals while
9146 single-stepping.
9147
aec18585
PA
91482007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9149
9150 * win32-low.c (create_process): New.
9151 (win32_create_inferior): Use create_process instead of
9152 CreateProcess. If create_process failed retry appending an ".exe"
9153 suffix. Store the GetLastError result immediatelly after
9154 create_process calls and use it on the call to error.
9155
34d86ddd
PA
91562007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9157
9158 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
9159
5a0e3bd0
JB
91602007-08-23 Joel Brobecker <brobecker@adacore.com>
9161
9162 * configure.ac: Switch license to GPLv3.
9163
f88c79e6
MS
91642007-08-01 Michael Snyder <msnyder@access-company.com>
9165
9166 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
9167
6b3d9b83
PA
91682007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
9169
9170 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
9171 typedef.
9172 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
9173 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
9174 CloseToolhelp32Snapshot.
9175 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9176 CloseToolhelp32Snapshot.
9177
c588c53c
MS
91782007-07-27 Michael Snyder <michael.snyder@access-company.com>
9179
9180 * server.c (main): Check for inferior exit before main loop.
9181
aa0403d9
PA
91822007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
9183
9184 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
9185 instead of on tmp_desc.
9186
255e7678
DJ
91872007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
9188 Daniel Jacobowitz <dan@codesourcery.com>
9189
9190 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
9191 (add_thread): Minor cleanups.
9192 (clear_inferiors): Move lower in the file. Clear the DLL
9193 list.
9194 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9195 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9196 (xml_escape_text): New.
9197 * server.c (handle_query): Handle qXfer:libraries:read. Report it
9198 for qSupported.
9199 (handle_v_cont): Report errors.
9200 (gdbserver_version): Update.
9201 (main): Correct size of own_buf. Do not report initial DLL events.
9202 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9203 (unloaded_dll, xml_escape_text): New.
9204 * win32-low.c (enum target_waitkind): Update comments.
9205 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9206 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9207 (win32_EnumProcessModules, win32_GetModuleInformation)
9208 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9209 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9210 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9211 (win32_Module32First, win32_Module32Next, load_toolhelp)
9212 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
9213 (get_child_debug_event): Handle DLL events.
9214 (win32_wait): Likewise.
9215
0d37add9
DJ
92162007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9217
9218 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
9219 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
9220
45e2715e
PA
92212007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9222
9223 * win32-low.c (handle_output_debug_string): Ignore event if not
9224 waiting.
9225
c5674cf1
PA
92262007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9227
9228 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9229
2bbe3cc1
DJ
92302007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9231
9232 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9233
ae13219e
DJ
92342007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9235
9236 * inferiors.c (change_inferior_id): Add comment.
9237 * linux-low.c (check_removed_breakpoint): Add an early
9238 prototype. Improve debug output.
9239 (linux_attach): Doc update.
9240 (linux_detach_one_process, linux_detach): Clean up before releasing
9241 each process.
9242 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9243 * linux-low.h (struct process_info): Doc improvement.
9244 * mem-break.c (delete_all_breakpoints): New.
9245 * mem-break.h (delete_all_breakpoints): New prototype.
9246 * thread-db.c (find_first_thread): New.
9247 (thread_db_create_event): Call it instead of
9248 thread_db_find_new_threads. Clean up unused variables.
9249 (maybe_attach_thread): Remove first thread handling.
9250 (thread_db_find_new_threads): Use find_first_thread.
9251 (thread_db_get_tls_address): Likewise.
9252
4105de34
DJ
92532007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9254
9255 * thread-db.c (thread_db_find_new_threads): Add prototype.
9256 (thread_db_create_event): Check for the main thread before adding
9257 a new thread.
9258 (maybe_attach_thread): Only enable event reporting if TID == 0.
9259 (thread_db_get_tls_address): Check for new threads.
9260
2b876972
DJ
92612007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
9262
9263 * linux-low.c (linux_create_inferior): Try execv before execvp.
9264 * spu-low.c (spu_create_inferior): Likewise.
9265
7a245884
DJ
92662007-06-13 Mike Frysinger <vapier@gentoo.org>
9267
9268 * linux-low.c (linux_create_inferior): Change execv to execvp.
9269 * spu-low.c (spu_create_inferior): Likewies.
9270
117ce543
DJ
92712007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
9272
9273 * Makefile.in (clean): Clean new files instead of deleted ones.
9274 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9275 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9276 rules.
9277 * configure.srv: Specify XML files and new regformats for MIPS and
9278 MIPS64 GNU/Linux.
9279 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9280 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9281 an entry for the restart register.
9282 (mips_cannot_fetch_register, mips_cannot_store_register)
9283 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9284 register names to match the XML descriptions.
9285 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9286 restart register instead of $0.
9287
0e7f50da
UW
92882007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9289 Markus Deuling <deuling@de.ibm.com>
9290
9291 * remote-utils.c (decode_xfer_write): New function.
9292 * server.h (decode_xfer_write): Add prototype.
9293 * server.c (handle_query): Add PACKET_LEN argument. Support
9294 qXfer:spu:read and qXfer:spu:write packets.
9295 (main): Pass packet_len to handle_query.
9296 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9297 * target.h (target_ops): Add qxfer_spu.
9298
374c1d38
UW
92992007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9300
9301 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
9302 accessing non-seekable spufs files.
9303
bb63802a
UW
93042007-05-16 Markus Deuling <deuling@de.ibm.com>
9305
889bf7c5 9306 * server.c (handle_query): Add reply for qC packet.
bb63802a 9307
7390519e
PA
93082007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9309 Leo Zayas <lerele@champenstudios@com>
9310
9311 * server.h (check_remote_input_interrupt_request): New function.
9312 * remote_utils.c (INVALID_DESCRIPTOR): New define.
9313 (remote_desc): Initialize with INVALID_DESCRIPTOR.
9314 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
9315 (check_remote_input_interrupt_request): New function.
9316 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 9317 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
9318 winapi_GenerateConsoleCtrlEvent): New typedefs.
9319 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
9320 to 250 ms.
9321 (win32_wait): Check for remote interrupt request
9322 with check_remote_input_interrupt_request.
9323 (win32_request_interrupt): New function.
9324 (win32_target_op): Set request_interrupt to win32_request_interrupt.
9325
34b34921
PA
93262007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9327
9328 * win32-low.c (debug_registers_changed,
9329 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
9330 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
9331 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
9332 (thread_rec): Get context using the low target.
9333 (child_add_thread): Call thread_added on the low target,
9334 which does the same thing.
9335 (regptr): Delete.
9336 (do_initial_child_stuff): Remove debug registers references.
9337 Set context using the low target. Resume threads after
9338 setting the contexts.
9339 (child_continue): Remove dead variable. Remove debug
9340 registers references.
9341 (child_fetch_inferior_registers): Go through the low target.
9342 (do_child_store_inferior_registers): Remove.
9343 (child_store_inferior_registers): Go through the low target.
9344 (win32_resume): Remove debug registers references.
9345 Set context using the low target.
9346 (handle_exception): Change return type to void. Don't record
9347 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
9348 first chance exception.
889bf7c5 9349 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
9350 goto loop. Always return after waiting for debug event.
9351 (win32_wait): Convert to switch statement. Handle spurious
9352 events.
9353
9354 * win32-i386-low.c (debug_registers_changed,
9355 debug_registers_used): New.
9356 (initial_stuff): Rename to ...
9357 (i386_initial_stuff): ... this. Clear debug registers
9358 state variables.
9359 (store_debug_registers): Delete.
9360 (i386_get_thread_context): New.
9361 (load_debug_registers): Delete.
9362 (i386_set_thread_context): New.
9363 (i386_thread_added): New.
9364 (single_step): Rename to ...
9365 (i386_single_step): ... this.
9366 (do_fetch_inferior_registers): Rename to ...
9367 (i386_fetch_inferior_register): ... this.
9368 (i386_store_inferior_register): New.
9369 (the_low_target): Adapt to new interface.
9370
9371 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
9372 (arm_get_thread_context): New.
9373 (arm_set_thread_context): New.
9374 (regptr): New.
9375 (do_fetch_inferior_registers): Rename to ...
9376 (arm_fetch_inferior_register): ... this.
9377 (arm_store_inferior_register): New.
9378 (arm_wince_breakpoint): Reimplement as unsigned long.
9379 (arm_wince_breakpoint_len): Define.
9380 (the_low_target): Adapt to new interface.
9381
9382 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
9383 load_debug_registers. Add get_thread_context, set_thread_context,
9384 thread_added and store_inferior_register. Rename
9385 fetch_inferior_registers to fetch_inferior_register.
9386 (regptr): Remove declaration.
9387
dd6953e1
PA
93882007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9389
9390 * linux-low.c (linux_detach): Change return type to int. Return 0.
9391 * spu-low.c (spu_detach): Likewise.
9392
444d6139
PA
93932007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9394
9395 * target.h (target_ops): Change return type of detach to int.
9396 Add join.
9397 (join_inferior): New.
9398 * server.c (main): Don't skip detach support on mingw32.
9399 If the inferior doesn't support detaching return error.
9400 Call join_inferior instead of using waitpid.
9401 * linux-low.c (linux_join): New.
9402 (linux_target_op): Add linux_join.
9403 * spu-low.c (spu_join): New.
9404 (spu_target_ops): Add spu_join.
9405 * win32-low.c (win32_detach): Adapt to new interface.
9406 Reopen current_process_handle before detaching. Issue a child
9407 resume before detaching.
9408 (win32_join): New.
9409 (win32_target_op): Add win32_join.
9410
1d5315fe
PA
94112007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9412
9413 * win32-low.c (win32-attach): Fix return value.
9414 * target.h (target_ops): Describe ATTACH return values.
9415
bf914831
PA
94162007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9417
9418 * win32-low.c (GETPROCADDRESS): Define.
9419 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
9420 (winapi_DebugSetProcessKillOnExit): Likewise.
9421 (win32_create_inferior): Force usage of ansi CreateProcessA.
9422 (win32_attach): Use GETPROCADDRESS.
9423 (win32_detach): Likewise.
9424
f72f3e60
PA
94252007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9426
9427 * win32-low.c (win32_wait): Don't use WSTOPSIG.
9428
ed50f18f
PA
94292007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
9430
9431 * win32-low.c: Commit leftover changes from 2007-03-29.
9432
0c2ead7e
DJ
94332007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9434
9435 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
9436 fields short instead of int. Add explicit padding.
9437 (i387_cache_to_fsave): Remove unnecessary casts.
9438 (i387_fsave_to_cache): Doc fix.
9439 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
9440
73725ff3
DJ
94412007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9442
9443 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
9444 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
9445
d99f33d8
PA
94462007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9447
9448 * configure.srv (arm*-*-mingw32ce*): Move near the other
9449 arm targets.
9450
68070c10
PA
94512007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9452
2482afc6 9453 * configure.ac: Add errno checking.
68070c10
PA
9454 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
9455 sys/file.h and malloc.h.
9456 (AC_CHECK_DECLS): Add perror.
9457 (srv_mingwce): Handle.
2482afc6 9458 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
9459 win32-i386-low.o to srv_tgtobj.
9460 (i[34567]86-*-mingw*): Likewise.
9461 (arm*-*-mingw32ce*): Add case.
9462 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9463 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
9464 [__MINGW32CE__] (strerror): New function.
9465 [__MINGW32CE__] (errno): Define to GetLastError.
9466 [__MINGW32CE__] (COUNTOF): New macro.
9467 (remote_open): Remove extra close call.
9468 * mem-break.c (delete_breakpoint_at): New function.
9469 * mem-break.h (delete_breakpoint_at): Declare.
9470 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9471 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
9472 [USE_WIN32API] (read, write): Add char* casts.
9473 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
9474 * server.h: Include wincecompat.h on Windows CE.
9475 [HAVE_ERRNO_H]: Check.
9476 (perror): Declare if not declared.
9477 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
9478 (perror_with_name): Remove errno declaration.
9479 * wincecompat.h: New.
9480 * wincecompat.c: New.
9481 * win32-low.h: New.
9482 * win32-arm-low.c: New.
9483 * win32-i386-low.c: New.
9484 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
9485 (OUTMSG2): Make it safe.
9486 (_T): New macro.
9487 (COUNTOF): New macro.
9488 (NUM_REGS): Get it from the low target.
9489 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
9490 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
9491 (thread_rec): Let low target handle debug registers.
9492 (child_add_thread): Likewise.
9493 (child_init_thread_list): Likewise.
9494 (continue_one_thread): Likewise.
9495 (regptr): New.
9496 (do_child_fetch_inferior_registers): Move to ...
9497 * win32-i386-low.c: ... here, and rename to ...
9498 (do_fetch_inferior_registers): ... this.
889bf7c5 9499 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
9500 Go through the low target.
9501 (do_child_store_inferior_registers): Use regptr.
9502 (strwinerror): New function.
9503 (win32_create_inferior): Handle Windows CE.
9504 Use strwinerror instead of strerror on Windows error
9505 codes. Add program to the error output.
9506 Don't close the main thread handle on Windows CE.
9507 (win32_attach): Use coredll.dll on Windows CE.
9508 (win32_kill): Close current process and current
9509 thread handles.
9510 (win32_detach): Use coredll.dll on Windows CE.
9511 (win32_resume): Let low target handle debug registers, and
9512 step request.
9513 (handle_exception): Add/Remove initial breakpoint. Avoid
9514 non-existant WSTOPSIG on Windows CE.
9515 (win32_read_inferior_memory): Cast to remove warning.
9516 (win32_arch_string): Go through the low target.
9517 (initialize_low): Call set_breakpoint_data with the low
9518 target's breakpoint.
9519 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
9520 FOP_REGNUM, mappings): Move to ...
9521 * win32-i386-low.c: ... here.
9522 * win32-low.c (win32_thread_info): Move to ...
9523 * win32-low.h: ... here.
9524 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
9525 win32-arm-low.c and wincecompat.c.
9526 (all:): Add $EXEEXT.
9527 (install-only:): Likewise.
9528 (gdbserver:): Likewise.
9529 (gdbreplay:): Likewise.
9530 * config.in: Regenerate.
9531 * configure: Regenerate.
9532
41093d81
PA
95332007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9534
9535 * win32-low.c: Rename typedef thread_info to
9536 win32_thread_info throughout.
9537
544afa54
PA
95382007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9539
9540 * win32-i386-low.c: Rename to ...
9541 * win32-low.c: ... this.
9542 * configure.srv: Replace win32-i386-low.o with win32-low.o.
9543 * Makefile.in: Likewise.
9544
bce7165d
PA
95452007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
9546
9547 * remote-utils.c (monitor_output): Constify msg parameter.
9548 * server.h (monitor_output): Likewise.
9549 * win32-i386-low.c (handle_output_debug_string): New.
9550 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
9551 handle_output_debug_string.
9552 (get_child_debug_event): Likewise.
9553
506c7aa0
DJ
95542007-03-27 Mat Hostetter <mat@lcs.mit.edu>
9555
9556 * server.c (main): Correct strtoul check.
9557
42c81e2a
DJ
95582007-03-27 Jon Ringle <jon@ringle.org>
9559
9560 * linux-low.c: Check __ARCH_HAS_MMU__ also.
9561
9453113a
DJ
95622007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
9563
9564 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
9565
64a69107
DJ
95662007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
9567
9568 * terminal.h: Check HAVE_SGTTY_H.
9569
95702007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
9571
9572 * remote-utils.c (remote_open): Print out the assigned port number.
9573
c74d0ad8
DJ
95742007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
9575
9576 * remote-utils.c (monitor_output): New function.
9577 * server.c (debug_threads): Define here.
9578 (monitor_show_help): New function.
9579 (handle_query): Handle qRcmd.
9580 (main): Do not handle 'd' packet.
9581 * server.h (debug_threads, remote_debug, monitor_output): Declare.
9582 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
9583 of debug_threads.
9584
de7c3b4a
PA
95852007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9586
9587 * Makefile.in (EXEEXT): New.
9588 (clean): Use $(EXEEXT).
9589
ef57601b
PA
95902007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9591
9592 * target.h (target_ops): Rename send_signal to request_interrupt,
9593 and remove enum target_signal parameter.
9594 * linux-low.c (linux_request_interrupt): Rename from
9595 linux_send_signal, and always send SIGINT.
9596 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
9597 and always send SIGINT.
9598 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
9599 of send_signal.
9600 (input_interrupt): Likewise.
9601
820f2bda
PA
96022007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9603
9604 * server.c (get_features_xml): Check if target implemented
9605 arch_string.
9606 * win32-i386-low.c (win32_arch_string): New.
9607 (win32_target_ops): Add win32_arch_string as arch_string member.
9608
ab39bf24
UW
96092007-02-22 Markus Deuling <deuling@de.ibm.com>
9610
9611 * spu-low.c (spu_arch_string): New.
9612 (spu_target_ops): Add spu_arch_string.
9613
61ff6e04
DJ
96142007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
9615
9616 * remote-utils.c: Remove HAVE_TERMINAL_H check.
9617 * configure.ac: Do not check for terminal.h.
9618 * configure, config.in: Regenerated.
9619
fb1e4ffc
DJ
96202007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9621
9622 * Makefile.in (OBS): Add $(XML_BUILTIN).
9623 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
9624 (clean): Update.
9625 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
9626 (arm-with-iwmmxt.c): New.
9627 * config.in, configure: Regenerate.
9628 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
9629 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
9630 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
9631 (arm*-*-linux*): Add iWMMXt and regset support.
9632 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
9633 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
9634 (arm_store_wmmxregset, target_regsets): New.
9635 * server.c (get_features_xml): Take annex argument. Check builtin
9636 XML documents.
9637 (handle_query): Handle multiple annexes.
9638
0f48aa01
DJ
96392007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9640
9641 * remote-utils.c [USE_WIN32API] (read, write): Define.
9642 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
9643 write.
9644
23181151
DJ
96452007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
9646
9647 * linux-i386-low.c (the_low_target): Set arch_string.
9648 * linux-x86-64-low.c (the_low_target): Likewise.
9649 * linux-low.c (linux_arch_string): New.
9650 (linux_target_ops): Add it.
9651 * linux-low.h (struct linux_target_ops): Add arch_string.
9652 * server.c (write_qxfer_response): Use const void * for DATA.
9653 (get_features_xml): New.
9654 (handle_query): Handle qXfer:features:read. Report it for qSupported.
9655 * target.h (struct target_ops): Add arch_string method.
9656
9d606399
DJ
96572007-01-03 Denis Pilat <denis.pilat@st.com>
9658 Daniel Jacobowitz <dan@codesourcery.com>
9659
9660 * linux-low.c (linux_kill): Handle being called with no threads.
9661 * win32-i386-low.c (win32_kill): Likewise.
9662 (get_child_debug_event): Clear current_process_handle.
9663
96642006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
9665 Daniel Jacobowitz <dan@codesourcery.com>
9666
9667 * remote-utils.c (remote_open): Check the type of specified
9668 serial port devices before opening them.
9669 * server.c (main): Kill the inferior if an error occurs during
9670 the first remote_open.
9671
a5e13d24
DJ
96722006-12-05 Markus Deuling <deuling@de.ibm.com>
9673
9674 * README: Update supported targets.
9675
186947f7
DJ
96762006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
9677
9678 * Makefile.in (clean): Remove reg-mips64.c.
9679 (reg-mips64.c, reg-mips64.o): New rules.
9680 * configure.srv: Handle mips64. Include regset support for mips.
9681 * linux-mips-low.c (union mips_register): New.
9682 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
9683 (mips_breakpoint, mips_breakpoint_at): Use int.
9684 (mips_collect_register, mips_supply_register)
9685 (mips_collect_register_32bit, mips_supply_register_32bit)
9686 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9687 (mips_store_fpregset, target_regsets): New.
9688 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
9689
a13e2c95
UW
96902006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
9691
9692 * configure.srv: Add target "spu*-*-*".
9693 * Makefile.in (clean): Remove reg-spu.c.
9694 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
9695 * spu-low.c: New file.
9696
cb7283db
DJ
96972006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9698
9699 * configure.ac: Correct td_thr_tls_get_addr test.
9700 * configure: Regenerated.
9701
89be2091
DJ
97022006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9703
9704 * linux-low.c (linux_wait_for_event): Reformat. Use the
9705 pass_signals array.
9706 * remote-utils.c (decode_address_to_semicolon): New.
9707 * server.c (pass_signals, handle_general_set): New.
9708 (handle_query): Mention QPassSignals for qSupported.
9709 (main): Call handle_general_set.
9710 * server.h (pass_signals, decode_address_to_semicolon): New.
9711
000ef4f0
DJ
97122006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
9713
9714 * server.c (handle_query): Correct error handling for read_auxv.
9715
b7149293
UW
97162005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
9717
9718 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
9719 and srv_linux_thread_db to yes.
9720 * linux-s390-low.c (s390_fill_gregset): New function.
9721 (target_regsets): Define data structure.
9722
dae5f5cf
DJ
97232006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
9724
9725 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
9726 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
9727 * config.in, configure: Regenerated.
9728 * inferiors.c (gdb_id_to_thread): New function.
9729 (gdb_id_to_thread_id): Use it.
9730 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
9731 * linux-low.h (struct process_info): Add th member.
9732 (thread_db_get_tls_address): New prototype.
9733 * remote-utils.c (decode_address): Make non-static.
9734 * server.c (handle_query): Handle qGetTLSAddr.
9735 * server.h (gdb_id_to_thread, decode_address): New prototypes.
9736 * target.h (struct target_ops): Add get_tls_address.
9737 * thread-db.c (maybe_attach_thread): Save the thread handle.
9738 (thread_db_get_tls_address): New.
9739
32ca6d61
DJ
97402006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
9741
9742 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
9743 (linux_resume_one_process): Take a siginfo_t *. Update all
9744 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
9745 (struct pending_signals): Add a siginfo_t.
9746 (linux_wait_for_process): Always set last_status.
9747 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
9748 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
9749 * linux-low.h (struct process_info): Add last_status.
9750
5ffff7c1
DJ
97512006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
9752
9753 * remote-utils.c (try_rle): New function.
9754 (putpkt_binary): Use it.
9755
8695c747
DJ
97562006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
9757
9758 * Makefile.in (clean): Clean reg-x86-64-linux.c.
9759 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
9760 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
9761 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
9762 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
9763 point registers.
9764
290fadea
RS
97652006-08-08 Richard Sandiford <richard@codesourcery.com>
9766
9767 * server.c (terminal_fd): New variable.
9768 (old_foreground_pgrp): Likewise.
9769 (restore_old_foreground_pgrp): New function.
9770 (start_inferior): Record the terminal file descriptor in terminal_fd
9771 and its original foreground group in old_foreground_pgrp. Register
9772 restore_old_foreground_pgrp with atexit().
9773
9f2e1e63
DJ
97742006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
9775
9776 * server.c (handle_query): Correct qPart to qXfer.
9777
b80864fb
DJ
97782006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
9779
9780 * configure.ac: Check for more headers which are missing on
9781 Windows. Automatically supply -lwsock32 and USE_WIN32API.
9782 * configure.srv: Add Cygwin and mingw32.
9783 * remote-utils.c: Don't include headers unconditionally which
9784 are missing on mingw32. Include <winsock.h> for mingw32.
9785 (remote_open): Adjust for mingw32 support. Flush
9786 standard error after writing to it.
9787 (remote_close, putpkt_binary, input_interrupt, block_async_io)
9788 (unblock_async_io, enable_async_io, disable_async_io)
9789 (readchar, getpkt): Update for Winsock support.
9790 (prepare_resume_reply): Expect a protocol signal number.
9791 * server.c: Disable <sys/wait.h> on mingw32.
9792 (start_inferior): Adjust for mingw32 support. Flush
9793 standard error after writing to it.
9794 (attach_inferior): Likewise. Use protocol signal
9795 numbers.
9796 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
9797 and names.
9798 * win32-i386-low.c: New file.
9799 * Makefile.in (XM_CLIBS): Set.
9800 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
9801 (win32-i386-low.o): New dependency rule.
9802 * linux-low.c (linux_wait): Use target signal numbers.
9803 * target.h (struct target_ops): Doc fix.
9804 * server.h (target_signal_to_name): New prototype.
9805 * gdbreplay.c: Don't include headers unconditionally which
9806 are missing on mingw32. Include <winsock.h> for mingw32.
9807 (remote_close, remote_open): Adjust for Winsock support.
9808 * configure, config.in: Regenerated.
9809
0876f84a
DJ
98102006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9811
9812 * server.c (decode_xfer_read, write_qxfer_response): New.
9813 (handle_query): Take a packet length argument. Handle
9814 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
9815 the qSupported response.
9816 (main): Update call to handle_query.
9817
01f9e8fa
DJ
98182006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
9819
9820 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
9821 (putpkt_binary): Renamed from putpkt and adjusted for binary
9822 data.
9823 (putpkt): New wrapper for putpkt_binary.
9824 (readchar): Don't mask off the high bit.
9825 (decode_X_packet): New function.
9826 * server.c (main): Call putpkt_binary if a handler sets the packet
9827 length. Save the length of the incoming packet. Handle 'X'.
9828 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
9829
be2a5f71
DJ
98302006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
9831
9832 * server.c (handle_query): Handle qSupported.
9833
ea025f5f
DJ
98342006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9835
9836 * remote-utils.c (all_symbols_looked_up): New variable.
9837 (look_up_one_symbol): Check it.
9838 * server.h (look_up_one_symbol): New declaration.
9839 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
9840
9308fc88
DJ
98412006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9842
9843 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 9844 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
9845 (PTRACE_GET_THREAD_AREA): Define.
9846 (ps_get_thread_area): New function.
9847
52fb6437
NS
98482006-05-09 Nathan Sidwell <nathan@codesourcery.com>
9849
9850 * configure.srv (m68k*-*-uclinux*): New target.
9851 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
9852 (linux_resume_one_process): Remove extraneous cast.
9853 (linux_read_offsets): New.
9854 (linux_target_op): Add linux_read_offsets on mmuless systems.
9855 * server.c (handle_query): Add qOffsets logic.
9856 * target.h (struct target_ops): Add read_offsets.
9857
21b0f40c
DJ
98582006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
9859
9860 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
9861 (PTRACE_GET_THREAD_AREA): Define.
9862 (ps_get_thread_area): New function.
9863 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
9864 (linux-x86-64-low.o): Update.
9865
0050a760
DJ
98662006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
9867
9868 * configure.ac: Remove checks for prfpregset_t.
9869 * gdb_proc_service.h: New file.
9870 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
9871 new "gdb_proc_service.h".
9872 * proc-service.c: Likewise.
9873 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
9874 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
9875 * Makefile.in (gdb_proc_service_h): Updated.
9876 * configure, config.in: Regenerated.
9877
b92a518e
DJ
98782006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
9879
9880 * remote-utils.c (prepare_resume_reply): Move declaration
9881 of gdb_id_from_wait to the top of the block.
9882
545587ee
DJ
98832006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
9884
9885 * linux-low.c (regsets_store_inferior_registers): Read the regset
9886 from the target before filling it.
9887
9db87ebd
DJ
98882006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9889
9890 * server.c (attach_inferior): Return SIGTRAP for a successful
9891 attach.
9892
dd24457d
DJ
98932006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9894
9895 * Makefile.in (OBS): Add version.o.
9896 (STAGESTUFF): Delete.
9897 (version.o): Add dependencies.
9898 (version.c): Replace rule.
9899 (clean): Remove version.c.
9900 * server.c (gdbserver_version): New.
9901 (gdbserver_usage): Use printf.
9902 (main): Handle --version and --help.
9903 * server.h (version, host_name): Add declarations.
9904
6f0f660e
EZ
99052005-12-23 Eli Zaretskii <eliz@gnu.org>
9906
889bf7c5
PA
9907 * linux-arm-low.c:
9908 * linux-arm-low.c:
9909 * inferiors.c:
9910 * i387-fp.h:
9911 * i387-fp.c:
9912 * gdbreplay.c:
9913 * regcache.c:
9914 * proc-service.c:
9915 * mem-break.h:
9916 * mem-break.c:
9917 * linux-x86-64-low.c:
9918 * linux-sh-low.c:
9919 * linux-s390-low.c:
9920 * linux-ppc64-low.c:
9921 * linux-ppc-low.c:
9922 * linux-mips-low.c:
9923 * linux-m68k-low.c:
9924 * linux-m32r-low.c:
9925 * linux-low.h:
9926 * linux-low.c:
9927 * linux-ia64-low.c:
9928 * linux-i386-low.c:
9929 * linux-crisv32-low.c:
9930 * thread-db.c:
9931 * terminal.h:
9932 * target.h:
9933 * target.c:
9934 * server.h:
9935 * server.c:
9936 * remote-utils.c:
9937 * regcache.h:
9938 * utils.c:
9939 * Makefile.in:
9940 * configure.ac:
6f0f660e
EZ
9941 * gdbserver.1: Add (C) after Copyright. Update the FSF
9942 address.
9943
9d1fb177
DJ
99442005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
9945
9946 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
9947 (arm_breakpoint_at): Recognize both breakpoints.
9948 (the_low_target): Use the correct breakpoint instruction.
9949
011a70c2
DJ
99502005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
9951
9952 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
9953 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
9954 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
9955 (the_low_target): Update.
9956
7fb85e41
AS
99572005-10-25 Andreas Schwab <schwab@suse.de>
9958
9959 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
9960
9961 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
9962 (ia64_num_regs): Reduce to 462.
9963
3db0444b
DJ
99642005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
9965
9966 * acinclude.m4: Correct quoting.
9967 * aclocal.m4: Regenerated.
9968
9969 Suggested by SZOKOVACS Robert <szo@ies.hu>:
9970 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
9971 (thread_db_init): Call thread_db_err_str.
9972 * configure.ac: Check for TD_VERSION.
9973 * config.in, configure: Regenerated.
9974
bee0189a
DJ
99752005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9976
9977 * server.h (error, fatal, warning): Add ATTR_FORMAT.
9978
e9d25b98
DJ
99792005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9980
9981 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
9982 is not available. Define HAVE_PTRACE_GETREGS if it is.
9983 * config.in, configure: Regenerated.
9984 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
9985 * linux-i386-low.c, linux-m68k-low.c: Update to use
9986 HAVE_PTRACE_GETREGS.
9987 * linux-low.c (regsets_fetch_inferior_registers)
9988 (regsets_store_inferior_registers): Only return 0 if we processed
9989 GENERAL_REGS.
9990 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
9991 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
9992
a06660f7
DJ
99932005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9994
9995 * inferiors.c (struct thread_info): Add gdb_id.
9996 (add_thread): Add gdb_id argument.
9997 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
9998 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
9999 calls to add_thread.
10000 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10001 * server.c (handle_query): Use thread_to_gdb_id.
10002 (handle_v_cont, main): Use gdb_id_to_thread_id.
10003 * server.h (add_thread): Update prototype.
10004 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10005 prototypes.
10006
5a1f5858
DJ
100072005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10008
10009 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
10010 left-padded registers.
10011 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
10012 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
10013
e122f1f5
SE
100142005-07-01 Steve Ellcey <sje@cup.hp.com>
10015
10016 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10017 * configure: Regenerate.
10018 * config.in: Regenerate.
10019 * server.h (NEED_DECLARATION_STRERROR):
10020 Replace with !HAVE_DECL_STRERROR.
10021
d592fa2f
DJ
100222005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
10023
10024 * linux-low.c (linux_wait, linux_send_signal): Don't test
10025 an unsigned long variable for > 0 if it could be MAX_ULONG.
10026 * server.c (myresume): Likewise.
10027 * target.c (set_desired_inferior): Likewise.
10028
ccbd4912
MK
100292005-06-13 Mark Kettenis <kettenis@gnu.org>
10030
10031 * configure.ac: Simplify and improve check for socklen_t.
10032 * configure, config.in: Regenerate.
10033
f450004a
DJ
100342005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
10035
10036 * acconfig.h: Remove.
10037 * configure.ac: Add a test for socklen_t. Use three-argument
10038 AC_DEFINE throughout.
10039 * config.in: Regenerated using autoheader 2.59.
10040 * configure: Regenerated.
10041
10042 * gdbreplay.c (socklen_t): Provide a default.
10043 (remote_open): Use socklen_t.
10044 * remote-utils.c (socklen_t): Provide a default.
10045 (remote_open): Use socklen_t.
10046 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10047 unsigned char.
10048
10049 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10050 char for buffers.
10051 * linux-low.c (linux_read_memory, linux_write_memory)
10052 (linux_read_auxv): Likewise.
10053 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
10054 (check_mem_write): Likewise.
10055 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
10056 Likewise.
10057 * regcache.c (struct inferior_rgcache_data, registers_to_string)
10058 (registers_from_string, register_data): Likewise.
10059 * server.c (handle_query, main): Likewise.
10060 * server.h (convert_ascii_to_int, convert_int_to_ascii)
10061 (decode_M_packet): Likewise.
10062 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10063 * target.h (struct target_ops): Update read_memory, write_memory,
10064 and read_auxv.
10065 (read_inferior_memory, write_inferior_memory): Update.
10066 * linux-low.h (struct linux_target_ops): Change type of breakpoint
10067 to unsigned char *.
10068 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
10069 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
10070 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
10071 linux-s390-low.c, linux-sh-low.c: Update for changes in
10072 read_inferior_memory and the_low_target->breakpoint.
10073
eee84df1
DJ
100742005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
10075
10076 * Makefile.in (SFILES): Add linux-ppc64-low.c.
10077 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
10078 * configure.srv: Add powerpc64-*-linux*.
10079 * linux-ppc64-low.c: New file.
10080
45b134e5
OF
100812005-05-23 Orjan Friberg <orjanf@axis.com>
10082
10083 * linux-cris-low.c: New file with support for CRIS.
10084 * linux-crisv32-low.c: Ditto for CRISv32.
10085 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
10086 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 10087 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
10088 reg-crisv32.o, and reg-crisv32.c to make rules.
10089 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
10090 recognized targets.
10091
48d93c75
UW
100922005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
10093
10094 * linux-low.c (fetch_register): Ensure buffer size is a multiple
10095 of sizeof (PTRACE_XFER_TYPE).
10096 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
10097
e013ee27
OF
100982005-05-12 Orjan Friberg <orjanf@axis.com>
10099
889bf7c5 10100 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
10101 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
10102 pointers for hardware watchpoint support.
10103 * linux-low.h (struct linux_target_ops): Ditto.
10104 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
10105 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
10106 to linux_target_ops.
10107 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
10108 reply packet.
10109 * server.c (main): Recognize 'Z' and 'z' packets.
10110
b0ded00b
UW
101112005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
10112
10113 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
10114 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
10115 (the_low_target): Add new members.
10116
8643e2ad
DJ
101172005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10118
10119 * proc-service.c (ps_lgetregs): Search all_processes instead of
10120 all_threads.
10121
fc620387
DJ
101222005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10123
10124 * server.c (start_inferior): Change return type to int.
10125 (attach_inferior): Change sigptr to int *.
10126 (handle_v_cont, handle_v_requests): Change signal to int *.
10127 (main): Change signal to int.
10128
101292005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
10130
10131 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
10132 * configure.srv: Add m32r*-*-linux*.
10133 * linux-m32r-low.c: New file.
10134
e0e76420
DJ
101352005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
10136
10137 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
10138
a1928bad
DJ
101392005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10140
10141 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
10142 Take unsigned long arguments for PIDs.
10143 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
10144 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
10145 (wait_for_sigstop, linux_resume_one_process)
10146 (regsets_fetch_inferior_registers, linux_send_signal)
10147 (linux_read_auxv): Likewise. Update the types of variables holding
10148 PIDs. Update format string specifiers.
10149 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
10150 * remote-utils.c (prepare_resume_reply): Likewise.
10151 * server.c (cont_thread, general_thread, step_thread)
10152 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
10153 unsigned long.
10154 (handle_query): Update format specifiers.
10155 (handle_v_cont, main): Use strtoul for thread IDs.
10156 * server.h (struct inferior_list_entry): Use unsigned long for ID.
10157 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
10158 (general_thread, step_thread, thread_from_wait)
10159 (old_thread_from_wait): Update.
10160 * target.h (struct thread_resume): Use unsigned long for THREAD.
10161 (struct target_ops): Use unsigned long for arguments to attach and
10162 thread_alive.
10163
dcdb98d2
DJ
101642005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
10165
10166 * acinclude.m4: Include bfd/bfd.m4 directly.
10167 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
10168 <agriffis@toolchain.org>.
10169 * aclocal.m4, configure: Regenerated.
10170
bec39cab
AC
101712005-01-07 Andrew Cagney <cagney@gnu.org>
10172
10173 * configure.ac: Rename configure.in, require autoconf 2.59.
10174 * configure: Re-generate.
10175
434c4c77
DJ
101762004-12-08 Daniel Jacobowitz <dan@debian.org>
10177
10178 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
10179 LIBS when finished.
10180 * aclocal.m4: Regenerated.
10181 * configure: Regenerated.
10182
db1d3e1b
AS
101832004-11-21 Andreas Schwab <schwab@suse.de>
10184
10185 * linux-m68k-low.c (m68k_num_gregs): Define.
10186 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
10187 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
10188 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
10189 (m68k_breakpoint_at): New. Add to the_low_target.
10190
10191 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10192 srv_linux_thread_db to yes.
10193
43360365
JB
101942004-10-20 Joel Brobecker <brobecker@gnat.com>
10195
10196 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10197 (ARCH_SET_FS): Likewise.
10198 (ARCH_GET_FS): Likewise.
10199 (ARCH_GET_GS): Likewise.
10200
fd500816
DJ
102012004-10-16 Daniel Jacobowitz <dan@debian.org>
10202
10203 * linux-i386-low.c (ps_get_thread_area): New.
10204 * linux-x86-64-low.c (ps_get_thread_area): New.
10205 * linux-low.c: Include <sys/syscall.h>.
10206 (linux_kill_one_process): Don't kill the first thread here.
10207 (linux_kill): Kill the first thread here.
10208 (kill_lwp): New function.
10209 (send_sigstop, linux_send_signal): Use it.
10210 * proc-service.c: Clean up #ifdefs.
10211 (fpregset_info): Delete.
10212 (ps_lgetregs): Update and enable implementation.
10213 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
10214 implementations.
10215 * remote-utils.c (struct sym_cache, symbol_cache): New.
10216 (input_interrupt): Print a clearer message.
10217 (async_io_enabled): New variable.
10218 (enable_async_io, disable_async_io): Use it. Update comments.
10219 (look_up_one_symbol): Use the symbol cache.
10220 * thread-db.c (thread_db_look_up_symbols): New function.
10221 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
10222
f6de3c42
DJ
102232004-10-16 Daniel Jacobowitz <dan@debian.org>
10224
10225 * configure.in: Test for -rdynamic.
10226 * configure: Regenerated.
10227 * Makefile (INTERNAL_LDFLAGS): New.
10228 (gdbserver, gdbreplay): Use it.
10229
2c0fc042
AC
102302004-09-02 Andrew Cagney <cagney@gnu.org>
10231
10232 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10233
075b3282
DJ
102342004-03-23 Daniel Jacobowitz <drow@mvista.com>
10235
10236 * linux-low.c (linux_wait): Clear all_processes list also.
10237
fa6a77dc
DJ
102382004-03-12 Daniel Jacobowitz <drow@mvista.com>
10239
10240 * linux-low.c: Include <errno.h>. Remove extern declaration of
10241 errno.
10242
6d782a97
DJ
102432004-03-12 Daniel Jacobowitz <drow@mvista.com>
10244
10245 * gdbreplay.c, server.h, utils.c: Update copyright years.
10246
3a7fb99b
DJ
102472004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10248
10249 * server.c (main): Print child status or termination signal from
10250 variable 'signal', not 'sig'.
10251
c3e735a6
DJ
102522004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10253
10254 * linux-low.c (linux_read_memory): Change return type to
10255 int. Check for and return error from ptrace().
10256 * target.c (read_inferior_memory): Change return type to int. Pass
10257 back return status from the_target->read_memory().
10258 * target.h (struct target_ops): Adapt *read_memory() prototype.
10259 Update comment.
10260 (read_inferior_memory): Adapt prototype.
10261 * server.c (main): Return an error packet if
10262 read_inferior_memory() returns an error.
10263
a59d1c82
DJ
102642004-03-04 Daniel Jacobowitz <drow@mvista.com>
10265
10266 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10267 Unify with other clean targets.
10268
dc3f8883
DJ
102692004-02-29 Daniel Jacobowitz <drow@mvista.com>
10270
10271 * server.c (handle_v_cont): Call set_desired_inferior.
10272
89a208da
DJ
102732004-02-29 Daniel Jacobowitz <drow@mvista.com>
10274
10275 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10276
62ea82f5
DJ
102772004-02-29 Daniel Jacobowitz <drow@mvista.com>
10278
10279 * linux-low.c (linux_wait): Unblock async I/O.
10280 (linux_resume): Block and enable async I/O.
10281 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10282 * server.h (block_async_io, unblock_async_io): Add prototypes.
10283
6910d122
DJ
102842004-02-29 Daniel Jacobowitz <drow@mvista.com>
10285
10286 * remote-utils.c (remote_open): Print a status notice after
10287 opening a TCP port.
10288 * server.c (attach_inferior): Print a status notice after
10289 attaching.
10290
102912004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
10292
10293 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10294
c89dc5d4
DJ
102952004-02-26 Daniel Jacobowitz <drow@mvista.com>
10296
10297 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
10298 error packet.
10299 * server.c, target.h: Update copyright years.
10300
4b8dad4a
RM
103012004-02-25 Roland McGrath <roland@redhat.com>
10302
10303 * target.h (struct target_ops): New member `read_auxv'.
10304 * server.c (handle_query): Handle qPart:auxv:read: query using that.
10305 * linux-low.c (linux_read_auxv): New function.
10306 (linux_target_ops): Initialize `read_auxv' member to that.
10307
d7446758
JB
103082004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10309
10310 Committed by Jim Blandy <jimb@redhat.com>.
10311
10312 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 10313 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
10314 instead of GPR_SIZE to distiguish s390 and s390x targets.
10315
5544ad89
DJ
103162004-01-31 Daniel Jacobowitz <drow@mvista.com>
10317
10318 * linux-low.c: Update copyright year.
10319 (check_removed_breakpoint): Clear pending_is_breakpoint.
10320 (linux_set_resume_request, linux_queue_one_thread)
10321 (resume_status_pending_p): New functions.
10322 (linux_continue_one_thread): Use process->resume.
10323 (linux_resume): Only resume threads if there are no pending events.
10324 * linux-low.h (struct process_info): Add resume request
10325 pointer.
10326
2a68b70e
DJ
103272004-01-30 Daniel Jacobowitz <drow@mvista.com>
10328
10329 * regcache.c (new_register_cache): Clear the allocated register
10330 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
10331
64386c31
DJ
103322003-10-13 Daniel Jacobowitz <drow@mvista.com>
10333
10334 * linux-low.c (linux_resume): Take a struct thread_resume *
10335 argument.
10336 (linux_wait): Update call.
10337 (resume_ptr): New static variable.
10338 (linux_continue_one_thread): Renamed from
10339 linux_continue_one_process. Use resume_ptr.
10340 (linux_resume): Use linux_continue_one_thread.
10341 * server.c (handle_v_cont, handle_v_requests): New functions.
10342 (myresume): New function.
10343 (main): Handle 'v' case.
10344 * target.h (struct thread_resume): New type.
10345 (struct target_ops): Change argument of "resume" to struct
10346 thread_resume *.
10347 (myresume): Delete macro.
10348
c938e9b0
L
103492003-08-08 H.J. Lu <hongjiu.lu@intel.com>
10350
10351 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
10352 (uninstall): Support DESTDIR.
10353
7f313d07
BC
10354Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
10355
10356 * configure.srv: Add xscale*linux copy of arm*linux entry.
10357
3b2fc2ea
DJ
103582003-07-24 Daniel Jacobowitz <drow@mvista.com>
10359
10360 * linux-arm-low.c (arm_reinsert_addr): New function.
10361 (the_low_target): Add arm_reinsert_addr.
10362
1c0a559e
MK
103632003-07-08 Mark Kettenis <kettenis@gnu.org>
10364
10365 * mem-break.c: Remove whitespace at end of file.
10366
43d5792c
DJ
103672003-06-28 Daniel Jacobowitz <drow@mvista.com>
10368
10369 * configure.in: Check whether we need to prototype strerror.
10370 * server.h: Optionally prototype strerror.
10371 * gdbreplay.c (perror_with_name): Use strerror.
10372 * linux-low.c (linux_attach_lwp): Use strerror.
10373 * utils.c (perror_with_name): Use strerror.
10374 * config.in, configure: Regenerated.
10375
c8a86edf
DJ
103762003-06-28 Daniel Jacobowitz <drow@mvista.com>
10377
10378 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
10379 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
10380
73d37363
DJ
103812003-06-20 Daniel Jacobowitz <drow@mvista.com>
10382
10383 * Makefile.in (SFILES): Update.
10384 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
10385 low-sun3.c: Remove files.
10386
6ad8ae5c
DJ
103872003-06-17 Daniel Jacobowitz <drow@mvista.com>
10388
10389 * linux-low.c: Move comment to linux_thread_alive where it belonged.
10390 (linux_detach_one_process, linux_detach): New functions.
10391 (linux_target_ops): Add linux_detach.
10392 * server.c (main): Handle 'D' packet.
10393 * target.h (struct target_ops): Add "detach" member.
10394 (detach_inferior): Define.
10395
1581182a
MK
103962003-06-13 Mark Kettenis <kettenis@gnu.org>
10397
10398 From Kelley Cook <kelleycook@wideopenwest.com>:
10399 * configure.srv: Accept i[34567]86 variants.
10400
e5379b03
DJ
104012003-06-05 Daniel Jacobowitz <drow@mvista.com>
10402
10403 * linux-low.c (linux_wait_for_event): Correct comment typos.
10404 (linux_resume_one_process): Call check_removed_breakpoint.
10405 (linux_send_signal): New function.
10406 (linux_target_ops): Add linux_send_signal.
10407 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
10408 of kill.
10409 * target.h (struct target_ops): Add send_signal.
10410
2ff29de4
JB
104112003-05-29 Jim Blandy <jimb@redhat.com>
10412
10413 * linux-low.c (usr_store_inferior_registers): Transfer buf in
10414 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
10415 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
10416 away part of the register's value.
10417
254787d4
DJ
104182003-03-26 Daniel Jacobowitz <drow@mvista.com>
10419
10420 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
10421 (linux_wait_for_event, linux_init_signals): Likewise.
10422
94e10508
DJ
104232003-03-17 Daniel Jacobowitz <drow@mvista.com>
10424
10425 * configure.in: Check for stdlib.h.
10426 * configure: Regenerated.
10427 * config.in: Regenerated.
10428
4c0711e0
DJ
104292003-01-04 Andreas Schwab <schwab@suse.de>
10430
10431 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
10432
ef66e766
AC
104332003-01-02 Andrew Cagney <ac131313@redhat.com>
10434
10435 * Makefile.in: Remove obsolete code.
10436
a1358604
DJ
104372002-11-20 Daniel Jacobowitz <drow@mvista.com>
10438
10439 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
10440 defined(PT_FPR0_HI).
10441
23ce3b1c
DJ
104422002-11-17 Stuart Hughes <seh@zee2.com>
10443
10444 * linux-arm-low.c (arm_num_regs): Increase.
10445 (arm_regmap): Include status register.
10446
104472002-11-17 Daniel Jacobowitz <drow@mvista.com>
10448
10449 * linux-low.c (register_addr): Remove incorrect -1 check.
10450
a9fa9f7d
DJ
104512002-08-29 Daniel Jacobowitz <drow@mvista.com>
10452
10453 * linux-low.c (linux_create_inferior): Call setpgid. Return
10454 the new PID.
10455 (unstopped_p, linux_signal_pid): Remove.
10456 (linux_target_ops): Remove linux_signal_pid.
10457 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
10458 global instead of target method.
10459 * target.h (struct target_ops): Remove signal_pid. Update comment
10460 for create_inferior.
10461 * server.c (signal_pid): New variable.
10462 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 10463 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
10464 (attach_inferior): Set signal_pid.
10465
17574093
DJ
104662002-08-23 Daniel Jacobowitz <drow@mvista.com>
10467
10468 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
10469
104702002-08-20 Jim Blandy <jimb@redhat.com>
10471
10472 * Makefile.in (LDFLAGS): Allow the configure script to establish a
10473 default for this.
10474
104752002-08-01 Andrew Cagney <cagney@redhat.com>
10476
10477 * Makefile.in: Make chill references obsolete.
10478
104792002-07-24 Kevin Buettner <kevinb@redhat.com>
10480
10481 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
10482 * configure: Regenerate.
10483 * config.in: Regenerate.
10484
104852002-07-09 David O'Brien <obrien@FreeBSD.org>
10486
10487 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
10488 (perror_with_name, remote_close, remote_open, expect, play): Static.
10489
104902002-07-04 Michal Ludvig <mludvig@suse.cz>
10491
4b8dad4a 10492 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
10493 byte offsets instead of an array of indexes.
10494 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
10495
104962002-06-13 Daniel Jacobowitz <drow@mvista.com>
10497
10498 * regcache.c: Add comment.
10499
105002002-06-11 Daniel Jacobowitz <drow@mvista.com>
10501
10502 * thread-db.c: New file.
10503 * proc-service.c: New file.
10504 * acinclude.m4: New file.
10505 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
10506 proc-service.o, and thread-db.o.
10507 (linux-low.o): Add USE_THREAD_DB.
10508 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
10509 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
10510 * aclocal.m4: Regenerated.
10511 * config.in: Regenerated.
10512 * configure: Regenerated.
10513 * configure.in: Check for proc_service.h, sys/procfs.h,
10514 thread_db.h, and linux/elf.h headrs.
10515 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
10516 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
10517 Check for -lthread_db and thread support.
10518 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
10519 PowerPC, and SuperH.
10520 * i387-fp.c: Constify arguments.
10521 * i387-fp.h: Likewise.
10522 * inferiors.c: (struct thread_info): Renamed from
10523 `struct inferior_info'. Remove PID member. Use generic inferior
10524 list header. All uses updated.
10525 (inferiors, signal_pid): Removed.
10526 (all_threads): New variable.
10527 (get_thread): Define.
10528 (add_inferior_to_list): New function.
10529 (for_each_inferior): New function.
10530 (change_inferior_id): New function.
10531 (add_inferior): Removed.
10532 (remove_inferior): New function.
10533 (add_thread): New function.
10534 (free_one_thread): New function.
10535 (remove_thread): New function.
10536 (clear_inferiors): Use for_each_inferior and free_one_thread.
10537 (find_inferior): New function.
10538 (find_inferior_id): New function.
10539 (inferior_target_data): Update argument type.
10540 (set_inferior_target_data): Likewise.
10541 (inferior_regcache_data): Likewise.
10542 (set_inferior_regcache_data): Likewise.
10543 * linux-low.c (linux_bp_reinsert): Remove.
10544 (all_processes, stopping_threads, using_thrads)
10545 (struct pending_signals, debug_threads, pid_of): New.
10546 (inferior_pid): Replace with macro.
10547 (struct inferior_linux_data): Remove.
10548 (get_stop_pc, add_process): New functions.
10549 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
10550 Use add_process and add_thread.
10551 (linux_attach_lwp): New function, based on old linux_attach. Use
10552 add_process and add_thread. Set stop_expected for new threads.
10553 (linux_attach): New function.
10554 (linux_kill_one_process): New function.
10555 (linux_kill): Kill all LWPs.
10556 (linux_thread_alive): Use find_inferior_id.
10557 (check_removed_breakpoints, status_pending_p): New functions.
10558 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
10559 Update. Use WNOHANG. Wait for cloned processes also. Update process
10560 struct for the found process.
10561 (linux_wait_for_event): New function.
10562 (linux_wait): Use it. Support LWPs.
10563 (send_sigstop, wait_for_sigstop, stop_all_processes)
10564 (linux_resume_one_process, linux_continue_one_process): New functions.
10565 (linux_resume): Support LWPs.
10566 (REGISTER_RAW_SIZE): Remove.
10567 (fetch_register): Use register_size instead. Call supply_register.
10568 (usr_store_inferior_registers): Likewise. Call collect_register.
10569 Fix recursive case.
10570 (regsets_fetch_inferior_registers): Improve error message.
10571 (regsets_store_inferior_registers): Add debugging.
10572 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
10573 (unstopped_p, linux_signal_pid): New functions.
10574 (linux_target_ops): Add linux_signal_pid.
10575 (linux_init_signals): New function.
10576 (initialize_low): Call it. Initialize using_threads.
10577 * regcache.c (inferior_regcache_data): Add valid
10578 flag.
10579 (get_regcache): Fetch registers lazily. Add fetch argument
10580 and update all callers.
10581 (regcache_invalidate_one, regcache_invalidate): New
10582 functions.
10583 (new_register_cache): Renamed from create_register_cache.
10584 Return the new regcache.
10585 (free_register_cache): Change argument to a void *.
10586 (registers_to_string, registers_from_string): Call get_regcache
10587 with fetch flag set.
10588 (register_data): Make static. Pass fetch flag to get_regcache.
10589 (supply_register): Call get_regcache with fetch flag clear.
10590 (collect_register): Call get_regcache with fetch flag set.
10591 (collect_register_as_string): New function.
10592 * regcache.h: Update.
10593 * remote-utils.c (putpkt): Flush after debug output and use
10594 stderr.
10595 Handle input interrupts while waiting for an ACK.
10596 (input_interrupt): Use signal_pid method.
10597 (getpkt): Flush after debug output and use stderr.
10598 (outreg): Use collect_register_as_string.
10599 (new_thread_notify, dead_thread_notify): New functions.
10600 (prepare_resume_reply): Check using_threads. Set thread_from_wait
10601 and general_thread.
10602 (look_up_one_symbol): Flush after debug output.
10603 * server.c (step_thread, server_waiting): New variables.
10604 (start_inferior): Don't use signal_pid. Update call to mywait.
10605 (attach_inferior): Update call to mywait.
10606 (handle_query): Handle qfThreadInfo and qsThreadInfo.
10607 (main): Don't fetch/store registers explicitly. Use
10608 set_desired_inferior. Support proposed ``Hs'' packet. Update
10609 calls to mywait.
10610 * server.h: Update.
10611 (struct inferior_list, struct_inferior_list_entry): New.
10612 * target.c (set_desired_inferior): New.
10613 (write_inferior_memory): Constify.
10614 (mywait): New function.
10615 * target.h: Update.
10616 (struct target_ops): New signal_pid method.
10617 (mywait): Removed macro, added prototype.
10618
10619 * linux-low.h (regset_func): Removed.
10620 (regset_fill_func, regset_store_func): New.
10621 (enum regset_type): New.
10622 (struct regset_info): Add type field. Use new operation types.
10623 (struct linux_target_ops): stop_pc renamed to get_pc.
10624 Add decr_pc_after_break and breakpoint_at.
10625 (get_process, get_thread_proess, get_process_thread)
10626 (strut process_info, all_processes, linux_attach_lwp)
10627 (thread_db_init): New.
10628
10629 * linux-arm-low.c (arm_get_pc, arm_set_pc,
10630 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
10631 (the_low_target): Add new members.
10632 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
10633 (i386_store_fpxregset): Constify.
10634 (target_regsets): Add new kind identifier.
10635 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
10636 (i386_set_pc): Add debugging.
10637 (i386_breakpoint_at): New function.
10638 (the_low_target): Add new members.
10639 * linux-mips-low.c (mips_get_pc, mips_set_pc)
10640 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
10641 (mips_breakpoint_at): New.
10642 (the_low_target): Add new members.
10643 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
10644 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
10645 (the_low_target): Add new members.
10646 * linux-sh-low.c (sh_get_pc, sh_set_pc)
10647 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
10648 (the_low_target): Add new members.
10649 * linux-x86-64-low.c (target_regsets): Add new kind
10650 identifier.
10651
106522002-05-15 Daniel Jacobowitz <drow@mvista.com>
10653
10654 From Martin Pool <mbp@samba.org>:
10655 * server.c (gdbserver_usage): New function.
10656 (main): Call it.
10657
106582002-05-14 Daniel Jacobowitz <drow@mvista.com>
10659
10660 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
10661 stop_at -> stop_pc.
10662
106632002-05-04 Andrew Cagney <ac131313@redhat.com>
10664
10665 * Makefile.in: Remove obsolete code.
10666
106672002-04-24 Michal Ludvig <mludvig@suse.cz>
10668
10669 * linux-low.c (regsets_fetch_inferior_registers),
10670 (regsets_store_inferior_registers): Removed cast to int from
10671 ptrace() calls.
10672 * regcache.h: Added declaration of struct inferior_info.
10673
106742002-04-20 Daniel Jacobowitz <drow@mvista.com>
10675
10676 * inferiors.c (struct inferior_info): Add regcache_data.
10677 (add_inferior): Call create_register_cache.
10678 (clear_inferiors): Call free_register_cache.
10679 (inferior_regcache_data, set_inferior_regcache_data): New functions.
10680 * regcache.c (struct inferior_regcache_data): New.
10681 (registers): Remove.
10682 (get_regcache): New function.
10683 (create_register_cache, free_register_cache): New functions.
10684 (set_register_cache): Don't initialize the register cache here.
10685 (registers_to_string, registers_from_string, register_data): Call
10686 get_regcache.
10687 * regcache.h: Add prototypes.
10688 * server.h: Likewise.
10689
106902002-04-20 Daniel Jacobowitz <drow@mvista.com>
10691
10692 * mem-break.c: New file.
10693 * mem-break.h: New file.
10694 * Makefile.in: Add mem-break.o rule; update server.h
10695 dependencies.
10696 * inferiors.c (struct inferior_info): Add target_data
10697 member.
10698 (clear_inferiors): Free target_data member if set.
10699 (inferior_target_data, set_inferior_target_data): New functions.
10700 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
10701 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
10702 * linux-low.c (linux_bp_reinsert): New variable.
10703 (struct inferior_linux_data): New.
10704 (linux_create_inferior): Use set_inferior_target_data.
10705 (linux_attach): Likewise. Call add_inferior.
10706 (linux_wait_for_one_inferior): New function.
10707 (linux_wait): Call it.
10708 (linux_write_memory): Add const.
10709 (initialize_low): Call set_breakpoint_data.
10710 * linux-low.h (struct linux_target_ops): Add breakpoint
10711 handling members.
10712 * server.c (attach_inferior): Remove extra add_inferior
10713 call.
10714 * server.h: Include mem-break.h. Update inferior.c
10715 prototypes.
10716 * target.c (read_inferior_memory)
10717 (write_inferior_memory): New functions.
10718 * target.h (read_inferior_memory)
10719 (write_inferior_memory): Change macros to prototypes.
10720 (struct target_ops): Update comments. Add const to write_memory
10721 definition.
10722
107232002-04-11 Daniel Jacobowitz <drow@mvista.com>
10724
10725 * linux-low.c (usr_store_inferior_registers): Support
10726 registers which are allowed to fail to store.
10727 * linux-low.h (linux_target_ops): Likewise.
10728 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
10729 (ppc_cannot_store_register): FPSCR may not be storable.
10730
107312002-04-09 Daniel Jacobowitz <drow@mvista.com>
10732
10733 * server.h: Include <string.h> if HAVE_STRING_H.
10734 * ChangeLog: Correct paths in last ChangeLog entry.
10735
107362002-04-09 Daniel Jacobowitz <drow@mvista.com>
10737
10738 * linux-low.h: Remove obsolete prototypes.
10739 (struct linux_target_ops): New.
10740 (extern the_low_target): New.
10741 * linux-low.c (num_regs, regmap): Remove declarations.
10742 (register_addr): Use the_low_target explicitly.
10743 (fetch_register): Likewise.
10744 (usr_fetch_inferior_registers): Likewise.
10745 (usr_store_inferior_registers): Likewise.
10746 * linux-arm-low.c (num_regs): Remove.
10747 (arm_num_regs): Define.
10748 (arm_regmap): Renamed from regmap, made static.
10749 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
10750 made static.
10751 (arm_cannot_store_register): Renamed from cannot_store_register,
10752 made static.
10753 (the_low_target): New.
10754 * linux-i386-low.c (num_regs): Remove.
10755 (i386_num_regs): Define.
10756 (i386_regmap): Renamed from regmap, made static.
10757 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
10758 made static.
10759 (i386_cannot_store_register): Renamed from cannot_store_register,
10760 made static.
10761 (the_low_target): New.
10762 * linux-ia64-low.c (num_regs): Remove.
10763 (ia64_num_regs): Define.
10764 (ia64_regmap): Renamed from regmap, made static.
10765 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
10766 made static.
10767 (ia64_cannot_store_register): Renamed from cannot_store_register,
10768 made static.
10769 (the_low_target): New.
10770 * linux-m68k-low.c (num_regs): Remove.
10771 (m68k_num_regs): Define.
10772 (m68k_regmap): Renamed from regmap, made static.
10773 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
10774 made static.
10775 (m68k_cannot_store_register): Renamed from cannot_store_register,
10776 made static.
10777 (the_low_target): New.
10778 * linux-mips-low.c (num_regs): Remove.
10779 (mips_num_regs): Define.
10780 (mips_regmap): Renamed from regmap, made static.
10781 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
10782 made static.
10783 (mips_cannot_store_register): Renamed from cannot_store_register,
10784 made static.
10785 (the_low_target): New.
10786 * linux-ppc-low.c (num_regs): Remove.
10787 (ppc_num_regs): Define.
10788 (ppc_regmap): Renamed from regmap, made static.
10789 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
10790 made static.
10791 (ppc_cannot_store_register): Renamed from cannot_store_register,
10792 made static.
10793 (the_low_target): New.
10794 * linux-s390-low.c (num_regs): Remove.
10795 (s390_num_regs): Define.
10796 (s390_regmap): Renamed from regmap, made static.
10797 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
10798 made static.
10799 (s390_cannot_store_register): Renamed from cannot_store_register,
10800 made static.
10801 (the_low_target): New.
10802 * linux-sh-low.c (num_regs): Remove.
10803 (sh_num_regs): Define.
10804 (sh_regmap): Renamed from regmap, made static.
10805 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
10806 made static.
10807 (sh_cannot_store_register): Renamed from cannot_store_register,
10808 made static.
10809 (the_low_target): New.
10810 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
10811 (the_low_target): New.
10812
108132002-04-09 Daniel Jacobowitz <drow@mvista.com>
10814
10815 * Makefile.in: Add stamp-h target.
10816 * configure.in: Create stamp-h.
10817 * configure: Regenerated.
10818
108192002-04-09 Daniel Jacobowitz <drow@mvista.com>
10820
10821 * inferiors.c: New file.
10822 * target.c: New file.
10823 * target.h: New file.
10824 * Makefile.in: Add target.o and inferiors.o. Update
10825 dependencies.
10826 * linux-low.c (inferior_pid): New static variable,
10827 moved from server.c.
10828 (linux_create_inferior): Renamed from create_inferior.
10829 Call add_inferior. Return 0 on success instead of a PID.
10830 (linux_attach): Renamed from myattach.
10831 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
10832 (linux_thread_alive): Renamed from mythread_alive.
10833 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
10834 child dies.
10835 (linux_resume): Renamed from myresume. Add missing ``return 0''.
10836 (regsets_store_inferior_registers): Correct error message.
10837 Add missing ``return 0''.
10838 (linux_fetch_registers): Renamed from fetch_inferior_registers.
10839 (linux_store_registers): Renamed from store_inferior_registers.
10840 (linux_read_memory): Renamed from read_inferior_memory.
10841 (linux_write_memory): Renamed from write_inferior_memory.
10842 (linux_target_ops): New structure.
10843 (initialize_low): Call set_target_ops ().
10844 * remote-utils.c (unhexify): New function.
10845 (hexify): New function.
10846 (input_interrupt): Send signals to ``signal_pid''.
10847 * server.c (inferior_pid): Remove.
10848 (start_inferior): Update create_inferior call.
10849 (attach_inferior): Call add_inferior.
10850 (handle_query): New function.
10851 (main): Call handle_query for `q' packets.
10852 * server.h: Include "target.h". Remove obsolete prototypes.
10853 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
10854
108552002-04-09 Daniel Jacobowitz <drow@mvista.com>
10856
10857 * Makefile.in: Add WARN_CFLAGS. Update configury
10858 dependencies.
10859 * configure.in: Check for <string.h>
10860 * configure: Regenerate.
10861 * config.in: Regenerate.
10862 * gdbreplay.c: Include needed system headers.
10863 (remote_open): Remove strchr prototype.
10864 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
10865 * regcache.c (supply_register): Change buf argument to const void *.
10866 (supply_register_by_name): Likewise.
10867 (collect_register): Change buf argument to void *.
10868 (collect_register_by_name): Likewise.
10869 * regcache.h: Add missing prototypes.
10870 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
10871 * server.c (handle_query): New function.
10872 (attached): New static variable, moved out of main.
10873 (main): Quiet longjmp clobber warnings.
10874 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
10875 * utils.c (error): Remove NORETURN.
10876 (fatal): Likewise.