]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
Add --enable-build-with-cxx configure switch
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
3bc3d82a
PA
12015-02-27 Pedro Alves <palves@redhat.com>
2
3 * Makefile.in (COMPILER): New, get it from autoconf.
4 (CXX): Get from autoconf instead.
5 (COMPILE.pre): Use COMPILER.
6 (CC-LD): Rename to ...
7 (CC_LD): ... this. Use COMPILER.
8 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
9 (CXX_FOR_TARGET): Default to g++ instead of gcc.
10 * acinclude.m4: Include build-with-cxx.m4.
11 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
12 Disable -Werror by default if building in C++ mode.
13 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
14 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
15 the C++ compiler. Save/restore CXXFLAGS too.
16 * configure: Regenerate.
17
07697489
PA
182015-02-27 Pedro Alves <palves@redhat.com>
19
20 * acinclude.m4: Include libiberty.m4.
21 * configure.ac: Call libiberty_INIT.
22 * config.in, configure: Regenerate.
23
9beb7c4e
PA
242015-02-26 Pedro Alves <palves@redhat.com>
25
26 * linux-low.c (linux_wait_1): When incrementing the PC past a
27 program breakpoint always use the_low_target.breakpoint_len as
28 increment, rather than the maximum between that and
29 the_low_target.decr_pc_after_break.
30
8090aef2
PA
312015-02-23 Pedro Alves <palves@redhat.com>
32
33 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
34 thread was doing a step-over; always adjust the PC if
35 we stepped over a permanent breakpoint.
36 (linux_wait_1): If we stepped over breakpoint that was on top of a
37 permanent breakpoint, manually advance the PC past it.
38
bc9540e8
PA
392015-02-23 Pedro Alves <palves@redhat.com>
40
41 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
42 modes.
43 (x86_fill_gregset, x86_store_gregset): Use it when handling
44 $orig_eax.
45
2db9a427
PA
462015-02-20 Pedro Alves <palves@redhat.com>
47
48 * thread-db.c: Include "nat/linux-procfs.h".
49 (thread_db_init): Skip listing new threads if the kernel supports
50 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
51
afa8d396
PA
522015-02-20 Pedro Alves <palves@redhat.com>
53
54 * linux-low.c (status_pending_p_callback): Use ptid_match.
55
c9587f88
AT
562015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
57
58 PR breakpoints/16812
59 * linux-low.c (wstatus_maybe_breakpoint): Remove.
60 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
61 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
62
b05ec7a5
AT
632015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
64
65 PR breakpoints/15956
66 * tracepoint.c (cmd_qtinit): Add check for current_thread.
67
d33501a5
MM
682015-02-09 Markus Metzger <markus.t.metzger@intel.com>
69
70 * linux-low.c (linux_low_btrace_conf): Print size.
71 * server.c (handle_btrace_conf_general_set): New.
72 (hanle_general_set): Call handle_btrace_conf_general_set.
73 (handle_query): Report Qbtrace-conf:bts:size as supported.
74
f4abbc16
MM
752015-02-09 Markus Metzger <markus.t.metzger@intel.com>
76
77 * linux-low.c (linux_low_enable_btrace): Update parameters.
78 (linux_low_btrace_conf): New.
79 (linux_target_ops)<to_btrace_conf>: Initialize.
80 * server.c (current_btrace_conf): New.
81 (handle_btrace_enable): Rename to ...
82 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
83 to target_enable_btrace. Update comment. Update users.
84 (handle_qxfer_btrace_conf): New.
85 (qxfer_packets): Add btrace-conf entry.
86 (handle_query): Report qXfer:btrace-conf:read as supported packet.
87 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
88 (target_ops)<read_btrace_conf>: New.
89 (target_enable_btrace): Update parameters.
90 (target_read_btrace_conf): New.
91
043c3577
MM
922015-02-09 Markus Metzger <markus.t.metzger@intel.com>
93
94 * server.c (handle_btrace_general_set): Remove call to
95 target_supports_btrace.
96 (supported_btrace_packets): New.
97 (handle_query): Call supported_btrace_packets.
98 * target.h: include btrace-common.h.
99 (btrace_target_info): Removed.
100 (supports_btrace, target_supports_btrace): Update parameters.
101
734b0e4b
MM
1022015-02-09 Markus Metzger <markus.t.metzger@intel.com>
103
104 * Makefile.in (SFILES): Add common/btrace-common.c.
105 (OBS): Add common/btrace-common.o.
106 (btrace-common.o): Add build rules.
107 * linux-low: Include btrace-common.h.
108 (linux_low_read_btrace): Use struct btrace_data. Call
109 btrace_data_init and btrace_data_fini.
110
d6c146e9
PA
1112015-02-06 Pedro Alves <palves@redhat.com>
112
113 * thread-db.c (find_new_threads_callback): Add debug output.
114
20ba1ce6
PA
1152015-02-04 Pedro Alves <palves@redhat.com>
116
117 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
118 (resume_stopped_resumed_lwps): New function.
119 (linux_wait_for_event_filtered): Use it.
120
8cc73a39
SDJ
1212015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
122
123 * Makefile.in (SFILES): Add linux-personality.c.
124 (linux-personality.o): New rule.
125 * configure.srv (srv_linux_obj): Add linux-personality.o to the
126 list of objects to be built.
127 * linux-low.c: Include nat/linux-personality.h.
128 (linux_create_inferior): Remove code to disable address space
129 randomization (moved to ../nat/linux-personality.c). Create
130 cleanup to disable address space randomization.
131
fb23d554
SDJ
1322015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
133
134 * Makefile.in (posix-strerror.o): New rule.
135 (mingw-strerror.o): Likewise.
136 * configure: Regenerated.
137 * configure.ac: Source file ../common/common.host. Initialize new
138 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
139
cdf43629
YQ
1402015-01-14 Yao Qi <yao@codesourcery.com>
141
142 * Makefile.in (SFILES): Add nat/ppc-linux.c.
143 (ppc-linux.o): New rule.
144 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
145 * configure.ac: AC_CHECK_FUNCS(getauxval).
146 * config.in: Re-generated.
147 * configure: Re-generated.
148 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
149 ppc64_64bit_inferior_p
150
514c5338
YQ
1512015-01-14 Yao Qi <yao@codesourcery.com>
152
153 * linux-ppc-low.c: Include "nat/ppc-linux.h".
154 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
155 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
156 (PT_ORIG_R3, PT_TRAP): Likewise.
157 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
158 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
159 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
160
3368c1e5
JB
1612015-01-10 Joel Brobecker <brobecker@adacore.com>
162
163 * i387-fp.c (i387_cache_to_xsave): In look over
164 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
165 zmmh_low_space field by use of zmmh_high_space.
166
582511be
PA
1672015-01-09 Pedro Alves <palves@redhat.com>
168
169 * linux-low.c (step_over_bkpt): Move higher up in the file.
170 (handle_extended_wait): Don't store the stop_pc here.
171 (get_stop_pc): Adjust comments and rename to ...
172 (check_stopped_by_breakpoint): ... this. Record whether the LWP
173 stopped for a software breakpoint or hardware breakpoint.
174 (thread_still_has_status_pending_p): New function.
175 (status_pending_p_callback): Use
176 thread_still_has_status_pending_p. If the event is no longer
177 interesting, resume the LWP.
178 (handle_tracepoints): Add assert.
179 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
180 (wstatus_maybe_breakpoint): New function.
181 (cancel_breakpoint): Delete function.
182 (check_stopped_by_watchpoint): New function, factored out from
183 linux_low_filter_event.
184 (lp_status_maybe_breakpoint): Delete function.
185 (linux_low_filter_event): Remove filter_ptid argument.
186 Leave thread group exits pending here. Store the LWP's stop PC.
187 Always leave events pending.
188 (linux_wait_for_event_filtered): Pull all events out of the
189 kernel, and leave them all pending.
190 (count_events_callback, select_event_lwp_callback): Consider all
191 events.
192 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
193 (select_event_lwp): Only give preference to the stepping LWP in
194 all-stop mode. Adjust comments.
195 (ignore_event): New function.
196 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
197 references to cancel_breakpoints. Adjust to renames. Also give
198 equal priority to all LWPs that have had events in non-stop mode.
199 If reporting a software breakpoint event, unadjust the LWP's PC.
200 (linux_wait): If linux_wait_1 returned an ignored event, retry.
201 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
202 Adjust.
203 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
204 (resume_status_pending_p): Use thread_still_has_status_pending_p.
205 (linux_stopped_by_watchpoint): Adjust.
206 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
207 * linux-low.h (enum lwp_stop_reason): New.
208 (struct lwp_info) <stop_pc>: Adjust comment.
209 <stopped_by_watchpoint>: Delete field.
210 <stop_reason>: New field.
211 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
212 * mem-break.c (software_breakpoint_inserted_here)
213 (hardware_breakpoint_inserted_here): New function.
214 * mem-break.h (software_breakpoint_inserted_here)
215 (hardware_breakpoint_inserted_here): Declare.
216 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
217 (cancel_breakpoints): Delete.
218 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
219 (upload_fast_traceframes): Remove references to
220 cancel_breakpoints.
221
a33e3959
PA
2222015-01-09 Pedro Alves <palves@redhat.com>
223
224 * thread-db.c (find_new_threads_callback): Ignore thread if the
225 kernel thread ID is -1.
226
8784d563
PA
2272015-01-09 Pedro Alves <palves@redhat.com>
228
229 * linux-low.c (linux_attach_fail_reason_string): Move to
230 nat/linux-ptrace.c, and rename.
231 (linux_attach_lwp): Update comment.
232 (attach_proc_task_lwp_callback): New function.
233 (linux_attach): Adjust to rename and use
234 linux_proc_attach_tgid_threads.
235 (linux_attach_fail_reason_string): Delete declaration.
236
76f2b779
JB
2372015-01-01 Joel Brobecker <brobecker@adacore.com>
238
239 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
240 * server.c (gdbserver_version): Likewise.
241
fafcc06a
SDJ
2422014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
243
244 * remote-utils.c: Include ctype.h.
245 (input_interrupt): Explicitly handle the case when the char
246 received is the NUL byte. Improve the printing of non-ASCII
247 characters.
248
beed38b8
JB
2492014-12-16 Joel Brobecker <brobecker@adacore.com>
250
251 * linux-low.c (linux_low_filter_event): Update call to
252 linux_enable_event_reporting following the addition of
253 a new parameter to that function.
254
bf330350
CU
2552014-12-16 Catalin Udma <catalin.udma@freescale.com>
256
257 PR server/17457
258 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
259 (AARCH64_FPCR_REGNO): Likewise.
260 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
261 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
262 (aarch64_store_fpregset): Likewise.
263
5227d625
JB
2642014-12-15 Joel Brobecker <brobecker@adacore.com>
265
266 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
267 Remove FIXME comment about assumption about N.
268
f93b65a0
JB
2692014-12-13 Joel Brobecker <brobecker@adacore.com>
270
271 * configure.ac: If large-file support is disabled in GDBserver,
272 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
273 * configure: Regenerate.
274
e5a9158d
AA
2752014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
276
277 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
278 warning upon ENODATA from ptrace.
279 * linux-s390-low.c (s390_store_tdb): New.
280 (s390_regsets): Add regset for NT_S390_TDB.
281
feea5f36
AA
2822014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
283
284 * linux-low.c (regsets_store_inferior_registers): Skip regsets
285 without a fill_function.
286 * linux-s390-low.c (s390_fill_last_break): Remove.
287 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
288 (s390_arch_setup): Use regset's size instead of fill_function for
289 loop end condition.
290
098dbe61
AA
2912014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
292
293 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
294 the regset's store function when ptrace returned an error.
295 * regcache.c (get_thread_regcache): Invalidate register cache
296 before fetching inferior's registers.
297
28eef672
AA
2982014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
299
300 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
301 while-loop as for-loop.
302 (regsets_store_inferior_registers): Likewise.
303
bdca27a2
YQ
3042014-11-28 Yao Qi <yao@codesourcery.com>
305
306 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
307 * config.in, configure: Re-generate.
308 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
309 is defined.
310
9c232dda
YQ
3112014-11-21 Yao Qi <yao@codesourcery.com>
312
313 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
314 (AC_CHECK_HEADERS): Remove malloc.h.
315 * configure: Re-generated.
316 * config.in: Re-generated.
317 * server.h: Don't include alloca.h and malloc.h.
318 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
319 Don't include malloc.h.
320
43968415
JB
3212014-11-17 Joel Brobecker <brobecker@adacore.com>
322
323 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
324 corresponding ERRNO check in same block.
325
40e91bc7
PA
3262014-11-12 Pedro Alves <palves@redhat.com>
327
328 * server.c (cont_thread): Update comment.
329 (start_inferior, attach_inferior): No longer clear cont_thread.
330 (handle_v_cont): No longer set cont_thread.
331 (captured_main): Clear cont_thread each time a GDB connects.
332
c2c118cf
PA
3332014-11-12 Pedro Alves <palves@redhat.com>
334
335 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
336 thread, and don't resume all threads if the Hc thread has exited.
337
78708b7c
PA
3382014-11-12 Pedro Alves <palves@redhat.com>
339
340 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
341 the process group instead of to a specific LWP.
342
a2abc7de
PA
3432014-10-15 Pedro Alves <palves@redhat.com>
344
345 PR server/17487
346 * win32-arm-low.c (arm_set_thread_context): Remove current_event
347 parameter.
348 (arm_set_thread_context): Delete.
349 (the_low_target): Adjust.
350 * win32-i386-low.c (debug_registers_changed)
351 (debug_registers_used): Delete.
352 (update_debug_registers_callback): New function.
353 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
354 needing to update their debug registers.
355 (win32_get_current_dr): New function.
356 (x86_dr_low_get_addr, x86_dr_low_get_control)
357 (x86_dr_low_get_status): Fetch the debug register from the thread
358 record's context.
359 (i386_initial_stuff): Adjust.
360 (i386_get_thread_context): Remove current_event parameter. Don't
361 clear debug_registers_changed nor copy DR values to
362 debug_reg_state.
363 (i386_set_thread_context): Delete.
364 (i386_prepare_to_resume): New function.
365 (i386_thread_added): Mark the thread as needing to update irs
366 debug registers.
367 (the_low_target): Remove i386_set_thread_context and install
368 i386_prepare_to_resume.
369 * win32-low.c (win32_get_thread_context): Adjust.
370 (win32_set_thread_context): Use SetThreadContext
371 directly.
372 (win32_prepare_to_resume): New function.
373 (win32_require_context): New function, factored out from ...
374 (thread_rec): ... this.
375 (continue_one_thread): Call win32_prepare_to_resume on each thread
376 we're about to continue.
377 (win32_resume): Call win32_prepare_to_resume on the event thread.
378 * win32-low.h (struct win32_thread_info)
379 <debug_registers_changed>: New field.
380 (struct win32_target_ops): Change prototype of set_thread_context,
381 delete set_thread_context and add prepare_to_resume.
382 (win32_require_context): New declaration.
383
a442d071
GB
3842014-10-08 Gary Benson <gbenson@redhat.com>
385
386 * server.h: Do not include common-exceptions.h.
387
6f1947e8
GB
3882014-10-08 Gary Benson <gbenson@redhat.com>
389
390 * server.h: Do not include cleanups.h.
391
63b434a4
JH
3922014-09-30 James Hogan <james.hogan@imgtec.com>
393
394 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
395 mips64-dsp-linux.c.
396
c4d9ceb6
YQ
3972014-09-23 Yao Qi <yao@codesourcery.com>
398
399 * linux-low.c (lp_status_maybe_breakpoint): New function.
400 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
401 (count_events_callback): Likewise.
402 (select_event_lwp_callback): Likewise.
403 (cancel_breakpoints_callback): Likewise.
404
89a5711c
DB
4052014-09-19 Don Breazeal <donb@codesourcery.com>
406
407 * linux-low.c (handle_extended_wait): Call
408 linux_ptrace_get_extended_event.
409 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
410 linux_is_extended_waitstatus.
411
bffc0964
JB
4122014-09-16 Joel Brobecker <brobecker@adacore.com>
413
414 * Makefile.in (CPPFLAGS): Define.
415 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
416 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
417
0bfdf32f
GB
4182014-09-16 Gary Benson <gbenson@redhat.com>
419
420 * inferiors.h (current_inferior): Renamed as...
421 (current_thread): New variable. All uses updated.
422 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
423 (maybe_move_out_of_jump_pad): Likewise.
424 (cancel_breakpoint): Likewise.
425 (linux_low_filter_event): Likewise.
426 (wait_for_sigstop): Likewise.
427 (linux_resume_one_lwp): Likewise.
428 (need_step_over_p): Likewise.
429 (start_step_over): Likewise.
430 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
431 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
432 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
433 and save_inferior as saved_thread.
434 * regcache.c (get_thread_regcache): Renamed saved_inferior as
435 saved_thread.
436 (regcache_invalidate_thread): Likewise.
437 * remote-utils.c (prepare_resume_reply): Likewise.
438 * thread-db.c (thread_db_get_tls_address): Likewise.
439 (disable_thread_event_reporting): Likewise.
440 (remove_thread_event_breakpoints): Likewise.
441 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
442 as saved_thread.
443 * target.h (set_desired_inferior): Renamed as...
444 (set_desired_thread): New declaration. All uses updated.
445 * server.c (myresume): Updated comment to reference thread instead
446 of inferior.
447 (handle_serial_event): Likewise.
448 (handle_target_event): Likewise.
449
361c8ade
GB
4502014-09-12 Tom Tromey <tromey@redhat.com>
451 Gary Benson <gbenson@redhat.com>
452
453 * regcache.h: Include common-regcache.h.
454 (regcache_read_pc): Don't declare.
455 * regcache.c (get_thread_regcache_for_ptid): New function.
456
bd9269f7
GB
4572014-09-11 Tom Tromey <tromey@redhat.com>
458 Gary Benson <gbenson@redhat.com>
459
460 * symbol.c: New file.
461 * Makefile.in (SFILES): Add symbol.c.
462 (OBS): Add symbol.o.
463
f8c1d06b
GB
4642014-09-11 Gary Benson <gbenson@redhat.com>
465
466 * target.c (target_stop_ptid, target_continue_ptid): New
467 functions.
468
721ec300
GB
4692014-09-11 Tom Tromey <tromey@redhat.com>
470 Gary Benson <gbenson@redhat.com>
471
472 * target.h: Include target/target.h.
473 * target.c (target_read_memory, target_read_uint32)
474 (target_write_memory): New functions.
475
c5e92cca
GB
4762014-09-11 Gary Benson <gbenson@redhat.com>
477
478 * server.h (debug_hw_points): Don't declare.
479 * server.c (debug_hw_points): Don't define. Replace all uses
480 with show_debug_regs.
481 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
482 all uses with show_debug_regs.
483
2e4bb98a
EBM
4842014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
485
486 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
487 endianness into account.
488 (ppc_supply_ptrace_register): Likewise.
489
ac740bc7
JH
4902014-09-03 James Hogan <james.hogan@imgtec.com>
491
492 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
493 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
494
97ea6506
GB
4952014-09-03 Gary Benson <gbenson@redhat.com>
496
497 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
498 ALL_DEBUG_ADDRESS_REGISTERS.
499
df7e5265
GB
5002014-09-02 Gary Benson <gbenson@redhat.com>
501
502 * i386-low.h: Renamed as...
503 * x86-low.h: New file. All type, function and variable name
504 prefixes changed from "i386_" to "x86_". All references updated.
505 * i386-low.c: Renamed as...
506 * x86-low.c: New file. All type, function and variable name
507 prefixes changed from "i386_" to "x86_". All references updated.
508
ed859da7
GB
5092014-09-02 Gary Benson <gbenson@redhat.com>
510
511 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
512 (x86_linux_new_thread): Likewise.
513
860789c7
GB
5142014-08-29 Gary Benson <gbenson@redhat.com>
515
516 * server.h (setjmp.h): Do not include.
517 (toplevel): Do not declare.
518 (common-exceptions.h): Include.
519 (cleanups.h): Likewise.
520 * server.c (toplevel): Do not define.
521 (exit_code): New static global.
522 (detach_or_kill_for_exit_cleanup): New function.
523 (main): New function. Original main renamed to...
524 (captured_main): New function.
525 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
526
ff55e1b5
GB
5272014-08-29 Gary Benson <gbenson@redhat.com>
528
529 * Makefile.in (SFILES): Add common/common-exceptions.c.
530 (OBS): Add common-exceptions.o.
531 (common-exceptions.o): New rule.
532 * utils.c (prepare_to_throw_exception): New function.
533
e9bcb658
GB
5342014-08-29 Gary Benson <gbenson@redhat.com>
535
536 * config.in: Regenerate.
537 * configure: Likewise.
538
e3180625
GB
5392014-08-29 Gary Benson <gbenson@redhat.com>
540
541 * Makefile.in (SFILES): Add common/cleanups.c.
542 (OBS): cleanups.o.
543 (cleanups.o): New rule.
544
e3d6ba5d
GB
5452014-08-29 Gary Benson <gbenson@redhat.com>
546
547 * utils.c (internal_vwarning): New function.
548
7096e886
GB
5492014-08-28 Gary Benson <gbenson@redhat.com>
550
551 * utils.h (fatal): Remove declaration.
552 * utils.c (fatal): Remove function.
553
14ce3192
GB
5542014-08-28 Gary Benson <gbenson@redhat.com>
555
556 * tracepoint.c (gdb_agent_init): Replace fatal with
557 perror_with_name.
558 (initialize_tracepoint): Likewise.
559
50278d59
GB
5602014-08-28 Gary Benson <gbenson@redhat.com>
561
562 * remote-utils.c (remote_prepare): Replace fatal with error.
563
aa96c426
GB
5642014-08-28 Gary Benson <gbenson@redhat.com>
565
566 * linux-low.c (linux_async): Replace fatal with warning.
567 Tidy up and return.
568 (linux_start_non_stop): Return -1 if linux_async failed.
569
f7160e97
GB
5702014-08-28 Gary Benson <gbenson@redhat.com>
571
572 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
573 gdb_assert.
574 (i386_dr_low_get_addr): Remove vague comment.
575 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
576 gdb_assert.
577
38e08fca
GB
5782014-08-28 Gary Benson <gbenson@redhat.com>
579
580 * inferiors.c (get_thread_process): Replace check with gdb_assert.
581 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
582 internal_error.
583 (linux_resume_one_lwp): Likewise.
584 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
585 gdb_assert.
586 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
587 with internal_error.
588 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
589 (init_register_cache): Replace fatal with gdb_assert_not_reached.
590 (find_register_by_name): Replace fatal with internal_error.
591 (find_regno): Likewise.
592 * tdesc.c (init_target_desc): Replace check with gdb_assert.
593 * thread-db.c (thread_db_create_event): Likewise.
594 (thread_db_load_search): Likewise.
595 (try_thread_db_load_1): Likewise.
596 * tracepoint.c (get_jump_space_head): Replace fatal with
597 internal_error.
598 (claim_trampoline_space): Likewise.
599 (have_fast_tracepoint_trampoline_buffer): Likewise.
600 (cmd_qtstart): Likewise.
601 (stop_tracing): Likewise.
602 (fast_tracepoint_collecting): Likewise.
603 (target_malloc): Likewise.
604 (download_tracepoint): Likewise.
605 (download_trace_state_variables): Replace check with gdb_assert.
606 (upload_fast_traceframes): Replace fatal with internal_error.
607
34abf635
GB
6082014-08-19 Tom Tromey <tromey@redhat.com>
609 Gary Benson <gbenson@redhat.com>
610
611 * Makefile.in (SFILES): Add common/common-debug.c.
612 (OBS): Add common-debug.o.
613 (common-debug.o): New rule.
614 * debug.h (debug_printf): Don't declare.
615 * debug.c (debug_printf): Renamed and rewritten as...
616 (debug_vprintf): New function.
617
f6e94d78
GB
6182014-08-19 Gary Benson <gbenson@redhat.com>
619
620 * utils.h: Do not include print-utils.h.
621
9239eeab
GB
6222014-08-19 Tom Tromey <tromey@redhat.com>
623 Gary Benson <gbenson@redhat.com>
624
625 * server.h: Add static assertion.
626 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
627
ef87c8bb
GB
6282014-08-19 Tom Tromey <tromey@redhat.com>
629 Gary Benson <gbenson@redhat.com>
630
631 * Makefile.in (SFILES): Add common/errors.c.
632 (OBS): Add errors.o.
633 (IPA_OBS): Add errors-ipa.o.
634 (errors.o): New rule.
635 (errors-ipa.o): Likewise.
636 * utils.h (perror_with_name, error, warning): Don't declare.
637 * utils.c (warning): Renamed and rewritten as...
638 (vwarning): New function.
639 (error): Renamed and rewritten as...
640 (verror): New function.
641 (internal_error): Renamed and rewritten as...
642 (internal_verror): New function.
643
bb974a24
GB
6442014-08-07 Gary Benson <gbenson@redhat.com>
645
646 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
647 * configure: Regenerate.
648 * config.in: Likewise.
649 * server.h: Do not include errno.h.
650 * event-loop.c: Likewise.
651 * hostio-errno.c: Likewise.
652 * linux-low.c: Likewise.
653 * remote-utils.c: Likewise.
654 * spu-low.c: Likewise.
655 * utils.c: Likewise.
656 * gdbreplay.c: Unconditionally include errno.h.
657
6d3d12eb
GB
6582014-08-07 Gary Benson <gbenson@redhat.com>
659
660 * server.h: Do not include string.h.
661 * event-loop.c: Likewise.
662 * linux-low.c: Likewise.
663 * regcache.c: Likewise.
664 * remote-utils.c: Likewise.
665 * spu-low.c: Likewise.
666 * utils.c: Likewise.
667
dccbb609
GB
6682014-08-07 Gary Benson <gbenson@redhat.com>
669
670 * server.h: Do not include gdb_assert.h.
671
e76df0d0
GB
6722014-08-07 Gary Benson <gbenson@redhat.com>
673
674 * server.h: Do not include common-utils.h.
675
4cb9c816
GB
6762014-08-07 Gary Benson <gbenson@redhat.com>
677
678 * server.h: Do not include ptid.h.
679 * notif.h: Likewise.
680
3995eeee
GB
6812014-08-07 Gary Benson <gbenson@redhat.com>
682
683 * server.h: Do not include gdb_locale.h.
684
cb9f1a9b
GB
6852014-08-07 Gary Benson <gbenson@redhat.com>
686
687 * server.h: Do not include gdb/signals.h.
688 * win32-low.c: Likewise.
689
a5fceff8
GB
6902014-08-07 Gary Benson <gbenson@redhat.com>
691
692 * server.h: Do not include pathmax.h.
693
b9391142
GB
6942014-08-07 Gary Benson <gbenson@redhat.com>
695
696 * server.h: Do not include libiberty.h.
697 * linux-bfin-low.c: Likewise.
698
0e443c87
GB
6992014-08-07 Gary Benson <gbenson@redhat.com>
700
701 * server.h: Do not include ansidecl.h.
702
8ebb3f56
GB
7032014-08-07 Gary Benson <gbenson@redhat.com>
704
705 * linux-x86-low.c: Do not include stddef.h.
706 * lynx-ppc-low.c: Likewise.
707 * tracepoint.c: Likewise.
708
8980bdf6
GB
7092014-08-07 Gary Benson <gbenson@redhat.com>
710
711 * server.h: Do not include stdarg.h.
712 * nto-low.c: Likewise.
713
d7096f71
GB
7142014-08-07 Gary Benson <gbenson@redhat.com>
715
716 * server.h: Do not include stdlib.h.
717 * inferiors.c: Likewise.
718 * linux-low.c: Likewise.
719 * regcache.c: Likewise.
720 * spu-low.c: Likewise.
721 * tracepoint.c: Likewise.
722 * utils.c: Likewise.
723
d02f550d
GB
7242014-08-07 Gary Benson <gbenson@redhat.com>
725
726 * server.h: Do not include stdio.h.
727 * linux-low.c: Likewise.
728 * remote-utils.c: Likewise.
729 * spu-low.c: Likewise.
730 * utils.c: Likewise.
731 * wincecompat.c: Likewise.
732
87f6c4e3
GB
7332014-08-06 Gary Benson <gbenson@redhat.com>
734
735 * regcache.c (init_register_cache): Move conditionals inside if.
736
7089dca4
GB
7372014-08-06 Gary Benson <gbenson@redhat.com>
738
739 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
740
462f517e
GB
7412014-07-31 Gary Benson <gbenson@redhat.com>
742
743 * ax.h: Do not include server.h.
744 * gdbthread.h: Likewise.
745 * lynx-low.h: Likewise.
746 * notif.h: Likewise.
747
976411d6
GB
7482014-07-30 Gary Benson <gbenson@redhat.com>
749
750 * server.h: Include common-defs.h.
751 Do not include config.h or build-gnulib-gdbserver/config.h.
752
d41f6d8e
GB
7532014-07-30 Gary Benson <gbenson@redhat.com>
754
755 * hostio-errno.c: Move server.h to top of includes list.
756 * inferiors.c: Likewise.
757 * linux-x86-low.c: Likewise.
758 * notif.c: Include server.h.
759
314c6a35
TT
7602014-07-24 Tom Tromey <tromey@redhat.com>
761 Gary Benson <gbenson@redhat.com>
762
763 * server.h (CORE_ADDR): Now unsigned.
764
69ff6be5
PA
7652014-07-16 Pedro Alves <palves@redhat.com>
766
767 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
768
ce9e3fe7
PA
7692014-07-15 Pedro Alves <palves@redhat.com>
770
771 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
772 copy.
773
e76126e8
PA
7742014-07-11 Pedro Alves <palves@redhat.com>
775
776 * linux-low.c (kill_wait_lwp): New function, based on
777 kill_one_lwp_callback, but use my_waitpid directly.
778 (kill_one_lwp_callback, linux_kill): Use it.
779
8e9db26e
PA
7802014-06-23 Pedro Alves <palves@redhat.com>
781
782 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
783 before setting DR0..DR3.
784
698b3e08
GB
7852014-06-20 Gary Benson <gbenson@redhat.com>
786
787 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
788 * configure: Regenerated.
789 * config.in: Likewise.
790
125f8a3d
GB
7912014-06-20 Gary Benson <gbenson@redhat.com>
792
793 * Makefile.in (SFILES): Update locations for files moved
794 from common to nat.
795 (object file files): Reordered.
796
42995dbd
GB
7972014-06-20 Gary Benson <gbenson@redhat.com>
798
799 * i386-low.h (i386_dr_low_can_set_addr): Removed.
800 (i386_dr_low_set_addr): Likewise.
801 (i386_dr_low_get_addr): Likewise.
802 (i386_dr_low_can_set_control): Likewise.
803 (i386_dr_low_set_control): Likewise.
804 (i386_dr_low_get_control): Likewise.
805 (i386_dr_low_get_status): Likewise.
806 (i386_get_debug_register_length): Likewise.
807 * linux-x86-low.c (i386_dr_low_set_addr):
808 Changed signature. Made static.
809 (i386_dr_low_get_addr): Likewise.
810 (i386_dr_low_set_control): Likewise.
811 (i386_dr_low_get_control): Likewise.
812 (i386_dr_low_get_status): Likewise.
813 (i386_dr_low): New global variable.
814 * win32-i386-low.c (i386_dr_low_set_addr):
815 Changed signature. Made static.
816 (i386_dr_low_get_addr): Likewise.
817 (i386_dr_low_set_control): Likewise.
818 (i386_dr_low_get_control): Likewise.
819 (i386_dr_low_get_status): Likewise.
820 (i386_dr_low): New global variable.
821
e1d2394b
MS
8222014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
823
824 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
825 * Makefile.in (AR, AR_FLAGS): Define.
826 * configure: Regenerate.
827
3a8ee006
GB
8282014-06-19 Gary Benson <gbenson@redhat.com>
829
830 * Makefile.in (i386-dregs.o): New rule.
831 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
832 * i386-low.c (target.h): Remove include.
833 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
834 (DR_CONTROL_SHIFT): Likewise.
835 (DR_CONTROL_SIZE): Likewise.
836 (DR_RW_EXECUTE): Likewise.
837 (DR_RW_WRITE): Likewise.
838 (DR_RW_READ): Likewise.
839 (DR_RW_IORW): Likewise.
840 (DR_LEN_1): Likewise.
841 (DR_LEN_2): Likewise.
842 (DR_LEN_4): Likewise.
843 (DR_LEN_8): Likewise.
844 (DR_LOCAL_ENABLE_SHIFT): Likewise.
845 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
846 (DR_ENABLE_SIZE): Likewise.
847 (DR_LOCAL_SLOWDOWN): Likewise.
848 (DR_GLOBAL_SLOWDOWN): Likewise.
849 (DR_CONTROL_RESERVED): Likewise.
850 (I386_DR_CONTROL_MASK): Likewise.
851 (I386_DR_VACANT): Likewise.
852 (I386_DR_LOCAL_ENABLE): Likewise.
853 (I386_DR_GLOBAL_ENABLE): Likewise.
854 (I386_DR_DISABLE): Likewise.
855 (I386_DR_SET_RW_LEN): Likewise.
856 (I386_DR_GET_RW_LEN): Likewise.
857 (I386_DR_WATCH_HIT): Likewise.
858 (i386_wp_op_t): Likewise.
859 (i386_show_dr): Likewise.
860 (i386_length_and_rw_bits): Likewise.
861 (i386_insert_aligned_watchpoint): Likewise.
862 (i386_remove_aligned_watchpoint): Likewise.
863 (i386_handle_nonaligned_watchpoint): Likewise.
864 i386_update_inferior_debug_regs(): Likewise.
865 (i386_dr_insert_watchpoint): Likewise.
866 (i386_dr_remove_watchpoint): Likewise.
867 (i386_dr_region_ok_for_watchpoint): Likewise.
868 (i386_dr_stopped_data_address): Likewise.
869 (i386_dr_stopped_by_watchpoint): Likewise.
870
8f26655c
GB
8712014-06-19 Gary Benson <gbenson@redhat.com>
872
873 * i386-low.c (i386_dr_show): Renamed to
874 i386_show_dr and made static. All uses updated.
875 (i386_dr_length_and_rw_bits): Renamed to
876 i386_length_and_rw_bits and made static.
877 All uses updated.
878 (i386_dr_insert_aligned_watchpoint): Renamed to
879 i386_insert_aligned_watchpoint and made static.
880 All uses updated.
881 (i386_dr_remove_aligned_watchpoint): Renamed to
882 i386_remove_aligned_watchpoint and made static.
883 All uses updated.
884 (i386_dr_update_inferior_debug_regs): Renamed to
885 i386_update_inferior_debug_regs and made static.
886 All uses updated.
887
b9228891
GB
8882014-06-18 Gary Benson <gbenson@redhat.com>
889
5171def3
GB
890 * i386-low.h (i386_dr_low_can_set_addr): New macro.
891 (i386_dr_low_can_set_control): Likewise.
892 (i386_get_debug_register_length): Likewise.
893 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
894 (i386_dr_low_can_set_control): Likewise.
895 (i386_get_debug_register_length): Likewise.
896
8972014-06-17 Gary Benson <gbenson@redhat.com>
898
b9228891
GB
899 * i386-low.h (i386-dregs.h): New include.
900 (DR_FIRSTADDR): Now in i386-dregs.h.
901 (DR_LASTADDR): Likewise.
902 (DR_NADDR): Likewise.
903 (DR_STATUS): Likewise.
904 (DR_CONTROL): Likewise.
905 (i386_debug_reg_state): Likewise.
906 (i386_dr_insert_watchpoint): Likewise.
907 (i386_dr_remove_watchpoint): Likewise.
908 (i386_dr_region_ok_for_watchpoint): Likewise.
909 (i386_dr_stopped_data_address): Likewise.
910 (i386_dr_stopped_by_watchpoint): Likewise.
911 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
912
4be83cc2
GB
9132014-06-18 Gary Benson <gbenson@redhat.com>
914
915 * i386-low.h (i386_low_insert_watchpoint): Renamed to
916 i386_dr_insert_watchpoint.
917 (i386_low_remove_watchpoint): Renamed to
918 i386_dr_remove_watchpoint.
919 (i386_low_region_ok_for_watchpoint): Renamed to
920 i386_dr_region_ok_for_watchpoint.
921 (i386_low_stopped_data_address): Renamed to
922 i386_dr_stopped_data_address.
923 (i386_low_stopped_by_watchpoint): Renamed to
924 i386_dr_stopped_by_watchpoint.
925 * i386-low.c (i386_show_dr): Renamed to
926 i386_dr_show and made nonstatic. All uses updated.
927 (i386_length_and_rw_bits): Renamed to
928 i386_dr_length_and_rw_bits and made nonstatic.
929 All uses updated.
930 (i386_insert_aligned_watchpoint): Renamed to
931 i386_dr_insert_aligned_watchpoint and made nonstatic.
932 All uses updated.
933 (i386_remove_aligned_watchpoint): Renamed to
934 i386_dr_remove_aligned_watchpoint and made nonstatic.
935 All uses updated.
936 (i386_update_inferior_debug_regs): Renamed to
937 i386_dr_update_inferior_debug_regs and made nonstatic.
938 All uses updated.
939 (i386_low_insert_watchpoint): Renamed to
940 i386_dr_insert_watchpoint. All uses updated.
941 (i386_low_remove_watchpoint): Renamed to
942 i386_dr_remove_watchpoint. All uses updated.
943 (i386_low_region_ok_for_watchpoint): Renamed to
944 i386_dr_region_ok_for_watchpoint. All uses updated.
945 (i386_low_stopped_data_address): Renamed to
946 i386_dr_stopped_data_address. All uses updated.
947 (i386_low_stopped_by_watchpoint): Renamed to
948 i386_dr_stopped_by_watchpoint. All uses updated.
949
131aa0d4
GB
9502014-06-18 Gary Benson <gbenson@redhat.com>
951
952 * i386-low.c (i386_dr_low_can_set_addr): New macro.
953 (i386_dr_low_can_set_control): Likewise.
954 (i386_insert_aligned_watchpoint): New check.
955
d9305f7f
GB
9562014-06-18 Gary Benson <gbenson@redhat.com>
957
958 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
959 Renamed to state.
960
e927c9fc
GB
9612014-06-18 Gary Benson <gbenson@redhat.com>
962
963 * i386-low.c (i386_length_and_rw_bits): Use internal_error
964 instead of fatal and error.
965 (i386_handle_nonaligned_watchpoint): Likewise.
966
1b6d4134
GB
9672014-06-18 Gary Benson <gbenson@redhat.com>
968
969 * i386-low.c (i386_get_debug_register_length): New macro.
970 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
971 (i386_show_dr): Use debug_printf instead of fprintf. Use
972 phex to format values.
973
6e62758f
GB
9742014-06-18 Gary Benson <gbenson@redhat.com>
975
976 * i386-low.h: Comment changes.
977 * i386-low.c: Likewise.
978
fc6e2f03
GB
9792014-06-18 Gary Benson <gbenson@redhat.com>
980
981 * i386-low.c: Whitespace changes.
982
f9d1eeed
TT
9832014-06-12 Tom Tromey <tromey@redhat.com>
984
985 * utils.c (freeargv): Remove.
986
0b04e523
TT
9872014-06-12 Tom Tromey <tromey@redhat.com>
988
989 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
990 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
991 (parse_debug_format_options): Likewise.
992 (gdbserver_usage): Likewise.
993 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
994 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
995 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
996 against libiberty.
997 ($(LIBGNU)): Depend on libiberty.
998 (all-lib): Recurse into all subdirs.
999 (install-only): Invoke "install" target in subdirs.
1000 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1001 targets.
1002 * configure: Rebuild.
1003 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
1004 for vasprintf, vsnprintf, or gettimeofday.
1005 * configure.srv: Don't add safe-ctype.o or lbasename.o to
1006 srv_tgtobj.
1007
270c9937
JB
10082014-06-05 Joel Brobecker <brobecker@adacore.com>
1009
1010 * development.sh: Delete.
1011 * Makefile.in (config.status): Adjust dependency on development.sh.
1012 * configure.ac: Adjust development.sh source call.
1013 * configure: Regenerate.
1014
0a261ed8
PA
10152014-06-02 Pedro Alves <palves@redhat.com>
1016
1017 * ax.c (gdb_free_agent_expr): New function.
1018 * ax.h (gdb_free_agent_expr): New declaration.
1019 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1020 list.
1021 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1022 static.
1023 (clear_breakpoint_conditions_and_commands): New function.
1024 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1025 (clear_breakpoint_conditions_and_commands): New declaration.
1026
e9dae05e
RR
10272014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1028
1029 * linux-aarch64-low.c (asm/ptrace.h): Include.
1030
5876f503
JK
10312014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1032
1033 Fix TLS access for -static -pthread.
1034 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1035 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1036 (thread_db_load_search, try_thread_db_load_1): Initialize it.
1037
802e8e6d
PA
10382014-05-20 Pedro Alves <palves@redhat.com>
1039
1040 * linux-aarch64-low.c (aarch64_insert_point)
1041 (aarch64_remove_point): No longer check whether the type is
1042 supported here. Adjust to new interface.
1043 (the_low_target): Install aarch64_supports_z_point_type as
1044 supports_z_point_type method.
1045 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
1046 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
1047 instead of a Z packet char. Adjust.
1048 (arm_supports_z_point_type): New function.
1049 (arm_insert_point, arm_remove_point): Adjust to new interface.
1050 (the_low_target): Install arm_supports_z_point_type.
1051 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1052 (cris_insert_point, cris_remove_point): Adjust to new interface.
1053 Don't check whether the type is supported here.
1054 (the_low_target): Install cris_supports_z_point_type.
1055 * linux-low.c (linux_supports_z_point_type): New function.
1056 (linux_insert_point, linux_remove_point): Adjust to new interface.
1057 * linux-low.h (struct linux_target_ops) <insert_point,
1058 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1059 raw_breakpoint pointer parameter.
1060 <supports_z_point_type>: New method.
1061 * linux-mips-low.c (mips_supports_z_point_type): New function.
1062 (mips_insert_point, mips_remove_point): Adjust to new interface.
1063 Use mips_supports_z_point_type.
1064 (the_low_target): Install mips_supports_z_point_type.
1065 * linux-ppc-low.c (the_low_target): Install NULL as
1066 supports_z_point_type method.
1067 * linux-s390-low.c (the_low_target): Install NULL as
1068 supports_z_point_type method.
1069 * linux-sparc-low.c (the_low_target): Install NULL as
1070 supports_z_point_type method.
1071 * linux-x86-low.c (x86_supports_z_point_type): New function.
1072 (x86_insert_point): Adjust to new insert_point interface. Use
1073 insert_memory_breakpoint. Adjust to new
1074 i386_low_insert_watchpoint interface.
1075 (x86_remove_point): Adjust to remove_point interface. Use
1076 remove_memory_breakpoint. Adjust to new
1077 i386_low_remove_watchpoint interface.
1078 (the_low_target): Install x86_supports_z_point_type.
1079 * lynx-low.c (lynx_target_ops): Install NULL as
1080 supports_z_point_type callback.
1081 * nto-low.c (nto_supports_z_point_type): New.
1082 (nto_insert_point, nto_remove_point): Adjust to new interface.
1083 (nto_target_ops): Install nto_supports_z_point_type.
1084 * mem-break.c: Adjust intro comment.
1085 (struct raw_breakpoint) <raw_type, size>: New fields.
1086 <inserted>: Update comment.
1087 <shlib_disabled>: Delete field.
1088 (enum bkpt_type) <gdb_breakpoint>: Delete value.
1089 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1090 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1091 (raw_bkpt_type_to_target_hw_bp_type): New function.
1092 (find_enabled_raw_code_breakpoint_at): New function.
1093 (find_raw_breakpoint_at): New type and size parameters. Use them.
1094 (insert_memory_breakpoint): New function, based off
1095 set_raw_breakpoint_at.
1096 (remove_memory_breakpoint): New function.
1097 (set_raw_breakpoint_at): Reimplement.
1098 (set_breakpoint): New, based on set_breakpoint_at.
1099 (set_breakpoint_at): Reimplement.
1100 (delete_raw_breakpoint): Go through the_target->remove_point
1101 instead of assuming memory breakpoints.
1102 (find_gdb_breakpoint_at): Delete.
1103 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1104 (find_gdb_breakpoint): New function.
1105 (set_gdb_breakpoint_at): Delete.
1106 (z_type_supported): New function.
1107 (set_gdb_breakpoint_1): New function, loosely based off
1108 set_gdb_breakpoint_at.
1109 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1110 (delete_gdb_breakpoint_at): Delete.
1111 (delete_gdb_breakpoint_1): New function, loosely based off
1112 delete_gdb_breakpoint_at.
1113 (delete_gdb_breakpoint): New function.
1114 (clear_gdb_breakpoint_conditions): Rename to ...
1115 (clear_breakpoint_conditions): ... this. Don't handle a NULL
1116 breakpoint.
1117 (add_condition_to_breakpoint): Make static.
1118 (add_breakpoint_condition): Take a struct breakpoint pointer
1119 instead of an address. Adjust.
1120 (gdb_condition_true_at_breakpoint): Rename to ...
1121 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1122 z_type parameter.
1123 (gdb_condition_true_at_breakpoint): Reimplement.
1124 (add_breakpoint_commands): Take a struct breakpoint pointer
1125 instead of an address. Adjust.
1126 (gdb_no_commands_at_breakpoint): Rename to ...
1127 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
1128 parameter. Return true if no breakpoint was found. Change debug
1129 output.
1130 (gdb_no_commands_at_breakpoint): Reimplement.
1131 (run_breakpoint_commands): Rename to ...
1132 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
1133 and change return type to boolean.
1134 (run_breakpoint_commands): New function.
1135 (gdb_breakpoint_here): Also check for Z1 breakpoints.
1136 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
1137 breakpoint. Go through the_target->remove_point instead of
1138 assuming memory breakpoint.
1139 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
1140 software and hardware breakpoints.
1141 (reinsert_raw_breakpoint): Go through the_target->insert_point
1142 instead of assuming memory breakpoint.
1143 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
1144 software and hardware breakpoints.
1145 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
1146 Check both software and hardware breakpoints.
1147 (validate_inserted_breakpoint): Assert the breakpoint is a
1148 software breakpoint. Set the inserted flag to -1 instead of
1149 setting shlib_disabled.
1150 (delete_disabled_breakpoints): Adjust.
1151 (validate_breakpoints): Only validate software breakpoints.
1152 Adjust to inserted flag change.
1153 (check_mem_read, check_mem_write): Skip breakpoint types other
1154 than software breakpoints. Adjust to inserted flag change.
1155 * mem-break.h (enum raw_bkpt_type): New enum.
1156 (raw_breakpoint, struct process_info): Forward declare.
1157 (Z_packet_to_target_hw_bp_type): Delete declaration.
1158 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
1159 (set_gdb_breakpoint, delete_gdb_breakpoint)
1160 (clear_breakpoint_conditions): New declarations.
1161 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
1162 (breakpoint_inserted_here): Update comment.
1163 (add_breakpoint_condition, add_breakpoint_commands): Replace
1164 address parameter with a breakpoint pointer parameter.
1165 (gdb_breakpoint_here): Update comment.
1166 (delete_gdb_breakpoint_at): Delete.
1167 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
1168 * server.c (process_point_options): Take a struct breakpoint
1169 pointer instead of an address. Adjust.
1170 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
1171 delete_gdb_breakpoint.
1172 * spu-low.c (spu_target_ops): Install NULL as
1173 supports_z_point_type method.
1174 * target.h: Include mem-break.h.
1175 (struct target_ops) <prepare_to_access_memory>: Update comment.
1176 <supports_z_point_type>: New field.
1177 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1178 instead of a char. Also take a raw breakpoint pointer.
1179 * win32-arm-low.c (the_low_target): Install NULL as
1180 supports_z_point_type.
1181 * win32-i386-low.c (i386_supports_z_point_type): New function.
1182 (i386_insert_point, i386_remove_point): Adjust to new interface.
1183 (the_low_target): Install i386_supports_z_point_type.
1184 * win32-low.c (win32_supports_z_point_type): New function.
1185 (win32_insert_point, win32_remove_point): Adjust to new interface.
1186 (win32_target_ops): Install win32_supports_z_point_type.
1187 * win32-low.h (struct win32_target_ops):
1188 <supports_z_point_type>: New method.
1189 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1190 instead of a char. Also take a raw breakpoint pointer.
1191
932539e3
PA
11922014-05-20 Pedro Alves <palves@redhat.com>
1193
1194 * mem-break.h: Include break-common.h.
1195 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1196 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
1197 (Z_packet_to_target_hw_bp_type): New declaration.
1198 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
1199 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
1200 (Z_PACKET_ACCESS_WP): Delete macros.
1201 (Z_packet_to_hw_type): Delete function.
1202 * i386-low.h: Don't include break-common.h here.
1203 (Z_packet_to_hw_type): Delete declaration.
1204 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
1205 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1206 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
1207 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1208 * linux-aarch64-low.c: Don't include break-common.h here.
1209 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1210 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
1211 (Z_packet_to_target_hw_bp_type): Delete function.
1212 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
1213 function.
1214 (mips_insert_point, mips_remove_point): Use
1215 Z_packet_to_target_hw_bp_type.
1216
4ff0d3d8
PA
12172014-05-20 Pedro Alves <palves@redhat.com>
1218
1219 * linux-aarch64-low.c: Include break-common.h.
1220 (enum target_point_type): Delete.
1221 (Z_packet_to_point_type): Rename to ...
1222 (Z_packet_to_target_hw_bp_type): ... this, and return a
1223 target_hw_bp_type instead.
1224 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
1225 instead of an enum target_point_type.
1226 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
1227 breakpoint type.
1228 (aarch64_dr_state_insert_one_point)
1229 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
1230 (aarch64_handle_aligned_watchpoint)
1231 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
1232 Take an enum target_hw_bp_type instead of an enum
1233 target_point_type.
1234 (aarch64_supports_z_point_type): New function.
1235 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
1236 use Z_packet_to_target_hw_bp_type.
1237
786dc519
JB
12382014-05-20 Joel Brobecker <brobecker@adacore.com>
1239
1240 * configure.ac: Only use -Werror by default when DEVELOPMENT
1241 is true.
1242 * configure: Regenerate.
1243
9e0aa64f
JK
12442014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
1245
1246 Fix gdbserver qGetTLSAddr for x86_64 -m32.
1247 * linux-x86-low.c (X86_64_USER_REGS): New.
1248 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
1249
2b577b92
YQ
12502014-04-28 Yao Qi <yao@codesourcery.com>
1251
1252 * Makefile.in (i386-avx512.c): Fix the typo of generated file
1253 name.
1254
94611da2
PA
12552014-04-25 Pedro Alves <palves@redhat.com>
1256
1257 PR server/16255
1258 * linux-low.c (linux_attach_fail_reason_string): New function.
1259 (linux_attach_lwp): Delete.
1260 (linux_attach_lwp_1): Rename to ...
1261 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
1262 argument. Remove "initial" parameter. Return int instead of
1263 void. Don't error or warn here.
1264 (linux_attach): Adjust to call linux_attach_lwp. Call error on
1265 failure to attach to the tgid. Call warning when failing to
1266 attach to an lwp.
1267 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
1268 argument. Remove "initial" parameter. Return int instead of
1269 void. Don't error or warn here.
1270 (linux_attach_fail_reason_string): New declaration.
1271 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
1272 interface change. Use linux_attach_fail_reason_string.
1273
01f9f808
MS
12742014-04-24 Michael Sturm <michael.sturm@mintel.com>
1275 Walfred Tedeschi <walfred.tedeschi@intel.com>
1276
1277 * Makefile.in: Added rules to handle new files
1278 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
1279 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
1280 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
1281 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
1282 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
1283 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
1284 x32-avx512-linux.o.
1285 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
1286 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
1287 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
1288 i386/x32-avx512.xml.
1289 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
1290 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
1291 i386/x32-avx512-linux.xml.
1292 * i387-fp.c (num_avx512_k_registers): New constant for number
1293 of K registers.
1294 (num_avx512_zmmh_low_registers): New constant for number of
1295 lower ZMM registers (0-15).
1296 (num_avx512_zmmh_high_registers): New constant for number of
1297 higher ZMM registers (16-31).
1298 (num_avx512_ymmh_registers): New contant for number of higher
1299 YMM registers (ymm16-31 added by avx521 on x86_64).
1300 (num_avx512_xmm_registers): New constant for number of higher
1301 XMM registers (xmm16-31 added by AVX512 on x86_64).
1302 (struct i387_xsave): Add space for AVX512 registers.
1303 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
1304 Add code to handle AVX512 registers.
1305 (i387_xsave_to_cache): Add code to handle AVX512 registers.
1306 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
1307 prototypei from generated file.
1308 (tdesc_amd64_avx512_linux): Likewise.
1309 (init_registers_x32_avx512_linux): Likewise.
1310 (tdesc_x32_avx512_linux): Likewise.
1311 (init_registers_i386_avx512_linux): Likewise.
1312 (tdesc_i386_avx512_linux): Likewise.
1313 (x86_64_regmap): Add AVX512 registers.
1314 (x86_linux_read_description): Add code to handle AVX512 XSTATE
1315 mask.
1316 (initialize_low_arch): Add code to initialize AVX512 registers.
1317
51aa91f9
PA
13182014-04-23 Pedro Alves <palves@redhat.com>
1319
1320 * mem-break.c (find_gdb_breakpoint_at): Make static.
1321 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
1322
a4165e94
PA
13232014-04-23 Pedro Alves <palves@redhat.com>
1324
1325 * i386-low.c: Don't include break-common.h here.
1326 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1327 prototype to take target_hw_bp_type as argument instead of a Z
1328 packet char.
1329 * i386-low.h: Include break-common.h here.
1330 (Z_packet_to_hw_type): Declare.
1331 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1332 prototypes.
1333 * linux-x86-low.c (x86_insert_point): Convert the packet number to
1334 a target_hw_bp_type before calling i386_low_insert_watchpoint.
1335 (x86_remove_point): Convert the packet number to a
1336 target_hw_bp_type before calling i386_low_remove_watchpoint.
1337 * win32-i386-low.c (i386_insert_point): Convert the packet number
1338 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
1339 (i386_remove_point): Convert the packet number to a
1340 target_hw_bp_type before calling i386_low_remove_watchpoint.
1341
b8acf843
PA
13422014-04-23 Pedro Alves <palves@redhat.com>
1343
1344 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
1345
d708bcd1
PA
13462014-04-10 Pedro Alves <palves@redhat.com>
1347
1348 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1349 Check if the condition or command is NULL before checking if the
1350 breakpoint is known. On success, return true.
1351 * mem-break.h (add_breakpoint_condition): Document return.
1352 (add_breakpoint_commands): Add describing comment.
1353 * server.c (skip_to_semicolon): New function.
1354 (process_point_options): Use it.
1355
2eec7d5b
PA
13562014-04-09 Pedro Alves <palves@redhat.com>
1357
1358 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
1359 to lwpid_of.
1360
fa96cb38
PA
13612014-02-27 Pedro Alves <palves@redhat.com>
1362
1363 PR 12702
1364 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
1365 macros.
1366 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
1367 output.
1368 (last_thread_of_process_p): Take a PID argument instead of a
1369 thread pointer.
1370 (linux_wait_for_lwp): Delete.
1371 (num_lwps, check_zombie_leaders, not_stopped_callback): New
1372 functions.
1373 (linux_low_filter_event): New function, party factored out from
1374 linux_wait_for_event.
1375 (linux_wait_for_event): Rename to ...
1376 (linux_wait_for_event_filtered): ... this. Add new filter ptid
1377 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
1378 sigsuspend. Check for zombie leaders.
1379 (linux_wait_for_event): Reimplement as wrapper around
1380 linux_wait_for_event_filtered.
1381 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
1382 a normal or signal exit is seen, it's the whole process exiting.
1383 (wait_for_sigstop): No longer a for_each_inferior callback.
1384 Rewrite on top of linux_wait_for_event_filtered.
1385 (stop_all_lwps): Call wait_for_sigstop directly.
1386 * server.c (resume, handle_target_event): Handle
1387 TARGET_WAITKIND_NO_RESUMED.
1388
d763de10
JB
13892014-02-26 Joel Brobecker <brobecker@adacore.com>
1390
1391 * win32-low.c (psapi_get_dll_name,
1392 * win32_CreateToolhelp32Snapshot): Delete.
1393 (win32_CreateToolhelp32Snapshot, win32_Module32First)
1394 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
1395 Delete.
1396 (handle_load_dll): Add function description.
1397 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
1398
850a0f76
JB
13992014-02-26 Joel Brobecker <brobecker@adacore.com>
1400
1401 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
1402 Add comment.
1403 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
1404 base address when calling win32_add_one_solib.
1405 (handle_load_dll): Delete local variable load_addr.
1406 Remove 0x1000 offset applied to DLL base address when calling
1407 win32_add_one_solib.
1408 (handle_unload_dll): Add comment.
1409
f25b3fc3
JB
14102014-02-26 Joel Brobecker <brobecker@adacore.com>
1411
1412 * win32-low.c (win32_add_all_dlls): Renames
1413 win32_ensure_ntdll_loaded. Rewrite function documentation.
1414 Adjust implementation to always load all DLLs.
1415 Add 0x1000 offset to DLL base address when calling
1416 win32_add_one_solib.
1417 (child_initialization_done): New static global.
1418 (do_initial_child_stuff): Set child_initialization_done to
1419 zero during child initialization, and 1 after. Replace call
1420 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
1421 Add comment.
1422 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
1423 (handle_unload_dll): Add function documentation.
1424 (get_child_debug_event): Ignore load and unload DLL events
1425 during child initialization.
1426
d86d4aaf
DE
14272014-02-20 Doug Evans <dje@google.com>
1428
3bc32da3 1429 Remove global all_lwps.
d86d4aaf
DE
1430 * inferiors.h (ptid_of): Move here from linux-low.h.
1431 (pid_of, lwpid_of): Ditto.
1432 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
1433 parameter is a struct thread_info * now.
1434 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
1435 directly. Pass &all_threads to find_inferior instead of &all_lwps.
1436 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
1437 directly.
1438 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
1439 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
1440 * linux-arm-low.c (update_registers_callback): Update, "entry"
1441 parameter is a struct thread_info * now.
1442 Fetch lwpid from current_inferior directly.
1443 (arm_insert_point): Pass &all_threads to find_inferior instead of
1444 &all_lwps.
1445 (arm_remove_point): Ditto.
1446 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
1447 (arm_prepare_to_resume): Fetch pid from thread.
1448 (arm_read_description): Fetch lwpid from current_inferior directly.
1449 * linux-low.c (all_lwps): Delete.
1450 (delete_lwp): Delete call to remove_inferior.
1451 (handle_extended_wait): Fetch lwpid from thread.
1452 (add_lwp): Don't set lwp->entry.id. Remove call to
1453 add_inferior_to_list.
1454 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
1455 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
1456 (kill_one_lwp_callback): Ditto.
1457 (linux_kill): Don't dereference NULL pointer.
1458 Fetch ptid,lwpid from thread.
1459 (get_detach_signal): Fetch ptid from thread.
1460 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
1461 Simplify call to regcache_invalidate_thread.
1462 (delete_lwp_callback): Update, "entry" parameter is a
1463 struct thread_info * now. Fetch pid from thread.
1464 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
1465 (status_pending_p_callback): Update, "entry" parameter is a
1466 struct thread_info * now. Fetch ptid from thread.
1467 (find_lwp_pid): Update, "entry" parameter is a
1468 struct thread_info * now.
1469 (linux_wait_for_lwp): Fetch pid from thread.
1470 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
1471 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
1472 (enqueue_one_deferred_signal): Fetch lwpid from thread.
1473 (dequeue_one_deferred_signal): Ditto.
1474 (cancel_breakpoint): Fetch ptid from current_inferior.
1475 (linux_wait_for_event): Pass &all_threads to find_inferior,
1476 not &all_lwps. Fetch ptid, lwpid from thread.
1477 (count_events_callback): Update, "entry" parameter is a
1478 struct thread_info * now.
1479 (select_singlestep_lwp_callback): Ditto.
1480 (select_event_lwp_callback): Ditto.
1481 (cancel_breakpoints_callback): Ditto.
1482 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
1483 not &all_lwps.
1484 (select_event_lwp): Ditto. Fetch ptid from event_thread.
1485 (unsuspend_one_lwp): Update, "entry" parameter is a
1486 struct thread_info * now.
1487 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
1488 not &all_lwps.
1489 (linux_stabilize_threads): Ditto. And for for_each_inferior.
1490 Fetch lwpid from thread, not lwp.
1491 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
1492 Pass &all_threads to find_inferior, not &all_lwps.
1493 (send_sigstop): Fetch lwpid from thread, not lwp.
1494 (send_sigstop_callback): Update, "entry" parameter is a
1495 struct thread_info * now.
1496 (suspend_and_send_sigstop_callback): Ditto.
1497 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
1498 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
1499 struct thread_info * now.
1500 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
1501 from thread, lwp.
1502 (lwp_running): Update, "entry" parameter is a
1503 struct thread_info * now.
1504 (stop_all_lwps): Fetch ptid from thread.
1505 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
1506 (linux_resume_one_lwp): Fetch lwpid from thread.
1507 (linux_set_resume_request): Update, "entry" parameter is a
1508 struct thread_info * now. Fetch pid, lwpid from thread.
1509 (resume_status_pending_p): Update, "entry" parameter is a
1510 struct thread_info * now.
1511 (need_step_over_p): Ditto. Fetch lwpid from thread.
1512 (start_step_over): Fetch lwpid from thread.
1513 (linux_resume_one_thread): Update, "entry" parameter is a
1514 struct thread_info * now. Fetch lwpid from thread.
1515 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
1516 (proceed_one_lwp): Update, "entry" parameter is a
1517 struct thread_info * now. Fetch lwpid from thread.
1518 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
1519 struct thread_info * now.
1520 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
1521 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
1522 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
1523 directly.
1524 (regsets_store_inferior_registers): Ditto.
1525 (fetch_register, store_register): Ditto.
1526 (linux_read_memory, linux_write_memory): Ditto.
1527 (linux_request_interrupt): Ditto.
1528 (linux_read_auxv): Ditto.
1529 (linux_xfer_siginfo): Ditto.
1530 (linux_qxfer_spu): Ditto.
1531 (linux_qxfer_libraries_svr4): Ditto.
1532 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
1533 moved to inferiors.h.
1534 (get_lwp): Delete.
1535 (get_thread_lwp): Update.
1536 (struct lwp_info): Delete member "entry". Simplify comment for
1537 member "thread".
1538 (all_lwps): Delete.
1539 * linux-mips-low.c (mips_read_description): Fetch lwpid from
1540 current_inferior directly.
1541 (update_watch_registers_callback): Update, "entry" parameter is a
1542 struct thread_info * now. Fetch pid from thread.
1543 (mips_linux_prepare_to_resume): Fetch ptid from thread.
1544 (mips_insert_point): Fetch lwpid from current_inferior.
1545 Pass &all_threads to find_inferior, not &all_lwps.
1546 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
1547 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
1548 directly.
1549 (mips_stopped_data_address): Ditto.
1550 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
1551 directly.
1552 * linux-tile-low.c (tile_arch_setup): Ditto.
1553 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
1554 (update_debug_registers_callback): Update, "entry" parameter is a
1555 struct thread_info * now. Fetch pid from thread.
1556 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
1557 Pass &all_threads to find_inferior, not &all_lwps.
1558 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
1559 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
1560 Pass &all_threads to find_inferior, not &all_lwps.
1561 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
1562 (i386_dr_low_get_status): Ditto.
1563 (x86_linux_prepare_to_resume): Fetch ptid from thread.
1564 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
1565 (x86_linux_read_description): Ditto.
1566 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
1567
3b8361aa
DE
15682014-02-20 Doug Evans <dje@google.com>
1569
1570 * inferiors.c (get_first_inferior): Fix buglet.
1571
f7667f0d
DE
15722014-02-19 Doug Evans <dje@google.com>
1573
1574 * gdbthread.h (add_thread): Change result type to struct thread_info *.
1575 * inferiors.c (add_thread): Change result type to struct thread_info *.
1576 All callers updated.
1577 (add_lwp): Call add_thread here instead of in callers.
1578 All callers updated.
1579 * linux-low.h (get_lwp_thread): Rewrite.
1580 (struct lwp_info): New member "thread".
1581
b3312d80
DE
15822014-02-19 Doug Evans <dje@google.com>
1583
1584 * linux-low.c (add_lwp): Change result to struct lwp_info *.
1585 All callers updated.
1586
ecc6f45c
DE
15872014-02-19 Doug Evans <dje@google.com>
1588
1589 * inferiors.c (add_thread): Fix whitespace.
1590
649ebbca
DE
15912014-02-19 Doug Evans <dje@google.com>
1592
1593 * dll.c (clear_dlls): Replace accessing list implemention details
1594 with API function.
1595 * gdbthread.h (get_first_thread): Declare.
1596 * inferiors.c (for_each_inferior_with_data): New function.
1597 (get_first_thread): New function.
1598 (find_thread_ptid): Simplify.
1599 (get_first_inferior): New function.
1600 (clear_list): Delete.
1601 (one_inferior_p): New function.
1602 (clear_inferior_list): New function.
1603 (clear_inferiors): Update.
1604 * inferiors.h (for_each_inferior_with_data): Declare.
1605 (clear_inferior_list): Declare.
1606 (one_inferior_p): Declare.
1607 (get_first_inferior): Declare.
1608 * linux-low.c (linux_wait_for_event): Replace accessing list
1609 implemention details with API function.
1610 * server.c (target_running): Ditto.
1611 (accumulate_file_name_length): New function.
1612 (emit_dll_description): New function.
1613 (handle_qxfer_libraries): Replace accessing list implemention
1614 details with API function.
1615 (handle_qxfer_threads_worker): New function.
1616 (handle_qxfer_threads_proper): Replace accessing list implemention
1617 details with API function.
1618 (handle_query): Ditto.
1619 (visit_actioned_threads_callback_ftype): New typedef.
1620 (visit_actioned_threads_data): New struct.
1621 (visit_actioned_threads): Rewrite to be find_inferior callback.
1622 (resume): Call find_inferior.
1623 (handle_status): Replace accessing list implemention
1624 details with API function.
1625 (process_serial_event): Replace accessing list implemention details
1626 with API function.
1627 * target.c (set_desired_inferior): Replace accessing list implemention
1628 details with API function.
1629 * tracepoint.c (same_process_p): New function.
1630 (gdb_agent_about_to_close): Replace accessing list implemention
1631 details with API function.
1632 * win32-low.c (child_delete_thread): Replace accessing list
1633 implemention details with API function.
1634 (match_dll_by_basename): New function.
1635 (dll_is_loaded_by_basename): New function.
1636 (win32_ensure_ntdll_loaded): Replace accessing list implemention
1637 details call to dll_is_loaded_by_basename.
1638
80894984
DE
16392014-02-19 Doug Evans <dje@google.com>
1640
1641 * dll.h (struct dll_info): Add comment.
1642 * gdbthread.h (struct thread_info): Add comment.
1643 (current_ptid): Simplify.
1644 * inferiors.c (add_process): Update.
1645 (remove_process): Update.
1646 * inferiors.h (struct process_info): Rename member "head" to "entry".
1647 * linux-low.c (delete_lwp): Update.
1648 (add_lwp): Update.
1649 (last_thread_of_process_p): Update.
1650 (kill_one_lwp_callback, linux_kill): Update.
1651 (status_pending_p_callback): Update.
1652 (wait_for_sigstop): Update. Simplify read of ptid.
1653 (start_step_over): Update.
1654 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
1655 (get_lwp_thread): Update.
1656 (struct lwp_info): Rename member "head" to "entry".
1657 * regcache.h (inferior_list_entry): Delete.
1658 * server.c (kill_inferior_callback): Update.
1659 (detach_or_kill_inferior_callback): Update.
1660 (print_started_pid): Update.
1661 (print_attached_pid): Update.
1662 (process_serial_event): Simplify read of ptid.
1663 * thread-db.c (thread_db_create_event): Update.
1664 (thread_db_get_tls_address): Update.
1665 * win32-low.c (current_inferior_ptid): Simplify.
1666
46917d26
TT
16672014-02-19 Tom Tromey <tromey@redhat.com>
1668
1669 * target.h (struct target_ops) <supports_btrace>: Add target_ops
1670 argument.
1671 (target_supports_btrace): Update.
1672
0759a81e
YQ
16732014-02-14 Yao Qi <yao@codesourcery.com>
1674
1675 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
1676 (rsp-low-ipa.o): New target.
1677
a7191e8b
TT
16782014-02-12 Tom Tromey <tromey@redhat.com>
1679
1680 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
1681 convert_ascii_to_int.
1682 * regcache.c (registers_to_string): Likewise.
1683 * remote-utils.c (decode_M_packet): Likewise.
1684 * server.c (process_serial_event): Likewise.
1685
ff0e980e
TT
16862014-02-12 Tom Tromey <tromey@redhat.com>
1687
1688 * server.c (handle_query, handle_v_run): Use hex2bin, not
1689 unhexify.
1690 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
1691
e9371aff
TT
16922014-02-12 Tom Tromey <tromey@redhat.com>
1693
1694 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
1695 convert_int_to_ascii.
1696 * regcache.c (registers_to_string, collect_register_as_string):
1697 Likewise.
1698 * remote-utils.c (look_up_one_symbol, relocate_instruction):
1699 Likewise.
1700 * server.c (process_serial_event): Likewise.
1701 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
1702 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
1703
971dc0b8
TT
17042014-02-12 Tom Tromey <tromey@redhat.com>
1705
1706 * remote-utils.c (look_up_one_symbol, monitor_output): Use
1707 bin2hex, not hexify.
1708 * tracepoint.c (cmd_qtstatus): Likewise.
1709
0a822afb
TT
17102014-02-12 Tom Tromey <tromey@redhat.com>
1711
1712 * remote-utils.c (monitor_output): Pass explicit length to
1713 hexify.
1714
9c3d6531
TT
17152014-02-12 Tom Tromey <tromey@redhat.com>
1716
1717 * tracepoint.c: Include rsp-low.h.
1718 * server.c: Include rsp-low.h.
1719 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
1720 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
1721 declare.
1722 * remote-utils.c: Include rsp-low.h.
1723 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
1724 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
1725 (convert_int_to_ascii, convert_ascii_to_int): Move to
1726 common/rsp-low.c.
1727 * regcache.c: Include rsp-low.h.
1728 * ax.c: Include rsp-low.h.
1729 * Makefile.in (SFILES): Add common/rsp-low.c.
1730 (OBS): Add rsp-low.o.
1731 (rsp-low.o): New target.
1732
01fd3ea5
TT
17332014-02-12 Tom Tromey <tromey@redhat.com>
1734
1735 * utils.h (pulongest, plongest, phex_nz): Don't declare.
1736 Include print-utils.h.
1737 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
1738 (plongest, thirty_two, phex_nz): Remove.
1739 * Makefile.in (SFILES): Add common/print-utils.c.
1740 (OBS): Add print-utils.o.
1741 (print-utils-ipa.o): New target.
1742 (print-utils.o): New target.
1743 (IPA_OBJS): Add print-utils-ipa.o.
1744
e99dc820
TT
17452014-02-06 Tom Tromey <tromey@redhat.com>
1746
1747 * Makefile.in (SFILES): Fix indentation.
1748
ee1e2d4f
DE
17492014-02-05 Doug Evans <dje@google.com>
1750
1751 * linux-low.c (linux_wait_for_event): Improve comment.
1752 (linux_wait_1): Keep current_inferior in sync with event_child.
1753
f5a02773
DE
17542014-01-22 Doug Evans <dje@google.com>
1755
1756 * gdbthread.h (gdb_id_to_thread): Delete, unused.
1757
87ce2a04
DE
17582014-01-22 Doug Evans <dje@google.com>
1759
1760 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
1761 * configure: Regenerate.
1762 * config.in: Regenerate.
1763 * Makefile.in (SFILES): Add debug.c.
1764 (OBS): Add debug.o.
1765 * debug.c: New file.
1766 * debug.h: New file.
1767 * linux-aarch64-low.c (*): Update all debugging printfs to use
1768 debug_printf instead of fprintf.
1769 * linux-arm-low.c (*): Ditto.
1770 * linux-cris-low.c (*): Ditto.
1771 * linux-crisv32-low.c (*): Ditto.
1772 * linux-m32r-low.c (*): Ditto.
1773 * linux-sparc-low.c (*): Ditto.
1774 * linux-x86.c (*): Ditto.
1775 * linux-low.c (*): Ditto.
1776 (linux_wait_1): Add calls to debug_enter, debug_exit.
1777 (linux_wait): Remove redundant debugging printf.
1778 (stop_all_lwps): Add calls to debug_enter, debug_exit.
1779 (linux_resume, unstop_all_lwps): Ditto.
1780 * mem-break.c (*): Update all debugging printfs to use
1781 debug_printf instead of fprintf.
1782 * remote-utils.c (*): Ditto.
1783 * thread-db.c (*): Ditto.
1784 * server.c #include <ctype.h>, "gdb_vecs.h".
1785 (debug_threads): Moved to debug.c.
1786 (*): Update all debugging printfs to use debug_printf instead of
1787 fprintf.
1788 (start_inferior): Replace call to fflush with call to debug_flush.
1789 (monitor_show_help): Mention set debug-format.
1790 (parse_debug_format_options): New function.
1791 (handle_monitor_command): Handle "monitor set debug-format".
1792 (gdbserver_usage): Mention --debug-format.
1793 (main): Parse --debug-format.
1794 * server.h (debug_threads): Declaration moved to debug.h.
1795 #include "debug.h".
1796 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
1797 trace_debug_1 that uses debug_printf.
1798 (tracepoint_look_up_symbols): Update all debugging printfs to use
1799 debug_printf instead of fprintf.
1800
e671835b
BS
18012014-01-20 Baruch Siach <baruch@tkos.co.il>
1802
1803 * linux-xtensa-low.c: Include asm/ptrace.h instead of
1804 sys/ptrace.h.
1805
b5737fa9
PA
18062014-01-17 Pedro Alves <palves@redhat.com>
1807
ea38d2a9 1808 PR build/16445
c7faa97a
PA
1809 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
1810 defined after including gdb_proc_service.h.
b5737fa9 1811
40ed484e
DE
18122014-01-16 Doug Evans <dje@google.com>
1813
1814 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
1815 (match_dll): Use it.
1816
969c39fb
MM
18172014-01-16 Markus Metzger <markus.t.metzger@intel.com>
1818
1819 * target.h (target_ops) <read_btrace>: Change parameters and
1820 return type to allow error reporting.
1821 * server.c (handle_qxfer_btrace): Support delta reads. Pass
1822 trace reading errors on.
1823 * linux-low.c (linux_low_read_btrace): Pass trace reading
1824 errors on.
1825 (linux_low_disable_btrace): New.
1826
ab7f45ba
DE
18272014-01-15 Doug Evans <dje@google.com>
1828
1829 * inferiors.c (thread_id_to_gdb_id): Delete.
1830 * inferiors.h (thread_id_to_gdb_id): Delete.
1831
66af0f44
EZ
18322014-01-13 Eli Zaretskii <eliz@gnu.org>
1833
1834 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
1835 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
1836 versions.
1837
9939e131
PA
18382014-01-08 Pedro Alves <palves@redhat.com>
1839
1840 * server.c (handle_status): Don't discard previous queued stop
1841 replies or thread's pending status here.
1842 (main) <disconnection>: Do it here instead.
1843
b7ea362b
PA
18442014-01-08 Pedro Alves <palves@redhat.com>
1845
1846 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
1847 * server.c (visit_actioned_threads, handle_pending_status): New
1848 function.
1849 (handle_v_cont): Factor out parts to ...
1850 (resume): ... this new function. If in all-stop, and a thread
1851 being resumed has a pending status, report it without actually
1852 resuming.
1853 (myresume): Adjust to use the new 'resume' function.
1854 (clear_pending_status_callback, set_pending_status_callback)
1855 (find_status_pending_thread_callback): New functions.
1856 (handle_status): Handle the case of multiple threads having
1857 interesting statuses to report. Report threads' real last signal
1858 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
1859 with an interesting thread to report the status for, instead of
1860 always reporting the status of the first thread.
1861
28498c42
JB
18622014-01-01 Joel Brobecker <brobecker@adacore.com>
1863
1864 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
1865 * gdbreplay.c (gdbreplay_version): Likewise.
1866
f45c82da
YZ
18672013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
1868
1869 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
1870 iov.iov_len with the real length in use.
1871
379a5e2d
JB
18722013-12-13 Joel Brobecker <brobecker@adacore.com>
1873
1874 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
1875 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
1876 for all targets that use win32-low.c.
1877 * win32-low.c (win32_ensure_ntdll_loaded): New function.
1878 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
1879
4210d83e
PA
18802013-12-13 Pedro Alves <palves@redhat.com>
1881
1882 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
1883 if equal to TARGET_WAITKIND_LOADED.
1884 * win32-low.c (cached_status): New static global.
1885 (win32_wait): Add declaration.
1886 (do_initial_child_stuff): Flush all initial pending debug events
1887 up to the initial breakpoint.
1888 (win32_wait): If CACHED_STATUS was set, return that instead
1889 of doing a real wait. Remove the code resuming the execution
1890 of the inferior after receiving a TARGET_WAITKIND_LOADED event
1891 during the initial phase. Also remove the code changing
1892 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
1893 TARGET_WAITKIND_STOPPED.
1894
e7f0d979
YQ
18952013-12-11 Yao Qi <yao@codesourcery.com>
1896
1897 * notif.c (handle_notif_ack): Return 0 if no notification
1898 matches.
1899
ebcf782c
DE
19002013-11-20 Doug Evans <dje@google.com>
1901
1902 * linux-low.c (linux_set_resume_request): Fix comment.
1903
20ad9378
DE
19042013-11-20 Doug Evans <dje@google.com>
1905
1906 * linux-low.c (resume_status_pending_p): Tweak comment.
1907
a196ebeb
WT
19082013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
1909
1910 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
1911 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
1912 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
1913 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
1914 (srv_amd64_regobj): Add amd64-mpx.o.
1915 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
1916 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
1917 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
1918 * i387-fp.c (num_pl_bnd_register) Added constant.
1919 (num_pl_bnd_cfg_registers) Added constant.
1920 (struct i387_xsave) Added reserved area and MPX fields.
1921 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
1922 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
1923 function.
1924 (tdesc_i386_mpx_linux): Add MPX amd64 target.
1925 (init_registers_amd64_mpx_linux): Declare new function.
1926 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
1927 (x86_64_regmap): Add MPX registers.
1928 (x86_linux_read_description): Add MPX case.
1929 (initialize_low_arch): Initialize MPX targets.
1930
0080a2f6
TT
19312013-11-18 Tom Tromey <tromey@redhat.com>
1932
1933 * configure: Rebuild.
1934 * configure.ac: Don't check for stdlib.h.
1935 * gdbreplay.c: Unconditionally include stdlib.h.
1936
2978b111
TT
19372013-11-18 Tom Tromey <tromey@redhat.com>
1938
1939 * config.in: Rebuild.
1940 * configure: Rebuild.
1941 * configure.ac: Don't use AC_HEADER_DIRENT.
1942
a3d08894
TT
19432013-11-18 Tom Tromey <tromey@redhat.com>
1944
1945 * server.h: Don't check HAVE_STRING_H.
1946 * gdbreplay.c: Don't check HAVE_STRING_H.
1947 * configure: Rebuild.
1948
0a5dd17d
TT
19492013-11-18 Tom Tromey <tromey@redhat.com>
1950
1951 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
1952 LIBGNU.
1953
1bd2f0ba
TT
19542013-11-08 Tom Tromey <tromey@redhat.com>
1955
1956 * configure, config.in: Rebuild.
1957 * configure.ac: Remove unused configury.
1958
3266f10b
TT
19592013-11-08 Tom Tromey <tromey@redhat.com>
1960
1961 * acinclude.m4: Include common.m4, codeset.m4.
1962 * configure, config.in: Rebuild.
1963 * configure.ac: Use GDB_AC_COMMON.
1964
6682d959
AA
19652013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
1966
1967 * linux-s390-low.c (HWCAP_S390_TE): New define.
1968 (s390_arch_setup): Consider the TE field in the HWCAP for
1969 determining 'have_regset_tdb'.
1970
fd0a4d76
SDJ
19712013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
1972
1973 PR gdb/16014
1974 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
1975 call to sizeof.
1976
1a3d890b
PA
19772013-10-02 Pedro Alves <palves@redhat.com>
1978
1979 * server.c (process_serial_event): Don't output "GDBserver
1980 exiting" if GDB is connected through stdio.
1981 * target.c (mywait): Likewise, be silent if GDB is connected
1982 through stdio.
1983
97ad4581
JB
19842013-10-01 Joel Brobecker <brobecker@adacore.com>
1985
1986 * lynx-low.c (lynx_add_threads_after_attach): New function.
1987 (lynx_attach): Remove call to add_thread. Add call to
1988 lynx_add_threads_after_attach instead.
1989
5b4e221c
MF
19902013-09-28 Mike Frysinger <vapier@gentoo.org>
1991
1992 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
1993 * config.in, configure: Regenerated.
1994
ee47b2f8
YQ
19952013-09-18 Yao Qi <yao@codesourcery.com>
1996
1997 PR server/15959
1998 * server.c (start_inferior): Clear 'resume_info'.
1999
d6707650 20002013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2001
d6707650
JW
2002 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2003 for each register.
2004
9243dd0e 20052013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2006
9243dd0e
JW
2007 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
2008 linux-tile-low.o to srv_tgtobj.
2009
c623a6ef
WN
20102013-09-16 Will Newton <will.newton@linaro.org>
2011
2012 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
2013 out regs.
2014
fb71d39e
PA
20152013-09-06 Pedro Alves <palves@redhat.com>
2016
2017 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2018 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2019 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2020 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2021 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2022 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2023
8e7e9910
PA
20242013-09-06 Pedro Alves <palves@redhat.com>
2025
2026 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2027 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2028
7c3a12ca
PA
20292013-09-06 Pedro Alves <palves@redhat.com>
2030
2031 * linux-amd64-ipa.c: Include tracepoint.h.
2032 * linux-i386-ipa.c: Include tracepoint.h.
2033
8eb3d7b6
RW
20342013-09-06 Ricard Wanderlof <ricardw@axis.com>
2035
2036 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2037 (ps_get_thread_area): New function.
2038
eddddb9d
RW
20392013-09-06 Ricard Wanderlof <ricardw@axis.com>
2040
2041 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
2042 (initialize_low_arch): Call init_registers_crisv32 rather than
2043 init_register_crisv32.
2044
533b0600
PA
20452013-09-05 Pedro Alves <palves@redhat.com>
2046
2047 * server.h (handle_vFile, hostio_last_error_from_errno): Move
2048 to ...
2049 * hostio.h: ... this new file.
2050 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2051 win32-low.c: Include hostio.h.
2052
0ce3d3b5
PA
20532013-09-05 Pedro Alves <palves@redhat.com>
2054
2055 * server.h (gdb_client_data, handler_func, callback_handler_func)
2056 (delete_file_handler, add_file_handler, append_callback_event)
2057 (delete_callback_event, start_event_loop, initialize_event_loop):
2058 Move to event-loop.h and include it.
2059 * event-loop.h: New file.
2060
799cdc37
PA
20612013-09-05 Pedro Alves <palves@redhat.com>
2062
2063 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2064 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2065 (loaded_dll, unloaded_dll): Move to ...
2066 * dll.h: ... this new file.
2067 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2068
6a6bbd9d
PA
20692013-09-05 Pedro Alves <palves@redhat.com>
2070
2071 * server.h (current_process, get_thread_process, all_processes)
2072 (add_inferior_to_list, for_each_inferior, current_inferior)
2073 (remove_inferior, add_process, remove_process, find_process_pid)
2074 (have_started_inferiors_p, have_attached_inferiors_p)
2075 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2076 (clear_inferiors, find_inferior, find_inferior_id)
2077 (inferior_target_data, set_inferior_target_data)
2078 (inferior_regcache_data, set_inferior_regcache_data): Move to
2079 inferiors.h, and include it.
2080 * inferiors.h: New file.
2081
f699aaba
PA
20822013-09-05 Pedro Alves <palves@redhat.com>
2083
2084 * server.h (struct emit_ops, current_insn_ptr, emit_error):
2085 Move ...
2086 * ax.h: ... here.
2087
c144c7a0
PA
20882013-09-05 Pedro Alves <palves@redhat.com>
2089
2090 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2091 tracepoint.h.
2092 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2093 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2094 (handle_tracepoint_general_set, handle_tracepoint_query)
2095 (tracepoint_finished_step, tracepoint_was_hit)
2096 (release_while_stepping_state_list, current_traceframe)
2097 (in_readonly_region, traceframe_read_mem)
2098 (fetch_traceframe_registers, traceframe_read_sdata)
2099 (traceframe_read_info, struct fast_tpoint_collect_status)
2100 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2101 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2102 (supply_fast_tracepoint_registers)
2103 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2104 (ipa_tdesc, claim_trampoline_space)
2105 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2106 (agent_mem_read, agent_get_trace_state_variable_value)
2107 (agent_set_trace_state_variable_value, agent_tsv_read)
2108 (agent_mem_read_string, get_raw_reg_func_addr)
2109 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2110 * tracepoint.h: ... this new file.
2111
ff42e6ab
PA
21122013-09-05 Pedro Alves <palves@redhat.com>
2113
2114 * server.h (perror_with_name, error, fatal, warning, paddress)
2115 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2116 include it.
2117 * utils.h: New file.
2118
541af0f4
PA
21192013-09-05 Pedro Alves <palves@redhat.com>
2120
2121 * server.h (remote_debug, noack_mode, transport_is_reliable)
2122 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
2123 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
2124 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
2125 (write_enn, initialize_async_io, enable_async_io)
2126 (disable_async_io, check_remote_input_interrupt_request)
2127 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
2128 (dead_thread_notify, prepare_resume_reply)
2129 (decode_address_to_semicolon, decode_address, decode_m_packet)
2130 (decode_M_packet, decode_X_packet, decode_xfer_write)
2131 (decode_search_memory_packet, unhexify, hexify)
2132 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
2133 (look_up_one_symbol, relocate_instruction)
2134 (monitor_output): Move to remote-utils.h, and include it.
2135 * remote-utils.h: New file.
2136
eebdf26b
PA
21372013-09-05 Pedro Alves <palves@redhat.com>
2138
2139 * server.h (_): Delete.
2140
3aafd2ff
PA
21412013-09-02 Pedro Alves <palves@redhat.com>
2142
2143 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
2144 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
2145 allocated.
2146 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
2147
cee83bcb
PM
21482013-09-02 Pierre Muller <muller@sourceware.org>
2149
2150 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
2151 or WriteProcessMemory complete successfully and handle
2152 ERROR_PARTIAL_COPY error.
2153
9a13b2fa
PA
21542013-09-02 Pedro Alves <palves@redhat.com>
2155
2156 * server.c (gdb_read_memory): Return -1 on traceframe memory read
2157 error instead of EIO.
2158
602e3198
JK
21592013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2160
2161 PR server/15604
2162 * linux-low.c: Include filestuff.h.
2163 (linux_create_inferior) <pid == 0>: Call close_most_fds.
2164 * lynx-low.c: Include filestuff.h.
2165 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
2166 * server.c: Include filestuff.h.
2167 (main): Call notice_open_fds.
2168 * spu-low.c: Include filestuff.h.
2169 (spu_create_inferior) <pid == 0>: Call close_most_fds.
2170
96d7229d
LM
21712013-08-22 Luis Machado <lgustavo@codesourcery.com>
2172
2173 * Makefile.in: Explain why ../target and ../nat are not
2174 listed as include file search paths.
2175 (linux-waitpid.o): New object file rule.
2176 * configure.srv (srv_native_linux_obj): New variable.
2177 Replace all occurrences of linux native object files with
2178 $srv_native_linux_obj.
2179 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
2180 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
2181 (linux_enable_event_reporting): Remove declaration.
2182 (my_waitpid): Moved to common/linux-waitpid.c.
2183 (linux_wait_for_event): Pass ptid when calling
2184 linux_enable_event_reporting.
2185 (linux_supports_tracefork_flag): Remove.
2186 (linux_enable_event_reporting): Likewise.
2187 (linux_tracefork_grandchild): Remove.
2188 (STACK_SIZE): Moved to common/linux-ptrace.c.
2189 (linux_tracefork_child): Remove.
2190 (linux_test_for_tracefork): Remove.
2191 (linux_look_up_symbols): Call linux_supports_traceclone.
2192 (initialize_low): Remove call to linux_test_for_tracefork.
2193 * linux-low.h (PTRACE_TYPE_ARG3): Move to
2194 common/linux-ptrace.h.
2195 (PTRACE_TYPE_ARG4): Likewise.
2196 Include linux-ptrace.h.
2197
32940073
PA
21982013-08-21 Pedro Alves <palves@redhat.com>
2199
2200 * config.in: Renegerate.
2201
33b60d58 22022013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 2203
33b60d58
LM
2204 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
2205 (SFILES): Remove $(srcdir)/common/target-common.c and
2206 add $(srcdir)/target/waitstatus.c.
2207 (OBS): Remove target-common.o and add waitstatus.o.
2208 (server_h): Remove $(srcdir)/../common/target-common.h and
2209 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
2210 and $(srcdir)/../target/waitstatus.h.
2211 (target-common.o): Remove.
2212 (waitstatus.o): New target object file.
2213 * target.h: Do not include target-common.h and
2214 include target/resume.h, target/wait.h and
2215 target/waitstatus.h.
2216
b8e1b30e
LM
22172013-08-13 Luis Machado <lgustavo@codesourcery.com>
2218
2219 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2220 to PTRACE_TYPE_ARG3.
2221 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2222 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
2223 PTRACE_TYPE_ARG4.
2224 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
2225 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
2226
7a60ad40
YQ
22272013-07-27 Jie Zhang <jie@codesourcery.com>
2228 Daniel Jacobowitz <dan@codesourcery.com>
2229 Yao Qi <yao@codesourcery.com>
2230
2231 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
2232 (mips-linux-watch.o): New rule.
2233 (mips_linux_watch_h): New variable.
2234 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
2235 srv_tgtobj.
2236 * linux-mips-low.c: Include mips-linux-watch.h.
2237 (struct arch_process_info, struct arch_lwp_info): New.
2238 (update_watch_registers_callback): New function.
2239 (mips_linux_new_process, mips_linux_new_thread) New functions.
2240 (mips_linux_prepare_to_resume, mips_insert_point): New
2241 functions.
2242 (mips_remove_point, mips_stopped_by_watchpoint): New
2243 functions.
2244 (rsp_bp_type_to_target_hw_bp_type): New function.
2245 (mips_stopped_data_address): New function.
2246 (the_low_target): Add watchpoint support functions.
2247
de6f69ad
YQ
22482013-07-27 Yao Qi <yao@codesourcery.com>
2249
2250 * i386-low.c: Include break-common.h.
2251 (enum target_hw_bp_type): Remove.
2252
3360c0bf
LM
22532013-07-24 Luis Machado <lgustavo@codesourcery.com>
2254
2255 * Makefile.in (SFILES): /common/target-common.c.
2256 (OBS): Add target-common.o.
2257 (server_h): Add $(srcdir)/../common/target-common.h.
2258 (target-common.o): New target.
2259 * server.c (queue_stop_reply_callback): Free
2260 status string after use.
2261 * target.c (target_waitstatus_to_string): Remove.
2262 * target.h: Include target-common.h.
2263 (resume_kind): Likewise.
2264 (target_waitkind): Likewise.
2265 (target_waitstatus): Likewise.
2266 (TARGET_WNOHANG): Likewise.
2267
bd885420
YQ
22682013-07-04 Yao Qi <yao@codesourcery.com>
2269
2270 * Makefile.in (host_alias): Use @host_noncanonical@.
2271 (target_alias): Use @target_noncanonical@.
2272 * configure.ac: Use ACX_NONCANONICAL_TARGET and
2273 ACX_NONCANONICAL_HOST.
2274 * configure: Regenerated.
2275
2276 Revert:
2277 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2278
2279 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2280 * configure: Rebuild.
2281 * Makefile.in (version_host, version_target): Get from configure.
2282 (version.c): Use $(version_host) and $(version_target).
2283
17ef446e
PA
22842013-07-03 Pedro Alves <palves@redhat.com>
2285
2286 * Makefile.in (config.status): Depend on development.sh.
2287 * acinclude.m4: Include libmcheck.m4.
2288 * configure: Regenerate.
2289
7a9a7487
MG
22902013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2291
2292 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
2293 attribute inside the parentheses.
2294 (winapi_DebugSetProcessKillOnExit): Ditto.
2295 (winapi_DebugBreakProcess): Ditto.
2296 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 2297
49b64de6
MG
22982013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2299
2300 * notif.h (notif_event): Add a dummy member to avoid compiler
2301 errors.
2302
d5749ee7
PA
23032013-07-01 Pedro Alves <palves@redhat.com>
2304
2305 * hostio.c (HOSTIO_PATH_MAX): Define.
2306 (require_filename, handle_open, handle_unlink, handle_readlink):
2307 Use it.
2308
d8d2a3ee
PA
23092013-07-01 Pedro Alves <palves@redhat.com>
2310
2311 * server.h: Include "pathmax.h".
2312 * linux-low.c: Don't include sys/param.h.
2313 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
2314 MAXPATHLEN.
2315 * win32-low.c: Don't include sys/param.h.
2316 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
2317
bc7dea8d
PA
23182013-07-01 Pedro Alves <palves@redhat.com>
2319
2320 * event-loop.c: Don't check HAVE_UNISTD_H before including
2321 <unistd.h>.
2322 * gdbreplay.c: Likewise.
2323 * remote-utils.c: Likewise.
2324 * server.c: Likewise.
2325 * configure.ac: Don't check for unistd.h.
2326 * configure: Regenerate.
2327
d6c2da54
TT
23282013-06-28 Tom Tromey <tromey@redhat.com>
2329
2330 * Makefile.in (version.c): Use version.in, not
2331 common/version.in.
2332
257b6bec
MG
23332013-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
86ebe149
DK
23402013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2341
2342 Fix trace-status to output user name without trailing colon.
2343 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
2344
f30aa5af
DK
23452013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2346
2347 Fix trace-status to output proper start-time and stop-time.
2348 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
2349 output start time and stop time in hex as gdb expects.
2350
28a93511
YQ
23512013-06-26 Pedro Alves <pedro@codesourcery.com>
2352
2353 * tracepoint.c (build_traceframe_info_xml): Output trace state
2354 variables present in the trace buffer.
2355
01208463
TT
23562013-06-24 Tom Tromey <tromey@redhat.com>
2357
2358 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
2359 create-version.sh.
2360 (version.o): Remove.
2361 * gdbreplay.c: Include version.h.
2362 (version, host_name): Don't declare.
2363 * server.h: Include version.h.
2364 (version, host_name): Don't declare.
2365
760256f9
PA
23662013-06-12 Pedro Alves <palves@redhat.com>
2367
2368 * linux-x86-low.c (linux_is_elf64): Delete global.
2369 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
2370 with local linux_pid_exe_is_elf_64_file use.
2371
030031ee
PA
23722013-06-11 Pedro Alves <palves@redhat.com>
2373
2374 * linux-low.c (regset_disabled, disable_regset): New functions.
2375 (regsets_fetch_inferior_registers)
2376 (regsets_store_inferior_registers): Use them.
2377 (initialize_regsets_info); Don't allocate the disabled_regsets
2378 array here.
2379 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
2380 comment.
2381
5da6eb0a
PA
23822013-06-11 Pedro Alves <palves@redhat.com>
2383
2384 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
2385 xmalloc.
2386
7e5aaa09
PA
23872013-06-11 Pedro Alves <palves@redhat.com>
2388
2389 * linux-x86-low.c (initialize_low_arch): Call
2390 init_registers_x32_avx_linux.
2391
d878444c
JK
23922013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
2393
2394 Fix compatibility with Android Bionic.
2395 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
2396 it is not empty.
2397
3aee8918
PA
23982013-06-07 Pedro Alves <palves@redhat.com>
2399
5f2b57b5 2400 PR server/14823
3aee8918
PA
2401 * Makefile.in (OBS): Add tdesc.o.
2402 (IPA_OBJS): Add tdesc-ipa.o.
2403 (tdesc-ipa.o): New rule.
2404 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
2405 interface.
2406 * linux-low.c (new_inferior): Delete.
2407 (disabled_regsets, num_regsets): Delete.
2408 (linux_add_process): Adjust to set the new per-process
2409 new_inferior flag.
2410 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
2411 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
2412 was a stop. When calling arch_setup, switch the current inferior
2413 to the thread that got an event.
2414 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
2415 (regsets_fetch_inferior_registers)
2416 (regsets_store_inferior_registers): New regsets_info parameter.
2417 Adjust to use it.
2418 (linux_register_in_regsets): New regs_info parameter. Adjust to
2419 use it.
2420 (register_addr, fetch_register, store_register): New usrregs_info
2421 parameter. Adjust to use it.
2422 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
2423 parameter regs_info. Adjust to use it.
2424 (linux_fetch_registers): Get the current inferior's regs_info, and
2425 adjust to use it.
2426 (linux_store_registers): Ditto.
2427 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
2428 (initialize_low): Don't initialize the target_regsets here. Call
2429 initialize_low_arch.
2430 * linux-low.h (target_regsets): Delete declaration.
2431 (struct regsets_info): New.
2432 (struct usrregs_info): New.
2433 (struct regs_info): New.
2434 (struct process_info_private) <new_inferior>: New field.
2435 (struct linux_target_ops): Delete the num_regs, regmap, and
2436 regset_bitmap fields. New field regs_info.
2437 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
2438 * i387-fp.c (num_xmm_registers): Delete.
2439 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
2440 calls to new interface.
2441 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
2442 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
2443 Infer the number of xmm registers from the regcache's target
2444 description.
2445 * i387-fp.h (num_xmm_registers): Delete.
2446 * inferiors.c (add_thread): Don't install the thread's regcache
2447 here.
2448 * proc-service.c (gregset_info): Fetch the current inferior's
2449 regs_info. Adjust to use it.
2450 * regcache.c: Include tdesc.h.
2451 (register_bytes, reg_defs, num_registers)
2452 (gdbserver_expedite_regs): Delete.
2453 (get_thread_regcache): If the thread doesn't have a regcache yet,
2454 create one, instead of aborting gdbserver.
2455 (regcache_invalidate_one): Rename to ...
2456 (regcache_invalidate_thread): ... this.
2457 (regcache_invalidate_one): New.
2458 (regcache_invalidate): Only invalidate registers of the current
2459 process.
2460 (init_register_cache): Add target_desc parameter, and use it.
2461 (new_register_cache): Ditto. Assert the target description has a
2462 non zero registers_size.
2463 (regcache_cpy): Add assertions. Adjust.
2464 (realloc_register_cache, set_register_cache): Delete.
2465 (registers_to_string, registers_from_string): Adjust.
2466 (find_register_by_name, find_regno, find_register_by_number)
2467 (register_cache_size): Add target_desc parameter, and use it.
2468 (free_register_cache_thread, free_register_cache_thread_one)
2469 (regcache_release, register_cache_size): New.
2470 (register_size): Add target_desc parameter, and use it.
2471 (register_data, supply_register, supply_register_zeroed)
2472 (supply_regblock, supply_register_by_name, collect_register)
2473 (collect_register_as_string, collect_register_by_name): Adjust.
2474 * regcache.h (struct target_desc): Forward declare.
2475 (struct regcache) <tdesc>: New field.
2476 (init_register_cache, new_register_cache): Add target_desc
2477 parameter.
2478 (regcache_invalidate_thread): Declare.
2479 (regcache_invalidate_one): Delete declaration.
2480 (regcache_release): Declare.
2481 (find_register_by_number, register_cache_size, register_size)
2482 (find_regno): Add target_desc parameter.
2483 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
2484 declarations.
2485 * remote-utils.c: Include tdesc.h.
2486 (outreg, prepare_resume_reply): Adjust.
2487 * server.c: Include tdesc.h.
2488 (gdbserver_xmltarget): Delete declaration.
2489 (get_features_xml, process_serial_event): Adjust.
2490 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
2491 declare.
2492 (struct process_info) <tdesc>: New field.
2493 (ipa_tdesc): Declare.
2494 * tdesc.c: New file.
2495 * tdesc.h: New file.
2496 * tracepoint.c: Include tdesc.h.
2497 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
2498 (get_context_regcache): Adjust to pass ipa_tdesc down.
2499 (do_action_at_tracepoint): Adjust to get the register cache size
2500 from the context regcache's description.
2501 (traceframe_walk_blocks): Adjust to get the register cache size
2502 from the current trace frame's description.
2503 (traceframe_get_pc): Adjust to get current trace frame's
2504 description and pass it down.
2505 (gdb_collect): Adjust to get the register cache size from the
2506 IPA's description.
2507 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
2508 (gdbserver_xmltarget): Delete.
2509 (initialize_low_tracepoint): Set the ipa's target description.
2510 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
2511 (initialize_low_tracepoint): Set the ipa's target description.
2512 * linux-x86-low.c: Include tdesc.h.
2513 [__x86_64__] (is_64bit_tdesc): New.
2514 (ps_get_thread_area, x86_get_thread_area): Use it.
2515 (i386_cannot_store_register): Rename to ...
2516 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
2517 (i386_cannot_fetch_register): Rename to ...
2518 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
2519 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
2520 to new interface.
2521 (target_regsets): Rename to ...
2522 (x86_regsets): ... this.
2523 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
2524 interface.
2525 (x86_siginfo_fixup): Use is_64bit_tdesc.
2526 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
2527 (tdesc_x32_avx_linux, tdesc_x32_linux)
2528 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
2529 Declare.
2530 (x86_linux_update_xmltarget): Delete.
2531 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
2532 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
2533 (AMD64_LINUX_USER64_CS): New.
2534 (x86_linux_read_description): New, based on
2535 x86_linux_update_xmltarget.
2536 (same_process_callback): New.
2537 (x86_arch_setup_process_callback): New.
2538 (x86_linux_update_xmltarget): New.
2539 (x86_regsets_info): New.
2540 (amd64_linux_regs_info): New.
2541 (i386_linux_usrregs_info): New.
2542 (i386_linux_regs_info): New.
2543 (x86_linux_regs_info): New.
2544 (x86_arch_setup): Reimplement.
2545 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
2546 (x86_emit_ops): Ditto.
2547 (the_low_target): Adjust. Install x86_linux_regs_info,
2548 x86_cannot_fetch_register, and x86_cannot_store_register.
2549 (initialize_low_arch): New.
2550 * linux-ia64-low.c (tdesc_ia64): Declare.
2551 (ia64_fetch_register): Adjust.
2552 (ia64_usrregs_info, regs_info): New globals.
2553 (ia64_regs_info): New function.
2554 (the_low_target): Adjust.
2555 (initialize_low_arch): New function.
2556 * linux-sparc-low.c (tdesc_sparc64): Declare.
2557 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
2558 Adjust.
2559 (sparc_arch_setup): New function.
2560 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
2561 (the_low_target): Adjust.
2562 (initialize_low_arch): New function.
2563 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
2564 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
2565 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
2566 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
2567 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
2568 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
2569 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
2570 (tdesc_powerpc_isa205_vsx64l): Declare.
2571 (ppc_cannot_store_register, ppc_collect_ptrace_register)
2572 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
2573 (ppc_set_pc, ppc_get_hwcap): Adjust.
2574 (ppc_usrregs_info): Forward declare.
2575 (!__powerpc64__) ppc_regmap_adjusted: New global.
2576 (ppc_arch_setup): Adjust to the current process'es target
2577 description.
2578 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
2579 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
2580 (ppc_store_evrregset): Adjust.
2581 (target_regsets): Rename to ...
2582 (ppc_regsets): ... this, and make static.
2583 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
2584 (ppc_regs_info): New function.
2585 (the_low_target): Adjust.
2586 (initialize_low_arch): New function.
2587 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
2588 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
2589 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
2590 (tdesc_s390x_linux64v2): Declare.
2591 (s390_collect_ptrace_register, s390_supply_ptrace_register)
2592 (s390_fill_gregset, s390_store_last_break): Adjust.
2593 (target_regsets): Rename to ...
2594 (s390_regsets): ... this, and make static.
2595 (s390_get_pc, s390_set_pc): Adjust.
2596 (s390_get_hwcap): New target_desc parameter, and use it.
2597 [__s390x__] (have_hwcap_s390_high_gprs): New global.
2598 (s390_arch_setup): Adjust to set the current process'es target
2599 description. Don't adjust the regmap.
2600 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
2601 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
2602 (regs_info_3264): New globals.
2603 (s390_regs_info): New function.
2604 (the_low_target): Adjust.
2605 (initialize_low_arch): New function.
2606 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
2607 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
2608 [__mips64] (init_registers_mips_linux)
2609 (init_registers_mips_dsp_linux): Delete defines.
2610 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
2611 (have_dsp): New global.
2612 (mips_read_description): New, based on mips_arch_setup.
2613 (mips_arch_setup): Reimplement.
2614 (get_usrregs_info): New function.
2615 (mips_cannot_fetch_register, mips_cannot_store_register)
2616 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
2617 (mips_fill_fpregset, mips_store_fpregset): Adjust.
2618 (target_regsets): Rename to ...
2619 (mips_regsets): ... this, and make static.
2620 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
2621 (dsp_regs_info, regs_info): New globals.
2622 (mips_regs_info): New function.
2623 (the_low_target): Adjust.
2624 (initialize_low_arch): New function.
2625 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
2626 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
2627 Declare.
2628 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
2629 (arm_read_description): New, with bits factored from
2630 arm_arch_setup.
2631 (arm_arch_setup): Reimplement.
2632 (target_regsets): Rename to ...
2633 (arm_regsets): ... this, and make static.
2634 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
2635 (arm_regs_info): New function.
2636 (the_low_target): Adjust.
2637 (initialize_low_arch): New function.
2638 * linux-m68k-low.c (tdesc_m68k): Declare.
2639 (target_regsets): Rename to ...
2640 (m68k_regsets): ... this, and make static.
2641 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
2642 (m68k_regs_info): New function.
2643 (m68k_arch_setup): New function.
2644 (the_low_target): Adjust.
2645 (initialize_low_arch): New function.
2646 * linux-sh-low.c (tdesc_sharch): Declare.
2647 (target_regsets): Rename to ...
2648 (sh_regsets): ... this, and make static.
2649 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
2650 (sh_regs_info, sh_arch_setup): New functions.
2651 (the_low_target): Adjust.
2652 (initialize_low_arch): New function.
2653 * linux-bfin-low.c (tdesc_bfin): Declare.
2654 (bfin_arch_setup): New function.
2655 (bfin_usrregs_info, regs_info): New globals.
2656 (bfin_regs_info): New function.
2657 (the_low_target): Adjust.
2658 (initialize_low_arch): New function.
2659 * linux-cris-low.c (tdesc_cris): Declare.
2660 (cris_arch_setup): New function.
2661 (cris_usrregs_info, regs_info): New globals.
2662 (cris_regs_info): New function.
2663 (the_low_target): Adjust.
2664 (initialize_low_arch): New function.
2665 * linux-cris-low.c (tdesc_crisv32): Declare.
2666 (cris_arch_setup): New function.
2667 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
2668 (cris_regs_info): New function.
2669 (the_low_target): Adjust.
2670 (initialize_low_arch): New function.
2671 * linux-m32r-low.c (tdesc_m32r): Declare.
2672 (m32r_arch_setup): New function.
2673 (m32r_usrregs_info, regs_info): New globals.
2674 (m32r_regs_info): Adjust.
2675 (initialize_low_arch): New function.
2676 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
2677 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
2678 (tic6x_usrregs_info): Forward declare.
2679 (tic6x_read_description): New function, based on ...
2680 (tic6x_arch_setup): ... this. Reimplement.
2681 (target_regsets): Rename to ...
2682 (tic6x_regsets): ... this, and make static.
2683 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
2684 (tic6x_regs_info): New function.
2685 (the_low_target): Adjust.
2686 (initialize_low_arch): New function.
2687 * linux-xtensa-low.c (tdesc_xtensa): Declare.
2688 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
2689 (target_regsets): Rename to ...
2690 (xtensa_regsets): ... this, and make static.
2691 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
2692 globals.
2693 (xtensa_arch_setup, xtensa_regs_info): New functions.
2694 (the_low_target): Adjust.
2695 (initialize_low_arch): New function.
2696 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
2697 (nios2_arch_setup): Set the current process'es tdesc.
2698 (target_regsets): Rename to ...
2699 (nios2_regsets): ... this.
2700 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
2701 (nios2_regs_info): New function.
2702 (the_low_target): Adjust.
2703 (initialize_low_arch): New function.
a261b8f5
PA
2704 * linux-aarch64-low.c (tdesc_aarch64): Declare.
2705 (aarch64_arch_setup): Set the current process'es tdesc.
2706 (target_regsets): Rename to ...
2707 (aarch64_regsets): ... this.
2708 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
2709 (aarch64_regs_info): New function.
2710 (the_low_target): Adjust.
2711 (initialize_low_arch): New function.
3aee8918
PA
2712 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
2713 globals.
2714 (target_regsets): Rename to ...
2715 (tile_regsets): ... this.
2716 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
2717 (tile_regs_info): New function.
2718 (tile_arch_setup): Set the current process'es tdesc.
2719 (the_low_target): Adjust.
2720 (initialize_low_arch): New function.
2721 * spu-low.c (tdesc_spu): Declare.
2722 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
2723 * win32-arm-low.c (tdesc_arm): Declare.
2724 (arm_arch_setup): New function.
2725 (the_low_target): Install arm_arch_setup instead of
2726 init_registers_arm.
2727 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
2728 (init_windows_x86): Rename to ...
2729 (i386_arch_setup): ... this. Set `win32_tdesc'.
2730 (the_low_target): Adjust.
2731 * win32-low.c (win32_tdesc): New global.
2732 (child_add_thread): Don't create the thread cache here.
2733 (do_initial_child_stuff): Set the new process'es tdesc.
2734 * win32-low.h (struct target_desc): Forward declare.
2735 (win32_tdesc): Declare.
2736 * lynx-i386-low.c (tdesc_i386): Declare global.
2737 (lynx_i386_arch_setup): Set `lynx_tdesc'.
2738 * lynx-low.c (lynx_tdesc): New global.
2739 (lynx_add_process): Set the new process'es tdesc.
2740 * lynx-low.h (struct target_desc): Forward declare.
2741 (lynx_tdesc): Declare global.
2742 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
2743 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
2744 * nto-low.c (nto_tdesc): New global.
2745 (do_attach): Set the new process'es tdesc.
2746 * nto-low.h (struct target_desc): Forward declare.
2747 (nto_tdesc): Declare.
2748 * nto-x86-low.c (tdesc_i386): Declare.
2749 (nto_x86_arch_setup): Set `nto_tdesc'.
2750
b1fbec62
GB
27512013-06-04 Gary Benson <gbenson@redhat.com>
2752
2753 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
2754 to qSupported response when appropriate.
2755 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
2756 with nonzero-length annex.
2757 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
2758 arguments supplied in annex.
2759
d1ec4ce7
DE
27602013-05-31 Doug Evans <dje@google.com>
2761
ac44adcb 2762 PR server/15594
d1ec4ce7
DE
2763 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
2764 64 bits in 64-cross-32 environment.
2765
9b25f2d3
PA
27662013-05-28 Pedro Alves <palves@redhat.com>
2767
2768 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
2769 (aarch64-without-fpu.c): Delete rule.
2770 * configure.srv (aarch64*-*-linux*): Remove references to
2771 aarch64-without-fpu.o and aarch64-without-fpu.xml.
2772 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
2773 declaration.
2774
6740dc9c
PA
27752013-05-24 Pedro Alves <palves@redhat.com>
2776
2777 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
2778 instead of strchr/decode_address. Error if the range isn't split
2779 with a ','. Don't assume there's be a ':' in the action.
2780
c2d6af84
PA
27812013-05-23 Yao Qi <yao@codesourcery.com>
2782 Pedro Alves <palves@redhat.com>
2783
2784 * linux-low.c (lwp_in_step_range): New function.
2785 (linux_wait_1): If the thread was range stepping and stopped
2786 outside the stepping range, report the stop to GDB. Otherwise,
2787 continue stepping. Add range stepping debug output.
2788 (linux_set_resume_request): Copy the step range from the resume
2789 request to the lwp.
2790 (linux_supports_range_stepping): New.
2791 (linux_target_ops) <supports_range_stepping>: Set to
2792 linux_supports_range_stepping.
2793 * linux-low.h (struct linux_target_ops)
2794 <supports_range_stepping>: New field.
2795 (struct lwp_info) <step_range_start, step_range_end>: New fields.
2796 * linux-x86-low.c (x86_supports_range_stepping): New.
2797 (the_low_target) <supports_range_stepping>: Set to
2798 x86_supports_range_stepping.
2799 * server.c (handle_v_cont): Handle 'r' action.
2800 (handle_v_requests): Append ";r" if the target supports range
2801 stepping.
2802 * target.h (struct thread_resume) <step_range_start,
2803 step_range_end>: New fields.
2804 (struct target_ops) <supports_range_stepping>:
2805 New field.
2806 (target_supports_range_stepping): New macro.
2807
58794e1a
JB
28082013-05-17 Joel Brobecker <brobecker@adacore.com>
2809
2810 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
2811 confusion in comment.
2812
d631c5a7
JB
28132013-05-17 Joel Brobecker <brobecker@adacore.com>
2814
2815 * lynx-low.c (struct process_info_private): New type.
2816 (lynx_add_process): New function.
2817 (lynx_create_inferior, lynx_attach): Replace calls to
2818 add_process by calls to lynx_add_process.
2819 (lynx_resume): If PTID is null, then try using
2820 current_process()->private->last_wait_event_ptid.
2821 Add comments.
2822 (lynx_clear_inferiors): Delete. The contents of that function
2823 has been inlined in lynx_mourn;
2824 (lynx_wait_1): Save the ptid in the process's private data.
2825 (lynx_mourn): Free the process' private data. Replace call
2826 to lynx_clear_inferiors by call to clear_inferiors.
2827
96f7a20f
YQ
28282013-05-17 Yao Qi <yao@codesourcery.com>
2829
2830 * i386-low.c (i386_length_and_rw_bits): Move the comment to
2831 the right place.
2832
db0dfaa0
LM
28332013-05-16 Luis Machado <lgustavo@codesourcery.com>
2834
2835 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
2836 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
2837 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
2838 PT_TEXT_END_ADDR guards. Update comments.
2839 (linux_target_op) <read_offsets>: Conditionally define to
2840 linux_read_offsets if the target is UCLIBC and if it defines
2841 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
2842
68f5f838
SL
28432013-05-06 Sandra Loosemore <sandra@codesourcery.com>
2844 Andrew Jenner <andrew@codesourcery.com>
2845
2846 * Makefile.in (SFILES): Add linux-nios2-low.c.
2847 (clean): Add action to delete nios2-linux.c.
2848 (nios2-linux.c): New rule.
2849 * configure.srv: Add nios2*-*-linux*.
2850 * linux-nios2-low.c: New.
2851
1ebff1fd
HAQ
28522013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
2853
2854 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
2855
f6150862
HZ
28562013-04-25 Hui Zhu <hui@codesourcery.com>
2857
2858 PR gdb/15186
f6150862
HZ
2859 * ax.c (ax_printf): Add fflush.
2860
614c279d
TT
28612013-04-22 Tom Tromey <tromey@redhat.com>
2862
2863 * Makefile.in (SFILES): Add filestuff.c.
2864 (OBS): Add filestuff.o.
2865 (filestuff.o): New target.
2866 * config.in, configure: Rebuild.
2867 * configure.ac: Check for fdwalk, pipe2.
2868
7d4e5717
PA
28692013-04-17 Pedro Alves <palves@redhat.com>
2870
2871 * configure.ac (USE_THREAD_DB): Delete variable.
2872 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
2873 Don't AC_SUBST USE_THREAD_DB.
2874 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
2875 * config.in, configure: Regenerate.
2876
d5c93e41
PA
28772013-04-16 Pedro Alves <palves@redhat.com>
2878
2879 * linux-low.h (struct lwp_info) <thread_known>: Move under
2880 the USE_THREAD_DB #ifdef.
2881
04f5fe89
PA
28822013-04-16 Pedro Alves <palves@redhat.com>
2883
2884 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
2885 (linux-low.o): Delete rule.
2886 * linux-low.h: Always include "gdb_thread_db.h" instead of
2887 conditionally including thread_db.h.
2888 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
2889 HAVE_THREAD_DB_H.
2890
480b27bf
JK
28912013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2892
2893 * Makefile.in (install-only): Fix make install regression.
2894
43662968
JK
28952013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
2896
2897 Convert man pages to texinfo, new gdbinit.5 texinfo page.
2898 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
2899 installation.
2900 * gdbserver.1: Remove.
2901
3e74e146
PA
29022013-03-22 Pedro Alves <palves@redhat.com>
2903
2904 * linux-low.c (handle_extended_wait): Don't call
2905 linux_enable_event_reporting.
2906
a8347a2a
TT
29072013-03-15 Tony Theodore <tonyt@logyst.com>
2908
2909 PR build/9098:
2910 * Makefile.in (SHELL): Use @SHELL@.
2911
eeb56fa7
SDJ
29122013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
2913
2914 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
2915 compiler warning.
2916
4fa7e2ff
JB
29172013-03-13 Joel Brobecker <brobecker@adacore.com>
2918
2919 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
2920 Remove extraneous NULL element.
2921
8ddb1965
YQ
29222013-03-13 Yao Qi <yao@codesourcery.com>
2923
2924 * tracepoint.c (traceframe_read_tsv): Look for the last matched
2925 'V' block in trace frame.
2926
9accd112
MM
29272013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2928
2929 * target.h (struct target_ops): Add btrace ops.
2930 (target_supports_btrace): New macro.
2931 (target_enable_btrace): New macro.
2932 (target_disable_btrace): New macro.
2933 (target_read_btrace): New macro.
2934 * gdbthread.h (struct thread_info): Add btrace field.
2935 * server.c: Include btrace-common.h.
2936 (handle_btrace_general_set): New function.
2937 (handle_btrace_enable): New function.
2938 (handle_btrace_disable): New function.
2939 (handle_general_set): Call handle_btrace_general_set.
2940 (handle_qxfer_btrace): New function.
2941 (struct qxfer qxfer_packets[]): Add btrace entry.
2942 * inferiors.c (remove_thread): Disable btrace.
2943 * linux-low: Include linux-btrace.h.
2944 (linux_low_enable_btrace): New function.
2945 (linux_low_read_btrace): New function.
2946 (linux_target_ops): Add btrace ops.
2947 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
2948 Add srv_linux_btrace=yes.
2949 (x86_64-*-linux*): Add linux-btrace.o.
2950 Add srv_linux_btrace=yes.
2951 * configure.ac: Define HAVE_LINUX_BTRACE.
2952 * config.in: Regenerated.
2953 * configure: Regenerated.
2954
5cc22e4c
MM
29552013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2956
2957 * server.c (handle_qxfer): Preserve error message if -3 is
2958 returned.
2959 (qxfer): Document the -3 return value.
2960
7c97f91e
MM
29612013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2962
2963 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
2964 (linux_btrace_h): New variable.
2965 (linux-btrace.o): New rule.
2966
be9a119c 29672013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
2968 Hafiz Abid Qadeer <abidh@codesourcery.com>
2969
2970 * tracepoint.c (trace_buffer_size): New global.
2971 (DEFAULT_TRACE_BUFFER_SIZE): New define.
2972 (init_trace_buffer): Change to one-argument function. Allocate
2973 trace buffer memory.
2974 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
2975 handle QTBuffer:size packet.
2976 (cmd_bigqtbuffer_size): New function.
2977 (initialize_tracepoint): Call init_trace_buffer with
2978 DEFAULT_TRACE_BUFFER_SIZE.
2979 * server.c (handle_query): Add QTBuffer:size in the
2980 supported packets.
2981
e64f7499
YQ
29822013-03-07 Yao Qi <yao@codesourcery.com>
2983
2984 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
2985 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
2986 of -1.
2987 (cmd_qtsp): Adjust condition. Do post increment.
2988 Set cur_action and cur_step_action back to 0.
2989
f0ae6fc3
PA
29902013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
2991
2992 PR server/15236
2993 * linux-low.c (linux_write_memory): Return early success if LEN is
2994 zero.
2995
b5b0b0af
CV
29962013-03-05 Corinna Vinschen <vinschen@redhat.de>
2997
334ad4a8 2998 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 2999
589bc927
TT
30002013-02-28 Tom Tromey <tromey@redhat.com>
3001
3002 * configure.ac: Invoke AC_SYS_LARGEFILE.
3003 * configure, config.in: Rebuild.
3004
dfe07582
CV
30052013-02-28 Corinna Vinschen <vinschen@redhat.com>
3006
3007 * win32-low.c: Throughout, fix format strings and casts of
3008 printf-like functions to avoid type related warnings on all
3009 platforms.
3010 (get_child_debug_event): Print dwDebugEventCode as hex since
3011 that's how it's usually documented.
3012
736cd585
YQ
30132013-02-28 Yao Qi <yao@codesourcery.com>
3014
3015 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
3016 pulongest.
3017
e1f58301
JW
30182013-02-27 Jiong Wang <jiwang@tilera.com>
3019
3020 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3021 (reg-tilegx32.c): New rule.
3022 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3023 * linux-tile-low.c (tile_arch_setup): New function. Invoke
3024 different register info initializer according to elf class.
3025 (init_registers_tilgx32): New function. The tilegx32 register info
3026 initializer.
3027 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3028 (tile_store_gregset): Likewise.
3029
d171ca78
YQ
30302013-02-27 Yao Qi <yao@codesourcery.com>
3031
3032 * server.c (process_point_options): Print debug message when
3033 debug_threads is true.
3034
282bbdf3
YQ
30352013-02-26 Yao Qi <yao@codesourcery.com>
3036
3037 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
3038
aca22551
PA
30392013-02-19 Pedro Alves <palves@redhat.com>
3040 Kai Tietz <ktietz@redhat.com>
3041
3042 PR gdb/15161
3043
3044 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
3045 instead of strtoul to extract address from packet.
3046 (process_serial_event) <'z'>: Likewise.
3047
4f3cee1c
YQ
30482013-02-18 Yao Qi <yao@codesourcery.com>
3049
3050 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3051
8e1d55a3
PA
30522013-02-14 Pedro Alves <palves@redhat.com>
3053
3054 Plug memory leak.
3055
3056 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3057 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3058
458820da
PA
30592013-02-14 Pedro Alves <palves@redhat.com>
3060
3061 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3062
baea0dae
PA
30632013-02-14 Pedro Alves <palves@redhat.com>
3064
3065 * tracepoint.c (save_string): Delete.
3066 (add_tracepoint_action): Use savestring instead of save_string.
3067
0b1afbb3
PA
30682013-02-12 Pedro Alves <palves@redhat.com>
3069
3070 * linux-xtensa-low.c: Ditto.
3071 * xtensa-xtregs.c: Ditto.
3072
8a4ac37e
PA
30732013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3074
3075 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3076 thread_db.
3077
148de6bb
MS
30782013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3079
3080 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3081 aarch64_num_wp_regs and aarch64_num_bp_regs to
3082 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3083
55fac6e0
MS
30842013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3085
3086 * linux-aarch64-low.c (ps_get_thread_area): Replace
3087 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3088
176eb98c
MS
30892013-02-04 Jim MacArthur <jim.macarthur@arm.com>
3090 Marcus Shawcroft <marcus.shawcroft@arm.com>
3091 Nigel Stephens <nigel.stephens@arm.com>
3092 Yufeng Zhang <yufeng.zhang@arm.com>
3093
3094 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3095 (aarch64.c, aarch64-without-fpu.c): New targets.
3096 * configure.srv (aarch64*-*-linux*): New.
3097 * linux-aarch64-low.c: New file.
3098
56f7af9c
MS
30992013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3100
43aaf8b6 3101 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
3102 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3103 (dequeue_one_deferred_signal, linux_resume_one_thread)
3104 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3105 (linux_tracefork_grandchild, linux_test_for_tracefork)
3106 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3107 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3108 where the argument is 0.
3109
60f662b0
YQ
31102013-01-25 Yao Qi <yao@codesourcery.com>
3111
3112 * event-loop.c: Include "queue.h".
3113 (gdb_event_p): New typedef.
3114 (struct gdb_event) <next_event>: Remove.
3115 (event_queue): Change to QUEUE(gdb_event_p).
3116 (async_queue_event): Remove.
3117 (gdb_event_xfree): New.
3118 (initialize_event_loop): New.
3119 (process_event): Use API from QUEUE.
3120 (wait_for_event): Likewise.
3121 * server.c (main): Call initialize_event_loop.
3122 * server.h (initialize_event_loop): Declare.
3123
5ae4861a
YQ
31242013-01-18 Yao Qi <yao@codesourcery.com>
3125
3126 * ax.h (struct eval_agent_expr_context): New.
3127 (gdb_eval_agent_expr): Update declaration.
3128 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
3129 TFRAME. Add new argument CTX.
3130 * server.h (struct eval_agent_expr_context): Declare.
3131 (agent_mem_read, agent_tsv_read): Update declaration.
3132 (agent_mem_read_string): Likewise.
3133 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
3134 (add_traceframe_block): Add new argument TPOINT.
3135 Increase TPOINT->traceframe_usage.
3136 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
3137 eval_tracepoint_agent_expr.
3138 (condition_true_at_tracepoint): Likewise.
3139 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
3140 (agent_mem_read_string, agent_tsv_read): Likewise.
3141
85e00e85
YQ
31422013-01-16 Yao Qi <yao@codesourcery.com>
3143
3144 * linux-low.c (linux_resume_one_lwp): Don't check
3145 'lwp->bp_reinsert != 0'.
3146
4039cf45
JB
31472013-01-07 Joel Brobecker <brobecker@adacore.com>
3148 Pedro Alves <palves@redhat.com>
3149
3150 * lynx-low.c (ptrace_request_to_str): Define a temporary
3151 macro and use it to simplify this function's implementation.
3152
9044dee2
JB
31532013-01-07 Joel Brobecker <brobecker@adacore.com>
3154
3155 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
3156 sets errno.
3157
e6352c8f
JB
31582013-01-07 Joel Brobecker <brobecker@adacore.com>
3159
3160 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
3161
50681a27
JB
31622013-01-07 Joel Brobecker <brobecker@adacore.com>
3163
3164 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
3165
3f6e77ef
JB
31662013-01-07 Joel Brobecker <brobecker@adacore.com>
3167
3168 * lynx-low.c (lynx_resume): Use the resume_info parameter
3169 to determine the ptid for the lynx_ptrace call, unless
3170 it is equal to minus_one_ptid, in which case we use the
3171 ptid of the current_inferior.
3172 (lynx_wait_1): After having received a thread create/exit
3173 event, resume the inferior's execution using the signaling
3174 thread's ptid, rather than the old ptid.
3175
7fda33ae
JB
31762013-01-07 Joel Brobecker <brobecker@adacore.com>
3177
3178 * lynx-low.c (lynx_resume): Delete variable ret.
3179
b9786c74
JB
31802013-01-01 Joel Brobecker <brobecker@adacore.com>
3181
3182 * gdbreplay.c (gdbreplay_version): Update copyright year.
3183 * server.c (gdbserver_version): Likewise.
3184
8b93d60f
JB
31852012-12-17 Joel Brobecker <brobecker@adacore.com>
3186
3187 * lynx-low.c (lynx_wait_1): Add debug trace before adding
3188 new thread.
3189
037335a7
JB
31902012-12-17 Joel Brobecker <brobecker@adacore.com>
3191
3192 * lynx-low.c (ptrace_request_to_str): Add handling for
3193 PTRACE_GETTRACESIG.
3194
52d4cbd8
JB
31952012-12-17 Joel Brobecker <brobecker@adacore.com>
3196
3197 * lynx-low.c (lynx_attach): Delete variable new_process.
3198
ab8f6ca9
JB
31992012-12-17 Joel Brobecker <brobecker@adacore.com>
3200
3201 * lynx-low.c (lynx_create_inferior): Delete variable
3202 new_process.
3203
78cbc024
JB
32042012-12-17 Joel Brobecker <brobecker@adacore.com>
3205
3206 * lynx-low.c (ptrace_request_to_str): Do not handle
3207 PTRACE_GETTHREADLIST if this macro does not exist.
3208
14a00470
YQ
32092012-12-15 Yao Qi <yao@codesourcery.com>
3210
3211 * Makefile.in (OBS): Add notif.o.
3212 * notif.c, notif.h: New.
3213 * server.c: Include "notif.h".
3214 (struct vstop_notif) <next>: Remove.
3215 <base>: New field.
3216 (queue_stop_reply): Update.
3217 (push_event, send_next_stop_reply): Remove.
3218 (discard_queued_stop_replies): Update.
3219 (notif_stop): New variable.
3220 (handle_v_stopped): Remove.
3221 (handle_v_requests): Don't call handle_v_stopped. Call
3222 handle_ack_notif instead.
3223 (queue_stop_reply_callback): Call notif_event_enque instead
3224 of queue_stop_reply.
3225 (handle_status): Don't call send_next_stop_reply, call
3226 notif_write_event instead.
3227 (kill_inferior_callback): Likewise.
3228 (detach_or_kill_inferior_callback): Likewise.
3229 (main): Call initialize_notif.
3230 (process_serial_event): Call QUEUE_is_empty.
3231 (handle_target_event): Call notif_push instead of push event.
3232 * server.h (push_event): Remove declaration.
3233
61c125b9
TT
32342012-12-10 Tom Tromey <tromey@redhat.com>
3235
3236 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
3237 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
3238 macros.
3239 (.c.o): Rewrite.
3240 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
3241 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
3242 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
3243 (amd64-linux-ipa.o, ax.o): Rewrite.
3244 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
3245 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
3246 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
3247 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
3248 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
3249 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
3250 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
3251 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
3252 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
3253 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
3254 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
3255 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
3256 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
3257 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
3258 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
3259 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
3260 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
3261 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
3262 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
3263 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
3264 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
3265 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
3266 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
3267 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
3268 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
3269 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
3270 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
3271 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
3272 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
3273 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
3274 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
3275 (reg-tilegx.o): Remove.
3276 (all_object_files): New macro.
3277 Include .deps files.
3278 * aclocal.m4, configure: Rebuild.
3279 * acinclude.m4: Include depstand.m4, lead-dot.m4.
3280 * configure.ac: Invoke ZW_CREATE_DEPDIR,
3281 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
3282
e90e9ad9
TT
32832012-12-05 Tom Tromey <tromey@redhat.com>
3284
3285 PR gdb/14917:
3286 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
3287
02d403bf 32882012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
3289
3290 * configure.ac: Check for linux/perf_event.h.
3291 * config.in: Regenerated.
3292 * configure: Regenerated.
3293
0270a750
PA
32942012-11-26 Maxime Villard <rustyBSD@gmx.fr>
3295
3296 * hostio.c (handle_readlink): Decrease buffer size
3297 parameter passed to readlink by one byte.
3298
8c29b58e
YQ
32992012-11-26 Yao Qi <yao@codesourcery.com>
3300
3301 * configure.ac (build_warnings): Append '-Wempty-body'.
3302 * configure: Regenerated.
3303 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
3304 body.
3305
8bdce1ff
PM
33062012-11-15 Pierre Muller <muller@sourceware.org>
3307
3308 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
3309 * config.in: Regenerate.
3310 * configure: Regenerate.
3311 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
3312 Use "gdb_wait.h" header instead of <sys/wait.h> header.
3313 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3314 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
3315 header.
3316 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
3317 instead of <sys/wait.h> header.
3318 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3319
02d403bf 33202012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
3321
3322 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
3323 (various make rules): Remove -DGDBSERVER
3324
fbd5db48
YQ
33252012-11-09 Yao Qi <yao@codesourcery.com>
3326
3327 * spu-low.c (current_ptid): Move it to ..
3328 * gdbthread.h: ... here. New.
3329 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
3330 * server.c (myresume, process_serial_event): Likewise.
3331 * thread-db.c (thread_db_find_new_threads): Likewise.
3332 * tracepoint.c (run_inferior_command): Likewise.
3333
b3dc46ff
AB
33342012-10-01 Andrew Burgess <aburgess@broadcom.com>
3335
3336 * server.c (handle_search_memory_1): Include access length in
3337 warning message.
3338
07c04788
HPN
33392012-09-05 Michael Brandt <michael.brandt@axis.com>
3340
3341 * linux-crisv32-low.c: Fix compile errors.
3342
918d227b
YQ
33432012-09-04 Yao Qi <yao@codesourcery.com>
3344
3345 * tracepoint.c (cmd_qtsv): Adjust debug message.
3346 Don't check CUR_TPOINT.
3347
18c1b81a
YQ
33482012-08-28 Yao Qi <yao@codesourcery.com>
3349
3350 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
3351 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
3352 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
3353 Remove declarations of xmalloc, xreallloc, xstrdup and
3354 freeargv.
3355 * Makefile.in (libiberty_h): New.
3356 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
3357 (linux-bfin-low.o): Append dependency 'libiberty.h'.
3358
dc82f37b
YQ
33592012-08-23 Yao Qi <yao@codesourcery.com>
3360
3361 * server.h: Remove declaration of 'xsnprintf'.
3362
406b1477
KS
33632012-08-22 Keith Seitz <keiths@redhat.com>
3364
3365 * server.h: Include build-gnulib-gbserver/config.h.
3366 * gdbreplay.c: Likewise.
3367
e6712ff1
DE
33682012-08-08 Doug Evans <dje@google.com>
3369
3370 * Makefile.in (SFILES): Add gdb_vecs.c.
3371 (OBS): Add gdb_vecs.o.
3372 (gdb_vecs_h, host_defs_h): New variables.
3373 (thread-db.o): Add $(gdb_vecs_h) dependency.
3374 (gdb_vecs.o): New rule.
3375 * thread-db.c: #include "gdb_vecs.h".
3376 (thread_db_load_search): Use a vector to iterate over path elements.
3377 Handle text appearing after "$pdir".
3378
3379 * configure.ac: Add check for strstr.
3380 * config.in: Regenerate.
3381 * configure: Regenerate.
3382
7c3270ae
UW
33832012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
3384
3385 * hostio.c (handle_pread): If pread fails, fall back to attempting
3386 lseek/read.
3387 (handle_pwrite): Likewise for pwrite.
3388
b62e2b27
UW
33892012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
3390
3391 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
3392 between unsupported TYPE and unimplementable ADDR/LEN combination.
3393 (arm_insert_point): Act on new return value.
3394
78a99e91
PA
33952012-07-31 Pedro Alves <palves@redhat.com>
3396
3397 * server.c (process_point_options): Only skip tokens if we find
3398 one that is unrecognized. Don't treat 'X' specially while
3399 skipping unrecognized tokens.
3400
fcf303ab
UW
34012012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
3402
3403 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
3404 to 4-byte-align HW breakpoint addresses for Thumb.
3405
7255706c
YQ
34062012-07-27 Yao Qi <yao@codesourcery.com>
3407
3408 PR remote/14161.
3409
3410 * server.h: Declare gdb_agent_about_to_close.
3411 * target.c (kill_inferior): Include "agent.h".
3412 New. Send command 'kill'.
3413 * target.h (kill_inferior): Removed macro.
3414 * tracepoint.c (gdb_agent_about_to_close): New.
3415 (gdb_agent_helper_thread): Handle command 'close'.
3416 Wait endlessly until the inferior stops.
3417 Install gdb_agent_remove_socket to atexit hook.
3418 (agent_socket_name): New static variable.
3419 (gdb_agent_socket_init): Replace local variable 'name' with
3420 'agent_socket_name'.
3421 (gdb_agent_remove_socket): New.
3422
5a3f286f
YQ
34232012-07-27 Yao Qi <yao@codesourcery.com>
3424
3425 * server.c (process_point_options): Stop at 'X' when parsing.
3426
961bd387
ME
34272012-07-19 Michael Eager <eager@eagercon.com>
3428
a261b8f5 3429 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
3430 to hw_execute.
3431 * linux-x86-low.c (x86_insert_point, x86_remove_point):
3432 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
3433 hardware breakpoint.
3434
aa7c7447
JK
34352012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3436
3437 * gdbserver/linux-low.c (initialize_low): Call
3438 linux_ptrace_init_warnings.
3439
7f216e7c
DE
34402012-07-02 Doug Evans <dje@google.com>
3441
3442 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
3443 pointer to int.
3444
d3ce09f5
SS
34452012-07-02 Stan Shebs <stan@codesourcery.com>
3446
3447 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
3448 (ax.o): Add it to build rule.
3449 (ax-ipa.o): Ditto.
3450 (OBS): Add format.o.
3451 (IPA_OBS): Add format.o.
3452 * server.c (handle_query): Claim support for breakpoint commands.
3453 (process_point_options): Add command case.
3454 (process_serial_event): Leave running if there are printfs in
3455 effect.
3456 * mem-break.h (any_persistent_commands): Declare.
3457 (add_breakpoint_commands): Declare.
3458 (gdb_no_commands_at_breakpoint): Declare.
3459 (run_breakpoint_commands): Declare.
3460 * mem-break.c (struct point_command_list): New struct.
3461 (struct breakpoint): New field command_list.
3462 (any_persistent_commands): New function.
3463 (add_commands_to_breakpoint): New function.
3464 (add_breakpoint_commands): New function.
3465 (gdb_no_commands_at_breakpoint): New function.
3466 (run_breakpoint_commands): New function.
3467 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
3468 locally.
3469 * ax.c: Include format.h.
3470 (ax_printf): New function.
3471 (gdb_eval_agent_expr): Add printf opcode.
3472
2f8f6aed
YQ
34732012-06-13 Yao Qi <yao@codesourcery.com>
3474
3475 * server.c (start_inferior): Remove duplicated writes to fields
3476 'last_resume_kind' and 'last_status' of 'current_inferior'.
3477
0c9070b3
YQ
34782012-06-12 Yao Qi <yao@codesourcery.com>
3479 Pedro Alves <palves@redhat.com>
3480
3481 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
3482 comment.
3483 * server.c (handle_v_cont): Extend comment.
3484
c52daf70
YQ
34852012-06-11 Yao Qi <yao@codesourcery.com>
3486
3487 * linux-low.c (linux_attach): Add 'static'.
3488
d38bbb0a
YQ
34892012-06-06 Yao Qi <yao@codesourcery.com>
3490
3491 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
3492
89dc0afd
JK
34932012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
3494
3495 Fix gcc -flto compilation warning.
3496 * server.c (main): Make variable multi_mode and attach volatile.
3497
75f62ce7
TJB
34982012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3499
3500 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
3501 if the platform doesn't know about it.
3502
65f479b6
PA
35032012-05-30 Jeff Kenton <jkenton@tilera.com>
3504
3505 * Makefile.in (SFILES): Add linux-tile-low.c.
3506 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
3507 * configure.srv: Handle tilegx-*-linux*.
3508 * linux-tile-low.c: New file.
3509
0c5bf5a9
JK
35102012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3511
3512 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
3513
a493e3e2
PA
35142012-05-24 Pedro Alves <palves@redhat.com>
3515
3516 PR gdb/7205
3517
43aaf8b6 3518 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 3519
2ea28649
PA
35202012-05-24 Pedro Alves <palves@redhat.com>
3521
3522 PR gdb/7205
3523
3524 Replace target_signal with gdb_signal throughout.
3525
8d409d16
MR
35262012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
3527
3528 * linux-low.c (linux_store_registers): Avoid the copying sequence
3529 when no data has been retrieved by ptrace.
3530
23512c01
MGD
35312012-05-22 Will Deacon <will.deacon@arm.com>
3532
3533 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
3534 Include asm/ptrace.h.
3535 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
3536 already defined.
3537
4934b29e
MR
35382012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
3539
3540 * linux-low.c (linux_store_registers): Don't re-retrieve data
3541 with ptrace that has already been obtained from /proc. Always
3542 copy any data retrieved with ptrace to the buffer supplied.
3543
bde24c0a
PA
35442012-05-11 Yao Qi <yao@codesourcery.com>
3545 Pedro Alves <palves@redhat.com>
3546
3547 * linux-low.c (enum stopping_threads_kind): New.
3548 (stopping_threads): Change type to `enum stopping_threads_kind'.
3549 (handle_extended_wait): If stopping and suspending threads, leave
3550 the new_lwp suspended too.
3551 (linux_wait_for_event): Adjust.
3552 (stop_all_lwps): Set `stopping_threads' to
3553 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
3554 whether we're suspending threads or just stopping them. Assert no
3555 recursion happens.
3556
623b6bdf
YQ
35572012-04-29 Yao Qi <yao@codesourcery.com>
3558
3559 * server.h: Move some code to ...
3560 * gdbthread.h: ... here. New.
3561 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
3562 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
3563 (nto-low.o, win32-low.o): Likewise.
3564 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
3565 * regcache.c, remote-utils.c, server.c: Likewise.
3566 * target.c, tracepoint.c, win32-low.c: Likewise.
3567
f15f9948
TJB
35682012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3569
3570 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
3571 (PTRACE_ARG4_TYPE): Likewise.
3572 (PTRACE_XFER_TYPE): Likewise.
3573 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
3574 ptrace to PTRACE_ARG3_TYPE.
3575 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
3576 (PTRACE_ARG4_TYPE): Likewise.
3577 (PTRACE_XFER_TYPE): Likewise.
3578 (linux_detach_one_lwp): Cast fourth argument of
3579 ptrace to long then PTRACE_ARG4_TYPE.
3580 (regsets_fetch_inferior_registers): Cast third argument of
3581 ptrace to long then PTRACE_ARG3_TYPE.
3582 (regsets_store_inferior_registers): Likewise.
3583
38ea300a
PA
35842012-04-20 Pedro Alves <palves@redhat.com>
3585
3586 * configure: Regenerate.
3587
c971b7fa
PA
35882012-04-19 Pedro Alves <palves@redhat.com>
3589
43aaf8b6 3590 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 3591 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
3592 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
3593 (all, install-only, uninstall, clean-info, all-lib, clean): No
3594 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
3595 (maintainer-clean realclean distclean): Use subdir_do.
3596 (subdir_do): New.
3597 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 3598 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
3599 * acinclude.m4: Include acx_configure_dir.m4.
3600 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
3601 calls. Call AC_PROG_RANLIB. Configure gnulib using
3602 ACX_CONFIGURE_DIR.
3603 (GNULIB): New.
3604 (GNULIB_STDINT_H): Adjust.
3605 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
3606 * gdbreplay.c: Include build-gnulib/config.h.
3607 * server.h: Likewise.
3608 * aclocal.m4: Regenerate.
3609 * config.in: Regenerate.
3610 * configure: Regenerate.
c971b7fa 3611
809277f8
PA
36122012-04-19 Pedro Alves <palves@redhat.com>
3613
3614 * Makefile.in (LIBGNU, INCGNU): Adjust.
3615 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
3616 (all, install-only, uninstall, clean-info, all-lib, clean)
3617 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
3618 * configure.ac: Adjust AC_OUTPUT output.
3619 * aclocal.m4: Regenerate.
3620 * configure: Regenerate.
3621
fd9bb8b8
PA
36222012-04-19 Pedro Alves <palves@redhat.com>
3623
3624 * Makefile.in (generated_files): New.
3625 (server_h): Remove the explicit dependency on config.h, and depend
3626 on $generated_files.
3627
1c298c66
PA
36282012-04-19 Pedro Alves <palves@redhat.com>
3629
3630 * Makefile.in (INCGNU): Add -Ignulib.
3631
57c4b50b
PA
36322012-04-19 Pedro Alves <palves@redhat.com>
3633
3634 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
3635 (INCGNU): ... this, and spell out -I here.
3636 (GNULIB_LIB): Rename to ...
3637 (LIBGNU): ... this.
3638 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
3639
1030e047
PA
36402012-04-19 Pedro Alves <palves@redhat.com>
3641
3642 * config.in: Regenerate.
3643
447d4319
PA
36442012-04-19 Pedro Alves <palves@redhat.com>
3645
3646 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
3647 * server.h (memmem): Remove declaration.
3648 * config.in: Regenerate.
3649 * configure: Regenerate.
3650
aad9eab9
YQ
36512012-04-19 Yao Qi <yao@codesourcery.com>
3652
3653 * Makefile.in (SFILES): Add common/vec.c.
3654 (OBS): Add vec.o.
3655 (vec.o): New rule.
3656
3e10640f
YQ
36572012-04-19 Yao Qi <yao@codesourcery.com>
3658
3659 * remote-utils.c (prepare_resume_reply): Replace with macro
3660 target_core_of_thread.
3661 * server.c (handle_qxfer_threads_proper): Likewise.
3662 * target.h (traget_core_of_thread): New macro.
3663
71622373
PA
36642012-04-18 Pedro Alves <palves@redhat.com>
3665
3666 * aclocal.m4: Regenerate.
3667 * configure: Regenerate.
3668
80d26939
YQ
36692012-04-16 Yao Qi <yao@codesourcery.com>
3670
3671 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
3672 duplicated on address.
3673
42476b70
YQ
36742012-04-16 Yao Qi <yao@codesourcery.com>
3675
3676 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
3677 (struct tracepoint_action_ops) <send>: New field.
3678 (m_tracepoint_action_send, r_tracepoint_action_send): New.
3679 (agent_expr_send, x_tracepoint_action_send): New.
3680 (l_tracepoint_action_send): New.
3681 (cmd_qtdp): Download and install tracepoint
3682 according to `use_agent'.
3683 (run_inferior_command): Add one more parameter `len'.
3684 Update callers.
3685 (tracepoint_send_agent): New.
3686 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
3687
7bc83639
YQ
36882012-04-16 Yao Qi <yao@codesourcery.com>
3689
3690 * tracepoint.c (download_tracepoints): Moved to ...
3691 (cmd_qtstart): ... here.
3692
5f18041e
YQ
36932012-04-14 Yao Qi <yao@codesourcery.com>
3694
3695 * tracepoint.c: Include inttypes.h.
3696 (struct collect_memory_action): Use sized types.
3697 (struct tracepoint): Likewise.
3698 (cmd_qtdp, stop_tracing): Update print specifiers.
3699 (cmd_qtp, response_tracepoint): Likewise.
3700 (collect_data_at_tracepoint): Likewise.
3701 (collect_data_at_step): Likewise.
3702
55a8c076
YQ
37032012-04-14 Yao Qi <yao@codesourcery.com>
3704
3705 Import gnulib module inttypes.
3706 * aclocal.m4, config.in, configure: Regenerated.
3707
dc750257
YQ
37082012-04-14 Yao Qi <yao@codesourcery.com>
3709
3710 * Makefile.in (maintainer-clean, realclean, distclean): Remove
3711 Makefile and config.status at last.
3712
0ab5faf9
YQ
37132012-04-13 Yao Qi <yao@codesourcery.com>
3714
3715 * tracepoint.c: Include stdint.h unconditionally.
3716
18f5fd81
TJB
37172012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3718
3719 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
3720 on BFD_HAVE_SYS_PROCFS_TYPE.
3721 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
3722 * configure: Regenerate.
3723 * config.in: Likewise.
3724
4d47af5c
L
37252012-04-13 H.J. Lu <hongjiu.lu@intel.com>
3726
3727 * Makefile.in (clean): Also remove x32.c x32-linux.c
3728 x32-avx.c x32-avx-linux.c.
3729 (x32.o): New target.
3730 (x32.c): Likewise.
3731 (x32-linux.o): Likewise.
3732 (x32-linux.c): Likewise.
3733 (x32-avx.o): Likewise.
3734 (x32-avx.c): Likewise.
3735 (x32-avx-linux.o): Likewise.
3736 (x32-avx-linux.c): Likewise.
3737
3738 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
3739 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
3740 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
3741 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
3742 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
3743 i386/x32-avx-linux.xml.
3744
3745 * linux-x86-low.c (init_registers_x32_linux): New prototype.
3746 (init_registers_x32_avx_linux): Likwise.
3747 (x86_linux_update_xmltarget): Call init_registers_x32_linux
3748 or init_registers_x32_avx_linux if linux_is_elf64 is false.
3749
ecedbe58
PA
37502012-04-13 Pedro Alves <palves@redhat.com>
3751
3752 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
3753 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
3754 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
3755 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
3756 the sub-make.
3757
c92b5177
L
37582012-04-12 H.J. Lu <hongjiu.lu@intel.com>
3759
3760 * linux-x86-low.c (compat_x32_clock_t): New.
3761 (compat_x32_siginfo_t): Likewise.
3762 (compat_x32_siginfo_from_siginfo): Likewise.
3763 (siginfo_from_compat_x32_siginfo): Likewise.
3764 (linux_is_elf64): Likewise.
3765 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
3766 and siginfo_from_compat_x32_siginfo for x32.
3767 (x86_arch_setup): Set linux_is_elf64.
3768
214d508e
L
37692012-04-12 H.J. Lu <hongjiu.lu@intel.com>
3770
3771 PR gdb/13969
3772 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
3773 e_machine field.
3774 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
3775 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
3776 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
3777 compatible with process.
3778
c9a1864a
YQ
37792012-04-12 Yao Qi <yao@codesourcery.com>
3780
3781 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
3782 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
3783 (install-only, install-info, clean): Handle sub dir gnulib.
3784 (all-lib, am--refresh): New targets.
3785 (memmem.o): Remove target.
3786 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
3787 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
3788 (AC_REPLACE_FUNCS): Remove memmem.
3789 Invoke gl_INIT and AM_INIT_AUTOMAKE.
3790 (AC_OUTPUT): Generate Makefile in gnulib/.
3791 * aclocal.m4, config.in, configure: Regenerated.
3792
367ba2c2
MR
37932012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
3794
3795 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
3796
9d236627
PA
37972012-04-05 Pedro Alves <palves@redhat.com>
3798
3799 -Werror=strict-aliasing
3800
3801 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
3802 pointer.
3803
111217b3
PA
38042012-04-04 Pedro Alves <palves@redhat.com>
3805
3806 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
3807 (sparc_store_gregset_from_stack, sparc_store_gregset)
3808 (sparc_breakpoint_at): Fix formatting.
3809
8365dcf5
TJB
38102012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3811
3812 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
3813 are available.
3814 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
3815 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
3816 * config.in: Regenerate.
3817 * configure: Likewise.
3818
689cc2ae
PA
38192012-03-29 Pedro Alves <palves@redhat.com>
3820
3821 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
3822 Correct ptrace arguments.
3823
c14dfd32
PA
38242012-03-28 Pedro Alves <palves@redhat.com>
3825
3826 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
3827 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
3828 (IA64_FR1_REGNUM): New defines.
3829 (ia64_fetch_register): New.
3830 (the_low_target): Install it.
3831 * linux-low.h (struct linux_target_ops) <fetch_register>: New
3832 field.
3833 * linux-low.c (linux_fetch_registers): Try the
3834 the_low_target.fetch_register hook first.
3835
3836 * linux-arm-low.c (the_low_target): Adjust.
3837 * linux-bfin-low.c (the_low_target): Adjust.
3838 * linux-cris-low.c (the_low_target): Adjust.
3839 * linux-crisv32-low.c (the_low_target): Adjust.
3840 * linux-m32r-low.c (the_low_target): Adjust.
3841 * linux-m68k-low.c (the_low_target): Adjust.
3842 * linux-mips-low.c (the_low_target): Adjust.
3843 * linux-ppc-low.c (the_low_target): Adjust.
3844 * linux-s390-low.c (the_low_target): Adjust.
3845 * linux-sh-low.c (the_low_target): Adjust.
3846 * linux-sparc-low.c (the_low_target): Adjust.
3847 * linux-tic6x-low.c (the_low_target): Adjust.
3848 * linux-x86-low.c (the_low_target): Adjust.
3849 * linux-xtensa-low.c (the_low_target): Adjust.
3850
63c88e13
PA
38512012-03-26 Pedro Alves <palves@redhat.com>
3852
3853 * server.c (handle_qxfer_libraries): Don't bail early if
3854 the_target->qxfer_libraries_svr4 is not NULL.
3855
fb723180
PA
38562012-03-26 Pedro Alves <palves@redhat.com>
3857
3858 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
3859
0afae3cf
PA
38602012-03-23 Pedro Alves <palves@redhat.com>
3861
3862 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
3863 "library-list-svr4" element's start tag when the the DSO list is
3864 empty.
3865
485f1ee4
PA
38662012-03-23 Pedro Alves <palves@redhat.com>
3867
3868 * linux-low.c (read_one_ptr): Read the inferior's pointer through
3869 a variable whose type size is the same as the inferior's pointer
3870 size.
3871
a5362b9a
TS
38722012-03-21 Thomas Schwinge <thomas@codesourcery.com>
3873
3874 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
3875 struct siginfo.
3876 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
3877 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3878 * linux-low.h: Include <signal.h>.
3879 (struct siginfo): Remove forward declaration.
3880 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
3881 struct siginfo.
3882
d226c142
MF
38832012-03-21 Mike Frysinger <vapier@gentoo.org>
3884
3885 * .gitignore: Ignore more files.
3886
122f36ef
PA
38872012-03-19 Pedro Alves <palves@redhat.com>
3888 Jan Kratochvil <jan.kratochvil@redhat.com>
3889
3890 * server.c (cont_thread, general_thread): Add describing comments.
3891 (start_inferior): Clear `cont_thread'.
3892 (handle_v_cont): Don't set `cont_thread' if resuming all threads
3893 of a process.
3894
fc3e5175
YQ
38952012-03-15 Yao Qi <yao@codesourcery.com>
3896
3897 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
3898 handling to ...
3899 (cmd_qtdp): ... here.
3900
8d0d92cd
YQ
39012012-03-15 Yao Qi <yao@codesourcery.com>
3902
3903 * tracepoint.c (struct tracepoint_action_ops): New.
3904 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
3905 (m_tracepoint_action_download): New.
3906 (r_tracepoint_action_download): New.
3907 (x_tracepoint_action_download): New.
3908 (l_tracepoint_action_download): New.
3909 (add_tracepoint_action): Install `action->ops' according type.
3910 (download_tracepoint_1): Move code `download' function pointer
3911 of various tracepoint_action_ops.
3912
87b0bb13
JK
39132012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
3914
3915 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
3916 linux_ptrace_attach_warnings.
3917
5f572dec
JK
39182012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
3919
3920 * Makefile.in (linux-ptrace.o): New.
3921 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
3922 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
3923 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
3924 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
3925 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
3926 of these targets.
3927 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
3928
f4647387
YQ
39292012-03-08 Yao Qi <yao@codesourcery.com>
3930 Pedro Alves <palves@redhat.com>
3931
3932 Fix PR server/13392.
3933 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
3934 offset of JMP insn.
3935 * tracepoint.c (remove_tracepoint): New.
3936 (cmd_qtdp): Call remove_tracepoint when failed to install.
3937
9b224c5e
PA
39382012-03-07 Pedro Alves <palves@redhat.com>
3939
3940 * linux-low.c (get_detach_signal): New.
3941 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
3942 Pass on pending signals to PTRACE_DETACH. Check the result of the
3943 ptrace call.
3944 * server.c (program_signals, program_signals_p): New.
3945 (handle_general_set): Handle QProgramSignals.
3946 * server.h (program_signals, program_signals_p): Declare.
3947
e237a7e2
JK
39482012-03-05 Pedro Alves <palves@redhat.com>
3949 Jan Kratochvil <jan.kratochvil@redhat.com>
3950
3951 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
3952 New comment why.
3953
5808517f
YQ
39542012-03-03 Yao Qi <yao@codesourcery.com>
3955
3956 * tracepoint.c (tracepoint_look_up_symbols): Update call to
3957 agent_look_up_symbols.
3958
58b4daa5
YQ
39592012-03-03 Yao Qi <yao@codesourcery.com>
3960
3961 * Makefile.in (linux-low.o): Keep dependence on agent.h.
3962 (linux-x86-low.o): Likewise.
3963 * server.h: Remove in_process_agent_loaded.
3964 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
3965 common/agent.c.
3966 Update callers.
3967
8ffcbaaf
YQ
39682012-03-03 Yao Qi <yao@codesourcery.com>
3969
3970 * tracepoint.c (gdb_agent_capability): New global.
3971 (in_process_agent_loaded_ust): Renamed to
3972 `in_process_agent_supports_ust'.
3973 Update callers.
3974 (in_process_agent_supports_ust): Call agent_capability_check.
3975 (clear_installed_tracepoints): Assert that agent supports
3976 agent.
3977
d1feda86
YQ
39782012-03-03 Yao Qi <yao@codesourcery.com>
3979
3980 * linux-low.c (linux_supports_agent): New.
3981 (linux_target_ops): Initialize field `supports_agent' with
3982 linux_supports_agent.
3983 * target.h (struct target_ops) <supports_agent>: New.
3984 (target_supports_agent): New macro.
3985 * server.c (handle_general_set): Handle packet 'QAgent'.
3986 (handle_query): Send `QAgent+'.
3987 * Makefile.in (server.o): Depends on agent.h.
3988
2fa291ac
YQ
39892012-03-03 Yao Qi <yao@codesourcery.com>
3990
3991 * Makefile.in (OBS): Add agent.o.
3992 Add new rule for agent.o.
3993 Track dependence of tracepoint.c on agent.h.
3994 * tracepoint.c (run_inferior_command_1):
3995 (run_inferior_command): Call agent_run_command.
3996 (gdb_ust_connect_sync_socket): Deleted. Move it to
3997 common/agent.c.
3998 (resume_thread, stop_thread): Likewise.
3999 (gdb_ust_socket_init): Renamed to ...
4000 (gdb_agent_socket_init): ... New.
4001 (gdb_ust_thread): Renamed to ...
4002 (gdb_agent_helper_thread): ... New.
4003 (gdb_ust_init): Move some code to ...
4004 (gdb_agent_init): ... here. New.
4005 [HAVE_UST]: Call gdb_ust_init.
4006 (initialize_tracepoint_ftlib): Call gdb_agent_init.
4007 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
4008 * config.in, configure: Regenerated.
4009
05044653
PA
40102012-03-02 Pedro Alves <palves@redhat.com>
4011
4012 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
4013 * linux-low.c (struct simple_pid_list): New.
4014 (stopped_pids): New a struct simple_pid_list pointer.
4015 (add_to_pid_list, pull_pid_from_list): New.
4016 (handle_extended_wait): Don't assume the first signal new children
4017 report is SIGSTOP. Adjust call to pull_pid_from_list.
4018 (linux_wait_for_lwp): Adjust.
4019
8d00225b
YQ
40202012-03-02 Yao Qi <yao@codesourcery.com>
4021
4022 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4023 debug log.
4024
19560ba5
YQ
40252012-03-02 Yao Qi <yao@codesourcery.com>
4026
4027 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4028 `stop_pc' and `tpoint'. Update caller.
4029
1faeff08
MR
40302012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
4031
4032 * linux-low.h (linux_target_ops): Add regset_bitmap member.
4033 * linux-low.c (use_linux_regsets): New macro.
4034 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4035 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4036 (linux_register_in_regsets): New function.
4037 (usr_fetch_inferior_registers): Skip registers covered by
4038 regsets.
4039 (usr_store_inferior_registers): Likewise.
4040 (usr_fetch_inferior_registers): New macro.
4041 (usr_store_inferior_registers): Likewise.
4042 (linux_fetch_registers): Handle mixed regset/non-regset targets.
4043 (linux_store_registers): Likewise.
4044 * linux-mips-low.c (init_registers_mips_dsp_linux): New
4045 prototype.
4046 (init_registers_mips64_dsp_linux): Likewise.
4047 (init_registers_mips_linux): New macro.
4048 (init_registers_mips_dsp_linux): Likewise.
4049 (mips_dsp_num_regs): Likewise.
4050 (DSP_BASE, DSP_CONTROL): New fallback macros.
4051 (mips_base_regs): New macro.
4052 (mips_regmap): Use it. Fix the size.
4053 (mips_dsp_regmap): New variable.
4054 (mips_dsp_regset_bitmap): Likewise.
4055 (mips_arch_setup): New function.
4056 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4057 than mips_regmap.
4058 (mips_cannot_store_register): Likewise.
4059 (the_low_target): Update .arch_setup, .num_regs and .regmap
4060 initializers. Add .regset_bitmap initializer.
4061 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4062 initializer.
4063 * linux-bfin-low.c (the_low_target): Likewise.
4064 * linux-cris-low.c (the_low_target): Likewise.
4065 * linux-crisv32-low.c (the_low_target): Likewise.
4066 * linux-ia64-low.c (the_low_target): Likewise.
4067 * linux-m32r-low.c (the_low_target): Likewise.
4068 * linux-m68k-low.c (the_low_target): Likewise.
4069 * linux-ppc-low.c (the_low_target): Likewise.
4070 * linux-s390-low.c (the_low_target): Likewise.
4071 * linux-sh-low.c (the_low_target): Likewise.
4072 * linux-sparc-low.c (the_low_target): Likewise.
4073 * linux-tic6x-low.c (the_low_target): Likewise.
4074 * linux-x86-low.c (the_low_target): Likewise.
4075 * linux-xtensa-low.c (the_low_target): Likewise.
4076 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4077 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4078 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4079 srv_xmlfiles.
4080 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4081 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4082
c03e6ccc
YQ
40832012-02-29 Yao Qi <yao@codesourcery.com>
4084 Pedro Alves <palves@redhat.com>
4085
4086 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4087 `step_over_finished' is true.
4088
644cebc9
PA
40892012-02-27 Pedro Alves <palves@redhat.com>
4090
4091 * linux-low.c (pid_is_stopped): Delete, moved to common/.
4092 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4093
c14d7ab2
PA
40942012-02-27 Pedro Alves <palves@redhat.com>
4095
4096 PR server/9684
4097 * linux-low.c (pid_is_stopped): New.
4098 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4099
412c89dd
LM
41002012-02-25 Luis Machado <lgustavo@codesourcery.com>
4101
4102 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4103 of conditions.
4104
b745defe
MR
41052012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4106
4107 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4108
9f3a5c85
LM
41092012-02-24 Luis Machado <lgustavo@codesourcery>
4110
4111 * server.c (handle_query): Advertise support for target-side
4112 breakpoint condition evaluation.
4113 (process_point_options): New function.
4114 (process_serial_event): When inserting a breakpoint, check for
4115 a target-side condition that should be evaluated.
4116
4117 * mem-break.c: Include regcache.h and ax.h.
4118 (point_cond_list_t): New data structure.
4119 (breakpoint) <cond_list>: New field.
4120 (find_gdb_breakpoint_at): Make non-static.
4121 (delete_gdb_breakpoint_at): Clear any target-side
4122 conditions.
4123 (clear_gdb_breakpoint_conditions): New function.
4124 (add_condition_to_breakpoint): Likewise.
4125 (add_breakpoint_condition): Likewise.
4126 (gdb_condition_true_at_breakpoint): Likewise.
4127 (gdb_breakpoint_here): Return result directly instead
4128 of going through a local variable.
4129
4130 * mem-break.h (find_gdb_breakpoint_at): New prototype.
4131 (clear_gdb_breakpoint_conditions): Likewise.
4132 (add_breakpoint_condition): Likewise.
4133 (gdb_condition_true_at_breakpoint): Likewise.
4134
4135 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
4136 (need_step_over_p): Take target-side breakpoint condition into
4137 consideration.
4138
5e1dc496
LM
41392012-02-24 Luis Machado <lgustavo@codesourcery>
4140
4141 * server.h: Include tracepoint.h.
4142 (agent_mem_read, agent_get_trace_state_variable_value,
4143 agent_set_trace_state_variable_value,
4144 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
4145 get_set_tsv_func_addr): New prototypes.
4146
4147 * ax.h: New include file.
4148 * ax.c: New source file.
4149
4150 * tracepoint.c: Include ax.h.
4151 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
4152 agent_expr, eval_result_type): Move to ax.h.
4153 (parse_agent_expr): Rename to ...
4154 (gdb_parse_agent_expr): ... this, make it non-static and move
4155 to ax.h.
4156 (unparse_agent_expr) Rename to ...
4157 (gdb_unparse_agent_expr): ... this, make it non-static and move
4158 to ax.h.
4159 (eval_agent_expr): Rename to ...
4160 (eval_tracepoint_agent_expr): ... this.
4161 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
4162 forward declarations.
4163 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
4164 (agent_get_trace_state_variable_value): New function.
4165 (agent_set_trace_state_variable_value): New function.
4166 (cmd_qtdp): Call gdb_parse_agent_expr (...).
4167 (response_tracepoint): Call gdb_unparse_agent_expr (...).
4168 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
4169 (condition_true_at_tracepoint): Likewise.
4170 (parse_agent_expr): Rename to ...
4171 (gdb_parse_agent_expr): ... this and move to ax.c.
4172 (unparse_agent_expr): Rename to ...
4173 (gdb_unparse_agent_expr): ... this and move to ax.c.
4174 (gdb_agent_op_name): Move to ax.c.
4175 (eval_agent_expr): Rename to ...
4176 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
4177 and move to ax.c.
4178 (eval_tracepoint_agent_expr): New function.
4179 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 4180 non-static.
5e1dc496
LM
4181 (current_insn_ptr, emit_error, struct bytecode_address): Move to
4182 ax.c.
4183 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
4184 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
4185 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
4186 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
4187 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
4188 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
4189 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
4190 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
4191 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
4192 (compile_bytecodes): Remove forward declaration.
4193 (is_goto_target): Move to ax.c.
4194 (compile_bytecodes): Move to ax.c and call
4195 agent_get_trace_state_variable_value (...) and
4196 agent_set_trace_state_variable_value (...).
4197
4198 * Makefile.in: Update ax.c and IPA dependencies.
4199
277e4e52
PA
42002012-02-24 Pedro Alves <palves@redhat.com>
4201
4202 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
4203 (cmd_bigqtbuffer_circular): ... this. Only handle
4204 'QTBuffer:circular:'.
4205 (handle_tracepoint_general_set): Adjust.
4206
bf4c19f7
YQ
42072012-02-16 Yao Qi <yao@codesourcery.com>
4208
4209 * inferiors.c: Move code to ...
4210 * dll.c: .... here. New.
4211 * server.h: Declare clear_dlls.
4212 * Makefile.in (SFILES): Add dll.c.
4213 (OBS): Add dll.o
4214 (dll.o): New rule.
4215
d73f2619
YQ
42162012-02-11 Yao Qi <yao@codesourcery.com>
4217
4218 * server.c: (handle_monitor_command): Add a new parameter
4219 `own_buf'.
4220 (handle_query): Update caller.
4221
f8255c2a
JB
42222012-02-09 Joel Brobecker <brobecker@adacore.com>
4223
4224 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
4225 * configure, config.in: Regenerate.
4226 * hostio.c: Provide an alternate implementation if HAVE_READLINK
4227 is not defined.
4228
da84f473
PA
42292012-02-02 Pedro Alves <palves@redhat.com>
4230
4231 Try SIGKILL first, then PTRACE_KILL.
4232 * linux-low.c (linux_kill_one_lwp): New.
4233 (linux_kill_one_lwp): Rename to ...
4234 (kill_one_lwp_callback): ... this. Use the new
4235 linux_kill_one_lwp.
4236
e886a173
PA
42372012-02-02 Pedro Alves <palves@redhat.com>
4238
4239 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
4240 inferior.
4241
be07f1a2
PA
42422012-01-27 Pedro Alves <palves@redhat.com>
4243
4244 * linux-low.c (linux_child_pid_to_exec_file): Delete.
4245 (elf_64_file_p): Make static.
4246 (linux_pid_exe_is_elf_64_file): New.
4247 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
4248 Delete declarations.
4249 (linux_pid_exe_is_elf_64_file): Declare.
4250 * linux-x86-low.c (x86_arch_setup): Use
4251 linux_pid_exe_is_elf_64_file.
4252
d8301ad1
JK
42532012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4254
4255 * linux-low.c (linux_wait_for_event_1): Rename to ...
4256 (linux_wait_for_event): ... here and merge it with former
4257 linux_wait_for_event - new variable wait_ptid, use it.
4258 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
4259
01b17894
PA
42602012-01-23 Pedro Alves <palves@redhat.com>
4261
4262 * server.c (main): Avoid yet another case of infinite loop while
4263 detaching/killing after a longjmp.
4264
e825046f
JK
42652012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4266
4267 Code cleanup.
4268 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
4269
b9e7b9c3
UW
42702012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
4271
4272 * hostio.c (handle_readlink): New function.
4273 (handle_vFile): Call it to handle "vFile:readlink" packets.
4274
901f9912
UW
42752012-01-20 Pedro Alves <palves@redhat.com>
4276 Ulrich Weigand <ulrich.weigand@linaro.org>
4277
4278 * server.c (handle_v_requests): Only support vAttach and vRun to
4279 start multiple processes when in extended protocol mode.
4280
fc1ab1a0
PA
42812012-01-17 Pedro Alves <palves@redhat.com>
4282
4283 * tracepoint.c (initialize_tracepoint): Use mmap instead of
4284 memalign plus mprotect to allocate the scratch buffer.
4285
7d5d4e98
PA
42862012-01-13 Pedro Alves <palves@redhat.com>
4287
4288 * server.c (attach_inferior): Clear `cont_thread'.
4289
f128d5e9
PA
42902012-01-13 Pedro Alves <palves@redhat.com>
4291
4292 * server.c (main): Avoid infinite loop while detaching/killing
4293 after a longjmp.
4294
06db92f0
DE
42952012-01-09 Doug Evans <dje@google.com>
4296
4297 * server.c (start_inferior): Set last_ptid in --wrapper case.
4298
32d92999
YQ
42992012-01-06 Yao Qi <yao@codesourcery.com>
4300
4301 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
4302 defined.
4303 [IN_PROCESS_AGENT] (debug_agent): New global variable.
4304
5e0a92a9
YQ
43052012-01-04 Yao Qi <yao@codesourcery.com>
4306
4307 * tracepoint.c (cmd_qtdp): Print debug message
4308 for static tracepoint.
4309
ae639e8c
YQ
43102012-01-04 Yao Qi <yao@codesourcery.com>
4311
4312 * tracepoint.c (trace_vdebug): Differentiate debug message
4313 between gdbserver and IPA.
4314
f72429c5
YQ
43152012-01-03 Yao Qi <yao@codesourcery.com>
4316
4317 * tracepoint.c (tracepoint_was_hit): Don't collect for
4318 static tracepoint.
4319
12c3e59c
JB
43202012-01-02 Joel Brobecker <brobecker@adacore.com>
4321
4322 * terminal.h: Reformat copyright header.
4323
67827812
JB
43242012-01-02 Joel Brobecker <brobecker@adacore.com>
4325
4326 * server.c (gdbserver_version): Update copyright year.
4327 * gdbreplay.c (gdbreplay_version): Likewise.
4328
3e52c33d
JK
43292011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
4330
4331 * linux-low.c (linux_create_inferior): Put empty if clause for write.
4332
4333 Revert:
4334 2011-12-18 Hui Zhu <teawater@gmail.com>
4335 * linux-low.c (linux_create_inferior): Save return value to ret.
4336
66f1260e
HZ
43372011-12-18 Hui Zhu <teawater@gmail.com>
4338
4339 * linux-low.c (linux_create_inferior): Save return value to ret.
4340
e77616d7
DE
43412011-12-16 Doug Evans <dje@google.com>
4342
e7b06c57
DE
4343 * linux-low.c (linux_create_inferior): If stdio connection,
4344 redirect stdin from /dev/null, stdout to stderr.
4345 * remote-utils.c (remote_is_stdio): New static global.
4346 (remote_connection_is_stdio): New function.
4347 (remote_prepare): Handle stdio connection.
4348 (remote_open): Ditto.
4349 (remote_close): Don't close stdin for stdio connections.
4350 (read_prim,write_prim): New functions. Replace all calls to
4351 read/write to these.
4352 * server.c (main): Watch for "-" argument. Move call to
4353 remote_prepare before start_inferior.
4354 * server.h (STDIO_CONNECTION_NAME): New macro.
4355 (remote_connection_is_stdio): Declare.
4356
e77616d7
DE
4357 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
4358 in debugging output.
4359
82067193
YQ
43602011-12-15 Yao Qi <yao@codesourcery.com>
4361
4362 * tracepoint.c: Include sys/syscall.h.
4363 (gdb_ust_thread): Remove preprocessor conditional.
4364
82bfbe7e
PA
43652011-12-14 Pedro Alves <pedro@codesourcery.com>
4366
4367 * linux-low.c (linux_detach_one_lwp): Call
4368 the_low_target.prepare_to_resume before detaching.
4369
712c6575
YQ
43702011-12-14 Yao Qi <yao@codesourcery.com>
4371
4372 * tracepoint.c (gdb_ust_thread): Don't ignore return value
4373 of write.
4374
d54d1edf
YQ
43752011-12-14 Yao Qi <yao@codesourcery.com>
4376
4377 * i386-low.c (i386_low_stopped_data_address): Initialize local
4378 variable `control'.
4379
6210a125
PA
43802011-12-13 Pedro Alves <pedro@codesourcery.com>
4381
4382 PR remote/13492
4383
4384 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
4385 DR_CONTROL unless necessary. Extend comments.
4386 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
4387 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
4388
2ece8244
YQ
43892011-12-13 Yao Qi <yao@codesourcery.com>
4390
4391 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
4392 macros.
4393 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
4394
784867a5
JK
43952011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
4396
4397 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
4398 Print new debug message for such case.
4399
6bf36717
JK
44002011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4401
4402 Fix overlapping memcpy.
4403 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
4404 the read_inferior_memory transfer.
4405 (delete_fast_tracepoint_jump): New variable buf. Use it for the
4406 write_inferior_memory transfer.
4407 (set_fast_tracepoint_jump): New variable buf. Use it for the
4408 read_inferior_memory and write_inferior_memory transfers.
4409 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
4410 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
4411 Use it for the write_inferior_memory transfer.
4412 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
4413 buffers.
4414
50275556
MR
44152011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4416
4417 * linux-low.c (fetch_register, store_register): Make code
4418 consistent, fix formatting.
4419
7325beb4
MR
44202011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4421
4422 * linux-low.c (usr_store_inferior_registers): Factor out code
4423 to handle individual registers into...
4424 (store_register): ... this new function.
4425
c642a434
UW
44262011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
4427
4428 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
4429 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
4430 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
4431 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
4432 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
4433 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
4434 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
4435 (srv_xmlfiles): Add new XML files.
4436
4437 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
4438 and <sys/uio.h>.
4439 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
4440 (init_registers_s390_linux32v1): Add prototype.
4441 (init_registers_s390_linux32v2): Likewise.
4442 (init_registers_s390_linux64v1): Likewise.
4443 (init_registers_s390_linux64v2): Likewise.
4444 (init_registers_s390x_linux64v1): Likewise.
4445 (init_registers_s390x_linux64v2): Likewise.
4446 (s390_num_regs): Increment to 52.
4447 (s390_regmap): Add orig_r2 register.
4448 (s390_num_regs_3264): Increment to 68.
4449 (s390_regmap_3264): Add orig_r2 register.
4450 (s390_collect_ptrace_register): Handle orig_r2 register.
4451 (s390_supply_ptrace_register): Likewise.
4452 (s390_fill_last_break): New function.
4453 (s390_store_last_break): Likewise.
4454 (s390_fill_system_call): New function.
4455 (s390_store_system_call): Likewise.
4456 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
4457 register sets.
4458 (s390_check_regset): New function.
4459 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
4460 NT_S390_SYSTEM_CALL regsets and use appropriate description.
4461 Update target_regsets for available register sets.
4462
2268b414
JK
44632011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
4464 Jan Kratochvil <jan.kratochvil@redhat.com>
4465
4466 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
4467 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
4468 New.
4469 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
4470 * linux-low.h (struct process_info_private): New member r_debug.
4471 * server.c (handle_qxfer_libraries): Call
4472 the_target->qxfer_libraries_svr4.
4473 (handle_qxfer_libraries_svr4): New function.
4474 (qxfer_packets): New entry "libraries-svr4".
4475 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
4476 * target.h (struct target_ops): New member qxfer_libraries_svr4.
4477 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
4478 PACKET_qXfer_libraries_svr4.
4479
d6db1fab
UW
44802011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
4481
4482 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
4483 PSW address/mask between 8-byte and 16-byte formats.
4484 (s390_supply_ptrace_register): Likewise.
4485 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
4486 basic addressing mode bit.
4487
242f5f1c
SS
44882011-11-24 Stan Shebs <stan@codesourcery.com>
4489
4490 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
4491
f196051f
SS
44922011-11-17 Stan Shebs <stan@codesourcery.com>
4493
4494 * tracepoint.c (struct tracepoint): New field traceframe_usage.
4495 (tracing_start_time): New global.
4496 (tracing_stop_time): New global.
4497 (tracing_user_name): New global.
4498 (tracing_notes): New global.
4499 (tracing_stop_note): New global.
4500 (cmd_qtstart): Set traceframe_usage, start_time.
4501 (stop_tracing): Set stop_time.
4502 (cmd_qtstatus): Report additional status.
4503 (cmd_qtp): New function.
4504 (handle_tracepoint_query): Call it.
4505 (cmd_qtnotes): New function.
4506 (handle_tracepoint_general_set): Call it.
4507 (get_timestamp): Rename from tsv_get_timestamp.
4508
405f8e94
SS
45092011-11-14 Stan Shebs <stan@codesourcery.com>
4510 Kwok Cheung Yeung <kcy@codesourcery.com>
4511
4512 * linux-x86-low.c (small_jump_insn): New.
4513 (i386_install_fast_tracepoint_jump_pad): Add arguments for
4514 trampoline and error message, build a trampoline and issue a small
4515 jump instruction to it.
4516 (x86_install_fast_tracepoint_jump_pad): Add arguments for
4517 trampoline and error message.
4518 (x86_get_min_fast_tracepoint_insn_len): New.
4519 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
4520 * linux-low.h (struct linux_target_ops): Add arguments to
4521 install_fast_tracepoint_jump_pad operation, add new operation.
4522 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
4523 arguments.
4524 (linux_get_min_fast_tracepoint_insn_len): New function.
4525 (linux_target_op): Add new operation.
4526 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
4527 (gdb_trampoline_buffer_end): Ditto.
4528 (gdb_trampoline_buffer_error): Ditto.
4529 (struct ipa_sym_addresses): Add fields for new IPA variables.
4530 (symbol_list): Add entries for new IPA variables.
4531 (struct tracepoint): Add fields to hold the address range of the
4532 trampoline used by the tracepoint.
4533 (trampoline_buffer_head): New static variable.
4534 (trampoline_buffer_tail): Ditto.
4535 (claim_trampoline_space): New function.
4536 (have_fast_tracepoint_trampoline_buffer): New function.
4537 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
4538 structure.
4539 (install_fast_tracepoint): Ditto, also add error buffer argument.
4540 (cmd_qtminftpilen): New function.
4541 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
4542 (fast_tracepoint_from_trampoline_address): New function.
4543 (fast_tracepoint_collecting): Handle trampoline as part of jump
4544 pad space.
4545 (set_trampoline_buffer_space): New function.
4546 (initialize_tracepoint): Initialize new IPA variables.
4547 * target.h (struct target_ops): Add arguments to
4548 install_fast_tracepoint_jump_pad operation, add new
4549 get_min_fast_tracepoint_insn_len operation.
4550 (target_get_min_fast_tracepoint_insn_len): New.
4551 (install_fast_tracepoint_jump_pad): Add arguments.
4552 * server.h (IPA_BUFSIZ): Define.
4553 * linux-i386-ipa.c: Include extra header files.
4554 (initialize_fast_tracepoint_trampoline_buffer): New function.
4555 (initialize_low_tracepoint): Call it.
4556 * server.h (set_trampoline_buffer_space): Declare.
4557 (claim_trampoline_space): Ditto.
4558 (have_fast_tracepoint_trampoline_buffer): Ditto.
4559
1e4d1764
YQ
45602011-11-14 Yao Qi <yao@codesourcery.com>
4561
4562 * server.c (handle_query): Handle InstallInTrace for qSupported.
4563 * tracepoint.c (add_tracepoint): Sort list.
4564 (install_tracepoint, download_tracepoint): New.
4565 (cmd_qtdp): Call them to install and download tracepoints.
4566 (sort_tracepoints): Removed.
4567 (cmd_qtstart): Update.
4568
5c73ff4e
YQ
45692011-11-14 Yao Qi <yao@codesourcery.com>
4570
4571 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
4572 * mem-break.h: Declare.
4573 * tracepoint.c (cmd_qtstart): Move some code to ...
4574 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
4575 New.
4576 (download_tracepoints): Move some code to ...
4577 (download_tracepoint_1): ... here. New.
4578
86a30030
YQ
45792011-11-08 Yao Qi <yao@codesourcery.com>
4580
4581 * remote-utils.c (relocate_instruction): A comment fix.
4582
8d26e50c
JB
45832011-11-07 Joel Brobecker <brobecker@adacore.com>
4584
4585 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
4586 (i386_dr_low_get_control, i386_dr_low_get_status): Use
4587 dr_status_mirror and dr_control_mirror from debug_reg_state.
4588 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
4589 (i386_initial_stuff): Remove use of deleted globals.
4590 (i386_get_thread_context, i386_set_thread_context,
4591 i386_thread_added): Use dr_status_mirror and dr_control_mirror
4592 from debug_reg_state.
4593
a59306a3
YQ
45942011-11-05 Yao Qi <yao@codesourcery.com>
4595
4596 * tracepoint.c (gdb_collect): Loop over tracepoints of same
4597 address as TPOINT's.
4598
3065dfb6
SS
45992011-11-02 Stan Shebs <stan@codesourcery.com>
4600
4601 * tracepoint.c (agent_mem_read_string): New function.
4602 (eval_agent_expr): Call it for tracenz.
4603 * server.c (handle_query): Report support for tracenz.
4604
fd0d8c7c
YQ
46052011-11-02 Yao Qi <yao@codesourcery.com>
4606
4607 * tracepoint.c (cmd_qtstart): Remove unused local variables.
4608
609086b1
YQ
46092011-11-02 Yao Qi <yao@codesourcery.com>
4610
4611 * target.h: Fix a typo in comment.
4612
b9fd1791
PA
46132011-10-31 Pedro Alves <pedro@codesourcery.com>
4614
4615 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
4616 clobber the breakpoints' shadows with fast tracepoint jumps.
4617 * mem-break.h (check_mem_write): Add `myaddr' parameter.
4618 * target.c (write_inferior_memory): Also pass MYADDR down to
4619 check_mem_write.
4620
03583c20
UW
46212011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
4622
4623 * configure.ac: Check support for personality routine.
4624 * configure: Regenerate.
4625 * config.in: Likewise.
4626 * linux-low.c: Include <sys/personality.h>.
4627 Define ADDR_NO_RANDOMIZE if necessary.
4628 (linux_create_inferior): Disable address space randomization when
4629 forking inferior, if requested.
4630 (linux_supports_disable_randomization): New function.
4631 (linux_target_ops): Install it.
4632 * server.h (disable_randomization): Declare.
4633 * server.c (disable_randomization): New global variable.
4634 (handle_general_set): Handle QDisableRandomization.
4635 (handle_query): Likewise for qSupported.
4636 (main): Support --disable-randomization and --no-disable-randomization
4637 command line arguments.
4638 * target.h (struct target_ops): Add supports_disable_randomization.
4639 (target_supports_disable_randomization): New macro.
4640
723b724b
MF
46412011-09-29 Mike Frysinger <vapier@gentoo.org>
4642
4643 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
4644 ifdef check.
4645 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
4646 [!PT_GETDSBT] (target_loadmap): New definition.
4647 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
4648 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
4649 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
4650 and PT_GETDSBT to LINUX_LOADMAP.
4651 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
4652 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
4653
55329a5c 46542011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
4655
4656 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
4657 (arm_linux_hwbp_cap): New static variable.
4658 (arm_linux_get_hwbp_cap): Replace by ...
4659 (arm_linux_init_hwbp_cap): ... this new function.
4660 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
4661 (arm_linux_get_hw_watchpoint_count): Likewise.
4662 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4663 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
4664 (arm_prepare_to_resume): Use perror_with_name instead of error.
4665
55329a5c 46662011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
4667
4668 * linux-arm-low.c: Include <signal.h>.
4669 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
4670 (struct arm_linux_hwbp_cap): New data type.
4671 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
4672 (struct arm_linux_hw_breakpoint): New data type.
4673 (MAX_BPTS, MAX_WPTS): Define.
4674 (struct arch_process_info, struct arch_lwp_info): New data types.
4675 (arm_linux_get_hwbp_cap): New function.
4676 (arm_linux_get_hw_breakpoint_count): Likewise.
4677 (arm_linux_get_hw_watchpoint_count): Likewise.
4678 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4679 (arm_hwbp_control_initialize): Likewise.
4680 (arm_hwbp_control_is_enabled): Likewise.
4681 (arm_hwbp_control_is_initialized): Likewise.
4682 (arm_hwbp_control_disable): Likewise.
4683 (arm_linux_hw_breakpoint_equal): Likewise.
4684 (arm_linux_hw_point_initialize): Likewise.
4685 (struct update_registers_data): New data structure.
4686 (update_registers_callback: New function.
4687 (arm_insert_point): Likewise.
4688 (arm_remove_point): Likewise.
4689 (arm_stopped_by_watchpoint): Likewise.
4690 (arm_stopped_data_address): Likewise.
4691 (arm_new_process): Likewise.
4692 (arm_new_thread): Likewise.
4693 (arm_prepare_to_resume): Likewise.
4694 (the_low_target): Register arm_insert_point, arm_remove_point,
4695 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
4696 arm_new_thread, and arm_prepare_to_resume.
4697
6b9801d4
SS
46982011-09-15 Stan Shebs <stan@codesourcery.com>
4699
4700 * server.h (struct emit_ops): Add compare-goto fields.
4701 * tracepoint.c (gdb_agent_op_sizes): New table.
4702 (emit_eq_goto): New function.
4703 (emit_ne_goto): New function.
4704 (emit_lt_goto): New function.
4705 (emit_le_goto): New function.
4706 (emit_gt_goto): New function.
4707 (emit_ge_goto): New function.
4708 (is_goto_target): New function.
4709 (compile_bytecodes): Recognize special cases of compare-goto
4710 combinations and call specialized emitters for them.
4711 * linux-x86-low.c (amd64_emit_eq_goto): New function.
4712 (amd64_emit_ne_goto): New function.
4713 (amd64_emit_lt_goto): New function.
4714 (amd64_emit_le_goto): New function.
4715 (amd64_emit_gt_goto): New function.
4716 (amd64_emit_ge_goto): New function.
4717 (amd64_emit_ops): Add the new functions.
4718 (i386_emit_eq_goto): New function.
4719 (i386_emit_ne_goto): New function.
4720 (i386_emit_lt_goto): New function.
4721 (i386_emit_le_goto): New function.
4722 (i386_emit_gt_goto): New function.
4723 (i386_emit_ge_goto): New function.
4724 (i386_emit_ops): Add the new functions.
4725
bf15cbda
SS
47262011-09-08 Stan Shebs <stan@codesourcery.com>
4727
4728 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
4729 (i386_emit_epilogue): Restore %ebx.
4730
943ca1dd
JZ
47312011-08-31 Jie Zhang <jzhang918@gmail.com>
4732
4733 * server.c (step_thread): Remove definition.
4734 (process_serial_event): Don't handle Hs.
4735 * server.h (step_thread): Remove declaration.
4736 * target.c (set_desired_inferior): Remove use of step_thread.
4737
e3deef73
LM
47382011-08-24 Luis Machado <lgustavo@codesourcery.com>
4739
4740 * linux-low.c: Include linux-procfs.h.
4741 (linux_attach_lwp_1): Update comments.
4742 (linux_attach): Scan for existing threads when attaching to a
4743 process that is the tgid.
4744 * Makefile.in: Update dependencies.
4745
13da1c97
LM
47462011-08-24 Luis Machado <lgustavo@codesourcery.com>
4747
4748 * configure.srv: Add linux-procfs.o dependencies.
4749
881127c9
YQ
47502011-08-14 Yao Qi <yao@codesourcery.com>
4751
4752 * target.h (struct target_ops): Fix indent.
4753 * win32-low.c (win32_target_ops): Fix comment.
4754
58dbd541
YQ
47552011-08-14 Andrew Jenner <andrew@codesourcery.com>
4756 Yao Qi <yao@codesourcery.com>
4757
4758 * Makefile.in (clean): Remove tic6x-*.c files.
4759 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
4760 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
4761 (tic6x-c64xp-linux.c): Likewise.
4762 * configure.srv: Add support for tic6x-*-uclinux.
4763 * linux-tic6x-low.c: New.
4764 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
4765
78d85199
YQ
47662011-08-14 Andrew Stubbs <ams@codesourcery.com>
4767 Yao Qi <yao@codesourcery.com>
4768
4769 * target.h (struct target_ops): Add read_loadmap.
4770 * linux-low.c (struct target_loadseg): New type.
4771 (struct target_loadmap): New type.
4772 (linux_read_loadmap): New function.
4773 (linux_target_ops): Add linux_read_loadmap.
4774 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
4775 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
4776 to NULL.
78d85199 4777
a959a88d
EZ
47782011-08-05 Eli Zaretskii <eliz@gnu.org>
4779
4780 * win32-low.c: Include <stdint.h>.
4781
1ced966e
PA
47822011-07-22 Pedro Alves <pedro@codesourcery.com>
4783
4784 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
4785 to the inferior here.
4786 (i386_remove_aligned_watchpoint): Ditto.
4787 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
4788 fit part of the watchpoint in the debug registers.
4789 (i386_update_inferior_debug_regs): New.
4790 (i386_low_insert_watchpoint): Work on a local mirror of the debug
4791 registers, and only update the inferior on success.
4792 (i386_low_remove_watchpoint): Ditto.
4793
d26e3629
KY
47942011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
4795
4796 * linux-low.c (compare_ints, unique, list_threads, show_process,
4797 linux_core_of_thread): Delete.
4798 (linux_target_ops): Change linux_core_of_thread to
4799 linux_common_core_of_thread.
4800 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
4801 * utils.c (malloc_failure): Change type of argument.
4802 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
4803 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
4804 common/linux-osdata.c, common/ptid.c and common/buffer.c.
4805 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
4806 (IPA_OBJS): Add common-utils-ipa.o.
4807 (ptid_h, linux_osdata_h): New macros.
4808 (server_h): Add common/common-utils.h, common/xml-utils.h,
4809 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
4810 common/ptid.h.
4811 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
4812 ptid.o, buffer.o): New rules.
4813 (linux-low.o): Add common/linux-osdata.h as a dependency.
4814 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
4815 * configure.ac: Add AC_HEADER_DIRENT check.
4816 * config.in: Regenerate.
4817 * configure: Regenerate.
4818 * remote-utils.c (xml_escape_text): Delete.
4819 (buffer_grow, buffer_free, buffer_init, buffer_finish,
4820 buffer_xml_printf): Move to common/buffer.c.
4821 * server.c (main): Remove call to initialize_inferiors.
4822 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
4823 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
4824 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
4825 internal_error, gdb_assert, gdb_assert_fail): Delete.
4826 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
4827 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
4828 common/buffer.h.
4829 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
4830 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
4831 initialize_inferiors): Delete.
4832
2275a1a7
PA
48332011-07-20 Pedro Alves <pedro@codesourcery.com>
4834
4835 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
4836 symbol error.
4837
0a5b1e09
PA
48382011-05-31 Pedro Alves <pedro@codesourcery.com>
4839
4840 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
4841 assertion.
4842 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
4843
6938fd34
YQ
48442011-05-26 Yao Qi <yao@codesourcery.com>
4845
4846 * Makefile.in (thread-db.o): Track dependence to
4847 common/gdb_thread_db.h.
4848 * thread-db.c: include gdb_thread_db.h from right place.
4849
b481f9e0
TT
48502011-05-16 Adrian Cornish <gnu@bluedreamer.com>
4851
4852 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
4853 __FILE__ and __LINE__ to internal_error.
4854
98a5dd13
DE
48552011-05-13 Doug Evans <dje@google.com>
4856
4857 * thread-db.c (try_thread_db_load_from_sdir): New function.
4858 (try_thread_db_load_from_dir): New function.
4859 (thread_db_load_search): Handle $sdir, ignore $pdir.
4860 Remove trying of system directories if search of
4861 libthread-db-search-path fails, that is now done via $sdir.
4862
d248b706
KY
48632011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
4864
4865 * server.c (handle_query): Add EnableDisableTracepoints to the list
4866 of supported features.
43aaf8b6 4867 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 4868 tracepoints.
43aaf8b6
PA
4869 (cmd_qtenable_disable): New.
4870 (cmd_qtstart): Install tracepoints even if disabled.
4871 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
4872 receiving a QTEnable or QTDisable packet.
4873 (gdb_collect): Skip data collection if fast tracepoint is disabled.
4874 (ust_marker_to_static_tracepoint): Do not ignore disabled static
4875 tracepoints.
4876 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 4877
84e578fb
DE
48782011-05-10 Doug Evans <dje@google.com>
4879
4880 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
4881
71f55dd8
DE
48822011-05-04 Doug Evans <dje@google.com>
4883
4884 * linux-low.c (linux_join): Skip process lookup.
4885 * spu-low.c (spu_join): Ditto.
4886 * server.c (join_inferiors_callback): Delete.
4887 (process_serial_event): For 'D' packet (detach) call join_inferior
4888 directly.
4889
4d393d60
JM
48902011-05-04 Joseph Myers <joseph@codesourcery.com>
4891
4892 * README: Don't mention xscale*-*-linux*.
4893 * configure.srv (xscale*-*-linux*): Don't handle target.
4894
b00ad6ff
NF
48952011-04-27 Nathan Froyd <froydnj@codesourcery.com>
4896
4897 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
4898 casting pointers.
4899 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
4900 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
4901 (i386_emit_void_call_2): Likewise.
4902
af96c192
YQ
49032011-04-26 Yao Qi <yao@codesourcery.com>
4904
43aaf8b6
PA
4905 * linux-low.c: Move common macros to linux-ptrace.h.
4906 Include linux-ptrace.h.
af96c192
YQ
4907 * Makefile.in (linux_ptrace_h): New.
4908 (linux-low.o): Depends on linux-ptrace.h.
4909
03f2bd59
JK
49102011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
4911
4912 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
4913 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
4914 (remote_prepare): New function with most of the TCP code from ...
4915 (remote_open): ... here. Detect PORT here unconditionally. Move also
4916 setting transport_is_reliable.
4917 * server.c (run_once): New variable.
4918 (gdbserver_usage): Document it.
4919 (main): Set run_once for `--once'. Call remote_prepare. Exit after
4920 the first run if RUN_ONCE.
4921 * server.h (run_once, remote_prepare): New declarations.
4922
7a9dd1b2
TT
49232011-04-19 Tom Tromey <tromey@redhat.com>
4924
4925 * win32-low.c (handle_load_dll): Remove duplicate "the".
4926
81239425
PM
49272011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
4928
4929 Remove support for old Cygwin 1.5 versions.
4930 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
4931 function to avoid warning.
4932 (win32_add_one_solib): Use cygwin_conv_path function to avoid
4933 warning.
4934
9e0627f1
PM
49352011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
4936
4937 * gdbserver/server.h (Macro _): Define it if not available.
4938
588eebee
MS
49392011-03-14 Michael Snyder <msnyder@vmware.com>
4940
348af9f7 4941 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 4942
43f70d4c
JB
49432011-03-10 Joel Brobecker <brobecker@adacore.com>
4944
4945 * Makefile.in (maintainer-clean realclean distclean): Remove
4946 "make ... subdir_do" command.
4947
348af9f7
MS
49482011-03-10 Michael Snyder <msnyder@vmware.com>
4949
4950 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
4951
4952 * server.c (handle_v_run): Free alloced buffer on early return.
4953
e637a4f5
YQ
49542011-03-09 Yao Qi <yao@codesourcery.com>
4955
4956 Revert:
4957 2011-03-04 Yao Qi <yao@codesourcery.com>
4958
4959 * Makefile.in: Remove GNU make feature --directory.
4960
4961 2011-03-05 Yao Qi <yao@codesourcery.com>
4962
4963 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
4964 (subdir_do): New make target. Copied from gdb/Makefile.
4965 (maintainer-clean, realclean, distclean, clean): Call corresponding
4966 make targets in common/Makefile.
4967
4968 2011-02-11 Yao Qi <yao@codesourcery.com>
4969
4970 * configure.ac: Call AC_PROG_RANLIB.
4971 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
4972 * configure: Regenerate.
4973
e6edda56
JK
49742011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4975
4976 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
4977
e5141119
JB
49782011-03-06 Yao Qi <yao@codesourcery.com>
4979
4980 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
4981
64794aa4
JB
49822011-03-05 Yao Qi <yao@codesourcery.com>
4983
4984 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
4985 (subdir_do): New make target. Copied from gdb/Makefile.
4986 (maintainer-clean, realclean, distclean, clean): Call corresponding
4987 make targets in common/Makefile.
4988
7a762829
YQ
49892011-03-04 Yao Qi <yao@codesourcery.com>
4990
4991 * Makefile.in: Remove GNU make feature --directory.
4992
348af9f7
MS
49932011-03-04 Michael Snyder <msnyder@vmware.com>
4994
4995 * server.c (queue_stop_reply): Call xmalloc not malloc.
4996
49972011-03-02 Michael Snyder <msnyder@vmware.com>
4998
4999 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5000
9f72fee2
MS
50012011-02-28 Michael Snyder <msnyder@vmware.com>
5002
588eebee
MS
5003 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5004 (cmd_qtframe): Ditto.
5005 (cmd_qtbuffer): Ditto.
5006 (cmd_bigqtbuffer): Ditto.
5007
9f72fee2
MS
5008 * utils.c (decimal2str): Initialize 'width' to nine, then
5009 don't mess with it.
5010
8040bd49
UW
50112011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5012
5013 * hostio.c (require_data): Free *data, not data.
5014
7e52cbd0
JK
50152011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5016
5017 * hostio.c (require_data): Use free, not xfree.
5018
9130f83e
MS
50192011-02-27 Michael Snyder <msnyder@vmware.com>
5020
4b812f4e
MS
5021 * server.c (handle_query): Discard unused value.
5022
9130f83e
MS
5023 * hostio.c (require_data): Free malloc memory before returning
5024 error.
5025
69d37113
MS
50262011-02-26 Michael Snyder <msnyder@vmware.com>
5027
5028 * linux-low.c (list_threads): Call closedir for dirent.
5029
35f5825a
MS
50302011-02-27 Michael Snyder <msnyder@vmware.com>
5031
2a589cef
MS
5032 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5033 a case statement falls through.
5034
0adea5f7
MS
5035 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5036
35f5825a
MS
5037 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
5038 in comparison.
5039
238f1c74
MS
50402011-02-26 Michael Snyder <msnyder@vmware.com>
5041
5042 * utils.c (decimal2str): Eliminate dead code and dead param.
5043 (pulongest): Drop dead param from call to decimal2str.
5044 (plongest): Ditto.
5045
633ff500
JB
50462011-02-24 Joel Brobecker <brobecker@adacore.com>
5047
5048 Revert the following patch (not approved yet):
5049 2011-02-21 Hui Zhu <teawater@gmail.com>
5050 * tracepoint.c (tp_printf): New function.
5051 (eval_agent_expr): Handle gdb_agent_op_printf.
5052
f9c6ff72
HZ
50532011-02-21 Hui Zhu <teawater@gmail.com>
5054
5055 * tracepoint.c (tp_printf): New function.
5056 (eval_agent_expr): Handle gdb_agent_op_printf.
5057
94d5e490
TT
50582011-02-18 Tom Tromey <tromey@redhat.com>
5059
5060 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5061 (tracepoint.o): Likewise.
5062 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5063 (gdb_agent_op_names): Likewise.
5064
c7f96d2b
TT
50652011-02-18 Tom Tromey <tromey@redhat.com>
5066
5067 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5068 gdb_agent_op_rot>: New constants.
5069 (gdb_agent_op_names): Add pick and roll.
5070 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5071 cases.
5072
0feedb2c
JK
50732011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5074
5075 * aclocal.m4: Regenerated with aclocal-1.11.1.
5076
b3b9301e
PA
50772011-02-14 Pedro Alves <pedro@codesourcery.com>
5078
5079 * server.c (handle_qxfer_traceframe_info): New.
5080 (qxfer_packets): Register "traceframe-info".
5081 (handle_query): Report support for qXfer:traceframe-info:read+.
5082 * tracepoint.c (match_blocktype): New.
5083 (traceframe_find_block_type): Rename to ...
5084 (traceframe_walk_blocks): ... this. Add callback filter argument,
5085 and use it.
5086 (traceframe_find_block_type): New, reimplemented on top of
5087 traceframe_walk_blocks.
5088 (build_traceframe_info_xml): New.
5089 (traceframe_read_info): New.
5090 * server.h (traceframe_read_info): Declare.
5091
4f3e6fb7
YQ
50922011-02-11 Yao Qi <yao@codesourcery.com>
5093
5094 * configure.ac: Call AC_PROG_RANLIB.
5095 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5096 * configure: Regenerate.
5097
764880b7
PA
50982011-02-07 Pedro Alves <pedro@codesourcery.com>
5099
5100 * server.c (gdb_read_memory): Change return semantics to allow
5101 partial transfers.
5102 (handle_search_memory_1): Adjust.
5103 (process_serial_event) <'m' packet>: Handle partial transfers.
5104 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5105
1c79eb8a
PA
51062011-01-28 Pedro Alves <pedro@codesourcery.com>
5107
5108 * regcache.c (init_register_cache): Initialize
5109 regcache->register_status.
5110 (free_register_cache): Release regcache->register_status.
5111 (regcache_cpy): Copy register_status.
5112 (registers_to_string): Print 'x's for unavailable registers.
5113 (supply_register): Mark the register's status valid or
5114 unavailable, depending on whether a buffer was passed in or not.
5115 (supply_register_zeroed): New.
5116 (supply_regblock): Mark the registers' status valid or
5117 unavailable, depending on whether a buffer was passed in or not.
5118 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5119 (struct regcache): New `register_status' field.
5120 (supply_register_zeroed): Declare.
5121 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5122 supply_register_zeroed, rather than passing a NULL buffer to
5123 supply_register.
5124 * tracepoint.c (fetch_traceframe_registers): Update comment.
5125
85724a0e
PA
51262011-01-28 Pedro Alves <pedro@codesourcery.com>
5127
5128 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
5129 buffer explicit.
5130
d08aafef
PA
51312011-01-25 Pedro Alves <pedro@codesourcery.com>
5132
5133 * server.h (decode_xfer_write): Change prototype.
5134 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
5135 and don't extract the annex here.
5136 * server.c (decode_xfer_read): Remove `annex' parameter,
5137 and don't extract the annex here.
5138 (decode_xfer): New.
5139 (struct qxfer): New.
5140 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
5141 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
5142 (handle_qxfer_statictrace): New functions, abstracted out from
5143 handle_query, and made to use the struct qxfer interface.
5144 (handle_threads_qxfer_proper): Rename to ...
5145 (handle_qxfer_threads_proper): ... this.
5146 (handle_threads_qxfer): Rename to ...
5147 (handle_qxfer_threads): ... this. Adjust.
5148 (qxfer_packets): New array.
5149 (handle_qxfer): New function.
5150 (handle_query): Use handle_qxfer.
5151
493e2a69
MS
51522011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
5153
5154 * gdbreplay.c: Shorten lines of >= 80 columns.
5155 * linux-low.c: Ditto.
5156 * linux-ppc-low.c: Ditto.
5157 * linux-s390-low.c: Ditto.
5158 * linux-sparc-low.c: Ditto.
5159 * linux-x86-low.c: Ditto.
5160 * linux-xtensa-low.c: Ditto.
5161 * mem-break.c: Ditto.
5162 * nto-low.c: Ditto.
5163 * regcache.h: Ditto.
5164 * remote-utils.c: Ditto.
5165 * server.c: Ditto.
5166 * server.h: Ditto.
5167 * thread-db.c: Ditto.
5168 * tracepoint.c: Ditto.
5169 * utils.c: Ditto.
5170 * win32-low.h: Ditto.
5171
44944448
JB
51722011-01-05 Joel Brobecker <brobecker@adacore.com>
5173
5174 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
5175 update.
5176
71ce852c
JB
51772011-01-01 Joel Brobecker <brobecker@adacore.com>
5178
5179 * server.c (gdbserver_version): Update copyright year in version
5180 output.
5181 * gdbreplay.c (gdbreplay_version): Ditto.
5182
eb826dc6
MF
51832010-12-29 Jie Zhang <jie.zhang@analog.com>
5184
5185 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
5186 * linux-bfin-low.c: New file.
5187 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
5188 PT_DATA_ADDR for BFIN targets.
5189 * Makefile.in (SFILES): Add linux-bfin-low.c.
5190 (clean): Remove reg-bfin.c.
5191 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
5192 * README: Mention supported Blackfin targets.
5193
39ab222a
MF
51942010-12-23 Mike Frysinger <vapier@gentoo.org>
5195
5196 * .gitignore: New file.
5197
a1f2ce7d
MF
51982010-11-16 Mike Frysinger <vapier@gentoo.org>
5199
5200 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
5201
f474844c
JZ
52022010-10-22 Jie Zhang <jie@codesourcery.com>
5203
5204 * Makefile.in: Add FLAGS_TO_PASS variable.
5205 (install): Remove dependency of install-only and recursively
5206 invoke make for install-only.
5207
f1048712
DE
52082010-10-04 Doug Evans <dje@google.com>
5209
5210 * Makefile.in (uninstall): Use $(DESTDIR).
5211
b53a1623
PA
52122010-09-24 Pedro Alves <pedro@codesourcery.com>
5213
e6ee044d
PA
5214 PR gdb/11842
5215
b53a1623
PA
5216 * linux-x86-low.c (compat_siginfo_from_siginfo)
5217 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
5218 si_code is < 0. Check for si_code == SI_TIMER before checking for
5219 si_code < 0.
5220
fa1bd1e4
JB
52212010-09-13 Joel Brobecker <brobecker@adacore.com>
5222
5223 * lynx-i386-low.c: New file.
5224 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
5225
47fac8f8
JB
52262010-09-13 Joel Brobecker <brobecker@adacore.com>
5227
5228 * lynx-low.c (ptrace_request_to_str): Remove handling for
5229 request values that have been removed in LynxOS 5.x.
5230
1adfc54d
JB
52312010-09-13 Joel Brobecker <brobecker@adacore.com>
5232
5233 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
5234 <ptrace.h>
5235
c2a66c29
NS
52362010-09-09 Nathan Sidwell <nathan@codesourcery.com>
5237
5238 * configure.ac: Add --enable-inprocess-agent option.
5239 * configure: Rebuilt.
5240
32fcada3
YQ
52412010-09-06 Yao Qi <yao@codesourcery.com>
5242
5243 * linux-low.c (linux_kill): Remove unused variable.
5244 (linux_stabilize_threads): Likewise.
5245 * server.c (start_inferior): Likewise.
5246 (queue_stop_reply_callback): Likewise.
5247 * tracepoint.c (do_action_at_tracepoint): Likewise.
5248
0cccb683
YQ
52492010-09-06 Yao Qi <yao@codesourcery.com>
5250
5251 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
5252 on return.
5253
423ec54c
JK
52542010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5255
5256 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
5257
12ac6819
PA
52582010-09-06 Pedro Alves <pedro@codesourcery.com>
5259
5260 * Makefile.in (install-only): Replace $IPA_DEPFILES with
5261 "$(IPA_DEPFILES)".
5262
8ed54b31
JB
52632010-09-01 Joel Brobecker <brobecker@adacore.com>
5264
5265 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
5266 gdbserver/lynx-ppc-low.c: New files.
5267 * Makefile.in (lynx_low_h): New variable.
5268 (lynx-low.o, lynx-ppc-low.o): New rules.
5269 * configure.ac: On LynxOS, link with -lnetinet.
5270 * configure.srv: Add handling of powerpc-*-lynxos* targets.
5271 * configure: regenerate.
5272
bb0116a4
JB
52732010-09-01 Joel Brobecker <brobecker@adacore.com>
5274
5275 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
5276 * configure.ac: Add check for vasprintf and vsnprintf.
5277 * configure, config.in: Regenerate.
5278 * server.h (vasprintf, vsnprintf): Add conditional declarations.
5279
a778ab81 52802010-09-01 Joel Brobecker <brobecker@adacore.com>
5281
5282 * gdbreplay.c: Move include of alloca.h up, next to include of
5283 malloc.h.
5284 * server.h: Add include of malloc.h.
5285 * mem-break.c: Remove include of malloc.h.
5286 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
5287
8b034a19 52882010-09-01 Joel Brobecker <brobecker@adacore.com>
5289
5290 * Makefile.in (memmem.o): Build with -Wno-error.
5291
52922010-09-01 Joel Brobecker <brobecker@adacore.com>
5293
5294 * utils.c (xsnprintf): Make non-static.
5295 * server.h: Add xsnprintf declaration.
5296 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
5297 replace calls to snprintf by calls to xsnprintf throughout.
5298
52992010-09-01 Joel Brobecker <brobecker@adacore.com>
5300
5301 * configure.ac: Add configure check for alloca.
5302 * configure, config.in: Regenerate.
5303 * server.h: Include alloca.h if it exists.
5304 * gdbreplay.c: Include alloca.h if it exists.
5305
1a981360
PA
53062010-08-28 Pedro Alves <pedro@codesourcery.com>
5307
5308 * linux-low.c (__SIGRTMIN): Define if not already defined.
5309 (linux_create_inferior): Check for __ANDROID__ rather than
5310 __SIGRTMIN.
5311 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
5312 are already deferred.
5313 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
5314 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
5315 stopped and already has a pending signal to report.
5316 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
5317 a pending signal to report or is moving out of a jump pad.
5318 (linux_init_signals): Check for __ANDROID__ rather than
5319 __SIGRTMIN.
5320
b4d51a55
PA
53212010-08-28 Pedro Alves <pedro@codesourcery.com>
5322
5323 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
5324 debug_threads check. Avoid a linear search when not doing debug
5325 output.
5326
ec48365d
PA
53272010-08-27 Pedro Alves <pedro@codesourcery.com>
5328
5329 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
5330 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
5331 (struct file_handler) <fd>: Change type to gdb_fildes_t.
5332 (process_event): Change local fd's type to gdb_fildes_t.
5333 (create_file_handler): Adjust prototype.
5334 (delete_file_handler): Adjust prototype.
5335 (handle_file_event): Adjust prototype. Use pfildes.
5336 (create_file_event): Adjsut prototype.
5337 * remote-utils.c (remote_desc, listen_desc): Change type to
5338 gdb_fildes_t.
5339 * server.h: New gdb_fildes_t typedef.
5340 [USE_WIN32API]: Include winsock2.h.
5341 (delete_file_handler, add_file_handler): Adjust prototypes.
5342 (pfildes): Declare.
5343 * utils.c (pfildes): New.
5344
854d88f0
PA
53452010-08-27 Pedro Alves <pedro@codesourcery.com>
5346
5347 * configure.ac (build_warnings): Add -Wno-char-subscripts.
5348 * configure: Regenerate.
5349
0146f85b
PA
53502010-08-27 Pedro Alves <pedro@codesourcery.com>
5351
5352 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
5353 (linux_done_accessing_memory): ... this.
5354 (linux_target_ops): Adjust.
5355 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
5356 * nto-low.c (nto_target_ops): Adjust comment.
5357 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
5358 * spu-low.c (spu_target_ops): Adjust comment.
5359 * target.h (target_ops): Rename unprepare_to_access_memory field
5360 to done_accessing_memory.
5361 (unprepare_to_access_memory): Rename to ...
5362 (done_accessing_memory): ... this.
5363
90d74c30
PA
53642010-08-26 Pedro Alves <pedro@codesourcery.com>
5365
5366 * linux-low.c (linux_prepare_to_access_memory): New.
5367 (linux_unprepare_to_access_memory): New.
5368 (linux_target_ops): Install them.
5369 * server.c (read_memory): Rename to ...
5370 (gdb_read_memory): ... this. Use
5371 prepare_to_access_memory/prepare_to_access_memory.
5372 (write_memory): Rename to ...
5373 (gdb_write_memory): ... this. Use
5374 prepare_to_access_memory/prepare_to_access_memory.
5375 (handle_search_memory_1): Adjust.
5376 (process_serial_event): Adjust.
5377 * target.h (struct target_ops): New fields
5378 prepare_to_access_memory and unprepare_to_access_memory.
5379 (prepare_to_access_memory, unprepare_to_access_memory): New.
5380 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
5381 prepare_to_access_memory/prepare_to_access_memory.
5382 * nto-low.c (nto_target_ops): Adjust.
5383 * spu-low.c (spu_target_ops): Adjust.
5384 * win32-low.c (win32_target_ops): Adjust.
5385
fd467969
PA
53862010-08-26 Pedro Alves <pedro@codesourcery.com>
5387
5388 * Makefile.in (WARN_CFLAGS): Get it from configure.
5389 (WERROR_CFLAGS): New.
5390 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
5391 * configure.ac: Introduce --enable-werror, which adds -Werror to
5392 the compiler command line. Enabled by default. Disable with
5393 --disable-werror. Add -Wdeclaration-after-statement
5394 Wpointer-arith and -Wformat-nonliteral to warning flags.
5395 * configure: Regenerate.
5396
331e2f5f
PA
53972010-08-26 Pedro Alves <pedro@codesourcery.com>
5398
5399 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
5400
e581f2b4
PA
54012010-08-26 Pedro Alves <pedro@codesourcery.com>
5402
5403 * gdbreplay.c (remote_error): New.
5404 (gdbchar): New.
5405 (expect): Use gdbchar. Check for error reading from GDB.
5406 Clarify sync error output.
5407 (play): Check for errors writing to GDB.
5408 * linux-low.c (sigchld_handler): Really ignore `write' errors.
5409 * remote-utils.c (getpkt): Check for errors writing to the remote
5410 descriptor.
5411
3c11dd79
PA
54122010-08-25 Pedro Alves <pedro@codesourcery.com>
5413
5414 * linux-low.c (linux_wait_1): Move non-debugging code out of
5415 `debug_threads' control.
5416
d20a8ad9
PA
54172010-08-25 Pedro Alves <pedro@codesourcery.com>
5418
5419 * linux-low.c (linux_wait_1): Don't set last_status here.
5420 * server.c (push_event, queue_stop_reply_callback): Assert we're
5421 not pushing a TARGET_WAITKIND_IGNORE event.
5422 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
5423 (myresume, handle_target_event): Set the thread's last_resume_kind
5424 and last_status from the target returned status.
5425
964e4306
PA
54262010-08-25 Pedro Alves <pedro@codesourcery.com>
5427
5428 PR threads/10729
5429
5430 * linux-x86-low.c (update_debug_registers_callback): New.
5431 (i386_dr_low_set_addr): Use it.
5432 (i386_dr_low_get_addr): New.
5433 (i386_dr_low_set_control): Use update_debug_registers_callback.
5434 (i386_dr_low_get_control): New.
5435 (i386_dr_low_get_status): Adjust.
5436 * linux-low.c (linux_stop_lwp): New.
5437 * linux-low.h (linux_stop_lwp): Declare.
5438
5439 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
5440 argument instead of a i386_debug_reg_state.
5441 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
5442 a i386_debug_reg_state.
5443 (i386_insert_aligned_watchpoint): Adjust.
5444 (i386_remove_aligned_watchpoint): Adjust.
5445 (i386_low_stopped_data_address): Read the debug registers from the
5446 inferior instead of from the mirrors.
5447 * i386-low.h (struct i386_debug_reg_state): Extend comment.
5448 (i386_dr_low_get_addr): Declare.
5449 (i386_dr_low_get_control): Declare.
5450 (i386_dr_low_get_status): Change prototype.
5451
5452 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
5453 (i386_dr_low_get_addr): New.
5454 (i386_dr_low_get_control): New.
5455 (i386_dr_low_get_status): Adjust prototype. Return
5456 dr_status_mirror.
5457 (i386_initial_stuff): Clear dr_status_mirror and
5458 dr_control_mirror.
5459 (i386_get_thread_context): Adjust.
5460 (i386_set_thread_context): Adjust.
5461 (i386_thread_added): Adjust.
5462
5f21a75b
PA
54632010-08-24 Pedro Alves <pedro@codesourcery.com>
5464
5465 * linux-low.h (linux_thread_area): Delete declaration.
5466
3e4c1235
TS
54672010-08-11 Thomas Schwinge <thomas@codesourcery.com>
5468
5469 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
5470 after its termination.
5471
1971b033
PA
54722010-08-09 Pedro Alves <pedro@codesourcery.com>
5473
5474 * linux-low.c (gdb_wants_lwp_stopped): Delete.
5475 (gdb_wants_all_stopped): Delete.
5476 (linux_wait_1): Don't call them.
5477 * server.c (handle_v_cont): Tag all threads as want-stopped.
5478 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
5479 stopped as "client-wants-stopped".
5480
310444ac
PA
54812010-07-31 Pedro Alves <pedro@codesourcery.com>
5482
5483 * Makefile.in (signals_h): New.
5484 (server_h): Depend on it.
5485 (server.o): Don't depend on $(signals_def).
5486 (signals.o): Depend on $(signals_def).
5487
a19cae16
JK
54882010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
5489
5490 * Makefile.in (signals_def): New.
5491 (server_h): Append include/gdb/signals.h and signals_def.
5492 (server.o): Append signals_def.
5493
30d50328
JK
54942010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5495
5496 * server.c (handle_target_event): Use target_signal_to_host for
5497 resume_info.sig initialization.
5498 * target.h (struct thread_resume) <sig>: New comment.
5499
5c3216e2
OS
55002010-07-20 Ozkan Sezer <sezeroz@gmail.com>
5501
c6f46ca0
OS
5502 * server.c (handle_query): strcpy() the returned string from paddress()
5503 instead of sprintf().
5c3216e2
OS
5504 * utils.c (paddress): Return phex_nz().
5505
6bd31874
JB
55062010-07-07 Joel Brobecker <brobecker@adacore.com>
5507
5508 * server.c (handle_v_cont): Call mourn_inferior if process
5509 just exited.
5510 (myresume): Likewise.
5511
0fb4aa4b
PA
55122010-07-01 Pedro Alves <pedro@codesourcery.com>
5513
5514 Static tracepoints, and integration with UST.
5515
5516 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
5517 * mem-break.c (uninsert_all_breakpoints)
5518 (reinsert_all_breakpoints): New.
5519 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
5520 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
5521 (gdb_agent_ust_loaded, helper_thread_id)
5522 (gdb_agent_helper_thread_id): New macros.
5523 (struct ipa_sym_addresses): Add addr_ust_loaded,
5524 addr_helper_thread_id, addr_cmd_buf.
5525 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
5526 (in_process_agent_loaded_ust): New.
5527 (write_e_ust_not_loaded): New.
5528 (maybe_write_ipa_ust_not_loaded): New.
5529 (struct collect_static_trace_data_action): New.
5530 (enum tracepoint_type) <static_tracepoint>: New.
5531 (struct tracepoint) <handle>: Mention static tracepoints.
5532 (struct static_tracepoint_ctx): New.
5533 (CMD_BUF_SIZE): New.
5534 (add_tracepoint_action): Handle static tracepoint actions.
5535 (unprobe_marker_at): New.
5536 (clear_installed_tracepoints): Handle static tracepoints.
5537 (cmd_qtdp): Handle static tracepoints.
5538 (probe_marker_at): New.
5539 (cmd_qtstart): Handle static tracepoints.
5540 (response_tracepoint): Handle static tracepoints.
5541 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
5542 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
5543 (get_context_regcache): Handle static tracepoints.
5544 (do_action_at_tracepoint): Handle static tracepoint actions.
5545 (traceframe_find_block_type): Handle static trace data blocks.
5546 (traceframe_read_sdata): New.
5547 (download_tracepoints): Download static tracepoint actions.
5548 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
5549 (GDB_PROBE_NAME): New.
5550 (ust_ops): New.
5551 (GET_UST_SYM): New.
5552 (USTF): New.
5553 (dlsym_ust): New.
5554 (ust_marker_to_static_tracepoint): New.
5555 (gdb_probe): New.
5556 (collect_ust_data_at_tracepoint): New.
5557 (gdb_ust_probe): New.
5558 (UNIX_PATH_MAX, SOCK_DIR): New.
5559 (gdb_ust_connect_sync_socket): New.
5560 (resume_thread, stop_thread): New.
5561 (run_inferior_command): New.
5562 (init_named_socket): New.
5563 (gdb_ust_socket_init): New.
5564 (cstr_to_hexstr): New.
5565 (next_st): New.
5566 (first_marker, next_marker): New.
5567 (response_ust_marker): New.
5568 (cmd_qtfstm, cmd_qtsstm): New.
5569 (unprobe_marker_at, probe_marker_at): New.
5570 (cmd_qtstmat, gdb_ust_thread): New.
5571 (gdb_ust_init): New.
5572 (initialize_tracepoint_ftlib): Call gdb_ust_init.
5573 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
5574 (ST_REGENTRY): New.
5575 (x86_64_st_collect_regmap): New.
5576 (X86_64_NUM_ST_COLLECT_GREGS): New.
5577 (AMD64_RIP_REGNUM): New.
5578 (supply_static_tracepoint_registers): New.
5579 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
5580 (ST_REGENTRY): New.
5581 (i386_st_collect_regmap): New.
5582 (i386_NUM_ST_COLLECT_GREGS): New.
5583 (supply_static_tracepoint_registers): New.
5584 * server.c (handle_query): Handle qXfer:statictrace:read.
5585 <qSupported>: Report support for StaticTracepoints, and
5586 qXfer:statictrace:read features.
5587 * server.h (traceframe_read_sdata)
5588 (supply_static_tracepoint_registers): Declare.
5589 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
5590 (unpack_varlen_hex): Include in IPA build.
5591 * Makefile.in (ustlibs, ustinc): New.
5592 (IPA_OBJS): Add remote-utils-ipa.o.
5593 ($(IPA_LIB)): Link -ldl and -lpthread.
5594 (UST_CFLAGS): New.
5595 (IPAGENT_CFLAGS): Add UST_CFLAGS.
5596 * config.in, configure: Regenerate.
5597
9e4344e5
PA
55982010-06-20 Ian Lance Taylor <iant@google.com>
5599 Pedro Alves <pedro@codesourcery.com>
5600
5601 * linux-x86-low.c (always_true): Delete.
5602 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
5603 trying to fool the compiler with always_true.
5604
c6beb2cb
PA
56052010-06-20 Pedro Alves <pedro@codesourcery.com>
5606
5607 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
5608 conditions in gdbserver.
5609
d2ed6730
UW
56102010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
5611
5612 * spu-low.c (spu_read_memory): Wrap around local store limit.
5613 (spu_write_memory): Likewise.
5614
4e29fb54
PA
56152010-06-15 Pedro Alves <pedro@codesourcery.com>
5616
5617 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
5618 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
5619 LONGEST uses.
5620 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
5621 uses.
5622 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
5623 uses with LONGEST uses.
5624
6a271cae
PA
56252010-06-14 Stan Shebs <stan@codesourcery.com>
5626 Pedro Alves <pedro@codesourcery.com>
5627
5628 Bytecode compiler.
5629
5630 * linux-x86-low.c: Include limits.h.
5631 (add_insns): New.
5632 (always_true): New.
5633 (EMIT_ASM): New.
5634 (EMIT_ASM32): New.
5635 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
5636 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
5637 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
5638 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
5639 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
5640 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
5641 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
5642 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
5643 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
5644 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
5645 (amd64_emit_void_call_2): New.
5646 (amd64_emit_ops): New.
5647 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
5648 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
5649 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
5650 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
5651 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
5652 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
5653 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
5654 (i386_emit_call, i386_emit_reg, i386_emit_pop)
5655 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
5656 (i386_emit_stack_adjust, i386_emit_int_call_1)
5657 (i386_emit_void_call_2): New.
5658 (i386_emit_ops): New.
5659 (x86_emit_ops): New.
5660 (the_low_target): Install x86_emit_ops.
5661 * server.h (struct emit_ops): New.
5662 (get_raw_reg_func_addr): Declare.
5663 (current_insn_ptr, emit_error): Declare.
5664 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
5665 (set_trace_state_variable_value): New defines.
5666 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
5667 addr_get_trace_state_variable_value and
5668 addr_set_trace_state_variable_value.
5669 (symbol_list): New fields for get_raw_reg,
5670 get_trace_state_variable_value and set_trace_state_variable_value.
5671 (condfn): New typedef.
5672 (struct tracepoint): New field `compiled_cond'.
5673 (do_action_at_tracepoint): Clear compiled_cond.
5674 (get_trace_state_variable_value, set_trace_state_variable_value):
5675 Export in the IPA.
5676 (condition_true_at_tracepoint): If there's a compiled condition,
5677 run that.
5678 (current_insn_ptr, emit_error): New globals.
5679 (struct bytecode_address): New.
5680 (get_raw_reg_func_addr): New.
5681 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
5682 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
5683 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
5684 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
5685 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
5686 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
5687 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
5688 (compile_tracepoint_condition, compile_bytecodes): New.
5689 * target.h (emit_ops): Forward declare.
5690 (struct target_ops): New field emit_ops.
5691 (target_emit_ops): New.
5692 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
5693 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
5694 * linux-low.c (linux_emit_ops): New.
5695 (linux_target_ops): Install it.
5696 * linux-low.h (struct linux_target_ops): New field emit_ops.
5697
92b72907
UW
56982010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
5699
5700 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
5701 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
5702
fa593d66
PA
57032010-06-01 Pedro Alves <pedro@codesourcery.com>
5704 Stan Shebs <stan@codesourcery.com>
5705
5706 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
5707 (all): Depend on $(extra_libraries).
5708 (install-only): Install the IPA.
5709 (IPA_OBJS, IPA_LIB): New.
5710 (clean): Remove the IPA lib.
5711 (IPAGENT_CFLAGS): New.
5712 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
5713 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
5714 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
5715 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
5716 * configure.ac: Check for atomic builtins support in the compiler.
5717 (IPA_DEPFILES, extra_libraries): Define.
5718 * configure.srv (ipa_obj): Add description.
5719 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
5720 (i[34567]86-*-linux*): Set ipa_obj.
5721 (x86_64-*-linux*): Set ipa_obj.
5722 * linux-low.c (stabilizing_threads): New.
5723 (supports_fast_tracepoints): New.
5724 (linux_detach): Stabilize threads before detaching.
5725 (handle_tracepoints): Handle internal tracing breakpoints. Assert
5726 the lwp is either not stabilizing, or is moving out of a jump pad.
5727 (linux_fast_tracepoint_collecting): New.
5728 (maybe_move_out_of_jump_pad): New.
5729 (enqueue_one_deferred_signal): New.
5730 (dequeue_one_deferred_signal): New.
5731 (linux_wait_for_event_1): If moving out of a jump pad, defer
5732 pending signals to later.
5733 (linux_stabilize_threads): New.
5734 (linux_wait_1): Check if threads need moving out of jump pads, and
5735 do it if so.
5736 (stuck_in_jump_pad_callback): New.
5737 (move_out_of_jump_pad_callback): New.
5738 (lwp_running): New.
5739 (linux_resume_one_lwp): Handle moving out of jump pads.
5740 (linux_set_resume_request): Dequeue deferred signals.
5741 (need_step_over_p): Also step over fast tracepoint jumps.
5742 (start_step_over): Also uninsert fast tracepoint jumps.
5743 (finish_step_over): Also reinsert fast tracepoint jumps.
5744 (linux_install_fast_tracepoint_jump): New.
5745 (linux_target_ops): Install linux_stabilize_threads and
5746 linux_install_fast_tracepoint_jump_pad.
5747 * linux-low.h (linux_target_ops) <get_thread_area,
5748 install_fast_tracepoint_jump_pad>: New fields.
5749 (struct lwp_info) <collecting_fast_tracepoint,
5750 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
5751 (linux_get_thread_area): Declare.
5752 * linux-x86-low.c (jump_insn): New.
5753 (x86_get_thread_area): New.
5754 (append_insns): New.
5755 (push_opcode): New.
5756 (amd64_install_fast_tracepoint_jump_pad): New.
5757 (i386_install_fast_tracepoint_jump_pad): New.
5758 (x86_install_fast_tracepoint_jump_pad): New.
5759 (the_low_target): Install x86_get_thread_area and
5760 x86_install_fast_tracepoint_jump_pad.
5761 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
5762 (struct fast_tracepoint_jump): New.
5763 (fast_tracepoint_jump_insn): New.
5764 (fast_tracepoint_jump_shadow): New.
5765 (find_fast_tracepoint_jump_at): New.
5766 (fast_tracepoint_jump_here): New.
5767 (delete_fast_tracepoint_jump): New.
5768 (set_fast_tracepoint_jump): New.
5769 (uninsert_fast_tracepoint_jumps_at): New.
5770 (reinsert_fast_tracepoint_jumps_at): New.
5771 (set_breakpoint_at): Use write_inferior_memory.
5772 (uninsert_raw_breakpoint): Use write_inferior_memory.
5773 (check_mem_read): Mask out fast tracepoint jumps.
5774 (check_mem_write): Mask out fast tracepoint jumps.
5775 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
5776 (set_fast_tracepoint_jump): Declare.
5777 (delete_fast_tracepoint_jump)
5778 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
5779 (reinsert_fast_tracepoint_jumps_at): Declare.
5780 * regcache.c: Don't compile many functions when building the
5781 in-process agent library.
5782 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
5783 the register buffer in the heap.
5784 (free_register_cache): If the register buffer isn't owned by the
5785 regcache, don't free it.
5786 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
5787 pre-existing register caches.
5788 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
5789 type.
5790 (convert_ascii_to_int): : Constify `from' parameter type.
5791 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
5792 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
5793 the needed buffer in-place.
5794 (relocate_instruction): New.
5795 * server.c (handle_query) <qSymbols>: If the target supports
5796 tracepoints, give it a chance of looking up symbols. Report
5797 support for fast tracepoints.
5798 (handle_status): Stabilize threads.
5799 (process_serial_event): Adjust.
5800 * server.h (struct fast_tracepoint_jump): Forward declare.
5801 (struct process_info) <fast_tracepoint_jumps>: New field.
5802 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
5803 (decode_X_packet, decode_M_packet): Adjust.
5804 (relocate_instruction): Declare.
5805 (in_process_agent_loaded): Declare.
5806 (tracepoint_look_up_symbols): Declare.
5807 (struct fast_tpoint_collect_status): Declare.
5808 (fast_tracepoint_collecting): Declare.
5809 (force_unlock_trace_buffer): Declare.
5810 (handle_tracepoint_bkpts): Declare.
5811 (initialize_low_tracepoint)
5812 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
5813 * target.h (struct target_ops) <stabilize_threads,
5814 install_fast_tracepoint_jump_pad>: New fields.
5815 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
5816 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
5817 [HAVE_STDINT_H]: Include stdint.h.
5818 (trace_debug_1): Rename to ...
5819 (trace_vdebug): ... this.
5820 (trace_debug): Rename to ...
5821 (trace_debug_1): ... this. Add `level' parameter.
5822 (trace_debug): New.
5823 (ATTR_USED, ATTR_NOINLINE): New.
5824 (IP_AGENT_EXPORT): New.
5825 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5826 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
5827 (about_to_request_buffer_space, trace_buffer_is_full)
5828 (stopping_tracepoint, expr_eval_result, error_tracepoint)
5829 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
5830 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
5831 (traceframe_write_count, traceframes_created)
5832 (trace_state_variables)
5833 New renaming defines.
5834 (struct ipa_sym_addresses): New.
5835 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
5836 (symbol_list): New.
5837 (ipa_sym_addrs): New.
5838 (all_tracepoint_symbols_looked_up): New.
5839 (in_process_agent_loaded): New.
5840 (write_e_ipa_not_loaded): New.
5841 (maybe_write_ipa_not_loaded): New.
5842 (tracepoint_look_up_symbols): New.
5843 (debug_threads) [IN_PROCESS_AGENT]: New.
5844 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
5845 (UNKNOWN_SIDE_EFFECTS): New.
5846 (stop_tracing): New.
5847 (flush_trace_buffer): New.
5848 (stop_tracing_bkpt): New.
5849 (flush_trace_buffer_bkpt): New.
5850 (read_inferior_integer): New.
5851 (read_inferior_uinteger): New.
5852 (read_inferior_data_pointer): New.
5853 (write_inferior_data_pointer): New.
5854 (write_inferior_integer): New.
5855 (write_inferior_uinteger): New.
5856 (struct collect_static_trace_data_action): Delete.
5857 (enum tracepoint_type): New.
5858 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
5859 <actions_str, step_actions, step_actions_str>: Only include in
5860 GDBserver.
fa593d66
PA
5861 <orig_size, obj_addr_on_target, adjusted_insn_addr>
5862 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
5863 (tracepoints): Use IP_AGENT_EXPORT.
5864 (last_tracepoint): Don't include in the IPA.
5865 (stopping_tracepoint): Use IP_AGENT_EXPORT.
5866 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
5867 (alloced_trace_state_variables): New.
5868 (trace_state_variables): Use IP_AGENT_EXPORT.
5869 (traceframe_t): Delete unused variable.
5870 (circular_trace_buffer): Don't include in the IPA.
5871 (trace_buffer_start): Delete.
5872 (struct trace_buffer_control): New.
5873 (trace_buffer_free): Delete.
5874 (struct ipa_trace_buffer_control): New.
5875 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
5876 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
5877 New.
5878 (trace_buffer_ctrl): New.
5879 (TRACE_BUFFER_CTRL_CURR): New.
5880 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
5881 Reimplement as macros.
5882 (trace_buffer_wrap): Delete.
5883 (traceframe_write_count, traceframe_read_count)
5884 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
5885 (struct tracepoint_hit_ctx) <type>: New field.
5886 (struct fast_tracepoint_ctx): New.
5887 (memory_barrier): New.
5888 (cmpxchg): New.
5889 (record_tracepoint_error): Update atomically in the IPA.
5890 (clear_inferior_trace_buffer): New.
5891 (about_to_request_buffer_space): New.
5892 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
5893 updating the same buffer.
5894 (add_tracepoint): Default the tracepoint's type to trap
5895 tracepoint, and orig_size to -1.
5896 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
5897 internal variables.
5898 (create_trace_state_variable): New parameter `gdb'. Handle it.
5899 (clear_installed_tracepoints): Clear fast tracepoint jumps.
5900 (cmd_qtdp): Handle fast tracepoints.
5901 (cmd_qtdv): Adjust.
5902 (max_jump_pad_size): New.
5903 (gdb_jump_pad_head): New.
5904 (get_jump_space_head): New.
5905 (claim_jump_space): New.
5906 (sort_tracepoints): New.
5907 (MAX_JUMP_SIZE): New.
5908 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
5909 IPA.
5910 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
5911 support. Upload fast traceframes, and delete internal IPA
5912 breakpoints.
5913 (stop_tracing_handler): New.
5914 (flush_trace_buffer_handler): New.
5915 (cmd_qtstop): Upload fast tracepoints.
5916 (response_tracepoint): Handle fast tracepoints.
5917 (tracepoint_finished_step): Upload fast traceframes. Set the
5918 tracepoint hit context's tracepoint type.
5919 (handle_tracepoint_bkpts): New.
5920 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
5921 type. Add comment about fast tracepoints.
5922 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
5923 non-existing action_str field.
5924 (get_context_regcache): Handle fast tracepoints.
5925 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
5926 to the regcache.
5927 (fast_tracepoint_from_jump_pad_address): New.
5928 (fast_tracepoint_from_ipa_tpoint_address): New.
5929 (collecting_t): New.
5930 (force_unlock_trace_buffer): New.
5931 (fast_tracepoint_collecting): New.
5932 (collecting): New.
5933 (gdb_collect): New.
5934 (write_inferior_data_ptr): New.
5935 (target_tp_heap): New.
5936 (target_malloc): New.
5937 (download_agent_expr): New.
5938 (UALIGN): New.
5939 (download_tracepoints): New.
5940 (download_trace_state_variables): New.
5941 (upload_fast_traceframes): New.
5942 (IPA_FIRST_TRACEFRAME): New.
5943 (IPA_NEXT_TRACEFRAME_1): New.
5944 (IPA_NEXT_TRACEFRAME): New.
5945 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
5946 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
5947 (gdb_jump_pad_buffer_end): New.
5948 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
5949 (initialize_tracepoint): Adjust.
5950 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
5951 buffer. Initialize the low module.
5952 * utils.c (PREFIX, TOOLNAME): New.
5953 (malloc_failure): Use PREFIX.
5954 (error): In the IPA, an error causes an exit.
5955 (fatal, warning): Use PREFIX.
5956 (internal_error): Use TOOLNAME.
5957 (NUMCELLS): Increase to 10.
5958 * configure, config.in: Regenerate.
5959
d149dd1d
PA
59602010-06-01 Pedro Alves <pedro@codesourcery.com>
5961
5962 * server.c (handle_query) <qSupported>: Do two passes over the
5963 qSupported string to avoid nesting strtok.
5964
f6528abd
JK
59652010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5966
5967 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
5968 (CDEPS): New.
5969 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
5970 -Wl,--dynamic-list.
5971 * configure: Regenerate.
5972 * proc-service.list: New.
5973
ca2a87a0
JK
59742010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5975
5976 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
5977 New comment.
5978
363a6e9f
OS
59792010-05-26 Ozkan Sezer <sezeroz@gmail.com>
5980
5981 * gdbreplay.c (remote_open): Check error return from socket() call by
5982 its equality to -1 not by it being negative.
5983 * remote-utils.c (remote_open): Likewise.
5984
d23b6cb1
PA
59852010-05-23 Pedro Alves <pedro@codesourcery.com>
5986
5987 * config.h: Regenerate.
5988
28d3cf85
MK
59892010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
5990
5991 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
5992 doesn't provide PTRACE_GET_THREAD_AREA.
5993
fea36a59
MK
59942010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
5995
5996 * linux-m68k-low.c: Include <asm/ptrace.h>
5997 (ps_get_thread_area): Implement.
5998
24b066ba
DE
59992010-05-03 Doug Evans <dje@google.com>
6000
6001 * event-loop.c (struct callback_event): New struct.
6002 (callback_list): New global.
6003 (append_callback_event, delete_callback_event): New functions.
6004 (process_callback): New function.
6005 (start_event_loop): Call it.
6006 * remote-utils.c (NOT_SCHEDULED): Define.
6007 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
6008 moved out of readchar.
6009 (readchar): Rewrite. Call reschedule before returning.
6010 (reset_readchar): New function.
6011 (remote_close): Call it.
6012 (process_remaining, reschedule): New functions.
6013 * server.h (callback_handler_func): New typedef.
6014 (append_callback_event, delete_callback_event): Declare.
6015
9836d6ea
PA
60162010-05-03 Pedro Alves <pedro@codesourcery.com>
6017
6018 * proc-service.c (ps_pglobal_lookup): Use
6019 thread_db_look_up_one_symbol.
6020 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6021 parameter. Use it instead of all_symbols_looked_up.
6022 * server.h (struct process_info) <all_symbols_looked_up>: Delete
6023 field.
6024 (all_symbols_looked_up): Don't declare.
6025 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6026 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6027 field.
6028 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6029 Set all_symbols_looked_up here.
6030 (thread_db_look_up_one_symbol): New.
6031 (thread_db_get_tls_address): Adjust.
6032 (thread_db_load_search, try_thread_db_load_1): Always allocate the
6033 thread_db object on the heap, and tentatively set it in the
6034 process structure.
6035 (thread_db_init): Don't set all_symbols_looked_up here.
6036 * linux-low.h (thread_db_look_up_one_symbol): Declare.
6037
7984d532
PA
60382010-05-03 Pedro Alves <pedro@codesourcery.com>
6039
6040 * linux-low.c (linux_kill, linux_detach): Adjust.
6041 (status_pending_p_callback): Remove redundant statement. Check
6042 for !TARGET_WAITIKIND_IGNORE, instead of
6043 TARGET_WAITKIND_STOPPED.
6044 (handle_tracepoints): Make sure LWP is locked. Adjust.
6045 (linux_wait_for_event_1): Adjust.
6046 (linux_cancel_breakpoints): New.
6047 (unsuspend_one_lwp): New.
6048 (unsuspend_all_lwps): New.
6049 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
6050 (send_sigstop_callback): Change return type to int, add new
6051 `except' parameter and handle it.
6052 (suspend_and_send_sigstop_callback): New.
6053 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6054 pass them down. If SUSPEND, also increment the lwp's suspend
6055 count.
6056 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6057 (need_step_over_p): Don't consider suspended LWPs.
6058 (start_step_over): Adjust.
6059 (proceed_one_lwp): Change return type to int, add new `except'
6060 parameter and handle it.
6061 (unsuspend_and_proceed_one_lwp): New.
6062 (proceed_all_lwps): Use find_inferior instead of
6063 for_each_inferior.
6064 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6065 also decrement the suspend count of LWPs. Pass `except' down,
6066 instead of hacking its suspend count.
6067 (linux_pause_all): Add `freeze' parameter. Adjust.
6068 (linux_unpause_all): New.
6069 (linux_target_ops): Install linux_unpause_all.
6070 * server.c (handle_status): Adjust.
6071 * target.h (struct target_ops): New fields `unpause_all' and
6072 `cancel_breakpoints'. Add new parameter to `pause_all'.
6073 (pause_all): Add new `freeze' parameter.
6074 (unpause_all): New.
6075 (cancel_breakpoints): New.
6076 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6077 cancel breakpoints.
6078 (cmd_qtstart): Pause threads.
6079 (stop_tracing): Pause threads, and cancel breakpoints.
6080 * win32-low.c (win32_target_ops): Adjust.
6081
e471f25b
PA
60822010-05-03 Pedro Alves <pedro@codesourcery.com>
6083
6084 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6085 the inferior right away from here...
6086 (linux_wait_1): ... to here, and adjust to check the thread's
6087 last_resume_kind instead of the lwp's step or stop_expected flags.
6088
1915ef4f
PA
60892010-05-02 Pedro Alves <pedro@codesourcery.com>
6090
6091 * README: Use consistent `GDB' and `GDBserver' spellings.
6092
f9e39928
PA
60932010-05-02 Pedro Alves <pedro@codesourcery.com>
6094
6095 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6096 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
6097 (linux_detach_one_lwp): Assume the lwp is stopped.
6098 (any_thread_of): Delete.
6099 (linux_detach): Stop all lwps here. Don't blindly delete all
6100 breakpoints.
6101 (delete_lwp_callback): New.
6102 (linux_mourn): Delete all lwps of the process that is gone.
6103 (linux_wait_1): Don't delete the last lwp of the process here.
6104 * mem-break.h (mark_breakpoints_out): Declare.
6105 * mem-break.c (mark_breakpoints_out): New.
6106 (free_all_breakpoints): Use it.
6107 * server.c (handle_target_event): If the process is gone, mark
6108 breakpoints out.
6109 * thread-db.c (struct thread_db) <create_bp>: New field.
6110 (thread_db_enable_reporting): Fix prototype. Store a thread event
6111 breakpoint reference in the thread_db struct.
6112 (thread_db_load_search): Clear the thread_db object.
6113 (try_thread_db_load_1): Ditto.
6114 (switch_to_process): New.
6115 (disable_thread_event_reporting): Use it.
6116 (remove_thread_event_breakpoints): New.
6117 (thread_db_detach, thread_db_mourn): Use it.
6118
1e7fc18c
PA
61192010-05-01 Pedro Alves <pedro@codesourcery.com>
6120
6121 * linux-low.c (linux_enable_event_reporting): New.
6122 (linux_wait_for_event_1, handle_extended_wait): Use it.
6123
02fc4de7
PA
61242010-04-30 Pedro Alves <pedro@codesourcery.com>
6125
6126 * linux-low.c (linux_kill_one_lwp, linux_kill)
6127 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
6128 (send_sigstop): Take an lwp_info as parameter instead. Queue a
6129 SIGSTOP even if the LWP is stopped.
6130 (send_sigstop_callback): New.
6131 (stop_all_lwps): Use send_sigstop_callback instead.
6132 (linux_resume_one_thread): Adjust.
6133 (proceed_one_lwp): Still proceed an LWP that the client has
6134 requested to stop, if we haven't reported it as stopped yet. Make
6135 sure that LWPs the client want stopped, have a pending SIGSTOP.
6136
bc3b5632
DE
61372010-04-26 Doug Evans <dje@google.com>
6138
ae1ada35
DE
6139 * server.c (handle_general_set): Make static.
6140
bc3b5632
DE
6141 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
6142 Print received char after testing for error/eof instead of before.
6143 (input_interrupt): Tweak comment.
6144
65730243
DE
61452010-04-23 Doug Evans <dje@google.com>
6146
6147 * server.c (start_inferior): Print inferior argv if --debug.
6148
a8ae7dc0
AR
61492010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
6150
6151 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
6152 * nto-x86-low.c: Include server.h
6153
1c07cc19
PM
61542010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
6155
6156 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
6157 be consistent with other sources of this directory.
6158 (init_registers_amd64): Correct name of source file of this function
6159 in the comment.
6160
e0a61e09
PM
61612010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6162
6163 * configure.srv (x86_64-*-mingw*): New configuration for Windows
6164 64-bit executables.
6165
54709339
PM
61662010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6167
6168 * win32-i386-low.c: Add 64-bit support.
6169 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
6170 (init_registers_amd64): Declare.
6171 (mappings): Add 64-bit version of array.
6172 (init_windows_x86): New function.
6173 (the_low_target): Change init_arch field to init_windows_x86.
6174
e8f0053d
PM
61752010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6176
6177 * win32-low.c: Adapt to support also 64-bit architecture.
6178 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
6179 (get_image_name): Use SIZE_T type for local variable `done'.
6180 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
6181 (toolhelp_get_dll_name): Idem.
6182 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
6183 Use uintptr_t typecast to avoid warning.
6184 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
6185 (handle_exception): Use phex_nz to avoid warning.
6186 (win32_wait): Remove unused local variable `process'.
6187
c481e77e
PM
61882010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6189
6190 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
6191 `amd64-avx.o'.
6192
12ea4b69
PM
61932010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
6194
6195 * configure.ac: Use `ws2_32' library for srv_mingw.
6196 * configure: Regenerate.
6197 * gdbreplay.c: Include winsock2.h instead of winsock.h.
6198 * remote-utils.c: Likewise.
6199
f6d1620c
L
62002010-04-17 H.J. Lu <hongjiu.lu@intel.com>
6201
6202 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
6203 if __x86_64__ is defined.
6204
8e642873
PM
62052010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6206
6207 * configure: Regenerate.
6208
711e434b
PM
62092010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6210
6211 * server.c (handle_query): Handle 'qGetTIBAddr' query.
6212 * target.h (target_ops): New get_tib_address field.
6213 * win32-low.h (win32_thread_info): Add thread_local_base field.
6214 * win32-low.c (child_add_thread): Add tlb argument.
6215 Set thread_local_base field to TLB.
6216 (get_child_debug_event): Adapt to child_add_thread change.
6217 (win32_get_tib_address): New function.
6218 (win32_target_ops): Set get_tib_address field to
6219 win32_get_tib_address.
6220 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
6221
505106cd
PA
62222010-04-12 Pedro Alves <pedro@codesourcery.com>
6223
505106cd
PA
6224 * linux-low.c (linux_mourn): Also remove the process.
6225 * server.c (handle_target_event): Don't remove the process here.
6226 * nto-low.c (nto_mourn): New.
6227 (nto_target_ops): Install it.
6228 * spu-low.c (spu_mourn): New.
6229 (spu_target_ops): Install it.
6230 * win32-low.c (win32_mourn): New.
6231 (win32_target_ops): Install it.
6232
e8470a06
PA
62332010-04-12 Pedro Alves <pedro@codesourcery.com>
6234
6235 * server.h (buffer_xml_printf): Remove redundant `;'.
6236
45ba0d02
PA
62372010-04-12 Pedro Alves <pedro@codesourcery.com>
6238
6239 * regcache.c (set_register_cache): Invalidate regcaches before
6240 changing the register cache layout.
6241 (regcache_invalidate_one): Allow a NULL regcache.
6242 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
6243 regcaches before changing the register cache layout or the target
6244 regsets.
6245
59e04013
L
62462010-04-12 H.J. Lu <hongjiu.lu@intel.com>
6247
6248 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
6249 variable warning on Linux/x86-64.
6250
8336d594
PA
62512010-04-11 Pedro Alves <pedro@codesourcery.com>
6252
6253 GDBserver disconnected tracing support.
6254
6255 * linux-low.c (linux_remove_process): Delete.
6256 (add_lwp): Don't set last_resume_kind here.
6257 (linux_kill): Use `mourn'.
6258 (linux_detach): Use `thread_db_detach', and `mourn'.
6259 (linux_mourn): New.
6260 (linux_attach_lwp_1): Adjust comment.
6261 (linux_attach): last_resume_kind moved the thread_info; adjust.
6262 (status_pending_p_callback): Adjust.
6263 (linux_wait_for_event_1): Adjust.
6264 (count_events_callback, select_singlestep_lwp_callback)
6265 (select_event_lwp_callback, cancel_breakpoints_callback)
6266 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
6267 (proceed_one_lwp): Adjust.
6268 (linux_async): Add debug output.
6269 (linux_thread_stopped): New.
6270 (linux_pause_all): New.
6271 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
6272 linux_pause_all.
6273 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
6274 (thread_db_free): Delete declaration.
6275 (thread_db_detach, thread_db_mourn): Declare.
6276 * thread-db.c (thread_db_init): Use thread_db_mourn.
6277 (thread_db_free): Delete, split in two.
6278 (disable_thread_event_reporting): New.
6279 (thread_db_detach): New.
6280 (thread_db_mourn): New.
6281
6282 * server.h (struct thread_info) <last_resume_kind>: New field.
6283 <attached>: Add comment.
6284 <gdb_detached>: New field.
6285 (handler_func): Change return type to int.
6286 (handle_serial_event, handle_target_event): Ditto.
6287 (gdb_connected): Declare.
6288 (tracing): Delete.
6289 (disconnected_tracing): Declare.
6290 (stop_tracing): Declare.
6291
6292 * server.c (handle_query) <qSupported>: Report support for
6293 disconnected tracing.
6294 (queue_stop_reply_callback): Account for running threads.
6295 (gdb_wants_thread_stopped): New.
6296 (gdb_wants_all_threads_stopped): New.
6297 (gdb_reattached_process): New.
6298 (handle_status): Clear the `gdb_detached' flag of all processes.
6299 In all-stop, stop all threads.
6300 (main): Be sure to leave tfind mode. Handle disconnected tracing.
6301 (process_serial_event): If the remote connection breaks, or if an
6302 exit was forced with "monitor exit", force an event loop exit.
6303 Handle disconnected tracing on detach.
6304 (handle_serial_event): Adjust.
6305 (handle_target_event): If GDB isn't connected, forward events back
6306 to the inferior, unless the last process exited, in which case,
6307 exit gdbserver. Adjust interface.
6308
6309 * remote-utils.c (remote_open): Don't block in accept. Instead
6310 register an event loop source on the listen socket file
6311 descriptor. Refactor bits into ...
6312 (listen_desc): ... this new global.
6313 (gdb_connected): ... this new function.
6314 (enable_async_notification): ... this new function.
6315 (handle_accept_event): ... this new function.
6316 (remote_close): Clear remote_desc.
6317
6318 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
6319
6320 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
6321 New fields.
6322 (mourn_inferior): Define.
6323 (target_process_qsupported): Avoid the dangling else problem.
6324 (thread_stopped): Define.
6325 (pause_all): Define.
6326 (target_waitstatus_to_string): Declare.
6327 * target.c (target_waitstatus_to_string): New.
6328
6329 * tracepoint.c (tracing): Make extern.
6330 (disconnected_tracing): New.
6331 (stop_tracing): Make extern. Handle tracing stops due to GDB
6332 disconnecting.
6333 (cmd_qtdisconnected): New.
6334 (cmd_qtstatus): Report disconnected tracing status in trace reply.
6335 (handle_tracepoint_general_set): Handle QTDisconnected.
6336
6337 * event-loop.c (event_handler_func): Change return type to int.
6338 (process_event): Bail out if the event handler wants the event
6339 loop to stop.
6340 (handle_file_event): Ditto.
6341 (start_event_loop): Bail out if the event handler wants the event
6342 loop to stop.
6343
6344 * nto-low.c (nto_target_ops): Adjust.
6345 * spu-low.c (spu_wait): Don't remove the process here.
6346 (spu_target_ops): Adjust.
6347 * win32-low.c (win32_wait): Don't remove the process here.
6348 (win32_target_ops): Adjust.
6349
5d267c4c
PA
63502010-04-11 Pedro Alves <pedro@codesourcery.com>
6351
6352 * regcache.c (realloc_register_cache): Invalidate inferior's
6353 regcache before recreating it.
6354
623ccd72
PA
63552010-04-09 Pedro Alves <pedro@codesourcery.com>
6356
6357 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
6358
219f2f23
PA
63592010-04-09 Stan Shebs <stan@codesourcery.com>
6360 Pedro Alves <pedro@codesourcery.com>
6361
6362 * server.h (LONGEST): New.
6363 (struct thread_info) <while_stepping>: New field.
6364 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
6365 Declare.
6366 (initialize_tracepoint, handle_tracepoint_general_set)
6367 (handle_tracepoint_query, tracepoint_finished_step)
6368 (tracepoint_was_hit, release_while_stepping_state_list):
6369 (current_traceframe): Declare.
6370 * server.c (handle_general_set): Handle tracepoint packets.
6371 (read_memory): New.
6372 (write_memory): New.
6373 (handle_search_memory_1): Use read_memory.
6374 (handle_query): Report support for conditional tracepoints, trace
6375 state variables, and tracepoint sources. Handle tracepoint
6376 queries.
6377 (main): Initialize the tracepoints module.
6378 (process_serial_event): Handle traceframe reads/writes.
6379
6380 * linux-low.c (handle_tracepoints): New.
6381 (linux_wait_1): Call it.
6382 (linux_resume_one_lwp): Handle while-stepping.
6383 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
6384 (linux_target_ops): Install them.
6385 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
6386 New field.
6387 * linux-x86-low.c (x86_supports_tracepoints): New.
6388 (the_low_target). Install it.
6389
6390 * mem-break.h (delete_breakpoint): Declare.
6391 * mem-break.c (delete_breakpoint): Make external.
6392
6393 * target.h (struct target_ops): Add `supports_tracepoints',
6394 `read_pc', and `write_pc' fields.
6395 (target_supports_tracepoints): Define.
6396 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
6397 (phex_nz): New.
6398
6399 * regcache.h (struct regcache) <registers_owned>: New field.
6400 (init_register_cache, regcache_cpy): Declare.
6401 (regcache_read_pc, regcache_write_pc): Declare.
6402 (register_cache_size): Declare.
6403 (supply_regblock): Declare.
6404 * regcache.c (init_register_cache): New.
6405 (new_register_cache): Use it.
6406 (regcache_cpy): New.
6407 (register_cache_size): New.
6408 (supply_regblock): New.
6409 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 6410
219f2f23
PA
6411 * tracepoint.c: New.
6412
6413 * Makefile.in (OBS): Add tracepoint.o.
6414 (tracepoint.o): New rule.
6415
3a13a53b
L
64162010-04-08 H.J. Lu <hongjiu.lu@intel.com>
6417
6418 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
6419 (i386-mmx.o): New.
6420 (i386-mmx.c): Likewise.
6421 (i386-mmx-linux.o): Likewise.
6422 (i386-mmx-linux.c): Likewise.
6423
6424 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
6425 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
6426 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
6427 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
6428
6429 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
6430 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
6431 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
6432
1570b33e
L
64332010-04-07 H.J. Lu <hongjiu.lu@intel.com>
6434
6435 * Makefile.in (clean): Updated.
6436 (i386-avx.o): New.
6437 (i386-avx.c): Likewise.
6438 (i386-avx-linux.o): Likewise.
6439 (i386-avx-linux.c): Likewise.
6440 (amd64-avx.o): Likewise.
6441 (amd64-avx.c): Likewise.
6442 (amd64-avx-linux.o): Likewise.
6443 (amd64-avx-linux.c): Likewise.
6444
6445 * configure.srv (srv_i386_regobj): Add i386-avx.o.
6446 (srv_i386_linux_regobj): Add i386-avx-linux.o.
6447 (srv_amd64_regobj): Add amd64-avx.o.
6448 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
6449 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
6450 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
6451 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
6452 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
6453 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
6454 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
6455
6456 * i387-fp.c: Include "i386-xstate.h".
6457 (i387_xsave): New.
6458 (i387_cache_to_xsave): Likewise.
6459 (i387_xsave_to_cache): Likewise.
6460 (x86_xcr0): Likewise.
6461
6462 * i387-fp.h (i387_cache_to_xsave): Likewise.
6463 (i387_xsave_to_cache): Likewise.
6464 (x86_xcr0): Likewise.
6465
6466 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
6467 * linux-crisv32-low.c (target_regsets): Likewise.
6468 * linux-m68k-low.c (target_regsets): Likewise.
6469 * linux-mips-low.c (target_regsets): Likewise.
6470 * linux-ppc-low.c (target_regsets): Likewise.
6471 * linux-s390-low.c (target_regsets): Likewise.
6472 * linux-sh-low.c (target_regsets): Likewise.
6473 * linux-sparc-low.c (target_regsets): Likewise.
6474 * linux-xtensa-low.c (target_regsets): Likewise.
6475
6476 * linux-low.c: Include <sys/uio.h>.
6477 (regsets_fetch_inferior_registers): Support nt_type.
6478 (regsets_store_inferior_registers): Likewise.
6479 (linux_process_qsupported): New.
6480 (linux_target_ops): Add linux_process_qsupported.
6481
6482 * linux-low.h (regset_info): Add nt_type.
6483 (linux_target_ops): Add process_qsupported.
6484
6485 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
6486 and <sys/uio.h>.
6487 (init_registers_i386_avx_linux): New.
6488 (init_registers_amd64_avx_linux): Likewise.
6489 (xmltarget_i386_linux_no_xml): Likewise.
6490 (xmltarget_amd64_linux_no_xml): Likewise.
6491 (PTRACE_GETREGSET): Likewise.
6492 (PTRACE_SETREGSET): Likewise.
6493 (x86_fill_xstateregset): Likewise.
6494 (x86_store_xstateregset): Likewise.
6495 (use_xml): Likewise.
6496 (x86_linux_update_xmltarget): Likewise.
6497 (x86_linux_process_qsupported): Likewise.
6498 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
6499 (x86_arch_setup): Don't call init_registers_amd64_linux nor
6500 init_registers_i386_linux here. Call
6501 x86_linux_update_xmltarget.
6502 (the_low_target): Add x86_linux_process_qsupported.
6503
6504 * server.c (handle_query): Call target_process_qsupported.
6505
6506 * target.h (target_ops): Add process_qsupported.
6507 (target_process_qsupported): New.
6508
fc7238bb
PA
65092010-04-03 Pedro Alves <pedro@codesourcery.com>
6510
6511 * inferiors.c (add_thread): Set last_status kind to
6512 TARGET_WAITKIND_IGNORE.
6513 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
6514 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
6515 (linux_wait_1): Move `thread' local definition to block that uses
6516 it. Don't NULL initialize `event_child'.
6517 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
6518 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
6519 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
6520
bdabb078
PA
65212010-04-01 Pedro Alves <pedro@codesourcery.com>
6522
6523 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
6524 an extended waitstatus, or by a watchpoint.
6525 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
6526 thread was stepping or has been stopped by a watchpoint.
6527
d3bbe7a0
PA
65282010-04-01 Pedro Alves <pedro@codesourcery.com>
6529
6530 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
6531 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
6532 of another, then delete the previous, and validate all
6533 breakpoints.
6534 (validate_inserted_breakpoint): New.
6535 (delete_disabled_breakpoints): New.
6536 (validate_breakpoints): New.
6537 (check_mem_read): Validate breakpoints before trusting their
6538 shadow. Delete disabled breakpoints.
6539 (check_mem_write): Validate breakpoints before trusting they
6540 should be inserted. Delete disabled breakpoints.
6541 * mem-break.h (validate_breakpoints):
6542 * server.c (handle_query): Validate breakpoints when we see a
6543 qSymbol query.
6544
8b07ae33
PA
65452010-04-01 Pedro Alves <pedro@codesourcery.com>
6546
6547 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
6548 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
6549 if we could tell there's a GDB breakpoint at stop_pc.
6550 (need_step_over_p): Don't do a step over if we find a GDB
6551 breakpoint at the resume PC.
6552
6553 * mem-break.c (struct raw_breakpoint): New.
6554 (enum bkpt_type): New type `gdb_breakpoint'.
6555 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
6556 fields. New field `raw'.
6557 (find_raw_breakpoint_at): New.
6558 (set_raw_breakpoint_at): Handle refcounting. Create a raw
6559 breakpoint instead.
6560 (set_breakpoint_at): Adjust.
6561 (delete_raw_breakpoint): New.
6562 (release_breakpoint): New.
6563 (delete_breakpoint): Rename to...
6564 (delete_breakpoint_1): ... this. Add proc parameter. Use
6565 release_breakpoint. Return ENOENT.
6566 (delete_breakpoint): Reimplement.
6567 (find_breakpoint_at): Delete.
6568 (find_gdb_breakpoint_at): New.
6569 (delete_breakpoint_at): Delete.
6570 (set_gdb_breakpoint_at): New.
6571 (delete_gdb_breakpoint_at): New.
6572 (gdb_breakpoint_here): New.
6573 (set_reinsert_breakpoint): Use release_breakpoint.
6574 (uninsert_breakpoint): Rename to ...
6575 (uninsert_raw_breakpoint): ... this.
6576 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
6577 (reinsert_raw_breakpoint): Change parameter type to
6578 raw_breakpoint.
6579 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
6580 instead.
6581 (check_breakpoints): Adjust. Use release_breakpoint.
6582 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
6583 (breakpoint_inserted_here): Ditto.
6584 (check_mem_read): Adjust to iterate over raw breakpoints instead.
6585 Don't trust the breakpoint's shadow if it is not inserted.
6586 (check_mem_write): Adjust to iterate over raw breakpoints instead.
6587 (delete_all_breakpoints): Adjust.
6588 (free_all_breakpoints): Mark all breakpoints as uninserted, and
6589 use delete_breakpoint_1.
6590
6591 * mem-break.h (breakpoints_supported): Delete declaration.
6592 (set_gdb_breakpoint_at): Declare.
6593 (gdb_breakpoint_here): Declare.
6594 (delete_breakpoint_at): Delete.
6595 (delete_gdb_breakpoint_at): Declare.
6596
6597 * server.h (struct raw_breakpoint): Forward declare.
6598 (struct process_info): New field `raw_breakpoints'.
6599
6600 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
6601 breakpoints.
6602
6bf5e0ba
PA
66032010-03-24 Pedro Alves <pedro@codesourcery.com>
6604
6605 * linux-low.c (status_pending_p_callback): Fix comment.
6606 (linux_wait_for_event_1): Move most of the internal breakpoint
6607 handling from here...
6608 (linux_wait_1): ... to here.
6609 (count_events_callback): New.
6610 (select_singlestep_lwp_callback): New.
6611 (select_event_lwp_callback): New.
6612 (cancel_breakpoints_callback): New.
6613 (select_event_lwp): New.
6614 (linux_wait_1): Simplify internal breakpoint handling. Give equal
6615 priority to all LWPs that have had events that should be reported
6616 to the client. Cancel breakpoints when about to reporting the
6617 event to the client, not while stopping lwps. No longer cancel
6618 finished single-steps here.
6619 (cancel_finished_single_step): Delete.
6620 (cancel_finished_single_steps): Delete.
6621
414a389f
PA
66222010-03-24 Pedro Alves <pedro@codesourcery.com>
6623
6624 * mem-break.c (enum bkpt_type): New.
6625 (struct breakpoint): New field `type'.
6626 (set_breakpoint_at): Change return type to struct breakpoint
6627 pointer. Set type to `other_breakpoint' by default.
6628 (delete_breakpoint): Rewrite, supporting more than one breakpoint
6629 in the breakpoint list.
6630 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
6631 (reinsert_breakpoint): Rename to ...
6632 (reinsert_raw_breakpoint): ... this.
6633 (reinsert_breakpoints_at): Adjust.
6634 * mem-break.h (struct breakpoint): Declare.
6635 (set_breakpoint_at): Change return type to struct breakpoint
6636 pointer.
6637
2280c721
PA
66382010-03-24 Pedro Alves <pedro@codesourcery.com>
6639
6640 * server.c (handle_query): Assign, not compare.
6641
d50171e4
PA
66422010-03-24 Pedro Alves <pedro@codesourcery.com>
6643
6644 Teach linux gdbserver to step-over-breakpoints.
6645
6646 * linux-low.c (can_hardware_single_step): New.
6647 (supports_breakpoints): New.
6648 (handle_extended_wait): If stopping threads, read the stop pc of
6649 the new cloned LWP.
6650 (get_pc): New.
6651 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
6652 low target doesn't support retrieving the PC.
6653 (add_lwp): Set last_resume_kind to resume_continue.
6654 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
6655 (linux_attach): Don't clear stop_expected. Set the lwp's
6656 last_resume_kind to resume_stop.
6657 (linux_detach_one_lwp): Don't check for removed breakpoints.
6658 (check_removed_breakpoint): Delete.
6659 (status_pending_p): Rename to ...
6660 (status_pending_p_callback): ... this. Don't check for removed
6661 breakpoints. Don't consider threads that are stopped from GDB's
6662 perspective.
6663 (linux_wait_for_lwp): Always read the stop_pc here.
6664 (cancel_breakpoint): New.
6665 (step_over_bkpt): New global.
6666 (linux_wait_for_event_1): Implement stepping over breakpoints.
6667 (gdb_wants_lwp_stopped): New.
6668 (gdb_wants_all_stopped): New.
6669 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
6670 single-step traps here. Store the thread's last reported target
6671 wait status.
6672 (send_sigstop): Don't clear stop_expected. Always set it,
6673 instead.
6674 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
6675 (cancel_finished_single_step): New.
6676 (cancel_finished_single_steps): New.
6677 (wait_for_sigstop): Don't cancel finished single-step traps here.
6678 (linux_resume_one_lwp): Don't check for removed breakpoints.
6679 Don't set `step' on non-hardware step archs.
6680 (linux_set_resume_request): Ignore resume_stop requests if already
6681 stopping or stopped. Set the lwp's last_resume_kind.
6682 (resume_status_pending_p): Don't check for removed breakpoints.
6683 (need_step_over_p): New.
6684 (start_step_over): New.
6685 (finish_step_over): New.
6686 (linux_resume_one_thread): Always queue a sigstop for resume_stop
6687 requests. Clear the thread's last reported target waitstatus.
6688 Don't use the `suspended' flag. Don't consider pending breakpoints.
6689 (linux_resume): Start a step-over if necessary.
6690 (proceed_one_lwp): New.
6691 (proceed_all_lwps): New.
6692 (unstop_all_lwps): New.
6693 * linux-low.h (struct lwp_info): Rewrite comment for the
6694 `suspended' flag. Add the `stop_pc' field. Delete the
6695 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
6696 Add `'last_resume_kind' and `need_step_over' fields.
6697 * inferiors.c (struct thread_info): Delete, moved elsewhere.
6698 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
6699 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
6700 (set_raw_breakpoint_at): New.
6701 (set_breakpoint_at): Rewrite to use it.
6702 (reinsert_breakpoint_handler): Delete.
6703 (set_reinsert_breakpoint): New.
6704 (reinsert_breakpoint_by_bp): Delete.
6705 (delete_reinsert_breakpoints): New.
6706 (uninsert_breakpoint): Rewrite.
6707 (uninsert_breakpoints_at): New.
6708 (reinsert_breakpoint): Rewrite.
6709 (reinsert_breakpoints_at): New.
6710 (check_breakpoints): Rewrite.
6711 (breakpoint_here): New.
6712 (breakpoint_inserted_here): New.
6713 (check_mem_read): Adjust.
6714 * mem-break.h (breakpoints_supported, breakpoint_here)
6715 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
6716 (reinsert_breakpoint_by_bp): Delete declaration.
6717 (delete_reinsert_breakpoints): Declare.
6718 (reinsert_breakpoint): Delete declaration.
6719 (reinsert_breakpoints_at): Declare.
6720 (uninsert_breakpoint): Delete declaration.
6721 (uninsert_breakpoints_at): Declare.
6722 (check_breakpoints): Adjust prototype.
6723 * server.h: Adjust include order.
6724 (struct thread_info): Declare here. Add a `last_status' field.
6725
30ba68cb
MS
67262010-03-23 Michael Snyder <msnyder@vmware.com>
6727
6728 * server.c (crc32): New function.
6729 (handle_query): Add handling for 'qCRC:' request.
6730
b9a881c2
PA
67312010-03-23 Pedro Alves <pedro@codesourcery.com>
6732
6733 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
6734 lwp had been stopped by a watchpoint.
6735
e92d13d5
PA
67362010-03-16 Pedro Alves <pedro@codesourcery.com>
6737
6738 * server.h (internal_error): Declare.
6739 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
6740 * utils.c (internal_error): New function.
6741
64daa791
AS
67422010-03-15 Andreas Schwab <schwab@redhat.com>
6743
6744 * configure.srv: Fix typo setting srv_regobj.
6745
f52cd8cd
PA
67462010-03-15 Pedro Alves <pedro@codesourcery.com>
6747
6748 * linux-low.c (fetch_register): Avoid passing a non string literal
6749 format to `error'.
6750 (usr_store_inferior_registers): Ditto.
6751
93ae6fdc
PA
67522010-03-14 Pedro Alves <pedro@codesourcery.com>
6753
6754 * linux-low.c (linux_write_memory): Bail out early if peeking
6755 memory failed.
6756
c3adc08c
PA
67572010-03-14 Pedro Alves <pedro@codesourcery.com>
6758
6759 * linux-low.h (struct lwp_info): New fields
6760 `stopped_by_watchpoint' and `stopped_data_address'.
6761 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
6762 here, and cache them in the lwp object.
6763 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
6764 directly.
6765 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
6766 field.
6767 (linux_stopped_by_watchpoint): Rewrite.
6768 (linux_stopped_data_address): Rewrite.
6769
bce522a2
PA
67702010-03-06 Simo Melenius <simo.melenius@iki.fi>
6771
6772 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
6773 switching the current inferior, not before.
6774
90884b2b
L
67752010-03-01 H.J. Lu <hongjiu.lu@intel.com>
6776
6777 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
6778 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
6779 i386-linux.c and amd64-linux.c.
6780 (reg-i386.o): Removed.
6781 (reg-i386.c): Likewise.
6782 (reg-i386-linux.o): Likewise.
6783 (reg-i386-linux.c): Likewise.
6784 (reg-x86-64.o): Likewise.
6785 (reg-x86-64.c): Likewise.
6786 (reg-x86-64-linux.o): Likewise.
6787 (reg-x86-64-linux.c): Likewise.
6788 (i386.o): New.
6789 (i386.c): Likewise.
6790 (i386-linux.o): Likewise.
6791 (i386-linux.c): Likewise.
6792 (amd64.o): Likewise.
6793 (amd64.c): Likewise.
6794 (amd64-linux.o): Likewise.
6795 (amd64-linux.c): Likewise.
6796
6797 * configure.srv (srv_i386_regobj): New.
6798 (srv_i386_linux_regobj): Likewise.
6799 (srv_amd64_regobj): Likewise.
6800 (srv_amd64_linux_regobj): Likewise.
6801 (srv_i386_32bit_xmlfiles): Likewise.
6802 (srv_i386_64bit_xmlfiles): Likewise.
6803 (srv_i386_xmlfiles): Likewise.
6804 (srv_amd64_xmlfiles): Likewise.
6805 (srv_i386_linux_xmlfiles): Likewise.
6806 (srv_amd64_linux_xmlfiles): Likewise.
6807 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
6808 srv_xmlfiles to $srv_i386_xmlfiles.
6809 (i[34567]86-*-mingw32ce*): Likewise.
6810 (i[34567]86-*-mingw*): Likewise.
6811 (i[34567]86-*-nto*): Likewise.
6812 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
6813 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
6814 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
6815 (x86_64-*-linux*): Likewise.
6816
6817 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
6818 (init_registers_amd64_linux): New.
6819 (x86_arch_setup): Replace init_registers_x86_64_linux with
6820 init_registers_amd64_linux.
6821
193f13e6
MK
68222010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
6823
6824 * configure.ac: Check for libdl. If it is not available link against
6825 static libthread_db.
6826 * configure: Regenerate.
6827
85d721b8
PA
68282010-02-22 Pedro Alves <pedro@codesourcery.com>
6829
6830 PR9605
6831
6832 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
6833 handing a read watchpoint.
6834 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
6835
6076632b
DE
68362010-02-12 Doug Evans <dje@google.com>
6837
6838 * linux-low.c (linux_supports_tracefork_flag): Document.
6839 (linux_look_up_symbols): Add comment.
6840
3327ccf7
L
68412010-02-03 H.J. Lu <hongjiu.lu@intel.com>
6842
6843 * regcache.c (supply_register): Clear regcache if buf is NULL.
6844
0718675c 68452010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 6846 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
6847
6848 * inferiors.c (find_inferior): Add function documentation.
6849 (unloaded_dll): Handle the case where the unloaded dll has not
6850 been previously registered in the dll list.
6851
177321bd
DJ
68522010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
6853
6854 * linux-arm-low.c (thumb_breakpoint_len): Delete.
6855 (thumb2_breakpoint): New.
6856 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
6857
2b009048
DJ
68582010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
6859
6860 * linux-low.c (get_stop_pc): Check for SIGTRAP.
6861 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
6862 breakpoints.
6863
3be029c7
PA
68642010-01-21 Pedro Alves <pedro@codesourcery.com>
6865
6866 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
6867
18f5de3b
JK
68682010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6869
6870 * linux-s390-low.c (s390_collect_ptrace_register)
6871 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
6872
3743bb4f
DE
68732010-01-21 Doug Evans <dje@google.com>
6874
14ce3065
DE
6875 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
6876 (PTRACE_ARG4_TYPE): New macro.
6877 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
6878 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
6879 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
6880 (usr_store_inferior_registers): Ditto.
6881 (linux_read_memory, linux_write_memory): Ditto.
6882 (linux_test_for_tracefork): Ditto.
6883
3743bb4f
DE
6884 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
6885 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
6886
8b315be5
PA
68872010-01-21 Pedro Alves <pedro@codesourcery.com>
6888
6889 * proc-service.c (ps_lgetregs): Don't refetch registers from the
6890 target.
6891
85492558
PA
68922010-01-21 Pedro Alves <pedro@codesourcery.com>
6893
6894 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
6895 prototype to take a regcache. Adjust.
6896
442ea881
PA
68972010-01-20 Pedro Alves <pedro@codesourcery.com>
6898
6899 * regcache.h (struct thread_info): Forward declare.
6900 (struct regcache): New.
6901 (new_register_cache): Adjust prototype.
6902 (get_thread_regcache): Declare.
6903 (free_register_cache): Adjust prototype.
6904 (registers_to_string, registers_from_string): Ditto.
6905 (supply_register, supply_register_by_name, collect_register)
6906 (collect_register_as_string, collect_register_by_name): Ditto.
6907 * regcache.c (struct inferior_regcache_data): Delete.
6908 (get_regcache): Rename to ...
6909 (get_thread_regcache): ... this. Adjust. Switch inferior before
6910 fetching registers.
6911 (regcache_invalidate_one): Adjust.
6912 (regcache_invalidate): Fix prototype.
6913 (new_register_cache): Return the new register cache.
6914 (free_register_cache): Change prototype.
6915 (realloc_register_cache): Adjust.
6916 (registers_to_string): Change prototype to take a regcache. Adjust.
6917 (registers_from_string): Ditto.
6918 (register_data): Ditto.
6919 (supply_register): Ditto.
6920 (supply_register_by_name): Ditto.
6921 (collect_register): Ditto.
6922 (collect_register_as_string): Ditto.
6923 (collect_register_by_name): Ditto.
6924 * server.c (process_serial_event): Adjust.
6925 * linux-low.h (regset_fill_func, regset_store_func): Change
6926 prototype.
6927 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
6928 Change prototype.
6929 * linux-low.c (get_stop_pc): Adjust.
6930 (check_removed_breakpoint): Adjust.
6931 (linux_wait_for_event): Adjust.
6932 (linux_resume_one_lwp): Adjust.
6933 (fetch_register): Add regcache parameter. Adjust.
6934 (usr_store_inferior_registers): Ditto.
6935 (regsets_fetch_inferior_registers): Ditto.
6936 (regsets_store_inferior_registers): Ditto.
6937 (linux_fetch_registers, linux_store_registers): Ditto.
6938 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
6939 regcache. Adjust.
43aaf8b6
PA
6940 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
6941 Ditto.
442ea881
PA
6942 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
6943 prototype to take a regcache.
6944 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
6945 * remote-utils.c (convert_ascii_to_int, outreg)
6946 (prepare_resume_reply): Change prototype to take a regcache.
6947 Adjust.
6948 * target.h (struct target_ops) <fetch_registers, store_registers>:
6949 Change prototype to take a regcache.
6950 (fetch_inferior_registers, store_inferior_registers): Change
6951 prototype to take a regcache. Adjust.
6952 * proc-service.c (ps_lgetregs): Adjust.
6953 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
6954 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
6955 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
6956 take a regcache. Adjust.
6957 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
6958 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
6959 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
6960 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
6961 * linux-cris-low.c (cris_get_pc, cris_set_pc)
6962 (cris_cannot_fetch_register):
6963 (cris_breakpoint_at): Change prototype to take a regcache.
6964 Adjust.
6965 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
6966 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
6967 to take a regcache. Adjust.
6968 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
6969 Adjust.
6970 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
6971 take a regcache. Adjust.
6972 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
6973 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
6974 (m68k_set_pc): Change prototype to take a regcache. Adjust.
6975 * linux-mips-low.c (mips_get_pc):
6976 (mips_set_pc): Change prototype to take a regcache. Adjust.
6977 (mips_reinsert_addr): Adjust.
6978 (mips_collect_register): Change prototype to take a regcache.
6979 Adjust.
6980 (mips_supply_register):
6981 (mips_collect_register_32bit, mips_supply_register_32bit)
6982 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
6983 (mips_store_fpregset): Ditto.
43aaf8b6
PA
6984 * linux-ppc-low.c (ppc_supply_ptrace_register)
6985 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
6986 (parse_spufs_run): Adjust.
6987 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
6988 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
6989 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
6990 take a regcache. Adjust.
6991 * linux-s390-low.c (s390_collect_ptrace_register)
6992 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
6993 (s390_set_pc): Change prototype to take a regcache. Adjust.
6994 (s390_arch_setup): Adjust.
6995 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
6996 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
6997 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
6998 (sparc_fill_gregset, sparc_store_gregset_from_stack)
6999 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7000 regcache. Adjust.
7001 (sparc_breakpoint_at): Adjust.
7002 * linux-xtensa-low.c (xtensa_fill_gregset):
7003 (xtensa_store_gregset):
7004 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7005 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
7006 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
7007 prototype to take a regcache. Adjust.
7008 * win32-arm-low.c (arm_fetch_inferior_register)
7009 (arm_store_inferior_register): Change prototype to take a
7010 regcache. Adjust.
7011 * win32-i386-low.c (i386_fetch_inferior_register)
7012 (i386_store_inferior_register): Change prototype to take a
7013 regcache. Adjust.
7014 * win32-low.c (child_fetch_inferior_registers)
7015 (child_store_inferior_registers): Change prototype to take a
7016 regcache. Adjust.
7017 (win32_wait): Adjust.
7018 (win32_fetch_inferior_registers): Change prototype to take a
7019 regcache. Adjust.
7020 (win32_store_inferior_registers): Adjust.
7021 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7022 store_inferior_register>: Change prototype to take a regcache.
7023
60c3d7b0
DE
70242010-01-20 Doug Evans <dje@google.com>
7025
7026 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7027 #ifdef.
7028 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 7029 (W_STOPCODE): Provide definition if missing.
60c3d7b0 7030
dc146f7c
VP
70312010-01-13 Vladimir Prus <vladimir@codesourcery.com>
7032
7033 * linux-low.c (linux_core_of_thread): New.
7034 (compare_ints, show_process, list_threads): New.
7035 (linux_qxfer_osdata): Report threads and cores.
7036 (linux_target_op): Register linux_core_of_thread.
7037 * remote-utils.c (prepare_resume_reply): Report the core.
7038 (buffer_xml_printf): Support %d specifier.
7039 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
7040 New.
7041 (handle_query): Handle qXfer:threads. Announce availability
7042 thereof.
7043 * target.h (struct target_ops): New field core_of_thread.
7044
7803799a
UW
70452010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
7046
7047 * Makefile.in (clean): Remove new generated files.
7048 (reg-s390.o, reg-s390.c): Remove rules.
7049 (reg-s390x.o, reg-s390x.c): Likewise.
7050 (s390-linux32.o, s390-linux32.c): Add rules.
7051 (s390-linux64.o, s390-linux64.c): Likewise.
7052 (s390x-linux64.o, s390x-linux64.c): Likewise.
7053 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7054 * linux-s390-low.c: Include <elf.h>.
7055 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7056 (init_registers_s390): Remove prototype.
7057 (init_registers_s390x): Likewise.
7058 (init_registers_s390_linux32): Add prototype.
7059 (init_registers_s390_linux64): Likewise.
7060 (init_registers_s390x_linux64): Likewise.
7061 (s390_num_regs_3264): New define.
7062 (s390_regmap_3264): New global variable.
7063 (s390_cannot_fetch_register): Remove obsolete check.
7064 (s390_cannot_store_register): Likewise.
7065 (s390_collect_ptrace_register): Handle upper/lower register halves.
7066 (s390_supply_ptrace_register): Likewise.
7067 (s390_fill_gregset): Update to register number changes.
7068 (s390_get_hwcap): New routine.
7069 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7070 Install appropriate regmap and register set.
7071
6e7ffa39
JB
70722010-01-01 Joel Brobecker <brobecker@adacore.com>
7073
7074 * server.c (gdbserver_version): Update copyright year to 2010.
7075 * gdbreplay.c (gdbreplay_version): Likewise.
7076
957f3f49
DE
70772009-12-28 Doug Evans <dje@google.com>
7078
7079 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7080 elf/external.h. Include <elf.h> instead but only if necessary.
7081
ca5c370d
PA
70822009-12-28 Pedro Alves <pedro@codesourcery.com>
7083
7084 * linux-low.c (linux_remove_process): Remove `detaching'
7085 parameter. Don't release/detach from thread_db here.
7086 (linux_kill): Release/detach from thread_db here, ...
7087 (linux_detach): ... and here, before actually detaching.
7088 (linux_wait_1): ... and here, when a process exits.
7089 * thread-db.c (any_thread_of): New.
7090 (thread_db_free): Switch the current inferior to a thread of the
7091 passed in process.
7092
4ee62156
DE
70932009-12-21 Doug Evans <dje@google.com>
7094
d90e6a88
DE
7095 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7096
c5f62d5f
DE
7097 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7098 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7099 warning ifndef __NR_tkill. Move setting of errno there too.
7100 Delete unnecessary resetting of errno after syscall.
7101 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7102
10e86dd7
DE
7103 * configure.ac: Check for dladdr.
7104 * config.in: Regenerate.
7105 * configure: Regenerate.
7106 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7107 (try_thread_db_load): Update.
7108
4ee62156
DE
7109 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7110
00f515da
DE
71112009-12-18 Doug Evans <dje@google.com>
7112
e9464885
DE
7113 * event-loop.c: Include unistd.h if it exists.
7114
07d4f67e
DE
7115 * linux-low.c (my_waitpid): Move definition away from being in
7116 between linux_tracefork_child/linux_test_for_tracefork.
7117
00f515da
DE
7118 * gdb_proc_service.h (psaddr_t): Fix type.
7119 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7120 signature to match glibc.
7121
1de1badb
DE
71222009-12-16 Doug Evans <dje@google.com>
7123
7124 * linux-low.c (linux_read_memory): Fix argument to read.
7125
aeeb81d1
PA
71262009-11-26 Pedro Alves <pedro@codesourcery.com>
7127
7128 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
7129 events, don't leave current_inferior pointing at null.
7130
10357975
PA
71312009-11-26 Pedro Alves <pedro@codesourcery.com>
7132
7133 * win32-low.c (LOG): Delete.
7134 (OUTMSG): Output to stderr.
7135 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
7136 on compile time LOG macro.
7137 (win32_wait): Fix debug output.
7138
cf6e3471
PA
71392009-11-26 Pedro Alves <pedro@codesourcery.com>
7140
7141 * win32-low.c (win32_add_one_solib): If the dll name is
7142 "ntdll.dll", prepend the system directory to the dll path.
7143
0c85e18e
MK
71442009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
7145
7146 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
7147
9ac544ce 71482009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 7149 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
7150
7151 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
7152 * configure.ac: Check for __mcoldfire__ and set
7153 gdb_cv_m68k_is_coldfire.
7154 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
7155 reg-cf.o and reg-m68k.o.
7156 * configure: Regenerated.
7157
fd7dd3e6
PA
71582009-11-16 Pedro Alves <pedro@codesourcery.com>
7159
7160 * linux-low.c (linux_remove_process): Add `detaching' parameter.
7161 Pass it to thread_db_free.
7162 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
7163 proper `detaching' argument to linux_remove_process.
7164 * linux-low.h (thread_db_free): Add `detaching' parameter.
7165 * thread-db.c (thread_db_init): Pass false as `detaching' argument
7166 to thread_db_free.
7167 (thread_db_free): Add `detaching' parameter. Only
7168 call td_ta_clear_event if detaching from process.
7169
75aa492e
MK
71702009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
7171
7172 * thread-db.c (thread_db_free): Fix typo.
7173
21e1bee4
PP
71742009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
7175
7176 PR gdb/10838
7177 * thread-db.c (thread_db_free): Call td_ta_clear_event.
7178
8838b45e
NS
71792009-11-03 Nathan Sidwell <nathan@codesourcery.com>
7180
7181 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
7182 with an i686 compiler.
7183 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
7184 needed.
7185 * configure: Rebuilt.
7186
8a35fb51
SL
71872009-10-29 Sandra Loosemore <sandra@codesourcery.com>
7188
7189 PR gdb/10783
7190
7191 * server.c (handle_search_memory_1): Correct read_addr initialization
7192 in loop for searching subsequent chunks.
7193
96f15937
PP
71942009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
7195
7196 * configure.ac: New --with-libthread-db option.
7197 * thread-db.c: Allow direct dependence on libthread_db.
7198 (thread_db_free): Adjust.
7199 * config.in: Regenerate.
7200 * configure: Likewise.
889bf7c5 7201
5f7d1694
PP
72022009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
7203
7204 PR gdb/10757
7205 * thread-db.c (attach_thread): New function.
7206 (maybe_attach_thread): Return success/failure.
7207 (find_new_threads_callback): Adjust.
889bf7c5
PA
7208 (thread_db_find_new_threads): Loop until no new threads.
7209
88e3b899
PA
72102009-10-13 Pedro Alves <pedro@codesourcery.com>
7211
7212 * proc-service.c (ps_lgetregs): Formatting.
7213
cdbfd419
PP
72142009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
7215
7216 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
7217 * configure.ac: Adjust.
7218 * linux-low.h (struct process_info_private): Move members to struct
7219 thread_db.
7220 (thread_db_free, thread_db_handle_monitor_command): New prototype.
7221 * linux-low.c (linux_remove_process): Adjust.
7222 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
7223 * server.c (handle_query): Move code ...
7224 (handle_monitor_command): ... here. New function.
7225 * target.h (struct target_ops): New member.
7226 * thread-db.c (struct thread_db): New.
7227 (libthread_db_search_path): New variable.
7228 (thread_db_create_event, thread_db_enable_reporting)
7229 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
7230 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
7231 (try_thread_db_load_1, dladdr_to_soname): New functions.
7232 (try_thread_db_load, thread_db_load_search): New functions.
7233 (thread_db_init): Search for libthread_db.
7234 (thread_db_free): New function.
7235 (thread_db_handle_monitor_command): Likewise.
7236 * config.in: Regenerate.
7237 * configure: Regenerate.
889bf7c5 7238
4168d2d6
UW
72392009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
7240
7241 * spu-low.c (spu_kill): Wait for inferior to terminate.
7242 Call clear_inferiors.
7243 (spu_detach): Call clear_inferiors.
7244
81ecdfbb
RW
72452009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7246
7247 * aclocal.m4: Regenerate.
7248 * config.in: Likewise.
7249 * configure: Likewise.
7250
0b9ff2c0
UW
72512009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7252
7253 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
7254 (parse_spufs_run): New function.
7255 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
7256 (ppc_breakpoint_at): Handle SPU breakpoints.
7257
efcbbd14
UW
72582009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7259
7260 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
7261 (SPUFS_MAGIC): Define.
7262 (spu_enumerate_spu_ids): New function.
7263 (linux_qxfer_spu): New function.
7264 (linux_target_ops): Install linux_qxfer_spu.
7265
f4d9bade
UW
72662009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7267
7268 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
7269 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
7270 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
7271 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
7272 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
7273 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
7274 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
7275 (init_registers_powerpc_cell32l): Add prototype.
7276 (init_registers_powerpc_cell64l): Likewise.
7277 (ppc_arch_setup): Detect Cell/B.E. architecture.
7278
96e946ca
RW
72792009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7280
7281 * Makefile.in (datarootdir): New variable.
7282
58d6951d
DJ
72832009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7284
7285 * linux-low.c (linux_write_memory): Update debugging output.
7286 * Makefile.in (clean): Add new descriptions.
7287 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
7288 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
7289 * configure.srv: Add new files for arm*-*-linux*.
7290 * linux-arm-low.c: Add new declarations.
7291 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
7292 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
7293 (HWCAP_VFPv3D16): New.
7294 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
7295 instead of __IWMMXT__.
7296 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
7297 (arm_arch_setup): New.
7298 (target_regsets): Remove #ifdef. Add VFP regset.
7299 (the_low_target): Use arm_arch_setup.
7300
12b42a12
DJ
73012009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7302
7303 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
7304 the main thread again.
7305
ac8c974e
AR
73062009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
7307
7308 Adding Neutrino gdbserver.
7309 * configure: Regenerated.
7310 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
7311 * configure.srv (i[34567]86-*-nto*): New target.
7312 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
7313 * remote-utils.c [__QNX__]: Include sys/iomgr.h
7314 (nto_comctrl) [__QNX__]: New function.
7315 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
7316
4424e0c3 73172009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
7318
7319 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
7320 srv_tgtobj.
7321
912cf4ba
PA
73222009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
7323 Pedro Alves <pedro@codesourcery.com>
7324
7325 * win32-i386-low.c (i386_get_thread_context): Handle systems that
7326 don't support CONTEXT_EXTENDED_REGISTERS.
7327 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
7328 (the_low_target): Install them.
7329 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
7330 failing with ERROR_PIPE_NOT_CONNECTED.
7331
aa5ca48f
DE
73322009-06-30 Doug Evans <dje@google.com>
7333 Pierre Muller <muller@ics.u-strasbg.fr>
7334
7335 Add h/w watchpoint support to x86-linux, win32-i386.
7336 * Makefile.in (SFILES): Add i386-low.c
7337 (i386_low_h): Define.
7338 (i386-low.o): Add dependencies.
7339 (linux-x86-low.o): Add i386-low.h dependency.
7340 (win32-i386-low.o): Ditto.
7341 * i386-low.c: New file.
7342 * i386-low.h: New file.
7343 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
7344 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
7345 * linux-low.c (linux_add_process): Initialize arch_private.
7346 (linux_remove_process): Free arch_private.
7347 (add_lwp): Initialize arch_private.
7348 (delete_lwp): Free arch_private.
7349 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
7350 provided.
7351 * linux-low.h (process_info_private): New member arch_private.
7352 (lwp_info): New member arch_private.
7353 (linux_target_ops): New members new_process, new_thread,
7354 prepare_to_resume.
7355 (ptid_of): New macro.
7356 * linux-x86-low.c: Include stddef.h, i386-low.h.
7357 (arch_process_info): New struct.
7358 (arch_lwp_info): New struct.
7359 (x86_linux_dr_get, x86_linux_dr_set): New functions.
7360 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7361 (i386_dr_low_get_status): New function.
7362 (x86_insert_point, x86_remove_point): New functions.
7363 (x86_stopped_by_watchpoint): New function.
7364 (x86_stopped_data_address): New function.
7365 (x86_linux_new_process, x86_linux_new_thread): New functions.
7366 (x86_linux_prepare_to_resume): New function.
7367 (the_low_target): Add entries for insert_point, remove_point,
7368 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
7369 prepare_to_resume.
7370 * server.c (debug_hw_points): New global.
7371 (monitor_show_help): Document set debug-hw-points.
7372 (handle_query): Process "set debug-hw-points".
7373 * server.h (debug_hw_points): Declare.
7374 (paddress): Declare.
7375 * utils.c (NUMCELLS, CELLSIZE): New macros.
7376 (get_sell, xsnprintf, paddress): New functions.
7377 * win32-arm-low.c (the_low_target): Add entries for insert_point,
7378 remove_point, stopped_by_watchpoint, stopped_data_address.
7379 * win32-i386-low.c: Include i386-low.h.
7380 (debug_reg_state): Replaces dr.
7381 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7382 (i386_dr_low_get_status): New function.
7383 (i386_insert_point, i386_remove_point): New functions.
7384 (i386_stopped_by_watchpoint): New function.
7385 (i386_stopped_data_address): New function.
7386 (i386_initial_stuff): Update.
7387 (get_thread_context,set_thread_context,i386_thread_added): Update.
7388 (the_low_target): Add entries for insert_point,
7389 remove_point, stopped_by_watchpoint, stopped_data_address.
7390 * win32-low.c (win32_insert_watchpoint): New function.
7391 (win32_remove_watchpoint): New function.
7392 (win32_stopped_by_watchpoint): New function.
7393 (win32_stopped_data_address): New function.
7394 (win32_target_ops): Add entries for insert_watchpoint,
7395 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
7396 * win32-low.h (win32_target_ops): New members insert_point,
7397 remove_point, stopped_by_watchpoint, stopped_data_address.
7398
d993e290
PA
73992009-06-25 Pedro Alves <pedro@codesourcery.com>
7400
7401 * server.c (process_serial_event): Re-return unsupported, not
7402 error, if the type isn't recognized. Re-allow supporting only
7403 insert or remove packets. Also call require_running for
7404 breakpoints. Add missing break statement to default case. Tidy.
7405 * target.h (struct target_ops): Rename insert_watchpoint to
7406 insert_point, and remove_watchpoint to remove_point.
7407
7408 * linux-low.h (struct linux_target_ops): Likewise.
7409 * linux-low.c (linux_insert_watchpoint): Rename to ...
7410 (linux_insert_point): ... this. Adjust.
7411 (linux_remove_watchpoint): Rename to ...
7412 (linux_remove_point): ... this. Adjust.
7413 (linux_target_ops): Adjust.
7414 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
7415 (cris_insert_point): ... this.
7416 (cris_remove_watchpoint): Rename to ...
7417 (cris_remove_point): ... this.
7418 (the_low_target): Adjust.
7419
0f54c268
PM
74202009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
7421
7422 * server.c (handle_v_kill): Pass signal_pid to
7423 kill_inferior if multi_process is zero.
7424
c6314022
AR
74252009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
7426
7427 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
7428 * target.h (target_ops): Comment for *_watchpoint to make it clear
7429 the functions can get types '0' and '1'.
7430
4463ce24
AR
74312009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
7432
7433 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
7434 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
7435 * regcache.c (get_regcache): Likewise.
7436 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
7437 * win32-low.c (child_fetch_inferior_registers): Remove check for
7438 regno 0.
7439
cf8fd78b
PA
74402009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
7441 Pedro Alves <pedro@codesourcery.com>
7442
7443 * target.h (struct target_ops) <supports_multi_process>: New
7444 callback.
7445 (target_supports_multi_process): New.
7446 * server.c (handle_query): Even if GDB reports support, only
7447 enable multi-process if the target also supports it. Report
7448 multi-process support only if the target backend supports it.
7449 * linux-low.c (linux_supports_multi_process): New function.
7450 (linux_target_ops): Install it as target_supports_multi_process
7451 callback.
7452
47c0c975
DE
74532009-05-24 Doug Evans <dje@google.com>
7454
e09875d4
DE
7455 Global renaming of find_thread_pid to find_thread_ptid.
7456 * server.h (find_thread_ptid): Renamed from find_thread_pid.
7457 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
7458 All callers updated.
7459
e27d73f6
DE
7460 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
7461 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
7462 directly.
7463
47c0c975
DE
7464 * linux-low.c (get_stop_pc): Print pc if debug_threads.
7465 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
7466 (linux_resume_one_lwp): Ditto.
7467
2acc282a
DE
74682009-05-23 Doug Evans <dje@google.com>
7469
7470 * linux-low.c (linux_resume_one_lwp): Change type of first arg
7471 from struct inferior_list_entry * to struct lwp_info *.
7472 All callers updated.
7473
9f1036c1
DE
74742009-05-13 Doug Evans <dje@google.com>
7475
7476 * linux-x86-low.c: Don't include assert.h.
7477 (x86_siginfo_fixup): Use fatal, not assert.
7478 (x86_arch_setup): Fix comment.
7479
d0722149
DE
74802009-05-12 Doug Evans <dje@google.com>
7481
7482 Biarch support for i386/amd64 gdbserver.
7483 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
7484 Add linux-x86-low.c.
7485 (linux-i386-low.o, linux-x86-64-low.o): Delete.
7486 (linux-x86-low.o): Add.
7487 * linux-x86-64-low.c: Delete.
7488 * linux-i386-low.c: Delete.
7489 * linux-x86-low.c: New file.
7490 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
7491 linux-x86-low.o.
7492 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
7493 linux-x86-low.o.
7494 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
7495 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
7496 (linux_child_pid_to_exec_file): New function.
7497 (elf_64_header_p, elf_64_file_p): New functions.
7498 (siginfo_fixup): New function.
7499 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
7500 give target a chance to convert layout.
7501 * linux-low.h (linux_target_ops): New member siginfo_fixup.
7502 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
7503
fdeb2a12
DE
75042009-05-07 Doug Evans <dje@google.com>
7505
7506 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
7507 (regsets_store_inferior_registers): Ditto.
7508
a6dbe5df
PA
75092009-05-06 Pedro Alves <pedro@codesourcery.com>
7510
7511 PR server/10048
7512
7513 * linux-low.c (must_set_ptrace_flags): Delete.
7514 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
7515 of the global.
7516 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
7517 `lwp->must_set_ptrace_flags' instead.
ba42693b 7518 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
7519 (linux_wait_1): ... not here.
7520
5091eb23
DE
75212009-04-30 Doug Evans <dje@google.com>
7522
9f767825
DE
7523 * inferiors.c (started_inferior_callback): New function.
7524 (attached_inferior_callback): New function.
7525 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
7526 * server.c (print_started_pid, print_attached_pid): New functions.
7527 (detach_or_kill_for_exit): New function.
7528 (main): Call it instead of for_each_inferior (kill_inferior_callback).
7529 * server.h (have_started_inferiors_p): Declare.
7530 (have_attached_inferiors_p): Declare.
7531
5091eb23
DE
7532 * inferiors.c (remove_process): Fix memory leak, free process.
7533 * linux-low.c (linux_remove_process): New function.
7534 (linux_kill): Call it instead of remove_process.
7535 (linux_detach, linux_wait_1): Ditto.
7536
155c8968
PA
75372009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
7538
7539 * configure.srv: Add x86 Windows CE target.
7540
7fe519cb
UW
75412009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7542
7543 * inferiors.c (get_thread_process): Make global.
7544 * server.h (get_thread_process): Add prototype.
7545 * thread-db.c (find_one_thread): Use get_thread_process
7546 instead of current_process.
7547 (thread_db_get_tls_address): Do not crash if called when
7548 thread layer is not yet initialized.
7549
5472f405
UW
75502009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7551
7552 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
7553 * spu-low.c (current_tid): Rename to ...
7554 (current_ptid): ... this.
7555 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
7556 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
7557 ptid_get_lwp (current_ptid) instead of current_tid.
7558 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
7559 instead of current_tid. Use find_process_pid to verify pid
7560 argument is valid. Pass proper argument to remove_process.
7561 (spu_thread_alive): Compare current_ptid instead of current_tid.
7562 (spu_resume): Likewise.
7563
55ac2b99
PA
75642009-04-02 Pedro Alves <pedro@codesourcery.com>
7565
7566 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
7567 variable.
7568
95954743
PA
75692009-04-01 Pedro Alves <pedro@codesourcery.com>
7570
7571 Implement the multiprocess extensions, and add linux multiprocess
7572 support.
7573
7574 * server.h (ULONGEST): Declare.
7575 (struct ptid, ptid_t): New.
7576 (minus_one_ptid, null_ptid): Declare.
7577 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7578 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
7579 (struct inferior_list_entry): Change `id' type from unsigned from
7580 to ptid_t.
7581 (struct sym_cache, struct breakpoint, struct
7582 process_info_private): Forward declare.
7583 (struct process_info): Declare.
7584 (current_process): Declare.
7585 (all_processes): Declare.
7586 (initialize_inferiors): Declare.
7587 (add_thread): Adjust to use ptid_t.
7588 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
7589 (add_process, remove_process, find_thread_pid): Declare.
7590 (find_inferior_id): Adjust to use ptid_t.
7591 (cont_thread, general_thread, step_thread): Change type to ptid_t.
7592 (multi_process): Declare.
7593 (push_event): Adjust to use ptid_t.
7594 (read_ptid, write_ptid): Declare.
7595 (prepare_resume_reply): Adjust to use ptid_t.
7596 (clear_symbol_cache): Declare.
7597 * inferiors.c (all_processes): New.
7598 (null_ptid, minus_one_ptid): New.
7599 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7600 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
7601 (add_thread): Change unsigned long to ptid. Remove gdb_id
7602 parameter. Adjust.
7603 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
7604 (gdb_id_to_thread): Rename to ...
7605 (find_thread_pid): ... this. Change unsigned long to ptid.
7606 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
7607 (loaded_dll, pull_pid_from_list): Adjust.
7608 (add_process, remove_process, find_process_pid)
7609 (get_thread_process, current_process, initialize_inferiors): New.
7610 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
7611 (struct target_waitstatus) <related_pid>: Ditto.
7612 (struct target_ops) <kill, detach>: Add `pid' argument. Change
7613 return type to int.
7614 (struct target_ops) <join>: Add `pid' argument.
7615 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
7616 (struct target_ops) <wait>: Add `ptid' field. Change return type
7617 to ptid.
7618 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
7619 (mywait): Add `ptid' argument. Change return type to ptid_t.
7620 (target_pid_to_str): Declare.
7621 * target.c (set_desired_inferior): Adjust to use ptids.
7622 (mywait): Add new `ptid' argument. Adjust.
7623 (target_pid_to_str): New.
7624 * mem-break.h (free_all_breakpoints): Declare.
7625 * mem-break.c (breakpoints): Delelete.
7626 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
7627 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
7628 to use per-process breakpoint list.
7629 (free_all_breakpoints): New.
7630 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
7631 (symbol_cache, all_symbols_looked_up): Delete.
7632 (hexchars): New.
7633 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
7634 read_ptid): New.
7635 (prepare_resume_reply): Change ptid argument's type from unsigned
7636 long to ptid_t. Adjust. Implement W;process and X;process.
7637 (free_sym_cache, clear_symbol_cache): New.
7638 (look_up_one_symbol): Adjust to per-process symbol cache. *
7639 * server.c (cont_thread, general_thread, step_thread): Change type
7640 to ptid_t.
7641 (attached): Delete.
7642 (multi_process): New.
7643 (last_ptid): Change type to ptid_t.
7644 (struct vstop_notif) <ptid>: Change type to ptid_t.
7645 (queue_stop_reply, push_event): Change `ptid' argument's type to
7646 ptid_t.
7647 (discard_queued_stop_replies): Add `pid' argument.
7648 (start_inferior): Adjust to use ptids. Adjust to mywait interface
7649 changes. Don't reference the `attached' global.
7650 (attach_inferior): Adjust to mywait interface changes.
7651 (handle_query): Adjust to use ptids. Parse GDB's qSupported
7652 features. Handle and report "multiprocess+". Handle
7653 "qAttached:PID".
7654 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
7655 changes.
7656 (handle_v_kill): New.
7657 (handle_v_stopped): Adjust to use target_pid_to_str.
7658 (handle_v_requests): Allow multiple attaches and runs when
7659 multiprocess extensions are in effect. Handle "vKill".
7660 (myresume): Adjust to use ptids.
7661 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
7662 (handle_status): Adjust to discard_queued_stop_replies interface
7663 change.
7664 (first_thread_of, kill_inferior_callback)
7665 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
7666 (main): Call initialize_inferiors. Adjust to use ptids, killing
7667 and detaching from all inferiors. Handle multiprocess packet
7668 variants.
7669 * linux-low.h: Include gdb_proc_service.h.
7670 (struct process_info_private): New.
7671 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
7672 <lwpid_of>: Use ptid_get_lwp.
7673 (get_lwp_thread): Adjust.
7674 (struct lwp_info): Add `dead' member.
7675 (find_lwp_pid): Declare.
7676 * linux-low.c (thread_db_active): Delete.
7677 (new_inferior): Adjust comment.
7678 (inferior_pid): Delete.
7679 (linux_add_process): New.
7680 (handle_extended_wait): Adjust.
7681 (add_lwp): Change unsigned long to ptid.
7682 (linux_create_inferior): Add process to processes table. Adjust
7683 to use ptids. Don't set new_inferior here.
7684 (linux_attach_lwp): Rename to ...
7685 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
7686 it. Adjust to use ptids.
7687 (linux_attach_lwp): New.
7688 (linux_attach): Add process to processes table. Don't set
7689 new_inferior here.
7690 (struct counter): New.
7691 (second_thread_of_pid_p, last_thread_of_process_p): New.
7692 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
7693 multiple processes.
7694 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
7695 processes. Remove process from process table.
7696 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
7697 to multiple processes.
7698 (any_thread_of): New.
7699 (linux_detach): Add `pid' argument, and handle it. Remove process
7700 from processes table.
7701 (linux_join): Add `pid' argument. Handle it.
7702 (linux_thread_alive): Change unsighed long argument to ptid_t.
7703 Consider dead lwps as not being alive.
7704 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
7705 threads we're not interested in.
7706 (same_lwp, find_lwp_pid): New.
7707 (linux_wait_for_lwp): Change `pid' argument's type from int to
7708 ptid_t. Adjust.
7709 (linux_wait_for_event): Rename to ...
7710 (linux_wait_for_event_1): ... this. Change `pid' argument's type
7711 from int to ptid_t. Adjust.
7712 (linux_wait_for_event): New.
7713 (linux_wait_1): Add `ptid' argument. Change return type to
7714 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
7715 that exit from the process table.
7716 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
7717 Adjust.
7718 (mark_lwp_dead): New.
7719 (wait_for_sigstop): Adjust to use ptids. If a process exits while
7720 stopping all threads, mark its main lwp as dead.
7721 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
7722 ptids.
7723 (fetch_register, usr_store_inferior_registers)
7724 (regsets_fetch_inferior_registers)
7725 (regsets_store_inferior_registers, linux_read_memory)
7726 (linux_write_memory): Inline `inferior_pid'.
7727 (linux_look_up_symbols): Adjust to use per-process
7728 `thread_db_active'.
7729 (linux_request_interrupt): Adjust to use ptids.
7730 (linux_read_auxv): Inline `inferior_pid'.
7731 (initialize_low): Don't reference thread_db_active.
7732 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
7733 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
7734 (ps_getpid): Return the pid of the current inferior.
7735 * thread-db.c (proc_handle, thread_agent): Delete.
7736 (thread_db_create_event, thread_db_enable_reporting): Adjust to
7737 per-process data.
7738 (find_one_thread): Change argument type to ptid_t. Adjust to
7739 per-process data.
7740 (maybe_attach_thread): Adjust to per-process data and ptids.
7741 (thread_db_find_new_threads): Ditto.
7742 (thread_db_init): Ditto.
7743 * spu-low.c (spu_create_inferior, spu_attach): Add process to
7744 processes table. Adjust to use ptids.
7745 (spu_kill, spu_detach): Adjust interface. Remove process from
7746 processes table.
7747 (spu_join, spu_thread_alive): Adjust interface.
7748 (spu_wait): Adjust interface. Remove process from processes
7749 table. Adjust to use ptids.
7750 * win32-low.c (current_inferior_tid): Delete.
7751 (current_inferior_ptid): New.
7752 (debug_event_ptid): New.
7753 (thread_rec): Take a ptid. Adjust.
7754 (child_add_thread): Add `pid' argument. Adjust to use ptids.
7755 (child_delete_thread): Ditto.
7756 (do_initial_child_stuff): Add `attached' argument. Add process to
7757 processes table.
7758 (child_fetch_inferior_registers, child_store_inferior_registers):
7759 Adjust.
7760 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
7761 (win32_attach): Pass 1 to do_initial_child_stuff.
7762 (win32_kill): Adjust interface. Remove process from processes
7763 table.
7764 (win32_detach): Ditto.
7765 (win32_join): Adjust interface.
7766 (win32_thread_alive): Take a ptid.
7767 (win32_resume): Adjust to use ptids.
7768 (get_child_debug_event): Ditto.
7769 (win32_wait): Adjust interface. Remove exiting process from
7770 processes table.
7771
bd99dc85
PA
77722009-04-01 Pedro Alves <pedro@codesourcery.com>
7773
7774 Non-stop mode support.
7775
7776 * server.h (non_stop): Declare.
7777 (gdb_client_data, handler_func): Declare.
7778 (delete_file_handler, add_file_handler, start_event_loop):
7779 Declare.
7780 (handle_serial_event, handle_target_event, push_event)
7781 (putpkt_notif): Declare.
7782 * target.h (enum resume_kind): New.
7783 (struct thread_resume): Replace `step' field by `kind' field.
7784 (TARGET_WNOHANG): Define.
7785 (struct target_ops) <wait>: Add `options' argument.
7786 <supports_non_stop, async, start_non_stop>: New fields.
7787 (target_supports_non_stop, target_async): New.
7788 (start_non_stop): Declare.
7789 (mywait): Add `options' argument.
7790 * target.c (mywait): Add `options' argument. Print child exit
7791 notifications here.
7792 (start_non_stop): New.
7793 * server.c (non_stop, own_buf, mem_buf): New globals.
7794 (struct vstop_notif): New.
7795 (notif_queue): New global.
7796 (queue_stop_reply, push_event, discard_queued_stop_replies)
7797 (send_next_stop_reply): New.
7798 (start_inferior): Adjust to use resume_kind. Adjust to mywait
7799 interface changes.
7800 (attach_inferior): In non-stop mode, don't wait for the target
7801 here.
7802 (handle_general_set): Handle QNonStop.
7803 (handle_query): When handling qC, return the current general
7804 thread, instead of the first thread of the list.
7805 (handle_query): If the backend supports non-stop mode, include
7806 QNonStop+ in the qSupported query response.
7807 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
7808 and non-stop mode.
7809 (handle_v_attach, handle_v_run): Handle non-stop mode.
7810 (handle_v_stopped): New.
7811 (handle_v_requests): Report support for vCont;t. Handle vStopped.
7812 (myresume): Adjust to use resume_kind. Handle non-stop.
7813 (queue_stop_reply_callback): New.
7814 (handle_status): Handle non-stop mode.
7815 (main): Clear non_stop flag on reconnection. Use the event-loop.
7816 Refactor serial protocol handling from here ...
7817 (process_serial_event): ... to this new function. When GDB
7818 selects any thread, select one here. In non-stop mode, wait until
7819 GDB acks all pending events before exiting.
7820 (handle_serial_event, handle_target_event): New.
7821 * remote-utils.c (remote_open): Install remote_desc in the event
7822 loop.
7823 (remote_close): Remove remote_desc from the event loop.
7824 (putpkt_binary): Rename to...
7825 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
7826 (putpkt_binary): New as wrapper around putpkt_binary_1.
7827 (putpkt_notif): New.
7828 (prepare_resume_reply): In non-stop mode, don't change the
7829 general_thread.
7830 * event-loop.c: New.
7831 * Makefile.in (OBJ): Add event-loop.o.
7832 (event-loop.o): New rule.
7833
7834 * linux-low.h (pid_of): Moved here.
7835 (lwpid_of): New.
7836 (get_lwp_thread): Use lwpid_of.
7837 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
7838 * linux-low.c (pid_of): Delete.
7839 (inferior_pid): Use lwpid_of.
7840 (linux_event_pipe): New.
7841 (target_is_async_p): New.
7842 (delete_lwp): New.
7843 (handle_extended_wait): Use lwpid_of.
7844 (add_lwp): Don't set lwpid field.
7845 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
7846 (linux_kill_one_lwp): If killing a running lwp, stop it first.
7847 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
7848 (linux_detach_one_lwp): If detaching from a running lwp, stop it
7849 first. Adjust to linux_wait_for_event interface changes. Use
7850 lwpid_of.
7851 (linux_detach): Don't delete the main lwp here.
7852 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
7853 (status_pending_p): Don't consider explicitly suspended lwps.
7854 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
7855 pointer. Add OPTIONS argument. Change return type to int. Use
7856 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
7857 (linux_wait_for_event): Take an integer pid instead of a lwp_info
7858 pointer. Add status pointer argument. Return a pid instead of a
7859 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
7860 changes. In non-stop mode, don't switch to a random thread.
7861 (linux_wait): Rename to...
7862 (linux_wait_1): ... this. Add target_options argument, and handle
7863 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
7864 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
7865 clean exit and signal exit code. Don't stop all threads in
7866 non-stop mode. In all-stop mode, only stop all threads when
7867 reporting a stop to GDB. Handle explicit thread stop requests.
7868 (async_file_flush, async_file_mark): New.
7869 (linux_wait): New.
7870 (send_sigstop): Use lwpid_of.
7871 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
7872 interface changes. In non-stop mode, don't switch to a random
7873 thread.
7874 (linux_resume_one_lwp): Use lwpid_of.
7875 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
7876 (linux_resume_one_thread): ... this. Handle resume_stop. In
7877 non-stop mode, don't look for pending flag in all threads.
7878 (resume_status_pending_p): Don't consider explicitly suspended
7879 threads.
7880 (my_waitpid): Reimplement. Emulate __WALL.
7881 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
7882 Use lwpid_of.
7883 (sigchld_handler, linux_supports_non_stop, linux_async)
7884 (linux_start_non_stop): New.
7885 (linux_target_ops): Register linux_supports_non_stop, linux_async
7886 and linux_start_non_stop.
7887 (initialize_low): Install SIGCHLD handler.
7888 * thread-db.c (thread_db_create_event, find_one_thread)
7889 (thread_db_get_tls_address): Use lwpid_of.
7890 * win32-low.c (win32_detach): Adjust to use resume_kind.
7891 (win32_wait): Add `options' argument.
7892 * spu-low.c (spu_resume): Adjust to use resume_kind.
7893 (spu_wait): Add `options' argument.
7894
5b1c542e
PA
78952009-04-01 Pedro Alves <pedro@codesourcery.com>
7896
7897 Decouple target code from remote protocol.
7898
7899 * target.h (enum target_waitkind): New.
7900 (struct target_waitstatus): New.
7901 (struct target_ops) <wait>: Return an unsigned long. Take a
7902 target_waitstatus pointer instead of a char pointer.
7903 (mywait): Likewise.
7904 * target.c (mywait): Change prototype to return an unsigned long.
7905 Take a target_waitstatus pointer instead of a char pointer. Adjust.
7906 * server.h (thread_from_wait, old_thread_from_wait): Delete
7907 declarations.
7908 (prepare_resume_reply): Change prototype to take a
7909 target_waitstatus.
7910 * server.c (thread_from_wait, old_thread_from_wait): Delete.
7911 (last_status, last_ptid): New.
7912 (start_inferior): Remove "statusptr" argument. Adjust. Return a
7913 pid instead of a signal.
7914 (attach_inferior): Remove "status" and "signal" parameters.
7915 Adjust.
7916 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
7917 not as an address.
7918 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
7919 (handle_v_requests, myresume): Remove "status" and "signal"
7920 parameters. Adjust.
7921 (handle_status): New.
7922 (main): Delete local `status'. Adjust.
7923 * remote-utils.c: Include target.h.
7924 (prepare_resume_reply): Change prototype to take a
7925 target_waitstatus. Adjust.
7926
7927 * linux-low.c (linux_wait): Adjust to new target_ops->wait
7928 interface.
7929 * spu-low.c (spu_wait): Adjust.
7930 * win32-low.c (enum target_waitkind, struct target_waitstatus):
7931 Delete.
7932 (win32_wait): Adjust.
7933
2bd7c093
PA
79342009-04-01 Pedro Alves <pedro@codesourcery.com>
7935
7936 * target.h (struct thread_resume): Delete leave_stopped member.
7937 (struct target_ops): Add a `n' argument to the `resume' callback.
7938 * server.c (start_inferior): Adjust.
7939 (handle_v_cont, myresume): Adjust.
7940 * linux-low.c (check_removed_breakpoint): Adjust to resume
7941 interface change, and to removed leave_stopped field.
7942 (resume_ptr): Delete.
7943 (struct thread_resume_array): New.
7944 (linux_set_resume_request): Add new `arg' parameter. Adjust to
7945 resume interface change.
7946 (linux_continue_one_thread, linux_queue_one_thread)
7947 (resume_status_pending_p): Check if the resume field is NULL
7948 instead of checking the leave_stopped member.
7949 (linux_resume): Adjust to the target resume interface change.
7950 * spu-low.c (spu_resume): Adjust to the target resume interface
7951 change.
7952 * win32-low.c (win32_detach, win32_resume): Ditto.
7953
c35fafde
PA
79542009-04-01 Pedro Alves <pedro@codesourcery.com>
7955
7956 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
7957 flag.
7958 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
7959 pending.
7960 (linux_continue_one_thread): Only preserve the stepping flag if
7961 there's a pending breakpoint.
7962
0a59d50b
PA
79632009-03-31 Pedro Alves <pedro@codesourcery.com>
7964
7965 * server.c (main): After the inferior having exited, call
7966 remote_close before exiting gdbserver.
7967
f04c6d38
TJB
79682009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
7969
7970 Fix size of FPSCR in Power 7 processors.
7971 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
7972 (PPC_FEATURE_HAS_DFP): New #define.
7973 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
7974 size of the FPSCR.
7975
78e5cee6
PA
79762009-03-23 Pedro Alves <pedro@codesourcery.com>
7977
7978 * server.c (handle_query) Whitespace and formatting.
7979
1b3f6016
PA
79802009-03-22 Pedro Alves <pedro@codesourcery.com>
7981
7982 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
7983 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
7984 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
7985 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
7986 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
7987 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
7988 Makefile.in, configure.ac: Fix whitespace throughout.
7989 * configure: Regenerate.
7990
a07b2135
PA
79912009-03-22 Pedro Alves <pedro@codesourcery.com>
7992
7993 * inferiors.c (find_inferior): Make it safe for the callback
7994 function to delete the currently iterated inferior.
7995
67cc2626
PA
79962009-03-22 Pedro Alves <pedro@codesourcery.com>
7997
7998 * Makefile.in (linuw_low_h): Move higher.
7999 (thread-db.o): Depend on $(linux_low_h).
8000
54a0b537
PA
80012009-03-17 Pedro Alves <pedro@codesourcery.com>
8002
8003 Rename "process" to "lwp" throughout.
8004
8005 * linux-low.c (all_processes): Rename to...
8006 (all_lwps): ... this.
8007 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
8008 (add_process): Rename to ...
8009 (add_lwp): ... this. Adjust.
8010 (linux_create_inferior): Adjust.
8011 (linux_attach_lwp): Adjust.
8012 (linux_attach): Adjust.
8013 (linux_kill_one_process): Rename to ...
8014 (linux_kill_one_lwp): ... this. Adjust.
8015 (linux_kill): Adjust.
8016 (linux_detach_one_process): Rename to ...
8017 (linux_detach_one_lwp): ... this. Adjust.
8018 (linux_detach): Adjust.
8019 (check_removed_breakpoint): Adjust.
8020 (status_pending_p): Adjust.
8021 (linux_wait_for_process): Rename to ...
8022 (linux_wait_for_lwp): ... this. Adjust.
8023 (linux_wait_for_event): Adjust.
8024 (send_sigstop): Adjust.
8025 (wait_for_sigstop): Adjust.
8026 (stop_all_processes): Rename to ...
8027 (stop_all_lwps): ... this.
8028 (linux_resume_one_process): Rename to ...
8029 (linux_resume_one_lwp): ... this. Adjust.
8030 (linux_set_resume_request, linux_continue_one_thread)
8031 (linux_queue_one_thread, resume_status_pending_p)
8032 (usr_store_inferior_registers, regsets_store_inferior_registers)
8033 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8034 Adjust.
8035 * linux-low.h (get_process): Rename to ...
8036 (get_lwp): ... this. Adjust.
8037 (get_thread_process): Rename to ...
8038 (get_thread_lwp): ... this. Adjust.
8039 (get_process_thread): Rename to ...
8040 (get_lwp_thread): ... this. Adjust.
8041 (struct process_info): Rename to ...
8042 (struct lwp_info): ... this.
8043 (all_processes): Rename to ...
8044 (all_lwps): ... this.
8045 * proc-service.c (ps_lgetregs): Adjust.
8046 * thread-db.c (thread_db_create_event, find_one_thread)
8047 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
8048
0b16c5cf
PA
80492009-03-14 Pedro Alves <pedro@codesourcery.com>
8050
8051 * server.c (handle_query): Handle "qAttached".
8052
32de4b9d
NS
80532009-03-13 Nathan Sidwell <nathan@codesourcery.com>
8054
8055 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8056 GPLv3, update license URL.
8057
2aecd87f
DE
80582009-03-01 Doug Evans <dje@google.com>
8059
93efd302 8060 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
8061 (server_h): Add gdb_signals.h.
8062 (signals.o): Update.
8063 * server.h (target_signal_from_host,target_signal_to_host_p)
8064 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8065
86b1f9c5
PM
80662009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8067
8068 * remote-utils.c (getpkt): Also generate remote-debug
8069 information if noack_mode is set.
8070
4aa995e1
PA
80712009-02-06 Pedro Alves <pedro@codesourcery.com>
8072
8073 * server.c (handle_query): Report qXfer:siginfo:read and
8074 qXfer:siginfo:write as supported and handle them.
8075 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8076 * linux-low.c (linux_xfer_siginfo): New.
8077 (linux_target_ops): Set it.
8078
62709adf
PA
80792009-01-26 Pedro Alves <pedro@codesourcery.com>
8080
8081 * server.c (gdbserver_usage): Mention --remote-debug.
8082 (main): Accept '--remote-debug' switch.
8083
aef93bd7
DE
80842009-01-18 Doug Evans <dje@google.com>
8085
8086 * regcache.c (new_register_cache): No need to check result of xcalloc.
8087 * server.c (handle_search_memory): Back out calls to xmalloc,
8088 result is checked and error is returned to user upon failure.
8089 (handle_query): Ditto. Add more checks for result of malloc.
8090 (handle_v_cont): Check result of malloc, report error back to
8091 user upon failure.
8092 (handle_v_run): Ditto. Call freeargv.
8093 * server.h (freeargv): Declare.
8094 * utils.c (freeargv): New fn.
8095
54363045
DE
80962009-01-15 Doug Evans <dje@google.com>
8097
f626972c
DE
8098 * gdbreplay.c (perror_with_name): Make arg const char *.
8099 * server.h (target_signal_to_name): Make return type const char *.
0842e787 8100 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 8101 * utils.c (perror_with_name): Make arg const char *.
54363045 8102
18aae699
PA
81032009-01-14 Pedro Alves <pedro@codesourcery.com>
8104
8105 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8106 when handling a EXIT_PROCESS_DEBUG_EVENT.
8107
ff703abe
JB
81082009-01-06 Joel Brobecker <brobecker@adacore.com>
8109
8110 * gdbreplay.c (gdbreplay_version): Update copyright year.
8111 * server.c (gdbserver_version): Likewise.
8112
f21cc1a2 81132009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
8114
8115 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 8116 (handle_extended_wait): Improve comment.
0e21c1ec 8117
bca929d3
DE
81182008-12-13 Doug Evans <dje@google.com>
8119
8120 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8121 * server.h (ATTR_MALLOC): New macro.
8122 (xmalloc,xcalloc,xstrdup): Declare.
8123 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
8124 * inferiors.c: Ditto.
8125 * linux-low.c: Ditto.
8126 * mem-break.c: Ditto.
8127 * regcache.c: Ditto.
8128 * remote-utils.c: Ditto.
8129 * server.c: Ditto.
8130 * target.c: Ditto.
8131 * win32-low.c: Ditto.
8132
97438e3f
DE
81332008-12-12 Doug Evans <dje@google.com>
8134
896c7fbb
DE
8135 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
8136 in debugging printf.
8137
97438e3f
DE
8138 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
8139
e3b886f8
DE
81402008-12-09 Doug Evans <dje@google.com>
8141
8142 * linux-low.h (struct process_info): Delete member tid, unused.
8143 * thread-db.c (find_one_thread): Update.
8144 (maybe_attach_thread): Update.
8145
07e059b5
VP
81462008-12-02 Pedro Alves <pedro@codesourcery.com>
8147
889bf7c5
PA
8148 * target.h (struct target_ops): Add qxfer_osdata member.
8149 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
8150 and dirent.h.
8151 (linux_qxfer_osdata): New functions.
8152 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
8153 callback.
8154 * server.c (handle_query): Handle "qXfer:osdata:read:".
8155 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
8156 (buffer_xml_printf): New functions.
8157 * server.h (struct buffer): New.
8158 (buffer_grow_str, buffer_grow_str0): New macros.
8159 (buffer_grow, buffer_free, buffer_init, buffer_finish)
8160 (buffer_xml_printf): Declare.
07e059b5 8161
4cab47ab
DE
81622008-11-24 Doug Evans <dje@google.com>
8163
8164 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
8165
f142445f
DJ
81662008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
8167
8168 * server.c (handle_v_run): Always use the supplied argument list.
8169
d0107bb6 81702008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 8171
d0107bb6
BW
8172 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
8173 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 8174
2c4ad781
TJB
81752008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
8176
8177 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
8178 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
8179 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
8180 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
8181 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
8182 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
8183 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
8184 XML target descriptions.
8185 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
8186 when inferior is running on an ISA 2.05 or later processor. Add
8187 special case to return offset for full 64-bit slot of FPSCR when
8188 in 32-bits.
8189
dfb64f85
DJ
81902008-11-14 Daniel Gutson <dgutson@codesourcery.com>
8191
8192 * Makefile.in (SFILES, clean): Added sparc64 files.
8193 (reg-sparc64.o, reg-sparc64.c): New.
8194 * configure.srv (sparc*-*-linux*): New configuration.
8195 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
8196 syscall arguments for SPARC.
8197 (regsets_store_inferior_registers): Likewise.
8198 * linux-sparc-low.c: New file.
8199
66b6e1dd
DE
82002008-10-21 Doug Evans <dje@google.com>
8201
8202 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
8203 (READLINE_DIR,READLINE_DEP): Delete.
8204 (INTERNAL_CFLAGS): Update.
8205 (LINTFLAGS): Update.
8206
9b710a42
PA
82072008-10-10 Pedro Alves <pedro@codesourcery.com>
8208
8209 * server.c (handle_v_run): If GDB didn't specify an argv, use the
8210 whole argv from the last run, not just argv[0].
8211
5822d809
PA
82122008-09-08 Pedro Alves <pedro@codesourcery.com>
8213
8214 * regcache.c (new_register_cache): Return NULL if the register
8215 cache size isn't known yet.
8216 (free_register_cache): Avoid dereferencing a NULL regcache.
8217
74aac56f
DJ
82182008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8219
8220 * configure.srv: Merge MIPS and MIPS64.
8221
400b20f5
MR
82222008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
8223
8224 * Makefile.in (uninstall): Apply $(EXEEXT) too.
8225
677c5bb1
LM
82262008-08-18 Luis Machado <luisgpm@br.ibm.com>
8227
8228 * Makefile.in: Add required vsx dependencies.
8229
8230 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
8231 Declare init_registers_powerpc_vsx32l.
8232 Declare init_registers_powerpc_vsx64l.
8233 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
8234 (ppc_arch_setup): Check for VSX in hwcap.
8235 (ppc_fill_vsxregset): New function.
8236 (ppc_store_vsxregset): New function.
8237 Add new VSX entry in regset_info target_regsets.
8238
8239 * configure.srv: Add new VSX dependencies.
8240
a6f3e723
SL
82412008-08-12 Pedro Alves <pedro@codesourcery.com>
8242
8243 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
8244 (remote_open): Set or clear transport_is_reliable.
8245 (putpkt_binary): Don't expect acks in noack mode.
8246 (getpkt): Don't send ack/nac in noack mode.
8247 * server.c (handle_general_set): Handle QStartNoAckMode.
8248 (handle_query): If connected by tcp pass QStartNoAckMode+ in
8249 qSupported.
8250 (main): Reset noack_mode on every connection.
8251 * server.h (noack_mode): Declare.
8252
a417dc56
RW
82532008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8254
8255 * Makefile.in (GDBREPLAY_OBS): New variable.
8256 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
8257
3221518c
UW
82582008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
8259 Daniel Jacobowitz <dan@codesourcery.com>
8260
8261 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
8262 (usr_store_inferior_registers): Likewise.
8263 (regsets_store_inferior_registers): Likewise.
8264
ec56be1b
PA
82652008-07-31 Rolf Jansen <rj@surtec.com>
8266 Pedro Alves <pedro@codesourcery.com>
8267
8268 * configure.ac: Check for memmem declaration.
8269 * server.c [HAVE_MALLOC_H]: Include malloc.h.
8270 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
8271 (disable_packet_qfThreadInfo): Unconditionally compile.
8272 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
8273 * configure, config.in: Regenerate.
8274
2fe5e3ff
DE
82752008-07-28 Doug Kwan <dougkwan@google.com>
8276
8277 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
8278 (linux_write_memory): Remove declaration of errno.
8279
836acd6d
UW
82802008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
8281
8282 * linux-low.c (handle_extended_wait): Do not use "status"
8283 variable uninitialized.
8284
aeba519e
PA
82852008-07-07 Pedro Alves <pedro@codesourcery.com>
8286
8287 * server.c (handle_v_attach): Inhibit reporting dll changes.
8288
db42f210
PA
82892008-06-27 Pedro Alves <pedro@codesourcery.com>
8290
8291 * remote-utils.c (prepare_resume_reply): If requested, don't
8292 output "thread:TID" in the T stop reply.
8293
8294 * server.c (disable_packet_vCont, disable_packet_Tthread)
8295 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
8296 (handle_query): If requested, disable support for qC, qfThreadInfo
8297 and qsThreadInfo.
8298 (handle_v_requests): If requested, disable support for vCont.
8299 (gdbserver_show_disableable): New.
8300 (main): Handle --disable-packet and --disable-packet=LIST.
8301
8302 * server.h (disable_packet_vCont, disable_packet_Tthread)
8303 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
8304
8e4c5421
CD
83052008-06-20 Carlos O'Donell <carlos@codesourcery.com>
8306
8307 * server.c (gdbserver_usage): Mention --version.
8308
6e23a804
DJ
83092008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
8310
8311 * Makefile.in (gdbreplay.o): New rule.
8312
90aa6a40
JM
83132008-06-06 Joseph Myers <joseph@codesourcery.com>
8314
8315 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
8316 message, not gdbserver.
8317
c16158bc 83182008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
8319 Nathan Sidwell <nathan@codesourcery.com>
8320 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
8321
8322 * acinclude.m4: Include ../../config/acx.m4.
8323 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
8324 * configure, config.in: Regenerate.
8325 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
8326 * server.c (gdbserver_version): Print PKGVERSION.
8327 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
8328 (main): Adjust gdbserver_usage calls.
8329 * gdbreplay.c (version, host_name): Add declarations.
8330 (gdbreplay_version, gdbreplay_usage): New.
8331 (main): Accept --version and --help options.
8332
aeb75bf5
DJ
83332008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
8334
8335 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
8336 (arm_breakpoint_at): Handle Thumb.
8337 (the_low_target): Add comment.
8338
76b233dd
UW
83392008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
8340
8341 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
8342
08388c79
DE
83432008-05-09 Doug Evans <dje@google.com>
8344
a3c83fae
DE
8345 * server.h (decode_search_memory_packet): Declare.
8346 * remote-utils.c (decode_search_memory_packet): New fn.
8347 * server.c (handle_search_memory_1): New fn.
08388c79
DE
8348 (handle_search_memory): New fn.
8349 (handle_query): Process qSearch:memory packets.
8350
bb9c3d36
UW
83512008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
8352
8353 * regcache.c (registers_length): Remove.
8354 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
8355 full register packet.
8356 * regcache.h (registers_length): Remove prototype.
8357 * server.h (PBUFSIZ): Define to 16384.
8358
7284e1be
UW
83592008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
8360
8361 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
8362 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
8363 powerpc-64l.o, and powerpc-altivec64l.o.
8364 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
8365 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
8366 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
8367 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
8368 rs6000/power-linux.xml, and rs6000/power64-linux.xml
8369 to srv_xmlfiles.
8370
8371 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
8372 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
8373 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
8374 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
8375 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
8376 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
8377 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
8378 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
8379 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
8380 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
8381 (clean): Update.
8382
8383 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
8384 (init_registers_powerpc_32l): ... this new prototype.
8385 (init_registers_powerpc_32): Remove, replace by ...
8386 (init_registers_powerpc_altivec32l): ... this new prototype.
8387 (init_registers_powerpc_e500): Remove, replace by ...
8388 (init_registers_powerpc_e500l): ... this new prototype.
8389 (init_registers_ppc64): Remove, replace by ...
8390 (init_registers_powerpc_64l): ... this new prototype.
8391 (init_registers_powerpc_64): Remove, replace by ...
8392 (init_registers_powerpc_altivec64l): ... this new prototype.
8393 (ppc_num_regs): Set to 73.
8394 (PT_ORIG_R3, PT_TRAP): Define if necessary.
8395 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
8396 (ppc_cannot_store_register): Handle orig_r3 and trap.
8397 (ppc_arch_setup): Update init_registers_... calls.
8398 (ppc_fill_gregset): Handle orig_r3 and trap.
8399
8400 * inferiors.c (clear_inferiors): Reset current_inferior.
8401
fdc59709
PB
84022008-04-23 Paolo Bonzini <bonzini@gnu.org>
8403
889bf7c5
PA
8404 * acinclude.m4: Add override.m4.
8405 * configure: Regenerate.
fdc59709 8406
c9b2f845
UW
84072008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8408
8409 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
8410 initial call to init_register_ppc64.
8411
550512b8
UW
84122008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8413
43aaf8b6
PA
8414 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
8415 single powerpc*-*-linux* case.
550512b8
UW
8416 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
8417
b6430ec3
UW
84182008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
8419
8420 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 8421 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
8422 from reg_xmlfiles.
8423 * linux-ppc-low.c: Include <elf.h>.
8424 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
8425 (ppc_hwcap): New global variable.
8426 (ppc_regmap): Remove __SPE__ #ifdef sections.
8427 (ppc_regmap_e500): New global variable.
8428 (ppc_cannot_store_register): Update __SPE__ special case.
8429 (ppc_get_hwcap): New function.
8430 (ppc_arch_setup): Use it to determine whether inferior supports
8431 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
8432 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
8433 Do not access registers if target does not support AltiVec.
8434 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
8435 Do not access registers if target does not support SPE.
8436 (target_regsets): Unconditionally include AltiVec and SPE regsets.
8437
52fa2412
UW
84382008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
8439
8440 * linux-low.c (disabled_regsets, num_regsets): New.
8441 (use_regsets_p): Delete.
8442 (linux_wait_for_process): Clear disabled_regsets.
8443 (regsets_fetch_inferior_registers): Check and set it.
8444 (regsets_store_inferior_registers): Likewise.
8445 (linux_fetch_registers, linux_store_registers): Do not use
8446 use_regsets_p.
8447 (initialize_low): Allocate disabled_regsets.
8448
e28b3332
DJ
84492008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
8450
8451 * Makefile.in (LIBOBJS): New.
8452 (OBS): Use LIBOBJS.
8453 (memmem.o): New rule.
8454 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
8455 * configure: Regenerated.
8456
4536995d
UW
84572008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
8458
8459 * server.c (handle_query): Never return "unsupported" for
8460 qXfer:features:read queries.
8461
221c031f
UW
84622008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
8463
8464 * server.c (get_features_xml): Fix inverted condition.
8465 (handle_query): Always support qXfer:feature:read.
8466
ccd213ac
DJ
84672008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
8468
8469 * server.c (wrapper_argv): New.
8470 (start_inferior): Handle wrapper_argv. If set, expect an extra
8471 trap.
8472 (gdbserver_usage): Document --wrapper.
8473 (main): Parse --wrapper.
8474
6fe305f7
UW
84752008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8476
8477 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
8478 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
8479 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
8480 (ppc_set_pc): Likewise.
8481 (ppc_arch_setup): New function.
8482 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
8483 of collect_register.
889bf7c5 8484 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 8485
5b0a002e
UW
84862008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8487
8488 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
8489 instead of linux-ppc64-low.o.
8490 * linux-ppc64-low.c: Remove file.
8491 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
8492 (linux-ppc64-low.o): Remove rule.
8493
8494 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
8495 (init_registers_powerpc_64): Likewise.
8496 (ppc_regmap): Conditionally define depending on __powerpc64__.
8497 (ppc_cannot_store_register): Do not special-case "fpscr" when
8498 compiled on __powerpc64__.
8499 (ppc_collect_ptrace_register): New function.
8500 (ppc_supply_ptrace_register): New function.
8501 (ppc_breakpoint): Change type to "unsigned int".
8502 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
8503 (the_low_target): Conditionally provide initializers for the
889bf7c5 8504 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
8505 collect_ptrace_register and supply_ptrace_register members.
8506
9b4b61c8
UW
85072008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8508
8509 * regcache.h (gdbserver_xmltarget): Add extern declaration.
8510 * server.c (gdbserver_xmltarget): Define.
8511 (get_features_xml): Use it to replace "target.xml" and arch_string.
8512
8513 * configure.srv: Remove srv_xmltarget. Add XML files that were
8514 mentioned there to srv_xmlfiles instead. Remove conditional tests
8515 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
8516 srv_xmlfiles and srv_regobj to include all possible choices.
8517 * configure.ac (srv_xmltarget): Remove.
8518 (srv_xmlfiles): Do not add "target.xml".
8519 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
8520 checks for supplementary target information.
8521 * configure: Regenerate.
8522 * Makefile.in (XML_TARGET): Remove.
8523 (target.xml): Remove rule.
8524 (clean): Do not clean up target.xml.
8525 (.PRECIOUS): Do not mention target.xml.
8526
8527 * target.h (struct target_ops): Remove arch_string member.
8528 * linux-low.c (linux_arch_string): Remove.
8529 (linux_target_ops): Remove arch_string initializer.
8530 * linux-low.h (struct linux_target_ops): Remove arch_string member.
8531 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
8532 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
8533 * spu-low.c (spu_arch_string): Remove.
8534 (spu_target_ops): Remove arch_string initializer.
8535 * win32-low.c (win32_arch_string): Remove.
8536 (win32_target_ops): Remove arch_string initializer.
8537 * win32-low.h (struct win32_target_ops): Remove arch_string member.
8538 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
8539 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
8540
ee1a7ae4
UW
85412008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8542
8543 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
8544 by collect_ptrace_register and supply_ptrace_register hooks.
8545 * linux-low.c (fetch_register): Use supply_ptrace_register callback
8546 instead of checking for the_low_target.left_pad_xfer.
8547 (usr_store_inferior_registers): Use collect_ptrace_register callback
8548 instead of checking for the_low_target.left_pad_xfer.
8549
8550 * linux-s390-low.c (s390_collect_ptrace_register): New function.
8551 (s390_supply_ptrace_register): Likewise.
8552 (s390_fill_gregset): Call s390_collect_ptrace_register.
8553 (the_low_target): Update.
8554
8555 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
8556 (ppc_supply_ptrace_register): Likewise.
8557 (the_low_target): Update.
8558
8559 * linux-i386-low.c (the_low_target): Update.
8560 * linux-x86-64-low.c (the_low_target): Update.
8561
d61ddec4
UW
85622008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8563
8564 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
8565 reg-s390.o and reg-s390x.o.
8566
8567 * linux-low.c (new_inferior): New global variable.
8568 (linux_create_inferior, linux_attach): Set it.
8569 (linux_wait_for_process): Call the_low_target.arch_setup after the
8570 target has stopped for the first time.
8571 (initialize_low): Do not call the_low_target.arch_setup.
8572
8573 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
8574 (s390_set_pc): Likewise.
8575 (s390_arch_setup): New function.
8576 (the_low_target): Use s390_arch_setup as arch_setup routine.
8577
8578 * regcache.c (realloc_register_cache): New function.
8579 (set_register_cache): Call it for each existing regcache.
8580
d05b4ac3
UW
85812008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8582
8583 * server.h (init_registers): Remove prototype.
8584
8585 * linux-low.h (struct linux_target_ops): Add arch_setup field.
8586 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
8587 instead of init_registers ().
8588 * linux-arm-low.c (init_registers_arm): Add prototype.
8589 (init_registers_arm_with_iwmmxt): Likewise.
8590 (the_low_target): Add initializer for arch_setup field.
8591 * linux-cris-low.c (init_registers_cris): Add prototype.
8592 (the_low_target): Add initializer for arch_setup field.
8593 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
8594 (the_low_target): Add initializer for arch_setup field.
8595 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
8596 (the_low_target): Add initializer for arch_setup field.
8597 * linux-ia64-low.c (init_registers_ia64): Add prototype.
8598 (the_low_target): Add initializer for arch_setup field.
8599 * linux-m32r-low.c (init_registers_m32r): Add prototype.
8600 (the_low_target): Add initializer for arch_setup field.
8601 * linux-m68k-low.c (init_registers_m68k): Add prototype.
8602 (the_low_target): Add initializer for arch_setup field.
8603 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
8604 (init_registers_mips64_linux): Likewise.
8605 (the_low_target): Add initializer for arch_setup field.
8606 * linux-ppc-low.c (init_registers_ppc): Add prototype.
8607 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
8608 (the_low_target): Add initializer for arch_setup field.
8609 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
8610 (init_registers_powerpc_64): Likewise.
8611 (the_low_target): Add initializer for arch_setup field.
8612 * linux-s390-low.c (init_registers_s390): Add prototype.
8613 (init_registers_s390x): Likewise.
8614 (the_low_target): Add initializer for arch_setup field.
8615 * linux-sh-low.c (init_registers_sh): Add prototype.
8616 (the_low_target): Add initializer for arch_setup field.
8617 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
8618 (the_low_target): Add initializer for arch_setup field.
8619 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
8620 (the_low_target): Add initializer for arch_setup field.
8621
8622 * win32-low.h (struct win32_target_ops): Add arch_setup field.
8623 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
8624 instead of init_registers ().
8625 * win32-arm-low.c (init_registers_arm): Add prototype.
8626 (the_low_target): Add initializer for arch_setup field.
8627 * win32-i386-low.c (init_registers_i386): Add prototype.
8628 (the_low_target): Add initializer for arch_setup field.
8629
8630 * spu-low.c (init_registers_spu): Add prototype.
8631 (initialize_low): Call initialie_registers_spu () instead of
8632 initialize_registers ().
8633
fd96d250
PA
86342008-02-19 Pedro Alves <pedro@codesourcery.com>
8635
8636 * server.c (handle_v_requests): When handling the vRun and vAttach
8637 packets, if already debugging a process, don't kill it. Return an
8638 error instead.
8639
d41b6bb4
DJ
86402008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
8641
8642 * server.c (handle_query): Correct length check.
8643
5ac588cf
PA
86442008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
8645
8646 * win32-low.c (do_initial_child_stuff): Add process handle
8647 parameter. Set current_process_handle and current_process_id from the
8648 parameters. Clear globals.
8649 (win32_create_inferior): Don't set current_process_handle and
8650 current_process_id here. Instead pass them on the call to
8651 do_initial_child_stuff.
8652 (win32_attach): Likewise.
8653 (win32_clear_inferiors): New.
8654 (win32_kill): Don't close the current process handle or the
8655 current thread handle here. Instead call win32_clear_inferiors.
8656 (win32_detach): Don't open a new handle to the process. Call
8657 win32_clear_inferiors.
8658 (win32_join): Don't rely on current_process_handle; open a new
8659 handle using the process id.
8660 (win32_wait): Call win32_clear_inferiors when the inferior process
8661 has exited.
8662
ecd7ecbc
DJ
86632008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
8664
8665 * server.c (monitor_show_help): Add "exit".
8666
1525d545
MG
86672008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
8668
ecd7ecbc 8669 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
8670 (clean): Add reg-xtensa.c.
8671 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
8672 * configure.srv (xtensa*-*-linux*) New target.
8673 * linux-xtensa-low.c: New.
8674 * xtensa-xtregs.c: New.
1525d545 8675
59a016f0
PA
86762008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
8677
8678 * hostio.c: Don't include errno.h.
8679 (errno_to_fileio_errno): Move to hostio-errno.
8680 * hostio.c: (hostio_error): Remove the error parameter. Defer the
8681 error number outputting to the target->hostio_last_error callback.
8682 (hostio_packet_error): Use FILEIO_EINVAL directly.
8683 (handle_open, handle_pread, hostio_error, handle_unlink): Update
8684 calls to hostio_error.
8685 * hostio-errno.c: New.
8686 * server.h (hostio_last_error_from_errno): Declare.
8687 * target.h (target_ops): Add hostio_last_error member.
8688 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
8689 as hostio_last_error handler.
889bf7c5 8690 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
8691 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
8692 (wince_hostio_last_error): New functions.
8693 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
8694 as hostio_last_error handler.
8695 (win32_target_ops) [!_WIN32_WCE]: Register
8696 hostio_last_error_from_errno as hostio_last_error handler.
8697 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
8698 (hostio-errno.o): New rule.
8699 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
8700 * configure.srv (srv_hostio_err_objs): New variable. Default to
8701 hostio-errno.o.
8702 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
8703 * configure: Regenerate.
8704
2d717e4f
DJ
87052008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8706
8707 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
8708 (linux_kill, linux_detach): Clean up the process list.
8709 * remote-utils.c (remote_open): Improve port number parsing.
8710 (putpkt_binary, input_interrupt): Only send interrupts if the target
8711 is running.
8712 * server.c (extended_protocol): Make static.
8713 (attached): Define earlier.
8714 (exit_requested, response_needed, program_argv): New variables.
8715 (target_running): New.
8716 (start_inferior): Clear attached here.
8717 (attach_inferior): Set attached here.
8718 (require_running): Define.
8719 (handle_query): Use require_running and target_running. Implement
8720 "monitor exit".
8721 (handle_v_attach, handle_v_run): New.
8722 (handle_v_requests): Use require_running. Handle vAttach and vRun.
8723 (gdbserver_usage): Update.
8724 (main): Redo argument parsing. Handle --debug and --multi. Handle
8725 --attach along with other options or after the port. Save
8726 program_argv. Support no initial program. Resynchronize
8727 communication with GDB after an error. Handle "monitor exit".
8728 Use require_running and target_running. Always allow the extended
8729 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
8730 restart in extended mode.
8731 * README: Refer to the GDB manual. Update --attach usage.
8732
7407e2de
AS
87332007-12-20 Andreas Schwab <schwab@suse.de>
8734
8735 * linux-low.c (STACK_SIZE): Define.
8736 (linux_tracefork_child): Use it. Use __clone2 on ia64.
8737 (linux_test_for_tracefork): Likewise.
8738
b65d95c5
DJ
87392007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
8740
8741 * linux-low.c (linux_wait_for_event): Update messages. Do not
8742 reinsert auto-delete breakpoints.
8743 * mem-break.c (struct breakpoint): Change return type of handler to
8744 int.
8745 (set_breakpoint_at): Update handler type.
8746 (reinsert_breakpoint_handler): Return 1 instead of calling
8747 delete_breakpoint.
8748 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
8749 setting a new one.
8750 (check_breakpoints): Delete auto-delete breakpoints and return 2.
8751 * mem-break.h (set_breakpoint_at): Update handler type.
8752 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
8753 * win32-low.c (auto_delete_breakpoint): New.
8754 (get_child_debug_event): Use it.
8755
4e799345
DJ
87562007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
8757
8758 * configure.ac: Check for pread and pwrite.
8759 * hostio.c (handle_pread): Fall back to lseek and read.
8760 (handle_pwrite): Fall back to lseek and write.
8761 * config.in, configure: Regenerated.
8762
27524b67
DJ
87632007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
8764
8765 * server.c (myresume): Add own_buf argument.
8766 (main): Update calls.
8767
a20d5e98
DJ
87682007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
8769
8770 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
8771 * remote-utils.c (remote_open): Do not call disable_async_io.
8772 (block_async_io): Delete.
8773 (unblock_async_io): Make static.
8774 (initialize_async_io): New.
8775 * server.c (handle_v_cont): Handle async I/O here.
8776 (myresume): Likewise. Move other common resume tasks here...
8777 (main): ... from here. Call initialize_async_io. Disable async
8778 I/O before the main loop.
8779 * server.h (initialize_async_io): Declare.
8780 (block_async_io, unblock_async_io): Delete prototypes.
8781 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
8782
b79d787e
DJ
87832007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
8784
8785 * remote-utils.c (readchar): Allow binary data in received messages.
8786
d97903b2
PA
87872007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8788
8789 * win32-low.c (attaching): New global.
8790 (win32_create_inferior): Clear the `attaching' global.
8791 (win32_attach): Set the `attaching' global.
8792 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
8793 attaching. Only set a breakpoint at the entry point if not
8794 attaching.
8795
311de423
PA
87962007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8797
8798 * server.c (main): Don't report dll events on the initial
8799 connection on attaches.
8800
6c2d16d2
PA
88012007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8802
8803 * server.c (main): Relax numerical bases supported for the pid of
8804 the --attach command line argument.
8805
5ca906e6
PA
88062007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8807
8808 * win32-low.c (win32_attach): Call OpenProcess before
8809 DebugActiveProcess, not after. Add last error output to error
8810 call.
8811
9c6c8194
PA
88122007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8813
8814 * win32-low.c (win32_get_thread_context)
8815 (win32_set_thread_context): New functions.
8816 (thread_rec): Use win32_get_thread_context.
8817 (continue_one_thread, win32_resume): Use win32_set_thread_context.
8818 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
8819 field.
8820
4d5d1aaa
PA
88212007-12-03 Leo Zayas
8822 Pedro Alves <pedro_alves@portugalmail.pt>
8823
8824 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
8825 global variables.
8826 (child_add_thread): Minor cleanup.
8827 (child_continue): Resume artificially suspended threads before
8828 calling ContinueDebugEvent.
8829 (suspend_one_thread): New.
8830 (fake_breakpoint_event): New.
8831 (get_child_debug_event): Change return type to int. Check here if
8832 gdb sent an interrupt request. If a soft interrupt was requested,
8833 fake a breakpoint event. Return 0 if there is no event to handle,
8834 and 1 otherwise.
8835 (win32_wait): Don't check here if gdb sent an interrupt request.
8836 Ensure there is a valid event to handle.
8837 (win32_request_interrupt): Add soft interruption method as last
8838 resort.
8839
c436e841
PA
88402007-12-03 Leo Zayas
8841 Pedro Alves <pedro_alves@portugalmail.pt>
8842
8843 * win32-low.h (win32_thread_info): Add descriptions to the
8844 structure members. Replace `suspend_count' counter by a
8845 `suspended' flag.
8846 * win32-low.c (thread_rec): Update condition of when to get the
8847 context from the inferior. Rely on ContextFlags being set if it
8848 has already been retrieved. Only suspend the inferior thread if
8849 we haven't already. Warn if that fails.
8850 (continue_one_thread): s/suspend_count/suspended/. Only call
8851 ResumeThread once. Warn if that fails.
8852
e7b5fa67
PA
88532007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
8854
8855 * win32-low.c (win32_wait): Don't read from the inferior when it
8856 has already exited.
8857
a385171d
PA
88582007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
8859
8860 * Makefile.in (win32_low_h): New variable.
8861 (win32-low.o): Add dependency on $(win32_low_h).
8862 (win32-arm-low.o, win32-i386-low.o): New rules.
8863
f80c84b3
DJ
88642007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
8865
8866 * hostio.c: Correct copyright year.
8867
a6b151f1
DJ
88682007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
8869
8870 * Makefile.in (OBS): Add hostio.o.
8871 (hostio.o): New rule.
8872 * server.h (handle_vFile): Declare.
8873 * hostio.c: New file.
8874 * server.c (handle_v_requests): Take packet_len and new_packet_len
8875 for binary packets. Call handle_vFile.
8876 (main): Update call to handle_v_requests.
8877
f9387fc3
DJ
88782007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
8879
8880 * linux-low.c: Include <sched.h>.
8881
51c2684e
DJ
88822007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
8883
8884 * linux-low.c (linux_tracefork_grandchild): New.
8885 (linux_tracefork_child): Use clone.
8886 (linux_test_for_tracefork): Use clone; allocate and free a stack.
8887
75f83163
JB
88882007-10-31 Joel Brobecker <brobecker@adacore.com>
8889
8890 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
8891
da5898ce
DJ
88922007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
8893
8894 * linux-low.c (handle_extended_wait): Handle unexpected signals.
8895
24a09b5f
DJ
88962007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
8897
8898 * inferiors.c (change_inferior_id): Delete.
8899 (add_pid_to_list, pull_pid_from_list): New.
8900 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
8901 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
8902 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
8903 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
8904 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
8905 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
8906 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
8907 (using_threads): Always set to 1.
8908 (handle_extended_wait): New.
8909 (add_process): Do not set TID.
8910 (linux_create_inferior): Set must_set_ptrace_flags.
8911 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
8912 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
8913 (linux_thread_alive): Rename TID argument to LWPID.
8914 (linux_wait_for_process): Handle unknown processes. Do not use TID.
8915 (linux_wait_for_event): Do not use TID or check using_threads. Update
8916 call to dead_thread_notify. Call handle_extended_wait.
8917 (linux_create_inferior): Use PTRACE_SETOPTIONS.
8918 (send_sigstop): Delete sigstop_sent.
8919 (wait_for_sigstop): Avoid TID.
8920 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
8921 (linux_test_for_tracefork): New.
8922 (linux_lookup_signals): Use thread_db_active and
8923 linux_supports_tracefork_flag.
8924 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
8925 * linux-low.h (get_process_thread): Avoid TID.
8926 (struct process_ifo): Move thread_known and tid to the end. Remove
8927 sigstop_sent.
8928 (linux_attach_lwp, thread_db_init): Update prototypes.
8929 * server.h (change_inferior_id): Delete prototype.
8930 (add_pid_to_list, pull_pid_from_list): New prototypes.
8931 * thread-db.c (thread_db_use_events): New.
8932 (find_first_thread): Rename to...
8933 (find_one_thread): ...this. Update callers and messages. Do not
8934 call fatal. Check thread_db_use_events. Do not call
8935 change_inferior_id or new_thread_notify.
8936 (maybe_attach_thread): Update. Do not call new_thread_notify.
8937 (thread_db_init): Set thread_db_use_events. Check use_events.
8938 * utils.c (fatal, warning): Correct message prefix.
8939
30ed0a8f
DJ
89402007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
8941
8942 * Makefile.in (clean): Remove new files.
8943 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
8944 (powerpc-64.o, powerpc-64.c): New rules.
8945 * configure.srv: Use alternate register sets for powerpc64-*-linux*
8946 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
8947 with SPE.
8948 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
8949 SPE targets.
8950 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
8951 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
8952 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
8953 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
8954 (target_regsets): Add AltiVec and SPE register sets.
8955 * configure.ac: Check for AltiVec and SPE.
8956 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
8957 (ppc_fill_vrregset, ppc_store_vrregset): New.
8958 (target_regsets): Add AltiVec register set.
8959 * configure: Regenerated.
8960
fd462a61
DJ
89612007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
8962
8963 * linux-low.c (O_LARGEFILE): Define.
8964 (linux_read_memory): Use /proc/PID/mem.
8965 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
8966 * configure, config.in: Regenerated.
8967
69f223ed
DJ
89682007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8969
8970 * linux-low.c (linux_wait_for_event): Do not pass signals while
8971 single-stepping.
8972
aec18585
PA
89732007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
8974
8975 * win32-low.c (create_process): New.
8976 (win32_create_inferior): Use create_process instead of
8977 CreateProcess. If create_process failed retry appending an ".exe"
8978 suffix. Store the GetLastError result immediatelly after
8979 create_process calls and use it on the call to error.
8980
34d86ddd
PA
89812007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
8982
8983 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
8984
5a0e3bd0
JB
89852007-08-23 Joel Brobecker <brobecker@adacore.com>
8986
8987 * configure.ac: Switch license to GPLv3.
8988
f88c79e6
MS
89892007-08-01 Michael Snyder <msnyder@access-company.com>
8990
8991 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
8992
6b3d9b83
PA
89932007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
8994
8995 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
8996 typedef.
8997 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
8998 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
8999 CloseToolhelp32Snapshot.
9000 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9001 CloseToolhelp32Snapshot.
9002
c588c53c
MS
90032007-07-27 Michael Snyder <michael.snyder@access-company.com>
9004
9005 * server.c (main): Check for inferior exit before main loop.
9006
aa0403d9
PA
90072007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
9008
9009 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
9010 instead of on tmp_desc.
9011
255e7678
DJ
90122007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
9013 Daniel Jacobowitz <dan@codesourcery.com>
9014
9015 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
9016 (add_thread): Minor cleanups.
9017 (clear_inferiors): Move lower in the file. Clear the DLL
9018 list.
9019 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9020 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9021 (xml_escape_text): New.
9022 * server.c (handle_query): Handle qXfer:libraries:read. Report it
9023 for qSupported.
9024 (handle_v_cont): Report errors.
9025 (gdbserver_version): Update.
9026 (main): Correct size of own_buf. Do not report initial DLL events.
9027 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9028 (unloaded_dll, xml_escape_text): New.
9029 * win32-low.c (enum target_waitkind): Update comments.
9030 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9031 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9032 (win32_EnumProcessModules, win32_GetModuleInformation)
9033 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9034 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9035 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9036 (win32_Module32First, win32_Module32Next, load_toolhelp)
9037 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
9038 (get_child_debug_event): Handle DLL events.
9039 (win32_wait): Likewise.
9040
0d37add9
DJ
90412007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9042
9043 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
9044 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
9045
45e2715e
PA
90462007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9047
9048 * win32-low.c (handle_output_debug_string): Ignore event if not
9049 waiting.
9050
c5674cf1
PA
90512007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9052
9053 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9054
2bbe3cc1
DJ
90552007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9056
9057 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9058
ae13219e
DJ
90592007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9060
9061 * inferiors.c (change_inferior_id): Add comment.
9062 * linux-low.c (check_removed_breakpoint): Add an early
9063 prototype. Improve debug output.
9064 (linux_attach): Doc update.
9065 (linux_detach_one_process, linux_detach): Clean up before releasing
9066 each process.
9067 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9068 * linux-low.h (struct process_info): Doc improvement.
9069 * mem-break.c (delete_all_breakpoints): New.
9070 * mem-break.h (delete_all_breakpoints): New prototype.
9071 * thread-db.c (find_first_thread): New.
9072 (thread_db_create_event): Call it instead of
9073 thread_db_find_new_threads. Clean up unused variables.
9074 (maybe_attach_thread): Remove first thread handling.
9075 (thread_db_find_new_threads): Use find_first_thread.
9076 (thread_db_get_tls_address): Likewise.
9077
4105de34
DJ
90782007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9079
9080 * thread-db.c (thread_db_find_new_threads): Add prototype.
9081 (thread_db_create_event): Check for the main thread before adding
9082 a new thread.
9083 (maybe_attach_thread): Only enable event reporting if TID == 0.
9084 (thread_db_get_tls_address): Check for new threads.
9085
2b876972
DJ
90862007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
9087
9088 * linux-low.c (linux_create_inferior): Try execv before execvp.
9089 * spu-low.c (spu_create_inferior): Likewise.
9090
7a245884
DJ
90912007-06-13 Mike Frysinger <vapier@gentoo.org>
9092
9093 * linux-low.c (linux_create_inferior): Change execv to execvp.
9094 * spu-low.c (spu_create_inferior): Likewies.
9095
117ce543
DJ
90962007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
9097
9098 * Makefile.in (clean): Clean new files instead of deleted ones.
9099 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9100 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9101 rules.
9102 * configure.srv: Specify XML files and new regformats for MIPS and
9103 MIPS64 GNU/Linux.
9104 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9105 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9106 an entry for the restart register.
9107 (mips_cannot_fetch_register, mips_cannot_store_register)
9108 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9109 register names to match the XML descriptions.
9110 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9111 restart register instead of $0.
9112
0e7f50da
UW
91132007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9114 Markus Deuling <deuling@de.ibm.com>
9115
9116 * remote-utils.c (decode_xfer_write): New function.
9117 * server.h (decode_xfer_write): Add prototype.
9118 * server.c (handle_query): Add PACKET_LEN argument. Support
9119 qXfer:spu:read and qXfer:spu:write packets.
9120 (main): Pass packet_len to handle_query.
9121 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9122 * target.h (target_ops): Add qxfer_spu.
9123
374c1d38
UW
91242007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9125
9126 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
9127 accessing non-seekable spufs files.
9128
bb63802a
UW
91292007-05-16 Markus Deuling <deuling@de.ibm.com>
9130
889bf7c5 9131 * server.c (handle_query): Add reply for qC packet.
bb63802a 9132
7390519e
PA
91332007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9134 Leo Zayas <lerele@champenstudios@com>
9135
9136 * server.h (check_remote_input_interrupt_request): New function.
9137 * remote_utils.c (INVALID_DESCRIPTOR): New define.
9138 (remote_desc): Initialize with INVALID_DESCRIPTOR.
9139 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
9140 (check_remote_input_interrupt_request): New function.
9141 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 9142 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
9143 winapi_GenerateConsoleCtrlEvent): New typedefs.
9144 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
9145 to 250 ms.
9146 (win32_wait): Check for remote interrupt request
9147 with check_remote_input_interrupt_request.
9148 (win32_request_interrupt): New function.
9149 (win32_target_op): Set request_interrupt to win32_request_interrupt.
9150
34b34921
PA
91512007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9152
9153 * win32-low.c (debug_registers_changed,
9154 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
9155 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
9156 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
9157 (thread_rec): Get context using the low target.
9158 (child_add_thread): Call thread_added on the low target,
9159 which does the same thing.
9160 (regptr): Delete.
9161 (do_initial_child_stuff): Remove debug registers references.
9162 Set context using the low target. Resume threads after
9163 setting the contexts.
9164 (child_continue): Remove dead variable. Remove debug
9165 registers references.
9166 (child_fetch_inferior_registers): Go through the low target.
9167 (do_child_store_inferior_registers): Remove.
9168 (child_store_inferior_registers): Go through the low target.
9169 (win32_resume): Remove debug registers references.
9170 Set context using the low target.
9171 (handle_exception): Change return type to void. Don't record
9172 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
9173 first chance exception.
889bf7c5 9174 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
9175 goto loop. Always return after waiting for debug event.
9176 (win32_wait): Convert to switch statement. Handle spurious
9177 events.
9178
9179 * win32-i386-low.c (debug_registers_changed,
9180 debug_registers_used): New.
9181 (initial_stuff): Rename to ...
9182 (i386_initial_stuff): ... this. Clear debug registers
9183 state variables.
9184 (store_debug_registers): Delete.
9185 (i386_get_thread_context): New.
9186 (load_debug_registers): Delete.
9187 (i386_set_thread_context): New.
9188 (i386_thread_added): New.
9189 (single_step): Rename to ...
9190 (i386_single_step): ... this.
9191 (do_fetch_inferior_registers): Rename to ...
9192 (i386_fetch_inferior_register): ... this.
9193 (i386_store_inferior_register): New.
9194 (the_low_target): Adapt to new interface.
9195
9196 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
9197 (arm_get_thread_context): New.
9198 (arm_set_thread_context): New.
9199 (regptr): New.
9200 (do_fetch_inferior_registers): Rename to ...
9201 (arm_fetch_inferior_register): ... this.
9202 (arm_store_inferior_register): New.
9203 (arm_wince_breakpoint): Reimplement as unsigned long.
9204 (arm_wince_breakpoint_len): Define.
9205 (the_low_target): Adapt to new interface.
9206
9207 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
9208 load_debug_registers. Add get_thread_context, set_thread_context,
9209 thread_added and store_inferior_register. Rename
9210 fetch_inferior_registers to fetch_inferior_register.
9211 (regptr): Remove declaration.
9212
dd6953e1
PA
92132007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9214
9215 * linux-low.c (linux_detach): Change return type to int. Return 0.
9216 * spu-low.c (spu_detach): Likewise.
9217
444d6139
PA
92182007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9219
9220 * target.h (target_ops): Change return type of detach to int.
9221 Add join.
9222 (join_inferior): New.
9223 * server.c (main): Don't skip detach support on mingw32.
9224 If the inferior doesn't support detaching return error.
9225 Call join_inferior instead of using waitpid.
9226 * linux-low.c (linux_join): New.
9227 (linux_target_op): Add linux_join.
9228 * spu-low.c (spu_join): New.
9229 (spu_target_ops): Add spu_join.
9230 * win32-low.c (win32_detach): Adapt to new interface.
9231 Reopen current_process_handle before detaching. Issue a child
9232 resume before detaching.
9233 (win32_join): New.
9234 (win32_target_op): Add win32_join.
9235
1d5315fe
PA
92362007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9237
9238 * win32-low.c (win32-attach): Fix return value.
9239 * target.h (target_ops): Describe ATTACH return values.
9240
bf914831
PA
92412007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9242
9243 * win32-low.c (GETPROCADDRESS): Define.
9244 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
9245 (winapi_DebugSetProcessKillOnExit): Likewise.
9246 (win32_create_inferior): Force usage of ansi CreateProcessA.
9247 (win32_attach): Use GETPROCADDRESS.
9248 (win32_detach): Likewise.
9249
f72f3e60
PA
92502007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9251
9252 * win32-low.c (win32_wait): Don't use WSTOPSIG.
9253
ed50f18f
PA
92542007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
9255
9256 * win32-low.c: Commit leftover changes from 2007-03-29.
9257
0c2ead7e
DJ
92582007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9259
9260 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
9261 fields short instead of int. Add explicit padding.
9262 (i387_cache_to_fsave): Remove unnecessary casts.
9263 (i387_fsave_to_cache): Doc fix.
9264 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
9265
73725ff3
DJ
92662007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9267
9268 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
9269 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
9270
d99f33d8
PA
92712007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9272
9273 * configure.srv (arm*-*-mingw32ce*): Move near the other
9274 arm targets.
9275
68070c10
PA
92762007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9277
2482afc6 9278 * configure.ac: Add errno checking.
68070c10
PA
9279 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
9280 sys/file.h and malloc.h.
9281 (AC_CHECK_DECLS): Add perror.
9282 (srv_mingwce): Handle.
2482afc6 9283 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
9284 win32-i386-low.o to srv_tgtobj.
9285 (i[34567]86-*-mingw*): Likewise.
9286 (arm*-*-mingw32ce*): Add case.
9287 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9288 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
9289 [__MINGW32CE__] (strerror): New function.
9290 [__MINGW32CE__] (errno): Define to GetLastError.
9291 [__MINGW32CE__] (COUNTOF): New macro.
9292 (remote_open): Remove extra close call.
9293 * mem-break.c (delete_breakpoint_at): New function.
9294 * mem-break.h (delete_breakpoint_at): Declare.
9295 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9296 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
9297 [USE_WIN32API] (read, write): Add char* casts.
9298 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
9299 * server.h: Include wincecompat.h on Windows CE.
9300 [HAVE_ERRNO_H]: Check.
9301 (perror): Declare if not declared.
9302 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
9303 (perror_with_name): Remove errno declaration.
9304 * wincecompat.h: New.
9305 * wincecompat.c: New.
9306 * win32-low.h: New.
9307 * win32-arm-low.c: New.
9308 * win32-i386-low.c: New.
9309 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
9310 (OUTMSG2): Make it safe.
9311 (_T): New macro.
9312 (COUNTOF): New macro.
9313 (NUM_REGS): Get it from the low target.
9314 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
9315 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
9316 (thread_rec): Let low target handle debug registers.
9317 (child_add_thread): Likewise.
9318 (child_init_thread_list): Likewise.
9319 (continue_one_thread): Likewise.
9320 (regptr): New.
9321 (do_child_fetch_inferior_registers): Move to ...
9322 * win32-i386-low.c: ... here, and rename to ...
9323 (do_fetch_inferior_registers): ... this.
889bf7c5 9324 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
9325 Go through the low target.
9326 (do_child_store_inferior_registers): Use regptr.
9327 (strwinerror): New function.
9328 (win32_create_inferior): Handle Windows CE.
9329 Use strwinerror instead of strerror on Windows error
9330 codes. Add program to the error output.
9331 Don't close the main thread handle on Windows CE.
9332 (win32_attach): Use coredll.dll on Windows CE.
9333 (win32_kill): Close current process and current
9334 thread handles.
9335 (win32_detach): Use coredll.dll on Windows CE.
9336 (win32_resume): Let low target handle debug registers, and
9337 step request.
9338 (handle_exception): Add/Remove initial breakpoint. Avoid
9339 non-existant WSTOPSIG on Windows CE.
9340 (win32_read_inferior_memory): Cast to remove warning.
9341 (win32_arch_string): Go through the low target.
9342 (initialize_low): Call set_breakpoint_data with the low
9343 target's breakpoint.
9344 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
9345 FOP_REGNUM, mappings): Move to ...
9346 * win32-i386-low.c: ... here.
9347 * win32-low.c (win32_thread_info): Move to ...
9348 * win32-low.h: ... here.
9349 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
9350 win32-arm-low.c and wincecompat.c.
9351 (all:): Add $EXEEXT.
9352 (install-only:): Likewise.
9353 (gdbserver:): Likewise.
9354 (gdbreplay:): Likewise.
9355 * config.in: Regenerate.
9356 * configure: Regenerate.
9357
41093d81
PA
93582007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9359
9360 * win32-low.c: Rename typedef thread_info to
9361 win32_thread_info throughout.
9362
544afa54
PA
93632007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9364
9365 * win32-i386-low.c: Rename to ...
9366 * win32-low.c: ... this.
9367 * configure.srv: Replace win32-i386-low.o with win32-low.o.
9368 * Makefile.in: Likewise.
9369
bce7165d
PA
93702007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
9371
9372 * remote-utils.c (monitor_output): Constify msg parameter.
9373 * server.h (monitor_output): Likewise.
9374 * win32-i386-low.c (handle_output_debug_string): New.
9375 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
9376 handle_output_debug_string.
9377 (get_child_debug_event): Likewise.
9378
506c7aa0
DJ
93792007-03-27 Mat Hostetter <mat@lcs.mit.edu>
9380
9381 * server.c (main): Correct strtoul check.
9382
42c81e2a
DJ
93832007-03-27 Jon Ringle <jon@ringle.org>
9384
9385 * linux-low.c: Check __ARCH_HAS_MMU__ also.
9386
9453113a
DJ
93872007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
9388
9389 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
9390
64a69107
DJ
93912007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
9392
9393 * terminal.h: Check HAVE_SGTTY_H.
9394
93952007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
9396
9397 * remote-utils.c (remote_open): Print out the assigned port number.
9398
c74d0ad8
DJ
93992007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
9400
9401 * remote-utils.c (monitor_output): New function.
9402 * server.c (debug_threads): Define here.
9403 (monitor_show_help): New function.
9404 (handle_query): Handle qRcmd.
9405 (main): Do not handle 'd' packet.
9406 * server.h (debug_threads, remote_debug, monitor_output): Declare.
9407 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
9408 of debug_threads.
9409
de7c3b4a
PA
94102007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9411
9412 * Makefile.in (EXEEXT): New.
9413 (clean): Use $(EXEEXT).
9414
ef57601b
PA
94152007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9416
9417 * target.h (target_ops): Rename send_signal to request_interrupt,
9418 and remove enum target_signal parameter.
9419 * linux-low.c (linux_request_interrupt): Rename from
9420 linux_send_signal, and always send SIGINT.
9421 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
9422 and always send SIGINT.
9423 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
9424 of send_signal.
9425 (input_interrupt): Likewise.
9426
820f2bda
PA
94272007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9428
9429 * server.c (get_features_xml): Check if target implemented
9430 arch_string.
9431 * win32-i386-low.c (win32_arch_string): New.
9432 (win32_target_ops): Add win32_arch_string as arch_string member.
9433
ab39bf24
UW
94342007-02-22 Markus Deuling <deuling@de.ibm.com>
9435
9436 * spu-low.c (spu_arch_string): New.
9437 (spu_target_ops): Add spu_arch_string.
9438
61ff6e04
DJ
94392007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
9440
9441 * remote-utils.c: Remove HAVE_TERMINAL_H check.
9442 * configure.ac: Do not check for terminal.h.
9443 * configure, config.in: Regenerated.
9444
fb1e4ffc
DJ
94452007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9446
9447 * Makefile.in (OBS): Add $(XML_BUILTIN).
9448 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
9449 (clean): Update.
9450 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
9451 (arm-with-iwmmxt.c): New.
9452 * config.in, configure: Regenerate.
9453 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
9454 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
9455 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
9456 (arm*-*-linux*): Add iWMMXt and regset support.
9457 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
9458 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
9459 (arm_store_wmmxregset, target_regsets): New.
9460 * server.c (get_features_xml): Take annex argument. Check builtin
9461 XML documents.
9462 (handle_query): Handle multiple annexes.
9463
0f48aa01
DJ
94642007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9465
9466 * remote-utils.c [USE_WIN32API] (read, write): Define.
9467 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
9468 write.
9469
23181151
DJ
94702007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
9471
9472 * linux-i386-low.c (the_low_target): Set arch_string.
9473 * linux-x86-64-low.c (the_low_target): Likewise.
9474 * linux-low.c (linux_arch_string): New.
9475 (linux_target_ops): Add it.
9476 * linux-low.h (struct linux_target_ops): Add arch_string.
9477 * server.c (write_qxfer_response): Use const void * for DATA.
9478 (get_features_xml): New.
9479 (handle_query): Handle qXfer:features:read. Report it for qSupported.
9480 * target.h (struct target_ops): Add arch_string method.
9481
9d606399
DJ
94822007-01-03 Denis Pilat <denis.pilat@st.com>
9483 Daniel Jacobowitz <dan@codesourcery.com>
9484
9485 * linux-low.c (linux_kill): Handle being called with no threads.
9486 * win32-i386-low.c (win32_kill): Likewise.
9487 (get_child_debug_event): Clear current_process_handle.
9488
94892006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
9490 Daniel Jacobowitz <dan@codesourcery.com>
9491
9492 * remote-utils.c (remote_open): Check the type of specified
9493 serial port devices before opening them.
9494 * server.c (main): Kill the inferior if an error occurs during
9495 the first remote_open.
9496
a5e13d24
DJ
94972006-12-05 Markus Deuling <deuling@de.ibm.com>
9498
9499 * README: Update supported targets.
9500
186947f7
DJ
95012006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
9502
9503 * Makefile.in (clean): Remove reg-mips64.c.
9504 (reg-mips64.c, reg-mips64.o): New rules.
9505 * configure.srv: Handle mips64. Include regset support for mips.
9506 * linux-mips-low.c (union mips_register): New.
9507 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
9508 (mips_breakpoint, mips_breakpoint_at): Use int.
9509 (mips_collect_register, mips_supply_register)
9510 (mips_collect_register_32bit, mips_supply_register_32bit)
9511 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9512 (mips_store_fpregset, target_regsets): New.
9513 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
9514
a13e2c95
UW
95152006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
9516
9517 * configure.srv: Add target "spu*-*-*".
9518 * Makefile.in (clean): Remove reg-spu.c.
9519 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
9520 * spu-low.c: New file.
9521
cb7283db
DJ
95222006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9523
9524 * configure.ac: Correct td_thr_tls_get_addr test.
9525 * configure: Regenerated.
9526
89be2091
DJ
95272006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9528
9529 * linux-low.c (linux_wait_for_event): Reformat. Use the
9530 pass_signals array.
9531 * remote-utils.c (decode_address_to_semicolon): New.
9532 * server.c (pass_signals, handle_general_set): New.
9533 (handle_query): Mention QPassSignals for qSupported.
9534 (main): Call handle_general_set.
9535 * server.h (pass_signals, decode_address_to_semicolon): New.
9536
000ef4f0
DJ
95372006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
9538
9539 * server.c (handle_query): Correct error handling for read_auxv.
9540
b7149293
UW
95412005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
9542
9543 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
9544 and srv_linux_thread_db to yes.
9545 * linux-s390-low.c (s390_fill_gregset): New function.
9546 (target_regsets): Define data structure.
9547
dae5f5cf
DJ
95482006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
9549
9550 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
9551 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
9552 * config.in, configure: Regenerated.
9553 * inferiors.c (gdb_id_to_thread): New function.
9554 (gdb_id_to_thread_id): Use it.
9555 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
9556 * linux-low.h (struct process_info): Add th member.
9557 (thread_db_get_tls_address): New prototype.
9558 * remote-utils.c (decode_address): Make non-static.
9559 * server.c (handle_query): Handle qGetTLSAddr.
9560 * server.h (gdb_id_to_thread, decode_address): New prototypes.
9561 * target.h (struct target_ops): Add get_tls_address.
9562 * thread-db.c (maybe_attach_thread): Save the thread handle.
9563 (thread_db_get_tls_address): New.
9564
32ca6d61
DJ
95652006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
9566
9567 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
9568 (linux_resume_one_process): Take a siginfo_t *. Update all
9569 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
9570 (struct pending_signals): Add a siginfo_t.
9571 (linux_wait_for_process): Always set last_status.
9572 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
9573 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
9574 * linux-low.h (struct process_info): Add last_status.
9575
5ffff7c1
DJ
95762006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
9577
9578 * remote-utils.c (try_rle): New function.
9579 (putpkt_binary): Use it.
9580
8695c747
DJ
95812006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
9582
9583 * Makefile.in (clean): Clean reg-x86-64-linux.c.
9584 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
9585 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
9586 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
9587 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
9588 point registers.
9589
290fadea
RS
95902006-08-08 Richard Sandiford <richard@codesourcery.com>
9591
9592 * server.c (terminal_fd): New variable.
9593 (old_foreground_pgrp): Likewise.
9594 (restore_old_foreground_pgrp): New function.
9595 (start_inferior): Record the terminal file descriptor in terminal_fd
9596 and its original foreground group in old_foreground_pgrp. Register
9597 restore_old_foreground_pgrp with atexit().
9598
9f2e1e63
DJ
95992006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
9600
9601 * server.c (handle_query): Correct qPart to qXfer.
9602
b80864fb
DJ
96032006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
9604
9605 * configure.ac: Check for more headers which are missing on
9606 Windows. Automatically supply -lwsock32 and USE_WIN32API.
9607 * configure.srv: Add Cygwin and mingw32.
9608 * remote-utils.c: Don't include headers unconditionally which
9609 are missing on mingw32. Include <winsock.h> for mingw32.
9610 (remote_open): Adjust for mingw32 support. Flush
9611 standard error after writing to it.
9612 (remote_close, putpkt_binary, input_interrupt, block_async_io)
9613 (unblock_async_io, enable_async_io, disable_async_io)
9614 (readchar, getpkt): Update for Winsock support.
9615 (prepare_resume_reply): Expect a protocol signal number.
9616 * server.c: Disable <sys/wait.h> on mingw32.
9617 (start_inferior): Adjust for mingw32 support. Flush
9618 standard error after writing to it.
9619 (attach_inferior): Likewise. Use protocol signal
9620 numbers.
9621 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
9622 and names.
9623 * win32-i386-low.c: New file.
9624 * Makefile.in (XM_CLIBS): Set.
9625 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
9626 (win32-i386-low.o): New dependency rule.
9627 * linux-low.c (linux_wait): Use target signal numbers.
9628 * target.h (struct target_ops): Doc fix.
9629 * server.h (target_signal_to_name): New prototype.
9630 * gdbreplay.c: Don't include headers unconditionally which
9631 are missing on mingw32. Include <winsock.h> for mingw32.
9632 (remote_close, remote_open): Adjust for Winsock support.
9633 * configure, config.in: Regenerated.
9634
0876f84a
DJ
96352006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9636
9637 * server.c (decode_xfer_read, write_qxfer_response): New.
9638 (handle_query): Take a packet length argument. Handle
9639 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
9640 the qSupported response.
9641 (main): Update call to handle_query.
9642
01f9e8fa
DJ
96432006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
9644
9645 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
9646 (putpkt_binary): Renamed from putpkt and adjusted for binary
9647 data.
9648 (putpkt): New wrapper for putpkt_binary.
9649 (readchar): Don't mask off the high bit.
9650 (decode_X_packet): New function.
9651 * server.c (main): Call putpkt_binary if a handler sets the packet
9652 length. Save the length of the incoming packet. Handle 'X'.
9653 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
9654
be2a5f71
DJ
96552006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
9656
9657 * server.c (handle_query): Handle qSupported.
9658
ea025f5f
DJ
96592006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9660
9661 * remote-utils.c (all_symbols_looked_up): New variable.
9662 (look_up_one_symbol): Check it.
9663 * server.h (look_up_one_symbol): New declaration.
9664 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
9665
9308fc88
DJ
96662006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9667
9668 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 9669 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
9670 (PTRACE_GET_THREAD_AREA): Define.
9671 (ps_get_thread_area): New function.
9672
52fb6437
NS
96732006-05-09 Nathan Sidwell <nathan@codesourcery.com>
9674
9675 * configure.srv (m68k*-*-uclinux*): New target.
9676 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
9677 (linux_resume_one_process): Remove extraneous cast.
9678 (linux_read_offsets): New.
9679 (linux_target_op): Add linux_read_offsets on mmuless systems.
9680 * server.c (handle_query): Add qOffsets logic.
9681 * target.h (struct target_ops): Add read_offsets.
9682
21b0f40c
DJ
96832006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
9684
9685 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
9686 (PTRACE_GET_THREAD_AREA): Define.
9687 (ps_get_thread_area): New function.
9688 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
9689 (linux-x86-64-low.o): Update.
9690
0050a760
DJ
96912006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
9692
9693 * configure.ac: Remove checks for prfpregset_t.
9694 * gdb_proc_service.h: New file.
9695 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
9696 new "gdb_proc_service.h".
9697 * proc-service.c: Likewise.
9698 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
9699 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
9700 * Makefile.in (gdb_proc_service_h): Updated.
9701 * configure, config.in: Regenerated.
9702
b92a518e
DJ
97032006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
9704
9705 * remote-utils.c (prepare_resume_reply): Move declaration
9706 of gdb_id_from_wait to the top of the block.
9707
545587ee
DJ
97082006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
9709
9710 * linux-low.c (regsets_store_inferior_registers): Read the regset
9711 from the target before filling it.
9712
9db87ebd
DJ
97132006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9714
9715 * server.c (attach_inferior): Return SIGTRAP for a successful
9716 attach.
9717
dd24457d
DJ
97182006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9719
9720 * Makefile.in (OBS): Add version.o.
9721 (STAGESTUFF): Delete.
9722 (version.o): Add dependencies.
9723 (version.c): Replace rule.
9724 (clean): Remove version.c.
9725 * server.c (gdbserver_version): New.
9726 (gdbserver_usage): Use printf.
9727 (main): Handle --version and --help.
9728 * server.h (version, host_name): Add declarations.
9729
6f0f660e
EZ
97302005-12-23 Eli Zaretskii <eliz@gnu.org>
9731
889bf7c5
PA
9732 * linux-arm-low.c:
9733 * linux-arm-low.c:
9734 * inferiors.c:
9735 * i387-fp.h:
9736 * i387-fp.c:
9737 * gdbreplay.c:
9738 * regcache.c:
9739 * proc-service.c:
9740 * mem-break.h:
9741 * mem-break.c:
9742 * linux-x86-64-low.c:
9743 * linux-sh-low.c:
9744 * linux-s390-low.c:
9745 * linux-ppc64-low.c:
9746 * linux-ppc-low.c:
9747 * linux-mips-low.c:
9748 * linux-m68k-low.c:
9749 * linux-m32r-low.c:
9750 * linux-low.h:
9751 * linux-low.c:
9752 * linux-ia64-low.c:
9753 * linux-i386-low.c:
9754 * linux-crisv32-low.c:
9755 * thread-db.c:
9756 * terminal.h:
9757 * target.h:
9758 * target.c:
9759 * server.h:
9760 * server.c:
9761 * remote-utils.c:
9762 * regcache.h:
9763 * utils.c:
9764 * Makefile.in:
9765 * configure.ac:
6f0f660e
EZ
9766 * gdbserver.1: Add (C) after Copyright. Update the FSF
9767 address.
9768
9d1fb177
DJ
97692005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
9770
9771 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
9772 (arm_breakpoint_at): Recognize both breakpoints.
9773 (the_low_target): Use the correct breakpoint instruction.
9774
011a70c2
DJ
97752005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
9776
9777 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
9778 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
9779 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
9780 (the_low_target): Update.
9781
7fb85e41
AS
97822005-10-25 Andreas Schwab <schwab@suse.de>
9783
9784 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
9785
9786 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
9787 (ia64_num_regs): Reduce to 462.
9788
3db0444b
DJ
97892005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
9790
9791 * acinclude.m4: Correct quoting.
9792 * aclocal.m4: Regenerated.
9793
9794 Suggested by SZOKOVACS Robert <szo@ies.hu>:
9795 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
9796 (thread_db_init): Call thread_db_err_str.
9797 * configure.ac: Check for TD_VERSION.
9798 * config.in, configure: Regenerated.
9799
bee0189a
DJ
98002005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9801
9802 * server.h (error, fatal, warning): Add ATTR_FORMAT.
9803
e9d25b98
DJ
98042005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9805
9806 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
9807 is not available. Define HAVE_PTRACE_GETREGS if it is.
9808 * config.in, configure: Regenerated.
9809 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
9810 * linux-i386-low.c, linux-m68k-low.c: Update to use
9811 HAVE_PTRACE_GETREGS.
9812 * linux-low.c (regsets_fetch_inferior_registers)
9813 (regsets_store_inferior_registers): Only return 0 if we processed
9814 GENERAL_REGS.
9815 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
9816 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
9817
a06660f7
DJ
98182005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9819
9820 * inferiors.c (struct thread_info): Add gdb_id.
9821 (add_thread): Add gdb_id argument.
9822 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
9823 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
9824 calls to add_thread.
9825 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
9826 * server.c (handle_query): Use thread_to_gdb_id.
9827 (handle_v_cont, main): Use gdb_id_to_thread_id.
9828 * server.h (add_thread): Update prototype.
9829 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
9830 prototypes.
9831
5a1f5858
DJ
98322005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9833
9834 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
9835 left-padded registers.
9836 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
9837 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
9838
e122f1f5
SE
98392005-07-01 Steve Ellcey <sje@cup.hp.com>
9840
9841 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
9842 * configure: Regenerate.
9843 * config.in: Regenerate.
9844 * server.h (NEED_DECLARATION_STRERROR):
9845 Replace with !HAVE_DECL_STRERROR.
9846
d592fa2f
DJ
98472005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
9848
9849 * linux-low.c (linux_wait, linux_send_signal): Don't test
9850 an unsigned long variable for > 0 if it could be MAX_ULONG.
9851 * server.c (myresume): Likewise.
9852 * target.c (set_desired_inferior): Likewise.
9853
ccbd4912
MK
98542005-06-13 Mark Kettenis <kettenis@gnu.org>
9855
9856 * configure.ac: Simplify and improve check for socklen_t.
9857 * configure, config.in: Regenerate.
9858
f450004a
DJ
98592005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
9860
9861 * acconfig.h: Remove.
9862 * configure.ac: Add a test for socklen_t. Use three-argument
9863 AC_DEFINE throughout.
9864 * config.in: Regenerated using autoheader 2.59.
9865 * configure: Regenerated.
9866
9867 * gdbreplay.c (socklen_t): Provide a default.
9868 (remote_open): Use socklen_t.
9869 * remote-utils.c (socklen_t): Provide a default.
9870 (remote_open): Use socklen_t.
9871 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
9872 unsigned char.
9873
9874 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
9875 char for buffers.
9876 * linux-low.c (linux_read_memory, linux_write_memory)
9877 (linux_read_auxv): Likewise.
9878 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
9879 (check_mem_write): Likewise.
9880 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
9881 Likewise.
9882 * regcache.c (struct inferior_rgcache_data, registers_to_string)
9883 (registers_from_string, register_data): Likewise.
9884 * server.c (handle_query, main): Likewise.
9885 * server.h (convert_ascii_to_int, convert_int_to_ascii)
9886 (decode_M_packet): Likewise.
9887 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
9888 * target.h (struct target_ops): Update read_memory, write_memory,
9889 and read_auxv.
9890 (read_inferior_memory, write_inferior_memory): Update.
9891 * linux-low.h (struct linux_target_ops): Change type of breakpoint
9892 to unsigned char *.
9893 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
9894 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
9895 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
9896 linux-s390-low.c, linux-sh-low.c: Update for changes in
9897 read_inferior_memory and the_low_target->breakpoint.
9898
eee84df1
DJ
98992005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
9900
9901 * Makefile.in (SFILES): Add linux-ppc64-low.c.
9902 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
9903 * configure.srv: Add powerpc64-*-linux*.
9904 * linux-ppc64-low.c: New file.
9905
45b134e5
OF
99062005-05-23 Orjan Friberg <orjanf@axis.com>
9907
9908 * linux-cris-low.c: New file with support for CRIS.
9909 * linux-crisv32-low.c: Ditto for CRISv32.
9910 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
9911 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 9912 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
9913 reg-crisv32.o, and reg-crisv32.c to make rules.
9914 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
9915 recognized targets.
9916
48d93c75
UW
99172005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
9918
9919 * linux-low.c (fetch_register): Ensure buffer size is a multiple
9920 of sizeof (PTRACE_XFER_TYPE).
9921 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
9922
e013ee27
OF
99232005-05-12 Orjan Friberg <orjanf@axis.com>
9924
889bf7c5 9925 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
9926 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
9927 pointers for hardware watchpoint support.
9928 * linux-low.h (struct linux_target_ops): Ditto.
9929 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
9930 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
9931 to linux_target_ops.
9932 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
9933 reply packet.
9934 * server.c (main): Recognize 'Z' and 'z' packets.
9935
b0ded00b
UW
99362005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
9937
9938 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
9939 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
9940 (the_low_target): Add new members.
9941
8643e2ad
DJ
99422005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
9943
9944 * proc-service.c (ps_lgetregs): Search all_processes instead of
9945 all_threads.
9946
fc620387
DJ
99472005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
9948
9949 * server.c (start_inferior): Change return type to int.
9950 (attach_inferior): Change sigptr to int *.
9951 (handle_v_cont, handle_v_requests): Change signal to int *.
9952 (main): Change signal to int.
9953
99542005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
9955
9956 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
9957 * configure.srv: Add m32r*-*-linux*.
9958 * linux-m32r-low.c: New file.
9959
e0e76420
DJ
99602005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
9961
9962 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
9963
a1928bad
DJ
99642005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
9965
9966 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
9967 Take unsigned long arguments for PIDs.
9968 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
9969 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
9970 (wait_for_sigstop, linux_resume_one_process)
9971 (regsets_fetch_inferior_registers, linux_send_signal)
9972 (linux_read_auxv): Likewise. Update the types of variables holding
9973 PIDs. Update format string specifiers.
9974 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
9975 * remote-utils.c (prepare_resume_reply): Likewise.
9976 * server.c (cont_thread, general_thread, step_thread)
9977 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
9978 unsigned long.
9979 (handle_query): Update format specifiers.
9980 (handle_v_cont, main): Use strtoul for thread IDs.
9981 * server.h (struct inferior_list_entry): Use unsigned long for ID.
9982 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
9983 (general_thread, step_thread, thread_from_wait)
9984 (old_thread_from_wait): Update.
9985 * target.h (struct thread_resume): Use unsigned long for THREAD.
9986 (struct target_ops): Use unsigned long for arguments to attach and
9987 thread_alive.
9988
dcdb98d2
DJ
99892005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
9990
9991 * acinclude.m4: Include bfd/bfd.m4 directly.
9992 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
9993 <agriffis@toolchain.org>.
9994 * aclocal.m4, configure: Regenerated.
9995
bec39cab
AC
99962005-01-07 Andrew Cagney <cagney@gnu.org>
9997
9998 * configure.ac: Rename configure.in, require autoconf 2.59.
9999 * configure: Re-generate.
10000
434c4c77
DJ
100012004-12-08 Daniel Jacobowitz <dan@debian.org>
10002
10003 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
10004 LIBS when finished.
10005 * aclocal.m4: Regenerated.
10006 * configure: Regenerated.
10007
db1d3e1b
AS
100082004-11-21 Andreas Schwab <schwab@suse.de>
10009
10010 * linux-m68k-low.c (m68k_num_gregs): Define.
10011 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
10012 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
10013 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
10014 (m68k_breakpoint_at): New. Add to the_low_target.
10015
10016 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10017 srv_linux_thread_db to yes.
10018
43360365
JB
100192004-10-20 Joel Brobecker <brobecker@gnat.com>
10020
10021 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10022 (ARCH_SET_FS): Likewise.
10023 (ARCH_GET_FS): Likewise.
10024 (ARCH_GET_GS): Likewise.
10025
fd500816
DJ
100262004-10-16 Daniel Jacobowitz <dan@debian.org>
10027
10028 * linux-i386-low.c (ps_get_thread_area): New.
10029 * linux-x86-64-low.c (ps_get_thread_area): New.
10030 * linux-low.c: Include <sys/syscall.h>.
10031 (linux_kill_one_process): Don't kill the first thread here.
10032 (linux_kill): Kill the first thread here.
10033 (kill_lwp): New function.
10034 (send_sigstop, linux_send_signal): Use it.
10035 * proc-service.c: Clean up #ifdefs.
10036 (fpregset_info): Delete.
10037 (ps_lgetregs): Update and enable implementation.
10038 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
10039 implementations.
10040 * remote-utils.c (struct sym_cache, symbol_cache): New.
10041 (input_interrupt): Print a clearer message.
10042 (async_io_enabled): New variable.
10043 (enable_async_io, disable_async_io): Use it. Update comments.
10044 (look_up_one_symbol): Use the symbol cache.
10045 * thread-db.c (thread_db_look_up_symbols): New function.
10046 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
10047
f6de3c42
DJ
100482004-10-16 Daniel Jacobowitz <dan@debian.org>
10049
10050 * configure.in: Test for -rdynamic.
10051 * configure: Regenerated.
10052 * Makefile (INTERNAL_LDFLAGS): New.
10053 (gdbserver, gdbreplay): Use it.
10054
2c0fc042
AC
100552004-09-02 Andrew Cagney <cagney@gnu.org>
10056
10057 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10058
075b3282
DJ
100592004-03-23 Daniel Jacobowitz <drow@mvista.com>
10060
10061 * linux-low.c (linux_wait): Clear all_processes list also.
10062
fa6a77dc
DJ
100632004-03-12 Daniel Jacobowitz <drow@mvista.com>
10064
10065 * linux-low.c: Include <errno.h>. Remove extern declaration of
10066 errno.
10067
6d782a97
DJ
100682004-03-12 Daniel Jacobowitz <drow@mvista.com>
10069
10070 * gdbreplay.c, server.h, utils.c: Update copyright years.
10071
3a7fb99b
DJ
100722004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10073
10074 * server.c (main): Print child status or termination signal from
10075 variable 'signal', not 'sig'.
10076
c3e735a6
DJ
100772004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10078
10079 * linux-low.c (linux_read_memory): Change return type to
10080 int. Check for and return error from ptrace().
10081 * target.c (read_inferior_memory): Change return type to int. Pass
10082 back return status from the_target->read_memory().
10083 * target.h (struct target_ops): Adapt *read_memory() prototype.
10084 Update comment.
10085 (read_inferior_memory): Adapt prototype.
10086 * server.c (main): Return an error packet if
10087 read_inferior_memory() returns an error.
10088
a59d1c82
DJ
100892004-03-04 Daniel Jacobowitz <drow@mvista.com>
10090
10091 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10092 Unify with other clean targets.
10093
dc3f8883
DJ
100942004-02-29 Daniel Jacobowitz <drow@mvista.com>
10095
10096 * server.c (handle_v_cont): Call set_desired_inferior.
10097
89a208da
DJ
100982004-02-29 Daniel Jacobowitz <drow@mvista.com>
10099
10100 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10101
62ea82f5
DJ
101022004-02-29 Daniel Jacobowitz <drow@mvista.com>
10103
10104 * linux-low.c (linux_wait): Unblock async I/O.
10105 (linux_resume): Block and enable async I/O.
10106 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10107 * server.h (block_async_io, unblock_async_io): Add prototypes.
10108
6910d122
DJ
101092004-02-29 Daniel Jacobowitz <drow@mvista.com>
10110
10111 * remote-utils.c (remote_open): Print a status notice after
10112 opening a TCP port.
10113 * server.c (attach_inferior): Print a status notice after
10114 attaching.
10115
101162004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
10117
10118 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10119
c89dc5d4
DJ
101202004-02-26 Daniel Jacobowitz <drow@mvista.com>
10121
10122 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
10123 error packet.
10124 * server.c, target.h: Update copyright years.
10125
4b8dad4a
RM
101262004-02-25 Roland McGrath <roland@redhat.com>
10127
10128 * target.h (struct target_ops): New member `read_auxv'.
10129 * server.c (handle_query): Handle qPart:auxv:read: query using that.
10130 * linux-low.c (linux_read_auxv): New function.
10131 (linux_target_ops): Initialize `read_auxv' member to that.
10132
d7446758
JB
101332004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10134
10135 Committed by Jim Blandy <jimb@redhat.com>.
10136
10137 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 10138 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
10139 instead of GPR_SIZE to distiguish s390 and s390x targets.
10140
5544ad89
DJ
101412004-01-31 Daniel Jacobowitz <drow@mvista.com>
10142
10143 * linux-low.c: Update copyright year.
10144 (check_removed_breakpoint): Clear pending_is_breakpoint.
10145 (linux_set_resume_request, linux_queue_one_thread)
10146 (resume_status_pending_p): New functions.
10147 (linux_continue_one_thread): Use process->resume.
10148 (linux_resume): Only resume threads if there are no pending events.
10149 * linux-low.h (struct process_info): Add resume request
10150 pointer.
10151
2a68b70e
DJ
101522004-01-30 Daniel Jacobowitz <drow@mvista.com>
10153
10154 * regcache.c (new_register_cache): Clear the allocated register
10155 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
10156
64386c31
DJ
101572003-10-13 Daniel Jacobowitz <drow@mvista.com>
10158
10159 * linux-low.c (linux_resume): Take a struct thread_resume *
10160 argument.
10161 (linux_wait): Update call.
10162 (resume_ptr): New static variable.
10163 (linux_continue_one_thread): Renamed from
10164 linux_continue_one_process. Use resume_ptr.
10165 (linux_resume): Use linux_continue_one_thread.
10166 * server.c (handle_v_cont, handle_v_requests): New functions.
10167 (myresume): New function.
10168 (main): Handle 'v' case.
10169 * target.h (struct thread_resume): New type.
10170 (struct target_ops): Change argument of "resume" to struct
10171 thread_resume *.
10172 (myresume): Delete macro.
10173
c938e9b0
L
101742003-08-08 H.J. Lu <hongjiu.lu@intel.com>
10175
10176 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
10177 (uninstall): Support DESTDIR.
10178
7f313d07
BC
10179Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
10180
10181 * configure.srv: Add xscale*linux copy of arm*linux entry.
10182
3b2fc2ea
DJ
101832003-07-24 Daniel Jacobowitz <drow@mvista.com>
10184
10185 * linux-arm-low.c (arm_reinsert_addr): New function.
10186 (the_low_target): Add arm_reinsert_addr.
10187
1c0a559e
MK
101882003-07-08 Mark Kettenis <kettenis@gnu.org>
10189
10190 * mem-break.c: Remove whitespace at end of file.
10191
43d5792c
DJ
101922003-06-28 Daniel Jacobowitz <drow@mvista.com>
10193
10194 * configure.in: Check whether we need to prototype strerror.
10195 * server.h: Optionally prototype strerror.
10196 * gdbreplay.c (perror_with_name): Use strerror.
10197 * linux-low.c (linux_attach_lwp): Use strerror.
10198 * utils.c (perror_with_name): Use strerror.
10199 * config.in, configure: Regenerated.
10200
c8a86edf
DJ
102012003-06-28 Daniel Jacobowitz <drow@mvista.com>
10202
10203 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
10204 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
10205
73d37363
DJ
102062003-06-20 Daniel Jacobowitz <drow@mvista.com>
10207
10208 * Makefile.in (SFILES): Update.
10209 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
10210 low-sun3.c: Remove files.
10211
6ad8ae5c
DJ
102122003-06-17 Daniel Jacobowitz <drow@mvista.com>
10213
10214 * linux-low.c: Move comment to linux_thread_alive where it belonged.
10215 (linux_detach_one_process, linux_detach): New functions.
10216 (linux_target_ops): Add linux_detach.
10217 * server.c (main): Handle 'D' packet.
10218 * target.h (struct target_ops): Add "detach" member.
10219 (detach_inferior): Define.
10220
1581182a
MK
102212003-06-13 Mark Kettenis <kettenis@gnu.org>
10222
10223 From Kelley Cook <kelleycook@wideopenwest.com>:
10224 * configure.srv: Accept i[34567]86 variants.
10225
e5379b03
DJ
102262003-06-05 Daniel Jacobowitz <drow@mvista.com>
10227
10228 * linux-low.c (linux_wait_for_event): Correct comment typos.
10229 (linux_resume_one_process): Call check_removed_breakpoint.
10230 (linux_send_signal): New function.
10231 (linux_target_ops): Add linux_send_signal.
10232 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
10233 of kill.
10234 * target.h (struct target_ops): Add send_signal.
10235
2ff29de4
JB
102362003-05-29 Jim Blandy <jimb@redhat.com>
10237
10238 * linux-low.c (usr_store_inferior_registers): Transfer buf in
10239 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
10240 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
10241 away part of the register's value.
10242
254787d4
DJ
102432003-03-26 Daniel Jacobowitz <drow@mvista.com>
10244
10245 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
10246 (linux_wait_for_event, linux_init_signals): Likewise.
10247
94e10508
DJ
102482003-03-17 Daniel Jacobowitz <drow@mvista.com>
10249
10250 * configure.in: Check for stdlib.h.
10251 * configure: Regenerated.
10252 * config.in: Regenerated.
10253
4c0711e0
DJ
102542003-01-04 Andreas Schwab <schwab@suse.de>
10255
10256 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
10257
ef66e766
AC
102582003-01-02 Andrew Cagney <ac131313@redhat.com>
10259
10260 * Makefile.in: Remove obsolete code.
10261
a1358604
DJ
102622002-11-20 Daniel Jacobowitz <drow@mvista.com>
10263
10264 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
10265 defined(PT_FPR0_HI).
10266
23ce3b1c
DJ
102672002-11-17 Stuart Hughes <seh@zee2.com>
10268
10269 * linux-arm-low.c (arm_num_regs): Increase.
10270 (arm_regmap): Include status register.
10271
102722002-11-17 Daniel Jacobowitz <drow@mvista.com>
10273
10274 * linux-low.c (register_addr): Remove incorrect -1 check.
10275
a9fa9f7d
DJ
102762002-08-29 Daniel Jacobowitz <drow@mvista.com>
10277
10278 * linux-low.c (linux_create_inferior): Call setpgid. Return
10279 the new PID.
10280 (unstopped_p, linux_signal_pid): Remove.
10281 (linux_target_ops): Remove linux_signal_pid.
10282 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
10283 global instead of target method.
10284 * target.h (struct target_ops): Remove signal_pid. Update comment
10285 for create_inferior.
10286 * server.c (signal_pid): New variable.
10287 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 10288 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
10289 (attach_inferior): Set signal_pid.
10290
17574093
DJ
102912002-08-23 Daniel Jacobowitz <drow@mvista.com>
10292
10293 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
10294
102952002-08-20 Jim Blandy <jimb@redhat.com>
10296
10297 * Makefile.in (LDFLAGS): Allow the configure script to establish a
10298 default for this.
10299
103002002-08-01 Andrew Cagney <cagney@redhat.com>
10301
10302 * Makefile.in: Make chill references obsolete.
10303
103042002-07-24 Kevin Buettner <kevinb@redhat.com>
10305
10306 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
10307 * configure: Regenerate.
10308 * config.in: Regenerate.
10309
103102002-07-09 David O'Brien <obrien@FreeBSD.org>
10311
10312 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
10313 (perror_with_name, remote_close, remote_open, expect, play): Static.
10314
103152002-07-04 Michal Ludvig <mludvig@suse.cz>
10316
4b8dad4a 10317 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
10318 byte offsets instead of an array of indexes.
10319 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
10320
103212002-06-13 Daniel Jacobowitz <drow@mvista.com>
10322
10323 * regcache.c: Add comment.
10324
103252002-06-11 Daniel Jacobowitz <drow@mvista.com>
10326
10327 * thread-db.c: New file.
10328 * proc-service.c: New file.
10329 * acinclude.m4: New file.
10330 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
10331 proc-service.o, and thread-db.o.
10332 (linux-low.o): Add USE_THREAD_DB.
10333 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
10334 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
10335 * aclocal.m4: Regenerated.
10336 * config.in: Regenerated.
10337 * configure: Regenerated.
10338 * configure.in: Check for proc_service.h, sys/procfs.h,
10339 thread_db.h, and linux/elf.h headrs.
10340 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
10341 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
10342 Check for -lthread_db and thread support.
10343 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
10344 PowerPC, and SuperH.
10345 * i387-fp.c: Constify arguments.
10346 * i387-fp.h: Likewise.
10347 * inferiors.c: (struct thread_info): Renamed from
10348 `struct inferior_info'. Remove PID member. Use generic inferior
10349 list header. All uses updated.
10350 (inferiors, signal_pid): Removed.
10351 (all_threads): New variable.
10352 (get_thread): Define.
10353 (add_inferior_to_list): New function.
10354 (for_each_inferior): New function.
10355 (change_inferior_id): New function.
10356 (add_inferior): Removed.
10357 (remove_inferior): New function.
10358 (add_thread): New function.
10359 (free_one_thread): New function.
10360 (remove_thread): New function.
10361 (clear_inferiors): Use for_each_inferior and free_one_thread.
10362 (find_inferior): New function.
10363 (find_inferior_id): New function.
10364 (inferior_target_data): Update argument type.
10365 (set_inferior_target_data): Likewise.
10366 (inferior_regcache_data): Likewise.
10367 (set_inferior_regcache_data): Likewise.
10368 * linux-low.c (linux_bp_reinsert): Remove.
10369 (all_processes, stopping_threads, using_thrads)
10370 (struct pending_signals, debug_threads, pid_of): New.
10371 (inferior_pid): Replace with macro.
10372 (struct inferior_linux_data): Remove.
10373 (get_stop_pc, add_process): New functions.
10374 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
10375 Use add_process and add_thread.
10376 (linux_attach_lwp): New function, based on old linux_attach. Use
10377 add_process and add_thread. Set stop_expected for new threads.
10378 (linux_attach): New function.
10379 (linux_kill_one_process): New function.
10380 (linux_kill): Kill all LWPs.
10381 (linux_thread_alive): Use find_inferior_id.
10382 (check_removed_breakpoints, status_pending_p): New functions.
10383 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
10384 Update. Use WNOHANG. Wait for cloned processes also. Update process
10385 struct for the found process.
10386 (linux_wait_for_event): New function.
10387 (linux_wait): Use it. Support LWPs.
10388 (send_sigstop, wait_for_sigstop, stop_all_processes)
10389 (linux_resume_one_process, linux_continue_one_process): New functions.
10390 (linux_resume): Support LWPs.
10391 (REGISTER_RAW_SIZE): Remove.
10392 (fetch_register): Use register_size instead. Call supply_register.
10393 (usr_store_inferior_registers): Likewise. Call collect_register.
10394 Fix recursive case.
10395 (regsets_fetch_inferior_registers): Improve error message.
10396 (regsets_store_inferior_registers): Add debugging.
10397 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
10398 (unstopped_p, linux_signal_pid): New functions.
10399 (linux_target_ops): Add linux_signal_pid.
10400 (linux_init_signals): New function.
10401 (initialize_low): Call it. Initialize using_threads.
10402 * regcache.c (inferior_regcache_data): Add valid
10403 flag.
10404 (get_regcache): Fetch registers lazily. Add fetch argument
10405 and update all callers.
10406 (regcache_invalidate_one, regcache_invalidate): New
10407 functions.
10408 (new_register_cache): Renamed from create_register_cache.
10409 Return the new regcache.
10410 (free_register_cache): Change argument to a void *.
10411 (registers_to_string, registers_from_string): Call get_regcache
10412 with fetch flag set.
10413 (register_data): Make static. Pass fetch flag to get_regcache.
10414 (supply_register): Call get_regcache with fetch flag clear.
10415 (collect_register): Call get_regcache with fetch flag set.
10416 (collect_register_as_string): New function.
10417 * regcache.h: Update.
10418 * remote-utils.c (putpkt): Flush after debug output and use
10419 stderr.
10420 Handle input interrupts while waiting for an ACK.
10421 (input_interrupt): Use signal_pid method.
10422 (getpkt): Flush after debug output and use stderr.
10423 (outreg): Use collect_register_as_string.
10424 (new_thread_notify, dead_thread_notify): New functions.
10425 (prepare_resume_reply): Check using_threads. Set thread_from_wait
10426 and general_thread.
10427 (look_up_one_symbol): Flush after debug output.
10428 * server.c (step_thread, server_waiting): New variables.
10429 (start_inferior): Don't use signal_pid. Update call to mywait.
10430 (attach_inferior): Update call to mywait.
10431 (handle_query): Handle qfThreadInfo and qsThreadInfo.
10432 (main): Don't fetch/store registers explicitly. Use
10433 set_desired_inferior. Support proposed ``Hs'' packet. Update
10434 calls to mywait.
10435 * server.h: Update.
10436 (struct inferior_list, struct_inferior_list_entry): New.
10437 * target.c (set_desired_inferior): New.
10438 (write_inferior_memory): Constify.
10439 (mywait): New function.
10440 * target.h: Update.
10441 (struct target_ops): New signal_pid method.
10442 (mywait): Removed macro, added prototype.
10443
10444 * linux-low.h (regset_func): Removed.
10445 (regset_fill_func, regset_store_func): New.
10446 (enum regset_type): New.
10447 (struct regset_info): Add type field. Use new operation types.
10448 (struct linux_target_ops): stop_pc renamed to get_pc.
10449 Add decr_pc_after_break and breakpoint_at.
10450 (get_process, get_thread_proess, get_process_thread)
10451 (strut process_info, all_processes, linux_attach_lwp)
10452 (thread_db_init): New.
10453
10454 * linux-arm-low.c (arm_get_pc, arm_set_pc,
10455 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
10456 (the_low_target): Add new members.
10457 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
10458 (i386_store_fpxregset): Constify.
10459 (target_regsets): Add new kind identifier.
10460 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
10461 (i386_set_pc): Add debugging.
10462 (i386_breakpoint_at): New function.
10463 (the_low_target): Add new members.
10464 * linux-mips-low.c (mips_get_pc, mips_set_pc)
10465 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
10466 (mips_breakpoint_at): New.
10467 (the_low_target): Add new members.
10468 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
10469 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
10470 (the_low_target): Add new members.
10471 * linux-sh-low.c (sh_get_pc, sh_set_pc)
10472 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
10473 (the_low_target): Add new members.
10474 * linux-x86-64-low.c (target_regsets): Add new kind
10475 identifier.
10476
104772002-05-15 Daniel Jacobowitz <drow@mvista.com>
10478
10479 From Martin Pool <mbp@samba.org>:
10480 * server.c (gdbserver_usage): New function.
10481 (main): Call it.
10482
104832002-05-14 Daniel Jacobowitz <drow@mvista.com>
10484
10485 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
10486 stop_at -> stop_pc.
10487
104882002-05-04 Andrew Cagney <ac131313@redhat.com>
10489
10490 * Makefile.in: Remove obsolete code.
10491
104922002-04-24 Michal Ludvig <mludvig@suse.cz>
10493
10494 * linux-low.c (regsets_fetch_inferior_registers),
10495 (regsets_store_inferior_registers): Removed cast to int from
10496 ptrace() calls.
10497 * regcache.h: Added declaration of struct inferior_info.
10498
104992002-04-20 Daniel Jacobowitz <drow@mvista.com>
10500
10501 * inferiors.c (struct inferior_info): Add regcache_data.
10502 (add_inferior): Call create_register_cache.
10503 (clear_inferiors): Call free_register_cache.
10504 (inferior_regcache_data, set_inferior_regcache_data): New functions.
10505 * regcache.c (struct inferior_regcache_data): New.
10506 (registers): Remove.
10507 (get_regcache): New function.
10508 (create_register_cache, free_register_cache): New functions.
10509 (set_register_cache): Don't initialize the register cache here.
10510 (registers_to_string, registers_from_string, register_data): Call
10511 get_regcache.
10512 * regcache.h: Add prototypes.
10513 * server.h: Likewise.
10514
105152002-04-20 Daniel Jacobowitz <drow@mvista.com>
10516
10517 * mem-break.c: New file.
10518 * mem-break.h: New file.
10519 * Makefile.in: Add mem-break.o rule; update server.h
10520 dependencies.
10521 * inferiors.c (struct inferior_info): Add target_data
10522 member.
10523 (clear_inferiors): Free target_data member if set.
10524 (inferior_target_data, set_inferior_target_data): New functions.
10525 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
10526 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
10527 * linux-low.c (linux_bp_reinsert): New variable.
10528 (struct inferior_linux_data): New.
10529 (linux_create_inferior): Use set_inferior_target_data.
10530 (linux_attach): Likewise. Call add_inferior.
10531 (linux_wait_for_one_inferior): New function.
10532 (linux_wait): Call it.
10533 (linux_write_memory): Add const.
10534 (initialize_low): Call set_breakpoint_data.
10535 * linux-low.h (struct linux_target_ops): Add breakpoint
10536 handling members.
10537 * server.c (attach_inferior): Remove extra add_inferior
10538 call.
10539 * server.h: Include mem-break.h. Update inferior.c
10540 prototypes.
10541 * target.c (read_inferior_memory)
10542 (write_inferior_memory): New functions.
10543 * target.h (read_inferior_memory)
10544 (write_inferior_memory): Change macros to prototypes.
10545 (struct target_ops): Update comments. Add const to write_memory
10546 definition.
10547
105482002-04-11 Daniel Jacobowitz <drow@mvista.com>
10549
10550 * linux-low.c (usr_store_inferior_registers): Support
10551 registers which are allowed to fail to store.
10552 * linux-low.h (linux_target_ops): Likewise.
10553 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
10554 (ppc_cannot_store_register): FPSCR may not be storable.
10555
105562002-04-09 Daniel Jacobowitz <drow@mvista.com>
10557
10558 * server.h: Include <string.h> if HAVE_STRING_H.
10559 * ChangeLog: Correct paths in last ChangeLog entry.
10560
105612002-04-09 Daniel Jacobowitz <drow@mvista.com>
10562
10563 * linux-low.h: Remove obsolete prototypes.
10564 (struct linux_target_ops): New.
10565 (extern the_low_target): New.
10566 * linux-low.c (num_regs, regmap): Remove declarations.
10567 (register_addr): Use the_low_target explicitly.
10568 (fetch_register): Likewise.
10569 (usr_fetch_inferior_registers): Likewise.
10570 (usr_store_inferior_registers): Likewise.
10571 * linux-arm-low.c (num_regs): Remove.
10572 (arm_num_regs): Define.
10573 (arm_regmap): Renamed from regmap, made static.
10574 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
10575 made static.
10576 (arm_cannot_store_register): Renamed from cannot_store_register,
10577 made static.
10578 (the_low_target): New.
10579 * linux-i386-low.c (num_regs): Remove.
10580 (i386_num_regs): Define.
10581 (i386_regmap): Renamed from regmap, made static.
10582 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
10583 made static.
10584 (i386_cannot_store_register): Renamed from cannot_store_register,
10585 made static.
10586 (the_low_target): New.
10587 * linux-ia64-low.c (num_regs): Remove.
10588 (ia64_num_regs): Define.
10589 (ia64_regmap): Renamed from regmap, made static.
10590 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
10591 made static.
10592 (ia64_cannot_store_register): Renamed from cannot_store_register,
10593 made static.
10594 (the_low_target): New.
10595 * linux-m68k-low.c (num_regs): Remove.
10596 (m68k_num_regs): Define.
10597 (m68k_regmap): Renamed from regmap, made static.
10598 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
10599 made static.
10600 (m68k_cannot_store_register): Renamed from cannot_store_register,
10601 made static.
10602 (the_low_target): New.
10603 * linux-mips-low.c (num_regs): Remove.
10604 (mips_num_regs): Define.
10605 (mips_regmap): Renamed from regmap, made static.
10606 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
10607 made static.
10608 (mips_cannot_store_register): Renamed from cannot_store_register,
10609 made static.
10610 (the_low_target): New.
10611 * linux-ppc-low.c (num_regs): Remove.
10612 (ppc_num_regs): Define.
10613 (ppc_regmap): Renamed from regmap, made static.
10614 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
10615 made static.
10616 (ppc_cannot_store_register): Renamed from cannot_store_register,
10617 made static.
10618 (the_low_target): New.
10619 * linux-s390-low.c (num_regs): Remove.
10620 (s390_num_regs): Define.
10621 (s390_regmap): Renamed from regmap, made static.
10622 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
10623 made static.
10624 (s390_cannot_store_register): Renamed from cannot_store_register,
10625 made static.
10626 (the_low_target): New.
10627 * linux-sh-low.c (num_regs): Remove.
10628 (sh_num_regs): Define.
10629 (sh_regmap): Renamed from regmap, made static.
10630 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
10631 made static.
10632 (sh_cannot_store_register): Renamed from cannot_store_register,
10633 made static.
10634 (the_low_target): New.
10635 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
10636 (the_low_target): New.
10637
106382002-04-09 Daniel Jacobowitz <drow@mvista.com>
10639
10640 * Makefile.in: Add stamp-h target.
10641 * configure.in: Create stamp-h.
10642 * configure: Regenerated.
10643
106442002-04-09 Daniel Jacobowitz <drow@mvista.com>
10645
10646 * inferiors.c: New file.
10647 * target.c: New file.
10648 * target.h: New file.
10649 * Makefile.in: Add target.o and inferiors.o. Update
10650 dependencies.
10651 * linux-low.c (inferior_pid): New static variable,
10652 moved from server.c.
10653 (linux_create_inferior): Renamed from create_inferior.
10654 Call add_inferior. Return 0 on success instead of a PID.
10655 (linux_attach): Renamed from myattach.
10656 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
10657 (linux_thread_alive): Renamed from mythread_alive.
10658 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
10659 child dies.
10660 (linux_resume): Renamed from myresume. Add missing ``return 0''.
10661 (regsets_store_inferior_registers): Correct error message.
10662 Add missing ``return 0''.
10663 (linux_fetch_registers): Renamed from fetch_inferior_registers.
10664 (linux_store_registers): Renamed from store_inferior_registers.
10665 (linux_read_memory): Renamed from read_inferior_memory.
10666 (linux_write_memory): Renamed from write_inferior_memory.
10667 (linux_target_ops): New structure.
10668 (initialize_low): Call set_target_ops ().
10669 * remote-utils.c (unhexify): New function.
10670 (hexify): New function.
10671 (input_interrupt): Send signals to ``signal_pid''.
10672 * server.c (inferior_pid): Remove.
10673 (start_inferior): Update create_inferior call.
10674 (attach_inferior): Call add_inferior.
10675 (handle_query): New function.
10676 (main): Call handle_query for `q' packets.
10677 * server.h: Include "target.h". Remove obsolete prototypes.
10678 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
10679
106802002-04-09 Daniel Jacobowitz <drow@mvista.com>
10681
10682 * Makefile.in: Add WARN_CFLAGS. Update configury
10683 dependencies.
10684 * configure.in: Check for <string.h>
10685 * configure: Regenerate.
10686 * config.in: Regenerate.
10687 * gdbreplay.c: Include needed system headers.
10688 (remote_open): Remove strchr prototype.
10689 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
10690 * regcache.c (supply_register): Change buf argument to const void *.
10691 (supply_register_by_name): Likewise.
10692 (collect_register): Change buf argument to void *.
10693 (collect_register_by_name): Likewise.
10694 * regcache.h: Add missing prototypes.
10695 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
10696 * server.c (handle_query): New function.
10697 (attached): New static variable, moved out of main.
10698 (main): Quiet longjmp clobber warnings.
10699 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
10700 * utils.c (error): Remove NORETURN.
10701 (fatal): Likewise.