]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
Make functions and variables exported by the IPA be extern "C"
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
3c14e5a3
PA
12015-02-27 Pedro Alves <palves@redhat.com>
2
3 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4 IP_AGENT_EXPORT_FUNC.
5 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6 IP_AGENT_EXPORT_FUNC.
7 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
8 (IP_AGENT_EXPORT): Delete.
9 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
11 (gdb_trampoline_buffer_error, collecting, gdb_collect)
12 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
13 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
14 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
15 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
16 (traceframe_read_count, traceframe_write_count)
17 (traceframes_created, trace_state_variables, get_raw_reg)
18 (get_trace_state_variable_value, set_trace_state_variable_value)
19 (ust_loaded, helper_thread_id, cmd_buf): Use
20 IPA_SYM_EXPORTED_NAME.
21 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
22 (tracepoints) Use IP_AGENT_EXPORT_VAR.
23 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
24 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
25 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
26 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
27 EXTERN_C_PUSH/EXTERN_C_POP.
28 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
29 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
30 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
31 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
32 (traceframe_write_count, traceframe_read_count)
33 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
34 (about_to_request_buffer_space, get_trace_state_variable_value)
35 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
36 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
37 EXTERN_C_PUSH/EXTERN_C_POP.
38 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
39 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
40 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
41 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
42 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
43 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
44 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
45 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
46 Define.
47 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
48 (IP_AGENT_EXPORT_VAR_DECL): Define.
49 (tracing): Declare.
50 (gdb_agent_get_raw_reg): Declare.
51
fe978cb0
PA
522015-02-27 Tom Tromey <tromey@redhat.com>
53 Pedro Alves <palves@redhat.com>
54
55 Rename symbols whose names are reserved C++ keywords throughout.
56
3bc3d82a
PA
572015-02-27 Pedro Alves <palves@redhat.com>
58
59 * Makefile.in (COMPILER): New, get it from autoconf.
60 (CXX): Get from autoconf instead.
61 (COMPILE.pre): Use COMPILER.
62 (CC-LD): Rename to ...
63 (CC_LD): ... this. Use COMPILER.
64 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
65 (CXX_FOR_TARGET): Default to g++ instead of gcc.
66 * acinclude.m4: Include build-with-cxx.m4.
67 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
68 Disable -Werror by default if building in C++ mode.
69 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
70 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
71 the C++ compiler. Save/restore CXXFLAGS too.
72 * configure: Regenerate.
73
07697489
PA
742015-02-27 Pedro Alves <palves@redhat.com>
75
76 * acinclude.m4: Include libiberty.m4.
77 * configure.ac: Call libiberty_INIT.
78 * config.in, configure: Regenerate.
79
9beb7c4e
PA
802015-02-26 Pedro Alves <palves@redhat.com>
81
82 * linux-low.c (linux_wait_1): When incrementing the PC past a
83 program breakpoint always use the_low_target.breakpoint_len as
84 increment, rather than the maximum between that and
85 the_low_target.decr_pc_after_break.
86
8090aef2
PA
872015-02-23 Pedro Alves <palves@redhat.com>
88
89 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
90 thread was doing a step-over; always adjust the PC if
91 we stepped over a permanent breakpoint.
92 (linux_wait_1): If we stepped over breakpoint that was on top of a
93 permanent breakpoint, manually advance the PC past it.
94
bc9540e8
PA
952015-02-23 Pedro Alves <palves@redhat.com>
96
97 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
98 modes.
99 (x86_fill_gregset, x86_store_gregset): Use it when handling
100 $orig_eax.
101
2db9a427
PA
1022015-02-20 Pedro Alves <palves@redhat.com>
103
104 * thread-db.c: Include "nat/linux-procfs.h".
105 (thread_db_init): Skip listing new threads if the kernel supports
106 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
107
afa8d396
PA
1082015-02-20 Pedro Alves <palves@redhat.com>
109
110 * linux-low.c (status_pending_p_callback): Use ptid_match.
111
c9587f88
AT
1122015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
113
114 PR breakpoints/16812
115 * linux-low.c (wstatus_maybe_breakpoint): Remove.
116 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
117 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
118
b05ec7a5
AT
1192015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
120
121 PR breakpoints/15956
122 * tracepoint.c (cmd_qtinit): Add check for current_thread.
123
d33501a5
MM
1242015-02-09 Markus Metzger <markus.t.metzger@intel.com>
125
126 * linux-low.c (linux_low_btrace_conf): Print size.
127 * server.c (handle_btrace_conf_general_set): New.
128 (hanle_general_set): Call handle_btrace_conf_general_set.
129 (handle_query): Report Qbtrace-conf:bts:size as supported.
130
f4abbc16
MM
1312015-02-09 Markus Metzger <markus.t.metzger@intel.com>
132
133 * linux-low.c (linux_low_enable_btrace): Update parameters.
134 (linux_low_btrace_conf): New.
135 (linux_target_ops)<to_btrace_conf>: Initialize.
136 * server.c (current_btrace_conf): New.
137 (handle_btrace_enable): Rename to ...
138 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
139 to target_enable_btrace. Update comment. Update users.
140 (handle_qxfer_btrace_conf): New.
141 (qxfer_packets): Add btrace-conf entry.
142 (handle_query): Report qXfer:btrace-conf:read as supported packet.
143 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
144 (target_ops)<read_btrace_conf>: New.
145 (target_enable_btrace): Update parameters.
146 (target_read_btrace_conf): New.
147
043c3577
MM
1482015-02-09 Markus Metzger <markus.t.metzger@intel.com>
149
150 * server.c (handle_btrace_general_set): Remove call to
151 target_supports_btrace.
152 (supported_btrace_packets): New.
153 (handle_query): Call supported_btrace_packets.
154 * target.h: include btrace-common.h.
155 (btrace_target_info): Removed.
156 (supports_btrace, target_supports_btrace): Update parameters.
157
734b0e4b
MM
1582015-02-09 Markus Metzger <markus.t.metzger@intel.com>
159
160 * Makefile.in (SFILES): Add common/btrace-common.c.
161 (OBS): Add common/btrace-common.o.
162 (btrace-common.o): Add build rules.
163 * linux-low: Include btrace-common.h.
164 (linux_low_read_btrace): Use struct btrace_data. Call
165 btrace_data_init and btrace_data_fini.
166
d6c146e9
PA
1672015-02-06 Pedro Alves <palves@redhat.com>
168
169 * thread-db.c (find_new_threads_callback): Add debug output.
170
20ba1ce6
PA
1712015-02-04 Pedro Alves <palves@redhat.com>
172
173 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
174 (resume_stopped_resumed_lwps): New function.
175 (linux_wait_for_event_filtered): Use it.
176
8cc73a39
SDJ
1772015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
178
179 * Makefile.in (SFILES): Add linux-personality.c.
180 (linux-personality.o): New rule.
181 * configure.srv (srv_linux_obj): Add linux-personality.o to the
182 list of objects to be built.
183 * linux-low.c: Include nat/linux-personality.h.
184 (linux_create_inferior): Remove code to disable address space
185 randomization (moved to ../nat/linux-personality.c). Create
186 cleanup to disable address space randomization.
187
fb23d554
SDJ
1882015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
189
190 * Makefile.in (posix-strerror.o): New rule.
191 (mingw-strerror.o): Likewise.
192 * configure: Regenerated.
193 * configure.ac: Source file ../common/common.host. Initialize new
194 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
195
cdf43629
YQ
1962015-01-14 Yao Qi <yao@codesourcery.com>
197
198 * Makefile.in (SFILES): Add nat/ppc-linux.c.
199 (ppc-linux.o): New rule.
200 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
201 * configure.ac: AC_CHECK_FUNCS(getauxval).
202 * config.in: Re-generated.
203 * configure: Re-generated.
204 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
205 ppc64_64bit_inferior_p
206
514c5338
YQ
2072015-01-14 Yao Qi <yao@codesourcery.com>
208
209 * linux-ppc-low.c: Include "nat/ppc-linux.h".
210 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
211 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
212 (PT_ORIG_R3, PT_TRAP): Likewise.
213 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
214 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
215 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
216
3368c1e5
JB
2172015-01-10 Joel Brobecker <brobecker@adacore.com>
218
219 * i387-fp.c (i387_cache_to_xsave): In look over
220 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
221 zmmh_low_space field by use of zmmh_high_space.
222
582511be
PA
2232015-01-09 Pedro Alves <palves@redhat.com>
224
225 * linux-low.c (step_over_bkpt): Move higher up in the file.
226 (handle_extended_wait): Don't store the stop_pc here.
227 (get_stop_pc): Adjust comments and rename to ...
228 (check_stopped_by_breakpoint): ... this. Record whether the LWP
229 stopped for a software breakpoint or hardware breakpoint.
230 (thread_still_has_status_pending_p): New function.
231 (status_pending_p_callback): Use
232 thread_still_has_status_pending_p. If the event is no longer
233 interesting, resume the LWP.
234 (handle_tracepoints): Add assert.
235 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
236 (wstatus_maybe_breakpoint): New function.
237 (cancel_breakpoint): Delete function.
238 (check_stopped_by_watchpoint): New function, factored out from
239 linux_low_filter_event.
240 (lp_status_maybe_breakpoint): Delete function.
241 (linux_low_filter_event): Remove filter_ptid argument.
242 Leave thread group exits pending here. Store the LWP's stop PC.
243 Always leave events pending.
244 (linux_wait_for_event_filtered): Pull all events out of the
245 kernel, and leave them all pending.
246 (count_events_callback, select_event_lwp_callback): Consider all
247 events.
248 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
249 (select_event_lwp): Only give preference to the stepping LWP in
250 all-stop mode. Adjust comments.
251 (ignore_event): New function.
252 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
253 references to cancel_breakpoints. Adjust to renames. Also give
254 equal priority to all LWPs that have had events in non-stop mode.
255 If reporting a software breakpoint event, unadjust the LWP's PC.
256 (linux_wait): If linux_wait_1 returned an ignored event, retry.
257 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
258 Adjust.
259 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
260 (resume_status_pending_p): Use thread_still_has_status_pending_p.
261 (linux_stopped_by_watchpoint): Adjust.
262 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
263 * linux-low.h (enum lwp_stop_reason): New.
264 (struct lwp_info) <stop_pc>: Adjust comment.
265 <stopped_by_watchpoint>: Delete field.
266 <stop_reason>: New field.
267 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
268 * mem-break.c (software_breakpoint_inserted_here)
269 (hardware_breakpoint_inserted_here): New function.
270 * mem-break.h (software_breakpoint_inserted_here)
271 (hardware_breakpoint_inserted_here): Declare.
272 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
273 (cancel_breakpoints): Delete.
274 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
275 (upload_fast_traceframes): Remove references to
276 cancel_breakpoints.
277
a33e3959
PA
2782015-01-09 Pedro Alves <palves@redhat.com>
279
280 * thread-db.c (find_new_threads_callback): Ignore thread if the
281 kernel thread ID is -1.
282
8784d563
PA
2832015-01-09 Pedro Alves <palves@redhat.com>
284
285 * linux-low.c (linux_attach_fail_reason_string): Move to
286 nat/linux-ptrace.c, and rename.
287 (linux_attach_lwp): Update comment.
288 (attach_proc_task_lwp_callback): New function.
289 (linux_attach): Adjust to rename and use
290 linux_proc_attach_tgid_threads.
291 (linux_attach_fail_reason_string): Delete declaration.
292
76f2b779
JB
2932015-01-01 Joel Brobecker <brobecker@adacore.com>
294
295 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
296 * server.c (gdbserver_version): Likewise.
297
fafcc06a
SDJ
2982014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
299
300 * remote-utils.c: Include ctype.h.
301 (input_interrupt): Explicitly handle the case when the char
302 received is the NUL byte. Improve the printing of non-ASCII
303 characters.
304
beed38b8
JB
3052014-12-16 Joel Brobecker <brobecker@adacore.com>
306
307 * linux-low.c (linux_low_filter_event): Update call to
308 linux_enable_event_reporting following the addition of
309 a new parameter to that function.
310
bf330350
CU
3112014-12-16 Catalin Udma <catalin.udma@freescale.com>
312
313 PR server/17457
314 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
315 (AARCH64_FPCR_REGNO): Likewise.
316 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
317 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
318 (aarch64_store_fpregset): Likewise.
319
5227d625
JB
3202014-12-15 Joel Brobecker <brobecker@adacore.com>
321
322 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
323 Remove FIXME comment about assumption about N.
324
f93b65a0
JB
3252014-12-13 Joel Brobecker <brobecker@adacore.com>
326
327 * configure.ac: If large-file support is disabled in GDBserver,
328 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
329 * configure: Regenerate.
330
e5a9158d
AA
3312014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
332
333 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
334 warning upon ENODATA from ptrace.
335 * linux-s390-low.c (s390_store_tdb): New.
336 (s390_regsets): Add regset for NT_S390_TDB.
337
feea5f36
AA
3382014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
339
340 * linux-low.c (regsets_store_inferior_registers): Skip regsets
341 without a fill_function.
342 * linux-s390-low.c (s390_fill_last_break): Remove.
343 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
344 (s390_arch_setup): Use regset's size instead of fill_function for
345 loop end condition.
346
098dbe61
AA
3472014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
348
349 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
350 the regset's store function when ptrace returned an error.
351 * regcache.c (get_thread_regcache): Invalidate register cache
352 before fetching inferior's registers.
353
28eef672
AA
3542014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
355
356 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
357 while-loop as for-loop.
358 (regsets_store_inferior_registers): Likewise.
359
bdca27a2
YQ
3602014-11-28 Yao Qi <yao@codesourcery.com>
361
362 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
363 * config.in, configure: Re-generate.
364 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
365 is defined.
366
9c232dda
YQ
3672014-11-21 Yao Qi <yao@codesourcery.com>
368
369 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
370 (AC_CHECK_HEADERS): Remove malloc.h.
371 * configure: Re-generated.
372 * config.in: Re-generated.
373 * server.h: Don't include alloca.h and malloc.h.
374 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
375 Don't include malloc.h.
376
43968415
JB
3772014-11-17 Joel Brobecker <brobecker@adacore.com>
378
379 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
380 corresponding ERRNO check in same block.
381
40e91bc7
PA
3822014-11-12 Pedro Alves <palves@redhat.com>
383
384 * server.c (cont_thread): Update comment.
385 (start_inferior, attach_inferior): No longer clear cont_thread.
386 (handle_v_cont): No longer set cont_thread.
387 (captured_main): Clear cont_thread each time a GDB connects.
388
c2c118cf
PA
3892014-11-12 Pedro Alves <palves@redhat.com>
390
391 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
392 thread, and don't resume all threads if the Hc thread has exited.
393
78708b7c
PA
3942014-11-12 Pedro Alves <palves@redhat.com>
395
396 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
397 the process group instead of to a specific LWP.
398
a2abc7de
PA
3992014-10-15 Pedro Alves <palves@redhat.com>
400
401 PR server/17487
402 * win32-arm-low.c (arm_set_thread_context): Remove current_event
403 parameter.
404 (arm_set_thread_context): Delete.
405 (the_low_target): Adjust.
406 * win32-i386-low.c (debug_registers_changed)
407 (debug_registers_used): Delete.
408 (update_debug_registers_callback): New function.
409 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
410 needing to update their debug registers.
411 (win32_get_current_dr): New function.
412 (x86_dr_low_get_addr, x86_dr_low_get_control)
413 (x86_dr_low_get_status): Fetch the debug register from the thread
414 record's context.
415 (i386_initial_stuff): Adjust.
416 (i386_get_thread_context): Remove current_event parameter. Don't
417 clear debug_registers_changed nor copy DR values to
418 debug_reg_state.
419 (i386_set_thread_context): Delete.
420 (i386_prepare_to_resume): New function.
421 (i386_thread_added): Mark the thread as needing to update irs
422 debug registers.
423 (the_low_target): Remove i386_set_thread_context and install
424 i386_prepare_to_resume.
425 * win32-low.c (win32_get_thread_context): Adjust.
426 (win32_set_thread_context): Use SetThreadContext
427 directly.
428 (win32_prepare_to_resume): New function.
429 (win32_require_context): New function, factored out from ...
430 (thread_rec): ... this.
431 (continue_one_thread): Call win32_prepare_to_resume on each thread
432 we're about to continue.
433 (win32_resume): Call win32_prepare_to_resume on the event thread.
434 * win32-low.h (struct win32_thread_info)
435 <debug_registers_changed>: New field.
436 (struct win32_target_ops): Change prototype of set_thread_context,
437 delete set_thread_context and add prepare_to_resume.
438 (win32_require_context): New declaration.
439
a442d071
GB
4402014-10-08 Gary Benson <gbenson@redhat.com>
441
442 * server.h: Do not include common-exceptions.h.
443
6f1947e8
GB
4442014-10-08 Gary Benson <gbenson@redhat.com>
445
446 * server.h: Do not include cleanups.h.
447
63b434a4
JH
4482014-09-30 James Hogan <james.hogan@imgtec.com>
449
450 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
451 mips64-dsp-linux.c.
452
c4d9ceb6
YQ
4532014-09-23 Yao Qi <yao@codesourcery.com>
454
455 * linux-low.c (lp_status_maybe_breakpoint): New function.
456 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
457 (count_events_callback): Likewise.
458 (select_event_lwp_callback): Likewise.
459 (cancel_breakpoints_callback): Likewise.
460
89a5711c
DB
4612014-09-19 Don Breazeal <donb@codesourcery.com>
462
463 * linux-low.c (handle_extended_wait): Call
464 linux_ptrace_get_extended_event.
465 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
466 linux_is_extended_waitstatus.
467
bffc0964
JB
4682014-09-16 Joel Brobecker <brobecker@adacore.com>
469
470 * Makefile.in (CPPFLAGS): Define.
471 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
472 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
473
0bfdf32f
GB
4742014-09-16 Gary Benson <gbenson@redhat.com>
475
476 * inferiors.h (current_inferior): Renamed as...
477 (current_thread): New variable. All uses updated.
478 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
479 (maybe_move_out_of_jump_pad): Likewise.
480 (cancel_breakpoint): Likewise.
481 (linux_low_filter_event): Likewise.
482 (wait_for_sigstop): Likewise.
483 (linux_resume_one_lwp): Likewise.
484 (need_step_over_p): Likewise.
485 (start_step_over): Likewise.
486 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
487 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
488 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
489 and save_inferior as saved_thread.
490 * regcache.c (get_thread_regcache): Renamed saved_inferior as
491 saved_thread.
492 (regcache_invalidate_thread): Likewise.
493 * remote-utils.c (prepare_resume_reply): Likewise.
494 * thread-db.c (thread_db_get_tls_address): Likewise.
495 (disable_thread_event_reporting): Likewise.
496 (remove_thread_event_breakpoints): Likewise.
497 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
498 as saved_thread.
499 * target.h (set_desired_inferior): Renamed as...
500 (set_desired_thread): New declaration. All uses updated.
501 * server.c (myresume): Updated comment to reference thread instead
502 of inferior.
503 (handle_serial_event): Likewise.
504 (handle_target_event): Likewise.
505
361c8ade
GB
5062014-09-12 Tom Tromey <tromey@redhat.com>
507 Gary Benson <gbenson@redhat.com>
508
509 * regcache.h: Include common-regcache.h.
510 (regcache_read_pc): Don't declare.
511 * regcache.c (get_thread_regcache_for_ptid): New function.
512
bd9269f7
GB
5132014-09-11 Tom Tromey <tromey@redhat.com>
514 Gary Benson <gbenson@redhat.com>
515
516 * symbol.c: New file.
517 * Makefile.in (SFILES): Add symbol.c.
518 (OBS): Add symbol.o.
519
f8c1d06b
GB
5202014-09-11 Gary Benson <gbenson@redhat.com>
521
522 * target.c (target_stop_ptid, target_continue_ptid): New
523 functions.
524
721ec300
GB
5252014-09-11 Tom Tromey <tromey@redhat.com>
526 Gary Benson <gbenson@redhat.com>
527
528 * target.h: Include target/target.h.
529 * target.c (target_read_memory, target_read_uint32)
530 (target_write_memory): New functions.
531
c5e92cca
GB
5322014-09-11 Gary Benson <gbenson@redhat.com>
533
534 * server.h (debug_hw_points): Don't declare.
535 * server.c (debug_hw_points): Don't define. Replace all uses
536 with show_debug_regs.
537 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
538 all uses with show_debug_regs.
539
2e4bb98a
EBM
5402014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
541
542 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
543 endianness into account.
544 (ppc_supply_ptrace_register): Likewise.
545
ac740bc7
JH
5462014-09-03 James Hogan <james.hogan@imgtec.com>
547
548 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
549 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
550
97ea6506
GB
5512014-09-03 Gary Benson <gbenson@redhat.com>
552
553 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
554 ALL_DEBUG_ADDRESS_REGISTERS.
555
df7e5265
GB
5562014-09-02 Gary Benson <gbenson@redhat.com>
557
558 * i386-low.h: Renamed as...
559 * x86-low.h: New file. All type, function and variable name
560 prefixes changed from "i386_" to "x86_". All references updated.
561 * i386-low.c: Renamed as...
562 * x86-low.c: New file. All type, function and variable name
563 prefixes changed from "i386_" to "x86_". All references updated.
564
ed859da7
GB
5652014-09-02 Gary Benson <gbenson@redhat.com>
566
567 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
568 (x86_linux_new_thread): Likewise.
569
860789c7
GB
5702014-08-29 Gary Benson <gbenson@redhat.com>
571
572 * server.h (setjmp.h): Do not include.
573 (toplevel): Do not declare.
574 (common-exceptions.h): Include.
575 (cleanups.h): Likewise.
576 * server.c (toplevel): Do not define.
577 (exit_code): New static global.
578 (detach_or_kill_for_exit_cleanup): New function.
579 (main): New function. Original main renamed to...
580 (captured_main): New function.
581 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
582
ff55e1b5
GB
5832014-08-29 Gary Benson <gbenson@redhat.com>
584
585 * Makefile.in (SFILES): Add common/common-exceptions.c.
586 (OBS): Add common-exceptions.o.
587 (common-exceptions.o): New rule.
588 * utils.c (prepare_to_throw_exception): New function.
589
e9bcb658
GB
5902014-08-29 Gary Benson <gbenson@redhat.com>
591
592 * config.in: Regenerate.
593 * configure: Likewise.
594
e3180625
GB
5952014-08-29 Gary Benson <gbenson@redhat.com>
596
597 * Makefile.in (SFILES): Add common/cleanups.c.
598 (OBS): cleanups.o.
599 (cleanups.o): New rule.
600
e3d6ba5d
GB
6012014-08-29 Gary Benson <gbenson@redhat.com>
602
603 * utils.c (internal_vwarning): New function.
604
7096e886
GB
6052014-08-28 Gary Benson <gbenson@redhat.com>
606
607 * utils.h (fatal): Remove declaration.
608 * utils.c (fatal): Remove function.
609
14ce3192
GB
6102014-08-28 Gary Benson <gbenson@redhat.com>
611
612 * tracepoint.c (gdb_agent_init): Replace fatal with
613 perror_with_name.
614 (initialize_tracepoint): Likewise.
615
50278d59
GB
6162014-08-28 Gary Benson <gbenson@redhat.com>
617
618 * remote-utils.c (remote_prepare): Replace fatal with error.
619
aa96c426
GB
6202014-08-28 Gary Benson <gbenson@redhat.com>
621
622 * linux-low.c (linux_async): Replace fatal with warning.
623 Tidy up and return.
624 (linux_start_non_stop): Return -1 if linux_async failed.
625
f7160e97
GB
6262014-08-28 Gary Benson <gbenson@redhat.com>
627
628 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
629 gdb_assert.
630 (i386_dr_low_get_addr): Remove vague comment.
631 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
632 gdb_assert.
633
38e08fca
GB
6342014-08-28 Gary Benson <gbenson@redhat.com>
635
636 * inferiors.c (get_thread_process): Replace check with gdb_assert.
637 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
638 internal_error.
639 (linux_resume_one_lwp): Likewise.
640 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
641 gdb_assert.
642 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
643 with internal_error.
644 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
645 (init_register_cache): Replace fatal with gdb_assert_not_reached.
646 (find_register_by_name): Replace fatal with internal_error.
647 (find_regno): Likewise.
648 * tdesc.c (init_target_desc): Replace check with gdb_assert.
649 * thread-db.c (thread_db_create_event): Likewise.
650 (thread_db_load_search): Likewise.
651 (try_thread_db_load_1): Likewise.
652 * tracepoint.c (get_jump_space_head): Replace fatal with
653 internal_error.
654 (claim_trampoline_space): Likewise.
655 (have_fast_tracepoint_trampoline_buffer): Likewise.
656 (cmd_qtstart): Likewise.
657 (stop_tracing): Likewise.
658 (fast_tracepoint_collecting): Likewise.
659 (target_malloc): Likewise.
660 (download_tracepoint): Likewise.
661 (download_trace_state_variables): Replace check with gdb_assert.
662 (upload_fast_traceframes): Replace fatal with internal_error.
663
34abf635
GB
6642014-08-19 Tom Tromey <tromey@redhat.com>
665 Gary Benson <gbenson@redhat.com>
666
667 * Makefile.in (SFILES): Add common/common-debug.c.
668 (OBS): Add common-debug.o.
669 (common-debug.o): New rule.
670 * debug.h (debug_printf): Don't declare.
671 * debug.c (debug_printf): Renamed and rewritten as...
672 (debug_vprintf): New function.
673
f6e94d78
GB
6742014-08-19 Gary Benson <gbenson@redhat.com>
675
676 * utils.h: Do not include print-utils.h.
677
9239eeab
GB
6782014-08-19 Tom Tromey <tromey@redhat.com>
679 Gary Benson <gbenson@redhat.com>
680
681 * server.h: Add static assertion.
682 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
683
ef87c8bb
GB
6842014-08-19 Tom Tromey <tromey@redhat.com>
685 Gary Benson <gbenson@redhat.com>
686
687 * Makefile.in (SFILES): Add common/errors.c.
688 (OBS): Add errors.o.
689 (IPA_OBS): Add errors-ipa.o.
690 (errors.o): New rule.
691 (errors-ipa.o): Likewise.
692 * utils.h (perror_with_name, error, warning): Don't declare.
693 * utils.c (warning): Renamed and rewritten as...
694 (vwarning): New function.
695 (error): Renamed and rewritten as...
696 (verror): New function.
697 (internal_error): Renamed and rewritten as...
698 (internal_verror): New function.
699
bb974a24
GB
7002014-08-07 Gary Benson <gbenson@redhat.com>
701
702 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
703 * configure: Regenerate.
704 * config.in: Likewise.
705 * server.h: Do not include errno.h.
706 * event-loop.c: Likewise.
707 * hostio-errno.c: Likewise.
708 * linux-low.c: Likewise.
709 * remote-utils.c: Likewise.
710 * spu-low.c: Likewise.
711 * utils.c: Likewise.
712 * gdbreplay.c: Unconditionally include errno.h.
713
6d3d12eb
GB
7142014-08-07 Gary Benson <gbenson@redhat.com>
715
716 * server.h: Do not include string.h.
717 * event-loop.c: Likewise.
718 * linux-low.c: Likewise.
719 * regcache.c: Likewise.
720 * remote-utils.c: Likewise.
721 * spu-low.c: Likewise.
722 * utils.c: Likewise.
723
dccbb609
GB
7242014-08-07 Gary Benson <gbenson@redhat.com>
725
726 * server.h: Do not include gdb_assert.h.
727
e76df0d0
GB
7282014-08-07 Gary Benson <gbenson@redhat.com>
729
730 * server.h: Do not include common-utils.h.
731
4cb9c816
GB
7322014-08-07 Gary Benson <gbenson@redhat.com>
733
734 * server.h: Do not include ptid.h.
735 * notif.h: Likewise.
736
3995eeee
GB
7372014-08-07 Gary Benson <gbenson@redhat.com>
738
739 * server.h: Do not include gdb_locale.h.
740
cb9f1a9b
GB
7412014-08-07 Gary Benson <gbenson@redhat.com>
742
743 * server.h: Do not include gdb/signals.h.
744 * win32-low.c: Likewise.
745
a5fceff8
GB
7462014-08-07 Gary Benson <gbenson@redhat.com>
747
748 * server.h: Do not include pathmax.h.
749
b9391142
GB
7502014-08-07 Gary Benson <gbenson@redhat.com>
751
752 * server.h: Do not include libiberty.h.
753 * linux-bfin-low.c: Likewise.
754
0e443c87
GB
7552014-08-07 Gary Benson <gbenson@redhat.com>
756
757 * server.h: Do not include ansidecl.h.
758
8ebb3f56
GB
7592014-08-07 Gary Benson <gbenson@redhat.com>
760
761 * linux-x86-low.c: Do not include stddef.h.
762 * lynx-ppc-low.c: Likewise.
763 * tracepoint.c: Likewise.
764
8980bdf6
GB
7652014-08-07 Gary Benson <gbenson@redhat.com>
766
767 * server.h: Do not include stdarg.h.
768 * nto-low.c: Likewise.
769
d7096f71
GB
7702014-08-07 Gary Benson <gbenson@redhat.com>
771
772 * server.h: Do not include stdlib.h.
773 * inferiors.c: Likewise.
774 * linux-low.c: Likewise.
775 * regcache.c: Likewise.
776 * spu-low.c: Likewise.
777 * tracepoint.c: Likewise.
778 * utils.c: Likewise.
779
d02f550d
GB
7802014-08-07 Gary Benson <gbenson@redhat.com>
781
782 * server.h: Do not include stdio.h.
783 * linux-low.c: Likewise.
784 * remote-utils.c: Likewise.
785 * spu-low.c: Likewise.
786 * utils.c: Likewise.
787 * wincecompat.c: Likewise.
788
87f6c4e3
GB
7892014-08-06 Gary Benson <gbenson@redhat.com>
790
791 * regcache.c (init_register_cache): Move conditionals inside if.
792
7089dca4
GB
7932014-08-06 Gary Benson <gbenson@redhat.com>
794
795 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
796
462f517e
GB
7972014-07-31 Gary Benson <gbenson@redhat.com>
798
799 * ax.h: Do not include server.h.
800 * gdbthread.h: Likewise.
801 * lynx-low.h: Likewise.
802 * notif.h: Likewise.
803
976411d6
GB
8042014-07-30 Gary Benson <gbenson@redhat.com>
805
806 * server.h: Include common-defs.h.
807 Do not include config.h or build-gnulib-gdbserver/config.h.
808
d41f6d8e
GB
8092014-07-30 Gary Benson <gbenson@redhat.com>
810
811 * hostio-errno.c: Move server.h to top of includes list.
812 * inferiors.c: Likewise.
813 * linux-x86-low.c: Likewise.
814 * notif.c: Include server.h.
815
314c6a35
TT
8162014-07-24 Tom Tromey <tromey@redhat.com>
817 Gary Benson <gbenson@redhat.com>
818
819 * server.h (CORE_ADDR): Now unsigned.
820
69ff6be5
PA
8212014-07-16 Pedro Alves <palves@redhat.com>
822
823 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
824
ce9e3fe7
PA
8252014-07-15 Pedro Alves <palves@redhat.com>
826
827 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
828 copy.
829
e76126e8
PA
8302014-07-11 Pedro Alves <palves@redhat.com>
831
832 * linux-low.c (kill_wait_lwp): New function, based on
833 kill_one_lwp_callback, but use my_waitpid directly.
834 (kill_one_lwp_callback, linux_kill): Use it.
835
8e9db26e
PA
8362014-06-23 Pedro Alves <palves@redhat.com>
837
838 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
839 before setting DR0..DR3.
840
698b3e08
GB
8412014-06-20 Gary Benson <gbenson@redhat.com>
842
843 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
844 * configure: Regenerated.
845 * config.in: Likewise.
846
125f8a3d
GB
8472014-06-20 Gary Benson <gbenson@redhat.com>
848
849 * Makefile.in (SFILES): Update locations for files moved
850 from common to nat.
851 (object file files): Reordered.
852
42995dbd
GB
8532014-06-20 Gary Benson <gbenson@redhat.com>
854
855 * i386-low.h (i386_dr_low_can_set_addr): Removed.
856 (i386_dr_low_set_addr): Likewise.
857 (i386_dr_low_get_addr): Likewise.
858 (i386_dr_low_can_set_control): Likewise.
859 (i386_dr_low_set_control): Likewise.
860 (i386_dr_low_get_control): Likewise.
861 (i386_dr_low_get_status): Likewise.
862 (i386_get_debug_register_length): Likewise.
863 * linux-x86-low.c (i386_dr_low_set_addr):
864 Changed signature. Made static.
865 (i386_dr_low_get_addr): Likewise.
866 (i386_dr_low_set_control): Likewise.
867 (i386_dr_low_get_control): Likewise.
868 (i386_dr_low_get_status): Likewise.
869 (i386_dr_low): New global variable.
870 * win32-i386-low.c (i386_dr_low_set_addr):
871 Changed signature. Made static.
872 (i386_dr_low_get_addr): Likewise.
873 (i386_dr_low_set_control): Likewise.
874 (i386_dr_low_get_control): Likewise.
875 (i386_dr_low_get_status): Likewise.
876 (i386_dr_low): New global variable.
877
e1d2394b
MS
8782014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
879
880 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
881 * Makefile.in (AR, AR_FLAGS): Define.
882 * configure: Regenerate.
883
3a8ee006
GB
8842014-06-19 Gary Benson <gbenson@redhat.com>
885
886 * Makefile.in (i386-dregs.o): New rule.
887 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
888 * i386-low.c (target.h): Remove include.
889 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
890 (DR_CONTROL_SHIFT): Likewise.
891 (DR_CONTROL_SIZE): Likewise.
892 (DR_RW_EXECUTE): Likewise.
893 (DR_RW_WRITE): Likewise.
894 (DR_RW_READ): Likewise.
895 (DR_RW_IORW): Likewise.
896 (DR_LEN_1): Likewise.
897 (DR_LEN_2): Likewise.
898 (DR_LEN_4): Likewise.
899 (DR_LEN_8): Likewise.
900 (DR_LOCAL_ENABLE_SHIFT): Likewise.
901 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
902 (DR_ENABLE_SIZE): Likewise.
903 (DR_LOCAL_SLOWDOWN): Likewise.
904 (DR_GLOBAL_SLOWDOWN): Likewise.
905 (DR_CONTROL_RESERVED): Likewise.
906 (I386_DR_CONTROL_MASK): Likewise.
907 (I386_DR_VACANT): Likewise.
908 (I386_DR_LOCAL_ENABLE): Likewise.
909 (I386_DR_GLOBAL_ENABLE): Likewise.
910 (I386_DR_DISABLE): Likewise.
911 (I386_DR_SET_RW_LEN): Likewise.
912 (I386_DR_GET_RW_LEN): Likewise.
913 (I386_DR_WATCH_HIT): Likewise.
914 (i386_wp_op_t): Likewise.
915 (i386_show_dr): Likewise.
916 (i386_length_and_rw_bits): Likewise.
917 (i386_insert_aligned_watchpoint): Likewise.
918 (i386_remove_aligned_watchpoint): Likewise.
919 (i386_handle_nonaligned_watchpoint): Likewise.
920 i386_update_inferior_debug_regs(): Likewise.
921 (i386_dr_insert_watchpoint): Likewise.
922 (i386_dr_remove_watchpoint): Likewise.
923 (i386_dr_region_ok_for_watchpoint): Likewise.
924 (i386_dr_stopped_data_address): Likewise.
925 (i386_dr_stopped_by_watchpoint): Likewise.
926
8f26655c
GB
9272014-06-19 Gary Benson <gbenson@redhat.com>
928
929 * i386-low.c (i386_dr_show): Renamed to
930 i386_show_dr and made static. All uses updated.
931 (i386_dr_length_and_rw_bits): Renamed to
932 i386_length_and_rw_bits and made static.
933 All uses updated.
934 (i386_dr_insert_aligned_watchpoint): Renamed to
935 i386_insert_aligned_watchpoint and made static.
936 All uses updated.
937 (i386_dr_remove_aligned_watchpoint): Renamed to
938 i386_remove_aligned_watchpoint and made static.
939 All uses updated.
940 (i386_dr_update_inferior_debug_regs): Renamed to
941 i386_update_inferior_debug_regs and made static.
942 All uses updated.
943
b9228891
GB
9442014-06-18 Gary Benson <gbenson@redhat.com>
945
5171def3
GB
946 * i386-low.h (i386_dr_low_can_set_addr): New macro.
947 (i386_dr_low_can_set_control): Likewise.
948 (i386_get_debug_register_length): Likewise.
949 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
950 (i386_dr_low_can_set_control): Likewise.
951 (i386_get_debug_register_length): Likewise.
952
9532014-06-17 Gary Benson <gbenson@redhat.com>
954
b9228891
GB
955 * i386-low.h (i386-dregs.h): New include.
956 (DR_FIRSTADDR): Now in i386-dregs.h.
957 (DR_LASTADDR): Likewise.
958 (DR_NADDR): Likewise.
959 (DR_STATUS): Likewise.
960 (DR_CONTROL): Likewise.
961 (i386_debug_reg_state): Likewise.
962 (i386_dr_insert_watchpoint): Likewise.
963 (i386_dr_remove_watchpoint): Likewise.
964 (i386_dr_region_ok_for_watchpoint): Likewise.
965 (i386_dr_stopped_data_address): Likewise.
966 (i386_dr_stopped_by_watchpoint): Likewise.
967 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
968
4be83cc2
GB
9692014-06-18 Gary Benson <gbenson@redhat.com>
970
971 * i386-low.h (i386_low_insert_watchpoint): Renamed to
972 i386_dr_insert_watchpoint.
973 (i386_low_remove_watchpoint): Renamed to
974 i386_dr_remove_watchpoint.
975 (i386_low_region_ok_for_watchpoint): Renamed to
976 i386_dr_region_ok_for_watchpoint.
977 (i386_low_stopped_data_address): Renamed to
978 i386_dr_stopped_data_address.
979 (i386_low_stopped_by_watchpoint): Renamed to
980 i386_dr_stopped_by_watchpoint.
981 * i386-low.c (i386_show_dr): Renamed to
982 i386_dr_show and made nonstatic. All uses updated.
983 (i386_length_and_rw_bits): Renamed to
984 i386_dr_length_and_rw_bits and made nonstatic.
985 All uses updated.
986 (i386_insert_aligned_watchpoint): Renamed to
987 i386_dr_insert_aligned_watchpoint and made nonstatic.
988 All uses updated.
989 (i386_remove_aligned_watchpoint): Renamed to
990 i386_dr_remove_aligned_watchpoint and made nonstatic.
991 All uses updated.
992 (i386_update_inferior_debug_regs): Renamed to
993 i386_dr_update_inferior_debug_regs and made nonstatic.
994 All uses updated.
995 (i386_low_insert_watchpoint): Renamed to
996 i386_dr_insert_watchpoint. All uses updated.
997 (i386_low_remove_watchpoint): Renamed to
998 i386_dr_remove_watchpoint. All uses updated.
999 (i386_low_region_ok_for_watchpoint): Renamed to
1000 i386_dr_region_ok_for_watchpoint. All uses updated.
1001 (i386_low_stopped_data_address): Renamed to
1002 i386_dr_stopped_data_address. All uses updated.
1003 (i386_low_stopped_by_watchpoint): Renamed to
1004 i386_dr_stopped_by_watchpoint. All uses updated.
1005
131aa0d4
GB
10062014-06-18 Gary Benson <gbenson@redhat.com>
1007
1008 * i386-low.c (i386_dr_low_can_set_addr): New macro.
1009 (i386_dr_low_can_set_control): Likewise.
1010 (i386_insert_aligned_watchpoint): New check.
1011
d9305f7f
GB
10122014-06-18 Gary Benson <gbenson@redhat.com>
1013
1014 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
1015 Renamed to state.
1016
e927c9fc
GB
10172014-06-18 Gary Benson <gbenson@redhat.com>
1018
1019 * i386-low.c (i386_length_and_rw_bits): Use internal_error
1020 instead of fatal and error.
1021 (i386_handle_nonaligned_watchpoint): Likewise.
1022
1b6d4134
GB
10232014-06-18 Gary Benson <gbenson@redhat.com>
1024
1025 * i386-low.c (i386_get_debug_register_length): New macro.
1026 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
1027 (i386_show_dr): Use debug_printf instead of fprintf. Use
1028 phex to format values.
1029
6e62758f
GB
10302014-06-18 Gary Benson <gbenson@redhat.com>
1031
1032 * i386-low.h: Comment changes.
1033 * i386-low.c: Likewise.
1034
fc6e2f03
GB
10352014-06-18 Gary Benson <gbenson@redhat.com>
1036
1037 * i386-low.c: Whitespace changes.
1038
f9d1eeed
TT
10392014-06-12 Tom Tromey <tromey@redhat.com>
1040
1041 * utils.c (freeargv): Remove.
1042
0b04e523
TT
10432014-06-12 Tom Tromey <tromey@redhat.com>
1044
1045 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
1046 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
1047 (parse_debug_format_options): Likewise.
1048 (gdbserver_usage): Likewise.
1049 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
1050 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
1051 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
1052 against libiberty.
1053 ($(LIBGNU)): Depend on libiberty.
1054 (all-lib): Recurse into all subdirs.
1055 (install-only): Invoke "install" target in subdirs.
1056 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1057 targets.
1058 * configure: Rebuild.
1059 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
1060 for vasprintf, vsnprintf, or gettimeofday.
1061 * configure.srv: Don't add safe-ctype.o or lbasename.o to
1062 srv_tgtobj.
1063
270c9937
JB
10642014-06-05 Joel Brobecker <brobecker@adacore.com>
1065
1066 * development.sh: Delete.
1067 * Makefile.in (config.status): Adjust dependency on development.sh.
1068 * configure.ac: Adjust development.sh source call.
1069 * configure: Regenerate.
1070
0a261ed8
PA
10712014-06-02 Pedro Alves <palves@redhat.com>
1072
1073 * ax.c (gdb_free_agent_expr): New function.
1074 * ax.h (gdb_free_agent_expr): New declaration.
1075 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1076 list.
1077 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1078 static.
1079 (clear_breakpoint_conditions_and_commands): New function.
1080 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1081 (clear_breakpoint_conditions_and_commands): New declaration.
1082
e9dae05e
RR
10832014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1084
1085 * linux-aarch64-low.c (asm/ptrace.h): Include.
1086
5876f503
JK
10872014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1088
1089 Fix TLS access for -static -pthread.
1090 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1091 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1092 (thread_db_load_search, try_thread_db_load_1): Initialize it.
1093
802e8e6d
PA
10942014-05-20 Pedro Alves <palves@redhat.com>
1095
1096 * linux-aarch64-low.c (aarch64_insert_point)
1097 (aarch64_remove_point): No longer check whether the type is
1098 supported here. Adjust to new interface.
1099 (the_low_target): Install aarch64_supports_z_point_type as
1100 supports_z_point_type method.
1101 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
1102 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
1103 instead of a Z packet char. Adjust.
1104 (arm_supports_z_point_type): New function.
1105 (arm_insert_point, arm_remove_point): Adjust to new interface.
1106 (the_low_target): Install arm_supports_z_point_type.
1107 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1108 (cris_insert_point, cris_remove_point): Adjust to new interface.
1109 Don't check whether the type is supported here.
1110 (the_low_target): Install cris_supports_z_point_type.
1111 * linux-low.c (linux_supports_z_point_type): New function.
1112 (linux_insert_point, linux_remove_point): Adjust to new interface.
1113 * linux-low.h (struct linux_target_ops) <insert_point,
1114 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1115 raw_breakpoint pointer parameter.
1116 <supports_z_point_type>: New method.
1117 * linux-mips-low.c (mips_supports_z_point_type): New function.
1118 (mips_insert_point, mips_remove_point): Adjust to new interface.
1119 Use mips_supports_z_point_type.
1120 (the_low_target): Install mips_supports_z_point_type.
1121 * linux-ppc-low.c (the_low_target): Install NULL as
1122 supports_z_point_type method.
1123 * linux-s390-low.c (the_low_target): Install NULL as
1124 supports_z_point_type method.
1125 * linux-sparc-low.c (the_low_target): Install NULL as
1126 supports_z_point_type method.
1127 * linux-x86-low.c (x86_supports_z_point_type): New function.
1128 (x86_insert_point): Adjust to new insert_point interface. Use
1129 insert_memory_breakpoint. Adjust to new
1130 i386_low_insert_watchpoint interface.
1131 (x86_remove_point): Adjust to remove_point interface. Use
1132 remove_memory_breakpoint. Adjust to new
1133 i386_low_remove_watchpoint interface.
1134 (the_low_target): Install x86_supports_z_point_type.
1135 * lynx-low.c (lynx_target_ops): Install NULL as
1136 supports_z_point_type callback.
1137 * nto-low.c (nto_supports_z_point_type): New.
1138 (nto_insert_point, nto_remove_point): Adjust to new interface.
1139 (nto_target_ops): Install nto_supports_z_point_type.
1140 * mem-break.c: Adjust intro comment.
1141 (struct raw_breakpoint) <raw_type, size>: New fields.
1142 <inserted>: Update comment.
1143 <shlib_disabled>: Delete field.
1144 (enum bkpt_type) <gdb_breakpoint>: Delete value.
1145 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1146 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1147 (raw_bkpt_type_to_target_hw_bp_type): New function.
1148 (find_enabled_raw_code_breakpoint_at): New function.
1149 (find_raw_breakpoint_at): New type and size parameters. Use them.
1150 (insert_memory_breakpoint): New function, based off
1151 set_raw_breakpoint_at.
1152 (remove_memory_breakpoint): New function.
1153 (set_raw_breakpoint_at): Reimplement.
1154 (set_breakpoint): New, based on set_breakpoint_at.
1155 (set_breakpoint_at): Reimplement.
1156 (delete_raw_breakpoint): Go through the_target->remove_point
1157 instead of assuming memory breakpoints.
1158 (find_gdb_breakpoint_at): Delete.
1159 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1160 (find_gdb_breakpoint): New function.
1161 (set_gdb_breakpoint_at): Delete.
1162 (z_type_supported): New function.
1163 (set_gdb_breakpoint_1): New function, loosely based off
1164 set_gdb_breakpoint_at.
1165 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1166 (delete_gdb_breakpoint_at): Delete.
1167 (delete_gdb_breakpoint_1): New function, loosely based off
1168 delete_gdb_breakpoint_at.
1169 (delete_gdb_breakpoint): New function.
1170 (clear_gdb_breakpoint_conditions): Rename to ...
1171 (clear_breakpoint_conditions): ... this. Don't handle a NULL
1172 breakpoint.
1173 (add_condition_to_breakpoint): Make static.
1174 (add_breakpoint_condition): Take a struct breakpoint pointer
1175 instead of an address. Adjust.
1176 (gdb_condition_true_at_breakpoint): Rename to ...
1177 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1178 z_type parameter.
1179 (gdb_condition_true_at_breakpoint): Reimplement.
1180 (add_breakpoint_commands): Take a struct breakpoint pointer
1181 instead of an address. Adjust.
1182 (gdb_no_commands_at_breakpoint): Rename to ...
1183 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
1184 parameter. Return true if no breakpoint was found. Change debug
1185 output.
1186 (gdb_no_commands_at_breakpoint): Reimplement.
1187 (run_breakpoint_commands): Rename to ...
1188 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
1189 and change return type to boolean.
1190 (run_breakpoint_commands): New function.
1191 (gdb_breakpoint_here): Also check for Z1 breakpoints.
1192 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
1193 breakpoint. Go through the_target->remove_point instead of
1194 assuming memory breakpoint.
1195 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
1196 software and hardware breakpoints.
1197 (reinsert_raw_breakpoint): Go through the_target->insert_point
1198 instead of assuming memory breakpoint.
1199 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
1200 software and hardware breakpoints.
1201 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
1202 Check both software and hardware breakpoints.
1203 (validate_inserted_breakpoint): Assert the breakpoint is a
1204 software breakpoint. Set the inserted flag to -1 instead of
1205 setting shlib_disabled.
1206 (delete_disabled_breakpoints): Adjust.
1207 (validate_breakpoints): Only validate software breakpoints.
1208 Adjust to inserted flag change.
1209 (check_mem_read, check_mem_write): Skip breakpoint types other
1210 than software breakpoints. Adjust to inserted flag change.
1211 * mem-break.h (enum raw_bkpt_type): New enum.
1212 (raw_breakpoint, struct process_info): Forward declare.
1213 (Z_packet_to_target_hw_bp_type): Delete declaration.
1214 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
1215 (set_gdb_breakpoint, delete_gdb_breakpoint)
1216 (clear_breakpoint_conditions): New declarations.
1217 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
1218 (breakpoint_inserted_here): Update comment.
1219 (add_breakpoint_condition, add_breakpoint_commands): Replace
1220 address parameter with a breakpoint pointer parameter.
1221 (gdb_breakpoint_here): Update comment.
1222 (delete_gdb_breakpoint_at): Delete.
1223 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
1224 * server.c (process_point_options): Take a struct breakpoint
1225 pointer instead of an address. Adjust.
1226 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
1227 delete_gdb_breakpoint.
1228 * spu-low.c (spu_target_ops): Install NULL as
1229 supports_z_point_type method.
1230 * target.h: Include mem-break.h.
1231 (struct target_ops) <prepare_to_access_memory>: Update comment.
1232 <supports_z_point_type>: New field.
1233 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1234 instead of a char. Also take a raw breakpoint pointer.
1235 * win32-arm-low.c (the_low_target): Install NULL as
1236 supports_z_point_type.
1237 * win32-i386-low.c (i386_supports_z_point_type): New function.
1238 (i386_insert_point, i386_remove_point): Adjust to new interface.
1239 (the_low_target): Install i386_supports_z_point_type.
1240 * win32-low.c (win32_supports_z_point_type): New function.
1241 (win32_insert_point, win32_remove_point): Adjust to new interface.
1242 (win32_target_ops): Install win32_supports_z_point_type.
1243 * win32-low.h (struct win32_target_ops):
1244 <supports_z_point_type>: New method.
1245 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1246 instead of a char. Also take a raw breakpoint pointer.
1247
932539e3
PA
12482014-05-20 Pedro Alves <palves@redhat.com>
1249
1250 * mem-break.h: Include break-common.h.
1251 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1252 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
1253 (Z_packet_to_target_hw_bp_type): New declaration.
1254 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
1255 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
1256 (Z_PACKET_ACCESS_WP): Delete macros.
1257 (Z_packet_to_hw_type): Delete function.
1258 * i386-low.h: Don't include break-common.h here.
1259 (Z_packet_to_hw_type): Delete declaration.
1260 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
1261 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1262 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
1263 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1264 * linux-aarch64-low.c: Don't include break-common.h here.
1265 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1266 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
1267 (Z_packet_to_target_hw_bp_type): Delete function.
1268 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
1269 function.
1270 (mips_insert_point, mips_remove_point): Use
1271 Z_packet_to_target_hw_bp_type.
1272
4ff0d3d8
PA
12732014-05-20 Pedro Alves <palves@redhat.com>
1274
1275 * linux-aarch64-low.c: Include break-common.h.
1276 (enum target_point_type): Delete.
1277 (Z_packet_to_point_type): Rename to ...
1278 (Z_packet_to_target_hw_bp_type): ... this, and return a
1279 target_hw_bp_type instead.
1280 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
1281 instead of an enum target_point_type.
1282 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
1283 breakpoint type.
1284 (aarch64_dr_state_insert_one_point)
1285 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
1286 (aarch64_handle_aligned_watchpoint)
1287 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
1288 Take an enum target_hw_bp_type instead of an enum
1289 target_point_type.
1290 (aarch64_supports_z_point_type): New function.
1291 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
1292 use Z_packet_to_target_hw_bp_type.
1293
786dc519
JB
12942014-05-20 Joel Brobecker <brobecker@adacore.com>
1295
1296 * configure.ac: Only use -Werror by default when DEVELOPMENT
1297 is true.
1298 * configure: Regenerate.
1299
9e0aa64f
JK
13002014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
1301
1302 Fix gdbserver qGetTLSAddr for x86_64 -m32.
1303 * linux-x86-low.c (X86_64_USER_REGS): New.
1304 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
1305
2b577b92
YQ
13062014-04-28 Yao Qi <yao@codesourcery.com>
1307
1308 * Makefile.in (i386-avx512.c): Fix the typo of generated file
1309 name.
1310
94611da2
PA
13112014-04-25 Pedro Alves <palves@redhat.com>
1312
1313 PR server/16255
1314 * linux-low.c (linux_attach_fail_reason_string): New function.
1315 (linux_attach_lwp): Delete.
1316 (linux_attach_lwp_1): Rename to ...
1317 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
1318 argument. Remove "initial" parameter. Return int instead of
1319 void. Don't error or warn here.
1320 (linux_attach): Adjust to call linux_attach_lwp. Call error on
1321 failure to attach to the tgid. Call warning when failing to
1322 attach to an lwp.
1323 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
1324 argument. Remove "initial" parameter. Return int instead of
1325 void. Don't error or warn here.
1326 (linux_attach_fail_reason_string): New declaration.
1327 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
1328 interface change. Use linux_attach_fail_reason_string.
1329
01f9f808
MS
13302014-04-24 Michael Sturm <michael.sturm@mintel.com>
1331 Walfred Tedeschi <walfred.tedeschi@intel.com>
1332
1333 * Makefile.in: Added rules to handle new files
1334 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
1335 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
1336 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
1337 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
1338 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
1339 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
1340 x32-avx512-linux.o.
1341 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
1342 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
1343 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
1344 i386/x32-avx512.xml.
1345 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
1346 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
1347 i386/x32-avx512-linux.xml.
1348 * i387-fp.c (num_avx512_k_registers): New constant for number
1349 of K registers.
1350 (num_avx512_zmmh_low_registers): New constant for number of
1351 lower ZMM registers (0-15).
1352 (num_avx512_zmmh_high_registers): New constant for number of
1353 higher ZMM registers (16-31).
1354 (num_avx512_ymmh_registers): New contant for number of higher
1355 YMM registers (ymm16-31 added by avx521 on x86_64).
1356 (num_avx512_xmm_registers): New constant for number of higher
1357 XMM registers (xmm16-31 added by AVX512 on x86_64).
1358 (struct i387_xsave): Add space for AVX512 registers.
1359 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
1360 Add code to handle AVX512 registers.
1361 (i387_xsave_to_cache): Add code to handle AVX512 registers.
1362 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
1363 prototypei from generated file.
1364 (tdesc_amd64_avx512_linux): Likewise.
1365 (init_registers_x32_avx512_linux): Likewise.
1366 (tdesc_x32_avx512_linux): Likewise.
1367 (init_registers_i386_avx512_linux): Likewise.
1368 (tdesc_i386_avx512_linux): Likewise.
1369 (x86_64_regmap): Add AVX512 registers.
1370 (x86_linux_read_description): Add code to handle AVX512 XSTATE
1371 mask.
1372 (initialize_low_arch): Add code to initialize AVX512 registers.
1373
51aa91f9
PA
13742014-04-23 Pedro Alves <palves@redhat.com>
1375
1376 * mem-break.c (find_gdb_breakpoint_at): Make static.
1377 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
1378
a4165e94
PA
13792014-04-23 Pedro Alves <palves@redhat.com>
1380
1381 * i386-low.c: Don't include break-common.h here.
1382 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1383 prototype to take target_hw_bp_type as argument instead of a Z
1384 packet char.
1385 * i386-low.h: Include break-common.h here.
1386 (Z_packet_to_hw_type): Declare.
1387 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1388 prototypes.
1389 * linux-x86-low.c (x86_insert_point): Convert the packet number to
1390 a target_hw_bp_type before calling i386_low_insert_watchpoint.
1391 (x86_remove_point): Convert the packet number to a
1392 target_hw_bp_type before calling i386_low_remove_watchpoint.
1393 * win32-i386-low.c (i386_insert_point): Convert the packet number
1394 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
1395 (i386_remove_point): Convert the packet number to a
1396 target_hw_bp_type before calling i386_low_remove_watchpoint.
1397
b8acf843
PA
13982014-04-23 Pedro Alves <palves@redhat.com>
1399
1400 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
1401
d708bcd1
PA
14022014-04-10 Pedro Alves <palves@redhat.com>
1403
1404 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1405 Check if the condition or command is NULL before checking if the
1406 breakpoint is known. On success, return true.
1407 * mem-break.h (add_breakpoint_condition): Document return.
1408 (add_breakpoint_commands): Add describing comment.
1409 * server.c (skip_to_semicolon): New function.
1410 (process_point_options): Use it.
1411
2eec7d5b
PA
14122014-04-09 Pedro Alves <palves@redhat.com>
1413
1414 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
1415 to lwpid_of.
1416
fa96cb38
PA
14172014-02-27 Pedro Alves <palves@redhat.com>
1418
1419 PR 12702
1420 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
1421 macros.
1422 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
1423 output.
1424 (last_thread_of_process_p): Take a PID argument instead of a
1425 thread pointer.
1426 (linux_wait_for_lwp): Delete.
1427 (num_lwps, check_zombie_leaders, not_stopped_callback): New
1428 functions.
1429 (linux_low_filter_event): New function, party factored out from
1430 linux_wait_for_event.
1431 (linux_wait_for_event): Rename to ...
1432 (linux_wait_for_event_filtered): ... this. Add new filter ptid
1433 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
1434 sigsuspend. Check for zombie leaders.
1435 (linux_wait_for_event): Reimplement as wrapper around
1436 linux_wait_for_event_filtered.
1437 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
1438 a normal or signal exit is seen, it's the whole process exiting.
1439 (wait_for_sigstop): No longer a for_each_inferior callback.
1440 Rewrite on top of linux_wait_for_event_filtered.
1441 (stop_all_lwps): Call wait_for_sigstop directly.
1442 * server.c (resume, handle_target_event): Handle
1443 TARGET_WAITKIND_NO_RESUMED.
1444
d763de10
JB
14452014-02-26 Joel Brobecker <brobecker@adacore.com>
1446
1447 * win32-low.c (psapi_get_dll_name,
1448 * win32_CreateToolhelp32Snapshot): Delete.
1449 (win32_CreateToolhelp32Snapshot, win32_Module32First)
1450 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
1451 Delete.
1452 (handle_load_dll): Add function description.
1453 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
1454
850a0f76
JB
14552014-02-26 Joel Brobecker <brobecker@adacore.com>
1456
1457 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
1458 Add comment.
1459 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
1460 base address when calling win32_add_one_solib.
1461 (handle_load_dll): Delete local variable load_addr.
1462 Remove 0x1000 offset applied to DLL base address when calling
1463 win32_add_one_solib.
1464 (handle_unload_dll): Add comment.
1465
f25b3fc3
JB
14662014-02-26 Joel Brobecker <brobecker@adacore.com>
1467
1468 * win32-low.c (win32_add_all_dlls): Renames
1469 win32_ensure_ntdll_loaded. Rewrite function documentation.
1470 Adjust implementation to always load all DLLs.
1471 Add 0x1000 offset to DLL base address when calling
1472 win32_add_one_solib.
1473 (child_initialization_done): New static global.
1474 (do_initial_child_stuff): Set child_initialization_done to
1475 zero during child initialization, and 1 after. Replace call
1476 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
1477 Add comment.
1478 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
1479 (handle_unload_dll): Add function documentation.
1480 (get_child_debug_event): Ignore load and unload DLL events
1481 during child initialization.
1482
d86d4aaf
DE
14832014-02-20 Doug Evans <dje@google.com>
1484
3bc32da3 1485 Remove global all_lwps.
d86d4aaf
DE
1486 * inferiors.h (ptid_of): Move here from linux-low.h.
1487 (pid_of, lwpid_of): Ditto.
1488 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
1489 parameter is a struct thread_info * now.
1490 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
1491 directly. Pass &all_threads to find_inferior instead of &all_lwps.
1492 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
1493 directly.
1494 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
1495 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
1496 * linux-arm-low.c (update_registers_callback): Update, "entry"
1497 parameter is a struct thread_info * now.
1498 Fetch lwpid from current_inferior directly.
1499 (arm_insert_point): Pass &all_threads to find_inferior instead of
1500 &all_lwps.
1501 (arm_remove_point): Ditto.
1502 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
1503 (arm_prepare_to_resume): Fetch pid from thread.
1504 (arm_read_description): Fetch lwpid from current_inferior directly.
1505 * linux-low.c (all_lwps): Delete.
1506 (delete_lwp): Delete call to remove_inferior.
1507 (handle_extended_wait): Fetch lwpid from thread.
1508 (add_lwp): Don't set lwp->entry.id. Remove call to
1509 add_inferior_to_list.
1510 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
1511 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
1512 (kill_one_lwp_callback): Ditto.
1513 (linux_kill): Don't dereference NULL pointer.
1514 Fetch ptid,lwpid from thread.
1515 (get_detach_signal): Fetch ptid from thread.
1516 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
1517 Simplify call to regcache_invalidate_thread.
1518 (delete_lwp_callback): Update, "entry" parameter is a
1519 struct thread_info * now. Fetch pid from thread.
1520 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
1521 (status_pending_p_callback): Update, "entry" parameter is a
1522 struct thread_info * now. Fetch ptid from thread.
1523 (find_lwp_pid): Update, "entry" parameter is a
1524 struct thread_info * now.
1525 (linux_wait_for_lwp): Fetch pid from thread.
1526 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
1527 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
1528 (enqueue_one_deferred_signal): Fetch lwpid from thread.
1529 (dequeue_one_deferred_signal): Ditto.
1530 (cancel_breakpoint): Fetch ptid from current_inferior.
1531 (linux_wait_for_event): Pass &all_threads to find_inferior,
1532 not &all_lwps. Fetch ptid, lwpid from thread.
1533 (count_events_callback): Update, "entry" parameter is a
1534 struct thread_info * now.
1535 (select_singlestep_lwp_callback): Ditto.
1536 (select_event_lwp_callback): Ditto.
1537 (cancel_breakpoints_callback): Ditto.
1538 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
1539 not &all_lwps.
1540 (select_event_lwp): Ditto. Fetch ptid from event_thread.
1541 (unsuspend_one_lwp): Update, "entry" parameter is a
1542 struct thread_info * now.
1543 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
1544 not &all_lwps.
1545 (linux_stabilize_threads): Ditto. And for for_each_inferior.
1546 Fetch lwpid from thread, not lwp.
1547 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
1548 Pass &all_threads to find_inferior, not &all_lwps.
1549 (send_sigstop): Fetch lwpid from thread, not lwp.
1550 (send_sigstop_callback): Update, "entry" parameter is a
1551 struct thread_info * now.
1552 (suspend_and_send_sigstop_callback): Ditto.
1553 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
1554 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
1555 struct thread_info * now.
1556 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
1557 from thread, lwp.
1558 (lwp_running): Update, "entry" parameter is a
1559 struct thread_info * now.
1560 (stop_all_lwps): Fetch ptid from thread.
1561 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
1562 (linux_resume_one_lwp): Fetch lwpid from thread.
1563 (linux_set_resume_request): Update, "entry" parameter is a
1564 struct thread_info * now. Fetch pid, lwpid from thread.
1565 (resume_status_pending_p): Update, "entry" parameter is a
1566 struct thread_info * now.
1567 (need_step_over_p): Ditto. Fetch lwpid from thread.
1568 (start_step_over): Fetch lwpid from thread.
1569 (linux_resume_one_thread): Update, "entry" parameter is a
1570 struct thread_info * now. Fetch lwpid from thread.
1571 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
1572 (proceed_one_lwp): Update, "entry" parameter is a
1573 struct thread_info * now. Fetch lwpid from thread.
1574 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
1575 struct thread_info * now.
1576 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
1577 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
1578 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
1579 directly.
1580 (regsets_store_inferior_registers): Ditto.
1581 (fetch_register, store_register): Ditto.
1582 (linux_read_memory, linux_write_memory): Ditto.
1583 (linux_request_interrupt): Ditto.
1584 (linux_read_auxv): Ditto.
1585 (linux_xfer_siginfo): Ditto.
1586 (linux_qxfer_spu): Ditto.
1587 (linux_qxfer_libraries_svr4): Ditto.
1588 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
1589 moved to inferiors.h.
1590 (get_lwp): Delete.
1591 (get_thread_lwp): Update.
1592 (struct lwp_info): Delete member "entry". Simplify comment for
1593 member "thread".
1594 (all_lwps): Delete.
1595 * linux-mips-low.c (mips_read_description): Fetch lwpid from
1596 current_inferior directly.
1597 (update_watch_registers_callback): Update, "entry" parameter is a
1598 struct thread_info * now. Fetch pid from thread.
1599 (mips_linux_prepare_to_resume): Fetch ptid from thread.
1600 (mips_insert_point): Fetch lwpid from current_inferior.
1601 Pass &all_threads to find_inferior, not &all_lwps.
1602 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
1603 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
1604 directly.
1605 (mips_stopped_data_address): Ditto.
1606 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
1607 directly.
1608 * linux-tile-low.c (tile_arch_setup): Ditto.
1609 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
1610 (update_debug_registers_callback): Update, "entry" parameter is a
1611 struct thread_info * now. Fetch pid from thread.
1612 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
1613 Pass &all_threads to find_inferior, not &all_lwps.
1614 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
1615 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
1616 Pass &all_threads to find_inferior, not &all_lwps.
1617 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
1618 (i386_dr_low_get_status): Ditto.
1619 (x86_linux_prepare_to_resume): Fetch ptid from thread.
1620 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
1621 (x86_linux_read_description): Ditto.
1622 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
1623
3b8361aa
DE
16242014-02-20 Doug Evans <dje@google.com>
1625
1626 * inferiors.c (get_first_inferior): Fix buglet.
1627
f7667f0d
DE
16282014-02-19 Doug Evans <dje@google.com>
1629
1630 * gdbthread.h (add_thread): Change result type to struct thread_info *.
1631 * inferiors.c (add_thread): Change result type to struct thread_info *.
1632 All callers updated.
1633 (add_lwp): Call add_thread here instead of in callers.
1634 All callers updated.
1635 * linux-low.h (get_lwp_thread): Rewrite.
1636 (struct lwp_info): New member "thread".
1637
b3312d80
DE
16382014-02-19 Doug Evans <dje@google.com>
1639
1640 * linux-low.c (add_lwp): Change result to struct lwp_info *.
1641 All callers updated.
1642
ecc6f45c
DE
16432014-02-19 Doug Evans <dje@google.com>
1644
1645 * inferiors.c (add_thread): Fix whitespace.
1646
649ebbca
DE
16472014-02-19 Doug Evans <dje@google.com>
1648
1649 * dll.c (clear_dlls): Replace accessing list implemention details
1650 with API function.
1651 * gdbthread.h (get_first_thread): Declare.
1652 * inferiors.c (for_each_inferior_with_data): New function.
1653 (get_first_thread): New function.
1654 (find_thread_ptid): Simplify.
1655 (get_first_inferior): New function.
1656 (clear_list): Delete.
1657 (one_inferior_p): New function.
1658 (clear_inferior_list): New function.
1659 (clear_inferiors): Update.
1660 * inferiors.h (for_each_inferior_with_data): Declare.
1661 (clear_inferior_list): Declare.
1662 (one_inferior_p): Declare.
1663 (get_first_inferior): Declare.
1664 * linux-low.c (linux_wait_for_event): Replace accessing list
1665 implemention details with API function.
1666 * server.c (target_running): Ditto.
1667 (accumulate_file_name_length): New function.
1668 (emit_dll_description): New function.
1669 (handle_qxfer_libraries): Replace accessing list implemention
1670 details with API function.
1671 (handle_qxfer_threads_worker): New function.
1672 (handle_qxfer_threads_proper): Replace accessing list implemention
1673 details with API function.
1674 (handle_query): Ditto.
1675 (visit_actioned_threads_callback_ftype): New typedef.
1676 (visit_actioned_threads_data): New struct.
1677 (visit_actioned_threads): Rewrite to be find_inferior callback.
1678 (resume): Call find_inferior.
1679 (handle_status): Replace accessing list implemention
1680 details with API function.
1681 (process_serial_event): Replace accessing list implemention details
1682 with API function.
1683 * target.c (set_desired_inferior): Replace accessing list implemention
1684 details with API function.
1685 * tracepoint.c (same_process_p): New function.
1686 (gdb_agent_about_to_close): Replace accessing list implemention
1687 details with API function.
1688 * win32-low.c (child_delete_thread): Replace accessing list
1689 implemention details with API function.
1690 (match_dll_by_basename): New function.
1691 (dll_is_loaded_by_basename): New function.
1692 (win32_ensure_ntdll_loaded): Replace accessing list implemention
1693 details call to dll_is_loaded_by_basename.
1694
80894984
DE
16952014-02-19 Doug Evans <dje@google.com>
1696
1697 * dll.h (struct dll_info): Add comment.
1698 * gdbthread.h (struct thread_info): Add comment.
1699 (current_ptid): Simplify.
1700 * inferiors.c (add_process): Update.
1701 (remove_process): Update.
1702 * inferiors.h (struct process_info): Rename member "head" to "entry".
1703 * linux-low.c (delete_lwp): Update.
1704 (add_lwp): Update.
1705 (last_thread_of_process_p): Update.
1706 (kill_one_lwp_callback, linux_kill): Update.
1707 (status_pending_p_callback): Update.
1708 (wait_for_sigstop): Update. Simplify read of ptid.
1709 (start_step_over): Update.
1710 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
1711 (get_lwp_thread): Update.
1712 (struct lwp_info): Rename member "head" to "entry".
1713 * regcache.h (inferior_list_entry): Delete.
1714 * server.c (kill_inferior_callback): Update.
1715 (detach_or_kill_inferior_callback): Update.
1716 (print_started_pid): Update.
1717 (print_attached_pid): Update.
1718 (process_serial_event): Simplify read of ptid.
1719 * thread-db.c (thread_db_create_event): Update.
1720 (thread_db_get_tls_address): Update.
1721 * win32-low.c (current_inferior_ptid): Simplify.
1722
46917d26
TT
17232014-02-19 Tom Tromey <tromey@redhat.com>
1724
1725 * target.h (struct target_ops) <supports_btrace>: Add target_ops
1726 argument.
1727 (target_supports_btrace): Update.
1728
0759a81e
YQ
17292014-02-14 Yao Qi <yao@codesourcery.com>
1730
1731 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
1732 (rsp-low-ipa.o): New target.
1733
a7191e8b
TT
17342014-02-12 Tom Tromey <tromey@redhat.com>
1735
1736 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
1737 convert_ascii_to_int.
1738 * regcache.c (registers_to_string): Likewise.
1739 * remote-utils.c (decode_M_packet): Likewise.
1740 * server.c (process_serial_event): Likewise.
1741
ff0e980e
TT
17422014-02-12 Tom Tromey <tromey@redhat.com>
1743
1744 * server.c (handle_query, handle_v_run): Use hex2bin, not
1745 unhexify.
1746 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
1747
e9371aff
TT
17482014-02-12 Tom Tromey <tromey@redhat.com>
1749
1750 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
1751 convert_int_to_ascii.
1752 * regcache.c (registers_to_string, collect_register_as_string):
1753 Likewise.
1754 * remote-utils.c (look_up_one_symbol, relocate_instruction):
1755 Likewise.
1756 * server.c (process_serial_event): Likewise.
1757 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
1758 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
1759
971dc0b8
TT
17602014-02-12 Tom Tromey <tromey@redhat.com>
1761
1762 * remote-utils.c (look_up_one_symbol, monitor_output): Use
1763 bin2hex, not hexify.
1764 * tracepoint.c (cmd_qtstatus): Likewise.
1765
0a822afb
TT
17662014-02-12 Tom Tromey <tromey@redhat.com>
1767
1768 * remote-utils.c (monitor_output): Pass explicit length to
1769 hexify.
1770
9c3d6531
TT
17712014-02-12 Tom Tromey <tromey@redhat.com>
1772
1773 * tracepoint.c: Include rsp-low.h.
1774 * server.c: Include rsp-low.h.
1775 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
1776 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
1777 declare.
1778 * remote-utils.c: Include rsp-low.h.
1779 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
1780 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
1781 (convert_int_to_ascii, convert_ascii_to_int): Move to
1782 common/rsp-low.c.
1783 * regcache.c: Include rsp-low.h.
1784 * ax.c: Include rsp-low.h.
1785 * Makefile.in (SFILES): Add common/rsp-low.c.
1786 (OBS): Add rsp-low.o.
1787 (rsp-low.o): New target.
1788
01fd3ea5
TT
17892014-02-12 Tom Tromey <tromey@redhat.com>
1790
1791 * utils.h (pulongest, plongest, phex_nz): Don't declare.
1792 Include print-utils.h.
1793 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
1794 (plongest, thirty_two, phex_nz): Remove.
1795 * Makefile.in (SFILES): Add common/print-utils.c.
1796 (OBS): Add print-utils.o.
1797 (print-utils-ipa.o): New target.
1798 (print-utils.o): New target.
1799 (IPA_OBJS): Add print-utils-ipa.o.
1800
e99dc820
TT
18012014-02-06 Tom Tromey <tromey@redhat.com>
1802
1803 * Makefile.in (SFILES): Fix indentation.
1804
ee1e2d4f
DE
18052014-02-05 Doug Evans <dje@google.com>
1806
1807 * linux-low.c (linux_wait_for_event): Improve comment.
1808 (linux_wait_1): Keep current_inferior in sync with event_child.
1809
f5a02773
DE
18102014-01-22 Doug Evans <dje@google.com>
1811
1812 * gdbthread.h (gdb_id_to_thread): Delete, unused.
1813
87ce2a04
DE
18142014-01-22 Doug Evans <dje@google.com>
1815
1816 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
1817 * configure: Regenerate.
1818 * config.in: Regenerate.
1819 * Makefile.in (SFILES): Add debug.c.
1820 (OBS): Add debug.o.
1821 * debug.c: New file.
1822 * debug.h: New file.
1823 * linux-aarch64-low.c (*): Update all debugging printfs to use
1824 debug_printf instead of fprintf.
1825 * linux-arm-low.c (*): Ditto.
1826 * linux-cris-low.c (*): Ditto.
1827 * linux-crisv32-low.c (*): Ditto.
1828 * linux-m32r-low.c (*): Ditto.
1829 * linux-sparc-low.c (*): Ditto.
1830 * linux-x86.c (*): Ditto.
1831 * linux-low.c (*): Ditto.
1832 (linux_wait_1): Add calls to debug_enter, debug_exit.
1833 (linux_wait): Remove redundant debugging printf.
1834 (stop_all_lwps): Add calls to debug_enter, debug_exit.
1835 (linux_resume, unstop_all_lwps): Ditto.
1836 * mem-break.c (*): Update all debugging printfs to use
1837 debug_printf instead of fprintf.
1838 * remote-utils.c (*): Ditto.
1839 * thread-db.c (*): Ditto.
1840 * server.c #include <ctype.h>, "gdb_vecs.h".
1841 (debug_threads): Moved to debug.c.
1842 (*): Update all debugging printfs to use debug_printf instead of
1843 fprintf.
1844 (start_inferior): Replace call to fflush with call to debug_flush.
1845 (monitor_show_help): Mention set debug-format.
1846 (parse_debug_format_options): New function.
1847 (handle_monitor_command): Handle "monitor set debug-format".
1848 (gdbserver_usage): Mention --debug-format.
1849 (main): Parse --debug-format.
1850 * server.h (debug_threads): Declaration moved to debug.h.
1851 #include "debug.h".
1852 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
1853 trace_debug_1 that uses debug_printf.
1854 (tracepoint_look_up_symbols): Update all debugging printfs to use
1855 debug_printf instead of fprintf.
1856
e671835b
BS
18572014-01-20 Baruch Siach <baruch@tkos.co.il>
1858
1859 * linux-xtensa-low.c: Include asm/ptrace.h instead of
1860 sys/ptrace.h.
1861
b5737fa9
PA
18622014-01-17 Pedro Alves <palves@redhat.com>
1863
ea38d2a9 1864 PR build/16445
c7faa97a
PA
1865 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
1866 defined after including gdb_proc_service.h.
b5737fa9 1867
40ed484e
DE
18682014-01-16 Doug Evans <dje@google.com>
1869
1870 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
1871 (match_dll): Use it.
1872
969c39fb
MM
18732014-01-16 Markus Metzger <markus.t.metzger@intel.com>
1874
1875 * target.h (target_ops) <read_btrace>: Change parameters and
1876 return type to allow error reporting.
1877 * server.c (handle_qxfer_btrace): Support delta reads. Pass
1878 trace reading errors on.
1879 * linux-low.c (linux_low_read_btrace): Pass trace reading
1880 errors on.
1881 (linux_low_disable_btrace): New.
1882
ab7f45ba
DE
18832014-01-15 Doug Evans <dje@google.com>
1884
1885 * inferiors.c (thread_id_to_gdb_id): Delete.
1886 * inferiors.h (thread_id_to_gdb_id): Delete.
1887
66af0f44
EZ
18882014-01-13 Eli Zaretskii <eliz@gnu.org>
1889
1890 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
1891 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
1892 versions.
1893
9939e131
PA
18942014-01-08 Pedro Alves <palves@redhat.com>
1895
1896 * server.c (handle_status): Don't discard previous queued stop
1897 replies or thread's pending status here.
1898 (main) <disconnection>: Do it here instead.
1899
b7ea362b
PA
19002014-01-08 Pedro Alves <palves@redhat.com>
1901
1902 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
1903 * server.c (visit_actioned_threads, handle_pending_status): New
1904 function.
1905 (handle_v_cont): Factor out parts to ...
1906 (resume): ... this new function. If in all-stop, and a thread
1907 being resumed has a pending status, report it without actually
1908 resuming.
1909 (myresume): Adjust to use the new 'resume' function.
1910 (clear_pending_status_callback, set_pending_status_callback)
1911 (find_status_pending_thread_callback): New functions.
1912 (handle_status): Handle the case of multiple threads having
1913 interesting statuses to report. Report threads' real last signal
1914 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
1915 with an interesting thread to report the status for, instead of
1916 always reporting the status of the first thread.
1917
28498c42
JB
19182014-01-01 Joel Brobecker <brobecker@adacore.com>
1919
1920 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
1921 * gdbreplay.c (gdbreplay_version): Likewise.
1922
f45c82da
YZ
19232013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
1924
1925 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
1926 iov.iov_len with the real length in use.
1927
379a5e2d
JB
19282013-12-13 Joel Brobecker <brobecker@adacore.com>
1929
1930 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
1931 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
1932 for all targets that use win32-low.c.
1933 * win32-low.c (win32_ensure_ntdll_loaded): New function.
1934 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
1935
4210d83e
PA
19362013-12-13 Pedro Alves <palves@redhat.com>
1937
1938 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
1939 if equal to TARGET_WAITKIND_LOADED.
1940 * win32-low.c (cached_status): New static global.
1941 (win32_wait): Add declaration.
1942 (do_initial_child_stuff): Flush all initial pending debug events
1943 up to the initial breakpoint.
1944 (win32_wait): If CACHED_STATUS was set, return that instead
1945 of doing a real wait. Remove the code resuming the execution
1946 of the inferior after receiving a TARGET_WAITKIND_LOADED event
1947 during the initial phase. Also remove the code changing
1948 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
1949 TARGET_WAITKIND_STOPPED.
1950
e7f0d979
YQ
19512013-12-11 Yao Qi <yao@codesourcery.com>
1952
1953 * notif.c (handle_notif_ack): Return 0 if no notification
1954 matches.
1955
ebcf782c
DE
19562013-11-20 Doug Evans <dje@google.com>
1957
1958 * linux-low.c (linux_set_resume_request): Fix comment.
1959
20ad9378
DE
19602013-11-20 Doug Evans <dje@google.com>
1961
1962 * linux-low.c (resume_status_pending_p): Tweak comment.
1963
a196ebeb
WT
19642013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
1965
1966 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
1967 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
1968 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
1969 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
1970 (srv_amd64_regobj): Add amd64-mpx.o.
1971 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
1972 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
1973 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
1974 * i387-fp.c (num_pl_bnd_register) Added constant.
1975 (num_pl_bnd_cfg_registers) Added constant.
1976 (struct i387_xsave) Added reserved area and MPX fields.
1977 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
1978 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
1979 function.
1980 (tdesc_i386_mpx_linux): Add MPX amd64 target.
1981 (init_registers_amd64_mpx_linux): Declare new function.
1982 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
1983 (x86_64_regmap): Add MPX registers.
1984 (x86_linux_read_description): Add MPX case.
1985 (initialize_low_arch): Initialize MPX targets.
1986
0080a2f6
TT
19872013-11-18 Tom Tromey <tromey@redhat.com>
1988
1989 * configure: Rebuild.
1990 * configure.ac: Don't check for stdlib.h.
1991 * gdbreplay.c: Unconditionally include stdlib.h.
1992
2978b111
TT
19932013-11-18 Tom Tromey <tromey@redhat.com>
1994
1995 * config.in: Rebuild.
1996 * configure: Rebuild.
1997 * configure.ac: Don't use AC_HEADER_DIRENT.
1998
a3d08894
TT
19992013-11-18 Tom Tromey <tromey@redhat.com>
2000
2001 * server.h: Don't check HAVE_STRING_H.
2002 * gdbreplay.c: Don't check HAVE_STRING_H.
2003 * configure: Rebuild.
2004
0a5dd17d
TT
20052013-11-18 Tom Tromey <tromey@redhat.com>
2006
2007 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
2008 LIBGNU.
2009
1bd2f0ba
TT
20102013-11-08 Tom Tromey <tromey@redhat.com>
2011
2012 * configure, config.in: Rebuild.
2013 * configure.ac: Remove unused configury.
2014
3266f10b
TT
20152013-11-08 Tom Tromey <tromey@redhat.com>
2016
2017 * acinclude.m4: Include common.m4, codeset.m4.
2018 * configure, config.in: Rebuild.
2019 * configure.ac: Use GDB_AC_COMMON.
2020
6682d959
AA
20212013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
2022
2023 * linux-s390-low.c (HWCAP_S390_TE): New define.
2024 (s390_arch_setup): Consider the TE field in the HWCAP for
2025 determining 'have_regset_tdb'.
2026
fd0a4d76
SDJ
20272013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
2028
2029 PR gdb/16014
2030 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
2031 call to sizeof.
2032
1a3d890b
PA
20332013-10-02 Pedro Alves <palves@redhat.com>
2034
2035 * server.c (process_serial_event): Don't output "GDBserver
2036 exiting" if GDB is connected through stdio.
2037 * target.c (mywait): Likewise, be silent if GDB is connected
2038 through stdio.
2039
97ad4581
JB
20402013-10-01 Joel Brobecker <brobecker@adacore.com>
2041
2042 * lynx-low.c (lynx_add_threads_after_attach): New function.
2043 (lynx_attach): Remove call to add_thread. Add call to
2044 lynx_add_threads_after_attach instead.
2045
5b4e221c
MF
20462013-09-28 Mike Frysinger <vapier@gentoo.org>
2047
2048 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
2049 * config.in, configure: Regenerated.
2050
ee47b2f8
YQ
20512013-09-18 Yao Qi <yao@codesourcery.com>
2052
2053 PR server/15959
2054 * server.c (start_inferior): Clear 'resume_info'.
2055
d6707650 20562013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2057
d6707650
JW
2058 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2059 for each register.
2060
9243dd0e 20612013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2062
9243dd0e
JW
2063 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
2064 linux-tile-low.o to srv_tgtobj.
2065
c623a6ef
WN
20662013-09-16 Will Newton <will.newton@linaro.org>
2067
2068 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
2069 out regs.
2070
fb71d39e
PA
20712013-09-06 Pedro Alves <palves@redhat.com>
2072
2073 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2074 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2075 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2076 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2077 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2078 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2079
8e7e9910
PA
20802013-09-06 Pedro Alves <palves@redhat.com>
2081
2082 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2083 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2084
7c3a12ca
PA
20852013-09-06 Pedro Alves <palves@redhat.com>
2086
2087 * linux-amd64-ipa.c: Include tracepoint.h.
2088 * linux-i386-ipa.c: Include tracepoint.h.
2089
8eb3d7b6
RW
20902013-09-06 Ricard Wanderlof <ricardw@axis.com>
2091
2092 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2093 (ps_get_thread_area): New function.
2094
eddddb9d
RW
20952013-09-06 Ricard Wanderlof <ricardw@axis.com>
2096
2097 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
2098 (initialize_low_arch): Call init_registers_crisv32 rather than
2099 init_register_crisv32.
2100
533b0600
PA
21012013-09-05 Pedro Alves <palves@redhat.com>
2102
2103 * server.h (handle_vFile, hostio_last_error_from_errno): Move
2104 to ...
2105 * hostio.h: ... this new file.
2106 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2107 win32-low.c: Include hostio.h.
2108
0ce3d3b5
PA
21092013-09-05 Pedro Alves <palves@redhat.com>
2110
2111 * server.h (gdb_client_data, handler_func, callback_handler_func)
2112 (delete_file_handler, add_file_handler, append_callback_event)
2113 (delete_callback_event, start_event_loop, initialize_event_loop):
2114 Move to event-loop.h and include it.
2115 * event-loop.h: New file.
2116
799cdc37
PA
21172013-09-05 Pedro Alves <palves@redhat.com>
2118
2119 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2120 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2121 (loaded_dll, unloaded_dll): Move to ...
2122 * dll.h: ... this new file.
2123 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2124
6a6bbd9d
PA
21252013-09-05 Pedro Alves <palves@redhat.com>
2126
2127 * server.h (current_process, get_thread_process, all_processes)
2128 (add_inferior_to_list, for_each_inferior, current_inferior)
2129 (remove_inferior, add_process, remove_process, find_process_pid)
2130 (have_started_inferiors_p, have_attached_inferiors_p)
2131 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2132 (clear_inferiors, find_inferior, find_inferior_id)
2133 (inferior_target_data, set_inferior_target_data)
2134 (inferior_regcache_data, set_inferior_regcache_data): Move to
2135 inferiors.h, and include it.
2136 * inferiors.h: New file.
2137
f699aaba
PA
21382013-09-05 Pedro Alves <palves@redhat.com>
2139
2140 * server.h (struct emit_ops, current_insn_ptr, emit_error):
2141 Move ...
2142 * ax.h: ... here.
2143
c144c7a0
PA
21442013-09-05 Pedro Alves <palves@redhat.com>
2145
2146 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2147 tracepoint.h.
2148 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2149 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2150 (handle_tracepoint_general_set, handle_tracepoint_query)
2151 (tracepoint_finished_step, tracepoint_was_hit)
2152 (release_while_stepping_state_list, current_traceframe)
2153 (in_readonly_region, traceframe_read_mem)
2154 (fetch_traceframe_registers, traceframe_read_sdata)
2155 (traceframe_read_info, struct fast_tpoint_collect_status)
2156 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2157 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2158 (supply_fast_tracepoint_registers)
2159 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2160 (ipa_tdesc, claim_trampoline_space)
2161 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2162 (agent_mem_read, agent_get_trace_state_variable_value)
2163 (agent_set_trace_state_variable_value, agent_tsv_read)
2164 (agent_mem_read_string, get_raw_reg_func_addr)
2165 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2166 * tracepoint.h: ... this new file.
2167
ff42e6ab
PA
21682013-09-05 Pedro Alves <palves@redhat.com>
2169
2170 * server.h (perror_with_name, error, fatal, warning, paddress)
2171 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2172 include it.
2173 * utils.h: New file.
2174
541af0f4
PA
21752013-09-05 Pedro Alves <palves@redhat.com>
2176
2177 * server.h (remote_debug, noack_mode, transport_is_reliable)
2178 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
2179 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
2180 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
2181 (write_enn, initialize_async_io, enable_async_io)
2182 (disable_async_io, check_remote_input_interrupt_request)
2183 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
2184 (dead_thread_notify, prepare_resume_reply)
2185 (decode_address_to_semicolon, decode_address, decode_m_packet)
2186 (decode_M_packet, decode_X_packet, decode_xfer_write)
2187 (decode_search_memory_packet, unhexify, hexify)
2188 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
2189 (look_up_one_symbol, relocate_instruction)
2190 (monitor_output): Move to remote-utils.h, and include it.
2191 * remote-utils.h: New file.
2192
eebdf26b
PA
21932013-09-05 Pedro Alves <palves@redhat.com>
2194
2195 * server.h (_): Delete.
2196
3aafd2ff
PA
21972013-09-02 Pedro Alves <palves@redhat.com>
2198
2199 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
2200 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
2201 allocated.
2202 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
2203
cee83bcb
PM
22042013-09-02 Pierre Muller <muller@sourceware.org>
2205
2206 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
2207 or WriteProcessMemory complete successfully and handle
2208 ERROR_PARTIAL_COPY error.
2209
9a13b2fa
PA
22102013-09-02 Pedro Alves <palves@redhat.com>
2211
2212 * server.c (gdb_read_memory): Return -1 on traceframe memory read
2213 error instead of EIO.
2214
602e3198
JK
22152013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2216
2217 PR server/15604
2218 * linux-low.c: Include filestuff.h.
2219 (linux_create_inferior) <pid == 0>: Call close_most_fds.
2220 * lynx-low.c: Include filestuff.h.
2221 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
2222 * server.c: Include filestuff.h.
2223 (main): Call notice_open_fds.
2224 * spu-low.c: Include filestuff.h.
2225 (spu_create_inferior) <pid == 0>: Call close_most_fds.
2226
96d7229d
LM
22272013-08-22 Luis Machado <lgustavo@codesourcery.com>
2228
2229 * Makefile.in: Explain why ../target and ../nat are not
2230 listed as include file search paths.
2231 (linux-waitpid.o): New object file rule.
2232 * configure.srv (srv_native_linux_obj): New variable.
2233 Replace all occurrences of linux native object files with
2234 $srv_native_linux_obj.
2235 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
2236 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
2237 (linux_enable_event_reporting): Remove declaration.
2238 (my_waitpid): Moved to common/linux-waitpid.c.
2239 (linux_wait_for_event): Pass ptid when calling
2240 linux_enable_event_reporting.
2241 (linux_supports_tracefork_flag): Remove.
2242 (linux_enable_event_reporting): Likewise.
2243 (linux_tracefork_grandchild): Remove.
2244 (STACK_SIZE): Moved to common/linux-ptrace.c.
2245 (linux_tracefork_child): Remove.
2246 (linux_test_for_tracefork): Remove.
2247 (linux_look_up_symbols): Call linux_supports_traceclone.
2248 (initialize_low): Remove call to linux_test_for_tracefork.
2249 * linux-low.h (PTRACE_TYPE_ARG3): Move to
2250 common/linux-ptrace.h.
2251 (PTRACE_TYPE_ARG4): Likewise.
2252 Include linux-ptrace.h.
2253
32940073
PA
22542013-08-21 Pedro Alves <palves@redhat.com>
2255
2256 * config.in: Renegerate.
2257
33b60d58 22582013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 2259
33b60d58
LM
2260 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
2261 (SFILES): Remove $(srcdir)/common/target-common.c and
2262 add $(srcdir)/target/waitstatus.c.
2263 (OBS): Remove target-common.o and add waitstatus.o.
2264 (server_h): Remove $(srcdir)/../common/target-common.h and
2265 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
2266 and $(srcdir)/../target/waitstatus.h.
2267 (target-common.o): Remove.
2268 (waitstatus.o): New target object file.
2269 * target.h: Do not include target-common.h and
2270 include target/resume.h, target/wait.h and
2271 target/waitstatus.h.
2272
b8e1b30e
LM
22732013-08-13 Luis Machado <lgustavo@codesourcery.com>
2274
2275 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2276 to PTRACE_TYPE_ARG3.
2277 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2278 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
2279 PTRACE_TYPE_ARG4.
2280 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
2281 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
2282
7a60ad40
YQ
22832013-07-27 Jie Zhang <jie@codesourcery.com>
2284 Daniel Jacobowitz <dan@codesourcery.com>
2285 Yao Qi <yao@codesourcery.com>
2286
2287 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
2288 (mips-linux-watch.o): New rule.
2289 (mips_linux_watch_h): New variable.
2290 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
2291 srv_tgtobj.
2292 * linux-mips-low.c: Include mips-linux-watch.h.
2293 (struct arch_process_info, struct arch_lwp_info): New.
2294 (update_watch_registers_callback): New function.
2295 (mips_linux_new_process, mips_linux_new_thread) New functions.
2296 (mips_linux_prepare_to_resume, mips_insert_point): New
2297 functions.
2298 (mips_remove_point, mips_stopped_by_watchpoint): New
2299 functions.
2300 (rsp_bp_type_to_target_hw_bp_type): New function.
2301 (mips_stopped_data_address): New function.
2302 (the_low_target): Add watchpoint support functions.
2303
de6f69ad
YQ
23042013-07-27 Yao Qi <yao@codesourcery.com>
2305
2306 * i386-low.c: Include break-common.h.
2307 (enum target_hw_bp_type): Remove.
2308
3360c0bf
LM
23092013-07-24 Luis Machado <lgustavo@codesourcery.com>
2310
2311 * Makefile.in (SFILES): /common/target-common.c.
2312 (OBS): Add target-common.o.
2313 (server_h): Add $(srcdir)/../common/target-common.h.
2314 (target-common.o): New target.
2315 * server.c (queue_stop_reply_callback): Free
2316 status string after use.
2317 * target.c (target_waitstatus_to_string): Remove.
2318 * target.h: Include target-common.h.
2319 (resume_kind): Likewise.
2320 (target_waitkind): Likewise.
2321 (target_waitstatus): Likewise.
2322 (TARGET_WNOHANG): Likewise.
2323
bd885420
YQ
23242013-07-04 Yao Qi <yao@codesourcery.com>
2325
2326 * Makefile.in (host_alias): Use @host_noncanonical@.
2327 (target_alias): Use @target_noncanonical@.
2328 * configure.ac: Use ACX_NONCANONICAL_TARGET and
2329 ACX_NONCANONICAL_HOST.
2330 * configure: Regenerated.
2331
2332 Revert:
2333 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2334
2335 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2336 * configure: Rebuild.
2337 * Makefile.in (version_host, version_target): Get from configure.
2338 (version.c): Use $(version_host) and $(version_target).
2339
17ef446e
PA
23402013-07-03 Pedro Alves <palves@redhat.com>
2341
2342 * Makefile.in (config.status): Depend on development.sh.
2343 * acinclude.m4: Include libmcheck.m4.
2344 * configure: Regenerate.
2345
7a9a7487
MG
23462013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2347
2348 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
2349 attribute inside the parentheses.
2350 (winapi_DebugSetProcessKillOnExit): Ditto.
2351 (winapi_DebugBreakProcess): Ditto.
2352 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 2353
49b64de6
MG
23542013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2355
2356 * notif.h (notif_event): Add a dummy member to avoid compiler
2357 errors.
2358
d5749ee7
PA
23592013-07-01 Pedro Alves <palves@redhat.com>
2360
2361 * hostio.c (HOSTIO_PATH_MAX): Define.
2362 (require_filename, handle_open, handle_unlink, handle_readlink):
2363 Use it.
2364
d8d2a3ee
PA
23652013-07-01 Pedro Alves <palves@redhat.com>
2366
2367 * server.h: Include "pathmax.h".
2368 * linux-low.c: Don't include sys/param.h.
2369 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
2370 MAXPATHLEN.
2371 * win32-low.c: Don't include sys/param.h.
2372 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
2373
bc7dea8d
PA
23742013-07-01 Pedro Alves <palves@redhat.com>
2375
2376 * event-loop.c: Don't check HAVE_UNISTD_H before including
2377 <unistd.h>.
2378 * gdbreplay.c: Likewise.
2379 * remote-utils.c: Likewise.
2380 * server.c: Likewise.
2381 * configure.ac: Don't check for unistd.h.
2382 * configure: Regenerate.
2383
d6c2da54
TT
23842013-06-28 Tom Tromey <tromey@redhat.com>
2385
2386 * Makefile.in (version.c): Use version.in, not
2387 common/version.in.
2388
257b6bec
MG
23892013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2390
2391 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2392 * configure: Rebuild.
2393 * Makefile.in (version_host, version_target): Get from configure.
2394 (version.c): Use $(version_host) and $(version_target).
2395
86ebe149
DK
23962013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2397
2398 Fix trace-status to output user name without trailing colon.
2399 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
2400
f30aa5af
DK
24012013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2402
2403 Fix trace-status to output proper start-time and stop-time.
2404 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
2405 output start time and stop time in hex as gdb expects.
2406
28a93511
YQ
24072013-06-26 Pedro Alves <pedro@codesourcery.com>
2408
2409 * tracepoint.c (build_traceframe_info_xml): Output trace state
2410 variables present in the trace buffer.
2411
01208463
TT
24122013-06-24 Tom Tromey <tromey@redhat.com>
2413
2414 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
2415 create-version.sh.
2416 (version.o): Remove.
2417 * gdbreplay.c: Include version.h.
2418 (version, host_name): Don't declare.
2419 * server.h: Include version.h.
2420 (version, host_name): Don't declare.
2421
760256f9
PA
24222013-06-12 Pedro Alves <palves@redhat.com>
2423
2424 * linux-x86-low.c (linux_is_elf64): Delete global.
2425 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
2426 with local linux_pid_exe_is_elf_64_file use.
2427
030031ee
PA
24282013-06-11 Pedro Alves <palves@redhat.com>
2429
2430 * linux-low.c (regset_disabled, disable_regset): New functions.
2431 (regsets_fetch_inferior_registers)
2432 (regsets_store_inferior_registers): Use them.
2433 (initialize_regsets_info); Don't allocate the disabled_regsets
2434 array here.
2435 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
2436 comment.
2437
5da6eb0a
PA
24382013-06-11 Pedro Alves <palves@redhat.com>
2439
2440 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
2441 xmalloc.
2442
7e5aaa09
PA
24432013-06-11 Pedro Alves <palves@redhat.com>
2444
2445 * linux-x86-low.c (initialize_low_arch): Call
2446 init_registers_x32_avx_linux.
2447
d878444c
JK
24482013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
2449
2450 Fix compatibility with Android Bionic.
2451 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
2452 it is not empty.
2453
3aee8918
PA
24542013-06-07 Pedro Alves <palves@redhat.com>
2455
5f2b57b5 2456 PR server/14823
3aee8918
PA
2457 * Makefile.in (OBS): Add tdesc.o.
2458 (IPA_OBJS): Add tdesc-ipa.o.
2459 (tdesc-ipa.o): New rule.
2460 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
2461 interface.
2462 * linux-low.c (new_inferior): Delete.
2463 (disabled_regsets, num_regsets): Delete.
2464 (linux_add_process): Adjust to set the new per-process
2465 new_inferior flag.
2466 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
2467 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
2468 was a stop. When calling arch_setup, switch the current inferior
2469 to the thread that got an event.
2470 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
2471 (regsets_fetch_inferior_registers)
2472 (regsets_store_inferior_registers): New regsets_info parameter.
2473 Adjust to use it.
2474 (linux_register_in_regsets): New regs_info parameter. Adjust to
2475 use it.
2476 (register_addr, fetch_register, store_register): New usrregs_info
2477 parameter. Adjust to use it.
2478 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
2479 parameter regs_info. Adjust to use it.
2480 (linux_fetch_registers): Get the current inferior's regs_info, and
2481 adjust to use it.
2482 (linux_store_registers): Ditto.
2483 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
2484 (initialize_low): Don't initialize the target_regsets here. Call
2485 initialize_low_arch.
2486 * linux-low.h (target_regsets): Delete declaration.
2487 (struct regsets_info): New.
2488 (struct usrregs_info): New.
2489 (struct regs_info): New.
2490 (struct process_info_private) <new_inferior>: New field.
2491 (struct linux_target_ops): Delete the num_regs, regmap, and
2492 regset_bitmap fields. New field regs_info.
2493 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
2494 * i387-fp.c (num_xmm_registers): Delete.
2495 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
2496 calls to new interface.
2497 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
2498 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
2499 Infer the number of xmm registers from the regcache's target
2500 description.
2501 * i387-fp.h (num_xmm_registers): Delete.
2502 * inferiors.c (add_thread): Don't install the thread's regcache
2503 here.
2504 * proc-service.c (gregset_info): Fetch the current inferior's
2505 regs_info. Adjust to use it.
2506 * regcache.c: Include tdesc.h.
2507 (register_bytes, reg_defs, num_registers)
2508 (gdbserver_expedite_regs): Delete.
2509 (get_thread_regcache): If the thread doesn't have a regcache yet,
2510 create one, instead of aborting gdbserver.
2511 (regcache_invalidate_one): Rename to ...
2512 (regcache_invalidate_thread): ... this.
2513 (regcache_invalidate_one): New.
2514 (regcache_invalidate): Only invalidate registers of the current
2515 process.
2516 (init_register_cache): Add target_desc parameter, and use it.
2517 (new_register_cache): Ditto. Assert the target description has a
2518 non zero registers_size.
2519 (regcache_cpy): Add assertions. Adjust.
2520 (realloc_register_cache, set_register_cache): Delete.
2521 (registers_to_string, registers_from_string): Adjust.
2522 (find_register_by_name, find_regno, find_register_by_number)
2523 (register_cache_size): Add target_desc parameter, and use it.
2524 (free_register_cache_thread, free_register_cache_thread_one)
2525 (regcache_release, register_cache_size): New.
2526 (register_size): Add target_desc parameter, and use it.
2527 (register_data, supply_register, supply_register_zeroed)
2528 (supply_regblock, supply_register_by_name, collect_register)
2529 (collect_register_as_string, collect_register_by_name): Adjust.
2530 * regcache.h (struct target_desc): Forward declare.
2531 (struct regcache) <tdesc>: New field.
2532 (init_register_cache, new_register_cache): Add target_desc
2533 parameter.
2534 (regcache_invalidate_thread): Declare.
2535 (regcache_invalidate_one): Delete declaration.
2536 (regcache_release): Declare.
2537 (find_register_by_number, register_cache_size, register_size)
2538 (find_regno): Add target_desc parameter.
2539 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
2540 declarations.
2541 * remote-utils.c: Include tdesc.h.
2542 (outreg, prepare_resume_reply): Adjust.
2543 * server.c: Include tdesc.h.
2544 (gdbserver_xmltarget): Delete declaration.
2545 (get_features_xml, process_serial_event): Adjust.
2546 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
2547 declare.
2548 (struct process_info) <tdesc>: New field.
2549 (ipa_tdesc): Declare.
2550 * tdesc.c: New file.
2551 * tdesc.h: New file.
2552 * tracepoint.c: Include tdesc.h.
2553 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
2554 (get_context_regcache): Adjust to pass ipa_tdesc down.
2555 (do_action_at_tracepoint): Adjust to get the register cache size
2556 from the context regcache's description.
2557 (traceframe_walk_blocks): Adjust to get the register cache size
2558 from the current trace frame's description.
2559 (traceframe_get_pc): Adjust to get current trace frame's
2560 description and pass it down.
2561 (gdb_collect): Adjust to get the register cache size from the
2562 IPA's description.
2563 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
2564 (gdbserver_xmltarget): Delete.
2565 (initialize_low_tracepoint): Set the ipa's target description.
2566 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
2567 (initialize_low_tracepoint): Set the ipa's target description.
2568 * linux-x86-low.c: Include tdesc.h.
2569 [__x86_64__] (is_64bit_tdesc): New.
2570 (ps_get_thread_area, x86_get_thread_area): Use it.
2571 (i386_cannot_store_register): Rename to ...
2572 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
2573 (i386_cannot_fetch_register): Rename to ...
2574 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
2575 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
2576 to new interface.
2577 (target_regsets): Rename to ...
2578 (x86_regsets): ... this.
2579 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
2580 interface.
2581 (x86_siginfo_fixup): Use is_64bit_tdesc.
2582 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
2583 (tdesc_x32_avx_linux, tdesc_x32_linux)
2584 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
2585 Declare.
2586 (x86_linux_update_xmltarget): Delete.
2587 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
2588 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
2589 (AMD64_LINUX_USER64_CS): New.
2590 (x86_linux_read_description): New, based on
2591 x86_linux_update_xmltarget.
2592 (same_process_callback): New.
2593 (x86_arch_setup_process_callback): New.
2594 (x86_linux_update_xmltarget): New.
2595 (x86_regsets_info): New.
2596 (amd64_linux_regs_info): New.
2597 (i386_linux_usrregs_info): New.
2598 (i386_linux_regs_info): New.
2599 (x86_linux_regs_info): New.
2600 (x86_arch_setup): Reimplement.
2601 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
2602 (x86_emit_ops): Ditto.
2603 (the_low_target): Adjust. Install x86_linux_regs_info,
2604 x86_cannot_fetch_register, and x86_cannot_store_register.
2605 (initialize_low_arch): New.
2606 * linux-ia64-low.c (tdesc_ia64): Declare.
2607 (ia64_fetch_register): Adjust.
2608 (ia64_usrregs_info, regs_info): New globals.
2609 (ia64_regs_info): New function.
2610 (the_low_target): Adjust.
2611 (initialize_low_arch): New function.
2612 * linux-sparc-low.c (tdesc_sparc64): Declare.
2613 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
2614 Adjust.
2615 (sparc_arch_setup): New function.
2616 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
2617 (the_low_target): Adjust.
2618 (initialize_low_arch): New function.
2619 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
2620 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
2621 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
2622 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
2623 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
2624 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
2625 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
2626 (tdesc_powerpc_isa205_vsx64l): Declare.
2627 (ppc_cannot_store_register, ppc_collect_ptrace_register)
2628 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
2629 (ppc_set_pc, ppc_get_hwcap): Adjust.
2630 (ppc_usrregs_info): Forward declare.
2631 (!__powerpc64__) ppc_regmap_adjusted: New global.
2632 (ppc_arch_setup): Adjust to the current process'es target
2633 description.
2634 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
2635 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
2636 (ppc_store_evrregset): Adjust.
2637 (target_regsets): Rename to ...
2638 (ppc_regsets): ... this, and make static.
2639 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
2640 (ppc_regs_info): New function.
2641 (the_low_target): Adjust.
2642 (initialize_low_arch): New function.
2643 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
2644 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
2645 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
2646 (tdesc_s390x_linux64v2): Declare.
2647 (s390_collect_ptrace_register, s390_supply_ptrace_register)
2648 (s390_fill_gregset, s390_store_last_break): Adjust.
2649 (target_regsets): Rename to ...
2650 (s390_regsets): ... this, and make static.
2651 (s390_get_pc, s390_set_pc): Adjust.
2652 (s390_get_hwcap): New target_desc parameter, and use it.
2653 [__s390x__] (have_hwcap_s390_high_gprs): New global.
2654 (s390_arch_setup): Adjust to set the current process'es target
2655 description. Don't adjust the regmap.
2656 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
2657 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
2658 (regs_info_3264): New globals.
2659 (s390_regs_info): New function.
2660 (the_low_target): Adjust.
2661 (initialize_low_arch): New function.
2662 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
2663 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
2664 [__mips64] (init_registers_mips_linux)
2665 (init_registers_mips_dsp_linux): Delete defines.
2666 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
2667 (have_dsp): New global.
2668 (mips_read_description): New, based on mips_arch_setup.
2669 (mips_arch_setup): Reimplement.
2670 (get_usrregs_info): New function.
2671 (mips_cannot_fetch_register, mips_cannot_store_register)
2672 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
2673 (mips_fill_fpregset, mips_store_fpregset): Adjust.
2674 (target_regsets): Rename to ...
2675 (mips_regsets): ... this, and make static.
2676 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
2677 (dsp_regs_info, regs_info): New globals.
2678 (mips_regs_info): New function.
2679 (the_low_target): Adjust.
2680 (initialize_low_arch): New function.
2681 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
2682 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
2683 Declare.
2684 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
2685 (arm_read_description): New, with bits factored from
2686 arm_arch_setup.
2687 (arm_arch_setup): Reimplement.
2688 (target_regsets): Rename to ...
2689 (arm_regsets): ... this, and make static.
2690 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
2691 (arm_regs_info): New function.
2692 (the_low_target): Adjust.
2693 (initialize_low_arch): New function.
2694 * linux-m68k-low.c (tdesc_m68k): Declare.
2695 (target_regsets): Rename to ...
2696 (m68k_regsets): ... this, and make static.
2697 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
2698 (m68k_regs_info): New function.
2699 (m68k_arch_setup): New function.
2700 (the_low_target): Adjust.
2701 (initialize_low_arch): New function.
2702 * linux-sh-low.c (tdesc_sharch): Declare.
2703 (target_regsets): Rename to ...
2704 (sh_regsets): ... this, and make static.
2705 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
2706 (sh_regs_info, sh_arch_setup): New functions.
2707 (the_low_target): Adjust.
2708 (initialize_low_arch): New function.
2709 * linux-bfin-low.c (tdesc_bfin): Declare.
2710 (bfin_arch_setup): New function.
2711 (bfin_usrregs_info, regs_info): New globals.
2712 (bfin_regs_info): New function.
2713 (the_low_target): Adjust.
2714 (initialize_low_arch): New function.
2715 * linux-cris-low.c (tdesc_cris): Declare.
2716 (cris_arch_setup): New function.
2717 (cris_usrregs_info, regs_info): New globals.
2718 (cris_regs_info): New function.
2719 (the_low_target): Adjust.
2720 (initialize_low_arch): New function.
2721 * linux-cris-low.c (tdesc_crisv32): Declare.
2722 (cris_arch_setup): New function.
2723 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
2724 (cris_regs_info): New function.
2725 (the_low_target): Adjust.
2726 (initialize_low_arch): New function.
2727 * linux-m32r-low.c (tdesc_m32r): Declare.
2728 (m32r_arch_setup): New function.
2729 (m32r_usrregs_info, regs_info): New globals.
2730 (m32r_regs_info): Adjust.
2731 (initialize_low_arch): New function.
2732 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
2733 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
2734 (tic6x_usrregs_info): Forward declare.
2735 (tic6x_read_description): New function, based on ...
2736 (tic6x_arch_setup): ... this. Reimplement.
2737 (target_regsets): Rename to ...
2738 (tic6x_regsets): ... this, and make static.
2739 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
2740 (tic6x_regs_info): New function.
2741 (the_low_target): Adjust.
2742 (initialize_low_arch): New function.
2743 * linux-xtensa-low.c (tdesc_xtensa): Declare.
2744 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
2745 (target_regsets): Rename to ...
2746 (xtensa_regsets): ... this, and make static.
2747 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
2748 globals.
2749 (xtensa_arch_setup, xtensa_regs_info): New functions.
2750 (the_low_target): Adjust.
2751 (initialize_low_arch): New function.
2752 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
2753 (nios2_arch_setup): Set the current process'es tdesc.
2754 (target_regsets): Rename to ...
2755 (nios2_regsets): ... this.
2756 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
2757 (nios2_regs_info): New function.
2758 (the_low_target): Adjust.
2759 (initialize_low_arch): New function.
a261b8f5
PA
2760 * linux-aarch64-low.c (tdesc_aarch64): Declare.
2761 (aarch64_arch_setup): Set the current process'es tdesc.
2762 (target_regsets): Rename to ...
2763 (aarch64_regsets): ... this.
2764 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
2765 (aarch64_regs_info): New function.
2766 (the_low_target): Adjust.
2767 (initialize_low_arch): New function.
3aee8918
PA
2768 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
2769 globals.
2770 (target_regsets): Rename to ...
2771 (tile_regsets): ... this.
2772 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
2773 (tile_regs_info): New function.
2774 (tile_arch_setup): Set the current process'es tdesc.
2775 (the_low_target): Adjust.
2776 (initialize_low_arch): New function.
2777 * spu-low.c (tdesc_spu): Declare.
2778 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
2779 * win32-arm-low.c (tdesc_arm): Declare.
2780 (arm_arch_setup): New function.
2781 (the_low_target): Install arm_arch_setup instead of
2782 init_registers_arm.
2783 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
2784 (init_windows_x86): Rename to ...
2785 (i386_arch_setup): ... this. Set `win32_tdesc'.
2786 (the_low_target): Adjust.
2787 * win32-low.c (win32_tdesc): New global.
2788 (child_add_thread): Don't create the thread cache here.
2789 (do_initial_child_stuff): Set the new process'es tdesc.
2790 * win32-low.h (struct target_desc): Forward declare.
2791 (win32_tdesc): Declare.
2792 * lynx-i386-low.c (tdesc_i386): Declare global.
2793 (lynx_i386_arch_setup): Set `lynx_tdesc'.
2794 * lynx-low.c (lynx_tdesc): New global.
2795 (lynx_add_process): Set the new process'es tdesc.
2796 * lynx-low.h (struct target_desc): Forward declare.
2797 (lynx_tdesc): Declare global.
2798 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
2799 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
2800 * nto-low.c (nto_tdesc): New global.
2801 (do_attach): Set the new process'es tdesc.
2802 * nto-low.h (struct target_desc): Forward declare.
2803 (nto_tdesc): Declare.
2804 * nto-x86-low.c (tdesc_i386): Declare.
2805 (nto_x86_arch_setup): Set `nto_tdesc'.
2806
b1fbec62
GB
28072013-06-04 Gary Benson <gbenson@redhat.com>
2808
2809 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
2810 to qSupported response when appropriate.
2811 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
2812 with nonzero-length annex.
2813 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
2814 arguments supplied in annex.
2815
d1ec4ce7
DE
28162013-05-31 Doug Evans <dje@google.com>
2817
ac44adcb 2818 PR server/15594
d1ec4ce7
DE
2819 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
2820 64 bits in 64-cross-32 environment.
2821
9b25f2d3
PA
28222013-05-28 Pedro Alves <palves@redhat.com>
2823
2824 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
2825 (aarch64-without-fpu.c): Delete rule.
2826 * configure.srv (aarch64*-*-linux*): Remove references to
2827 aarch64-without-fpu.o and aarch64-without-fpu.xml.
2828 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
2829 declaration.
2830
6740dc9c
PA
28312013-05-24 Pedro Alves <palves@redhat.com>
2832
2833 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
2834 instead of strchr/decode_address. Error if the range isn't split
2835 with a ','. Don't assume there's be a ':' in the action.
2836
c2d6af84
PA
28372013-05-23 Yao Qi <yao@codesourcery.com>
2838 Pedro Alves <palves@redhat.com>
2839
2840 * linux-low.c (lwp_in_step_range): New function.
2841 (linux_wait_1): If the thread was range stepping and stopped
2842 outside the stepping range, report the stop to GDB. Otherwise,
2843 continue stepping. Add range stepping debug output.
2844 (linux_set_resume_request): Copy the step range from the resume
2845 request to the lwp.
2846 (linux_supports_range_stepping): New.
2847 (linux_target_ops) <supports_range_stepping>: Set to
2848 linux_supports_range_stepping.
2849 * linux-low.h (struct linux_target_ops)
2850 <supports_range_stepping>: New field.
2851 (struct lwp_info) <step_range_start, step_range_end>: New fields.
2852 * linux-x86-low.c (x86_supports_range_stepping): New.
2853 (the_low_target) <supports_range_stepping>: Set to
2854 x86_supports_range_stepping.
2855 * server.c (handle_v_cont): Handle 'r' action.
2856 (handle_v_requests): Append ";r" if the target supports range
2857 stepping.
2858 * target.h (struct thread_resume) <step_range_start,
2859 step_range_end>: New fields.
2860 (struct target_ops) <supports_range_stepping>:
2861 New field.
2862 (target_supports_range_stepping): New macro.
2863
58794e1a
JB
28642013-05-17 Joel Brobecker <brobecker@adacore.com>
2865
2866 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
2867 confusion in comment.
2868
d631c5a7
JB
28692013-05-17 Joel Brobecker <brobecker@adacore.com>
2870
2871 * lynx-low.c (struct process_info_private): New type.
2872 (lynx_add_process): New function.
2873 (lynx_create_inferior, lynx_attach): Replace calls to
2874 add_process by calls to lynx_add_process.
2875 (lynx_resume): If PTID is null, then try using
2876 current_process()->private->last_wait_event_ptid.
2877 Add comments.
2878 (lynx_clear_inferiors): Delete. The contents of that function
2879 has been inlined in lynx_mourn;
2880 (lynx_wait_1): Save the ptid in the process's private data.
2881 (lynx_mourn): Free the process' private data. Replace call
2882 to lynx_clear_inferiors by call to clear_inferiors.
2883
96f7a20f
YQ
28842013-05-17 Yao Qi <yao@codesourcery.com>
2885
2886 * i386-low.c (i386_length_and_rw_bits): Move the comment to
2887 the right place.
2888
db0dfaa0
LM
28892013-05-16 Luis Machado <lgustavo@codesourcery.com>
2890
2891 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
2892 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
2893 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
2894 PT_TEXT_END_ADDR guards. Update comments.
2895 (linux_target_op) <read_offsets>: Conditionally define to
2896 linux_read_offsets if the target is UCLIBC and if it defines
2897 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
2898
68f5f838
SL
28992013-05-06 Sandra Loosemore <sandra@codesourcery.com>
2900 Andrew Jenner <andrew@codesourcery.com>
2901
2902 * Makefile.in (SFILES): Add linux-nios2-low.c.
2903 (clean): Add action to delete nios2-linux.c.
2904 (nios2-linux.c): New rule.
2905 * configure.srv: Add nios2*-*-linux*.
2906 * linux-nios2-low.c: New.
2907
1ebff1fd
HAQ
29082013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
2909
2910 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
2911
f6150862
HZ
29122013-04-25 Hui Zhu <hui@codesourcery.com>
2913
2914 PR gdb/15186
f6150862
HZ
2915 * ax.c (ax_printf): Add fflush.
2916
614c279d
TT
29172013-04-22 Tom Tromey <tromey@redhat.com>
2918
2919 * Makefile.in (SFILES): Add filestuff.c.
2920 (OBS): Add filestuff.o.
2921 (filestuff.o): New target.
2922 * config.in, configure: Rebuild.
2923 * configure.ac: Check for fdwalk, pipe2.
2924
7d4e5717
PA
29252013-04-17 Pedro Alves <palves@redhat.com>
2926
2927 * configure.ac (USE_THREAD_DB): Delete variable.
2928 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
2929 Don't AC_SUBST USE_THREAD_DB.
2930 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
2931 * config.in, configure: Regenerate.
2932
d5c93e41
PA
29332013-04-16 Pedro Alves <palves@redhat.com>
2934
2935 * linux-low.h (struct lwp_info) <thread_known>: Move under
2936 the USE_THREAD_DB #ifdef.
2937
04f5fe89
PA
29382013-04-16 Pedro Alves <palves@redhat.com>
2939
2940 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
2941 (linux-low.o): Delete rule.
2942 * linux-low.h: Always include "gdb_thread_db.h" instead of
2943 conditionally including thread_db.h.
2944 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
2945 HAVE_THREAD_DB_H.
2946
480b27bf
JK
29472013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2948
2949 * Makefile.in (install-only): Fix make install regression.
2950
43662968
JK
29512013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
2952
2953 Convert man pages to texinfo, new gdbinit.5 texinfo page.
2954 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
2955 installation.
2956 * gdbserver.1: Remove.
2957
3e74e146
PA
29582013-03-22 Pedro Alves <palves@redhat.com>
2959
2960 * linux-low.c (handle_extended_wait): Don't call
2961 linux_enable_event_reporting.
2962
a8347a2a
TT
29632013-03-15 Tony Theodore <tonyt@logyst.com>
2964
2965 PR build/9098:
2966 * Makefile.in (SHELL): Use @SHELL@.
2967
eeb56fa7
SDJ
29682013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
2969
2970 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
2971 compiler warning.
2972
4fa7e2ff
JB
29732013-03-13 Joel Brobecker <brobecker@adacore.com>
2974
2975 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
2976 Remove extraneous NULL element.
2977
8ddb1965
YQ
29782013-03-13 Yao Qi <yao@codesourcery.com>
2979
2980 * tracepoint.c (traceframe_read_tsv): Look for the last matched
2981 'V' block in trace frame.
2982
9accd112
MM
29832013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2984
2985 * target.h (struct target_ops): Add btrace ops.
2986 (target_supports_btrace): New macro.
2987 (target_enable_btrace): New macro.
2988 (target_disable_btrace): New macro.
2989 (target_read_btrace): New macro.
2990 * gdbthread.h (struct thread_info): Add btrace field.
2991 * server.c: Include btrace-common.h.
2992 (handle_btrace_general_set): New function.
2993 (handle_btrace_enable): New function.
2994 (handle_btrace_disable): New function.
2995 (handle_general_set): Call handle_btrace_general_set.
2996 (handle_qxfer_btrace): New function.
2997 (struct qxfer qxfer_packets[]): Add btrace entry.
2998 * inferiors.c (remove_thread): Disable btrace.
2999 * linux-low: Include linux-btrace.h.
3000 (linux_low_enable_btrace): New function.
3001 (linux_low_read_btrace): New function.
3002 (linux_target_ops): Add btrace ops.
3003 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
3004 Add srv_linux_btrace=yes.
3005 (x86_64-*-linux*): Add linux-btrace.o.
3006 Add srv_linux_btrace=yes.
3007 * configure.ac: Define HAVE_LINUX_BTRACE.
3008 * config.in: Regenerated.
3009 * configure: Regenerated.
3010
5cc22e4c
MM
30112013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3012
3013 * server.c (handle_qxfer): Preserve error message if -3 is
3014 returned.
3015 (qxfer): Document the -3 return value.
3016
7c97f91e
MM
30172013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3018
3019 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
3020 (linux_btrace_h): New variable.
3021 (linux-btrace.o): New rule.
3022
be9a119c 30232013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
3024 Hafiz Abid Qadeer <abidh@codesourcery.com>
3025
3026 * tracepoint.c (trace_buffer_size): New global.
3027 (DEFAULT_TRACE_BUFFER_SIZE): New define.
3028 (init_trace_buffer): Change to one-argument function. Allocate
3029 trace buffer memory.
3030 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
3031 handle QTBuffer:size packet.
3032 (cmd_bigqtbuffer_size): New function.
3033 (initialize_tracepoint): Call init_trace_buffer with
3034 DEFAULT_TRACE_BUFFER_SIZE.
3035 * server.c (handle_query): Add QTBuffer:size in the
3036 supported packets.
3037
e64f7499
YQ
30382013-03-07 Yao Qi <yao@codesourcery.com>
3039
3040 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
3041 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
3042 of -1.
3043 (cmd_qtsp): Adjust condition. Do post increment.
3044 Set cur_action and cur_step_action back to 0.
3045
f0ae6fc3
PA
30462013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
3047
3048 PR server/15236
3049 * linux-low.c (linux_write_memory): Return early success if LEN is
3050 zero.
3051
b5b0b0af
CV
30522013-03-05 Corinna Vinschen <vinschen@redhat.de>
3053
334ad4a8 3054 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 3055
589bc927
TT
30562013-02-28 Tom Tromey <tromey@redhat.com>
3057
3058 * configure.ac: Invoke AC_SYS_LARGEFILE.
3059 * configure, config.in: Rebuild.
3060
dfe07582
CV
30612013-02-28 Corinna Vinschen <vinschen@redhat.com>
3062
3063 * win32-low.c: Throughout, fix format strings and casts of
3064 printf-like functions to avoid type related warnings on all
3065 platforms.
3066 (get_child_debug_event): Print dwDebugEventCode as hex since
3067 that's how it's usually documented.
3068
736cd585
YQ
30692013-02-28 Yao Qi <yao@codesourcery.com>
3070
3071 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
3072 pulongest.
3073
e1f58301
JW
30742013-02-27 Jiong Wang <jiwang@tilera.com>
3075
3076 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3077 (reg-tilegx32.c): New rule.
3078 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3079 * linux-tile-low.c (tile_arch_setup): New function. Invoke
3080 different register info initializer according to elf class.
3081 (init_registers_tilgx32): New function. The tilegx32 register info
3082 initializer.
3083 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3084 (tile_store_gregset): Likewise.
3085
d171ca78
YQ
30862013-02-27 Yao Qi <yao@codesourcery.com>
3087
3088 * server.c (process_point_options): Print debug message when
3089 debug_threads is true.
3090
282bbdf3
YQ
30912013-02-26 Yao Qi <yao@codesourcery.com>
3092
3093 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
3094
aca22551
PA
30952013-02-19 Pedro Alves <palves@redhat.com>
3096 Kai Tietz <ktietz@redhat.com>
3097
3098 PR gdb/15161
3099
3100 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
3101 instead of strtoul to extract address from packet.
3102 (process_serial_event) <'z'>: Likewise.
3103
4f3cee1c
YQ
31042013-02-18 Yao Qi <yao@codesourcery.com>
3105
3106 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3107
8e1d55a3
PA
31082013-02-14 Pedro Alves <palves@redhat.com>
3109
3110 Plug memory leak.
3111
3112 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3113 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3114
458820da
PA
31152013-02-14 Pedro Alves <palves@redhat.com>
3116
3117 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3118
baea0dae
PA
31192013-02-14 Pedro Alves <palves@redhat.com>
3120
3121 * tracepoint.c (save_string): Delete.
3122 (add_tracepoint_action): Use savestring instead of save_string.
3123
0b1afbb3
PA
31242013-02-12 Pedro Alves <palves@redhat.com>
3125
3126 * linux-xtensa-low.c: Ditto.
3127 * xtensa-xtregs.c: Ditto.
3128
8a4ac37e
PA
31292013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3130
3131 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3132 thread_db.
3133
148de6bb
MS
31342013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3135
3136 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3137 aarch64_num_wp_regs and aarch64_num_bp_regs to
3138 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3139
55fac6e0
MS
31402013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3141
3142 * linux-aarch64-low.c (ps_get_thread_area): Replace
3143 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3144
176eb98c
MS
31452013-02-04 Jim MacArthur <jim.macarthur@arm.com>
3146 Marcus Shawcroft <marcus.shawcroft@arm.com>
3147 Nigel Stephens <nigel.stephens@arm.com>
3148 Yufeng Zhang <yufeng.zhang@arm.com>
3149
3150 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3151 (aarch64.c, aarch64-without-fpu.c): New targets.
3152 * configure.srv (aarch64*-*-linux*): New.
3153 * linux-aarch64-low.c: New file.
3154
56f7af9c
MS
31552013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3156
43aaf8b6 3157 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
3158 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3159 (dequeue_one_deferred_signal, linux_resume_one_thread)
3160 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3161 (linux_tracefork_grandchild, linux_test_for_tracefork)
3162 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3163 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3164 where the argument is 0.
3165
60f662b0
YQ
31662013-01-25 Yao Qi <yao@codesourcery.com>
3167
3168 * event-loop.c: Include "queue.h".
3169 (gdb_event_p): New typedef.
3170 (struct gdb_event) <next_event>: Remove.
3171 (event_queue): Change to QUEUE(gdb_event_p).
3172 (async_queue_event): Remove.
3173 (gdb_event_xfree): New.
3174 (initialize_event_loop): New.
3175 (process_event): Use API from QUEUE.
3176 (wait_for_event): Likewise.
3177 * server.c (main): Call initialize_event_loop.
3178 * server.h (initialize_event_loop): Declare.
3179
5ae4861a
YQ
31802013-01-18 Yao Qi <yao@codesourcery.com>
3181
3182 * ax.h (struct eval_agent_expr_context): New.
3183 (gdb_eval_agent_expr): Update declaration.
3184 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
3185 TFRAME. Add new argument CTX.
3186 * server.h (struct eval_agent_expr_context): Declare.
3187 (agent_mem_read, agent_tsv_read): Update declaration.
3188 (agent_mem_read_string): Likewise.
3189 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
3190 (add_traceframe_block): Add new argument TPOINT.
3191 Increase TPOINT->traceframe_usage.
3192 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
3193 eval_tracepoint_agent_expr.
3194 (condition_true_at_tracepoint): Likewise.
3195 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
3196 (agent_mem_read_string, agent_tsv_read): Likewise.
3197
85e00e85
YQ
31982013-01-16 Yao Qi <yao@codesourcery.com>
3199
3200 * linux-low.c (linux_resume_one_lwp): Don't check
3201 'lwp->bp_reinsert != 0'.
3202
4039cf45
JB
32032013-01-07 Joel Brobecker <brobecker@adacore.com>
3204 Pedro Alves <palves@redhat.com>
3205
3206 * lynx-low.c (ptrace_request_to_str): Define a temporary
3207 macro and use it to simplify this function's implementation.
3208
9044dee2
JB
32092013-01-07 Joel Brobecker <brobecker@adacore.com>
3210
3211 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
3212 sets errno.
3213
e6352c8f
JB
32142013-01-07 Joel Brobecker <brobecker@adacore.com>
3215
3216 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
3217
50681a27
JB
32182013-01-07 Joel Brobecker <brobecker@adacore.com>
3219
3220 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
3221
3f6e77ef
JB
32222013-01-07 Joel Brobecker <brobecker@adacore.com>
3223
3224 * lynx-low.c (lynx_resume): Use the resume_info parameter
3225 to determine the ptid for the lynx_ptrace call, unless
3226 it is equal to minus_one_ptid, in which case we use the
3227 ptid of the current_inferior.
3228 (lynx_wait_1): After having received a thread create/exit
3229 event, resume the inferior's execution using the signaling
3230 thread's ptid, rather than the old ptid.
3231
7fda33ae
JB
32322013-01-07 Joel Brobecker <brobecker@adacore.com>
3233
3234 * lynx-low.c (lynx_resume): Delete variable ret.
3235
b9786c74
JB
32362013-01-01 Joel Brobecker <brobecker@adacore.com>
3237
3238 * gdbreplay.c (gdbreplay_version): Update copyright year.
3239 * server.c (gdbserver_version): Likewise.
3240
8b93d60f
JB
32412012-12-17 Joel Brobecker <brobecker@adacore.com>
3242
3243 * lynx-low.c (lynx_wait_1): Add debug trace before adding
3244 new thread.
3245
037335a7
JB
32462012-12-17 Joel Brobecker <brobecker@adacore.com>
3247
3248 * lynx-low.c (ptrace_request_to_str): Add handling for
3249 PTRACE_GETTRACESIG.
3250
52d4cbd8
JB
32512012-12-17 Joel Brobecker <brobecker@adacore.com>
3252
3253 * lynx-low.c (lynx_attach): Delete variable new_process.
3254
ab8f6ca9
JB
32552012-12-17 Joel Brobecker <brobecker@adacore.com>
3256
3257 * lynx-low.c (lynx_create_inferior): Delete variable
3258 new_process.
3259
78cbc024
JB
32602012-12-17 Joel Brobecker <brobecker@adacore.com>
3261
3262 * lynx-low.c (ptrace_request_to_str): Do not handle
3263 PTRACE_GETTHREADLIST if this macro does not exist.
3264
14a00470
YQ
32652012-12-15 Yao Qi <yao@codesourcery.com>
3266
3267 * Makefile.in (OBS): Add notif.o.
3268 * notif.c, notif.h: New.
3269 * server.c: Include "notif.h".
3270 (struct vstop_notif) <next>: Remove.
3271 <base>: New field.
3272 (queue_stop_reply): Update.
3273 (push_event, send_next_stop_reply): Remove.
3274 (discard_queued_stop_replies): Update.
3275 (notif_stop): New variable.
3276 (handle_v_stopped): Remove.
3277 (handle_v_requests): Don't call handle_v_stopped. Call
3278 handle_ack_notif instead.
3279 (queue_stop_reply_callback): Call notif_event_enque instead
3280 of queue_stop_reply.
3281 (handle_status): Don't call send_next_stop_reply, call
3282 notif_write_event instead.
3283 (kill_inferior_callback): Likewise.
3284 (detach_or_kill_inferior_callback): Likewise.
3285 (main): Call initialize_notif.
3286 (process_serial_event): Call QUEUE_is_empty.
3287 (handle_target_event): Call notif_push instead of push event.
3288 * server.h (push_event): Remove declaration.
3289
61c125b9
TT
32902012-12-10 Tom Tromey <tromey@redhat.com>
3291
3292 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
3293 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
3294 macros.
3295 (.c.o): Rewrite.
3296 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
3297 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
3298 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
3299 (amd64-linux-ipa.o, ax.o): Rewrite.
3300 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
3301 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
3302 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
3303 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
3304 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
3305 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
3306 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
3307 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
3308 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
3309 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
3310 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
3311 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
3312 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
3313 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
3314 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
3315 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
3316 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
3317 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
3318 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
3319 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
3320 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
3321 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
3322 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
3323 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
3324 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
3325 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
3326 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
3327 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
3328 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
3329 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
3330 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
3331 (reg-tilegx.o): Remove.
3332 (all_object_files): New macro.
3333 Include .deps files.
3334 * aclocal.m4, configure: Rebuild.
3335 * acinclude.m4: Include depstand.m4, lead-dot.m4.
3336 * configure.ac: Invoke ZW_CREATE_DEPDIR,
3337 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
3338
e90e9ad9
TT
33392012-12-05 Tom Tromey <tromey@redhat.com>
3340
3341 PR gdb/14917:
3342 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
3343
02d403bf 33442012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
3345
3346 * configure.ac: Check for linux/perf_event.h.
3347 * config.in: Regenerated.
3348 * configure: Regenerated.
3349
0270a750
PA
33502012-11-26 Maxime Villard <rustyBSD@gmx.fr>
3351
3352 * hostio.c (handle_readlink): Decrease buffer size
3353 parameter passed to readlink by one byte.
3354
8c29b58e
YQ
33552012-11-26 Yao Qi <yao@codesourcery.com>
3356
3357 * configure.ac (build_warnings): Append '-Wempty-body'.
3358 * configure: Regenerated.
3359 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
3360 body.
3361
8bdce1ff
PM
33622012-11-15 Pierre Muller <muller@sourceware.org>
3363
3364 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
3365 * config.in: Regenerate.
3366 * configure: Regenerate.
3367 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
3368 Use "gdb_wait.h" header instead of <sys/wait.h> header.
3369 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3370 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
3371 header.
3372 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
3373 instead of <sys/wait.h> header.
3374 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3375
02d403bf 33762012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
3377
3378 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
3379 (various make rules): Remove -DGDBSERVER
3380
fbd5db48
YQ
33812012-11-09 Yao Qi <yao@codesourcery.com>
3382
3383 * spu-low.c (current_ptid): Move it to ..
3384 * gdbthread.h: ... here. New.
3385 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
3386 * server.c (myresume, process_serial_event): Likewise.
3387 * thread-db.c (thread_db_find_new_threads): Likewise.
3388 * tracepoint.c (run_inferior_command): Likewise.
3389
b3dc46ff
AB
33902012-10-01 Andrew Burgess <aburgess@broadcom.com>
3391
3392 * server.c (handle_search_memory_1): Include access length in
3393 warning message.
3394
07c04788
HPN
33952012-09-05 Michael Brandt <michael.brandt@axis.com>
3396
3397 * linux-crisv32-low.c: Fix compile errors.
3398
918d227b
YQ
33992012-09-04 Yao Qi <yao@codesourcery.com>
3400
3401 * tracepoint.c (cmd_qtsv): Adjust debug message.
3402 Don't check CUR_TPOINT.
3403
18c1b81a
YQ
34042012-08-28 Yao Qi <yao@codesourcery.com>
3405
3406 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
3407 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
3408 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
3409 Remove declarations of xmalloc, xreallloc, xstrdup and
3410 freeargv.
3411 * Makefile.in (libiberty_h): New.
3412 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
3413 (linux-bfin-low.o): Append dependency 'libiberty.h'.
3414
dc82f37b
YQ
34152012-08-23 Yao Qi <yao@codesourcery.com>
3416
3417 * server.h: Remove declaration of 'xsnprintf'.
3418
406b1477
KS
34192012-08-22 Keith Seitz <keiths@redhat.com>
3420
3421 * server.h: Include build-gnulib-gbserver/config.h.
3422 * gdbreplay.c: Likewise.
3423
e6712ff1
DE
34242012-08-08 Doug Evans <dje@google.com>
3425
3426 * Makefile.in (SFILES): Add gdb_vecs.c.
3427 (OBS): Add gdb_vecs.o.
3428 (gdb_vecs_h, host_defs_h): New variables.
3429 (thread-db.o): Add $(gdb_vecs_h) dependency.
3430 (gdb_vecs.o): New rule.
3431 * thread-db.c: #include "gdb_vecs.h".
3432 (thread_db_load_search): Use a vector to iterate over path elements.
3433 Handle text appearing after "$pdir".
3434
3435 * configure.ac: Add check for strstr.
3436 * config.in: Regenerate.
3437 * configure: Regenerate.
3438
7c3270ae
UW
34392012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
3440
3441 * hostio.c (handle_pread): If pread fails, fall back to attempting
3442 lseek/read.
3443 (handle_pwrite): Likewise for pwrite.
3444
b62e2b27
UW
34452012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
3446
3447 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
3448 between unsupported TYPE and unimplementable ADDR/LEN combination.
3449 (arm_insert_point): Act on new return value.
3450
78a99e91
PA
34512012-07-31 Pedro Alves <palves@redhat.com>
3452
3453 * server.c (process_point_options): Only skip tokens if we find
3454 one that is unrecognized. Don't treat 'X' specially while
3455 skipping unrecognized tokens.
3456
fcf303ab
UW
34572012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
3458
3459 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
3460 to 4-byte-align HW breakpoint addresses for Thumb.
3461
7255706c
YQ
34622012-07-27 Yao Qi <yao@codesourcery.com>
3463
3464 PR remote/14161.
3465
3466 * server.h: Declare gdb_agent_about_to_close.
3467 * target.c (kill_inferior): Include "agent.h".
3468 New. Send command 'kill'.
3469 * target.h (kill_inferior): Removed macro.
3470 * tracepoint.c (gdb_agent_about_to_close): New.
3471 (gdb_agent_helper_thread): Handle command 'close'.
3472 Wait endlessly until the inferior stops.
3473 Install gdb_agent_remove_socket to atexit hook.
3474 (agent_socket_name): New static variable.
3475 (gdb_agent_socket_init): Replace local variable 'name' with
3476 'agent_socket_name'.
3477 (gdb_agent_remove_socket): New.
3478
5a3f286f
YQ
34792012-07-27 Yao Qi <yao@codesourcery.com>
3480
3481 * server.c (process_point_options): Stop at 'X' when parsing.
3482
961bd387
ME
34832012-07-19 Michael Eager <eager@eagercon.com>
3484
a261b8f5 3485 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
3486 to hw_execute.
3487 * linux-x86-low.c (x86_insert_point, x86_remove_point):
3488 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
3489 hardware breakpoint.
3490
aa7c7447
JK
34912012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3492
3493 * gdbserver/linux-low.c (initialize_low): Call
3494 linux_ptrace_init_warnings.
3495
7f216e7c
DE
34962012-07-02 Doug Evans <dje@google.com>
3497
3498 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
3499 pointer to int.
3500
d3ce09f5
SS
35012012-07-02 Stan Shebs <stan@codesourcery.com>
3502
3503 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
3504 (ax.o): Add it to build rule.
3505 (ax-ipa.o): Ditto.
3506 (OBS): Add format.o.
3507 (IPA_OBS): Add format.o.
3508 * server.c (handle_query): Claim support for breakpoint commands.
3509 (process_point_options): Add command case.
3510 (process_serial_event): Leave running if there are printfs in
3511 effect.
3512 * mem-break.h (any_persistent_commands): Declare.
3513 (add_breakpoint_commands): Declare.
3514 (gdb_no_commands_at_breakpoint): Declare.
3515 (run_breakpoint_commands): Declare.
3516 * mem-break.c (struct point_command_list): New struct.
3517 (struct breakpoint): New field command_list.
3518 (any_persistent_commands): New function.
3519 (add_commands_to_breakpoint): New function.
3520 (add_breakpoint_commands): New function.
3521 (gdb_no_commands_at_breakpoint): New function.
3522 (run_breakpoint_commands): New function.
3523 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
3524 locally.
3525 * ax.c: Include format.h.
3526 (ax_printf): New function.
3527 (gdb_eval_agent_expr): Add printf opcode.
3528
2f8f6aed
YQ
35292012-06-13 Yao Qi <yao@codesourcery.com>
3530
3531 * server.c (start_inferior): Remove duplicated writes to fields
3532 'last_resume_kind' and 'last_status' of 'current_inferior'.
3533
0c9070b3
YQ
35342012-06-12 Yao Qi <yao@codesourcery.com>
3535 Pedro Alves <palves@redhat.com>
3536
3537 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
3538 comment.
3539 * server.c (handle_v_cont): Extend comment.
3540
c52daf70
YQ
35412012-06-11 Yao Qi <yao@codesourcery.com>
3542
3543 * linux-low.c (linux_attach): Add 'static'.
3544
d38bbb0a
YQ
35452012-06-06 Yao Qi <yao@codesourcery.com>
3546
3547 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
3548
89dc0afd
JK
35492012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
3550
3551 Fix gcc -flto compilation warning.
3552 * server.c (main): Make variable multi_mode and attach volatile.
3553
75f62ce7
TJB
35542012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3555
3556 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
3557 if the platform doesn't know about it.
3558
65f479b6
PA
35592012-05-30 Jeff Kenton <jkenton@tilera.com>
3560
3561 * Makefile.in (SFILES): Add linux-tile-low.c.
3562 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
3563 * configure.srv: Handle tilegx-*-linux*.
3564 * linux-tile-low.c: New file.
3565
0c5bf5a9
JK
35662012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3567
3568 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
3569
a493e3e2
PA
35702012-05-24 Pedro Alves <palves@redhat.com>
3571
3572 PR gdb/7205
3573
43aaf8b6 3574 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 3575
2ea28649
PA
35762012-05-24 Pedro Alves <palves@redhat.com>
3577
3578 PR gdb/7205
3579
3580 Replace target_signal with gdb_signal throughout.
3581
8d409d16
MR
35822012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
3583
3584 * linux-low.c (linux_store_registers): Avoid the copying sequence
3585 when no data has been retrieved by ptrace.
3586
23512c01
MGD
35872012-05-22 Will Deacon <will.deacon@arm.com>
3588
3589 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
3590 Include asm/ptrace.h.
3591 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
3592 already defined.
3593
4934b29e
MR
35942012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
3595
3596 * linux-low.c (linux_store_registers): Don't re-retrieve data
3597 with ptrace that has already been obtained from /proc. Always
3598 copy any data retrieved with ptrace to the buffer supplied.
3599
bde24c0a
PA
36002012-05-11 Yao Qi <yao@codesourcery.com>
3601 Pedro Alves <palves@redhat.com>
3602
3603 * linux-low.c (enum stopping_threads_kind): New.
3604 (stopping_threads): Change type to `enum stopping_threads_kind'.
3605 (handle_extended_wait): If stopping and suspending threads, leave
3606 the new_lwp suspended too.
3607 (linux_wait_for_event): Adjust.
3608 (stop_all_lwps): Set `stopping_threads' to
3609 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
3610 whether we're suspending threads or just stopping them. Assert no
3611 recursion happens.
3612
623b6bdf
YQ
36132012-04-29 Yao Qi <yao@codesourcery.com>
3614
3615 * server.h: Move some code to ...
3616 * gdbthread.h: ... here. New.
3617 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
3618 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
3619 (nto-low.o, win32-low.o): Likewise.
3620 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
3621 * regcache.c, remote-utils.c, server.c: Likewise.
3622 * target.c, tracepoint.c, win32-low.c: Likewise.
3623
f15f9948
TJB
36242012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3625
3626 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
3627 (PTRACE_ARG4_TYPE): Likewise.
3628 (PTRACE_XFER_TYPE): Likewise.
3629 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
3630 ptrace to PTRACE_ARG3_TYPE.
3631 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
3632 (PTRACE_ARG4_TYPE): Likewise.
3633 (PTRACE_XFER_TYPE): Likewise.
3634 (linux_detach_one_lwp): Cast fourth argument of
3635 ptrace to long then PTRACE_ARG4_TYPE.
3636 (regsets_fetch_inferior_registers): Cast third argument of
3637 ptrace to long then PTRACE_ARG3_TYPE.
3638 (regsets_store_inferior_registers): Likewise.
3639
38ea300a
PA
36402012-04-20 Pedro Alves <palves@redhat.com>
3641
3642 * configure: Regenerate.
3643
c971b7fa
PA
36442012-04-19 Pedro Alves <palves@redhat.com>
3645
43aaf8b6 3646 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 3647 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
3648 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
3649 (all, install-only, uninstall, clean-info, all-lib, clean): No
3650 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
3651 (maintainer-clean realclean distclean): Use subdir_do.
3652 (subdir_do): New.
3653 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 3654 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
3655 * acinclude.m4: Include acx_configure_dir.m4.
3656 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
3657 calls. Call AC_PROG_RANLIB. Configure gnulib using
3658 ACX_CONFIGURE_DIR.
3659 (GNULIB): New.
3660 (GNULIB_STDINT_H): Adjust.
3661 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
3662 * gdbreplay.c: Include build-gnulib/config.h.
3663 * server.h: Likewise.
3664 * aclocal.m4: Regenerate.
3665 * config.in: Regenerate.
3666 * configure: Regenerate.
c971b7fa 3667
809277f8
PA
36682012-04-19 Pedro Alves <palves@redhat.com>
3669
3670 * Makefile.in (LIBGNU, INCGNU): Adjust.
3671 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
3672 (all, install-only, uninstall, clean-info, all-lib, clean)
3673 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
3674 * configure.ac: Adjust AC_OUTPUT output.
3675 * aclocal.m4: Regenerate.
3676 * configure: Regenerate.
3677
fd9bb8b8
PA
36782012-04-19 Pedro Alves <palves@redhat.com>
3679
3680 * Makefile.in (generated_files): New.
3681 (server_h): Remove the explicit dependency on config.h, and depend
3682 on $generated_files.
3683
1c298c66
PA
36842012-04-19 Pedro Alves <palves@redhat.com>
3685
3686 * Makefile.in (INCGNU): Add -Ignulib.
3687
57c4b50b
PA
36882012-04-19 Pedro Alves <palves@redhat.com>
3689
3690 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
3691 (INCGNU): ... this, and spell out -I here.
3692 (GNULIB_LIB): Rename to ...
3693 (LIBGNU): ... this.
3694 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
3695
1030e047
PA
36962012-04-19 Pedro Alves <palves@redhat.com>
3697
3698 * config.in: Regenerate.
3699
447d4319
PA
37002012-04-19 Pedro Alves <palves@redhat.com>
3701
3702 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
3703 * server.h (memmem): Remove declaration.
3704 * config.in: Regenerate.
3705 * configure: Regenerate.
3706
aad9eab9
YQ
37072012-04-19 Yao Qi <yao@codesourcery.com>
3708
3709 * Makefile.in (SFILES): Add common/vec.c.
3710 (OBS): Add vec.o.
3711 (vec.o): New rule.
3712
3e10640f
YQ
37132012-04-19 Yao Qi <yao@codesourcery.com>
3714
3715 * remote-utils.c (prepare_resume_reply): Replace with macro
3716 target_core_of_thread.
3717 * server.c (handle_qxfer_threads_proper): Likewise.
3718 * target.h (traget_core_of_thread): New macro.
3719
71622373
PA
37202012-04-18 Pedro Alves <palves@redhat.com>
3721
3722 * aclocal.m4: Regenerate.
3723 * configure: Regenerate.
3724
80d26939
YQ
37252012-04-16 Yao Qi <yao@codesourcery.com>
3726
3727 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
3728 duplicated on address.
3729
42476b70
YQ
37302012-04-16 Yao Qi <yao@codesourcery.com>
3731
3732 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
3733 (struct tracepoint_action_ops) <send>: New field.
3734 (m_tracepoint_action_send, r_tracepoint_action_send): New.
3735 (agent_expr_send, x_tracepoint_action_send): New.
3736 (l_tracepoint_action_send): New.
3737 (cmd_qtdp): Download and install tracepoint
3738 according to `use_agent'.
3739 (run_inferior_command): Add one more parameter `len'.
3740 Update callers.
3741 (tracepoint_send_agent): New.
3742 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
3743
7bc83639
YQ
37442012-04-16 Yao Qi <yao@codesourcery.com>
3745
3746 * tracepoint.c (download_tracepoints): Moved to ...
3747 (cmd_qtstart): ... here.
3748
5f18041e
YQ
37492012-04-14 Yao Qi <yao@codesourcery.com>
3750
3751 * tracepoint.c: Include inttypes.h.
3752 (struct collect_memory_action): Use sized types.
3753 (struct tracepoint): Likewise.
3754 (cmd_qtdp, stop_tracing): Update print specifiers.
3755 (cmd_qtp, response_tracepoint): Likewise.
3756 (collect_data_at_tracepoint): Likewise.
3757 (collect_data_at_step): Likewise.
3758
55a8c076
YQ
37592012-04-14 Yao Qi <yao@codesourcery.com>
3760
3761 Import gnulib module inttypes.
3762 * aclocal.m4, config.in, configure: Regenerated.
3763
dc750257
YQ
37642012-04-14 Yao Qi <yao@codesourcery.com>
3765
3766 * Makefile.in (maintainer-clean, realclean, distclean): Remove
3767 Makefile and config.status at last.
3768
0ab5faf9
YQ
37692012-04-13 Yao Qi <yao@codesourcery.com>
3770
3771 * tracepoint.c: Include stdint.h unconditionally.
3772
18f5fd81
TJB
37732012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3774
3775 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
3776 on BFD_HAVE_SYS_PROCFS_TYPE.
3777 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
3778 * configure: Regenerate.
3779 * config.in: Likewise.
3780
4d47af5c
L
37812012-04-13 H.J. Lu <hongjiu.lu@intel.com>
3782
3783 * Makefile.in (clean): Also remove x32.c x32-linux.c
3784 x32-avx.c x32-avx-linux.c.
3785 (x32.o): New target.
3786 (x32.c): Likewise.
3787 (x32-linux.o): Likewise.
3788 (x32-linux.c): Likewise.
3789 (x32-avx.o): Likewise.
3790 (x32-avx.c): Likewise.
3791 (x32-avx-linux.o): Likewise.
3792 (x32-avx-linux.c): Likewise.
3793
3794 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
3795 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
3796 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
3797 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
3798 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
3799 i386/x32-avx-linux.xml.
3800
3801 * linux-x86-low.c (init_registers_x32_linux): New prototype.
3802 (init_registers_x32_avx_linux): Likwise.
3803 (x86_linux_update_xmltarget): Call init_registers_x32_linux
3804 or init_registers_x32_avx_linux if linux_is_elf64 is false.
3805
ecedbe58
PA
38062012-04-13 Pedro Alves <palves@redhat.com>
3807
3808 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
3809 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
3810 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
3811 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
3812 the sub-make.
3813
c92b5177
L
38142012-04-12 H.J. Lu <hongjiu.lu@intel.com>
3815
3816 * linux-x86-low.c (compat_x32_clock_t): New.
3817 (compat_x32_siginfo_t): Likewise.
3818 (compat_x32_siginfo_from_siginfo): Likewise.
3819 (siginfo_from_compat_x32_siginfo): Likewise.
3820 (linux_is_elf64): Likewise.
3821 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
3822 and siginfo_from_compat_x32_siginfo for x32.
3823 (x86_arch_setup): Set linux_is_elf64.
3824
214d508e
L
38252012-04-12 H.J. Lu <hongjiu.lu@intel.com>
3826
3827 PR gdb/13969
3828 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
3829 e_machine field.
3830 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
3831 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
3832 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
3833 compatible with process.
3834
c9a1864a
YQ
38352012-04-12 Yao Qi <yao@codesourcery.com>
3836
3837 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
3838 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
3839 (install-only, install-info, clean): Handle sub dir gnulib.
3840 (all-lib, am--refresh): New targets.
3841 (memmem.o): Remove target.
3842 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
3843 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
3844 (AC_REPLACE_FUNCS): Remove memmem.
3845 Invoke gl_INIT and AM_INIT_AUTOMAKE.
3846 (AC_OUTPUT): Generate Makefile in gnulib/.
3847 * aclocal.m4, config.in, configure: Regenerated.
3848
367ba2c2
MR
38492012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
3850
3851 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
3852
9d236627
PA
38532012-04-05 Pedro Alves <palves@redhat.com>
3854
3855 -Werror=strict-aliasing
3856
3857 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
3858 pointer.
3859
111217b3
PA
38602012-04-04 Pedro Alves <palves@redhat.com>
3861
3862 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
3863 (sparc_store_gregset_from_stack, sparc_store_gregset)
3864 (sparc_breakpoint_at): Fix formatting.
3865
8365dcf5
TJB
38662012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3867
3868 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
3869 are available.
3870 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
3871 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
3872 * config.in: Regenerate.
3873 * configure: Likewise.
3874
689cc2ae
PA
38752012-03-29 Pedro Alves <palves@redhat.com>
3876
3877 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
3878 Correct ptrace arguments.
3879
c14dfd32
PA
38802012-03-28 Pedro Alves <palves@redhat.com>
3881
3882 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
3883 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
3884 (IA64_FR1_REGNUM): New defines.
3885 (ia64_fetch_register): New.
3886 (the_low_target): Install it.
3887 * linux-low.h (struct linux_target_ops) <fetch_register>: New
3888 field.
3889 * linux-low.c (linux_fetch_registers): Try the
3890 the_low_target.fetch_register hook first.
3891
3892 * linux-arm-low.c (the_low_target): Adjust.
3893 * linux-bfin-low.c (the_low_target): Adjust.
3894 * linux-cris-low.c (the_low_target): Adjust.
3895 * linux-crisv32-low.c (the_low_target): Adjust.
3896 * linux-m32r-low.c (the_low_target): Adjust.
3897 * linux-m68k-low.c (the_low_target): Adjust.
3898 * linux-mips-low.c (the_low_target): Adjust.
3899 * linux-ppc-low.c (the_low_target): Adjust.
3900 * linux-s390-low.c (the_low_target): Adjust.
3901 * linux-sh-low.c (the_low_target): Adjust.
3902 * linux-sparc-low.c (the_low_target): Adjust.
3903 * linux-tic6x-low.c (the_low_target): Adjust.
3904 * linux-x86-low.c (the_low_target): Adjust.
3905 * linux-xtensa-low.c (the_low_target): Adjust.
3906
63c88e13
PA
39072012-03-26 Pedro Alves <palves@redhat.com>
3908
3909 * server.c (handle_qxfer_libraries): Don't bail early if
3910 the_target->qxfer_libraries_svr4 is not NULL.
3911
fb723180
PA
39122012-03-26 Pedro Alves <palves@redhat.com>
3913
3914 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
3915
0afae3cf
PA
39162012-03-23 Pedro Alves <palves@redhat.com>
3917
3918 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
3919 "library-list-svr4" element's start tag when the the DSO list is
3920 empty.
3921
485f1ee4
PA
39222012-03-23 Pedro Alves <palves@redhat.com>
3923
3924 * linux-low.c (read_one_ptr): Read the inferior's pointer through
3925 a variable whose type size is the same as the inferior's pointer
3926 size.
3927
a5362b9a
TS
39282012-03-21 Thomas Schwinge <thomas@codesourcery.com>
3929
3930 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
3931 struct siginfo.
3932 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
3933 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3934 * linux-low.h: Include <signal.h>.
3935 (struct siginfo): Remove forward declaration.
3936 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
3937 struct siginfo.
3938
d226c142
MF
39392012-03-21 Mike Frysinger <vapier@gentoo.org>
3940
3941 * .gitignore: Ignore more files.
3942
122f36ef
PA
39432012-03-19 Pedro Alves <palves@redhat.com>
3944 Jan Kratochvil <jan.kratochvil@redhat.com>
3945
3946 * server.c (cont_thread, general_thread): Add describing comments.
3947 (start_inferior): Clear `cont_thread'.
3948 (handle_v_cont): Don't set `cont_thread' if resuming all threads
3949 of a process.
3950
fc3e5175
YQ
39512012-03-15 Yao Qi <yao@codesourcery.com>
3952
3953 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
3954 handling to ...
3955 (cmd_qtdp): ... here.
3956
8d0d92cd
YQ
39572012-03-15 Yao Qi <yao@codesourcery.com>
3958
3959 * tracepoint.c (struct tracepoint_action_ops): New.
3960 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
3961 (m_tracepoint_action_download): New.
3962 (r_tracepoint_action_download): New.
3963 (x_tracepoint_action_download): New.
3964 (l_tracepoint_action_download): New.
3965 (add_tracepoint_action): Install `action->ops' according type.
3966 (download_tracepoint_1): Move code `download' function pointer
3967 of various tracepoint_action_ops.
3968
87b0bb13
JK
39692012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
3970
3971 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
3972 linux_ptrace_attach_warnings.
3973
5f572dec
JK
39742012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
3975
3976 * Makefile.in (linux-ptrace.o): New.
3977 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
3978 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
3979 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
3980 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
3981 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
3982 of these targets.
3983 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
3984
f4647387
YQ
39852012-03-08 Yao Qi <yao@codesourcery.com>
3986 Pedro Alves <palves@redhat.com>
3987
3988 Fix PR server/13392.
3989 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
3990 offset of JMP insn.
3991 * tracepoint.c (remove_tracepoint): New.
3992 (cmd_qtdp): Call remove_tracepoint when failed to install.
3993
9b224c5e
PA
39942012-03-07 Pedro Alves <palves@redhat.com>
3995
3996 * linux-low.c (get_detach_signal): New.
3997 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
3998 Pass on pending signals to PTRACE_DETACH. Check the result of the
3999 ptrace call.
4000 * server.c (program_signals, program_signals_p): New.
4001 (handle_general_set): Handle QProgramSignals.
4002 * server.h (program_signals, program_signals_p): Declare.
4003
e237a7e2
JK
40042012-03-05 Pedro Alves <palves@redhat.com>
4005 Jan Kratochvil <jan.kratochvil@redhat.com>
4006
4007 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
4008 New comment why.
4009
5808517f
YQ
40102012-03-03 Yao Qi <yao@codesourcery.com>
4011
4012 * tracepoint.c (tracepoint_look_up_symbols): Update call to
4013 agent_look_up_symbols.
4014
58b4daa5
YQ
40152012-03-03 Yao Qi <yao@codesourcery.com>
4016
4017 * Makefile.in (linux-low.o): Keep dependence on agent.h.
4018 (linux-x86-low.o): Likewise.
4019 * server.h: Remove in_process_agent_loaded.
4020 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
4021 common/agent.c.
4022 Update callers.
4023
8ffcbaaf
YQ
40242012-03-03 Yao Qi <yao@codesourcery.com>
4025
4026 * tracepoint.c (gdb_agent_capability): New global.
4027 (in_process_agent_loaded_ust): Renamed to
4028 `in_process_agent_supports_ust'.
4029 Update callers.
4030 (in_process_agent_supports_ust): Call agent_capability_check.
4031 (clear_installed_tracepoints): Assert that agent supports
4032 agent.
4033
d1feda86
YQ
40342012-03-03 Yao Qi <yao@codesourcery.com>
4035
4036 * linux-low.c (linux_supports_agent): New.
4037 (linux_target_ops): Initialize field `supports_agent' with
4038 linux_supports_agent.
4039 * target.h (struct target_ops) <supports_agent>: New.
4040 (target_supports_agent): New macro.
4041 * server.c (handle_general_set): Handle packet 'QAgent'.
4042 (handle_query): Send `QAgent+'.
4043 * Makefile.in (server.o): Depends on agent.h.
4044
2fa291ac
YQ
40452012-03-03 Yao Qi <yao@codesourcery.com>
4046
4047 * Makefile.in (OBS): Add agent.o.
4048 Add new rule for agent.o.
4049 Track dependence of tracepoint.c on agent.h.
4050 * tracepoint.c (run_inferior_command_1):
4051 (run_inferior_command): Call agent_run_command.
4052 (gdb_ust_connect_sync_socket): Deleted. Move it to
4053 common/agent.c.
4054 (resume_thread, stop_thread): Likewise.
4055 (gdb_ust_socket_init): Renamed to ...
4056 (gdb_agent_socket_init): ... New.
4057 (gdb_ust_thread): Renamed to ...
4058 (gdb_agent_helper_thread): ... New.
4059 (gdb_ust_init): Move some code to ...
4060 (gdb_agent_init): ... here. New.
4061 [HAVE_UST]: Call gdb_ust_init.
4062 (initialize_tracepoint_ftlib): Call gdb_agent_init.
4063 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
4064 * config.in, configure: Regenerated.
4065
05044653
PA
40662012-03-02 Pedro Alves <palves@redhat.com>
4067
4068 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
4069 * linux-low.c (struct simple_pid_list): New.
4070 (stopped_pids): New a struct simple_pid_list pointer.
4071 (add_to_pid_list, pull_pid_from_list): New.
4072 (handle_extended_wait): Don't assume the first signal new children
4073 report is SIGSTOP. Adjust call to pull_pid_from_list.
4074 (linux_wait_for_lwp): Adjust.
4075
8d00225b
YQ
40762012-03-02 Yao Qi <yao@codesourcery.com>
4077
4078 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4079 debug log.
4080
19560ba5
YQ
40812012-03-02 Yao Qi <yao@codesourcery.com>
4082
4083 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4084 `stop_pc' and `tpoint'. Update caller.
4085
1faeff08
MR
40862012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
4087
4088 * linux-low.h (linux_target_ops): Add regset_bitmap member.
4089 * linux-low.c (use_linux_regsets): New macro.
4090 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4091 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4092 (linux_register_in_regsets): New function.
4093 (usr_fetch_inferior_registers): Skip registers covered by
4094 regsets.
4095 (usr_store_inferior_registers): Likewise.
4096 (usr_fetch_inferior_registers): New macro.
4097 (usr_store_inferior_registers): Likewise.
4098 (linux_fetch_registers): Handle mixed regset/non-regset targets.
4099 (linux_store_registers): Likewise.
4100 * linux-mips-low.c (init_registers_mips_dsp_linux): New
4101 prototype.
4102 (init_registers_mips64_dsp_linux): Likewise.
4103 (init_registers_mips_linux): New macro.
4104 (init_registers_mips_dsp_linux): Likewise.
4105 (mips_dsp_num_regs): Likewise.
4106 (DSP_BASE, DSP_CONTROL): New fallback macros.
4107 (mips_base_regs): New macro.
4108 (mips_regmap): Use it. Fix the size.
4109 (mips_dsp_regmap): New variable.
4110 (mips_dsp_regset_bitmap): Likewise.
4111 (mips_arch_setup): New function.
4112 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4113 than mips_regmap.
4114 (mips_cannot_store_register): Likewise.
4115 (the_low_target): Update .arch_setup, .num_regs and .regmap
4116 initializers. Add .regset_bitmap initializer.
4117 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4118 initializer.
4119 * linux-bfin-low.c (the_low_target): Likewise.
4120 * linux-cris-low.c (the_low_target): Likewise.
4121 * linux-crisv32-low.c (the_low_target): Likewise.
4122 * linux-ia64-low.c (the_low_target): Likewise.
4123 * linux-m32r-low.c (the_low_target): Likewise.
4124 * linux-m68k-low.c (the_low_target): Likewise.
4125 * linux-ppc-low.c (the_low_target): Likewise.
4126 * linux-s390-low.c (the_low_target): Likewise.
4127 * linux-sh-low.c (the_low_target): Likewise.
4128 * linux-sparc-low.c (the_low_target): Likewise.
4129 * linux-tic6x-low.c (the_low_target): Likewise.
4130 * linux-x86-low.c (the_low_target): Likewise.
4131 * linux-xtensa-low.c (the_low_target): Likewise.
4132 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4133 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4134 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4135 srv_xmlfiles.
4136 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4137 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4138
c03e6ccc
YQ
41392012-02-29 Yao Qi <yao@codesourcery.com>
4140 Pedro Alves <palves@redhat.com>
4141
4142 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4143 `step_over_finished' is true.
4144
644cebc9
PA
41452012-02-27 Pedro Alves <palves@redhat.com>
4146
4147 * linux-low.c (pid_is_stopped): Delete, moved to common/.
4148 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4149
c14d7ab2
PA
41502012-02-27 Pedro Alves <palves@redhat.com>
4151
4152 PR server/9684
4153 * linux-low.c (pid_is_stopped): New.
4154 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4155
412c89dd
LM
41562012-02-25 Luis Machado <lgustavo@codesourcery.com>
4157
4158 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4159 of conditions.
4160
b745defe
MR
41612012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4162
4163 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4164
9f3a5c85
LM
41652012-02-24 Luis Machado <lgustavo@codesourcery>
4166
4167 * server.c (handle_query): Advertise support for target-side
4168 breakpoint condition evaluation.
4169 (process_point_options): New function.
4170 (process_serial_event): When inserting a breakpoint, check for
4171 a target-side condition that should be evaluated.
4172
4173 * mem-break.c: Include regcache.h and ax.h.
4174 (point_cond_list_t): New data structure.
4175 (breakpoint) <cond_list>: New field.
4176 (find_gdb_breakpoint_at): Make non-static.
4177 (delete_gdb_breakpoint_at): Clear any target-side
4178 conditions.
4179 (clear_gdb_breakpoint_conditions): New function.
4180 (add_condition_to_breakpoint): Likewise.
4181 (add_breakpoint_condition): Likewise.
4182 (gdb_condition_true_at_breakpoint): Likewise.
4183 (gdb_breakpoint_here): Return result directly instead
4184 of going through a local variable.
4185
4186 * mem-break.h (find_gdb_breakpoint_at): New prototype.
4187 (clear_gdb_breakpoint_conditions): Likewise.
4188 (add_breakpoint_condition): Likewise.
4189 (gdb_condition_true_at_breakpoint): Likewise.
4190
4191 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
4192 (need_step_over_p): Take target-side breakpoint condition into
4193 consideration.
4194
5e1dc496
LM
41952012-02-24 Luis Machado <lgustavo@codesourcery>
4196
4197 * server.h: Include tracepoint.h.
4198 (agent_mem_read, agent_get_trace_state_variable_value,
4199 agent_set_trace_state_variable_value,
4200 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
4201 get_set_tsv_func_addr): New prototypes.
4202
4203 * ax.h: New include file.
4204 * ax.c: New source file.
4205
4206 * tracepoint.c: Include ax.h.
4207 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
4208 agent_expr, eval_result_type): Move to ax.h.
4209 (parse_agent_expr): Rename to ...
4210 (gdb_parse_agent_expr): ... this, make it non-static and move
4211 to ax.h.
4212 (unparse_agent_expr) Rename to ...
4213 (gdb_unparse_agent_expr): ... this, make it non-static and move
4214 to ax.h.
4215 (eval_agent_expr): Rename to ...
4216 (eval_tracepoint_agent_expr): ... this.
4217 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
4218 forward declarations.
4219 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
4220 (agent_get_trace_state_variable_value): New function.
4221 (agent_set_trace_state_variable_value): New function.
4222 (cmd_qtdp): Call gdb_parse_agent_expr (...).
4223 (response_tracepoint): Call gdb_unparse_agent_expr (...).
4224 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
4225 (condition_true_at_tracepoint): Likewise.
4226 (parse_agent_expr): Rename to ...
4227 (gdb_parse_agent_expr): ... this and move to ax.c.
4228 (unparse_agent_expr): Rename to ...
4229 (gdb_unparse_agent_expr): ... this and move to ax.c.
4230 (gdb_agent_op_name): Move to ax.c.
4231 (eval_agent_expr): Rename to ...
4232 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
4233 and move to ax.c.
4234 (eval_tracepoint_agent_expr): New function.
4235 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 4236 non-static.
5e1dc496
LM
4237 (current_insn_ptr, emit_error, struct bytecode_address): Move to
4238 ax.c.
4239 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
4240 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
4241 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
4242 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
4243 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
4244 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
4245 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
4246 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
4247 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
4248 (compile_bytecodes): Remove forward declaration.
4249 (is_goto_target): Move to ax.c.
4250 (compile_bytecodes): Move to ax.c and call
4251 agent_get_trace_state_variable_value (...) and
4252 agent_set_trace_state_variable_value (...).
4253
4254 * Makefile.in: Update ax.c and IPA dependencies.
4255
277e4e52
PA
42562012-02-24 Pedro Alves <palves@redhat.com>
4257
4258 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
4259 (cmd_bigqtbuffer_circular): ... this. Only handle
4260 'QTBuffer:circular:'.
4261 (handle_tracepoint_general_set): Adjust.
4262
bf4c19f7
YQ
42632012-02-16 Yao Qi <yao@codesourcery.com>
4264
4265 * inferiors.c: Move code to ...
4266 * dll.c: .... here. New.
4267 * server.h: Declare clear_dlls.
4268 * Makefile.in (SFILES): Add dll.c.
4269 (OBS): Add dll.o
4270 (dll.o): New rule.
4271
d73f2619
YQ
42722012-02-11 Yao Qi <yao@codesourcery.com>
4273
4274 * server.c: (handle_monitor_command): Add a new parameter
4275 `own_buf'.
4276 (handle_query): Update caller.
4277
f8255c2a
JB
42782012-02-09 Joel Brobecker <brobecker@adacore.com>
4279
4280 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
4281 * configure, config.in: Regenerate.
4282 * hostio.c: Provide an alternate implementation if HAVE_READLINK
4283 is not defined.
4284
da84f473
PA
42852012-02-02 Pedro Alves <palves@redhat.com>
4286
4287 Try SIGKILL first, then PTRACE_KILL.
4288 * linux-low.c (linux_kill_one_lwp): New.
4289 (linux_kill_one_lwp): Rename to ...
4290 (kill_one_lwp_callback): ... this. Use the new
4291 linux_kill_one_lwp.
4292
e886a173
PA
42932012-02-02 Pedro Alves <palves@redhat.com>
4294
4295 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
4296 inferior.
4297
be07f1a2
PA
42982012-01-27 Pedro Alves <palves@redhat.com>
4299
4300 * linux-low.c (linux_child_pid_to_exec_file): Delete.
4301 (elf_64_file_p): Make static.
4302 (linux_pid_exe_is_elf_64_file): New.
4303 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
4304 Delete declarations.
4305 (linux_pid_exe_is_elf_64_file): Declare.
4306 * linux-x86-low.c (x86_arch_setup): Use
4307 linux_pid_exe_is_elf_64_file.
4308
d8301ad1
JK
43092012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4310
4311 * linux-low.c (linux_wait_for_event_1): Rename to ...
4312 (linux_wait_for_event): ... here and merge it with former
4313 linux_wait_for_event - new variable wait_ptid, use it.
4314 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
4315
01b17894
PA
43162012-01-23 Pedro Alves <palves@redhat.com>
4317
4318 * server.c (main): Avoid yet another case of infinite loop while
4319 detaching/killing after a longjmp.
4320
e825046f
JK
43212012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4322
4323 Code cleanup.
4324 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
4325
b9e7b9c3
UW
43262012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
4327
4328 * hostio.c (handle_readlink): New function.
4329 (handle_vFile): Call it to handle "vFile:readlink" packets.
4330
901f9912
UW
43312012-01-20 Pedro Alves <palves@redhat.com>
4332 Ulrich Weigand <ulrich.weigand@linaro.org>
4333
4334 * server.c (handle_v_requests): Only support vAttach and vRun to
4335 start multiple processes when in extended protocol mode.
4336
fc1ab1a0
PA
43372012-01-17 Pedro Alves <palves@redhat.com>
4338
4339 * tracepoint.c (initialize_tracepoint): Use mmap instead of
4340 memalign plus mprotect to allocate the scratch buffer.
4341
7d5d4e98
PA
43422012-01-13 Pedro Alves <palves@redhat.com>
4343
4344 * server.c (attach_inferior): Clear `cont_thread'.
4345
f128d5e9
PA
43462012-01-13 Pedro Alves <palves@redhat.com>
4347
4348 * server.c (main): Avoid infinite loop while detaching/killing
4349 after a longjmp.
4350
06db92f0
DE
43512012-01-09 Doug Evans <dje@google.com>
4352
4353 * server.c (start_inferior): Set last_ptid in --wrapper case.
4354
32d92999
YQ
43552012-01-06 Yao Qi <yao@codesourcery.com>
4356
4357 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
4358 defined.
4359 [IN_PROCESS_AGENT] (debug_agent): New global variable.
4360
5e0a92a9
YQ
43612012-01-04 Yao Qi <yao@codesourcery.com>
4362
4363 * tracepoint.c (cmd_qtdp): Print debug message
4364 for static tracepoint.
4365
ae639e8c
YQ
43662012-01-04 Yao Qi <yao@codesourcery.com>
4367
4368 * tracepoint.c (trace_vdebug): Differentiate debug message
4369 between gdbserver and IPA.
4370
f72429c5
YQ
43712012-01-03 Yao Qi <yao@codesourcery.com>
4372
4373 * tracepoint.c (tracepoint_was_hit): Don't collect for
4374 static tracepoint.
4375
12c3e59c
JB
43762012-01-02 Joel Brobecker <brobecker@adacore.com>
4377
4378 * terminal.h: Reformat copyright header.
4379
67827812
JB
43802012-01-02 Joel Brobecker <brobecker@adacore.com>
4381
4382 * server.c (gdbserver_version): Update copyright year.
4383 * gdbreplay.c (gdbreplay_version): Likewise.
4384
3e52c33d
JK
43852011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
4386
4387 * linux-low.c (linux_create_inferior): Put empty if clause for write.
4388
4389 Revert:
4390 2011-12-18 Hui Zhu <teawater@gmail.com>
4391 * linux-low.c (linux_create_inferior): Save return value to ret.
4392
66f1260e
HZ
43932011-12-18 Hui Zhu <teawater@gmail.com>
4394
4395 * linux-low.c (linux_create_inferior): Save return value to ret.
4396
e77616d7
DE
43972011-12-16 Doug Evans <dje@google.com>
4398
e7b06c57
DE
4399 * linux-low.c (linux_create_inferior): If stdio connection,
4400 redirect stdin from /dev/null, stdout to stderr.
4401 * remote-utils.c (remote_is_stdio): New static global.
4402 (remote_connection_is_stdio): New function.
4403 (remote_prepare): Handle stdio connection.
4404 (remote_open): Ditto.
4405 (remote_close): Don't close stdin for stdio connections.
4406 (read_prim,write_prim): New functions. Replace all calls to
4407 read/write to these.
4408 * server.c (main): Watch for "-" argument. Move call to
4409 remote_prepare before start_inferior.
4410 * server.h (STDIO_CONNECTION_NAME): New macro.
4411 (remote_connection_is_stdio): Declare.
4412
e77616d7
DE
4413 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
4414 in debugging output.
4415
82067193
YQ
44162011-12-15 Yao Qi <yao@codesourcery.com>
4417
4418 * tracepoint.c: Include sys/syscall.h.
4419 (gdb_ust_thread): Remove preprocessor conditional.
4420
82bfbe7e
PA
44212011-12-14 Pedro Alves <pedro@codesourcery.com>
4422
4423 * linux-low.c (linux_detach_one_lwp): Call
4424 the_low_target.prepare_to_resume before detaching.
4425
712c6575
YQ
44262011-12-14 Yao Qi <yao@codesourcery.com>
4427
4428 * tracepoint.c (gdb_ust_thread): Don't ignore return value
4429 of write.
4430
d54d1edf
YQ
44312011-12-14 Yao Qi <yao@codesourcery.com>
4432
4433 * i386-low.c (i386_low_stopped_data_address): Initialize local
4434 variable `control'.
4435
6210a125
PA
44362011-12-13 Pedro Alves <pedro@codesourcery.com>
4437
4438 PR remote/13492
4439
4440 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
4441 DR_CONTROL unless necessary. Extend comments.
4442 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
4443 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
4444
2ece8244
YQ
44452011-12-13 Yao Qi <yao@codesourcery.com>
4446
4447 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
4448 macros.
4449 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
4450
784867a5
JK
44512011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
4452
4453 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
4454 Print new debug message for such case.
4455
6bf36717
JK
44562011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4457
4458 Fix overlapping memcpy.
4459 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
4460 the read_inferior_memory transfer.
4461 (delete_fast_tracepoint_jump): New variable buf. Use it for the
4462 write_inferior_memory transfer.
4463 (set_fast_tracepoint_jump): New variable buf. Use it for the
4464 read_inferior_memory and write_inferior_memory transfers.
4465 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
4466 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
4467 Use it for the write_inferior_memory transfer.
4468 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
4469 buffers.
4470
50275556
MR
44712011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4472
4473 * linux-low.c (fetch_register, store_register): Make code
4474 consistent, fix formatting.
4475
7325beb4
MR
44762011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4477
4478 * linux-low.c (usr_store_inferior_registers): Factor out code
4479 to handle individual registers into...
4480 (store_register): ... this new function.
4481
c642a434
UW
44822011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
4483
4484 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
4485 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
4486 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
4487 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
4488 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
4489 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
4490 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
4491 (srv_xmlfiles): Add new XML files.
4492
4493 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
4494 and <sys/uio.h>.
4495 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
4496 (init_registers_s390_linux32v1): Add prototype.
4497 (init_registers_s390_linux32v2): Likewise.
4498 (init_registers_s390_linux64v1): Likewise.
4499 (init_registers_s390_linux64v2): Likewise.
4500 (init_registers_s390x_linux64v1): Likewise.
4501 (init_registers_s390x_linux64v2): Likewise.
4502 (s390_num_regs): Increment to 52.
4503 (s390_regmap): Add orig_r2 register.
4504 (s390_num_regs_3264): Increment to 68.
4505 (s390_regmap_3264): Add orig_r2 register.
4506 (s390_collect_ptrace_register): Handle orig_r2 register.
4507 (s390_supply_ptrace_register): Likewise.
4508 (s390_fill_last_break): New function.
4509 (s390_store_last_break): Likewise.
4510 (s390_fill_system_call): New function.
4511 (s390_store_system_call): Likewise.
4512 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
4513 register sets.
4514 (s390_check_regset): New function.
4515 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
4516 NT_S390_SYSTEM_CALL regsets and use appropriate description.
4517 Update target_regsets for available register sets.
4518
2268b414
JK
45192011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
4520 Jan Kratochvil <jan.kratochvil@redhat.com>
4521
4522 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
4523 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
4524 New.
4525 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
4526 * linux-low.h (struct process_info_private): New member r_debug.
4527 * server.c (handle_qxfer_libraries): Call
4528 the_target->qxfer_libraries_svr4.
4529 (handle_qxfer_libraries_svr4): New function.
4530 (qxfer_packets): New entry "libraries-svr4".
4531 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
4532 * target.h (struct target_ops): New member qxfer_libraries_svr4.
4533 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
4534 PACKET_qXfer_libraries_svr4.
4535
d6db1fab
UW
45362011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
4537
4538 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
4539 PSW address/mask between 8-byte and 16-byte formats.
4540 (s390_supply_ptrace_register): Likewise.
4541 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
4542 basic addressing mode bit.
4543
242f5f1c
SS
45442011-11-24 Stan Shebs <stan@codesourcery.com>
4545
4546 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
4547
f196051f
SS
45482011-11-17 Stan Shebs <stan@codesourcery.com>
4549
4550 * tracepoint.c (struct tracepoint): New field traceframe_usage.
4551 (tracing_start_time): New global.
4552 (tracing_stop_time): New global.
4553 (tracing_user_name): New global.
4554 (tracing_notes): New global.
4555 (tracing_stop_note): New global.
4556 (cmd_qtstart): Set traceframe_usage, start_time.
4557 (stop_tracing): Set stop_time.
4558 (cmd_qtstatus): Report additional status.
4559 (cmd_qtp): New function.
4560 (handle_tracepoint_query): Call it.
4561 (cmd_qtnotes): New function.
4562 (handle_tracepoint_general_set): Call it.
4563 (get_timestamp): Rename from tsv_get_timestamp.
4564
405f8e94
SS
45652011-11-14 Stan Shebs <stan@codesourcery.com>
4566 Kwok Cheung Yeung <kcy@codesourcery.com>
4567
4568 * linux-x86-low.c (small_jump_insn): New.
4569 (i386_install_fast_tracepoint_jump_pad): Add arguments for
4570 trampoline and error message, build a trampoline and issue a small
4571 jump instruction to it.
4572 (x86_install_fast_tracepoint_jump_pad): Add arguments for
4573 trampoline and error message.
4574 (x86_get_min_fast_tracepoint_insn_len): New.
4575 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
4576 * linux-low.h (struct linux_target_ops): Add arguments to
4577 install_fast_tracepoint_jump_pad operation, add new operation.
4578 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
4579 arguments.
4580 (linux_get_min_fast_tracepoint_insn_len): New function.
4581 (linux_target_op): Add new operation.
4582 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
4583 (gdb_trampoline_buffer_end): Ditto.
4584 (gdb_trampoline_buffer_error): Ditto.
4585 (struct ipa_sym_addresses): Add fields for new IPA variables.
4586 (symbol_list): Add entries for new IPA variables.
4587 (struct tracepoint): Add fields to hold the address range of the
4588 trampoline used by the tracepoint.
4589 (trampoline_buffer_head): New static variable.
4590 (trampoline_buffer_tail): Ditto.
4591 (claim_trampoline_space): New function.
4592 (have_fast_tracepoint_trampoline_buffer): New function.
4593 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
4594 structure.
4595 (install_fast_tracepoint): Ditto, also add error buffer argument.
4596 (cmd_qtminftpilen): New function.
4597 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
4598 (fast_tracepoint_from_trampoline_address): New function.
4599 (fast_tracepoint_collecting): Handle trampoline as part of jump
4600 pad space.
4601 (set_trampoline_buffer_space): New function.
4602 (initialize_tracepoint): Initialize new IPA variables.
4603 * target.h (struct target_ops): Add arguments to
4604 install_fast_tracepoint_jump_pad operation, add new
4605 get_min_fast_tracepoint_insn_len operation.
4606 (target_get_min_fast_tracepoint_insn_len): New.
4607 (install_fast_tracepoint_jump_pad): Add arguments.
4608 * server.h (IPA_BUFSIZ): Define.
4609 * linux-i386-ipa.c: Include extra header files.
4610 (initialize_fast_tracepoint_trampoline_buffer): New function.
4611 (initialize_low_tracepoint): Call it.
4612 * server.h (set_trampoline_buffer_space): Declare.
4613 (claim_trampoline_space): Ditto.
4614 (have_fast_tracepoint_trampoline_buffer): Ditto.
4615
1e4d1764
YQ
46162011-11-14 Yao Qi <yao@codesourcery.com>
4617
4618 * server.c (handle_query): Handle InstallInTrace for qSupported.
4619 * tracepoint.c (add_tracepoint): Sort list.
4620 (install_tracepoint, download_tracepoint): New.
4621 (cmd_qtdp): Call them to install and download tracepoints.
4622 (sort_tracepoints): Removed.
4623 (cmd_qtstart): Update.
4624
5c73ff4e
YQ
46252011-11-14 Yao Qi <yao@codesourcery.com>
4626
4627 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
4628 * mem-break.h: Declare.
4629 * tracepoint.c (cmd_qtstart): Move some code to ...
4630 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
4631 New.
4632 (download_tracepoints): Move some code to ...
4633 (download_tracepoint_1): ... here. New.
4634
86a30030
YQ
46352011-11-08 Yao Qi <yao@codesourcery.com>
4636
4637 * remote-utils.c (relocate_instruction): A comment fix.
4638
8d26e50c
JB
46392011-11-07 Joel Brobecker <brobecker@adacore.com>
4640
4641 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
4642 (i386_dr_low_get_control, i386_dr_low_get_status): Use
4643 dr_status_mirror and dr_control_mirror from debug_reg_state.
4644 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
4645 (i386_initial_stuff): Remove use of deleted globals.
4646 (i386_get_thread_context, i386_set_thread_context,
4647 i386_thread_added): Use dr_status_mirror and dr_control_mirror
4648 from debug_reg_state.
4649
a59306a3
YQ
46502011-11-05 Yao Qi <yao@codesourcery.com>
4651
4652 * tracepoint.c (gdb_collect): Loop over tracepoints of same
4653 address as TPOINT's.
4654
3065dfb6
SS
46552011-11-02 Stan Shebs <stan@codesourcery.com>
4656
4657 * tracepoint.c (agent_mem_read_string): New function.
4658 (eval_agent_expr): Call it for tracenz.
4659 * server.c (handle_query): Report support for tracenz.
4660
fd0d8c7c
YQ
46612011-11-02 Yao Qi <yao@codesourcery.com>
4662
4663 * tracepoint.c (cmd_qtstart): Remove unused local variables.
4664
609086b1
YQ
46652011-11-02 Yao Qi <yao@codesourcery.com>
4666
4667 * target.h: Fix a typo in comment.
4668
b9fd1791
PA
46692011-10-31 Pedro Alves <pedro@codesourcery.com>
4670
4671 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
4672 clobber the breakpoints' shadows with fast tracepoint jumps.
4673 * mem-break.h (check_mem_write): Add `myaddr' parameter.
4674 * target.c (write_inferior_memory): Also pass MYADDR down to
4675 check_mem_write.
4676
03583c20
UW
46772011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
4678
4679 * configure.ac: Check support for personality routine.
4680 * configure: Regenerate.
4681 * config.in: Likewise.
4682 * linux-low.c: Include <sys/personality.h>.
4683 Define ADDR_NO_RANDOMIZE if necessary.
4684 (linux_create_inferior): Disable address space randomization when
4685 forking inferior, if requested.
4686 (linux_supports_disable_randomization): New function.
4687 (linux_target_ops): Install it.
4688 * server.h (disable_randomization): Declare.
4689 * server.c (disable_randomization): New global variable.
4690 (handle_general_set): Handle QDisableRandomization.
4691 (handle_query): Likewise for qSupported.
4692 (main): Support --disable-randomization and --no-disable-randomization
4693 command line arguments.
4694 * target.h (struct target_ops): Add supports_disable_randomization.
4695 (target_supports_disable_randomization): New macro.
4696
723b724b
MF
46972011-09-29 Mike Frysinger <vapier@gentoo.org>
4698
4699 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
4700 ifdef check.
4701 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
4702 [!PT_GETDSBT] (target_loadmap): New definition.
4703 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
4704 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
4705 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
4706 and PT_GETDSBT to LINUX_LOADMAP.
4707 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
4708 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
4709
55329a5c 47102011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
4711
4712 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
4713 (arm_linux_hwbp_cap): New static variable.
4714 (arm_linux_get_hwbp_cap): Replace by ...
4715 (arm_linux_init_hwbp_cap): ... this new function.
4716 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
4717 (arm_linux_get_hw_watchpoint_count): Likewise.
4718 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4719 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
4720 (arm_prepare_to_resume): Use perror_with_name instead of error.
4721
55329a5c 47222011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
4723
4724 * linux-arm-low.c: Include <signal.h>.
4725 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
4726 (struct arm_linux_hwbp_cap): New data type.
4727 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
4728 (struct arm_linux_hw_breakpoint): New data type.
4729 (MAX_BPTS, MAX_WPTS): Define.
4730 (struct arch_process_info, struct arch_lwp_info): New data types.
4731 (arm_linux_get_hwbp_cap): New function.
4732 (arm_linux_get_hw_breakpoint_count): Likewise.
4733 (arm_linux_get_hw_watchpoint_count): Likewise.
4734 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4735 (arm_hwbp_control_initialize): Likewise.
4736 (arm_hwbp_control_is_enabled): Likewise.
4737 (arm_hwbp_control_is_initialized): Likewise.
4738 (arm_hwbp_control_disable): Likewise.
4739 (arm_linux_hw_breakpoint_equal): Likewise.
4740 (arm_linux_hw_point_initialize): Likewise.
4741 (struct update_registers_data): New data structure.
4742 (update_registers_callback: New function.
4743 (arm_insert_point): Likewise.
4744 (arm_remove_point): Likewise.
4745 (arm_stopped_by_watchpoint): Likewise.
4746 (arm_stopped_data_address): Likewise.
4747 (arm_new_process): Likewise.
4748 (arm_new_thread): Likewise.
4749 (arm_prepare_to_resume): Likewise.
4750 (the_low_target): Register arm_insert_point, arm_remove_point,
4751 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
4752 arm_new_thread, and arm_prepare_to_resume.
4753
6b9801d4
SS
47542011-09-15 Stan Shebs <stan@codesourcery.com>
4755
4756 * server.h (struct emit_ops): Add compare-goto fields.
4757 * tracepoint.c (gdb_agent_op_sizes): New table.
4758 (emit_eq_goto): New function.
4759 (emit_ne_goto): New function.
4760 (emit_lt_goto): New function.
4761 (emit_le_goto): New function.
4762 (emit_gt_goto): New function.
4763 (emit_ge_goto): New function.
4764 (is_goto_target): New function.
4765 (compile_bytecodes): Recognize special cases of compare-goto
4766 combinations and call specialized emitters for them.
4767 * linux-x86-low.c (amd64_emit_eq_goto): New function.
4768 (amd64_emit_ne_goto): New function.
4769 (amd64_emit_lt_goto): New function.
4770 (amd64_emit_le_goto): New function.
4771 (amd64_emit_gt_goto): New function.
4772 (amd64_emit_ge_goto): New function.
4773 (amd64_emit_ops): Add the new functions.
4774 (i386_emit_eq_goto): New function.
4775 (i386_emit_ne_goto): New function.
4776 (i386_emit_lt_goto): New function.
4777 (i386_emit_le_goto): New function.
4778 (i386_emit_gt_goto): New function.
4779 (i386_emit_ge_goto): New function.
4780 (i386_emit_ops): Add the new functions.
4781
bf15cbda
SS
47822011-09-08 Stan Shebs <stan@codesourcery.com>
4783
4784 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
4785 (i386_emit_epilogue): Restore %ebx.
4786
943ca1dd
JZ
47872011-08-31 Jie Zhang <jzhang918@gmail.com>
4788
4789 * server.c (step_thread): Remove definition.
4790 (process_serial_event): Don't handle Hs.
4791 * server.h (step_thread): Remove declaration.
4792 * target.c (set_desired_inferior): Remove use of step_thread.
4793
e3deef73
LM
47942011-08-24 Luis Machado <lgustavo@codesourcery.com>
4795
4796 * linux-low.c: Include linux-procfs.h.
4797 (linux_attach_lwp_1): Update comments.
4798 (linux_attach): Scan for existing threads when attaching to a
4799 process that is the tgid.
4800 * Makefile.in: Update dependencies.
4801
13da1c97
LM
48022011-08-24 Luis Machado <lgustavo@codesourcery.com>
4803
4804 * configure.srv: Add linux-procfs.o dependencies.
4805
881127c9
YQ
48062011-08-14 Yao Qi <yao@codesourcery.com>
4807
4808 * target.h (struct target_ops): Fix indent.
4809 * win32-low.c (win32_target_ops): Fix comment.
4810
58dbd541
YQ
48112011-08-14 Andrew Jenner <andrew@codesourcery.com>
4812 Yao Qi <yao@codesourcery.com>
4813
4814 * Makefile.in (clean): Remove tic6x-*.c files.
4815 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
4816 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
4817 (tic6x-c64xp-linux.c): Likewise.
4818 * configure.srv: Add support for tic6x-*-uclinux.
4819 * linux-tic6x-low.c: New.
4820 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
4821
78d85199
YQ
48222011-08-14 Andrew Stubbs <ams@codesourcery.com>
4823 Yao Qi <yao@codesourcery.com>
4824
4825 * target.h (struct target_ops): Add read_loadmap.
4826 * linux-low.c (struct target_loadseg): New type.
4827 (struct target_loadmap): New type.
4828 (linux_read_loadmap): New function.
4829 (linux_target_ops): Add linux_read_loadmap.
4830 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
4831 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
4832 to NULL.
78d85199 4833
a959a88d
EZ
48342011-08-05 Eli Zaretskii <eliz@gnu.org>
4835
4836 * win32-low.c: Include <stdint.h>.
4837
1ced966e
PA
48382011-07-22 Pedro Alves <pedro@codesourcery.com>
4839
4840 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
4841 to the inferior here.
4842 (i386_remove_aligned_watchpoint): Ditto.
4843 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
4844 fit part of the watchpoint in the debug registers.
4845 (i386_update_inferior_debug_regs): New.
4846 (i386_low_insert_watchpoint): Work on a local mirror of the debug
4847 registers, and only update the inferior on success.
4848 (i386_low_remove_watchpoint): Ditto.
4849
d26e3629
KY
48502011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
4851
4852 * linux-low.c (compare_ints, unique, list_threads, show_process,
4853 linux_core_of_thread): Delete.
4854 (linux_target_ops): Change linux_core_of_thread to
4855 linux_common_core_of_thread.
4856 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
4857 * utils.c (malloc_failure): Change type of argument.
4858 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
4859 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
4860 common/linux-osdata.c, common/ptid.c and common/buffer.c.
4861 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
4862 (IPA_OBJS): Add common-utils-ipa.o.
4863 (ptid_h, linux_osdata_h): New macros.
4864 (server_h): Add common/common-utils.h, common/xml-utils.h,
4865 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
4866 common/ptid.h.
4867 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
4868 ptid.o, buffer.o): New rules.
4869 (linux-low.o): Add common/linux-osdata.h as a dependency.
4870 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
4871 * configure.ac: Add AC_HEADER_DIRENT check.
4872 * config.in: Regenerate.
4873 * configure: Regenerate.
4874 * remote-utils.c (xml_escape_text): Delete.
4875 (buffer_grow, buffer_free, buffer_init, buffer_finish,
4876 buffer_xml_printf): Move to common/buffer.c.
4877 * server.c (main): Remove call to initialize_inferiors.
4878 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
4879 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
4880 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
4881 internal_error, gdb_assert, gdb_assert_fail): Delete.
4882 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
4883 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
4884 common/buffer.h.
4885 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
4886 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
4887 initialize_inferiors): Delete.
4888
2275a1a7
PA
48892011-07-20 Pedro Alves <pedro@codesourcery.com>
4890
4891 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
4892 symbol error.
4893
0a5b1e09
PA
48942011-05-31 Pedro Alves <pedro@codesourcery.com>
4895
4896 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
4897 assertion.
4898 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
4899
6938fd34
YQ
49002011-05-26 Yao Qi <yao@codesourcery.com>
4901
4902 * Makefile.in (thread-db.o): Track dependence to
4903 common/gdb_thread_db.h.
4904 * thread-db.c: include gdb_thread_db.h from right place.
4905
b481f9e0
TT
49062011-05-16 Adrian Cornish <gnu@bluedreamer.com>
4907
4908 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
4909 __FILE__ and __LINE__ to internal_error.
4910
98a5dd13
DE
49112011-05-13 Doug Evans <dje@google.com>
4912
4913 * thread-db.c (try_thread_db_load_from_sdir): New function.
4914 (try_thread_db_load_from_dir): New function.
4915 (thread_db_load_search): Handle $sdir, ignore $pdir.
4916 Remove trying of system directories if search of
4917 libthread-db-search-path fails, that is now done via $sdir.
4918
d248b706
KY
49192011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
4920
4921 * server.c (handle_query): Add EnableDisableTracepoints to the list
4922 of supported features.
43aaf8b6 4923 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 4924 tracepoints.
43aaf8b6
PA
4925 (cmd_qtenable_disable): New.
4926 (cmd_qtstart): Install tracepoints even if disabled.
4927 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
4928 receiving a QTEnable or QTDisable packet.
4929 (gdb_collect): Skip data collection if fast tracepoint is disabled.
4930 (ust_marker_to_static_tracepoint): Do not ignore disabled static
4931 tracepoints.
4932 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 4933
84e578fb
DE
49342011-05-10 Doug Evans <dje@google.com>
4935
4936 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
4937
71f55dd8
DE
49382011-05-04 Doug Evans <dje@google.com>
4939
4940 * linux-low.c (linux_join): Skip process lookup.
4941 * spu-low.c (spu_join): Ditto.
4942 * server.c (join_inferiors_callback): Delete.
4943 (process_serial_event): For 'D' packet (detach) call join_inferior
4944 directly.
4945
4d393d60
JM
49462011-05-04 Joseph Myers <joseph@codesourcery.com>
4947
4948 * README: Don't mention xscale*-*-linux*.
4949 * configure.srv (xscale*-*-linux*): Don't handle target.
4950
b00ad6ff
NF
49512011-04-27 Nathan Froyd <froydnj@codesourcery.com>
4952
4953 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
4954 casting pointers.
4955 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
4956 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
4957 (i386_emit_void_call_2): Likewise.
4958
af96c192
YQ
49592011-04-26 Yao Qi <yao@codesourcery.com>
4960
43aaf8b6
PA
4961 * linux-low.c: Move common macros to linux-ptrace.h.
4962 Include linux-ptrace.h.
af96c192
YQ
4963 * Makefile.in (linux_ptrace_h): New.
4964 (linux-low.o): Depends on linux-ptrace.h.
4965
03f2bd59
JK
49662011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
4967
4968 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
4969 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
4970 (remote_prepare): New function with most of the TCP code from ...
4971 (remote_open): ... here. Detect PORT here unconditionally. Move also
4972 setting transport_is_reliable.
4973 * server.c (run_once): New variable.
4974 (gdbserver_usage): Document it.
4975 (main): Set run_once for `--once'. Call remote_prepare. Exit after
4976 the first run if RUN_ONCE.
4977 * server.h (run_once, remote_prepare): New declarations.
4978
7a9dd1b2
TT
49792011-04-19 Tom Tromey <tromey@redhat.com>
4980
4981 * win32-low.c (handle_load_dll): Remove duplicate "the".
4982
81239425
PM
49832011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
4984
4985 Remove support for old Cygwin 1.5 versions.
4986 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
4987 function to avoid warning.
4988 (win32_add_one_solib): Use cygwin_conv_path function to avoid
4989 warning.
4990
9e0627f1
PM
49912011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
4992
4993 * gdbserver/server.h (Macro _): Define it if not available.
4994
588eebee
MS
49952011-03-14 Michael Snyder <msnyder@vmware.com>
4996
348af9f7 4997 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 4998
43f70d4c
JB
49992011-03-10 Joel Brobecker <brobecker@adacore.com>
5000
5001 * Makefile.in (maintainer-clean realclean distclean): Remove
5002 "make ... subdir_do" command.
5003
348af9f7
MS
50042011-03-10 Michael Snyder <msnyder@vmware.com>
5005
5006 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
5007
5008 * server.c (handle_v_run): Free alloced buffer on early return.
5009
e637a4f5
YQ
50102011-03-09 Yao Qi <yao@codesourcery.com>
5011
5012 Revert:
5013 2011-03-04 Yao Qi <yao@codesourcery.com>
5014
5015 * Makefile.in: Remove GNU make feature --directory.
5016
5017 2011-03-05 Yao Qi <yao@codesourcery.com>
5018
5019 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5020 (subdir_do): New make target. Copied from gdb/Makefile.
5021 (maintainer-clean, realclean, distclean, clean): Call corresponding
5022 make targets in common/Makefile.
5023
5024 2011-02-11 Yao Qi <yao@codesourcery.com>
5025
5026 * configure.ac: Call AC_PROG_RANLIB.
5027 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5028 * configure: Regenerate.
5029
e6edda56
JK
50302011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5031
5032 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
5033
e5141119
JB
50342011-03-06 Yao Qi <yao@codesourcery.com>
5035
5036 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
5037
64794aa4
JB
50382011-03-05 Yao Qi <yao@codesourcery.com>
5039
5040 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5041 (subdir_do): New make target. Copied from gdb/Makefile.
5042 (maintainer-clean, realclean, distclean, clean): Call corresponding
5043 make targets in common/Makefile.
5044
7a762829
YQ
50452011-03-04 Yao Qi <yao@codesourcery.com>
5046
5047 * Makefile.in: Remove GNU make feature --directory.
5048
348af9f7
MS
50492011-03-04 Michael Snyder <msnyder@vmware.com>
5050
5051 * server.c (queue_stop_reply): Call xmalloc not malloc.
5052
50532011-03-02 Michael Snyder <msnyder@vmware.com>
5054
5055 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5056
9f72fee2
MS
50572011-02-28 Michael Snyder <msnyder@vmware.com>
5058
588eebee
MS
5059 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5060 (cmd_qtframe): Ditto.
5061 (cmd_qtbuffer): Ditto.
5062 (cmd_bigqtbuffer): Ditto.
5063
9f72fee2
MS
5064 * utils.c (decimal2str): Initialize 'width' to nine, then
5065 don't mess with it.
5066
8040bd49
UW
50672011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5068
5069 * hostio.c (require_data): Free *data, not data.
5070
7e52cbd0
JK
50712011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5072
5073 * hostio.c (require_data): Use free, not xfree.
5074
9130f83e
MS
50752011-02-27 Michael Snyder <msnyder@vmware.com>
5076
4b812f4e
MS
5077 * server.c (handle_query): Discard unused value.
5078
9130f83e
MS
5079 * hostio.c (require_data): Free malloc memory before returning
5080 error.
5081
69d37113
MS
50822011-02-26 Michael Snyder <msnyder@vmware.com>
5083
5084 * linux-low.c (list_threads): Call closedir for dirent.
5085
35f5825a
MS
50862011-02-27 Michael Snyder <msnyder@vmware.com>
5087
2a589cef
MS
5088 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5089 a case statement falls through.
5090
0adea5f7
MS
5091 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5092
35f5825a
MS
5093 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
5094 in comparison.
5095
238f1c74
MS
50962011-02-26 Michael Snyder <msnyder@vmware.com>
5097
5098 * utils.c (decimal2str): Eliminate dead code and dead param.
5099 (pulongest): Drop dead param from call to decimal2str.
5100 (plongest): Ditto.
5101
633ff500
JB
51022011-02-24 Joel Brobecker <brobecker@adacore.com>
5103
5104 Revert the following patch (not approved yet):
5105 2011-02-21 Hui Zhu <teawater@gmail.com>
5106 * tracepoint.c (tp_printf): New function.
5107 (eval_agent_expr): Handle gdb_agent_op_printf.
5108
f9c6ff72
HZ
51092011-02-21 Hui Zhu <teawater@gmail.com>
5110
5111 * tracepoint.c (tp_printf): New function.
5112 (eval_agent_expr): Handle gdb_agent_op_printf.
5113
94d5e490
TT
51142011-02-18 Tom Tromey <tromey@redhat.com>
5115
5116 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5117 (tracepoint.o): Likewise.
5118 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5119 (gdb_agent_op_names): Likewise.
5120
c7f96d2b
TT
51212011-02-18 Tom Tromey <tromey@redhat.com>
5122
5123 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5124 gdb_agent_op_rot>: New constants.
5125 (gdb_agent_op_names): Add pick and roll.
5126 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5127 cases.
5128
0feedb2c
JK
51292011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5130
5131 * aclocal.m4: Regenerated with aclocal-1.11.1.
5132
b3b9301e
PA
51332011-02-14 Pedro Alves <pedro@codesourcery.com>
5134
5135 * server.c (handle_qxfer_traceframe_info): New.
5136 (qxfer_packets): Register "traceframe-info".
5137 (handle_query): Report support for qXfer:traceframe-info:read+.
5138 * tracepoint.c (match_blocktype): New.
5139 (traceframe_find_block_type): Rename to ...
5140 (traceframe_walk_blocks): ... this. Add callback filter argument,
5141 and use it.
5142 (traceframe_find_block_type): New, reimplemented on top of
5143 traceframe_walk_blocks.
5144 (build_traceframe_info_xml): New.
5145 (traceframe_read_info): New.
5146 * server.h (traceframe_read_info): Declare.
5147
4f3e6fb7
YQ
51482011-02-11 Yao Qi <yao@codesourcery.com>
5149
5150 * configure.ac: Call AC_PROG_RANLIB.
5151 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5152 * configure: Regenerate.
5153
764880b7
PA
51542011-02-07 Pedro Alves <pedro@codesourcery.com>
5155
5156 * server.c (gdb_read_memory): Change return semantics to allow
5157 partial transfers.
5158 (handle_search_memory_1): Adjust.
5159 (process_serial_event) <'m' packet>: Handle partial transfers.
5160 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5161
1c79eb8a
PA
51622011-01-28 Pedro Alves <pedro@codesourcery.com>
5163
5164 * regcache.c (init_register_cache): Initialize
5165 regcache->register_status.
5166 (free_register_cache): Release regcache->register_status.
5167 (regcache_cpy): Copy register_status.
5168 (registers_to_string): Print 'x's for unavailable registers.
5169 (supply_register): Mark the register's status valid or
5170 unavailable, depending on whether a buffer was passed in or not.
5171 (supply_register_zeroed): New.
5172 (supply_regblock): Mark the registers' status valid or
5173 unavailable, depending on whether a buffer was passed in or not.
5174 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5175 (struct regcache): New `register_status' field.
5176 (supply_register_zeroed): Declare.
5177 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5178 supply_register_zeroed, rather than passing a NULL buffer to
5179 supply_register.
5180 * tracepoint.c (fetch_traceframe_registers): Update comment.
5181
85724a0e
PA
51822011-01-28 Pedro Alves <pedro@codesourcery.com>
5183
5184 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
5185 buffer explicit.
5186
d08aafef
PA
51872011-01-25 Pedro Alves <pedro@codesourcery.com>
5188
5189 * server.h (decode_xfer_write): Change prototype.
5190 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
5191 and don't extract the annex here.
5192 * server.c (decode_xfer_read): Remove `annex' parameter,
5193 and don't extract the annex here.
5194 (decode_xfer): New.
5195 (struct qxfer): New.
5196 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
5197 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
5198 (handle_qxfer_statictrace): New functions, abstracted out from
5199 handle_query, and made to use the struct qxfer interface.
5200 (handle_threads_qxfer_proper): Rename to ...
5201 (handle_qxfer_threads_proper): ... this.
5202 (handle_threads_qxfer): Rename to ...
5203 (handle_qxfer_threads): ... this. Adjust.
5204 (qxfer_packets): New array.
5205 (handle_qxfer): New function.
5206 (handle_query): Use handle_qxfer.
5207
493e2a69
MS
52082011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
5209
5210 * gdbreplay.c: Shorten lines of >= 80 columns.
5211 * linux-low.c: Ditto.
5212 * linux-ppc-low.c: Ditto.
5213 * linux-s390-low.c: Ditto.
5214 * linux-sparc-low.c: Ditto.
5215 * linux-x86-low.c: Ditto.
5216 * linux-xtensa-low.c: Ditto.
5217 * mem-break.c: Ditto.
5218 * nto-low.c: Ditto.
5219 * regcache.h: Ditto.
5220 * remote-utils.c: Ditto.
5221 * server.c: Ditto.
5222 * server.h: Ditto.
5223 * thread-db.c: Ditto.
5224 * tracepoint.c: Ditto.
5225 * utils.c: Ditto.
5226 * win32-low.h: Ditto.
5227
44944448
JB
52282011-01-05 Joel Brobecker <brobecker@adacore.com>
5229
5230 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
5231 update.
5232
71ce852c
JB
52332011-01-01 Joel Brobecker <brobecker@adacore.com>
5234
5235 * server.c (gdbserver_version): Update copyright year in version
5236 output.
5237 * gdbreplay.c (gdbreplay_version): Ditto.
5238
eb826dc6
MF
52392010-12-29 Jie Zhang <jie.zhang@analog.com>
5240
5241 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
5242 * linux-bfin-low.c: New file.
5243 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
5244 PT_DATA_ADDR for BFIN targets.
5245 * Makefile.in (SFILES): Add linux-bfin-low.c.
5246 (clean): Remove reg-bfin.c.
5247 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
5248 * README: Mention supported Blackfin targets.
5249
39ab222a
MF
52502010-12-23 Mike Frysinger <vapier@gentoo.org>
5251
5252 * .gitignore: New file.
5253
a1f2ce7d
MF
52542010-11-16 Mike Frysinger <vapier@gentoo.org>
5255
5256 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
5257
f474844c
JZ
52582010-10-22 Jie Zhang <jie@codesourcery.com>
5259
5260 * Makefile.in: Add FLAGS_TO_PASS variable.
5261 (install): Remove dependency of install-only and recursively
5262 invoke make for install-only.
5263
f1048712
DE
52642010-10-04 Doug Evans <dje@google.com>
5265
5266 * Makefile.in (uninstall): Use $(DESTDIR).
5267
b53a1623
PA
52682010-09-24 Pedro Alves <pedro@codesourcery.com>
5269
e6ee044d
PA
5270 PR gdb/11842
5271
b53a1623
PA
5272 * linux-x86-low.c (compat_siginfo_from_siginfo)
5273 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
5274 si_code is < 0. Check for si_code == SI_TIMER before checking for
5275 si_code < 0.
5276
fa1bd1e4
JB
52772010-09-13 Joel Brobecker <brobecker@adacore.com>
5278
5279 * lynx-i386-low.c: New file.
5280 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
5281
47fac8f8
JB
52822010-09-13 Joel Brobecker <brobecker@adacore.com>
5283
5284 * lynx-low.c (ptrace_request_to_str): Remove handling for
5285 request values that have been removed in LynxOS 5.x.
5286
1adfc54d
JB
52872010-09-13 Joel Brobecker <brobecker@adacore.com>
5288
5289 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
5290 <ptrace.h>
5291
c2a66c29
NS
52922010-09-09 Nathan Sidwell <nathan@codesourcery.com>
5293
5294 * configure.ac: Add --enable-inprocess-agent option.
5295 * configure: Rebuilt.
5296
32fcada3
YQ
52972010-09-06 Yao Qi <yao@codesourcery.com>
5298
5299 * linux-low.c (linux_kill): Remove unused variable.
5300 (linux_stabilize_threads): Likewise.
5301 * server.c (start_inferior): Likewise.
5302 (queue_stop_reply_callback): Likewise.
5303 * tracepoint.c (do_action_at_tracepoint): Likewise.
5304
0cccb683
YQ
53052010-09-06 Yao Qi <yao@codesourcery.com>
5306
5307 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
5308 on return.
5309
423ec54c
JK
53102010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5311
5312 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
5313
12ac6819
PA
53142010-09-06 Pedro Alves <pedro@codesourcery.com>
5315
5316 * Makefile.in (install-only): Replace $IPA_DEPFILES with
5317 "$(IPA_DEPFILES)".
5318
8ed54b31
JB
53192010-09-01 Joel Brobecker <brobecker@adacore.com>
5320
5321 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
5322 gdbserver/lynx-ppc-low.c: New files.
5323 * Makefile.in (lynx_low_h): New variable.
5324 (lynx-low.o, lynx-ppc-low.o): New rules.
5325 * configure.ac: On LynxOS, link with -lnetinet.
5326 * configure.srv: Add handling of powerpc-*-lynxos* targets.
5327 * configure: regenerate.
5328
bb0116a4
JB
53292010-09-01 Joel Brobecker <brobecker@adacore.com>
5330
5331 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
5332 * configure.ac: Add check for vasprintf and vsnprintf.
5333 * configure, config.in: Regenerate.
5334 * server.h (vasprintf, vsnprintf): Add conditional declarations.
5335
a778ab81 53362010-09-01 Joel Brobecker <brobecker@adacore.com>
5337
5338 * gdbreplay.c: Move include of alloca.h up, next to include of
5339 malloc.h.
5340 * server.h: Add include of malloc.h.
5341 * mem-break.c: Remove include of malloc.h.
5342 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
5343
8b034a19 53442010-09-01 Joel Brobecker <brobecker@adacore.com>
5345
5346 * Makefile.in (memmem.o): Build with -Wno-error.
5347
53482010-09-01 Joel Brobecker <brobecker@adacore.com>
5349
5350 * utils.c (xsnprintf): Make non-static.
5351 * server.h: Add xsnprintf declaration.
5352 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
5353 replace calls to snprintf by calls to xsnprintf throughout.
5354
53552010-09-01 Joel Brobecker <brobecker@adacore.com>
5356
5357 * configure.ac: Add configure check for alloca.
5358 * configure, config.in: Regenerate.
5359 * server.h: Include alloca.h if it exists.
5360 * gdbreplay.c: Include alloca.h if it exists.
5361
1a981360
PA
53622010-08-28 Pedro Alves <pedro@codesourcery.com>
5363
5364 * linux-low.c (__SIGRTMIN): Define if not already defined.
5365 (linux_create_inferior): Check for __ANDROID__ rather than
5366 __SIGRTMIN.
5367 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
5368 are already deferred.
5369 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
5370 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
5371 stopped and already has a pending signal to report.
5372 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
5373 a pending signal to report or is moving out of a jump pad.
5374 (linux_init_signals): Check for __ANDROID__ rather than
5375 __SIGRTMIN.
5376
b4d51a55
PA
53772010-08-28 Pedro Alves <pedro@codesourcery.com>
5378
5379 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
5380 debug_threads check. Avoid a linear search when not doing debug
5381 output.
5382
ec48365d
PA
53832010-08-27 Pedro Alves <pedro@codesourcery.com>
5384
5385 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
5386 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
5387 (struct file_handler) <fd>: Change type to gdb_fildes_t.
5388 (process_event): Change local fd's type to gdb_fildes_t.
5389 (create_file_handler): Adjust prototype.
5390 (delete_file_handler): Adjust prototype.
5391 (handle_file_event): Adjust prototype. Use pfildes.
5392 (create_file_event): Adjsut prototype.
5393 * remote-utils.c (remote_desc, listen_desc): Change type to
5394 gdb_fildes_t.
5395 * server.h: New gdb_fildes_t typedef.
5396 [USE_WIN32API]: Include winsock2.h.
5397 (delete_file_handler, add_file_handler): Adjust prototypes.
5398 (pfildes): Declare.
5399 * utils.c (pfildes): New.
5400
854d88f0
PA
54012010-08-27 Pedro Alves <pedro@codesourcery.com>
5402
5403 * configure.ac (build_warnings): Add -Wno-char-subscripts.
5404 * configure: Regenerate.
5405
0146f85b
PA
54062010-08-27 Pedro Alves <pedro@codesourcery.com>
5407
5408 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
5409 (linux_done_accessing_memory): ... this.
5410 (linux_target_ops): Adjust.
5411 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
5412 * nto-low.c (nto_target_ops): Adjust comment.
5413 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
5414 * spu-low.c (spu_target_ops): Adjust comment.
5415 * target.h (target_ops): Rename unprepare_to_access_memory field
5416 to done_accessing_memory.
5417 (unprepare_to_access_memory): Rename to ...
5418 (done_accessing_memory): ... this.
5419
90d74c30
PA
54202010-08-26 Pedro Alves <pedro@codesourcery.com>
5421
5422 * linux-low.c (linux_prepare_to_access_memory): New.
5423 (linux_unprepare_to_access_memory): New.
5424 (linux_target_ops): Install them.
5425 * server.c (read_memory): Rename to ...
5426 (gdb_read_memory): ... this. Use
5427 prepare_to_access_memory/prepare_to_access_memory.
5428 (write_memory): Rename to ...
5429 (gdb_write_memory): ... this. Use
5430 prepare_to_access_memory/prepare_to_access_memory.
5431 (handle_search_memory_1): Adjust.
5432 (process_serial_event): Adjust.
5433 * target.h (struct target_ops): New fields
5434 prepare_to_access_memory and unprepare_to_access_memory.
5435 (prepare_to_access_memory, unprepare_to_access_memory): New.
5436 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
5437 prepare_to_access_memory/prepare_to_access_memory.
5438 * nto-low.c (nto_target_ops): Adjust.
5439 * spu-low.c (spu_target_ops): Adjust.
5440 * win32-low.c (win32_target_ops): Adjust.
5441
fd467969
PA
54422010-08-26 Pedro Alves <pedro@codesourcery.com>
5443
5444 * Makefile.in (WARN_CFLAGS): Get it from configure.
5445 (WERROR_CFLAGS): New.
5446 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
5447 * configure.ac: Introduce --enable-werror, which adds -Werror to
5448 the compiler command line. Enabled by default. Disable with
5449 --disable-werror. Add -Wdeclaration-after-statement
5450 Wpointer-arith and -Wformat-nonliteral to warning flags.
5451 * configure: Regenerate.
5452
331e2f5f
PA
54532010-08-26 Pedro Alves <pedro@codesourcery.com>
5454
5455 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
5456
e581f2b4
PA
54572010-08-26 Pedro Alves <pedro@codesourcery.com>
5458
5459 * gdbreplay.c (remote_error): New.
5460 (gdbchar): New.
5461 (expect): Use gdbchar. Check for error reading from GDB.
5462 Clarify sync error output.
5463 (play): Check for errors writing to GDB.
5464 * linux-low.c (sigchld_handler): Really ignore `write' errors.
5465 * remote-utils.c (getpkt): Check for errors writing to the remote
5466 descriptor.
5467
3c11dd79
PA
54682010-08-25 Pedro Alves <pedro@codesourcery.com>
5469
5470 * linux-low.c (linux_wait_1): Move non-debugging code out of
5471 `debug_threads' control.
5472
d20a8ad9
PA
54732010-08-25 Pedro Alves <pedro@codesourcery.com>
5474
5475 * linux-low.c (linux_wait_1): Don't set last_status here.
5476 * server.c (push_event, queue_stop_reply_callback): Assert we're
5477 not pushing a TARGET_WAITKIND_IGNORE event.
5478 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
5479 (myresume, handle_target_event): Set the thread's last_resume_kind
5480 and last_status from the target returned status.
5481
964e4306
PA
54822010-08-25 Pedro Alves <pedro@codesourcery.com>
5483
5484 PR threads/10729
5485
5486 * linux-x86-low.c (update_debug_registers_callback): New.
5487 (i386_dr_low_set_addr): Use it.
5488 (i386_dr_low_get_addr): New.
5489 (i386_dr_low_set_control): Use update_debug_registers_callback.
5490 (i386_dr_low_get_control): New.
5491 (i386_dr_low_get_status): Adjust.
5492 * linux-low.c (linux_stop_lwp): New.
5493 * linux-low.h (linux_stop_lwp): Declare.
5494
5495 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
5496 argument instead of a i386_debug_reg_state.
5497 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
5498 a i386_debug_reg_state.
5499 (i386_insert_aligned_watchpoint): Adjust.
5500 (i386_remove_aligned_watchpoint): Adjust.
5501 (i386_low_stopped_data_address): Read the debug registers from the
5502 inferior instead of from the mirrors.
5503 * i386-low.h (struct i386_debug_reg_state): Extend comment.
5504 (i386_dr_low_get_addr): Declare.
5505 (i386_dr_low_get_control): Declare.
5506 (i386_dr_low_get_status): Change prototype.
5507
5508 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
5509 (i386_dr_low_get_addr): New.
5510 (i386_dr_low_get_control): New.
5511 (i386_dr_low_get_status): Adjust prototype. Return
5512 dr_status_mirror.
5513 (i386_initial_stuff): Clear dr_status_mirror and
5514 dr_control_mirror.
5515 (i386_get_thread_context): Adjust.
5516 (i386_set_thread_context): Adjust.
5517 (i386_thread_added): Adjust.
5518
5f21a75b
PA
55192010-08-24 Pedro Alves <pedro@codesourcery.com>
5520
5521 * linux-low.h (linux_thread_area): Delete declaration.
5522
3e4c1235
TS
55232010-08-11 Thomas Schwinge <thomas@codesourcery.com>
5524
5525 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
5526 after its termination.
5527
1971b033
PA
55282010-08-09 Pedro Alves <pedro@codesourcery.com>
5529
5530 * linux-low.c (gdb_wants_lwp_stopped): Delete.
5531 (gdb_wants_all_stopped): Delete.
5532 (linux_wait_1): Don't call them.
5533 * server.c (handle_v_cont): Tag all threads as want-stopped.
5534 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
5535 stopped as "client-wants-stopped".
5536
310444ac
PA
55372010-07-31 Pedro Alves <pedro@codesourcery.com>
5538
5539 * Makefile.in (signals_h): New.
5540 (server_h): Depend on it.
5541 (server.o): Don't depend on $(signals_def).
5542 (signals.o): Depend on $(signals_def).
5543
a19cae16
JK
55442010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
5545
5546 * Makefile.in (signals_def): New.
5547 (server_h): Append include/gdb/signals.h and signals_def.
5548 (server.o): Append signals_def.
5549
30d50328
JK
55502010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5551
5552 * server.c (handle_target_event): Use target_signal_to_host for
5553 resume_info.sig initialization.
5554 * target.h (struct thread_resume) <sig>: New comment.
5555
5c3216e2
OS
55562010-07-20 Ozkan Sezer <sezeroz@gmail.com>
5557
c6f46ca0
OS
5558 * server.c (handle_query): strcpy() the returned string from paddress()
5559 instead of sprintf().
5c3216e2
OS
5560 * utils.c (paddress): Return phex_nz().
5561
6bd31874
JB
55622010-07-07 Joel Brobecker <brobecker@adacore.com>
5563
5564 * server.c (handle_v_cont): Call mourn_inferior if process
5565 just exited.
5566 (myresume): Likewise.
5567
0fb4aa4b
PA
55682010-07-01 Pedro Alves <pedro@codesourcery.com>
5569
5570 Static tracepoints, and integration with UST.
5571
5572 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
5573 * mem-break.c (uninsert_all_breakpoints)
5574 (reinsert_all_breakpoints): New.
5575 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
5576 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
5577 (gdb_agent_ust_loaded, helper_thread_id)
5578 (gdb_agent_helper_thread_id): New macros.
5579 (struct ipa_sym_addresses): Add addr_ust_loaded,
5580 addr_helper_thread_id, addr_cmd_buf.
5581 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
5582 (in_process_agent_loaded_ust): New.
5583 (write_e_ust_not_loaded): New.
5584 (maybe_write_ipa_ust_not_loaded): New.
5585 (struct collect_static_trace_data_action): New.
5586 (enum tracepoint_type) <static_tracepoint>: New.
5587 (struct tracepoint) <handle>: Mention static tracepoints.
5588 (struct static_tracepoint_ctx): New.
5589 (CMD_BUF_SIZE): New.
5590 (add_tracepoint_action): Handle static tracepoint actions.
5591 (unprobe_marker_at): New.
5592 (clear_installed_tracepoints): Handle static tracepoints.
5593 (cmd_qtdp): Handle static tracepoints.
5594 (probe_marker_at): New.
5595 (cmd_qtstart): Handle static tracepoints.
5596 (response_tracepoint): Handle static tracepoints.
5597 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
5598 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
5599 (get_context_regcache): Handle static tracepoints.
5600 (do_action_at_tracepoint): Handle static tracepoint actions.
5601 (traceframe_find_block_type): Handle static trace data blocks.
5602 (traceframe_read_sdata): New.
5603 (download_tracepoints): Download static tracepoint actions.
5604 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
5605 (GDB_PROBE_NAME): New.
5606 (ust_ops): New.
5607 (GET_UST_SYM): New.
5608 (USTF): New.
5609 (dlsym_ust): New.
5610 (ust_marker_to_static_tracepoint): New.
5611 (gdb_probe): New.
5612 (collect_ust_data_at_tracepoint): New.
5613 (gdb_ust_probe): New.
5614 (UNIX_PATH_MAX, SOCK_DIR): New.
5615 (gdb_ust_connect_sync_socket): New.
5616 (resume_thread, stop_thread): New.
5617 (run_inferior_command): New.
5618 (init_named_socket): New.
5619 (gdb_ust_socket_init): New.
5620 (cstr_to_hexstr): New.
5621 (next_st): New.
5622 (first_marker, next_marker): New.
5623 (response_ust_marker): New.
5624 (cmd_qtfstm, cmd_qtsstm): New.
5625 (unprobe_marker_at, probe_marker_at): New.
5626 (cmd_qtstmat, gdb_ust_thread): New.
5627 (gdb_ust_init): New.
5628 (initialize_tracepoint_ftlib): Call gdb_ust_init.
5629 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
5630 (ST_REGENTRY): New.
5631 (x86_64_st_collect_regmap): New.
5632 (X86_64_NUM_ST_COLLECT_GREGS): New.
5633 (AMD64_RIP_REGNUM): New.
5634 (supply_static_tracepoint_registers): New.
5635 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
5636 (ST_REGENTRY): New.
5637 (i386_st_collect_regmap): New.
5638 (i386_NUM_ST_COLLECT_GREGS): New.
5639 (supply_static_tracepoint_registers): New.
5640 * server.c (handle_query): Handle qXfer:statictrace:read.
5641 <qSupported>: Report support for StaticTracepoints, and
5642 qXfer:statictrace:read features.
5643 * server.h (traceframe_read_sdata)
5644 (supply_static_tracepoint_registers): Declare.
5645 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
5646 (unpack_varlen_hex): Include in IPA build.
5647 * Makefile.in (ustlibs, ustinc): New.
5648 (IPA_OBJS): Add remote-utils-ipa.o.
5649 ($(IPA_LIB)): Link -ldl and -lpthread.
5650 (UST_CFLAGS): New.
5651 (IPAGENT_CFLAGS): Add UST_CFLAGS.
5652 * config.in, configure: Regenerate.
5653
9e4344e5
PA
56542010-06-20 Ian Lance Taylor <iant@google.com>
5655 Pedro Alves <pedro@codesourcery.com>
5656
5657 * linux-x86-low.c (always_true): Delete.
5658 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
5659 trying to fool the compiler with always_true.
5660
c6beb2cb
PA
56612010-06-20 Pedro Alves <pedro@codesourcery.com>
5662
5663 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
5664 conditions in gdbserver.
5665
d2ed6730
UW
56662010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
5667
5668 * spu-low.c (spu_read_memory): Wrap around local store limit.
5669 (spu_write_memory): Likewise.
5670
4e29fb54
PA
56712010-06-15 Pedro Alves <pedro@codesourcery.com>
5672
5673 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
5674 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
5675 LONGEST uses.
5676 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
5677 uses.
5678 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
5679 uses with LONGEST uses.
5680
6a271cae
PA
56812010-06-14 Stan Shebs <stan@codesourcery.com>
5682 Pedro Alves <pedro@codesourcery.com>
5683
5684 Bytecode compiler.
5685
5686 * linux-x86-low.c: Include limits.h.
5687 (add_insns): New.
5688 (always_true): New.
5689 (EMIT_ASM): New.
5690 (EMIT_ASM32): New.
5691 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
5692 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
5693 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
5694 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
5695 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
5696 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
5697 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
5698 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
5699 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
5700 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
5701 (amd64_emit_void_call_2): New.
5702 (amd64_emit_ops): New.
5703 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
5704 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
5705 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
5706 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
5707 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
5708 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
5709 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
5710 (i386_emit_call, i386_emit_reg, i386_emit_pop)
5711 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
5712 (i386_emit_stack_adjust, i386_emit_int_call_1)
5713 (i386_emit_void_call_2): New.
5714 (i386_emit_ops): New.
5715 (x86_emit_ops): New.
5716 (the_low_target): Install x86_emit_ops.
5717 * server.h (struct emit_ops): New.
5718 (get_raw_reg_func_addr): Declare.
5719 (current_insn_ptr, emit_error): Declare.
5720 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
5721 (set_trace_state_variable_value): New defines.
5722 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
5723 addr_get_trace_state_variable_value and
5724 addr_set_trace_state_variable_value.
5725 (symbol_list): New fields for get_raw_reg,
5726 get_trace_state_variable_value and set_trace_state_variable_value.
5727 (condfn): New typedef.
5728 (struct tracepoint): New field `compiled_cond'.
5729 (do_action_at_tracepoint): Clear compiled_cond.
5730 (get_trace_state_variable_value, set_trace_state_variable_value):
5731 Export in the IPA.
5732 (condition_true_at_tracepoint): If there's a compiled condition,
5733 run that.
5734 (current_insn_ptr, emit_error): New globals.
5735 (struct bytecode_address): New.
5736 (get_raw_reg_func_addr): New.
5737 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
5738 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
5739 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
5740 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
5741 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
5742 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
5743 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
5744 (compile_tracepoint_condition, compile_bytecodes): New.
5745 * target.h (emit_ops): Forward declare.
5746 (struct target_ops): New field emit_ops.
5747 (target_emit_ops): New.
5748 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
5749 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
5750 * linux-low.c (linux_emit_ops): New.
5751 (linux_target_ops): Install it.
5752 * linux-low.h (struct linux_target_ops): New field emit_ops.
5753
92b72907
UW
57542010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
5755
5756 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
5757 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
5758
fa593d66
PA
57592010-06-01 Pedro Alves <pedro@codesourcery.com>
5760 Stan Shebs <stan@codesourcery.com>
5761
5762 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
5763 (all): Depend on $(extra_libraries).
5764 (install-only): Install the IPA.
5765 (IPA_OBJS, IPA_LIB): New.
5766 (clean): Remove the IPA lib.
5767 (IPAGENT_CFLAGS): New.
5768 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
5769 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
5770 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
5771 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
5772 * configure.ac: Check for atomic builtins support in the compiler.
5773 (IPA_DEPFILES, extra_libraries): Define.
5774 * configure.srv (ipa_obj): Add description.
5775 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
5776 (i[34567]86-*-linux*): Set ipa_obj.
5777 (x86_64-*-linux*): Set ipa_obj.
5778 * linux-low.c (stabilizing_threads): New.
5779 (supports_fast_tracepoints): New.
5780 (linux_detach): Stabilize threads before detaching.
5781 (handle_tracepoints): Handle internal tracing breakpoints. Assert
5782 the lwp is either not stabilizing, or is moving out of a jump pad.
5783 (linux_fast_tracepoint_collecting): New.
5784 (maybe_move_out_of_jump_pad): New.
5785 (enqueue_one_deferred_signal): New.
5786 (dequeue_one_deferred_signal): New.
5787 (linux_wait_for_event_1): If moving out of a jump pad, defer
5788 pending signals to later.
5789 (linux_stabilize_threads): New.
5790 (linux_wait_1): Check if threads need moving out of jump pads, and
5791 do it if so.
5792 (stuck_in_jump_pad_callback): New.
5793 (move_out_of_jump_pad_callback): New.
5794 (lwp_running): New.
5795 (linux_resume_one_lwp): Handle moving out of jump pads.
5796 (linux_set_resume_request): Dequeue deferred signals.
5797 (need_step_over_p): Also step over fast tracepoint jumps.
5798 (start_step_over): Also uninsert fast tracepoint jumps.
5799 (finish_step_over): Also reinsert fast tracepoint jumps.
5800 (linux_install_fast_tracepoint_jump): New.
5801 (linux_target_ops): Install linux_stabilize_threads and
5802 linux_install_fast_tracepoint_jump_pad.
5803 * linux-low.h (linux_target_ops) <get_thread_area,
5804 install_fast_tracepoint_jump_pad>: New fields.
5805 (struct lwp_info) <collecting_fast_tracepoint,
5806 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
5807 (linux_get_thread_area): Declare.
5808 * linux-x86-low.c (jump_insn): New.
5809 (x86_get_thread_area): New.
5810 (append_insns): New.
5811 (push_opcode): New.
5812 (amd64_install_fast_tracepoint_jump_pad): New.
5813 (i386_install_fast_tracepoint_jump_pad): New.
5814 (x86_install_fast_tracepoint_jump_pad): New.
5815 (the_low_target): Install x86_get_thread_area and
5816 x86_install_fast_tracepoint_jump_pad.
5817 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
5818 (struct fast_tracepoint_jump): New.
5819 (fast_tracepoint_jump_insn): New.
5820 (fast_tracepoint_jump_shadow): New.
5821 (find_fast_tracepoint_jump_at): New.
5822 (fast_tracepoint_jump_here): New.
5823 (delete_fast_tracepoint_jump): New.
5824 (set_fast_tracepoint_jump): New.
5825 (uninsert_fast_tracepoint_jumps_at): New.
5826 (reinsert_fast_tracepoint_jumps_at): New.
5827 (set_breakpoint_at): Use write_inferior_memory.
5828 (uninsert_raw_breakpoint): Use write_inferior_memory.
5829 (check_mem_read): Mask out fast tracepoint jumps.
5830 (check_mem_write): Mask out fast tracepoint jumps.
5831 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
5832 (set_fast_tracepoint_jump): Declare.
5833 (delete_fast_tracepoint_jump)
5834 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
5835 (reinsert_fast_tracepoint_jumps_at): Declare.
5836 * regcache.c: Don't compile many functions when building the
5837 in-process agent library.
5838 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
5839 the register buffer in the heap.
5840 (free_register_cache): If the register buffer isn't owned by the
5841 regcache, don't free it.
5842 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
5843 pre-existing register caches.
5844 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
5845 type.
5846 (convert_ascii_to_int): : Constify `from' parameter type.
5847 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
5848 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
5849 the needed buffer in-place.
5850 (relocate_instruction): New.
5851 * server.c (handle_query) <qSymbols>: If the target supports
5852 tracepoints, give it a chance of looking up symbols. Report
5853 support for fast tracepoints.
5854 (handle_status): Stabilize threads.
5855 (process_serial_event): Adjust.
5856 * server.h (struct fast_tracepoint_jump): Forward declare.
5857 (struct process_info) <fast_tracepoint_jumps>: New field.
5858 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
5859 (decode_X_packet, decode_M_packet): Adjust.
5860 (relocate_instruction): Declare.
5861 (in_process_agent_loaded): Declare.
5862 (tracepoint_look_up_symbols): Declare.
5863 (struct fast_tpoint_collect_status): Declare.
5864 (fast_tracepoint_collecting): Declare.
5865 (force_unlock_trace_buffer): Declare.
5866 (handle_tracepoint_bkpts): Declare.
5867 (initialize_low_tracepoint)
5868 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
5869 * target.h (struct target_ops) <stabilize_threads,
5870 install_fast_tracepoint_jump_pad>: New fields.
5871 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
5872 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
5873 [HAVE_STDINT_H]: Include stdint.h.
5874 (trace_debug_1): Rename to ...
5875 (trace_vdebug): ... this.
5876 (trace_debug): Rename to ...
5877 (trace_debug_1): ... this. Add `level' parameter.
5878 (trace_debug): New.
5879 (ATTR_USED, ATTR_NOINLINE): New.
5880 (IP_AGENT_EXPORT): New.
5881 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5882 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
5883 (about_to_request_buffer_space, trace_buffer_is_full)
5884 (stopping_tracepoint, expr_eval_result, error_tracepoint)
5885 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
5886 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
5887 (traceframe_write_count, traceframes_created)
5888 (trace_state_variables)
5889 New renaming defines.
5890 (struct ipa_sym_addresses): New.
5891 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
5892 (symbol_list): New.
5893 (ipa_sym_addrs): New.
5894 (all_tracepoint_symbols_looked_up): New.
5895 (in_process_agent_loaded): New.
5896 (write_e_ipa_not_loaded): New.
5897 (maybe_write_ipa_not_loaded): New.
5898 (tracepoint_look_up_symbols): New.
5899 (debug_threads) [IN_PROCESS_AGENT]: New.
5900 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
5901 (UNKNOWN_SIDE_EFFECTS): New.
5902 (stop_tracing): New.
5903 (flush_trace_buffer): New.
5904 (stop_tracing_bkpt): New.
5905 (flush_trace_buffer_bkpt): New.
5906 (read_inferior_integer): New.
5907 (read_inferior_uinteger): New.
5908 (read_inferior_data_pointer): New.
5909 (write_inferior_data_pointer): New.
5910 (write_inferior_integer): New.
5911 (write_inferior_uinteger): New.
5912 (struct collect_static_trace_data_action): Delete.
5913 (enum tracepoint_type): New.
5914 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
5915 <actions_str, step_actions, step_actions_str>: Only include in
5916 GDBserver.
fa593d66
PA
5917 <orig_size, obj_addr_on_target, adjusted_insn_addr>
5918 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
5919 (tracepoints): Use IP_AGENT_EXPORT.
5920 (last_tracepoint): Don't include in the IPA.
5921 (stopping_tracepoint): Use IP_AGENT_EXPORT.
5922 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
5923 (alloced_trace_state_variables): New.
5924 (trace_state_variables): Use IP_AGENT_EXPORT.
5925 (traceframe_t): Delete unused variable.
5926 (circular_trace_buffer): Don't include in the IPA.
5927 (trace_buffer_start): Delete.
5928 (struct trace_buffer_control): New.
5929 (trace_buffer_free): Delete.
5930 (struct ipa_trace_buffer_control): New.
5931 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
5932 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
5933 New.
5934 (trace_buffer_ctrl): New.
5935 (TRACE_BUFFER_CTRL_CURR): New.
5936 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
5937 Reimplement as macros.
5938 (trace_buffer_wrap): Delete.
5939 (traceframe_write_count, traceframe_read_count)
5940 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
5941 (struct tracepoint_hit_ctx) <type>: New field.
5942 (struct fast_tracepoint_ctx): New.
5943 (memory_barrier): New.
5944 (cmpxchg): New.
5945 (record_tracepoint_error): Update atomically in the IPA.
5946 (clear_inferior_trace_buffer): New.
5947 (about_to_request_buffer_space): New.
5948 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
5949 updating the same buffer.
5950 (add_tracepoint): Default the tracepoint's type to trap
5951 tracepoint, and orig_size to -1.
5952 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
5953 internal variables.
5954 (create_trace_state_variable): New parameter `gdb'. Handle it.
5955 (clear_installed_tracepoints): Clear fast tracepoint jumps.
5956 (cmd_qtdp): Handle fast tracepoints.
5957 (cmd_qtdv): Adjust.
5958 (max_jump_pad_size): New.
5959 (gdb_jump_pad_head): New.
5960 (get_jump_space_head): New.
5961 (claim_jump_space): New.
5962 (sort_tracepoints): New.
5963 (MAX_JUMP_SIZE): New.
5964 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
5965 IPA.
5966 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
5967 support. Upload fast traceframes, and delete internal IPA
5968 breakpoints.
5969 (stop_tracing_handler): New.
5970 (flush_trace_buffer_handler): New.
5971 (cmd_qtstop): Upload fast tracepoints.
5972 (response_tracepoint): Handle fast tracepoints.
5973 (tracepoint_finished_step): Upload fast traceframes. Set the
5974 tracepoint hit context's tracepoint type.
5975 (handle_tracepoint_bkpts): New.
5976 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
5977 type. Add comment about fast tracepoints.
5978 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
5979 non-existing action_str field.
5980 (get_context_regcache): Handle fast tracepoints.
5981 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
5982 to the regcache.
5983 (fast_tracepoint_from_jump_pad_address): New.
5984 (fast_tracepoint_from_ipa_tpoint_address): New.
5985 (collecting_t): New.
5986 (force_unlock_trace_buffer): New.
5987 (fast_tracepoint_collecting): New.
5988 (collecting): New.
5989 (gdb_collect): New.
5990 (write_inferior_data_ptr): New.
5991 (target_tp_heap): New.
5992 (target_malloc): New.
5993 (download_agent_expr): New.
5994 (UALIGN): New.
5995 (download_tracepoints): New.
5996 (download_trace_state_variables): New.
5997 (upload_fast_traceframes): New.
5998 (IPA_FIRST_TRACEFRAME): New.
5999 (IPA_NEXT_TRACEFRAME_1): New.
6000 (IPA_NEXT_TRACEFRAME): New.
6001 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
6002 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
6003 (gdb_jump_pad_buffer_end): New.
6004 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
6005 (initialize_tracepoint): Adjust.
6006 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
6007 buffer. Initialize the low module.
6008 * utils.c (PREFIX, TOOLNAME): New.
6009 (malloc_failure): Use PREFIX.
6010 (error): In the IPA, an error causes an exit.
6011 (fatal, warning): Use PREFIX.
6012 (internal_error): Use TOOLNAME.
6013 (NUMCELLS): Increase to 10.
6014 * configure, config.in: Regenerate.
6015
d149dd1d
PA
60162010-06-01 Pedro Alves <pedro@codesourcery.com>
6017
6018 * server.c (handle_query) <qSupported>: Do two passes over the
6019 qSupported string to avoid nesting strtok.
6020
f6528abd
JK
60212010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6022
6023 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
6024 (CDEPS): New.
6025 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
6026 -Wl,--dynamic-list.
6027 * configure: Regenerate.
6028 * proc-service.list: New.
6029
ca2a87a0
JK
60302010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6031
6032 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
6033 New comment.
6034
363a6e9f
OS
60352010-05-26 Ozkan Sezer <sezeroz@gmail.com>
6036
6037 * gdbreplay.c (remote_open): Check error return from socket() call by
6038 its equality to -1 not by it being negative.
6039 * remote-utils.c (remote_open): Likewise.
6040
d23b6cb1
PA
60412010-05-23 Pedro Alves <pedro@codesourcery.com>
6042
6043 * config.h: Regenerate.
6044
28d3cf85
MK
60452010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6046
6047 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
6048 doesn't provide PTRACE_GET_THREAD_AREA.
6049
fea36a59
MK
60502010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6051
6052 * linux-m68k-low.c: Include <asm/ptrace.h>
6053 (ps_get_thread_area): Implement.
6054
24b066ba
DE
60552010-05-03 Doug Evans <dje@google.com>
6056
6057 * event-loop.c (struct callback_event): New struct.
6058 (callback_list): New global.
6059 (append_callback_event, delete_callback_event): New functions.
6060 (process_callback): New function.
6061 (start_event_loop): Call it.
6062 * remote-utils.c (NOT_SCHEDULED): Define.
6063 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
6064 moved out of readchar.
6065 (readchar): Rewrite. Call reschedule before returning.
6066 (reset_readchar): New function.
6067 (remote_close): Call it.
6068 (process_remaining, reschedule): New functions.
6069 * server.h (callback_handler_func): New typedef.
6070 (append_callback_event, delete_callback_event): Declare.
6071
9836d6ea
PA
60722010-05-03 Pedro Alves <pedro@codesourcery.com>
6073
6074 * proc-service.c (ps_pglobal_lookup): Use
6075 thread_db_look_up_one_symbol.
6076 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6077 parameter. Use it instead of all_symbols_looked_up.
6078 * server.h (struct process_info) <all_symbols_looked_up>: Delete
6079 field.
6080 (all_symbols_looked_up): Don't declare.
6081 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6082 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6083 field.
6084 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6085 Set all_symbols_looked_up here.
6086 (thread_db_look_up_one_symbol): New.
6087 (thread_db_get_tls_address): Adjust.
6088 (thread_db_load_search, try_thread_db_load_1): Always allocate the
6089 thread_db object on the heap, and tentatively set it in the
6090 process structure.
6091 (thread_db_init): Don't set all_symbols_looked_up here.
6092 * linux-low.h (thread_db_look_up_one_symbol): Declare.
6093
7984d532
PA
60942010-05-03 Pedro Alves <pedro@codesourcery.com>
6095
6096 * linux-low.c (linux_kill, linux_detach): Adjust.
6097 (status_pending_p_callback): Remove redundant statement. Check
6098 for !TARGET_WAITIKIND_IGNORE, instead of
6099 TARGET_WAITKIND_STOPPED.
6100 (handle_tracepoints): Make sure LWP is locked. Adjust.
6101 (linux_wait_for_event_1): Adjust.
6102 (linux_cancel_breakpoints): New.
6103 (unsuspend_one_lwp): New.
6104 (unsuspend_all_lwps): New.
6105 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
6106 (send_sigstop_callback): Change return type to int, add new
6107 `except' parameter and handle it.
6108 (suspend_and_send_sigstop_callback): New.
6109 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6110 pass them down. If SUSPEND, also increment the lwp's suspend
6111 count.
6112 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6113 (need_step_over_p): Don't consider suspended LWPs.
6114 (start_step_over): Adjust.
6115 (proceed_one_lwp): Change return type to int, add new `except'
6116 parameter and handle it.
6117 (unsuspend_and_proceed_one_lwp): New.
6118 (proceed_all_lwps): Use find_inferior instead of
6119 for_each_inferior.
6120 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6121 also decrement the suspend count of LWPs. Pass `except' down,
6122 instead of hacking its suspend count.
6123 (linux_pause_all): Add `freeze' parameter. Adjust.
6124 (linux_unpause_all): New.
6125 (linux_target_ops): Install linux_unpause_all.
6126 * server.c (handle_status): Adjust.
6127 * target.h (struct target_ops): New fields `unpause_all' and
6128 `cancel_breakpoints'. Add new parameter to `pause_all'.
6129 (pause_all): Add new `freeze' parameter.
6130 (unpause_all): New.
6131 (cancel_breakpoints): New.
6132 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6133 cancel breakpoints.
6134 (cmd_qtstart): Pause threads.
6135 (stop_tracing): Pause threads, and cancel breakpoints.
6136 * win32-low.c (win32_target_ops): Adjust.
6137
e471f25b
PA
61382010-05-03 Pedro Alves <pedro@codesourcery.com>
6139
6140 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6141 the inferior right away from here...
6142 (linux_wait_1): ... to here, and adjust to check the thread's
6143 last_resume_kind instead of the lwp's step or stop_expected flags.
6144
1915ef4f
PA
61452010-05-02 Pedro Alves <pedro@codesourcery.com>
6146
6147 * README: Use consistent `GDB' and `GDBserver' spellings.
6148
f9e39928
PA
61492010-05-02 Pedro Alves <pedro@codesourcery.com>
6150
6151 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6152 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
6153 (linux_detach_one_lwp): Assume the lwp is stopped.
6154 (any_thread_of): Delete.
6155 (linux_detach): Stop all lwps here. Don't blindly delete all
6156 breakpoints.
6157 (delete_lwp_callback): New.
6158 (linux_mourn): Delete all lwps of the process that is gone.
6159 (linux_wait_1): Don't delete the last lwp of the process here.
6160 * mem-break.h (mark_breakpoints_out): Declare.
6161 * mem-break.c (mark_breakpoints_out): New.
6162 (free_all_breakpoints): Use it.
6163 * server.c (handle_target_event): If the process is gone, mark
6164 breakpoints out.
6165 * thread-db.c (struct thread_db) <create_bp>: New field.
6166 (thread_db_enable_reporting): Fix prototype. Store a thread event
6167 breakpoint reference in the thread_db struct.
6168 (thread_db_load_search): Clear the thread_db object.
6169 (try_thread_db_load_1): Ditto.
6170 (switch_to_process): New.
6171 (disable_thread_event_reporting): Use it.
6172 (remove_thread_event_breakpoints): New.
6173 (thread_db_detach, thread_db_mourn): Use it.
6174
1e7fc18c
PA
61752010-05-01 Pedro Alves <pedro@codesourcery.com>
6176
6177 * linux-low.c (linux_enable_event_reporting): New.
6178 (linux_wait_for_event_1, handle_extended_wait): Use it.
6179
02fc4de7
PA
61802010-04-30 Pedro Alves <pedro@codesourcery.com>
6181
6182 * linux-low.c (linux_kill_one_lwp, linux_kill)
6183 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
6184 (send_sigstop): Take an lwp_info as parameter instead. Queue a
6185 SIGSTOP even if the LWP is stopped.
6186 (send_sigstop_callback): New.
6187 (stop_all_lwps): Use send_sigstop_callback instead.
6188 (linux_resume_one_thread): Adjust.
6189 (proceed_one_lwp): Still proceed an LWP that the client has
6190 requested to stop, if we haven't reported it as stopped yet. Make
6191 sure that LWPs the client want stopped, have a pending SIGSTOP.
6192
bc3b5632
DE
61932010-04-26 Doug Evans <dje@google.com>
6194
ae1ada35
DE
6195 * server.c (handle_general_set): Make static.
6196
bc3b5632
DE
6197 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
6198 Print received char after testing for error/eof instead of before.
6199 (input_interrupt): Tweak comment.
6200
65730243
DE
62012010-04-23 Doug Evans <dje@google.com>
6202
6203 * server.c (start_inferior): Print inferior argv if --debug.
6204
a8ae7dc0
AR
62052010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
6206
6207 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
6208 * nto-x86-low.c: Include server.h
6209
1c07cc19
PM
62102010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
6211
6212 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
6213 be consistent with other sources of this directory.
6214 (init_registers_amd64): Correct name of source file of this function
6215 in the comment.
6216
e0a61e09
PM
62172010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6218
6219 * configure.srv (x86_64-*-mingw*): New configuration for Windows
6220 64-bit executables.
6221
54709339
PM
62222010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6223
6224 * win32-i386-low.c: Add 64-bit support.
6225 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
6226 (init_registers_amd64): Declare.
6227 (mappings): Add 64-bit version of array.
6228 (init_windows_x86): New function.
6229 (the_low_target): Change init_arch field to init_windows_x86.
6230
e8f0053d
PM
62312010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6232
6233 * win32-low.c: Adapt to support also 64-bit architecture.
6234 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
6235 (get_image_name): Use SIZE_T type for local variable `done'.
6236 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
6237 (toolhelp_get_dll_name): Idem.
6238 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
6239 Use uintptr_t typecast to avoid warning.
6240 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
6241 (handle_exception): Use phex_nz to avoid warning.
6242 (win32_wait): Remove unused local variable `process'.
6243
c481e77e
PM
62442010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6245
6246 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
6247 `amd64-avx.o'.
6248
12ea4b69
PM
62492010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
6250
6251 * configure.ac: Use `ws2_32' library for srv_mingw.
6252 * configure: Regenerate.
6253 * gdbreplay.c: Include winsock2.h instead of winsock.h.
6254 * remote-utils.c: Likewise.
6255
f6d1620c
L
62562010-04-17 H.J. Lu <hongjiu.lu@intel.com>
6257
6258 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
6259 if __x86_64__ is defined.
6260
8e642873
PM
62612010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6262
6263 * configure: Regenerate.
6264
711e434b
PM
62652010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6266
6267 * server.c (handle_query): Handle 'qGetTIBAddr' query.
6268 * target.h (target_ops): New get_tib_address field.
6269 * win32-low.h (win32_thread_info): Add thread_local_base field.
6270 * win32-low.c (child_add_thread): Add tlb argument.
6271 Set thread_local_base field to TLB.
6272 (get_child_debug_event): Adapt to child_add_thread change.
6273 (win32_get_tib_address): New function.
6274 (win32_target_ops): Set get_tib_address field to
6275 win32_get_tib_address.
6276 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
6277
505106cd
PA
62782010-04-12 Pedro Alves <pedro@codesourcery.com>
6279
505106cd
PA
6280 * linux-low.c (linux_mourn): Also remove the process.
6281 * server.c (handle_target_event): Don't remove the process here.
6282 * nto-low.c (nto_mourn): New.
6283 (nto_target_ops): Install it.
6284 * spu-low.c (spu_mourn): New.
6285 (spu_target_ops): Install it.
6286 * win32-low.c (win32_mourn): New.
6287 (win32_target_ops): Install it.
6288
e8470a06
PA
62892010-04-12 Pedro Alves <pedro@codesourcery.com>
6290
6291 * server.h (buffer_xml_printf): Remove redundant `;'.
6292
45ba0d02
PA
62932010-04-12 Pedro Alves <pedro@codesourcery.com>
6294
6295 * regcache.c (set_register_cache): Invalidate regcaches before
6296 changing the register cache layout.
6297 (regcache_invalidate_one): Allow a NULL regcache.
6298 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
6299 regcaches before changing the register cache layout or the target
6300 regsets.
6301
59e04013
L
63022010-04-12 H.J. Lu <hongjiu.lu@intel.com>
6303
6304 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
6305 variable warning on Linux/x86-64.
6306
8336d594
PA
63072010-04-11 Pedro Alves <pedro@codesourcery.com>
6308
6309 GDBserver disconnected tracing support.
6310
6311 * linux-low.c (linux_remove_process): Delete.
6312 (add_lwp): Don't set last_resume_kind here.
6313 (linux_kill): Use `mourn'.
6314 (linux_detach): Use `thread_db_detach', and `mourn'.
6315 (linux_mourn): New.
6316 (linux_attach_lwp_1): Adjust comment.
6317 (linux_attach): last_resume_kind moved the thread_info; adjust.
6318 (status_pending_p_callback): Adjust.
6319 (linux_wait_for_event_1): Adjust.
6320 (count_events_callback, select_singlestep_lwp_callback)
6321 (select_event_lwp_callback, cancel_breakpoints_callback)
6322 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
6323 (proceed_one_lwp): Adjust.
6324 (linux_async): Add debug output.
6325 (linux_thread_stopped): New.
6326 (linux_pause_all): New.
6327 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
6328 linux_pause_all.
6329 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
6330 (thread_db_free): Delete declaration.
6331 (thread_db_detach, thread_db_mourn): Declare.
6332 * thread-db.c (thread_db_init): Use thread_db_mourn.
6333 (thread_db_free): Delete, split in two.
6334 (disable_thread_event_reporting): New.
6335 (thread_db_detach): New.
6336 (thread_db_mourn): New.
6337
6338 * server.h (struct thread_info) <last_resume_kind>: New field.
6339 <attached>: Add comment.
6340 <gdb_detached>: New field.
6341 (handler_func): Change return type to int.
6342 (handle_serial_event, handle_target_event): Ditto.
6343 (gdb_connected): Declare.
6344 (tracing): Delete.
6345 (disconnected_tracing): Declare.
6346 (stop_tracing): Declare.
6347
6348 * server.c (handle_query) <qSupported>: Report support for
6349 disconnected tracing.
6350 (queue_stop_reply_callback): Account for running threads.
6351 (gdb_wants_thread_stopped): New.
6352 (gdb_wants_all_threads_stopped): New.
6353 (gdb_reattached_process): New.
6354 (handle_status): Clear the `gdb_detached' flag of all processes.
6355 In all-stop, stop all threads.
6356 (main): Be sure to leave tfind mode. Handle disconnected tracing.
6357 (process_serial_event): If the remote connection breaks, or if an
6358 exit was forced with "monitor exit", force an event loop exit.
6359 Handle disconnected tracing on detach.
6360 (handle_serial_event): Adjust.
6361 (handle_target_event): If GDB isn't connected, forward events back
6362 to the inferior, unless the last process exited, in which case,
6363 exit gdbserver. Adjust interface.
6364
6365 * remote-utils.c (remote_open): Don't block in accept. Instead
6366 register an event loop source on the listen socket file
6367 descriptor. Refactor bits into ...
6368 (listen_desc): ... this new global.
6369 (gdb_connected): ... this new function.
6370 (enable_async_notification): ... this new function.
6371 (handle_accept_event): ... this new function.
6372 (remote_close): Clear remote_desc.
6373
6374 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
6375
6376 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
6377 New fields.
6378 (mourn_inferior): Define.
6379 (target_process_qsupported): Avoid the dangling else problem.
6380 (thread_stopped): Define.
6381 (pause_all): Define.
6382 (target_waitstatus_to_string): Declare.
6383 * target.c (target_waitstatus_to_string): New.
6384
6385 * tracepoint.c (tracing): Make extern.
6386 (disconnected_tracing): New.
6387 (stop_tracing): Make extern. Handle tracing stops due to GDB
6388 disconnecting.
6389 (cmd_qtdisconnected): New.
6390 (cmd_qtstatus): Report disconnected tracing status in trace reply.
6391 (handle_tracepoint_general_set): Handle QTDisconnected.
6392
6393 * event-loop.c (event_handler_func): Change return type to int.
6394 (process_event): Bail out if the event handler wants the event
6395 loop to stop.
6396 (handle_file_event): Ditto.
6397 (start_event_loop): Bail out if the event handler wants the event
6398 loop to stop.
6399
6400 * nto-low.c (nto_target_ops): Adjust.
6401 * spu-low.c (spu_wait): Don't remove the process here.
6402 (spu_target_ops): Adjust.
6403 * win32-low.c (win32_wait): Don't remove the process here.
6404 (win32_target_ops): Adjust.
6405
5d267c4c
PA
64062010-04-11 Pedro Alves <pedro@codesourcery.com>
6407
6408 * regcache.c (realloc_register_cache): Invalidate inferior's
6409 regcache before recreating it.
6410
623ccd72
PA
64112010-04-09 Pedro Alves <pedro@codesourcery.com>
6412
6413 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
6414
219f2f23
PA
64152010-04-09 Stan Shebs <stan@codesourcery.com>
6416 Pedro Alves <pedro@codesourcery.com>
6417
6418 * server.h (LONGEST): New.
6419 (struct thread_info) <while_stepping>: New field.
6420 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
6421 Declare.
6422 (initialize_tracepoint, handle_tracepoint_general_set)
6423 (handle_tracepoint_query, tracepoint_finished_step)
6424 (tracepoint_was_hit, release_while_stepping_state_list):
6425 (current_traceframe): Declare.
6426 * server.c (handle_general_set): Handle tracepoint packets.
6427 (read_memory): New.
6428 (write_memory): New.
6429 (handle_search_memory_1): Use read_memory.
6430 (handle_query): Report support for conditional tracepoints, trace
6431 state variables, and tracepoint sources. Handle tracepoint
6432 queries.
6433 (main): Initialize the tracepoints module.
6434 (process_serial_event): Handle traceframe reads/writes.
6435
6436 * linux-low.c (handle_tracepoints): New.
6437 (linux_wait_1): Call it.
6438 (linux_resume_one_lwp): Handle while-stepping.
6439 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
6440 (linux_target_ops): Install them.
6441 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
6442 New field.
6443 * linux-x86-low.c (x86_supports_tracepoints): New.
6444 (the_low_target). Install it.
6445
6446 * mem-break.h (delete_breakpoint): Declare.
6447 * mem-break.c (delete_breakpoint): Make external.
6448
6449 * target.h (struct target_ops): Add `supports_tracepoints',
6450 `read_pc', and `write_pc' fields.
6451 (target_supports_tracepoints): Define.
6452 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
6453 (phex_nz): New.
6454
6455 * regcache.h (struct regcache) <registers_owned>: New field.
6456 (init_register_cache, regcache_cpy): Declare.
6457 (regcache_read_pc, regcache_write_pc): Declare.
6458 (register_cache_size): Declare.
6459 (supply_regblock): Declare.
6460 * regcache.c (init_register_cache): New.
6461 (new_register_cache): Use it.
6462 (regcache_cpy): New.
6463 (register_cache_size): New.
6464 (supply_regblock): New.
6465 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 6466
219f2f23
PA
6467 * tracepoint.c: New.
6468
6469 * Makefile.in (OBS): Add tracepoint.o.
6470 (tracepoint.o): New rule.
6471
3a13a53b
L
64722010-04-08 H.J. Lu <hongjiu.lu@intel.com>
6473
6474 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
6475 (i386-mmx.o): New.
6476 (i386-mmx.c): Likewise.
6477 (i386-mmx-linux.o): Likewise.
6478 (i386-mmx-linux.c): Likewise.
6479
6480 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
6481 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
6482 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
6483 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
6484
6485 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
6486 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
6487 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
6488
1570b33e
L
64892010-04-07 H.J. Lu <hongjiu.lu@intel.com>
6490
6491 * Makefile.in (clean): Updated.
6492 (i386-avx.o): New.
6493 (i386-avx.c): Likewise.
6494 (i386-avx-linux.o): Likewise.
6495 (i386-avx-linux.c): Likewise.
6496 (amd64-avx.o): Likewise.
6497 (amd64-avx.c): Likewise.
6498 (amd64-avx-linux.o): Likewise.
6499 (amd64-avx-linux.c): Likewise.
6500
6501 * configure.srv (srv_i386_regobj): Add i386-avx.o.
6502 (srv_i386_linux_regobj): Add i386-avx-linux.o.
6503 (srv_amd64_regobj): Add amd64-avx.o.
6504 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
6505 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
6506 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
6507 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
6508 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
6509 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
6510 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
6511
6512 * i387-fp.c: Include "i386-xstate.h".
6513 (i387_xsave): New.
6514 (i387_cache_to_xsave): Likewise.
6515 (i387_xsave_to_cache): Likewise.
6516 (x86_xcr0): Likewise.
6517
6518 * i387-fp.h (i387_cache_to_xsave): Likewise.
6519 (i387_xsave_to_cache): Likewise.
6520 (x86_xcr0): Likewise.
6521
6522 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
6523 * linux-crisv32-low.c (target_regsets): Likewise.
6524 * linux-m68k-low.c (target_regsets): Likewise.
6525 * linux-mips-low.c (target_regsets): Likewise.
6526 * linux-ppc-low.c (target_regsets): Likewise.
6527 * linux-s390-low.c (target_regsets): Likewise.
6528 * linux-sh-low.c (target_regsets): Likewise.
6529 * linux-sparc-low.c (target_regsets): Likewise.
6530 * linux-xtensa-low.c (target_regsets): Likewise.
6531
6532 * linux-low.c: Include <sys/uio.h>.
6533 (regsets_fetch_inferior_registers): Support nt_type.
6534 (regsets_store_inferior_registers): Likewise.
6535 (linux_process_qsupported): New.
6536 (linux_target_ops): Add linux_process_qsupported.
6537
6538 * linux-low.h (regset_info): Add nt_type.
6539 (linux_target_ops): Add process_qsupported.
6540
6541 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
6542 and <sys/uio.h>.
6543 (init_registers_i386_avx_linux): New.
6544 (init_registers_amd64_avx_linux): Likewise.
6545 (xmltarget_i386_linux_no_xml): Likewise.
6546 (xmltarget_amd64_linux_no_xml): Likewise.
6547 (PTRACE_GETREGSET): Likewise.
6548 (PTRACE_SETREGSET): Likewise.
6549 (x86_fill_xstateregset): Likewise.
6550 (x86_store_xstateregset): Likewise.
6551 (use_xml): Likewise.
6552 (x86_linux_update_xmltarget): Likewise.
6553 (x86_linux_process_qsupported): Likewise.
6554 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
6555 (x86_arch_setup): Don't call init_registers_amd64_linux nor
6556 init_registers_i386_linux here. Call
6557 x86_linux_update_xmltarget.
6558 (the_low_target): Add x86_linux_process_qsupported.
6559
6560 * server.c (handle_query): Call target_process_qsupported.
6561
6562 * target.h (target_ops): Add process_qsupported.
6563 (target_process_qsupported): New.
6564
fc7238bb
PA
65652010-04-03 Pedro Alves <pedro@codesourcery.com>
6566
6567 * inferiors.c (add_thread): Set last_status kind to
6568 TARGET_WAITKIND_IGNORE.
6569 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
6570 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
6571 (linux_wait_1): Move `thread' local definition to block that uses
6572 it. Don't NULL initialize `event_child'.
6573 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
6574 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
6575 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
6576
bdabb078
PA
65772010-04-01 Pedro Alves <pedro@codesourcery.com>
6578
6579 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
6580 an extended waitstatus, or by a watchpoint.
6581 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
6582 thread was stepping or has been stopped by a watchpoint.
6583
d3bbe7a0
PA
65842010-04-01 Pedro Alves <pedro@codesourcery.com>
6585
6586 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
6587 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
6588 of another, then delete the previous, and validate all
6589 breakpoints.
6590 (validate_inserted_breakpoint): New.
6591 (delete_disabled_breakpoints): New.
6592 (validate_breakpoints): New.
6593 (check_mem_read): Validate breakpoints before trusting their
6594 shadow. Delete disabled breakpoints.
6595 (check_mem_write): Validate breakpoints before trusting they
6596 should be inserted. Delete disabled breakpoints.
6597 * mem-break.h (validate_breakpoints):
6598 * server.c (handle_query): Validate breakpoints when we see a
6599 qSymbol query.
6600
8b07ae33
PA
66012010-04-01 Pedro Alves <pedro@codesourcery.com>
6602
6603 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
6604 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
6605 if we could tell there's a GDB breakpoint at stop_pc.
6606 (need_step_over_p): Don't do a step over if we find a GDB
6607 breakpoint at the resume PC.
6608
6609 * mem-break.c (struct raw_breakpoint): New.
6610 (enum bkpt_type): New type `gdb_breakpoint'.
6611 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
6612 fields. New field `raw'.
6613 (find_raw_breakpoint_at): New.
6614 (set_raw_breakpoint_at): Handle refcounting. Create a raw
6615 breakpoint instead.
6616 (set_breakpoint_at): Adjust.
6617 (delete_raw_breakpoint): New.
6618 (release_breakpoint): New.
6619 (delete_breakpoint): Rename to...
6620 (delete_breakpoint_1): ... this. Add proc parameter. Use
6621 release_breakpoint. Return ENOENT.
6622 (delete_breakpoint): Reimplement.
6623 (find_breakpoint_at): Delete.
6624 (find_gdb_breakpoint_at): New.
6625 (delete_breakpoint_at): Delete.
6626 (set_gdb_breakpoint_at): New.
6627 (delete_gdb_breakpoint_at): New.
6628 (gdb_breakpoint_here): New.
6629 (set_reinsert_breakpoint): Use release_breakpoint.
6630 (uninsert_breakpoint): Rename to ...
6631 (uninsert_raw_breakpoint): ... this.
6632 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
6633 (reinsert_raw_breakpoint): Change parameter type to
6634 raw_breakpoint.
6635 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
6636 instead.
6637 (check_breakpoints): Adjust. Use release_breakpoint.
6638 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
6639 (breakpoint_inserted_here): Ditto.
6640 (check_mem_read): Adjust to iterate over raw breakpoints instead.
6641 Don't trust the breakpoint's shadow if it is not inserted.
6642 (check_mem_write): Adjust to iterate over raw breakpoints instead.
6643 (delete_all_breakpoints): Adjust.
6644 (free_all_breakpoints): Mark all breakpoints as uninserted, and
6645 use delete_breakpoint_1.
6646
6647 * mem-break.h (breakpoints_supported): Delete declaration.
6648 (set_gdb_breakpoint_at): Declare.
6649 (gdb_breakpoint_here): Declare.
6650 (delete_breakpoint_at): Delete.
6651 (delete_gdb_breakpoint_at): Declare.
6652
6653 * server.h (struct raw_breakpoint): Forward declare.
6654 (struct process_info): New field `raw_breakpoints'.
6655
6656 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
6657 breakpoints.
6658
6bf5e0ba
PA
66592010-03-24 Pedro Alves <pedro@codesourcery.com>
6660
6661 * linux-low.c (status_pending_p_callback): Fix comment.
6662 (linux_wait_for_event_1): Move most of the internal breakpoint
6663 handling from here...
6664 (linux_wait_1): ... to here.
6665 (count_events_callback): New.
6666 (select_singlestep_lwp_callback): New.
6667 (select_event_lwp_callback): New.
6668 (cancel_breakpoints_callback): New.
6669 (select_event_lwp): New.
6670 (linux_wait_1): Simplify internal breakpoint handling. Give equal
6671 priority to all LWPs that have had events that should be reported
6672 to the client. Cancel breakpoints when about to reporting the
6673 event to the client, not while stopping lwps. No longer cancel
6674 finished single-steps here.
6675 (cancel_finished_single_step): Delete.
6676 (cancel_finished_single_steps): Delete.
6677
414a389f
PA
66782010-03-24 Pedro Alves <pedro@codesourcery.com>
6679
6680 * mem-break.c (enum bkpt_type): New.
6681 (struct breakpoint): New field `type'.
6682 (set_breakpoint_at): Change return type to struct breakpoint
6683 pointer. Set type to `other_breakpoint' by default.
6684 (delete_breakpoint): Rewrite, supporting more than one breakpoint
6685 in the breakpoint list.
6686 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
6687 (reinsert_breakpoint): Rename to ...
6688 (reinsert_raw_breakpoint): ... this.
6689 (reinsert_breakpoints_at): Adjust.
6690 * mem-break.h (struct breakpoint): Declare.
6691 (set_breakpoint_at): Change return type to struct breakpoint
6692 pointer.
6693
2280c721
PA
66942010-03-24 Pedro Alves <pedro@codesourcery.com>
6695
6696 * server.c (handle_query): Assign, not compare.
6697
d50171e4
PA
66982010-03-24 Pedro Alves <pedro@codesourcery.com>
6699
6700 Teach linux gdbserver to step-over-breakpoints.
6701
6702 * linux-low.c (can_hardware_single_step): New.
6703 (supports_breakpoints): New.
6704 (handle_extended_wait): If stopping threads, read the stop pc of
6705 the new cloned LWP.
6706 (get_pc): New.
6707 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
6708 low target doesn't support retrieving the PC.
6709 (add_lwp): Set last_resume_kind to resume_continue.
6710 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
6711 (linux_attach): Don't clear stop_expected. Set the lwp's
6712 last_resume_kind to resume_stop.
6713 (linux_detach_one_lwp): Don't check for removed breakpoints.
6714 (check_removed_breakpoint): Delete.
6715 (status_pending_p): Rename to ...
6716 (status_pending_p_callback): ... this. Don't check for removed
6717 breakpoints. Don't consider threads that are stopped from GDB's
6718 perspective.
6719 (linux_wait_for_lwp): Always read the stop_pc here.
6720 (cancel_breakpoint): New.
6721 (step_over_bkpt): New global.
6722 (linux_wait_for_event_1): Implement stepping over breakpoints.
6723 (gdb_wants_lwp_stopped): New.
6724 (gdb_wants_all_stopped): New.
6725 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
6726 single-step traps here. Store the thread's last reported target
6727 wait status.
6728 (send_sigstop): Don't clear stop_expected. Always set it,
6729 instead.
6730 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
6731 (cancel_finished_single_step): New.
6732 (cancel_finished_single_steps): New.
6733 (wait_for_sigstop): Don't cancel finished single-step traps here.
6734 (linux_resume_one_lwp): Don't check for removed breakpoints.
6735 Don't set `step' on non-hardware step archs.
6736 (linux_set_resume_request): Ignore resume_stop requests if already
6737 stopping or stopped. Set the lwp's last_resume_kind.
6738 (resume_status_pending_p): Don't check for removed breakpoints.
6739 (need_step_over_p): New.
6740 (start_step_over): New.
6741 (finish_step_over): New.
6742 (linux_resume_one_thread): Always queue a sigstop for resume_stop
6743 requests. Clear the thread's last reported target waitstatus.
6744 Don't use the `suspended' flag. Don't consider pending breakpoints.
6745 (linux_resume): Start a step-over if necessary.
6746 (proceed_one_lwp): New.
6747 (proceed_all_lwps): New.
6748 (unstop_all_lwps): New.
6749 * linux-low.h (struct lwp_info): Rewrite comment for the
6750 `suspended' flag. Add the `stop_pc' field. Delete the
6751 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
6752 Add `'last_resume_kind' and `need_step_over' fields.
6753 * inferiors.c (struct thread_info): Delete, moved elsewhere.
6754 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
6755 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
6756 (set_raw_breakpoint_at): New.
6757 (set_breakpoint_at): Rewrite to use it.
6758 (reinsert_breakpoint_handler): Delete.
6759 (set_reinsert_breakpoint): New.
6760 (reinsert_breakpoint_by_bp): Delete.
6761 (delete_reinsert_breakpoints): New.
6762 (uninsert_breakpoint): Rewrite.
6763 (uninsert_breakpoints_at): New.
6764 (reinsert_breakpoint): Rewrite.
6765 (reinsert_breakpoints_at): New.
6766 (check_breakpoints): Rewrite.
6767 (breakpoint_here): New.
6768 (breakpoint_inserted_here): New.
6769 (check_mem_read): Adjust.
6770 * mem-break.h (breakpoints_supported, breakpoint_here)
6771 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
6772 (reinsert_breakpoint_by_bp): Delete declaration.
6773 (delete_reinsert_breakpoints): Declare.
6774 (reinsert_breakpoint): Delete declaration.
6775 (reinsert_breakpoints_at): Declare.
6776 (uninsert_breakpoint): Delete declaration.
6777 (uninsert_breakpoints_at): Declare.
6778 (check_breakpoints): Adjust prototype.
6779 * server.h: Adjust include order.
6780 (struct thread_info): Declare here. Add a `last_status' field.
6781
30ba68cb
MS
67822010-03-23 Michael Snyder <msnyder@vmware.com>
6783
6784 * server.c (crc32): New function.
6785 (handle_query): Add handling for 'qCRC:' request.
6786
b9a881c2
PA
67872010-03-23 Pedro Alves <pedro@codesourcery.com>
6788
6789 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
6790 lwp had been stopped by a watchpoint.
6791
e92d13d5
PA
67922010-03-16 Pedro Alves <pedro@codesourcery.com>
6793
6794 * server.h (internal_error): Declare.
6795 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
6796 * utils.c (internal_error): New function.
6797
64daa791
AS
67982010-03-15 Andreas Schwab <schwab@redhat.com>
6799
6800 * configure.srv: Fix typo setting srv_regobj.
6801
f52cd8cd
PA
68022010-03-15 Pedro Alves <pedro@codesourcery.com>
6803
6804 * linux-low.c (fetch_register): Avoid passing a non string literal
6805 format to `error'.
6806 (usr_store_inferior_registers): Ditto.
6807
93ae6fdc
PA
68082010-03-14 Pedro Alves <pedro@codesourcery.com>
6809
6810 * linux-low.c (linux_write_memory): Bail out early if peeking
6811 memory failed.
6812
c3adc08c
PA
68132010-03-14 Pedro Alves <pedro@codesourcery.com>
6814
6815 * linux-low.h (struct lwp_info): New fields
6816 `stopped_by_watchpoint' and `stopped_data_address'.
6817 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
6818 here, and cache them in the lwp object.
6819 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
6820 directly.
6821 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
6822 field.
6823 (linux_stopped_by_watchpoint): Rewrite.
6824 (linux_stopped_data_address): Rewrite.
6825
bce522a2
PA
68262010-03-06 Simo Melenius <simo.melenius@iki.fi>
6827
6828 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
6829 switching the current inferior, not before.
6830
90884b2b
L
68312010-03-01 H.J. Lu <hongjiu.lu@intel.com>
6832
6833 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
6834 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
6835 i386-linux.c and amd64-linux.c.
6836 (reg-i386.o): Removed.
6837 (reg-i386.c): Likewise.
6838 (reg-i386-linux.o): Likewise.
6839 (reg-i386-linux.c): Likewise.
6840 (reg-x86-64.o): Likewise.
6841 (reg-x86-64.c): Likewise.
6842 (reg-x86-64-linux.o): Likewise.
6843 (reg-x86-64-linux.c): Likewise.
6844 (i386.o): New.
6845 (i386.c): Likewise.
6846 (i386-linux.o): Likewise.
6847 (i386-linux.c): Likewise.
6848 (amd64.o): Likewise.
6849 (amd64.c): Likewise.
6850 (amd64-linux.o): Likewise.
6851 (amd64-linux.c): Likewise.
6852
6853 * configure.srv (srv_i386_regobj): New.
6854 (srv_i386_linux_regobj): Likewise.
6855 (srv_amd64_regobj): Likewise.
6856 (srv_amd64_linux_regobj): Likewise.
6857 (srv_i386_32bit_xmlfiles): Likewise.
6858 (srv_i386_64bit_xmlfiles): Likewise.
6859 (srv_i386_xmlfiles): Likewise.
6860 (srv_amd64_xmlfiles): Likewise.
6861 (srv_i386_linux_xmlfiles): Likewise.
6862 (srv_amd64_linux_xmlfiles): Likewise.
6863 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
6864 srv_xmlfiles to $srv_i386_xmlfiles.
6865 (i[34567]86-*-mingw32ce*): Likewise.
6866 (i[34567]86-*-mingw*): Likewise.
6867 (i[34567]86-*-nto*): Likewise.
6868 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
6869 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
6870 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
6871 (x86_64-*-linux*): Likewise.
6872
6873 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
6874 (init_registers_amd64_linux): New.
6875 (x86_arch_setup): Replace init_registers_x86_64_linux with
6876 init_registers_amd64_linux.
6877
193f13e6
MK
68782010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
6879
6880 * configure.ac: Check for libdl. If it is not available link against
6881 static libthread_db.
6882 * configure: Regenerate.
6883
85d721b8
PA
68842010-02-22 Pedro Alves <pedro@codesourcery.com>
6885
6886 PR9605
6887
6888 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
6889 handing a read watchpoint.
6890 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
6891
6076632b
DE
68922010-02-12 Doug Evans <dje@google.com>
6893
6894 * linux-low.c (linux_supports_tracefork_flag): Document.
6895 (linux_look_up_symbols): Add comment.
6896
3327ccf7
L
68972010-02-03 H.J. Lu <hongjiu.lu@intel.com>
6898
6899 * regcache.c (supply_register): Clear regcache if buf is NULL.
6900
0718675c 69012010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 6902 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
6903
6904 * inferiors.c (find_inferior): Add function documentation.
6905 (unloaded_dll): Handle the case where the unloaded dll has not
6906 been previously registered in the dll list.
6907
177321bd
DJ
69082010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
6909
6910 * linux-arm-low.c (thumb_breakpoint_len): Delete.
6911 (thumb2_breakpoint): New.
6912 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
6913
2b009048
DJ
69142010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
6915
6916 * linux-low.c (get_stop_pc): Check for SIGTRAP.
6917 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
6918 breakpoints.
6919
3be029c7
PA
69202010-01-21 Pedro Alves <pedro@codesourcery.com>
6921
6922 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
6923
18f5de3b
JK
69242010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6925
6926 * linux-s390-low.c (s390_collect_ptrace_register)
6927 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
6928
3743bb4f
DE
69292010-01-21 Doug Evans <dje@google.com>
6930
14ce3065
DE
6931 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
6932 (PTRACE_ARG4_TYPE): New macro.
6933 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
6934 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
6935 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
6936 (usr_store_inferior_registers): Ditto.
6937 (linux_read_memory, linux_write_memory): Ditto.
6938 (linux_test_for_tracefork): Ditto.
6939
3743bb4f
DE
6940 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
6941 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
6942
8b315be5
PA
69432010-01-21 Pedro Alves <pedro@codesourcery.com>
6944
6945 * proc-service.c (ps_lgetregs): Don't refetch registers from the
6946 target.
6947
85492558
PA
69482010-01-21 Pedro Alves <pedro@codesourcery.com>
6949
6950 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
6951 prototype to take a regcache. Adjust.
6952
442ea881
PA
69532010-01-20 Pedro Alves <pedro@codesourcery.com>
6954
6955 * regcache.h (struct thread_info): Forward declare.
6956 (struct regcache): New.
6957 (new_register_cache): Adjust prototype.
6958 (get_thread_regcache): Declare.
6959 (free_register_cache): Adjust prototype.
6960 (registers_to_string, registers_from_string): Ditto.
6961 (supply_register, supply_register_by_name, collect_register)
6962 (collect_register_as_string, collect_register_by_name): Ditto.
6963 * regcache.c (struct inferior_regcache_data): Delete.
6964 (get_regcache): Rename to ...
6965 (get_thread_regcache): ... this. Adjust. Switch inferior before
6966 fetching registers.
6967 (regcache_invalidate_one): Adjust.
6968 (regcache_invalidate): Fix prototype.
6969 (new_register_cache): Return the new register cache.
6970 (free_register_cache): Change prototype.
6971 (realloc_register_cache): Adjust.
6972 (registers_to_string): Change prototype to take a regcache. Adjust.
6973 (registers_from_string): Ditto.
6974 (register_data): Ditto.
6975 (supply_register): Ditto.
6976 (supply_register_by_name): Ditto.
6977 (collect_register): Ditto.
6978 (collect_register_as_string): Ditto.
6979 (collect_register_by_name): Ditto.
6980 * server.c (process_serial_event): Adjust.
6981 * linux-low.h (regset_fill_func, regset_store_func): Change
6982 prototype.
6983 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
6984 Change prototype.
6985 * linux-low.c (get_stop_pc): Adjust.
6986 (check_removed_breakpoint): Adjust.
6987 (linux_wait_for_event): Adjust.
6988 (linux_resume_one_lwp): Adjust.
6989 (fetch_register): Add regcache parameter. Adjust.
6990 (usr_store_inferior_registers): Ditto.
6991 (regsets_fetch_inferior_registers): Ditto.
6992 (regsets_store_inferior_registers): Ditto.
6993 (linux_fetch_registers, linux_store_registers): Ditto.
6994 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
6995 regcache. Adjust.
43aaf8b6
PA
6996 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
6997 Ditto.
442ea881
PA
6998 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
6999 prototype to take a regcache.
7000 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
7001 * remote-utils.c (convert_ascii_to_int, outreg)
7002 (prepare_resume_reply): Change prototype to take a regcache.
7003 Adjust.
7004 * target.h (struct target_ops) <fetch_registers, store_registers>:
7005 Change prototype to take a regcache.
7006 (fetch_inferior_registers, store_inferior_registers): Change
7007 prototype to take a regcache. Adjust.
7008 * proc-service.c (ps_lgetregs): Adjust.
7009 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
7010 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
7011 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
7012 take a regcache. Adjust.
7013 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
7014 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
7015 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
7016 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
7017 * linux-cris-low.c (cris_get_pc, cris_set_pc)
7018 (cris_cannot_fetch_register):
7019 (cris_breakpoint_at): Change prototype to take a regcache.
7020 Adjust.
7021 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
7022 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
7023 to take a regcache. Adjust.
7024 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
7025 Adjust.
7026 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
7027 take a regcache. Adjust.
7028 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
7029 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
7030 (m68k_set_pc): Change prototype to take a regcache. Adjust.
7031 * linux-mips-low.c (mips_get_pc):
7032 (mips_set_pc): Change prototype to take a regcache. Adjust.
7033 (mips_reinsert_addr): Adjust.
7034 (mips_collect_register): Change prototype to take a regcache.
7035 Adjust.
7036 (mips_supply_register):
7037 (mips_collect_register_32bit, mips_supply_register_32bit)
7038 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7039 (mips_store_fpregset): Ditto.
43aaf8b6
PA
7040 * linux-ppc-low.c (ppc_supply_ptrace_register)
7041 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
7042 (parse_spufs_run): Adjust.
7043 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
7044 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
7045 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
7046 take a regcache. Adjust.
7047 * linux-s390-low.c (s390_collect_ptrace_register)
7048 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
7049 (s390_set_pc): Change prototype to take a regcache. Adjust.
7050 (s390_arch_setup): Adjust.
7051 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
7052 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
7053 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7054 (sparc_fill_gregset, sparc_store_gregset_from_stack)
7055 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7056 regcache. Adjust.
7057 (sparc_breakpoint_at): Adjust.
7058 * linux-xtensa-low.c (xtensa_fill_gregset):
7059 (xtensa_store_gregset):
7060 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7061 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
7062 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
7063 prototype to take a regcache. Adjust.
7064 * win32-arm-low.c (arm_fetch_inferior_register)
7065 (arm_store_inferior_register): Change prototype to take a
7066 regcache. Adjust.
7067 * win32-i386-low.c (i386_fetch_inferior_register)
7068 (i386_store_inferior_register): Change prototype to take a
7069 regcache. Adjust.
7070 * win32-low.c (child_fetch_inferior_registers)
7071 (child_store_inferior_registers): Change prototype to take a
7072 regcache. Adjust.
7073 (win32_wait): Adjust.
7074 (win32_fetch_inferior_registers): Change prototype to take a
7075 regcache. Adjust.
7076 (win32_store_inferior_registers): Adjust.
7077 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7078 store_inferior_register>: Change prototype to take a regcache.
7079
60c3d7b0
DE
70802010-01-20 Doug Evans <dje@google.com>
7081
7082 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7083 #ifdef.
7084 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 7085 (W_STOPCODE): Provide definition if missing.
60c3d7b0 7086
dc146f7c
VP
70872010-01-13 Vladimir Prus <vladimir@codesourcery.com>
7088
7089 * linux-low.c (linux_core_of_thread): New.
7090 (compare_ints, show_process, list_threads): New.
7091 (linux_qxfer_osdata): Report threads and cores.
7092 (linux_target_op): Register linux_core_of_thread.
7093 * remote-utils.c (prepare_resume_reply): Report the core.
7094 (buffer_xml_printf): Support %d specifier.
7095 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
7096 New.
7097 (handle_query): Handle qXfer:threads. Announce availability
7098 thereof.
7099 * target.h (struct target_ops): New field core_of_thread.
7100
7803799a
UW
71012010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
7102
7103 * Makefile.in (clean): Remove new generated files.
7104 (reg-s390.o, reg-s390.c): Remove rules.
7105 (reg-s390x.o, reg-s390x.c): Likewise.
7106 (s390-linux32.o, s390-linux32.c): Add rules.
7107 (s390-linux64.o, s390-linux64.c): Likewise.
7108 (s390x-linux64.o, s390x-linux64.c): Likewise.
7109 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7110 * linux-s390-low.c: Include <elf.h>.
7111 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7112 (init_registers_s390): Remove prototype.
7113 (init_registers_s390x): Likewise.
7114 (init_registers_s390_linux32): Add prototype.
7115 (init_registers_s390_linux64): Likewise.
7116 (init_registers_s390x_linux64): Likewise.
7117 (s390_num_regs_3264): New define.
7118 (s390_regmap_3264): New global variable.
7119 (s390_cannot_fetch_register): Remove obsolete check.
7120 (s390_cannot_store_register): Likewise.
7121 (s390_collect_ptrace_register): Handle upper/lower register halves.
7122 (s390_supply_ptrace_register): Likewise.
7123 (s390_fill_gregset): Update to register number changes.
7124 (s390_get_hwcap): New routine.
7125 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7126 Install appropriate regmap and register set.
7127
6e7ffa39
JB
71282010-01-01 Joel Brobecker <brobecker@adacore.com>
7129
7130 * server.c (gdbserver_version): Update copyright year to 2010.
7131 * gdbreplay.c (gdbreplay_version): Likewise.
7132
957f3f49
DE
71332009-12-28 Doug Evans <dje@google.com>
7134
7135 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7136 elf/external.h. Include <elf.h> instead but only if necessary.
7137
ca5c370d
PA
71382009-12-28 Pedro Alves <pedro@codesourcery.com>
7139
7140 * linux-low.c (linux_remove_process): Remove `detaching'
7141 parameter. Don't release/detach from thread_db here.
7142 (linux_kill): Release/detach from thread_db here, ...
7143 (linux_detach): ... and here, before actually detaching.
7144 (linux_wait_1): ... and here, when a process exits.
7145 * thread-db.c (any_thread_of): New.
7146 (thread_db_free): Switch the current inferior to a thread of the
7147 passed in process.
7148
4ee62156
DE
71492009-12-21 Doug Evans <dje@google.com>
7150
d90e6a88
DE
7151 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7152
c5f62d5f
DE
7153 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7154 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7155 warning ifndef __NR_tkill. Move setting of errno there too.
7156 Delete unnecessary resetting of errno after syscall.
7157 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7158
10e86dd7
DE
7159 * configure.ac: Check for dladdr.
7160 * config.in: Regenerate.
7161 * configure: Regenerate.
7162 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7163 (try_thread_db_load): Update.
7164
4ee62156
DE
7165 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7166
00f515da
DE
71672009-12-18 Doug Evans <dje@google.com>
7168
e9464885
DE
7169 * event-loop.c: Include unistd.h if it exists.
7170
07d4f67e
DE
7171 * linux-low.c (my_waitpid): Move definition away from being in
7172 between linux_tracefork_child/linux_test_for_tracefork.
7173
00f515da
DE
7174 * gdb_proc_service.h (psaddr_t): Fix type.
7175 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7176 signature to match glibc.
7177
1de1badb
DE
71782009-12-16 Doug Evans <dje@google.com>
7179
7180 * linux-low.c (linux_read_memory): Fix argument to read.
7181
aeeb81d1
PA
71822009-11-26 Pedro Alves <pedro@codesourcery.com>
7183
7184 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
7185 events, don't leave current_inferior pointing at null.
7186
10357975
PA
71872009-11-26 Pedro Alves <pedro@codesourcery.com>
7188
7189 * win32-low.c (LOG): Delete.
7190 (OUTMSG): Output to stderr.
7191 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
7192 on compile time LOG macro.
7193 (win32_wait): Fix debug output.
7194
cf6e3471
PA
71952009-11-26 Pedro Alves <pedro@codesourcery.com>
7196
7197 * win32-low.c (win32_add_one_solib): If the dll name is
7198 "ntdll.dll", prepend the system directory to the dll path.
7199
0c85e18e
MK
72002009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
7201
7202 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
7203
9ac544ce 72042009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 7205 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
7206
7207 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
7208 * configure.ac: Check for __mcoldfire__ and set
7209 gdb_cv_m68k_is_coldfire.
7210 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
7211 reg-cf.o and reg-m68k.o.
7212 * configure: Regenerated.
7213
fd7dd3e6
PA
72142009-11-16 Pedro Alves <pedro@codesourcery.com>
7215
7216 * linux-low.c (linux_remove_process): Add `detaching' parameter.
7217 Pass it to thread_db_free.
7218 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
7219 proper `detaching' argument to linux_remove_process.
7220 * linux-low.h (thread_db_free): Add `detaching' parameter.
7221 * thread-db.c (thread_db_init): Pass false as `detaching' argument
7222 to thread_db_free.
7223 (thread_db_free): Add `detaching' parameter. Only
7224 call td_ta_clear_event if detaching from process.
7225
75aa492e
MK
72262009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
7227
7228 * thread-db.c (thread_db_free): Fix typo.
7229
21e1bee4
PP
72302009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
7231
7232 PR gdb/10838
7233 * thread-db.c (thread_db_free): Call td_ta_clear_event.
7234
8838b45e
NS
72352009-11-03 Nathan Sidwell <nathan@codesourcery.com>
7236
7237 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
7238 with an i686 compiler.
7239 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
7240 needed.
7241 * configure: Rebuilt.
7242
8a35fb51
SL
72432009-10-29 Sandra Loosemore <sandra@codesourcery.com>
7244
7245 PR gdb/10783
7246
7247 * server.c (handle_search_memory_1): Correct read_addr initialization
7248 in loop for searching subsequent chunks.
7249
96f15937
PP
72502009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
7251
7252 * configure.ac: New --with-libthread-db option.
7253 * thread-db.c: Allow direct dependence on libthread_db.
7254 (thread_db_free): Adjust.
7255 * config.in: Regenerate.
7256 * configure: Likewise.
889bf7c5 7257
5f7d1694
PP
72582009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
7259
7260 PR gdb/10757
7261 * thread-db.c (attach_thread): New function.
7262 (maybe_attach_thread): Return success/failure.
7263 (find_new_threads_callback): Adjust.
889bf7c5
PA
7264 (thread_db_find_new_threads): Loop until no new threads.
7265
88e3b899
PA
72662009-10-13 Pedro Alves <pedro@codesourcery.com>
7267
7268 * proc-service.c (ps_lgetregs): Formatting.
7269
cdbfd419
PP
72702009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
7271
7272 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
7273 * configure.ac: Adjust.
7274 * linux-low.h (struct process_info_private): Move members to struct
7275 thread_db.
7276 (thread_db_free, thread_db_handle_monitor_command): New prototype.
7277 * linux-low.c (linux_remove_process): Adjust.
7278 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
7279 * server.c (handle_query): Move code ...
7280 (handle_monitor_command): ... here. New function.
7281 * target.h (struct target_ops): New member.
7282 * thread-db.c (struct thread_db): New.
7283 (libthread_db_search_path): New variable.
7284 (thread_db_create_event, thread_db_enable_reporting)
7285 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
7286 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
7287 (try_thread_db_load_1, dladdr_to_soname): New functions.
7288 (try_thread_db_load, thread_db_load_search): New functions.
7289 (thread_db_init): Search for libthread_db.
7290 (thread_db_free): New function.
7291 (thread_db_handle_monitor_command): Likewise.
7292 * config.in: Regenerate.
7293 * configure: Regenerate.
889bf7c5 7294
4168d2d6
UW
72952009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
7296
7297 * spu-low.c (spu_kill): Wait for inferior to terminate.
7298 Call clear_inferiors.
7299 (spu_detach): Call clear_inferiors.
7300
81ecdfbb
RW
73012009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7302
7303 * aclocal.m4: Regenerate.
7304 * config.in: Likewise.
7305 * configure: Likewise.
7306
0b9ff2c0
UW
73072009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7308
7309 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
7310 (parse_spufs_run): New function.
7311 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
7312 (ppc_breakpoint_at): Handle SPU breakpoints.
7313
efcbbd14
UW
73142009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7315
7316 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
7317 (SPUFS_MAGIC): Define.
7318 (spu_enumerate_spu_ids): New function.
7319 (linux_qxfer_spu): New function.
7320 (linux_target_ops): Install linux_qxfer_spu.
7321
f4d9bade
UW
73222009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7323
7324 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
7325 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
7326 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
7327 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
7328 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
7329 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
7330 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
7331 (init_registers_powerpc_cell32l): Add prototype.
7332 (init_registers_powerpc_cell64l): Likewise.
7333 (ppc_arch_setup): Detect Cell/B.E. architecture.
7334
96e946ca
RW
73352009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7336
7337 * Makefile.in (datarootdir): New variable.
7338
58d6951d
DJ
73392009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7340
7341 * linux-low.c (linux_write_memory): Update debugging output.
7342 * Makefile.in (clean): Add new descriptions.
7343 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
7344 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
7345 * configure.srv: Add new files for arm*-*-linux*.
7346 * linux-arm-low.c: Add new declarations.
7347 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
7348 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
7349 (HWCAP_VFPv3D16): New.
7350 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
7351 instead of __IWMMXT__.
7352 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
7353 (arm_arch_setup): New.
7354 (target_regsets): Remove #ifdef. Add VFP regset.
7355 (the_low_target): Use arm_arch_setup.
7356
12b42a12
DJ
73572009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7358
7359 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
7360 the main thread again.
7361
ac8c974e
AR
73622009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
7363
7364 Adding Neutrino gdbserver.
7365 * configure: Regenerated.
7366 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
7367 * configure.srv (i[34567]86-*-nto*): New target.
7368 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
7369 * remote-utils.c [__QNX__]: Include sys/iomgr.h
7370 (nto_comctrl) [__QNX__]: New function.
7371 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
7372
4424e0c3 73732009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
7374
7375 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
7376 srv_tgtobj.
7377
912cf4ba
PA
73782009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
7379 Pedro Alves <pedro@codesourcery.com>
7380
7381 * win32-i386-low.c (i386_get_thread_context): Handle systems that
7382 don't support CONTEXT_EXTENDED_REGISTERS.
7383 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
7384 (the_low_target): Install them.
7385 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
7386 failing with ERROR_PIPE_NOT_CONNECTED.
7387
aa5ca48f
DE
73882009-06-30 Doug Evans <dje@google.com>
7389 Pierre Muller <muller@ics.u-strasbg.fr>
7390
7391 Add h/w watchpoint support to x86-linux, win32-i386.
7392 * Makefile.in (SFILES): Add i386-low.c
7393 (i386_low_h): Define.
7394 (i386-low.o): Add dependencies.
7395 (linux-x86-low.o): Add i386-low.h dependency.
7396 (win32-i386-low.o): Ditto.
7397 * i386-low.c: New file.
7398 * i386-low.h: New file.
7399 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
7400 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
7401 * linux-low.c (linux_add_process): Initialize arch_private.
7402 (linux_remove_process): Free arch_private.
7403 (add_lwp): Initialize arch_private.
7404 (delete_lwp): Free arch_private.
7405 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
7406 provided.
7407 * linux-low.h (process_info_private): New member arch_private.
7408 (lwp_info): New member arch_private.
7409 (linux_target_ops): New members new_process, new_thread,
7410 prepare_to_resume.
7411 (ptid_of): New macro.
7412 * linux-x86-low.c: Include stddef.h, i386-low.h.
7413 (arch_process_info): New struct.
7414 (arch_lwp_info): New struct.
7415 (x86_linux_dr_get, x86_linux_dr_set): New functions.
7416 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7417 (i386_dr_low_get_status): New function.
7418 (x86_insert_point, x86_remove_point): New functions.
7419 (x86_stopped_by_watchpoint): New function.
7420 (x86_stopped_data_address): New function.
7421 (x86_linux_new_process, x86_linux_new_thread): New functions.
7422 (x86_linux_prepare_to_resume): New function.
7423 (the_low_target): Add entries for insert_point, remove_point,
7424 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
7425 prepare_to_resume.
7426 * server.c (debug_hw_points): New global.
7427 (monitor_show_help): Document set debug-hw-points.
7428 (handle_query): Process "set debug-hw-points".
7429 * server.h (debug_hw_points): Declare.
7430 (paddress): Declare.
7431 * utils.c (NUMCELLS, CELLSIZE): New macros.
7432 (get_sell, xsnprintf, paddress): New functions.
7433 * win32-arm-low.c (the_low_target): Add entries for insert_point,
7434 remove_point, stopped_by_watchpoint, stopped_data_address.
7435 * win32-i386-low.c: Include i386-low.h.
7436 (debug_reg_state): Replaces dr.
7437 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7438 (i386_dr_low_get_status): New function.
7439 (i386_insert_point, i386_remove_point): New functions.
7440 (i386_stopped_by_watchpoint): New function.
7441 (i386_stopped_data_address): New function.
7442 (i386_initial_stuff): Update.
7443 (get_thread_context,set_thread_context,i386_thread_added): Update.
7444 (the_low_target): Add entries for insert_point,
7445 remove_point, stopped_by_watchpoint, stopped_data_address.
7446 * win32-low.c (win32_insert_watchpoint): New function.
7447 (win32_remove_watchpoint): New function.
7448 (win32_stopped_by_watchpoint): New function.
7449 (win32_stopped_data_address): New function.
7450 (win32_target_ops): Add entries for insert_watchpoint,
7451 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
7452 * win32-low.h (win32_target_ops): New members insert_point,
7453 remove_point, stopped_by_watchpoint, stopped_data_address.
7454
d993e290
PA
74552009-06-25 Pedro Alves <pedro@codesourcery.com>
7456
7457 * server.c (process_serial_event): Re-return unsupported, not
7458 error, if the type isn't recognized. Re-allow supporting only
7459 insert or remove packets. Also call require_running for
7460 breakpoints. Add missing break statement to default case. Tidy.
7461 * target.h (struct target_ops): Rename insert_watchpoint to
7462 insert_point, and remove_watchpoint to remove_point.
7463
7464 * linux-low.h (struct linux_target_ops): Likewise.
7465 * linux-low.c (linux_insert_watchpoint): Rename to ...
7466 (linux_insert_point): ... this. Adjust.
7467 (linux_remove_watchpoint): Rename to ...
7468 (linux_remove_point): ... this. Adjust.
7469 (linux_target_ops): Adjust.
7470 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
7471 (cris_insert_point): ... this.
7472 (cris_remove_watchpoint): Rename to ...
7473 (cris_remove_point): ... this.
7474 (the_low_target): Adjust.
7475
0f54c268
PM
74762009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
7477
7478 * server.c (handle_v_kill): Pass signal_pid to
7479 kill_inferior if multi_process is zero.
7480
c6314022
AR
74812009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
7482
7483 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
7484 * target.h (target_ops): Comment for *_watchpoint to make it clear
7485 the functions can get types '0' and '1'.
7486
4463ce24
AR
74872009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
7488
7489 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
7490 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
7491 * regcache.c (get_regcache): Likewise.
7492 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
7493 * win32-low.c (child_fetch_inferior_registers): Remove check for
7494 regno 0.
7495
cf8fd78b
PA
74962009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
7497 Pedro Alves <pedro@codesourcery.com>
7498
7499 * target.h (struct target_ops) <supports_multi_process>: New
7500 callback.
7501 (target_supports_multi_process): New.
7502 * server.c (handle_query): Even if GDB reports support, only
7503 enable multi-process if the target also supports it. Report
7504 multi-process support only if the target backend supports it.
7505 * linux-low.c (linux_supports_multi_process): New function.
7506 (linux_target_ops): Install it as target_supports_multi_process
7507 callback.
7508
47c0c975
DE
75092009-05-24 Doug Evans <dje@google.com>
7510
e09875d4
DE
7511 Global renaming of find_thread_pid to find_thread_ptid.
7512 * server.h (find_thread_ptid): Renamed from find_thread_pid.
7513 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
7514 All callers updated.
7515
e27d73f6
DE
7516 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
7517 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
7518 directly.
7519
47c0c975
DE
7520 * linux-low.c (get_stop_pc): Print pc if debug_threads.
7521 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
7522 (linux_resume_one_lwp): Ditto.
7523
2acc282a
DE
75242009-05-23 Doug Evans <dje@google.com>
7525
7526 * linux-low.c (linux_resume_one_lwp): Change type of first arg
7527 from struct inferior_list_entry * to struct lwp_info *.
7528 All callers updated.
7529
9f1036c1
DE
75302009-05-13 Doug Evans <dje@google.com>
7531
7532 * linux-x86-low.c: Don't include assert.h.
7533 (x86_siginfo_fixup): Use fatal, not assert.
7534 (x86_arch_setup): Fix comment.
7535
d0722149
DE
75362009-05-12 Doug Evans <dje@google.com>
7537
7538 Biarch support for i386/amd64 gdbserver.
7539 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
7540 Add linux-x86-low.c.
7541 (linux-i386-low.o, linux-x86-64-low.o): Delete.
7542 (linux-x86-low.o): Add.
7543 * linux-x86-64-low.c: Delete.
7544 * linux-i386-low.c: Delete.
7545 * linux-x86-low.c: New file.
7546 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
7547 linux-x86-low.o.
7548 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
7549 linux-x86-low.o.
7550 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
7551 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
7552 (linux_child_pid_to_exec_file): New function.
7553 (elf_64_header_p, elf_64_file_p): New functions.
7554 (siginfo_fixup): New function.
7555 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
7556 give target a chance to convert layout.
7557 * linux-low.h (linux_target_ops): New member siginfo_fixup.
7558 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
7559
fdeb2a12
DE
75602009-05-07 Doug Evans <dje@google.com>
7561
7562 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
7563 (regsets_store_inferior_registers): Ditto.
7564
a6dbe5df
PA
75652009-05-06 Pedro Alves <pedro@codesourcery.com>
7566
7567 PR server/10048
7568
7569 * linux-low.c (must_set_ptrace_flags): Delete.
7570 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
7571 of the global.
7572 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
7573 `lwp->must_set_ptrace_flags' instead.
ba42693b 7574 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
7575 (linux_wait_1): ... not here.
7576
5091eb23
DE
75772009-04-30 Doug Evans <dje@google.com>
7578
9f767825
DE
7579 * inferiors.c (started_inferior_callback): New function.
7580 (attached_inferior_callback): New function.
7581 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
7582 * server.c (print_started_pid, print_attached_pid): New functions.
7583 (detach_or_kill_for_exit): New function.
7584 (main): Call it instead of for_each_inferior (kill_inferior_callback).
7585 * server.h (have_started_inferiors_p): Declare.
7586 (have_attached_inferiors_p): Declare.
7587
5091eb23
DE
7588 * inferiors.c (remove_process): Fix memory leak, free process.
7589 * linux-low.c (linux_remove_process): New function.
7590 (linux_kill): Call it instead of remove_process.
7591 (linux_detach, linux_wait_1): Ditto.
7592
155c8968
PA
75932009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
7594
7595 * configure.srv: Add x86 Windows CE target.
7596
7fe519cb
UW
75972009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7598
7599 * inferiors.c (get_thread_process): Make global.
7600 * server.h (get_thread_process): Add prototype.
7601 * thread-db.c (find_one_thread): Use get_thread_process
7602 instead of current_process.
7603 (thread_db_get_tls_address): Do not crash if called when
7604 thread layer is not yet initialized.
7605
5472f405
UW
76062009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7607
7608 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
7609 * spu-low.c (current_tid): Rename to ...
7610 (current_ptid): ... this.
7611 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
7612 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
7613 ptid_get_lwp (current_ptid) instead of current_tid.
7614 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
7615 instead of current_tid. Use find_process_pid to verify pid
7616 argument is valid. Pass proper argument to remove_process.
7617 (spu_thread_alive): Compare current_ptid instead of current_tid.
7618 (spu_resume): Likewise.
7619
55ac2b99
PA
76202009-04-02 Pedro Alves <pedro@codesourcery.com>
7621
7622 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
7623 variable.
7624
95954743
PA
76252009-04-01 Pedro Alves <pedro@codesourcery.com>
7626
7627 Implement the multiprocess extensions, and add linux multiprocess
7628 support.
7629
7630 * server.h (ULONGEST): Declare.
7631 (struct ptid, ptid_t): New.
7632 (minus_one_ptid, null_ptid): Declare.
7633 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7634 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
7635 (struct inferior_list_entry): Change `id' type from unsigned from
7636 to ptid_t.
7637 (struct sym_cache, struct breakpoint, struct
7638 process_info_private): Forward declare.
7639 (struct process_info): Declare.
7640 (current_process): Declare.
7641 (all_processes): Declare.
7642 (initialize_inferiors): Declare.
7643 (add_thread): Adjust to use ptid_t.
7644 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
7645 (add_process, remove_process, find_thread_pid): Declare.
7646 (find_inferior_id): Adjust to use ptid_t.
7647 (cont_thread, general_thread, step_thread): Change type to ptid_t.
7648 (multi_process): Declare.
7649 (push_event): Adjust to use ptid_t.
7650 (read_ptid, write_ptid): Declare.
7651 (prepare_resume_reply): Adjust to use ptid_t.
7652 (clear_symbol_cache): Declare.
7653 * inferiors.c (all_processes): New.
7654 (null_ptid, minus_one_ptid): New.
7655 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7656 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
7657 (add_thread): Change unsigned long to ptid. Remove gdb_id
7658 parameter. Adjust.
7659 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
7660 (gdb_id_to_thread): Rename to ...
7661 (find_thread_pid): ... this. Change unsigned long to ptid.
7662 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
7663 (loaded_dll, pull_pid_from_list): Adjust.
7664 (add_process, remove_process, find_process_pid)
7665 (get_thread_process, current_process, initialize_inferiors): New.
7666 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
7667 (struct target_waitstatus) <related_pid>: Ditto.
7668 (struct target_ops) <kill, detach>: Add `pid' argument. Change
7669 return type to int.
7670 (struct target_ops) <join>: Add `pid' argument.
7671 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
7672 (struct target_ops) <wait>: Add `ptid' field. Change return type
7673 to ptid.
7674 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
7675 (mywait): Add `ptid' argument. Change return type to ptid_t.
7676 (target_pid_to_str): Declare.
7677 * target.c (set_desired_inferior): Adjust to use ptids.
7678 (mywait): Add new `ptid' argument. Adjust.
7679 (target_pid_to_str): New.
7680 * mem-break.h (free_all_breakpoints): Declare.
7681 * mem-break.c (breakpoints): Delelete.
7682 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
7683 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
7684 to use per-process breakpoint list.
7685 (free_all_breakpoints): New.
7686 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
7687 (symbol_cache, all_symbols_looked_up): Delete.
7688 (hexchars): New.
7689 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
7690 read_ptid): New.
7691 (prepare_resume_reply): Change ptid argument's type from unsigned
7692 long to ptid_t. Adjust. Implement W;process and X;process.
7693 (free_sym_cache, clear_symbol_cache): New.
7694 (look_up_one_symbol): Adjust to per-process symbol cache. *
7695 * server.c (cont_thread, general_thread, step_thread): Change type
7696 to ptid_t.
7697 (attached): Delete.
7698 (multi_process): New.
7699 (last_ptid): Change type to ptid_t.
7700 (struct vstop_notif) <ptid>: Change type to ptid_t.
7701 (queue_stop_reply, push_event): Change `ptid' argument's type to
7702 ptid_t.
7703 (discard_queued_stop_replies): Add `pid' argument.
7704 (start_inferior): Adjust to use ptids. Adjust to mywait interface
7705 changes. Don't reference the `attached' global.
7706 (attach_inferior): Adjust to mywait interface changes.
7707 (handle_query): Adjust to use ptids. Parse GDB's qSupported
7708 features. Handle and report "multiprocess+". Handle
7709 "qAttached:PID".
7710 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
7711 changes.
7712 (handle_v_kill): New.
7713 (handle_v_stopped): Adjust to use target_pid_to_str.
7714 (handle_v_requests): Allow multiple attaches and runs when
7715 multiprocess extensions are in effect. Handle "vKill".
7716 (myresume): Adjust to use ptids.
7717 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
7718 (handle_status): Adjust to discard_queued_stop_replies interface
7719 change.
7720 (first_thread_of, kill_inferior_callback)
7721 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
7722 (main): Call initialize_inferiors. Adjust to use ptids, killing
7723 and detaching from all inferiors. Handle multiprocess packet
7724 variants.
7725 * linux-low.h: Include gdb_proc_service.h.
7726 (struct process_info_private): New.
7727 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
7728 <lwpid_of>: Use ptid_get_lwp.
7729 (get_lwp_thread): Adjust.
7730 (struct lwp_info): Add `dead' member.
7731 (find_lwp_pid): Declare.
7732 * linux-low.c (thread_db_active): Delete.
7733 (new_inferior): Adjust comment.
7734 (inferior_pid): Delete.
7735 (linux_add_process): New.
7736 (handle_extended_wait): Adjust.
7737 (add_lwp): Change unsigned long to ptid.
7738 (linux_create_inferior): Add process to processes table. Adjust
7739 to use ptids. Don't set new_inferior here.
7740 (linux_attach_lwp): Rename to ...
7741 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
7742 it. Adjust to use ptids.
7743 (linux_attach_lwp): New.
7744 (linux_attach): Add process to processes table. Don't set
7745 new_inferior here.
7746 (struct counter): New.
7747 (second_thread_of_pid_p, last_thread_of_process_p): New.
7748 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
7749 multiple processes.
7750 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
7751 processes. Remove process from process table.
7752 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
7753 to multiple processes.
7754 (any_thread_of): New.
7755 (linux_detach): Add `pid' argument, and handle it. Remove process
7756 from processes table.
7757 (linux_join): Add `pid' argument. Handle it.
7758 (linux_thread_alive): Change unsighed long argument to ptid_t.
7759 Consider dead lwps as not being alive.
7760 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
7761 threads we're not interested in.
7762 (same_lwp, find_lwp_pid): New.
7763 (linux_wait_for_lwp): Change `pid' argument's type from int to
7764 ptid_t. Adjust.
7765 (linux_wait_for_event): Rename to ...
7766 (linux_wait_for_event_1): ... this. Change `pid' argument's type
7767 from int to ptid_t. Adjust.
7768 (linux_wait_for_event): New.
7769 (linux_wait_1): Add `ptid' argument. Change return type to
7770 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
7771 that exit from the process table.
7772 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
7773 Adjust.
7774 (mark_lwp_dead): New.
7775 (wait_for_sigstop): Adjust to use ptids. If a process exits while
7776 stopping all threads, mark its main lwp as dead.
7777 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
7778 ptids.
7779 (fetch_register, usr_store_inferior_registers)
7780 (regsets_fetch_inferior_registers)
7781 (regsets_store_inferior_registers, linux_read_memory)
7782 (linux_write_memory): Inline `inferior_pid'.
7783 (linux_look_up_symbols): Adjust to use per-process
7784 `thread_db_active'.
7785 (linux_request_interrupt): Adjust to use ptids.
7786 (linux_read_auxv): Inline `inferior_pid'.
7787 (initialize_low): Don't reference thread_db_active.
7788 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
7789 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
7790 (ps_getpid): Return the pid of the current inferior.
7791 * thread-db.c (proc_handle, thread_agent): Delete.
7792 (thread_db_create_event, thread_db_enable_reporting): Adjust to
7793 per-process data.
7794 (find_one_thread): Change argument type to ptid_t. Adjust to
7795 per-process data.
7796 (maybe_attach_thread): Adjust to per-process data and ptids.
7797 (thread_db_find_new_threads): Ditto.
7798 (thread_db_init): Ditto.
7799 * spu-low.c (spu_create_inferior, spu_attach): Add process to
7800 processes table. Adjust to use ptids.
7801 (spu_kill, spu_detach): Adjust interface. Remove process from
7802 processes table.
7803 (spu_join, spu_thread_alive): Adjust interface.
7804 (spu_wait): Adjust interface. Remove process from processes
7805 table. Adjust to use ptids.
7806 * win32-low.c (current_inferior_tid): Delete.
7807 (current_inferior_ptid): New.
7808 (debug_event_ptid): New.
7809 (thread_rec): Take a ptid. Adjust.
7810 (child_add_thread): Add `pid' argument. Adjust to use ptids.
7811 (child_delete_thread): Ditto.
7812 (do_initial_child_stuff): Add `attached' argument. Add process to
7813 processes table.
7814 (child_fetch_inferior_registers, child_store_inferior_registers):
7815 Adjust.
7816 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
7817 (win32_attach): Pass 1 to do_initial_child_stuff.
7818 (win32_kill): Adjust interface. Remove process from processes
7819 table.
7820 (win32_detach): Ditto.
7821 (win32_join): Adjust interface.
7822 (win32_thread_alive): Take a ptid.
7823 (win32_resume): Adjust to use ptids.
7824 (get_child_debug_event): Ditto.
7825 (win32_wait): Adjust interface. Remove exiting process from
7826 processes table.
7827
bd99dc85
PA
78282009-04-01 Pedro Alves <pedro@codesourcery.com>
7829
7830 Non-stop mode support.
7831
7832 * server.h (non_stop): Declare.
7833 (gdb_client_data, handler_func): Declare.
7834 (delete_file_handler, add_file_handler, start_event_loop):
7835 Declare.
7836 (handle_serial_event, handle_target_event, push_event)
7837 (putpkt_notif): Declare.
7838 * target.h (enum resume_kind): New.
7839 (struct thread_resume): Replace `step' field by `kind' field.
7840 (TARGET_WNOHANG): Define.
7841 (struct target_ops) <wait>: Add `options' argument.
7842 <supports_non_stop, async, start_non_stop>: New fields.
7843 (target_supports_non_stop, target_async): New.
7844 (start_non_stop): Declare.
7845 (mywait): Add `options' argument.
7846 * target.c (mywait): Add `options' argument. Print child exit
7847 notifications here.
7848 (start_non_stop): New.
7849 * server.c (non_stop, own_buf, mem_buf): New globals.
7850 (struct vstop_notif): New.
7851 (notif_queue): New global.
7852 (queue_stop_reply, push_event, discard_queued_stop_replies)
7853 (send_next_stop_reply): New.
7854 (start_inferior): Adjust to use resume_kind. Adjust to mywait
7855 interface changes.
7856 (attach_inferior): In non-stop mode, don't wait for the target
7857 here.
7858 (handle_general_set): Handle QNonStop.
7859 (handle_query): When handling qC, return the current general
7860 thread, instead of the first thread of the list.
7861 (handle_query): If the backend supports non-stop mode, include
7862 QNonStop+ in the qSupported query response.
7863 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
7864 and non-stop mode.
7865 (handle_v_attach, handle_v_run): Handle non-stop mode.
7866 (handle_v_stopped): New.
7867 (handle_v_requests): Report support for vCont;t. Handle vStopped.
7868 (myresume): Adjust to use resume_kind. Handle non-stop.
7869 (queue_stop_reply_callback): New.
7870 (handle_status): Handle non-stop mode.
7871 (main): Clear non_stop flag on reconnection. Use the event-loop.
7872 Refactor serial protocol handling from here ...
7873 (process_serial_event): ... to this new function. When GDB
7874 selects any thread, select one here. In non-stop mode, wait until
7875 GDB acks all pending events before exiting.
7876 (handle_serial_event, handle_target_event): New.
7877 * remote-utils.c (remote_open): Install remote_desc in the event
7878 loop.
7879 (remote_close): Remove remote_desc from the event loop.
7880 (putpkt_binary): Rename to...
7881 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
7882 (putpkt_binary): New as wrapper around putpkt_binary_1.
7883 (putpkt_notif): New.
7884 (prepare_resume_reply): In non-stop mode, don't change the
7885 general_thread.
7886 * event-loop.c: New.
7887 * Makefile.in (OBJ): Add event-loop.o.
7888 (event-loop.o): New rule.
7889
7890 * linux-low.h (pid_of): Moved here.
7891 (lwpid_of): New.
7892 (get_lwp_thread): Use lwpid_of.
7893 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
7894 * linux-low.c (pid_of): Delete.
7895 (inferior_pid): Use lwpid_of.
7896 (linux_event_pipe): New.
7897 (target_is_async_p): New.
7898 (delete_lwp): New.
7899 (handle_extended_wait): Use lwpid_of.
7900 (add_lwp): Don't set lwpid field.
7901 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
7902 (linux_kill_one_lwp): If killing a running lwp, stop it first.
7903 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
7904 (linux_detach_one_lwp): If detaching from a running lwp, stop it
7905 first. Adjust to linux_wait_for_event interface changes. Use
7906 lwpid_of.
7907 (linux_detach): Don't delete the main lwp here.
7908 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
7909 (status_pending_p): Don't consider explicitly suspended lwps.
7910 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
7911 pointer. Add OPTIONS argument. Change return type to int. Use
7912 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
7913 (linux_wait_for_event): Take an integer pid instead of a lwp_info
7914 pointer. Add status pointer argument. Return a pid instead of a
7915 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
7916 changes. In non-stop mode, don't switch to a random thread.
7917 (linux_wait): Rename to...
7918 (linux_wait_1): ... this. Add target_options argument, and handle
7919 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
7920 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
7921 clean exit and signal exit code. Don't stop all threads in
7922 non-stop mode. In all-stop mode, only stop all threads when
7923 reporting a stop to GDB. Handle explicit thread stop requests.
7924 (async_file_flush, async_file_mark): New.
7925 (linux_wait): New.
7926 (send_sigstop): Use lwpid_of.
7927 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
7928 interface changes. In non-stop mode, don't switch to a random
7929 thread.
7930 (linux_resume_one_lwp): Use lwpid_of.
7931 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
7932 (linux_resume_one_thread): ... this. Handle resume_stop. In
7933 non-stop mode, don't look for pending flag in all threads.
7934 (resume_status_pending_p): Don't consider explicitly suspended
7935 threads.
7936 (my_waitpid): Reimplement. Emulate __WALL.
7937 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
7938 Use lwpid_of.
7939 (sigchld_handler, linux_supports_non_stop, linux_async)
7940 (linux_start_non_stop): New.
7941 (linux_target_ops): Register linux_supports_non_stop, linux_async
7942 and linux_start_non_stop.
7943 (initialize_low): Install SIGCHLD handler.
7944 * thread-db.c (thread_db_create_event, find_one_thread)
7945 (thread_db_get_tls_address): Use lwpid_of.
7946 * win32-low.c (win32_detach): Adjust to use resume_kind.
7947 (win32_wait): Add `options' argument.
7948 * spu-low.c (spu_resume): Adjust to use resume_kind.
7949 (spu_wait): Add `options' argument.
7950
5b1c542e
PA
79512009-04-01 Pedro Alves <pedro@codesourcery.com>
7952
7953 Decouple target code from remote protocol.
7954
7955 * target.h (enum target_waitkind): New.
7956 (struct target_waitstatus): New.
7957 (struct target_ops) <wait>: Return an unsigned long. Take a
7958 target_waitstatus pointer instead of a char pointer.
7959 (mywait): Likewise.
7960 * target.c (mywait): Change prototype to return an unsigned long.
7961 Take a target_waitstatus pointer instead of a char pointer. Adjust.
7962 * server.h (thread_from_wait, old_thread_from_wait): Delete
7963 declarations.
7964 (prepare_resume_reply): Change prototype to take a
7965 target_waitstatus.
7966 * server.c (thread_from_wait, old_thread_from_wait): Delete.
7967 (last_status, last_ptid): New.
7968 (start_inferior): Remove "statusptr" argument. Adjust. Return a
7969 pid instead of a signal.
7970 (attach_inferior): Remove "status" and "signal" parameters.
7971 Adjust.
7972 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
7973 not as an address.
7974 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
7975 (handle_v_requests, myresume): Remove "status" and "signal"
7976 parameters. Adjust.
7977 (handle_status): New.
7978 (main): Delete local `status'. Adjust.
7979 * remote-utils.c: Include target.h.
7980 (prepare_resume_reply): Change prototype to take a
7981 target_waitstatus. Adjust.
7982
7983 * linux-low.c (linux_wait): Adjust to new target_ops->wait
7984 interface.
7985 * spu-low.c (spu_wait): Adjust.
7986 * win32-low.c (enum target_waitkind, struct target_waitstatus):
7987 Delete.
7988 (win32_wait): Adjust.
7989
2bd7c093
PA
79902009-04-01 Pedro Alves <pedro@codesourcery.com>
7991
7992 * target.h (struct thread_resume): Delete leave_stopped member.
7993 (struct target_ops): Add a `n' argument to the `resume' callback.
7994 * server.c (start_inferior): Adjust.
7995 (handle_v_cont, myresume): Adjust.
7996 * linux-low.c (check_removed_breakpoint): Adjust to resume
7997 interface change, and to removed leave_stopped field.
7998 (resume_ptr): Delete.
7999 (struct thread_resume_array): New.
8000 (linux_set_resume_request): Add new `arg' parameter. Adjust to
8001 resume interface change.
8002 (linux_continue_one_thread, linux_queue_one_thread)
8003 (resume_status_pending_p): Check if the resume field is NULL
8004 instead of checking the leave_stopped member.
8005 (linux_resume): Adjust to the target resume interface change.
8006 * spu-low.c (spu_resume): Adjust to the target resume interface
8007 change.
8008 * win32-low.c (win32_detach, win32_resume): Ditto.
8009
c35fafde
PA
80102009-04-01 Pedro Alves <pedro@codesourcery.com>
8011
8012 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
8013 flag.
8014 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
8015 pending.
8016 (linux_continue_one_thread): Only preserve the stepping flag if
8017 there's a pending breakpoint.
8018
0a59d50b
PA
80192009-03-31 Pedro Alves <pedro@codesourcery.com>
8020
8021 * server.c (main): After the inferior having exited, call
8022 remote_close before exiting gdbserver.
8023
f04c6d38
TJB
80242009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
8025
8026 Fix size of FPSCR in Power 7 processors.
8027 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
8028 (PPC_FEATURE_HAS_DFP): New #define.
8029 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
8030 size of the FPSCR.
8031
78e5cee6
PA
80322009-03-23 Pedro Alves <pedro@codesourcery.com>
8033
8034 * server.c (handle_query) Whitespace and formatting.
8035
1b3f6016
PA
80362009-03-22 Pedro Alves <pedro@codesourcery.com>
8037
8038 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
8039 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
8040 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
8041 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
8042 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
8043 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
8044 Makefile.in, configure.ac: Fix whitespace throughout.
8045 * configure: Regenerate.
8046
a07b2135
PA
80472009-03-22 Pedro Alves <pedro@codesourcery.com>
8048
8049 * inferiors.c (find_inferior): Make it safe for the callback
8050 function to delete the currently iterated inferior.
8051
67cc2626
PA
80522009-03-22 Pedro Alves <pedro@codesourcery.com>
8053
8054 * Makefile.in (linuw_low_h): Move higher.
8055 (thread-db.o): Depend on $(linux_low_h).
8056
54a0b537
PA
80572009-03-17 Pedro Alves <pedro@codesourcery.com>
8058
8059 Rename "process" to "lwp" throughout.
8060
8061 * linux-low.c (all_processes): Rename to...
8062 (all_lwps): ... this.
8063 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
8064 (add_process): Rename to ...
8065 (add_lwp): ... this. Adjust.
8066 (linux_create_inferior): Adjust.
8067 (linux_attach_lwp): Adjust.
8068 (linux_attach): Adjust.
8069 (linux_kill_one_process): Rename to ...
8070 (linux_kill_one_lwp): ... this. Adjust.
8071 (linux_kill): Adjust.
8072 (linux_detach_one_process): Rename to ...
8073 (linux_detach_one_lwp): ... this. Adjust.
8074 (linux_detach): Adjust.
8075 (check_removed_breakpoint): Adjust.
8076 (status_pending_p): Adjust.
8077 (linux_wait_for_process): Rename to ...
8078 (linux_wait_for_lwp): ... this. Adjust.
8079 (linux_wait_for_event): Adjust.
8080 (send_sigstop): Adjust.
8081 (wait_for_sigstop): Adjust.
8082 (stop_all_processes): Rename to ...
8083 (stop_all_lwps): ... this.
8084 (linux_resume_one_process): Rename to ...
8085 (linux_resume_one_lwp): ... this. Adjust.
8086 (linux_set_resume_request, linux_continue_one_thread)
8087 (linux_queue_one_thread, resume_status_pending_p)
8088 (usr_store_inferior_registers, regsets_store_inferior_registers)
8089 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8090 Adjust.
8091 * linux-low.h (get_process): Rename to ...
8092 (get_lwp): ... this. Adjust.
8093 (get_thread_process): Rename to ...
8094 (get_thread_lwp): ... this. Adjust.
8095 (get_process_thread): Rename to ...
8096 (get_lwp_thread): ... this. Adjust.
8097 (struct process_info): Rename to ...
8098 (struct lwp_info): ... this.
8099 (all_processes): Rename to ...
8100 (all_lwps): ... this.
8101 * proc-service.c (ps_lgetregs): Adjust.
8102 * thread-db.c (thread_db_create_event, find_one_thread)
8103 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
8104
0b16c5cf
PA
81052009-03-14 Pedro Alves <pedro@codesourcery.com>
8106
8107 * server.c (handle_query): Handle "qAttached".
8108
32de4b9d
NS
81092009-03-13 Nathan Sidwell <nathan@codesourcery.com>
8110
8111 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8112 GPLv3, update license URL.
8113
2aecd87f
DE
81142009-03-01 Doug Evans <dje@google.com>
8115
93efd302 8116 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
8117 (server_h): Add gdb_signals.h.
8118 (signals.o): Update.
8119 * server.h (target_signal_from_host,target_signal_to_host_p)
8120 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8121
86b1f9c5
PM
81222009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8123
8124 * remote-utils.c (getpkt): Also generate remote-debug
8125 information if noack_mode is set.
8126
4aa995e1
PA
81272009-02-06 Pedro Alves <pedro@codesourcery.com>
8128
8129 * server.c (handle_query): Report qXfer:siginfo:read and
8130 qXfer:siginfo:write as supported and handle them.
8131 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8132 * linux-low.c (linux_xfer_siginfo): New.
8133 (linux_target_ops): Set it.
8134
62709adf
PA
81352009-01-26 Pedro Alves <pedro@codesourcery.com>
8136
8137 * server.c (gdbserver_usage): Mention --remote-debug.
8138 (main): Accept '--remote-debug' switch.
8139
aef93bd7
DE
81402009-01-18 Doug Evans <dje@google.com>
8141
8142 * regcache.c (new_register_cache): No need to check result of xcalloc.
8143 * server.c (handle_search_memory): Back out calls to xmalloc,
8144 result is checked and error is returned to user upon failure.
8145 (handle_query): Ditto. Add more checks for result of malloc.
8146 (handle_v_cont): Check result of malloc, report error back to
8147 user upon failure.
8148 (handle_v_run): Ditto. Call freeargv.
8149 * server.h (freeargv): Declare.
8150 * utils.c (freeargv): New fn.
8151
54363045
DE
81522009-01-15 Doug Evans <dje@google.com>
8153
f626972c
DE
8154 * gdbreplay.c (perror_with_name): Make arg const char *.
8155 * server.h (target_signal_to_name): Make return type const char *.
0842e787 8156 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 8157 * utils.c (perror_with_name): Make arg const char *.
54363045 8158
18aae699
PA
81592009-01-14 Pedro Alves <pedro@codesourcery.com>
8160
8161 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8162 when handling a EXIT_PROCESS_DEBUG_EVENT.
8163
ff703abe
JB
81642009-01-06 Joel Brobecker <brobecker@adacore.com>
8165
8166 * gdbreplay.c (gdbreplay_version): Update copyright year.
8167 * server.c (gdbserver_version): Likewise.
8168
f21cc1a2 81692009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
8170
8171 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 8172 (handle_extended_wait): Improve comment.
0e21c1ec 8173
bca929d3
DE
81742008-12-13 Doug Evans <dje@google.com>
8175
8176 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8177 * server.h (ATTR_MALLOC): New macro.
8178 (xmalloc,xcalloc,xstrdup): Declare.
8179 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
8180 * inferiors.c: Ditto.
8181 * linux-low.c: Ditto.
8182 * mem-break.c: Ditto.
8183 * regcache.c: Ditto.
8184 * remote-utils.c: Ditto.
8185 * server.c: Ditto.
8186 * target.c: Ditto.
8187 * win32-low.c: Ditto.
8188
97438e3f
DE
81892008-12-12 Doug Evans <dje@google.com>
8190
896c7fbb
DE
8191 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
8192 in debugging printf.
8193
97438e3f
DE
8194 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
8195
e3b886f8
DE
81962008-12-09 Doug Evans <dje@google.com>
8197
8198 * linux-low.h (struct process_info): Delete member tid, unused.
8199 * thread-db.c (find_one_thread): Update.
8200 (maybe_attach_thread): Update.
8201
07e059b5
VP
82022008-12-02 Pedro Alves <pedro@codesourcery.com>
8203
889bf7c5
PA
8204 * target.h (struct target_ops): Add qxfer_osdata member.
8205 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
8206 and dirent.h.
8207 (linux_qxfer_osdata): New functions.
8208 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
8209 callback.
8210 * server.c (handle_query): Handle "qXfer:osdata:read:".
8211 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
8212 (buffer_xml_printf): New functions.
8213 * server.h (struct buffer): New.
8214 (buffer_grow_str, buffer_grow_str0): New macros.
8215 (buffer_grow, buffer_free, buffer_init, buffer_finish)
8216 (buffer_xml_printf): Declare.
07e059b5 8217
4cab47ab
DE
82182008-11-24 Doug Evans <dje@google.com>
8219
8220 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
8221
f142445f
DJ
82222008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
8223
8224 * server.c (handle_v_run): Always use the supplied argument list.
8225
d0107bb6 82262008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 8227
d0107bb6
BW
8228 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
8229 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 8230
2c4ad781
TJB
82312008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
8232
8233 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
8234 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
8235 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
8236 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
8237 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
8238 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
8239 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
8240 XML target descriptions.
8241 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
8242 when inferior is running on an ISA 2.05 or later processor. Add
8243 special case to return offset for full 64-bit slot of FPSCR when
8244 in 32-bits.
8245
dfb64f85
DJ
82462008-11-14 Daniel Gutson <dgutson@codesourcery.com>
8247
8248 * Makefile.in (SFILES, clean): Added sparc64 files.
8249 (reg-sparc64.o, reg-sparc64.c): New.
8250 * configure.srv (sparc*-*-linux*): New configuration.
8251 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
8252 syscall arguments for SPARC.
8253 (regsets_store_inferior_registers): Likewise.
8254 * linux-sparc-low.c: New file.
8255
66b6e1dd
DE
82562008-10-21 Doug Evans <dje@google.com>
8257
8258 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
8259 (READLINE_DIR,READLINE_DEP): Delete.
8260 (INTERNAL_CFLAGS): Update.
8261 (LINTFLAGS): Update.
8262
9b710a42
PA
82632008-10-10 Pedro Alves <pedro@codesourcery.com>
8264
8265 * server.c (handle_v_run): If GDB didn't specify an argv, use the
8266 whole argv from the last run, not just argv[0].
8267
5822d809
PA
82682008-09-08 Pedro Alves <pedro@codesourcery.com>
8269
8270 * regcache.c (new_register_cache): Return NULL if the register
8271 cache size isn't known yet.
8272 (free_register_cache): Avoid dereferencing a NULL regcache.
8273
74aac56f
DJ
82742008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8275
8276 * configure.srv: Merge MIPS and MIPS64.
8277
400b20f5
MR
82782008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
8279
8280 * Makefile.in (uninstall): Apply $(EXEEXT) too.
8281
677c5bb1
LM
82822008-08-18 Luis Machado <luisgpm@br.ibm.com>
8283
8284 * Makefile.in: Add required vsx dependencies.
8285
8286 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
8287 Declare init_registers_powerpc_vsx32l.
8288 Declare init_registers_powerpc_vsx64l.
8289 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
8290 (ppc_arch_setup): Check for VSX in hwcap.
8291 (ppc_fill_vsxregset): New function.
8292 (ppc_store_vsxregset): New function.
8293 Add new VSX entry in regset_info target_regsets.
8294
8295 * configure.srv: Add new VSX dependencies.
8296
a6f3e723
SL
82972008-08-12 Pedro Alves <pedro@codesourcery.com>
8298
8299 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
8300 (remote_open): Set or clear transport_is_reliable.
8301 (putpkt_binary): Don't expect acks in noack mode.
8302 (getpkt): Don't send ack/nac in noack mode.
8303 * server.c (handle_general_set): Handle QStartNoAckMode.
8304 (handle_query): If connected by tcp pass QStartNoAckMode+ in
8305 qSupported.
8306 (main): Reset noack_mode on every connection.
8307 * server.h (noack_mode): Declare.
8308
a417dc56
RW
83092008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8310
8311 * Makefile.in (GDBREPLAY_OBS): New variable.
8312 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
8313
3221518c
UW
83142008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
8315 Daniel Jacobowitz <dan@codesourcery.com>
8316
8317 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
8318 (usr_store_inferior_registers): Likewise.
8319 (regsets_store_inferior_registers): Likewise.
8320
ec56be1b
PA
83212008-07-31 Rolf Jansen <rj@surtec.com>
8322 Pedro Alves <pedro@codesourcery.com>
8323
8324 * configure.ac: Check for memmem declaration.
8325 * server.c [HAVE_MALLOC_H]: Include malloc.h.
8326 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
8327 (disable_packet_qfThreadInfo): Unconditionally compile.
8328 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
8329 * configure, config.in: Regenerate.
8330
2fe5e3ff
DE
83312008-07-28 Doug Kwan <dougkwan@google.com>
8332
8333 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
8334 (linux_write_memory): Remove declaration of errno.
8335
836acd6d
UW
83362008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
8337
8338 * linux-low.c (handle_extended_wait): Do not use "status"
8339 variable uninitialized.
8340
aeba519e
PA
83412008-07-07 Pedro Alves <pedro@codesourcery.com>
8342
8343 * server.c (handle_v_attach): Inhibit reporting dll changes.
8344
db42f210
PA
83452008-06-27 Pedro Alves <pedro@codesourcery.com>
8346
8347 * remote-utils.c (prepare_resume_reply): If requested, don't
8348 output "thread:TID" in the T stop reply.
8349
8350 * server.c (disable_packet_vCont, disable_packet_Tthread)
8351 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
8352 (handle_query): If requested, disable support for qC, qfThreadInfo
8353 and qsThreadInfo.
8354 (handle_v_requests): If requested, disable support for vCont.
8355 (gdbserver_show_disableable): New.
8356 (main): Handle --disable-packet and --disable-packet=LIST.
8357
8358 * server.h (disable_packet_vCont, disable_packet_Tthread)
8359 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
8360
8e4c5421
CD
83612008-06-20 Carlos O'Donell <carlos@codesourcery.com>
8362
8363 * server.c (gdbserver_usage): Mention --version.
8364
6e23a804
DJ
83652008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
8366
8367 * Makefile.in (gdbreplay.o): New rule.
8368
90aa6a40
JM
83692008-06-06 Joseph Myers <joseph@codesourcery.com>
8370
8371 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
8372 message, not gdbserver.
8373
c16158bc 83742008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
8375 Nathan Sidwell <nathan@codesourcery.com>
8376 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
8377
8378 * acinclude.m4: Include ../../config/acx.m4.
8379 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
8380 * configure, config.in: Regenerate.
8381 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
8382 * server.c (gdbserver_version): Print PKGVERSION.
8383 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
8384 (main): Adjust gdbserver_usage calls.
8385 * gdbreplay.c (version, host_name): Add declarations.
8386 (gdbreplay_version, gdbreplay_usage): New.
8387 (main): Accept --version and --help options.
8388
aeb75bf5
DJ
83892008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
8390
8391 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
8392 (arm_breakpoint_at): Handle Thumb.
8393 (the_low_target): Add comment.
8394
76b233dd
UW
83952008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
8396
8397 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
8398
08388c79
DE
83992008-05-09 Doug Evans <dje@google.com>
8400
a3c83fae
DE
8401 * server.h (decode_search_memory_packet): Declare.
8402 * remote-utils.c (decode_search_memory_packet): New fn.
8403 * server.c (handle_search_memory_1): New fn.
08388c79
DE
8404 (handle_search_memory): New fn.
8405 (handle_query): Process qSearch:memory packets.
8406
bb9c3d36
UW
84072008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
8408
8409 * regcache.c (registers_length): Remove.
8410 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
8411 full register packet.
8412 * regcache.h (registers_length): Remove prototype.
8413 * server.h (PBUFSIZ): Define to 16384.
8414
7284e1be
UW
84152008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
8416
8417 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
8418 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
8419 powerpc-64l.o, and powerpc-altivec64l.o.
8420 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
8421 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
8422 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
8423 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
8424 rs6000/power-linux.xml, and rs6000/power64-linux.xml
8425 to srv_xmlfiles.
8426
8427 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
8428 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
8429 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
8430 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
8431 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
8432 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
8433 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
8434 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
8435 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
8436 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
8437 (clean): Update.
8438
8439 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
8440 (init_registers_powerpc_32l): ... this new prototype.
8441 (init_registers_powerpc_32): Remove, replace by ...
8442 (init_registers_powerpc_altivec32l): ... this new prototype.
8443 (init_registers_powerpc_e500): Remove, replace by ...
8444 (init_registers_powerpc_e500l): ... this new prototype.
8445 (init_registers_ppc64): Remove, replace by ...
8446 (init_registers_powerpc_64l): ... this new prototype.
8447 (init_registers_powerpc_64): Remove, replace by ...
8448 (init_registers_powerpc_altivec64l): ... this new prototype.
8449 (ppc_num_regs): Set to 73.
8450 (PT_ORIG_R3, PT_TRAP): Define if necessary.
8451 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
8452 (ppc_cannot_store_register): Handle orig_r3 and trap.
8453 (ppc_arch_setup): Update init_registers_... calls.
8454 (ppc_fill_gregset): Handle orig_r3 and trap.
8455
8456 * inferiors.c (clear_inferiors): Reset current_inferior.
8457
fdc59709
PB
84582008-04-23 Paolo Bonzini <bonzini@gnu.org>
8459
889bf7c5
PA
8460 * acinclude.m4: Add override.m4.
8461 * configure: Regenerate.
fdc59709 8462
c9b2f845
UW
84632008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8464
8465 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
8466 initial call to init_register_ppc64.
8467
550512b8
UW
84682008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8469
43aaf8b6
PA
8470 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
8471 single powerpc*-*-linux* case.
550512b8
UW
8472 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
8473
b6430ec3
UW
84742008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
8475
8476 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 8477 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
8478 from reg_xmlfiles.
8479 * linux-ppc-low.c: Include <elf.h>.
8480 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
8481 (ppc_hwcap): New global variable.
8482 (ppc_regmap): Remove __SPE__ #ifdef sections.
8483 (ppc_regmap_e500): New global variable.
8484 (ppc_cannot_store_register): Update __SPE__ special case.
8485 (ppc_get_hwcap): New function.
8486 (ppc_arch_setup): Use it to determine whether inferior supports
8487 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
8488 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
8489 Do not access registers if target does not support AltiVec.
8490 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
8491 Do not access registers if target does not support SPE.
8492 (target_regsets): Unconditionally include AltiVec and SPE regsets.
8493
52fa2412
UW
84942008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
8495
8496 * linux-low.c (disabled_regsets, num_regsets): New.
8497 (use_regsets_p): Delete.
8498 (linux_wait_for_process): Clear disabled_regsets.
8499 (regsets_fetch_inferior_registers): Check and set it.
8500 (regsets_store_inferior_registers): Likewise.
8501 (linux_fetch_registers, linux_store_registers): Do not use
8502 use_regsets_p.
8503 (initialize_low): Allocate disabled_regsets.
8504
e28b3332
DJ
85052008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
8506
8507 * Makefile.in (LIBOBJS): New.
8508 (OBS): Use LIBOBJS.
8509 (memmem.o): New rule.
8510 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
8511 * configure: Regenerated.
8512
4536995d
UW
85132008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
8514
8515 * server.c (handle_query): Never return "unsupported" for
8516 qXfer:features:read queries.
8517
221c031f
UW
85182008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
8519
8520 * server.c (get_features_xml): Fix inverted condition.
8521 (handle_query): Always support qXfer:feature:read.
8522
ccd213ac
DJ
85232008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
8524
8525 * server.c (wrapper_argv): New.
8526 (start_inferior): Handle wrapper_argv. If set, expect an extra
8527 trap.
8528 (gdbserver_usage): Document --wrapper.
8529 (main): Parse --wrapper.
8530
6fe305f7
UW
85312008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8532
8533 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
8534 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
8535 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
8536 (ppc_set_pc): Likewise.
8537 (ppc_arch_setup): New function.
8538 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
8539 of collect_register.
889bf7c5 8540 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 8541
5b0a002e
UW
85422008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8543
8544 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
8545 instead of linux-ppc64-low.o.
8546 * linux-ppc64-low.c: Remove file.
8547 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
8548 (linux-ppc64-low.o): Remove rule.
8549
8550 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
8551 (init_registers_powerpc_64): Likewise.
8552 (ppc_regmap): Conditionally define depending on __powerpc64__.
8553 (ppc_cannot_store_register): Do not special-case "fpscr" when
8554 compiled on __powerpc64__.
8555 (ppc_collect_ptrace_register): New function.
8556 (ppc_supply_ptrace_register): New function.
8557 (ppc_breakpoint): Change type to "unsigned int".
8558 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
8559 (the_low_target): Conditionally provide initializers for the
889bf7c5 8560 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
8561 collect_ptrace_register and supply_ptrace_register members.
8562
9b4b61c8
UW
85632008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8564
8565 * regcache.h (gdbserver_xmltarget): Add extern declaration.
8566 * server.c (gdbserver_xmltarget): Define.
8567 (get_features_xml): Use it to replace "target.xml" and arch_string.
8568
8569 * configure.srv: Remove srv_xmltarget. Add XML files that were
8570 mentioned there to srv_xmlfiles instead. Remove conditional tests
8571 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
8572 srv_xmlfiles and srv_regobj to include all possible choices.
8573 * configure.ac (srv_xmltarget): Remove.
8574 (srv_xmlfiles): Do not add "target.xml".
8575 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
8576 checks for supplementary target information.
8577 * configure: Regenerate.
8578 * Makefile.in (XML_TARGET): Remove.
8579 (target.xml): Remove rule.
8580 (clean): Do not clean up target.xml.
8581 (.PRECIOUS): Do not mention target.xml.
8582
8583 * target.h (struct target_ops): Remove arch_string member.
8584 * linux-low.c (linux_arch_string): Remove.
8585 (linux_target_ops): Remove arch_string initializer.
8586 * linux-low.h (struct linux_target_ops): Remove arch_string member.
8587 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
8588 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
8589 * spu-low.c (spu_arch_string): Remove.
8590 (spu_target_ops): Remove arch_string initializer.
8591 * win32-low.c (win32_arch_string): Remove.
8592 (win32_target_ops): Remove arch_string initializer.
8593 * win32-low.h (struct win32_target_ops): Remove arch_string member.
8594 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
8595 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
8596
ee1a7ae4
UW
85972008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8598
8599 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
8600 by collect_ptrace_register and supply_ptrace_register hooks.
8601 * linux-low.c (fetch_register): Use supply_ptrace_register callback
8602 instead of checking for the_low_target.left_pad_xfer.
8603 (usr_store_inferior_registers): Use collect_ptrace_register callback
8604 instead of checking for the_low_target.left_pad_xfer.
8605
8606 * linux-s390-low.c (s390_collect_ptrace_register): New function.
8607 (s390_supply_ptrace_register): Likewise.
8608 (s390_fill_gregset): Call s390_collect_ptrace_register.
8609 (the_low_target): Update.
8610
8611 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
8612 (ppc_supply_ptrace_register): Likewise.
8613 (the_low_target): Update.
8614
8615 * linux-i386-low.c (the_low_target): Update.
8616 * linux-x86-64-low.c (the_low_target): Update.
8617
d61ddec4
UW
86182008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8619
8620 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
8621 reg-s390.o and reg-s390x.o.
8622
8623 * linux-low.c (new_inferior): New global variable.
8624 (linux_create_inferior, linux_attach): Set it.
8625 (linux_wait_for_process): Call the_low_target.arch_setup after the
8626 target has stopped for the first time.
8627 (initialize_low): Do not call the_low_target.arch_setup.
8628
8629 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
8630 (s390_set_pc): Likewise.
8631 (s390_arch_setup): New function.
8632 (the_low_target): Use s390_arch_setup as arch_setup routine.
8633
8634 * regcache.c (realloc_register_cache): New function.
8635 (set_register_cache): Call it for each existing regcache.
8636
d05b4ac3
UW
86372008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8638
8639 * server.h (init_registers): Remove prototype.
8640
8641 * linux-low.h (struct linux_target_ops): Add arch_setup field.
8642 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
8643 instead of init_registers ().
8644 * linux-arm-low.c (init_registers_arm): Add prototype.
8645 (init_registers_arm_with_iwmmxt): Likewise.
8646 (the_low_target): Add initializer for arch_setup field.
8647 * linux-cris-low.c (init_registers_cris): Add prototype.
8648 (the_low_target): Add initializer for arch_setup field.
8649 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
8650 (the_low_target): Add initializer for arch_setup field.
8651 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
8652 (the_low_target): Add initializer for arch_setup field.
8653 * linux-ia64-low.c (init_registers_ia64): Add prototype.
8654 (the_low_target): Add initializer for arch_setup field.
8655 * linux-m32r-low.c (init_registers_m32r): Add prototype.
8656 (the_low_target): Add initializer for arch_setup field.
8657 * linux-m68k-low.c (init_registers_m68k): Add prototype.
8658 (the_low_target): Add initializer for arch_setup field.
8659 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
8660 (init_registers_mips64_linux): Likewise.
8661 (the_low_target): Add initializer for arch_setup field.
8662 * linux-ppc-low.c (init_registers_ppc): Add prototype.
8663 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
8664 (the_low_target): Add initializer for arch_setup field.
8665 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
8666 (init_registers_powerpc_64): Likewise.
8667 (the_low_target): Add initializer for arch_setup field.
8668 * linux-s390-low.c (init_registers_s390): Add prototype.
8669 (init_registers_s390x): Likewise.
8670 (the_low_target): Add initializer for arch_setup field.
8671 * linux-sh-low.c (init_registers_sh): Add prototype.
8672 (the_low_target): Add initializer for arch_setup field.
8673 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
8674 (the_low_target): Add initializer for arch_setup field.
8675 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
8676 (the_low_target): Add initializer for arch_setup field.
8677
8678 * win32-low.h (struct win32_target_ops): Add arch_setup field.
8679 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
8680 instead of init_registers ().
8681 * win32-arm-low.c (init_registers_arm): Add prototype.
8682 (the_low_target): Add initializer for arch_setup field.
8683 * win32-i386-low.c (init_registers_i386): Add prototype.
8684 (the_low_target): Add initializer for arch_setup field.
8685
8686 * spu-low.c (init_registers_spu): Add prototype.
8687 (initialize_low): Call initialie_registers_spu () instead of
8688 initialize_registers ().
8689
fd96d250
PA
86902008-02-19 Pedro Alves <pedro@codesourcery.com>
8691
8692 * server.c (handle_v_requests): When handling the vRun and vAttach
8693 packets, if already debugging a process, don't kill it. Return an
8694 error instead.
8695
d41b6bb4
DJ
86962008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
8697
8698 * server.c (handle_query): Correct length check.
8699
5ac588cf
PA
87002008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
8701
8702 * win32-low.c (do_initial_child_stuff): Add process handle
8703 parameter. Set current_process_handle and current_process_id from the
8704 parameters. Clear globals.
8705 (win32_create_inferior): Don't set current_process_handle and
8706 current_process_id here. Instead pass them on the call to
8707 do_initial_child_stuff.
8708 (win32_attach): Likewise.
8709 (win32_clear_inferiors): New.
8710 (win32_kill): Don't close the current process handle or the
8711 current thread handle here. Instead call win32_clear_inferiors.
8712 (win32_detach): Don't open a new handle to the process. Call
8713 win32_clear_inferiors.
8714 (win32_join): Don't rely on current_process_handle; open a new
8715 handle using the process id.
8716 (win32_wait): Call win32_clear_inferiors when the inferior process
8717 has exited.
8718
ecd7ecbc
DJ
87192008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
8720
8721 * server.c (monitor_show_help): Add "exit".
8722
1525d545
MG
87232008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
8724
ecd7ecbc 8725 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
8726 (clean): Add reg-xtensa.c.
8727 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
8728 * configure.srv (xtensa*-*-linux*) New target.
8729 * linux-xtensa-low.c: New.
8730 * xtensa-xtregs.c: New.
1525d545 8731
59a016f0
PA
87322008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
8733
8734 * hostio.c: Don't include errno.h.
8735 (errno_to_fileio_errno): Move to hostio-errno.
8736 * hostio.c: (hostio_error): Remove the error parameter. Defer the
8737 error number outputting to the target->hostio_last_error callback.
8738 (hostio_packet_error): Use FILEIO_EINVAL directly.
8739 (handle_open, handle_pread, hostio_error, handle_unlink): Update
8740 calls to hostio_error.
8741 * hostio-errno.c: New.
8742 * server.h (hostio_last_error_from_errno): Declare.
8743 * target.h (target_ops): Add hostio_last_error member.
8744 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
8745 as hostio_last_error handler.
889bf7c5 8746 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
8747 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
8748 (wince_hostio_last_error): New functions.
8749 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
8750 as hostio_last_error handler.
8751 (win32_target_ops) [!_WIN32_WCE]: Register
8752 hostio_last_error_from_errno as hostio_last_error handler.
8753 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
8754 (hostio-errno.o): New rule.
8755 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
8756 * configure.srv (srv_hostio_err_objs): New variable. Default to
8757 hostio-errno.o.
8758 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
8759 * configure: Regenerate.
8760
2d717e4f
DJ
87612008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8762
8763 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
8764 (linux_kill, linux_detach): Clean up the process list.
8765 * remote-utils.c (remote_open): Improve port number parsing.
8766 (putpkt_binary, input_interrupt): Only send interrupts if the target
8767 is running.
8768 * server.c (extended_protocol): Make static.
8769 (attached): Define earlier.
8770 (exit_requested, response_needed, program_argv): New variables.
8771 (target_running): New.
8772 (start_inferior): Clear attached here.
8773 (attach_inferior): Set attached here.
8774 (require_running): Define.
8775 (handle_query): Use require_running and target_running. Implement
8776 "monitor exit".
8777 (handle_v_attach, handle_v_run): New.
8778 (handle_v_requests): Use require_running. Handle vAttach and vRun.
8779 (gdbserver_usage): Update.
8780 (main): Redo argument parsing. Handle --debug and --multi. Handle
8781 --attach along with other options or after the port. Save
8782 program_argv. Support no initial program. Resynchronize
8783 communication with GDB after an error. Handle "monitor exit".
8784 Use require_running and target_running. Always allow the extended
8785 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
8786 restart in extended mode.
8787 * README: Refer to the GDB manual. Update --attach usage.
8788
7407e2de
AS
87892007-12-20 Andreas Schwab <schwab@suse.de>
8790
8791 * linux-low.c (STACK_SIZE): Define.
8792 (linux_tracefork_child): Use it. Use __clone2 on ia64.
8793 (linux_test_for_tracefork): Likewise.
8794
b65d95c5
DJ
87952007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
8796
8797 * linux-low.c (linux_wait_for_event): Update messages. Do not
8798 reinsert auto-delete breakpoints.
8799 * mem-break.c (struct breakpoint): Change return type of handler to
8800 int.
8801 (set_breakpoint_at): Update handler type.
8802 (reinsert_breakpoint_handler): Return 1 instead of calling
8803 delete_breakpoint.
8804 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
8805 setting a new one.
8806 (check_breakpoints): Delete auto-delete breakpoints and return 2.
8807 * mem-break.h (set_breakpoint_at): Update handler type.
8808 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
8809 * win32-low.c (auto_delete_breakpoint): New.
8810 (get_child_debug_event): Use it.
8811
4e799345
DJ
88122007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
8813
8814 * configure.ac: Check for pread and pwrite.
8815 * hostio.c (handle_pread): Fall back to lseek and read.
8816 (handle_pwrite): Fall back to lseek and write.
8817 * config.in, configure: Regenerated.
8818
27524b67
DJ
88192007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
8820
8821 * server.c (myresume): Add own_buf argument.
8822 (main): Update calls.
8823
a20d5e98
DJ
88242007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
8825
8826 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
8827 * remote-utils.c (remote_open): Do not call disable_async_io.
8828 (block_async_io): Delete.
8829 (unblock_async_io): Make static.
8830 (initialize_async_io): New.
8831 * server.c (handle_v_cont): Handle async I/O here.
8832 (myresume): Likewise. Move other common resume tasks here...
8833 (main): ... from here. Call initialize_async_io. Disable async
8834 I/O before the main loop.
8835 * server.h (initialize_async_io): Declare.
8836 (block_async_io, unblock_async_io): Delete prototypes.
8837 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
8838
b79d787e
DJ
88392007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
8840
8841 * remote-utils.c (readchar): Allow binary data in received messages.
8842
d97903b2
PA
88432007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8844
8845 * win32-low.c (attaching): New global.
8846 (win32_create_inferior): Clear the `attaching' global.
8847 (win32_attach): Set the `attaching' global.
8848 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
8849 attaching. Only set a breakpoint at the entry point if not
8850 attaching.
8851
311de423
PA
88522007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8853
8854 * server.c (main): Don't report dll events on the initial
8855 connection on attaches.
8856
6c2d16d2
PA
88572007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8858
8859 * server.c (main): Relax numerical bases supported for the pid of
8860 the --attach command line argument.
8861
5ca906e6
PA
88622007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8863
8864 * win32-low.c (win32_attach): Call OpenProcess before
8865 DebugActiveProcess, not after. Add last error output to error
8866 call.
8867
9c6c8194
PA
88682007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8869
8870 * win32-low.c (win32_get_thread_context)
8871 (win32_set_thread_context): New functions.
8872 (thread_rec): Use win32_get_thread_context.
8873 (continue_one_thread, win32_resume): Use win32_set_thread_context.
8874 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
8875 field.
8876
4d5d1aaa
PA
88772007-12-03 Leo Zayas
8878 Pedro Alves <pedro_alves@portugalmail.pt>
8879
8880 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
8881 global variables.
8882 (child_add_thread): Minor cleanup.
8883 (child_continue): Resume artificially suspended threads before
8884 calling ContinueDebugEvent.
8885 (suspend_one_thread): New.
8886 (fake_breakpoint_event): New.
8887 (get_child_debug_event): Change return type to int. Check here if
8888 gdb sent an interrupt request. If a soft interrupt was requested,
8889 fake a breakpoint event. Return 0 if there is no event to handle,
8890 and 1 otherwise.
8891 (win32_wait): Don't check here if gdb sent an interrupt request.
8892 Ensure there is a valid event to handle.
8893 (win32_request_interrupt): Add soft interruption method as last
8894 resort.
8895
c436e841
PA
88962007-12-03 Leo Zayas
8897 Pedro Alves <pedro_alves@portugalmail.pt>
8898
8899 * win32-low.h (win32_thread_info): Add descriptions to the
8900 structure members. Replace `suspend_count' counter by a
8901 `suspended' flag.
8902 * win32-low.c (thread_rec): Update condition of when to get the
8903 context from the inferior. Rely on ContextFlags being set if it
8904 has already been retrieved. Only suspend the inferior thread if
8905 we haven't already. Warn if that fails.
8906 (continue_one_thread): s/suspend_count/suspended/. Only call
8907 ResumeThread once. Warn if that fails.
8908
e7b5fa67
PA
89092007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
8910
8911 * win32-low.c (win32_wait): Don't read from the inferior when it
8912 has already exited.
8913
a385171d
PA
89142007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
8915
8916 * Makefile.in (win32_low_h): New variable.
8917 (win32-low.o): Add dependency on $(win32_low_h).
8918 (win32-arm-low.o, win32-i386-low.o): New rules.
8919
f80c84b3
DJ
89202007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
8921
8922 * hostio.c: Correct copyright year.
8923
a6b151f1
DJ
89242007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
8925
8926 * Makefile.in (OBS): Add hostio.o.
8927 (hostio.o): New rule.
8928 * server.h (handle_vFile): Declare.
8929 * hostio.c: New file.
8930 * server.c (handle_v_requests): Take packet_len and new_packet_len
8931 for binary packets. Call handle_vFile.
8932 (main): Update call to handle_v_requests.
8933
f9387fc3
DJ
89342007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
8935
8936 * linux-low.c: Include <sched.h>.
8937
51c2684e
DJ
89382007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
8939
8940 * linux-low.c (linux_tracefork_grandchild): New.
8941 (linux_tracefork_child): Use clone.
8942 (linux_test_for_tracefork): Use clone; allocate and free a stack.
8943
75f83163
JB
89442007-10-31 Joel Brobecker <brobecker@adacore.com>
8945
8946 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
8947
da5898ce
DJ
89482007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
8949
8950 * linux-low.c (handle_extended_wait): Handle unexpected signals.
8951
24a09b5f
DJ
89522007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
8953
8954 * inferiors.c (change_inferior_id): Delete.
8955 (add_pid_to_list, pull_pid_from_list): New.
8956 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
8957 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
8958 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
8959 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
8960 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
8961 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
8962 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
8963 (using_threads): Always set to 1.
8964 (handle_extended_wait): New.
8965 (add_process): Do not set TID.
8966 (linux_create_inferior): Set must_set_ptrace_flags.
8967 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
8968 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
8969 (linux_thread_alive): Rename TID argument to LWPID.
8970 (linux_wait_for_process): Handle unknown processes. Do not use TID.
8971 (linux_wait_for_event): Do not use TID or check using_threads. Update
8972 call to dead_thread_notify. Call handle_extended_wait.
8973 (linux_create_inferior): Use PTRACE_SETOPTIONS.
8974 (send_sigstop): Delete sigstop_sent.
8975 (wait_for_sigstop): Avoid TID.
8976 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
8977 (linux_test_for_tracefork): New.
8978 (linux_lookup_signals): Use thread_db_active and
8979 linux_supports_tracefork_flag.
8980 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
8981 * linux-low.h (get_process_thread): Avoid TID.
8982 (struct process_ifo): Move thread_known and tid to the end. Remove
8983 sigstop_sent.
8984 (linux_attach_lwp, thread_db_init): Update prototypes.
8985 * server.h (change_inferior_id): Delete prototype.
8986 (add_pid_to_list, pull_pid_from_list): New prototypes.
8987 * thread-db.c (thread_db_use_events): New.
8988 (find_first_thread): Rename to...
8989 (find_one_thread): ...this. Update callers and messages. Do not
8990 call fatal. Check thread_db_use_events. Do not call
8991 change_inferior_id or new_thread_notify.
8992 (maybe_attach_thread): Update. Do not call new_thread_notify.
8993 (thread_db_init): Set thread_db_use_events. Check use_events.
8994 * utils.c (fatal, warning): Correct message prefix.
8995
30ed0a8f
DJ
89962007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
8997
8998 * Makefile.in (clean): Remove new files.
8999 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
9000 (powerpc-64.o, powerpc-64.c): New rules.
9001 * configure.srv: Use alternate register sets for powerpc64-*-linux*
9002 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
9003 with SPE.
9004 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
9005 SPE targets.
9006 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
9007 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
9008 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
9009 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
9010 (target_regsets): Add AltiVec and SPE register sets.
9011 * configure.ac: Check for AltiVec and SPE.
9012 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
9013 (ppc_fill_vrregset, ppc_store_vrregset): New.
9014 (target_regsets): Add AltiVec register set.
9015 * configure: Regenerated.
9016
fd462a61
DJ
90172007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
9018
9019 * linux-low.c (O_LARGEFILE): Define.
9020 (linux_read_memory): Use /proc/PID/mem.
9021 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
9022 * configure, config.in: Regenerated.
9023
69f223ed
DJ
90242007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9025
9026 * linux-low.c (linux_wait_for_event): Do not pass signals while
9027 single-stepping.
9028
aec18585
PA
90292007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9030
9031 * win32-low.c (create_process): New.
9032 (win32_create_inferior): Use create_process instead of
9033 CreateProcess. If create_process failed retry appending an ".exe"
9034 suffix. Store the GetLastError result immediatelly after
9035 create_process calls and use it on the call to error.
9036
34d86ddd
PA
90372007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9038
9039 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
9040
5a0e3bd0
JB
90412007-08-23 Joel Brobecker <brobecker@adacore.com>
9042
9043 * configure.ac: Switch license to GPLv3.
9044
f88c79e6
MS
90452007-08-01 Michael Snyder <msnyder@access-company.com>
9046
9047 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
9048
6b3d9b83
PA
90492007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
9050
9051 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
9052 typedef.
9053 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
9054 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
9055 CloseToolhelp32Snapshot.
9056 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9057 CloseToolhelp32Snapshot.
9058
c588c53c
MS
90592007-07-27 Michael Snyder <michael.snyder@access-company.com>
9060
9061 * server.c (main): Check for inferior exit before main loop.
9062
aa0403d9
PA
90632007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
9064
9065 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
9066 instead of on tmp_desc.
9067
255e7678
DJ
90682007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
9069 Daniel Jacobowitz <dan@codesourcery.com>
9070
9071 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
9072 (add_thread): Minor cleanups.
9073 (clear_inferiors): Move lower in the file. Clear the DLL
9074 list.
9075 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9076 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9077 (xml_escape_text): New.
9078 * server.c (handle_query): Handle qXfer:libraries:read. Report it
9079 for qSupported.
9080 (handle_v_cont): Report errors.
9081 (gdbserver_version): Update.
9082 (main): Correct size of own_buf. Do not report initial DLL events.
9083 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9084 (unloaded_dll, xml_escape_text): New.
9085 * win32-low.c (enum target_waitkind): Update comments.
9086 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9087 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9088 (win32_EnumProcessModules, win32_GetModuleInformation)
9089 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9090 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9091 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9092 (win32_Module32First, win32_Module32Next, load_toolhelp)
9093 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
9094 (get_child_debug_event): Handle DLL events.
9095 (win32_wait): Likewise.
9096
0d37add9
DJ
90972007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9098
9099 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
9100 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
9101
45e2715e
PA
91022007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9103
9104 * win32-low.c (handle_output_debug_string): Ignore event if not
9105 waiting.
9106
c5674cf1
PA
91072007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9108
9109 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9110
2bbe3cc1
DJ
91112007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9112
9113 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9114
ae13219e
DJ
91152007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9116
9117 * inferiors.c (change_inferior_id): Add comment.
9118 * linux-low.c (check_removed_breakpoint): Add an early
9119 prototype. Improve debug output.
9120 (linux_attach): Doc update.
9121 (linux_detach_one_process, linux_detach): Clean up before releasing
9122 each process.
9123 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9124 * linux-low.h (struct process_info): Doc improvement.
9125 * mem-break.c (delete_all_breakpoints): New.
9126 * mem-break.h (delete_all_breakpoints): New prototype.
9127 * thread-db.c (find_first_thread): New.
9128 (thread_db_create_event): Call it instead of
9129 thread_db_find_new_threads. Clean up unused variables.
9130 (maybe_attach_thread): Remove first thread handling.
9131 (thread_db_find_new_threads): Use find_first_thread.
9132 (thread_db_get_tls_address): Likewise.
9133
4105de34
DJ
91342007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9135
9136 * thread-db.c (thread_db_find_new_threads): Add prototype.
9137 (thread_db_create_event): Check for the main thread before adding
9138 a new thread.
9139 (maybe_attach_thread): Only enable event reporting if TID == 0.
9140 (thread_db_get_tls_address): Check for new threads.
9141
2b876972
DJ
91422007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
9143
9144 * linux-low.c (linux_create_inferior): Try execv before execvp.
9145 * spu-low.c (spu_create_inferior): Likewise.
9146
7a245884
DJ
91472007-06-13 Mike Frysinger <vapier@gentoo.org>
9148
9149 * linux-low.c (linux_create_inferior): Change execv to execvp.
9150 * spu-low.c (spu_create_inferior): Likewies.
9151
117ce543
DJ
91522007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
9153
9154 * Makefile.in (clean): Clean new files instead of deleted ones.
9155 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9156 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9157 rules.
9158 * configure.srv: Specify XML files and new regformats for MIPS and
9159 MIPS64 GNU/Linux.
9160 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9161 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9162 an entry for the restart register.
9163 (mips_cannot_fetch_register, mips_cannot_store_register)
9164 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9165 register names to match the XML descriptions.
9166 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9167 restart register instead of $0.
9168
0e7f50da
UW
91692007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9170 Markus Deuling <deuling@de.ibm.com>
9171
9172 * remote-utils.c (decode_xfer_write): New function.
9173 * server.h (decode_xfer_write): Add prototype.
9174 * server.c (handle_query): Add PACKET_LEN argument. Support
9175 qXfer:spu:read and qXfer:spu:write packets.
9176 (main): Pass packet_len to handle_query.
9177 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9178 * target.h (target_ops): Add qxfer_spu.
9179
374c1d38
UW
91802007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9181
9182 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
9183 accessing non-seekable spufs files.
9184
bb63802a
UW
91852007-05-16 Markus Deuling <deuling@de.ibm.com>
9186
889bf7c5 9187 * server.c (handle_query): Add reply for qC packet.
bb63802a 9188
7390519e
PA
91892007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9190 Leo Zayas <lerele@champenstudios@com>
9191
9192 * server.h (check_remote_input_interrupt_request): New function.
9193 * remote_utils.c (INVALID_DESCRIPTOR): New define.
9194 (remote_desc): Initialize with INVALID_DESCRIPTOR.
9195 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
9196 (check_remote_input_interrupt_request): New function.
9197 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 9198 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
9199 winapi_GenerateConsoleCtrlEvent): New typedefs.
9200 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
9201 to 250 ms.
9202 (win32_wait): Check for remote interrupt request
9203 with check_remote_input_interrupt_request.
9204 (win32_request_interrupt): New function.
9205 (win32_target_op): Set request_interrupt to win32_request_interrupt.
9206
34b34921
PA
92072007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9208
9209 * win32-low.c (debug_registers_changed,
9210 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
9211 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
9212 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
9213 (thread_rec): Get context using the low target.
9214 (child_add_thread): Call thread_added on the low target,
9215 which does the same thing.
9216 (regptr): Delete.
9217 (do_initial_child_stuff): Remove debug registers references.
9218 Set context using the low target. Resume threads after
9219 setting the contexts.
9220 (child_continue): Remove dead variable. Remove debug
9221 registers references.
9222 (child_fetch_inferior_registers): Go through the low target.
9223 (do_child_store_inferior_registers): Remove.
9224 (child_store_inferior_registers): Go through the low target.
9225 (win32_resume): Remove debug registers references.
9226 Set context using the low target.
9227 (handle_exception): Change return type to void. Don't record
9228 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
9229 first chance exception.
889bf7c5 9230 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
9231 goto loop. Always return after waiting for debug event.
9232 (win32_wait): Convert to switch statement. Handle spurious
9233 events.
9234
9235 * win32-i386-low.c (debug_registers_changed,
9236 debug_registers_used): New.
9237 (initial_stuff): Rename to ...
9238 (i386_initial_stuff): ... this. Clear debug registers
9239 state variables.
9240 (store_debug_registers): Delete.
9241 (i386_get_thread_context): New.
9242 (load_debug_registers): Delete.
9243 (i386_set_thread_context): New.
9244 (i386_thread_added): New.
9245 (single_step): Rename to ...
9246 (i386_single_step): ... this.
9247 (do_fetch_inferior_registers): Rename to ...
9248 (i386_fetch_inferior_register): ... this.
9249 (i386_store_inferior_register): New.
9250 (the_low_target): Adapt to new interface.
9251
9252 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
9253 (arm_get_thread_context): New.
9254 (arm_set_thread_context): New.
9255 (regptr): New.
9256 (do_fetch_inferior_registers): Rename to ...
9257 (arm_fetch_inferior_register): ... this.
9258 (arm_store_inferior_register): New.
9259 (arm_wince_breakpoint): Reimplement as unsigned long.
9260 (arm_wince_breakpoint_len): Define.
9261 (the_low_target): Adapt to new interface.
9262
9263 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
9264 load_debug_registers. Add get_thread_context, set_thread_context,
9265 thread_added and store_inferior_register. Rename
9266 fetch_inferior_registers to fetch_inferior_register.
9267 (regptr): Remove declaration.
9268
dd6953e1
PA
92692007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9270
9271 * linux-low.c (linux_detach): Change return type to int. Return 0.
9272 * spu-low.c (spu_detach): Likewise.
9273
444d6139
PA
92742007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9275
9276 * target.h (target_ops): Change return type of detach to int.
9277 Add join.
9278 (join_inferior): New.
9279 * server.c (main): Don't skip detach support on mingw32.
9280 If the inferior doesn't support detaching return error.
9281 Call join_inferior instead of using waitpid.
9282 * linux-low.c (linux_join): New.
9283 (linux_target_op): Add linux_join.
9284 * spu-low.c (spu_join): New.
9285 (spu_target_ops): Add spu_join.
9286 * win32-low.c (win32_detach): Adapt to new interface.
9287 Reopen current_process_handle before detaching. Issue a child
9288 resume before detaching.
9289 (win32_join): New.
9290 (win32_target_op): Add win32_join.
9291
1d5315fe
PA
92922007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9293
9294 * win32-low.c (win32-attach): Fix return value.
9295 * target.h (target_ops): Describe ATTACH return values.
9296
bf914831
PA
92972007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9298
9299 * win32-low.c (GETPROCADDRESS): Define.
9300 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
9301 (winapi_DebugSetProcessKillOnExit): Likewise.
9302 (win32_create_inferior): Force usage of ansi CreateProcessA.
9303 (win32_attach): Use GETPROCADDRESS.
9304 (win32_detach): Likewise.
9305
f72f3e60
PA
93062007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9307
9308 * win32-low.c (win32_wait): Don't use WSTOPSIG.
9309
ed50f18f
PA
93102007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
9311
9312 * win32-low.c: Commit leftover changes from 2007-03-29.
9313
0c2ead7e
DJ
93142007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9315
9316 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
9317 fields short instead of int. Add explicit padding.
9318 (i387_cache_to_fsave): Remove unnecessary casts.
9319 (i387_fsave_to_cache): Doc fix.
9320 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
9321
73725ff3
DJ
93222007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9323
9324 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
9325 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
9326
d99f33d8
PA
93272007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9328
9329 * configure.srv (arm*-*-mingw32ce*): Move near the other
9330 arm targets.
9331
68070c10
PA
93322007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9333
2482afc6 9334 * configure.ac: Add errno checking.
68070c10
PA
9335 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
9336 sys/file.h and malloc.h.
9337 (AC_CHECK_DECLS): Add perror.
9338 (srv_mingwce): Handle.
2482afc6 9339 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
9340 win32-i386-low.o to srv_tgtobj.
9341 (i[34567]86-*-mingw*): Likewise.
9342 (arm*-*-mingw32ce*): Add case.
9343 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9344 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
9345 [__MINGW32CE__] (strerror): New function.
9346 [__MINGW32CE__] (errno): Define to GetLastError.
9347 [__MINGW32CE__] (COUNTOF): New macro.
9348 (remote_open): Remove extra close call.
9349 * mem-break.c (delete_breakpoint_at): New function.
9350 * mem-break.h (delete_breakpoint_at): Declare.
9351 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9352 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
9353 [USE_WIN32API] (read, write): Add char* casts.
9354 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
9355 * server.h: Include wincecompat.h on Windows CE.
9356 [HAVE_ERRNO_H]: Check.
9357 (perror): Declare if not declared.
9358 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
9359 (perror_with_name): Remove errno declaration.
9360 * wincecompat.h: New.
9361 * wincecompat.c: New.
9362 * win32-low.h: New.
9363 * win32-arm-low.c: New.
9364 * win32-i386-low.c: New.
9365 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
9366 (OUTMSG2): Make it safe.
9367 (_T): New macro.
9368 (COUNTOF): New macro.
9369 (NUM_REGS): Get it from the low target.
9370 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
9371 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
9372 (thread_rec): Let low target handle debug registers.
9373 (child_add_thread): Likewise.
9374 (child_init_thread_list): Likewise.
9375 (continue_one_thread): Likewise.
9376 (regptr): New.
9377 (do_child_fetch_inferior_registers): Move to ...
9378 * win32-i386-low.c: ... here, and rename to ...
9379 (do_fetch_inferior_registers): ... this.
889bf7c5 9380 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
9381 Go through the low target.
9382 (do_child_store_inferior_registers): Use regptr.
9383 (strwinerror): New function.
9384 (win32_create_inferior): Handle Windows CE.
9385 Use strwinerror instead of strerror on Windows error
9386 codes. Add program to the error output.
9387 Don't close the main thread handle on Windows CE.
9388 (win32_attach): Use coredll.dll on Windows CE.
9389 (win32_kill): Close current process and current
9390 thread handles.
9391 (win32_detach): Use coredll.dll on Windows CE.
9392 (win32_resume): Let low target handle debug registers, and
9393 step request.
9394 (handle_exception): Add/Remove initial breakpoint. Avoid
9395 non-existant WSTOPSIG on Windows CE.
9396 (win32_read_inferior_memory): Cast to remove warning.
9397 (win32_arch_string): Go through the low target.
9398 (initialize_low): Call set_breakpoint_data with the low
9399 target's breakpoint.
9400 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
9401 FOP_REGNUM, mappings): Move to ...
9402 * win32-i386-low.c: ... here.
9403 * win32-low.c (win32_thread_info): Move to ...
9404 * win32-low.h: ... here.
9405 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
9406 win32-arm-low.c and wincecompat.c.
9407 (all:): Add $EXEEXT.
9408 (install-only:): Likewise.
9409 (gdbserver:): Likewise.
9410 (gdbreplay:): Likewise.
9411 * config.in: Regenerate.
9412 * configure: Regenerate.
9413
41093d81
PA
94142007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9415
9416 * win32-low.c: Rename typedef thread_info to
9417 win32_thread_info throughout.
9418
544afa54
PA
94192007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9420
9421 * win32-i386-low.c: Rename to ...
9422 * win32-low.c: ... this.
9423 * configure.srv: Replace win32-i386-low.o with win32-low.o.
9424 * Makefile.in: Likewise.
9425
bce7165d
PA
94262007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
9427
9428 * remote-utils.c (monitor_output): Constify msg parameter.
9429 * server.h (monitor_output): Likewise.
9430 * win32-i386-low.c (handle_output_debug_string): New.
9431 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
9432 handle_output_debug_string.
9433 (get_child_debug_event): Likewise.
9434
506c7aa0
DJ
94352007-03-27 Mat Hostetter <mat@lcs.mit.edu>
9436
9437 * server.c (main): Correct strtoul check.
9438
42c81e2a
DJ
94392007-03-27 Jon Ringle <jon@ringle.org>
9440
9441 * linux-low.c: Check __ARCH_HAS_MMU__ also.
9442
9453113a
DJ
94432007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
9444
9445 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
9446
64a69107
DJ
94472007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
9448
9449 * terminal.h: Check HAVE_SGTTY_H.
9450
94512007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
9452
9453 * remote-utils.c (remote_open): Print out the assigned port number.
9454
c74d0ad8
DJ
94552007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
9456
9457 * remote-utils.c (monitor_output): New function.
9458 * server.c (debug_threads): Define here.
9459 (monitor_show_help): New function.
9460 (handle_query): Handle qRcmd.
9461 (main): Do not handle 'd' packet.
9462 * server.h (debug_threads, remote_debug, monitor_output): Declare.
9463 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
9464 of debug_threads.
9465
de7c3b4a
PA
94662007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9467
9468 * Makefile.in (EXEEXT): New.
9469 (clean): Use $(EXEEXT).
9470
ef57601b
PA
94712007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9472
9473 * target.h (target_ops): Rename send_signal to request_interrupt,
9474 and remove enum target_signal parameter.
9475 * linux-low.c (linux_request_interrupt): Rename from
9476 linux_send_signal, and always send SIGINT.
9477 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
9478 and always send SIGINT.
9479 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
9480 of send_signal.
9481 (input_interrupt): Likewise.
9482
820f2bda
PA
94832007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9484
9485 * server.c (get_features_xml): Check if target implemented
9486 arch_string.
9487 * win32-i386-low.c (win32_arch_string): New.
9488 (win32_target_ops): Add win32_arch_string as arch_string member.
9489
ab39bf24
UW
94902007-02-22 Markus Deuling <deuling@de.ibm.com>
9491
9492 * spu-low.c (spu_arch_string): New.
9493 (spu_target_ops): Add spu_arch_string.
9494
61ff6e04
DJ
94952007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
9496
9497 * remote-utils.c: Remove HAVE_TERMINAL_H check.
9498 * configure.ac: Do not check for terminal.h.
9499 * configure, config.in: Regenerated.
9500
fb1e4ffc
DJ
95012007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9502
9503 * Makefile.in (OBS): Add $(XML_BUILTIN).
9504 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
9505 (clean): Update.
9506 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
9507 (arm-with-iwmmxt.c): New.
9508 * config.in, configure: Regenerate.
9509 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
9510 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
9511 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
9512 (arm*-*-linux*): Add iWMMXt and regset support.
9513 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
9514 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
9515 (arm_store_wmmxregset, target_regsets): New.
9516 * server.c (get_features_xml): Take annex argument. Check builtin
9517 XML documents.
9518 (handle_query): Handle multiple annexes.
9519
0f48aa01
DJ
95202007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9521
9522 * remote-utils.c [USE_WIN32API] (read, write): Define.
9523 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
9524 write.
9525
23181151
DJ
95262007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
9527
9528 * linux-i386-low.c (the_low_target): Set arch_string.
9529 * linux-x86-64-low.c (the_low_target): Likewise.
9530 * linux-low.c (linux_arch_string): New.
9531 (linux_target_ops): Add it.
9532 * linux-low.h (struct linux_target_ops): Add arch_string.
9533 * server.c (write_qxfer_response): Use const void * for DATA.
9534 (get_features_xml): New.
9535 (handle_query): Handle qXfer:features:read. Report it for qSupported.
9536 * target.h (struct target_ops): Add arch_string method.
9537
9d606399
DJ
95382007-01-03 Denis Pilat <denis.pilat@st.com>
9539 Daniel Jacobowitz <dan@codesourcery.com>
9540
9541 * linux-low.c (linux_kill): Handle being called with no threads.
9542 * win32-i386-low.c (win32_kill): Likewise.
9543 (get_child_debug_event): Clear current_process_handle.
9544
95452006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
9546 Daniel Jacobowitz <dan@codesourcery.com>
9547
9548 * remote-utils.c (remote_open): Check the type of specified
9549 serial port devices before opening them.
9550 * server.c (main): Kill the inferior if an error occurs during
9551 the first remote_open.
9552
a5e13d24
DJ
95532006-12-05 Markus Deuling <deuling@de.ibm.com>
9554
9555 * README: Update supported targets.
9556
186947f7
DJ
95572006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
9558
9559 * Makefile.in (clean): Remove reg-mips64.c.
9560 (reg-mips64.c, reg-mips64.o): New rules.
9561 * configure.srv: Handle mips64. Include regset support for mips.
9562 * linux-mips-low.c (union mips_register): New.
9563 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
9564 (mips_breakpoint, mips_breakpoint_at): Use int.
9565 (mips_collect_register, mips_supply_register)
9566 (mips_collect_register_32bit, mips_supply_register_32bit)
9567 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9568 (mips_store_fpregset, target_regsets): New.
9569 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
9570
a13e2c95
UW
95712006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
9572
9573 * configure.srv: Add target "spu*-*-*".
9574 * Makefile.in (clean): Remove reg-spu.c.
9575 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
9576 * spu-low.c: New file.
9577
cb7283db
DJ
95782006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9579
9580 * configure.ac: Correct td_thr_tls_get_addr test.
9581 * configure: Regenerated.
9582
89be2091
DJ
95832006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9584
9585 * linux-low.c (linux_wait_for_event): Reformat. Use the
9586 pass_signals array.
9587 * remote-utils.c (decode_address_to_semicolon): New.
9588 * server.c (pass_signals, handle_general_set): New.
9589 (handle_query): Mention QPassSignals for qSupported.
9590 (main): Call handle_general_set.
9591 * server.h (pass_signals, decode_address_to_semicolon): New.
9592
000ef4f0
DJ
95932006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
9594
9595 * server.c (handle_query): Correct error handling for read_auxv.
9596
b7149293
UW
95972005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
9598
9599 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
9600 and srv_linux_thread_db to yes.
9601 * linux-s390-low.c (s390_fill_gregset): New function.
9602 (target_regsets): Define data structure.
9603
dae5f5cf
DJ
96042006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
9605
9606 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
9607 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
9608 * config.in, configure: Regenerated.
9609 * inferiors.c (gdb_id_to_thread): New function.
9610 (gdb_id_to_thread_id): Use it.
9611 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
9612 * linux-low.h (struct process_info): Add th member.
9613 (thread_db_get_tls_address): New prototype.
9614 * remote-utils.c (decode_address): Make non-static.
9615 * server.c (handle_query): Handle qGetTLSAddr.
9616 * server.h (gdb_id_to_thread, decode_address): New prototypes.
9617 * target.h (struct target_ops): Add get_tls_address.
9618 * thread-db.c (maybe_attach_thread): Save the thread handle.
9619 (thread_db_get_tls_address): New.
9620
32ca6d61
DJ
96212006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
9622
9623 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
9624 (linux_resume_one_process): Take a siginfo_t *. Update all
9625 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
9626 (struct pending_signals): Add a siginfo_t.
9627 (linux_wait_for_process): Always set last_status.
9628 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
9629 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
9630 * linux-low.h (struct process_info): Add last_status.
9631
5ffff7c1
DJ
96322006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
9633
9634 * remote-utils.c (try_rle): New function.
9635 (putpkt_binary): Use it.
9636
8695c747
DJ
96372006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
9638
9639 * Makefile.in (clean): Clean reg-x86-64-linux.c.
9640 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
9641 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
9642 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
9643 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
9644 point registers.
9645
290fadea
RS
96462006-08-08 Richard Sandiford <richard@codesourcery.com>
9647
9648 * server.c (terminal_fd): New variable.
9649 (old_foreground_pgrp): Likewise.
9650 (restore_old_foreground_pgrp): New function.
9651 (start_inferior): Record the terminal file descriptor in terminal_fd
9652 and its original foreground group in old_foreground_pgrp. Register
9653 restore_old_foreground_pgrp with atexit().
9654
9f2e1e63
DJ
96552006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
9656
9657 * server.c (handle_query): Correct qPart to qXfer.
9658
b80864fb
DJ
96592006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
9660
9661 * configure.ac: Check for more headers which are missing on
9662 Windows. Automatically supply -lwsock32 and USE_WIN32API.
9663 * configure.srv: Add Cygwin and mingw32.
9664 * remote-utils.c: Don't include headers unconditionally which
9665 are missing on mingw32. Include <winsock.h> for mingw32.
9666 (remote_open): Adjust for mingw32 support. Flush
9667 standard error after writing to it.
9668 (remote_close, putpkt_binary, input_interrupt, block_async_io)
9669 (unblock_async_io, enable_async_io, disable_async_io)
9670 (readchar, getpkt): Update for Winsock support.
9671 (prepare_resume_reply): Expect a protocol signal number.
9672 * server.c: Disable <sys/wait.h> on mingw32.
9673 (start_inferior): Adjust for mingw32 support. Flush
9674 standard error after writing to it.
9675 (attach_inferior): Likewise. Use protocol signal
9676 numbers.
9677 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
9678 and names.
9679 * win32-i386-low.c: New file.
9680 * Makefile.in (XM_CLIBS): Set.
9681 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
9682 (win32-i386-low.o): New dependency rule.
9683 * linux-low.c (linux_wait): Use target signal numbers.
9684 * target.h (struct target_ops): Doc fix.
9685 * server.h (target_signal_to_name): New prototype.
9686 * gdbreplay.c: Don't include headers unconditionally which
9687 are missing on mingw32. Include <winsock.h> for mingw32.
9688 (remote_close, remote_open): Adjust for Winsock support.
9689 * configure, config.in: Regenerated.
9690
0876f84a
DJ
96912006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9692
9693 * server.c (decode_xfer_read, write_qxfer_response): New.
9694 (handle_query): Take a packet length argument. Handle
9695 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
9696 the qSupported response.
9697 (main): Update call to handle_query.
9698
01f9e8fa
DJ
96992006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
9700
9701 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
9702 (putpkt_binary): Renamed from putpkt and adjusted for binary
9703 data.
9704 (putpkt): New wrapper for putpkt_binary.
9705 (readchar): Don't mask off the high bit.
9706 (decode_X_packet): New function.
9707 * server.c (main): Call putpkt_binary if a handler sets the packet
9708 length. Save the length of the incoming packet. Handle 'X'.
9709 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
9710
be2a5f71
DJ
97112006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
9712
9713 * server.c (handle_query): Handle qSupported.
9714
ea025f5f
DJ
97152006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9716
9717 * remote-utils.c (all_symbols_looked_up): New variable.
9718 (look_up_one_symbol): Check it.
9719 * server.h (look_up_one_symbol): New declaration.
9720 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
9721
9308fc88
DJ
97222006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9723
9724 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 9725 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
9726 (PTRACE_GET_THREAD_AREA): Define.
9727 (ps_get_thread_area): New function.
9728
52fb6437
NS
97292006-05-09 Nathan Sidwell <nathan@codesourcery.com>
9730
9731 * configure.srv (m68k*-*-uclinux*): New target.
9732 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
9733 (linux_resume_one_process): Remove extraneous cast.
9734 (linux_read_offsets): New.
9735 (linux_target_op): Add linux_read_offsets on mmuless systems.
9736 * server.c (handle_query): Add qOffsets logic.
9737 * target.h (struct target_ops): Add read_offsets.
9738
21b0f40c
DJ
97392006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
9740
9741 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
9742 (PTRACE_GET_THREAD_AREA): Define.
9743 (ps_get_thread_area): New function.
9744 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
9745 (linux-x86-64-low.o): Update.
9746
0050a760
DJ
97472006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
9748
9749 * configure.ac: Remove checks for prfpregset_t.
9750 * gdb_proc_service.h: New file.
9751 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
9752 new "gdb_proc_service.h".
9753 * proc-service.c: Likewise.
9754 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
9755 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
9756 * Makefile.in (gdb_proc_service_h): Updated.
9757 * configure, config.in: Regenerated.
9758
b92a518e
DJ
97592006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
9760
9761 * remote-utils.c (prepare_resume_reply): Move declaration
9762 of gdb_id_from_wait to the top of the block.
9763
545587ee
DJ
97642006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
9765
9766 * linux-low.c (regsets_store_inferior_registers): Read the regset
9767 from the target before filling it.
9768
9db87ebd
DJ
97692006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9770
9771 * server.c (attach_inferior): Return SIGTRAP for a successful
9772 attach.
9773
dd24457d
DJ
97742006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9775
9776 * Makefile.in (OBS): Add version.o.
9777 (STAGESTUFF): Delete.
9778 (version.o): Add dependencies.
9779 (version.c): Replace rule.
9780 (clean): Remove version.c.
9781 * server.c (gdbserver_version): New.
9782 (gdbserver_usage): Use printf.
9783 (main): Handle --version and --help.
9784 * server.h (version, host_name): Add declarations.
9785
6f0f660e
EZ
97862005-12-23 Eli Zaretskii <eliz@gnu.org>
9787
889bf7c5
PA
9788 * linux-arm-low.c:
9789 * linux-arm-low.c:
9790 * inferiors.c:
9791 * i387-fp.h:
9792 * i387-fp.c:
9793 * gdbreplay.c:
9794 * regcache.c:
9795 * proc-service.c:
9796 * mem-break.h:
9797 * mem-break.c:
9798 * linux-x86-64-low.c:
9799 * linux-sh-low.c:
9800 * linux-s390-low.c:
9801 * linux-ppc64-low.c:
9802 * linux-ppc-low.c:
9803 * linux-mips-low.c:
9804 * linux-m68k-low.c:
9805 * linux-m32r-low.c:
9806 * linux-low.h:
9807 * linux-low.c:
9808 * linux-ia64-low.c:
9809 * linux-i386-low.c:
9810 * linux-crisv32-low.c:
9811 * thread-db.c:
9812 * terminal.h:
9813 * target.h:
9814 * target.c:
9815 * server.h:
9816 * server.c:
9817 * remote-utils.c:
9818 * regcache.h:
9819 * utils.c:
9820 * Makefile.in:
9821 * configure.ac:
6f0f660e
EZ
9822 * gdbserver.1: Add (C) after Copyright. Update the FSF
9823 address.
9824
9d1fb177
DJ
98252005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
9826
9827 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
9828 (arm_breakpoint_at): Recognize both breakpoints.
9829 (the_low_target): Use the correct breakpoint instruction.
9830
011a70c2
DJ
98312005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
9832
9833 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
9834 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
9835 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
9836 (the_low_target): Update.
9837
7fb85e41
AS
98382005-10-25 Andreas Schwab <schwab@suse.de>
9839
9840 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
9841
9842 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
9843 (ia64_num_regs): Reduce to 462.
9844
3db0444b
DJ
98452005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
9846
9847 * acinclude.m4: Correct quoting.
9848 * aclocal.m4: Regenerated.
9849
9850 Suggested by SZOKOVACS Robert <szo@ies.hu>:
9851 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
9852 (thread_db_init): Call thread_db_err_str.
9853 * configure.ac: Check for TD_VERSION.
9854 * config.in, configure: Regenerated.
9855
bee0189a
DJ
98562005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9857
9858 * server.h (error, fatal, warning): Add ATTR_FORMAT.
9859
e9d25b98
DJ
98602005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9861
9862 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
9863 is not available. Define HAVE_PTRACE_GETREGS if it is.
9864 * config.in, configure: Regenerated.
9865 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
9866 * linux-i386-low.c, linux-m68k-low.c: Update to use
9867 HAVE_PTRACE_GETREGS.
9868 * linux-low.c (regsets_fetch_inferior_registers)
9869 (regsets_store_inferior_registers): Only return 0 if we processed
9870 GENERAL_REGS.
9871 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
9872 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
9873
a06660f7
DJ
98742005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9875
9876 * inferiors.c (struct thread_info): Add gdb_id.
9877 (add_thread): Add gdb_id argument.
9878 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
9879 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
9880 calls to add_thread.
9881 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
9882 * server.c (handle_query): Use thread_to_gdb_id.
9883 (handle_v_cont, main): Use gdb_id_to_thread_id.
9884 * server.h (add_thread): Update prototype.
9885 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
9886 prototypes.
9887
5a1f5858
DJ
98882005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9889
9890 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
9891 left-padded registers.
9892 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
9893 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
9894
e122f1f5
SE
98952005-07-01 Steve Ellcey <sje@cup.hp.com>
9896
9897 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
9898 * configure: Regenerate.
9899 * config.in: Regenerate.
9900 * server.h (NEED_DECLARATION_STRERROR):
9901 Replace with !HAVE_DECL_STRERROR.
9902
d592fa2f
DJ
99032005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
9904
9905 * linux-low.c (linux_wait, linux_send_signal): Don't test
9906 an unsigned long variable for > 0 if it could be MAX_ULONG.
9907 * server.c (myresume): Likewise.
9908 * target.c (set_desired_inferior): Likewise.
9909
ccbd4912
MK
99102005-06-13 Mark Kettenis <kettenis@gnu.org>
9911
9912 * configure.ac: Simplify and improve check for socklen_t.
9913 * configure, config.in: Regenerate.
9914
f450004a
DJ
99152005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
9916
9917 * acconfig.h: Remove.
9918 * configure.ac: Add a test for socklen_t. Use three-argument
9919 AC_DEFINE throughout.
9920 * config.in: Regenerated using autoheader 2.59.
9921 * configure: Regenerated.
9922
9923 * gdbreplay.c (socklen_t): Provide a default.
9924 (remote_open): Use socklen_t.
9925 * remote-utils.c (socklen_t): Provide a default.
9926 (remote_open): Use socklen_t.
9927 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
9928 unsigned char.
9929
9930 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
9931 char for buffers.
9932 * linux-low.c (linux_read_memory, linux_write_memory)
9933 (linux_read_auxv): Likewise.
9934 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
9935 (check_mem_write): Likewise.
9936 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
9937 Likewise.
9938 * regcache.c (struct inferior_rgcache_data, registers_to_string)
9939 (registers_from_string, register_data): Likewise.
9940 * server.c (handle_query, main): Likewise.
9941 * server.h (convert_ascii_to_int, convert_int_to_ascii)
9942 (decode_M_packet): Likewise.
9943 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
9944 * target.h (struct target_ops): Update read_memory, write_memory,
9945 and read_auxv.
9946 (read_inferior_memory, write_inferior_memory): Update.
9947 * linux-low.h (struct linux_target_ops): Change type of breakpoint
9948 to unsigned char *.
9949 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
9950 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
9951 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
9952 linux-s390-low.c, linux-sh-low.c: Update for changes in
9953 read_inferior_memory and the_low_target->breakpoint.
9954
eee84df1
DJ
99552005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
9956
9957 * Makefile.in (SFILES): Add linux-ppc64-low.c.
9958 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
9959 * configure.srv: Add powerpc64-*-linux*.
9960 * linux-ppc64-low.c: New file.
9961
45b134e5
OF
99622005-05-23 Orjan Friberg <orjanf@axis.com>
9963
9964 * linux-cris-low.c: New file with support for CRIS.
9965 * linux-crisv32-low.c: Ditto for CRISv32.
9966 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
9967 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 9968 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
9969 reg-crisv32.o, and reg-crisv32.c to make rules.
9970 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
9971 recognized targets.
9972
48d93c75
UW
99732005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
9974
9975 * linux-low.c (fetch_register): Ensure buffer size is a multiple
9976 of sizeof (PTRACE_XFER_TYPE).
9977 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
9978
e013ee27
OF
99792005-05-12 Orjan Friberg <orjanf@axis.com>
9980
889bf7c5 9981 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
9982 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
9983 pointers for hardware watchpoint support.
9984 * linux-low.h (struct linux_target_ops): Ditto.
9985 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
9986 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
9987 to linux_target_ops.
9988 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
9989 reply packet.
9990 * server.c (main): Recognize 'Z' and 'z' packets.
9991
b0ded00b
UW
99922005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
9993
9994 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
9995 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
9996 (the_low_target): Add new members.
9997
8643e2ad
DJ
99982005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
9999
10000 * proc-service.c (ps_lgetregs): Search all_processes instead of
10001 all_threads.
10002
fc620387
DJ
100032005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10004
10005 * server.c (start_inferior): Change return type to int.
10006 (attach_inferior): Change sigptr to int *.
10007 (handle_v_cont, handle_v_requests): Change signal to int *.
10008 (main): Change signal to int.
10009
100102005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
10011
10012 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
10013 * configure.srv: Add m32r*-*-linux*.
10014 * linux-m32r-low.c: New file.
10015
e0e76420
DJ
100162005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
10017
10018 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
10019
a1928bad
DJ
100202005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10021
10022 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
10023 Take unsigned long arguments for PIDs.
10024 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
10025 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
10026 (wait_for_sigstop, linux_resume_one_process)
10027 (regsets_fetch_inferior_registers, linux_send_signal)
10028 (linux_read_auxv): Likewise. Update the types of variables holding
10029 PIDs. Update format string specifiers.
10030 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
10031 * remote-utils.c (prepare_resume_reply): Likewise.
10032 * server.c (cont_thread, general_thread, step_thread)
10033 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
10034 unsigned long.
10035 (handle_query): Update format specifiers.
10036 (handle_v_cont, main): Use strtoul for thread IDs.
10037 * server.h (struct inferior_list_entry): Use unsigned long for ID.
10038 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
10039 (general_thread, step_thread, thread_from_wait)
10040 (old_thread_from_wait): Update.
10041 * target.h (struct thread_resume): Use unsigned long for THREAD.
10042 (struct target_ops): Use unsigned long for arguments to attach and
10043 thread_alive.
10044
dcdb98d2
DJ
100452005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
10046
10047 * acinclude.m4: Include bfd/bfd.m4 directly.
10048 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
10049 <agriffis@toolchain.org>.
10050 * aclocal.m4, configure: Regenerated.
10051
bec39cab
AC
100522005-01-07 Andrew Cagney <cagney@gnu.org>
10053
10054 * configure.ac: Rename configure.in, require autoconf 2.59.
10055 * configure: Re-generate.
10056
434c4c77
DJ
100572004-12-08 Daniel Jacobowitz <dan@debian.org>
10058
10059 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
10060 LIBS when finished.
10061 * aclocal.m4: Regenerated.
10062 * configure: Regenerated.
10063
db1d3e1b
AS
100642004-11-21 Andreas Schwab <schwab@suse.de>
10065
10066 * linux-m68k-low.c (m68k_num_gregs): Define.
10067 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
10068 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
10069 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
10070 (m68k_breakpoint_at): New. Add to the_low_target.
10071
10072 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10073 srv_linux_thread_db to yes.
10074
43360365
JB
100752004-10-20 Joel Brobecker <brobecker@gnat.com>
10076
10077 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10078 (ARCH_SET_FS): Likewise.
10079 (ARCH_GET_FS): Likewise.
10080 (ARCH_GET_GS): Likewise.
10081
fd500816
DJ
100822004-10-16 Daniel Jacobowitz <dan@debian.org>
10083
10084 * linux-i386-low.c (ps_get_thread_area): New.
10085 * linux-x86-64-low.c (ps_get_thread_area): New.
10086 * linux-low.c: Include <sys/syscall.h>.
10087 (linux_kill_one_process): Don't kill the first thread here.
10088 (linux_kill): Kill the first thread here.
10089 (kill_lwp): New function.
10090 (send_sigstop, linux_send_signal): Use it.
10091 * proc-service.c: Clean up #ifdefs.
10092 (fpregset_info): Delete.
10093 (ps_lgetregs): Update and enable implementation.
10094 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
10095 implementations.
10096 * remote-utils.c (struct sym_cache, symbol_cache): New.
10097 (input_interrupt): Print a clearer message.
10098 (async_io_enabled): New variable.
10099 (enable_async_io, disable_async_io): Use it. Update comments.
10100 (look_up_one_symbol): Use the symbol cache.
10101 * thread-db.c (thread_db_look_up_symbols): New function.
10102 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
10103
f6de3c42
DJ
101042004-10-16 Daniel Jacobowitz <dan@debian.org>
10105
10106 * configure.in: Test for -rdynamic.
10107 * configure: Regenerated.
10108 * Makefile (INTERNAL_LDFLAGS): New.
10109 (gdbserver, gdbreplay): Use it.
10110
2c0fc042
AC
101112004-09-02 Andrew Cagney <cagney@gnu.org>
10112
10113 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10114
075b3282
DJ
101152004-03-23 Daniel Jacobowitz <drow@mvista.com>
10116
10117 * linux-low.c (linux_wait): Clear all_processes list also.
10118
fa6a77dc
DJ
101192004-03-12 Daniel Jacobowitz <drow@mvista.com>
10120
10121 * linux-low.c: Include <errno.h>. Remove extern declaration of
10122 errno.
10123
6d782a97
DJ
101242004-03-12 Daniel Jacobowitz <drow@mvista.com>
10125
10126 * gdbreplay.c, server.h, utils.c: Update copyright years.
10127
3a7fb99b
DJ
101282004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10129
10130 * server.c (main): Print child status or termination signal from
10131 variable 'signal', not 'sig'.
10132
c3e735a6
DJ
101332004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10134
10135 * linux-low.c (linux_read_memory): Change return type to
10136 int. Check for and return error from ptrace().
10137 * target.c (read_inferior_memory): Change return type to int. Pass
10138 back return status from the_target->read_memory().
10139 * target.h (struct target_ops): Adapt *read_memory() prototype.
10140 Update comment.
10141 (read_inferior_memory): Adapt prototype.
10142 * server.c (main): Return an error packet if
10143 read_inferior_memory() returns an error.
10144
a59d1c82
DJ
101452004-03-04 Daniel Jacobowitz <drow@mvista.com>
10146
10147 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10148 Unify with other clean targets.
10149
dc3f8883
DJ
101502004-02-29 Daniel Jacobowitz <drow@mvista.com>
10151
10152 * server.c (handle_v_cont): Call set_desired_inferior.
10153
89a208da
DJ
101542004-02-29 Daniel Jacobowitz <drow@mvista.com>
10155
10156 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10157
62ea82f5
DJ
101582004-02-29 Daniel Jacobowitz <drow@mvista.com>
10159
10160 * linux-low.c (linux_wait): Unblock async I/O.
10161 (linux_resume): Block and enable async I/O.
10162 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10163 * server.h (block_async_io, unblock_async_io): Add prototypes.
10164
6910d122
DJ
101652004-02-29 Daniel Jacobowitz <drow@mvista.com>
10166
10167 * remote-utils.c (remote_open): Print a status notice after
10168 opening a TCP port.
10169 * server.c (attach_inferior): Print a status notice after
10170 attaching.
10171
101722004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
10173
10174 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10175
c89dc5d4
DJ
101762004-02-26 Daniel Jacobowitz <drow@mvista.com>
10177
10178 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
10179 error packet.
10180 * server.c, target.h: Update copyright years.
10181
4b8dad4a
RM
101822004-02-25 Roland McGrath <roland@redhat.com>
10183
10184 * target.h (struct target_ops): New member `read_auxv'.
10185 * server.c (handle_query): Handle qPart:auxv:read: query using that.
10186 * linux-low.c (linux_read_auxv): New function.
10187 (linux_target_ops): Initialize `read_auxv' member to that.
10188
d7446758
JB
101892004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10190
10191 Committed by Jim Blandy <jimb@redhat.com>.
10192
10193 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 10194 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
10195 instead of GPR_SIZE to distiguish s390 and s390x targets.
10196
5544ad89
DJ
101972004-01-31 Daniel Jacobowitz <drow@mvista.com>
10198
10199 * linux-low.c: Update copyright year.
10200 (check_removed_breakpoint): Clear pending_is_breakpoint.
10201 (linux_set_resume_request, linux_queue_one_thread)
10202 (resume_status_pending_p): New functions.
10203 (linux_continue_one_thread): Use process->resume.
10204 (linux_resume): Only resume threads if there are no pending events.
10205 * linux-low.h (struct process_info): Add resume request
10206 pointer.
10207
2a68b70e
DJ
102082004-01-30 Daniel Jacobowitz <drow@mvista.com>
10209
10210 * regcache.c (new_register_cache): Clear the allocated register
10211 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
10212
64386c31
DJ
102132003-10-13 Daniel Jacobowitz <drow@mvista.com>
10214
10215 * linux-low.c (linux_resume): Take a struct thread_resume *
10216 argument.
10217 (linux_wait): Update call.
10218 (resume_ptr): New static variable.
10219 (linux_continue_one_thread): Renamed from
10220 linux_continue_one_process. Use resume_ptr.
10221 (linux_resume): Use linux_continue_one_thread.
10222 * server.c (handle_v_cont, handle_v_requests): New functions.
10223 (myresume): New function.
10224 (main): Handle 'v' case.
10225 * target.h (struct thread_resume): New type.
10226 (struct target_ops): Change argument of "resume" to struct
10227 thread_resume *.
10228 (myresume): Delete macro.
10229
c938e9b0
L
102302003-08-08 H.J. Lu <hongjiu.lu@intel.com>
10231
10232 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
10233 (uninstall): Support DESTDIR.
10234
7f313d07
BC
10235Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
10236
10237 * configure.srv: Add xscale*linux copy of arm*linux entry.
10238
3b2fc2ea
DJ
102392003-07-24 Daniel Jacobowitz <drow@mvista.com>
10240
10241 * linux-arm-low.c (arm_reinsert_addr): New function.
10242 (the_low_target): Add arm_reinsert_addr.
10243
1c0a559e
MK
102442003-07-08 Mark Kettenis <kettenis@gnu.org>
10245
10246 * mem-break.c: Remove whitespace at end of file.
10247
43d5792c
DJ
102482003-06-28 Daniel Jacobowitz <drow@mvista.com>
10249
10250 * configure.in: Check whether we need to prototype strerror.
10251 * server.h: Optionally prototype strerror.
10252 * gdbreplay.c (perror_with_name): Use strerror.
10253 * linux-low.c (linux_attach_lwp): Use strerror.
10254 * utils.c (perror_with_name): Use strerror.
10255 * config.in, configure: Regenerated.
10256
c8a86edf
DJ
102572003-06-28 Daniel Jacobowitz <drow@mvista.com>
10258
10259 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
10260 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
10261
73d37363
DJ
102622003-06-20 Daniel Jacobowitz <drow@mvista.com>
10263
10264 * Makefile.in (SFILES): Update.
10265 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
10266 low-sun3.c: Remove files.
10267
6ad8ae5c
DJ
102682003-06-17 Daniel Jacobowitz <drow@mvista.com>
10269
10270 * linux-low.c: Move comment to linux_thread_alive where it belonged.
10271 (linux_detach_one_process, linux_detach): New functions.
10272 (linux_target_ops): Add linux_detach.
10273 * server.c (main): Handle 'D' packet.
10274 * target.h (struct target_ops): Add "detach" member.
10275 (detach_inferior): Define.
10276
1581182a
MK
102772003-06-13 Mark Kettenis <kettenis@gnu.org>
10278
10279 From Kelley Cook <kelleycook@wideopenwest.com>:
10280 * configure.srv: Accept i[34567]86 variants.
10281
e5379b03
DJ
102822003-06-05 Daniel Jacobowitz <drow@mvista.com>
10283
10284 * linux-low.c (linux_wait_for_event): Correct comment typos.
10285 (linux_resume_one_process): Call check_removed_breakpoint.
10286 (linux_send_signal): New function.
10287 (linux_target_ops): Add linux_send_signal.
10288 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
10289 of kill.
10290 * target.h (struct target_ops): Add send_signal.
10291
2ff29de4
JB
102922003-05-29 Jim Blandy <jimb@redhat.com>
10293
10294 * linux-low.c (usr_store_inferior_registers): Transfer buf in
10295 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
10296 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
10297 away part of the register's value.
10298
254787d4
DJ
102992003-03-26 Daniel Jacobowitz <drow@mvista.com>
10300
10301 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
10302 (linux_wait_for_event, linux_init_signals): Likewise.
10303
94e10508
DJ
103042003-03-17 Daniel Jacobowitz <drow@mvista.com>
10305
10306 * configure.in: Check for stdlib.h.
10307 * configure: Regenerated.
10308 * config.in: Regenerated.
10309
4c0711e0
DJ
103102003-01-04 Andreas Schwab <schwab@suse.de>
10311
10312 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
10313
ef66e766
AC
103142003-01-02 Andrew Cagney <ac131313@redhat.com>
10315
10316 * Makefile.in: Remove obsolete code.
10317
a1358604
DJ
103182002-11-20 Daniel Jacobowitz <drow@mvista.com>
10319
10320 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
10321 defined(PT_FPR0_HI).
10322
23ce3b1c
DJ
103232002-11-17 Stuart Hughes <seh@zee2.com>
10324
10325 * linux-arm-low.c (arm_num_regs): Increase.
10326 (arm_regmap): Include status register.
10327
103282002-11-17 Daniel Jacobowitz <drow@mvista.com>
10329
10330 * linux-low.c (register_addr): Remove incorrect -1 check.
10331
a9fa9f7d
DJ
103322002-08-29 Daniel Jacobowitz <drow@mvista.com>
10333
10334 * linux-low.c (linux_create_inferior): Call setpgid. Return
10335 the new PID.
10336 (unstopped_p, linux_signal_pid): Remove.
10337 (linux_target_ops): Remove linux_signal_pid.
10338 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
10339 global instead of target method.
10340 * target.h (struct target_ops): Remove signal_pid. Update comment
10341 for create_inferior.
10342 * server.c (signal_pid): New variable.
10343 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 10344 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
10345 (attach_inferior): Set signal_pid.
10346
17574093
DJ
103472002-08-23 Daniel Jacobowitz <drow@mvista.com>
10348
10349 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
10350
103512002-08-20 Jim Blandy <jimb@redhat.com>
10352
10353 * Makefile.in (LDFLAGS): Allow the configure script to establish a
10354 default for this.
10355
103562002-08-01 Andrew Cagney <cagney@redhat.com>
10357
10358 * Makefile.in: Make chill references obsolete.
10359
103602002-07-24 Kevin Buettner <kevinb@redhat.com>
10361
10362 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
10363 * configure: Regenerate.
10364 * config.in: Regenerate.
10365
103662002-07-09 David O'Brien <obrien@FreeBSD.org>
10367
10368 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
10369 (perror_with_name, remote_close, remote_open, expect, play): Static.
10370
103712002-07-04 Michal Ludvig <mludvig@suse.cz>
10372
4b8dad4a 10373 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
10374 byte offsets instead of an array of indexes.
10375 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
10376
103772002-06-13 Daniel Jacobowitz <drow@mvista.com>
10378
10379 * regcache.c: Add comment.
10380
103812002-06-11 Daniel Jacobowitz <drow@mvista.com>
10382
10383 * thread-db.c: New file.
10384 * proc-service.c: New file.
10385 * acinclude.m4: New file.
10386 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
10387 proc-service.o, and thread-db.o.
10388 (linux-low.o): Add USE_THREAD_DB.
10389 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
10390 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
10391 * aclocal.m4: Regenerated.
10392 * config.in: Regenerated.
10393 * configure: Regenerated.
10394 * configure.in: Check for proc_service.h, sys/procfs.h,
10395 thread_db.h, and linux/elf.h headrs.
10396 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
10397 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
10398 Check for -lthread_db and thread support.
10399 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
10400 PowerPC, and SuperH.
10401 * i387-fp.c: Constify arguments.
10402 * i387-fp.h: Likewise.
10403 * inferiors.c: (struct thread_info): Renamed from
10404 `struct inferior_info'. Remove PID member. Use generic inferior
10405 list header. All uses updated.
10406 (inferiors, signal_pid): Removed.
10407 (all_threads): New variable.
10408 (get_thread): Define.
10409 (add_inferior_to_list): New function.
10410 (for_each_inferior): New function.
10411 (change_inferior_id): New function.
10412 (add_inferior): Removed.
10413 (remove_inferior): New function.
10414 (add_thread): New function.
10415 (free_one_thread): New function.
10416 (remove_thread): New function.
10417 (clear_inferiors): Use for_each_inferior and free_one_thread.
10418 (find_inferior): New function.
10419 (find_inferior_id): New function.
10420 (inferior_target_data): Update argument type.
10421 (set_inferior_target_data): Likewise.
10422 (inferior_regcache_data): Likewise.
10423 (set_inferior_regcache_data): Likewise.
10424 * linux-low.c (linux_bp_reinsert): Remove.
10425 (all_processes, stopping_threads, using_thrads)
10426 (struct pending_signals, debug_threads, pid_of): New.
10427 (inferior_pid): Replace with macro.
10428 (struct inferior_linux_data): Remove.
10429 (get_stop_pc, add_process): New functions.
10430 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
10431 Use add_process and add_thread.
10432 (linux_attach_lwp): New function, based on old linux_attach. Use
10433 add_process and add_thread. Set stop_expected for new threads.
10434 (linux_attach): New function.
10435 (linux_kill_one_process): New function.
10436 (linux_kill): Kill all LWPs.
10437 (linux_thread_alive): Use find_inferior_id.
10438 (check_removed_breakpoints, status_pending_p): New functions.
10439 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
10440 Update. Use WNOHANG. Wait for cloned processes also. Update process
10441 struct for the found process.
10442 (linux_wait_for_event): New function.
10443 (linux_wait): Use it. Support LWPs.
10444 (send_sigstop, wait_for_sigstop, stop_all_processes)
10445 (linux_resume_one_process, linux_continue_one_process): New functions.
10446 (linux_resume): Support LWPs.
10447 (REGISTER_RAW_SIZE): Remove.
10448 (fetch_register): Use register_size instead. Call supply_register.
10449 (usr_store_inferior_registers): Likewise. Call collect_register.
10450 Fix recursive case.
10451 (regsets_fetch_inferior_registers): Improve error message.
10452 (regsets_store_inferior_registers): Add debugging.
10453 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
10454 (unstopped_p, linux_signal_pid): New functions.
10455 (linux_target_ops): Add linux_signal_pid.
10456 (linux_init_signals): New function.
10457 (initialize_low): Call it. Initialize using_threads.
10458 * regcache.c (inferior_regcache_data): Add valid
10459 flag.
10460 (get_regcache): Fetch registers lazily. Add fetch argument
10461 and update all callers.
10462 (regcache_invalidate_one, regcache_invalidate): New
10463 functions.
10464 (new_register_cache): Renamed from create_register_cache.
10465 Return the new regcache.
10466 (free_register_cache): Change argument to a void *.
10467 (registers_to_string, registers_from_string): Call get_regcache
10468 with fetch flag set.
10469 (register_data): Make static. Pass fetch flag to get_regcache.
10470 (supply_register): Call get_regcache with fetch flag clear.
10471 (collect_register): Call get_regcache with fetch flag set.
10472 (collect_register_as_string): New function.
10473 * regcache.h: Update.
10474 * remote-utils.c (putpkt): Flush after debug output and use
10475 stderr.
10476 Handle input interrupts while waiting for an ACK.
10477 (input_interrupt): Use signal_pid method.
10478 (getpkt): Flush after debug output and use stderr.
10479 (outreg): Use collect_register_as_string.
10480 (new_thread_notify, dead_thread_notify): New functions.
10481 (prepare_resume_reply): Check using_threads. Set thread_from_wait
10482 and general_thread.
10483 (look_up_one_symbol): Flush after debug output.
10484 * server.c (step_thread, server_waiting): New variables.
10485 (start_inferior): Don't use signal_pid. Update call to mywait.
10486 (attach_inferior): Update call to mywait.
10487 (handle_query): Handle qfThreadInfo and qsThreadInfo.
10488 (main): Don't fetch/store registers explicitly. Use
10489 set_desired_inferior. Support proposed ``Hs'' packet. Update
10490 calls to mywait.
10491 * server.h: Update.
10492 (struct inferior_list, struct_inferior_list_entry): New.
10493 * target.c (set_desired_inferior): New.
10494 (write_inferior_memory): Constify.
10495 (mywait): New function.
10496 * target.h: Update.
10497 (struct target_ops): New signal_pid method.
10498 (mywait): Removed macro, added prototype.
10499
10500 * linux-low.h (regset_func): Removed.
10501 (regset_fill_func, regset_store_func): New.
10502 (enum regset_type): New.
10503 (struct regset_info): Add type field. Use new operation types.
10504 (struct linux_target_ops): stop_pc renamed to get_pc.
10505 Add decr_pc_after_break and breakpoint_at.
10506 (get_process, get_thread_proess, get_process_thread)
10507 (strut process_info, all_processes, linux_attach_lwp)
10508 (thread_db_init): New.
10509
10510 * linux-arm-low.c (arm_get_pc, arm_set_pc,
10511 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
10512 (the_low_target): Add new members.
10513 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
10514 (i386_store_fpxregset): Constify.
10515 (target_regsets): Add new kind identifier.
10516 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
10517 (i386_set_pc): Add debugging.
10518 (i386_breakpoint_at): New function.
10519 (the_low_target): Add new members.
10520 * linux-mips-low.c (mips_get_pc, mips_set_pc)
10521 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
10522 (mips_breakpoint_at): New.
10523 (the_low_target): Add new members.
10524 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
10525 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
10526 (the_low_target): Add new members.
10527 * linux-sh-low.c (sh_get_pc, sh_set_pc)
10528 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
10529 (the_low_target): Add new members.
10530 * linux-x86-64-low.c (target_regsets): Add new kind
10531 identifier.
10532
105332002-05-15 Daniel Jacobowitz <drow@mvista.com>
10534
10535 From Martin Pool <mbp@samba.org>:
10536 * server.c (gdbserver_usage): New function.
10537 (main): Call it.
10538
105392002-05-14 Daniel Jacobowitz <drow@mvista.com>
10540
10541 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
10542 stop_at -> stop_pc.
10543
105442002-05-04 Andrew Cagney <ac131313@redhat.com>
10545
10546 * Makefile.in: Remove obsolete code.
10547
105482002-04-24 Michal Ludvig <mludvig@suse.cz>
10549
10550 * linux-low.c (regsets_fetch_inferior_registers),
10551 (regsets_store_inferior_registers): Removed cast to int from
10552 ptrace() calls.
10553 * regcache.h: Added declaration of struct inferior_info.
10554
105552002-04-20 Daniel Jacobowitz <drow@mvista.com>
10556
10557 * inferiors.c (struct inferior_info): Add regcache_data.
10558 (add_inferior): Call create_register_cache.
10559 (clear_inferiors): Call free_register_cache.
10560 (inferior_regcache_data, set_inferior_regcache_data): New functions.
10561 * regcache.c (struct inferior_regcache_data): New.
10562 (registers): Remove.
10563 (get_regcache): New function.
10564 (create_register_cache, free_register_cache): New functions.
10565 (set_register_cache): Don't initialize the register cache here.
10566 (registers_to_string, registers_from_string, register_data): Call
10567 get_regcache.
10568 * regcache.h: Add prototypes.
10569 * server.h: Likewise.
10570
105712002-04-20 Daniel Jacobowitz <drow@mvista.com>
10572
10573 * mem-break.c: New file.
10574 * mem-break.h: New file.
10575 * Makefile.in: Add mem-break.o rule; update server.h
10576 dependencies.
10577 * inferiors.c (struct inferior_info): Add target_data
10578 member.
10579 (clear_inferiors): Free target_data member if set.
10580 (inferior_target_data, set_inferior_target_data): New functions.
10581 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
10582 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
10583 * linux-low.c (linux_bp_reinsert): New variable.
10584 (struct inferior_linux_data): New.
10585 (linux_create_inferior): Use set_inferior_target_data.
10586 (linux_attach): Likewise. Call add_inferior.
10587 (linux_wait_for_one_inferior): New function.
10588 (linux_wait): Call it.
10589 (linux_write_memory): Add const.
10590 (initialize_low): Call set_breakpoint_data.
10591 * linux-low.h (struct linux_target_ops): Add breakpoint
10592 handling members.
10593 * server.c (attach_inferior): Remove extra add_inferior
10594 call.
10595 * server.h: Include mem-break.h. Update inferior.c
10596 prototypes.
10597 * target.c (read_inferior_memory)
10598 (write_inferior_memory): New functions.
10599 * target.h (read_inferior_memory)
10600 (write_inferior_memory): Change macros to prototypes.
10601 (struct target_ops): Update comments. Add const to write_memory
10602 definition.
10603
106042002-04-11 Daniel Jacobowitz <drow@mvista.com>
10605
10606 * linux-low.c (usr_store_inferior_registers): Support
10607 registers which are allowed to fail to store.
10608 * linux-low.h (linux_target_ops): Likewise.
10609 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
10610 (ppc_cannot_store_register): FPSCR may not be storable.
10611
106122002-04-09 Daniel Jacobowitz <drow@mvista.com>
10613
10614 * server.h: Include <string.h> if HAVE_STRING_H.
10615 * ChangeLog: Correct paths in last ChangeLog entry.
10616
106172002-04-09 Daniel Jacobowitz <drow@mvista.com>
10618
10619 * linux-low.h: Remove obsolete prototypes.
10620 (struct linux_target_ops): New.
10621 (extern the_low_target): New.
10622 * linux-low.c (num_regs, regmap): Remove declarations.
10623 (register_addr): Use the_low_target explicitly.
10624 (fetch_register): Likewise.
10625 (usr_fetch_inferior_registers): Likewise.
10626 (usr_store_inferior_registers): Likewise.
10627 * linux-arm-low.c (num_regs): Remove.
10628 (arm_num_regs): Define.
10629 (arm_regmap): Renamed from regmap, made static.
10630 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
10631 made static.
10632 (arm_cannot_store_register): Renamed from cannot_store_register,
10633 made static.
10634 (the_low_target): New.
10635 * linux-i386-low.c (num_regs): Remove.
10636 (i386_num_regs): Define.
10637 (i386_regmap): Renamed from regmap, made static.
10638 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
10639 made static.
10640 (i386_cannot_store_register): Renamed from cannot_store_register,
10641 made static.
10642 (the_low_target): New.
10643 * linux-ia64-low.c (num_regs): Remove.
10644 (ia64_num_regs): Define.
10645 (ia64_regmap): Renamed from regmap, made static.
10646 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
10647 made static.
10648 (ia64_cannot_store_register): Renamed from cannot_store_register,
10649 made static.
10650 (the_low_target): New.
10651 * linux-m68k-low.c (num_regs): Remove.
10652 (m68k_num_regs): Define.
10653 (m68k_regmap): Renamed from regmap, made static.
10654 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
10655 made static.
10656 (m68k_cannot_store_register): Renamed from cannot_store_register,
10657 made static.
10658 (the_low_target): New.
10659 * linux-mips-low.c (num_regs): Remove.
10660 (mips_num_regs): Define.
10661 (mips_regmap): Renamed from regmap, made static.
10662 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
10663 made static.
10664 (mips_cannot_store_register): Renamed from cannot_store_register,
10665 made static.
10666 (the_low_target): New.
10667 * linux-ppc-low.c (num_regs): Remove.
10668 (ppc_num_regs): Define.
10669 (ppc_regmap): Renamed from regmap, made static.
10670 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
10671 made static.
10672 (ppc_cannot_store_register): Renamed from cannot_store_register,
10673 made static.
10674 (the_low_target): New.
10675 * linux-s390-low.c (num_regs): Remove.
10676 (s390_num_regs): Define.
10677 (s390_regmap): Renamed from regmap, made static.
10678 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
10679 made static.
10680 (s390_cannot_store_register): Renamed from cannot_store_register,
10681 made static.
10682 (the_low_target): New.
10683 * linux-sh-low.c (num_regs): Remove.
10684 (sh_num_regs): Define.
10685 (sh_regmap): Renamed from regmap, made static.
10686 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
10687 made static.
10688 (sh_cannot_store_register): Renamed from cannot_store_register,
10689 made static.
10690 (the_low_target): New.
10691 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
10692 (the_low_target): New.
10693
106942002-04-09 Daniel Jacobowitz <drow@mvista.com>
10695
10696 * Makefile.in: Add stamp-h target.
10697 * configure.in: Create stamp-h.
10698 * configure: Regenerated.
10699
107002002-04-09 Daniel Jacobowitz <drow@mvista.com>
10701
10702 * inferiors.c: New file.
10703 * target.c: New file.
10704 * target.h: New file.
10705 * Makefile.in: Add target.o and inferiors.o. Update
10706 dependencies.
10707 * linux-low.c (inferior_pid): New static variable,
10708 moved from server.c.
10709 (linux_create_inferior): Renamed from create_inferior.
10710 Call add_inferior. Return 0 on success instead of a PID.
10711 (linux_attach): Renamed from myattach.
10712 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
10713 (linux_thread_alive): Renamed from mythread_alive.
10714 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
10715 child dies.
10716 (linux_resume): Renamed from myresume. Add missing ``return 0''.
10717 (regsets_store_inferior_registers): Correct error message.
10718 Add missing ``return 0''.
10719 (linux_fetch_registers): Renamed from fetch_inferior_registers.
10720 (linux_store_registers): Renamed from store_inferior_registers.
10721 (linux_read_memory): Renamed from read_inferior_memory.
10722 (linux_write_memory): Renamed from write_inferior_memory.
10723 (linux_target_ops): New structure.
10724 (initialize_low): Call set_target_ops ().
10725 * remote-utils.c (unhexify): New function.
10726 (hexify): New function.
10727 (input_interrupt): Send signals to ``signal_pid''.
10728 * server.c (inferior_pid): Remove.
10729 (start_inferior): Update create_inferior call.
10730 (attach_inferior): Call add_inferior.
10731 (handle_query): New function.
10732 (main): Call handle_query for `q' packets.
10733 * server.h: Include "target.h". Remove obsolete prototypes.
10734 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
10735
107362002-04-09 Daniel Jacobowitz <drow@mvista.com>
10737
10738 * Makefile.in: Add WARN_CFLAGS. Update configury
10739 dependencies.
10740 * configure.in: Check for <string.h>
10741 * configure: Regenerate.
10742 * config.in: Regenerate.
10743 * gdbreplay.c: Include needed system headers.
10744 (remote_open): Remove strchr prototype.
10745 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
10746 * regcache.c (supply_register): Change buf argument to const void *.
10747 (supply_register_by_name): Likewise.
10748 (collect_register): Change buf argument to void *.
10749 (collect_register_by_name): Likewise.
10750 * regcache.h: Add missing prototypes.
10751 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
10752 * server.c (handle_query): New function.
10753 (attached): New static variable, moved out of main.
10754 (main): Quiet longjmp clobber warnings.
10755 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
10756 * utils.c (error): Remove NORETURN.
10757 (fatal): Likewise.