]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
Automatic date update in version.in
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
3e572f71
PA
12015-03-04 Pedro Alves <palves@redhat.com>
2
3 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
4 Decide whether a breakpoint triggered based on the SIGTRAP's
5 siginfo.si_code.
6 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
7 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
8 (linux_low_filter_event): Check for breakpoints before checking
9 watchpoints.
10 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
11 siginfo.si_code.
12 (linux_stopped_by_sw_breakpoint)
13 (linux_supports_stopped_by_sw_breakpoint)
14 (linux_stopped_by_hw_breakpoint)
15 (linux_supports_stopped_by_hw_breakpoint): New functions.
16 (linux_target_ops): Install new target methods.
17
1ec68e26
PA
182015-03-04 Pedro Alves <palves@redhat.com>
19
20 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
21 * server.c (swbreak_feature, hwbreak_feature): New globals.
22 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
23 (captured_main): Clear swbreak_feature and hwbreak_feature.
24 * server.h (swbreak_feature, hwbreak_feature): Declare.
25 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
26 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
27 supports_stopped_by_hw_breakpoint>: New fields.
28 (target_supports_stopped_by_sw_breakpoint)
29 (target_stopped_by_sw_breakpoint)
30 (target_supports_stopped_by_hw_breakpoint)
31 (target_stopped_by_hw_breakpoint): Declare.
32
15c66dd6
PA
332015-03-04 Pedro Alves <palves@redhat.com>
34
35 enum lwp_stop_reason -> enum target_stop_reason
36 * linux-low.c (check_stopped_by_breakpoint): Adjust.
37 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
38 (linux_wait_1, stuck_in_jump_pad_callback)
39 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
40 (linux_stopped_by_watchpoint):
41 * linux-low.h (enum lwp_stop_reason): Delete.
42 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
43 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
44
98fc70d6
YQ
452015-03-04 Yao Qi <yao.qi@linaro.org>
46
47 * Makefile.in (SFILES): Add linux-aarch64-low.c.
48
dd2ac174
GB
492015-03-03 Gary Benson <gbenson@redhat.com>
50
51 * hostio.c (handle_vFile): Fix prefix lengths.
52
d68e53f4
MM
532015-03-03 Markus Metzger <markus.t.metzger@intel.com>
54
55 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
56 ptr_bits.
57
bf2d68ab
AA
582015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
59
60 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
61 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
62 (clean): Add "rm -f" for above C files.
63 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
64 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
65 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
66 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
67 * linux-s390-low.c (HWCAP_S390_VX): New macro.
68 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
69 (init_registers_s390x_vx_linux64)
70 (init_registers_s390x_tevx_linux64)
71 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
72 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
73 declarations.
74 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
75 (s390_store_vxrs_high): New functions.
76 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
77 NT_S390_VXRS_HIGH.
78 (s390_arch_setup): Add logic for selecting one of the new target
79 descriptions. Activate the new vector regsets if applicable.
80 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
81 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
82 and init_registers_s390x_tevx_linux64.
83
c966a859
PA
842015-03-01 Pedro Alves <palves@redhat.com>
85
86 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
87 parameter.
88
4180215b
PA
892015-02-27 Pedro Alves <palves@redhat.com>
90
91 * linux-x86-low.c (u_debugreg_offset): New function.
92 (x86_linux_dr_get, x86_linux_dr_set): Use it.
93
749bab01
PA
942015-02-27 Pedro Alves <palves@redhat.com>
95
96 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
97 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
98 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
99 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
100 (ps_lsetfpregs, ps_getpid)
101 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
102 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
103 (ps_lsetxregs, ps_plog): Declare.
104
3c14e5a3
PA
1052015-02-27 Pedro Alves <palves@redhat.com>
106
107 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
108 IP_AGENT_EXPORT_FUNC.
109 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
110 IP_AGENT_EXPORT_FUNC.
111 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
112 (IP_AGENT_EXPORT): Delete.
113 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
114 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
115 (gdb_trampoline_buffer_error, collecting, gdb_collect)
116 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
117 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
118 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
119 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
120 (traceframe_read_count, traceframe_write_count)
121 (traceframes_created, trace_state_variables, get_raw_reg)
122 (get_trace_state_variable_value, set_trace_state_variable_value)
123 (ust_loaded, helper_thread_id, cmd_buf): Use
124 IPA_SYM_EXPORTED_NAME.
125 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
126 (tracepoints) Use IP_AGENT_EXPORT_VAR.
127 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
128 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
129 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
130 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
131 EXTERN_C_PUSH/EXTERN_C_POP.
132 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
133 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
134 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
135 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
136 (traceframe_write_count, traceframe_read_count)
137 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
138 (about_to_request_buffer_space, get_trace_state_variable_value)
139 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
140 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
141 EXTERN_C_PUSH/EXTERN_C_POP.
142 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
143 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
144 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
145 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
146 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
147 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
148 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
149 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
150 Define.
151 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
152 (IP_AGENT_EXPORT_VAR_DECL): Define.
153 (tracing): Declare.
154 (gdb_agent_get_raw_reg): Declare.
155
fe978cb0
PA
1562015-02-27 Tom Tromey <tromey@redhat.com>
157 Pedro Alves <palves@redhat.com>
158
159 Rename symbols whose names are reserved C++ keywords throughout.
160
3bc3d82a
PA
1612015-02-27 Pedro Alves <palves@redhat.com>
162
163 * Makefile.in (COMPILER): New, get it from autoconf.
164 (CXX): Get from autoconf instead.
165 (COMPILE.pre): Use COMPILER.
166 (CC-LD): Rename to ...
167 (CC_LD): ... this. Use COMPILER.
168 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
169 (CXX_FOR_TARGET): Default to g++ instead of gcc.
170 * acinclude.m4: Include build-with-cxx.m4.
171 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
172 Disable -Werror by default if building in C++ mode.
173 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
174 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
175 the C++ compiler. Save/restore CXXFLAGS too.
176 * configure: Regenerate.
177
07697489
PA
1782015-02-27 Pedro Alves <palves@redhat.com>
179
180 * acinclude.m4: Include libiberty.m4.
181 * configure.ac: Call libiberty_INIT.
182 * config.in, configure: Regenerate.
183
9beb7c4e
PA
1842015-02-26 Pedro Alves <palves@redhat.com>
185
186 * linux-low.c (linux_wait_1): When incrementing the PC past a
187 program breakpoint always use the_low_target.breakpoint_len as
188 increment, rather than the maximum between that and
189 the_low_target.decr_pc_after_break.
190
8090aef2
PA
1912015-02-23 Pedro Alves <palves@redhat.com>
192
193 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
194 thread was doing a step-over; always adjust the PC if
195 we stepped over a permanent breakpoint.
196 (linux_wait_1): If we stepped over breakpoint that was on top of a
197 permanent breakpoint, manually advance the PC past it.
198
bc9540e8
PA
1992015-02-23 Pedro Alves <palves@redhat.com>
200
201 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
202 modes.
203 (x86_fill_gregset, x86_store_gregset): Use it when handling
204 $orig_eax.
205
2db9a427
PA
2062015-02-20 Pedro Alves <palves@redhat.com>
207
208 * thread-db.c: Include "nat/linux-procfs.h".
209 (thread_db_init): Skip listing new threads if the kernel supports
210 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
211
afa8d396
PA
2122015-02-20 Pedro Alves <palves@redhat.com>
213
214 * linux-low.c (status_pending_p_callback): Use ptid_match.
215
c9587f88
AT
2162015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
217
218 PR breakpoints/16812
219 * linux-low.c (wstatus_maybe_breakpoint): Remove.
220 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
221 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
222
b05ec7a5
AT
2232015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
224
225 PR breakpoints/15956
226 * tracepoint.c (cmd_qtinit): Add check for current_thread.
227
d33501a5
MM
2282015-02-09 Markus Metzger <markus.t.metzger@intel.com>
229
230 * linux-low.c (linux_low_btrace_conf): Print size.
231 * server.c (handle_btrace_conf_general_set): New.
232 (hanle_general_set): Call handle_btrace_conf_general_set.
233 (handle_query): Report Qbtrace-conf:bts:size as supported.
234
f4abbc16
MM
2352015-02-09 Markus Metzger <markus.t.metzger@intel.com>
236
237 * linux-low.c (linux_low_enable_btrace): Update parameters.
238 (linux_low_btrace_conf): New.
239 (linux_target_ops)<to_btrace_conf>: Initialize.
240 * server.c (current_btrace_conf): New.
241 (handle_btrace_enable): Rename to ...
242 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
243 to target_enable_btrace. Update comment. Update users.
244 (handle_qxfer_btrace_conf): New.
245 (qxfer_packets): Add btrace-conf entry.
246 (handle_query): Report qXfer:btrace-conf:read as supported packet.
247 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
248 (target_ops)<read_btrace_conf>: New.
249 (target_enable_btrace): Update parameters.
250 (target_read_btrace_conf): New.
251
043c3577
MM
2522015-02-09 Markus Metzger <markus.t.metzger@intel.com>
253
254 * server.c (handle_btrace_general_set): Remove call to
255 target_supports_btrace.
256 (supported_btrace_packets): New.
257 (handle_query): Call supported_btrace_packets.
258 * target.h: include btrace-common.h.
259 (btrace_target_info): Removed.
260 (supports_btrace, target_supports_btrace): Update parameters.
261
734b0e4b
MM
2622015-02-09 Markus Metzger <markus.t.metzger@intel.com>
263
264 * Makefile.in (SFILES): Add common/btrace-common.c.
265 (OBS): Add common/btrace-common.o.
266 (btrace-common.o): Add build rules.
267 * linux-low: Include btrace-common.h.
268 (linux_low_read_btrace): Use struct btrace_data. Call
269 btrace_data_init and btrace_data_fini.
270
d6c146e9
PA
2712015-02-06 Pedro Alves <palves@redhat.com>
272
273 * thread-db.c (find_new_threads_callback): Add debug output.
274
20ba1ce6
PA
2752015-02-04 Pedro Alves <palves@redhat.com>
276
277 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
278 (resume_stopped_resumed_lwps): New function.
279 (linux_wait_for_event_filtered): Use it.
280
8cc73a39
SDJ
2812015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
282
283 * Makefile.in (SFILES): Add linux-personality.c.
284 (linux-personality.o): New rule.
285 * configure.srv (srv_linux_obj): Add linux-personality.o to the
286 list of objects to be built.
287 * linux-low.c: Include nat/linux-personality.h.
288 (linux_create_inferior): Remove code to disable address space
289 randomization (moved to ../nat/linux-personality.c). Create
290 cleanup to disable address space randomization.
291
fb23d554
SDJ
2922015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
293
294 * Makefile.in (posix-strerror.o): New rule.
295 (mingw-strerror.o): Likewise.
296 * configure: Regenerated.
297 * configure.ac: Source file ../common/common.host. Initialize new
298 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
299
cdf43629
YQ
3002015-01-14 Yao Qi <yao@codesourcery.com>
301
302 * Makefile.in (SFILES): Add nat/ppc-linux.c.
303 (ppc-linux.o): New rule.
304 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
305 * configure.ac: AC_CHECK_FUNCS(getauxval).
306 * config.in: Re-generated.
307 * configure: Re-generated.
308 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
309 ppc64_64bit_inferior_p
310
514c5338
YQ
3112015-01-14 Yao Qi <yao@codesourcery.com>
312
313 * linux-ppc-low.c: Include "nat/ppc-linux.h".
314 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
315 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
316 (PT_ORIG_R3, PT_TRAP): Likewise.
317 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
318 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
319 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
320
3368c1e5
JB
3212015-01-10 Joel Brobecker <brobecker@adacore.com>
322
323 * i387-fp.c (i387_cache_to_xsave): In look over
324 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
325 zmmh_low_space field by use of zmmh_high_space.
326
582511be
PA
3272015-01-09 Pedro Alves <palves@redhat.com>
328
329 * linux-low.c (step_over_bkpt): Move higher up in the file.
330 (handle_extended_wait): Don't store the stop_pc here.
331 (get_stop_pc): Adjust comments and rename to ...
332 (check_stopped_by_breakpoint): ... this. Record whether the LWP
333 stopped for a software breakpoint or hardware breakpoint.
334 (thread_still_has_status_pending_p): New function.
335 (status_pending_p_callback): Use
336 thread_still_has_status_pending_p. If the event is no longer
337 interesting, resume the LWP.
338 (handle_tracepoints): Add assert.
339 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
340 (wstatus_maybe_breakpoint): New function.
341 (cancel_breakpoint): Delete function.
342 (check_stopped_by_watchpoint): New function, factored out from
343 linux_low_filter_event.
344 (lp_status_maybe_breakpoint): Delete function.
345 (linux_low_filter_event): Remove filter_ptid argument.
346 Leave thread group exits pending here. Store the LWP's stop PC.
347 Always leave events pending.
348 (linux_wait_for_event_filtered): Pull all events out of the
349 kernel, and leave them all pending.
350 (count_events_callback, select_event_lwp_callback): Consider all
351 events.
352 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
353 (select_event_lwp): Only give preference to the stepping LWP in
354 all-stop mode. Adjust comments.
355 (ignore_event): New function.
356 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
357 references to cancel_breakpoints. Adjust to renames. Also give
358 equal priority to all LWPs that have had events in non-stop mode.
359 If reporting a software breakpoint event, unadjust the LWP's PC.
360 (linux_wait): If linux_wait_1 returned an ignored event, retry.
361 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
362 Adjust.
363 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
364 (resume_status_pending_p): Use thread_still_has_status_pending_p.
365 (linux_stopped_by_watchpoint): Adjust.
366 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
367 * linux-low.h (enum lwp_stop_reason): New.
368 (struct lwp_info) <stop_pc>: Adjust comment.
369 <stopped_by_watchpoint>: Delete field.
370 <stop_reason>: New field.
371 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
372 * mem-break.c (software_breakpoint_inserted_here)
373 (hardware_breakpoint_inserted_here): New function.
374 * mem-break.h (software_breakpoint_inserted_here)
375 (hardware_breakpoint_inserted_here): Declare.
376 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
377 (cancel_breakpoints): Delete.
378 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
379 (upload_fast_traceframes): Remove references to
380 cancel_breakpoints.
381
a33e3959
PA
3822015-01-09 Pedro Alves <palves@redhat.com>
383
384 * thread-db.c (find_new_threads_callback): Ignore thread if the
385 kernel thread ID is -1.
386
8784d563
PA
3872015-01-09 Pedro Alves <palves@redhat.com>
388
389 * linux-low.c (linux_attach_fail_reason_string): Move to
390 nat/linux-ptrace.c, and rename.
391 (linux_attach_lwp): Update comment.
392 (attach_proc_task_lwp_callback): New function.
393 (linux_attach): Adjust to rename and use
394 linux_proc_attach_tgid_threads.
395 (linux_attach_fail_reason_string): Delete declaration.
396
76f2b779
JB
3972015-01-01 Joel Brobecker <brobecker@adacore.com>
398
399 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
400 * server.c (gdbserver_version): Likewise.
401
fafcc06a
SDJ
4022014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
403
404 * remote-utils.c: Include ctype.h.
405 (input_interrupt): Explicitly handle the case when the char
406 received is the NUL byte. Improve the printing of non-ASCII
407 characters.
408
beed38b8
JB
4092014-12-16 Joel Brobecker <brobecker@adacore.com>
410
411 * linux-low.c (linux_low_filter_event): Update call to
412 linux_enable_event_reporting following the addition of
413 a new parameter to that function.
414
bf330350
CU
4152014-12-16 Catalin Udma <catalin.udma@freescale.com>
416
417 PR server/17457
418 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
419 (AARCH64_FPCR_REGNO): Likewise.
420 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
421 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
422 (aarch64_store_fpregset): Likewise.
423
5227d625
JB
4242014-12-15 Joel Brobecker <brobecker@adacore.com>
425
426 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
427 Remove FIXME comment about assumption about N.
428
f93b65a0
JB
4292014-12-13 Joel Brobecker <brobecker@adacore.com>
430
431 * configure.ac: If large-file support is disabled in GDBserver,
432 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
433 * configure: Regenerate.
434
e5a9158d
AA
4352014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
436
437 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
438 warning upon ENODATA from ptrace.
439 * linux-s390-low.c (s390_store_tdb): New.
440 (s390_regsets): Add regset for NT_S390_TDB.
441
feea5f36
AA
4422014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
443
444 * linux-low.c (regsets_store_inferior_registers): Skip regsets
445 without a fill_function.
446 * linux-s390-low.c (s390_fill_last_break): Remove.
447 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
448 (s390_arch_setup): Use regset's size instead of fill_function for
449 loop end condition.
450
098dbe61
AA
4512014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
452
453 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
454 the regset's store function when ptrace returned an error.
455 * regcache.c (get_thread_regcache): Invalidate register cache
456 before fetching inferior's registers.
457
28eef672
AA
4582014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
459
460 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
461 while-loop as for-loop.
462 (regsets_store_inferior_registers): Likewise.
463
bdca27a2
YQ
4642014-11-28 Yao Qi <yao@codesourcery.com>
465
466 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
467 * config.in, configure: Re-generate.
468 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
469 is defined.
470
9c232dda
YQ
4712014-11-21 Yao Qi <yao@codesourcery.com>
472
473 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
474 (AC_CHECK_HEADERS): Remove malloc.h.
475 * configure: Re-generated.
476 * config.in: Re-generated.
477 * server.h: Don't include alloca.h and malloc.h.
478 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
479 Don't include malloc.h.
480
43968415
JB
4812014-11-17 Joel Brobecker <brobecker@adacore.com>
482
483 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
484 corresponding ERRNO check in same block.
485
40e91bc7
PA
4862014-11-12 Pedro Alves <palves@redhat.com>
487
488 * server.c (cont_thread): Update comment.
489 (start_inferior, attach_inferior): No longer clear cont_thread.
490 (handle_v_cont): No longer set cont_thread.
491 (captured_main): Clear cont_thread each time a GDB connects.
492
c2c118cf
PA
4932014-11-12 Pedro Alves <palves@redhat.com>
494
495 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
496 thread, and don't resume all threads if the Hc thread has exited.
497
78708b7c
PA
4982014-11-12 Pedro Alves <palves@redhat.com>
499
500 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
501 the process group instead of to a specific LWP.
502
a2abc7de
PA
5032014-10-15 Pedro Alves <palves@redhat.com>
504
505 PR server/17487
506 * win32-arm-low.c (arm_set_thread_context): Remove current_event
507 parameter.
508 (arm_set_thread_context): Delete.
509 (the_low_target): Adjust.
510 * win32-i386-low.c (debug_registers_changed)
511 (debug_registers_used): Delete.
512 (update_debug_registers_callback): New function.
513 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
514 needing to update their debug registers.
515 (win32_get_current_dr): New function.
516 (x86_dr_low_get_addr, x86_dr_low_get_control)
517 (x86_dr_low_get_status): Fetch the debug register from the thread
518 record's context.
519 (i386_initial_stuff): Adjust.
520 (i386_get_thread_context): Remove current_event parameter. Don't
521 clear debug_registers_changed nor copy DR values to
522 debug_reg_state.
523 (i386_set_thread_context): Delete.
524 (i386_prepare_to_resume): New function.
525 (i386_thread_added): Mark the thread as needing to update irs
526 debug registers.
527 (the_low_target): Remove i386_set_thread_context and install
528 i386_prepare_to_resume.
529 * win32-low.c (win32_get_thread_context): Adjust.
530 (win32_set_thread_context): Use SetThreadContext
531 directly.
532 (win32_prepare_to_resume): New function.
533 (win32_require_context): New function, factored out from ...
534 (thread_rec): ... this.
535 (continue_one_thread): Call win32_prepare_to_resume on each thread
536 we're about to continue.
537 (win32_resume): Call win32_prepare_to_resume on the event thread.
538 * win32-low.h (struct win32_thread_info)
539 <debug_registers_changed>: New field.
540 (struct win32_target_ops): Change prototype of set_thread_context,
541 delete set_thread_context and add prepare_to_resume.
542 (win32_require_context): New declaration.
543
a442d071
GB
5442014-10-08 Gary Benson <gbenson@redhat.com>
545
546 * server.h: Do not include common-exceptions.h.
547
6f1947e8
GB
5482014-10-08 Gary Benson <gbenson@redhat.com>
549
550 * server.h: Do not include cleanups.h.
551
63b434a4
JH
5522014-09-30 James Hogan <james.hogan@imgtec.com>
553
554 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
555 mips64-dsp-linux.c.
556
c4d9ceb6
YQ
5572014-09-23 Yao Qi <yao@codesourcery.com>
558
559 * linux-low.c (lp_status_maybe_breakpoint): New function.
560 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
561 (count_events_callback): Likewise.
562 (select_event_lwp_callback): Likewise.
563 (cancel_breakpoints_callback): Likewise.
564
89a5711c
DB
5652014-09-19 Don Breazeal <donb@codesourcery.com>
566
567 * linux-low.c (handle_extended_wait): Call
568 linux_ptrace_get_extended_event.
569 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
570 linux_is_extended_waitstatus.
571
bffc0964
JB
5722014-09-16 Joel Brobecker <brobecker@adacore.com>
573
574 * Makefile.in (CPPFLAGS): Define.
575 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
576 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
577
0bfdf32f
GB
5782014-09-16 Gary Benson <gbenson@redhat.com>
579
580 * inferiors.h (current_inferior): Renamed as...
581 (current_thread): New variable. All uses updated.
582 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
583 (maybe_move_out_of_jump_pad): Likewise.
584 (cancel_breakpoint): Likewise.
585 (linux_low_filter_event): Likewise.
586 (wait_for_sigstop): Likewise.
587 (linux_resume_one_lwp): Likewise.
588 (need_step_over_p): Likewise.
589 (start_step_over): Likewise.
590 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
591 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
592 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
593 and save_inferior as saved_thread.
594 * regcache.c (get_thread_regcache): Renamed saved_inferior as
595 saved_thread.
596 (regcache_invalidate_thread): Likewise.
597 * remote-utils.c (prepare_resume_reply): Likewise.
598 * thread-db.c (thread_db_get_tls_address): Likewise.
599 (disable_thread_event_reporting): Likewise.
600 (remove_thread_event_breakpoints): Likewise.
601 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
602 as saved_thread.
603 * target.h (set_desired_inferior): Renamed as...
604 (set_desired_thread): New declaration. All uses updated.
605 * server.c (myresume): Updated comment to reference thread instead
606 of inferior.
607 (handle_serial_event): Likewise.
608 (handle_target_event): Likewise.
609
361c8ade
GB
6102014-09-12 Tom Tromey <tromey@redhat.com>
611 Gary Benson <gbenson@redhat.com>
612
613 * regcache.h: Include common-regcache.h.
614 (regcache_read_pc): Don't declare.
615 * regcache.c (get_thread_regcache_for_ptid): New function.
616
bd9269f7
GB
6172014-09-11 Tom Tromey <tromey@redhat.com>
618 Gary Benson <gbenson@redhat.com>
619
620 * symbol.c: New file.
621 * Makefile.in (SFILES): Add symbol.c.
622 (OBS): Add symbol.o.
623
f8c1d06b
GB
6242014-09-11 Gary Benson <gbenson@redhat.com>
625
626 * target.c (target_stop_ptid, target_continue_ptid): New
627 functions.
628
721ec300
GB
6292014-09-11 Tom Tromey <tromey@redhat.com>
630 Gary Benson <gbenson@redhat.com>
631
632 * target.h: Include target/target.h.
633 * target.c (target_read_memory, target_read_uint32)
634 (target_write_memory): New functions.
635
c5e92cca
GB
6362014-09-11 Gary Benson <gbenson@redhat.com>
637
638 * server.h (debug_hw_points): Don't declare.
639 * server.c (debug_hw_points): Don't define. Replace all uses
640 with show_debug_regs.
641 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
642 all uses with show_debug_regs.
643
2e4bb98a
EBM
6442014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
645
646 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
647 endianness into account.
648 (ppc_supply_ptrace_register): Likewise.
649
ac740bc7
JH
6502014-09-03 James Hogan <james.hogan@imgtec.com>
651
652 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
653 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
654
97ea6506
GB
6552014-09-03 Gary Benson <gbenson@redhat.com>
656
657 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
658 ALL_DEBUG_ADDRESS_REGISTERS.
659
df7e5265
GB
6602014-09-02 Gary Benson <gbenson@redhat.com>
661
662 * i386-low.h: Renamed as...
663 * x86-low.h: New file. All type, function and variable name
664 prefixes changed from "i386_" to "x86_". All references updated.
665 * i386-low.c: Renamed as...
666 * x86-low.c: New file. All type, function and variable name
667 prefixes changed from "i386_" to "x86_". All references updated.
668
ed859da7
GB
6692014-09-02 Gary Benson <gbenson@redhat.com>
670
671 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
672 (x86_linux_new_thread): Likewise.
673
860789c7
GB
6742014-08-29 Gary Benson <gbenson@redhat.com>
675
676 * server.h (setjmp.h): Do not include.
677 (toplevel): Do not declare.
678 (common-exceptions.h): Include.
679 (cleanups.h): Likewise.
680 * server.c (toplevel): Do not define.
681 (exit_code): New static global.
682 (detach_or_kill_for_exit_cleanup): New function.
683 (main): New function. Original main renamed to...
684 (captured_main): New function.
685 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
686
ff55e1b5
GB
6872014-08-29 Gary Benson <gbenson@redhat.com>
688
689 * Makefile.in (SFILES): Add common/common-exceptions.c.
690 (OBS): Add common-exceptions.o.
691 (common-exceptions.o): New rule.
692 * utils.c (prepare_to_throw_exception): New function.
693
e9bcb658
GB
6942014-08-29 Gary Benson <gbenson@redhat.com>
695
696 * config.in: Regenerate.
697 * configure: Likewise.
698
e3180625
GB
6992014-08-29 Gary Benson <gbenson@redhat.com>
700
701 * Makefile.in (SFILES): Add common/cleanups.c.
702 (OBS): cleanups.o.
703 (cleanups.o): New rule.
704
e3d6ba5d
GB
7052014-08-29 Gary Benson <gbenson@redhat.com>
706
707 * utils.c (internal_vwarning): New function.
708
7096e886
GB
7092014-08-28 Gary Benson <gbenson@redhat.com>
710
711 * utils.h (fatal): Remove declaration.
712 * utils.c (fatal): Remove function.
713
14ce3192
GB
7142014-08-28 Gary Benson <gbenson@redhat.com>
715
716 * tracepoint.c (gdb_agent_init): Replace fatal with
717 perror_with_name.
718 (initialize_tracepoint): Likewise.
719
50278d59
GB
7202014-08-28 Gary Benson <gbenson@redhat.com>
721
722 * remote-utils.c (remote_prepare): Replace fatal with error.
723
aa96c426
GB
7242014-08-28 Gary Benson <gbenson@redhat.com>
725
726 * linux-low.c (linux_async): Replace fatal with warning.
727 Tidy up and return.
728 (linux_start_non_stop): Return -1 if linux_async failed.
729
f7160e97
GB
7302014-08-28 Gary Benson <gbenson@redhat.com>
731
732 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
733 gdb_assert.
734 (i386_dr_low_get_addr): Remove vague comment.
735 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
736 gdb_assert.
737
38e08fca
GB
7382014-08-28 Gary Benson <gbenson@redhat.com>
739
740 * inferiors.c (get_thread_process): Replace check with gdb_assert.
741 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
742 internal_error.
743 (linux_resume_one_lwp): Likewise.
744 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
745 gdb_assert.
746 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
747 with internal_error.
748 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
749 (init_register_cache): Replace fatal with gdb_assert_not_reached.
750 (find_register_by_name): Replace fatal with internal_error.
751 (find_regno): Likewise.
752 * tdesc.c (init_target_desc): Replace check with gdb_assert.
753 * thread-db.c (thread_db_create_event): Likewise.
754 (thread_db_load_search): Likewise.
755 (try_thread_db_load_1): Likewise.
756 * tracepoint.c (get_jump_space_head): Replace fatal with
757 internal_error.
758 (claim_trampoline_space): Likewise.
759 (have_fast_tracepoint_trampoline_buffer): Likewise.
760 (cmd_qtstart): Likewise.
761 (stop_tracing): Likewise.
762 (fast_tracepoint_collecting): Likewise.
763 (target_malloc): Likewise.
764 (download_tracepoint): Likewise.
765 (download_trace_state_variables): Replace check with gdb_assert.
766 (upload_fast_traceframes): Replace fatal with internal_error.
767
34abf635
GB
7682014-08-19 Tom Tromey <tromey@redhat.com>
769 Gary Benson <gbenson@redhat.com>
770
771 * Makefile.in (SFILES): Add common/common-debug.c.
772 (OBS): Add common-debug.o.
773 (common-debug.o): New rule.
774 * debug.h (debug_printf): Don't declare.
775 * debug.c (debug_printf): Renamed and rewritten as...
776 (debug_vprintf): New function.
777
f6e94d78
GB
7782014-08-19 Gary Benson <gbenson@redhat.com>
779
780 * utils.h: Do not include print-utils.h.
781
9239eeab
GB
7822014-08-19 Tom Tromey <tromey@redhat.com>
783 Gary Benson <gbenson@redhat.com>
784
785 * server.h: Add static assertion.
786 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
787
ef87c8bb
GB
7882014-08-19 Tom Tromey <tromey@redhat.com>
789 Gary Benson <gbenson@redhat.com>
790
791 * Makefile.in (SFILES): Add common/errors.c.
792 (OBS): Add errors.o.
793 (IPA_OBS): Add errors-ipa.o.
794 (errors.o): New rule.
795 (errors-ipa.o): Likewise.
796 * utils.h (perror_with_name, error, warning): Don't declare.
797 * utils.c (warning): Renamed and rewritten as...
798 (vwarning): New function.
799 (error): Renamed and rewritten as...
800 (verror): New function.
801 (internal_error): Renamed and rewritten as...
802 (internal_verror): New function.
803
bb974a24
GB
8042014-08-07 Gary Benson <gbenson@redhat.com>
805
806 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
807 * configure: Regenerate.
808 * config.in: Likewise.
809 * server.h: Do not include errno.h.
810 * event-loop.c: Likewise.
811 * hostio-errno.c: Likewise.
812 * linux-low.c: Likewise.
813 * remote-utils.c: Likewise.
814 * spu-low.c: Likewise.
815 * utils.c: Likewise.
816 * gdbreplay.c: Unconditionally include errno.h.
817
6d3d12eb
GB
8182014-08-07 Gary Benson <gbenson@redhat.com>
819
820 * server.h: Do not include string.h.
821 * event-loop.c: Likewise.
822 * linux-low.c: Likewise.
823 * regcache.c: Likewise.
824 * remote-utils.c: Likewise.
825 * spu-low.c: Likewise.
826 * utils.c: Likewise.
827
dccbb609
GB
8282014-08-07 Gary Benson <gbenson@redhat.com>
829
830 * server.h: Do not include gdb_assert.h.
831
e76df0d0
GB
8322014-08-07 Gary Benson <gbenson@redhat.com>
833
834 * server.h: Do not include common-utils.h.
835
4cb9c816
GB
8362014-08-07 Gary Benson <gbenson@redhat.com>
837
838 * server.h: Do not include ptid.h.
839 * notif.h: Likewise.
840
3995eeee
GB
8412014-08-07 Gary Benson <gbenson@redhat.com>
842
843 * server.h: Do not include gdb_locale.h.
844
cb9f1a9b
GB
8452014-08-07 Gary Benson <gbenson@redhat.com>
846
847 * server.h: Do not include gdb/signals.h.
848 * win32-low.c: Likewise.
849
a5fceff8
GB
8502014-08-07 Gary Benson <gbenson@redhat.com>
851
852 * server.h: Do not include pathmax.h.
853
b9391142
GB
8542014-08-07 Gary Benson <gbenson@redhat.com>
855
856 * server.h: Do not include libiberty.h.
857 * linux-bfin-low.c: Likewise.
858
0e443c87
GB
8592014-08-07 Gary Benson <gbenson@redhat.com>
860
861 * server.h: Do not include ansidecl.h.
862
8ebb3f56
GB
8632014-08-07 Gary Benson <gbenson@redhat.com>
864
865 * linux-x86-low.c: Do not include stddef.h.
866 * lynx-ppc-low.c: Likewise.
867 * tracepoint.c: Likewise.
868
8980bdf6
GB
8692014-08-07 Gary Benson <gbenson@redhat.com>
870
871 * server.h: Do not include stdarg.h.
872 * nto-low.c: Likewise.
873
d7096f71
GB
8742014-08-07 Gary Benson <gbenson@redhat.com>
875
876 * server.h: Do not include stdlib.h.
877 * inferiors.c: Likewise.
878 * linux-low.c: Likewise.
879 * regcache.c: Likewise.
880 * spu-low.c: Likewise.
881 * tracepoint.c: Likewise.
882 * utils.c: Likewise.
883
d02f550d
GB
8842014-08-07 Gary Benson <gbenson@redhat.com>
885
886 * server.h: Do not include stdio.h.
887 * linux-low.c: Likewise.
888 * remote-utils.c: Likewise.
889 * spu-low.c: Likewise.
890 * utils.c: Likewise.
891 * wincecompat.c: Likewise.
892
87f6c4e3
GB
8932014-08-06 Gary Benson <gbenson@redhat.com>
894
895 * regcache.c (init_register_cache): Move conditionals inside if.
896
7089dca4
GB
8972014-08-06 Gary Benson <gbenson@redhat.com>
898
899 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
900
462f517e
GB
9012014-07-31 Gary Benson <gbenson@redhat.com>
902
903 * ax.h: Do not include server.h.
904 * gdbthread.h: Likewise.
905 * lynx-low.h: Likewise.
906 * notif.h: Likewise.
907
976411d6
GB
9082014-07-30 Gary Benson <gbenson@redhat.com>
909
910 * server.h: Include common-defs.h.
911 Do not include config.h or build-gnulib-gdbserver/config.h.
912
d41f6d8e
GB
9132014-07-30 Gary Benson <gbenson@redhat.com>
914
915 * hostio-errno.c: Move server.h to top of includes list.
916 * inferiors.c: Likewise.
917 * linux-x86-low.c: Likewise.
918 * notif.c: Include server.h.
919
314c6a35
TT
9202014-07-24 Tom Tromey <tromey@redhat.com>
921 Gary Benson <gbenson@redhat.com>
922
923 * server.h (CORE_ADDR): Now unsigned.
924
69ff6be5
PA
9252014-07-16 Pedro Alves <palves@redhat.com>
926
927 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
928
ce9e3fe7
PA
9292014-07-15 Pedro Alves <palves@redhat.com>
930
931 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
932 copy.
933
e76126e8
PA
9342014-07-11 Pedro Alves <palves@redhat.com>
935
936 * linux-low.c (kill_wait_lwp): New function, based on
937 kill_one_lwp_callback, but use my_waitpid directly.
938 (kill_one_lwp_callback, linux_kill): Use it.
939
8e9db26e
PA
9402014-06-23 Pedro Alves <palves@redhat.com>
941
942 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
943 before setting DR0..DR3.
944
698b3e08
GB
9452014-06-20 Gary Benson <gbenson@redhat.com>
946
947 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
948 * configure: Regenerated.
949 * config.in: Likewise.
950
125f8a3d
GB
9512014-06-20 Gary Benson <gbenson@redhat.com>
952
953 * Makefile.in (SFILES): Update locations for files moved
954 from common to nat.
955 (object file files): Reordered.
956
42995dbd
GB
9572014-06-20 Gary Benson <gbenson@redhat.com>
958
959 * i386-low.h (i386_dr_low_can_set_addr): Removed.
960 (i386_dr_low_set_addr): Likewise.
961 (i386_dr_low_get_addr): Likewise.
962 (i386_dr_low_can_set_control): Likewise.
963 (i386_dr_low_set_control): Likewise.
964 (i386_dr_low_get_control): Likewise.
965 (i386_dr_low_get_status): Likewise.
966 (i386_get_debug_register_length): Likewise.
967 * linux-x86-low.c (i386_dr_low_set_addr):
968 Changed signature. Made static.
969 (i386_dr_low_get_addr): Likewise.
970 (i386_dr_low_set_control): Likewise.
971 (i386_dr_low_get_control): Likewise.
972 (i386_dr_low_get_status): Likewise.
973 (i386_dr_low): New global variable.
974 * win32-i386-low.c (i386_dr_low_set_addr):
975 Changed signature. Made static.
976 (i386_dr_low_get_addr): Likewise.
977 (i386_dr_low_set_control): Likewise.
978 (i386_dr_low_get_control): Likewise.
979 (i386_dr_low_get_status): Likewise.
980 (i386_dr_low): New global variable.
981
e1d2394b
MS
9822014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
983
984 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
985 * Makefile.in (AR, AR_FLAGS): Define.
986 * configure: Regenerate.
987
3a8ee006
GB
9882014-06-19 Gary Benson <gbenson@redhat.com>
989
990 * Makefile.in (i386-dregs.o): New rule.
991 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
992 * i386-low.c (target.h): Remove include.
993 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
994 (DR_CONTROL_SHIFT): Likewise.
995 (DR_CONTROL_SIZE): Likewise.
996 (DR_RW_EXECUTE): Likewise.
997 (DR_RW_WRITE): Likewise.
998 (DR_RW_READ): Likewise.
999 (DR_RW_IORW): Likewise.
1000 (DR_LEN_1): Likewise.
1001 (DR_LEN_2): Likewise.
1002 (DR_LEN_4): Likewise.
1003 (DR_LEN_8): Likewise.
1004 (DR_LOCAL_ENABLE_SHIFT): Likewise.
1005 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1006 (DR_ENABLE_SIZE): Likewise.
1007 (DR_LOCAL_SLOWDOWN): Likewise.
1008 (DR_GLOBAL_SLOWDOWN): Likewise.
1009 (DR_CONTROL_RESERVED): Likewise.
1010 (I386_DR_CONTROL_MASK): Likewise.
1011 (I386_DR_VACANT): Likewise.
1012 (I386_DR_LOCAL_ENABLE): Likewise.
1013 (I386_DR_GLOBAL_ENABLE): Likewise.
1014 (I386_DR_DISABLE): Likewise.
1015 (I386_DR_SET_RW_LEN): Likewise.
1016 (I386_DR_GET_RW_LEN): Likewise.
1017 (I386_DR_WATCH_HIT): Likewise.
1018 (i386_wp_op_t): Likewise.
1019 (i386_show_dr): Likewise.
1020 (i386_length_and_rw_bits): Likewise.
1021 (i386_insert_aligned_watchpoint): Likewise.
1022 (i386_remove_aligned_watchpoint): Likewise.
1023 (i386_handle_nonaligned_watchpoint): Likewise.
1024 i386_update_inferior_debug_regs(): Likewise.
1025 (i386_dr_insert_watchpoint): Likewise.
1026 (i386_dr_remove_watchpoint): Likewise.
1027 (i386_dr_region_ok_for_watchpoint): Likewise.
1028 (i386_dr_stopped_data_address): Likewise.
1029 (i386_dr_stopped_by_watchpoint): Likewise.
1030
8f26655c
GB
10312014-06-19 Gary Benson <gbenson@redhat.com>
1032
1033 * i386-low.c (i386_dr_show): Renamed to
1034 i386_show_dr and made static. All uses updated.
1035 (i386_dr_length_and_rw_bits): Renamed to
1036 i386_length_and_rw_bits and made static.
1037 All uses updated.
1038 (i386_dr_insert_aligned_watchpoint): Renamed to
1039 i386_insert_aligned_watchpoint and made static.
1040 All uses updated.
1041 (i386_dr_remove_aligned_watchpoint): Renamed to
1042 i386_remove_aligned_watchpoint and made static.
1043 All uses updated.
1044 (i386_dr_update_inferior_debug_regs): Renamed to
1045 i386_update_inferior_debug_regs and made static.
1046 All uses updated.
1047
b9228891
GB
10482014-06-18 Gary Benson <gbenson@redhat.com>
1049
5171def3
GB
1050 * i386-low.h (i386_dr_low_can_set_addr): New macro.
1051 (i386_dr_low_can_set_control): Likewise.
1052 (i386_get_debug_register_length): Likewise.
1053 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
1054 (i386_dr_low_can_set_control): Likewise.
1055 (i386_get_debug_register_length): Likewise.
1056
10572014-06-17 Gary Benson <gbenson@redhat.com>
1058
b9228891
GB
1059 * i386-low.h (i386-dregs.h): New include.
1060 (DR_FIRSTADDR): Now in i386-dregs.h.
1061 (DR_LASTADDR): Likewise.
1062 (DR_NADDR): Likewise.
1063 (DR_STATUS): Likewise.
1064 (DR_CONTROL): Likewise.
1065 (i386_debug_reg_state): Likewise.
1066 (i386_dr_insert_watchpoint): Likewise.
1067 (i386_dr_remove_watchpoint): Likewise.
1068 (i386_dr_region_ok_for_watchpoint): Likewise.
1069 (i386_dr_stopped_data_address): Likewise.
1070 (i386_dr_stopped_by_watchpoint): Likewise.
1071 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
1072
4be83cc2
GB
10732014-06-18 Gary Benson <gbenson@redhat.com>
1074
1075 * i386-low.h (i386_low_insert_watchpoint): Renamed to
1076 i386_dr_insert_watchpoint.
1077 (i386_low_remove_watchpoint): Renamed to
1078 i386_dr_remove_watchpoint.
1079 (i386_low_region_ok_for_watchpoint): Renamed to
1080 i386_dr_region_ok_for_watchpoint.
1081 (i386_low_stopped_data_address): Renamed to
1082 i386_dr_stopped_data_address.
1083 (i386_low_stopped_by_watchpoint): Renamed to
1084 i386_dr_stopped_by_watchpoint.
1085 * i386-low.c (i386_show_dr): Renamed to
1086 i386_dr_show and made nonstatic. All uses updated.
1087 (i386_length_and_rw_bits): Renamed to
1088 i386_dr_length_and_rw_bits and made nonstatic.
1089 All uses updated.
1090 (i386_insert_aligned_watchpoint): Renamed to
1091 i386_dr_insert_aligned_watchpoint and made nonstatic.
1092 All uses updated.
1093 (i386_remove_aligned_watchpoint): Renamed to
1094 i386_dr_remove_aligned_watchpoint and made nonstatic.
1095 All uses updated.
1096 (i386_update_inferior_debug_regs): Renamed to
1097 i386_dr_update_inferior_debug_regs and made nonstatic.
1098 All uses updated.
1099 (i386_low_insert_watchpoint): Renamed to
1100 i386_dr_insert_watchpoint. All uses updated.
1101 (i386_low_remove_watchpoint): Renamed to
1102 i386_dr_remove_watchpoint. All uses updated.
1103 (i386_low_region_ok_for_watchpoint): Renamed to
1104 i386_dr_region_ok_for_watchpoint. All uses updated.
1105 (i386_low_stopped_data_address): Renamed to
1106 i386_dr_stopped_data_address. All uses updated.
1107 (i386_low_stopped_by_watchpoint): Renamed to
1108 i386_dr_stopped_by_watchpoint. All uses updated.
1109
131aa0d4
GB
11102014-06-18 Gary Benson <gbenson@redhat.com>
1111
1112 * i386-low.c (i386_dr_low_can_set_addr): New macro.
1113 (i386_dr_low_can_set_control): Likewise.
1114 (i386_insert_aligned_watchpoint): New check.
1115
d9305f7f
GB
11162014-06-18 Gary Benson <gbenson@redhat.com>
1117
1118 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
1119 Renamed to state.
1120
e927c9fc
GB
11212014-06-18 Gary Benson <gbenson@redhat.com>
1122
1123 * i386-low.c (i386_length_and_rw_bits): Use internal_error
1124 instead of fatal and error.
1125 (i386_handle_nonaligned_watchpoint): Likewise.
1126
1b6d4134
GB
11272014-06-18 Gary Benson <gbenson@redhat.com>
1128
1129 * i386-low.c (i386_get_debug_register_length): New macro.
1130 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
1131 (i386_show_dr): Use debug_printf instead of fprintf. Use
1132 phex to format values.
1133
6e62758f
GB
11342014-06-18 Gary Benson <gbenson@redhat.com>
1135
1136 * i386-low.h: Comment changes.
1137 * i386-low.c: Likewise.
1138
fc6e2f03
GB
11392014-06-18 Gary Benson <gbenson@redhat.com>
1140
1141 * i386-low.c: Whitespace changes.
1142
f9d1eeed
TT
11432014-06-12 Tom Tromey <tromey@redhat.com>
1144
1145 * utils.c (freeargv): Remove.
1146
0b04e523
TT
11472014-06-12 Tom Tromey <tromey@redhat.com>
1148
1149 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
1150 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
1151 (parse_debug_format_options): Likewise.
1152 (gdbserver_usage): Likewise.
1153 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
1154 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
1155 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
1156 against libiberty.
1157 ($(LIBGNU)): Depend on libiberty.
1158 (all-lib): Recurse into all subdirs.
1159 (install-only): Invoke "install" target in subdirs.
1160 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1161 targets.
1162 * configure: Rebuild.
1163 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
1164 for vasprintf, vsnprintf, or gettimeofday.
1165 * configure.srv: Don't add safe-ctype.o or lbasename.o to
1166 srv_tgtobj.
1167
270c9937
JB
11682014-06-05 Joel Brobecker <brobecker@adacore.com>
1169
1170 * development.sh: Delete.
1171 * Makefile.in (config.status): Adjust dependency on development.sh.
1172 * configure.ac: Adjust development.sh source call.
1173 * configure: Regenerate.
1174
0a261ed8
PA
11752014-06-02 Pedro Alves <palves@redhat.com>
1176
1177 * ax.c (gdb_free_agent_expr): New function.
1178 * ax.h (gdb_free_agent_expr): New declaration.
1179 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1180 list.
1181 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1182 static.
1183 (clear_breakpoint_conditions_and_commands): New function.
1184 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1185 (clear_breakpoint_conditions_and_commands): New declaration.
1186
e9dae05e
RR
11872014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1188
1189 * linux-aarch64-low.c (asm/ptrace.h): Include.
1190
5876f503
JK
11912014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1192
1193 Fix TLS access for -static -pthread.
1194 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1195 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1196 (thread_db_load_search, try_thread_db_load_1): Initialize it.
1197
802e8e6d
PA
11982014-05-20 Pedro Alves <palves@redhat.com>
1199
1200 * linux-aarch64-low.c (aarch64_insert_point)
1201 (aarch64_remove_point): No longer check whether the type is
1202 supported here. Adjust to new interface.
1203 (the_low_target): Install aarch64_supports_z_point_type as
1204 supports_z_point_type method.
1205 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
1206 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
1207 instead of a Z packet char. Adjust.
1208 (arm_supports_z_point_type): New function.
1209 (arm_insert_point, arm_remove_point): Adjust to new interface.
1210 (the_low_target): Install arm_supports_z_point_type.
1211 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1212 (cris_insert_point, cris_remove_point): Adjust to new interface.
1213 Don't check whether the type is supported here.
1214 (the_low_target): Install cris_supports_z_point_type.
1215 * linux-low.c (linux_supports_z_point_type): New function.
1216 (linux_insert_point, linux_remove_point): Adjust to new interface.
1217 * linux-low.h (struct linux_target_ops) <insert_point,
1218 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1219 raw_breakpoint pointer parameter.
1220 <supports_z_point_type>: New method.
1221 * linux-mips-low.c (mips_supports_z_point_type): New function.
1222 (mips_insert_point, mips_remove_point): Adjust to new interface.
1223 Use mips_supports_z_point_type.
1224 (the_low_target): Install mips_supports_z_point_type.
1225 * linux-ppc-low.c (the_low_target): Install NULL as
1226 supports_z_point_type method.
1227 * linux-s390-low.c (the_low_target): Install NULL as
1228 supports_z_point_type method.
1229 * linux-sparc-low.c (the_low_target): Install NULL as
1230 supports_z_point_type method.
1231 * linux-x86-low.c (x86_supports_z_point_type): New function.
1232 (x86_insert_point): Adjust to new insert_point interface. Use
1233 insert_memory_breakpoint. Adjust to new
1234 i386_low_insert_watchpoint interface.
1235 (x86_remove_point): Adjust to remove_point interface. Use
1236 remove_memory_breakpoint. Adjust to new
1237 i386_low_remove_watchpoint interface.
1238 (the_low_target): Install x86_supports_z_point_type.
1239 * lynx-low.c (lynx_target_ops): Install NULL as
1240 supports_z_point_type callback.
1241 * nto-low.c (nto_supports_z_point_type): New.
1242 (nto_insert_point, nto_remove_point): Adjust to new interface.
1243 (nto_target_ops): Install nto_supports_z_point_type.
1244 * mem-break.c: Adjust intro comment.
1245 (struct raw_breakpoint) <raw_type, size>: New fields.
1246 <inserted>: Update comment.
1247 <shlib_disabled>: Delete field.
1248 (enum bkpt_type) <gdb_breakpoint>: Delete value.
1249 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1250 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1251 (raw_bkpt_type_to_target_hw_bp_type): New function.
1252 (find_enabled_raw_code_breakpoint_at): New function.
1253 (find_raw_breakpoint_at): New type and size parameters. Use them.
1254 (insert_memory_breakpoint): New function, based off
1255 set_raw_breakpoint_at.
1256 (remove_memory_breakpoint): New function.
1257 (set_raw_breakpoint_at): Reimplement.
1258 (set_breakpoint): New, based on set_breakpoint_at.
1259 (set_breakpoint_at): Reimplement.
1260 (delete_raw_breakpoint): Go through the_target->remove_point
1261 instead of assuming memory breakpoints.
1262 (find_gdb_breakpoint_at): Delete.
1263 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1264 (find_gdb_breakpoint): New function.
1265 (set_gdb_breakpoint_at): Delete.
1266 (z_type_supported): New function.
1267 (set_gdb_breakpoint_1): New function, loosely based off
1268 set_gdb_breakpoint_at.
1269 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1270 (delete_gdb_breakpoint_at): Delete.
1271 (delete_gdb_breakpoint_1): New function, loosely based off
1272 delete_gdb_breakpoint_at.
1273 (delete_gdb_breakpoint): New function.
1274 (clear_gdb_breakpoint_conditions): Rename to ...
1275 (clear_breakpoint_conditions): ... this. Don't handle a NULL
1276 breakpoint.
1277 (add_condition_to_breakpoint): Make static.
1278 (add_breakpoint_condition): Take a struct breakpoint pointer
1279 instead of an address. Adjust.
1280 (gdb_condition_true_at_breakpoint): Rename to ...
1281 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1282 z_type parameter.
1283 (gdb_condition_true_at_breakpoint): Reimplement.
1284 (add_breakpoint_commands): Take a struct breakpoint pointer
1285 instead of an address. Adjust.
1286 (gdb_no_commands_at_breakpoint): Rename to ...
1287 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
1288 parameter. Return true if no breakpoint was found. Change debug
1289 output.
1290 (gdb_no_commands_at_breakpoint): Reimplement.
1291 (run_breakpoint_commands): Rename to ...
1292 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
1293 and change return type to boolean.
1294 (run_breakpoint_commands): New function.
1295 (gdb_breakpoint_here): Also check for Z1 breakpoints.
1296 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
1297 breakpoint. Go through the_target->remove_point instead of
1298 assuming memory breakpoint.
1299 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
1300 software and hardware breakpoints.
1301 (reinsert_raw_breakpoint): Go through the_target->insert_point
1302 instead of assuming memory breakpoint.
1303 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
1304 software and hardware breakpoints.
1305 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
1306 Check both software and hardware breakpoints.
1307 (validate_inserted_breakpoint): Assert the breakpoint is a
1308 software breakpoint. Set the inserted flag to -1 instead of
1309 setting shlib_disabled.
1310 (delete_disabled_breakpoints): Adjust.
1311 (validate_breakpoints): Only validate software breakpoints.
1312 Adjust to inserted flag change.
1313 (check_mem_read, check_mem_write): Skip breakpoint types other
1314 than software breakpoints. Adjust to inserted flag change.
1315 * mem-break.h (enum raw_bkpt_type): New enum.
1316 (raw_breakpoint, struct process_info): Forward declare.
1317 (Z_packet_to_target_hw_bp_type): Delete declaration.
1318 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
1319 (set_gdb_breakpoint, delete_gdb_breakpoint)
1320 (clear_breakpoint_conditions): New declarations.
1321 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
1322 (breakpoint_inserted_here): Update comment.
1323 (add_breakpoint_condition, add_breakpoint_commands): Replace
1324 address parameter with a breakpoint pointer parameter.
1325 (gdb_breakpoint_here): Update comment.
1326 (delete_gdb_breakpoint_at): Delete.
1327 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
1328 * server.c (process_point_options): Take a struct breakpoint
1329 pointer instead of an address. Adjust.
1330 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
1331 delete_gdb_breakpoint.
1332 * spu-low.c (spu_target_ops): Install NULL as
1333 supports_z_point_type method.
1334 * target.h: Include mem-break.h.
1335 (struct target_ops) <prepare_to_access_memory>: Update comment.
1336 <supports_z_point_type>: New field.
1337 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1338 instead of a char. Also take a raw breakpoint pointer.
1339 * win32-arm-low.c (the_low_target): Install NULL as
1340 supports_z_point_type.
1341 * win32-i386-low.c (i386_supports_z_point_type): New function.
1342 (i386_insert_point, i386_remove_point): Adjust to new interface.
1343 (the_low_target): Install i386_supports_z_point_type.
1344 * win32-low.c (win32_supports_z_point_type): New function.
1345 (win32_insert_point, win32_remove_point): Adjust to new interface.
1346 (win32_target_ops): Install win32_supports_z_point_type.
1347 * win32-low.h (struct win32_target_ops):
1348 <supports_z_point_type>: New method.
1349 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1350 instead of a char. Also take a raw breakpoint pointer.
1351
932539e3
PA
13522014-05-20 Pedro Alves <palves@redhat.com>
1353
1354 * mem-break.h: Include break-common.h.
1355 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1356 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
1357 (Z_packet_to_target_hw_bp_type): New declaration.
1358 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
1359 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
1360 (Z_PACKET_ACCESS_WP): Delete macros.
1361 (Z_packet_to_hw_type): Delete function.
1362 * i386-low.h: Don't include break-common.h here.
1363 (Z_packet_to_hw_type): Delete declaration.
1364 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
1365 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1366 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
1367 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1368 * linux-aarch64-low.c: Don't include break-common.h here.
1369 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1370 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
1371 (Z_packet_to_target_hw_bp_type): Delete function.
1372 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
1373 function.
1374 (mips_insert_point, mips_remove_point): Use
1375 Z_packet_to_target_hw_bp_type.
1376
4ff0d3d8
PA
13772014-05-20 Pedro Alves <palves@redhat.com>
1378
1379 * linux-aarch64-low.c: Include break-common.h.
1380 (enum target_point_type): Delete.
1381 (Z_packet_to_point_type): Rename to ...
1382 (Z_packet_to_target_hw_bp_type): ... this, and return a
1383 target_hw_bp_type instead.
1384 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
1385 instead of an enum target_point_type.
1386 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
1387 breakpoint type.
1388 (aarch64_dr_state_insert_one_point)
1389 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
1390 (aarch64_handle_aligned_watchpoint)
1391 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
1392 Take an enum target_hw_bp_type instead of an enum
1393 target_point_type.
1394 (aarch64_supports_z_point_type): New function.
1395 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
1396 use Z_packet_to_target_hw_bp_type.
1397
786dc519
JB
13982014-05-20 Joel Brobecker <brobecker@adacore.com>
1399
1400 * configure.ac: Only use -Werror by default when DEVELOPMENT
1401 is true.
1402 * configure: Regenerate.
1403
9e0aa64f
JK
14042014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
1405
1406 Fix gdbserver qGetTLSAddr for x86_64 -m32.
1407 * linux-x86-low.c (X86_64_USER_REGS): New.
1408 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
1409
2b577b92
YQ
14102014-04-28 Yao Qi <yao@codesourcery.com>
1411
1412 * Makefile.in (i386-avx512.c): Fix the typo of generated file
1413 name.
1414
94611da2
PA
14152014-04-25 Pedro Alves <palves@redhat.com>
1416
1417 PR server/16255
1418 * linux-low.c (linux_attach_fail_reason_string): New function.
1419 (linux_attach_lwp): Delete.
1420 (linux_attach_lwp_1): Rename to ...
1421 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
1422 argument. Remove "initial" parameter. Return int instead of
1423 void. Don't error or warn here.
1424 (linux_attach): Adjust to call linux_attach_lwp. Call error on
1425 failure to attach to the tgid. Call warning when failing to
1426 attach to an lwp.
1427 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
1428 argument. Remove "initial" parameter. Return int instead of
1429 void. Don't error or warn here.
1430 (linux_attach_fail_reason_string): New declaration.
1431 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
1432 interface change. Use linux_attach_fail_reason_string.
1433
01f9f808
MS
14342014-04-24 Michael Sturm <michael.sturm@mintel.com>
1435 Walfred Tedeschi <walfred.tedeschi@intel.com>
1436
1437 * Makefile.in: Added rules to handle new files
1438 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
1439 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
1440 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
1441 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
1442 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
1443 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
1444 x32-avx512-linux.o.
1445 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
1446 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
1447 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
1448 i386/x32-avx512.xml.
1449 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
1450 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
1451 i386/x32-avx512-linux.xml.
1452 * i387-fp.c (num_avx512_k_registers): New constant for number
1453 of K registers.
1454 (num_avx512_zmmh_low_registers): New constant for number of
1455 lower ZMM registers (0-15).
1456 (num_avx512_zmmh_high_registers): New constant for number of
1457 higher ZMM registers (16-31).
1458 (num_avx512_ymmh_registers): New contant for number of higher
1459 YMM registers (ymm16-31 added by avx521 on x86_64).
1460 (num_avx512_xmm_registers): New constant for number of higher
1461 XMM registers (xmm16-31 added by AVX512 on x86_64).
1462 (struct i387_xsave): Add space for AVX512 registers.
1463 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
1464 Add code to handle AVX512 registers.
1465 (i387_xsave_to_cache): Add code to handle AVX512 registers.
1466 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
1467 prototypei from generated file.
1468 (tdesc_amd64_avx512_linux): Likewise.
1469 (init_registers_x32_avx512_linux): Likewise.
1470 (tdesc_x32_avx512_linux): Likewise.
1471 (init_registers_i386_avx512_linux): Likewise.
1472 (tdesc_i386_avx512_linux): Likewise.
1473 (x86_64_regmap): Add AVX512 registers.
1474 (x86_linux_read_description): Add code to handle AVX512 XSTATE
1475 mask.
1476 (initialize_low_arch): Add code to initialize AVX512 registers.
1477
51aa91f9
PA
14782014-04-23 Pedro Alves <palves@redhat.com>
1479
1480 * mem-break.c (find_gdb_breakpoint_at): Make static.
1481 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
1482
a4165e94
PA
14832014-04-23 Pedro Alves <palves@redhat.com>
1484
1485 * i386-low.c: Don't include break-common.h here.
1486 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1487 prototype to take target_hw_bp_type as argument instead of a Z
1488 packet char.
1489 * i386-low.h: Include break-common.h here.
1490 (Z_packet_to_hw_type): Declare.
1491 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1492 prototypes.
1493 * linux-x86-low.c (x86_insert_point): Convert the packet number to
1494 a target_hw_bp_type before calling i386_low_insert_watchpoint.
1495 (x86_remove_point): Convert the packet number to a
1496 target_hw_bp_type before calling i386_low_remove_watchpoint.
1497 * win32-i386-low.c (i386_insert_point): Convert the packet number
1498 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
1499 (i386_remove_point): Convert the packet number to a
1500 target_hw_bp_type before calling i386_low_remove_watchpoint.
1501
b8acf843
PA
15022014-04-23 Pedro Alves <palves@redhat.com>
1503
1504 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
1505
d708bcd1
PA
15062014-04-10 Pedro Alves <palves@redhat.com>
1507
1508 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1509 Check if the condition or command is NULL before checking if the
1510 breakpoint is known. On success, return true.
1511 * mem-break.h (add_breakpoint_condition): Document return.
1512 (add_breakpoint_commands): Add describing comment.
1513 * server.c (skip_to_semicolon): New function.
1514 (process_point_options): Use it.
1515
2eec7d5b
PA
15162014-04-09 Pedro Alves <palves@redhat.com>
1517
1518 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
1519 to lwpid_of.
1520
fa96cb38
PA
15212014-02-27 Pedro Alves <palves@redhat.com>
1522
1523 PR 12702
1524 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
1525 macros.
1526 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
1527 output.
1528 (last_thread_of_process_p): Take a PID argument instead of a
1529 thread pointer.
1530 (linux_wait_for_lwp): Delete.
1531 (num_lwps, check_zombie_leaders, not_stopped_callback): New
1532 functions.
1533 (linux_low_filter_event): New function, party factored out from
1534 linux_wait_for_event.
1535 (linux_wait_for_event): Rename to ...
1536 (linux_wait_for_event_filtered): ... this. Add new filter ptid
1537 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
1538 sigsuspend. Check for zombie leaders.
1539 (linux_wait_for_event): Reimplement as wrapper around
1540 linux_wait_for_event_filtered.
1541 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
1542 a normal or signal exit is seen, it's the whole process exiting.
1543 (wait_for_sigstop): No longer a for_each_inferior callback.
1544 Rewrite on top of linux_wait_for_event_filtered.
1545 (stop_all_lwps): Call wait_for_sigstop directly.
1546 * server.c (resume, handle_target_event): Handle
1547 TARGET_WAITKIND_NO_RESUMED.
1548
d763de10
JB
15492014-02-26 Joel Brobecker <brobecker@adacore.com>
1550
1551 * win32-low.c (psapi_get_dll_name,
1552 * win32_CreateToolhelp32Snapshot): Delete.
1553 (win32_CreateToolhelp32Snapshot, win32_Module32First)
1554 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
1555 Delete.
1556 (handle_load_dll): Add function description.
1557 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
1558
850a0f76
JB
15592014-02-26 Joel Brobecker <brobecker@adacore.com>
1560
1561 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
1562 Add comment.
1563 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
1564 base address when calling win32_add_one_solib.
1565 (handle_load_dll): Delete local variable load_addr.
1566 Remove 0x1000 offset applied to DLL base address when calling
1567 win32_add_one_solib.
1568 (handle_unload_dll): Add comment.
1569
f25b3fc3
JB
15702014-02-26 Joel Brobecker <brobecker@adacore.com>
1571
1572 * win32-low.c (win32_add_all_dlls): Renames
1573 win32_ensure_ntdll_loaded. Rewrite function documentation.
1574 Adjust implementation to always load all DLLs.
1575 Add 0x1000 offset to DLL base address when calling
1576 win32_add_one_solib.
1577 (child_initialization_done): New static global.
1578 (do_initial_child_stuff): Set child_initialization_done to
1579 zero during child initialization, and 1 after. Replace call
1580 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
1581 Add comment.
1582 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
1583 (handle_unload_dll): Add function documentation.
1584 (get_child_debug_event): Ignore load and unload DLL events
1585 during child initialization.
1586
d86d4aaf
DE
15872014-02-20 Doug Evans <dje@google.com>
1588
3bc32da3 1589 Remove global all_lwps.
d86d4aaf
DE
1590 * inferiors.h (ptid_of): Move here from linux-low.h.
1591 (pid_of, lwpid_of): Ditto.
1592 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
1593 parameter is a struct thread_info * now.
1594 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
1595 directly. Pass &all_threads to find_inferior instead of &all_lwps.
1596 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
1597 directly.
1598 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
1599 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
1600 * linux-arm-low.c (update_registers_callback): Update, "entry"
1601 parameter is a struct thread_info * now.
1602 Fetch lwpid from current_inferior directly.
1603 (arm_insert_point): Pass &all_threads to find_inferior instead of
1604 &all_lwps.
1605 (arm_remove_point): Ditto.
1606 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
1607 (arm_prepare_to_resume): Fetch pid from thread.
1608 (arm_read_description): Fetch lwpid from current_inferior directly.
1609 * linux-low.c (all_lwps): Delete.
1610 (delete_lwp): Delete call to remove_inferior.
1611 (handle_extended_wait): Fetch lwpid from thread.
1612 (add_lwp): Don't set lwp->entry.id. Remove call to
1613 add_inferior_to_list.
1614 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
1615 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
1616 (kill_one_lwp_callback): Ditto.
1617 (linux_kill): Don't dereference NULL pointer.
1618 Fetch ptid,lwpid from thread.
1619 (get_detach_signal): Fetch ptid from thread.
1620 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
1621 Simplify call to regcache_invalidate_thread.
1622 (delete_lwp_callback): Update, "entry" parameter is a
1623 struct thread_info * now. Fetch pid from thread.
1624 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
1625 (status_pending_p_callback): Update, "entry" parameter is a
1626 struct thread_info * now. Fetch ptid from thread.
1627 (find_lwp_pid): Update, "entry" parameter is a
1628 struct thread_info * now.
1629 (linux_wait_for_lwp): Fetch pid from thread.
1630 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
1631 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
1632 (enqueue_one_deferred_signal): Fetch lwpid from thread.
1633 (dequeue_one_deferred_signal): Ditto.
1634 (cancel_breakpoint): Fetch ptid from current_inferior.
1635 (linux_wait_for_event): Pass &all_threads to find_inferior,
1636 not &all_lwps. Fetch ptid, lwpid from thread.
1637 (count_events_callback): Update, "entry" parameter is a
1638 struct thread_info * now.
1639 (select_singlestep_lwp_callback): Ditto.
1640 (select_event_lwp_callback): Ditto.
1641 (cancel_breakpoints_callback): Ditto.
1642 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
1643 not &all_lwps.
1644 (select_event_lwp): Ditto. Fetch ptid from event_thread.
1645 (unsuspend_one_lwp): Update, "entry" parameter is a
1646 struct thread_info * now.
1647 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
1648 not &all_lwps.
1649 (linux_stabilize_threads): Ditto. And for for_each_inferior.
1650 Fetch lwpid from thread, not lwp.
1651 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
1652 Pass &all_threads to find_inferior, not &all_lwps.
1653 (send_sigstop): Fetch lwpid from thread, not lwp.
1654 (send_sigstop_callback): Update, "entry" parameter is a
1655 struct thread_info * now.
1656 (suspend_and_send_sigstop_callback): Ditto.
1657 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
1658 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
1659 struct thread_info * now.
1660 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
1661 from thread, lwp.
1662 (lwp_running): Update, "entry" parameter is a
1663 struct thread_info * now.
1664 (stop_all_lwps): Fetch ptid from thread.
1665 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
1666 (linux_resume_one_lwp): Fetch lwpid from thread.
1667 (linux_set_resume_request): Update, "entry" parameter is a
1668 struct thread_info * now. Fetch pid, lwpid from thread.
1669 (resume_status_pending_p): Update, "entry" parameter is a
1670 struct thread_info * now.
1671 (need_step_over_p): Ditto. Fetch lwpid from thread.
1672 (start_step_over): Fetch lwpid from thread.
1673 (linux_resume_one_thread): Update, "entry" parameter is a
1674 struct thread_info * now. Fetch lwpid from thread.
1675 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
1676 (proceed_one_lwp): Update, "entry" parameter is a
1677 struct thread_info * now. Fetch lwpid from thread.
1678 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
1679 struct thread_info * now.
1680 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
1681 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
1682 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
1683 directly.
1684 (regsets_store_inferior_registers): Ditto.
1685 (fetch_register, store_register): Ditto.
1686 (linux_read_memory, linux_write_memory): Ditto.
1687 (linux_request_interrupt): Ditto.
1688 (linux_read_auxv): Ditto.
1689 (linux_xfer_siginfo): Ditto.
1690 (linux_qxfer_spu): Ditto.
1691 (linux_qxfer_libraries_svr4): Ditto.
1692 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
1693 moved to inferiors.h.
1694 (get_lwp): Delete.
1695 (get_thread_lwp): Update.
1696 (struct lwp_info): Delete member "entry". Simplify comment for
1697 member "thread".
1698 (all_lwps): Delete.
1699 * linux-mips-low.c (mips_read_description): Fetch lwpid from
1700 current_inferior directly.
1701 (update_watch_registers_callback): Update, "entry" parameter is a
1702 struct thread_info * now. Fetch pid from thread.
1703 (mips_linux_prepare_to_resume): Fetch ptid from thread.
1704 (mips_insert_point): Fetch lwpid from current_inferior.
1705 Pass &all_threads to find_inferior, not &all_lwps.
1706 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
1707 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
1708 directly.
1709 (mips_stopped_data_address): Ditto.
1710 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
1711 directly.
1712 * linux-tile-low.c (tile_arch_setup): Ditto.
1713 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
1714 (update_debug_registers_callback): Update, "entry" parameter is a
1715 struct thread_info * now. Fetch pid from thread.
1716 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
1717 Pass &all_threads to find_inferior, not &all_lwps.
1718 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
1719 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
1720 Pass &all_threads to find_inferior, not &all_lwps.
1721 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
1722 (i386_dr_low_get_status): Ditto.
1723 (x86_linux_prepare_to_resume): Fetch ptid from thread.
1724 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
1725 (x86_linux_read_description): Ditto.
1726 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
1727
3b8361aa
DE
17282014-02-20 Doug Evans <dje@google.com>
1729
1730 * inferiors.c (get_first_inferior): Fix buglet.
1731
f7667f0d
DE
17322014-02-19 Doug Evans <dje@google.com>
1733
1734 * gdbthread.h (add_thread): Change result type to struct thread_info *.
1735 * inferiors.c (add_thread): Change result type to struct thread_info *.
1736 All callers updated.
1737 (add_lwp): Call add_thread here instead of in callers.
1738 All callers updated.
1739 * linux-low.h (get_lwp_thread): Rewrite.
1740 (struct lwp_info): New member "thread".
1741
b3312d80
DE
17422014-02-19 Doug Evans <dje@google.com>
1743
1744 * linux-low.c (add_lwp): Change result to struct lwp_info *.
1745 All callers updated.
1746
ecc6f45c
DE
17472014-02-19 Doug Evans <dje@google.com>
1748
1749 * inferiors.c (add_thread): Fix whitespace.
1750
649ebbca
DE
17512014-02-19 Doug Evans <dje@google.com>
1752
1753 * dll.c (clear_dlls): Replace accessing list implemention details
1754 with API function.
1755 * gdbthread.h (get_first_thread): Declare.
1756 * inferiors.c (for_each_inferior_with_data): New function.
1757 (get_first_thread): New function.
1758 (find_thread_ptid): Simplify.
1759 (get_first_inferior): New function.
1760 (clear_list): Delete.
1761 (one_inferior_p): New function.
1762 (clear_inferior_list): New function.
1763 (clear_inferiors): Update.
1764 * inferiors.h (for_each_inferior_with_data): Declare.
1765 (clear_inferior_list): Declare.
1766 (one_inferior_p): Declare.
1767 (get_first_inferior): Declare.
1768 * linux-low.c (linux_wait_for_event): Replace accessing list
1769 implemention details with API function.
1770 * server.c (target_running): Ditto.
1771 (accumulate_file_name_length): New function.
1772 (emit_dll_description): New function.
1773 (handle_qxfer_libraries): Replace accessing list implemention
1774 details with API function.
1775 (handle_qxfer_threads_worker): New function.
1776 (handle_qxfer_threads_proper): Replace accessing list implemention
1777 details with API function.
1778 (handle_query): Ditto.
1779 (visit_actioned_threads_callback_ftype): New typedef.
1780 (visit_actioned_threads_data): New struct.
1781 (visit_actioned_threads): Rewrite to be find_inferior callback.
1782 (resume): Call find_inferior.
1783 (handle_status): Replace accessing list implemention
1784 details with API function.
1785 (process_serial_event): Replace accessing list implemention details
1786 with API function.
1787 * target.c (set_desired_inferior): Replace accessing list implemention
1788 details with API function.
1789 * tracepoint.c (same_process_p): New function.
1790 (gdb_agent_about_to_close): Replace accessing list implemention
1791 details with API function.
1792 * win32-low.c (child_delete_thread): Replace accessing list
1793 implemention details with API function.
1794 (match_dll_by_basename): New function.
1795 (dll_is_loaded_by_basename): New function.
1796 (win32_ensure_ntdll_loaded): Replace accessing list implemention
1797 details call to dll_is_loaded_by_basename.
1798
80894984
DE
17992014-02-19 Doug Evans <dje@google.com>
1800
1801 * dll.h (struct dll_info): Add comment.
1802 * gdbthread.h (struct thread_info): Add comment.
1803 (current_ptid): Simplify.
1804 * inferiors.c (add_process): Update.
1805 (remove_process): Update.
1806 * inferiors.h (struct process_info): Rename member "head" to "entry".
1807 * linux-low.c (delete_lwp): Update.
1808 (add_lwp): Update.
1809 (last_thread_of_process_p): Update.
1810 (kill_one_lwp_callback, linux_kill): Update.
1811 (status_pending_p_callback): Update.
1812 (wait_for_sigstop): Update. Simplify read of ptid.
1813 (start_step_over): Update.
1814 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
1815 (get_lwp_thread): Update.
1816 (struct lwp_info): Rename member "head" to "entry".
1817 * regcache.h (inferior_list_entry): Delete.
1818 * server.c (kill_inferior_callback): Update.
1819 (detach_or_kill_inferior_callback): Update.
1820 (print_started_pid): Update.
1821 (print_attached_pid): Update.
1822 (process_serial_event): Simplify read of ptid.
1823 * thread-db.c (thread_db_create_event): Update.
1824 (thread_db_get_tls_address): Update.
1825 * win32-low.c (current_inferior_ptid): Simplify.
1826
46917d26
TT
18272014-02-19 Tom Tromey <tromey@redhat.com>
1828
1829 * target.h (struct target_ops) <supports_btrace>: Add target_ops
1830 argument.
1831 (target_supports_btrace): Update.
1832
0759a81e
YQ
18332014-02-14 Yao Qi <yao@codesourcery.com>
1834
1835 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
1836 (rsp-low-ipa.o): New target.
1837
a7191e8b
TT
18382014-02-12 Tom Tromey <tromey@redhat.com>
1839
1840 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
1841 convert_ascii_to_int.
1842 * regcache.c (registers_to_string): Likewise.
1843 * remote-utils.c (decode_M_packet): Likewise.
1844 * server.c (process_serial_event): Likewise.
1845
ff0e980e
TT
18462014-02-12 Tom Tromey <tromey@redhat.com>
1847
1848 * server.c (handle_query, handle_v_run): Use hex2bin, not
1849 unhexify.
1850 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
1851
e9371aff
TT
18522014-02-12 Tom Tromey <tromey@redhat.com>
1853
1854 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
1855 convert_int_to_ascii.
1856 * regcache.c (registers_to_string, collect_register_as_string):
1857 Likewise.
1858 * remote-utils.c (look_up_one_symbol, relocate_instruction):
1859 Likewise.
1860 * server.c (process_serial_event): Likewise.
1861 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
1862 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
1863
971dc0b8
TT
18642014-02-12 Tom Tromey <tromey@redhat.com>
1865
1866 * remote-utils.c (look_up_one_symbol, monitor_output): Use
1867 bin2hex, not hexify.
1868 * tracepoint.c (cmd_qtstatus): Likewise.
1869
0a822afb
TT
18702014-02-12 Tom Tromey <tromey@redhat.com>
1871
1872 * remote-utils.c (monitor_output): Pass explicit length to
1873 hexify.
1874
9c3d6531
TT
18752014-02-12 Tom Tromey <tromey@redhat.com>
1876
1877 * tracepoint.c: Include rsp-low.h.
1878 * server.c: Include rsp-low.h.
1879 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
1880 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
1881 declare.
1882 * remote-utils.c: Include rsp-low.h.
1883 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
1884 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
1885 (convert_int_to_ascii, convert_ascii_to_int): Move to
1886 common/rsp-low.c.
1887 * regcache.c: Include rsp-low.h.
1888 * ax.c: Include rsp-low.h.
1889 * Makefile.in (SFILES): Add common/rsp-low.c.
1890 (OBS): Add rsp-low.o.
1891 (rsp-low.o): New target.
1892
01fd3ea5
TT
18932014-02-12 Tom Tromey <tromey@redhat.com>
1894
1895 * utils.h (pulongest, plongest, phex_nz): Don't declare.
1896 Include print-utils.h.
1897 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
1898 (plongest, thirty_two, phex_nz): Remove.
1899 * Makefile.in (SFILES): Add common/print-utils.c.
1900 (OBS): Add print-utils.o.
1901 (print-utils-ipa.o): New target.
1902 (print-utils.o): New target.
1903 (IPA_OBJS): Add print-utils-ipa.o.
1904
e99dc820
TT
19052014-02-06 Tom Tromey <tromey@redhat.com>
1906
1907 * Makefile.in (SFILES): Fix indentation.
1908
ee1e2d4f
DE
19092014-02-05 Doug Evans <dje@google.com>
1910
1911 * linux-low.c (linux_wait_for_event): Improve comment.
1912 (linux_wait_1): Keep current_inferior in sync with event_child.
1913
f5a02773
DE
19142014-01-22 Doug Evans <dje@google.com>
1915
1916 * gdbthread.h (gdb_id_to_thread): Delete, unused.
1917
87ce2a04
DE
19182014-01-22 Doug Evans <dje@google.com>
1919
1920 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
1921 * configure: Regenerate.
1922 * config.in: Regenerate.
1923 * Makefile.in (SFILES): Add debug.c.
1924 (OBS): Add debug.o.
1925 * debug.c: New file.
1926 * debug.h: New file.
1927 * linux-aarch64-low.c (*): Update all debugging printfs to use
1928 debug_printf instead of fprintf.
1929 * linux-arm-low.c (*): Ditto.
1930 * linux-cris-low.c (*): Ditto.
1931 * linux-crisv32-low.c (*): Ditto.
1932 * linux-m32r-low.c (*): Ditto.
1933 * linux-sparc-low.c (*): Ditto.
1934 * linux-x86.c (*): Ditto.
1935 * linux-low.c (*): Ditto.
1936 (linux_wait_1): Add calls to debug_enter, debug_exit.
1937 (linux_wait): Remove redundant debugging printf.
1938 (stop_all_lwps): Add calls to debug_enter, debug_exit.
1939 (linux_resume, unstop_all_lwps): Ditto.
1940 * mem-break.c (*): Update all debugging printfs to use
1941 debug_printf instead of fprintf.
1942 * remote-utils.c (*): Ditto.
1943 * thread-db.c (*): Ditto.
1944 * server.c #include <ctype.h>, "gdb_vecs.h".
1945 (debug_threads): Moved to debug.c.
1946 (*): Update all debugging printfs to use debug_printf instead of
1947 fprintf.
1948 (start_inferior): Replace call to fflush with call to debug_flush.
1949 (monitor_show_help): Mention set debug-format.
1950 (parse_debug_format_options): New function.
1951 (handle_monitor_command): Handle "monitor set debug-format".
1952 (gdbserver_usage): Mention --debug-format.
1953 (main): Parse --debug-format.
1954 * server.h (debug_threads): Declaration moved to debug.h.
1955 #include "debug.h".
1956 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
1957 trace_debug_1 that uses debug_printf.
1958 (tracepoint_look_up_symbols): Update all debugging printfs to use
1959 debug_printf instead of fprintf.
1960
e671835b
BS
19612014-01-20 Baruch Siach <baruch@tkos.co.il>
1962
1963 * linux-xtensa-low.c: Include asm/ptrace.h instead of
1964 sys/ptrace.h.
1965
b5737fa9
PA
19662014-01-17 Pedro Alves <palves@redhat.com>
1967
ea38d2a9 1968 PR build/16445
c7faa97a
PA
1969 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
1970 defined after including gdb_proc_service.h.
b5737fa9 1971
40ed484e
DE
19722014-01-16 Doug Evans <dje@google.com>
1973
1974 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
1975 (match_dll): Use it.
1976
969c39fb
MM
19772014-01-16 Markus Metzger <markus.t.metzger@intel.com>
1978
1979 * target.h (target_ops) <read_btrace>: Change parameters and
1980 return type to allow error reporting.
1981 * server.c (handle_qxfer_btrace): Support delta reads. Pass
1982 trace reading errors on.
1983 * linux-low.c (linux_low_read_btrace): Pass trace reading
1984 errors on.
1985 (linux_low_disable_btrace): New.
1986
ab7f45ba
DE
19872014-01-15 Doug Evans <dje@google.com>
1988
1989 * inferiors.c (thread_id_to_gdb_id): Delete.
1990 * inferiors.h (thread_id_to_gdb_id): Delete.
1991
66af0f44
EZ
19922014-01-13 Eli Zaretskii <eliz@gnu.org>
1993
1994 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
1995 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
1996 versions.
1997
9939e131
PA
19982014-01-08 Pedro Alves <palves@redhat.com>
1999
2000 * server.c (handle_status): Don't discard previous queued stop
2001 replies or thread's pending status here.
2002 (main) <disconnection>: Do it here instead.
2003
b7ea362b
PA
20042014-01-08 Pedro Alves <palves@redhat.com>
2005
2006 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2007 * server.c (visit_actioned_threads, handle_pending_status): New
2008 function.
2009 (handle_v_cont): Factor out parts to ...
2010 (resume): ... this new function. If in all-stop, and a thread
2011 being resumed has a pending status, report it without actually
2012 resuming.
2013 (myresume): Adjust to use the new 'resume' function.
2014 (clear_pending_status_callback, set_pending_status_callback)
2015 (find_status_pending_thread_callback): New functions.
2016 (handle_status): Handle the case of multiple threads having
2017 interesting statuses to report. Report threads' real last signal
2018 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
2019 with an interesting thread to report the status for, instead of
2020 always reporting the status of the first thread.
2021
28498c42
JB
20222014-01-01 Joel Brobecker <brobecker@adacore.com>
2023
2024 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2025 * gdbreplay.c (gdbreplay_version): Likewise.
2026
f45c82da
YZ
20272013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
2028
2029 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2030 iov.iov_len with the real length in use.
2031
379a5e2d
JB
20322013-12-13 Joel Brobecker <brobecker@adacore.com>
2033
2034 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2035 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2036 for all targets that use win32-low.c.
2037 * win32-low.c (win32_ensure_ntdll_loaded): New function.
2038 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2039
4210d83e
PA
20402013-12-13 Pedro Alves <palves@redhat.com>
2041
2042 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
2043 if equal to TARGET_WAITKIND_LOADED.
2044 * win32-low.c (cached_status): New static global.
2045 (win32_wait): Add declaration.
2046 (do_initial_child_stuff): Flush all initial pending debug events
2047 up to the initial breakpoint.
2048 (win32_wait): If CACHED_STATUS was set, return that instead
2049 of doing a real wait. Remove the code resuming the execution
2050 of the inferior after receiving a TARGET_WAITKIND_LOADED event
2051 during the initial phase. Also remove the code changing
2052 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
2053 TARGET_WAITKIND_STOPPED.
2054
e7f0d979
YQ
20552013-12-11 Yao Qi <yao@codesourcery.com>
2056
2057 * notif.c (handle_notif_ack): Return 0 if no notification
2058 matches.
2059
ebcf782c
DE
20602013-11-20 Doug Evans <dje@google.com>
2061
2062 * linux-low.c (linux_set_resume_request): Fix comment.
2063
20ad9378
DE
20642013-11-20 Doug Evans <dje@google.com>
2065
2066 * linux-low.c (resume_status_pending_p): Tweak comment.
2067
a196ebeb
WT
20682013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2069
2070 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
2071 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
2072 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
2073 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
2074 (srv_amd64_regobj): Add amd64-mpx.o.
2075 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
2076 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
2077 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
2078 * i387-fp.c (num_pl_bnd_register) Added constant.
2079 (num_pl_bnd_cfg_registers) Added constant.
2080 (struct i387_xsave) Added reserved area and MPX fields.
2081 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
2082 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
2083 function.
2084 (tdesc_i386_mpx_linux): Add MPX amd64 target.
2085 (init_registers_amd64_mpx_linux): Declare new function.
2086 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
2087 (x86_64_regmap): Add MPX registers.
2088 (x86_linux_read_description): Add MPX case.
2089 (initialize_low_arch): Initialize MPX targets.
2090
0080a2f6
TT
20912013-11-18 Tom Tromey <tromey@redhat.com>
2092
2093 * configure: Rebuild.
2094 * configure.ac: Don't check for stdlib.h.
2095 * gdbreplay.c: Unconditionally include stdlib.h.
2096
2978b111
TT
20972013-11-18 Tom Tromey <tromey@redhat.com>
2098
2099 * config.in: Rebuild.
2100 * configure: Rebuild.
2101 * configure.ac: Don't use AC_HEADER_DIRENT.
2102
a3d08894
TT
21032013-11-18 Tom Tromey <tromey@redhat.com>
2104
2105 * server.h: Don't check HAVE_STRING_H.
2106 * gdbreplay.c: Don't check HAVE_STRING_H.
2107 * configure: Rebuild.
2108
0a5dd17d
TT
21092013-11-18 Tom Tromey <tromey@redhat.com>
2110
2111 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
2112 LIBGNU.
2113
1bd2f0ba
TT
21142013-11-08 Tom Tromey <tromey@redhat.com>
2115
2116 * configure, config.in: Rebuild.
2117 * configure.ac: Remove unused configury.
2118
3266f10b
TT
21192013-11-08 Tom Tromey <tromey@redhat.com>
2120
2121 * acinclude.m4: Include common.m4, codeset.m4.
2122 * configure, config.in: Rebuild.
2123 * configure.ac: Use GDB_AC_COMMON.
2124
6682d959
AA
21252013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
2126
2127 * linux-s390-low.c (HWCAP_S390_TE): New define.
2128 (s390_arch_setup): Consider the TE field in the HWCAP for
2129 determining 'have_regset_tdb'.
2130
fd0a4d76
SDJ
21312013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
2132
2133 PR gdb/16014
2134 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
2135 call to sizeof.
2136
1a3d890b
PA
21372013-10-02 Pedro Alves <palves@redhat.com>
2138
2139 * server.c (process_serial_event): Don't output "GDBserver
2140 exiting" if GDB is connected through stdio.
2141 * target.c (mywait): Likewise, be silent if GDB is connected
2142 through stdio.
2143
97ad4581
JB
21442013-10-01 Joel Brobecker <brobecker@adacore.com>
2145
2146 * lynx-low.c (lynx_add_threads_after_attach): New function.
2147 (lynx_attach): Remove call to add_thread. Add call to
2148 lynx_add_threads_after_attach instead.
2149
5b4e221c
MF
21502013-09-28 Mike Frysinger <vapier@gentoo.org>
2151
2152 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
2153 * config.in, configure: Regenerated.
2154
ee47b2f8
YQ
21552013-09-18 Yao Qi <yao@codesourcery.com>
2156
2157 PR server/15959
2158 * server.c (start_inferior): Clear 'resume_info'.
2159
d6707650 21602013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2161
d6707650
JW
2162 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2163 for each register.
2164
9243dd0e 21652013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2166
9243dd0e
JW
2167 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
2168 linux-tile-low.o to srv_tgtobj.
2169
c623a6ef
WN
21702013-09-16 Will Newton <will.newton@linaro.org>
2171
2172 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
2173 out regs.
2174
fb71d39e
PA
21752013-09-06 Pedro Alves <palves@redhat.com>
2176
2177 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2178 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2179 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2180 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2181 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2182 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2183
8e7e9910
PA
21842013-09-06 Pedro Alves <palves@redhat.com>
2185
2186 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2187 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2188
7c3a12ca
PA
21892013-09-06 Pedro Alves <palves@redhat.com>
2190
2191 * linux-amd64-ipa.c: Include tracepoint.h.
2192 * linux-i386-ipa.c: Include tracepoint.h.
2193
8eb3d7b6
RW
21942013-09-06 Ricard Wanderlof <ricardw@axis.com>
2195
2196 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2197 (ps_get_thread_area): New function.
2198
eddddb9d
RW
21992013-09-06 Ricard Wanderlof <ricardw@axis.com>
2200
2201 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
2202 (initialize_low_arch): Call init_registers_crisv32 rather than
2203 init_register_crisv32.
2204
533b0600
PA
22052013-09-05 Pedro Alves <palves@redhat.com>
2206
2207 * server.h (handle_vFile, hostio_last_error_from_errno): Move
2208 to ...
2209 * hostio.h: ... this new file.
2210 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2211 win32-low.c: Include hostio.h.
2212
0ce3d3b5
PA
22132013-09-05 Pedro Alves <palves@redhat.com>
2214
2215 * server.h (gdb_client_data, handler_func, callback_handler_func)
2216 (delete_file_handler, add_file_handler, append_callback_event)
2217 (delete_callback_event, start_event_loop, initialize_event_loop):
2218 Move to event-loop.h and include it.
2219 * event-loop.h: New file.
2220
799cdc37
PA
22212013-09-05 Pedro Alves <palves@redhat.com>
2222
2223 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2224 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2225 (loaded_dll, unloaded_dll): Move to ...
2226 * dll.h: ... this new file.
2227 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2228
6a6bbd9d
PA
22292013-09-05 Pedro Alves <palves@redhat.com>
2230
2231 * server.h (current_process, get_thread_process, all_processes)
2232 (add_inferior_to_list, for_each_inferior, current_inferior)
2233 (remove_inferior, add_process, remove_process, find_process_pid)
2234 (have_started_inferiors_p, have_attached_inferiors_p)
2235 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2236 (clear_inferiors, find_inferior, find_inferior_id)
2237 (inferior_target_data, set_inferior_target_data)
2238 (inferior_regcache_data, set_inferior_regcache_data): Move to
2239 inferiors.h, and include it.
2240 * inferiors.h: New file.
2241
f699aaba
PA
22422013-09-05 Pedro Alves <palves@redhat.com>
2243
2244 * server.h (struct emit_ops, current_insn_ptr, emit_error):
2245 Move ...
2246 * ax.h: ... here.
2247
c144c7a0
PA
22482013-09-05 Pedro Alves <palves@redhat.com>
2249
2250 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2251 tracepoint.h.
2252 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2253 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2254 (handle_tracepoint_general_set, handle_tracepoint_query)
2255 (tracepoint_finished_step, tracepoint_was_hit)
2256 (release_while_stepping_state_list, current_traceframe)
2257 (in_readonly_region, traceframe_read_mem)
2258 (fetch_traceframe_registers, traceframe_read_sdata)
2259 (traceframe_read_info, struct fast_tpoint_collect_status)
2260 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2261 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2262 (supply_fast_tracepoint_registers)
2263 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2264 (ipa_tdesc, claim_trampoline_space)
2265 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2266 (agent_mem_read, agent_get_trace_state_variable_value)
2267 (agent_set_trace_state_variable_value, agent_tsv_read)
2268 (agent_mem_read_string, get_raw_reg_func_addr)
2269 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2270 * tracepoint.h: ... this new file.
2271
ff42e6ab
PA
22722013-09-05 Pedro Alves <palves@redhat.com>
2273
2274 * server.h (perror_with_name, error, fatal, warning, paddress)
2275 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2276 include it.
2277 * utils.h: New file.
2278
541af0f4
PA
22792013-09-05 Pedro Alves <palves@redhat.com>
2280
2281 * server.h (remote_debug, noack_mode, transport_is_reliable)
2282 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
2283 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
2284 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
2285 (write_enn, initialize_async_io, enable_async_io)
2286 (disable_async_io, check_remote_input_interrupt_request)
2287 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
2288 (dead_thread_notify, prepare_resume_reply)
2289 (decode_address_to_semicolon, decode_address, decode_m_packet)
2290 (decode_M_packet, decode_X_packet, decode_xfer_write)
2291 (decode_search_memory_packet, unhexify, hexify)
2292 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
2293 (look_up_one_symbol, relocate_instruction)
2294 (monitor_output): Move to remote-utils.h, and include it.
2295 * remote-utils.h: New file.
2296
eebdf26b
PA
22972013-09-05 Pedro Alves <palves@redhat.com>
2298
2299 * server.h (_): Delete.
2300
3aafd2ff
PA
23012013-09-02 Pedro Alves <palves@redhat.com>
2302
2303 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
2304 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
2305 allocated.
2306 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
2307
cee83bcb
PM
23082013-09-02 Pierre Muller <muller@sourceware.org>
2309
2310 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
2311 or WriteProcessMemory complete successfully and handle
2312 ERROR_PARTIAL_COPY error.
2313
9a13b2fa
PA
23142013-09-02 Pedro Alves <palves@redhat.com>
2315
2316 * server.c (gdb_read_memory): Return -1 on traceframe memory read
2317 error instead of EIO.
2318
602e3198
JK
23192013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2320
2321 PR server/15604
2322 * linux-low.c: Include filestuff.h.
2323 (linux_create_inferior) <pid == 0>: Call close_most_fds.
2324 * lynx-low.c: Include filestuff.h.
2325 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
2326 * server.c: Include filestuff.h.
2327 (main): Call notice_open_fds.
2328 * spu-low.c: Include filestuff.h.
2329 (spu_create_inferior) <pid == 0>: Call close_most_fds.
2330
96d7229d
LM
23312013-08-22 Luis Machado <lgustavo@codesourcery.com>
2332
2333 * Makefile.in: Explain why ../target and ../nat are not
2334 listed as include file search paths.
2335 (linux-waitpid.o): New object file rule.
2336 * configure.srv (srv_native_linux_obj): New variable.
2337 Replace all occurrences of linux native object files with
2338 $srv_native_linux_obj.
2339 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
2340 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
2341 (linux_enable_event_reporting): Remove declaration.
2342 (my_waitpid): Moved to common/linux-waitpid.c.
2343 (linux_wait_for_event): Pass ptid when calling
2344 linux_enable_event_reporting.
2345 (linux_supports_tracefork_flag): Remove.
2346 (linux_enable_event_reporting): Likewise.
2347 (linux_tracefork_grandchild): Remove.
2348 (STACK_SIZE): Moved to common/linux-ptrace.c.
2349 (linux_tracefork_child): Remove.
2350 (linux_test_for_tracefork): Remove.
2351 (linux_look_up_symbols): Call linux_supports_traceclone.
2352 (initialize_low): Remove call to linux_test_for_tracefork.
2353 * linux-low.h (PTRACE_TYPE_ARG3): Move to
2354 common/linux-ptrace.h.
2355 (PTRACE_TYPE_ARG4): Likewise.
2356 Include linux-ptrace.h.
2357
32940073
PA
23582013-08-21 Pedro Alves <palves@redhat.com>
2359
2360 * config.in: Renegerate.
2361
33b60d58 23622013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 2363
33b60d58
LM
2364 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
2365 (SFILES): Remove $(srcdir)/common/target-common.c and
2366 add $(srcdir)/target/waitstatus.c.
2367 (OBS): Remove target-common.o and add waitstatus.o.
2368 (server_h): Remove $(srcdir)/../common/target-common.h and
2369 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
2370 and $(srcdir)/../target/waitstatus.h.
2371 (target-common.o): Remove.
2372 (waitstatus.o): New target object file.
2373 * target.h: Do not include target-common.h and
2374 include target/resume.h, target/wait.h and
2375 target/waitstatus.h.
2376
b8e1b30e
LM
23772013-08-13 Luis Machado <lgustavo@codesourcery.com>
2378
2379 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2380 to PTRACE_TYPE_ARG3.
2381 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2382 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
2383 PTRACE_TYPE_ARG4.
2384 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
2385 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
2386
7a60ad40
YQ
23872013-07-27 Jie Zhang <jie@codesourcery.com>
2388 Daniel Jacobowitz <dan@codesourcery.com>
2389 Yao Qi <yao@codesourcery.com>
2390
2391 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
2392 (mips-linux-watch.o): New rule.
2393 (mips_linux_watch_h): New variable.
2394 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
2395 srv_tgtobj.
2396 * linux-mips-low.c: Include mips-linux-watch.h.
2397 (struct arch_process_info, struct arch_lwp_info): New.
2398 (update_watch_registers_callback): New function.
2399 (mips_linux_new_process, mips_linux_new_thread) New functions.
2400 (mips_linux_prepare_to_resume, mips_insert_point): New
2401 functions.
2402 (mips_remove_point, mips_stopped_by_watchpoint): New
2403 functions.
2404 (rsp_bp_type_to_target_hw_bp_type): New function.
2405 (mips_stopped_data_address): New function.
2406 (the_low_target): Add watchpoint support functions.
2407
de6f69ad
YQ
24082013-07-27 Yao Qi <yao@codesourcery.com>
2409
2410 * i386-low.c: Include break-common.h.
2411 (enum target_hw_bp_type): Remove.
2412
3360c0bf
LM
24132013-07-24 Luis Machado <lgustavo@codesourcery.com>
2414
2415 * Makefile.in (SFILES): /common/target-common.c.
2416 (OBS): Add target-common.o.
2417 (server_h): Add $(srcdir)/../common/target-common.h.
2418 (target-common.o): New target.
2419 * server.c (queue_stop_reply_callback): Free
2420 status string after use.
2421 * target.c (target_waitstatus_to_string): Remove.
2422 * target.h: Include target-common.h.
2423 (resume_kind): Likewise.
2424 (target_waitkind): Likewise.
2425 (target_waitstatus): Likewise.
2426 (TARGET_WNOHANG): Likewise.
2427
bd885420
YQ
24282013-07-04 Yao Qi <yao@codesourcery.com>
2429
2430 * Makefile.in (host_alias): Use @host_noncanonical@.
2431 (target_alias): Use @target_noncanonical@.
2432 * configure.ac: Use ACX_NONCANONICAL_TARGET and
2433 ACX_NONCANONICAL_HOST.
2434 * configure: Regenerated.
2435
2436 Revert:
2437 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2438
2439 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2440 * configure: Rebuild.
2441 * Makefile.in (version_host, version_target): Get from configure.
2442 (version.c): Use $(version_host) and $(version_target).
2443
17ef446e
PA
24442013-07-03 Pedro Alves <palves@redhat.com>
2445
2446 * Makefile.in (config.status): Depend on development.sh.
2447 * acinclude.m4: Include libmcheck.m4.
2448 * configure: Regenerate.
2449
7a9a7487
MG
24502013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2451
2452 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
2453 attribute inside the parentheses.
2454 (winapi_DebugSetProcessKillOnExit): Ditto.
2455 (winapi_DebugBreakProcess): Ditto.
2456 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 2457
49b64de6
MG
24582013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2459
2460 * notif.h (notif_event): Add a dummy member to avoid compiler
2461 errors.
2462
d5749ee7
PA
24632013-07-01 Pedro Alves <palves@redhat.com>
2464
2465 * hostio.c (HOSTIO_PATH_MAX): Define.
2466 (require_filename, handle_open, handle_unlink, handle_readlink):
2467 Use it.
2468
d8d2a3ee
PA
24692013-07-01 Pedro Alves <palves@redhat.com>
2470
2471 * server.h: Include "pathmax.h".
2472 * linux-low.c: Don't include sys/param.h.
2473 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
2474 MAXPATHLEN.
2475 * win32-low.c: Don't include sys/param.h.
2476 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
2477
bc7dea8d
PA
24782013-07-01 Pedro Alves <palves@redhat.com>
2479
2480 * event-loop.c: Don't check HAVE_UNISTD_H before including
2481 <unistd.h>.
2482 * gdbreplay.c: Likewise.
2483 * remote-utils.c: Likewise.
2484 * server.c: Likewise.
2485 * configure.ac: Don't check for unistd.h.
2486 * configure: Regenerate.
2487
d6c2da54
TT
24882013-06-28 Tom Tromey <tromey@redhat.com>
2489
2490 * Makefile.in (version.c): Use version.in, not
2491 common/version.in.
2492
257b6bec
MG
24932013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2494
2495 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2496 * configure: Rebuild.
2497 * Makefile.in (version_host, version_target): Get from configure.
2498 (version.c): Use $(version_host) and $(version_target).
2499
86ebe149
DK
25002013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2501
2502 Fix trace-status to output user name without trailing colon.
2503 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
2504
f30aa5af
DK
25052013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2506
2507 Fix trace-status to output proper start-time and stop-time.
2508 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
2509 output start time and stop time in hex as gdb expects.
2510
28a93511
YQ
25112013-06-26 Pedro Alves <pedro@codesourcery.com>
2512
2513 * tracepoint.c (build_traceframe_info_xml): Output trace state
2514 variables present in the trace buffer.
2515
01208463
TT
25162013-06-24 Tom Tromey <tromey@redhat.com>
2517
2518 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
2519 create-version.sh.
2520 (version.o): Remove.
2521 * gdbreplay.c: Include version.h.
2522 (version, host_name): Don't declare.
2523 * server.h: Include version.h.
2524 (version, host_name): Don't declare.
2525
760256f9
PA
25262013-06-12 Pedro Alves <palves@redhat.com>
2527
2528 * linux-x86-low.c (linux_is_elf64): Delete global.
2529 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
2530 with local linux_pid_exe_is_elf_64_file use.
2531
030031ee
PA
25322013-06-11 Pedro Alves <palves@redhat.com>
2533
2534 * linux-low.c (regset_disabled, disable_regset): New functions.
2535 (regsets_fetch_inferior_registers)
2536 (regsets_store_inferior_registers): Use them.
2537 (initialize_regsets_info); Don't allocate the disabled_regsets
2538 array here.
2539 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
2540 comment.
2541
5da6eb0a
PA
25422013-06-11 Pedro Alves <palves@redhat.com>
2543
2544 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
2545 xmalloc.
2546
7e5aaa09
PA
25472013-06-11 Pedro Alves <palves@redhat.com>
2548
2549 * linux-x86-low.c (initialize_low_arch): Call
2550 init_registers_x32_avx_linux.
2551
d878444c
JK
25522013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
2553
2554 Fix compatibility with Android Bionic.
2555 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
2556 it is not empty.
2557
3aee8918
PA
25582013-06-07 Pedro Alves <palves@redhat.com>
2559
5f2b57b5 2560 PR server/14823
3aee8918
PA
2561 * Makefile.in (OBS): Add tdesc.o.
2562 (IPA_OBJS): Add tdesc-ipa.o.
2563 (tdesc-ipa.o): New rule.
2564 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
2565 interface.
2566 * linux-low.c (new_inferior): Delete.
2567 (disabled_regsets, num_regsets): Delete.
2568 (linux_add_process): Adjust to set the new per-process
2569 new_inferior flag.
2570 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
2571 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
2572 was a stop. When calling arch_setup, switch the current inferior
2573 to the thread that got an event.
2574 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
2575 (regsets_fetch_inferior_registers)
2576 (regsets_store_inferior_registers): New regsets_info parameter.
2577 Adjust to use it.
2578 (linux_register_in_regsets): New regs_info parameter. Adjust to
2579 use it.
2580 (register_addr, fetch_register, store_register): New usrregs_info
2581 parameter. Adjust to use it.
2582 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
2583 parameter regs_info. Adjust to use it.
2584 (linux_fetch_registers): Get the current inferior's regs_info, and
2585 adjust to use it.
2586 (linux_store_registers): Ditto.
2587 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
2588 (initialize_low): Don't initialize the target_regsets here. Call
2589 initialize_low_arch.
2590 * linux-low.h (target_regsets): Delete declaration.
2591 (struct regsets_info): New.
2592 (struct usrregs_info): New.
2593 (struct regs_info): New.
2594 (struct process_info_private) <new_inferior>: New field.
2595 (struct linux_target_ops): Delete the num_regs, regmap, and
2596 regset_bitmap fields. New field regs_info.
2597 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
2598 * i387-fp.c (num_xmm_registers): Delete.
2599 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
2600 calls to new interface.
2601 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
2602 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
2603 Infer the number of xmm registers from the regcache's target
2604 description.
2605 * i387-fp.h (num_xmm_registers): Delete.
2606 * inferiors.c (add_thread): Don't install the thread's regcache
2607 here.
2608 * proc-service.c (gregset_info): Fetch the current inferior's
2609 regs_info. Adjust to use it.
2610 * regcache.c: Include tdesc.h.
2611 (register_bytes, reg_defs, num_registers)
2612 (gdbserver_expedite_regs): Delete.
2613 (get_thread_regcache): If the thread doesn't have a regcache yet,
2614 create one, instead of aborting gdbserver.
2615 (regcache_invalidate_one): Rename to ...
2616 (regcache_invalidate_thread): ... this.
2617 (regcache_invalidate_one): New.
2618 (regcache_invalidate): Only invalidate registers of the current
2619 process.
2620 (init_register_cache): Add target_desc parameter, and use it.
2621 (new_register_cache): Ditto. Assert the target description has a
2622 non zero registers_size.
2623 (regcache_cpy): Add assertions. Adjust.
2624 (realloc_register_cache, set_register_cache): Delete.
2625 (registers_to_string, registers_from_string): Adjust.
2626 (find_register_by_name, find_regno, find_register_by_number)
2627 (register_cache_size): Add target_desc parameter, and use it.
2628 (free_register_cache_thread, free_register_cache_thread_one)
2629 (regcache_release, register_cache_size): New.
2630 (register_size): Add target_desc parameter, and use it.
2631 (register_data, supply_register, supply_register_zeroed)
2632 (supply_regblock, supply_register_by_name, collect_register)
2633 (collect_register_as_string, collect_register_by_name): Adjust.
2634 * regcache.h (struct target_desc): Forward declare.
2635 (struct regcache) <tdesc>: New field.
2636 (init_register_cache, new_register_cache): Add target_desc
2637 parameter.
2638 (regcache_invalidate_thread): Declare.
2639 (regcache_invalidate_one): Delete declaration.
2640 (regcache_release): Declare.
2641 (find_register_by_number, register_cache_size, register_size)
2642 (find_regno): Add target_desc parameter.
2643 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
2644 declarations.
2645 * remote-utils.c: Include tdesc.h.
2646 (outreg, prepare_resume_reply): Adjust.
2647 * server.c: Include tdesc.h.
2648 (gdbserver_xmltarget): Delete declaration.
2649 (get_features_xml, process_serial_event): Adjust.
2650 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
2651 declare.
2652 (struct process_info) <tdesc>: New field.
2653 (ipa_tdesc): Declare.
2654 * tdesc.c: New file.
2655 * tdesc.h: New file.
2656 * tracepoint.c: Include tdesc.h.
2657 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
2658 (get_context_regcache): Adjust to pass ipa_tdesc down.
2659 (do_action_at_tracepoint): Adjust to get the register cache size
2660 from the context regcache's description.
2661 (traceframe_walk_blocks): Adjust to get the register cache size
2662 from the current trace frame's description.
2663 (traceframe_get_pc): Adjust to get current trace frame's
2664 description and pass it down.
2665 (gdb_collect): Adjust to get the register cache size from the
2666 IPA's description.
2667 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
2668 (gdbserver_xmltarget): Delete.
2669 (initialize_low_tracepoint): Set the ipa's target description.
2670 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
2671 (initialize_low_tracepoint): Set the ipa's target description.
2672 * linux-x86-low.c: Include tdesc.h.
2673 [__x86_64__] (is_64bit_tdesc): New.
2674 (ps_get_thread_area, x86_get_thread_area): Use it.
2675 (i386_cannot_store_register): Rename to ...
2676 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
2677 (i386_cannot_fetch_register): Rename to ...
2678 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
2679 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
2680 to new interface.
2681 (target_regsets): Rename to ...
2682 (x86_regsets): ... this.
2683 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
2684 interface.
2685 (x86_siginfo_fixup): Use is_64bit_tdesc.
2686 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
2687 (tdesc_x32_avx_linux, tdesc_x32_linux)
2688 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
2689 Declare.
2690 (x86_linux_update_xmltarget): Delete.
2691 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
2692 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
2693 (AMD64_LINUX_USER64_CS): New.
2694 (x86_linux_read_description): New, based on
2695 x86_linux_update_xmltarget.
2696 (same_process_callback): New.
2697 (x86_arch_setup_process_callback): New.
2698 (x86_linux_update_xmltarget): New.
2699 (x86_regsets_info): New.
2700 (amd64_linux_regs_info): New.
2701 (i386_linux_usrregs_info): New.
2702 (i386_linux_regs_info): New.
2703 (x86_linux_regs_info): New.
2704 (x86_arch_setup): Reimplement.
2705 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
2706 (x86_emit_ops): Ditto.
2707 (the_low_target): Adjust. Install x86_linux_regs_info,
2708 x86_cannot_fetch_register, and x86_cannot_store_register.
2709 (initialize_low_arch): New.
2710 * linux-ia64-low.c (tdesc_ia64): Declare.
2711 (ia64_fetch_register): Adjust.
2712 (ia64_usrregs_info, regs_info): New globals.
2713 (ia64_regs_info): New function.
2714 (the_low_target): Adjust.
2715 (initialize_low_arch): New function.
2716 * linux-sparc-low.c (tdesc_sparc64): Declare.
2717 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
2718 Adjust.
2719 (sparc_arch_setup): New function.
2720 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
2721 (the_low_target): Adjust.
2722 (initialize_low_arch): New function.
2723 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
2724 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
2725 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
2726 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
2727 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
2728 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
2729 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
2730 (tdesc_powerpc_isa205_vsx64l): Declare.
2731 (ppc_cannot_store_register, ppc_collect_ptrace_register)
2732 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
2733 (ppc_set_pc, ppc_get_hwcap): Adjust.
2734 (ppc_usrregs_info): Forward declare.
2735 (!__powerpc64__) ppc_regmap_adjusted: New global.
2736 (ppc_arch_setup): Adjust to the current process'es target
2737 description.
2738 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
2739 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
2740 (ppc_store_evrregset): Adjust.
2741 (target_regsets): Rename to ...
2742 (ppc_regsets): ... this, and make static.
2743 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
2744 (ppc_regs_info): New function.
2745 (the_low_target): Adjust.
2746 (initialize_low_arch): New function.
2747 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
2748 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
2749 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
2750 (tdesc_s390x_linux64v2): Declare.
2751 (s390_collect_ptrace_register, s390_supply_ptrace_register)
2752 (s390_fill_gregset, s390_store_last_break): Adjust.
2753 (target_regsets): Rename to ...
2754 (s390_regsets): ... this, and make static.
2755 (s390_get_pc, s390_set_pc): Adjust.
2756 (s390_get_hwcap): New target_desc parameter, and use it.
2757 [__s390x__] (have_hwcap_s390_high_gprs): New global.
2758 (s390_arch_setup): Adjust to set the current process'es target
2759 description. Don't adjust the regmap.
2760 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
2761 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
2762 (regs_info_3264): New globals.
2763 (s390_regs_info): New function.
2764 (the_low_target): Adjust.
2765 (initialize_low_arch): New function.
2766 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
2767 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
2768 [__mips64] (init_registers_mips_linux)
2769 (init_registers_mips_dsp_linux): Delete defines.
2770 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
2771 (have_dsp): New global.
2772 (mips_read_description): New, based on mips_arch_setup.
2773 (mips_arch_setup): Reimplement.
2774 (get_usrregs_info): New function.
2775 (mips_cannot_fetch_register, mips_cannot_store_register)
2776 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
2777 (mips_fill_fpregset, mips_store_fpregset): Adjust.
2778 (target_regsets): Rename to ...
2779 (mips_regsets): ... this, and make static.
2780 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
2781 (dsp_regs_info, regs_info): New globals.
2782 (mips_regs_info): New function.
2783 (the_low_target): Adjust.
2784 (initialize_low_arch): New function.
2785 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
2786 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
2787 Declare.
2788 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
2789 (arm_read_description): New, with bits factored from
2790 arm_arch_setup.
2791 (arm_arch_setup): Reimplement.
2792 (target_regsets): Rename to ...
2793 (arm_regsets): ... this, and make static.
2794 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
2795 (arm_regs_info): New function.
2796 (the_low_target): Adjust.
2797 (initialize_low_arch): New function.
2798 * linux-m68k-low.c (tdesc_m68k): Declare.
2799 (target_regsets): Rename to ...
2800 (m68k_regsets): ... this, and make static.
2801 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
2802 (m68k_regs_info): New function.
2803 (m68k_arch_setup): New function.
2804 (the_low_target): Adjust.
2805 (initialize_low_arch): New function.
2806 * linux-sh-low.c (tdesc_sharch): Declare.
2807 (target_regsets): Rename to ...
2808 (sh_regsets): ... this, and make static.
2809 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
2810 (sh_regs_info, sh_arch_setup): New functions.
2811 (the_low_target): Adjust.
2812 (initialize_low_arch): New function.
2813 * linux-bfin-low.c (tdesc_bfin): Declare.
2814 (bfin_arch_setup): New function.
2815 (bfin_usrregs_info, regs_info): New globals.
2816 (bfin_regs_info): New function.
2817 (the_low_target): Adjust.
2818 (initialize_low_arch): New function.
2819 * linux-cris-low.c (tdesc_cris): Declare.
2820 (cris_arch_setup): New function.
2821 (cris_usrregs_info, regs_info): New globals.
2822 (cris_regs_info): New function.
2823 (the_low_target): Adjust.
2824 (initialize_low_arch): New function.
2825 * linux-cris-low.c (tdesc_crisv32): Declare.
2826 (cris_arch_setup): New function.
2827 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
2828 (cris_regs_info): New function.
2829 (the_low_target): Adjust.
2830 (initialize_low_arch): New function.
2831 * linux-m32r-low.c (tdesc_m32r): Declare.
2832 (m32r_arch_setup): New function.
2833 (m32r_usrregs_info, regs_info): New globals.
2834 (m32r_regs_info): Adjust.
2835 (initialize_low_arch): New function.
2836 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
2837 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
2838 (tic6x_usrregs_info): Forward declare.
2839 (tic6x_read_description): New function, based on ...
2840 (tic6x_arch_setup): ... this. Reimplement.
2841 (target_regsets): Rename to ...
2842 (tic6x_regsets): ... this, and make static.
2843 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
2844 (tic6x_regs_info): New function.
2845 (the_low_target): Adjust.
2846 (initialize_low_arch): New function.
2847 * linux-xtensa-low.c (tdesc_xtensa): Declare.
2848 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
2849 (target_regsets): Rename to ...
2850 (xtensa_regsets): ... this, and make static.
2851 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
2852 globals.
2853 (xtensa_arch_setup, xtensa_regs_info): New functions.
2854 (the_low_target): Adjust.
2855 (initialize_low_arch): New function.
2856 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
2857 (nios2_arch_setup): Set the current process'es tdesc.
2858 (target_regsets): Rename to ...
2859 (nios2_regsets): ... this.
2860 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
2861 (nios2_regs_info): New function.
2862 (the_low_target): Adjust.
2863 (initialize_low_arch): New function.
a261b8f5
PA
2864 * linux-aarch64-low.c (tdesc_aarch64): Declare.
2865 (aarch64_arch_setup): Set the current process'es tdesc.
2866 (target_regsets): Rename to ...
2867 (aarch64_regsets): ... this.
2868 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
2869 (aarch64_regs_info): New function.
2870 (the_low_target): Adjust.
2871 (initialize_low_arch): New function.
3aee8918
PA
2872 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
2873 globals.
2874 (target_regsets): Rename to ...
2875 (tile_regsets): ... this.
2876 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
2877 (tile_regs_info): New function.
2878 (tile_arch_setup): Set the current process'es tdesc.
2879 (the_low_target): Adjust.
2880 (initialize_low_arch): New function.
2881 * spu-low.c (tdesc_spu): Declare.
2882 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
2883 * win32-arm-low.c (tdesc_arm): Declare.
2884 (arm_arch_setup): New function.
2885 (the_low_target): Install arm_arch_setup instead of
2886 init_registers_arm.
2887 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
2888 (init_windows_x86): Rename to ...
2889 (i386_arch_setup): ... this. Set `win32_tdesc'.
2890 (the_low_target): Adjust.
2891 * win32-low.c (win32_tdesc): New global.
2892 (child_add_thread): Don't create the thread cache here.
2893 (do_initial_child_stuff): Set the new process'es tdesc.
2894 * win32-low.h (struct target_desc): Forward declare.
2895 (win32_tdesc): Declare.
2896 * lynx-i386-low.c (tdesc_i386): Declare global.
2897 (lynx_i386_arch_setup): Set `lynx_tdesc'.
2898 * lynx-low.c (lynx_tdesc): New global.
2899 (lynx_add_process): Set the new process'es tdesc.
2900 * lynx-low.h (struct target_desc): Forward declare.
2901 (lynx_tdesc): Declare global.
2902 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
2903 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
2904 * nto-low.c (nto_tdesc): New global.
2905 (do_attach): Set the new process'es tdesc.
2906 * nto-low.h (struct target_desc): Forward declare.
2907 (nto_tdesc): Declare.
2908 * nto-x86-low.c (tdesc_i386): Declare.
2909 (nto_x86_arch_setup): Set `nto_tdesc'.
2910
b1fbec62
GB
29112013-06-04 Gary Benson <gbenson@redhat.com>
2912
2913 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
2914 to qSupported response when appropriate.
2915 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
2916 with nonzero-length annex.
2917 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
2918 arguments supplied in annex.
2919
d1ec4ce7
DE
29202013-05-31 Doug Evans <dje@google.com>
2921
ac44adcb 2922 PR server/15594
d1ec4ce7
DE
2923 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
2924 64 bits in 64-cross-32 environment.
2925
9b25f2d3
PA
29262013-05-28 Pedro Alves <palves@redhat.com>
2927
2928 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
2929 (aarch64-without-fpu.c): Delete rule.
2930 * configure.srv (aarch64*-*-linux*): Remove references to
2931 aarch64-without-fpu.o and aarch64-without-fpu.xml.
2932 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
2933 declaration.
2934
6740dc9c
PA
29352013-05-24 Pedro Alves <palves@redhat.com>
2936
2937 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
2938 instead of strchr/decode_address. Error if the range isn't split
2939 with a ','. Don't assume there's be a ':' in the action.
2940
c2d6af84
PA
29412013-05-23 Yao Qi <yao@codesourcery.com>
2942 Pedro Alves <palves@redhat.com>
2943
2944 * linux-low.c (lwp_in_step_range): New function.
2945 (linux_wait_1): If the thread was range stepping and stopped
2946 outside the stepping range, report the stop to GDB. Otherwise,
2947 continue stepping. Add range stepping debug output.
2948 (linux_set_resume_request): Copy the step range from the resume
2949 request to the lwp.
2950 (linux_supports_range_stepping): New.
2951 (linux_target_ops) <supports_range_stepping>: Set to
2952 linux_supports_range_stepping.
2953 * linux-low.h (struct linux_target_ops)
2954 <supports_range_stepping>: New field.
2955 (struct lwp_info) <step_range_start, step_range_end>: New fields.
2956 * linux-x86-low.c (x86_supports_range_stepping): New.
2957 (the_low_target) <supports_range_stepping>: Set to
2958 x86_supports_range_stepping.
2959 * server.c (handle_v_cont): Handle 'r' action.
2960 (handle_v_requests): Append ";r" if the target supports range
2961 stepping.
2962 * target.h (struct thread_resume) <step_range_start,
2963 step_range_end>: New fields.
2964 (struct target_ops) <supports_range_stepping>:
2965 New field.
2966 (target_supports_range_stepping): New macro.
2967
58794e1a
JB
29682013-05-17 Joel Brobecker <brobecker@adacore.com>
2969
2970 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
2971 confusion in comment.
2972
d631c5a7
JB
29732013-05-17 Joel Brobecker <brobecker@adacore.com>
2974
2975 * lynx-low.c (struct process_info_private): New type.
2976 (lynx_add_process): New function.
2977 (lynx_create_inferior, lynx_attach): Replace calls to
2978 add_process by calls to lynx_add_process.
2979 (lynx_resume): If PTID is null, then try using
2980 current_process()->private->last_wait_event_ptid.
2981 Add comments.
2982 (lynx_clear_inferiors): Delete. The contents of that function
2983 has been inlined in lynx_mourn;
2984 (lynx_wait_1): Save the ptid in the process's private data.
2985 (lynx_mourn): Free the process' private data. Replace call
2986 to lynx_clear_inferiors by call to clear_inferiors.
2987
96f7a20f
YQ
29882013-05-17 Yao Qi <yao@codesourcery.com>
2989
2990 * i386-low.c (i386_length_and_rw_bits): Move the comment to
2991 the right place.
2992
db0dfaa0
LM
29932013-05-16 Luis Machado <lgustavo@codesourcery.com>
2994
2995 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
2996 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
2997 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
2998 PT_TEXT_END_ADDR guards. Update comments.
2999 (linux_target_op) <read_offsets>: Conditionally define to
3000 linux_read_offsets if the target is UCLIBC and if it defines
3001 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3002
68f5f838
SL
30032013-05-06 Sandra Loosemore <sandra@codesourcery.com>
3004 Andrew Jenner <andrew@codesourcery.com>
3005
3006 * Makefile.in (SFILES): Add linux-nios2-low.c.
3007 (clean): Add action to delete nios2-linux.c.
3008 (nios2-linux.c): New rule.
3009 * configure.srv: Add nios2*-*-linux*.
3010 * linux-nios2-low.c: New.
3011
1ebff1fd
HAQ
30122013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
3013
3014 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3015
f6150862
HZ
30162013-04-25 Hui Zhu <hui@codesourcery.com>
3017
3018 PR gdb/15186
f6150862
HZ
3019 * ax.c (ax_printf): Add fflush.
3020
614c279d
TT
30212013-04-22 Tom Tromey <tromey@redhat.com>
3022
3023 * Makefile.in (SFILES): Add filestuff.c.
3024 (OBS): Add filestuff.o.
3025 (filestuff.o): New target.
3026 * config.in, configure: Rebuild.
3027 * configure.ac: Check for fdwalk, pipe2.
3028
7d4e5717
PA
30292013-04-17 Pedro Alves <palves@redhat.com>
3030
3031 * configure.ac (USE_THREAD_DB): Delete variable.
3032 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3033 Don't AC_SUBST USE_THREAD_DB.
3034 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3035 * config.in, configure: Regenerate.
3036
d5c93e41
PA
30372013-04-16 Pedro Alves <palves@redhat.com>
3038
3039 * linux-low.h (struct lwp_info) <thread_known>: Move under
3040 the USE_THREAD_DB #ifdef.
3041
04f5fe89
PA
30422013-04-16 Pedro Alves <palves@redhat.com>
3043
3044 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
3045 (linux-low.o): Delete rule.
3046 * linux-low.h: Always include "gdb_thread_db.h" instead of
3047 conditionally including thread_db.h.
3048 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3049 HAVE_THREAD_DB_H.
3050
480b27bf
JK
30512013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3052
3053 * Makefile.in (install-only): Fix make install regression.
3054
43662968
JK
30552013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
3056
3057 Convert man pages to texinfo, new gdbinit.5 texinfo page.
3058 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
3059 installation.
3060 * gdbserver.1: Remove.
3061
3e74e146
PA
30622013-03-22 Pedro Alves <palves@redhat.com>
3063
3064 * linux-low.c (handle_extended_wait): Don't call
3065 linux_enable_event_reporting.
3066
a8347a2a
TT
30672013-03-15 Tony Theodore <tonyt@logyst.com>
3068
3069 PR build/9098:
3070 * Makefile.in (SHELL): Use @SHELL@.
3071
eeb56fa7
SDJ
30722013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
3073
3074 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
3075 compiler warning.
3076
4fa7e2ff
JB
30772013-03-13 Joel Brobecker <brobecker@adacore.com>
3078
3079 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
3080 Remove extraneous NULL element.
3081
8ddb1965
YQ
30822013-03-13 Yao Qi <yao@codesourcery.com>
3083
3084 * tracepoint.c (traceframe_read_tsv): Look for the last matched
3085 'V' block in trace frame.
3086
9accd112
MM
30872013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3088
3089 * target.h (struct target_ops): Add btrace ops.
3090 (target_supports_btrace): New macro.
3091 (target_enable_btrace): New macro.
3092 (target_disable_btrace): New macro.
3093 (target_read_btrace): New macro.
3094 * gdbthread.h (struct thread_info): Add btrace field.
3095 * server.c: Include btrace-common.h.
3096 (handle_btrace_general_set): New function.
3097 (handle_btrace_enable): New function.
3098 (handle_btrace_disable): New function.
3099 (handle_general_set): Call handle_btrace_general_set.
3100 (handle_qxfer_btrace): New function.
3101 (struct qxfer qxfer_packets[]): Add btrace entry.
3102 * inferiors.c (remove_thread): Disable btrace.
3103 * linux-low: Include linux-btrace.h.
3104 (linux_low_enable_btrace): New function.
3105 (linux_low_read_btrace): New function.
3106 (linux_target_ops): Add btrace ops.
3107 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
3108 Add srv_linux_btrace=yes.
3109 (x86_64-*-linux*): Add linux-btrace.o.
3110 Add srv_linux_btrace=yes.
3111 * configure.ac: Define HAVE_LINUX_BTRACE.
3112 * config.in: Regenerated.
3113 * configure: Regenerated.
3114
5cc22e4c
MM
31152013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3116
3117 * server.c (handle_qxfer): Preserve error message if -3 is
3118 returned.
3119 (qxfer): Document the -3 return value.
3120
7c97f91e
MM
31212013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3122
3123 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
3124 (linux_btrace_h): New variable.
3125 (linux-btrace.o): New rule.
3126
be9a119c 31272013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
3128 Hafiz Abid Qadeer <abidh@codesourcery.com>
3129
3130 * tracepoint.c (trace_buffer_size): New global.
3131 (DEFAULT_TRACE_BUFFER_SIZE): New define.
3132 (init_trace_buffer): Change to one-argument function. Allocate
3133 trace buffer memory.
3134 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
3135 handle QTBuffer:size packet.
3136 (cmd_bigqtbuffer_size): New function.
3137 (initialize_tracepoint): Call init_trace_buffer with
3138 DEFAULT_TRACE_BUFFER_SIZE.
3139 * server.c (handle_query): Add QTBuffer:size in the
3140 supported packets.
3141
e64f7499
YQ
31422013-03-07 Yao Qi <yao@codesourcery.com>
3143
3144 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
3145 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
3146 of -1.
3147 (cmd_qtsp): Adjust condition. Do post increment.
3148 Set cur_action and cur_step_action back to 0.
3149
f0ae6fc3
PA
31502013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
3151
3152 PR server/15236
3153 * linux-low.c (linux_write_memory): Return early success if LEN is
3154 zero.
3155
b5b0b0af
CV
31562013-03-05 Corinna Vinschen <vinschen@redhat.de>
3157
334ad4a8 3158 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 3159
589bc927
TT
31602013-02-28 Tom Tromey <tromey@redhat.com>
3161
3162 * configure.ac: Invoke AC_SYS_LARGEFILE.
3163 * configure, config.in: Rebuild.
3164
dfe07582
CV
31652013-02-28 Corinna Vinschen <vinschen@redhat.com>
3166
3167 * win32-low.c: Throughout, fix format strings and casts of
3168 printf-like functions to avoid type related warnings on all
3169 platforms.
3170 (get_child_debug_event): Print dwDebugEventCode as hex since
3171 that's how it's usually documented.
3172
736cd585
YQ
31732013-02-28 Yao Qi <yao@codesourcery.com>
3174
3175 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
3176 pulongest.
3177
e1f58301
JW
31782013-02-27 Jiong Wang <jiwang@tilera.com>
3179
3180 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3181 (reg-tilegx32.c): New rule.
3182 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3183 * linux-tile-low.c (tile_arch_setup): New function. Invoke
3184 different register info initializer according to elf class.
3185 (init_registers_tilgx32): New function. The tilegx32 register info
3186 initializer.
3187 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3188 (tile_store_gregset): Likewise.
3189
d171ca78
YQ
31902013-02-27 Yao Qi <yao@codesourcery.com>
3191
3192 * server.c (process_point_options): Print debug message when
3193 debug_threads is true.
3194
282bbdf3
YQ
31952013-02-26 Yao Qi <yao@codesourcery.com>
3196
3197 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
3198
aca22551
PA
31992013-02-19 Pedro Alves <palves@redhat.com>
3200 Kai Tietz <ktietz@redhat.com>
3201
3202 PR gdb/15161
3203
3204 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
3205 instead of strtoul to extract address from packet.
3206 (process_serial_event) <'z'>: Likewise.
3207
4f3cee1c
YQ
32082013-02-18 Yao Qi <yao@codesourcery.com>
3209
3210 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3211
8e1d55a3
PA
32122013-02-14 Pedro Alves <palves@redhat.com>
3213
3214 Plug memory leak.
3215
3216 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3217 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3218
458820da
PA
32192013-02-14 Pedro Alves <palves@redhat.com>
3220
3221 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3222
baea0dae
PA
32232013-02-14 Pedro Alves <palves@redhat.com>
3224
3225 * tracepoint.c (save_string): Delete.
3226 (add_tracepoint_action): Use savestring instead of save_string.
3227
0b1afbb3
PA
32282013-02-12 Pedro Alves <palves@redhat.com>
3229
3230 * linux-xtensa-low.c: Ditto.
3231 * xtensa-xtregs.c: Ditto.
3232
8a4ac37e
PA
32332013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3234
3235 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3236 thread_db.
3237
148de6bb
MS
32382013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3239
3240 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3241 aarch64_num_wp_regs and aarch64_num_bp_regs to
3242 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3243
55fac6e0
MS
32442013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3245
3246 * linux-aarch64-low.c (ps_get_thread_area): Replace
3247 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3248
176eb98c
MS
32492013-02-04 Jim MacArthur <jim.macarthur@arm.com>
3250 Marcus Shawcroft <marcus.shawcroft@arm.com>
3251 Nigel Stephens <nigel.stephens@arm.com>
3252 Yufeng Zhang <yufeng.zhang@arm.com>
3253
3254 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3255 (aarch64.c, aarch64-without-fpu.c): New targets.
3256 * configure.srv (aarch64*-*-linux*): New.
3257 * linux-aarch64-low.c: New file.
3258
56f7af9c
MS
32592013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3260
43aaf8b6 3261 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
3262 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3263 (dequeue_one_deferred_signal, linux_resume_one_thread)
3264 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3265 (linux_tracefork_grandchild, linux_test_for_tracefork)
3266 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3267 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3268 where the argument is 0.
3269
60f662b0
YQ
32702013-01-25 Yao Qi <yao@codesourcery.com>
3271
3272 * event-loop.c: Include "queue.h".
3273 (gdb_event_p): New typedef.
3274 (struct gdb_event) <next_event>: Remove.
3275 (event_queue): Change to QUEUE(gdb_event_p).
3276 (async_queue_event): Remove.
3277 (gdb_event_xfree): New.
3278 (initialize_event_loop): New.
3279 (process_event): Use API from QUEUE.
3280 (wait_for_event): Likewise.
3281 * server.c (main): Call initialize_event_loop.
3282 * server.h (initialize_event_loop): Declare.
3283
5ae4861a
YQ
32842013-01-18 Yao Qi <yao@codesourcery.com>
3285
3286 * ax.h (struct eval_agent_expr_context): New.
3287 (gdb_eval_agent_expr): Update declaration.
3288 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
3289 TFRAME. Add new argument CTX.
3290 * server.h (struct eval_agent_expr_context): Declare.
3291 (agent_mem_read, agent_tsv_read): Update declaration.
3292 (agent_mem_read_string): Likewise.
3293 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
3294 (add_traceframe_block): Add new argument TPOINT.
3295 Increase TPOINT->traceframe_usage.
3296 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
3297 eval_tracepoint_agent_expr.
3298 (condition_true_at_tracepoint): Likewise.
3299 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
3300 (agent_mem_read_string, agent_tsv_read): Likewise.
3301
85e00e85
YQ
33022013-01-16 Yao Qi <yao@codesourcery.com>
3303
3304 * linux-low.c (linux_resume_one_lwp): Don't check
3305 'lwp->bp_reinsert != 0'.
3306
4039cf45
JB
33072013-01-07 Joel Brobecker <brobecker@adacore.com>
3308 Pedro Alves <palves@redhat.com>
3309
3310 * lynx-low.c (ptrace_request_to_str): Define a temporary
3311 macro and use it to simplify this function's implementation.
3312
9044dee2
JB
33132013-01-07 Joel Brobecker <brobecker@adacore.com>
3314
3315 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
3316 sets errno.
3317
e6352c8f
JB
33182013-01-07 Joel Brobecker <brobecker@adacore.com>
3319
3320 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
3321
50681a27
JB
33222013-01-07 Joel Brobecker <brobecker@adacore.com>
3323
3324 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
3325
3f6e77ef
JB
33262013-01-07 Joel Brobecker <brobecker@adacore.com>
3327
3328 * lynx-low.c (lynx_resume): Use the resume_info parameter
3329 to determine the ptid for the lynx_ptrace call, unless
3330 it is equal to minus_one_ptid, in which case we use the
3331 ptid of the current_inferior.
3332 (lynx_wait_1): After having received a thread create/exit
3333 event, resume the inferior's execution using the signaling
3334 thread's ptid, rather than the old ptid.
3335
7fda33ae
JB
33362013-01-07 Joel Brobecker <brobecker@adacore.com>
3337
3338 * lynx-low.c (lynx_resume): Delete variable ret.
3339
b9786c74
JB
33402013-01-01 Joel Brobecker <brobecker@adacore.com>
3341
3342 * gdbreplay.c (gdbreplay_version): Update copyright year.
3343 * server.c (gdbserver_version): Likewise.
3344
8b93d60f
JB
33452012-12-17 Joel Brobecker <brobecker@adacore.com>
3346
3347 * lynx-low.c (lynx_wait_1): Add debug trace before adding
3348 new thread.
3349
037335a7
JB
33502012-12-17 Joel Brobecker <brobecker@adacore.com>
3351
3352 * lynx-low.c (ptrace_request_to_str): Add handling for
3353 PTRACE_GETTRACESIG.
3354
52d4cbd8
JB
33552012-12-17 Joel Brobecker <brobecker@adacore.com>
3356
3357 * lynx-low.c (lynx_attach): Delete variable new_process.
3358
ab8f6ca9
JB
33592012-12-17 Joel Brobecker <brobecker@adacore.com>
3360
3361 * lynx-low.c (lynx_create_inferior): Delete variable
3362 new_process.
3363
78cbc024
JB
33642012-12-17 Joel Brobecker <brobecker@adacore.com>
3365
3366 * lynx-low.c (ptrace_request_to_str): Do not handle
3367 PTRACE_GETTHREADLIST if this macro does not exist.
3368
14a00470
YQ
33692012-12-15 Yao Qi <yao@codesourcery.com>
3370
3371 * Makefile.in (OBS): Add notif.o.
3372 * notif.c, notif.h: New.
3373 * server.c: Include "notif.h".
3374 (struct vstop_notif) <next>: Remove.
3375 <base>: New field.
3376 (queue_stop_reply): Update.
3377 (push_event, send_next_stop_reply): Remove.
3378 (discard_queued_stop_replies): Update.
3379 (notif_stop): New variable.
3380 (handle_v_stopped): Remove.
3381 (handle_v_requests): Don't call handle_v_stopped. Call
3382 handle_ack_notif instead.
3383 (queue_stop_reply_callback): Call notif_event_enque instead
3384 of queue_stop_reply.
3385 (handle_status): Don't call send_next_stop_reply, call
3386 notif_write_event instead.
3387 (kill_inferior_callback): Likewise.
3388 (detach_or_kill_inferior_callback): Likewise.
3389 (main): Call initialize_notif.
3390 (process_serial_event): Call QUEUE_is_empty.
3391 (handle_target_event): Call notif_push instead of push event.
3392 * server.h (push_event): Remove declaration.
3393
61c125b9
TT
33942012-12-10 Tom Tromey <tromey@redhat.com>
3395
3396 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
3397 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
3398 macros.
3399 (.c.o): Rewrite.
3400 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
3401 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
3402 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
3403 (amd64-linux-ipa.o, ax.o): Rewrite.
3404 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
3405 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
3406 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
3407 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
3408 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
3409 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
3410 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
3411 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
3412 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
3413 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
3414 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
3415 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
3416 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
3417 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
3418 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
3419 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
3420 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
3421 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
3422 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
3423 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
3424 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
3425 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
3426 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
3427 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
3428 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
3429 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
3430 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
3431 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
3432 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
3433 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
3434 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
3435 (reg-tilegx.o): Remove.
3436 (all_object_files): New macro.
3437 Include .deps files.
3438 * aclocal.m4, configure: Rebuild.
3439 * acinclude.m4: Include depstand.m4, lead-dot.m4.
3440 * configure.ac: Invoke ZW_CREATE_DEPDIR,
3441 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
3442
e90e9ad9
TT
34432012-12-05 Tom Tromey <tromey@redhat.com>
3444
3445 PR gdb/14917:
3446 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
3447
02d403bf 34482012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
3449
3450 * configure.ac: Check for linux/perf_event.h.
3451 * config.in: Regenerated.
3452 * configure: Regenerated.
3453
0270a750
PA
34542012-11-26 Maxime Villard <rustyBSD@gmx.fr>
3455
3456 * hostio.c (handle_readlink): Decrease buffer size
3457 parameter passed to readlink by one byte.
3458
8c29b58e
YQ
34592012-11-26 Yao Qi <yao@codesourcery.com>
3460
3461 * configure.ac (build_warnings): Append '-Wempty-body'.
3462 * configure: Regenerated.
3463 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
3464 body.
3465
8bdce1ff
PM
34662012-11-15 Pierre Muller <muller@sourceware.org>
3467
3468 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
3469 * config.in: Regenerate.
3470 * configure: Regenerate.
3471 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
3472 Use "gdb_wait.h" header instead of <sys/wait.h> header.
3473 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3474 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
3475 header.
3476 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
3477 instead of <sys/wait.h> header.
3478 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3479
02d403bf 34802012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
3481
3482 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
3483 (various make rules): Remove -DGDBSERVER
3484
fbd5db48
YQ
34852012-11-09 Yao Qi <yao@codesourcery.com>
3486
3487 * spu-low.c (current_ptid): Move it to ..
3488 * gdbthread.h: ... here. New.
3489 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
3490 * server.c (myresume, process_serial_event): Likewise.
3491 * thread-db.c (thread_db_find_new_threads): Likewise.
3492 * tracepoint.c (run_inferior_command): Likewise.
3493
b3dc46ff
AB
34942012-10-01 Andrew Burgess <aburgess@broadcom.com>
3495
3496 * server.c (handle_search_memory_1): Include access length in
3497 warning message.
3498
07c04788
HPN
34992012-09-05 Michael Brandt <michael.brandt@axis.com>
3500
3501 * linux-crisv32-low.c: Fix compile errors.
3502
918d227b
YQ
35032012-09-04 Yao Qi <yao@codesourcery.com>
3504
3505 * tracepoint.c (cmd_qtsv): Adjust debug message.
3506 Don't check CUR_TPOINT.
3507
18c1b81a
YQ
35082012-08-28 Yao Qi <yao@codesourcery.com>
3509
3510 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
3511 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
3512 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
3513 Remove declarations of xmalloc, xreallloc, xstrdup and
3514 freeargv.
3515 * Makefile.in (libiberty_h): New.
3516 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
3517 (linux-bfin-low.o): Append dependency 'libiberty.h'.
3518
dc82f37b
YQ
35192012-08-23 Yao Qi <yao@codesourcery.com>
3520
3521 * server.h: Remove declaration of 'xsnprintf'.
3522
406b1477
KS
35232012-08-22 Keith Seitz <keiths@redhat.com>
3524
3525 * server.h: Include build-gnulib-gbserver/config.h.
3526 * gdbreplay.c: Likewise.
3527
e6712ff1
DE
35282012-08-08 Doug Evans <dje@google.com>
3529
3530 * Makefile.in (SFILES): Add gdb_vecs.c.
3531 (OBS): Add gdb_vecs.o.
3532 (gdb_vecs_h, host_defs_h): New variables.
3533 (thread-db.o): Add $(gdb_vecs_h) dependency.
3534 (gdb_vecs.o): New rule.
3535 * thread-db.c: #include "gdb_vecs.h".
3536 (thread_db_load_search): Use a vector to iterate over path elements.
3537 Handle text appearing after "$pdir".
3538
3539 * configure.ac: Add check for strstr.
3540 * config.in: Regenerate.
3541 * configure: Regenerate.
3542
7c3270ae
UW
35432012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
3544
3545 * hostio.c (handle_pread): If pread fails, fall back to attempting
3546 lseek/read.
3547 (handle_pwrite): Likewise for pwrite.
3548
b62e2b27
UW
35492012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
3550
3551 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
3552 between unsupported TYPE and unimplementable ADDR/LEN combination.
3553 (arm_insert_point): Act on new return value.
3554
78a99e91
PA
35552012-07-31 Pedro Alves <palves@redhat.com>
3556
3557 * server.c (process_point_options): Only skip tokens if we find
3558 one that is unrecognized. Don't treat 'X' specially while
3559 skipping unrecognized tokens.
3560
fcf303ab
UW
35612012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
3562
3563 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
3564 to 4-byte-align HW breakpoint addresses for Thumb.
3565
7255706c
YQ
35662012-07-27 Yao Qi <yao@codesourcery.com>
3567
3568 PR remote/14161.
3569
3570 * server.h: Declare gdb_agent_about_to_close.
3571 * target.c (kill_inferior): Include "agent.h".
3572 New. Send command 'kill'.
3573 * target.h (kill_inferior): Removed macro.
3574 * tracepoint.c (gdb_agent_about_to_close): New.
3575 (gdb_agent_helper_thread): Handle command 'close'.
3576 Wait endlessly until the inferior stops.
3577 Install gdb_agent_remove_socket to atexit hook.
3578 (agent_socket_name): New static variable.
3579 (gdb_agent_socket_init): Replace local variable 'name' with
3580 'agent_socket_name'.
3581 (gdb_agent_remove_socket): New.
3582
5a3f286f
YQ
35832012-07-27 Yao Qi <yao@codesourcery.com>
3584
3585 * server.c (process_point_options): Stop at 'X' when parsing.
3586
961bd387
ME
35872012-07-19 Michael Eager <eager@eagercon.com>
3588
a261b8f5 3589 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
3590 to hw_execute.
3591 * linux-x86-low.c (x86_insert_point, x86_remove_point):
3592 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
3593 hardware breakpoint.
3594
aa7c7447
JK
35952012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3596
3597 * gdbserver/linux-low.c (initialize_low): Call
3598 linux_ptrace_init_warnings.
3599
7f216e7c
DE
36002012-07-02 Doug Evans <dje@google.com>
3601
3602 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
3603 pointer to int.
3604
d3ce09f5
SS
36052012-07-02 Stan Shebs <stan@codesourcery.com>
3606
3607 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
3608 (ax.o): Add it to build rule.
3609 (ax-ipa.o): Ditto.
3610 (OBS): Add format.o.
3611 (IPA_OBS): Add format.o.
3612 * server.c (handle_query): Claim support for breakpoint commands.
3613 (process_point_options): Add command case.
3614 (process_serial_event): Leave running if there are printfs in
3615 effect.
3616 * mem-break.h (any_persistent_commands): Declare.
3617 (add_breakpoint_commands): Declare.
3618 (gdb_no_commands_at_breakpoint): Declare.
3619 (run_breakpoint_commands): Declare.
3620 * mem-break.c (struct point_command_list): New struct.
3621 (struct breakpoint): New field command_list.
3622 (any_persistent_commands): New function.
3623 (add_commands_to_breakpoint): New function.
3624 (add_breakpoint_commands): New function.
3625 (gdb_no_commands_at_breakpoint): New function.
3626 (run_breakpoint_commands): New function.
3627 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
3628 locally.
3629 * ax.c: Include format.h.
3630 (ax_printf): New function.
3631 (gdb_eval_agent_expr): Add printf opcode.
3632
2f8f6aed
YQ
36332012-06-13 Yao Qi <yao@codesourcery.com>
3634
3635 * server.c (start_inferior): Remove duplicated writes to fields
3636 'last_resume_kind' and 'last_status' of 'current_inferior'.
3637
0c9070b3
YQ
36382012-06-12 Yao Qi <yao@codesourcery.com>
3639 Pedro Alves <palves@redhat.com>
3640
3641 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
3642 comment.
3643 * server.c (handle_v_cont): Extend comment.
3644
c52daf70
YQ
36452012-06-11 Yao Qi <yao@codesourcery.com>
3646
3647 * linux-low.c (linux_attach): Add 'static'.
3648
d38bbb0a
YQ
36492012-06-06 Yao Qi <yao@codesourcery.com>
3650
3651 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
3652
89dc0afd
JK
36532012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
3654
3655 Fix gcc -flto compilation warning.
3656 * server.c (main): Make variable multi_mode and attach volatile.
3657
75f62ce7
TJB
36582012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3659
3660 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
3661 if the platform doesn't know about it.
3662
65f479b6
PA
36632012-05-30 Jeff Kenton <jkenton@tilera.com>
3664
3665 * Makefile.in (SFILES): Add linux-tile-low.c.
3666 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
3667 * configure.srv: Handle tilegx-*-linux*.
3668 * linux-tile-low.c: New file.
3669
0c5bf5a9
JK
36702012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3671
3672 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
3673
a493e3e2
PA
36742012-05-24 Pedro Alves <palves@redhat.com>
3675
3676 PR gdb/7205
3677
43aaf8b6 3678 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 3679
2ea28649
PA
36802012-05-24 Pedro Alves <palves@redhat.com>
3681
3682 PR gdb/7205
3683
3684 Replace target_signal with gdb_signal throughout.
3685
8d409d16
MR
36862012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
3687
3688 * linux-low.c (linux_store_registers): Avoid the copying sequence
3689 when no data has been retrieved by ptrace.
3690
23512c01
MGD
36912012-05-22 Will Deacon <will.deacon@arm.com>
3692
3693 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
3694 Include asm/ptrace.h.
3695 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
3696 already defined.
3697
4934b29e
MR
36982012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
3699
3700 * linux-low.c (linux_store_registers): Don't re-retrieve data
3701 with ptrace that has already been obtained from /proc. Always
3702 copy any data retrieved with ptrace to the buffer supplied.
3703
bde24c0a
PA
37042012-05-11 Yao Qi <yao@codesourcery.com>
3705 Pedro Alves <palves@redhat.com>
3706
3707 * linux-low.c (enum stopping_threads_kind): New.
3708 (stopping_threads): Change type to `enum stopping_threads_kind'.
3709 (handle_extended_wait): If stopping and suspending threads, leave
3710 the new_lwp suspended too.
3711 (linux_wait_for_event): Adjust.
3712 (stop_all_lwps): Set `stopping_threads' to
3713 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
3714 whether we're suspending threads or just stopping them. Assert no
3715 recursion happens.
3716
623b6bdf
YQ
37172012-04-29 Yao Qi <yao@codesourcery.com>
3718
3719 * server.h: Move some code to ...
3720 * gdbthread.h: ... here. New.
3721 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
3722 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
3723 (nto-low.o, win32-low.o): Likewise.
3724 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
3725 * regcache.c, remote-utils.c, server.c: Likewise.
3726 * target.c, tracepoint.c, win32-low.c: Likewise.
3727
f15f9948
TJB
37282012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3729
3730 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
3731 (PTRACE_ARG4_TYPE): Likewise.
3732 (PTRACE_XFER_TYPE): Likewise.
3733 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
3734 ptrace to PTRACE_ARG3_TYPE.
3735 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
3736 (PTRACE_ARG4_TYPE): Likewise.
3737 (PTRACE_XFER_TYPE): Likewise.
3738 (linux_detach_one_lwp): Cast fourth argument of
3739 ptrace to long then PTRACE_ARG4_TYPE.
3740 (regsets_fetch_inferior_registers): Cast third argument of
3741 ptrace to long then PTRACE_ARG3_TYPE.
3742 (regsets_store_inferior_registers): Likewise.
3743
38ea300a
PA
37442012-04-20 Pedro Alves <palves@redhat.com>
3745
3746 * configure: Regenerate.
3747
c971b7fa
PA
37482012-04-19 Pedro Alves <palves@redhat.com>
3749
43aaf8b6 3750 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 3751 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
3752 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
3753 (all, install-only, uninstall, clean-info, all-lib, clean): No
3754 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
3755 (maintainer-clean realclean distclean): Use subdir_do.
3756 (subdir_do): New.
3757 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 3758 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
3759 * acinclude.m4: Include acx_configure_dir.m4.
3760 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
3761 calls. Call AC_PROG_RANLIB. Configure gnulib using
3762 ACX_CONFIGURE_DIR.
3763 (GNULIB): New.
3764 (GNULIB_STDINT_H): Adjust.
3765 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
3766 * gdbreplay.c: Include build-gnulib/config.h.
3767 * server.h: Likewise.
3768 * aclocal.m4: Regenerate.
3769 * config.in: Regenerate.
3770 * configure: Regenerate.
c971b7fa 3771
809277f8
PA
37722012-04-19 Pedro Alves <palves@redhat.com>
3773
3774 * Makefile.in (LIBGNU, INCGNU): Adjust.
3775 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
3776 (all, install-only, uninstall, clean-info, all-lib, clean)
3777 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
3778 * configure.ac: Adjust AC_OUTPUT output.
3779 * aclocal.m4: Regenerate.
3780 * configure: Regenerate.
3781
fd9bb8b8
PA
37822012-04-19 Pedro Alves <palves@redhat.com>
3783
3784 * Makefile.in (generated_files): New.
3785 (server_h): Remove the explicit dependency on config.h, and depend
3786 on $generated_files.
3787
1c298c66
PA
37882012-04-19 Pedro Alves <palves@redhat.com>
3789
3790 * Makefile.in (INCGNU): Add -Ignulib.
3791
57c4b50b
PA
37922012-04-19 Pedro Alves <palves@redhat.com>
3793
3794 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
3795 (INCGNU): ... this, and spell out -I here.
3796 (GNULIB_LIB): Rename to ...
3797 (LIBGNU): ... this.
3798 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
3799
1030e047
PA
38002012-04-19 Pedro Alves <palves@redhat.com>
3801
3802 * config.in: Regenerate.
3803
447d4319
PA
38042012-04-19 Pedro Alves <palves@redhat.com>
3805
3806 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
3807 * server.h (memmem): Remove declaration.
3808 * config.in: Regenerate.
3809 * configure: Regenerate.
3810
aad9eab9
YQ
38112012-04-19 Yao Qi <yao@codesourcery.com>
3812
3813 * Makefile.in (SFILES): Add common/vec.c.
3814 (OBS): Add vec.o.
3815 (vec.o): New rule.
3816
3e10640f
YQ
38172012-04-19 Yao Qi <yao@codesourcery.com>
3818
3819 * remote-utils.c (prepare_resume_reply): Replace with macro
3820 target_core_of_thread.
3821 * server.c (handle_qxfer_threads_proper): Likewise.
3822 * target.h (traget_core_of_thread): New macro.
3823
71622373
PA
38242012-04-18 Pedro Alves <palves@redhat.com>
3825
3826 * aclocal.m4: Regenerate.
3827 * configure: Regenerate.
3828
80d26939
YQ
38292012-04-16 Yao Qi <yao@codesourcery.com>
3830
3831 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
3832 duplicated on address.
3833
42476b70
YQ
38342012-04-16 Yao Qi <yao@codesourcery.com>
3835
3836 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
3837 (struct tracepoint_action_ops) <send>: New field.
3838 (m_tracepoint_action_send, r_tracepoint_action_send): New.
3839 (agent_expr_send, x_tracepoint_action_send): New.
3840 (l_tracepoint_action_send): New.
3841 (cmd_qtdp): Download and install tracepoint
3842 according to `use_agent'.
3843 (run_inferior_command): Add one more parameter `len'.
3844 Update callers.
3845 (tracepoint_send_agent): New.
3846 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
3847
7bc83639
YQ
38482012-04-16 Yao Qi <yao@codesourcery.com>
3849
3850 * tracepoint.c (download_tracepoints): Moved to ...
3851 (cmd_qtstart): ... here.
3852
5f18041e
YQ
38532012-04-14 Yao Qi <yao@codesourcery.com>
3854
3855 * tracepoint.c: Include inttypes.h.
3856 (struct collect_memory_action): Use sized types.
3857 (struct tracepoint): Likewise.
3858 (cmd_qtdp, stop_tracing): Update print specifiers.
3859 (cmd_qtp, response_tracepoint): Likewise.
3860 (collect_data_at_tracepoint): Likewise.
3861 (collect_data_at_step): Likewise.
3862
55a8c076
YQ
38632012-04-14 Yao Qi <yao@codesourcery.com>
3864
3865 Import gnulib module inttypes.
3866 * aclocal.m4, config.in, configure: Regenerated.
3867
dc750257
YQ
38682012-04-14 Yao Qi <yao@codesourcery.com>
3869
3870 * Makefile.in (maintainer-clean, realclean, distclean): Remove
3871 Makefile and config.status at last.
3872
0ab5faf9
YQ
38732012-04-13 Yao Qi <yao@codesourcery.com>
3874
3875 * tracepoint.c: Include stdint.h unconditionally.
3876
18f5fd81
TJB
38772012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3878
3879 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
3880 on BFD_HAVE_SYS_PROCFS_TYPE.
3881 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
3882 * configure: Regenerate.
3883 * config.in: Likewise.
3884
4d47af5c
L
38852012-04-13 H.J. Lu <hongjiu.lu@intel.com>
3886
3887 * Makefile.in (clean): Also remove x32.c x32-linux.c
3888 x32-avx.c x32-avx-linux.c.
3889 (x32.o): New target.
3890 (x32.c): Likewise.
3891 (x32-linux.o): Likewise.
3892 (x32-linux.c): Likewise.
3893 (x32-avx.o): Likewise.
3894 (x32-avx.c): Likewise.
3895 (x32-avx-linux.o): Likewise.
3896 (x32-avx-linux.c): Likewise.
3897
3898 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
3899 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
3900 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
3901 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
3902 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
3903 i386/x32-avx-linux.xml.
3904
3905 * linux-x86-low.c (init_registers_x32_linux): New prototype.
3906 (init_registers_x32_avx_linux): Likwise.
3907 (x86_linux_update_xmltarget): Call init_registers_x32_linux
3908 or init_registers_x32_avx_linux if linux_is_elf64 is false.
3909
ecedbe58
PA
39102012-04-13 Pedro Alves <palves@redhat.com>
3911
3912 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
3913 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
3914 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
3915 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
3916 the sub-make.
3917
c92b5177
L
39182012-04-12 H.J. Lu <hongjiu.lu@intel.com>
3919
3920 * linux-x86-low.c (compat_x32_clock_t): New.
3921 (compat_x32_siginfo_t): Likewise.
3922 (compat_x32_siginfo_from_siginfo): Likewise.
3923 (siginfo_from_compat_x32_siginfo): Likewise.
3924 (linux_is_elf64): Likewise.
3925 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
3926 and siginfo_from_compat_x32_siginfo for x32.
3927 (x86_arch_setup): Set linux_is_elf64.
3928
214d508e
L
39292012-04-12 H.J. Lu <hongjiu.lu@intel.com>
3930
3931 PR gdb/13969
3932 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
3933 e_machine field.
3934 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
3935 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
3936 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
3937 compatible with process.
3938
c9a1864a
YQ
39392012-04-12 Yao Qi <yao@codesourcery.com>
3940
3941 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
3942 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
3943 (install-only, install-info, clean): Handle sub dir gnulib.
3944 (all-lib, am--refresh): New targets.
3945 (memmem.o): Remove target.
3946 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
3947 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
3948 (AC_REPLACE_FUNCS): Remove memmem.
3949 Invoke gl_INIT and AM_INIT_AUTOMAKE.
3950 (AC_OUTPUT): Generate Makefile in gnulib/.
3951 * aclocal.m4, config.in, configure: Regenerated.
3952
367ba2c2
MR
39532012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
3954
3955 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
3956
9d236627
PA
39572012-04-05 Pedro Alves <palves@redhat.com>
3958
3959 -Werror=strict-aliasing
3960
3961 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
3962 pointer.
3963
111217b3
PA
39642012-04-04 Pedro Alves <palves@redhat.com>
3965
3966 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
3967 (sparc_store_gregset_from_stack, sparc_store_gregset)
3968 (sparc_breakpoint_at): Fix formatting.
3969
8365dcf5
TJB
39702012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3971
3972 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
3973 are available.
3974 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
3975 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
3976 * config.in: Regenerate.
3977 * configure: Likewise.
3978
689cc2ae
PA
39792012-03-29 Pedro Alves <palves@redhat.com>
3980
3981 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
3982 Correct ptrace arguments.
3983
c14dfd32
PA
39842012-03-28 Pedro Alves <palves@redhat.com>
3985
3986 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
3987 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
3988 (IA64_FR1_REGNUM): New defines.
3989 (ia64_fetch_register): New.
3990 (the_low_target): Install it.
3991 * linux-low.h (struct linux_target_ops) <fetch_register>: New
3992 field.
3993 * linux-low.c (linux_fetch_registers): Try the
3994 the_low_target.fetch_register hook first.
3995
3996 * linux-arm-low.c (the_low_target): Adjust.
3997 * linux-bfin-low.c (the_low_target): Adjust.
3998 * linux-cris-low.c (the_low_target): Adjust.
3999 * linux-crisv32-low.c (the_low_target): Adjust.
4000 * linux-m32r-low.c (the_low_target): Adjust.
4001 * linux-m68k-low.c (the_low_target): Adjust.
4002 * linux-mips-low.c (the_low_target): Adjust.
4003 * linux-ppc-low.c (the_low_target): Adjust.
4004 * linux-s390-low.c (the_low_target): Adjust.
4005 * linux-sh-low.c (the_low_target): Adjust.
4006 * linux-sparc-low.c (the_low_target): Adjust.
4007 * linux-tic6x-low.c (the_low_target): Adjust.
4008 * linux-x86-low.c (the_low_target): Adjust.
4009 * linux-xtensa-low.c (the_low_target): Adjust.
4010
63c88e13
PA
40112012-03-26 Pedro Alves <palves@redhat.com>
4012
4013 * server.c (handle_qxfer_libraries): Don't bail early if
4014 the_target->qxfer_libraries_svr4 is not NULL.
4015
fb723180
PA
40162012-03-26 Pedro Alves <palves@redhat.com>
4017
4018 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4019
0afae3cf
PA
40202012-03-23 Pedro Alves <palves@redhat.com>
4021
4022 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4023 "library-list-svr4" element's start tag when the the DSO list is
4024 empty.
4025
485f1ee4
PA
40262012-03-23 Pedro Alves <palves@redhat.com>
4027
4028 * linux-low.c (read_one_ptr): Read the inferior's pointer through
4029 a variable whose type size is the same as the inferior's pointer
4030 size.
4031
a5362b9a
TS
40322012-03-21 Thomas Schwinge <thomas@codesourcery.com>
4033
4034 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4035 struct siginfo.
4036 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4037 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4038 * linux-low.h: Include <signal.h>.
4039 (struct siginfo): Remove forward declaration.
4040 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
4041 struct siginfo.
4042
d226c142
MF
40432012-03-21 Mike Frysinger <vapier@gentoo.org>
4044
4045 * .gitignore: Ignore more files.
4046
122f36ef
PA
40472012-03-19 Pedro Alves <palves@redhat.com>
4048 Jan Kratochvil <jan.kratochvil@redhat.com>
4049
4050 * server.c (cont_thread, general_thread): Add describing comments.
4051 (start_inferior): Clear `cont_thread'.
4052 (handle_v_cont): Don't set `cont_thread' if resuming all threads
4053 of a process.
4054
fc3e5175
YQ
40552012-03-15 Yao Qi <yao@codesourcery.com>
4056
4057 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
4058 handling to ...
4059 (cmd_qtdp): ... here.
4060
8d0d92cd
YQ
40612012-03-15 Yao Qi <yao@codesourcery.com>
4062
4063 * tracepoint.c (struct tracepoint_action_ops): New.
4064 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
4065 (m_tracepoint_action_download): New.
4066 (r_tracepoint_action_download): New.
4067 (x_tracepoint_action_download): New.
4068 (l_tracepoint_action_download): New.
4069 (add_tracepoint_action): Install `action->ops' according type.
4070 (download_tracepoint_1): Move code `download' function pointer
4071 of various tracepoint_action_ops.
4072
87b0bb13
JK
40732012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4074
4075 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
4076 linux_ptrace_attach_warnings.
4077
5f572dec
JK
40782012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4079
4080 * Makefile.in (linux-ptrace.o): New.
4081 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
4082 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
4083 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
4084 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
4085 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
4086 of these targets.
4087 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
4088
f4647387
YQ
40892012-03-08 Yao Qi <yao@codesourcery.com>
4090 Pedro Alves <palves@redhat.com>
4091
4092 Fix PR server/13392.
4093 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
4094 offset of JMP insn.
4095 * tracepoint.c (remove_tracepoint): New.
4096 (cmd_qtdp): Call remove_tracepoint when failed to install.
4097
9b224c5e
PA
40982012-03-07 Pedro Alves <palves@redhat.com>
4099
4100 * linux-low.c (get_detach_signal): New.
4101 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
4102 Pass on pending signals to PTRACE_DETACH. Check the result of the
4103 ptrace call.
4104 * server.c (program_signals, program_signals_p): New.
4105 (handle_general_set): Handle QProgramSignals.
4106 * server.h (program_signals, program_signals_p): Declare.
4107
e237a7e2
JK
41082012-03-05 Pedro Alves <palves@redhat.com>
4109 Jan Kratochvil <jan.kratochvil@redhat.com>
4110
4111 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
4112 New comment why.
4113
5808517f
YQ
41142012-03-03 Yao Qi <yao@codesourcery.com>
4115
4116 * tracepoint.c (tracepoint_look_up_symbols): Update call to
4117 agent_look_up_symbols.
4118
58b4daa5
YQ
41192012-03-03 Yao Qi <yao@codesourcery.com>
4120
4121 * Makefile.in (linux-low.o): Keep dependence on agent.h.
4122 (linux-x86-low.o): Likewise.
4123 * server.h: Remove in_process_agent_loaded.
4124 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
4125 common/agent.c.
4126 Update callers.
4127
8ffcbaaf
YQ
41282012-03-03 Yao Qi <yao@codesourcery.com>
4129
4130 * tracepoint.c (gdb_agent_capability): New global.
4131 (in_process_agent_loaded_ust): Renamed to
4132 `in_process_agent_supports_ust'.
4133 Update callers.
4134 (in_process_agent_supports_ust): Call agent_capability_check.
4135 (clear_installed_tracepoints): Assert that agent supports
4136 agent.
4137
d1feda86
YQ
41382012-03-03 Yao Qi <yao@codesourcery.com>
4139
4140 * linux-low.c (linux_supports_agent): New.
4141 (linux_target_ops): Initialize field `supports_agent' with
4142 linux_supports_agent.
4143 * target.h (struct target_ops) <supports_agent>: New.
4144 (target_supports_agent): New macro.
4145 * server.c (handle_general_set): Handle packet 'QAgent'.
4146 (handle_query): Send `QAgent+'.
4147 * Makefile.in (server.o): Depends on agent.h.
4148
2fa291ac
YQ
41492012-03-03 Yao Qi <yao@codesourcery.com>
4150
4151 * Makefile.in (OBS): Add agent.o.
4152 Add new rule for agent.o.
4153 Track dependence of tracepoint.c on agent.h.
4154 * tracepoint.c (run_inferior_command_1):
4155 (run_inferior_command): Call agent_run_command.
4156 (gdb_ust_connect_sync_socket): Deleted. Move it to
4157 common/agent.c.
4158 (resume_thread, stop_thread): Likewise.
4159 (gdb_ust_socket_init): Renamed to ...
4160 (gdb_agent_socket_init): ... New.
4161 (gdb_ust_thread): Renamed to ...
4162 (gdb_agent_helper_thread): ... New.
4163 (gdb_ust_init): Move some code to ...
4164 (gdb_agent_init): ... here. New.
4165 [HAVE_UST]: Call gdb_ust_init.
4166 (initialize_tracepoint_ftlib): Call gdb_agent_init.
4167 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
4168 * config.in, configure: Regenerated.
4169
05044653
PA
41702012-03-02 Pedro Alves <palves@redhat.com>
4171
4172 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
4173 * linux-low.c (struct simple_pid_list): New.
4174 (stopped_pids): New a struct simple_pid_list pointer.
4175 (add_to_pid_list, pull_pid_from_list): New.
4176 (handle_extended_wait): Don't assume the first signal new children
4177 report is SIGSTOP. Adjust call to pull_pid_from_list.
4178 (linux_wait_for_lwp): Adjust.
4179
8d00225b
YQ
41802012-03-02 Yao Qi <yao@codesourcery.com>
4181
4182 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4183 debug log.
4184
19560ba5
YQ
41852012-03-02 Yao Qi <yao@codesourcery.com>
4186
4187 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4188 `stop_pc' and `tpoint'. Update caller.
4189
1faeff08
MR
41902012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
4191
4192 * linux-low.h (linux_target_ops): Add regset_bitmap member.
4193 * linux-low.c (use_linux_regsets): New macro.
4194 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4195 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4196 (linux_register_in_regsets): New function.
4197 (usr_fetch_inferior_registers): Skip registers covered by
4198 regsets.
4199 (usr_store_inferior_registers): Likewise.
4200 (usr_fetch_inferior_registers): New macro.
4201 (usr_store_inferior_registers): Likewise.
4202 (linux_fetch_registers): Handle mixed regset/non-regset targets.
4203 (linux_store_registers): Likewise.
4204 * linux-mips-low.c (init_registers_mips_dsp_linux): New
4205 prototype.
4206 (init_registers_mips64_dsp_linux): Likewise.
4207 (init_registers_mips_linux): New macro.
4208 (init_registers_mips_dsp_linux): Likewise.
4209 (mips_dsp_num_regs): Likewise.
4210 (DSP_BASE, DSP_CONTROL): New fallback macros.
4211 (mips_base_regs): New macro.
4212 (mips_regmap): Use it. Fix the size.
4213 (mips_dsp_regmap): New variable.
4214 (mips_dsp_regset_bitmap): Likewise.
4215 (mips_arch_setup): New function.
4216 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4217 than mips_regmap.
4218 (mips_cannot_store_register): Likewise.
4219 (the_low_target): Update .arch_setup, .num_regs and .regmap
4220 initializers. Add .regset_bitmap initializer.
4221 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4222 initializer.
4223 * linux-bfin-low.c (the_low_target): Likewise.
4224 * linux-cris-low.c (the_low_target): Likewise.
4225 * linux-crisv32-low.c (the_low_target): Likewise.
4226 * linux-ia64-low.c (the_low_target): Likewise.
4227 * linux-m32r-low.c (the_low_target): Likewise.
4228 * linux-m68k-low.c (the_low_target): Likewise.
4229 * linux-ppc-low.c (the_low_target): Likewise.
4230 * linux-s390-low.c (the_low_target): Likewise.
4231 * linux-sh-low.c (the_low_target): Likewise.
4232 * linux-sparc-low.c (the_low_target): Likewise.
4233 * linux-tic6x-low.c (the_low_target): Likewise.
4234 * linux-x86-low.c (the_low_target): Likewise.
4235 * linux-xtensa-low.c (the_low_target): Likewise.
4236 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4237 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4238 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4239 srv_xmlfiles.
4240 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4241 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4242
c03e6ccc
YQ
42432012-02-29 Yao Qi <yao@codesourcery.com>
4244 Pedro Alves <palves@redhat.com>
4245
4246 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4247 `step_over_finished' is true.
4248
644cebc9
PA
42492012-02-27 Pedro Alves <palves@redhat.com>
4250
4251 * linux-low.c (pid_is_stopped): Delete, moved to common/.
4252 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4253
c14d7ab2
PA
42542012-02-27 Pedro Alves <palves@redhat.com>
4255
4256 PR server/9684
4257 * linux-low.c (pid_is_stopped): New.
4258 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4259
412c89dd
LM
42602012-02-25 Luis Machado <lgustavo@codesourcery.com>
4261
4262 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4263 of conditions.
4264
b745defe
MR
42652012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4266
4267 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4268
9f3a5c85
LM
42692012-02-24 Luis Machado <lgustavo@codesourcery>
4270
4271 * server.c (handle_query): Advertise support for target-side
4272 breakpoint condition evaluation.
4273 (process_point_options): New function.
4274 (process_serial_event): When inserting a breakpoint, check for
4275 a target-side condition that should be evaluated.
4276
4277 * mem-break.c: Include regcache.h and ax.h.
4278 (point_cond_list_t): New data structure.
4279 (breakpoint) <cond_list>: New field.
4280 (find_gdb_breakpoint_at): Make non-static.
4281 (delete_gdb_breakpoint_at): Clear any target-side
4282 conditions.
4283 (clear_gdb_breakpoint_conditions): New function.
4284 (add_condition_to_breakpoint): Likewise.
4285 (add_breakpoint_condition): Likewise.
4286 (gdb_condition_true_at_breakpoint): Likewise.
4287 (gdb_breakpoint_here): Return result directly instead
4288 of going through a local variable.
4289
4290 * mem-break.h (find_gdb_breakpoint_at): New prototype.
4291 (clear_gdb_breakpoint_conditions): Likewise.
4292 (add_breakpoint_condition): Likewise.
4293 (gdb_condition_true_at_breakpoint): Likewise.
4294
4295 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
4296 (need_step_over_p): Take target-side breakpoint condition into
4297 consideration.
4298
5e1dc496
LM
42992012-02-24 Luis Machado <lgustavo@codesourcery>
4300
4301 * server.h: Include tracepoint.h.
4302 (agent_mem_read, agent_get_trace_state_variable_value,
4303 agent_set_trace_state_variable_value,
4304 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
4305 get_set_tsv_func_addr): New prototypes.
4306
4307 * ax.h: New include file.
4308 * ax.c: New source file.
4309
4310 * tracepoint.c: Include ax.h.
4311 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
4312 agent_expr, eval_result_type): Move to ax.h.
4313 (parse_agent_expr): Rename to ...
4314 (gdb_parse_agent_expr): ... this, make it non-static and move
4315 to ax.h.
4316 (unparse_agent_expr) Rename to ...
4317 (gdb_unparse_agent_expr): ... this, make it non-static and move
4318 to ax.h.
4319 (eval_agent_expr): Rename to ...
4320 (eval_tracepoint_agent_expr): ... this.
4321 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
4322 forward declarations.
4323 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
4324 (agent_get_trace_state_variable_value): New function.
4325 (agent_set_trace_state_variable_value): New function.
4326 (cmd_qtdp): Call gdb_parse_agent_expr (...).
4327 (response_tracepoint): Call gdb_unparse_agent_expr (...).
4328 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
4329 (condition_true_at_tracepoint): Likewise.
4330 (parse_agent_expr): Rename to ...
4331 (gdb_parse_agent_expr): ... this and move to ax.c.
4332 (unparse_agent_expr): Rename to ...
4333 (gdb_unparse_agent_expr): ... this and move to ax.c.
4334 (gdb_agent_op_name): Move to ax.c.
4335 (eval_agent_expr): Rename to ...
4336 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
4337 and move to ax.c.
4338 (eval_tracepoint_agent_expr): New function.
4339 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 4340 non-static.
5e1dc496
LM
4341 (current_insn_ptr, emit_error, struct bytecode_address): Move to
4342 ax.c.
4343 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
4344 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
4345 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
4346 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
4347 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
4348 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
4349 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
4350 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
4351 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
4352 (compile_bytecodes): Remove forward declaration.
4353 (is_goto_target): Move to ax.c.
4354 (compile_bytecodes): Move to ax.c and call
4355 agent_get_trace_state_variable_value (...) and
4356 agent_set_trace_state_variable_value (...).
4357
4358 * Makefile.in: Update ax.c and IPA dependencies.
4359
277e4e52
PA
43602012-02-24 Pedro Alves <palves@redhat.com>
4361
4362 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
4363 (cmd_bigqtbuffer_circular): ... this. Only handle
4364 'QTBuffer:circular:'.
4365 (handle_tracepoint_general_set): Adjust.
4366
bf4c19f7
YQ
43672012-02-16 Yao Qi <yao@codesourcery.com>
4368
4369 * inferiors.c: Move code to ...
4370 * dll.c: .... here. New.
4371 * server.h: Declare clear_dlls.
4372 * Makefile.in (SFILES): Add dll.c.
4373 (OBS): Add dll.o
4374 (dll.o): New rule.
4375
d73f2619
YQ
43762012-02-11 Yao Qi <yao@codesourcery.com>
4377
4378 * server.c: (handle_monitor_command): Add a new parameter
4379 `own_buf'.
4380 (handle_query): Update caller.
4381
f8255c2a
JB
43822012-02-09 Joel Brobecker <brobecker@adacore.com>
4383
4384 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
4385 * configure, config.in: Regenerate.
4386 * hostio.c: Provide an alternate implementation if HAVE_READLINK
4387 is not defined.
4388
da84f473
PA
43892012-02-02 Pedro Alves <palves@redhat.com>
4390
4391 Try SIGKILL first, then PTRACE_KILL.
4392 * linux-low.c (linux_kill_one_lwp): New.
4393 (linux_kill_one_lwp): Rename to ...
4394 (kill_one_lwp_callback): ... this. Use the new
4395 linux_kill_one_lwp.
4396
e886a173
PA
43972012-02-02 Pedro Alves <palves@redhat.com>
4398
4399 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
4400 inferior.
4401
be07f1a2
PA
44022012-01-27 Pedro Alves <palves@redhat.com>
4403
4404 * linux-low.c (linux_child_pid_to_exec_file): Delete.
4405 (elf_64_file_p): Make static.
4406 (linux_pid_exe_is_elf_64_file): New.
4407 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
4408 Delete declarations.
4409 (linux_pid_exe_is_elf_64_file): Declare.
4410 * linux-x86-low.c (x86_arch_setup): Use
4411 linux_pid_exe_is_elf_64_file.
4412
d8301ad1
JK
44132012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4414
4415 * linux-low.c (linux_wait_for_event_1): Rename to ...
4416 (linux_wait_for_event): ... here and merge it with former
4417 linux_wait_for_event - new variable wait_ptid, use it.
4418 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
4419
01b17894
PA
44202012-01-23 Pedro Alves <palves@redhat.com>
4421
4422 * server.c (main): Avoid yet another case of infinite loop while
4423 detaching/killing after a longjmp.
4424
e825046f
JK
44252012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4426
4427 Code cleanup.
4428 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
4429
b9e7b9c3
UW
44302012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
4431
4432 * hostio.c (handle_readlink): New function.
4433 (handle_vFile): Call it to handle "vFile:readlink" packets.
4434
901f9912
UW
44352012-01-20 Pedro Alves <palves@redhat.com>
4436 Ulrich Weigand <ulrich.weigand@linaro.org>
4437
4438 * server.c (handle_v_requests): Only support vAttach and vRun to
4439 start multiple processes when in extended protocol mode.
4440
fc1ab1a0
PA
44412012-01-17 Pedro Alves <palves@redhat.com>
4442
4443 * tracepoint.c (initialize_tracepoint): Use mmap instead of
4444 memalign plus mprotect to allocate the scratch buffer.
4445
7d5d4e98
PA
44462012-01-13 Pedro Alves <palves@redhat.com>
4447
4448 * server.c (attach_inferior): Clear `cont_thread'.
4449
f128d5e9
PA
44502012-01-13 Pedro Alves <palves@redhat.com>
4451
4452 * server.c (main): Avoid infinite loop while detaching/killing
4453 after a longjmp.
4454
06db92f0
DE
44552012-01-09 Doug Evans <dje@google.com>
4456
4457 * server.c (start_inferior): Set last_ptid in --wrapper case.
4458
32d92999
YQ
44592012-01-06 Yao Qi <yao@codesourcery.com>
4460
4461 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
4462 defined.
4463 [IN_PROCESS_AGENT] (debug_agent): New global variable.
4464
5e0a92a9
YQ
44652012-01-04 Yao Qi <yao@codesourcery.com>
4466
4467 * tracepoint.c (cmd_qtdp): Print debug message
4468 for static tracepoint.
4469
ae639e8c
YQ
44702012-01-04 Yao Qi <yao@codesourcery.com>
4471
4472 * tracepoint.c (trace_vdebug): Differentiate debug message
4473 between gdbserver and IPA.
4474
f72429c5
YQ
44752012-01-03 Yao Qi <yao@codesourcery.com>
4476
4477 * tracepoint.c (tracepoint_was_hit): Don't collect for
4478 static tracepoint.
4479
12c3e59c
JB
44802012-01-02 Joel Brobecker <brobecker@adacore.com>
4481
4482 * terminal.h: Reformat copyright header.
4483
67827812
JB
44842012-01-02 Joel Brobecker <brobecker@adacore.com>
4485
4486 * server.c (gdbserver_version): Update copyright year.
4487 * gdbreplay.c (gdbreplay_version): Likewise.
4488
3e52c33d
JK
44892011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
4490
4491 * linux-low.c (linux_create_inferior): Put empty if clause for write.
4492
4493 Revert:
4494 2011-12-18 Hui Zhu <teawater@gmail.com>
4495 * linux-low.c (linux_create_inferior): Save return value to ret.
4496
66f1260e
HZ
44972011-12-18 Hui Zhu <teawater@gmail.com>
4498
4499 * linux-low.c (linux_create_inferior): Save return value to ret.
4500
e77616d7
DE
45012011-12-16 Doug Evans <dje@google.com>
4502
e7b06c57
DE
4503 * linux-low.c (linux_create_inferior): If stdio connection,
4504 redirect stdin from /dev/null, stdout to stderr.
4505 * remote-utils.c (remote_is_stdio): New static global.
4506 (remote_connection_is_stdio): New function.
4507 (remote_prepare): Handle stdio connection.
4508 (remote_open): Ditto.
4509 (remote_close): Don't close stdin for stdio connections.
4510 (read_prim,write_prim): New functions. Replace all calls to
4511 read/write to these.
4512 * server.c (main): Watch for "-" argument. Move call to
4513 remote_prepare before start_inferior.
4514 * server.h (STDIO_CONNECTION_NAME): New macro.
4515 (remote_connection_is_stdio): Declare.
4516
e77616d7
DE
4517 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
4518 in debugging output.
4519
82067193
YQ
45202011-12-15 Yao Qi <yao@codesourcery.com>
4521
4522 * tracepoint.c: Include sys/syscall.h.
4523 (gdb_ust_thread): Remove preprocessor conditional.
4524
82bfbe7e
PA
45252011-12-14 Pedro Alves <pedro@codesourcery.com>
4526
4527 * linux-low.c (linux_detach_one_lwp): Call
4528 the_low_target.prepare_to_resume before detaching.
4529
712c6575
YQ
45302011-12-14 Yao Qi <yao@codesourcery.com>
4531
4532 * tracepoint.c (gdb_ust_thread): Don't ignore return value
4533 of write.
4534
d54d1edf
YQ
45352011-12-14 Yao Qi <yao@codesourcery.com>
4536
4537 * i386-low.c (i386_low_stopped_data_address): Initialize local
4538 variable `control'.
4539
6210a125
PA
45402011-12-13 Pedro Alves <pedro@codesourcery.com>
4541
4542 PR remote/13492
4543
4544 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
4545 DR_CONTROL unless necessary. Extend comments.
4546 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
4547 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
4548
2ece8244
YQ
45492011-12-13 Yao Qi <yao@codesourcery.com>
4550
4551 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
4552 macros.
4553 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
4554
784867a5
JK
45552011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
4556
4557 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
4558 Print new debug message for such case.
4559
6bf36717
JK
45602011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4561
4562 Fix overlapping memcpy.
4563 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
4564 the read_inferior_memory transfer.
4565 (delete_fast_tracepoint_jump): New variable buf. Use it for the
4566 write_inferior_memory transfer.
4567 (set_fast_tracepoint_jump): New variable buf. Use it for the
4568 read_inferior_memory and write_inferior_memory transfers.
4569 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
4570 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
4571 Use it for the write_inferior_memory transfer.
4572 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
4573 buffers.
4574
50275556
MR
45752011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4576
4577 * linux-low.c (fetch_register, store_register): Make code
4578 consistent, fix formatting.
4579
7325beb4
MR
45802011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4581
4582 * linux-low.c (usr_store_inferior_registers): Factor out code
4583 to handle individual registers into...
4584 (store_register): ... this new function.
4585
c642a434
UW
45862011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
4587
4588 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
4589 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
4590 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
4591 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
4592 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
4593 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
4594 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
4595 (srv_xmlfiles): Add new XML files.
4596
4597 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
4598 and <sys/uio.h>.
4599 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
4600 (init_registers_s390_linux32v1): Add prototype.
4601 (init_registers_s390_linux32v2): Likewise.
4602 (init_registers_s390_linux64v1): Likewise.
4603 (init_registers_s390_linux64v2): Likewise.
4604 (init_registers_s390x_linux64v1): Likewise.
4605 (init_registers_s390x_linux64v2): Likewise.
4606 (s390_num_regs): Increment to 52.
4607 (s390_regmap): Add orig_r2 register.
4608 (s390_num_regs_3264): Increment to 68.
4609 (s390_regmap_3264): Add orig_r2 register.
4610 (s390_collect_ptrace_register): Handle orig_r2 register.
4611 (s390_supply_ptrace_register): Likewise.
4612 (s390_fill_last_break): New function.
4613 (s390_store_last_break): Likewise.
4614 (s390_fill_system_call): New function.
4615 (s390_store_system_call): Likewise.
4616 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
4617 register sets.
4618 (s390_check_regset): New function.
4619 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
4620 NT_S390_SYSTEM_CALL regsets and use appropriate description.
4621 Update target_regsets for available register sets.
4622
2268b414
JK
46232011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
4624 Jan Kratochvil <jan.kratochvil@redhat.com>
4625
4626 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
4627 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
4628 New.
4629 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
4630 * linux-low.h (struct process_info_private): New member r_debug.
4631 * server.c (handle_qxfer_libraries): Call
4632 the_target->qxfer_libraries_svr4.
4633 (handle_qxfer_libraries_svr4): New function.
4634 (qxfer_packets): New entry "libraries-svr4".
4635 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
4636 * target.h (struct target_ops): New member qxfer_libraries_svr4.
4637 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
4638 PACKET_qXfer_libraries_svr4.
4639
d6db1fab
UW
46402011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
4641
4642 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
4643 PSW address/mask between 8-byte and 16-byte formats.
4644 (s390_supply_ptrace_register): Likewise.
4645 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
4646 basic addressing mode bit.
4647
242f5f1c
SS
46482011-11-24 Stan Shebs <stan@codesourcery.com>
4649
4650 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
4651
f196051f
SS
46522011-11-17 Stan Shebs <stan@codesourcery.com>
4653
4654 * tracepoint.c (struct tracepoint): New field traceframe_usage.
4655 (tracing_start_time): New global.
4656 (tracing_stop_time): New global.
4657 (tracing_user_name): New global.
4658 (tracing_notes): New global.
4659 (tracing_stop_note): New global.
4660 (cmd_qtstart): Set traceframe_usage, start_time.
4661 (stop_tracing): Set stop_time.
4662 (cmd_qtstatus): Report additional status.
4663 (cmd_qtp): New function.
4664 (handle_tracepoint_query): Call it.
4665 (cmd_qtnotes): New function.
4666 (handle_tracepoint_general_set): Call it.
4667 (get_timestamp): Rename from tsv_get_timestamp.
4668
405f8e94
SS
46692011-11-14 Stan Shebs <stan@codesourcery.com>
4670 Kwok Cheung Yeung <kcy@codesourcery.com>
4671
4672 * linux-x86-low.c (small_jump_insn): New.
4673 (i386_install_fast_tracepoint_jump_pad): Add arguments for
4674 trampoline and error message, build a trampoline and issue a small
4675 jump instruction to it.
4676 (x86_install_fast_tracepoint_jump_pad): Add arguments for
4677 trampoline and error message.
4678 (x86_get_min_fast_tracepoint_insn_len): New.
4679 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
4680 * linux-low.h (struct linux_target_ops): Add arguments to
4681 install_fast_tracepoint_jump_pad operation, add new operation.
4682 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
4683 arguments.
4684 (linux_get_min_fast_tracepoint_insn_len): New function.
4685 (linux_target_op): Add new operation.
4686 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
4687 (gdb_trampoline_buffer_end): Ditto.
4688 (gdb_trampoline_buffer_error): Ditto.
4689 (struct ipa_sym_addresses): Add fields for new IPA variables.
4690 (symbol_list): Add entries for new IPA variables.
4691 (struct tracepoint): Add fields to hold the address range of the
4692 trampoline used by the tracepoint.
4693 (trampoline_buffer_head): New static variable.
4694 (trampoline_buffer_tail): Ditto.
4695 (claim_trampoline_space): New function.
4696 (have_fast_tracepoint_trampoline_buffer): New function.
4697 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
4698 structure.
4699 (install_fast_tracepoint): Ditto, also add error buffer argument.
4700 (cmd_qtminftpilen): New function.
4701 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
4702 (fast_tracepoint_from_trampoline_address): New function.
4703 (fast_tracepoint_collecting): Handle trampoline as part of jump
4704 pad space.
4705 (set_trampoline_buffer_space): New function.
4706 (initialize_tracepoint): Initialize new IPA variables.
4707 * target.h (struct target_ops): Add arguments to
4708 install_fast_tracepoint_jump_pad operation, add new
4709 get_min_fast_tracepoint_insn_len operation.
4710 (target_get_min_fast_tracepoint_insn_len): New.
4711 (install_fast_tracepoint_jump_pad): Add arguments.
4712 * server.h (IPA_BUFSIZ): Define.
4713 * linux-i386-ipa.c: Include extra header files.
4714 (initialize_fast_tracepoint_trampoline_buffer): New function.
4715 (initialize_low_tracepoint): Call it.
4716 * server.h (set_trampoline_buffer_space): Declare.
4717 (claim_trampoline_space): Ditto.
4718 (have_fast_tracepoint_trampoline_buffer): Ditto.
4719
1e4d1764
YQ
47202011-11-14 Yao Qi <yao@codesourcery.com>
4721
4722 * server.c (handle_query): Handle InstallInTrace for qSupported.
4723 * tracepoint.c (add_tracepoint): Sort list.
4724 (install_tracepoint, download_tracepoint): New.
4725 (cmd_qtdp): Call them to install and download tracepoints.
4726 (sort_tracepoints): Removed.
4727 (cmd_qtstart): Update.
4728
5c73ff4e
YQ
47292011-11-14 Yao Qi <yao@codesourcery.com>
4730
4731 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
4732 * mem-break.h: Declare.
4733 * tracepoint.c (cmd_qtstart): Move some code to ...
4734 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
4735 New.
4736 (download_tracepoints): Move some code to ...
4737 (download_tracepoint_1): ... here. New.
4738
86a30030
YQ
47392011-11-08 Yao Qi <yao@codesourcery.com>
4740
4741 * remote-utils.c (relocate_instruction): A comment fix.
4742
8d26e50c
JB
47432011-11-07 Joel Brobecker <brobecker@adacore.com>
4744
4745 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
4746 (i386_dr_low_get_control, i386_dr_low_get_status): Use
4747 dr_status_mirror and dr_control_mirror from debug_reg_state.
4748 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
4749 (i386_initial_stuff): Remove use of deleted globals.
4750 (i386_get_thread_context, i386_set_thread_context,
4751 i386_thread_added): Use dr_status_mirror and dr_control_mirror
4752 from debug_reg_state.
4753
a59306a3
YQ
47542011-11-05 Yao Qi <yao@codesourcery.com>
4755
4756 * tracepoint.c (gdb_collect): Loop over tracepoints of same
4757 address as TPOINT's.
4758
3065dfb6
SS
47592011-11-02 Stan Shebs <stan@codesourcery.com>
4760
4761 * tracepoint.c (agent_mem_read_string): New function.
4762 (eval_agent_expr): Call it for tracenz.
4763 * server.c (handle_query): Report support for tracenz.
4764
fd0d8c7c
YQ
47652011-11-02 Yao Qi <yao@codesourcery.com>
4766
4767 * tracepoint.c (cmd_qtstart): Remove unused local variables.
4768
609086b1
YQ
47692011-11-02 Yao Qi <yao@codesourcery.com>
4770
4771 * target.h: Fix a typo in comment.
4772
b9fd1791
PA
47732011-10-31 Pedro Alves <pedro@codesourcery.com>
4774
4775 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
4776 clobber the breakpoints' shadows with fast tracepoint jumps.
4777 * mem-break.h (check_mem_write): Add `myaddr' parameter.
4778 * target.c (write_inferior_memory): Also pass MYADDR down to
4779 check_mem_write.
4780
03583c20
UW
47812011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
4782
4783 * configure.ac: Check support for personality routine.
4784 * configure: Regenerate.
4785 * config.in: Likewise.
4786 * linux-low.c: Include <sys/personality.h>.
4787 Define ADDR_NO_RANDOMIZE if necessary.
4788 (linux_create_inferior): Disable address space randomization when
4789 forking inferior, if requested.
4790 (linux_supports_disable_randomization): New function.
4791 (linux_target_ops): Install it.
4792 * server.h (disable_randomization): Declare.
4793 * server.c (disable_randomization): New global variable.
4794 (handle_general_set): Handle QDisableRandomization.
4795 (handle_query): Likewise for qSupported.
4796 (main): Support --disable-randomization and --no-disable-randomization
4797 command line arguments.
4798 * target.h (struct target_ops): Add supports_disable_randomization.
4799 (target_supports_disable_randomization): New macro.
4800
723b724b
MF
48012011-09-29 Mike Frysinger <vapier@gentoo.org>
4802
4803 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
4804 ifdef check.
4805 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
4806 [!PT_GETDSBT] (target_loadmap): New definition.
4807 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
4808 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
4809 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
4810 and PT_GETDSBT to LINUX_LOADMAP.
4811 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
4812 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
4813
55329a5c 48142011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
4815
4816 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
4817 (arm_linux_hwbp_cap): New static variable.
4818 (arm_linux_get_hwbp_cap): Replace by ...
4819 (arm_linux_init_hwbp_cap): ... this new function.
4820 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
4821 (arm_linux_get_hw_watchpoint_count): Likewise.
4822 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4823 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
4824 (arm_prepare_to_resume): Use perror_with_name instead of error.
4825
55329a5c 48262011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
4827
4828 * linux-arm-low.c: Include <signal.h>.
4829 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
4830 (struct arm_linux_hwbp_cap): New data type.
4831 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
4832 (struct arm_linux_hw_breakpoint): New data type.
4833 (MAX_BPTS, MAX_WPTS): Define.
4834 (struct arch_process_info, struct arch_lwp_info): New data types.
4835 (arm_linux_get_hwbp_cap): New function.
4836 (arm_linux_get_hw_breakpoint_count): Likewise.
4837 (arm_linux_get_hw_watchpoint_count): Likewise.
4838 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4839 (arm_hwbp_control_initialize): Likewise.
4840 (arm_hwbp_control_is_enabled): Likewise.
4841 (arm_hwbp_control_is_initialized): Likewise.
4842 (arm_hwbp_control_disable): Likewise.
4843 (arm_linux_hw_breakpoint_equal): Likewise.
4844 (arm_linux_hw_point_initialize): Likewise.
4845 (struct update_registers_data): New data structure.
4846 (update_registers_callback: New function.
4847 (arm_insert_point): Likewise.
4848 (arm_remove_point): Likewise.
4849 (arm_stopped_by_watchpoint): Likewise.
4850 (arm_stopped_data_address): Likewise.
4851 (arm_new_process): Likewise.
4852 (arm_new_thread): Likewise.
4853 (arm_prepare_to_resume): Likewise.
4854 (the_low_target): Register arm_insert_point, arm_remove_point,
4855 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
4856 arm_new_thread, and arm_prepare_to_resume.
4857
6b9801d4
SS
48582011-09-15 Stan Shebs <stan@codesourcery.com>
4859
4860 * server.h (struct emit_ops): Add compare-goto fields.
4861 * tracepoint.c (gdb_agent_op_sizes): New table.
4862 (emit_eq_goto): New function.
4863 (emit_ne_goto): New function.
4864 (emit_lt_goto): New function.
4865 (emit_le_goto): New function.
4866 (emit_gt_goto): New function.
4867 (emit_ge_goto): New function.
4868 (is_goto_target): New function.
4869 (compile_bytecodes): Recognize special cases of compare-goto
4870 combinations and call specialized emitters for them.
4871 * linux-x86-low.c (amd64_emit_eq_goto): New function.
4872 (amd64_emit_ne_goto): New function.
4873 (amd64_emit_lt_goto): New function.
4874 (amd64_emit_le_goto): New function.
4875 (amd64_emit_gt_goto): New function.
4876 (amd64_emit_ge_goto): New function.
4877 (amd64_emit_ops): Add the new functions.
4878 (i386_emit_eq_goto): New function.
4879 (i386_emit_ne_goto): New function.
4880 (i386_emit_lt_goto): New function.
4881 (i386_emit_le_goto): New function.
4882 (i386_emit_gt_goto): New function.
4883 (i386_emit_ge_goto): New function.
4884 (i386_emit_ops): Add the new functions.
4885
bf15cbda
SS
48862011-09-08 Stan Shebs <stan@codesourcery.com>
4887
4888 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
4889 (i386_emit_epilogue): Restore %ebx.
4890
943ca1dd
JZ
48912011-08-31 Jie Zhang <jzhang918@gmail.com>
4892
4893 * server.c (step_thread): Remove definition.
4894 (process_serial_event): Don't handle Hs.
4895 * server.h (step_thread): Remove declaration.
4896 * target.c (set_desired_inferior): Remove use of step_thread.
4897
e3deef73
LM
48982011-08-24 Luis Machado <lgustavo@codesourcery.com>
4899
4900 * linux-low.c: Include linux-procfs.h.
4901 (linux_attach_lwp_1): Update comments.
4902 (linux_attach): Scan for existing threads when attaching to a
4903 process that is the tgid.
4904 * Makefile.in: Update dependencies.
4905
13da1c97
LM
49062011-08-24 Luis Machado <lgustavo@codesourcery.com>
4907
4908 * configure.srv: Add linux-procfs.o dependencies.
4909
881127c9
YQ
49102011-08-14 Yao Qi <yao@codesourcery.com>
4911
4912 * target.h (struct target_ops): Fix indent.
4913 * win32-low.c (win32_target_ops): Fix comment.
4914
58dbd541
YQ
49152011-08-14 Andrew Jenner <andrew@codesourcery.com>
4916 Yao Qi <yao@codesourcery.com>
4917
4918 * Makefile.in (clean): Remove tic6x-*.c files.
4919 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
4920 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
4921 (tic6x-c64xp-linux.c): Likewise.
4922 * configure.srv: Add support for tic6x-*-uclinux.
4923 * linux-tic6x-low.c: New.
4924 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
4925
78d85199
YQ
49262011-08-14 Andrew Stubbs <ams@codesourcery.com>
4927 Yao Qi <yao@codesourcery.com>
4928
4929 * target.h (struct target_ops): Add read_loadmap.
4930 * linux-low.c (struct target_loadseg): New type.
4931 (struct target_loadmap): New type.
4932 (linux_read_loadmap): New function.
4933 (linux_target_ops): Add linux_read_loadmap.
4934 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
4935 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
4936 to NULL.
78d85199 4937
a959a88d
EZ
49382011-08-05 Eli Zaretskii <eliz@gnu.org>
4939
4940 * win32-low.c: Include <stdint.h>.
4941
1ced966e
PA
49422011-07-22 Pedro Alves <pedro@codesourcery.com>
4943
4944 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
4945 to the inferior here.
4946 (i386_remove_aligned_watchpoint): Ditto.
4947 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
4948 fit part of the watchpoint in the debug registers.
4949 (i386_update_inferior_debug_regs): New.
4950 (i386_low_insert_watchpoint): Work on a local mirror of the debug
4951 registers, and only update the inferior on success.
4952 (i386_low_remove_watchpoint): Ditto.
4953
d26e3629
KY
49542011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
4955
4956 * linux-low.c (compare_ints, unique, list_threads, show_process,
4957 linux_core_of_thread): Delete.
4958 (linux_target_ops): Change linux_core_of_thread to
4959 linux_common_core_of_thread.
4960 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
4961 * utils.c (malloc_failure): Change type of argument.
4962 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
4963 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
4964 common/linux-osdata.c, common/ptid.c and common/buffer.c.
4965 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
4966 (IPA_OBJS): Add common-utils-ipa.o.
4967 (ptid_h, linux_osdata_h): New macros.
4968 (server_h): Add common/common-utils.h, common/xml-utils.h,
4969 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
4970 common/ptid.h.
4971 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
4972 ptid.o, buffer.o): New rules.
4973 (linux-low.o): Add common/linux-osdata.h as a dependency.
4974 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
4975 * configure.ac: Add AC_HEADER_DIRENT check.
4976 * config.in: Regenerate.
4977 * configure: Regenerate.
4978 * remote-utils.c (xml_escape_text): Delete.
4979 (buffer_grow, buffer_free, buffer_init, buffer_finish,
4980 buffer_xml_printf): Move to common/buffer.c.
4981 * server.c (main): Remove call to initialize_inferiors.
4982 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
4983 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
4984 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
4985 internal_error, gdb_assert, gdb_assert_fail): Delete.
4986 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
4987 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
4988 common/buffer.h.
4989 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
4990 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
4991 initialize_inferiors): Delete.
4992
2275a1a7
PA
49932011-07-20 Pedro Alves <pedro@codesourcery.com>
4994
4995 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
4996 symbol error.
4997
0a5b1e09
PA
49982011-05-31 Pedro Alves <pedro@codesourcery.com>
4999
5000 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5001 assertion.
5002 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5003
6938fd34
YQ
50042011-05-26 Yao Qi <yao@codesourcery.com>
5005
5006 * Makefile.in (thread-db.o): Track dependence to
5007 common/gdb_thread_db.h.
5008 * thread-db.c: include gdb_thread_db.h from right place.
5009
b481f9e0
TT
50102011-05-16 Adrian Cornish <gnu@bluedreamer.com>
5011
5012 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5013 __FILE__ and __LINE__ to internal_error.
5014
98a5dd13
DE
50152011-05-13 Doug Evans <dje@google.com>
5016
5017 * thread-db.c (try_thread_db_load_from_sdir): New function.
5018 (try_thread_db_load_from_dir): New function.
5019 (thread_db_load_search): Handle $sdir, ignore $pdir.
5020 Remove trying of system directories if search of
5021 libthread-db-search-path fails, that is now done via $sdir.
5022
d248b706
KY
50232011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
5024
5025 * server.c (handle_query): Add EnableDisableTracepoints to the list
5026 of supported features.
43aaf8b6 5027 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 5028 tracepoints.
43aaf8b6
PA
5029 (cmd_qtenable_disable): New.
5030 (cmd_qtstart): Install tracepoints even if disabled.
5031 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5032 receiving a QTEnable or QTDisable packet.
5033 (gdb_collect): Skip data collection if fast tracepoint is disabled.
5034 (ust_marker_to_static_tracepoint): Do not ignore disabled static
5035 tracepoints.
5036 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 5037
84e578fb
DE
50382011-05-10 Doug Evans <dje@google.com>
5039
5040 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
5041
71f55dd8
DE
50422011-05-04 Doug Evans <dje@google.com>
5043
5044 * linux-low.c (linux_join): Skip process lookup.
5045 * spu-low.c (spu_join): Ditto.
5046 * server.c (join_inferiors_callback): Delete.
5047 (process_serial_event): For 'D' packet (detach) call join_inferior
5048 directly.
5049
4d393d60
JM
50502011-05-04 Joseph Myers <joseph@codesourcery.com>
5051
5052 * README: Don't mention xscale*-*-linux*.
5053 * configure.srv (xscale*-*-linux*): Don't handle target.
5054
b00ad6ff
NF
50552011-04-27 Nathan Froyd <froydnj@codesourcery.com>
5056
5057 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
5058 casting pointers.
5059 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
5060 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
5061 (i386_emit_void_call_2): Likewise.
5062
af96c192
YQ
50632011-04-26 Yao Qi <yao@codesourcery.com>
5064
43aaf8b6
PA
5065 * linux-low.c: Move common macros to linux-ptrace.h.
5066 Include linux-ptrace.h.
af96c192
YQ
5067 * Makefile.in (linux_ptrace_h): New.
5068 (linux-low.o): Depends on linux-ptrace.h.
5069
03f2bd59
JK
50702011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5071
5072 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
5073 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
5074 (remote_prepare): New function with most of the TCP code from ...
5075 (remote_open): ... here. Detect PORT here unconditionally. Move also
5076 setting transport_is_reliable.
5077 * server.c (run_once): New variable.
5078 (gdbserver_usage): Document it.
5079 (main): Set run_once for `--once'. Call remote_prepare. Exit after
5080 the first run if RUN_ONCE.
5081 * server.h (run_once, remote_prepare): New declarations.
5082
7a9dd1b2
TT
50832011-04-19 Tom Tromey <tromey@redhat.com>
5084
5085 * win32-low.c (handle_load_dll): Remove duplicate "the".
5086
81239425
PM
50872011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
5088
5089 Remove support for old Cygwin 1.5 versions.
5090 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
5091 function to avoid warning.
5092 (win32_add_one_solib): Use cygwin_conv_path function to avoid
5093 warning.
5094
9e0627f1
PM
50952011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
5096
5097 * gdbserver/server.h (Macro _): Define it if not available.
5098
588eebee
MS
50992011-03-14 Michael Snyder <msnyder@vmware.com>
5100
348af9f7 5101 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 5102
43f70d4c
JB
51032011-03-10 Joel Brobecker <brobecker@adacore.com>
5104
5105 * Makefile.in (maintainer-clean realclean distclean): Remove
5106 "make ... subdir_do" command.
5107
348af9f7
MS
51082011-03-10 Michael Snyder <msnyder@vmware.com>
5109
5110 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
5111
5112 * server.c (handle_v_run): Free alloced buffer on early return.
5113
e637a4f5
YQ
51142011-03-09 Yao Qi <yao@codesourcery.com>
5115
5116 Revert:
5117 2011-03-04 Yao Qi <yao@codesourcery.com>
5118
5119 * Makefile.in: Remove GNU make feature --directory.
5120
5121 2011-03-05 Yao Qi <yao@codesourcery.com>
5122
5123 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5124 (subdir_do): New make target. Copied from gdb/Makefile.
5125 (maintainer-clean, realclean, distclean, clean): Call corresponding
5126 make targets in common/Makefile.
5127
5128 2011-02-11 Yao Qi <yao@codesourcery.com>
5129
5130 * configure.ac: Call AC_PROG_RANLIB.
5131 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5132 * configure: Regenerate.
5133
e6edda56
JK
51342011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5135
5136 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
5137
e5141119
JB
51382011-03-06 Yao Qi <yao@codesourcery.com>
5139
5140 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
5141
64794aa4
JB
51422011-03-05 Yao Qi <yao@codesourcery.com>
5143
5144 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5145 (subdir_do): New make target. Copied from gdb/Makefile.
5146 (maintainer-clean, realclean, distclean, clean): Call corresponding
5147 make targets in common/Makefile.
5148
7a762829
YQ
51492011-03-04 Yao Qi <yao@codesourcery.com>
5150
5151 * Makefile.in: Remove GNU make feature --directory.
5152
348af9f7
MS
51532011-03-04 Michael Snyder <msnyder@vmware.com>
5154
5155 * server.c (queue_stop_reply): Call xmalloc not malloc.
5156
51572011-03-02 Michael Snyder <msnyder@vmware.com>
5158
5159 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5160
9f72fee2
MS
51612011-02-28 Michael Snyder <msnyder@vmware.com>
5162
588eebee
MS
5163 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5164 (cmd_qtframe): Ditto.
5165 (cmd_qtbuffer): Ditto.
5166 (cmd_bigqtbuffer): Ditto.
5167
9f72fee2
MS
5168 * utils.c (decimal2str): Initialize 'width' to nine, then
5169 don't mess with it.
5170
8040bd49
UW
51712011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5172
5173 * hostio.c (require_data): Free *data, not data.
5174
7e52cbd0
JK
51752011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5176
5177 * hostio.c (require_data): Use free, not xfree.
5178
9130f83e
MS
51792011-02-27 Michael Snyder <msnyder@vmware.com>
5180
4b812f4e
MS
5181 * server.c (handle_query): Discard unused value.
5182
9130f83e
MS
5183 * hostio.c (require_data): Free malloc memory before returning
5184 error.
5185
69d37113
MS
51862011-02-26 Michael Snyder <msnyder@vmware.com>
5187
5188 * linux-low.c (list_threads): Call closedir for dirent.
5189
35f5825a
MS
51902011-02-27 Michael Snyder <msnyder@vmware.com>
5191
2a589cef
MS
5192 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5193 a case statement falls through.
5194
0adea5f7
MS
5195 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5196
35f5825a
MS
5197 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
5198 in comparison.
5199
238f1c74
MS
52002011-02-26 Michael Snyder <msnyder@vmware.com>
5201
5202 * utils.c (decimal2str): Eliminate dead code and dead param.
5203 (pulongest): Drop dead param from call to decimal2str.
5204 (plongest): Ditto.
5205
633ff500
JB
52062011-02-24 Joel Brobecker <brobecker@adacore.com>
5207
5208 Revert the following patch (not approved yet):
5209 2011-02-21 Hui Zhu <teawater@gmail.com>
5210 * tracepoint.c (tp_printf): New function.
5211 (eval_agent_expr): Handle gdb_agent_op_printf.
5212
f9c6ff72
HZ
52132011-02-21 Hui Zhu <teawater@gmail.com>
5214
5215 * tracepoint.c (tp_printf): New function.
5216 (eval_agent_expr): Handle gdb_agent_op_printf.
5217
94d5e490
TT
52182011-02-18 Tom Tromey <tromey@redhat.com>
5219
5220 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5221 (tracepoint.o): Likewise.
5222 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5223 (gdb_agent_op_names): Likewise.
5224
c7f96d2b
TT
52252011-02-18 Tom Tromey <tromey@redhat.com>
5226
5227 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5228 gdb_agent_op_rot>: New constants.
5229 (gdb_agent_op_names): Add pick and roll.
5230 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5231 cases.
5232
0feedb2c
JK
52332011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5234
5235 * aclocal.m4: Regenerated with aclocal-1.11.1.
5236
b3b9301e
PA
52372011-02-14 Pedro Alves <pedro@codesourcery.com>
5238
5239 * server.c (handle_qxfer_traceframe_info): New.
5240 (qxfer_packets): Register "traceframe-info".
5241 (handle_query): Report support for qXfer:traceframe-info:read+.
5242 * tracepoint.c (match_blocktype): New.
5243 (traceframe_find_block_type): Rename to ...
5244 (traceframe_walk_blocks): ... this. Add callback filter argument,
5245 and use it.
5246 (traceframe_find_block_type): New, reimplemented on top of
5247 traceframe_walk_blocks.
5248 (build_traceframe_info_xml): New.
5249 (traceframe_read_info): New.
5250 * server.h (traceframe_read_info): Declare.
5251
4f3e6fb7
YQ
52522011-02-11 Yao Qi <yao@codesourcery.com>
5253
5254 * configure.ac: Call AC_PROG_RANLIB.
5255 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5256 * configure: Regenerate.
5257
764880b7
PA
52582011-02-07 Pedro Alves <pedro@codesourcery.com>
5259
5260 * server.c (gdb_read_memory): Change return semantics to allow
5261 partial transfers.
5262 (handle_search_memory_1): Adjust.
5263 (process_serial_event) <'m' packet>: Handle partial transfers.
5264 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5265
1c79eb8a
PA
52662011-01-28 Pedro Alves <pedro@codesourcery.com>
5267
5268 * regcache.c (init_register_cache): Initialize
5269 regcache->register_status.
5270 (free_register_cache): Release regcache->register_status.
5271 (regcache_cpy): Copy register_status.
5272 (registers_to_string): Print 'x's for unavailable registers.
5273 (supply_register): Mark the register's status valid or
5274 unavailable, depending on whether a buffer was passed in or not.
5275 (supply_register_zeroed): New.
5276 (supply_regblock): Mark the registers' status valid or
5277 unavailable, depending on whether a buffer was passed in or not.
5278 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5279 (struct regcache): New `register_status' field.
5280 (supply_register_zeroed): Declare.
5281 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5282 supply_register_zeroed, rather than passing a NULL buffer to
5283 supply_register.
5284 * tracepoint.c (fetch_traceframe_registers): Update comment.
5285
85724a0e
PA
52862011-01-28 Pedro Alves <pedro@codesourcery.com>
5287
5288 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
5289 buffer explicit.
5290
d08aafef
PA
52912011-01-25 Pedro Alves <pedro@codesourcery.com>
5292
5293 * server.h (decode_xfer_write): Change prototype.
5294 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
5295 and don't extract the annex here.
5296 * server.c (decode_xfer_read): Remove `annex' parameter,
5297 and don't extract the annex here.
5298 (decode_xfer): New.
5299 (struct qxfer): New.
5300 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
5301 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
5302 (handle_qxfer_statictrace): New functions, abstracted out from
5303 handle_query, and made to use the struct qxfer interface.
5304 (handle_threads_qxfer_proper): Rename to ...
5305 (handle_qxfer_threads_proper): ... this.
5306 (handle_threads_qxfer): Rename to ...
5307 (handle_qxfer_threads): ... this. Adjust.
5308 (qxfer_packets): New array.
5309 (handle_qxfer): New function.
5310 (handle_query): Use handle_qxfer.
5311
493e2a69
MS
53122011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
5313
5314 * gdbreplay.c: Shorten lines of >= 80 columns.
5315 * linux-low.c: Ditto.
5316 * linux-ppc-low.c: Ditto.
5317 * linux-s390-low.c: Ditto.
5318 * linux-sparc-low.c: Ditto.
5319 * linux-x86-low.c: Ditto.
5320 * linux-xtensa-low.c: Ditto.
5321 * mem-break.c: Ditto.
5322 * nto-low.c: Ditto.
5323 * regcache.h: Ditto.
5324 * remote-utils.c: Ditto.
5325 * server.c: Ditto.
5326 * server.h: Ditto.
5327 * thread-db.c: Ditto.
5328 * tracepoint.c: Ditto.
5329 * utils.c: Ditto.
5330 * win32-low.h: Ditto.
5331
44944448
JB
53322011-01-05 Joel Brobecker <brobecker@adacore.com>
5333
5334 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
5335 update.
5336
71ce852c
JB
53372011-01-01 Joel Brobecker <brobecker@adacore.com>
5338
5339 * server.c (gdbserver_version): Update copyright year in version
5340 output.
5341 * gdbreplay.c (gdbreplay_version): Ditto.
5342
eb826dc6
MF
53432010-12-29 Jie Zhang <jie.zhang@analog.com>
5344
5345 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
5346 * linux-bfin-low.c: New file.
5347 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
5348 PT_DATA_ADDR for BFIN targets.
5349 * Makefile.in (SFILES): Add linux-bfin-low.c.
5350 (clean): Remove reg-bfin.c.
5351 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
5352 * README: Mention supported Blackfin targets.
5353
39ab222a
MF
53542010-12-23 Mike Frysinger <vapier@gentoo.org>
5355
5356 * .gitignore: New file.
5357
a1f2ce7d
MF
53582010-11-16 Mike Frysinger <vapier@gentoo.org>
5359
5360 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
5361
f474844c
JZ
53622010-10-22 Jie Zhang <jie@codesourcery.com>
5363
5364 * Makefile.in: Add FLAGS_TO_PASS variable.
5365 (install): Remove dependency of install-only and recursively
5366 invoke make for install-only.
5367
f1048712
DE
53682010-10-04 Doug Evans <dje@google.com>
5369
5370 * Makefile.in (uninstall): Use $(DESTDIR).
5371
b53a1623
PA
53722010-09-24 Pedro Alves <pedro@codesourcery.com>
5373
e6ee044d
PA
5374 PR gdb/11842
5375
b53a1623
PA
5376 * linux-x86-low.c (compat_siginfo_from_siginfo)
5377 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
5378 si_code is < 0. Check for si_code == SI_TIMER before checking for
5379 si_code < 0.
5380
fa1bd1e4
JB
53812010-09-13 Joel Brobecker <brobecker@adacore.com>
5382
5383 * lynx-i386-low.c: New file.
5384 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
5385
47fac8f8
JB
53862010-09-13 Joel Brobecker <brobecker@adacore.com>
5387
5388 * lynx-low.c (ptrace_request_to_str): Remove handling for
5389 request values that have been removed in LynxOS 5.x.
5390
1adfc54d
JB
53912010-09-13 Joel Brobecker <brobecker@adacore.com>
5392
5393 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
5394 <ptrace.h>
5395
c2a66c29
NS
53962010-09-09 Nathan Sidwell <nathan@codesourcery.com>
5397
5398 * configure.ac: Add --enable-inprocess-agent option.
5399 * configure: Rebuilt.
5400
32fcada3
YQ
54012010-09-06 Yao Qi <yao@codesourcery.com>
5402
5403 * linux-low.c (linux_kill): Remove unused variable.
5404 (linux_stabilize_threads): Likewise.
5405 * server.c (start_inferior): Likewise.
5406 (queue_stop_reply_callback): Likewise.
5407 * tracepoint.c (do_action_at_tracepoint): Likewise.
5408
0cccb683
YQ
54092010-09-06 Yao Qi <yao@codesourcery.com>
5410
5411 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
5412 on return.
5413
423ec54c
JK
54142010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5415
5416 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
5417
12ac6819
PA
54182010-09-06 Pedro Alves <pedro@codesourcery.com>
5419
5420 * Makefile.in (install-only): Replace $IPA_DEPFILES with
5421 "$(IPA_DEPFILES)".
5422
8ed54b31
JB
54232010-09-01 Joel Brobecker <brobecker@adacore.com>
5424
5425 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
5426 gdbserver/lynx-ppc-low.c: New files.
5427 * Makefile.in (lynx_low_h): New variable.
5428 (lynx-low.o, lynx-ppc-low.o): New rules.
5429 * configure.ac: On LynxOS, link with -lnetinet.
5430 * configure.srv: Add handling of powerpc-*-lynxos* targets.
5431 * configure: regenerate.
5432
bb0116a4
JB
54332010-09-01 Joel Brobecker <brobecker@adacore.com>
5434
5435 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
5436 * configure.ac: Add check for vasprintf and vsnprintf.
5437 * configure, config.in: Regenerate.
5438 * server.h (vasprintf, vsnprintf): Add conditional declarations.
5439
a778ab81 54402010-09-01 Joel Brobecker <brobecker@adacore.com>
5441
5442 * gdbreplay.c: Move include of alloca.h up, next to include of
5443 malloc.h.
5444 * server.h: Add include of malloc.h.
5445 * mem-break.c: Remove include of malloc.h.
5446 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
5447
8b034a19 54482010-09-01 Joel Brobecker <brobecker@adacore.com>
5449
5450 * Makefile.in (memmem.o): Build with -Wno-error.
5451
54522010-09-01 Joel Brobecker <brobecker@adacore.com>
5453
5454 * utils.c (xsnprintf): Make non-static.
5455 * server.h: Add xsnprintf declaration.
5456 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
5457 replace calls to snprintf by calls to xsnprintf throughout.
5458
54592010-09-01 Joel Brobecker <brobecker@adacore.com>
5460
5461 * configure.ac: Add configure check for alloca.
5462 * configure, config.in: Regenerate.
5463 * server.h: Include alloca.h if it exists.
5464 * gdbreplay.c: Include alloca.h if it exists.
5465
1a981360
PA
54662010-08-28 Pedro Alves <pedro@codesourcery.com>
5467
5468 * linux-low.c (__SIGRTMIN): Define if not already defined.
5469 (linux_create_inferior): Check for __ANDROID__ rather than
5470 __SIGRTMIN.
5471 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
5472 are already deferred.
5473 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
5474 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
5475 stopped and already has a pending signal to report.
5476 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
5477 a pending signal to report or is moving out of a jump pad.
5478 (linux_init_signals): Check for __ANDROID__ rather than
5479 __SIGRTMIN.
5480
b4d51a55
PA
54812010-08-28 Pedro Alves <pedro@codesourcery.com>
5482
5483 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
5484 debug_threads check. Avoid a linear search when not doing debug
5485 output.
5486
ec48365d
PA
54872010-08-27 Pedro Alves <pedro@codesourcery.com>
5488
5489 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
5490 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
5491 (struct file_handler) <fd>: Change type to gdb_fildes_t.
5492 (process_event): Change local fd's type to gdb_fildes_t.
5493 (create_file_handler): Adjust prototype.
5494 (delete_file_handler): Adjust prototype.
5495 (handle_file_event): Adjust prototype. Use pfildes.
5496 (create_file_event): Adjsut prototype.
5497 * remote-utils.c (remote_desc, listen_desc): Change type to
5498 gdb_fildes_t.
5499 * server.h: New gdb_fildes_t typedef.
5500 [USE_WIN32API]: Include winsock2.h.
5501 (delete_file_handler, add_file_handler): Adjust prototypes.
5502 (pfildes): Declare.
5503 * utils.c (pfildes): New.
5504
854d88f0
PA
55052010-08-27 Pedro Alves <pedro@codesourcery.com>
5506
5507 * configure.ac (build_warnings): Add -Wno-char-subscripts.
5508 * configure: Regenerate.
5509
0146f85b
PA
55102010-08-27 Pedro Alves <pedro@codesourcery.com>
5511
5512 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
5513 (linux_done_accessing_memory): ... this.
5514 (linux_target_ops): Adjust.
5515 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
5516 * nto-low.c (nto_target_ops): Adjust comment.
5517 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
5518 * spu-low.c (spu_target_ops): Adjust comment.
5519 * target.h (target_ops): Rename unprepare_to_access_memory field
5520 to done_accessing_memory.
5521 (unprepare_to_access_memory): Rename to ...
5522 (done_accessing_memory): ... this.
5523
90d74c30
PA
55242010-08-26 Pedro Alves <pedro@codesourcery.com>
5525
5526 * linux-low.c (linux_prepare_to_access_memory): New.
5527 (linux_unprepare_to_access_memory): New.
5528 (linux_target_ops): Install them.
5529 * server.c (read_memory): Rename to ...
5530 (gdb_read_memory): ... this. Use
5531 prepare_to_access_memory/prepare_to_access_memory.
5532 (write_memory): Rename to ...
5533 (gdb_write_memory): ... this. Use
5534 prepare_to_access_memory/prepare_to_access_memory.
5535 (handle_search_memory_1): Adjust.
5536 (process_serial_event): Adjust.
5537 * target.h (struct target_ops): New fields
5538 prepare_to_access_memory and unprepare_to_access_memory.
5539 (prepare_to_access_memory, unprepare_to_access_memory): New.
5540 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
5541 prepare_to_access_memory/prepare_to_access_memory.
5542 * nto-low.c (nto_target_ops): Adjust.
5543 * spu-low.c (spu_target_ops): Adjust.
5544 * win32-low.c (win32_target_ops): Adjust.
5545
fd467969
PA
55462010-08-26 Pedro Alves <pedro@codesourcery.com>
5547
5548 * Makefile.in (WARN_CFLAGS): Get it from configure.
5549 (WERROR_CFLAGS): New.
5550 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
5551 * configure.ac: Introduce --enable-werror, which adds -Werror to
5552 the compiler command line. Enabled by default. Disable with
5553 --disable-werror. Add -Wdeclaration-after-statement
5554 Wpointer-arith and -Wformat-nonliteral to warning flags.
5555 * configure: Regenerate.
5556
331e2f5f
PA
55572010-08-26 Pedro Alves <pedro@codesourcery.com>
5558
5559 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
5560
e581f2b4
PA
55612010-08-26 Pedro Alves <pedro@codesourcery.com>
5562
5563 * gdbreplay.c (remote_error): New.
5564 (gdbchar): New.
5565 (expect): Use gdbchar. Check for error reading from GDB.
5566 Clarify sync error output.
5567 (play): Check for errors writing to GDB.
5568 * linux-low.c (sigchld_handler): Really ignore `write' errors.
5569 * remote-utils.c (getpkt): Check for errors writing to the remote
5570 descriptor.
5571
3c11dd79
PA
55722010-08-25 Pedro Alves <pedro@codesourcery.com>
5573
5574 * linux-low.c (linux_wait_1): Move non-debugging code out of
5575 `debug_threads' control.
5576
d20a8ad9
PA
55772010-08-25 Pedro Alves <pedro@codesourcery.com>
5578
5579 * linux-low.c (linux_wait_1): Don't set last_status here.
5580 * server.c (push_event, queue_stop_reply_callback): Assert we're
5581 not pushing a TARGET_WAITKIND_IGNORE event.
5582 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
5583 (myresume, handle_target_event): Set the thread's last_resume_kind
5584 and last_status from the target returned status.
5585
964e4306
PA
55862010-08-25 Pedro Alves <pedro@codesourcery.com>
5587
5588 PR threads/10729
5589
5590 * linux-x86-low.c (update_debug_registers_callback): New.
5591 (i386_dr_low_set_addr): Use it.
5592 (i386_dr_low_get_addr): New.
5593 (i386_dr_low_set_control): Use update_debug_registers_callback.
5594 (i386_dr_low_get_control): New.
5595 (i386_dr_low_get_status): Adjust.
5596 * linux-low.c (linux_stop_lwp): New.
5597 * linux-low.h (linux_stop_lwp): Declare.
5598
5599 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
5600 argument instead of a i386_debug_reg_state.
5601 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
5602 a i386_debug_reg_state.
5603 (i386_insert_aligned_watchpoint): Adjust.
5604 (i386_remove_aligned_watchpoint): Adjust.
5605 (i386_low_stopped_data_address): Read the debug registers from the
5606 inferior instead of from the mirrors.
5607 * i386-low.h (struct i386_debug_reg_state): Extend comment.
5608 (i386_dr_low_get_addr): Declare.
5609 (i386_dr_low_get_control): Declare.
5610 (i386_dr_low_get_status): Change prototype.
5611
5612 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
5613 (i386_dr_low_get_addr): New.
5614 (i386_dr_low_get_control): New.
5615 (i386_dr_low_get_status): Adjust prototype. Return
5616 dr_status_mirror.
5617 (i386_initial_stuff): Clear dr_status_mirror and
5618 dr_control_mirror.
5619 (i386_get_thread_context): Adjust.
5620 (i386_set_thread_context): Adjust.
5621 (i386_thread_added): Adjust.
5622
5f21a75b
PA
56232010-08-24 Pedro Alves <pedro@codesourcery.com>
5624
5625 * linux-low.h (linux_thread_area): Delete declaration.
5626
3e4c1235
TS
56272010-08-11 Thomas Schwinge <thomas@codesourcery.com>
5628
5629 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
5630 after its termination.
5631
1971b033
PA
56322010-08-09 Pedro Alves <pedro@codesourcery.com>
5633
5634 * linux-low.c (gdb_wants_lwp_stopped): Delete.
5635 (gdb_wants_all_stopped): Delete.
5636 (linux_wait_1): Don't call them.
5637 * server.c (handle_v_cont): Tag all threads as want-stopped.
5638 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
5639 stopped as "client-wants-stopped".
5640
310444ac
PA
56412010-07-31 Pedro Alves <pedro@codesourcery.com>
5642
5643 * Makefile.in (signals_h): New.
5644 (server_h): Depend on it.
5645 (server.o): Don't depend on $(signals_def).
5646 (signals.o): Depend on $(signals_def).
5647
a19cae16
JK
56482010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
5649
5650 * Makefile.in (signals_def): New.
5651 (server_h): Append include/gdb/signals.h and signals_def.
5652 (server.o): Append signals_def.
5653
30d50328
JK
56542010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5655
5656 * server.c (handle_target_event): Use target_signal_to_host for
5657 resume_info.sig initialization.
5658 * target.h (struct thread_resume) <sig>: New comment.
5659
5c3216e2
OS
56602010-07-20 Ozkan Sezer <sezeroz@gmail.com>
5661
c6f46ca0
OS
5662 * server.c (handle_query): strcpy() the returned string from paddress()
5663 instead of sprintf().
5c3216e2
OS
5664 * utils.c (paddress): Return phex_nz().
5665
6bd31874
JB
56662010-07-07 Joel Brobecker <brobecker@adacore.com>
5667
5668 * server.c (handle_v_cont): Call mourn_inferior if process
5669 just exited.
5670 (myresume): Likewise.
5671
0fb4aa4b
PA
56722010-07-01 Pedro Alves <pedro@codesourcery.com>
5673
5674 Static tracepoints, and integration with UST.
5675
5676 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
5677 * mem-break.c (uninsert_all_breakpoints)
5678 (reinsert_all_breakpoints): New.
5679 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
5680 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
5681 (gdb_agent_ust_loaded, helper_thread_id)
5682 (gdb_agent_helper_thread_id): New macros.
5683 (struct ipa_sym_addresses): Add addr_ust_loaded,
5684 addr_helper_thread_id, addr_cmd_buf.
5685 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
5686 (in_process_agent_loaded_ust): New.
5687 (write_e_ust_not_loaded): New.
5688 (maybe_write_ipa_ust_not_loaded): New.
5689 (struct collect_static_trace_data_action): New.
5690 (enum tracepoint_type) <static_tracepoint>: New.
5691 (struct tracepoint) <handle>: Mention static tracepoints.
5692 (struct static_tracepoint_ctx): New.
5693 (CMD_BUF_SIZE): New.
5694 (add_tracepoint_action): Handle static tracepoint actions.
5695 (unprobe_marker_at): New.
5696 (clear_installed_tracepoints): Handle static tracepoints.
5697 (cmd_qtdp): Handle static tracepoints.
5698 (probe_marker_at): New.
5699 (cmd_qtstart): Handle static tracepoints.
5700 (response_tracepoint): Handle static tracepoints.
5701 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
5702 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
5703 (get_context_regcache): Handle static tracepoints.
5704 (do_action_at_tracepoint): Handle static tracepoint actions.
5705 (traceframe_find_block_type): Handle static trace data blocks.
5706 (traceframe_read_sdata): New.
5707 (download_tracepoints): Download static tracepoint actions.
5708 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
5709 (GDB_PROBE_NAME): New.
5710 (ust_ops): New.
5711 (GET_UST_SYM): New.
5712 (USTF): New.
5713 (dlsym_ust): New.
5714 (ust_marker_to_static_tracepoint): New.
5715 (gdb_probe): New.
5716 (collect_ust_data_at_tracepoint): New.
5717 (gdb_ust_probe): New.
5718 (UNIX_PATH_MAX, SOCK_DIR): New.
5719 (gdb_ust_connect_sync_socket): New.
5720 (resume_thread, stop_thread): New.
5721 (run_inferior_command): New.
5722 (init_named_socket): New.
5723 (gdb_ust_socket_init): New.
5724 (cstr_to_hexstr): New.
5725 (next_st): New.
5726 (first_marker, next_marker): New.
5727 (response_ust_marker): New.
5728 (cmd_qtfstm, cmd_qtsstm): New.
5729 (unprobe_marker_at, probe_marker_at): New.
5730 (cmd_qtstmat, gdb_ust_thread): New.
5731 (gdb_ust_init): New.
5732 (initialize_tracepoint_ftlib): Call gdb_ust_init.
5733 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
5734 (ST_REGENTRY): New.
5735 (x86_64_st_collect_regmap): New.
5736 (X86_64_NUM_ST_COLLECT_GREGS): New.
5737 (AMD64_RIP_REGNUM): New.
5738 (supply_static_tracepoint_registers): New.
5739 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
5740 (ST_REGENTRY): New.
5741 (i386_st_collect_regmap): New.
5742 (i386_NUM_ST_COLLECT_GREGS): New.
5743 (supply_static_tracepoint_registers): New.
5744 * server.c (handle_query): Handle qXfer:statictrace:read.
5745 <qSupported>: Report support for StaticTracepoints, and
5746 qXfer:statictrace:read features.
5747 * server.h (traceframe_read_sdata)
5748 (supply_static_tracepoint_registers): Declare.
5749 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
5750 (unpack_varlen_hex): Include in IPA build.
5751 * Makefile.in (ustlibs, ustinc): New.
5752 (IPA_OBJS): Add remote-utils-ipa.o.
5753 ($(IPA_LIB)): Link -ldl and -lpthread.
5754 (UST_CFLAGS): New.
5755 (IPAGENT_CFLAGS): Add UST_CFLAGS.
5756 * config.in, configure: Regenerate.
5757
9e4344e5
PA
57582010-06-20 Ian Lance Taylor <iant@google.com>
5759 Pedro Alves <pedro@codesourcery.com>
5760
5761 * linux-x86-low.c (always_true): Delete.
5762 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
5763 trying to fool the compiler with always_true.
5764
c6beb2cb
PA
57652010-06-20 Pedro Alves <pedro@codesourcery.com>
5766
5767 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
5768 conditions in gdbserver.
5769
d2ed6730
UW
57702010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
5771
5772 * spu-low.c (spu_read_memory): Wrap around local store limit.
5773 (spu_write_memory): Likewise.
5774
4e29fb54
PA
57752010-06-15 Pedro Alves <pedro@codesourcery.com>
5776
5777 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
5778 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
5779 LONGEST uses.
5780 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
5781 uses.
5782 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
5783 uses with LONGEST uses.
5784
6a271cae
PA
57852010-06-14 Stan Shebs <stan@codesourcery.com>
5786 Pedro Alves <pedro@codesourcery.com>
5787
5788 Bytecode compiler.
5789
5790 * linux-x86-low.c: Include limits.h.
5791 (add_insns): New.
5792 (always_true): New.
5793 (EMIT_ASM): New.
5794 (EMIT_ASM32): New.
5795 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
5796 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
5797 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
5798 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
5799 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
5800 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
5801 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
5802 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
5803 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
5804 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
5805 (amd64_emit_void_call_2): New.
5806 (amd64_emit_ops): New.
5807 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
5808 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
5809 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
5810 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
5811 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
5812 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
5813 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
5814 (i386_emit_call, i386_emit_reg, i386_emit_pop)
5815 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
5816 (i386_emit_stack_adjust, i386_emit_int_call_1)
5817 (i386_emit_void_call_2): New.
5818 (i386_emit_ops): New.
5819 (x86_emit_ops): New.
5820 (the_low_target): Install x86_emit_ops.
5821 * server.h (struct emit_ops): New.
5822 (get_raw_reg_func_addr): Declare.
5823 (current_insn_ptr, emit_error): Declare.
5824 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
5825 (set_trace_state_variable_value): New defines.
5826 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
5827 addr_get_trace_state_variable_value and
5828 addr_set_trace_state_variable_value.
5829 (symbol_list): New fields for get_raw_reg,
5830 get_trace_state_variable_value and set_trace_state_variable_value.
5831 (condfn): New typedef.
5832 (struct tracepoint): New field `compiled_cond'.
5833 (do_action_at_tracepoint): Clear compiled_cond.
5834 (get_trace_state_variable_value, set_trace_state_variable_value):
5835 Export in the IPA.
5836 (condition_true_at_tracepoint): If there's a compiled condition,
5837 run that.
5838 (current_insn_ptr, emit_error): New globals.
5839 (struct bytecode_address): New.
5840 (get_raw_reg_func_addr): New.
5841 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
5842 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
5843 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
5844 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
5845 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
5846 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
5847 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
5848 (compile_tracepoint_condition, compile_bytecodes): New.
5849 * target.h (emit_ops): Forward declare.
5850 (struct target_ops): New field emit_ops.
5851 (target_emit_ops): New.
5852 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
5853 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
5854 * linux-low.c (linux_emit_ops): New.
5855 (linux_target_ops): Install it.
5856 * linux-low.h (struct linux_target_ops): New field emit_ops.
5857
92b72907
UW
58582010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
5859
5860 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
5861 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
5862
fa593d66
PA
58632010-06-01 Pedro Alves <pedro@codesourcery.com>
5864 Stan Shebs <stan@codesourcery.com>
5865
5866 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
5867 (all): Depend on $(extra_libraries).
5868 (install-only): Install the IPA.
5869 (IPA_OBJS, IPA_LIB): New.
5870 (clean): Remove the IPA lib.
5871 (IPAGENT_CFLAGS): New.
5872 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
5873 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
5874 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
5875 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
5876 * configure.ac: Check for atomic builtins support in the compiler.
5877 (IPA_DEPFILES, extra_libraries): Define.
5878 * configure.srv (ipa_obj): Add description.
5879 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
5880 (i[34567]86-*-linux*): Set ipa_obj.
5881 (x86_64-*-linux*): Set ipa_obj.
5882 * linux-low.c (stabilizing_threads): New.
5883 (supports_fast_tracepoints): New.
5884 (linux_detach): Stabilize threads before detaching.
5885 (handle_tracepoints): Handle internal tracing breakpoints. Assert
5886 the lwp is either not stabilizing, or is moving out of a jump pad.
5887 (linux_fast_tracepoint_collecting): New.
5888 (maybe_move_out_of_jump_pad): New.
5889 (enqueue_one_deferred_signal): New.
5890 (dequeue_one_deferred_signal): New.
5891 (linux_wait_for_event_1): If moving out of a jump pad, defer
5892 pending signals to later.
5893 (linux_stabilize_threads): New.
5894 (linux_wait_1): Check if threads need moving out of jump pads, and
5895 do it if so.
5896 (stuck_in_jump_pad_callback): New.
5897 (move_out_of_jump_pad_callback): New.
5898 (lwp_running): New.
5899 (linux_resume_one_lwp): Handle moving out of jump pads.
5900 (linux_set_resume_request): Dequeue deferred signals.
5901 (need_step_over_p): Also step over fast tracepoint jumps.
5902 (start_step_over): Also uninsert fast tracepoint jumps.
5903 (finish_step_over): Also reinsert fast tracepoint jumps.
5904 (linux_install_fast_tracepoint_jump): New.
5905 (linux_target_ops): Install linux_stabilize_threads and
5906 linux_install_fast_tracepoint_jump_pad.
5907 * linux-low.h (linux_target_ops) <get_thread_area,
5908 install_fast_tracepoint_jump_pad>: New fields.
5909 (struct lwp_info) <collecting_fast_tracepoint,
5910 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
5911 (linux_get_thread_area): Declare.
5912 * linux-x86-low.c (jump_insn): New.
5913 (x86_get_thread_area): New.
5914 (append_insns): New.
5915 (push_opcode): New.
5916 (amd64_install_fast_tracepoint_jump_pad): New.
5917 (i386_install_fast_tracepoint_jump_pad): New.
5918 (x86_install_fast_tracepoint_jump_pad): New.
5919 (the_low_target): Install x86_get_thread_area and
5920 x86_install_fast_tracepoint_jump_pad.
5921 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
5922 (struct fast_tracepoint_jump): New.
5923 (fast_tracepoint_jump_insn): New.
5924 (fast_tracepoint_jump_shadow): New.
5925 (find_fast_tracepoint_jump_at): New.
5926 (fast_tracepoint_jump_here): New.
5927 (delete_fast_tracepoint_jump): New.
5928 (set_fast_tracepoint_jump): New.
5929 (uninsert_fast_tracepoint_jumps_at): New.
5930 (reinsert_fast_tracepoint_jumps_at): New.
5931 (set_breakpoint_at): Use write_inferior_memory.
5932 (uninsert_raw_breakpoint): Use write_inferior_memory.
5933 (check_mem_read): Mask out fast tracepoint jumps.
5934 (check_mem_write): Mask out fast tracepoint jumps.
5935 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
5936 (set_fast_tracepoint_jump): Declare.
5937 (delete_fast_tracepoint_jump)
5938 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
5939 (reinsert_fast_tracepoint_jumps_at): Declare.
5940 * regcache.c: Don't compile many functions when building the
5941 in-process agent library.
5942 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
5943 the register buffer in the heap.
5944 (free_register_cache): If the register buffer isn't owned by the
5945 regcache, don't free it.
5946 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
5947 pre-existing register caches.
5948 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
5949 type.
5950 (convert_ascii_to_int): : Constify `from' parameter type.
5951 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
5952 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
5953 the needed buffer in-place.
5954 (relocate_instruction): New.
5955 * server.c (handle_query) <qSymbols>: If the target supports
5956 tracepoints, give it a chance of looking up symbols. Report
5957 support for fast tracepoints.
5958 (handle_status): Stabilize threads.
5959 (process_serial_event): Adjust.
5960 * server.h (struct fast_tracepoint_jump): Forward declare.
5961 (struct process_info) <fast_tracepoint_jumps>: New field.
5962 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
5963 (decode_X_packet, decode_M_packet): Adjust.
5964 (relocate_instruction): Declare.
5965 (in_process_agent_loaded): Declare.
5966 (tracepoint_look_up_symbols): Declare.
5967 (struct fast_tpoint_collect_status): Declare.
5968 (fast_tracepoint_collecting): Declare.
5969 (force_unlock_trace_buffer): Declare.
5970 (handle_tracepoint_bkpts): Declare.
5971 (initialize_low_tracepoint)
5972 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
5973 * target.h (struct target_ops) <stabilize_threads,
5974 install_fast_tracepoint_jump_pad>: New fields.
5975 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
5976 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
5977 [HAVE_STDINT_H]: Include stdint.h.
5978 (trace_debug_1): Rename to ...
5979 (trace_vdebug): ... this.
5980 (trace_debug): Rename to ...
5981 (trace_debug_1): ... this. Add `level' parameter.
5982 (trace_debug): New.
5983 (ATTR_USED, ATTR_NOINLINE): New.
5984 (IP_AGENT_EXPORT): New.
5985 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5986 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
5987 (about_to_request_buffer_space, trace_buffer_is_full)
5988 (stopping_tracepoint, expr_eval_result, error_tracepoint)
5989 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
5990 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
5991 (traceframe_write_count, traceframes_created)
5992 (trace_state_variables)
5993 New renaming defines.
5994 (struct ipa_sym_addresses): New.
5995 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
5996 (symbol_list): New.
5997 (ipa_sym_addrs): New.
5998 (all_tracepoint_symbols_looked_up): New.
5999 (in_process_agent_loaded): New.
6000 (write_e_ipa_not_loaded): New.
6001 (maybe_write_ipa_not_loaded): New.
6002 (tracepoint_look_up_symbols): New.
6003 (debug_threads) [IN_PROCESS_AGENT]: New.
6004 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6005 (UNKNOWN_SIDE_EFFECTS): New.
6006 (stop_tracing): New.
6007 (flush_trace_buffer): New.
6008 (stop_tracing_bkpt): New.
6009 (flush_trace_buffer_bkpt): New.
6010 (read_inferior_integer): New.
6011 (read_inferior_uinteger): New.
6012 (read_inferior_data_pointer): New.
6013 (write_inferior_data_pointer): New.
6014 (write_inferior_integer): New.
6015 (write_inferior_uinteger): New.
6016 (struct collect_static_trace_data_action): Delete.
6017 (enum tracepoint_type): New.
6018 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
6019 <actions_str, step_actions, step_actions_str>: Only include in
6020 GDBserver.
fa593d66
PA
6021 <orig_size, obj_addr_on_target, adjusted_insn_addr>
6022 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6023 (tracepoints): Use IP_AGENT_EXPORT.
6024 (last_tracepoint): Don't include in the IPA.
6025 (stopping_tracepoint): Use IP_AGENT_EXPORT.
6026 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6027 (alloced_trace_state_variables): New.
6028 (trace_state_variables): Use IP_AGENT_EXPORT.
6029 (traceframe_t): Delete unused variable.
6030 (circular_trace_buffer): Don't include in the IPA.
6031 (trace_buffer_start): Delete.
6032 (struct trace_buffer_control): New.
6033 (trace_buffer_free): Delete.
6034 (struct ipa_trace_buffer_control): New.
6035 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6036 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6037 New.
6038 (trace_buffer_ctrl): New.
6039 (TRACE_BUFFER_CTRL_CURR): New.
6040 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
6041 Reimplement as macros.
6042 (trace_buffer_wrap): Delete.
6043 (traceframe_write_count, traceframe_read_count)
6044 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
6045 (struct tracepoint_hit_ctx) <type>: New field.
6046 (struct fast_tracepoint_ctx): New.
6047 (memory_barrier): New.
6048 (cmpxchg): New.
6049 (record_tracepoint_error): Update atomically in the IPA.
6050 (clear_inferior_trace_buffer): New.
6051 (about_to_request_buffer_space): New.
6052 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
6053 updating the same buffer.
6054 (add_tracepoint): Default the tracepoint's type to trap
6055 tracepoint, and orig_size to -1.
6056 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
6057 internal variables.
6058 (create_trace_state_variable): New parameter `gdb'. Handle it.
6059 (clear_installed_tracepoints): Clear fast tracepoint jumps.
6060 (cmd_qtdp): Handle fast tracepoints.
6061 (cmd_qtdv): Adjust.
6062 (max_jump_pad_size): New.
6063 (gdb_jump_pad_head): New.
6064 (get_jump_space_head): New.
6065 (claim_jump_space): New.
6066 (sort_tracepoints): New.
6067 (MAX_JUMP_SIZE): New.
6068 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
6069 IPA.
6070 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
6071 support. Upload fast traceframes, and delete internal IPA
6072 breakpoints.
6073 (stop_tracing_handler): New.
6074 (flush_trace_buffer_handler): New.
6075 (cmd_qtstop): Upload fast tracepoints.
6076 (response_tracepoint): Handle fast tracepoints.
6077 (tracepoint_finished_step): Upload fast traceframes. Set the
6078 tracepoint hit context's tracepoint type.
6079 (handle_tracepoint_bkpts): New.
6080 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
6081 type. Add comment about fast tracepoints.
6082 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
6083 non-existing action_str field.
6084 (get_context_regcache): Handle fast tracepoints.
6085 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
6086 to the regcache.
6087 (fast_tracepoint_from_jump_pad_address): New.
6088 (fast_tracepoint_from_ipa_tpoint_address): New.
6089 (collecting_t): New.
6090 (force_unlock_trace_buffer): New.
6091 (fast_tracepoint_collecting): New.
6092 (collecting): New.
6093 (gdb_collect): New.
6094 (write_inferior_data_ptr): New.
6095 (target_tp_heap): New.
6096 (target_malloc): New.
6097 (download_agent_expr): New.
6098 (UALIGN): New.
6099 (download_tracepoints): New.
6100 (download_trace_state_variables): New.
6101 (upload_fast_traceframes): New.
6102 (IPA_FIRST_TRACEFRAME): New.
6103 (IPA_NEXT_TRACEFRAME_1): New.
6104 (IPA_NEXT_TRACEFRAME): New.
6105 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
6106 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
6107 (gdb_jump_pad_buffer_end): New.
6108 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
6109 (initialize_tracepoint): Adjust.
6110 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
6111 buffer. Initialize the low module.
6112 * utils.c (PREFIX, TOOLNAME): New.
6113 (malloc_failure): Use PREFIX.
6114 (error): In the IPA, an error causes an exit.
6115 (fatal, warning): Use PREFIX.
6116 (internal_error): Use TOOLNAME.
6117 (NUMCELLS): Increase to 10.
6118 * configure, config.in: Regenerate.
6119
d149dd1d
PA
61202010-06-01 Pedro Alves <pedro@codesourcery.com>
6121
6122 * server.c (handle_query) <qSupported>: Do two passes over the
6123 qSupported string to avoid nesting strtok.
6124
f6528abd
JK
61252010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6126
6127 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
6128 (CDEPS): New.
6129 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
6130 -Wl,--dynamic-list.
6131 * configure: Regenerate.
6132 * proc-service.list: New.
6133
ca2a87a0
JK
61342010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6135
6136 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
6137 New comment.
6138
363a6e9f
OS
61392010-05-26 Ozkan Sezer <sezeroz@gmail.com>
6140
6141 * gdbreplay.c (remote_open): Check error return from socket() call by
6142 its equality to -1 not by it being negative.
6143 * remote-utils.c (remote_open): Likewise.
6144
d23b6cb1
PA
61452010-05-23 Pedro Alves <pedro@codesourcery.com>
6146
6147 * config.h: Regenerate.
6148
28d3cf85
MK
61492010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6150
6151 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
6152 doesn't provide PTRACE_GET_THREAD_AREA.
6153
fea36a59
MK
61542010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6155
6156 * linux-m68k-low.c: Include <asm/ptrace.h>
6157 (ps_get_thread_area): Implement.
6158
24b066ba
DE
61592010-05-03 Doug Evans <dje@google.com>
6160
6161 * event-loop.c (struct callback_event): New struct.
6162 (callback_list): New global.
6163 (append_callback_event, delete_callback_event): New functions.
6164 (process_callback): New function.
6165 (start_event_loop): Call it.
6166 * remote-utils.c (NOT_SCHEDULED): Define.
6167 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
6168 moved out of readchar.
6169 (readchar): Rewrite. Call reschedule before returning.
6170 (reset_readchar): New function.
6171 (remote_close): Call it.
6172 (process_remaining, reschedule): New functions.
6173 * server.h (callback_handler_func): New typedef.
6174 (append_callback_event, delete_callback_event): Declare.
6175
9836d6ea
PA
61762010-05-03 Pedro Alves <pedro@codesourcery.com>
6177
6178 * proc-service.c (ps_pglobal_lookup): Use
6179 thread_db_look_up_one_symbol.
6180 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6181 parameter. Use it instead of all_symbols_looked_up.
6182 * server.h (struct process_info) <all_symbols_looked_up>: Delete
6183 field.
6184 (all_symbols_looked_up): Don't declare.
6185 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6186 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6187 field.
6188 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6189 Set all_symbols_looked_up here.
6190 (thread_db_look_up_one_symbol): New.
6191 (thread_db_get_tls_address): Adjust.
6192 (thread_db_load_search, try_thread_db_load_1): Always allocate the
6193 thread_db object on the heap, and tentatively set it in the
6194 process structure.
6195 (thread_db_init): Don't set all_symbols_looked_up here.
6196 * linux-low.h (thread_db_look_up_one_symbol): Declare.
6197
7984d532
PA
61982010-05-03 Pedro Alves <pedro@codesourcery.com>
6199
6200 * linux-low.c (linux_kill, linux_detach): Adjust.
6201 (status_pending_p_callback): Remove redundant statement. Check
6202 for !TARGET_WAITIKIND_IGNORE, instead of
6203 TARGET_WAITKIND_STOPPED.
6204 (handle_tracepoints): Make sure LWP is locked. Adjust.
6205 (linux_wait_for_event_1): Adjust.
6206 (linux_cancel_breakpoints): New.
6207 (unsuspend_one_lwp): New.
6208 (unsuspend_all_lwps): New.
6209 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
6210 (send_sigstop_callback): Change return type to int, add new
6211 `except' parameter and handle it.
6212 (suspend_and_send_sigstop_callback): New.
6213 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6214 pass them down. If SUSPEND, also increment the lwp's suspend
6215 count.
6216 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6217 (need_step_over_p): Don't consider suspended LWPs.
6218 (start_step_over): Adjust.
6219 (proceed_one_lwp): Change return type to int, add new `except'
6220 parameter and handle it.
6221 (unsuspend_and_proceed_one_lwp): New.
6222 (proceed_all_lwps): Use find_inferior instead of
6223 for_each_inferior.
6224 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6225 also decrement the suspend count of LWPs. Pass `except' down,
6226 instead of hacking its suspend count.
6227 (linux_pause_all): Add `freeze' parameter. Adjust.
6228 (linux_unpause_all): New.
6229 (linux_target_ops): Install linux_unpause_all.
6230 * server.c (handle_status): Adjust.
6231 * target.h (struct target_ops): New fields `unpause_all' and
6232 `cancel_breakpoints'. Add new parameter to `pause_all'.
6233 (pause_all): Add new `freeze' parameter.
6234 (unpause_all): New.
6235 (cancel_breakpoints): New.
6236 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6237 cancel breakpoints.
6238 (cmd_qtstart): Pause threads.
6239 (stop_tracing): Pause threads, and cancel breakpoints.
6240 * win32-low.c (win32_target_ops): Adjust.
6241
e471f25b
PA
62422010-05-03 Pedro Alves <pedro@codesourcery.com>
6243
6244 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6245 the inferior right away from here...
6246 (linux_wait_1): ... to here, and adjust to check the thread's
6247 last_resume_kind instead of the lwp's step or stop_expected flags.
6248
1915ef4f
PA
62492010-05-02 Pedro Alves <pedro@codesourcery.com>
6250
6251 * README: Use consistent `GDB' and `GDBserver' spellings.
6252
f9e39928
PA
62532010-05-02 Pedro Alves <pedro@codesourcery.com>
6254
6255 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6256 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
6257 (linux_detach_one_lwp): Assume the lwp is stopped.
6258 (any_thread_of): Delete.
6259 (linux_detach): Stop all lwps here. Don't blindly delete all
6260 breakpoints.
6261 (delete_lwp_callback): New.
6262 (linux_mourn): Delete all lwps of the process that is gone.
6263 (linux_wait_1): Don't delete the last lwp of the process here.
6264 * mem-break.h (mark_breakpoints_out): Declare.
6265 * mem-break.c (mark_breakpoints_out): New.
6266 (free_all_breakpoints): Use it.
6267 * server.c (handle_target_event): If the process is gone, mark
6268 breakpoints out.
6269 * thread-db.c (struct thread_db) <create_bp>: New field.
6270 (thread_db_enable_reporting): Fix prototype. Store a thread event
6271 breakpoint reference in the thread_db struct.
6272 (thread_db_load_search): Clear the thread_db object.
6273 (try_thread_db_load_1): Ditto.
6274 (switch_to_process): New.
6275 (disable_thread_event_reporting): Use it.
6276 (remove_thread_event_breakpoints): New.
6277 (thread_db_detach, thread_db_mourn): Use it.
6278
1e7fc18c
PA
62792010-05-01 Pedro Alves <pedro@codesourcery.com>
6280
6281 * linux-low.c (linux_enable_event_reporting): New.
6282 (linux_wait_for_event_1, handle_extended_wait): Use it.
6283
02fc4de7
PA
62842010-04-30 Pedro Alves <pedro@codesourcery.com>
6285
6286 * linux-low.c (linux_kill_one_lwp, linux_kill)
6287 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
6288 (send_sigstop): Take an lwp_info as parameter instead. Queue a
6289 SIGSTOP even if the LWP is stopped.
6290 (send_sigstop_callback): New.
6291 (stop_all_lwps): Use send_sigstop_callback instead.
6292 (linux_resume_one_thread): Adjust.
6293 (proceed_one_lwp): Still proceed an LWP that the client has
6294 requested to stop, if we haven't reported it as stopped yet. Make
6295 sure that LWPs the client want stopped, have a pending SIGSTOP.
6296
bc3b5632
DE
62972010-04-26 Doug Evans <dje@google.com>
6298
ae1ada35
DE
6299 * server.c (handle_general_set): Make static.
6300
bc3b5632
DE
6301 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
6302 Print received char after testing for error/eof instead of before.
6303 (input_interrupt): Tweak comment.
6304
65730243
DE
63052010-04-23 Doug Evans <dje@google.com>
6306
6307 * server.c (start_inferior): Print inferior argv if --debug.
6308
a8ae7dc0
AR
63092010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
6310
6311 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
6312 * nto-x86-low.c: Include server.h
6313
1c07cc19
PM
63142010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
6315
6316 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
6317 be consistent with other sources of this directory.
6318 (init_registers_amd64): Correct name of source file of this function
6319 in the comment.
6320
e0a61e09
PM
63212010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6322
6323 * configure.srv (x86_64-*-mingw*): New configuration for Windows
6324 64-bit executables.
6325
54709339
PM
63262010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6327
6328 * win32-i386-low.c: Add 64-bit support.
6329 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
6330 (init_registers_amd64): Declare.
6331 (mappings): Add 64-bit version of array.
6332 (init_windows_x86): New function.
6333 (the_low_target): Change init_arch field to init_windows_x86.
6334
e8f0053d
PM
63352010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6336
6337 * win32-low.c: Adapt to support also 64-bit architecture.
6338 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
6339 (get_image_name): Use SIZE_T type for local variable `done'.
6340 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
6341 (toolhelp_get_dll_name): Idem.
6342 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
6343 Use uintptr_t typecast to avoid warning.
6344 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
6345 (handle_exception): Use phex_nz to avoid warning.
6346 (win32_wait): Remove unused local variable `process'.
6347
c481e77e
PM
63482010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6349
6350 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
6351 `amd64-avx.o'.
6352
12ea4b69
PM
63532010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
6354
6355 * configure.ac: Use `ws2_32' library for srv_mingw.
6356 * configure: Regenerate.
6357 * gdbreplay.c: Include winsock2.h instead of winsock.h.
6358 * remote-utils.c: Likewise.
6359
f6d1620c
L
63602010-04-17 H.J. Lu <hongjiu.lu@intel.com>
6361
6362 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
6363 if __x86_64__ is defined.
6364
8e642873
PM
63652010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6366
6367 * configure: Regenerate.
6368
711e434b
PM
63692010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6370
6371 * server.c (handle_query): Handle 'qGetTIBAddr' query.
6372 * target.h (target_ops): New get_tib_address field.
6373 * win32-low.h (win32_thread_info): Add thread_local_base field.
6374 * win32-low.c (child_add_thread): Add tlb argument.
6375 Set thread_local_base field to TLB.
6376 (get_child_debug_event): Adapt to child_add_thread change.
6377 (win32_get_tib_address): New function.
6378 (win32_target_ops): Set get_tib_address field to
6379 win32_get_tib_address.
6380 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
6381
505106cd
PA
63822010-04-12 Pedro Alves <pedro@codesourcery.com>
6383
505106cd
PA
6384 * linux-low.c (linux_mourn): Also remove the process.
6385 * server.c (handle_target_event): Don't remove the process here.
6386 * nto-low.c (nto_mourn): New.
6387 (nto_target_ops): Install it.
6388 * spu-low.c (spu_mourn): New.
6389 (spu_target_ops): Install it.
6390 * win32-low.c (win32_mourn): New.
6391 (win32_target_ops): Install it.
6392
e8470a06
PA
63932010-04-12 Pedro Alves <pedro@codesourcery.com>
6394
6395 * server.h (buffer_xml_printf): Remove redundant `;'.
6396
45ba0d02
PA
63972010-04-12 Pedro Alves <pedro@codesourcery.com>
6398
6399 * regcache.c (set_register_cache): Invalidate regcaches before
6400 changing the register cache layout.
6401 (regcache_invalidate_one): Allow a NULL regcache.
6402 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
6403 regcaches before changing the register cache layout or the target
6404 regsets.
6405
59e04013
L
64062010-04-12 H.J. Lu <hongjiu.lu@intel.com>
6407
6408 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
6409 variable warning on Linux/x86-64.
6410
8336d594
PA
64112010-04-11 Pedro Alves <pedro@codesourcery.com>
6412
6413 GDBserver disconnected tracing support.
6414
6415 * linux-low.c (linux_remove_process): Delete.
6416 (add_lwp): Don't set last_resume_kind here.
6417 (linux_kill): Use `mourn'.
6418 (linux_detach): Use `thread_db_detach', and `mourn'.
6419 (linux_mourn): New.
6420 (linux_attach_lwp_1): Adjust comment.
6421 (linux_attach): last_resume_kind moved the thread_info; adjust.
6422 (status_pending_p_callback): Adjust.
6423 (linux_wait_for_event_1): Adjust.
6424 (count_events_callback, select_singlestep_lwp_callback)
6425 (select_event_lwp_callback, cancel_breakpoints_callback)
6426 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
6427 (proceed_one_lwp): Adjust.
6428 (linux_async): Add debug output.
6429 (linux_thread_stopped): New.
6430 (linux_pause_all): New.
6431 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
6432 linux_pause_all.
6433 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
6434 (thread_db_free): Delete declaration.
6435 (thread_db_detach, thread_db_mourn): Declare.
6436 * thread-db.c (thread_db_init): Use thread_db_mourn.
6437 (thread_db_free): Delete, split in two.
6438 (disable_thread_event_reporting): New.
6439 (thread_db_detach): New.
6440 (thread_db_mourn): New.
6441
6442 * server.h (struct thread_info) <last_resume_kind>: New field.
6443 <attached>: Add comment.
6444 <gdb_detached>: New field.
6445 (handler_func): Change return type to int.
6446 (handle_serial_event, handle_target_event): Ditto.
6447 (gdb_connected): Declare.
6448 (tracing): Delete.
6449 (disconnected_tracing): Declare.
6450 (stop_tracing): Declare.
6451
6452 * server.c (handle_query) <qSupported>: Report support for
6453 disconnected tracing.
6454 (queue_stop_reply_callback): Account for running threads.
6455 (gdb_wants_thread_stopped): New.
6456 (gdb_wants_all_threads_stopped): New.
6457 (gdb_reattached_process): New.
6458 (handle_status): Clear the `gdb_detached' flag of all processes.
6459 In all-stop, stop all threads.
6460 (main): Be sure to leave tfind mode. Handle disconnected tracing.
6461 (process_serial_event): If the remote connection breaks, or if an
6462 exit was forced with "monitor exit", force an event loop exit.
6463 Handle disconnected tracing on detach.
6464 (handle_serial_event): Adjust.
6465 (handle_target_event): If GDB isn't connected, forward events back
6466 to the inferior, unless the last process exited, in which case,
6467 exit gdbserver. Adjust interface.
6468
6469 * remote-utils.c (remote_open): Don't block in accept. Instead
6470 register an event loop source on the listen socket file
6471 descriptor. Refactor bits into ...
6472 (listen_desc): ... this new global.
6473 (gdb_connected): ... this new function.
6474 (enable_async_notification): ... this new function.
6475 (handle_accept_event): ... this new function.
6476 (remote_close): Clear remote_desc.
6477
6478 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
6479
6480 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
6481 New fields.
6482 (mourn_inferior): Define.
6483 (target_process_qsupported): Avoid the dangling else problem.
6484 (thread_stopped): Define.
6485 (pause_all): Define.
6486 (target_waitstatus_to_string): Declare.
6487 * target.c (target_waitstatus_to_string): New.
6488
6489 * tracepoint.c (tracing): Make extern.
6490 (disconnected_tracing): New.
6491 (stop_tracing): Make extern. Handle tracing stops due to GDB
6492 disconnecting.
6493 (cmd_qtdisconnected): New.
6494 (cmd_qtstatus): Report disconnected tracing status in trace reply.
6495 (handle_tracepoint_general_set): Handle QTDisconnected.
6496
6497 * event-loop.c (event_handler_func): Change return type to int.
6498 (process_event): Bail out if the event handler wants the event
6499 loop to stop.
6500 (handle_file_event): Ditto.
6501 (start_event_loop): Bail out if the event handler wants the event
6502 loop to stop.
6503
6504 * nto-low.c (nto_target_ops): Adjust.
6505 * spu-low.c (spu_wait): Don't remove the process here.
6506 (spu_target_ops): Adjust.
6507 * win32-low.c (win32_wait): Don't remove the process here.
6508 (win32_target_ops): Adjust.
6509
5d267c4c
PA
65102010-04-11 Pedro Alves <pedro@codesourcery.com>
6511
6512 * regcache.c (realloc_register_cache): Invalidate inferior's
6513 regcache before recreating it.
6514
623ccd72
PA
65152010-04-09 Pedro Alves <pedro@codesourcery.com>
6516
6517 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
6518
219f2f23
PA
65192010-04-09 Stan Shebs <stan@codesourcery.com>
6520 Pedro Alves <pedro@codesourcery.com>
6521
6522 * server.h (LONGEST): New.
6523 (struct thread_info) <while_stepping>: New field.
6524 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
6525 Declare.
6526 (initialize_tracepoint, handle_tracepoint_general_set)
6527 (handle_tracepoint_query, tracepoint_finished_step)
6528 (tracepoint_was_hit, release_while_stepping_state_list):
6529 (current_traceframe): Declare.
6530 * server.c (handle_general_set): Handle tracepoint packets.
6531 (read_memory): New.
6532 (write_memory): New.
6533 (handle_search_memory_1): Use read_memory.
6534 (handle_query): Report support for conditional tracepoints, trace
6535 state variables, and tracepoint sources. Handle tracepoint
6536 queries.
6537 (main): Initialize the tracepoints module.
6538 (process_serial_event): Handle traceframe reads/writes.
6539
6540 * linux-low.c (handle_tracepoints): New.
6541 (linux_wait_1): Call it.
6542 (linux_resume_one_lwp): Handle while-stepping.
6543 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
6544 (linux_target_ops): Install them.
6545 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
6546 New field.
6547 * linux-x86-low.c (x86_supports_tracepoints): New.
6548 (the_low_target). Install it.
6549
6550 * mem-break.h (delete_breakpoint): Declare.
6551 * mem-break.c (delete_breakpoint): Make external.
6552
6553 * target.h (struct target_ops): Add `supports_tracepoints',
6554 `read_pc', and `write_pc' fields.
6555 (target_supports_tracepoints): Define.
6556 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
6557 (phex_nz): New.
6558
6559 * regcache.h (struct regcache) <registers_owned>: New field.
6560 (init_register_cache, regcache_cpy): Declare.
6561 (regcache_read_pc, regcache_write_pc): Declare.
6562 (register_cache_size): Declare.
6563 (supply_regblock): Declare.
6564 * regcache.c (init_register_cache): New.
6565 (new_register_cache): Use it.
6566 (regcache_cpy): New.
6567 (register_cache_size): New.
6568 (supply_regblock): New.
6569 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 6570
219f2f23
PA
6571 * tracepoint.c: New.
6572
6573 * Makefile.in (OBS): Add tracepoint.o.
6574 (tracepoint.o): New rule.
6575
3a13a53b
L
65762010-04-08 H.J. Lu <hongjiu.lu@intel.com>
6577
6578 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
6579 (i386-mmx.o): New.
6580 (i386-mmx.c): Likewise.
6581 (i386-mmx-linux.o): Likewise.
6582 (i386-mmx-linux.c): Likewise.
6583
6584 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
6585 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
6586 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
6587 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
6588
6589 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
6590 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
6591 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
6592
1570b33e
L
65932010-04-07 H.J. Lu <hongjiu.lu@intel.com>
6594
6595 * Makefile.in (clean): Updated.
6596 (i386-avx.o): New.
6597 (i386-avx.c): Likewise.
6598 (i386-avx-linux.o): Likewise.
6599 (i386-avx-linux.c): Likewise.
6600 (amd64-avx.o): Likewise.
6601 (amd64-avx.c): Likewise.
6602 (amd64-avx-linux.o): Likewise.
6603 (amd64-avx-linux.c): Likewise.
6604
6605 * configure.srv (srv_i386_regobj): Add i386-avx.o.
6606 (srv_i386_linux_regobj): Add i386-avx-linux.o.
6607 (srv_amd64_regobj): Add amd64-avx.o.
6608 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
6609 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
6610 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
6611 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
6612 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
6613 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
6614 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
6615
6616 * i387-fp.c: Include "i386-xstate.h".
6617 (i387_xsave): New.
6618 (i387_cache_to_xsave): Likewise.
6619 (i387_xsave_to_cache): Likewise.
6620 (x86_xcr0): Likewise.
6621
6622 * i387-fp.h (i387_cache_to_xsave): Likewise.
6623 (i387_xsave_to_cache): Likewise.
6624 (x86_xcr0): Likewise.
6625
6626 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
6627 * linux-crisv32-low.c (target_regsets): Likewise.
6628 * linux-m68k-low.c (target_regsets): Likewise.
6629 * linux-mips-low.c (target_regsets): Likewise.
6630 * linux-ppc-low.c (target_regsets): Likewise.
6631 * linux-s390-low.c (target_regsets): Likewise.
6632 * linux-sh-low.c (target_regsets): Likewise.
6633 * linux-sparc-low.c (target_regsets): Likewise.
6634 * linux-xtensa-low.c (target_regsets): Likewise.
6635
6636 * linux-low.c: Include <sys/uio.h>.
6637 (regsets_fetch_inferior_registers): Support nt_type.
6638 (regsets_store_inferior_registers): Likewise.
6639 (linux_process_qsupported): New.
6640 (linux_target_ops): Add linux_process_qsupported.
6641
6642 * linux-low.h (regset_info): Add nt_type.
6643 (linux_target_ops): Add process_qsupported.
6644
6645 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
6646 and <sys/uio.h>.
6647 (init_registers_i386_avx_linux): New.
6648 (init_registers_amd64_avx_linux): Likewise.
6649 (xmltarget_i386_linux_no_xml): Likewise.
6650 (xmltarget_amd64_linux_no_xml): Likewise.
6651 (PTRACE_GETREGSET): Likewise.
6652 (PTRACE_SETREGSET): Likewise.
6653 (x86_fill_xstateregset): Likewise.
6654 (x86_store_xstateregset): Likewise.
6655 (use_xml): Likewise.
6656 (x86_linux_update_xmltarget): Likewise.
6657 (x86_linux_process_qsupported): Likewise.
6658 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
6659 (x86_arch_setup): Don't call init_registers_amd64_linux nor
6660 init_registers_i386_linux here. Call
6661 x86_linux_update_xmltarget.
6662 (the_low_target): Add x86_linux_process_qsupported.
6663
6664 * server.c (handle_query): Call target_process_qsupported.
6665
6666 * target.h (target_ops): Add process_qsupported.
6667 (target_process_qsupported): New.
6668
fc7238bb
PA
66692010-04-03 Pedro Alves <pedro@codesourcery.com>
6670
6671 * inferiors.c (add_thread): Set last_status kind to
6672 TARGET_WAITKIND_IGNORE.
6673 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
6674 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
6675 (linux_wait_1): Move `thread' local definition to block that uses
6676 it. Don't NULL initialize `event_child'.
6677 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
6678 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
6679 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
6680
bdabb078
PA
66812010-04-01 Pedro Alves <pedro@codesourcery.com>
6682
6683 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
6684 an extended waitstatus, or by a watchpoint.
6685 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
6686 thread was stepping or has been stopped by a watchpoint.
6687
d3bbe7a0
PA
66882010-04-01 Pedro Alves <pedro@codesourcery.com>
6689
6690 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
6691 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
6692 of another, then delete the previous, and validate all
6693 breakpoints.
6694 (validate_inserted_breakpoint): New.
6695 (delete_disabled_breakpoints): New.
6696 (validate_breakpoints): New.
6697 (check_mem_read): Validate breakpoints before trusting their
6698 shadow. Delete disabled breakpoints.
6699 (check_mem_write): Validate breakpoints before trusting they
6700 should be inserted. Delete disabled breakpoints.
6701 * mem-break.h (validate_breakpoints):
6702 * server.c (handle_query): Validate breakpoints when we see a
6703 qSymbol query.
6704
8b07ae33
PA
67052010-04-01 Pedro Alves <pedro@codesourcery.com>
6706
6707 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
6708 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
6709 if we could tell there's a GDB breakpoint at stop_pc.
6710 (need_step_over_p): Don't do a step over if we find a GDB
6711 breakpoint at the resume PC.
6712
6713 * mem-break.c (struct raw_breakpoint): New.
6714 (enum bkpt_type): New type `gdb_breakpoint'.
6715 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
6716 fields. New field `raw'.
6717 (find_raw_breakpoint_at): New.
6718 (set_raw_breakpoint_at): Handle refcounting. Create a raw
6719 breakpoint instead.
6720 (set_breakpoint_at): Adjust.
6721 (delete_raw_breakpoint): New.
6722 (release_breakpoint): New.
6723 (delete_breakpoint): Rename to...
6724 (delete_breakpoint_1): ... this. Add proc parameter. Use
6725 release_breakpoint. Return ENOENT.
6726 (delete_breakpoint): Reimplement.
6727 (find_breakpoint_at): Delete.
6728 (find_gdb_breakpoint_at): New.
6729 (delete_breakpoint_at): Delete.
6730 (set_gdb_breakpoint_at): New.
6731 (delete_gdb_breakpoint_at): New.
6732 (gdb_breakpoint_here): New.
6733 (set_reinsert_breakpoint): Use release_breakpoint.
6734 (uninsert_breakpoint): Rename to ...
6735 (uninsert_raw_breakpoint): ... this.
6736 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
6737 (reinsert_raw_breakpoint): Change parameter type to
6738 raw_breakpoint.
6739 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
6740 instead.
6741 (check_breakpoints): Adjust. Use release_breakpoint.
6742 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
6743 (breakpoint_inserted_here): Ditto.
6744 (check_mem_read): Adjust to iterate over raw breakpoints instead.
6745 Don't trust the breakpoint's shadow if it is not inserted.
6746 (check_mem_write): Adjust to iterate over raw breakpoints instead.
6747 (delete_all_breakpoints): Adjust.
6748 (free_all_breakpoints): Mark all breakpoints as uninserted, and
6749 use delete_breakpoint_1.
6750
6751 * mem-break.h (breakpoints_supported): Delete declaration.
6752 (set_gdb_breakpoint_at): Declare.
6753 (gdb_breakpoint_here): Declare.
6754 (delete_breakpoint_at): Delete.
6755 (delete_gdb_breakpoint_at): Declare.
6756
6757 * server.h (struct raw_breakpoint): Forward declare.
6758 (struct process_info): New field `raw_breakpoints'.
6759
6760 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
6761 breakpoints.
6762
6bf5e0ba
PA
67632010-03-24 Pedro Alves <pedro@codesourcery.com>
6764
6765 * linux-low.c (status_pending_p_callback): Fix comment.
6766 (linux_wait_for_event_1): Move most of the internal breakpoint
6767 handling from here...
6768 (linux_wait_1): ... to here.
6769 (count_events_callback): New.
6770 (select_singlestep_lwp_callback): New.
6771 (select_event_lwp_callback): New.
6772 (cancel_breakpoints_callback): New.
6773 (select_event_lwp): New.
6774 (linux_wait_1): Simplify internal breakpoint handling. Give equal
6775 priority to all LWPs that have had events that should be reported
6776 to the client. Cancel breakpoints when about to reporting the
6777 event to the client, not while stopping lwps. No longer cancel
6778 finished single-steps here.
6779 (cancel_finished_single_step): Delete.
6780 (cancel_finished_single_steps): Delete.
6781
414a389f
PA
67822010-03-24 Pedro Alves <pedro@codesourcery.com>
6783
6784 * mem-break.c (enum bkpt_type): New.
6785 (struct breakpoint): New field `type'.
6786 (set_breakpoint_at): Change return type to struct breakpoint
6787 pointer. Set type to `other_breakpoint' by default.
6788 (delete_breakpoint): Rewrite, supporting more than one breakpoint
6789 in the breakpoint list.
6790 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
6791 (reinsert_breakpoint): Rename to ...
6792 (reinsert_raw_breakpoint): ... this.
6793 (reinsert_breakpoints_at): Adjust.
6794 * mem-break.h (struct breakpoint): Declare.
6795 (set_breakpoint_at): Change return type to struct breakpoint
6796 pointer.
6797
2280c721
PA
67982010-03-24 Pedro Alves <pedro@codesourcery.com>
6799
6800 * server.c (handle_query): Assign, not compare.
6801
d50171e4
PA
68022010-03-24 Pedro Alves <pedro@codesourcery.com>
6803
6804 Teach linux gdbserver to step-over-breakpoints.
6805
6806 * linux-low.c (can_hardware_single_step): New.
6807 (supports_breakpoints): New.
6808 (handle_extended_wait): If stopping threads, read the stop pc of
6809 the new cloned LWP.
6810 (get_pc): New.
6811 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
6812 low target doesn't support retrieving the PC.
6813 (add_lwp): Set last_resume_kind to resume_continue.
6814 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
6815 (linux_attach): Don't clear stop_expected. Set the lwp's
6816 last_resume_kind to resume_stop.
6817 (linux_detach_one_lwp): Don't check for removed breakpoints.
6818 (check_removed_breakpoint): Delete.
6819 (status_pending_p): Rename to ...
6820 (status_pending_p_callback): ... this. Don't check for removed
6821 breakpoints. Don't consider threads that are stopped from GDB's
6822 perspective.
6823 (linux_wait_for_lwp): Always read the stop_pc here.
6824 (cancel_breakpoint): New.
6825 (step_over_bkpt): New global.
6826 (linux_wait_for_event_1): Implement stepping over breakpoints.
6827 (gdb_wants_lwp_stopped): New.
6828 (gdb_wants_all_stopped): New.
6829 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
6830 single-step traps here. Store the thread's last reported target
6831 wait status.
6832 (send_sigstop): Don't clear stop_expected. Always set it,
6833 instead.
6834 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
6835 (cancel_finished_single_step): New.
6836 (cancel_finished_single_steps): New.
6837 (wait_for_sigstop): Don't cancel finished single-step traps here.
6838 (linux_resume_one_lwp): Don't check for removed breakpoints.
6839 Don't set `step' on non-hardware step archs.
6840 (linux_set_resume_request): Ignore resume_stop requests if already
6841 stopping or stopped. Set the lwp's last_resume_kind.
6842 (resume_status_pending_p): Don't check for removed breakpoints.
6843 (need_step_over_p): New.
6844 (start_step_over): New.
6845 (finish_step_over): New.
6846 (linux_resume_one_thread): Always queue a sigstop for resume_stop
6847 requests. Clear the thread's last reported target waitstatus.
6848 Don't use the `suspended' flag. Don't consider pending breakpoints.
6849 (linux_resume): Start a step-over if necessary.
6850 (proceed_one_lwp): New.
6851 (proceed_all_lwps): New.
6852 (unstop_all_lwps): New.
6853 * linux-low.h (struct lwp_info): Rewrite comment for the
6854 `suspended' flag. Add the `stop_pc' field. Delete the
6855 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
6856 Add `'last_resume_kind' and `need_step_over' fields.
6857 * inferiors.c (struct thread_info): Delete, moved elsewhere.
6858 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
6859 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
6860 (set_raw_breakpoint_at): New.
6861 (set_breakpoint_at): Rewrite to use it.
6862 (reinsert_breakpoint_handler): Delete.
6863 (set_reinsert_breakpoint): New.
6864 (reinsert_breakpoint_by_bp): Delete.
6865 (delete_reinsert_breakpoints): New.
6866 (uninsert_breakpoint): Rewrite.
6867 (uninsert_breakpoints_at): New.
6868 (reinsert_breakpoint): Rewrite.
6869 (reinsert_breakpoints_at): New.
6870 (check_breakpoints): Rewrite.
6871 (breakpoint_here): New.
6872 (breakpoint_inserted_here): New.
6873 (check_mem_read): Adjust.
6874 * mem-break.h (breakpoints_supported, breakpoint_here)
6875 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
6876 (reinsert_breakpoint_by_bp): Delete declaration.
6877 (delete_reinsert_breakpoints): Declare.
6878 (reinsert_breakpoint): Delete declaration.
6879 (reinsert_breakpoints_at): Declare.
6880 (uninsert_breakpoint): Delete declaration.
6881 (uninsert_breakpoints_at): Declare.
6882 (check_breakpoints): Adjust prototype.
6883 * server.h: Adjust include order.
6884 (struct thread_info): Declare here. Add a `last_status' field.
6885
30ba68cb
MS
68862010-03-23 Michael Snyder <msnyder@vmware.com>
6887
6888 * server.c (crc32): New function.
6889 (handle_query): Add handling for 'qCRC:' request.
6890
b9a881c2
PA
68912010-03-23 Pedro Alves <pedro@codesourcery.com>
6892
6893 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
6894 lwp had been stopped by a watchpoint.
6895
e92d13d5
PA
68962010-03-16 Pedro Alves <pedro@codesourcery.com>
6897
6898 * server.h (internal_error): Declare.
6899 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
6900 * utils.c (internal_error): New function.
6901
64daa791
AS
69022010-03-15 Andreas Schwab <schwab@redhat.com>
6903
6904 * configure.srv: Fix typo setting srv_regobj.
6905
f52cd8cd
PA
69062010-03-15 Pedro Alves <pedro@codesourcery.com>
6907
6908 * linux-low.c (fetch_register): Avoid passing a non string literal
6909 format to `error'.
6910 (usr_store_inferior_registers): Ditto.
6911
93ae6fdc
PA
69122010-03-14 Pedro Alves <pedro@codesourcery.com>
6913
6914 * linux-low.c (linux_write_memory): Bail out early if peeking
6915 memory failed.
6916
c3adc08c
PA
69172010-03-14 Pedro Alves <pedro@codesourcery.com>
6918
6919 * linux-low.h (struct lwp_info): New fields
6920 `stopped_by_watchpoint' and `stopped_data_address'.
6921 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
6922 here, and cache them in the lwp object.
6923 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
6924 directly.
6925 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
6926 field.
6927 (linux_stopped_by_watchpoint): Rewrite.
6928 (linux_stopped_data_address): Rewrite.
6929
bce522a2
PA
69302010-03-06 Simo Melenius <simo.melenius@iki.fi>
6931
6932 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
6933 switching the current inferior, not before.
6934
90884b2b
L
69352010-03-01 H.J. Lu <hongjiu.lu@intel.com>
6936
6937 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
6938 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
6939 i386-linux.c and amd64-linux.c.
6940 (reg-i386.o): Removed.
6941 (reg-i386.c): Likewise.
6942 (reg-i386-linux.o): Likewise.
6943 (reg-i386-linux.c): Likewise.
6944 (reg-x86-64.o): Likewise.
6945 (reg-x86-64.c): Likewise.
6946 (reg-x86-64-linux.o): Likewise.
6947 (reg-x86-64-linux.c): Likewise.
6948 (i386.o): New.
6949 (i386.c): Likewise.
6950 (i386-linux.o): Likewise.
6951 (i386-linux.c): Likewise.
6952 (amd64.o): Likewise.
6953 (amd64.c): Likewise.
6954 (amd64-linux.o): Likewise.
6955 (amd64-linux.c): Likewise.
6956
6957 * configure.srv (srv_i386_regobj): New.
6958 (srv_i386_linux_regobj): Likewise.
6959 (srv_amd64_regobj): Likewise.
6960 (srv_amd64_linux_regobj): Likewise.
6961 (srv_i386_32bit_xmlfiles): Likewise.
6962 (srv_i386_64bit_xmlfiles): Likewise.
6963 (srv_i386_xmlfiles): Likewise.
6964 (srv_amd64_xmlfiles): Likewise.
6965 (srv_i386_linux_xmlfiles): Likewise.
6966 (srv_amd64_linux_xmlfiles): Likewise.
6967 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
6968 srv_xmlfiles to $srv_i386_xmlfiles.
6969 (i[34567]86-*-mingw32ce*): Likewise.
6970 (i[34567]86-*-mingw*): Likewise.
6971 (i[34567]86-*-nto*): Likewise.
6972 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
6973 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
6974 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
6975 (x86_64-*-linux*): Likewise.
6976
6977 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
6978 (init_registers_amd64_linux): New.
6979 (x86_arch_setup): Replace init_registers_x86_64_linux with
6980 init_registers_amd64_linux.
6981
193f13e6
MK
69822010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
6983
6984 * configure.ac: Check for libdl. If it is not available link against
6985 static libthread_db.
6986 * configure: Regenerate.
6987
85d721b8
PA
69882010-02-22 Pedro Alves <pedro@codesourcery.com>
6989
6990 PR9605
6991
6992 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
6993 handing a read watchpoint.
6994 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
6995
6076632b
DE
69962010-02-12 Doug Evans <dje@google.com>
6997
6998 * linux-low.c (linux_supports_tracefork_flag): Document.
6999 (linux_look_up_symbols): Add comment.
7000
3327ccf7
L
70012010-02-03 H.J. Lu <hongjiu.lu@intel.com>
7002
7003 * regcache.c (supply_register): Clear regcache if buf is NULL.
7004
0718675c 70052010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 7006 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
7007
7008 * inferiors.c (find_inferior): Add function documentation.
7009 (unloaded_dll): Handle the case where the unloaded dll has not
7010 been previously registered in the dll list.
7011
177321bd
DJ
70122010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7013
7014 * linux-arm-low.c (thumb_breakpoint_len): Delete.
7015 (thumb2_breakpoint): New.
7016 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7017
2b009048
DJ
70182010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7019
7020 * linux-low.c (get_stop_pc): Check for SIGTRAP.
7021 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7022 breakpoints.
7023
3be029c7
PA
70242010-01-21 Pedro Alves <pedro@codesourcery.com>
7025
7026 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7027
18f5de3b
JK
70282010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7029
7030 * linux-s390-low.c (s390_collect_ptrace_register)
7031 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7032
3743bb4f
DE
70332010-01-21 Doug Evans <dje@google.com>
7034
14ce3065
DE
7035 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7036 (PTRACE_ARG4_TYPE): New macro.
7037 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7038 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
7039 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
7040 (usr_store_inferior_registers): Ditto.
7041 (linux_read_memory, linux_write_memory): Ditto.
7042 (linux_test_for_tracefork): Ditto.
7043
3743bb4f
DE
7044 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
7045 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
7046
8b315be5
PA
70472010-01-21 Pedro Alves <pedro@codesourcery.com>
7048
7049 * proc-service.c (ps_lgetregs): Don't refetch registers from the
7050 target.
7051
85492558
PA
70522010-01-21 Pedro Alves <pedro@codesourcery.com>
7053
7054 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
7055 prototype to take a regcache. Adjust.
7056
442ea881
PA
70572010-01-20 Pedro Alves <pedro@codesourcery.com>
7058
7059 * regcache.h (struct thread_info): Forward declare.
7060 (struct regcache): New.
7061 (new_register_cache): Adjust prototype.
7062 (get_thread_regcache): Declare.
7063 (free_register_cache): Adjust prototype.
7064 (registers_to_string, registers_from_string): Ditto.
7065 (supply_register, supply_register_by_name, collect_register)
7066 (collect_register_as_string, collect_register_by_name): Ditto.
7067 * regcache.c (struct inferior_regcache_data): Delete.
7068 (get_regcache): Rename to ...
7069 (get_thread_regcache): ... this. Adjust. Switch inferior before
7070 fetching registers.
7071 (regcache_invalidate_one): Adjust.
7072 (regcache_invalidate): Fix prototype.
7073 (new_register_cache): Return the new register cache.
7074 (free_register_cache): Change prototype.
7075 (realloc_register_cache): Adjust.
7076 (registers_to_string): Change prototype to take a regcache. Adjust.
7077 (registers_from_string): Ditto.
7078 (register_data): Ditto.
7079 (supply_register): Ditto.
7080 (supply_register_by_name): Ditto.
7081 (collect_register): Ditto.
7082 (collect_register_as_string): Ditto.
7083 (collect_register_by_name): Ditto.
7084 * server.c (process_serial_event): Adjust.
7085 * linux-low.h (regset_fill_func, regset_store_func): Change
7086 prototype.
7087 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
7088 Change prototype.
7089 * linux-low.c (get_stop_pc): Adjust.
7090 (check_removed_breakpoint): Adjust.
7091 (linux_wait_for_event): Adjust.
7092 (linux_resume_one_lwp): Adjust.
7093 (fetch_register): Add regcache parameter. Adjust.
7094 (usr_store_inferior_registers): Ditto.
7095 (regsets_fetch_inferior_registers): Ditto.
7096 (regsets_store_inferior_registers): Ditto.
7097 (linux_fetch_registers, linux_store_registers): Ditto.
7098 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
7099 regcache. Adjust.
43aaf8b6
PA
7100 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
7101 Ditto.
442ea881
PA
7102 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
7103 prototype to take a regcache.
7104 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
7105 * remote-utils.c (convert_ascii_to_int, outreg)
7106 (prepare_resume_reply): Change prototype to take a regcache.
7107 Adjust.
7108 * target.h (struct target_ops) <fetch_registers, store_registers>:
7109 Change prototype to take a regcache.
7110 (fetch_inferior_registers, store_inferior_registers): Change
7111 prototype to take a regcache. Adjust.
7112 * proc-service.c (ps_lgetregs): Adjust.
7113 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
7114 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
7115 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
7116 take a regcache. Adjust.
7117 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
7118 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
7119 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
7120 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
7121 * linux-cris-low.c (cris_get_pc, cris_set_pc)
7122 (cris_cannot_fetch_register):
7123 (cris_breakpoint_at): Change prototype to take a regcache.
7124 Adjust.
7125 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
7126 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
7127 to take a regcache. Adjust.
7128 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
7129 Adjust.
7130 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
7131 take a regcache. Adjust.
7132 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
7133 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
7134 (m68k_set_pc): Change prototype to take a regcache. Adjust.
7135 * linux-mips-low.c (mips_get_pc):
7136 (mips_set_pc): Change prototype to take a regcache. Adjust.
7137 (mips_reinsert_addr): Adjust.
7138 (mips_collect_register): Change prototype to take a regcache.
7139 Adjust.
7140 (mips_supply_register):
7141 (mips_collect_register_32bit, mips_supply_register_32bit)
7142 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7143 (mips_store_fpregset): Ditto.
43aaf8b6
PA
7144 * linux-ppc-low.c (ppc_supply_ptrace_register)
7145 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
7146 (parse_spufs_run): Adjust.
7147 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
7148 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
7149 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
7150 take a regcache. Adjust.
7151 * linux-s390-low.c (s390_collect_ptrace_register)
7152 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
7153 (s390_set_pc): Change prototype to take a regcache. Adjust.
7154 (s390_arch_setup): Adjust.
7155 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
7156 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
7157 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7158 (sparc_fill_gregset, sparc_store_gregset_from_stack)
7159 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7160 regcache. Adjust.
7161 (sparc_breakpoint_at): Adjust.
7162 * linux-xtensa-low.c (xtensa_fill_gregset):
7163 (xtensa_store_gregset):
7164 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7165 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
7166 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
7167 prototype to take a regcache. Adjust.
7168 * win32-arm-low.c (arm_fetch_inferior_register)
7169 (arm_store_inferior_register): Change prototype to take a
7170 regcache. Adjust.
7171 * win32-i386-low.c (i386_fetch_inferior_register)
7172 (i386_store_inferior_register): Change prototype to take a
7173 regcache. Adjust.
7174 * win32-low.c (child_fetch_inferior_registers)
7175 (child_store_inferior_registers): Change prototype to take a
7176 regcache. Adjust.
7177 (win32_wait): Adjust.
7178 (win32_fetch_inferior_registers): Change prototype to take a
7179 regcache. Adjust.
7180 (win32_store_inferior_registers): Adjust.
7181 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7182 store_inferior_register>: Change prototype to take a regcache.
7183
60c3d7b0
DE
71842010-01-20 Doug Evans <dje@google.com>
7185
7186 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7187 #ifdef.
7188 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 7189 (W_STOPCODE): Provide definition if missing.
60c3d7b0 7190
dc146f7c
VP
71912010-01-13 Vladimir Prus <vladimir@codesourcery.com>
7192
7193 * linux-low.c (linux_core_of_thread): New.
7194 (compare_ints, show_process, list_threads): New.
7195 (linux_qxfer_osdata): Report threads and cores.
7196 (linux_target_op): Register linux_core_of_thread.
7197 * remote-utils.c (prepare_resume_reply): Report the core.
7198 (buffer_xml_printf): Support %d specifier.
7199 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
7200 New.
7201 (handle_query): Handle qXfer:threads. Announce availability
7202 thereof.
7203 * target.h (struct target_ops): New field core_of_thread.
7204
7803799a
UW
72052010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
7206
7207 * Makefile.in (clean): Remove new generated files.
7208 (reg-s390.o, reg-s390.c): Remove rules.
7209 (reg-s390x.o, reg-s390x.c): Likewise.
7210 (s390-linux32.o, s390-linux32.c): Add rules.
7211 (s390-linux64.o, s390-linux64.c): Likewise.
7212 (s390x-linux64.o, s390x-linux64.c): Likewise.
7213 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7214 * linux-s390-low.c: Include <elf.h>.
7215 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7216 (init_registers_s390): Remove prototype.
7217 (init_registers_s390x): Likewise.
7218 (init_registers_s390_linux32): Add prototype.
7219 (init_registers_s390_linux64): Likewise.
7220 (init_registers_s390x_linux64): Likewise.
7221 (s390_num_regs_3264): New define.
7222 (s390_regmap_3264): New global variable.
7223 (s390_cannot_fetch_register): Remove obsolete check.
7224 (s390_cannot_store_register): Likewise.
7225 (s390_collect_ptrace_register): Handle upper/lower register halves.
7226 (s390_supply_ptrace_register): Likewise.
7227 (s390_fill_gregset): Update to register number changes.
7228 (s390_get_hwcap): New routine.
7229 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7230 Install appropriate regmap and register set.
7231
6e7ffa39
JB
72322010-01-01 Joel Brobecker <brobecker@adacore.com>
7233
7234 * server.c (gdbserver_version): Update copyright year to 2010.
7235 * gdbreplay.c (gdbreplay_version): Likewise.
7236
957f3f49
DE
72372009-12-28 Doug Evans <dje@google.com>
7238
7239 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7240 elf/external.h. Include <elf.h> instead but only if necessary.
7241
ca5c370d
PA
72422009-12-28 Pedro Alves <pedro@codesourcery.com>
7243
7244 * linux-low.c (linux_remove_process): Remove `detaching'
7245 parameter. Don't release/detach from thread_db here.
7246 (linux_kill): Release/detach from thread_db here, ...
7247 (linux_detach): ... and here, before actually detaching.
7248 (linux_wait_1): ... and here, when a process exits.
7249 * thread-db.c (any_thread_of): New.
7250 (thread_db_free): Switch the current inferior to a thread of the
7251 passed in process.
7252
4ee62156
DE
72532009-12-21 Doug Evans <dje@google.com>
7254
d90e6a88
DE
7255 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7256
c5f62d5f
DE
7257 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7258 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7259 warning ifndef __NR_tkill. Move setting of errno there too.
7260 Delete unnecessary resetting of errno after syscall.
7261 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7262
10e86dd7
DE
7263 * configure.ac: Check for dladdr.
7264 * config.in: Regenerate.
7265 * configure: Regenerate.
7266 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7267 (try_thread_db_load): Update.
7268
4ee62156
DE
7269 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7270
00f515da
DE
72712009-12-18 Doug Evans <dje@google.com>
7272
e9464885
DE
7273 * event-loop.c: Include unistd.h if it exists.
7274
07d4f67e
DE
7275 * linux-low.c (my_waitpid): Move definition away from being in
7276 between linux_tracefork_child/linux_test_for_tracefork.
7277
00f515da
DE
7278 * gdb_proc_service.h (psaddr_t): Fix type.
7279 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7280 signature to match glibc.
7281
1de1badb
DE
72822009-12-16 Doug Evans <dje@google.com>
7283
7284 * linux-low.c (linux_read_memory): Fix argument to read.
7285
aeeb81d1
PA
72862009-11-26 Pedro Alves <pedro@codesourcery.com>
7287
7288 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
7289 events, don't leave current_inferior pointing at null.
7290
10357975
PA
72912009-11-26 Pedro Alves <pedro@codesourcery.com>
7292
7293 * win32-low.c (LOG): Delete.
7294 (OUTMSG): Output to stderr.
7295 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
7296 on compile time LOG macro.
7297 (win32_wait): Fix debug output.
7298
cf6e3471
PA
72992009-11-26 Pedro Alves <pedro@codesourcery.com>
7300
7301 * win32-low.c (win32_add_one_solib): If the dll name is
7302 "ntdll.dll", prepend the system directory to the dll path.
7303
0c85e18e
MK
73042009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
7305
7306 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
7307
9ac544ce 73082009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 7309 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
7310
7311 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
7312 * configure.ac: Check for __mcoldfire__ and set
7313 gdb_cv_m68k_is_coldfire.
7314 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
7315 reg-cf.o and reg-m68k.o.
7316 * configure: Regenerated.
7317
fd7dd3e6
PA
73182009-11-16 Pedro Alves <pedro@codesourcery.com>
7319
7320 * linux-low.c (linux_remove_process): Add `detaching' parameter.
7321 Pass it to thread_db_free.
7322 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
7323 proper `detaching' argument to linux_remove_process.
7324 * linux-low.h (thread_db_free): Add `detaching' parameter.
7325 * thread-db.c (thread_db_init): Pass false as `detaching' argument
7326 to thread_db_free.
7327 (thread_db_free): Add `detaching' parameter. Only
7328 call td_ta_clear_event if detaching from process.
7329
75aa492e
MK
73302009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
7331
7332 * thread-db.c (thread_db_free): Fix typo.
7333
21e1bee4
PP
73342009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
7335
7336 PR gdb/10838
7337 * thread-db.c (thread_db_free): Call td_ta_clear_event.
7338
8838b45e
NS
73392009-11-03 Nathan Sidwell <nathan@codesourcery.com>
7340
7341 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
7342 with an i686 compiler.
7343 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
7344 needed.
7345 * configure: Rebuilt.
7346
8a35fb51
SL
73472009-10-29 Sandra Loosemore <sandra@codesourcery.com>
7348
7349 PR gdb/10783
7350
7351 * server.c (handle_search_memory_1): Correct read_addr initialization
7352 in loop for searching subsequent chunks.
7353
96f15937
PP
73542009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
7355
7356 * configure.ac: New --with-libthread-db option.
7357 * thread-db.c: Allow direct dependence on libthread_db.
7358 (thread_db_free): Adjust.
7359 * config.in: Regenerate.
7360 * configure: Likewise.
889bf7c5 7361
5f7d1694
PP
73622009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
7363
7364 PR gdb/10757
7365 * thread-db.c (attach_thread): New function.
7366 (maybe_attach_thread): Return success/failure.
7367 (find_new_threads_callback): Adjust.
889bf7c5
PA
7368 (thread_db_find_new_threads): Loop until no new threads.
7369
88e3b899
PA
73702009-10-13 Pedro Alves <pedro@codesourcery.com>
7371
7372 * proc-service.c (ps_lgetregs): Formatting.
7373
cdbfd419
PP
73742009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
7375
7376 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
7377 * configure.ac: Adjust.
7378 * linux-low.h (struct process_info_private): Move members to struct
7379 thread_db.
7380 (thread_db_free, thread_db_handle_monitor_command): New prototype.
7381 * linux-low.c (linux_remove_process): Adjust.
7382 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
7383 * server.c (handle_query): Move code ...
7384 (handle_monitor_command): ... here. New function.
7385 * target.h (struct target_ops): New member.
7386 * thread-db.c (struct thread_db): New.
7387 (libthread_db_search_path): New variable.
7388 (thread_db_create_event, thread_db_enable_reporting)
7389 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
7390 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
7391 (try_thread_db_load_1, dladdr_to_soname): New functions.
7392 (try_thread_db_load, thread_db_load_search): New functions.
7393 (thread_db_init): Search for libthread_db.
7394 (thread_db_free): New function.
7395 (thread_db_handle_monitor_command): Likewise.
7396 * config.in: Regenerate.
7397 * configure: Regenerate.
889bf7c5 7398
4168d2d6
UW
73992009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
7400
7401 * spu-low.c (spu_kill): Wait for inferior to terminate.
7402 Call clear_inferiors.
7403 (spu_detach): Call clear_inferiors.
7404
81ecdfbb
RW
74052009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7406
7407 * aclocal.m4: Regenerate.
7408 * config.in: Likewise.
7409 * configure: Likewise.
7410
0b9ff2c0
UW
74112009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7412
7413 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
7414 (parse_spufs_run): New function.
7415 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
7416 (ppc_breakpoint_at): Handle SPU breakpoints.
7417
efcbbd14
UW
74182009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7419
7420 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
7421 (SPUFS_MAGIC): Define.
7422 (spu_enumerate_spu_ids): New function.
7423 (linux_qxfer_spu): New function.
7424 (linux_target_ops): Install linux_qxfer_spu.
7425
f4d9bade
UW
74262009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7427
7428 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
7429 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
7430 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
7431 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
7432 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
7433 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
7434 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
7435 (init_registers_powerpc_cell32l): Add prototype.
7436 (init_registers_powerpc_cell64l): Likewise.
7437 (ppc_arch_setup): Detect Cell/B.E. architecture.
7438
96e946ca
RW
74392009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7440
7441 * Makefile.in (datarootdir): New variable.
7442
58d6951d
DJ
74432009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7444
7445 * linux-low.c (linux_write_memory): Update debugging output.
7446 * Makefile.in (clean): Add new descriptions.
7447 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
7448 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
7449 * configure.srv: Add new files for arm*-*-linux*.
7450 * linux-arm-low.c: Add new declarations.
7451 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
7452 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
7453 (HWCAP_VFPv3D16): New.
7454 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
7455 instead of __IWMMXT__.
7456 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
7457 (arm_arch_setup): New.
7458 (target_regsets): Remove #ifdef. Add VFP regset.
7459 (the_low_target): Use arm_arch_setup.
7460
12b42a12
DJ
74612009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7462
7463 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
7464 the main thread again.
7465
ac8c974e
AR
74662009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
7467
7468 Adding Neutrino gdbserver.
7469 * configure: Regenerated.
7470 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
7471 * configure.srv (i[34567]86-*-nto*): New target.
7472 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
7473 * remote-utils.c [__QNX__]: Include sys/iomgr.h
7474 (nto_comctrl) [__QNX__]: New function.
7475 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
7476
4424e0c3 74772009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
7478
7479 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
7480 srv_tgtobj.
7481
912cf4ba
PA
74822009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
7483 Pedro Alves <pedro@codesourcery.com>
7484
7485 * win32-i386-low.c (i386_get_thread_context): Handle systems that
7486 don't support CONTEXT_EXTENDED_REGISTERS.
7487 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
7488 (the_low_target): Install them.
7489 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
7490 failing with ERROR_PIPE_NOT_CONNECTED.
7491
aa5ca48f
DE
74922009-06-30 Doug Evans <dje@google.com>
7493 Pierre Muller <muller@ics.u-strasbg.fr>
7494
7495 Add h/w watchpoint support to x86-linux, win32-i386.
7496 * Makefile.in (SFILES): Add i386-low.c
7497 (i386_low_h): Define.
7498 (i386-low.o): Add dependencies.
7499 (linux-x86-low.o): Add i386-low.h dependency.
7500 (win32-i386-low.o): Ditto.
7501 * i386-low.c: New file.
7502 * i386-low.h: New file.
7503 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
7504 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
7505 * linux-low.c (linux_add_process): Initialize arch_private.
7506 (linux_remove_process): Free arch_private.
7507 (add_lwp): Initialize arch_private.
7508 (delete_lwp): Free arch_private.
7509 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
7510 provided.
7511 * linux-low.h (process_info_private): New member arch_private.
7512 (lwp_info): New member arch_private.
7513 (linux_target_ops): New members new_process, new_thread,
7514 prepare_to_resume.
7515 (ptid_of): New macro.
7516 * linux-x86-low.c: Include stddef.h, i386-low.h.
7517 (arch_process_info): New struct.
7518 (arch_lwp_info): New struct.
7519 (x86_linux_dr_get, x86_linux_dr_set): New functions.
7520 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7521 (i386_dr_low_get_status): New function.
7522 (x86_insert_point, x86_remove_point): New functions.
7523 (x86_stopped_by_watchpoint): New function.
7524 (x86_stopped_data_address): New function.
7525 (x86_linux_new_process, x86_linux_new_thread): New functions.
7526 (x86_linux_prepare_to_resume): New function.
7527 (the_low_target): Add entries for insert_point, remove_point,
7528 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
7529 prepare_to_resume.
7530 * server.c (debug_hw_points): New global.
7531 (monitor_show_help): Document set debug-hw-points.
7532 (handle_query): Process "set debug-hw-points".
7533 * server.h (debug_hw_points): Declare.
7534 (paddress): Declare.
7535 * utils.c (NUMCELLS, CELLSIZE): New macros.
7536 (get_sell, xsnprintf, paddress): New functions.
7537 * win32-arm-low.c (the_low_target): Add entries for insert_point,
7538 remove_point, stopped_by_watchpoint, stopped_data_address.
7539 * win32-i386-low.c: Include i386-low.h.
7540 (debug_reg_state): Replaces dr.
7541 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7542 (i386_dr_low_get_status): New function.
7543 (i386_insert_point, i386_remove_point): New functions.
7544 (i386_stopped_by_watchpoint): New function.
7545 (i386_stopped_data_address): New function.
7546 (i386_initial_stuff): Update.
7547 (get_thread_context,set_thread_context,i386_thread_added): Update.
7548 (the_low_target): Add entries for insert_point,
7549 remove_point, stopped_by_watchpoint, stopped_data_address.
7550 * win32-low.c (win32_insert_watchpoint): New function.
7551 (win32_remove_watchpoint): New function.
7552 (win32_stopped_by_watchpoint): New function.
7553 (win32_stopped_data_address): New function.
7554 (win32_target_ops): Add entries for insert_watchpoint,
7555 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
7556 * win32-low.h (win32_target_ops): New members insert_point,
7557 remove_point, stopped_by_watchpoint, stopped_data_address.
7558
d993e290
PA
75592009-06-25 Pedro Alves <pedro@codesourcery.com>
7560
7561 * server.c (process_serial_event): Re-return unsupported, not
7562 error, if the type isn't recognized. Re-allow supporting only
7563 insert or remove packets. Also call require_running for
7564 breakpoints. Add missing break statement to default case. Tidy.
7565 * target.h (struct target_ops): Rename insert_watchpoint to
7566 insert_point, and remove_watchpoint to remove_point.
7567
7568 * linux-low.h (struct linux_target_ops): Likewise.
7569 * linux-low.c (linux_insert_watchpoint): Rename to ...
7570 (linux_insert_point): ... this. Adjust.
7571 (linux_remove_watchpoint): Rename to ...
7572 (linux_remove_point): ... this. Adjust.
7573 (linux_target_ops): Adjust.
7574 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
7575 (cris_insert_point): ... this.
7576 (cris_remove_watchpoint): Rename to ...
7577 (cris_remove_point): ... this.
7578 (the_low_target): Adjust.
7579
0f54c268
PM
75802009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
7581
7582 * server.c (handle_v_kill): Pass signal_pid to
7583 kill_inferior if multi_process is zero.
7584
c6314022
AR
75852009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
7586
7587 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
7588 * target.h (target_ops): Comment for *_watchpoint to make it clear
7589 the functions can get types '0' and '1'.
7590
4463ce24
AR
75912009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
7592
7593 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
7594 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
7595 * regcache.c (get_regcache): Likewise.
7596 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
7597 * win32-low.c (child_fetch_inferior_registers): Remove check for
7598 regno 0.
7599
cf8fd78b
PA
76002009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
7601 Pedro Alves <pedro@codesourcery.com>
7602
7603 * target.h (struct target_ops) <supports_multi_process>: New
7604 callback.
7605 (target_supports_multi_process): New.
7606 * server.c (handle_query): Even if GDB reports support, only
7607 enable multi-process if the target also supports it. Report
7608 multi-process support only if the target backend supports it.
7609 * linux-low.c (linux_supports_multi_process): New function.
7610 (linux_target_ops): Install it as target_supports_multi_process
7611 callback.
7612
47c0c975
DE
76132009-05-24 Doug Evans <dje@google.com>
7614
e09875d4
DE
7615 Global renaming of find_thread_pid to find_thread_ptid.
7616 * server.h (find_thread_ptid): Renamed from find_thread_pid.
7617 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
7618 All callers updated.
7619
e27d73f6
DE
7620 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
7621 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
7622 directly.
7623
47c0c975
DE
7624 * linux-low.c (get_stop_pc): Print pc if debug_threads.
7625 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
7626 (linux_resume_one_lwp): Ditto.
7627
2acc282a
DE
76282009-05-23 Doug Evans <dje@google.com>
7629
7630 * linux-low.c (linux_resume_one_lwp): Change type of first arg
7631 from struct inferior_list_entry * to struct lwp_info *.
7632 All callers updated.
7633
9f1036c1
DE
76342009-05-13 Doug Evans <dje@google.com>
7635
7636 * linux-x86-low.c: Don't include assert.h.
7637 (x86_siginfo_fixup): Use fatal, not assert.
7638 (x86_arch_setup): Fix comment.
7639
d0722149
DE
76402009-05-12 Doug Evans <dje@google.com>
7641
7642 Biarch support for i386/amd64 gdbserver.
7643 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
7644 Add linux-x86-low.c.
7645 (linux-i386-low.o, linux-x86-64-low.o): Delete.
7646 (linux-x86-low.o): Add.
7647 * linux-x86-64-low.c: Delete.
7648 * linux-i386-low.c: Delete.
7649 * linux-x86-low.c: New file.
7650 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
7651 linux-x86-low.o.
7652 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
7653 linux-x86-low.o.
7654 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
7655 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
7656 (linux_child_pid_to_exec_file): New function.
7657 (elf_64_header_p, elf_64_file_p): New functions.
7658 (siginfo_fixup): New function.
7659 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
7660 give target a chance to convert layout.
7661 * linux-low.h (linux_target_ops): New member siginfo_fixup.
7662 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
7663
fdeb2a12
DE
76642009-05-07 Doug Evans <dje@google.com>
7665
7666 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
7667 (regsets_store_inferior_registers): Ditto.
7668
a6dbe5df
PA
76692009-05-06 Pedro Alves <pedro@codesourcery.com>
7670
7671 PR server/10048
7672
7673 * linux-low.c (must_set_ptrace_flags): Delete.
7674 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
7675 of the global.
7676 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
7677 `lwp->must_set_ptrace_flags' instead.
ba42693b 7678 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
7679 (linux_wait_1): ... not here.
7680
5091eb23
DE
76812009-04-30 Doug Evans <dje@google.com>
7682
9f767825
DE
7683 * inferiors.c (started_inferior_callback): New function.
7684 (attached_inferior_callback): New function.
7685 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
7686 * server.c (print_started_pid, print_attached_pid): New functions.
7687 (detach_or_kill_for_exit): New function.
7688 (main): Call it instead of for_each_inferior (kill_inferior_callback).
7689 * server.h (have_started_inferiors_p): Declare.
7690 (have_attached_inferiors_p): Declare.
7691
5091eb23
DE
7692 * inferiors.c (remove_process): Fix memory leak, free process.
7693 * linux-low.c (linux_remove_process): New function.
7694 (linux_kill): Call it instead of remove_process.
7695 (linux_detach, linux_wait_1): Ditto.
7696
155c8968
PA
76972009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
7698
7699 * configure.srv: Add x86 Windows CE target.
7700
7fe519cb
UW
77012009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7702
7703 * inferiors.c (get_thread_process): Make global.
7704 * server.h (get_thread_process): Add prototype.
7705 * thread-db.c (find_one_thread): Use get_thread_process
7706 instead of current_process.
7707 (thread_db_get_tls_address): Do not crash if called when
7708 thread layer is not yet initialized.
7709
5472f405
UW
77102009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7711
7712 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
7713 * spu-low.c (current_tid): Rename to ...
7714 (current_ptid): ... this.
7715 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
7716 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
7717 ptid_get_lwp (current_ptid) instead of current_tid.
7718 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
7719 instead of current_tid. Use find_process_pid to verify pid
7720 argument is valid. Pass proper argument to remove_process.
7721 (spu_thread_alive): Compare current_ptid instead of current_tid.
7722 (spu_resume): Likewise.
7723
55ac2b99
PA
77242009-04-02 Pedro Alves <pedro@codesourcery.com>
7725
7726 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
7727 variable.
7728
95954743
PA
77292009-04-01 Pedro Alves <pedro@codesourcery.com>
7730
7731 Implement the multiprocess extensions, and add linux multiprocess
7732 support.
7733
7734 * server.h (ULONGEST): Declare.
7735 (struct ptid, ptid_t): New.
7736 (minus_one_ptid, null_ptid): Declare.
7737 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7738 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
7739 (struct inferior_list_entry): Change `id' type from unsigned from
7740 to ptid_t.
7741 (struct sym_cache, struct breakpoint, struct
7742 process_info_private): Forward declare.
7743 (struct process_info): Declare.
7744 (current_process): Declare.
7745 (all_processes): Declare.
7746 (initialize_inferiors): Declare.
7747 (add_thread): Adjust to use ptid_t.
7748 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
7749 (add_process, remove_process, find_thread_pid): Declare.
7750 (find_inferior_id): Adjust to use ptid_t.
7751 (cont_thread, general_thread, step_thread): Change type to ptid_t.
7752 (multi_process): Declare.
7753 (push_event): Adjust to use ptid_t.
7754 (read_ptid, write_ptid): Declare.
7755 (prepare_resume_reply): Adjust to use ptid_t.
7756 (clear_symbol_cache): Declare.
7757 * inferiors.c (all_processes): New.
7758 (null_ptid, minus_one_ptid): New.
7759 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7760 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
7761 (add_thread): Change unsigned long to ptid. Remove gdb_id
7762 parameter. Adjust.
7763 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
7764 (gdb_id_to_thread): Rename to ...
7765 (find_thread_pid): ... this. Change unsigned long to ptid.
7766 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
7767 (loaded_dll, pull_pid_from_list): Adjust.
7768 (add_process, remove_process, find_process_pid)
7769 (get_thread_process, current_process, initialize_inferiors): New.
7770 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
7771 (struct target_waitstatus) <related_pid>: Ditto.
7772 (struct target_ops) <kill, detach>: Add `pid' argument. Change
7773 return type to int.
7774 (struct target_ops) <join>: Add `pid' argument.
7775 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
7776 (struct target_ops) <wait>: Add `ptid' field. Change return type
7777 to ptid.
7778 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
7779 (mywait): Add `ptid' argument. Change return type to ptid_t.
7780 (target_pid_to_str): Declare.
7781 * target.c (set_desired_inferior): Adjust to use ptids.
7782 (mywait): Add new `ptid' argument. Adjust.
7783 (target_pid_to_str): New.
7784 * mem-break.h (free_all_breakpoints): Declare.
7785 * mem-break.c (breakpoints): Delelete.
7786 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
7787 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
7788 to use per-process breakpoint list.
7789 (free_all_breakpoints): New.
7790 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
7791 (symbol_cache, all_symbols_looked_up): Delete.
7792 (hexchars): New.
7793 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
7794 read_ptid): New.
7795 (prepare_resume_reply): Change ptid argument's type from unsigned
7796 long to ptid_t. Adjust. Implement W;process and X;process.
7797 (free_sym_cache, clear_symbol_cache): New.
7798 (look_up_one_symbol): Adjust to per-process symbol cache. *
7799 * server.c (cont_thread, general_thread, step_thread): Change type
7800 to ptid_t.
7801 (attached): Delete.
7802 (multi_process): New.
7803 (last_ptid): Change type to ptid_t.
7804 (struct vstop_notif) <ptid>: Change type to ptid_t.
7805 (queue_stop_reply, push_event): Change `ptid' argument's type to
7806 ptid_t.
7807 (discard_queued_stop_replies): Add `pid' argument.
7808 (start_inferior): Adjust to use ptids. Adjust to mywait interface
7809 changes. Don't reference the `attached' global.
7810 (attach_inferior): Adjust to mywait interface changes.
7811 (handle_query): Adjust to use ptids. Parse GDB's qSupported
7812 features. Handle and report "multiprocess+". Handle
7813 "qAttached:PID".
7814 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
7815 changes.
7816 (handle_v_kill): New.
7817 (handle_v_stopped): Adjust to use target_pid_to_str.
7818 (handle_v_requests): Allow multiple attaches and runs when
7819 multiprocess extensions are in effect. Handle "vKill".
7820 (myresume): Adjust to use ptids.
7821 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
7822 (handle_status): Adjust to discard_queued_stop_replies interface
7823 change.
7824 (first_thread_of, kill_inferior_callback)
7825 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
7826 (main): Call initialize_inferiors. Adjust to use ptids, killing
7827 and detaching from all inferiors. Handle multiprocess packet
7828 variants.
7829 * linux-low.h: Include gdb_proc_service.h.
7830 (struct process_info_private): New.
7831 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
7832 <lwpid_of>: Use ptid_get_lwp.
7833 (get_lwp_thread): Adjust.
7834 (struct lwp_info): Add `dead' member.
7835 (find_lwp_pid): Declare.
7836 * linux-low.c (thread_db_active): Delete.
7837 (new_inferior): Adjust comment.
7838 (inferior_pid): Delete.
7839 (linux_add_process): New.
7840 (handle_extended_wait): Adjust.
7841 (add_lwp): Change unsigned long to ptid.
7842 (linux_create_inferior): Add process to processes table. Adjust
7843 to use ptids. Don't set new_inferior here.
7844 (linux_attach_lwp): Rename to ...
7845 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
7846 it. Adjust to use ptids.
7847 (linux_attach_lwp): New.
7848 (linux_attach): Add process to processes table. Don't set
7849 new_inferior here.
7850 (struct counter): New.
7851 (second_thread_of_pid_p, last_thread_of_process_p): New.
7852 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
7853 multiple processes.
7854 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
7855 processes. Remove process from process table.
7856 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
7857 to multiple processes.
7858 (any_thread_of): New.
7859 (linux_detach): Add `pid' argument, and handle it. Remove process
7860 from processes table.
7861 (linux_join): Add `pid' argument. Handle it.
7862 (linux_thread_alive): Change unsighed long argument to ptid_t.
7863 Consider dead lwps as not being alive.
7864 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
7865 threads we're not interested in.
7866 (same_lwp, find_lwp_pid): New.
7867 (linux_wait_for_lwp): Change `pid' argument's type from int to
7868 ptid_t. Adjust.
7869 (linux_wait_for_event): Rename to ...
7870 (linux_wait_for_event_1): ... this. Change `pid' argument's type
7871 from int to ptid_t. Adjust.
7872 (linux_wait_for_event): New.
7873 (linux_wait_1): Add `ptid' argument. Change return type to
7874 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
7875 that exit from the process table.
7876 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
7877 Adjust.
7878 (mark_lwp_dead): New.
7879 (wait_for_sigstop): Adjust to use ptids. If a process exits while
7880 stopping all threads, mark its main lwp as dead.
7881 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
7882 ptids.
7883 (fetch_register, usr_store_inferior_registers)
7884 (regsets_fetch_inferior_registers)
7885 (regsets_store_inferior_registers, linux_read_memory)
7886 (linux_write_memory): Inline `inferior_pid'.
7887 (linux_look_up_symbols): Adjust to use per-process
7888 `thread_db_active'.
7889 (linux_request_interrupt): Adjust to use ptids.
7890 (linux_read_auxv): Inline `inferior_pid'.
7891 (initialize_low): Don't reference thread_db_active.
7892 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
7893 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
7894 (ps_getpid): Return the pid of the current inferior.
7895 * thread-db.c (proc_handle, thread_agent): Delete.
7896 (thread_db_create_event, thread_db_enable_reporting): Adjust to
7897 per-process data.
7898 (find_one_thread): Change argument type to ptid_t. Adjust to
7899 per-process data.
7900 (maybe_attach_thread): Adjust to per-process data and ptids.
7901 (thread_db_find_new_threads): Ditto.
7902 (thread_db_init): Ditto.
7903 * spu-low.c (spu_create_inferior, spu_attach): Add process to
7904 processes table. Adjust to use ptids.
7905 (spu_kill, spu_detach): Adjust interface. Remove process from
7906 processes table.
7907 (spu_join, spu_thread_alive): Adjust interface.
7908 (spu_wait): Adjust interface. Remove process from processes
7909 table. Adjust to use ptids.
7910 * win32-low.c (current_inferior_tid): Delete.
7911 (current_inferior_ptid): New.
7912 (debug_event_ptid): New.
7913 (thread_rec): Take a ptid. Adjust.
7914 (child_add_thread): Add `pid' argument. Adjust to use ptids.
7915 (child_delete_thread): Ditto.
7916 (do_initial_child_stuff): Add `attached' argument. Add process to
7917 processes table.
7918 (child_fetch_inferior_registers, child_store_inferior_registers):
7919 Adjust.
7920 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
7921 (win32_attach): Pass 1 to do_initial_child_stuff.
7922 (win32_kill): Adjust interface. Remove process from processes
7923 table.
7924 (win32_detach): Ditto.
7925 (win32_join): Adjust interface.
7926 (win32_thread_alive): Take a ptid.
7927 (win32_resume): Adjust to use ptids.
7928 (get_child_debug_event): Ditto.
7929 (win32_wait): Adjust interface. Remove exiting process from
7930 processes table.
7931
bd99dc85
PA
79322009-04-01 Pedro Alves <pedro@codesourcery.com>
7933
7934 Non-stop mode support.
7935
7936 * server.h (non_stop): Declare.
7937 (gdb_client_data, handler_func): Declare.
7938 (delete_file_handler, add_file_handler, start_event_loop):
7939 Declare.
7940 (handle_serial_event, handle_target_event, push_event)
7941 (putpkt_notif): Declare.
7942 * target.h (enum resume_kind): New.
7943 (struct thread_resume): Replace `step' field by `kind' field.
7944 (TARGET_WNOHANG): Define.
7945 (struct target_ops) <wait>: Add `options' argument.
7946 <supports_non_stop, async, start_non_stop>: New fields.
7947 (target_supports_non_stop, target_async): New.
7948 (start_non_stop): Declare.
7949 (mywait): Add `options' argument.
7950 * target.c (mywait): Add `options' argument. Print child exit
7951 notifications here.
7952 (start_non_stop): New.
7953 * server.c (non_stop, own_buf, mem_buf): New globals.
7954 (struct vstop_notif): New.
7955 (notif_queue): New global.
7956 (queue_stop_reply, push_event, discard_queued_stop_replies)
7957 (send_next_stop_reply): New.
7958 (start_inferior): Adjust to use resume_kind. Adjust to mywait
7959 interface changes.
7960 (attach_inferior): In non-stop mode, don't wait for the target
7961 here.
7962 (handle_general_set): Handle QNonStop.
7963 (handle_query): When handling qC, return the current general
7964 thread, instead of the first thread of the list.
7965 (handle_query): If the backend supports non-stop mode, include
7966 QNonStop+ in the qSupported query response.
7967 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
7968 and non-stop mode.
7969 (handle_v_attach, handle_v_run): Handle non-stop mode.
7970 (handle_v_stopped): New.
7971 (handle_v_requests): Report support for vCont;t. Handle vStopped.
7972 (myresume): Adjust to use resume_kind. Handle non-stop.
7973 (queue_stop_reply_callback): New.
7974 (handle_status): Handle non-stop mode.
7975 (main): Clear non_stop flag on reconnection. Use the event-loop.
7976 Refactor serial protocol handling from here ...
7977 (process_serial_event): ... to this new function. When GDB
7978 selects any thread, select one here. In non-stop mode, wait until
7979 GDB acks all pending events before exiting.
7980 (handle_serial_event, handle_target_event): New.
7981 * remote-utils.c (remote_open): Install remote_desc in the event
7982 loop.
7983 (remote_close): Remove remote_desc from the event loop.
7984 (putpkt_binary): Rename to...
7985 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
7986 (putpkt_binary): New as wrapper around putpkt_binary_1.
7987 (putpkt_notif): New.
7988 (prepare_resume_reply): In non-stop mode, don't change the
7989 general_thread.
7990 * event-loop.c: New.
7991 * Makefile.in (OBJ): Add event-loop.o.
7992 (event-loop.o): New rule.
7993
7994 * linux-low.h (pid_of): Moved here.
7995 (lwpid_of): New.
7996 (get_lwp_thread): Use lwpid_of.
7997 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
7998 * linux-low.c (pid_of): Delete.
7999 (inferior_pid): Use lwpid_of.
8000 (linux_event_pipe): New.
8001 (target_is_async_p): New.
8002 (delete_lwp): New.
8003 (handle_extended_wait): Use lwpid_of.
8004 (add_lwp): Don't set lwpid field.
8005 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
8006 (linux_kill_one_lwp): If killing a running lwp, stop it first.
8007 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
8008 (linux_detach_one_lwp): If detaching from a running lwp, stop it
8009 first. Adjust to linux_wait_for_event interface changes. Use
8010 lwpid_of.
8011 (linux_detach): Don't delete the main lwp here.
8012 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
8013 (status_pending_p): Don't consider explicitly suspended lwps.
8014 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8015 pointer. Add OPTIONS argument. Change return type to int. Use
8016 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
8017 (linux_wait_for_event): Take an integer pid instead of a lwp_info
8018 pointer. Add status pointer argument. Return a pid instead of a
8019 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
8020 changes. In non-stop mode, don't switch to a random thread.
8021 (linux_wait): Rename to...
8022 (linux_wait_1): ... this. Add target_options argument, and handle
8023 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
8024 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
8025 clean exit and signal exit code. Don't stop all threads in
8026 non-stop mode. In all-stop mode, only stop all threads when
8027 reporting a stop to GDB. Handle explicit thread stop requests.
8028 (async_file_flush, async_file_mark): New.
8029 (linux_wait): New.
8030 (send_sigstop): Use lwpid_of.
8031 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
8032 interface changes. In non-stop mode, don't switch to a random
8033 thread.
8034 (linux_resume_one_lwp): Use lwpid_of.
8035 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8036 (linux_resume_one_thread): ... this. Handle resume_stop. In
8037 non-stop mode, don't look for pending flag in all threads.
8038 (resume_status_pending_p): Don't consider explicitly suspended
8039 threads.
8040 (my_waitpid): Reimplement. Emulate __WALL.
8041 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8042 Use lwpid_of.
8043 (sigchld_handler, linux_supports_non_stop, linux_async)
8044 (linux_start_non_stop): New.
8045 (linux_target_ops): Register linux_supports_non_stop, linux_async
8046 and linux_start_non_stop.
8047 (initialize_low): Install SIGCHLD handler.
8048 * thread-db.c (thread_db_create_event, find_one_thread)
8049 (thread_db_get_tls_address): Use lwpid_of.
8050 * win32-low.c (win32_detach): Adjust to use resume_kind.
8051 (win32_wait): Add `options' argument.
8052 * spu-low.c (spu_resume): Adjust to use resume_kind.
8053 (spu_wait): Add `options' argument.
8054
5b1c542e
PA
80552009-04-01 Pedro Alves <pedro@codesourcery.com>
8056
8057 Decouple target code from remote protocol.
8058
8059 * target.h (enum target_waitkind): New.
8060 (struct target_waitstatus): New.
8061 (struct target_ops) <wait>: Return an unsigned long. Take a
8062 target_waitstatus pointer instead of a char pointer.
8063 (mywait): Likewise.
8064 * target.c (mywait): Change prototype to return an unsigned long.
8065 Take a target_waitstatus pointer instead of a char pointer. Adjust.
8066 * server.h (thread_from_wait, old_thread_from_wait): Delete
8067 declarations.
8068 (prepare_resume_reply): Change prototype to take a
8069 target_waitstatus.
8070 * server.c (thread_from_wait, old_thread_from_wait): Delete.
8071 (last_status, last_ptid): New.
8072 (start_inferior): Remove "statusptr" argument. Adjust. Return a
8073 pid instead of a signal.
8074 (attach_inferior): Remove "status" and "signal" parameters.
8075 Adjust.
8076 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
8077 not as an address.
8078 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
8079 (handle_v_requests, myresume): Remove "status" and "signal"
8080 parameters. Adjust.
8081 (handle_status): New.
8082 (main): Delete local `status'. Adjust.
8083 * remote-utils.c: Include target.h.
8084 (prepare_resume_reply): Change prototype to take a
8085 target_waitstatus. Adjust.
8086
8087 * linux-low.c (linux_wait): Adjust to new target_ops->wait
8088 interface.
8089 * spu-low.c (spu_wait): Adjust.
8090 * win32-low.c (enum target_waitkind, struct target_waitstatus):
8091 Delete.
8092 (win32_wait): Adjust.
8093
2bd7c093
PA
80942009-04-01 Pedro Alves <pedro@codesourcery.com>
8095
8096 * target.h (struct thread_resume): Delete leave_stopped member.
8097 (struct target_ops): Add a `n' argument to the `resume' callback.
8098 * server.c (start_inferior): Adjust.
8099 (handle_v_cont, myresume): Adjust.
8100 * linux-low.c (check_removed_breakpoint): Adjust to resume
8101 interface change, and to removed leave_stopped field.
8102 (resume_ptr): Delete.
8103 (struct thread_resume_array): New.
8104 (linux_set_resume_request): Add new `arg' parameter. Adjust to
8105 resume interface change.
8106 (linux_continue_one_thread, linux_queue_one_thread)
8107 (resume_status_pending_p): Check if the resume field is NULL
8108 instead of checking the leave_stopped member.
8109 (linux_resume): Adjust to the target resume interface change.
8110 * spu-low.c (spu_resume): Adjust to the target resume interface
8111 change.
8112 * win32-low.c (win32_detach, win32_resume): Ditto.
8113
c35fafde
PA
81142009-04-01 Pedro Alves <pedro@codesourcery.com>
8115
8116 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
8117 flag.
8118 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
8119 pending.
8120 (linux_continue_one_thread): Only preserve the stepping flag if
8121 there's a pending breakpoint.
8122
0a59d50b
PA
81232009-03-31 Pedro Alves <pedro@codesourcery.com>
8124
8125 * server.c (main): After the inferior having exited, call
8126 remote_close before exiting gdbserver.
8127
f04c6d38
TJB
81282009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
8129
8130 Fix size of FPSCR in Power 7 processors.
8131 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
8132 (PPC_FEATURE_HAS_DFP): New #define.
8133 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
8134 size of the FPSCR.
8135
78e5cee6
PA
81362009-03-23 Pedro Alves <pedro@codesourcery.com>
8137
8138 * server.c (handle_query) Whitespace and formatting.
8139
1b3f6016
PA
81402009-03-22 Pedro Alves <pedro@codesourcery.com>
8141
8142 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
8143 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
8144 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
8145 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
8146 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
8147 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
8148 Makefile.in, configure.ac: Fix whitespace throughout.
8149 * configure: Regenerate.
8150
a07b2135
PA
81512009-03-22 Pedro Alves <pedro@codesourcery.com>
8152
8153 * inferiors.c (find_inferior): Make it safe for the callback
8154 function to delete the currently iterated inferior.
8155
67cc2626
PA
81562009-03-22 Pedro Alves <pedro@codesourcery.com>
8157
8158 * Makefile.in (linuw_low_h): Move higher.
8159 (thread-db.o): Depend on $(linux_low_h).
8160
54a0b537
PA
81612009-03-17 Pedro Alves <pedro@codesourcery.com>
8162
8163 Rename "process" to "lwp" throughout.
8164
8165 * linux-low.c (all_processes): Rename to...
8166 (all_lwps): ... this.
8167 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
8168 (add_process): Rename to ...
8169 (add_lwp): ... this. Adjust.
8170 (linux_create_inferior): Adjust.
8171 (linux_attach_lwp): Adjust.
8172 (linux_attach): Adjust.
8173 (linux_kill_one_process): Rename to ...
8174 (linux_kill_one_lwp): ... this. Adjust.
8175 (linux_kill): Adjust.
8176 (linux_detach_one_process): Rename to ...
8177 (linux_detach_one_lwp): ... this. Adjust.
8178 (linux_detach): Adjust.
8179 (check_removed_breakpoint): Adjust.
8180 (status_pending_p): Adjust.
8181 (linux_wait_for_process): Rename to ...
8182 (linux_wait_for_lwp): ... this. Adjust.
8183 (linux_wait_for_event): Adjust.
8184 (send_sigstop): Adjust.
8185 (wait_for_sigstop): Adjust.
8186 (stop_all_processes): Rename to ...
8187 (stop_all_lwps): ... this.
8188 (linux_resume_one_process): Rename to ...
8189 (linux_resume_one_lwp): ... this. Adjust.
8190 (linux_set_resume_request, linux_continue_one_thread)
8191 (linux_queue_one_thread, resume_status_pending_p)
8192 (usr_store_inferior_registers, regsets_store_inferior_registers)
8193 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8194 Adjust.
8195 * linux-low.h (get_process): Rename to ...
8196 (get_lwp): ... this. Adjust.
8197 (get_thread_process): Rename to ...
8198 (get_thread_lwp): ... this. Adjust.
8199 (get_process_thread): Rename to ...
8200 (get_lwp_thread): ... this. Adjust.
8201 (struct process_info): Rename to ...
8202 (struct lwp_info): ... this.
8203 (all_processes): Rename to ...
8204 (all_lwps): ... this.
8205 * proc-service.c (ps_lgetregs): Adjust.
8206 * thread-db.c (thread_db_create_event, find_one_thread)
8207 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
8208
0b16c5cf
PA
82092009-03-14 Pedro Alves <pedro@codesourcery.com>
8210
8211 * server.c (handle_query): Handle "qAttached".
8212
32de4b9d
NS
82132009-03-13 Nathan Sidwell <nathan@codesourcery.com>
8214
8215 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8216 GPLv3, update license URL.
8217
2aecd87f
DE
82182009-03-01 Doug Evans <dje@google.com>
8219
93efd302 8220 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
8221 (server_h): Add gdb_signals.h.
8222 (signals.o): Update.
8223 * server.h (target_signal_from_host,target_signal_to_host_p)
8224 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8225
86b1f9c5
PM
82262009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8227
8228 * remote-utils.c (getpkt): Also generate remote-debug
8229 information if noack_mode is set.
8230
4aa995e1
PA
82312009-02-06 Pedro Alves <pedro@codesourcery.com>
8232
8233 * server.c (handle_query): Report qXfer:siginfo:read and
8234 qXfer:siginfo:write as supported and handle them.
8235 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8236 * linux-low.c (linux_xfer_siginfo): New.
8237 (linux_target_ops): Set it.
8238
62709adf
PA
82392009-01-26 Pedro Alves <pedro@codesourcery.com>
8240
8241 * server.c (gdbserver_usage): Mention --remote-debug.
8242 (main): Accept '--remote-debug' switch.
8243
aef93bd7
DE
82442009-01-18 Doug Evans <dje@google.com>
8245
8246 * regcache.c (new_register_cache): No need to check result of xcalloc.
8247 * server.c (handle_search_memory): Back out calls to xmalloc,
8248 result is checked and error is returned to user upon failure.
8249 (handle_query): Ditto. Add more checks for result of malloc.
8250 (handle_v_cont): Check result of malloc, report error back to
8251 user upon failure.
8252 (handle_v_run): Ditto. Call freeargv.
8253 * server.h (freeargv): Declare.
8254 * utils.c (freeargv): New fn.
8255
54363045
DE
82562009-01-15 Doug Evans <dje@google.com>
8257
f626972c
DE
8258 * gdbreplay.c (perror_with_name): Make arg const char *.
8259 * server.h (target_signal_to_name): Make return type const char *.
0842e787 8260 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 8261 * utils.c (perror_with_name): Make arg const char *.
54363045 8262
18aae699
PA
82632009-01-14 Pedro Alves <pedro@codesourcery.com>
8264
8265 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8266 when handling a EXIT_PROCESS_DEBUG_EVENT.
8267
ff703abe
JB
82682009-01-06 Joel Brobecker <brobecker@adacore.com>
8269
8270 * gdbreplay.c (gdbreplay_version): Update copyright year.
8271 * server.c (gdbserver_version): Likewise.
8272
f21cc1a2 82732009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
8274
8275 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 8276 (handle_extended_wait): Improve comment.
0e21c1ec 8277
bca929d3
DE
82782008-12-13 Doug Evans <dje@google.com>
8279
8280 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8281 * server.h (ATTR_MALLOC): New macro.
8282 (xmalloc,xcalloc,xstrdup): Declare.
8283 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
8284 * inferiors.c: Ditto.
8285 * linux-low.c: Ditto.
8286 * mem-break.c: Ditto.
8287 * regcache.c: Ditto.
8288 * remote-utils.c: Ditto.
8289 * server.c: Ditto.
8290 * target.c: Ditto.
8291 * win32-low.c: Ditto.
8292
97438e3f
DE
82932008-12-12 Doug Evans <dje@google.com>
8294
896c7fbb
DE
8295 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
8296 in debugging printf.
8297
97438e3f
DE
8298 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
8299
e3b886f8
DE
83002008-12-09 Doug Evans <dje@google.com>
8301
8302 * linux-low.h (struct process_info): Delete member tid, unused.
8303 * thread-db.c (find_one_thread): Update.
8304 (maybe_attach_thread): Update.
8305
07e059b5
VP
83062008-12-02 Pedro Alves <pedro@codesourcery.com>
8307
889bf7c5
PA
8308 * target.h (struct target_ops): Add qxfer_osdata member.
8309 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
8310 and dirent.h.
8311 (linux_qxfer_osdata): New functions.
8312 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
8313 callback.
8314 * server.c (handle_query): Handle "qXfer:osdata:read:".
8315 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
8316 (buffer_xml_printf): New functions.
8317 * server.h (struct buffer): New.
8318 (buffer_grow_str, buffer_grow_str0): New macros.
8319 (buffer_grow, buffer_free, buffer_init, buffer_finish)
8320 (buffer_xml_printf): Declare.
07e059b5 8321
4cab47ab
DE
83222008-11-24 Doug Evans <dje@google.com>
8323
8324 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
8325
f142445f
DJ
83262008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
8327
8328 * server.c (handle_v_run): Always use the supplied argument list.
8329
d0107bb6 83302008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 8331
d0107bb6
BW
8332 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
8333 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 8334
2c4ad781
TJB
83352008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
8336
8337 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
8338 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
8339 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
8340 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
8341 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
8342 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
8343 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
8344 XML target descriptions.
8345 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
8346 when inferior is running on an ISA 2.05 or later processor. Add
8347 special case to return offset for full 64-bit slot of FPSCR when
8348 in 32-bits.
8349
dfb64f85
DJ
83502008-11-14 Daniel Gutson <dgutson@codesourcery.com>
8351
8352 * Makefile.in (SFILES, clean): Added sparc64 files.
8353 (reg-sparc64.o, reg-sparc64.c): New.
8354 * configure.srv (sparc*-*-linux*): New configuration.
8355 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
8356 syscall arguments for SPARC.
8357 (regsets_store_inferior_registers): Likewise.
8358 * linux-sparc-low.c: New file.
8359
66b6e1dd
DE
83602008-10-21 Doug Evans <dje@google.com>
8361
8362 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
8363 (READLINE_DIR,READLINE_DEP): Delete.
8364 (INTERNAL_CFLAGS): Update.
8365 (LINTFLAGS): Update.
8366
9b710a42
PA
83672008-10-10 Pedro Alves <pedro@codesourcery.com>
8368
8369 * server.c (handle_v_run): If GDB didn't specify an argv, use the
8370 whole argv from the last run, not just argv[0].
8371
5822d809
PA
83722008-09-08 Pedro Alves <pedro@codesourcery.com>
8373
8374 * regcache.c (new_register_cache): Return NULL if the register
8375 cache size isn't known yet.
8376 (free_register_cache): Avoid dereferencing a NULL regcache.
8377
74aac56f
DJ
83782008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8379
8380 * configure.srv: Merge MIPS and MIPS64.
8381
400b20f5
MR
83822008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
8383
8384 * Makefile.in (uninstall): Apply $(EXEEXT) too.
8385
677c5bb1
LM
83862008-08-18 Luis Machado <luisgpm@br.ibm.com>
8387
8388 * Makefile.in: Add required vsx dependencies.
8389
8390 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
8391 Declare init_registers_powerpc_vsx32l.
8392 Declare init_registers_powerpc_vsx64l.
8393 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
8394 (ppc_arch_setup): Check for VSX in hwcap.
8395 (ppc_fill_vsxregset): New function.
8396 (ppc_store_vsxregset): New function.
8397 Add new VSX entry in regset_info target_regsets.
8398
8399 * configure.srv: Add new VSX dependencies.
8400
a6f3e723
SL
84012008-08-12 Pedro Alves <pedro@codesourcery.com>
8402
8403 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
8404 (remote_open): Set or clear transport_is_reliable.
8405 (putpkt_binary): Don't expect acks in noack mode.
8406 (getpkt): Don't send ack/nac in noack mode.
8407 * server.c (handle_general_set): Handle QStartNoAckMode.
8408 (handle_query): If connected by tcp pass QStartNoAckMode+ in
8409 qSupported.
8410 (main): Reset noack_mode on every connection.
8411 * server.h (noack_mode): Declare.
8412
a417dc56
RW
84132008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8414
8415 * Makefile.in (GDBREPLAY_OBS): New variable.
8416 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
8417
3221518c
UW
84182008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
8419 Daniel Jacobowitz <dan@codesourcery.com>
8420
8421 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
8422 (usr_store_inferior_registers): Likewise.
8423 (regsets_store_inferior_registers): Likewise.
8424
ec56be1b
PA
84252008-07-31 Rolf Jansen <rj@surtec.com>
8426 Pedro Alves <pedro@codesourcery.com>
8427
8428 * configure.ac: Check for memmem declaration.
8429 * server.c [HAVE_MALLOC_H]: Include malloc.h.
8430 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
8431 (disable_packet_qfThreadInfo): Unconditionally compile.
8432 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
8433 * configure, config.in: Regenerate.
8434
2fe5e3ff
DE
84352008-07-28 Doug Kwan <dougkwan@google.com>
8436
8437 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
8438 (linux_write_memory): Remove declaration of errno.
8439
836acd6d
UW
84402008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
8441
8442 * linux-low.c (handle_extended_wait): Do not use "status"
8443 variable uninitialized.
8444
aeba519e
PA
84452008-07-07 Pedro Alves <pedro@codesourcery.com>
8446
8447 * server.c (handle_v_attach): Inhibit reporting dll changes.
8448
db42f210
PA
84492008-06-27 Pedro Alves <pedro@codesourcery.com>
8450
8451 * remote-utils.c (prepare_resume_reply): If requested, don't
8452 output "thread:TID" in the T stop reply.
8453
8454 * server.c (disable_packet_vCont, disable_packet_Tthread)
8455 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
8456 (handle_query): If requested, disable support for qC, qfThreadInfo
8457 and qsThreadInfo.
8458 (handle_v_requests): If requested, disable support for vCont.
8459 (gdbserver_show_disableable): New.
8460 (main): Handle --disable-packet and --disable-packet=LIST.
8461
8462 * server.h (disable_packet_vCont, disable_packet_Tthread)
8463 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
8464
8e4c5421
CD
84652008-06-20 Carlos O'Donell <carlos@codesourcery.com>
8466
8467 * server.c (gdbserver_usage): Mention --version.
8468
6e23a804
DJ
84692008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
8470
8471 * Makefile.in (gdbreplay.o): New rule.
8472
90aa6a40
JM
84732008-06-06 Joseph Myers <joseph@codesourcery.com>
8474
8475 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
8476 message, not gdbserver.
8477
c16158bc 84782008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
8479 Nathan Sidwell <nathan@codesourcery.com>
8480 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
8481
8482 * acinclude.m4: Include ../../config/acx.m4.
8483 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
8484 * configure, config.in: Regenerate.
8485 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
8486 * server.c (gdbserver_version): Print PKGVERSION.
8487 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
8488 (main): Adjust gdbserver_usage calls.
8489 * gdbreplay.c (version, host_name): Add declarations.
8490 (gdbreplay_version, gdbreplay_usage): New.
8491 (main): Accept --version and --help options.
8492
aeb75bf5
DJ
84932008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
8494
8495 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
8496 (arm_breakpoint_at): Handle Thumb.
8497 (the_low_target): Add comment.
8498
76b233dd
UW
84992008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
8500
8501 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
8502
08388c79
DE
85032008-05-09 Doug Evans <dje@google.com>
8504
a3c83fae
DE
8505 * server.h (decode_search_memory_packet): Declare.
8506 * remote-utils.c (decode_search_memory_packet): New fn.
8507 * server.c (handle_search_memory_1): New fn.
08388c79
DE
8508 (handle_search_memory): New fn.
8509 (handle_query): Process qSearch:memory packets.
8510
bb9c3d36
UW
85112008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
8512
8513 * regcache.c (registers_length): Remove.
8514 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
8515 full register packet.
8516 * regcache.h (registers_length): Remove prototype.
8517 * server.h (PBUFSIZ): Define to 16384.
8518
7284e1be
UW
85192008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
8520
8521 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
8522 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
8523 powerpc-64l.o, and powerpc-altivec64l.o.
8524 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
8525 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
8526 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
8527 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
8528 rs6000/power-linux.xml, and rs6000/power64-linux.xml
8529 to srv_xmlfiles.
8530
8531 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
8532 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
8533 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
8534 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
8535 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
8536 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
8537 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
8538 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
8539 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
8540 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
8541 (clean): Update.
8542
8543 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
8544 (init_registers_powerpc_32l): ... this new prototype.
8545 (init_registers_powerpc_32): Remove, replace by ...
8546 (init_registers_powerpc_altivec32l): ... this new prototype.
8547 (init_registers_powerpc_e500): Remove, replace by ...
8548 (init_registers_powerpc_e500l): ... this new prototype.
8549 (init_registers_ppc64): Remove, replace by ...
8550 (init_registers_powerpc_64l): ... this new prototype.
8551 (init_registers_powerpc_64): Remove, replace by ...
8552 (init_registers_powerpc_altivec64l): ... this new prototype.
8553 (ppc_num_regs): Set to 73.
8554 (PT_ORIG_R3, PT_TRAP): Define if necessary.
8555 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
8556 (ppc_cannot_store_register): Handle orig_r3 and trap.
8557 (ppc_arch_setup): Update init_registers_... calls.
8558 (ppc_fill_gregset): Handle orig_r3 and trap.
8559
8560 * inferiors.c (clear_inferiors): Reset current_inferior.
8561
fdc59709
PB
85622008-04-23 Paolo Bonzini <bonzini@gnu.org>
8563
889bf7c5
PA
8564 * acinclude.m4: Add override.m4.
8565 * configure: Regenerate.
fdc59709 8566
c9b2f845
UW
85672008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8568
8569 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
8570 initial call to init_register_ppc64.
8571
550512b8
UW
85722008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8573
43aaf8b6
PA
8574 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
8575 single powerpc*-*-linux* case.
550512b8
UW
8576 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
8577
b6430ec3
UW
85782008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
8579
8580 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 8581 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
8582 from reg_xmlfiles.
8583 * linux-ppc-low.c: Include <elf.h>.
8584 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
8585 (ppc_hwcap): New global variable.
8586 (ppc_regmap): Remove __SPE__ #ifdef sections.
8587 (ppc_regmap_e500): New global variable.
8588 (ppc_cannot_store_register): Update __SPE__ special case.
8589 (ppc_get_hwcap): New function.
8590 (ppc_arch_setup): Use it to determine whether inferior supports
8591 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
8592 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
8593 Do not access registers if target does not support AltiVec.
8594 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
8595 Do not access registers if target does not support SPE.
8596 (target_regsets): Unconditionally include AltiVec and SPE regsets.
8597
52fa2412
UW
85982008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
8599
8600 * linux-low.c (disabled_regsets, num_regsets): New.
8601 (use_regsets_p): Delete.
8602 (linux_wait_for_process): Clear disabled_regsets.
8603 (regsets_fetch_inferior_registers): Check and set it.
8604 (regsets_store_inferior_registers): Likewise.
8605 (linux_fetch_registers, linux_store_registers): Do not use
8606 use_regsets_p.
8607 (initialize_low): Allocate disabled_regsets.
8608
e28b3332
DJ
86092008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
8610
8611 * Makefile.in (LIBOBJS): New.
8612 (OBS): Use LIBOBJS.
8613 (memmem.o): New rule.
8614 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
8615 * configure: Regenerated.
8616
4536995d
UW
86172008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
8618
8619 * server.c (handle_query): Never return "unsupported" for
8620 qXfer:features:read queries.
8621
221c031f
UW
86222008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
8623
8624 * server.c (get_features_xml): Fix inverted condition.
8625 (handle_query): Always support qXfer:feature:read.
8626
ccd213ac
DJ
86272008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
8628
8629 * server.c (wrapper_argv): New.
8630 (start_inferior): Handle wrapper_argv. If set, expect an extra
8631 trap.
8632 (gdbserver_usage): Document --wrapper.
8633 (main): Parse --wrapper.
8634
6fe305f7
UW
86352008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8636
8637 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
8638 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
8639 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
8640 (ppc_set_pc): Likewise.
8641 (ppc_arch_setup): New function.
8642 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
8643 of collect_register.
889bf7c5 8644 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 8645
5b0a002e
UW
86462008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8647
8648 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
8649 instead of linux-ppc64-low.o.
8650 * linux-ppc64-low.c: Remove file.
8651 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
8652 (linux-ppc64-low.o): Remove rule.
8653
8654 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
8655 (init_registers_powerpc_64): Likewise.
8656 (ppc_regmap): Conditionally define depending on __powerpc64__.
8657 (ppc_cannot_store_register): Do not special-case "fpscr" when
8658 compiled on __powerpc64__.
8659 (ppc_collect_ptrace_register): New function.
8660 (ppc_supply_ptrace_register): New function.
8661 (ppc_breakpoint): Change type to "unsigned int".
8662 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
8663 (the_low_target): Conditionally provide initializers for the
889bf7c5 8664 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
8665 collect_ptrace_register and supply_ptrace_register members.
8666
9b4b61c8
UW
86672008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8668
8669 * regcache.h (gdbserver_xmltarget): Add extern declaration.
8670 * server.c (gdbserver_xmltarget): Define.
8671 (get_features_xml): Use it to replace "target.xml" and arch_string.
8672
8673 * configure.srv: Remove srv_xmltarget. Add XML files that were
8674 mentioned there to srv_xmlfiles instead. Remove conditional tests
8675 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
8676 srv_xmlfiles and srv_regobj to include all possible choices.
8677 * configure.ac (srv_xmltarget): Remove.
8678 (srv_xmlfiles): Do not add "target.xml".
8679 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
8680 checks for supplementary target information.
8681 * configure: Regenerate.
8682 * Makefile.in (XML_TARGET): Remove.
8683 (target.xml): Remove rule.
8684 (clean): Do not clean up target.xml.
8685 (.PRECIOUS): Do not mention target.xml.
8686
8687 * target.h (struct target_ops): Remove arch_string member.
8688 * linux-low.c (linux_arch_string): Remove.
8689 (linux_target_ops): Remove arch_string initializer.
8690 * linux-low.h (struct linux_target_ops): Remove arch_string member.
8691 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
8692 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
8693 * spu-low.c (spu_arch_string): Remove.
8694 (spu_target_ops): Remove arch_string initializer.
8695 * win32-low.c (win32_arch_string): Remove.
8696 (win32_target_ops): Remove arch_string initializer.
8697 * win32-low.h (struct win32_target_ops): Remove arch_string member.
8698 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
8699 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
8700
ee1a7ae4
UW
87012008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8702
8703 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
8704 by collect_ptrace_register and supply_ptrace_register hooks.
8705 * linux-low.c (fetch_register): Use supply_ptrace_register callback
8706 instead of checking for the_low_target.left_pad_xfer.
8707 (usr_store_inferior_registers): Use collect_ptrace_register callback
8708 instead of checking for the_low_target.left_pad_xfer.
8709
8710 * linux-s390-low.c (s390_collect_ptrace_register): New function.
8711 (s390_supply_ptrace_register): Likewise.
8712 (s390_fill_gregset): Call s390_collect_ptrace_register.
8713 (the_low_target): Update.
8714
8715 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
8716 (ppc_supply_ptrace_register): Likewise.
8717 (the_low_target): Update.
8718
8719 * linux-i386-low.c (the_low_target): Update.
8720 * linux-x86-64-low.c (the_low_target): Update.
8721
d61ddec4
UW
87222008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8723
8724 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
8725 reg-s390.o and reg-s390x.o.
8726
8727 * linux-low.c (new_inferior): New global variable.
8728 (linux_create_inferior, linux_attach): Set it.
8729 (linux_wait_for_process): Call the_low_target.arch_setup after the
8730 target has stopped for the first time.
8731 (initialize_low): Do not call the_low_target.arch_setup.
8732
8733 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
8734 (s390_set_pc): Likewise.
8735 (s390_arch_setup): New function.
8736 (the_low_target): Use s390_arch_setup as arch_setup routine.
8737
8738 * regcache.c (realloc_register_cache): New function.
8739 (set_register_cache): Call it for each existing regcache.
8740
d05b4ac3
UW
87412008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8742
8743 * server.h (init_registers): Remove prototype.
8744
8745 * linux-low.h (struct linux_target_ops): Add arch_setup field.
8746 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
8747 instead of init_registers ().
8748 * linux-arm-low.c (init_registers_arm): Add prototype.
8749 (init_registers_arm_with_iwmmxt): Likewise.
8750 (the_low_target): Add initializer for arch_setup field.
8751 * linux-cris-low.c (init_registers_cris): Add prototype.
8752 (the_low_target): Add initializer for arch_setup field.
8753 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
8754 (the_low_target): Add initializer for arch_setup field.
8755 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
8756 (the_low_target): Add initializer for arch_setup field.
8757 * linux-ia64-low.c (init_registers_ia64): Add prototype.
8758 (the_low_target): Add initializer for arch_setup field.
8759 * linux-m32r-low.c (init_registers_m32r): Add prototype.
8760 (the_low_target): Add initializer for arch_setup field.
8761 * linux-m68k-low.c (init_registers_m68k): Add prototype.
8762 (the_low_target): Add initializer for arch_setup field.
8763 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
8764 (init_registers_mips64_linux): Likewise.
8765 (the_low_target): Add initializer for arch_setup field.
8766 * linux-ppc-low.c (init_registers_ppc): Add prototype.
8767 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
8768 (the_low_target): Add initializer for arch_setup field.
8769 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
8770 (init_registers_powerpc_64): Likewise.
8771 (the_low_target): Add initializer for arch_setup field.
8772 * linux-s390-low.c (init_registers_s390): Add prototype.
8773 (init_registers_s390x): Likewise.
8774 (the_low_target): Add initializer for arch_setup field.
8775 * linux-sh-low.c (init_registers_sh): Add prototype.
8776 (the_low_target): Add initializer for arch_setup field.
8777 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
8778 (the_low_target): Add initializer for arch_setup field.
8779 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
8780 (the_low_target): Add initializer for arch_setup field.
8781
8782 * win32-low.h (struct win32_target_ops): Add arch_setup field.
8783 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
8784 instead of init_registers ().
8785 * win32-arm-low.c (init_registers_arm): Add prototype.
8786 (the_low_target): Add initializer for arch_setup field.
8787 * win32-i386-low.c (init_registers_i386): Add prototype.
8788 (the_low_target): Add initializer for arch_setup field.
8789
8790 * spu-low.c (init_registers_spu): Add prototype.
8791 (initialize_low): Call initialie_registers_spu () instead of
8792 initialize_registers ().
8793
fd96d250
PA
87942008-02-19 Pedro Alves <pedro@codesourcery.com>
8795
8796 * server.c (handle_v_requests): When handling the vRun and vAttach
8797 packets, if already debugging a process, don't kill it. Return an
8798 error instead.
8799
d41b6bb4
DJ
88002008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
8801
8802 * server.c (handle_query): Correct length check.
8803
5ac588cf
PA
88042008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
8805
8806 * win32-low.c (do_initial_child_stuff): Add process handle
8807 parameter. Set current_process_handle and current_process_id from the
8808 parameters. Clear globals.
8809 (win32_create_inferior): Don't set current_process_handle and
8810 current_process_id here. Instead pass them on the call to
8811 do_initial_child_stuff.
8812 (win32_attach): Likewise.
8813 (win32_clear_inferiors): New.
8814 (win32_kill): Don't close the current process handle or the
8815 current thread handle here. Instead call win32_clear_inferiors.
8816 (win32_detach): Don't open a new handle to the process. Call
8817 win32_clear_inferiors.
8818 (win32_join): Don't rely on current_process_handle; open a new
8819 handle using the process id.
8820 (win32_wait): Call win32_clear_inferiors when the inferior process
8821 has exited.
8822
ecd7ecbc
DJ
88232008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
8824
8825 * server.c (monitor_show_help): Add "exit".
8826
1525d545
MG
88272008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
8828
ecd7ecbc 8829 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
8830 (clean): Add reg-xtensa.c.
8831 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
8832 * configure.srv (xtensa*-*-linux*) New target.
8833 * linux-xtensa-low.c: New.
8834 * xtensa-xtregs.c: New.
1525d545 8835
59a016f0
PA
88362008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
8837
8838 * hostio.c: Don't include errno.h.
8839 (errno_to_fileio_errno): Move to hostio-errno.
8840 * hostio.c: (hostio_error): Remove the error parameter. Defer the
8841 error number outputting to the target->hostio_last_error callback.
8842 (hostio_packet_error): Use FILEIO_EINVAL directly.
8843 (handle_open, handle_pread, hostio_error, handle_unlink): Update
8844 calls to hostio_error.
8845 * hostio-errno.c: New.
8846 * server.h (hostio_last_error_from_errno): Declare.
8847 * target.h (target_ops): Add hostio_last_error member.
8848 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
8849 as hostio_last_error handler.
889bf7c5 8850 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
8851 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
8852 (wince_hostio_last_error): New functions.
8853 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
8854 as hostio_last_error handler.
8855 (win32_target_ops) [!_WIN32_WCE]: Register
8856 hostio_last_error_from_errno as hostio_last_error handler.
8857 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
8858 (hostio-errno.o): New rule.
8859 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
8860 * configure.srv (srv_hostio_err_objs): New variable. Default to
8861 hostio-errno.o.
8862 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
8863 * configure: Regenerate.
8864
2d717e4f
DJ
88652008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8866
8867 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
8868 (linux_kill, linux_detach): Clean up the process list.
8869 * remote-utils.c (remote_open): Improve port number parsing.
8870 (putpkt_binary, input_interrupt): Only send interrupts if the target
8871 is running.
8872 * server.c (extended_protocol): Make static.
8873 (attached): Define earlier.
8874 (exit_requested, response_needed, program_argv): New variables.
8875 (target_running): New.
8876 (start_inferior): Clear attached here.
8877 (attach_inferior): Set attached here.
8878 (require_running): Define.
8879 (handle_query): Use require_running and target_running. Implement
8880 "monitor exit".
8881 (handle_v_attach, handle_v_run): New.
8882 (handle_v_requests): Use require_running. Handle vAttach and vRun.
8883 (gdbserver_usage): Update.
8884 (main): Redo argument parsing. Handle --debug and --multi. Handle
8885 --attach along with other options or after the port. Save
8886 program_argv. Support no initial program. Resynchronize
8887 communication with GDB after an error. Handle "monitor exit".
8888 Use require_running and target_running. Always allow the extended
8889 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
8890 restart in extended mode.
8891 * README: Refer to the GDB manual. Update --attach usage.
8892
7407e2de
AS
88932007-12-20 Andreas Schwab <schwab@suse.de>
8894
8895 * linux-low.c (STACK_SIZE): Define.
8896 (linux_tracefork_child): Use it. Use __clone2 on ia64.
8897 (linux_test_for_tracefork): Likewise.
8898
b65d95c5
DJ
88992007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
8900
8901 * linux-low.c (linux_wait_for_event): Update messages. Do not
8902 reinsert auto-delete breakpoints.
8903 * mem-break.c (struct breakpoint): Change return type of handler to
8904 int.
8905 (set_breakpoint_at): Update handler type.
8906 (reinsert_breakpoint_handler): Return 1 instead of calling
8907 delete_breakpoint.
8908 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
8909 setting a new one.
8910 (check_breakpoints): Delete auto-delete breakpoints and return 2.
8911 * mem-break.h (set_breakpoint_at): Update handler type.
8912 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
8913 * win32-low.c (auto_delete_breakpoint): New.
8914 (get_child_debug_event): Use it.
8915
4e799345
DJ
89162007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
8917
8918 * configure.ac: Check for pread and pwrite.
8919 * hostio.c (handle_pread): Fall back to lseek and read.
8920 (handle_pwrite): Fall back to lseek and write.
8921 * config.in, configure: Regenerated.
8922
27524b67
DJ
89232007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
8924
8925 * server.c (myresume): Add own_buf argument.
8926 (main): Update calls.
8927
a20d5e98
DJ
89282007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
8929
8930 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
8931 * remote-utils.c (remote_open): Do not call disable_async_io.
8932 (block_async_io): Delete.
8933 (unblock_async_io): Make static.
8934 (initialize_async_io): New.
8935 * server.c (handle_v_cont): Handle async I/O here.
8936 (myresume): Likewise. Move other common resume tasks here...
8937 (main): ... from here. Call initialize_async_io. Disable async
8938 I/O before the main loop.
8939 * server.h (initialize_async_io): Declare.
8940 (block_async_io, unblock_async_io): Delete prototypes.
8941 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
8942
b79d787e
DJ
89432007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
8944
8945 * remote-utils.c (readchar): Allow binary data in received messages.
8946
d97903b2
PA
89472007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8948
8949 * win32-low.c (attaching): New global.
8950 (win32_create_inferior): Clear the `attaching' global.
8951 (win32_attach): Set the `attaching' global.
8952 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
8953 attaching. Only set a breakpoint at the entry point if not
8954 attaching.
8955
311de423
PA
89562007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8957
8958 * server.c (main): Don't report dll events on the initial
8959 connection on attaches.
8960
6c2d16d2
PA
89612007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8962
8963 * server.c (main): Relax numerical bases supported for the pid of
8964 the --attach command line argument.
8965
5ca906e6
PA
89662007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8967
8968 * win32-low.c (win32_attach): Call OpenProcess before
8969 DebugActiveProcess, not after. Add last error output to error
8970 call.
8971
9c6c8194
PA
89722007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8973
8974 * win32-low.c (win32_get_thread_context)
8975 (win32_set_thread_context): New functions.
8976 (thread_rec): Use win32_get_thread_context.
8977 (continue_one_thread, win32_resume): Use win32_set_thread_context.
8978 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
8979 field.
8980
4d5d1aaa
PA
89812007-12-03 Leo Zayas
8982 Pedro Alves <pedro_alves@portugalmail.pt>
8983
8984 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
8985 global variables.
8986 (child_add_thread): Minor cleanup.
8987 (child_continue): Resume artificially suspended threads before
8988 calling ContinueDebugEvent.
8989 (suspend_one_thread): New.
8990 (fake_breakpoint_event): New.
8991 (get_child_debug_event): Change return type to int. Check here if
8992 gdb sent an interrupt request. If a soft interrupt was requested,
8993 fake a breakpoint event. Return 0 if there is no event to handle,
8994 and 1 otherwise.
8995 (win32_wait): Don't check here if gdb sent an interrupt request.
8996 Ensure there is a valid event to handle.
8997 (win32_request_interrupt): Add soft interruption method as last
8998 resort.
8999
c436e841
PA
90002007-12-03 Leo Zayas
9001 Pedro Alves <pedro_alves@portugalmail.pt>
9002
9003 * win32-low.h (win32_thread_info): Add descriptions to the
9004 structure members. Replace `suspend_count' counter by a
9005 `suspended' flag.
9006 * win32-low.c (thread_rec): Update condition of when to get the
9007 context from the inferior. Rely on ContextFlags being set if it
9008 has already been retrieved. Only suspend the inferior thread if
9009 we haven't already. Warn if that fails.
9010 (continue_one_thread): s/suspend_count/suspended/. Only call
9011 ResumeThread once. Warn if that fails.
9012
e7b5fa67
PA
90132007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9014
9015 * win32-low.c (win32_wait): Don't read from the inferior when it
9016 has already exited.
9017
a385171d
PA
90182007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9019
9020 * Makefile.in (win32_low_h): New variable.
9021 (win32-low.o): Add dependency on $(win32_low_h).
9022 (win32-arm-low.o, win32-i386-low.o): New rules.
9023
f80c84b3
DJ
90242007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9025
9026 * hostio.c: Correct copyright year.
9027
a6b151f1
DJ
90282007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9029
9030 * Makefile.in (OBS): Add hostio.o.
9031 (hostio.o): New rule.
9032 * server.h (handle_vFile): Declare.
9033 * hostio.c: New file.
9034 * server.c (handle_v_requests): Take packet_len and new_packet_len
9035 for binary packets. Call handle_vFile.
9036 (main): Update call to handle_v_requests.
9037
f9387fc3
DJ
90382007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
9039
9040 * linux-low.c: Include <sched.h>.
9041
51c2684e
DJ
90422007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
9043
9044 * linux-low.c (linux_tracefork_grandchild): New.
9045 (linux_tracefork_child): Use clone.
9046 (linux_test_for_tracefork): Use clone; allocate and free a stack.
9047
75f83163
JB
90482007-10-31 Joel Brobecker <brobecker@adacore.com>
9049
9050 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9051
da5898ce
DJ
90522007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
9053
9054 * linux-low.c (handle_extended_wait): Handle unexpected signals.
9055
24a09b5f
DJ
90562007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
9057
9058 * inferiors.c (change_inferior_id): Delete.
9059 (add_pid_to_list, pull_pid_from_list): New.
9060 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
9061 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
9062 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
9063 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
9064 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
9065 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
9066 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
9067 (using_threads): Always set to 1.
9068 (handle_extended_wait): New.
9069 (add_process): Do not set TID.
9070 (linux_create_inferior): Set must_set_ptrace_flags.
9071 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
9072 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
9073 (linux_thread_alive): Rename TID argument to LWPID.
9074 (linux_wait_for_process): Handle unknown processes. Do not use TID.
9075 (linux_wait_for_event): Do not use TID or check using_threads. Update
9076 call to dead_thread_notify. Call handle_extended_wait.
9077 (linux_create_inferior): Use PTRACE_SETOPTIONS.
9078 (send_sigstop): Delete sigstop_sent.
9079 (wait_for_sigstop): Avoid TID.
9080 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
9081 (linux_test_for_tracefork): New.
9082 (linux_lookup_signals): Use thread_db_active and
9083 linux_supports_tracefork_flag.
9084 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
9085 * linux-low.h (get_process_thread): Avoid TID.
9086 (struct process_ifo): Move thread_known and tid to the end. Remove
9087 sigstop_sent.
9088 (linux_attach_lwp, thread_db_init): Update prototypes.
9089 * server.h (change_inferior_id): Delete prototype.
9090 (add_pid_to_list, pull_pid_from_list): New prototypes.
9091 * thread-db.c (thread_db_use_events): New.
9092 (find_first_thread): Rename to...
9093 (find_one_thread): ...this. Update callers and messages. Do not
9094 call fatal. Check thread_db_use_events. Do not call
9095 change_inferior_id or new_thread_notify.
9096 (maybe_attach_thread): Update. Do not call new_thread_notify.
9097 (thread_db_init): Set thread_db_use_events. Check use_events.
9098 * utils.c (fatal, warning): Correct message prefix.
9099
30ed0a8f
DJ
91002007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
9101
9102 * Makefile.in (clean): Remove new files.
9103 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
9104 (powerpc-64.o, powerpc-64.c): New rules.
9105 * configure.srv: Use alternate register sets for powerpc64-*-linux*
9106 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
9107 with SPE.
9108 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
9109 SPE targets.
9110 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
9111 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
9112 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
9113 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
9114 (target_regsets): Add AltiVec and SPE register sets.
9115 * configure.ac: Check for AltiVec and SPE.
9116 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
9117 (ppc_fill_vrregset, ppc_store_vrregset): New.
9118 (target_regsets): Add AltiVec register set.
9119 * configure: Regenerated.
9120
fd462a61
DJ
91212007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
9122
9123 * linux-low.c (O_LARGEFILE): Define.
9124 (linux_read_memory): Use /proc/PID/mem.
9125 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
9126 * configure, config.in: Regenerated.
9127
69f223ed
DJ
91282007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9129
9130 * linux-low.c (linux_wait_for_event): Do not pass signals while
9131 single-stepping.
9132
aec18585
PA
91332007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9134
9135 * win32-low.c (create_process): New.
9136 (win32_create_inferior): Use create_process instead of
9137 CreateProcess. If create_process failed retry appending an ".exe"
9138 suffix. Store the GetLastError result immediatelly after
9139 create_process calls and use it on the call to error.
9140
34d86ddd
PA
91412007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9142
9143 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
9144
5a0e3bd0
JB
91452007-08-23 Joel Brobecker <brobecker@adacore.com>
9146
9147 * configure.ac: Switch license to GPLv3.
9148
f88c79e6
MS
91492007-08-01 Michael Snyder <msnyder@access-company.com>
9150
9151 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
9152
6b3d9b83
PA
91532007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
9154
9155 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
9156 typedef.
9157 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
9158 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
9159 CloseToolhelp32Snapshot.
9160 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9161 CloseToolhelp32Snapshot.
9162
c588c53c
MS
91632007-07-27 Michael Snyder <michael.snyder@access-company.com>
9164
9165 * server.c (main): Check for inferior exit before main loop.
9166
aa0403d9
PA
91672007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
9168
9169 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
9170 instead of on tmp_desc.
9171
255e7678
DJ
91722007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
9173 Daniel Jacobowitz <dan@codesourcery.com>
9174
9175 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
9176 (add_thread): Minor cleanups.
9177 (clear_inferiors): Move lower in the file. Clear the DLL
9178 list.
9179 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9180 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9181 (xml_escape_text): New.
9182 * server.c (handle_query): Handle qXfer:libraries:read. Report it
9183 for qSupported.
9184 (handle_v_cont): Report errors.
9185 (gdbserver_version): Update.
9186 (main): Correct size of own_buf. Do not report initial DLL events.
9187 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9188 (unloaded_dll, xml_escape_text): New.
9189 * win32-low.c (enum target_waitkind): Update comments.
9190 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9191 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9192 (win32_EnumProcessModules, win32_GetModuleInformation)
9193 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9194 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9195 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9196 (win32_Module32First, win32_Module32Next, load_toolhelp)
9197 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
9198 (get_child_debug_event): Handle DLL events.
9199 (win32_wait): Likewise.
9200
0d37add9
DJ
92012007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9202
9203 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
9204 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
9205
45e2715e
PA
92062007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9207
9208 * win32-low.c (handle_output_debug_string): Ignore event if not
9209 waiting.
9210
c5674cf1
PA
92112007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9212
9213 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9214
2bbe3cc1
DJ
92152007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9216
9217 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9218
ae13219e
DJ
92192007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9220
9221 * inferiors.c (change_inferior_id): Add comment.
9222 * linux-low.c (check_removed_breakpoint): Add an early
9223 prototype. Improve debug output.
9224 (linux_attach): Doc update.
9225 (linux_detach_one_process, linux_detach): Clean up before releasing
9226 each process.
9227 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9228 * linux-low.h (struct process_info): Doc improvement.
9229 * mem-break.c (delete_all_breakpoints): New.
9230 * mem-break.h (delete_all_breakpoints): New prototype.
9231 * thread-db.c (find_first_thread): New.
9232 (thread_db_create_event): Call it instead of
9233 thread_db_find_new_threads. Clean up unused variables.
9234 (maybe_attach_thread): Remove first thread handling.
9235 (thread_db_find_new_threads): Use find_first_thread.
9236 (thread_db_get_tls_address): Likewise.
9237
4105de34
DJ
92382007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9239
9240 * thread-db.c (thread_db_find_new_threads): Add prototype.
9241 (thread_db_create_event): Check for the main thread before adding
9242 a new thread.
9243 (maybe_attach_thread): Only enable event reporting if TID == 0.
9244 (thread_db_get_tls_address): Check for new threads.
9245
2b876972
DJ
92462007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
9247
9248 * linux-low.c (linux_create_inferior): Try execv before execvp.
9249 * spu-low.c (spu_create_inferior): Likewise.
9250
7a245884
DJ
92512007-06-13 Mike Frysinger <vapier@gentoo.org>
9252
9253 * linux-low.c (linux_create_inferior): Change execv to execvp.
9254 * spu-low.c (spu_create_inferior): Likewies.
9255
117ce543
DJ
92562007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
9257
9258 * Makefile.in (clean): Clean new files instead of deleted ones.
9259 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9260 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9261 rules.
9262 * configure.srv: Specify XML files and new regformats for MIPS and
9263 MIPS64 GNU/Linux.
9264 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9265 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9266 an entry for the restart register.
9267 (mips_cannot_fetch_register, mips_cannot_store_register)
9268 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9269 register names to match the XML descriptions.
9270 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9271 restart register instead of $0.
9272
0e7f50da
UW
92732007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9274 Markus Deuling <deuling@de.ibm.com>
9275
9276 * remote-utils.c (decode_xfer_write): New function.
9277 * server.h (decode_xfer_write): Add prototype.
9278 * server.c (handle_query): Add PACKET_LEN argument. Support
9279 qXfer:spu:read and qXfer:spu:write packets.
9280 (main): Pass packet_len to handle_query.
9281 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9282 * target.h (target_ops): Add qxfer_spu.
9283
374c1d38
UW
92842007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9285
9286 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
9287 accessing non-seekable spufs files.
9288
bb63802a
UW
92892007-05-16 Markus Deuling <deuling@de.ibm.com>
9290
889bf7c5 9291 * server.c (handle_query): Add reply for qC packet.
bb63802a 9292
7390519e
PA
92932007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9294 Leo Zayas <lerele@champenstudios@com>
9295
9296 * server.h (check_remote_input_interrupt_request): New function.
9297 * remote_utils.c (INVALID_DESCRIPTOR): New define.
9298 (remote_desc): Initialize with INVALID_DESCRIPTOR.
9299 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
9300 (check_remote_input_interrupt_request): New function.
9301 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 9302 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
9303 winapi_GenerateConsoleCtrlEvent): New typedefs.
9304 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
9305 to 250 ms.
9306 (win32_wait): Check for remote interrupt request
9307 with check_remote_input_interrupt_request.
9308 (win32_request_interrupt): New function.
9309 (win32_target_op): Set request_interrupt to win32_request_interrupt.
9310
34b34921
PA
93112007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9312
9313 * win32-low.c (debug_registers_changed,
9314 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
9315 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
9316 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
9317 (thread_rec): Get context using the low target.
9318 (child_add_thread): Call thread_added on the low target,
9319 which does the same thing.
9320 (regptr): Delete.
9321 (do_initial_child_stuff): Remove debug registers references.
9322 Set context using the low target. Resume threads after
9323 setting the contexts.
9324 (child_continue): Remove dead variable. Remove debug
9325 registers references.
9326 (child_fetch_inferior_registers): Go through the low target.
9327 (do_child_store_inferior_registers): Remove.
9328 (child_store_inferior_registers): Go through the low target.
9329 (win32_resume): Remove debug registers references.
9330 Set context using the low target.
9331 (handle_exception): Change return type to void. Don't record
9332 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
9333 first chance exception.
889bf7c5 9334 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
9335 goto loop. Always return after waiting for debug event.
9336 (win32_wait): Convert to switch statement. Handle spurious
9337 events.
9338
9339 * win32-i386-low.c (debug_registers_changed,
9340 debug_registers_used): New.
9341 (initial_stuff): Rename to ...
9342 (i386_initial_stuff): ... this. Clear debug registers
9343 state variables.
9344 (store_debug_registers): Delete.
9345 (i386_get_thread_context): New.
9346 (load_debug_registers): Delete.
9347 (i386_set_thread_context): New.
9348 (i386_thread_added): New.
9349 (single_step): Rename to ...
9350 (i386_single_step): ... this.
9351 (do_fetch_inferior_registers): Rename to ...
9352 (i386_fetch_inferior_register): ... this.
9353 (i386_store_inferior_register): New.
9354 (the_low_target): Adapt to new interface.
9355
9356 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
9357 (arm_get_thread_context): New.
9358 (arm_set_thread_context): New.
9359 (regptr): New.
9360 (do_fetch_inferior_registers): Rename to ...
9361 (arm_fetch_inferior_register): ... this.
9362 (arm_store_inferior_register): New.
9363 (arm_wince_breakpoint): Reimplement as unsigned long.
9364 (arm_wince_breakpoint_len): Define.
9365 (the_low_target): Adapt to new interface.
9366
9367 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
9368 load_debug_registers. Add get_thread_context, set_thread_context,
9369 thread_added and store_inferior_register. Rename
9370 fetch_inferior_registers to fetch_inferior_register.
9371 (regptr): Remove declaration.
9372
dd6953e1
PA
93732007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9374
9375 * linux-low.c (linux_detach): Change return type to int. Return 0.
9376 * spu-low.c (spu_detach): Likewise.
9377
444d6139
PA
93782007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9379
9380 * target.h (target_ops): Change return type of detach to int.
9381 Add join.
9382 (join_inferior): New.
9383 * server.c (main): Don't skip detach support on mingw32.
9384 If the inferior doesn't support detaching return error.
9385 Call join_inferior instead of using waitpid.
9386 * linux-low.c (linux_join): New.
9387 (linux_target_op): Add linux_join.
9388 * spu-low.c (spu_join): New.
9389 (spu_target_ops): Add spu_join.
9390 * win32-low.c (win32_detach): Adapt to new interface.
9391 Reopen current_process_handle before detaching. Issue a child
9392 resume before detaching.
9393 (win32_join): New.
9394 (win32_target_op): Add win32_join.
9395
1d5315fe
PA
93962007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9397
9398 * win32-low.c (win32-attach): Fix return value.
9399 * target.h (target_ops): Describe ATTACH return values.
9400
bf914831
PA
94012007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9402
9403 * win32-low.c (GETPROCADDRESS): Define.
9404 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
9405 (winapi_DebugSetProcessKillOnExit): Likewise.
9406 (win32_create_inferior): Force usage of ansi CreateProcessA.
9407 (win32_attach): Use GETPROCADDRESS.
9408 (win32_detach): Likewise.
9409
f72f3e60
PA
94102007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9411
9412 * win32-low.c (win32_wait): Don't use WSTOPSIG.
9413
ed50f18f
PA
94142007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
9415
9416 * win32-low.c: Commit leftover changes from 2007-03-29.
9417
0c2ead7e
DJ
94182007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9419
9420 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
9421 fields short instead of int. Add explicit padding.
9422 (i387_cache_to_fsave): Remove unnecessary casts.
9423 (i387_fsave_to_cache): Doc fix.
9424 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
9425
73725ff3
DJ
94262007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9427
9428 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
9429 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
9430
d99f33d8
PA
94312007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9432
9433 * configure.srv (arm*-*-mingw32ce*): Move near the other
9434 arm targets.
9435
68070c10
PA
94362007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9437
2482afc6 9438 * configure.ac: Add errno checking.
68070c10
PA
9439 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
9440 sys/file.h and malloc.h.
9441 (AC_CHECK_DECLS): Add perror.
9442 (srv_mingwce): Handle.
2482afc6 9443 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
9444 win32-i386-low.o to srv_tgtobj.
9445 (i[34567]86-*-mingw*): Likewise.
9446 (arm*-*-mingw32ce*): Add case.
9447 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9448 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
9449 [__MINGW32CE__] (strerror): New function.
9450 [__MINGW32CE__] (errno): Define to GetLastError.
9451 [__MINGW32CE__] (COUNTOF): New macro.
9452 (remote_open): Remove extra close call.
9453 * mem-break.c (delete_breakpoint_at): New function.
9454 * mem-break.h (delete_breakpoint_at): Declare.
9455 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9456 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
9457 [USE_WIN32API] (read, write): Add char* casts.
9458 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
9459 * server.h: Include wincecompat.h on Windows CE.
9460 [HAVE_ERRNO_H]: Check.
9461 (perror): Declare if not declared.
9462 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
9463 (perror_with_name): Remove errno declaration.
9464 * wincecompat.h: New.
9465 * wincecompat.c: New.
9466 * win32-low.h: New.
9467 * win32-arm-low.c: New.
9468 * win32-i386-low.c: New.
9469 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
9470 (OUTMSG2): Make it safe.
9471 (_T): New macro.
9472 (COUNTOF): New macro.
9473 (NUM_REGS): Get it from the low target.
9474 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
9475 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
9476 (thread_rec): Let low target handle debug registers.
9477 (child_add_thread): Likewise.
9478 (child_init_thread_list): Likewise.
9479 (continue_one_thread): Likewise.
9480 (regptr): New.
9481 (do_child_fetch_inferior_registers): Move to ...
9482 * win32-i386-low.c: ... here, and rename to ...
9483 (do_fetch_inferior_registers): ... this.
889bf7c5 9484 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
9485 Go through the low target.
9486 (do_child_store_inferior_registers): Use regptr.
9487 (strwinerror): New function.
9488 (win32_create_inferior): Handle Windows CE.
9489 Use strwinerror instead of strerror on Windows error
9490 codes. Add program to the error output.
9491 Don't close the main thread handle on Windows CE.
9492 (win32_attach): Use coredll.dll on Windows CE.
9493 (win32_kill): Close current process and current
9494 thread handles.
9495 (win32_detach): Use coredll.dll on Windows CE.
9496 (win32_resume): Let low target handle debug registers, and
9497 step request.
9498 (handle_exception): Add/Remove initial breakpoint. Avoid
9499 non-existant WSTOPSIG on Windows CE.
9500 (win32_read_inferior_memory): Cast to remove warning.
9501 (win32_arch_string): Go through the low target.
9502 (initialize_low): Call set_breakpoint_data with the low
9503 target's breakpoint.
9504 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
9505 FOP_REGNUM, mappings): Move to ...
9506 * win32-i386-low.c: ... here.
9507 * win32-low.c (win32_thread_info): Move to ...
9508 * win32-low.h: ... here.
9509 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
9510 win32-arm-low.c and wincecompat.c.
9511 (all:): Add $EXEEXT.
9512 (install-only:): Likewise.
9513 (gdbserver:): Likewise.
9514 (gdbreplay:): Likewise.
9515 * config.in: Regenerate.
9516 * configure: Regenerate.
9517
41093d81
PA
95182007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9519
9520 * win32-low.c: Rename typedef thread_info to
9521 win32_thread_info throughout.
9522
544afa54
PA
95232007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9524
9525 * win32-i386-low.c: Rename to ...
9526 * win32-low.c: ... this.
9527 * configure.srv: Replace win32-i386-low.o with win32-low.o.
9528 * Makefile.in: Likewise.
9529
bce7165d
PA
95302007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
9531
9532 * remote-utils.c (monitor_output): Constify msg parameter.
9533 * server.h (monitor_output): Likewise.
9534 * win32-i386-low.c (handle_output_debug_string): New.
9535 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
9536 handle_output_debug_string.
9537 (get_child_debug_event): Likewise.
9538
506c7aa0
DJ
95392007-03-27 Mat Hostetter <mat@lcs.mit.edu>
9540
9541 * server.c (main): Correct strtoul check.
9542
42c81e2a
DJ
95432007-03-27 Jon Ringle <jon@ringle.org>
9544
9545 * linux-low.c: Check __ARCH_HAS_MMU__ also.
9546
9453113a
DJ
95472007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
9548
9549 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
9550
64a69107
DJ
95512007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
9552
9553 * terminal.h: Check HAVE_SGTTY_H.
9554
95552007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
9556
9557 * remote-utils.c (remote_open): Print out the assigned port number.
9558
c74d0ad8
DJ
95592007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
9560
9561 * remote-utils.c (monitor_output): New function.
9562 * server.c (debug_threads): Define here.
9563 (monitor_show_help): New function.
9564 (handle_query): Handle qRcmd.
9565 (main): Do not handle 'd' packet.
9566 * server.h (debug_threads, remote_debug, monitor_output): Declare.
9567 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
9568 of debug_threads.
9569
de7c3b4a
PA
95702007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9571
9572 * Makefile.in (EXEEXT): New.
9573 (clean): Use $(EXEEXT).
9574
ef57601b
PA
95752007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9576
9577 * target.h (target_ops): Rename send_signal to request_interrupt,
9578 and remove enum target_signal parameter.
9579 * linux-low.c (linux_request_interrupt): Rename from
9580 linux_send_signal, and always send SIGINT.
9581 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
9582 and always send SIGINT.
9583 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
9584 of send_signal.
9585 (input_interrupt): Likewise.
9586
820f2bda
PA
95872007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9588
9589 * server.c (get_features_xml): Check if target implemented
9590 arch_string.
9591 * win32-i386-low.c (win32_arch_string): New.
9592 (win32_target_ops): Add win32_arch_string as arch_string member.
9593
ab39bf24
UW
95942007-02-22 Markus Deuling <deuling@de.ibm.com>
9595
9596 * spu-low.c (spu_arch_string): New.
9597 (spu_target_ops): Add spu_arch_string.
9598
61ff6e04
DJ
95992007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
9600
9601 * remote-utils.c: Remove HAVE_TERMINAL_H check.
9602 * configure.ac: Do not check for terminal.h.
9603 * configure, config.in: Regenerated.
9604
fb1e4ffc
DJ
96052007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9606
9607 * Makefile.in (OBS): Add $(XML_BUILTIN).
9608 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
9609 (clean): Update.
9610 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
9611 (arm-with-iwmmxt.c): New.
9612 * config.in, configure: Regenerate.
9613 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
9614 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
9615 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
9616 (arm*-*-linux*): Add iWMMXt and regset support.
9617 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
9618 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
9619 (arm_store_wmmxregset, target_regsets): New.
9620 * server.c (get_features_xml): Take annex argument. Check builtin
9621 XML documents.
9622 (handle_query): Handle multiple annexes.
9623
0f48aa01
DJ
96242007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9625
9626 * remote-utils.c [USE_WIN32API] (read, write): Define.
9627 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
9628 write.
9629
23181151
DJ
96302007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
9631
9632 * linux-i386-low.c (the_low_target): Set arch_string.
9633 * linux-x86-64-low.c (the_low_target): Likewise.
9634 * linux-low.c (linux_arch_string): New.
9635 (linux_target_ops): Add it.
9636 * linux-low.h (struct linux_target_ops): Add arch_string.
9637 * server.c (write_qxfer_response): Use const void * for DATA.
9638 (get_features_xml): New.
9639 (handle_query): Handle qXfer:features:read. Report it for qSupported.
9640 * target.h (struct target_ops): Add arch_string method.
9641
9d606399
DJ
96422007-01-03 Denis Pilat <denis.pilat@st.com>
9643 Daniel Jacobowitz <dan@codesourcery.com>
9644
9645 * linux-low.c (linux_kill): Handle being called with no threads.
9646 * win32-i386-low.c (win32_kill): Likewise.
9647 (get_child_debug_event): Clear current_process_handle.
9648
96492006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
9650 Daniel Jacobowitz <dan@codesourcery.com>
9651
9652 * remote-utils.c (remote_open): Check the type of specified
9653 serial port devices before opening them.
9654 * server.c (main): Kill the inferior if an error occurs during
9655 the first remote_open.
9656
a5e13d24
DJ
96572006-12-05 Markus Deuling <deuling@de.ibm.com>
9658
9659 * README: Update supported targets.
9660
186947f7
DJ
96612006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
9662
9663 * Makefile.in (clean): Remove reg-mips64.c.
9664 (reg-mips64.c, reg-mips64.o): New rules.
9665 * configure.srv: Handle mips64. Include regset support for mips.
9666 * linux-mips-low.c (union mips_register): New.
9667 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
9668 (mips_breakpoint, mips_breakpoint_at): Use int.
9669 (mips_collect_register, mips_supply_register)
9670 (mips_collect_register_32bit, mips_supply_register_32bit)
9671 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9672 (mips_store_fpregset, target_regsets): New.
9673 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
9674
a13e2c95
UW
96752006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
9676
9677 * configure.srv: Add target "spu*-*-*".
9678 * Makefile.in (clean): Remove reg-spu.c.
9679 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
9680 * spu-low.c: New file.
9681
cb7283db
DJ
96822006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9683
9684 * configure.ac: Correct td_thr_tls_get_addr test.
9685 * configure: Regenerated.
9686
89be2091
DJ
96872006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9688
9689 * linux-low.c (linux_wait_for_event): Reformat. Use the
9690 pass_signals array.
9691 * remote-utils.c (decode_address_to_semicolon): New.
9692 * server.c (pass_signals, handle_general_set): New.
9693 (handle_query): Mention QPassSignals for qSupported.
9694 (main): Call handle_general_set.
9695 * server.h (pass_signals, decode_address_to_semicolon): New.
9696
000ef4f0
DJ
96972006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
9698
9699 * server.c (handle_query): Correct error handling for read_auxv.
9700
b7149293
UW
97012005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
9702
9703 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
9704 and srv_linux_thread_db to yes.
9705 * linux-s390-low.c (s390_fill_gregset): New function.
9706 (target_regsets): Define data structure.
9707
dae5f5cf
DJ
97082006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
9709
9710 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
9711 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
9712 * config.in, configure: Regenerated.
9713 * inferiors.c (gdb_id_to_thread): New function.
9714 (gdb_id_to_thread_id): Use it.
9715 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
9716 * linux-low.h (struct process_info): Add th member.
9717 (thread_db_get_tls_address): New prototype.
9718 * remote-utils.c (decode_address): Make non-static.
9719 * server.c (handle_query): Handle qGetTLSAddr.
9720 * server.h (gdb_id_to_thread, decode_address): New prototypes.
9721 * target.h (struct target_ops): Add get_tls_address.
9722 * thread-db.c (maybe_attach_thread): Save the thread handle.
9723 (thread_db_get_tls_address): New.
9724
32ca6d61
DJ
97252006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
9726
9727 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
9728 (linux_resume_one_process): Take a siginfo_t *. Update all
9729 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
9730 (struct pending_signals): Add a siginfo_t.
9731 (linux_wait_for_process): Always set last_status.
9732 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
9733 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
9734 * linux-low.h (struct process_info): Add last_status.
9735
5ffff7c1
DJ
97362006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
9737
9738 * remote-utils.c (try_rle): New function.
9739 (putpkt_binary): Use it.
9740
8695c747
DJ
97412006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
9742
9743 * Makefile.in (clean): Clean reg-x86-64-linux.c.
9744 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
9745 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
9746 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
9747 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
9748 point registers.
9749
290fadea
RS
97502006-08-08 Richard Sandiford <richard@codesourcery.com>
9751
9752 * server.c (terminal_fd): New variable.
9753 (old_foreground_pgrp): Likewise.
9754 (restore_old_foreground_pgrp): New function.
9755 (start_inferior): Record the terminal file descriptor in terminal_fd
9756 and its original foreground group in old_foreground_pgrp. Register
9757 restore_old_foreground_pgrp with atexit().
9758
9f2e1e63
DJ
97592006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
9760
9761 * server.c (handle_query): Correct qPart to qXfer.
9762
b80864fb
DJ
97632006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
9764
9765 * configure.ac: Check for more headers which are missing on
9766 Windows. Automatically supply -lwsock32 and USE_WIN32API.
9767 * configure.srv: Add Cygwin and mingw32.
9768 * remote-utils.c: Don't include headers unconditionally which
9769 are missing on mingw32. Include <winsock.h> for mingw32.
9770 (remote_open): Adjust for mingw32 support. Flush
9771 standard error after writing to it.
9772 (remote_close, putpkt_binary, input_interrupt, block_async_io)
9773 (unblock_async_io, enable_async_io, disable_async_io)
9774 (readchar, getpkt): Update for Winsock support.
9775 (prepare_resume_reply): Expect a protocol signal number.
9776 * server.c: Disable <sys/wait.h> on mingw32.
9777 (start_inferior): Adjust for mingw32 support. Flush
9778 standard error after writing to it.
9779 (attach_inferior): Likewise. Use protocol signal
9780 numbers.
9781 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
9782 and names.
9783 * win32-i386-low.c: New file.
9784 * Makefile.in (XM_CLIBS): Set.
9785 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
9786 (win32-i386-low.o): New dependency rule.
9787 * linux-low.c (linux_wait): Use target signal numbers.
9788 * target.h (struct target_ops): Doc fix.
9789 * server.h (target_signal_to_name): New prototype.
9790 * gdbreplay.c: Don't include headers unconditionally which
9791 are missing on mingw32. Include <winsock.h> for mingw32.
9792 (remote_close, remote_open): Adjust for Winsock support.
9793 * configure, config.in: Regenerated.
9794
0876f84a
DJ
97952006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9796
9797 * server.c (decode_xfer_read, write_qxfer_response): New.
9798 (handle_query): Take a packet length argument. Handle
9799 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
9800 the qSupported response.
9801 (main): Update call to handle_query.
9802
01f9e8fa
DJ
98032006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
9804
9805 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
9806 (putpkt_binary): Renamed from putpkt and adjusted for binary
9807 data.
9808 (putpkt): New wrapper for putpkt_binary.
9809 (readchar): Don't mask off the high bit.
9810 (decode_X_packet): New function.
9811 * server.c (main): Call putpkt_binary if a handler sets the packet
9812 length. Save the length of the incoming packet. Handle 'X'.
9813 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
9814
be2a5f71
DJ
98152006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
9816
9817 * server.c (handle_query): Handle qSupported.
9818
ea025f5f
DJ
98192006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9820
9821 * remote-utils.c (all_symbols_looked_up): New variable.
9822 (look_up_one_symbol): Check it.
9823 * server.h (look_up_one_symbol): New declaration.
9824 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
9825
9308fc88
DJ
98262006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9827
9828 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 9829 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
9830 (PTRACE_GET_THREAD_AREA): Define.
9831 (ps_get_thread_area): New function.
9832
52fb6437
NS
98332006-05-09 Nathan Sidwell <nathan@codesourcery.com>
9834
9835 * configure.srv (m68k*-*-uclinux*): New target.
9836 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
9837 (linux_resume_one_process): Remove extraneous cast.
9838 (linux_read_offsets): New.
9839 (linux_target_op): Add linux_read_offsets on mmuless systems.
9840 * server.c (handle_query): Add qOffsets logic.
9841 * target.h (struct target_ops): Add read_offsets.
9842
21b0f40c
DJ
98432006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
9844
9845 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
9846 (PTRACE_GET_THREAD_AREA): Define.
9847 (ps_get_thread_area): New function.
9848 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
9849 (linux-x86-64-low.o): Update.
9850
0050a760
DJ
98512006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
9852
9853 * configure.ac: Remove checks for prfpregset_t.
9854 * gdb_proc_service.h: New file.
9855 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
9856 new "gdb_proc_service.h".
9857 * proc-service.c: Likewise.
9858 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
9859 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
9860 * Makefile.in (gdb_proc_service_h): Updated.
9861 * configure, config.in: Regenerated.
9862
b92a518e
DJ
98632006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
9864
9865 * remote-utils.c (prepare_resume_reply): Move declaration
9866 of gdb_id_from_wait to the top of the block.
9867
545587ee
DJ
98682006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
9869
9870 * linux-low.c (regsets_store_inferior_registers): Read the regset
9871 from the target before filling it.
9872
9db87ebd
DJ
98732006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9874
9875 * server.c (attach_inferior): Return SIGTRAP for a successful
9876 attach.
9877
dd24457d
DJ
98782006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9879
9880 * Makefile.in (OBS): Add version.o.
9881 (STAGESTUFF): Delete.
9882 (version.o): Add dependencies.
9883 (version.c): Replace rule.
9884 (clean): Remove version.c.
9885 * server.c (gdbserver_version): New.
9886 (gdbserver_usage): Use printf.
9887 (main): Handle --version and --help.
9888 * server.h (version, host_name): Add declarations.
9889
6f0f660e
EZ
98902005-12-23 Eli Zaretskii <eliz@gnu.org>
9891
889bf7c5
PA
9892 * linux-arm-low.c:
9893 * linux-arm-low.c:
9894 * inferiors.c:
9895 * i387-fp.h:
9896 * i387-fp.c:
9897 * gdbreplay.c:
9898 * regcache.c:
9899 * proc-service.c:
9900 * mem-break.h:
9901 * mem-break.c:
9902 * linux-x86-64-low.c:
9903 * linux-sh-low.c:
9904 * linux-s390-low.c:
9905 * linux-ppc64-low.c:
9906 * linux-ppc-low.c:
9907 * linux-mips-low.c:
9908 * linux-m68k-low.c:
9909 * linux-m32r-low.c:
9910 * linux-low.h:
9911 * linux-low.c:
9912 * linux-ia64-low.c:
9913 * linux-i386-low.c:
9914 * linux-crisv32-low.c:
9915 * thread-db.c:
9916 * terminal.h:
9917 * target.h:
9918 * target.c:
9919 * server.h:
9920 * server.c:
9921 * remote-utils.c:
9922 * regcache.h:
9923 * utils.c:
9924 * Makefile.in:
9925 * configure.ac:
6f0f660e
EZ
9926 * gdbserver.1: Add (C) after Copyright. Update the FSF
9927 address.
9928
9d1fb177
DJ
99292005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
9930
9931 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
9932 (arm_breakpoint_at): Recognize both breakpoints.
9933 (the_low_target): Use the correct breakpoint instruction.
9934
011a70c2
DJ
99352005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
9936
9937 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
9938 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
9939 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
9940 (the_low_target): Update.
9941
7fb85e41
AS
99422005-10-25 Andreas Schwab <schwab@suse.de>
9943
9944 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
9945
9946 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
9947 (ia64_num_regs): Reduce to 462.
9948
3db0444b
DJ
99492005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
9950
9951 * acinclude.m4: Correct quoting.
9952 * aclocal.m4: Regenerated.
9953
9954 Suggested by SZOKOVACS Robert <szo@ies.hu>:
9955 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
9956 (thread_db_init): Call thread_db_err_str.
9957 * configure.ac: Check for TD_VERSION.
9958 * config.in, configure: Regenerated.
9959
bee0189a
DJ
99602005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9961
9962 * server.h (error, fatal, warning): Add ATTR_FORMAT.
9963
e9d25b98
DJ
99642005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9965
9966 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
9967 is not available. Define HAVE_PTRACE_GETREGS if it is.
9968 * config.in, configure: Regenerated.
9969 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
9970 * linux-i386-low.c, linux-m68k-low.c: Update to use
9971 HAVE_PTRACE_GETREGS.
9972 * linux-low.c (regsets_fetch_inferior_registers)
9973 (regsets_store_inferior_registers): Only return 0 if we processed
9974 GENERAL_REGS.
9975 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
9976 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
9977
a06660f7
DJ
99782005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9979
9980 * inferiors.c (struct thread_info): Add gdb_id.
9981 (add_thread): Add gdb_id argument.
9982 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
9983 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
9984 calls to add_thread.
9985 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
9986 * server.c (handle_query): Use thread_to_gdb_id.
9987 (handle_v_cont, main): Use gdb_id_to_thread_id.
9988 * server.h (add_thread): Update prototype.
9989 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
9990 prototypes.
9991
5a1f5858
DJ
99922005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9993
9994 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
9995 left-padded registers.
9996 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
9997 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
9998
e122f1f5
SE
99992005-07-01 Steve Ellcey <sje@cup.hp.com>
10000
10001 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10002 * configure: Regenerate.
10003 * config.in: Regenerate.
10004 * server.h (NEED_DECLARATION_STRERROR):
10005 Replace with !HAVE_DECL_STRERROR.
10006
d592fa2f
DJ
100072005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
10008
10009 * linux-low.c (linux_wait, linux_send_signal): Don't test
10010 an unsigned long variable for > 0 if it could be MAX_ULONG.
10011 * server.c (myresume): Likewise.
10012 * target.c (set_desired_inferior): Likewise.
10013
ccbd4912
MK
100142005-06-13 Mark Kettenis <kettenis@gnu.org>
10015
10016 * configure.ac: Simplify and improve check for socklen_t.
10017 * configure, config.in: Regenerate.
10018
f450004a
DJ
100192005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
10020
10021 * acconfig.h: Remove.
10022 * configure.ac: Add a test for socklen_t. Use three-argument
10023 AC_DEFINE throughout.
10024 * config.in: Regenerated using autoheader 2.59.
10025 * configure: Regenerated.
10026
10027 * gdbreplay.c (socklen_t): Provide a default.
10028 (remote_open): Use socklen_t.
10029 * remote-utils.c (socklen_t): Provide a default.
10030 (remote_open): Use socklen_t.
10031 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10032 unsigned char.
10033
10034 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10035 char for buffers.
10036 * linux-low.c (linux_read_memory, linux_write_memory)
10037 (linux_read_auxv): Likewise.
10038 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
10039 (check_mem_write): Likewise.
10040 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
10041 Likewise.
10042 * regcache.c (struct inferior_rgcache_data, registers_to_string)
10043 (registers_from_string, register_data): Likewise.
10044 * server.c (handle_query, main): Likewise.
10045 * server.h (convert_ascii_to_int, convert_int_to_ascii)
10046 (decode_M_packet): Likewise.
10047 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10048 * target.h (struct target_ops): Update read_memory, write_memory,
10049 and read_auxv.
10050 (read_inferior_memory, write_inferior_memory): Update.
10051 * linux-low.h (struct linux_target_ops): Change type of breakpoint
10052 to unsigned char *.
10053 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
10054 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
10055 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
10056 linux-s390-low.c, linux-sh-low.c: Update for changes in
10057 read_inferior_memory and the_low_target->breakpoint.
10058
eee84df1
DJ
100592005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
10060
10061 * Makefile.in (SFILES): Add linux-ppc64-low.c.
10062 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
10063 * configure.srv: Add powerpc64-*-linux*.
10064 * linux-ppc64-low.c: New file.
10065
45b134e5
OF
100662005-05-23 Orjan Friberg <orjanf@axis.com>
10067
10068 * linux-cris-low.c: New file with support for CRIS.
10069 * linux-crisv32-low.c: Ditto for CRISv32.
10070 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
10071 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 10072 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
10073 reg-crisv32.o, and reg-crisv32.c to make rules.
10074 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
10075 recognized targets.
10076
48d93c75
UW
100772005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
10078
10079 * linux-low.c (fetch_register): Ensure buffer size is a multiple
10080 of sizeof (PTRACE_XFER_TYPE).
10081 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
10082
e013ee27
OF
100832005-05-12 Orjan Friberg <orjanf@axis.com>
10084
889bf7c5 10085 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
10086 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
10087 pointers for hardware watchpoint support.
10088 * linux-low.h (struct linux_target_ops): Ditto.
10089 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
10090 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
10091 to linux_target_ops.
10092 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
10093 reply packet.
10094 * server.c (main): Recognize 'Z' and 'z' packets.
10095
b0ded00b
UW
100962005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
10097
10098 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
10099 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
10100 (the_low_target): Add new members.
10101
8643e2ad
DJ
101022005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10103
10104 * proc-service.c (ps_lgetregs): Search all_processes instead of
10105 all_threads.
10106
fc620387
DJ
101072005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10108
10109 * server.c (start_inferior): Change return type to int.
10110 (attach_inferior): Change sigptr to int *.
10111 (handle_v_cont, handle_v_requests): Change signal to int *.
10112 (main): Change signal to int.
10113
101142005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
10115
10116 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
10117 * configure.srv: Add m32r*-*-linux*.
10118 * linux-m32r-low.c: New file.
10119
e0e76420
DJ
101202005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
10121
10122 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
10123
a1928bad
DJ
101242005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10125
10126 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
10127 Take unsigned long arguments for PIDs.
10128 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
10129 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
10130 (wait_for_sigstop, linux_resume_one_process)
10131 (regsets_fetch_inferior_registers, linux_send_signal)
10132 (linux_read_auxv): Likewise. Update the types of variables holding
10133 PIDs. Update format string specifiers.
10134 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
10135 * remote-utils.c (prepare_resume_reply): Likewise.
10136 * server.c (cont_thread, general_thread, step_thread)
10137 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
10138 unsigned long.
10139 (handle_query): Update format specifiers.
10140 (handle_v_cont, main): Use strtoul for thread IDs.
10141 * server.h (struct inferior_list_entry): Use unsigned long for ID.
10142 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
10143 (general_thread, step_thread, thread_from_wait)
10144 (old_thread_from_wait): Update.
10145 * target.h (struct thread_resume): Use unsigned long for THREAD.
10146 (struct target_ops): Use unsigned long for arguments to attach and
10147 thread_alive.
10148
dcdb98d2
DJ
101492005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
10150
10151 * acinclude.m4: Include bfd/bfd.m4 directly.
10152 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
10153 <agriffis@toolchain.org>.
10154 * aclocal.m4, configure: Regenerated.
10155
bec39cab
AC
101562005-01-07 Andrew Cagney <cagney@gnu.org>
10157
10158 * configure.ac: Rename configure.in, require autoconf 2.59.
10159 * configure: Re-generate.
10160
434c4c77
DJ
101612004-12-08 Daniel Jacobowitz <dan@debian.org>
10162
10163 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
10164 LIBS when finished.
10165 * aclocal.m4: Regenerated.
10166 * configure: Regenerated.
10167
db1d3e1b
AS
101682004-11-21 Andreas Schwab <schwab@suse.de>
10169
10170 * linux-m68k-low.c (m68k_num_gregs): Define.
10171 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
10172 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
10173 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
10174 (m68k_breakpoint_at): New. Add to the_low_target.
10175
10176 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10177 srv_linux_thread_db to yes.
10178
43360365
JB
101792004-10-20 Joel Brobecker <brobecker@gnat.com>
10180
10181 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10182 (ARCH_SET_FS): Likewise.
10183 (ARCH_GET_FS): Likewise.
10184 (ARCH_GET_GS): Likewise.
10185
fd500816
DJ
101862004-10-16 Daniel Jacobowitz <dan@debian.org>
10187
10188 * linux-i386-low.c (ps_get_thread_area): New.
10189 * linux-x86-64-low.c (ps_get_thread_area): New.
10190 * linux-low.c: Include <sys/syscall.h>.
10191 (linux_kill_one_process): Don't kill the first thread here.
10192 (linux_kill): Kill the first thread here.
10193 (kill_lwp): New function.
10194 (send_sigstop, linux_send_signal): Use it.
10195 * proc-service.c: Clean up #ifdefs.
10196 (fpregset_info): Delete.
10197 (ps_lgetregs): Update and enable implementation.
10198 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
10199 implementations.
10200 * remote-utils.c (struct sym_cache, symbol_cache): New.
10201 (input_interrupt): Print a clearer message.
10202 (async_io_enabled): New variable.
10203 (enable_async_io, disable_async_io): Use it. Update comments.
10204 (look_up_one_symbol): Use the symbol cache.
10205 * thread-db.c (thread_db_look_up_symbols): New function.
10206 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
10207
f6de3c42
DJ
102082004-10-16 Daniel Jacobowitz <dan@debian.org>
10209
10210 * configure.in: Test for -rdynamic.
10211 * configure: Regenerated.
10212 * Makefile (INTERNAL_LDFLAGS): New.
10213 (gdbserver, gdbreplay): Use it.
10214
2c0fc042
AC
102152004-09-02 Andrew Cagney <cagney@gnu.org>
10216
10217 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10218
075b3282
DJ
102192004-03-23 Daniel Jacobowitz <drow@mvista.com>
10220
10221 * linux-low.c (linux_wait): Clear all_processes list also.
10222
fa6a77dc
DJ
102232004-03-12 Daniel Jacobowitz <drow@mvista.com>
10224
10225 * linux-low.c: Include <errno.h>. Remove extern declaration of
10226 errno.
10227
6d782a97
DJ
102282004-03-12 Daniel Jacobowitz <drow@mvista.com>
10229
10230 * gdbreplay.c, server.h, utils.c: Update copyright years.
10231
3a7fb99b
DJ
102322004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10233
10234 * server.c (main): Print child status or termination signal from
10235 variable 'signal', not 'sig'.
10236
c3e735a6
DJ
102372004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10238
10239 * linux-low.c (linux_read_memory): Change return type to
10240 int. Check for and return error from ptrace().
10241 * target.c (read_inferior_memory): Change return type to int. Pass
10242 back return status from the_target->read_memory().
10243 * target.h (struct target_ops): Adapt *read_memory() prototype.
10244 Update comment.
10245 (read_inferior_memory): Adapt prototype.
10246 * server.c (main): Return an error packet if
10247 read_inferior_memory() returns an error.
10248
a59d1c82
DJ
102492004-03-04 Daniel Jacobowitz <drow@mvista.com>
10250
10251 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10252 Unify with other clean targets.
10253
dc3f8883
DJ
102542004-02-29 Daniel Jacobowitz <drow@mvista.com>
10255
10256 * server.c (handle_v_cont): Call set_desired_inferior.
10257
89a208da
DJ
102582004-02-29 Daniel Jacobowitz <drow@mvista.com>
10259
10260 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10261
62ea82f5
DJ
102622004-02-29 Daniel Jacobowitz <drow@mvista.com>
10263
10264 * linux-low.c (linux_wait): Unblock async I/O.
10265 (linux_resume): Block and enable async I/O.
10266 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10267 * server.h (block_async_io, unblock_async_io): Add prototypes.
10268
6910d122
DJ
102692004-02-29 Daniel Jacobowitz <drow@mvista.com>
10270
10271 * remote-utils.c (remote_open): Print a status notice after
10272 opening a TCP port.
10273 * server.c (attach_inferior): Print a status notice after
10274 attaching.
10275
102762004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
10277
10278 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10279
c89dc5d4
DJ
102802004-02-26 Daniel Jacobowitz <drow@mvista.com>
10281
10282 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
10283 error packet.
10284 * server.c, target.h: Update copyright years.
10285
4b8dad4a
RM
102862004-02-25 Roland McGrath <roland@redhat.com>
10287
10288 * target.h (struct target_ops): New member `read_auxv'.
10289 * server.c (handle_query): Handle qPart:auxv:read: query using that.
10290 * linux-low.c (linux_read_auxv): New function.
10291 (linux_target_ops): Initialize `read_auxv' member to that.
10292
d7446758
JB
102932004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10294
10295 Committed by Jim Blandy <jimb@redhat.com>.
10296
10297 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 10298 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
10299 instead of GPR_SIZE to distiguish s390 and s390x targets.
10300
5544ad89
DJ
103012004-01-31 Daniel Jacobowitz <drow@mvista.com>
10302
10303 * linux-low.c: Update copyright year.
10304 (check_removed_breakpoint): Clear pending_is_breakpoint.
10305 (linux_set_resume_request, linux_queue_one_thread)
10306 (resume_status_pending_p): New functions.
10307 (linux_continue_one_thread): Use process->resume.
10308 (linux_resume): Only resume threads if there are no pending events.
10309 * linux-low.h (struct process_info): Add resume request
10310 pointer.
10311
2a68b70e
DJ
103122004-01-30 Daniel Jacobowitz <drow@mvista.com>
10313
10314 * regcache.c (new_register_cache): Clear the allocated register
10315 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
10316
64386c31
DJ
103172003-10-13 Daniel Jacobowitz <drow@mvista.com>
10318
10319 * linux-low.c (linux_resume): Take a struct thread_resume *
10320 argument.
10321 (linux_wait): Update call.
10322 (resume_ptr): New static variable.
10323 (linux_continue_one_thread): Renamed from
10324 linux_continue_one_process. Use resume_ptr.
10325 (linux_resume): Use linux_continue_one_thread.
10326 * server.c (handle_v_cont, handle_v_requests): New functions.
10327 (myresume): New function.
10328 (main): Handle 'v' case.
10329 * target.h (struct thread_resume): New type.
10330 (struct target_ops): Change argument of "resume" to struct
10331 thread_resume *.
10332 (myresume): Delete macro.
10333
c938e9b0
L
103342003-08-08 H.J. Lu <hongjiu.lu@intel.com>
10335
10336 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
10337 (uninstall): Support DESTDIR.
10338
7f313d07
BC
10339Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
10340
10341 * configure.srv: Add xscale*linux copy of arm*linux entry.
10342
3b2fc2ea
DJ
103432003-07-24 Daniel Jacobowitz <drow@mvista.com>
10344
10345 * linux-arm-low.c (arm_reinsert_addr): New function.
10346 (the_low_target): Add arm_reinsert_addr.
10347
1c0a559e
MK
103482003-07-08 Mark Kettenis <kettenis@gnu.org>
10349
10350 * mem-break.c: Remove whitespace at end of file.
10351
43d5792c
DJ
103522003-06-28 Daniel Jacobowitz <drow@mvista.com>
10353
10354 * configure.in: Check whether we need to prototype strerror.
10355 * server.h: Optionally prototype strerror.
10356 * gdbreplay.c (perror_with_name): Use strerror.
10357 * linux-low.c (linux_attach_lwp): Use strerror.
10358 * utils.c (perror_with_name): Use strerror.
10359 * config.in, configure: Regenerated.
10360
c8a86edf
DJ
103612003-06-28 Daniel Jacobowitz <drow@mvista.com>
10362
10363 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
10364 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
10365
73d37363
DJ
103662003-06-20 Daniel Jacobowitz <drow@mvista.com>
10367
10368 * Makefile.in (SFILES): Update.
10369 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
10370 low-sun3.c: Remove files.
10371
6ad8ae5c
DJ
103722003-06-17 Daniel Jacobowitz <drow@mvista.com>
10373
10374 * linux-low.c: Move comment to linux_thread_alive where it belonged.
10375 (linux_detach_one_process, linux_detach): New functions.
10376 (linux_target_ops): Add linux_detach.
10377 * server.c (main): Handle 'D' packet.
10378 * target.h (struct target_ops): Add "detach" member.
10379 (detach_inferior): Define.
10380
1581182a
MK
103812003-06-13 Mark Kettenis <kettenis@gnu.org>
10382
10383 From Kelley Cook <kelleycook@wideopenwest.com>:
10384 * configure.srv: Accept i[34567]86 variants.
10385
e5379b03
DJ
103862003-06-05 Daniel Jacobowitz <drow@mvista.com>
10387
10388 * linux-low.c (linux_wait_for_event): Correct comment typos.
10389 (linux_resume_one_process): Call check_removed_breakpoint.
10390 (linux_send_signal): New function.
10391 (linux_target_ops): Add linux_send_signal.
10392 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
10393 of kill.
10394 * target.h (struct target_ops): Add send_signal.
10395
2ff29de4
JB
103962003-05-29 Jim Blandy <jimb@redhat.com>
10397
10398 * linux-low.c (usr_store_inferior_registers): Transfer buf in
10399 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
10400 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
10401 away part of the register's value.
10402
254787d4
DJ
104032003-03-26 Daniel Jacobowitz <drow@mvista.com>
10404
10405 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
10406 (linux_wait_for_event, linux_init_signals): Likewise.
10407
94e10508
DJ
104082003-03-17 Daniel Jacobowitz <drow@mvista.com>
10409
10410 * configure.in: Check for stdlib.h.
10411 * configure: Regenerated.
10412 * config.in: Regenerated.
10413
4c0711e0
DJ
104142003-01-04 Andreas Schwab <schwab@suse.de>
10415
10416 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
10417
ef66e766
AC
104182003-01-02 Andrew Cagney <ac131313@redhat.com>
10419
10420 * Makefile.in: Remove obsolete code.
10421
a1358604
DJ
104222002-11-20 Daniel Jacobowitz <drow@mvista.com>
10423
10424 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
10425 defined(PT_FPR0_HI).
10426
23ce3b1c
DJ
104272002-11-17 Stuart Hughes <seh@zee2.com>
10428
10429 * linux-arm-low.c (arm_num_regs): Increase.
10430 (arm_regmap): Include status register.
10431
104322002-11-17 Daniel Jacobowitz <drow@mvista.com>
10433
10434 * linux-low.c (register_addr): Remove incorrect -1 check.
10435
a9fa9f7d
DJ
104362002-08-29 Daniel Jacobowitz <drow@mvista.com>
10437
10438 * linux-low.c (linux_create_inferior): Call setpgid. Return
10439 the new PID.
10440 (unstopped_p, linux_signal_pid): Remove.
10441 (linux_target_ops): Remove linux_signal_pid.
10442 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
10443 global instead of target method.
10444 * target.h (struct target_ops): Remove signal_pid. Update comment
10445 for create_inferior.
10446 * server.c (signal_pid): New variable.
10447 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 10448 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
10449 (attach_inferior): Set signal_pid.
10450
17574093
DJ
104512002-08-23 Daniel Jacobowitz <drow@mvista.com>
10452
10453 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
10454
104552002-08-20 Jim Blandy <jimb@redhat.com>
10456
10457 * Makefile.in (LDFLAGS): Allow the configure script to establish a
10458 default for this.
10459
104602002-08-01 Andrew Cagney <cagney@redhat.com>
10461
10462 * Makefile.in: Make chill references obsolete.
10463
104642002-07-24 Kevin Buettner <kevinb@redhat.com>
10465
10466 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
10467 * configure: Regenerate.
10468 * config.in: Regenerate.
10469
104702002-07-09 David O'Brien <obrien@FreeBSD.org>
10471
10472 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
10473 (perror_with_name, remote_close, remote_open, expect, play): Static.
10474
104752002-07-04 Michal Ludvig <mludvig@suse.cz>
10476
4b8dad4a 10477 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
10478 byte offsets instead of an array of indexes.
10479 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
10480
104812002-06-13 Daniel Jacobowitz <drow@mvista.com>
10482
10483 * regcache.c: Add comment.
10484
104852002-06-11 Daniel Jacobowitz <drow@mvista.com>
10486
10487 * thread-db.c: New file.
10488 * proc-service.c: New file.
10489 * acinclude.m4: New file.
10490 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
10491 proc-service.o, and thread-db.o.
10492 (linux-low.o): Add USE_THREAD_DB.
10493 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
10494 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
10495 * aclocal.m4: Regenerated.
10496 * config.in: Regenerated.
10497 * configure: Regenerated.
10498 * configure.in: Check for proc_service.h, sys/procfs.h,
10499 thread_db.h, and linux/elf.h headrs.
10500 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
10501 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
10502 Check for -lthread_db and thread support.
10503 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
10504 PowerPC, and SuperH.
10505 * i387-fp.c: Constify arguments.
10506 * i387-fp.h: Likewise.
10507 * inferiors.c: (struct thread_info): Renamed from
10508 `struct inferior_info'. Remove PID member. Use generic inferior
10509 list header. All uses updated.
10510 (inferiors, signal_pid): Removed.
10511 (all_threads): New variable.
10512 (get_thread): Define.
10513 (add_inferior_to_list): New function.
10514 (for_each_inferior): New function.
10515 (change_inferior_id): New function.
10516 (add_inferior): Removed.
10517 (remove_inferior): New function.
10518 (add_thread): New function.
10519 (free_one_thread): New function.
10520 (remove_thread): New function.
10521 (clear_inferiors): Use for_each_inferior and free_one_thread.
10522 (find_inferior): New function.
10523 (find_inferior_id): New function.
10524 (inferior_target_data): Update argument type.
10525 (set_inferior_target_data): Likewise.
10526 (inferior_regcache_data): Likewise.
10527 (set_inferior_regcache_data): Likewise.
10528 * linux-low.c (linux_bp_reinsert): Remove.
10529 (all_processes, stopping_threads, using_thrads)
10530 (struct pending_signals, debug_threads, pid_of): New.
10531 (inferior_pid): Replace with macro.
10532 (struct inferior_linux_data): Remove.
10533 (get_stop_pc, add_process): New functions.
10534 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
10535 Use add_process and add_thread.
10536 (linux_attach_lwp): New function, based on old linux_attach. Use
10537 add_process and add_thread. Set stop_expected for new threads.
10538 (linux_attach): New function.
10539 (linux_kill_one_process): New function.
10540 (linux_kill): Kill all LWPs.
10541 (linux_thread_alive): Use find_inferior_id.
10542 (check_removed_breakpoints, status_pending_p): New functions.
10543 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
10544 Update. Use WNOHANG. Wait for cloned processes also. Update process
10545 struct for the found process.
10546 (linux_wait_for_event): New function.
10547 (linux_wait): Use it. Support LWPs.
10548 (send_sigstop, wait_for_sigstop, stop_all_processes)
10549 (linux_resume_one_process, linux_continue_one_process): New functions.
10550 (linux_resume): Support LWPs.
10551 (REGISTER_RAW_SIZE): Remove.
10552 (fetch_register): Use register_size instead. Call supply_register.
10553 (usr_store_inferior_registers): Likewise. Call collect_register.
10554 Fix recursive case.
10555 (regsets_fetch_inferior_registers): Improve error message.
10556 (regsets_store_inferior_registers): Add debugging.
10557 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
10558 (unstopped_p, linux_signal_pid): New functions.
10559 (linux_target_ops): Add linux_signal_pid.
10560 (linux_init_signals): New function.
10561 (initialize_low): Call it. Initialize using_threads.
10562 * regcache.c (inferior_regcache_data): Add valid
10563 flag.
10564 (get_regcache): Fetch registers lazily. Add fetch argument
10565 and update all callers.
10566 (regcache_invalidate_one, regcache_invalidate): New
10567 functions.
10568 (new_register_cache): Renamed from create_register_cache.
10569 Return the new regcache.
10570 (free_register_cache): Change argument to a void *.
10571 (registers_to_string, registers_from_string): Call get_regcache
10572 with fetch flag set.
10573 (register_data): Make static. Pass fetch flag to get_regcache.
10574 (supply_register): Call get_regcache with fetch flag clear.
10575 (collect_register): Call get_regcache with fetch flag set.
10576 (collect_register_as_string): New function.
10577 * regcache.h: Update.
10578 * remote-utils.c (putpkt): Flush after debug output and use
10579 stderr.
10580 Handle input interrupts while waiting for an ACK.
10581 (input_interrupt): Use signal_pid method.
10582 (getpkt): Flush after debug output and use stderr.
10583 (outreg): Use collect_register_as_string.
10584 (new_thread_notify, dead_thread_notify): New functions.
10585 (prepare_resume_reply): Check using_threads. Set thread_from_wait
10586 and general_thread.
10587 (look_up_one_symbol): Flush after debug output.
10588 * server.c (step_thread, server_waiting): New variables.
10589 (start_inferior): Don't use signal_pid. Update call to mywait.
10590 (attach_inferior): Update call to mywait.
10591 (handle_query): Handle qfThreadInfo and qsThreadInfo.
10592 (main): Don't fetch/store registers explicitly. Use
10593 set_desired_inferior. Support proposed ``Hs'' packet. Update
10594 calls to mywait.
10595 * server.h: Update.
10596 (struct inferior_list, struct_inferior_list_entry): New.
10597 * target.c (set_desired_inferior): New.
10598 (write_inferior_memory): Constify.
10599 (mywait): New function.
10600 * target.h: Update.
10601 (struct target_ops): New signal_pid method.
10602 (mywait): Removed macro, added prototype.
10603
10604 * linux-low.h (regset_func): Removed.
10605 (regset_fill_func, regset_store_func): New.
10606 (enum regset_type): New.
10607 (struct regset_info): Add type field. Use new operation types.
10608 (struct linux_target_ops): stop_pc renamed to get_pc.
10609 Add decr_pc_after_break and breakpoint_at.
10610 (get_process, get_thread_proess, get_process_thread)
10611 (strut process_info, all_processes, linux_attach_lwp)
10612 (thread_db_init): New.
10613
10614 * linux-arm-low.c (arm_get_pc, arm_set_pc,
10615 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
10616 (the_low_target): Add new members.
10617 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
10618 (i386_store_fpxregset): Constify.
10619 (target_regsets): Add new kind identifier.
10620 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
10621 (i386_set_pc): Add debugging.
10622 (i386_breakpoint_at): New function.
10623 (the_low_target): Add new members.
10624 * linux-mips-low.c (mips_get_pc, mips_set_pc)
10625 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
10626 (mips_breakpoint_at): New.
10627 (the_low_target): Add new members.
10628 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
10629 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
10630 (the_low_target): Add new members.
10631 * linux-sh-low.c (sh_get_pc, sh_set_pc)
10632 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
10633 (the_low_target): Add new members.
10634 * linux-x86-64-low.c (target_regsets): Add new kind
10635 identifier.
10636
106372002-05-15 Daniel Jacobowitz <drow@mvista.com>
10638
10639 From Martin Pool <mbp@samba.org>:
10640 * server.c (gdbserver_usage): New function.
10641 (main): Call it.
10642
106432002-05-14 Daniel Jacobowitz <drow@mvista.com>
10644
10645 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
10646 stop_at -> stop_pc.
10647
106482002-05-04 Andrew Cagney <ac131313@redhat.com>
10649
10650 * Makefile.in: Remove obsolete code.
10651
106522002-04-24 Michal Ludvig <mludvig@suse.cz>
10653
10654 * linux-low.c (regsets_fetch_inferior_registers),
10655 (regsets_store_inferior_registers): Removed cast to int from
10656 ptrace() calls.
10657 * regcache.h: Added declaration of struct inferior_info.
10658
106592002-04-20 Daniel Jacobowitz <drow@mvista.com>
10660
10661 * inferiors.c (struct inferior_info): Add regcache_data.
10662 (add_inferior): Call create_register_cache.
10663 (clear_inferiors): Call free_register_cache.
10664 (inferior_regcache_data, set_inferior_regcache_data): New functions.
10665 * regcache.c (struct inferior_regcache_data): New.
10666 (registers): Remove.
10667 (get_regcache): New function.
10668 (create_register_cache, free_register_cache): New functions.
10669 (set_register_cache): Don't initialize the register cache here.
10670 (registers_to_string, registers_from_string, register_data): Call
10671 get_regcache.
10672 * regcache.h: Add prototypes.
10673 * server.h: Likewise.
10674
106752002-04-20 Daniel Jacobowitz <drow@mvista.com>
10676
10677 * mem-break.c: New file.
10678 * mem-break.h: New file.
10679 * Makefile.in: Add mem-break.o rule; update server.h
10680 dependencies.
10681 * inferiors.c (struct inferior_info): Add target_data
10682 member.
10683 (clear_inferiors): Free target_data member if set.
10684 (inferior_target_data, set_inferior_target_data): New functions.
10685 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
10686 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
10687 * linux-low.c (linux_bp_reinsert): New variable.
10688 (struct inferior_linux_data): New.
10689 (linux_create_inferior): Use set_inferior_target_data.
10690 (linux_attach): Likewise. Call add_inferior.
10691 (linux_wait_for_one_inferior): New function.
10692 (linux_wait): Call it.
10693 (linux_write_memory): Add const.
10694 (initialize_low): Call set_breakpoint_data.
10695 * linux-low.h (struct linux_target_ops): Add breakpoint
10696 handling members.
10697 * server.c (attach_inferior): Remove extra add_inferior
10698 call.
10699 * server.h: Include mem-break.h. Update inferior.c
10700 prototypes.
10701 * target.c (read_inferior_memory)
10702 (write_inferior_memory): New functions.
10703 * target.h (read_inferior_memory)
10704 (write_inferior_memory): Change macros to prototypes.
10705 (struct target_ops): Update comments. Add const to write_memory
10706 definition.
10707
107082002-04-11 Daniel Jacobowitz <drow@mvista.com>
10709
10710 * linux-low.c (usr_store_inferior_registers): Support
10711 registers which are allowed to fail to store.
10712 * linux-low.h (linux_target_ops): Likewise.
10713 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
10714 (ppc_cannot_store_register): FPSCR may not be storable.
10715
107162002-04-09 Daniel Jacobowitz <drow@mvista.com>
10717
10718 * server.h: Include <string.h> if HAVE_STRING_H.
10719 * ChangeLog: Correct paths in last ChangeLog entry.
10720
107212002-04-09 Daniel Jacobowitz <drow@mvista.com>
10722
10723 * linux-low.h: Remove obsolete prototypes.
10724 (struct linux_target_ops): New.
10725 (extern the_low_target): New.
10726 * linux-low.c (num_regs, regmap): Remove declarations.
10727 (register_addr): Use the_low_target explicitly.
10728 (fetch_register): Likewise.
10729 (usr_fetch_inferior_registers): Likewise.
10730 (usr_store_inferior_registers): Likewise.
10731 * linux-arm-low.c (num_regs): Remove.
10732 (arm_num_regs): Define.
10733 (arm_regmap): Renamed from regmap, made static.
10734 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
10735 made static.
10736 (arm_cannot_store_register): Renamed from cannot_store_register,
10737 made static.
10738 (the_low_target): New.
10739 * linux-i386-low.c (num_regs): Remove.
10740 (i386_num_regs): Define.
10741 (i386_regmap): Renamed from regmap, made static.
10742 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
10743 made static.
10744 (i386_cannot_store_register): Renamed from cannot_store_register,
10745 made static.
10746 (the_low_target): New.
10747 * linux-ia64-low.c (num_regs): Remove.
10748 (ia64_num_regs): Define.
10749 (ia64_regmap): Renamed from regmap, made static.
10750 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
10751 made static.
10752 (ia64_cannot_store_register): Renamed from cannot_store_register,
10753 made static.
10754 (the_low_target): New.
10755 * linux-m68k-low.c (num_regs): Remove.
10756 (m68k_num_regs): Define.
10757 (m68k_regmap): Renamed from regmap, made static.
10758 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
10759 made static.
10760 (m68k_cannot_store_register): Renamed from cannot_store_register,
10761 made static.
10762 (the_low_target): New.
10763 * linux-mips-low.c (num_regs): Remove.
10764 (mips_num_regs): Define.
10765 (mips_regmap): Renamed from regmap, made static.
10766 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
10767 made static.
10768 (mips_cannot_store_register): Renamed from cannot_store_register,
10769 made static.
10770 (the_low_target): New.
10771 * linux-ppc-low.c (num_regs): Remove.
10772 (ppc_num_regs): Define.
10773 (ppc_regmap): Renamed from regmap, made static.
10774 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
10775 made static.
10776 (ppc_cannot_store_register): Renamed from cannot_store_register,
10777 made static.
10778 (the_low_target): New.
10779 * linux-s390-low.c (num_regs): Remove.
10780 (s390_num_regs): Define.
10781 (s390_regmap): Renamed from regmap, made static.
10782 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
10783 made static.
10784 (s390_cannot_store_register): Renamed from cannot_store_register,
10785 made static.
10786 (the_low_target): New.
10787 * linux-sh-low.c (num_regs): Remove.
10788 (sh_num_regs): Define.
10789 (sh_regmap): Renamed from regmap, made static.
10790 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
10791 made static.
10792 (sh_cannot_store_register): Renamed from cannot_store_register,
10793 made static.
10794 (the_low_target): New.
10795 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
10796 (the_low_target): New.
10797
107982002-04-09 Daniel Jacobowitz <drow@mvista.com>
10799
10800 * Makefile.in: Add stamp-h target.
10801 * configure.in: Create stamp-h.
10802 * configure: Regenerated.
10803
108042002-04-09 Daniel Jacobowitz <drow@mvista.com>
10805
10806 * inferiors.c: New file.
10807 * target.c: New file.
10808 * target.h: New file.
10809 * Makefile.in: Add target.o and inferiors.o. Update
10810 dependencies.
10811 * linux-low.c (inferior_pid): New static variable,
10812 moved from server.c.
10813 (linux_create_inferior): Renamed from create_inferior.
10814 Call add_inferior. Return 0 on success instead of a PID.
10815 (linux_attach): Renamed from myattach.
10816 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
10817 (linux_thread_alive): Renamed from mythread_alive.
10818 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
10819 child dies.
10820 (linux_resume): Renamed from myresume. Add missing ``return 0''.
10821 (regsets_store_inferior_registers): Correct error message.
10822 Add missing ``return 0''.
10823 (linux_fetch_registers): Renamed from fetch_inferior_registers.
10824 (linux_store_registers): Renamed from store_inferior_registers.
10825 (linux_read_memory): Renamed from read_inferior_memory.
10826 (linux_write_memory): Renamed from write_inferior_memory.
10827 (linux_target_ops): New structure.
10828 (initialize_low): Call set_target_ops ().
10829 * remote-utils.c (unhexify): New function.
10830 (hexify): New function.
10831 (input_interrupt): Send signals to ``signal_pid''.
10832 * server.c (inferior_pid): Remove.
10833 (start_inferior): Update create_inferior call.
10834 (attach_inferior): Call add_inferior.
10835 (handle_query): New function.
10836 (main): Call handle_query for `q' packets.
10837 * server.h: Include "target.h". Remove obsolete prototypes.
10838 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
10839
108402002-04-09 Daniel Jacobowitz <drow@mvista.com>
10841
10842 * Makefile.in: Add WARN_CFLAGS. Update configury
10843 dependencies.
10844 * configure.in: Check for <string.h>
10845 * configure: Regenerate.
10846 * config.in: Regenerate.
10847 * gdbreplay.c: Include needed system headers.
10848 (remote_open): Remove strchr prototype.
10849 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
10850 * regcache.c (supply_register): Change buf argument to const void *.
10851 (supply_register_by_name): Likewise.
10852 (collect_register): Change buf argument to void *.
10853 (collect_register_by_name): Likewise.
10854 * regcache.h: Add missing prototypes.
10855 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
10856 * server.c (handle_query): New function.
10857 (attached): New static variable, moved out of main.
10858 (main): Quiet longjmp clobber warnings.
10859 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
10860 * utils.c (error): Remove NORETURN.
10861 (fatal): Likewise.