Fixes a problem with the linker script parser not always handling the ! character...
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
07697489
PA
12015-02-27 Pedro Alves <palves@redhat.com>
2
3 * acinclude.m4: Include libiberty.m4.
4 * configure.ac: Call libiberty_INIT.
5 * config.in, configure: Regenerate.
6
9beb7c4e
PA
72015-02-26 Pedro Alves <palves@redhat.com>
8
9 * linux-low.c (linux_wait_1): When incrementing the PC past a
10 program breakpoint always use the_low_target.breakpoint_len as
11 increment, rather than the maximum between that and
12 the_low_target.decr_pc_after_break.
13
8090aef2
PA
142015-02-23 Pedro Alves <palves@redhat.com>
15
16 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
17 thread was doing a step-over; always adjust the PC if
18 we stepped over a permanent breakpoint.
19 (linux_wait_1): If we stepped over breakpoint that was on top of a
20 permanent breakpoint, manually advance the PC past it.
21
bc9540e8
PA
222015-02-23 Pedro Alves <palves@redhat.com>
23
24 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
25 modes.
26 (x86_fill_gregset, x86_store_gregset): Use it when handling
27 $orig_eax.
28
2db9a427
PA
292015-02-20 Pedro Alves <palves@redhat.com>
30
31 * thread-db.c: Include "nat/linux-procfs.h".
32 (thread_db_init): Skip listing new threads if the kernel supports
33 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
34
afa8d396
PA
352015-02-20 Pedro Alves <palves@redhat.com>
36
37 * linux-low.c (status_pending_p_callback): Use ptid_match.
38
c9587f88
AT
392015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
40
41 PR breakpoints/16812
42 * linux-low.c (wstatus_maybe_breakpoint): Remove.
43 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
44 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
45
b05ec7a5
AT
462015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
47
48 PR breakpoints/15956
49 * tracepoint.c (cmd_qtinit): Add check for current_thread.
50
d33501a5
MM
512015-02-09 Markus Metzger <markus.t.metzger@intel.com>
52
53 * linux-low.c (linux_low_btrace_conf): Print size.
54 * server.c (handle_btrace_conf_general_set): New.
55 (hanle_general_set): Call handle_btrace_conf_general_set.
56 (handle_query): Report Qbtrace-conf:bts:size as supported.
57
f4abbc16
MM
582015-02-09 Markus Metzger <markus.t.metzger@intel.com>
59
60 * linux-low.c (linux_low_enable_btrace): Update parameters.
61 (linux_low_btrace_conf): New.
62 (linux_target_ops)<to_btrace_conf>: Initialize.
63 * server.c (current_btrace_conf): New.
64 (handle_btrace_enable): Rename to ...
65 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
66 to target_enable_btrace. Update comment. Update users.
67 (handle_qxfer_btrace_conf): New.
68 (qxfer_packets): Add btrace-conf entry.
69 (handle_query): Report qXfer:btrace-conf:read as supported packet.
70 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
71 (target_ops)<read_btrace_conf>: New.
72 (target_enable_btrace): Update parameters.
73 (target_read_btrace_conf): New.
74
043c3577
MM
752015-02-09 Markus Metzger <markus.t.metzger@intel.com>
76
77 * server.c (handle_btrace_general_set): Remove call to
78 target_supports_btrace.
79 (supported_btrace_packets): New.
80 (handle_query): Call supported_btrace_packets.
81 * target.h: include btrace-common.h.
82 (btrace_target_info): Removed.
83 (supports_btrace, target_supports_btrace): Update parameters.
84
734b0e4b
MM
852015-02-09 Markus Metzger <markus.t.metzger@intel.com>
86
87 * Makefile.in (SFILES): Add common/btrace-common.c.
88 (OBS): Add common/btrace-common.o.
89 (btrace-common.o): Add build rules.
90 * linux-low: Include btrace-common.h.
91 (linux_low_read_btrace): Use struct btrace_data. Call
92 btrace_data_init and btrace_data_fini.
93
d6c146e9
PA
942015-02-06 Pedro Alves <palves@redhat.com>
95
96 * thread-db.c (find_new_threads_callback): Add debug output.
97
20ba1ce6
PA
982015-02-04 Pedro Alves <palves@redhat.com>
99
100 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
101 (resume_stopped_resumed_lwps): New function.
102 (linux_wait_for_event_filtered): Use it.
103
8cc73a39
SDJ
1042015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
105
106 * Makefile.in (SFILES): Add linux-personality.c.
107 (linux-personality.o): New rule.
108 * configure.srv (srv_linux_obj): Add linux-personality.o to the
109 list of objects to be built.
110 * linux-low.c: Include nat/linux-personality.h.
111 (linux_create_inferior): Remove code to disable address space
112 randomization (moved to ../nat/linux-personality.c). Create
113 cleanup to disable address space randomization.
114
fb23d554
SDJ
1152015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
116
117 * Makefile.in (posix-strerror.o): New rule.
118 (mingw-strerror.o): Likewise.
119 * configure: Regenerated.
120 * configure.ac: Source file ../common/common.host. Initialize new
121 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
122
cdf43629
YQ
1232015-01-14 Yao Qi <yao@codesourcery.com>
124
125 * Makefile.in (SFILES): Add nat/ppc-linux.c.
126 (ppc-linux.o): New rule.
127 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
128 * configure.ac: AC_CHECK_FUNCS(getauxval).
129 * config.in: Re-generated.
130 * configure: Re-generated.
131 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
132 ppc64_64bit_inferior_p
133
514c5338
YQ
1342015-01-14 Yao Qi <yao@codesourcery.com>
135
136 * linux-ppc-low.c: Include "nat/ppc-linux.h".
137 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
138 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
139 (PT_ORIG_R3, PT_TRAP): Likewise.
140 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
141 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
142 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
143
3368c1e5
JB
1442015-01-10 Joel Brobecker <brobecker@adacore.com>
145
146 * i387-fp.c (i387_cache_to_xsave): In look over
147 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
148 zmmh_low_space field by use of zmmh_high_space.
149
582511be
PA
1502015-01-09 Pedro Alves <palves@redhat.com>
151
152 * linux-low.c (step_over_bkpt): Move higher up in the file.
153 (handle_extended_wait): Don't store the stop_pc here.
154 (get_stop_pc): Adjust comments and rename to ...
155 (check_stopped_by_breakpoint): ... this. Record whether the LWP
156 stopped for a software breakpoint or hardware breakpoint.
157 (thread_still_has_status_pending_p): New function.
158 (status_pending_p_callback): Use
159 thread_still_has_status_pending_p. If the event is no longer
160 interesting, resume the LWP.
161 (handle_tracepoints): Add assert.
162 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
163 (wstatus_maybe_breakpoint): New function.
164 (cancel_breakpoint): Delete function.
165 (check_stopped_by_watchpoint): New function, factored out from
166 linux_low_filter_event.
167 (lp_status_maybe_breakpoint): Delete function.
168 (linux_low_filter_event): Remove filter_ptid argument.
169 Leave thread group exits pending here. Store the LWP's stop PC.
170 Always leave events pending.
171 (linux_wait_for_event_filtered): Pull all events out of the
172 kernel, and leave them all pending.
173 (count_events_callback, select_event_lwp_callback): Consider all
174 events.
175 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
176 (select_event_lwp): Only give preference to the stepping LWP in
177 all-stop mode. Adjust comments.
178 (ignore_event): New function.
179 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
180 references to cancel_breakpoints. Adjust to renames. Also give
181 equal priority to all LWPs that have had events in non-stop mode.
182 If reporting a software breakpoint event, unadjust the LWP's PC.
183 (linux_wait): If linux_wait_1 returned an ignored event, retry.
184 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
185 Adjust.
186 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
187 (resume_status_pending_p): Use thread_still_has_status_pending_p.
188 (linux_stopped_by_watchpoint): Adjust.
189 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
190 * linux-low.h (enum lwp_stop_reason): New.
191 (struct lwp_info) <stop_pc>: Adjust comment.
192 <stopped_by_watchpoint>: Delete field.
193 <stop_reason>: New field.
194 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
195 * mem-break.c (software_breakpoint_inserted_here)
196 (hardware_breakpoint_inserted_here): New function.
197 * mem-break.h (software_breakpoint_inserted_here)
198 (hardware_breakpoint_inserted_here): Declare.
199 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
200 (cancel_breakpoints): Delete.
201 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
202 (upload_fast_traceframes): Remove references to
203 cancel_breakpoints.
204
a33e3959
PA
2052015-01-09 Pedro Alves <palves@redhat.com>
206
207 * thread-db.c (find_new_threads_callback): Ignore thread if the
208 kernel thread ID is -1.
209
8784d563
PA
2102015-01-09 Pedro Alves <palves@redhat.com>
211
212 * linux-low.c (linux_attach_fail_reason_string): Move to
213 nat/linux-ptrace.c, and rename.
214 (linux_attach_lwp): Update comment.
215 (attach_proc_task_lwp_callback): New function.
216 (linux_attach): Adjust to rename and use
217 linux_proc_attach_tgid_threads.
218 (linux_attach_fail_reason_string): Delete declaration.
219
76f2b779
JB
2202015-01-01 Joel Brobecker <brobecker@adacore.com>
221
222 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
223 * server.c (gdbserver_version): Likewise.
224
fafcc06a
SDJ
2252014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
226
227 * remote-utils.c: Include ctype.h.
228 (input_interrupt): Explicitly handle the case when the char
229 received is the NUL byte. Improve the printing of non-ASCII
230 characters.
231
beed38b8
JB
2322014-12-16 Joel Brobecker <brobecker@adacore.com>
233
234 * linux-low.c (linux_low_filter_event): Update call to
235 linux_enable_event_reporting following the addition of
236 a new parameter to that function.
237
bf330350
CU
2382014-12-16 Catalin Udma <catalin.udma@freescale.com>
239
240 PR server/17457
241 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
242 (AARCH64_FPCR_REGNO): Likewise.
243 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
244 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
245 (aarch64_store_fpregset): Likewise.
246
5227d625
JB
2472014-12-15 Joel Brobecker <brobecker@adacore.com>
248
249 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
250 Remove FIXME comment about assumption about N.
251
f93b65a0
JB
2522014-12-13 Joel Brobecker <brobecker@adacore.com>
253
254 * configure.ac: If large-file support is disabled in GDBserver,
255 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
256 * configure: Regenerate.
257
e5a9158d
AA
2582014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
259
260 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
261 warning upon ENODATA from ptrace.
262 * linux-s390-low.c (s390_store_tdb): New.
263 (s390_regsets): Add regset for NT_S390_TDB.
264
feea5f36
AA
2652014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
266
267 * linux-low.c (regsets_store_inferior_registers): Skip regsets
268 without a fill_function.
269 * linux-s390-low.c (s390_fill_last_break): Remove.
270 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
271 (s390_arch_setup): Use regset's size instead of fill_function for
272 loop end condition.
273
098dbe61
AA
2742014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
275
276 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
277 the regset's store function when ptrace returned an error.
278 * regcache.c (get_thread_regcache): Invalidate register cache
279 before fetching inferior's registers.
280
28eef672
AA
2812014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
282
283 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
284 while-loop as for-loop.
285 (regsets_store_inferior_registers): Likewise.
286
bdca27a2
YQ
2872014-11-28 Yao Qi <yao@codesourcery.com>
288
289 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
290 * config.in, configure: Re-generate.
291 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
292 is defined.
293
9c232dda
YQ
2942014-11-21 Yao Qi <yao@codesourcery.com>
295
296 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
297 (AC_CHECK_HEADERS): Remove malloc.h.
298 * configure: Re-generated.
299 * config.in: Re-generated.
300 * server.h: Don't include alloca.h and malloc.h.
301 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
302 Don't include malloc.h.
303
43968415
JB
3042014-11-17 Joel Brobecker <brobecker@adacore.com>
305
306 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
307 corresponding ERRNO check in same block.
308
40e91bc7
PA
3092014-11-12 Pedro Alves <palves@redhat.com>
310
311 * server.c (cont_thread): Update comment.
312 (start_inferior, attach_inferior): No longer clear cont_thread.
313 (handle_v_cont): No longer set cont_thread.
314 (captured_main): Clear cont_thread each time a GDB connects.
315
c2c118cf
PA
3162014-11-12 Pedro Alves <palves@redhat.com>
317
318 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
319 thread, and don't resume all threads if the Hc thread has exited.
320
78708b7c
PA
3212014-11-12 Pedro Alves <palves@redhat.com>
322
323 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
324 the process group instead of to a specific LWP.
325
a2abc7de
PA
3262014-10-15 Pedro Alves <palves@redhat.com>
327
328 PR server/17487
329 * win32-arm-low.c (arm_set_thread_context): Remove current_event
330 parameter.
331 (arm_set_thread_context): Delete.
332 (the_low_target): Adjust.
333 * win32-i386-low.c (debug_registers_changed)
334 (debug_registers_used): Delete.
335 (update_debug_registers_callback): New function.
336 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
337 needing to update their debug registers.
338 (win32_get_current_dr): New function.
339 (x86_dr_low_get_addr, x86_dr_low_get_control)
340 (x86_dr_low_get_status): Fetch the debug register from the thread
341 record's context.
342 (i386_initial_stuff): Adjust.
343 (i386_get_thread_context): Remove current_event parameter. Don't
344 clear debug_registers_changed nor copy DR values to
345 debug_reg_state.
346 (i386_set_thread_context): Delete.
347 (i386_prepare_to_resume): New function.
348 (i386_thread_added): Mark the thread as needing to update irs
349 debug registers.
350 (the_low_target): Remove i386_set_thread_context and install
351 i386_prepare_to_resume.
352 * win32-low.c (win32_get_thread_context): Adjust.
353 (win32_set_thread_context): Use SetThreadContext
354 directly.
355 (win32_prepare_to_resume): New function.
356 (win32_require_context): New function, factored out from ...
357 (thread_rec): ... this.
358 (continue_one_thread): Call win32_prepare_to_resume on each thread
359 we're about to continue.
360 (win32_resume): Call win32_prepare_to_resume on the event thread.
361 * win32-low.h (struct win32_thread_info)
362 <debug_registers_changed>: New field.
363 (struct win32_target_ops): Change prototype of set_thread_context,
364 delete set_thread_context and add prepare_to_resume.
365 (win32_require_context): New declaration.
366
a442d071
GB
3672014-10-08 Gary Benson <gbenson@redhat.com>
368
369 * server.h: Do not include common-exceptions.h.
370
6f1947e8
GB
3712014-10-08 Gary Benson <gbenson@redhat.com>
372
373 * server.h: Do not include cleanups.h.
374
63b434a4
JH
3752014-09-30 James Hogan <james.hogan@imgtec.com>
376
377 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
378 mips64-dsp-linux.c.
379
c4d9ceb6
YQ
3802014-09-23 Yao Qi <yao@codesourcery.com>
381
382 * linux-low.c (lp_status_maybe_breakpoint): New function.
383 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
384 (count_events_callback): Likewise.
385 (select_event_lwp_callback): Likewise.
386 (cancel_breakpoints_callback): Likewise.
387
89a5711c
DB
3882014-09-19 Don Breazeal <donb@codesourcery.com>
389
390 * linux-low.c (handle_extended_wait): Call
391 linux_ptrace_get_extended_event.
392 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
393 linux_is_extended_waitstatus.
394
bffc0964
JB
3952014-09-16 Joel Brobecker <brobecker@adacore.com>
396
397 * Makefile.in (CPPFLAGS): Define.
398 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
399 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
400
0bfdf32f
GB
4012014-09-16 Gary Benson <gbenson@redhat.com>
402
403 * inferiors.h (current_inferior): Renamed as...
404 (current_thread): New variable. All uses updated.
405 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
406 (maybe_move_out_of_jump_pad): Likewise.
407 (cancel_breakpoint): Likewise.
408 (linux_low_filter_event): Likewise.
409 (wait_for_sigstop): Likewise.
410 (linux_resume_one_lwp): Likewise.
411 (need_step_over_p): Likewise.
412 (start_step_over): Likewise.
413 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
414 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
415 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
416 and save_inferior as saved_thread.
417 * regcache.c (get_thread_regcache): Renamed saved_inferior as
418 saved_thread.
419 (regcache_invalidate_thread): Likewise.
420 * remote-utils.c (prepare_resume_reply): Likewise.
421 * thread-db.c (thread_db_get_tls_address): Likewise.
422 (disable_thread_event_reporting): Likewise.
423 (remove_thread_event_breakpoints): Likewise.
424 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
425 as saved_thread.
426 * target.h (set_desired_inferior): Renamed as...
427 (set_desired_thread): New declaration. All uses updated.
428 * server.c (myresume): Updated comment to reference thread instead
429 of inferior.
430 (handle_serial_event): Likewise.
431 (handle_target_event): Likewise.
432
361c8ade
GB
4332014-09-12 Tom Tromey <tromey@redhat.com>
434 Gary Benson <gbenson@redhat.com>
435
436 * regcache.h: Include common-regcache.h.
437 (regcache_read_pc): Don't declare.
438 * regcache.c (get_thread_regcache_for_ptid): New function.
439
bd9269f7
GB
4402014-09-11 Tom Tromey <tromey@redhat.com>
441 Gary Benson <gbenson@redhat.com>
442
443 * symbol.c: New file.
444 * Makefile.in (SFILES): Add symbol.c.
445 (OBS): Add symbol.o.
446
f8c1d06b
GB
4472014-09-11 Gary Benson <gbenson@redhat.com>
448
449 * target.c (target_stop_ptid, target_continue_ptid): New
450 functions.
451
721ec300
GB
4522014-09-11 Tom Tromey <tromey@redhat.com>
453 Gary Benson <gbenson@redhat.com>
454
455 * target.h: Include target/target.h.
456 * target.c (target_read_memory, target_read_uint32)
457 (target_write_memory): New functions.
458
c5e92cca
GB
4592014-09-11 Gary Benson <gbenson@redhat.com>
460
461 * server.h (debug_hw_points): Don't declare.
462 * server.c (debug_hw_points): Don't define. Replace all uses
463 with show_debug_regs.
464 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
465 all uses with show_debug_regs.
466
2e4bb98a
EBM
4672014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
468
469 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
470 endianness into account.
471 (ppc_supply_ptrace_register): Likewise.
472
ac740bc7
JH
4732014-09-03 James Hogan <james.hogan@imgtec.com>
474
475 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
476 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
477
97ea6506
GB
4782014-09-03 Gary Benson <gbenson@redhat.com>
479
480 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
481 ALL_DEBUG_ADDRESS_REGISTERS.
482
df7e5265
GB
4832014-09-02 Gary Benson <gbenson@redhat.com>
484
485 * i386-low.h: Renamed as...
486 * x86-low.h: New file. All type, function and variable name
487 prefixes changed from "i386_" to "x86_". All references updated.
488 * i386-low.c: Renamed as...
489 * x86-low.c: New file. All type, function and variable name
490 prefixes changed from "i386_" to "x86_". All references updated.
491
ed859da7
GB
4922014-09-02 Gary Benson <gbenson@redhat.com>
493
494 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
495 (x86_linux_new_thread): Likewise.
496
860789c7
GB
4972014-08-29 Gary Benson <gbenson@redhat.com>
498
499 * server.h (setjmp.h): Do not include.
500 (toplevel): Do not declare.
501 (common-exceptions.h): Include.
502 (cleanups.h): Likewise.
503 * server.c (toplevel): Do not define.
504 (exit_code): New static global.
505 (detach_or_kill_for_exit_cleanup): New function.
506 (main): New function. Original main renamed to...
507 (captured_main): New function.
508 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
509
ff55e1b5
GB
5102014-08-29 Gary Benson <gbenson@redhat.com>
511
512 * Makefile.in (SFILES): Add common/common-exceptions.c.
513 (OBS): Add common-exceptions.o.
514 (common-exceptions.o): New rule.
515 * utils.c (prepare_to_throw_exception): New function.
516
e9bcb658
GB
5172014-08-29 Gary Benson <gbenson@redhat.com>
518
519 * config.in: Regenerate.
520 * configure: Likewise.
521
e3180625
GB
5222014-08-29 Gary Benson <gbenson@redhat.com>
523
524 * Makefile.in (SFILES): Add common/cleanups.c.
525 (OBS): cleanups.o.
526 (cleanups.o): New rule.
527
e3d6ba5d
GB
5282014-08-29 Gary Benson <gbenson@redhat.com>
529
530 * utils.c (internal_vwarning): New function.
531
7096e886
GB
5322014-08-28 Gary Benson <gbenson@redhat.com>
533
534 * utils.h (fatal): Remove declaration.
535 * utils.c (fatal): Remove function.
536
14ce3192
GB
5372014-08-28 Gary Benson <gbenson@redhat.com>
538
539 * tracepoint.c (gdb_agent_init): Replace fatal with
540 perror_with_name.
541 (initialize_tracepoint): Likewise.
542
50278d59
GB
5432014-08-28 Gary Benson <gbenson@redhat.com>
544
545 * remote-utils.c (remote_prepare): Replace fatal with error.
546
aa96c426
GB
5472014-08-28 Gary Benson <gbenson@redhat.com>
548
549 * linux-low.c (linux_async): Replace fatal with warning.
550 Tidy up and return.
551 (linux_start_non_stop): Return -1 if linux_async failed.
552
f7160e97
GB
5532014-08-28 Gary Benson <gbenson@redhat.com>
554
555 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
556 gdb_assert.
557 (i386_dr_low_get_addr): Remove vague comment.
558 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
559 gdb_assert.
560
38e08fca
GB
5612014-08-28 Gary Benson <gbenson@redhat.com>
562
563 * inferiors.c (get_thread_process): Replace check with gdb_assert.
564 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
565 internal_error.
566 (linux_resume_one_lwp): Likewise.
567 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
568 gdb_assert.
569 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
570 with internal_error.
571 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
572 (init_register_cache): Replace fatal with gdb_assert_not_reached.
573 (find_register_by_name): Replace fatal with internal_error.
574 (find_regno): Likewise.
575 * tdesc.c (init_target_desc): Replace check with gdb_assert.
576 * thread-db.c (thread_db_create_event): Likewise.
577 (thread_db_load_search): Likewise.
578 (try_thread_db_load_1): Likewise.
579 * tracepoint.c (get_jump_space_head): Replace fatal with
580 internal_error.
581 (claim_trampoline_space): Likewise.
582 (have_fast_tracepoint_trampoline_buffer): Likewise.
583 (cmd_qtstart): Likewise.
584 (stop_tracing): Likewise.
585 (fast_tracepoint_collecting): Likewise.
586 (target_malloc): Likewise.
587 (download_tracepoint): Likewise.
588 (download_trace_state_variables): Replace check with gdb_assert.
589 (upload_fast_traceframes): Replace fatal with internal_error.
590
34abf635
GB
5912014-08-19 Tom Tromey <tromey@redhat.com>
592 Gary Benson <gbenson@redhat.com>
593
594 * Makefile.in (SFILES): Add common/common-debug.c.
595 (OBS): Add common-debug.o.
596 (common-debug.o): New rule.
597 * debug.h (debug_printf): Don't declare.
598 * debug.c (debug_printf): Renamed and rewritten as...
599 (debug_vprintf): New function.
600
f6e94d78
GB
6012014-08-19 Gary Benson <gbenson@redhat.com>
602
603 * utils.h: Do not include print-utils.h.
604
9239eeab
GB
6052014-08-19 Tom Tromey <tromey@redhat.com>
606 Gary Benson <gbenson@redhat.com>
607
608 * server.h: Add static assertion.
609 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
610
ef87c8bb
GB
6112014-08-19 Tom Tromey <tromey@redhat.com>
612 Gary Benson <gbenson@redhat.com>
613
614 * Makefile.in (SFILES): Add common/errors.c.
615 (OBS): Add errors.o.
616 (IPA_OBS): Add errors-ipa.o.
617 (errors.o): New rule.
618 (errors-ipa.o): Likewise.
619 * utils.h (perror_with_name, error, warning): Don't declare.
620 * utils.c (warning): Renamed and rewritten as...
621 (vwarning): New function.
622 (error): Renamed and rewritten as...
623 (verror): New function.
624 (internal_error): Renamed and rewritten as...
625 (internal_verror): New function.
626
bb974a24
GB
6272014-08-07 Gary Benson <gbenson@redhat.com>
628
629 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
630 * configure: Regenerate.
631 * config.in: Likewise.
632 * server.h: Do not include errno.h.
633 * event-loop.c: Likewise.
634 * hostio-errno.c: Likewise.
635 * linux-low.c: Likewise.
636 * remote-utils.c: Likewise.
637 * spu-low.c: Likewise.
638 * utils.c: Likewise.
639 * gdbreplay.c: Unconditionally include errno.h.
640
6d3d12eb
GB
6412014-08-07 Gary Benson <gbenson@redhat.com>
642
643 * server.h: Do not include string.h.
644 * event-loop.c: Likewise.
645 * linux-low.c: Likewise.
646 * regcache.c: Likewise.
647 * remote-utils.c: Likewise.
648 * spu-low.c: Likewise.
649 * utils.c: Likewise.
650
dccbb609
GB
6512014-08-07 Gary Benson <gbenson@redhat.com>
652
653 * server.h: Do not include gdb_assert.h.
654
e76df0d0
GB
6552014-08-07 Gary Benson <gbenson@redhat.com>
656
657 * server.h: Do not include common-utils.h.
658
4cb9c816
GB
6592014-08-07 Gary Benson <gbenson@redhat.com>
660
661 * server.h: Do not include ptid.h.
662 * notif.h: Likewise.
663
3995eeee
GB
6642014-08-07 Gary Benson <gbenson@redhat.com>
665
666 * server.h: Do not include gdb_locale.h.
667
cb9f1a9b
GB
6682014-08-07 Gary Benson <gbenson@redhat.com>
669
670 * server.h: Do not include gdb/signals.h.
671 * win32-low.c: Likewise.
672
a5fceff8
GB
6732014-08-07 Gary Benson <gbenson@redhat.com>
674
675 * server.h: Do not include pathmax.h.
676
b9391142
GB
6772014-08-07 Gary Benson <gbenson@redhat.com>
678
679 * server.h: Do not include libiberty.h.
680 * linux-bfin-low.c: Likewise.
681
0e443c87
GB
6822014-08-07 Gary Benson <gbenson@redhat.com>
683
684 * server.h: Do not include ansidecl.h.
685
8ebb3f56
GB
6862014-08-07 Gary Benson <gbenson@redhat.com>
687
688 * linux-x86-low.c: Do not include stddef.h.
689 * lynx-ppc-low.c: Likewise.
690 * tracepoint.c: Likewise.
691
8980bdf6
GB
6922014-08-07 Gary Benson <gbenson@redhat.com>
693
694 * server.h: Do not include stdarg.h.
695 * nto-low.c: Likewise.
696
d7096f71
GB
6972014-08-07 Gary Benson <gbenson@redhat.com>
698
699 * server.h: Do not include stdlib.h.
700 * inferiors.c: Likewise.
701 * linux-low.c: Likewise.
702 * regcache.c: Likewise.
703 * spu-low.c: Likewise.
704 * tracepoint.c: Likewise.
705 * utils.c: Likewise.
706
d02f550d
GB
7072014-08-07 Gary Benson <gbenson@redhat.com>
708
709 * server.h: Do not include stdio.h.
710 * linux-low.c: Likewise.
711 * remote-utils.c: Likewise.
712 * spu-low.c: Likewise.
713 * utils.c: Likewise.
714 * wincecompat.c: Likewise.
715
87f6c4e3
GB
7162014-08-06 Gary Benson <gbenson@redhat.com>
717
718 * regcache.c (init_register_cache): Move conditionals inside if.
719
7089dca4
GB
7202014-08-06 Gary Benson <gbenson@redhat.com>
721
722 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
723
462f517e
GB
7242014-07-31 Gary Benson <gbenson@redhat.com>
725
726 * ax.h: Do not include server.h.
727 * gdbthread.h: Likewise.
728 * lynx-low.h: Likewise.
729 * notif.h: Likewise.
730
976411d6
GB
7312014-07-30 Gary Benson <gbenson@redhat.com>
732
733 * server.h: Include common-defs.h.
734 Do not include config.h or build-gnulib-gdbserver/config.h.
735
d41f6d8e
GB
7362014-07-30 Gary Benson <gbenson@redhat.com>
737
738 * hostio-errno.c: Move server.h to top of includes list.
739 * inferiors.c: Likewise.
740 * linux-x86-low.c: Likewise.
741 * notif.c: Include server.h.
742
314c6a35
TT
7432014-07-24 Tom Tromey <tromey@redhat.com>
744 Gary Benson <gbenson@redhat.com>
745
746 * server.h (CORE_ADDR): Now unsigned.
747
69ff6be5
PA
7482014-07-16 Pedro Alves <palves@redhat.com>
749
750 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
751
ce9e3fe7
PA
7522014-07-15 Pedro Alves <palves@redhat.com>
753
754 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
755 copy.
756
e76126e8
PA
7572014-07-11 Pedro Alves <palves@redhat.com>
758
759 * linux-low.c (kill_wait_lwp): New function, based on
760 kill_one_lwp_callback, but use my_waitpid directly.
761 (kill_one_lwp_callback, linux_kill): Use it.
762
8e9db26e
PA
7632014-06-23 Pedro Alves <palves@redhat.com>
764
765 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
766 before setting DR0..DR3.
767
698b3e08
GB
7682014-06-20 Gary Benson <gbenson@redhat.com>
769
770 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
771 * configure: Regenerated.
772 * config.in: Likewise.
773
125f8a3d
GB
7742014-06-20 Gary Benson <gbenson@redhat.com>
775
776 * Makefile.in (SFILES): Update locations for files moved
777 from common to nat.
778 (object file files): Reordered.
779
42995dbd
GB
7802014-06-20 Gary Benson <gbenson@redhat.com>
781
782 * i386-low.h (i386_dr_low_can_set_addr): Removed.
783 (i386_dr_low_set_addr): Likewise.
784 (i386_dr_low_get_addr): Likewise.
785 (i386_dr_low_can_set_control): Likewise.
786 (i386_dr_low_set_control): Likewise.
787 (i386_dr_low_get_control): Likewise.
788 (i386_dr_low_get_status): Likewise.
789 (i386_get_debug_register_length): Likewise.
790 * linux-x86-low.c (i386_dr_low_set_addr):
791 Changed signature. Made static.
792 (i386_dr_low_get_addr): Likewise.
793 (i386_dr_low_set_control): Likewise.
794 (i386_dr_low_get_control): Likewise.
795 (i386_dr_low_get_status): Likewise.
796 (i386_dr_low): New global variable.
797 * win32-i386-low.c (i386_dr_low_set_addr):
798 Changed signature. Made static.
799 (i386_dr_low_get_addr): Likewise.
800 (i386_dr_low_set_control): Likewise.
801 (i386_dr_low_get_control): Likewise.
802 (i386_dr_low_get_status): Likewise.
803 (i386_dr_low): New global variable.
804
e1d2394b
MS
8052014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
806
807 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
808 * Makefile.in (AR, AR_FLAGS): Define.
809 * configure: Regenerate.
810
3a8ee006
GB
8112014-06-19 Gary Benson <gbenson@redhat.com>
812
813 * Makefile.in (i386-dregs.o): New rule.
814 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
815 * i386-low.c (target.h): Remove include.
816 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
817 (DR_CONTROL_SHIFT): Likewise.
818 (DR_CONTROL_SIZE): Likewise.
819 (DR_RW_EXECUTE): Likewise.
820 (DR_RW_WRITE): Likewise.
821 (DR_RW_READ): Likewise.
822 (DR_RW_IORW): Likewise.
823 (DR_LEN_1): Likewise.
824 (DR_LEN_2): Likewise.
825 (DR_LEN_4): Likewise.
826 (DR_LEN_8): Likewise.
827 (DR_LOCAL_ENABLE_SHIFT): Likewise.
828 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
829 (DR_ENABLE_SIZE): Likewise.
830 (DR_LOCAL_SLOWDOWN): Likewise.
831 (DR_GLOBAL_SLOWDOWN): Likewise.
832 (DR_CONTROL_RESERVED): Likewise.
833 (I386_DR_CONTROL_MASK): Likewise.
834 (I386_DR_VACANT): Likewise.
835 (I386_DR_LOCAL_ENABLE): Likewise.
836 (I386_DR_GLOBAL_ENABLE): Likewise.
837 (I386_DR_DISABLE): Likewise.
838 (I386_DR_SET_RW_LEN): Likewise.
839 (I386_DR_GET_RW_LEN): Likewise.
840 (I386_DR_WATCH_HIT): Likewise.
841 (i386_wp_op_t): Likewise.
842 (i386_show_dr): Likewise.
843 (i386_length_and_rw_bits): Likewise.
844 (i386_insert_aligned_watchpoint): Likewise.
845 (i386_remove_aligned_watchpoint): Likewise.
846 (i386_handle_nonaligned_watchpoint): Likewise.
847 i386_update_inferior_debug_regs(): Likewise.
848 (i386_dr_insert_watchpoint): Likewise.
849 (i386_dr_remove_watchpoint): Likewise.
850 (i386_dr_region_ok_for_watchpoint): Likewise.
851 (i386_dr_stopped_data_address): Likewise.
852 (i386_dr_stopped_by_watchpoint): Likewise.
853
8f26655c
GB
8542014-06-19 Gary Benson <gbenson@redhat.com>
855
856 * i386-low.c (i386_dr_show): Renamed to
857 i386_show_dr and made static. All uses updated.
858 (i386_dr_length_and_rw_bits): Renamed to
859 i386_length_and_rw_bits and made static.
860 All uses updated.
861 (i386_dr_insert_aligned_watchpoint): Renamed to
862 i386_insert_aligned_watchpoint and made static.
863 All uses updated.
864 (i386_dr_remove_aligned_watchpoint): Renamed to
865 i386_remove_aligned_watchpoint and made static.
866 All uses updated.
867 (i386_dr_update_inferior_debug_regs): Renamed to
868 i386_update_inferior_debug_regs and made static.
869 All uses updated.
870
b9228891
GB
8712014-06-18 Gary Benson <gbenson@redhat.com>
872
5171def3
GB
873 * i386-low.h (i386_dr_low_can_set_addr): New macro.
874 (i386_dr_low_can_set_control): Likewise.
875 (i386_get_debug_register_length): Likewise.
876 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
877 (i386_dr_low_can_set_control): Likewise.
878 (i386_get_debug_register_length): Likewise.
879
8802014-06-17 Gary Benson <gbenson@redhat.com>
881
b9228891
GB
882 * i386-low.h (i386-dregs.h): New include.
883 (DR_FIRSTADDR): Now in i386-dregs.h.
884 (DR_LASTADDR): Likewise.
885 (DR_NADDR): Likewise.
886 (DR_STATUS): Likewise.
887 (DR_CONTROL): Likewise.
888 (i386_debug_reg_state): Likewise.
889 (i386_dr_insert_watchpoint): Likewise.
890 (i386_dr_remove_watchpoint): Likewise.
891 (i386_dr_region_ok_for_watchpoint): Likewise.
892 (i386_dr_stopped_data_address): Likewise.
893 (i386_dr_stopped_by_watchpoint): Likewise.
894 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
895
4be83cc2
GB
8962014-06-18 Gary Benson <gbenson@redhat.com>
897
898 * i386-low.h (i386_low_insert_watchpoint): Renamed to
899 i386_dr_insert_watchpoint.
900 (i386_low_remove_watchpoint): Renamed to
901 i386_dr_remove_watchpoint.
902 (i386_low_region_ok_for_watchpoint): Renamed to
903 i386_dr_region_ok_for_watchpoint.
904 (i386_low_stopped_data_address): Renamed to
905 i386_dr_stopped_data_address.
906 (i386_low_stopped_by_watchpoint): Renamed to
907 i386_dr_stopped_by_watchpoint.
908 * i386-low.c (i386_show_dr): Renamed to
909 i386_dr_show and made nonstatic. All uses updated.
910 (i386_length_and_rw_bits): Renamed to
911 i386_dr_length_and_rw_bits and made nonstatic.
912 All uses updated.
913 (i386_insert_aligned_watchpoint): Renamed to
914 i386_dr_insert_aligned_watchpoint and made nonstatic.
915 All uses updated.
916 (i386_remove_aligned_watchpoint): Renamed to
917 i386_dr_remove_aligned_watchpoint and made nonstatic.
918 All uses updated.
919 (i386_update_inferior_debug_regs): Renamed to
920 i386_dr_update_inferior_debug_regs and made nonstatic.
921 All uses updated.
922 (i386_low_insert_watchpoint): Renamed to
923 i386_dr_insert_watchpoint. All uses updated.
924 (i386_low_remove_watchpoint): Renamed to
925 i386_dr_remove_watchpoint. All uses updated.
926 (i386_low_region_ok_for_watchpoint): Renamed to
927 i386_dr_region_ok_for_watchpoint. All uses updated.
928 (i386_low_stopped_data_address): Renamed to
929 i386_dr_stopped_data_address. All uses updated.
930 (i386_low_stopped_by_watchpoint): Renamed to
931 i386_dr_stopped_by_watchpoint. All uses updated.
932
131aa0d4
GB
9332014-06-18 Gary Benson <gbenson@redhat.com>
934
935 * i386-low.c (i386_dr_low_can_set_addr): New macro.
936 (i386_dr_low_can_set_control): Likewise.
937 (i386_insert_aligned_watchpoint): New check.
938
d9305f7f
GB
9392014-06-18 Gary Benson <gbenson@redhat.com>
940
941 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
942 Renamed to state.
943
e927c9fc
GB
9442014-06-18 Gary Benson <gbenson@redhat.com>
945
946 * i386-low.c (i386_length_and_rw_bits): Use internal_error
947 instead of fatal and error.
948 (i386_handle_nonaligned_watchpoint): Likewise.
949
1b6d4134
GB
9502014-06-18 Gary Benson <gbenson@redhat.com>
951
952 * i386-low.c (i386_get_debug_register_length): New macro.
953 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
954 (i386_show_dr): Use debug_printf instead of fprintf. Use
955 phex to format values.
956
6e62758f
GB
9572014-06-18 Gary Benson <gbenson@redhat.com>
958
959 * i386-low.h: Comment changes.
960 * i386-low.c: Likewise.
961
fc6e2f03
GB
9622014-06-18 Gary Benson <gbenson@redhat.com>
963
964 * i386-low.c: Whitespace changes.
965
f9d1eeed
TT
9662014-06-12 Tom Tromey <tromey@redhat.com>
967
968 * utils.c (freeargv): Remove.
969
0b04e523
TT
9702014-06-12 Tom Tromey <tromey@redhat.com>
971
972 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
973 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
974 (parse_debug_format_options): Likewise.
975 (gdbserver_usage): Likewise.
976 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
977 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
978 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
979 against libiberty.
980 ($(LIBGNU)): Depend on libiberty.
981 (all-lib): Recurse into all subdirs.
982 (install-only): Invoke "install" target in subdirs.
983 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
984 targets.
985 * configure: Rebuild.
986 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
987 for vasprintf, vsnprintf, or gettimeofday.
988 * configure.srv: Don't add safe-ctype.o or lbasename.o to
989 srv_tgtobj.
990
270c9937
JB
9912014-06-05 Joel Brobecker <brobecker@adacore.com>
992
993 * development.sh: Delete.
994 * Makefile.in (config.status): Adjust dependency on development.sh.
995 * configure.ac: Adjust development.sh source call.
996 * configure: Regenerate.
997
0a261ed8
PA
9982014-06-02 Pedro Alves <palves@redhat.com>
999
1000 * ax.c (gdb_free_agent_expr): New function.
1001 * ax.h (gdb_free_agent_expr): New declaration.
1002 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1003 list.
1004 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1005 static.
1006 (clear_breakpoint_conditions_and_commands): New function.
1007 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1008 (clear_breakpoint_conditions_and_commands): New declaration.
1009
e9dae05e
RR
10102014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1011
1012 * linux-aarch64-low.c (asm/ptrace.h): Include.
1013
5876f503
JK
10142014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1015
1016 Fix TLS access for -static -pthread.
1017 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1018 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1019 (thread_db_load_search, try_thread_db_load_1): Initialize it.
1020
802e8e6d
PA
10212014-05-20 Pedro Alves <palves@redhat.com>
1022
1023 * linux-aarch64-low.c (aarch64_insert_point)
1024 (aarch64_remove_point): No longer check whether the type is
1025 supported here. Adjust to new interface.
1026 (the_low_target): Install aarch64_supports_z_point_type as
1027 supports_z_point_type method.
1028 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
1029 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
1030 instead of a Z packet char. Adjust.
1031 (arm_supports_z_point_type): New function.
1032 (arm_insert_point, arm_remove_point): Adjust to new interface.
1033 (the_low_target): Install arm_supports_z_point_type.
1034 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1035 (cris_insert_point, cris_remove_point): Adjust to new interface.
1036 Don't check whether the type is supported here.
1037 (the_low_target): Install cris_supports_z_point_type.
1038 * linux-low.c (linux_supports_z_point_type): New function.
1039 (linux_insert_point, linux_remove_point): Adjust to new interface.
1040 * linux-low.h (struct linux_target_ops) <insert_point,
1041 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1042 raw_breakpoint pointer parameter.
1043 <supports_z_point_type>: New method.
1044 * linux-mips-low.c (mips_supports_z_point_type): New function.
1045 (mips_insert_point, mips_remove_point): Adjust to new interface.
1046 Use mips_supports_z_point_type.
1047 (the_low_target): Install mips_supports_z_point_type.
1048 * linux-ppc-low.c (the_low_target): Install NULL as
1049 supports_z_point_type method.
1050 * linux-s390-low.c (the_low_target): Install NULL as
1051 supports_z_point_type method.
1052 * linux-sparc-low.c (the_low_target): Install NULL as
1053 supports_z_point_type method.
1054 * linux-x86-low.c (x86_supports_z_point_type): New function.
1055 (x86_insert_point): Adjust to new insert_point interface. Use
1056 insert_memory_breakpoint. Adjust to new
1057 i386_low_insert_watchpoint interface.
1058 (x86_remove_point): Adjust to remove_point interface. Use
1059 remove_memory_breakpoint. Adjust to new
1060 i386_low_remove_watchpoint interface.
1061 (the_low_target): Install x86_supports_z_point_type.
1062 * lynx-low.c (lynx_target_ops): Install NULL as
1063 supports_z_point_type callback.
1064 * nto-low.c (nto_supports_z_point_type): New.
1065 (nto_insert_point, nto_remove_point): Adjust to new interface.
1066 (nto_target_ops): Install nto_supports_z_point_type.
1067 * mem-break.c: Adjust intro comment.
1068 (struct raw_breakpoint) <raw_type, size>: New fields.
1069 <inserted>: Update comment.
1070 <shlib_disabled>: Delete field.
1071 (enum bkpt_type) <gdb_breakpoint>: Delete value.
1072 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1073 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1074 (raw_bkpt_type_to_target_hw_bp_type): New function.
1075 (find_enabled_raw_code_breakpoint_at): New function.
1076 (find_raw_breakpoint_at): New type and size parameters. Use them.
1077 (insert_memory_breakpoint): New function, based off
1078 set_raw_breakpoint_at.
1079 (remove_memory_breakpoint): New function.
1080 (set_raw_breakpoint_at): Reimplement.
1081 (set_breakpoint): New, based on set_breakpoint_at.
1082 (set_breakpoint_at): Reimplement.
1083 (delete_raw_breakpoint): Go through the_target->remove_point
1084 instead of assuming memory breakpoints.
1085 (find_gdb_breakpoint_at): Delete.
1086 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1087 (find_gdb_breakpoint): New function.
1088 (set_gdb_breakpoint_at): Delete.
1089 (z_type_supported): New function.
1090 (set_gdb_breakpoint_1): New function, loosely based off
1091 set_gdb_breakpoint_at.
1092 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1093 (delete_gdb_breakpoint_at): Delete.
1094 (delete_gdb_breakpoint_1): New function, loosely based off
1095 delete_gdb_breakpoint_at.
1096 (delete_gdb_breakpoint): New function.
1097 (clear_gdb_breakpoint_conditions): Rename to ...
1098 (clear_breakpoint_conditions): ... this. Don't handle a NULL
1099 breakpoint.
1100 (add_condition_to_breakpoint): Make static.
1101 (add_breakpoint_condition): Take a struct breakpoint pointer
1102 instead of an address. Adjust.
1103 (gdb_condition_true_at_breakpoint): Rename to ...
1104 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1105 z_type parameter.
1106 (gdb_condition_true_at_breakpoint): Reimplement.
1107 (add_breakpoint_commands): Take a struct breakpoint pointer
1108 instead of an address. Adjust.
1109 (gdb_no_commands_at_breakpoint): Rename to ...
1110 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
1111 parameter. Return true if no breakpoint was found. Change debug
1112 output.
1113 (gdb_no_commands_at_breakpoint): Reimplement.
1114 (run_breakpoint_commands): Rename to ...
1115 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
1116 and change return type to boolean.
1117 (run_breakpoint_commands): New function.
1118 (gdb_breakpoint_here): Also check for Z1 breakpoints.
1119 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
1120 breakpoint. Go through the_target->remove_point instead of
1121 assuming memory breakpoint.
1122 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
1123 software and hardware breakpoints.
1124 (reinsert_raw_breakpoint): Go through the_target->insert_point
1125 instead of assuming memory breakpoint.
1126 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
1127 software and hardware breakpoints.
1128 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
1129 Check both software and hardware breakpoints.
1130 (validate_inserted_breakpoint): Assert the breakpoint is a
1131 software breakpoint. Set the inserted flag to -1 instead of
1132 setting shlib_disabled.
1133 (delete_disabled_breakpoints): Adjust.
1134 (validate_breakpoints): Only validate software breakpoints.
1135 Adjust to inserted flag change.
1136 (check_mem_read, check_mem_write): Skip breakpoint types other
1137 than software breakpoints. Adjust to inserted flag change.
1138 * mem-break.h (enum raw_bkpt_type): New enum.
1139 (raw_breakpoint, struct process_info): Forward declare.
1140 (Z_packet_to_target_hw_bp_type): Delete declaration.
1141 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
1142 (set_gdb_breakpoint, delete_gdb_breakpoint)
1143 (clear_breakpoint_conditions): New declarations.
1144 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
1145 (breakpoint_inserted_here): Update comment.
1146 (add_breakpoint_condition, add_breakpoint_commands): Replace
1147 address parameter with a breakpoint pointer parameter.
1148 (gdb_breakpoint_here): Update comment.
1149 (delete_gdb_breakpoint_at): Delete.
1150 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
1151 * server.c (process_point_options): Take a struct breakpoint
1152 pointer instead of an address. Adjust.
1153 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
1154 delete_gdb_breakpoint.
1155 * spu-low.c (spu_target_ops): Install NULL as
1156 supports_z_point_type method.
1157 * target.h: Include mem-break.h.
1158 (struct target_ops) <prepare_to_access_memory>: Update comment.
1159 <supports_z_point_type>: New field.
1160 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1161 instead of a char. Also take a raw breakpoint pointer.
1162 * win32-arm-low.c (the_low_target): Install NULL as
1163 supports_z_point_type.
1164 * win32-i386-low.c (i386_supports_z_point_type): New function.
1165 (i386_insert_point, i386_remove_point): Adjust to new interface.
1166 (the_low_target): Install i386_supports_z_point_type.
1167 * win32-low.c (win32_supports_z_point_type): New function.
1168 (win32_insert_point, win32_remove_point): Adjust to new interface.
1169 (win32_target_ops): Install win32_supports_z_point_type.
1170 * win32-low.h (struct win32_target_ops):
1171 <supports_z_point_type>: New method.
1172 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1173 instead of a char. Also take a raw breakpoint pointer.
1174
932539e3
PA
11752014-05-20 Pedro Alves <palves@redhat.com>
1176
1177 * mem-break.h: Include break-common.h.
1178 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1179 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
1180 (Z_packet_to_target_hw_bp_type): New declaration.
1181 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
1182 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
1183 (Z_PACKET_ACCESS_WP): Delete macros.
1184 (Z_packet_to_hw_type): Delete function.
1185 * i386-low.h: Don't include break-common.h here.
1186 (Z_packet_to_hw_type): Delete declaration.
1187 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
1188 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1189 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
1190 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1191 * linux-aarch64-low.c: Don't include break-common.h here.
1192 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1193 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
1194 (Z_packet_to_target_hw_bp_type): Delete function.
1195 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
1196 function.
1197 (mips_insert_point, mips_remove_point): Use
1198 Z_packet_to_target_hw_bp_type.
1199
4ff0d3d8
PA
12002014-05-20 Pedro Alves <palves@redhat.com>
1201
1202 * linux-aarch64-low.c: Include break-common.h.
1203 (enum target_point_type): Delete.
1204 (Z_packet_to_point_type): Rename to ...
1205 (Z_packet_to_target_hw_bp_type): ... this, and return a
1206 target_hw_bp_type instead.
1207 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
1208 instead of an enum target_point_type.
1209 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
1210 breakpoint type.
1211 (aarch64_dr_state_insert_one_point)
1212 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
1213 (aarch64_handle_aligned_watchpoint)
1214 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
1215 Take an enum target_hw_bp_type instead of an enum
1216 target_point_type.
1217 (aarch64_supports_z_point_type): New function.
1218 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
1219 use Z_packet_to_target_hw_bp_type.
1220
786dc519
JB
12212014-05-20 Joel Brobecker <brobecker@adacore.com>
1222
1223 * configure.ac: Only use -Werror by default when DEVELOPMENT
1224 is true.
1225 * configure: Regenerate.
1226
9e0aa64f
JK
12272014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
1228
1229 Fix gdbserver qGetTLSAddr for x86_64 -m32.
1230 * linux-x86-low.c (X86_64_USER_REGS): New.
1231 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
1232
2b577b92
YQ
12332014-04-28 Yao Qi <yao@codesourcery.com>
1234
1235 * Makefile.in (i386-avx512.c): Fix the typo of generated file
1236 name.
1237
94611da2
PA
12382014-04-25 Pedro Alves <palves@redhat.com>
1239
1240 PR server/16255
1241 * linux-low.c (linux_attach_fail_reason_string): New function.
1242 (linux_attach_lwp): Delete.
1243 (linux_attach_lwp_1): Rename to ...
1244 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
1245 argument. Remove "initial" parameter. Return int instead of
1246 void. Don't error or warn here.
1247 (linux_attach): Adjust to call linux_attach_lwp. Call error on
1248 failure to attach to the tgid. Call warning when failing to
1249 attach to an lwp.
1250 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
1251 argument. Remove "initial" parameter. Return int instead of
1252 void. Don't error or warn here.
1253 (linux_attach_fail_reason_string): New declaration.
1254 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
1255 interface change. Use linux_attach_fail_reason_string.
1256
01f9f808
MS
12572014-04-24 Michael Sturm <michael.sturm@mintel.com>
1258 Walfred Tedeschi <walfred.tedeschi@intel.com>
1259
1260 * Makefile.in: Added rules to handle new files
1261 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
1262 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
1263 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
1264 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
1265 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
1266 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
1267 x32-avx512-linux.o.
1268 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
1269 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
1270 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
1271 i386/x32-avx512.xml.
1272 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
1273 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
1274 i386/x32-avx512-linux.xml.
1275 * i387-fp.c (num_avx512_k_registers): New constant for number
1276 of K registers.
1277 (num_avx512_zmmh_low_registers): New constant for number of
1278 lower ZMM registers (0-15).
1279 (num_avx512_zmmh_high_registers): New constant for number of
1280 higher ZMM registers (16-31).
1281 (num_avx512_ymmh_registers): New contant for number of higher
1282 YMM registers (ymm16-31 added by avx521 on x86_64).
1283 (num_avx512_xmm_registers): New constant for number of higher
1284 XMM registers (xmm16-31 added by AVX512 on x86_64).
1285 (struct i387_xsave): Add space for AVX512 registers.
1286 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
1287 Add code to handle AVX512 registers.
1288 (i387_xsave_to_cache): Add code to handle AVX512 registers.
1289 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
1290 prototypei from generated file.
1291 (tdesc_amd64_avx512_linux): Likewise.
1292 (init_registers_x32_avx512_linux): Likewise.
1293 (tdesc_x32_avx512_linux): Likewise.
1294 (init_registers_i386_avx512_linux): Likewise.
1295 (tdesc_i386_avx512_linux): Likewise.
1296 (x86_64_regmap): Add AVX512 registers.
1297 (x86_linux_read_description): Add code to handle AVX512 XSTATE
1298 mask.
1299 (initialize_low_arch): Add code to initialize AVX512 registers.
1300
51aa91f9
PA
13012014-04-23 Pedro Alves <palves@redhat.com>
1302
1303 * mem-break.c (find_gdb_breakpoint_at): Make static.
1304 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
1305
a4165e94
PA
13062014-04-23 Pedro Alves <palves@redhat.com>
1307
1308 * i386-low.c: Don't include break-common.h here.
1309 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1310 prototype to take target_hw_bp_type as argument instead of a Z
1311 packet char.
1312 * i386-low.h: Include break-common.h here.
1313 (Z_packet_to_hw_type): Declare.
1314 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1315 prototypes.
1316 * linux-x86-low.c (x86_insert_point): Convert the packet number to
1317 a target_hw_bp_type before calling i386_low_insert_watchpoint.
1318 (x86_remove_point): Convert the packet number to a
1319 target_hw_bp_type before calling i386_low_remove_watchpoint.
1320 * win32-i386-low.c (i386_insert_point): Convert the packet number
1321 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
1322 (i386_remove_point): Convert the packet number to a
1323 target_hw_bp_type before calling i386_low_remove_watchpoint.
1324
b8acf843
PA
13252014-04-23 Pedro Alves <palves@redhat.com>
1326
1327 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
1328
d708bcd1
PA
13292014-04-10 Pedro Alves <palves@redhat.com>
1330
1331 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1332 Check if the condition or command is NULL before checking if the
1333 breakpoint is known. On success, return true.
1334 * mem-break.h (add_breakpoint_condition): Document return.
1335 (add_breakpoint_commands): Add describing comment.
1336 * server.c (skip_to_semicolon): New function.
1337 (process_point_options): Use it.
1338
2eec7d5b
PA
13392014-04-09 Pedro Alves <palves@redhat.com>
1340
1341 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
1342 to lwpid_of.
1343
fa96cb38
PA
13442014-02-27 Pedro Alves <palves@redhat.com>
1345
1346 PR 12702
1347 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
1348 macros.
1349 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
1350 output.
1351 (last_thread_of_process_p): Take a PID argument instead of a
1352 thread pointer.
1353 (linux_wait_for_lwp): Delete.
1354 (num_lwps, check_zombie_leaders, not_stopped_callback): New
1355 functions.
1356 (linux_low_filter_event): New function, party factored out from
1357 linux_wait_for_event.
1358 (linux_wait_for_event): Rename to ...
1359 (linux_wait_for_event_filtered): ... this. Add new filter ptid
1360 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
1361 sigsuspend. Check for zombie leaders.
1362 (linux_wait_for_event): Reimplement as wrapper around
1363 linux_wait_for_event_filtered.
1364 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
1365 a normal or signal exit is seen, it's the whole process exiting.
1366 (wait_for_sigstop): No longer a for_each_inferior callback.
1367 Rewrite on top of linux_wait_for_event_filtered.
1368 (stop_all_lwps): Call wait_for_sigstop directly.
1369 * server.c (resume, handle_target_event): Handle
1370 TARGET_WAITKIND_NO_RESUMED.
1371
d763de10
JB
13722014-02-26 Joel Brobecker <brobecker@adacore.com>
1373
1374 * win32-low.c (psapi_get_dll_name,
1375 * win32_CreateToolhelp32Snapshot): Delete.
1376 (win32_CreateToolhelp32Snapshot, win32_Module32First)
1377 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
1378 Delete.
1379 (handle_load_dll): Add function description.
1380 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
1381
850a0f76
JB
13822014-02-26 Joel Brobecker <brobecker@adacore.com>
1383
1384 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
1385 Add comment.
1386 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
1387 base address when calling win32_add_one_solib.
1388 (handle_load_dll): Delete local variable load_addr.
1389 Remove 0x1000 offset applied to DLL base address when calling
1390 win32_add_one_solib.
1391 (handle_unload_dll): Add comment.
1392
f25b3fc3
JB
13932014-02-26 Joel Brobecker <brobecker@adacore.com>
1394
1395 * win32-low.c (win32_add_all_dlls): Renames
1396 win32_ensure_ntdll_loaded. Rewrite function documentation.
1397 Adjust implementation to always load all DLLs.
1398 Add 0x1000 offset to DLL base address when calling
1399 win32_add_one_solib.
1400 (child_initialization_done): New static global.
1401 (do_initial_child_stuff): Set child_initialization_done to
1402 zero during child initialization, and 1 after. Replace call
1403 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
1404 Add comment.
1405 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
1406 (handle_unload_dll): Add function documentation.
1407 (get_child_debug_event): Ignore load and unload DLL events
1408 during child initialization.
1409
d86d4aaf
DE
14102014-02-20 Doug Evans <dje@google.com>
1411
3bc32da3 1412 Remove global all_lwps.
d86d4aaf
DE
1413 * inferiors.h (ptid_of): Move here from linux-low.h.
1414 (pid_of, lwpid_of): Ditto.
1415 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
1416 parameter is a struct thread_info * now.
1417 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
1418 directly. Pass &all_threads to find_inferior instead of &all_lwps.
1419 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
1420 directly.
1421 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
1422 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
1423 * linux-arm-low.c (update_registers_callback): Update, "entry"
1424 parameter is a struct thread_info * now.
1425 Fetch lwpid from current_inferior directly.
1426 (arm_insert_point): Pass &all_threads to find_inferior instead of
1427 &all_lwps.
1428 (arm_remove_point): Ditto.
1429 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
1430 (arm_prepare_to_resume): Fetch pid from thread.
1431 (arm_read_description): Fetch lwpid from current_inferior directly.
1432 * linux-low.c (all_lwps): Delete.
1433 (delete_lwp): Delete call to remove_inferior.
1434 (handle_extended_wait): Fetch lwpid from thread.
1435 (add_lwp): Don't set lwp->entry.id. Remove call to
1436 add_inferior_to_list.
1437 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
1438 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
1439 (kill_one_lwp_callback): Ditto.
1440 (linux_kill): Don't dereference NULL pointer.
1441 Fetch ptid,lwpid from thread.
1442 (get_detach_signal): Fetch ptid from thread.
1443 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
1444 Simplify call to regcache_invalidate_thread.
1445 (delete_lwp_callback): Update, "entry" parameter is a
1446 struct thread_info * now. Fetch pid from thread.
1447 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
1448 (status_pending_p_callback): Update, "entry" parameter is a
1449 struct thread_info * now. Fetch ptid from thread.
1450 (find_lwp_pid): Update, "entry" parameter is a
1451 struct thread_info * now.
1452 (linux_wait_for_lwp): Fetch pid from thread.
1453 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
1454 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
1455 (enqueue_one_deferred_signal): Fetch lwpid from thread.
1456 (dequeue_one_deferred_signal): Ditto.
1457 (cancel_breakpoint): Fetch ptid from current_inferior.
1458 (linux_wait_for_event): Pass &all_threads to find_inferior,
1459 not &all_lwps. Fetch ptid, lwpid from thread.
1460 (count_events_callback): Update, "entry" parameter is a
1461 struct thread_info * now.
1462 (select_singlestep_lwp_callback): Ditto.
1463 (select_event_lwp_callback): Ditto.
1464 (cancel_breakpoints_callback): Ditto.
1465 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
1466 not &all_lwps.
1467 (select_event_lwp): Ditto. Fetch ptid from event_thread.
1468 (unsuspend_one_lwp): Update, "entry" parameter is a
1469 struct thread_info * now.
1470 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
1471 not &all_lwps.
1472 (linux_stabilize_threads): Ditto. And for for_each_inferior.
1473 Fetch lwpid from thread, not lwp.
1474 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
1475 Pass &all_threads to find_inferior, not &all_lwps.
1476 (send_sigstop): Fetch lwpid from thread, not lwp.
1477 (send_sigstop_callback): Update, "entry" parameter is a
1478 struct thread_info * now.
1479 (suspend_and_send_sigstop_callback): Ditto.
1480 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
1481 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
1482 struct thread_info * now.
1483 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
1484 from thread, lwp.
1485 (lwp_running): Update, "entry" parameter is a
1486 struct thread_info * now.
1487 (stop_all_lwps): Fetch ptid from thread.
1488 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
1489 (linux_resume_one_lwp): Fetch lwpid from thread.
1490 (linux_set_resume_request): Update, "entry" parameter is a
1491 struct thread_info * now. Fetch pid, lwpid from thread.
1492 (resume_status_pending_p): Update, "entry" parameter is a
1493 struct thread_info * now.
1494 (need_step_over_p): Ditto. Fetch lwpid from thread.
1495 (start_step_over): Fetch lwpid from thread.
1496 (linux_resume_one_thread): Update, "entry" parameter is a
1497 struct thread_info * now. Fetch lwpid from thread.
1498 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
1499 (proceed_one_lwp): Update, "entry" parameter is a
1500 struct thread_info * now. Fetch lwpid from thread.
1501 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
1502 struct thread_info * now.
1503 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
1504 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
1505 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
1506 directly.
1507 (regsets_store_inferior_registers): Ditto.
1508 (fetch_register, store_register): Ditto.
1509 (linux_read_memory, linux_write_memory): Ditto.
1510 (linux_request_interrupt): Ditto.
1511 (linux_read_auxv): Ditto.
1512 (linux_xfer_siginfo): Ditto.
1513 (linux_qxfer_spu): Ditto.
1514 (linux_qxfer_libraries_svr4): Ditto.
1515 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
1516 moved to inferiors.h.
1517 (get_lwp): Delete.
1518 (get_thread_lwp): Update.
1519 (struct lwp_info): Delete member "entry". Simplify comment for
1520 member "thread".
1521 (all_lwps): Delete.
1522 * linux-mips-low.c (mips_read_description): Fetch lwpid from
1523 current_inferior directly.
1524 (update_watch_registers_callback): Update, "entry" parameter is a
1525 struct thread_info * now. Fetch pid from thread.
1526 (mips_linux_prepare_to_resume): Fetch ptid from thread.
1527 (mips_insert_point): Fetch lwpid from current_inferior.
1528 Pass &all_threads to find_inferior, not &all_lwps.
1529 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
1530 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
1531 directly.
1532 (mips_stopped_data_address): Ditto.
1533 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
1534 directly.
1535 * linux-tile-low.c (tile_arch_setup): Ditto.
1536 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
1537 (update_debug_registers_callback): Update, "entry" parameter is a
1538 struct thread_info * now. Fetch pid from thread.
1539 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
1540 Pass &all_threads to find_inferior, not &all_lwps.
1541 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
1542 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
1543 Pass &all_threads to find_inferior, not &all_lwps.
1544 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
1545 (i386_dr_low_get_status): Ditto.
1546 (x86_linux_prepare_to_resume): Fetch ptid from thread.
1547 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
1548 (x86_linux_read_description): Ditto.
1549 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
1550
3b8361aa
DE
15512014-02-20 Doug Evans <dje@google.com>
1552
1553 * inferiors.c (get_first_inferior): Fix buglet.
1554
f7667f0d
DE
15552014-02-19 Doug Evans <dje@google.com>
1556
1557 * gdbthread.h (add_thread): Change result type to struct thread_info *.
1558 * inferiors.c (add_thread): Change result type to struct thread_info *.
1559 All callers updated.
1560 (add_lwp): Call add_thread here instead of in callers.
1561 All callers updated.
1562 * linux-low.h (get_lwp_thread): Rewrite.
1563 (struct lwp_info): New member "thread".
1564
b3312d80
DE
15652014-02-19 Doug Evans <dje@google.com>
1566
1567 * linux-low.c (add_lwp): Change result to struct lwp_info *.
1568 All callers updated.
1569
ecc6f45c
DE
15702014-02-19 Doug Evans <dje@google.com>
1571
1572 * inferiors.c (add_thread): Fix whitespace.
1573
649ebbca
DE
15742014-02-19 Doug Evans <dje@google.com>
1575
1576 * dll.c (clear_dlls): Replace accessing list implemention details
1577 with API function.
1578 * gdbthread.h (get_first_thread): Declare.
1579 * inferiors.c (for_each_inferior_with_data): New function.
1580 (get_first_thread): New function.
1581 (find_thread_ptid): Simplify.
1582 (get_first_inferior): New function.
1583 (clear_list): Delete.
1584 (one_inferior_p): New function.
1585 (clear_inferior_list): New function.
1586 (clear_inferiors): Update.
1587 * inferiors.h (for_each_inferior_with_data): Declare.
1588 (clear_inferior_list): Declare.
1589 (one_inferior_p): Declare.
1590 (get_first_inferior): Declare.
1591 * linux-low.c (linux_wait_for_event): Replace accessing list
1592 implemention details with API function.
1593 * server.c (target_running): Ditto.
1594 (accumulate_file_name_length): New function.
1595 (emit_dll_description): New function.
1596 (handle_qxfer_libraries): Replace accessing list implemention
1597 details with API function.
1598 (handle_qxfer_threads_worker): New function.
1599 (handle_qxfer_threads_proper): Replace accessing list implemention
1600 details with API function.
1601 (handle_query): Ditto.
1602 (visit_actioned_threads_callback_ftype): New typedef.
1603 (visit_actioned_threads_data): New struct.
1604 (visit_actioned_threads): Rewrite to be find_inferior callback.
1605 (resume): Call find_inferior.
1606 (handle_status): Replace accessing list implemention
1607 details with API function.
1608 (process_serial_event): Replace accessing list implemention details
1609 with API function.
1610 * target.c (set_desired_inferior): Replace accessing list implemention
1611 details with API function.
1612 * tracepoint.c (same_process_p): New function.
1613 (gdb_agent_about_to_close): Replace accessing list implemention
1614 details with API function.
1615 * win32-low.c (child_delete_thread): Replace accessing list
1616 implemention details with API function.
1617 (match_dll_by_basename): New function.
1618 (dll_is_loaded_by_basename): New function.
1619 (win32_ensure_ntdll_loaded): Replace accessing list implemention
1620 details call to dll_is_loaded_by_basename.
1621
80894984
DE
16222014-02-19 Doug Evans <dje@google.com>
1623
1624 * dll.h (struct dll_info): Add comment.
1625 * gdbthread.h (struct thread_info): Add comment.
1626 (current_ptid): Simplify.
1627 * inferiors.c (add_process): Update.
1628 (remove_process): Update.
1629 * inferiors.h (struct process_info): Rename member "head" to "entry".
1630 * linux-low.c (delete_lwp): Update.
1631 (add_lwp): Update.
1632 (last_thread_of_process_p): Update.
1633 (kill_one_lwp_callback, linux_kill): Update.
1634 (status_pending_p_callback): Update.
1635 (wait_for_sigstop): Update. Simplify read of ptid.
1636 (start_step_over): Update.
1637 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
1638 (get_lwp_thread): Update.
1639 (struct lwp_info): Rename member "head" to "entry".
1640 * regcache.h (inferior_list_entry): Delete.
1641 * server.c (kill_inferior_callback): Update.
1642 (detach_or_kill_inferior_callback): Update.
1643 (print_started_pid): Update.
1644 (print_attached_pid): Update.
1645 (process_serial_event): Simplify read of ptid.
1646 * thread-db.c (thread_db_create_event): Update.
1647 (thread_db_get_tls_address): Update.
1648 * win32-low.c (current_inferior_ptid): Simplify.
1649
46917d26
TT
16502014-02-19 Tom Tromey <tromey@redhat.com>
1651
1652 * target.h (struct target_ops) <supports_btrace>: Add target_ops
1653 argument.
1654 (target_supports_btrace): Update.
1655
0759a81e
YQ
16562014-02-14 Yao Qi <yao@codesourcery.com>
1657
1658 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
1659 (rsp-low-ipa.o): New target.
1660
a7191e8b
TT
16612014-02-12 Tom Tromey <tromey@redhat.com>
1662
1663 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
1664 convert_ascii_to_int.
1665 * regcache.c (registers_to_string): Likewise.
1666 * remote-utils.c (decode_M_packet): Likewise.
1667 * server.c (process_serial_event): Likewise.
1668
ff0e980e
TT
16692014-02-12 Tom Tromey <tromey@redhat.com>
1670
1671 * server.c (handle_query, handle_v_run): Use hex2bin, not
1672 unhexify.
1673 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
1674
e9371aff
TT
16752014-02-12 Tom Tromey <tromey@redhat.com>
1676
1677 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
1678 convert_int_to_ascii.
1679 * regcache.c (registers_to_string, collect_register_as_string):
1680 Likewise.
1681 * remote-utils.c (look_up_one_symbol, relocate_instruction):
1682 Likewise.
1683 * server.c (process_serial_event): Likewise.
1684 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
1685 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
1686
971dc0b8
TT
16872014-02-12 Tom Tromey <tromey@redhat.com>
1688
1689 * remote-utils.c (look_up_one_symbol, monitor_output): Use
1690 bin2hex, not hexify.
1691 * tracepoint.c (cmd_qtstatus): Likewise.
1692
0a822afb
TT
16932014-02-12 Tom Tromey <tromey@redhat.com>
1694
1695 * remote-utils.c (monitor_output): Pass explicit length to
1696 hexify.
1697
9c3d6531
TT
16982014-02-12 Tom Tromey <tromey@redhat.com>
1699
1700 * tracepoint.c: Include rsp-low.h.
1701 * server.c: Include rsp-low.h.
1702 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
1703 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
1704 declare.
1705 * remote-utils.c: Include rsp-low.h.
1706 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
1707 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
1708 (convert_int_to_ascii, convert_ascii_to_int): Move to
1709 common/rsp-low.c.
1710 * regcache.c: Include rsp-low.h.
1711 * ax.c: Include rsp-low.h.
1712 * Makefile.in (SFILES): Add common/rsp-low.c.
1713 (OBS): Add rsp-low.o.
1714 (rsp-low.o): New target.
1715
01fd3ea5
TT
17162014-02-12 Tom Tromey <tromey@redhat.com>
1717
1718 * utils.h (pulongest, plongest, phex_nz): Don't declare.
1719 Include print-utils.h.
1720 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
1721 (plongest, thirty_two, phex_nz): Remove.
1722 * Makefile.in (SFILES): Add common/print-utils.c.
1723 (OBS): Add print-utils.o.
1724 (print-utils-ipa.o): New target.
1725 (print-utils.o): New target.
1726 (IPA_OBJS): Add print-utils-ipa.o.
1727
e99dc820
TT
17282014-02-06 Tom Tromey <tromey@redhat.com>
1729
1730 * Makefile.in (SFILES): Fix indentation.
1731
ee1e2d4f
DE
17322014-02-05 Doug Evans <dje@google.com>
1733
1734 * linux-low.c (linux_wait_for_event): Improve comment.
1735 (linux_wait_1): Keep current_inferior in sync with event_child.
1736
f5a02773
DE
17372014-01-22 Doug Evans <dje@google.com>
1738
1739 * gdbthread.h (gdb_id_to_thread): Delete, unused.
1740
87ce2a04
DE
17412014-01-22 Doug Evans <dje@google.com>
1742
1743 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
1744 * configure: Regenerate.
1745 * config.in: Regenerate.
1746 * Makefile.in (SFILES): Add debug.c.
1747 (OBS): Add debug.o.
1748 * debug.c: New file.
1749 * debug.h: New file.
1750 * linux-aarch64-low.c (*): Update all debugging printfs to use
1751 debug_printf instead of fprintf.
1752 * linux-arm-low.c (*): Ditto.
1753 * linux-cris-low.c (*): Ditto.
1754 * linux-crisv32-low.c (*): Ditto.
1755 * linux-m32r-low.c (*): Ditto.
1756 * linux-sparc-low.c (*): Ditto.
1757 * linux-x86.c (*): Ditto.
1758 * linux-low.c (*): Ditto.
1759 (linux_wait_1): Add calls to debug_enter, debug_exit.
1760 (linux_wait): Remove redundant debugging printf.
1761 (stop_all_lwps): Add calls to debug_enter, debug_exit.
1762 (linux_resume, unstop_all_lwps): Ditto.
1763 * mem-break.c (*): Update all debugging printfs to use
1764 debug_printf instead of fprintf.
1765 * remote-utils.c (*): Ditto.
1766 * thread-db.c (*): Ditto.
1767 * server.c #include <ctype.h>, "gdb_vecs.h".
1768 (debug_threads): Moved to debug.c.
1769 (*): Update all debugging printfs to use debug_printf instead of
1770 fprintf.
1771 (start_inferior): Replace call to fflush with call to debug_flush.
1772 (monitor_show_help): Mention set debug-format.
1773 (parse_debug_format_options): New function.
1774 (handle_monitor_command): Handle "monitor set debug-format".
1775 (gdbserver_usage): Mention --debug-format.
1776 (main): Parse --debug-format.
1777 * server.h (debug_threads): Declaration moved to debug.h.
1778 #include "debug.h".
1779 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
1780 trace_debug_1 that uses debug_printf.
1781 (tracepoint_look_up_symbols): Update all debugging printfs to use
1782 debug_printf instead of fprintf.
1783
e671835b
BS
17842014-01-20 Baruch Siach <baruch@tkos.co.il>
1785
1786 * linux-xtensa-low.c: Include asm/ptrace.h instead of
1787 sys/ptrace.h.
1788
b5737fa9
PA
17892014-01-17 Pedro Alves <palves@redhat.com>
1790
ea38d2a9 1791 PR build/16445
c7faa97a
PA
1792 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
1793 defined after including gdb_proc_service.h.
b5737fa9 1794
40ed484e
DE
17952014-01-16 Doug Evans <dje@google.com>
1796
1797 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
1798 (match_dll): Use it.
1799
969c39fb
MM
18002014-01-16 Markus Metzger <markus.t.metzger@intel.com>
1801
1802 * target.h (target_ops) <read_btrace>: Change parameters and
1803 return type to allow error reporting.
1804 * server.c (handle_qxfer_btrace): Support delta reads. Pass
1805 trace reading errors on.
1806 * linux-low.c (linux_low_read_btrace): Pass trace reading
1807 errors on.
1808 (linux_low_disable_btrace): New.
1809
ab7f45ba
DE
18102014-01-15 Doug Evans <dje@google.com>
1811
1812 * inferiors.c (thread_id_to_gdb_id): Delete.
1813 * inferiors.h (thread_id_to_gdb_id): Delete.
1814
66af0f44
EZ
18152014-01-13 Eli Zaretskii <eliz@gnu.org>
1816
1817 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
1818 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
1819 versions.
1820
9939e131
PA
18212014-01-08 Pedro Alves <palves@redhat.com>
1822
1823 * server.c (handle_status): Don't discard previous queued stop
1824 replies or thread's pending status here.
1825 (main) <disconnection>: Do it here instead.
1826
b7ea362b
PA
18272014-01-08 Pedro Alves <palves@redhat.com>
1828
1829 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
1830 * server.c (visit_actioned_threads, handle_pending_status): New
1831 function.
1832 (handle_v_cont): Factor out parts to ...
1833 (resume): ... this new function. If in all-stop, and a thread
1834 being resumed has a pending status, report it without actually
1835 resuming.
1836 (myresume): Adjust to use the new 'resume' function.
1837 (clear_pending_status_callback, set_pending_status_callback)
1838 (find_status_pending_thread_callback): New functions.
1839 (handle_status): Handle the case of multiple threads having
1840 interesting statuses to report. Report threads' real last signal
1841 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
1842 with an interesting thread to report the status for, instead of
1843 always reporting the status of the first thread.
1844
28498c42
JB
18452014-01-01 Joel Brobecker <brobecker@adacore.com>
1846
1847 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
1848 * gdbreplay.c (gdbreplay_version): Likewise.
1849
f45c82da
YZ
18502013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
1851
1852 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
1853 iov.iov_len with the real length in use.
1854
379a5e2d
JB
18552013-12-13 Joel Brobecker <brobecker@adacore.com>
1856
1857 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
1858 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
1859 for all targets that use win32-low.c.
1860 * win32-low.c (win32_ensure_ntdll_loaded): New function.
1861 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
1862
4210d83e
PA
18632013-12-13 Pedro Alves <palves@redhat.com>
1864
1865 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
1866 if equal to TARGET_WAITKIND_LOADED.
1867 * win32-low.c (cached_status): New static global.
1868 (win32_wait): Add declaration.
1869 (do_initial_child_stuff): Flush all initial pending debug events
1870 up to the initial breakpoint.
1871 (win32_wait): If CACHED_STATUS was set, return that instead
1872 of doing a real wait. Remove the code resuming the execution
1873 of the inferior after receiving a TARGET_WAITKIND_LOADED event
1874 during the initial phase. Also remove the code changing
1875 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
1876 TARGET_WAITKIND_STOPPED.
1877
e7f0d979
YQ
18782013-12-11 Yao Qi <yao@codesourcery.com>
1879
1880 * notif.c (handle_notif_ack): Return 0 if no notification
1881 matches.
1882
ebcf782c
DE
18832013-11-20 Doug Evans <dje@google.com>
1884
1885 * linux-low.c (linux_set_resume_request): Fix comment.
1886
20ad9378
DE
18872013-11-20 Doug Evans <dje@google.com>
1888
1889 * linux-low.c (resume_status_pending_p): Tweak comment.
1890
a196ebeb
WT
18912013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
1892
1893 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
1894 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
1895 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
1896 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
1897 (srv_amd64_regobj): Add amd64-mpx.o.
1898 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
1899 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
1900 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
1901 * i387-fp.c (num_pl_bnd_register) Added constant.
1902 (num_pl_bnd_cfg_registers) Added constant.
1903 (struct i387_xsave) Added reserved area and MPX fields.
1904 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
1905 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
1906 function.
1907 (tdesc_i386_mpx_linux): Add MPX amd64 target.
1908 (init_registers_amd64_mpx_linux): Declare new function.
1909 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
1910 (x86_64_regmap): Add MPX registers.
1911 (x86_linux_read_description): Add MPX case.
1912 (initialize_low_arch): Initialize MPX targets.
1913
0080a2f6
TT
19142013-11-18 Tom Tromey <tromey@redhat.com>
1915
1916 * configure: Rebuild.
1917 * configure.ac: Don't check for stdlib.h.
1918 * gdbreplay.c: Unconditionally include stdlib.h.
1919
2978b111
TT
19202013-11-18 Tom Tromey <tromey@redhat.com>
1921
1922 * config.in: Rebuild.
1923 * configure: Rebuild.
1924 * configure.ac: Don't use AC_HEADER_DIRENT.
1925
a3d08894
TT
19262013-11-18 Tom Tromey <tromey@redhat.com>
1927
1928 * server.h: Don't check HAVE_STRING_H.
1929 * gdbreplay.c: Don't check HAVE_STRING_H.
1930 * configure: Rebuild.
1931
0a5dd17d
TT
19322013-11-18 Tom Tromey <tromey@redhat.com>
1933
1934 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
1935 LIBGNU.
1936
1bd2f0ba
TT
19372013-11-08 Tom Tromey <tromey@redhat.com>
1938
1939 * configure, config.in: Rebuild.
1940 * configure.ac: Remove unused configury.
1941
3266f10b
TT
19422013-11-08 Tom Tromey <tromey@redhat.com>
1943
1944 * acinclude.m4: Include common.m4, codeset.m4.
1945 * configure, config.in: Rebuild.
1946 * configure.ac: Use GDB_AC_COMMON.
1947
6682d959
AA
19482013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
1949
1950 * linux-s390-low.c (HWCAP_S390_TE): New define.
1951 (s390_arch_setup): Consider the TE field in the HWCAP for
1952 determining 'have_regset_tdb'.
1953
fd0a4d76
SDJ
19542013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
1955
1956 PR gdb/16014
1957 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
1958 call to sizeof.
1959
1a3d890b
PA
19602013-10-02 Pedro Alves <palves@redhat.com>
1961
1962 * server.c (process_serial_event): Don't output "GDBserver
1963 exiting" if GDB is connected through stdio.
1964 * target.c (mywait): Likewise, be silent if GDB is connected
1965 through stdio.
1966
97ad4581
JB
19672013-10-01 Joel Brobecker <brobecker@adacore.com>
1968
1969 * lynx-low.c (lynx_add_threads_after_attach): New function.
1970 (lynx_attach): Remove call to add_thread. Add call to
1971 lynx_add_threads_after_attach instead.
1972
5b4e221c
MF
19732013-09-28 Mike Frysinger <vapier@gentoo.org>
1974
1975 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
1976 * config.in, configure: Regenerated.
1977
ee47b2f8
YQ
19782013-09-18 Yao Qi <yao@codesourcery.com>
1979
1980 PR server/15959
1981 * server.c (start_inferior): Clear 'resume_info'.
1982
d6707650 19832013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 1984
d6707650
JW
1985 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
1986 for each register.
1987
9243dd0e 19882013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 1989
9243dd0e
JW
1990 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
1991 linux-tile-low.o to srv_tgtobj.
1992
c623a6ef
WN
19932013-09-16 Will Newton <will.newton@linaro.org>
1994
1995 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
1996 out regs.
1997
fb71d39e
PA
19982013-09-06 Pedro Alves <palves@redhat.com>
1999
2000 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2001 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2002 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2003 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2004 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2005 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2006
8e7e9910
PA
20072013-09-06 Pedro Alves <palves@redhat.com>
2008
2009 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2010 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2011
7c3a12ca
PA
20122013-09-06 Pedro Alves <palves@redhat.com>
2013
2014 * linux-amd64-ipa.c: Include tracepoint.h.
2015 * linux-i386-ipa.c: Include tracepoint.h.
2016
8eb3d7b6
RW
20172013-09-06 Ricard Wanderlof <ricardw@axis.com>
2018
2019 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2020 (ps_get_thread_area): New function.
2021
eddddb9d
RW
20222013-09-06 Ricard Wanderlof <ricardw@axis.com>
2023
2024 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
2025 (initialize_low_arch): Call init_registers_crisv32 rather than
2026 init_register_crisv32.
2027
533b0600
PA
20282013-09-05 Pedro Alves <palves@redhat.com>
2029
2030 * server.h (handle_vFile, hostio_last_error_from_errno): Move
2031 to ...
2032 * hostio.h: ... this new file.
2033 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2034 win32-low.c: Include hostio.h.
2035
0ce3d3b5
PA
20362013-09-05 Pedro Alves <palves@redhat.com>
2037
2038 * server.h (gdb_client_data, handler_func, callback_handler_func)
2039 (delete_file_handler, add_file_handler, append_callback_event)
2040 (delete_callback_event, start_event_loop, initialize_event_loop):
2041 Move to event-loop.h and include it.
2042 * event-loop.h: New file.
2043
799cdc37
PA
20442013-09-05 Pedro Alves <palves@redhat.com>
2045
2046 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2047 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2048 (loaded_dll, unloaded_dll): Move to ...
2049 * dll.h: ... this new file.
2050 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2051
6a6bbd9d
PA
20522013-09-05 Pedro Alves <palves@redhat.com>
2053
2054 * server.h (current_process, get_thread_process, all_processes)
2055 (add_inferior_to_list, for_each_inferior, current_inferior)
2056 (remove_inferior, add_process, remove_process, find_process_pid)
2057 (have_started_inferiors_p, have_attached_inferiors_p)
2058 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2059 (clear_inferiors, find_inferior, find_inferior_id)
2060 (inferior_target_data, set_inferior_target_data)
2061 (inferior_regcache_data, set_inferior_regcache_data): Move to
2062 inferiors.h, and include it.
2063 * inferiors.h: New file.
2064
f699aaba
PA
20652013-09-05 Pedro Alves <palves@redhat.com>
2066
2067 * server.h (struct emit_ops, current_insn_ptr, emit_error):
2068 Move ...
2069 * ax.h: ... here.
2070
c144c7a0
PA
20712013-09-05 Pedro Alves <palves@redhat.com>
2072
2073 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2074 tracepoint.h.
2075 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2076 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2077 (handle_tracepoint_general_set, handle_tracepoint_query)
2078 (tracepoint_finished_step, tracepoint_was_hit)
2079 (release_while_stepping_state_list, current_traceframe)
2080 (in_readonly_region, traceframe_read_mem)
2081 (fetch_traceframe_registers, traceframe_read_sdata)
2082 (traceframe_read_info, struct fast_tpoint_collect_status)
2083 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2084 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2085 (supply_fast_tracepoint_registers)
2086 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2087 (ipa_tdesc, claim_trampoline_space)
2088 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2089 (agent_mem_read, agent_get_trace_state_variable_value)
2090 (agent_set_trace_state_variable_value, agent_tsv_read)
2091 (agent_mem_read_string, get_raw_reg_func_addr)
2092 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2093 * tracepoint.h: ... this new file.
2094
ff42e6ab
PA
20952013-09-05 Pedro Alves <palves@redhat.com>
2096
2097 * server.h (perror_with_name, error, fatal, warning, paddress)
2098 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2099 include it.
2100 * utils.h: New file.
2101
541af0f4
PA
21022013-09-05 Pedro Alves <palves@redhat.com>
2103
2104 * server.h (remote_debug, noack_mode, transport_is_reliable)
2105 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
2106 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
2107 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
2108 (write_enn, initialize_async_io, enable_async_io)
2109 (disable_async_io, check_remote_input_interrupt_request)
2110 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
2111 (dead_thread_notify, prepare_resume_reply)
2112 (decode_address_to_semicolon, decode_address, decode_m_packet)
2113 (decode_M_packet, decode_X_packet, decode_xfer_write)
2114 (decode_search_memory_packet, unhexify, hexify)
2115 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
2116 (look_up_one_symbol, relocate_instruction)
2117 (monitor_output): Move to remote-utils.h, and include it.
2118 * remote-utils.h: New file.
2119
eebdf26b
PA
21202013-09-05 Pedro Alves <palves@redhat.com>
2121
2122 * server.h (_): Delete.
2123
3aafd2ff
PA
21242013-09-02 Pedro Alves <palves@redhat.com>
2125
2126 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
2127 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
2128 allocated.
2129 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
2130
cee83bcb
PM
21312013-09-02 Pierre Muller <muller@sourceware.org>
2132
2133 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
2134 or WriteProcessMemory complete successfully and handle
2135 ERROR_PARTIAL_COPY error.
2136
9a13b2fa
PA
21372013-09-02 Pedro Alves <palves@redhat.com>
2138
2139 * server.c (gdb_read_memory): Return -1 on traceframe memory read
2140 error instead of EIO.
2141
602e3198
JK
21422013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2143
2144 PR server/15604
2145 * linux-low.c: Include filestuff.h.
2146 (linux_create_inferior) <pid == 0>: Call close_most_fds.
2147 * lynx-low.c: Include filestuff.h.
2148 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
2149 * server.c: Include filestuff.h.
2150 (main): Call notice_open_fds.
2151 * spu-low.c: Include filestuff.h.
2152 (spu_create_inferior) <pid == 0>: Call close_most_fds.
2153
96d7229d
LM
21542013-08-22 Luis Machado <lgustavo@codesourcery.com>
2155
2156 * Makefile.in: Explain why ../target and ../nat are not
2157 listed as include file search paths.
2158 (linux-waitpid.o): New object file rule.
2159 * configure.srv (srv_native_linux_obj): New variable.
2160 Replace all occurrences of linux native object files with
2161 $srv_native_linux_obj.
2162 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
2163 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
2164 (linux_enable_event_reporting): Remove declaration.
2165 (my_waitpid): Moved to common/linux-waitpid.c.
2166 (linux_wait_for_event): Pass ptid when calling
2167 linux_enable_event_reporting.
2168 (linux_supports_tracefork_flag): Remove.
2169 (linux_enable_event_reporting): Likewise.
2170 (linux_tracefork_grandchild): Remove.
2171 (STACK_SIZE): Moved to common/linux-ptrace.c.
2172 (linux_tracefork_child): Remove.
2173 (linux_test_for_tracefork): Remove.
2174 (linux_look_up_symbols): Call linux_supports_traceclone.
2175 (initialize_low): Remove call to linux_test_for_tracefork.
2176 * linux-low.h (PTRACE_TYPE_ARG3): Move to
2177 common/linux-ptrace.h.
2178 (PTRACE_TYPE_ARG4): Likewise.
2179 Include linux-ptrace.h.
2180
32940073
PA
21812013-08-21 Pedro Alves <palves@redhat.com>
2182
2183 * config.in: Renegerate.
2184
33b60d58 21852013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 2186
33b60d58
LM
2187 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
2188 (SFILES): Remove $(srcdir)/common/target-common.c and
2189 add $(srcdir)/target/waitstatus.c.
2190 (OBS): Remove target-common.o and add waitstatus.o.
2191 (server_h): Remove $(srcdir)/../common/target-common.h and
2192 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
2193 and $(srcdir)/../target/waitstatus.h.
2194 (target-common.o): Remove.
2195 (waitstatus.o): New target object file.
2196 * target.h: Do not include target-common.h and
2197 include target/resume.h, target/wait.h and
2198 target/waitstatus.h.
2199
b8e1b30e
LM
22002013-08-13 Luis Machado <lgustavo@codesourcery.com>
2201
2202 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2203 to PTRACE_TYPE_ARG3.
2204 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2205 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
2206 PTRACE_TYPE_ARG4.
2207 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
2208 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
2209
7a60ad40
YQ
22102013-07-27 Jie Zhang <jie@codesourcery.com>
2211 Daniel Jacobowitz <dan@codesourcery.com>
2212 Yao Qi <yao@codesourcery.com>
2213
2214 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
2215 (mips-linux-watch.o): New rule.
2216 (mips_linux_watch_h): New variable.
2217 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
2218 srv_tgtobj.
2219 * linux-mips-low.c: Include mips-linux-watch.h.
2220 (struct arch_process_info, struct arch_lwp_info): New.
2221 (update_watch_registers_callback): New function.
2222 (mips_linux_new_process, mips_linux_new_thread) New functions.
2223 (mips_linux_prepare_to_resume, mips_insert_point): New
2224 functions.
2225 (mips_remove_point, mips_stopped_by_watchpoint): New
2226 functions.
2227 (rsp_bp_type_to_target_hw_bp_type): New function.
2228 (mips_stopped_data_address): New function.
2229 (the_low_target): Add watchpoint support functions.
2230
de6f69ad
YQ
22312013-07-27 Yao Qi <yao@codesourcery.com>
2232
2233 * i386-low.c: Include break-common.h.
2234 (enum target_hw_bp_type): Remove.
2235
3360c0bf
LM
22362013-07-24 Luis Machado <lgustavo@codesourcery.com>
2237
2238 * Makefile.in (SFILES): /common/target-common.c.
2239 (OBS): Add target-common.o.
2240 (server_h): Add $(srcdir)/../common/target-common.h.
2241 (target-common.o): New target.
2242 * server.c (queue_stop_reply_callback): Free
2243 status string after use.
2244 * target.c (target_waitstatus_to_string): Remove.
2245 * target.h: Include target-common.h.
2246 (resume_kind): Likewise.
2247 (target_waitkind): Likewise.
2248 (target_waitstatus): Likewise.
2249 (TARGET_WNOHANG): Likewise.
2250
bd885420
YQ
22512013-07-04 Yao Qi <yao@codesourcery.com>
2252
2253 * Makefile.in (host_alias): Use @host_noncanonical@.
2254 (target_alias): Use @target_noncanonical@.
2255 * configure.ac: Use ACX_NONCANONICAL_TARGET and
2256 ACX_NONCANONICAL_HOST.
2257 * configure: Regenerated.
2258
2259 Revert:
2260 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2261
2262 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2263 * configure: Rebuild.
2264 * Makefile.in (version_host, version_target): Get from configure.
2265 (version.c): Use $(version_host) and $(version_target).
2266
17ef446e
PA
22672013-07-03 Pedro Alves <palves@redhat.com>
2268
2269 * Makefile.in (config.status): Depend on development.sh.
2270 * acinclude.m4: Include libmcheck.m4.
2271 * configure: Regenerate.
2272
7a9a7487
MG
22732013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2274
2275 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
2276 attribute inside the parentheses.
2277 (winapi_DebugSetProcessKillOnExit): Ditto.
2278 (winapi_DebugBreakProcess): Ditto.
2279 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 2280
49b64de6
MG
22812013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2282
2283 * notif.h (notif_event): Add a dummy member to avoid compiler
2284 errors.
2285
d5749ee7
PA
22862013-07-01 Pedro Alves <palves@redhat.com>
2287
2288 * hostio.c (HOSTIO_PATH_MAX): Define.
2289 (require_filename, handle_open, handle_unlink, handle_readlink):
2290 Use it.
2291
d8d2a3ee
PA
22922013-07-01 Pedro Alves <palves@redhat.com>
2293
2294 * server.h: Include "pathmax.h".
2295 * linux-low.c: Don't include sys/param.h.
2296 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
2297 MAXPATHLEN.
2298 * win32-low.c: Don't include sys/param.h.
2299 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
2300
bc7dea8d
PA
23012013-07-01 Pedro Alves <palves@redhat.com>
2302
2303 * event-loop.c: Don't check HAVE_UNISTD_H before including
2304 <unistd.h>.
2305 * gdbreplay.c: Likewise.
2306 * remote-utils.c: Likewise.
2307 * server.c: Likewise.
2308 * configure.ac: Don't check for unistd.h.
2309 * configure: Regenerate.
2310
d6c2da54
TT
23112013-06-28 Tom Tromey <tromey@redhat.com>
2312
2313 * Makefile.in (version.c): Use version.in, not
2314 common/version.in.
2315
257b6bec
MG
23162013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2317
2318 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2319 * configure: Rebuild.
2320 * Makefile.in (version_host, version_target): Get from configure.
2321 (version.c): Use $(version_host) and $(version_target).
2322
86ebe149
DK
23232013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2324
2325 Fix trace-status to output user name without trailing colon.
2326 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
2327
f30aa5af
DK
23282013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2329
2330 Fix trace-status to output proper start-time and stop-time.
2331 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
2332 output start time and stop time in hex as gdb expects.
2333
28a93511
YQ
23342013-06-26 Pedro Alves <pedro@codesourcery.com>
2335
2336 * tracepoint.c (build_traceframe_info_xml): Output trace state
2337 variables present in the trace buffer.
2338
01208463
TT
23392013-06-24 Tom Tromey <tromey@redhat.com>
2340
2341 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
2342 create-version.sh.
2343 (version.o): Remove.
2344 * gdbreplay.c: Include version.h.
2345 (version, host_name): Don't declare.
2346 * server.h: Include version.h.
2347 (version, host_name): Don't declare.
2348
760256f9
PA
23492013-06-12 Pedro Alves <palves@redhat.com>
2350
2351 * linux-x86-low.c (linux_is_elf64): Delete global.
2352 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
2353 with local linux_pid_exe_is_elf_64_file use.
2354
030031ee
PA
23552013-06-11 Pedro Alves <palves@redhat.com>
2356
2357 * linux-low.c (regset_disabled, disable_regset): New functions.
2358 (regsets_fetch_inferior_registers)
2359 (regsets_store_inferior_registers): Use them.
2360 (initialize_regsets_info); Don't allocate the disabled_regsets
2361 array here.
2362 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
2363 comment.
2364
5da6eb0a
PA
23652013-06-11 Pedro Alves <palves@redhat.com>
2366
2367 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
2368 xmalloc.
2369
7e5aaa09
PA
23702013-06-11 Pedro Alves <palves@redhat.com>
2371
2372 * linux-x86-low.c (initialize_low_arch): Call
2373 init_registers_x32_avx_linux.
2374
d878444c
JK
23752013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
2376
2377 Fix compatibility with Android Bionic.
2378 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
2379 it is not empty.
2380
3aee8918
PA
23812013-06-07 Pedro Alves <palves@redhat.com>
2382
5f2b57b5 2383 PR server/14823
3aee8918
PA
2384 * Makefile.in (OBS): Add tdesc.o.
2385 (IPA_OBJS): Add tdesc-ipa.o.
2386 (tdesc-ipa.o): New rule.
2387 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
2388 interface.
2389 * linux-low.c (new_inferior): Delete.
2390 (disabled_regsets, num_regsets): Delete.
2391 (linux_add_process): Adjust to set the new per-process
2392 new_inferior flag.
2393 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
2394 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
2395 was a stop. When calling arch_setup, switch the current inferior
2396 to the thread that got an event.
2397 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
2398 (regsets_fetch_inferior_registers)
2399 (regsets_store_inferior_registers): New regsets_info parameter.
2400 Adjust to use it.
2401 (linux_register_in_regsets): New regs_info parameter. Adjust to
2402 use it.
2403 (register_addr, fetch_register, store_register): New usrregs_info
2404 parameter. Adjust to use it.
2405 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
2406 parameter regs_info. Adjust to use it.
2407 (linux_fetch_registers): Get the current inferior's regs_info, and
2408 adjust to use it.
2409 (linux_store_registers): Ditto.
2410 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
2411 (initialize_low): Don't initialize the target_regsets here. Call
2412 initialize_low_arch.
2413 * linux-low.h (target_regsets): Delete declaration.
2414 (struct regsets_info): New.
2415 (struct usrregs_info): New.
2416 (struct regs_info): New.
2417 (struct process_info_private) <new_inferior>: New field.
2418 (struct linux_target_ops): Delete the num_regs, regmap, and
2419 regset_bitmap fields. New field regs_info.
2420 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
2421 * i387-fp.c (num_xmm_registers): Delete.
2422 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
2423 calls to new interface.
2424 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
2425 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
2426 Infer the number of xmm registers from the regcache's target
2427 description.
2428 * i387-fp.h (num_xmm_registers): Delete.
2429 * inferiors.c (add_thread): Don't install the thread's regcache
2430 here.
2431 * proc-service.c (gregset_info): Fetch the current inferior's
2432 regs_info. Adjust to use it.
2433 * regcache.c: Include tdesc.h.
2434 (register_bytes, reg_defs, num_registers)
2435 (gdbserver_expedite_regs): Delete.
2436 (get_thread_regcache): If the thread doesn't have a regcache yet,
2437 create one, instead of aborting gdbserver.
2438 (regcache_invalidate_one): Rename to ...
2439 (regcache_invalidate_thread): ... this.
2440 (regcache_invalidate_one): New.
2441 (regcache_invalidate): Only invalidate registers of the current
2442 process.
2443 (init_register_cache): Add target_desc parameter, and use it.
2444 (new_register_cache): Ditto. Assert the target description has a
2445 non zero registers_size.
2446 (regcache_cpy): Add assertions. Adjust.
2447 (realloc_register_cache, set_register_cache): Delete.
2448 (registers_to_string, registers_from_string): Adjust.
2449 (find_register_by_name, find_regno, find_register_by_number)
2450 (register_cache_size): Add target_desc parameter, and use it.
2451 (free_register_cache_thread, free_register_cache_thread_one)
2452 (regcache_release, register_cache_size): New.
2453 (register_size): Add target_desc parameter, and use it.
2454 (register_data, supply_register, supply_register_zeroed)
2455 (supply_regblock, supply_register_by_name, collect_register)
2456 (collect_register_as_string, collect_register_by_name): Adjust.
2457 * regcache.h (struct target_desc): Forward declare.
2458 (struct regcache) <tdesc>: New field.
2459 (init_register_cache, new_register_cache): Add target_desc
2460 parameter.
2461 (regcache_invalidate_thread): Declare.
2462 (regcache_invalidate_one): Delete declaration.
2463 (regcache_release): Declare.
2464 (find_register_by_number, register_cache_size, register_size)
2465 (find_regno): Add target_desc parameter.
2466 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
2467 declarations.
2468 * remote-utils.c: Include tdesc.h.
2469 (outreg, prepare_resume_reply): Adjust.
2470 * server.c: Include tdesc.h.
2471 (gdbserver_xmltarget): Delete declaration.
2472 (get_features_xml, process_serial_event): Adjust.
2473 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
2474 declare.
2475 (struct process_info) <tdesc>: New field.
2476 (ipa_tdesc): Declare.
2477 * tdesc.c: New file.
2478 * tdesc.h: New file.
2479 * tracepoint.c: Include tdesc.h.
2480 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
2481 (get_context_regcache): Adjust to pass ipa_tdesc down.
2482 (do_action_at_tracepoint): Adjust to get the register cache size
2483 from the context regcache's description.
2484 (traceframe_walk_blocks): Adjust to get the register cache size
2485 from the current trace frame's description.
2486 (traceframe_get_pc): Adjust to get current trace frame's
2487 description and pass it down.
2488 (gdb_collect): Adjust to get the register cache size from the
2489 IPA's description.
2490 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
2491 (gdbserver_xmltarget): Delete.
2492 (initialize_low_tracepoint): Set the ipa's target description.
2493 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
2494 (initialize_low_tracepoint): Set the ipa's target description.
2495 * linux-x86-low.c: Include tdesc.h.
2496 [__x86_64__] (is_64bit_tdesc): New.
2497 (ps_get_thread_area, x86_get_thread_area): Use it.
2498 (i386_cannot_store_register): Rename to ...
2499 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
2500 (i386_cannot_fetch_register): Rename to ...
2501 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
2502 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
2503 to new interface.
2504 (target_regsets): Rename to ...
2505 (x86_regsets): ... this.
2506 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
2507 interface.
2508 (x86_siginfo_fixup): Use is_64bit_tdesc.
2509 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
2510 (tdesc_x32_avx_linux, tdesc_x32_linux)
2511 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
2512 Declare.
2513 (x86_linux_update_xmltarget): Delete.
2514 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
2515 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
2516 (AMD64_LINUX_USER64_CS): New.
2517 (x86_linux_read_description): New, based on
2518 x86_linux_update_xmltarget.
2519 (same_process_callback): New.
2520 (x86_arch_setup_process_callback): New.
2521 (x86_linux_update_xmltarget): New.
2522 (x86_regsets_info): New.
2523 (amd64_linux_regs_info): New.
2524 (i386_linux_usrregs_info): New.
2525 (i386_linux_regs_info): New.
2526 (x86_linux_regs_info): New.
2527 (x86_arch_setup): Reimplement.
2528 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
2529 (x86_emit_ops): Ditto.
2530 (the_low_target): Adjust. Install x86_linux_regs_info,
2531 x86_cannot_fetch_register, and x86_cannot_store_register.
2532 (initialize_low_arch): New.
2533 * linux-ia64-low.c (tdesc_ia64): Declare.
2534 (ia64_fetch_register): Adjust.
2535 (ia64_usrregs_info, regs_info): New globals.
2536 (ia64_regs_info): New function.
2537 (the_low_target): Adjust.
2538 (initialize_low_arch): New function.
2539 * linux-sparc-low.c (tdesc_sparc64): Declare.
2540 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
2541 Adjust.
2542 (sparc_arch_setup): New function.
2543 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
2544 (the_low_target): Adjust.
2545 (initialize_low_arch): New function.
2546 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
2547 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
2548 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
2549 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
2550 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
2551 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
2552 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
2553 (tdesc_powerpc_isa205_vsx64l): Declare.
2554 (ppc_cannot_store_register, ppc_collect_ptrace_register)
2555 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
2556 (ppc_set_pc, ppc_get_hwcap): Adjust.
2557 (ppc_usrregs_info): Forward declare.
2558 (!__powerpc64__) ppc_regmap_adjusted: New global.
2559 (ppc_arch_setup): Adjust to the current process'es target
2560 description.
2561 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
2562 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
2563 (ppc_store_evrregset): Adjust.
2564 (target_regsets): Rename to ...
2565 (ppc_regsets): ... this, and make static.
2566 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
2567 (ppc_regs_info): New function.
2568 (the_low_target): Adjust.
2569 (initialize_low_arch): New function.
2570 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
2571 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
2572 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
2573 (tdesc_s390x_linux64v2): Declare.
2574 (s390_collect_ptrace_register, s390_supply_ptrace_register)
2575 (s390_fill_gregset, s390_store_last_break): Adjust.
2576 (target_regsets): Rename to ...
2577 (s390_regsets): ... this, and make static.
2578 (s390_get_pc, s390_set_pc): Adjust.
2579 (s390_get_hwcap): New target_desc parameter, and use it.
2580 [__s390x__] (have_hwcap_s390_high_gprs): New global.
2581 (s390_arch_setup): Adjust to set the current process'es target
2582 description. Don't adjust the regmap.
2583 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
2584 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
2585 (regs_info_3264): New globals.
2586 (s390_regs_info): New function.
2587 (the_low_target): Adjust.
2588 (initialize_low_arch): New function.
2589 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
2590 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
2591 [__mips64] (init_registers_mips_linux)
2592 (init_registers_mips_dsp_linux): Delete defines.
2593 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
2594 (have_dsp): New global.
2595 (mips_read_description): New, based on mips_arch_setup.
2596 (mips_arch_setup): Reimplement.
2597 (get_usrregs_info): New function.
2598 (mips_cannot_fetch_register, mips_cannot_store_register)
2599 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
2600 (mips_fill_fpregset, mips_store_fpregset): Adjust.
2601 (target_regsets): Rename to ...
2602 (mips_regsets): ... this, and make static.
2603 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
2604 (dsp_regs_info, regs_info): New globals.
2605 (mips_regs_info): New function.
2606 (the_low_target): Adjust.
2607 (initialize_low_arch): New function.
2608 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
2609 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
2610 Declare.
2611 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
2612 (arm_read_description): New, with bits factored from
2613 arm_arch_setup.
2614 (arm_arch_setup): Reimplement.
2615 (target_regsets): Rename to ...
2616 (arm_regsets): ... this, and make static.
2617 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
2618 (arm_regs_info): New function.
2619 (the_low_target): Adjust.
2620 (initialize_low_arch): New function.
2621 * linux-m68k-low.c (tdesc_m68k): Declare.
2622 (target_regsets): Rename to ...
2623 (m68k_regsets): ... this, and make static.
2624 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
2625 (m68k_regs_info): New function.
2626 (m68k_arch_setup): New function.
2627 (the_low_target): Adjust.
2628 (initialize_low_arch): New function.
2629 * linux-sh-low.c (tdesc_sharch): Declare.
2630 (target_regsets): Rename to ...
2631 (sh_regsets): ... this, and make static.
2632 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
2633 (sh_regs_info, sh_arch_setup): New functions.
2634 (the_low_target): Adjust.
2635 (initialize_low_arch): New function.
2636 * linux-bfin-low.c (tdesc_bfin): Declare.
2637 (bfin_arch_setup): New function.
2638 (bfin_usrregs_info, regs_info): New globals.
2639 (bfin_regs_info): New function.
2640 (the_low_target): Adjust.
2641 (initialize_low_arch): New function.
2642 * linux-cris-low.c (tdesc_cris): Declare.
2643 (cris_arch_setup): New function.
2644 (cris_usrregs_info, regs_info): New globals.
2645 (cris_regs_info): New function.
2646 (the_low_target): Adjust.
2647 (initialize_low_arch): New function.
2648 * linux-cris-low.c (tdesc_crisv32): Declare.
2649 (cris_arch_setup): New function.
2650 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
2651 (cris_regs_info): New function.
2652 (the_low_target): Adjust.
2653 (initialize_low_arch): New function.
2654 * linux-m32r-low.c (tdesc_m32r): Declare.
2655 (m32r_arch_setup): New function.
2656 (m32r_usrregs_info, regs_info): New globals.
2657 (m32r_regs_info): Adjust.
2658 (initialize_low_arch): New function.
2659 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
2660 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
2661 (tic6x_usrregs_info): Forward declare.
2662 (tic6x_read_description): New function, based on ...
2663 (tic6x_arch_setup): ... this. Reimplement.
2664 (target_regsets): Rename to ...
2665 (tic6x_regsets): ... this, and make static.
2666 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
2667 (tic6x_regs_info): New function.
2668 (the_low_target): Adjust.
2669 (initialize_low_arch): New function.
2670 * linux-xtensa-low.c (tdesc_xtensa): Declare.
2671 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
2672 (target_regsets): Rename to ...
2673 (xtensa_regsets): ... this, and make static.
2674 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
2675 globals.
2676 (xtensa_arch_setup, xtensa_regs_info): New functions.
2677 (the_low_target): Adjust.
2678 (initialize_low_arch): New function.
2679 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
2680 (nios2_arch_setup): Set the current process'es tdesc.
2681 (target_regsets): Rename to ...
2682 (nios2_regsets): ... this.
2683 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
2684 (nios2_regs_info): New function.
2685 (the_low_target): Adjust.
2686 (initialize_low_arch): New function.
a261b8f5
PA
2687 * linux-aarch64-low.c (tdesc_aarch64): Declare.
2688 (aarch64_arch_setup): Set the current process'es tdesc.
2689 (target_regsets): Rename to ...
2690 (aarch64_regsets): ... this.
2691 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
2692 (aarch64_regs_info): New function.
2693 (the_low_target): Adjust.
2694 (initialize_low_arch): New function.
3aee8918
PA
2695 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
2696 globals.
2697 (target_regsets): Rename to ...
2698 (tile_regsets): ... this.
2699 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
2700 (tile_regs_info): New function.
2701 (tile_arch_setup): Set the current process'es tdesc.
2702 (the_low_target): Adjust.
2703 (initialize_low_arch): New function.
2704 * spu-low.c (tdesc_spu): Declare.
2705 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
2706 * win32-arm-low.c (tdesc_arm): Declare.
2707 (arm_arch_setup): New function.
2708 (the_low_target): Install arm_arch_setup instead of
2709 init_registers_arm.
2710 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
2711 (init_windows_x86): Rename to ...
2712 (i386_arch_setup): ... this. Set `win32_tdesc'.
2713 (the_low_target): Adjust.
2714 * win32-low.c (win32_tdesc): New global.
2715 (child_add_thread): Don't create the thread cache here.
2716 (do_initial_child_stuff): Set the new process'es tdesc.
2717 * win32-low.h (struct target_desc): Forward declare.
2718 (win32_tdesc): Declare.
2719 * lynx-i386-low.c (tdesc_i386): Declare global.
2720 (lynx_i386_arch_setup): Set `lynx_tdesc'.
2721 * lynx-low.c (lynx_tdesc): New global.
2722 (lynx_add_process): Set the new process'es tdesc.
2723 * lynx-low.h (struct target_desc): Forward declare.
2724 (lynx_tdesc): Declare global.
2725 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
2726 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
2727 * nto-low.c (nto_tdesc): New global.
2728 (do_attach): Set the new process'es tdesc.
2729 * nto-low.h (struct target_desc): Forward declare.
2730 (nto_tdesc): Declare.
2731 * nto-x86-low.c (tdesc_i386): Declare.
2732 (nto_x86_arch_setup): Set `nto_tdesc'.
2733
b1fbec62
GB
27342013-06-04 Gary Benson <gbenson@redhat.com>
2735
2736 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
2737 to qSupported response when appropriate.
2738 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
2739 with nonzero-length annex.
2740 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
2741 arguments supplied in annex.
2742
d1ec4ce7
DE
27432013-05-31 Doug Evans <dje@google.com>
2744
ac44adcb 2745 PR server/15594
d1ec4ce7
DE
2746 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
2747 64 bits in 64-cross-32 environment.
2748
9b25f2d3
PA
27492013-05-28 Pedro Alves <palves@redhat.com>
2750
2751 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
2752 (aarch64-without-fpu.c): Delete rule.
2753 * configure.srv (aarch64*-*-linux*): Remove references to
2754 aarch64-without-fpu.o and aarch64-without-fpu.xml.
2755 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
2756 declaration.
2757
6740dc9c
PA
27582013-05-24 Pedro Alves <palves@redhat.com>
2759
2760 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
2761 instead of strchr/decode_address. Error if the range isn't split
2762 with a ','. Don't assume there's be a ':' in the action.
2763
c2d6af84
PA
27642013-05-23 Yao Qi <yao@codesourcery.com>
2765 Pedro Alves <palves@redhat.com>
2766
2767 * linux-low.c (lwp_in_step_range): New function.
2768 (linux_wait_1): If the thread was range stepping and stopped
2769 outside the stepping range, report the stop to GDB. Otherwise,
2770 continue stepping. Add range stepping debug output.
2771 (linux_set_resume_request): Copy the step range from the resume
2772 request to the lwp.
2773 (linux_supports_range_stepping): New.
2774 (linux_target_ops) <supports_range_stepping>: Set to
2775 linux_supports_range_stepping.
2776 * linux-low.h (struct linux_target_ops)
2777 <supports_range_stepping>: New field.
2778 (struct lwp_info) <step_range_start, step_range_end>: New fields.
2779 * linux-x86-low.c (x86_supports_range_stepping): New.
2780 (the_low_target) <supports_range_stepping>: Set to
2781 x86_supports_range_stepping.
2782 * server.c (handle_v_cont): Handle 'r' action.
2783 (handle_v_requests): Append ";r" if the target supports range
2784 stepping.
2785 * target.h (struct thread_resume) <step_range_start,
2786 step_range_end>: New fields.
2787 (struct target_ops) <supports_range_stepping>:
2788 New field.
2789 (target_supports_range_stepping): New macro.
2790
58794e1a
JB
27912013-05-17 Joel Brobecker <brobecker@adacore.com>
2792
2793 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
2794 confusion in comment.
2795
d631c5a7
JB
27962013-05-17 Joel Brobecker <brobecker@adacore.com>
2797
2798 * lynx-low.c (struct process_info_private): New type.
2799 (lynx_add_process): New function.
2800 (lynx_create_inferior, lynx_attach): Replace calls to
2801 add_process by calls to lynx_add_process.
2802 (lynx_resume): If PTID is null, then try using
2803 current_process()->private->last_wait_event_ptid.
2804 Add comments.
2805 (lynx_clear_inferiors): Delete. The contents of that function
2806 has been inlined in lynx_mourn;
2807 (lynx_wait_1): Save the ptid in the process's private data.
2808 (lynx_mourn): Free the process' private data. Replace call
2809 to lynx_clear_inferiors by call to clear_inferiors.
2810
96f7a20f
YQ
28112013-05-17 Yao Qi <yao@codesourcery.com>
2812
2813 * i386-low.c (i386_length_and_rw_bits): Move the comment to
2814 the right place.
2815
db0dfaa0
LM
28162013-05-16 Luis Machado <lgustavo@codesourcery.com>
2817
2818 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
2819 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
2820 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
2821 PT_TEXT_END_ADDR guards. Update comments.
2822 (linux_target_op) <read_offsets>: Conditionally define to
2823 linux_read_offsets if the target is UCLIBC and if it defines
2824 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
2825
68f5f838
SL
28262013-05-06 Sandra Loosemore <sandra@codesourcery.com>
2827 Andrew Jenner <andrew@codesourcery.com>
2828
2829 * Makefile.in (SFILES): Add linux-nios2-low.c.
2830 (clean): Add action to delete nios2-linux.c.
2831 (nios2-linux.c): New rule.
2832 * configure.srv: Add nios2*-*-linux*.
2833 * linux-nios2-low.c: New.
2834
1ebff1fd
HAQ
28352013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
2836
2837 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
2838
f6150862
HZ
28392013-04-25 Hui Zhu <hui@codesourcery.com>
2840
2841 PR gdb/15186
f6150862
HZ
2842 * ax.c (ax_printf): Add fflush.
2843
614c279d
TT
28442013-04-22 Tom Tromey <tromey@redhat.com>
2845
2846 * Makefile.in (SFILES): Add filestuff.c.
2847 (OBS): Add filestuff.o.
2848 (filestuff.o): New target.
2849 * config.in, configure: Rebuild.
2850 * configure.ac: Check for fdwalk, pipe2.
2851
7d4e5717
PA
28522013-04-17 Pedro Alves <palves@redhat.com>
2853
2854 * configure.ac (USE_THREAD_DB): Delete variable.
2855 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
2856 Don't AC_SUBST USE_THREAD_DB.
2857 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
2858 * config.in, configure: Regenerate.
2859
d5c93e41
PA
28602013-04-16 Pedro Alves <palves@redhat.com>
2861
2862 * linux-low.h (struct lwp_info) <thread_known>: Move under
2863 the USE_THREAD_DB #ifdef.
2864
04f5fe89
PA
28652013-04-16 Pedro Alves <palves@redhat.com>
2866
2867 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
2868 (linux-low.o): Delete rule.
2869 * linux-low.h: Always include "gdb_thread_db.h" instead of
2870 conditionally including thread_db.h.
2871 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
2872 HAVE_THREAD_DB_H.
2873
480b27bf
JK
28742013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2875
2876 * Makefile.in (install-only): Fix make install regression.
2877
43662968
JK
28782013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
2879
2880 Convert man pages to texinfo, new gdbinit.5 texinfo page.
2881 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
2882 installation.
2883 * gdbserver.1: Remove.
2884
3e74e146
PA
28852013-03-22 Pedro Alves <palves@redhat.com>
2886
2887 * linux-low.c (handle_extended_wait): Don't call
2888 linux_enable_event_reporting.
2889
a8347a2a
TT
28902013-03-15 Tony Theodore <tonyt@logyst.com>
2891
2892 PR build/9098:
2893 * Makefile.in (SHELL): Use @SHELL@.
2894
eeb56fa7
SDJ
28952013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
2896
2897 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
2898 compiler warning.
2899
4fa7e2ff
JB
29002013-03-13 Joel Brobecker <brobecker@adacore.com>
2901
2902 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
2903 Remove extraneous NULL element.
2904
8ddb1965
YQ
29052013-03-13 Yao Qi <yao@codesourcery.com>
2906
2907 * tracepoint.c (traceframe_read_tsv): Look for the last matched
2908 'V' block in trace frame.
2909
9accd112
MM
29102013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2911
2912 * target.h (struct target_ops): Add btrace ops.
2913 (target_supports_btrace): New macro.
2914 (target_enable_btrace): New macro.
2915 (target_disable_btrace): New macro.
2916 (target_read_btrace): New macro.
2917 * gdbthread.h (struct thread_info): Add btrace field.
2918 * server.c: Include btrace-common.h.
2919 (handle_btrace_general_set): New function.
2920 (handle_btrace_enable): New function.
2921 (handle_btrace_disable): New function.
2922 (handle_general_set): Call handle_btrace_general_set.
2923 (handle_qxfer_btrace): New function.
2924 (struct qxfer qxfer_packets[]): Add btrace entry.
2925 * inferiors.c (remove_thread): Disable btrace.
2926 * linux-low: Include linux-btrace.h.
2927 (linux_low_enable_btrace): New function.
2928 (linux_low_read_btrace): New function.
2929 (linux_target_ops): Add btrace ops.
2930 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
2931 Add srv_linux_btrace=yes.
2932 (x86_64-*-linux*): Add linux-btrace.o.
2933 Add srv_linux_btrace=yes.
2934 * configure.ac: Define HAVE_LINUX_BTRACE.
2935 * config.in: Regenerated.
2936 * configure: Regenerated.
2937
5cc22e4c
MM
29382013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2939
2940 * server.c (handle_qxfer): Preserve error message if -3 is
2941 returned.
2942 (qxfer): Document the -3 return value.
2943
7c97f91e
MM
29442013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2945
2946 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
2947 (linux_btrace_h): New variable.
2948 (linux-btrace.o): New rule.
2949
be9a119c 29502013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
2951 Hafiz Abid Qadeer <abidh@codesourcery.com>
2952
2953 * tracepoint.c (trace_buffer_size): New global.
2954 (DEFAULT_TRACE_BUFFER_SIZE): New define.
2955 (init_trace_buffer): Change to one-argument function. Allocate
2956 trace buffer memory.
2957 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
2958 handle QTBuffer:size packet.
2959 (cmd_bigqtbuffer_size): New function.
2960 (initialize_tracepoint): Call init_trace_buffer with
2961 DEFAULT_TRACE_BUFFER_SIZE.
2962 * server.c (handle_query): Add QTBuffer:size in the
2963 supported packets.
2964
e64f7499
YQ
29652013-03-07 Yao Qi <yao@codesourcery.com>
2966
2967 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
2968 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
2969 of -1.
2970 (cmd_qtsp): Adjust condition. Do post increment.
2971 Set cur_action and cur_step_action back to 0.
2972
f0ae6fc3
PA
29732013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
2974
2975 PR server/15236
2976 * linux-low.c (linux_write_memory): Return early success if LEN is
2977 zero.
2978
b5b0b0af
CV
29792013-03-05 Corinna Vinschen <vinschen@redhat.de>
2980
334ad4a8 2981 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 2982
589bc927
TT
29832013-02-28 Tom Tromey <tromey@redhat.com>
2984
2985 * configure.ac: Invoke AC_SYS_LARGEFILE.
2986 * configure, config.in: Rebuild.
2987
dfe07582
CV
29882013-02-28 Corinna Vinschen <vinschen@redhat.com>
2989
2990 * win32-low.c: Throughout, fix format strings and casts of
2991 printf-like functions to avoid type related warnings on all
2992 platforms.
2993 (get_child_debug_event): Print dwDebugEventCode as hex since
2994 that's how it's usually documented.
2995
736cd585
YQ
29962013-02-28 Yao Qi <yao@codesourcery.com>
2997
2998 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
2999 pulongest.
3000
e1f58301
JW
30012013-02-27 Jiong Wang <jiwang@tilera.com>
3002
3003 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3004 (reg-tilegx32.c): New rule.
3005 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3006 * linux-tile-low.c (tile_arch_setup): New function. Invoke
3007 different register info initializer according to elf class.
3008 (init_registers_tilgx32): New function. The tilegx32 register info
3009 initializer.
3010 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3011 (tile_store_gregset): Likewise.
3012
d171ca78
YQ
30132013-02-27 Yao Qi <yao@codesourcery.com>
3014
3015 * server.c (process_point_options): Print debug message when
3016 debug_threads is true.
3017
282bbdf3
YQ
30182013-02-26 Yao Qi <yao@codesourcery.com>
3019
3020 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
3021
aca22551
PA
30222013-02-19 Pedro Alves <palves@redhat.com>
3023 Kai Tietz <ktietz@redhat.com>
3024
3025 PR gdb/15161
3026
3027 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
3028 instead of strtoul to extract address from packet.
3029 (process_serial_event) <'z'>: Likewise.
3030
4f3cee1c
YQ
30312013-02-18 Yao Qi <yao@codesourcery.com>
3032
3033 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3034
8e1d55a3
PA
30352013-02-14 Pedro Alves <palves@redhat.com>
3036
3037 Plug memory leak.
3038
3039 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3040 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3041
458820da
PA
30422013-02-14 Pedro Alves <palves@redhat.com>
3043
3044 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3045
baea0dae
PA
30462013-02-14 Pedro Alves <palves@redhat.com>
3047
3048 * tracepoint.c (save_string): Delete.
3049 (add_tracepoint_action): Use savestring instead of save_string.
3050
0b1afbb3
PA
30512013-02-12 Pedro Alves <palves@redhat.com>
3052
3053 * linux-xtensa-low.c: Ditto.
3054 * xtensa-xtregs.c: Ditto.
3055
8a4ac37e
PA
30562013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3057
3058 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3059 thread_db.
3060
148de6bb
MS
30612013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3062
3063 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3064 aarch64_num_wp_regs and aarch64_num_bp_regs to
3065 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3066
55fac6e0
MS
30672013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3068
3069 * linux-aarch64-low.c (ps_get_thread_area): Replace
3070 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3071
176eb98c
MS
30722013-02-04 Jim MacArthur <jim.macarthur@arm.com>
3073 Marcus Shawcroft <marcus.shawcroft@arm.com>
3074 Nigel Stephens <nigel.stephens@arm.com>
3075 Yufeng Zhang <yufeng.zhang@arm.com>
3076
3077 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3078 (aarch64.c, aarch64-without-fpu.c): New targets.
3079 * configure.srv (aarch64*-*-linux*): New.
3080 * linux-aarch64-low.c: New file.
3081
56f7af9c
MS
30822013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3083
43aaf8b6 3084 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
3085 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3086 (dequeue_one_deferred_signal, linux_resume_one_thread)
3087 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3088 (linux_tracefork_grandchild, linux_test_for_tracefork)
3089 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3090 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3091 where the argument is 0.
3092
60f662b0
YQ
30932013-01-25 Yao Qi <yao@codesourcery.com>
3094
3095 * event-loop.c: Include "queue.h".
3096 (gdb_event_p): New typedef.
3097 (struct gdb_event) <next_event>: Remove.
3098 (event_queue): Change to QUEUE(gdb_event_p).
3099 (async_queue_event): Remove.
3100 (gdb_event_xfree): New.
3101 (initialize_event_loop): New.
3102 (process_event): Use API from QUEUE.
3103 (wait_for_event): Likewise.
3104 * server.c (main): Call initialize_event_loop.
3105 * server.h (initialize_event_loop): Declare.
3106
5ae4861a
YQ
31072013-01-18 Yao Qi <yao@codesourcery.com>
3108
3109 * ax.h (struct eval_agent_expr_context): New.
3110 (gdb_eval_agent_expr): Update declaration.
3111 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
3112 TFRAME. Add new argument CTX.
3113 * server.h (struct eval_agent_expr_context): Declare.
3114 (agent_mem_read, agent_tsv_read): Update declaration.
3115 (agent_mem_read_string): Likewise.
3116 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
3117 (add_traceframe_block): Add new argument TPOINT.
3118 Increase TPOINT->traceframe_usage.
3119 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
3120 eval_tracepoint_agent_expr.
3121 (condition_true_at_tracepoint): Likewise.
3122 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
3123 (agent_mem_read_string, agent_tsv_read): Likewise.
3124
85e00e85
YQ
31252013-01-16 Yao Qi <yao@codesourcery.com>
3126
3127 * linux-low.c (linux_resume_one_lwp): Don't check
3128 'lwp->bp_reinsert != 0'.
3129
4039cf45
JB
31302013-01-07 Joel Brobecker <brobecker@adacore.com>
3131 Pedro Alves <palves@redhat.com>
3132
3133 * lynx-low.c (ptrace_request_to_str): Define a temporary
3134 macro and use it to simplify this function's implementation.
3135
9044dee2
JB
31362013-01-07 Joel Brobecker <brobecker@adacore.com>
3137
3138 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
3139 sets errno.
3140
e6352c8f
JB
31412013-01-07 Joel Brobecker <brobecker@adacore.com>
3142
3143 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
3144
50681a27
JB
31452013-01-07 Joel Brobecker <brobecker@adacore.com>
3146
3147 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
3148
3f6e77ef
JB
31492013-01-07 Joel Brobecker <brobecker@adacore.com>
3150
3151 * lynx-low.c (lynx_resume): Use the resume_info parameter
3152 to determine the ptid for the lynx_ptrace call, unless
3153 it is equal to minus_one_ptid, in which case we use the
3154 ptid of the current_inferior.
3155 (lynx_wait_1): After having received a thread create/exit
3156 event, resume the inferior's execution using the signaling
3157 thread's ptid, rather than the old ptid.
3158
7fda33ae
JB
31592013-01-07 Joel Brobecker <brobecker@adacore.com>
3160
3161 * lynx-low.c (lynx_resume): Delete variable ret.
3162
b9786c74
JB
31632013-01-01 Joel Brobecker <brobecker@adacore.com>
3164
3165 * gdbreplay.c (gdbreplay_version): Update copyright year.
3166 * server.c (gdbserver_version): Likewise.
3167
8b93d60f
JB
31682012-12-17 Joel Brobecker <brobecker@adacore.com>
3169
3170 * lynx-low.c (lynx_wait_1): Add debug trace before adding
3171 new thread.
3172
037335a7
JB
31732012-12-17 Joel Brobecker <brobecker@adacore.com>
3174
3175 * lynx-low.c (ptrace_request_to_str): Add handling for
3176 PTRACE_GETTRACESIG.
3177
52d4cbd8
JB
31782012-12-17 Joel Brobecker <brobecker@adacore.com>
3179
3180 * lynx-low.c (lynx_attach): Delete variable new_process.
3181
ab8f6ca9
JB
31822012-12-17 Joel Brobecker <brobecker@adacore.com>
3183
3184 * lynx-low.c (lynx_create_inferior): Delete variable
3185 new_process.
3186
78cbc024
JB
31872012-12-17 Joel Brobecker <brobecker@adacore.com>
3188
3189 * lynx-low.c (ptrace_request_to_str): Do not handle
3190 PTRACE_GETTHREADLIST if this macro does not exist.
3191
14a00470
YQ
31922012-12-15 Yao Qi <yao@codesourcery.com>
3193
3194 * Makefile.in (OBS): Add notif.o.
3195 * notif.c, notif.h: New.
3196 * server.c: Include "notif.h".
3197 (struct vstop_notif) <next>: Remove.
3198 <base>: New field.
3199 (queue_stop_reply): Update.
3200 (push_event, send_next_stop_reply): Remove.
3201 (discard_queued_stop_replies): Update.
3202 (notif_stop): New variable.
3203 (handle_v_stopped): Remove.
3204 (handle_v_requests): Don't call handle_v_stopped. Call
3205 handle_ack_notif instead.
3206 (queue_stop_reply_callback): Call notif_event_enque instead
3207 of queue_stop_reply.
3208 (handle_status): Don't call send_next_stop_reply, call
3209 notif_write_event instead.
3210 (kill_inferior_callback): Likewise.
3211 (detach_or_kill_inferior_callback): Likewise.
3212 (main): Call initialize_notif.
3213 (process_serial_event): Call QUEUE_is_empty.
3214 (handle_target_event): Call notif_push instead of push event.
3215 * server.h (push_event): Remove declaration.
3216
61c125b9
TT
32172012-12-10 Tom Tromey <tromey@redhat.com>
3218
3219 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
3220 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
3221 macros.
3222 (.c.o): Rewrite.
3223 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
3224 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
3225 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
3226 (amd64-linux-ipa.o, ax.o): Rewrite.
3227 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
3228 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
3229 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
3230 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
3231 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
3232 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
3233 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
3234 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
3235 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
3236 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
3237 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
3238 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
3239 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
3240 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
3241 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
3242 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
3243 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
3244 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
3245 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
3246 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
3247 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
3248 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
3249 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
3250 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
3251 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
3252 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
3253 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
3254 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
3255 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
3256 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
3257 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
3258 (reg-tilegx.o): Remove.
3259 (all_object_files): New macro.
3260 Include .deps files.
3261 * aclocal.m4, configure: Rebuild.
3262 * acinclude.m4: Include depstand.m4, lead-dot.m4.
3263 * configure.ac: Invoke ZW_CREATE_DEPDIR,
3264 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
3265
e90e9ad9
TT
32662012-12-05 Tom Tromey <tromey@redhat.com>
3267
3268 PR gdb/14917:
3269 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
3270
02d403bf 32712012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
3272
3273 * configure.ac: Check for linux/perf_event.h.
3274 * config.in: Regenerated.
3275 * configure: Regenerated.
3276
0270a750
PA
32772012-11-26 Maxime Villard <rustyBSD@gmx.fr>
3278
3279 * hostio.c (handle_readlink): Decrease buffer size
3280 parameter passed to readlink by one byte.
3281
8c29b58e
YQ
32822012-11-26 Yao Qi <yao@codesourcery.com>
3283
3284 * configure.ac (build_warnings): Append '-Wempty-body'.
3285 * configure: Regenerated.
3286 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
3287 body.
3288
8bdce1ff
PM
32892012-11-15 Pierre Muller <muller@sourceware.org>
3290
3291 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
3292 * config.in: Regenerate.
3293 * configure: Regenerate.
3294 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
3295 Use "gdb_wait.h" header instead of <sys/wait.h> header.
3296 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3297 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
3298 header.
3299 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
3300 instead of <sys/wait.h> header.
3301 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3302
02d403bf 33032012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
3304
3305 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
3306 (various make rules): Remove -DGDBSERVER
3307
fbd5db48
YQ
33082012-11-09 Yao Qi <yao@codesourcery.com>
3309
3310 * spu-low.c (current_ptid): Move it to ..
3311 * gdbthread.h: ... here. New.
3312 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
3313 * server.c (myresume, process_serial_event): Likewise.
3314 * thread-db.c (thread_db_find_new_threads): Likewise.
3315 * tracepoint.c (run_inferior_command): Likewise.
3316
b3dc46ff
AB
33172012-10-01 Andrew Burgess <aburgess@broadcom.com>
3318
3319 * server.c (handle_search_memory_1): Include access length in
3320 warning message.
3321
07c04788
HPN
33222012-09-05 Michael Brandt <michael.brandt@axis.com>
3323
3324 * linux-crisv32-low.c: Fix compile errors.
3325
918d227b
YQ
33262012-09-04 Yao Qi <yao@codesourcery.com>
3327
3328 * tracepoint.c (cmd_qtsv): Adjust debug message.
3329 Don't check CUR_TPOINT.
3330
18c1b81a
YQ
33312012-08-28 Yao Qi <yao@codesourcery.com>
3332
3333 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
3334 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
3335 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
3336 Remove declarations of xmalloc, xreallloc, xstrdup and
3337 freeargv.
3338 * Makefile.in (libiberty_h): New.
3339 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
3340 (linux-bfin-low.o): Append dependency 'libiberty.h'.
3341
dc82f37b
YQ
33422012-08-23 Yao Qi <yao@codesourcery.com>
3343
3344 * server.h: Remove declaration of 'xsnprintf'.
3345
406b1477
KS
33462012-08-22 Keith Seitz <keiths@redhat.com>
3347
3348 * server.h: Include build-gnulib-gbserver/config.h.
3349 * gdbreplay.c: Likewise.
3350
e6712ff1
DE
33512012-08-08 Doug Evans <dje@google.com>
3352
3353 * Makefile.in (SFILES): Add gdb_vecs.c.
3354 (OBS): Add gdb_vecs.o.
3355 (gdb_vecs_h, host_defs_h): New variables.
3356 (thread-db.o): Add $(gdb_vecs_h) dependency.
3357 (gdb_vecs.o): New rule.
3358 * thread-db.c: #include "gdb_vecs.h".
3359 (thread_db_load_search): Use a vector to iterate over path elements.
3360 Handle text appearing after "$pdir".
3361
3362 * configure.ac: Add check for strstr.
3363 * config.in: Regenerate.
3364 * configure: Regenerate.
3365
7c3270ae
UW
33662012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
3367
3368 * hostio.c (handle_pread): If pread fails, fall back to attempting
3369 lseek/read.
3370 (handle_pwrite): Likewise for pwrite.
3371
b62e2b27
UW
33722012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
3373
3374 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
3375 between unsupported TYPE and unimplementable ADDR/LEN combination.
3376 (arm_insert_point): Act on new return value.
3377
78a99e91
PA
33782012-07-31 Pedro Alves <palves@redhat.com>
3379
3380 * server.c (process_point_options): Only skip tokens if we find
3381 one that is unrecognized. Don't treat 'X' specially while
3382 skipping unrecognized tokens.
3383
fcf303ab
UW
33842012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
3385
3386 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
3387 to 4-byte-align HW breakpoint addresses for Thumb.
3388
7255706c
YQ
33892012-07-27 Yao Qi <yao@codesourcery.com>
3390
3391 PR remote/14161.
3392
3393 * server.h: Declare gdb_agent_about_to_close.
3394 * target.c (kill_inferior): Include "agent.h".
3395 New. Send command 'kill'.
3396 * target.h (kill_inferior): Removed macro.
3397 * tracepoint.c (gdb_agent_about_to_close): New.
3398 (gdb_agent_helper_thread): Handle command 'close'.
3399 Wait endlessly until the inferior stops.
3400 Install gdb_agent_remove_socket to atexit hook.
3401 (agent_socket_name): New static variable.
3402 (gdb_agent_socket_init): Replace local variable 'name' with
3403 'agent_socket_name'.
3404 (gdb_agent_remove_socket): New.
3405
5a3f286f
YQ
34062012-07-27 Yao Qi <yao@codesourcery.com>
3407
3408 * server.c (process_point_options): Stop at 'X' when parsing.
3409
961bd387
ME
34102012-07-19 Michael Eager <eager@eagercon.com>
3411
a261b8f5 3412 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
3413 to hw_execute.
3414 * linux-x86-low.c (x86_insert_point, x86_remove_point):
3415 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
3416 hardware breakpoint.
3417
aa7c7447
JK
34182012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3419
3420 * gdbserver/linux-low.c (initialize_low): Call
3421 linux_ptrace_init_warnings.
3422
7f216e7c
DE
34232012-07-02 Doug Evans <dje@google.com>
3424
3425 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
3426 pointer to int.
3427
d3ce09f5
SS
34282012-07-02 Stan Shebs <stan@codesourcery.com>
3429
3430 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
3431 (ax.o): Add it to build rule.
3432 (ax-ipa.o): Ditto.
3433 (OBS): Add format.o.
3434 (IPA_OBS): Add format.o.
3435 * server.c (handle_query): Claim support for breakpoint commands.
3436 (process_point_options): Add command case.
3437 (process_serial_event): Leave running if there are printfs in
3438 effect.
3439 * mem-break.h (any_persistent_commands): Declare.
3440 (add_breakpoint_commands): Declare.
3441 (gdb_no_commands_at_breakpoint): Declare.
3442 (run_breakpoint_commands): Declare.
3443 * mem-break.c (struct point_command_list): New struct.
3444 (struct breakpoint): New field command_list.
3445 (any_persistent_commands): New function.
3446 (add_commands_to_breakpoint): New function.
3447 (add_breakpoint_commands): New function.
3448 (gdb_no_commands_at_breakpoint): New function.
3449 (run_breakpoint_commands): New function.
3450 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
3451 locally.
3452 * ax.c: Include format.h.
3453 (ax_printf): New function.
3454 (gdb_eval_agent_expr): Add printf opcode.
3455
2f8f6aed
YQ
34562012-06-13 Yao Qi <yao@codesourcery.com>
3457
3458 * server.c (start_inferior): Remove duplicated writes to fields
3459 'last_resume_kind' and 'last_status' of 'current_inferior'.
3460
0c9070b3
YQ
34612012-06-12 Yao Qi <yao@codesourcery.com>
3462 Pedro Alves <palves@redhat.com>
3463
3464 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
3465 comment.
3466 * server.c (handle_v_cont): Extend comment.
3467
c52daf70
YQ
34682012-06-11 Yao Qi <yao@codesourcery.com>
3469
3470 * linux-low.c (linux_attach): Add 'static'.
3471
d38bbb0a
YQ
34722012-06-06 Yao Qi <yao@codesourcery.com>
3473
3474 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
3475
89dc0afd
JK
34762012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
3477
3478 Fix gcc -flto compilation warning.
3479 * server.c (main): Make variable multi_mode and attach volatile.
3480
75f62ce7
TJB
34812012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3482
3483 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
3484 if the platform doesn't know about it.
3485
65f479b6
PA
34862012-05-30 Jeff Kenton <jkenton@tilera.com>
3487
3488 * Makefile.in (SFILES): Add linux-tile-low.c.
3489 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
3490 * configure.srv: Handle tilegx-*-linux*.
3491 * linux-tile-low.c: New file.
3492
0c5bf5a9
JK
34932012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3494
3495 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
3496
a493e3e2
PA
34972012-05-24 Pedro Alves <palves@redhat.com>
3498
3499 PR gdb/7205
3500
43aaf8b6 3501 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 3502
2ea28649
PA
35032012-05-24 Pedro Alves <palves@redhat.com>
3504
3505 PR gdb/7205
3506
3507 Replace target_signal with gdb_signal throughout.
3508
8d409d16
MR
35092012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
3510
3511 * linux-low.c (linux_store_registers): Avoid the copying sequence
3512 when no data has been retrieved by ptrace.
3513
23512c01
MGD
35142012-05-22 Will Deacon <will.deacon@arm.com>
3515
3516 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
3517 Include asm/ptrace.h.
3518 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
3519 already defined.
3520
4934b29e
MR
35212012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
3522
3523 * linux-low.c (linux_store_registers): Don't re-retrieve data
3524 with ptrace that has already been obtained from /proc. Always
3525 copy any data retrieved with ptrace to the buffer supplied.
3526
bde24c0a
PA
35272012-05-11 Yao Qi <yao@codesourcery.com>
3528 Pedro Alves <palves@redhat.com>
3529
3530 * linux-low.c (enum stopping_threads_kind): New.
3531 (stopping_threads): Change type to `enum stopping_threads_kind'.
3532 (handle_extended_wait): If stopping and suspending threads, leave
3533 the new_lwp suspended too.
3534 (linux_wait_for_event): Adjust.
3535 (stop_all_lwps): Set `stopping_threads' to
3536 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
3537 whether we're suspending threads or just stopping them. Assert no
3538 recursion happens.
3539
623b6bdf
YQ
35402012-04-29 Yao Qi <yao@codesourcery.com>
3541
3542 * server.h: Move some code to ...
3543 * gdbthread.h: ... here. New.
3544 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
3545 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
3546 (nto-low.o, win32-low.o): Likewise.
3547 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
3548 * regcache.c, remote-utils.c, server.c: Likewise.
3549 * target.c, tracepoint.c, win32-low.c: Likewise.
3550
f15f9948
TJB
35512012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3552
3553 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
3554 (PTRACE_ARG4_TYPE): Likewise.
3555 (PTRACE_XFER_TYPE): Likewise.
3556 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
3557 ptrace to PTRACE_ARG3_TYPE.
3558 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
3559 (PTRACE_ARG4_TYPE): Likewise.
3560 (PTRACE_XFER_TYPE): Likewise.
3561 (linux_detach_one_lwp): Cast fourth argument of
3562 ptrace to long then PTRACE_ARG4_TYPE.
3563 (regsets_fetch_inferior_registers): Cast third argument of
3564 ptrace to long then PTRACE_ARG3_TYPE.
3565 (regsets_store_inferior_registers): Likewise.
3566
38ea300a
PA
35672012-04-20 Pedro Alves <palves@redhat.com>
3568
3569 * configure: Regenerate.
3570
c971b7fa
PA
35712012-04-19 Pedro Alves <palves@redhat.com>
3572
43aaf8b6 3573 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 3574 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
3575 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
3576 (all, install-only, uninstall, clean-info, all-lib, clean): No
3577 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
3578 (maintainer-clean realclean distclean): Use subdir_do.
3579 (subdir_do): New.
3580 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 3581 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
3582 * acinclude.m4: Include acx_configure_dir.m4.
3583 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
3584 calls. Call AC_PROG_RANLIB. Configure gnulib using
3585 ACX_CONFIGURE_DIR.
3586 (GNULIB): New.
3587 (GNULIB_STDINT_H): Adjust.
3588 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
3589 * gdbreplay.c: Include build-gnulib/config.h.
3590 * server.h: Likewise.
3591 * aclocal.m4: Regenerate.
3592 * config.in: Regenerate.
3593 * configure: Regenerate.
c971b7fa 3594
809277f8
PA
35952012-04-19 Pedro Alves <palves@redhat.com>
3596
3597 * Makefile.in (LIBGNU, INCGNU): Adjust.
3598 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
3599 (all, install-only, uninstall, clean-info, all-lib, clean)
3600 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
3601 * configure.ac: Adjust AC_OUTPUT output.
3602 * aclocal.m4: Regenerate.
3603 * configure: Regenerate.
3604
fd9bb8b8
PA
36052012-04-19 Pedro Alves <palves@redhat.com>
3606
3607 * Makefile.in (generated_files): New.
3608 (server_h): Remove the explicit dependency on config.h, and depend
3609 on $generated_files.
3610
1c298c66
PA
36112012-04-19 Pedro Alves <palves@redhat.com>
3612
3613 * Makefile.in (INCGNU): Add -Ignulib.
3614
57c4b50b
PA
36152012-04-19 Pedro Alves <palves@redhat.com>
3616
3617 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
3618 (INCGNU): ... this, and spell out -I here.
3619 (GNULIB_LIB): Rename to ...
3620 (LIBGNU): ... this.
3621 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
3622
1030e047
PA
36232012-04-19 Pedro Alves <palves@redhat.com>
3624
3625 * config.in: Regenerate.
3626
447d4319
PA
36272012-04-19 Pedro Alves <palves@redhat.com>
3628
3629 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
3630 * server.h (memmem): Remove declaration.
3631 * config.in: Regenerate.
3632 * configure: Regenerate.
3633
aad9eab9
YQ
36342012-04-19 Yao Qi <yao@codesourcery.com>
3635
3636 * Makefile.in (SFILES): Add common/vec.c.
3637 (OBS): Add vec.o.
3638 (vec.o): New rule.
3639
3e10640f
YQ
36402012-04-19 Yao Qi <yao@codesourcery.com>
3641
3642 * remote-utils.c (prepare_resume_reply): Replace with macro
3643 target_core_of_thread.
3644 * server.c (handle_qxfer_threads_proper): Likewise.
3645 * target.h (traget_core_of_thread): New macro.
3646
71622373
PA
36472012-04-18 Pedro Alves <palves@redhat.com>
3648
3649 * aclocal.m4: Regenerate.
3650 * configure: Regenerate.
3651
80d26939
YQ
36522012-04-16 Yao Qi <yao@codesourcery.com>
3653
3654 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
3655 duplicated on address.
3656
42476b70
YQ
36572012-04-16 Yao Qi <yao@codesourcery.com>
3658
3659 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
3660 (struct tracepoint_action_ops) <send>: New field.
3661 (m_tracepoint_action_send, r_tracepoint_action_send): New.
3662 (agent_expr_send, x_tracepoint_action_send): New.
3663 (l_tracepoint_action_send): New.
3664 (cmd_qtdp): Download and install tracepoint
3665 according to `use_agent'.
3666 (run_inferior_command): Add one more parameter `len'.
3667 Update callers.
3668 (tracepoint_send_agent): New.
3669 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
3670
7bc83639
YQ
36712012-04-16 Yao Qi <yao@codesourcery.com>
3672
3673 * tracepoint.c (download_tracepoints): Moved to ...
3674 (cmd_qtstart): ... here.
3675
5f18041e
YQ
36762012-04-14 Yao Qi <yao@codesourcery.com>
3677
3678 * tracepoint.c: Include inttypes.h.
3679 (struct collect_memory_action): Use sized types.
3680 (struct tracepoint): Likewise.
3681 (cmd_qtdp, stop_tracing): Update print specifiers.
3682 (cmd_qtp, response_tracepoint): Likewise.
3683 (collect_data_at_tracepoint): Likewise.
3684 (collect_data_at_step): Likewise.
3685
55a8c076
YQ
36862012-04-14 Yao Qi <yao@codesourcery.com>
3687
3688 Import gnulib module inttypes.
3689 * aclocal.m4, config.in, configure: Regenerated.
3690
dc750257
YQ
36912012-04-14 Yao Qi <yao@codesourcery.com>
3692
3693 * Makefile.in (maintainer-clean, realclean, distclean): Remove
3694 Makefile and config.status at last.
3695
0ab5faf9
YQ
36962012-04-13 Yao Qi <yao@codesourcery.com>
3697
3698 * tracepoint.c: Include stdint.h unconditionally.
3699
18f5fd81
TJB
37002012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3701
3702 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
3703 on BFD_HAVE_SYS_PROCFS_TYPE.
3704 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
3705 * configure: Regenerate.
3706 * config.in: Likewise.
3707
4d47af5c
L
37082012-04-13 H.J. Lu <hongjiu.lu@intel.com>
3709
3710 * Makefile.in (clean): Also remove x32.c x32-linux.c
3711 x32-avx.c x32-avx-linux.c.
3712 (x32.o): New target.
3713 (x32.c): Likewise.
3714 (x32-linux.o): Likewise.
3715 (x32-linux.c): Likewise.
3716 (x32-avx.o): Likewise.
3717 (x32-avx.c): Likewise.
3718 (x32-avx-linux.o): Likewise.
3719 (x32-avx-linux.c): Likewise.
3720
3721 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
3722 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
3723 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
3724 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
3725 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
3726 i386/x32-avx-linux.xml.
3727
3728 * linux-x86-low.c (init_registers_x32_linux): New prototype.
3729 (init_registers_x32_avx_linux): Likwise.
3730 (x86_linux_update_xmltarget): Call init_registers_x32_linux
3731 or init_registers_x32_avx_linux if linux_is_elf64 is false.
3732
ecedbe58
PA
37332012-04-13 Pedro Alves <palves@redhat.com>
3734
3735 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
3736 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
3737 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
3738 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
3739 the sub-make.
3740
c92b5177
L
37412012-04-12 H.J. Lu <hongjiu.lu@intel.com>
3742
3743 * linux-x86-low.c (compat_x32_clock_t): New.
3744 (compat_x32_siginfo_t): Likewise.
3745 (compat_x32_siginfo_from_siginfo): Likewise.
3746 (siginfo_from_compat_x32_siginfo): Likewise.
3747 (linux_is_elf64): Likewise.
3748 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
3749 and siginfo_from_compat_x32_siginfo for x32.
3750 (x86_arch_setup): Set linux_is_elf64.
3751
214d508e
L
37522012-04-12 H.J. Lu <hongjiu.lu@intel.com>
3753
3754 PR gdb/13969
3755 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
3756 e_machine field.
3757 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
3758 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
3759 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
3760 compatible with process.
3761
c9a1864a
YQ
37622012-04-12 Yao Qi <yao@codesourcery.com>
3763
3764 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
3765 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
3766 (install-only, install-info, clean): Handle sub dir gnulib.
3767 (all-lib, am--refresh): New targets.
3768 (memmem.o): Remove target.
3769 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
3770 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
3771 (AC_REPLACE_FUNCS): Remove memmem.
3772 Invoke gl_INIT and AM_INIT_AUTOMAKE.
3773 (AC_OUTPUT): Generate Makefile in gnulib/.
3774 * aclocal.m4, config.in, configure: Regenerated.
3775
367ba2c2
MR
37762012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
3777
3778 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
3779
9d236627
PA
37802012-04-05 Pedro Alves <palves@redhat.com>
3781
3782 -Werror=strict-aliasing
3783
3784 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
3785 pointer.
3786
111217b3
PA
37872012-04-04 Pedro Alves <palves@redhat.com>
3788
3789 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
3790 (sparc_store_gregset_from_stack, sparc_store_gregset)
3791 (sparc_breakpoint_at): Fix formatting.
3792
8365dcf5
TJB
37932012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3794
3795 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
3796 are available.
3797 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
3798 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
3799 * config.in: Regenerate.
3800 * configure: Likewise.
3801
689cc2ae
PA
38022012-03-29 Pedro Alves <palves@redhat.com>
3803
3804 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
3805 Correct ptrace arguments.
3806
c14dfd32
PA
38072012-03-28 Pedro Alves <palves@redhat.com>
3808
3809 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
3810 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
3811 (IA64_FR1_REGNUM): New defines.
3812 (ia64_fetch_register): New.
3813 (the_low_target): Install it.
3814 * linux-low.h (struct linux_target_ops) <fetch_register>: New
3815 field.
3816 * linux-low.c (linux_fetch_registers): Try the
3817 the_low_target.fetch_register hook first.
3818
3819 * linux-arm-low.c (the_low_target): Adjust.
3820 * linux-bfin-low.c (the_low_target): Adjust.
3821 * linux-cris-low.c (the_low_target): Adjust.
3822 * linux-crisv32-low.c (the_low_target): Adjust.
3823 * linux-m32r-low.c (the_low_target): Adjust.
3824 * linux-m68k-low.c (the_low_target): Adjust.
3825 * linux-mips-low.c (the_low_target): Adjust.
3826 * linux-ppc-low.c (the_low_target): Adjust.
3827 * linux-s390-low.c (the_low_target): Adjust.
3828 * linux-sh-low.c (the_low_target): Adjust.
3829 * linux-sparc-low.c (the_low_target): Adjust.
3830 * linux-tic6x-low.c (the_low_target): Adjust.
3831 * linux-x86-low.c (the_low_target): Adjust.
3832 * linux-xtensa-low.c (the_low_target): Adjust.
3833
63c88e13
PA
38342012-03-26 Pedro Alves <palves@redhat.com>
3835
3836 * server.c (handle_qxfer_libraries): Don't bail early if
3837 the_target->qxfer_libraries_svr4 is not NULL.
3838
fb723180
PA
38392012-03-26 Pedro Alves <palves@redhat.com>
3840
3841 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
3842
0afae3cf
PA
38432012-03-23 Pedro Alves <palves@redhat.com>
3844
3845 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
3846 "library-list-svr4" element's start tag when the the DSO list is
3847 empty.
3848
485f1ee4
PA
38492012-03-23 Pedro Alves <palves@redhat.com>
3850
3851 * linux-low.c (read_one_ptr): Read the inferior's pointer through
3852 a variable whose type size is the same as the inferior's pointer
3853 size.
3854
a5362b9a
TS
38552012-03-21 Thomas Schwinge <thomas@codesourcery.com>
3856
3857 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
3858 struct siginfo.
3859 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
3860 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3861 * linux-low.h: Include <signal.h>.
3862 (struct siginfo): Remove forward declaration.
3863 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
3864 struct siginfo.
3865
d226c142
MF
38662012-03-21 Mike Frysinger <vapier@gentoo.org>
3867
3868 * .gitignore: Ignore more files.
3869
122f36ef
PA
38702012-03-19 Pedro Alves <palves@redhat.com>
3871 Jan Kratochvil <jan.kratochvil@redhat.com>
3872
3873 * server.c (cont_thread, general_thread): Add describing comments.
3874 (start_inferior): Clear `cont_thread'.
3875 (handle_v_cont): Don't set `cont_thread' if resuming all threads
3876 of a process.
3877
fc3e5175
YQ
38782012-03-15 Yao Qi <yao@codesourcery.com>
3879
3880 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
3881 handling to ...
3882 (cmd_qtdp): ... here.
3883
8d0d92cd
YQ
38842012-03-15 Yao Qi <yao@codesourcery.com>
3885
3886 * tracepoint.c (struct tracepoint_action_ops): New.
3887 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
3888 (m_tracepoint_action_download): New.
3889 (r_tracepoint_action_download): New.
3890 (x_tracepoint_action_download): New.
3891 (l_tracepoint_action_download): New.
3892 (add_tracepoint_action): Install `action->ops' according type.
3893 (download_tracepoint_1): Move code `download' function pointer
3894 of various tracepoint_action_ops.
3895
87b0bb13
JK
38962012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
3897
3898 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
3899 linux_ptrace_attach_warnings.
3900
5f572dec
JK
39012012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
3902
3903 * Makefile.in (linux-ptrace.o): New.
3904 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
3905 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
3906 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
3907 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
3908 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
3909 of these targets.
3910 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
3911
f4647387
YQ
39122012-03-08 Yao Qi <yao@codesourcery.com>
3913 Pedro Alves <palves@redhat.com>
3914
3915 Fix PR server/13392.
3916 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
3917 offset of JMP insn.
3918 * tracepoint.c (remove_tracepoint): New.
3919 (cmd_qtdp): Call remove_tracepoint when failed to install.
3920
9b224c5e
PA
39212012-03-07 Pedro Alves <palves@redhat.com>
3922
3923 * linux-low.c (get_detach_signal): New.
3924 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
3925 Pass on pending signals to PTRACE_DETACH. Check the result of the
3926 ptrace call.
3927 * server.c (program_signals, program_signals_p): New.
3928 (handle_general_set): Handle QProgramSignals.
3929 * server.h (program_signals, program_signals_p): Declare.
3930
e237a7e2
JK
39312012-03-05 Pedro Alves <palves@redhat.com>
3932 Jan Kratochvil <jan.kratochvil@redhat.com>
3933
3934 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
3935 New comment why.
3936
5808517f
YQ
39372012-03-03 Yao Qi <yao@codesourcery.com>
3938
3939 * tracepoint.c (tracepoint_look_up_symbols): Update call to
3940 agent_look_up_symbols.
3941
58b4daa5
YQ
39422012-03-03 Yao Qi <yao@codesourcery.com>
3943
3944 * Makefile.in (linux-low.o): Keep dependence on agent.h.
3945 (linux-x86-low.o): Likewise.
3946 * server.h: Remove in_process_agent_loaded.
3947 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
3948 common/agent.c.
3949 Update callers.
3950
8ffcbaaf
YQ
39512012-03-03 Yao Qi <yao@codesourcery.com>
3952
3953 * tracepoint.c (gdb_agent_capability): New global.
3954 (in_process_agent_loaded_ust): Renamed to
3955 `in_process_agent_supports_ust'.
3956 Update callers.
3957 (in_process_agent_supports_ust): Call agent_capability_check.
3958 (clear_installed_tracepoints): Assert that agent supports
3959 agent.
3960
d1feda86
YQ
39612012-03-03 Yao Qi <yao@codesourcery.com>
3962
3963 * linux-low.c (linux_supports_agent): New.
3964 (linux_target_ops): Initialize field `supports_agent' with
3965 linux_supports_agent.
3966 * target.h (struct target_ops) <supports_agent>: New.
3967 (target_supports_agent): New macro.
3968 * server.c (handle_general_set): Handle packet 'QAgent'.
3969 (handle_query): Send `QAgent+'.
3970 * Makefile.in (server.o): Depends on agent.h.
3971
2fa291ac
YQ
39722012-03-03 Yao Qi <yao@codesourcery.com>
3973
3974 * Makefile.in (OBS): Add agent.o.
3975 Add new rule for agent.o.
3976 Track dependence of tracepoint.c on agent.h.
3977 * tracepoint.c (run_inferior_command_1):
3978 (run_inferior_command): Call agent_run_command.
3979 (gdb_ust_connect_sync_socket): Deleted. Move it to
3980 common/agent.c.
3981 (resume_thread, stop_thread): Likewise.
3982 (gdb_ust_socket_init): Renamed to ...
3983 (gdb_agent_socket_init): ... New.
3984 (gdb_ust_thread): Renamed to ...
3985 (gdb_agent_helper_thread): ... New.
3986 (gdb_ust_init): Move some code to ...
3987 (gdb_agent_init): ... here. New.
3988 [HAVE_UST]: Call gdb_ust_init.
3989 (initialize_tracepoint_ftlib): Call gdb_agent_init.
3990 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
3991 * config.in, configure: Regenerated.
3992
05044653
PA
39932012-03-02 Pedro Alves <palves@redhat.com>
3994
3995 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
3996 * linux-low.c (struct simple_pid_list): New.
3997 (stopped_pids): New a struct simple_pid_list pointer.
3998 (add_to_pid_list, pull_pid_from_list): New.
3999 (handle_extended_wait): Don't assume the first signal new children
4000 report is SIGSTOP. Adjust call to pull_pid_from_list.
4001 (linux_wait_for_lwp): Adjust.
4002
8d00225b
YQ
40032012-03-02 Yao Qi <yao@codesourcery.com>
4004
4005 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4006 debug log.
4007
19560ba5
YQ
40082012-03-02 Yao Qi <yao@codesourcery.com>
4009
4010 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4011 `stop_pc' and `tpoint'. Update caller.
4012
1faeff08
MR
40132012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
4014
4015 * linux-low.h (linux_target_ops): Add regset_bitmap member.
4016 * linux-low.c (use_linux_regsets): New macro.
4017 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4018 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4019 (linux_register_in_regsets): New function.
4020 (usr_fetch_inferior_registers): Skip registers covered by
4021 regsets.
4022 (usr_store_inferior_registers): Likewise.
4023 (usr_fetch_inferior_registers): New macro.
4024 (usr_store_inferior_registers): Likewise.
4025 (linux_fetch_registers): Handle mixed regset/non-regset targets.
4026 (linux_store_registers): Likewise.
4027 * linux-mips-low.c (init_registers_mips_dsp_linux): New
4028 prototype.
4029 (init_registers_mips64_dsp_linux): Likewise.
4030 (init_registers_mips_linux): New macro.
4031 (init_registers_mips_dsp_linux): Likewise.
4032 (mips_dsp_num_regs): Likewise.
4033 (DSP_BASE, DSP_CONTROL): New fallback macros.
4034 (mips_base_regs): New macro.
4035 (mips_regmap): Use it. Fix the size.
4036 (mips_dsp_regmap): New variable.
4037 (mips_dsp_regset_bitmap): Likewise.
4038 (mips_arch_setup): New function.
4039 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4040 than mips_regmap.
4041 (mips_cannot_store_register): Likewise.
4042 (the_low_target): Update .arch_setup, .num_regs and .regmap
4043 initializers. Add .regset_bitmap initializer.
4044 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4045 initializer.
4046 * linux-bfin-low.c (the_low_target): Likewise.
4047 * linux-cris-low.c (the_low_target): Likewise.
4048 * linux-crisv32-low.c (the_low_target): Likewise.
4049 * linux-ia64-low.c (the_low_target): Likewise.
4050 * linux-m32r-low.c (the_low_target): Likewise.
4051 * linux-m68k-low.c (the_low_target): Likewise.
4052 * linux-ppc-low.c (the_low_target): Likewise.
4053 * linux-s390-low.c (the_low_target): Likewise.
4054 * linux-sh-low.c (the_low_target): Likewise.
4055 * linux-sparc-low.c (the_low_target): Likewise.
4056 * linux-tic6x-low.c (the_low_target): Likewise.
4057 * linux-x86-low.c (the_low_target): Likewise.
4058 * linux-xtensa-low.c (the_low_target): Likewise.
4059 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4060 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4061 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4062 srv_xmlfiles.
4063 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4064 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4065
c03e6ccc
YQ
40662012-02-29 Yao Qi <yao@codesourcery.com>
4067 Pedro Alves <palves@redhat.com>
4068
4069 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4070 `step_over_finished' is true.
4071
644cebc9
PA
40722012-02-27 Pedro Alves <palves@redhat.com>
4073
4074 * linux-low.c (pid_is_stopped): Delete, moved to common/.
4075 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4076
c14d7ab2
PA
40772012-02-27 Pedro Alves <palves@redhat.com>
4078
4079 PR server/9684
4080 * linux-low.c (pid_is_stopped): New.
4081 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4082
412c89dd
LM
40832012-02-25 Luis Machado <lgustavo@codesourcery.com>
4084
4085 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4086 of conditions.
4087
b745defe
MR
40882012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4089
4090 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4091
9f3a5c85
LM
40922012-02-24 Luis Machado <lgustavo@codesourcery>
4093
4094 * server.c (handle_query): Advertise support for target-side
4095 breakpoint condition evaluation.
4096 (process_point_options): New function.
4097 (process_serial_event): When inserting a breakpoint, check for
4098 a target-side condition that should be evaluated.
4099
4100 * mem-break.c: Include regcache.h and ax.h.
4101 (point_cond_list_t): New data structure.
4102 (breakpoint) <cond_list>: New field.
4103 (find_gdb_breakpoint_at): Make non-static.
4104 (delete_gdb_breakpoint_at): Clear any target-side
4105 conditions.
4106 (clear_gdb_breakpoint_conditions): New function.
4107 (add_condition_to_breakpoint): Likewise.
4108 (add_breakpoint_condition): Likewise.
4109 (gdb_condition_true_at_breakpoint): Likewise.
4110 (gdb_breakpoint_here): Return result directly instead
4111 of going through a local variable.
4112
4113 * mem-break.h (find_gdb_breakpoint_at): New prototype.
4114 (clear_gdb_breakpoint_conditions): Likewise.
4115 (add_breakpoint_condition): Likewise.
4116 (gdb_condition_true_at_breakpoint): Likewise.
4117
4118 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
4119 (need_step_over_p): Take target-side breakpoint condition into
4120 consideration.
4121
5e1dc496
LM
41222012-02-24 Luis Machado <lgustavo@codesourcery>
4123
4124 * server.h: Include tracepoint.h.
4125 (agent_mem_read, agent_get_trace_state_variable_value,
4126 agent_set_trace_state_variable_value,
4127 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
4128 get_set_tsv_func_addr): New prototypes.
4129
4130 * ax.h: New include file.
4131 * ax.c: New source file.
4132
4133 * tracepoint.c: Include ax.h.
4134 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
4135 agent_expr, eval_result_type): Move to ax.h.
4136 (parse_agent_expr): Rename to ...
4137 (gdb_parse_agent_expr): ... this, make it non-static and move
4138 to ax.h.
4139 (unparse_agent_expr) Rename to ...
4140 (gdb_unparse_agent_expr): ... this, make it non-static and move
4141 to ax.h.
4142 (eval_agent_expr): Rename to ...
4143 (eval_tracepoint_agent_expr): ... this.
4144 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
4145 forward declarations.
4146 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
4147 (agent_get_trace_state_variable_value): New function.
4148 (agent_set_trace_state_variable_value): New function.
4149 (cmd_qtdp): Call gdb_parse_agent_expr (...).
4150 (response_tracepoint): Call gdb_unparse_agent_expr (...).
4151 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
4152 (condition_true_at_tracepoint): Likewise.
4153 (parse_agent_expr): Rename to ...
4154 (gdb_parse_agent_expr): ... this and move to ax.c.
4155 (unparse_agent_expr): Rename to ...
4156 (gdb_unparse_agent_expr): ... this and move to ax.c.
4157 (gdb_agent_op_name): Move to ax.c.
4158 (eval_agent_expr): Rename to ...
4159 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
4160 and move to ax.c.
4161 (eval_tracepoint_agent_expr): New function.
4162 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 4163 non-static.
5e1dc496
LM
4164 (current_insn_ptr, emit_error, struct bytecode_address): Move to
4165 ax.c.
4166 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
4167 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
4168 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
4169 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
4170 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
4171 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
4172 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
4173 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
4174 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
4175 (compile_bytecodes): Remove forward declaration.
4176 (is_goto_target): Move to ax.c.
4177 (compile_bytecodes): Move to ax.c and call
4178 agent_get_trace_state_variable_value (...) and
4179 agent_set_trace_state_variable_value (...).
4180
4181 * Makefile.in: Update ax.c and IPA dependencies.
4182
277e4e52
PA
41832012-02-24 Pedro Alves <palves@redhat.com>
4184
4185 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
4186 (cmd_bigqtbuffer_circular): ... this. Only handle
4187 'QTBuffer:circular:'.
4188 (handle_tracepoint_general_set): Adjust.
4189
bf4c19f7
YQ
41902012-02-16 Yao Qi <yao@codesourcery.com>
4191
4192 * inferiors.c: Move code to ...
4193 * dll.c: .... here. New.
4194 * server.h: Declare clear_dlls.
4195 * Makefile.in (SFILES): Add dll.c.
4196 (OBS): Add dll.o
4197 (dll.o): New rule.
4198
d73f2619
YQ
41992012-02-11 Yao Qi <yao@codesourcery.com>
4200
4201 * server.c: (handle_monitor_command): Add a new parameter
4202 `own_buf'.
4203 (handle_query): Update caller.
4204
f8255c2a
JB
42052012-02-09 Joel Brobecker <brobecker@adacore.com>
4206
4207 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
4208 * configure, config.in: Regenerate.
4209 * hostio.c: Provide an alternate implementation if HAVE_READLINK
4210 is not defined.
4211
da84f473
PA
42122012-02-02 Pedro Alves <palves@redhat.com>
4213
4214 Try SIGKILL first, then PTRACE_KILL.
4215 * linux-low.c (linux_kill_one_lwp): New.
4216 (linux_kill_one_lwp): Rename to ...
4217 (kill_one_lwp_callback): ... this. Use the new
4218 linux_kill_one_lwp.
4219
e886a173
PA
42202012-02-02 Pedro Alves <palves@redhat.com>
4221
4222 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
4223 inferior.
4224
be07f1a2
PA
42252012-01-27 Pedro Alves <palves@redhat.com>
4226
4227 * linux-low.c (linux_child_pid_to_exec_file): Delete.
4228 (elf_64_file_p): Make static.
4229 (linux_pid_exe_is_elf_64_file): New.
4230 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
4231 Delete declarations.
4232 (linux_pid_exe_is_elf_64_file): Declare.
4233 * linux-x86-low.c (x86_arch_setup): Use
4234 linux_pid_exe_is_elf_64_file.
4235
d8301ad1
JK
42362012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4237
4238 * linux-low.c (linux_wait_for_event_1): Rename to ...
4239 (linux_wait_for_event): ... here and merge it with former
4240 linux_wait_for_event - new variable wait_ptid, use it.
4241 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
4242
01b17894
PA
42432012-01-23 Pedro Alves <palves@redhat.com>
4244
4245 * server.c (main): Avoid yet another case of infinite loop while
4246 detaching/killing after a longjmp.
4247
e825046f
JK
42482012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4249
4250 Code cleanup.
4251 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
4252
b9e7b9c3
UW
42532012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
4254
4255 * hostio.c (handle_readlink): New function.
4256 (handle_vFile): Call it to handle "vFile:readlink" packets.
4257
901f9912
UW
42582012-01-20 Pedro Alves <palves@redhat.com>
4259 Ulrich Weigand <ulrich.weigand@linaro.org>
4260
4261 * server.c (handle_v_requests): Only support vAttach and vRun to
4262 start multiple processes when in extended protocol mode.
4263
fc1ab1a0
PA
42642012-01-17 Pedro Alves <palves@redhat.com>
4265
4266 * tracepoint.c (initialize_tracepoint): Use mmap instead of
4267 memalign plus mprotect to allocate the scratch buffer.
4268
7d5d4e98
PA
42692012-01-13 Pedro Alves <palves@redhat.com>
4270
4271 * server.c (attach_inferior): Clear `cont_thread'.
4272
f128d5e9
PA
42732012-01-13 Pedro Alves <palves@redhat.com>
4274
4275 * server.c (main): Avoid infinite loop while detaching/killing
4276 after a longjmp.
4277
06db92f0
DE
42782012-01-09 Doug Evans <dje@google.com>
4279
4280 * server.c (start_inferior): Set last_ptid in --wrapper case.
4281
32d92999
YQ
42822012-01-06 Yao Qi <yao@codesourcery.com>
4283
4284 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
4285 defined.
4286 [IN_PROCESS_AGENT] (debug_agent): New global variable.
4287
5e0a92a9
YQ
42882012-01-04 Yao Qi <yao@codesourcery.com>
4289
4290 * tracepoint.c (cmd_qtdp): Print debug message
4291 for static tracepoint.
4292
ae639e8c
YQ
42932012-01-04 Yao Qi <yao@codesourcery.com>
4294
4295 * tracepoint.c (trace_vdebug): Differentiate debug message
4296 between gdbserver and IPA.
4297
f72429c5
YQ
42982012-01-03 Yao Qi <yao@codesourcery.com>
4299
4300 * tracepoint.c (tracepoint_was_hit): Don't collect for
4301 static tracepoint.
4302
12c3e59c
JB
43032012-01-02 Joel Brobecker <brobecker@adacore.com>
4304
4305 * terminal.h: Reformat copyright header.
4306
67827812
JB
43072012-01-02 Joel Brobecker <brobecker@adacore.com>
4308
4309 * server.c (gdbserver_version): Update copyright year.
4310 * gdbreplay.c (gdbreplay_version): Likewise.
4311
3e52c33d
JK
43122011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
4313
4314 * linux-low.c (linux_create_inferior): Put empty if clause for write.
4315
4316 Revert:
4317 2011-12-18 Hui Zhu <teawater@gmail.com>
4318 * linux-low.c (linux_create_inferior): Save return value to ret.
4319
66f1260e
HZ
43202011-12-18 Hui Zhu <teawater@gmail.com>
4321
4322 * linux-low.c (linux_create_inferior): Save return value to ret.
4323
e77616d7
DE
43242011-12-16 Doug Evans <dje@google.com>
4325
e7b06c57
DE
4326 * linux-low.c (linux_create_inferior): If stdio connection,
4327 redirect stdin from /dev/null, stdout to stderr.
4328 * remote-utils.c (remote_is_stdio): New static global.
4329 (remote_connection_is_stdio): New function.
4330 (remote_prepare): Handle stdio connection.
4331 (remote_open): Ditto.
4332 (remote_close): Don't close stdin for stdio connections.
4333 (read_prim,write_prim): New functions. Replace all calls to
4334 read/write to these.
4335 * server.c (main): Watch for "-" argument. Move call to
4336 remote_prepare before start_inferior.
4337 * server.h (STDIO_CONNECTION_NAME): New macro.
4338 (remote_connection_is_stdio): Declare.
4339
e77616d7
DE
4340 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
4341 in debugging output.
4342
82067193
YQ
43432011-12-15 Yao Qi <yao@codesourcery.com>
4344
4345 * tracepoint.c: Include sys/syscall.h.
4346 (gdb_ust_thread): Remove preprocessor conditional.
4347
82bfbe7e
PA
43482011-12-14 Pedro Alves <pedro@codesourcery.com>
4349
4350 * linux-low.c (linux_detach_one_lwp): Call
4351 the_low_target.prepare_to_resume before detaching.
4352
712c6575
YQ
43532011-12-14 Yao Qi <yao@codesourcery.com>
4354
4355 * tracepoint.c (gdb_ust_thread): Don't ignore return value
4356 of write.
4357
d54d1edf
YQ
43582011-12-14 Yao Qi <yao@codesourcery.com>
4359
4360 * i386-low.c (i386_low_stopped_data_address): Initialize local
4361 variable `control'.
4362
6210a125
PA
43632011-12-13 Pedro Alves <pedro@codesourcery.com>
4364
4365 PR remote/13492
4366
4367 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
4368 DR_CONTROL unless necessary. Extend comments.
4369 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
4370 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
4371
2ece8244
YQ
43722011-12-13 Yao Qi <yao@codesourcery.com>
4373
4374 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
4375 macros.
4376 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
4377
784867a5
JK
43782011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
4379
4380 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
4381 Print new debug message for such case.
4382
6bf36717
JK
43832011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4384
4385 Fix overlapping memcpy.
4386 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
4387 the read_inferior_memory transfer.
4388 (delete_fast_tracepoint_jump): New variable buf. Use it for the
4389 write_inferior_memory transfer.
4390 (set_fast_tracepoint_jump): New variable buf. Use it for the
4391 read_inferior_memory and write_inferior_memory transfers.
4392 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
4393 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
4394 Use it for the write_inferior_memory transfer.
4395 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
4396 buffers.
4397
50275556
MR
43982011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4399
4400 * linux-low.c (fetch_register, store_register): Make code
4401 consistent, fix formatting.
4402
7325beb4
MR
44032011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4404
4405 * linux-low.c (usr_store_inferior_registers): Factor out code
4406 to handle individual registers into...
4407 (store_register): ... this new function.
4408
c642a434
UW
44092011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
4410
4411 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
4412 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
4413 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
4414 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
4415 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
4416 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
4417 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
4418 (srv_xmlfiles): Add new XML files.
4419
4420 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
4421 and <sys/uio.h>.
4422 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
4423 (init_registers_s390_linux32v1): Add prototype.
4424 (init_registers_s390_linux32v2): Likewise.
4425 (init_registers_s390_linux64v1): Likewise.
4426 (init_registers_s390_linux64v2): Likewise.
4427 (init_registers_s390x_linux64v1): Likewise.
4428 (init_registers_s390x_linux64v2): Likewise.
4429 (s390_num_regs): Increment to 52.
4430 (s390_regmap): Add orig_r2 register.
4431 (s390_num_regs_3264): Increment to 68.
4432 (s390_regmap_3264): Add orig_r2 register.
4433 (s390_collect_ptrace_register): Handle orig_r2 register.
4434 (s390_supply_ptrace_register): Likewise.
4435 (s390_fill_last_break): New function.
4436 (s390_store_last_break): Likewise.
4437 (s390_fill_system_call): New function.
4438 (s390_store_system_call): Likewise.
4439 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
4440 register sets.
4441 (s390_check_regset): New function.
4442 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
4443 NT_S390_SYSTEM_CALL regsets and use appropriate description.
4444 Update target_regsets for available register sets.
4445
2268b414
JK
44462011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
4447 Jan Kratochvil <jan.kratochvil@redhat.com>
4448
4449 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
4450 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
4451 New.
4452 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
4453 * linux-low.h (struct process_info_private): New member r_debug.
4454 * server.c (handle_qxfer_libraries): Call
4455 the_target->qxfer_libraries_svr4.
4456 (handle_qxfer_libraries_svr4): New function.
4457 (qxfer_packets): New entry "libraries-svr4".
4458 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
4459 * target.h (struct target_ops): New member qxfer_libraries_svr4.
4460 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
4461 PACKET_qXfer_libraries_svr4.
4462
d6db1fab
UW
44632011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
4464
4465 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
4466 PSW address/mask between 8-byte and 16-byte formats.
4467 (s390_supply_ptrace_register): Likewise.
4468 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
4469 basic addressing mode bit.
4470
242f5f1c
SS
44712011-11-24 Stan Shebs <stan@codesourcery.com>
4472
4473 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
4474
f196051f
SS
44752011-11-17 Stan Shebs <stan@codesourcery.com>
4476
4477 * tracepoint.c (struct tracepoint): New field traceframe_usage.
4478 (tracing_start_time): New global.
4479 (tracing_stop_time): New global.
4480 (tracing_user_name): New global.
4481 (tracing_notes): New global.
4482 (tracing_stop_note): New global.
4483 (cmd_qtstart): Set traceframe_usage, start_time.
4484 (stop_tracing): Set stop_time.
4485 (cmd_qtstatus): Report additional status.
4486 (cmd_qtp): New function.
4487 (handle_tracepoint_query): Call it.
4488 (cmd_qtnotes): New function.
4489 (handle_tracepoint_general_set): Call it.
4490 (get_timestamp): Rename from tsv_get_timestamp.
4491
405f8e94
SS
44922011-11-14 Stan Shebs <stan@codesourcery.com>
4493 Kwok Cheung Yeung <kcy@codesourcery.com>
4494
4495 * linux-x86-low.c (small_jump_insn): New.
4496 (i386_install_fast_tracepoint_jump_pad): Add arguments for
4497 trampoline and error message, build a trampoline and issue a small
4498 jump instruction to it.
4499 (x86_install_fast_tracepoint_jump_pad): Add arguments for
4500 trampoline and error message.
4501 (x86_get_min_fast_tracepoint_insn_len): New.
4502 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
4503 * linux-low.h (struct linux_target_ops): Add arguments to
4504 install_fast_tracepoint_jump_pad operation, add new operation.
4505 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
4506 arguments.
4507 (linux_get_min_fast_tracepoint_insn_len): New function.
4508 (linux_target_op): Add new operation.
4509 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
4510 (gdb_trampoline_buffer_end): Ditto.
4511 (gdb_trampoline_buffer_error): Ditto.
4512 (struct ipa_sym_addresses): Add fields for new IPA variables.
4513 (symbol_list): Add entries for new IPA variables.
4514 (struct tracepoint): Add fields to hold the address range of the
4515 trampoline used by the tracepoint.
4516 (trampoline_buffer_head): New static variable.
4517 (trampoline_buffer_tail): Ditto.
4518 (claim_trampoline_space): New function.
4519 (have_fast_tracepoint_trampoline_buffer): New function.
4520 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
4521 structure.
4522 (install_fast_tracepoint): Ditto, also add error buffer argument.
4523 (cmd_qtminftpilen): New function.
4524 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
4525 (fast_tracepoint_from_trampoline_address): New function.
4526 (fast_tracepoint_collecting): Handle trampoline as part of jump
4527 pad space.
4528 (set_trampoline_buffer_space): New function.
4529 (initialize_tracepoint): Initialize new IPA variables.
4530 * target.h (struct target_ops): Add arguments to
4531 install_fast_tracepoint_jump_pad operation, add new
4532 get_min_fast_tracepoint_insn_len operation.
4533 (target_get_min_fast_tracepoint_insn_len): New.
4534 (install_fast_tracepoint_jump_pad): Add arguments.
4535 * server.h (IPA_BUFSIZ): Define.
4536 * linux-i386-ipa.c: Include extra header files.
4537 (initialize_fast_tracepoint_trampoline_buffer): New function.
4538 (initialize_low_tracepoint): Call it.
4539 * server.h (set_trampoline_buffer_space): Declare.
4540 (claim_trampoline_space): Ditto.
4541 (have_fast_tracepoint_trampoline_buffer): Ditto.
4542
1e4d1764
YQ
45432011-11-14 Yao Qi <yao@codesourcery.com>
4544
4545 * server.c (handle_query): Handle InstallInTrace for qSupported.
4546 * tracepoint.c (add_tracepoint): Sort list.
4547 (install_tracepoint, download_tracepoint): New.
4548 (cmd_qtdp): Call them to install and download tracepoints.
4549 (sort_tracepoints): Removed.
4550 (cmd_qtstart): Update.
4551
5c73ff4e
YQ
45522011-11-14 Yao Qi <yao@codesourcery.com>
4553
4554 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
4555 * mem-break.h: Declare.
4556 * tracepoint.c (cmd_qtstart): Move some code to ...
4557 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
4558 New.
4559 (download_tracepoints): Move some code to ...
4560 (download_tracepoint_1): ... here. New.
4561
86a30030
YQ
45622011-11-08 Yao Qi <yao@codesourcery.com>
4563
4564 * remote-utils.c (relocate_instruction): A comment fix.
4565
8d26e50c
JB
45662011-11-07 Joel Brobecker <brobecker@adacore.com>
4567
4568 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
4569 (i386_dr_low_get_control, i386_dr_low_get_status): Use
4570 dr_status_mirror and dr_control_mirror from debug_reg_state.
4571 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
4572 (i386_initial_stuff): Remove use of deleted globals.
4573 (i386_get_thread_context, i386_set_thread_context,
4574 i386_thread_added): Use dr_status_mirror and dr_control_mirror
4575 from debug_reg_state.
4576
a59306a3
YQ
45772011-11-05 Yao Qi <yao@codesourcery.com>
4578
4579 * tracepoint.c (gdb_collect): Loop over tracepoints of same
4580 address as TPOINT's.
4581
3065dfb6
SS
45822011-11-02 Stan Shebs <stan@codesourcery.com>
4583
4584 * tracepoint.c (agent_mem_read_string): New function.
4585 (eval_agent_expr): Call it for tracenz.
4586 * server.c (handle_query): Report support for tracenz.
4587
fd0d8c7c
YQ
45882011-11-02 Yao Qi <yao@codesourcery.com>
4589
4590 * tracepoint.c (cmd_qtstart): Remove unused local variables.
4591
609086b1
YQ
45922011-11-02 Yao Qi <yao@codesourcery.com>
4593
4594 * target.h: Fix a typo in comment.
4595
b9fd1791
PA
45962011-10-31 Pedro Alves <pedro@codesourcery.com>
4597
4598 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
4599 clobber the breakpoints' shadows with fast tracepoint jumps.
4600 * mem-break.h (check_mem_write): Add `myaddr' parameter.
4601 * target.c (write_inferior_memory): Also pass MYADDR down to
4602 check_mem_write.
4603
03583c20
UW
46042011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
4605
4606 * configure.ac: Check support for personality routine.
4607 * configure: Regenerate.
4608 * config.in: Likewise.
4609 * linux-low.c: Include <sys/personality.h>.
4610 Define ADDR_NO_RANDOMIZE if necessary.
4611 (linux_create_inferior): Disable address space randomization when
4612 forking inferior, if requested.
4613 (linux_supports_disable_randomization): New function.
4614 (linux_target_ops): Install it.
4615 * server.h (disable_randomization): Declare.
4616 * server.c (disable_randomization): New global variable.
4617 (handle_general_set): Handle QDisableRandomization.
4618 (handle_query): Likewise for qSupported.
4619 (main): Support --disable-randomization and --no-disable-randomization
4620 command line arguments.
4621 * target.h (struct target_ops): Add supports_disable_randomization.
4622 (target_supports_disable_randomization): New macro.
4623
723b724b
MF
46242011-09-29 Mike Frysinger <vapier@gentoo.org>
4625
4626 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
4627 ifdef check.
4628 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
4629 [!PT_GETDSBT] (target_loadmap): New definition.
4630 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
4631 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
4632 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
4633 and PT_GETDSBT to LINUX_LOADMAP.
4634 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
4635 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
4636
55329a5c 46372011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
4638
4639 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
4640 (arm_linux_hwbp_cap): New static variable.
4641 (arm_linux_get_hwbp_cap): Replace by ...
4642 (arm_linux_init_hwbp_cap): ... this new function.
4643 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
4644 (arm_linux_get_hw_watchpoint_count): Likewise.
4645 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4646 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
4647 (arm_prepare_to_resume): Use perror_with_name instead of error.
4648
55329a5c 46492011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
4650
4651 * linux-arm-low.c: Include <signal.h>.
4652 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
4653 (struct arm_linux_hwbp_cap): New data type.
4654 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
4655 (struct arm_linux_hw_breakpoint): New data type.
4656 (MAX_BPTS, MAX_WPTS): Define.
4657 (struct arch_process_info, struct arch_lwp_info): New data types.
4658 (arm_linux_get_hwbp_cap): New function.
4659 (arm_linux_get_hw_breakpoint_count): Likewise.
4660 (arm_linux_get_hw_watchpoint_count): Likewise.
4661 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4662 (arm_hwbp_control_initialize): Likewise.
4663 (arm_hwbp_control_is_enabled): Likewise.
4664 (arm_hwbp_control_is_initialized): Likewise.
4665 (arm_hwbp_control_disable): Likewise.
4666 (arm_linux_hw_breakpoint_equal): Likewise.
4667 (arm_linux_hw_point_initialize): Likewise.
4668 (struct update_registers_data): New data structure.
4669 (update_registers_callback: New function.
4670 (arm_insert_point): Likewise.
4671 (arm_remove_point): Likewise.
4672 (arm_stopped_by_watchpoint): Likewise.
4673 (arm_stopped_data_address): Likewise.
4674 (arm_new_process): Likewise.
4675 (arm_new_thread): Likewise.
4676 (arm_prepare_to_resume): Likewise.
4677 (the_low_target): Register arm_insert_point, arm_remove_point,
4678 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
4679 arm_new_thread, and arm_prepare_to_resume.
4680
6b9801d4
SS
46812011-09-15 Stan Shebs <stan@codesourcery.com>
4682
4683 * server.h (struct emit_ops): Add compare-goto fields.
4684 * tracepoint.c (gdb_agent_op_sizes): New table.
4685 (emit_eq_goto): New function.
4686 (emit_ne_goto): New function.
4687 (emit_lt_goto): New function.
4688 (emit_le_goto): New function.
4689 (emit_gt_goto): New function.
4690 (emit_ge_goto): New function.
4691 (is_goto_target): New function.
4692 (compile_bytecodes): Recognize special cases of compare-goto
4693 combinations and call specialized emitters for them.
4694 * linux-x86-low.c (amd64_emit_eq_goto): New function.
4695 (amd64_emit_ne_goto): New function.
4696 (amd64_emit_lt_goto): New function.
4697 (amd64_emit_le_goto): New function.
4698 (amd64_emit_gt_goto): New function.
4699 (amd64_emit_ge_goto): New function.
4700 (amd64_emit_ops): Add the new functions.
4701 (i386_emit_eq_goto): New function.
4702 (i386_emit_ne_goto): New function.
4703 (i386_emit_lt_goto): New function.
4704 (i386_emit_le_goto): New function.
4705 (i386_emit_gt_goto): New function.
4706 (i386_emit_ge_goto): New function.
4707 (i386_emit_ops): Add the new functions.
4708
bf15cbda
SS
47092011-09-08 Stan Shebs <stan@codesourcery.com>
4710
4711 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
4712 (i386_emit_epilogue): Restore %ebx.
4713
943ca1dd
JZ
47142011-08-31 Jie Zhang <jzhang918@gmail.com>
4715
4716 * server.c (step_thread): Remove definition.
4717 (process_serial_event): Don't handle Hs.
4718 * server.h (step_thread): Remove declaration.
4719 * target.c (set_desired_inferior): Remove use of step_thread.
4720
e3deef73
LM
47212011-08-24 Luis Machado <lgustavo@codesourcery.com>
4722
4723 * linux-low.c: Include linux-procfs.h.
4724 (linux_attach_lwp_1): Update comments.
4725 (linux_attach): Scan for existing threads when attaching to a
4726 process that is the tgid.
4727 * Makefile.in: Update dependencies.
4728
13da1c97
LM
47292011-08-24 Luis Machado <lgustavo@codesourcery.com>
4730
4731 * configure.srv: Add linux-procfs.o dependencies.
4732
881127c9
YQ
47332011-08-14 Yao Qi <yao@codesourcery.com>
4734
4735 * target.h (struct target_ops): Fix indent.
4736 * win32-low.c (win32_target_ops): Fix comment.
4737
58dbd541
YQ
47382011-08-14 Andrew Jenner <andrew@codesourcery.com>
4739 Yao Qi <yao@codesourcery.com>
4740
4741 * Makefile.in (clean): Remove tic6x-*.c files.
4742 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
4743 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
4744 (tic6x-c64xp-linux.c): Likewise.
4745 * configure.srv: Add support for tic6x-*-uclinux.
4746 * linux-tic6x-low.c: New.
4747 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
4748
78d85199
YQ
47492011-08-14 Andrew Stubbs <ams@codesourcery.com>
4750 Yao Qi <yao@codesourcery.com>
4751
4752 * target.h (struct target_ops): Add read_loadmap.
4753 * linux-low.c (struct target_loadseg): New type.
4754 (struct target_loadmap): New type.
4755 (linux_read_loadmap): New function.
4756 (linux_target_ops): Add linux_read_loadmap.
4757 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
4758 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
4759 to NULL.
78d85199 4760
a959a88d
EZ
47612011-08-05 Eli Zaretskii <eliz@gnu.org>
4762
4763 * win32-low.c: Include <stdint.h>.
4764
1ced966e
PA
47652011-07-22 Pedro Alves <pedro@codesourcery.com>
4766
4767 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
4768 to the inferior here.
4769 (i386_remove_aligned_watchpoint): Ditto.
4770 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
4771 fit part of the watchpoint in the debug registers.
4772 (i386_update_inferior_debug_regs): New.
4773 (i386_low_insert_watchpoint): Work on a local mirror of the debug
4774 registers, and only update the inferior on success.
4775 (i386_low_remove_watchpoint): Ditto.
4776
d26e3629
KY
47772011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
4778
4779 * linux-low.c (compare_ints, unique, list_threads, show_process,
4780 linux_core_of_thread): Delete.
4781 (linux_target_ops): Change linux_core_of_thread to
4782 linux_common_core_of_thread.
4783 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
4784 * utils.c (malloc_failure): Change type of argument.
4785 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
4786 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
4787 common/linux-osdata.c, common/ptid.c and common/buffer.c.
4788 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
4789 (IPA_OBJS): Add common-utils-ipa.o.
4790 (ptid_h, linux_osdata_h): New macros.
4791 (server_h): Add common/common-utils.h, common/xml-utils.h,
4792 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
4793 common/ptid.h.
4794 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
4795 ptid.o, buffer.o): New rules.
4796 (linux-low.o): Add common/linux-osdata.h as a dependency.
4797 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
4798 * configure.ac: Add AC_HEADER_DIRENT check.
4799 * config.in: Regenerate.
4800 * configure: Regenerate.
4801 * remote-utils.c (xml_escape_text): Delete.
4802 (buffer_grow, buffer_free, buffer_init, buffer_finish,
4803 buffer_xml_printf): Move to common/buffer.c.
4804 * server.c (main): Remove call to initialize_inferiors.
4805 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
4806 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
4807 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
4808 internal_error, gdb_assert, gdb_assert_fail): Delete.
4809 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
4810 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
4811 common/buffer.h.
4812 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
4813 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
4814 initialize_inferiors): Delete.
4815
2275a1a7
PA
48162011-07-20 Pedro Alves <pedro@codesourcery.com>
4817
4818 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
4819 symbol error.
4820
0a5b1e09
PA
48212011-05-31 Pedro Alves <pedro@codesourcery.com>
4822
4823 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
4824 assertion.
4825 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
4826
6938fd34
YQ
48272011-05-26 Yao Qi <yao@codesourcery.com>
4828
4829 * Makefile.in (thread-db.o): Track dependence to
4830 common/gdb_thread_db.h.
4831 * thread-db.c: include gdb_thread_db.h from right place.
4832
b481f9e0
TT
48332011-05-16 Adrian Cornish <gnu@bluedreamer.com>
4834
4835 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
4836 __FILE__ and __LINE__ to internal_error.
4837
98a5dd13
DE
48382011-05-13 Doug Evans <dje@google.com>
4839
4840 * thread-db.c (try_thread_db_load_from_sdir): New function.
4841 (try_thread_db_load_from_dir): New function.
4842 (thread_db_load_search): Handle $sdir, ignore $pdir.
4843 Remove trying of system directories if search of
4844 libthread-db-search-path fails, that is now done via $sdir.
4845
d248b706
KY
48462011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
4847
4848 * server.c (handle_query): Add EnableDisableTracepoints to the list
4849 of supported features.
43aaf8b6 4850 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 4851 tracepoints.
43aaf8b6
PA
4852 (cmd_qtenable_disable): New.
4853 (cmd_qtstart): Install tracepoints even if disabled.
4854 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
4855 receiving a QTEnable or QTDisable packet.
4856 (gdb_collect): Skip data collection if fast tracepoint is disabled.
4857 (ust_marker_to_static_tracepoint): Do not ignore disabled static
4858 tracepoints.
4859 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 4860
84e578fb
DE
48612011-05-10 Doug Evans <dje@google.com>
4862
4863 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
4864
71f55dd8
DE
48652011-05-04 Doug Evans <dje@google.com>
4866
4867 * linux-low.c (linux_join): Skip process lookup.
4868 * spu-low.c (spu_join): Ditto.
4869 * server.c (join_inferiors_callback): Delete.
4870 (process_serial_event): For 'D' packet (detach) call join_inferior
4871 directly.
4872
4d393d60
JM
48732011-05-04 Joseph Myers <joseph@codesourcery.com>
4874
4875 * README: Don't mention xscale*-*-linux*.
4876 * configure.srv (xscale*-*-linux*): Don't handle target.
4877
b00ad6ff
NF
48782011-04-27 Nathan Froyd <froydnj@codesourcery.com>
4879
4880 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
4881 casting pointers.
4882 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
4883 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
4884 (i386_emit_void_call_2): Likewise.
4885
af96c192
YQ
48862011-04-26 Yao Qi <yao@codesourcery.com>
4887
43aaf8b6
PA
4888 * linux-low.c: Move common macros to linux-ptrace.h.
4889 Include linux-ptrace.h.
af96c192
YQ
4890 * Makefile.in (linux_ptrace_h): New.
4891 (linux-low.o): Depends on linux-ptrace.h.
4892
03f2bd59
JK
48932011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
4894
4895 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
4896 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
4897 (remote_prepare): New function with most of the TCP code from ...
4898 (remote_open): ... here. Detect PORT here unconditionally. Move also
4899 setting transport_is_reliable.
4900 * server.c (run_once): New variable.
4901 (gdbserver_usage): Document it.
4902 (main): Set run_once for `--once'. Call remote_prepare. Exit after
4903 the first run if RUN_ONCE.
4904 * server.h (run_once, remote_prepare): New declarations.
4905
7a9dd1b2
TT
49062011-04-19 Tom Tromey <tromey@redhat.com>
4907
4908 * win32-low.c (handle_load_dll): Remove duplicate "the".
4909
81239425
PM
49102011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
4911
4912 Remove support for old Cygwin 1.5 versions.
4913 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
4914 function to avoid warning.
4915 (win32_add_one_solib): Use cygwin_conv_path function to avoid
4916 warning.
4917
9e0627f1
PM
49182011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
4919
4920 * gdbserver/server.h (Macro _): Define it if not available.
4921
588eebee
MS
49222011-03-14 Michael Snyder <msnyder@vmware.com>
4923
348af9f7 4924 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 4925
43f70d4c
JB
49262011-03-10 Joel Brobecker <brobecker@adacore.com>
4927
4928 * Makefile.in (maintainer-clean realclean distclean): Remove
4929 "make ... subdir_do" command.
4930
348af9f7
MS
49312011-03-10 Michael Snyder <msnyder@vmware.com>
4932
4933 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
4934
4935 * server.c (handle_v_run): Free alloced buffer on early return.
4936
e637a4f5
YQ
49372011-03-09 Yao Qi <yao@codesourcery.com>
4938
4939 Revert:
4940 2011-03-04 Yao Qi <yao@codesourcery.com>
4941
4942 * Makefile.in: Remove GNU make feature --directory.
4943
4944 2011-03-05 Yao Qi <yao@codesourcery.com>
4945
4946 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
4947 (subdir_do): New make target. Copied from gdb/Makefile.
4948 (maintainer-clean, realclean, distclean, clean): Call corresponding
4949 make targets in common/Makefile.
4950
4951 2011-02-11 Yao Qi <yao@codesourcery.com>
4952
4953 * configure.ac: Call AC_PROG_RANLIB.
4954 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
4955 * configure: Regenerate.
4956
e6edda56
JK
49572011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4958
4959 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
4960
e5141119
JB
49612011-03-06 Yao Qi <yao@codesourcery.com>
4962
4963 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
4964
64794aa4
JB
49652011-03-05 Yao Qi <yao@codesourcery.com>
4966
4967 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
4968 (subdir_do): New make target. Copied from gdb/Makefile.
4969 (maintainer-clean, realclean, distclean, clean): Call corresponding
4970 make targets in common/Makefile.
4971
7a762829
YQ
49722011-03-04 Yao Qi <yao@codesourcery.com>
4973
4974 * Makefile.in: Remove GNU make feature --directory.
4975
348af9f7
MS
49762011-03-04 Michael Snyder <msnyder@vmware.com>
4977
4978 * server.c (queue_stop_reply): Call xmalloc not malloc.
4979
49802011-03-02 Michael Snyder <msnyder@vmware.com>
4981
4982 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
4983
9f72fee2
MS
49842011-02-28 Michael Snyder <msnyder@vmware.com>
4985
588eebee
MS
4986 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
4987 (cmd_qtframe): Ditto.
4988 (cmd_qtbuffer): Ditto.
4989 (cmd_bigqtbuffer): Ditto.
4990
9f72fee2
MS
4991 * utils.c (decimal2str): Initialize 'width' to nine, then
4992 don't mess with it.
4993
8040bd49
UW
49942011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
4995
4996 * hostio.c (require_data): Free *data, not data.
4997
7e52cbd0
JK
49982011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4999
5000 * hostio.c (require_data): Use free, not xfree.
5001
9130f83e
MS
50022011-02-27 Michael Snyder <msnyder@vmware.com>
5003
4b812f4e
MS
5004 * server.c (handle_query): Discard unused value.
5005
9130f83e
MS
5006 * hostio.c (require_data): Free malloc memory before returning
5007 error.
5008
69d37113
MS
50092011-02-26 Michael Snyder <msnyder@vmware.com>
5010
5011 * linux-low.c (list_threads): Call closedir for dirent.
5012
35f5825a
MS
50132011-02-27 Michael Snyder <msnyder@vmware.com>
5014
2a589cef
MS
5015 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5016 a case statement falls through.
5017
0adea5f7
MS
5018 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5019
35f5825a
MS
5020 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
5021 in comparison.
5022
238f1c74
MS
50232011-02-26 Michael Snyder <msnyder@vmware.com>
5024
5025 * utils.c (decimal2str): Eliminate dead code and dead param.
5026 (pulongest): Drop dead param from call to decimal2str.
5027 (plongest): Ditto.
5028
633ff500
JB
50292011-02-24 Joel Brobecker <brobecker@adacore.com>
5030
5031 Revert the following patch (not approved yet):
5032 2011-02-21 Hui Zhu <teawater@gmail.com>
5033 * tracepoint.c (tp_printf): New function.
5034 (eval_agent_expr): Handle gdb_agent_op_printf.
5035
f9c6ff72
HZ
50362011-02-21 Hui Zhu <teawater@gmail.com>
5037
5038 * tracepoint.c (tp_printf): New function.
5039 (eval_agent_expr): Handle gdb_agent_op_printf.
5040
94d5e490
TT
50412011-02-18 Tom Tromey <tromey@redhat.com>
5042
5043 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5044 (tracepoint.o): Likewise.
5045 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5046 (gdb_agent_op_names): Likewise.
5047
c7f96d2b
TT
50482011-02-18 Tom Tromey <tromey@redhat.com>
5049
5050 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5051 gdb_agent_op_rot>: New constants.
5052 (gdb_agent_op_names): Add pick and roll.
5053 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5054 cases.
5055
0feedb2c
JK
50562011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5057
5058 * aclocal.m4: Regenerated with aclocal-1.11.1.
5059
b3b9301e
PA
50602011-02-14 Pedro Alves <pedro@codesourcery.com>
5061
5062 * server.c (handle_qxfer_traceframe_info): New.
5063 (qxfer_packets): Register "traceframe-info".
5064 (handle_query): Report support for qXfer:traceframe-info:read+.
5065 * tracepoint.c (match_blocktype): New.
5066 (traceframe_find_block_type): Rename to ...
5067 (traceframe_walk_blocks): ... this. Add callback filter argument,
5068 and use it.
5069 (traceframe_find_block_type): New, reimplemented on top of
5070 traceframe_walk_blocks.
5071 (build_traceframe_info_xml): New.
5072 (traceframe_read_info): New.
5073 * server.h (traceframe_read_info): Declare.
5074
4f3e6fb7
YQ
50752011-02-11 Yao Qi <yao@codesourcery.com>
5076
5077 * configure.ac: Call AC_PROG_RANLIB.
5078 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5079 * configure: Regenerate.
5080
764880b7
PA
50812011-02-07 Pedro Alves <pedro@codesourcery.com>
5082
5083 * server.c (gdb_read_memory): Change return semantics to allow
5084 partial transfers.
5085 (handle_search_memory_1): Adjust.
5086 (process_serial_event) <'m' packet>: Handle partial transfers.
5087 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5088
1c79eb8a
PA
50892011-01-28 Pedro Alves <pedro@codesourcery.com>
5090
5091 * regcache.c (init_register_cache): Initialize
5092 regcache->register_status.
5093 (free_register_cache): Release regcache->register_status.
5094 (regcache_cpy): Copy register_status.
5095 (registers_to_string): Print 'x's for unavailable registers.
5096 (supply_register): Mark the register's status valid or
5097 unavailable, depending on whether a buffer was passed in or not.
5098 (supply_register_zeroed): New.
5099 (supply_regblock): Mark the registers' status valid or
5100 unavailable, depending on whether a buffer was passed in or not.
5101 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5102 (struct regcache): New `register_status' field.
5103 (supply_register_zeroed): Declare.
5104 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5105 supply_register_zeroed, rather than passing a NULL buffer to
5106 supply_register.
5107 * tracepoint.c (fetch_traceframe_registers): Update comment.
5108
85724a0e
PA
51092011-01-28 Pedro Alves <pedro@codesourcery.com>
5110
5111 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
5112 buffer explicit.
5113
d08aafef
PA
51142011-01-25 Pedro Alves <pedro@codesourcery.com>
5115
5116 * server.h (decode_xfer_write): Change prototype.
5117 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
5118 and don't extract the annex here.
5119 * server.c (decode_xfer_read): Remove `annex' parameter,
5120 and don't extract the annex here.
5121 (decode_xfer): New.
5122 (struct qxfer): New.
5123 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
5124 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
5125 (handle_qxfer_statictrace): New functions, abstracted out from
5126 handle_query, and made to use the struct qxfer interface.
5127 (handle_threads_qxfer_proper): Rename to ...
5128 (handle_qxfer_threads_proper): ... this.
5129 (handle_threads_qxfer): Rename to ...
5130 (handle_qxfer_threads): ... this. Adjust.
5131 (qxfer_packets): New array.
5132 (handle_qxfer): New function.
5133 (handle_query): Use handle_qxfer.
5134
493e2a69
MS
51352011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
5136
5137 * gdbreplay.c: Shorten lines of >= 80 columns.
5138 * linux-low.c: Ditto.
5139 * linux-ppc-low.c: Ditto.
5140 * linux-s390-low.c: Ditto.
5141 * linux-sparc-low.c: Ditto.
5142 * linux-x86-low.c: Ditto.
5143 * linux-xtensa-low.c: Ditto.
5144 * mem-break.c: Ditto.
5145 * nto-low.c: Ditto.
5146 * regcache.h: Ditto.
5147 * remote-utils.c: Ditto.
5148 * server.c: Ditto.
5149 * server.h: Ditto.
5150 * thread-db.c: Ditto.
5151 * tracepoint.c: Ditto.
5152 * utils.c: Ditto.
5153 * win32-low.h: Ditto.
5154
44944448
JB
51552011-01-05 Joel Brobecker <brobecker@adacore.com>
5156
5157 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
5158 update.
5159
71ce852c
JB
51602011-01-01 Joel Brobecker <brobecker@adacore.com>
5161
5162 * server.c (gdbserver_version): Update copyright year in version
5163 output.
5164 * gdbreplay.c (gdbreplay_version): Ditto.
5165
eb826dc6
MF
51662010-12-29 Jie Zhang <jie.zhang@analog.com>
5167
5168 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
5169 * linux-bfin-low.c: New file.
5170 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
5171 PT_DATA_ADDR for BFIN targets.
5172 * Makefile.in (SFILES): Add linux-bfin-low.c.
5173 (clean): Remove reg-bfin.c.
5174 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
5175 * README: Mention supported Blackfin targets.
5176
39ab222a
MF
51772010-12-23 Mike Frysinger <vapier@gentoo.org>
5178
5179 * .gitignore: New file.
5180
a1f2ce7d
MF
51812010-11-16 Mike Frysinger <vapier@gentoo.org>
5182
5183 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
5184
f474844c
JZ
51852010-10-22 Jie Zhang <jie@codesourcery.com>
5186
5187 * Makefile.in: Add FLAGS_TO_PASS variable.
5188 (install): Remove dependency of install-only and recursively
5189 invoke make for install-only.
5190
f1048712
DE
51912010-10-04 Doug Evans <dje@google.com>
5192
5193 * Makefile.in (uninstall): Use $(DESTDIR).
5194
b53a1623
PA
51952010-09-24 Pedro Alves <pedro@codesourcery.com>
5196
e6ee044d
PA
5197 PR gdb/11842
5198
b53a1623
PA
5199 * linux-x86-low.c (compat_siginfo_from_siginfo)
5200 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
5201 si_code is < 0. Check for si_code == SI_TIMER before checking for
5202 si_code < 0.
5203
fa1bd1e4
JB
52042010-09-13 Joel Brobecker <brobecker@adacore.com>
5205
5206 * lynx-i386-low.c: New file.
5207 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
5208
47fac8f8
JB
52092010-09-13 Joel Brobecker <brobecker@adacore.com>
5210
5211 * lynx-low.c (ptrace_request_to_str): Remove handling for
5212 request values that have been removed in LynxOS 5.x.
5213
1adfc54d
JB
52142010-09-13 Joel Brobecker <brobecker@adacore.com>
5215
5216 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
5217 <ptrace.h>
5218
c2a66c29
NS
52192010-09-09 Nathan Sidwell <nathan@codesourcery.com>
5220
5221 * configure.ac: Add --enable-inprocess-agent option.
5222 * configure: Rebuilt.
5223
32fcada3
YQ
52242010-09-06 Yao Qi <yao@codesourcery.com>
5225
5226 * linux-low.c (linux_kill): Remove unused variable.
5227 (linux_stabilize_threads): Likewise.
5228 * server.c (start_inferior): Likewise.
5229 (queue_stop_reply_callback): Likewise.
5230 * tracepoint.c (do_action_at_tracepoint): Likewise.
5231
0cccb683
YQ
52322010-09-06 Yao Qi <yao@codesourcery.com>
5233
5234 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
5235 on return.
5236
423ec54c
JK
52372010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5238
5239 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
5240
12ac6819
PA
52412010-09-06 Pedro Alves <pedro@codesourcery.com>
5242
5243 * Makefile.in (install-only): Replace $IPA_DEPFILES with
5244 "$(IPA_DEPFILES)".
5245
8ed54b31
JB
52462010-09-01 Joel Brobecker <brobecker@adacore.com>
5247
5248 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
5249 gdbserver/lynx-ppc-low.c: New files.
5250 * Makefile.in (lynx_low_h): New variable.
5251 (lynx-low.o, lynx-ppc-low.o): New rules.
5252 * configure.ac: On LynxOS, link with -lnetinet.
5253 * configure.srv: Add handling of powerpc-*-lynxos* targets.
5254 * configure: regenerate.
5255
bb0116a4
JB
52562010-09-01 Joel Brobecker <brobecker@adacore.com>
5257
5258 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
5259 * configure.ac: Add check for vasprintf and vsnprintf.
5260 * configure, config.in: Regenerate.
5261 * server.h (vasprintf, vsnprintf): Add conditional declarations.
5262
a778ab81 52632010-09-01 Joel Brobecker <brobecker@adacore.com>
5264
5265 * gdbreplay.c: Move include of alloca.h up, next to include of
5266 malloc.h.
5267 * server.h: Add include of malloc.h.
5268 * mem-break.c: Remove include of malloc.h.
5269 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
5270
8b034a19 52712010-09-01 Joel Brobecker <brobecker@adacore.com>
5272
5273 * Makefile.in (memmem.o): Build with -Wno-error.
5274
52752010-09-01 Joel Brobecker <brobecker@adacore.com>
5276
5277 * utils.c (xsnprintf): Make non-static.
5278 * server.h: Add xsnprintf declaration.
5279 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
5280 replace calls to snprintf by calls to xsnprintf throughout.
5281
52822010-09-01 Joel Brobecker <brobecker@adacore.com>
5283
5284 * configure.ac: Add configure check for alloca.
5285 * configure, config.in: Regenerate.
5286 * server.h: Include alloca.h if it exists.
5287 * gdbreplay.c: Include alloca.h if it exists.
5288
1a981360
PA
52892010-08-28 Pedro Alves <pedro@codesourcery.com>
5290
5291 * linux-low.c (__SIGRTMIN): Define if not already defined.
5292 (linux_create_inferior): Check for __ANDROID__ rather than
5293 __SIGRTMIN.
5294 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
5295 are already deferred.
5296 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
5297 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
5298 stopped and already has a pending signal to report.
5299 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
5300 a pending signal to report or is moving out of a jump pad.
5301 (linux_init_signals): Check for __ANDROID__ rather than
5302 __SIGRTMIN.
5303
b4d51a55
PA
53042010-08-28 Pedro Alves <pedro@codesourcery.com>
5305
5306 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
5307 debug_threads check. Avoid a linear search when not doing debug
5308 output.
5309
ec48365d
PA
53102010-08-27 Pedro Alves <pedro@codesourcery.com>
5311
5312 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
5313 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
5314 (struct file_handler) <fd>: Change type to gdb_fildes_t.
5315 (process_event): Change local fd's type to gdb_fildes_t.
5316 (create_file_handler): Adjust prototype.
5317 (delete_file_handler): Adjust prototype.
5318 (handle_file_event): Adjust prototype. Use pfildes.
5319 (create_file_event): Adjsut prototype.
5320 * remote-utils.c (remote_desc, listen_desc): Change type to
5321 gdb_fildes_t.
5322 * server.h: New gdb_fildes_t typedef.
5323 [USE_WIN32API]: Include winsock2.h.
5324 (delete_file_handler, add_file_handler): Adjust prototypes.
5325 (pfildes): Declare.
5326 * utils.c (pfildes): New.
5327
854d88f0
PA
53282010-08-27 Pedro Alves <pedro@codesourcery.com>
5329
5330 * configure.ac (build_warnings): Add -Wno-char-subscripts.
5331 * configure: Regenerate.
5332
0146f85b
PA
53332010-08-27 Pedro Alves <pedro@codesourcery.com>
5334
5335 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
5336 (linux_done_accessing_memory): ... this.
5337 (linux_target_ops): Adjust.
5338 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
5339 * nto-low.c (nto_target_ops): Adjust comment.
5340 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
5341 * spu-low.c (spu_target_ops): Adjust comment.
5342 * target.h (target_ops): Rename unprepare_to_access_memory field
5343 to done_accessing_memory.
5344 (unprepare_to_access_memory): Rename to ...
5345 (done_accessing_memory): ... this.
5346
90d74c30
PA
53472010-08-26 Pedro Alves <pedro@codesourcery.com>
5348
5349 * linux-low.c (linux_prepare_to_access_memory): New.
5350 (linux_unprepare_to_access_memory): New.
5351 (linux_target_ops): Install them.
5352 * server.c (read_memory): Rename to ...
5353 (gdb_read_memory): ... this. Use
5354 prepare_to_access_memory/prepare_to_access_memory.
5355 (write_memory): Rename to ...
5356 (gdb_write_memory): ... this. Use
5357 prepare_to_access_memory/prepare_to_access_memory.
5358 (handle_search_memory_1): Adjust.
5359 (process_serial_event): Adjust.
5360 * target.h (struct target_ops): New fields
5361 prepare_to_access_memory and unprepare_to_access_memory.
5362 (prepare_to_access_memory, unprepare_to_access_memory): New.
5363 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
5364 prepare_to_access_memory/prepare_to_access_memory.
5365 * nto-low.c (nto_target_ops): Adjust.
5366 * spu-low.c (spu_target_ops): Adjust.
5367 * win32-low.c (win32_target_ops): Adjust.
5368
fd467969
PA
53692010-08-26 Pedro Alves <pedro@codesourcery.com>
5370
5371 * Makefile.in (WARN_CFLAGS): Get it from configure.
5372 (WERROR_CFLAGS): New.
5373 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
5374 * configure.ac: Introduce --enable-werror, which adds -Werror to
5375 the compiler command line. Enabled by default. Disable with
5376 --disable-werror. Add -Wdeclaration-after-statement
5377 Wpointer-arith and -Wformat-nonliteral to warning flags.
5378 * configure: Regenerate.
5379
331e2f5f
PA
53802010-08-26 Pedro Alves <pedro@codesourcery.com>
5381
5382 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
5383
e581f2b4
PA
53842010-08-26 Pedro Alves <pedro@codesourcery.com>
5385
5386 * gdbreplay.c (remote_error): New.
5387 (gdbchar): New.
5388 (expect): Use gdbchar. Check for error reading from GDB.
5389 Clarify sync error output.
5390 (play): Check for errors writing to GDB.
5391 * linux-low.c (sigchld_handler): Really ignore `write' errors.
5392 * remote-utils.c (getpkt): Check for errors writing to the remote
5393 descriptor.
5394
3c11dd79
PA
53952010-08-25 Pedro Alves <pedro@codesourcery.com>
5396
5397 * linux-low.c (linux_wait_1): Move non-debugging code out of
5398 `debug_threads' control.
5399
d20a8ad9
PA
54002010-08-25 Pedro Alves <pedro@codesourcery.com>
5401
5402 * linux-low.c (linux_wait_1): Don't set last_status here.
5403 * server.c (push_event, queue_stop_reply_callback): Assert we're
5404 not pushing a TARGET_WAITKIND_IGNORE event.
5405 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
5406 (myresume, handle_target_event): Set the thread's last_resume_kind
5407 and last_status from the target returned status.
5408
964e4306
PA
54092010-08-25 Pedro Alves <pedro@codesourcery.com>
5410
5411 PR threads/10729
5412
5413 * linux-x86-low.c (update_debug_registers_callback): New.
5414 (i386_dr_low_set_addr): Use it.
5415 (i386_dr_low_get_addr): New.
5416 (i386_dr_low_set_control): Use update_debug_registers_callback.
5417 (i386_dr_low_get_control): New.
5418 (i386_dr_low_get_status): Adjust.
5419 * linux-low.c (linux_stop_lwp): New.
5420 * linux-low.h (linux_stop_lwp): Declare.
5421
5422 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
5423 argument instead of a i386_debug_reg_state.
5424 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
5425 a i386_debug_reg_state.
5426 (i386_insert_aligned_watchpoint): Adjust.
5427 (i386_remove_aligned_watchpoint): Adjust.
5428 (i386_low_stopped_data_address): Read the debug registers from the
5429 inferior instead of from the mirrors.
5430 * i386-low.h (struct i386_debug_reg_state): Extend comment.
5431 (i386_dr_low_get_addr): Declare.
5432 (i386_dr_low_get_control): Declare.
5433 (i386_dr_low_get_status): Change prototype.
5434
5435 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
5436 (i386_dr_low_get_addr): New.
5437 (i386_dr_low_get_control): New.
5438 (i386_dr_low_get_status): Adjust prototype. Return
5439 dr_status_mirror.
5440 (i386_initial_stuff): Clear dr_status_mirror and
5441 dr_control_mirror.
5442 (i386_get_thread_context): Adjust.
5443 (i386_set_thread_context): Adjust.
5444 (i386_thread_added): Adjust.
5445
5f21a75b
PA
54462010-08-24 Pedro Alves <pedro@codesourcery.com>
5447
5448 * linux-low.h (linux_thread_area): Delete declaration.
5449
3e4c1235
TS
54502010-08-11 Thomas Schwinge <thomas@codesourcery.com>
5451
5452 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
5453 after its termination.
5454
1971b033
PA
54552010-08-09 Pedro Alves <pedro@codesourcery.com>
5456
5457 * linux-low.c (gdb_wants_lwp_stopped): Delete.
5458 (gdb_wants_all_stopped): Delete.
5459 (linux_wait_1): Don't call them.
5460 * server.c (handle_v_cont): Tag all threads as want-stopped.
5461 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
5462 stopped as "client-wants-stopped".
5463
310444ac
PA
54642010-07-31 Pedro Alves <pedro@codesourcery.com>
5465
5466 * Makefile.in (signals_h): New.
5467 (server_h): Depend on it.
5468 (server.o): Don't depend on $(signals_def).
5469 (signals.o): Depend on $(signals_def).
5470
a19cae16
JK
54712010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
5472
5473 * Makefile.in (signals_def): New.
5474 (server_h): Append include/gdb/signals.h and signals_def.
5475 (server.o): Append signals_def.
5476
30d50328
JK
54772010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5478
5479 * server.c (handle_target_event): Use target_signal_to_host for
5480 resume_info.sig initialization.
5481 * target.h (struct thread_resume) <sig>: New comment.
5482
5c3216e2
OS
54832010-07-20 Ozkan Sezer <sezeroz@gmail.com>
5484
c6f46ca0
OS
5485 * server.c (handle_query): strcpy() the returned string from paddress()
5486 instead of sprintf().
5c3216e2
OS
5487 * utils.c (paddress): Return phex_nz().
5488
6bd31874
JB
54892010-07-07 Joel Brobecker <brobecker@adacore.com>
5490
5491 * server.c (handle_v_cont): Call mourn_inferior if process
5492 just exited.
5493 (myresume): Likewise.
5494
0fb4aa4b
PA
54952010-07-01 Pedro Alves <pedro@codesourcery.com>
5496
5497 Static tracepoints, and integration with UST.
5498
5499 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
5500 * mem-break.c (uninsert_all_breakpoints)
5501 (reinsert_all_breakpoints): New.
5502 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
5503 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
5504 (gdb_agent_ust_loaded, helper_thread_id)
5505 (gdb_agent_helper_thread_id): New macros.
5506 (struct ipa_sym_addresses): Add addr_ust_loaded,
5507 addr_helper_thread_id, addr_cmd_buf.
5508 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
5509 (in_process_agent_loaded_ust): New.
5510 (write_e_ust_not_loaded): New.
5511 (maybe_write_ipa_ust_not_loaded): New.
5512 (struct collect_static_trace_data_action): New.
5513 (enum tracepoint_type) <static_tracepoint>: New.
5514 (struct tracepoint) <handle>: Mention static tracepoints.
5515 (struct static_tracepoint_ctx): New.
5516 (CMD_BUF_SIZE): New.
5517 (add_tracepoint_action): Handle static tracepoint actions.
5518 (unprobe_marker_at): New.
5519 (clear_installed_tracepoints): Handle static tracepoints.
5520 (cmd_qtdp): Handle static tracepoints.
5521 (probe_marker_at): New.
5522 (cmd_qtstart): Handle static tracepoints.
5523 (response_tracepoint): Handle static tracepoints.
5524 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
5525 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
5526 (get_context_regcache): Handle static tracepoints.
5527 (do_action_at_tracepoint): Handle static tracepoint actions.
5528 (traceframe_find_block_type): Handle static trace data blocks.
5529 (traceframe_read_sdata): New.
5530 (download_tracepoints): Download static tracepoint actions.
5531 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
5532 (GDB_PROBE_NAME): New.
5533 (ust_ops): New.
5534 (GET_UST_SYM): New.
5535 (USTF): New.
5536 (dlsym_ust): New.
5537 (ust_marker_to_static_tracepoint): New.
5538 (gdb_probe): New.
5539 (collect_ust_data_at_tracepoint): New.
5540 (gdb_ust_probe): New.
5541 (UNIX_PATH_MAX, SOCK_DIR): New.
5542 (gdb_ust_connect_sync_socket): New.
5543 (resume_thread, stop_thread): New.
5544 (run_inferior_command): New.
5545 (init_named_socket): New.
5546 (gdb_ust_socket_init): New.
5547 (cstr_to_hexstr): New.
5548 (next_st): New.
5549 (first_marker, next_marker): New.
5550 (response_ust_marker): New.
5551 (cmd_qtfstm, cmd_qtsstm): New.
5552 (unprobe_marker_at, probe_marker_at): New.
5553 (cmd_qtstmat, gdb_ust_thread): New.
5554 (gdb_ust_init): New.
5555 (initialize_tracepoint_ftlib): Call gdb_ust_init.
5556 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
5557 (ST_REGENTRY): New.
5558 (x86_64_st_collect_regmap): New.
5559 (X86_64_NUM_ST_COLLECT_GREGS): New.
5560 (AMD64_RIP_REGNUM): New.
5561 (supply_static_tracepoint_registers): New.
5562 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
5563 (ST_REGENTRY): New.
5564 (i386_st_collect_regmap): New.
5565 (i386_NUM_ST_COLLECT_GREGS): New.
5566 (supply_static_tracepoint_registers): New.
5567 * server.c (handle_query): Handle qXfer:statictrace:read.
5568 <qSupported>: Report support for StaticTracepoints, and
5569 qXfer:statictrace:read features.
5570 * server.h (traceframe_read_sdata)
5571 (supply_static_tracepoint_registers): Declare.
5572 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
5573 (unpack_varlen_hex): Include in IPA build.
5574 * Makefile.in (ustlibs, ustinc): New.
5575 (IPA_OBJS): Add remote-utils-ipa.o.
5576 ($(IPA_LIB)): Link -ldl and -lpthread.
5577 (UST_CFLAGS): New.
5578 (IPAGENT_CFLAGS): Add UST_CFLAGS.
5579 * config.in, configure: Regenerate.
5580
9e4344e5
PA
55812010-06-20 Ian Lance Taylor <iant@google.com>
5582 Pedro Alves <pedro@codesourcery.com>
5583
5584 * linux-x86-low.c (always_true): Delete.
5585 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
5586 trying to fool the compiler with always_true.
5587
c6beb2cb
PA
55882010-06-20 Pedro Alves <pedro@codesourcery.com>
5589
5590 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
5591 conditions in gdbserver.
5592
d2ed6730
UW
55932010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
5594
5595 * spu-low.c (spu_read_memory): Wrap around local store limit.
5596 (spu_write_memory): Likewise.
5597
4e29fb54
PA
55982010-06-15 Pedro Alves <pedro@codesourcery.com>
5599
5600 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
5601 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
5602 LONGEST uses.
5603 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
5604 uses.
5605 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
5606 uses with LONGEST uses.
5607
6a271cae
PA
56082010-06-14 Stan Shebs <stan@codesourcery.com>
5609 Pedro Alves <pedro@codesourcery.com>
5610
5611 Bytecode compiler.
5612
5613 * linux-x86-low.c: Include limits.h.
5614 (add_insns): New.
5615 (always_true): New.
5616 (EMIT_ASM): New.
5617 (EMIT_ASM32): New.
5618 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
5619 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
5620 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
5621 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
5622 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
5623 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
5624 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
5625 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
5626 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
5627 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
5628 (amd64_emit_void_call_2): New.
5629 (amd64_emit_ops): New.
5630 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
5631 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
5632 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
5633 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
5634 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
5635 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
5636 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
5637 (i386_emit_call, i386_emit_reg, i386_emit_pop)
5638 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
5639 (i386_emit_stack_adjust, i386_emit_int_call_1)
5640 (i386_emit_void_call_2): New.
5641 (i386_emit_ops): New.
5642 (x86_emit_ops): New.
5643 (the_low_target): Install x86_emit_ops.
5644 * server.h (struct emit_ops): New.
5645 (get_raw_reg_func_addr): Declare.
5646 (current_insn_ptr, emit_error): Declare.
5647 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
5648 (set_trace_state_variable_value): New defines.
5649 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
5650 addr_get_trace_state_variable_value and
5651 addr_set_trace_state_variable_value.
5652 (symbol_list): New fields for get_raw_reg,
5653 get_trace_state_variable_value and set_trace_state_variable_value.
5654 (condfn): New typedef.
5655 (struct tracepoint): New field `compiled_cond'.
5656 (do_action_at_tracepoint): Clear compiled_cond.
5657 (get_trace_state_variable_value, set_trace_state_variable_value):
5658 Export in the IPA.
5659 (condition_true_at_tracepoint): If there's a compiled condition,
5660 run that.
5661 (current_insn_ptr, emit_error): New globals.
5662 (struct bytecode_address): New.
5663 (get_raw_reg_func_addr): New.
5664 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
5665 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
5666 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
5667 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
5668 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
5669 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
5670 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
5671 (compile_tracepoint_condition, compile_bytecodes): New.
5672 * target.h (emit_ops): Forward declare.
5673 (struct target_ops): New field emit_ops.
5674 (target_emit_ops): New.
5675 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
5676 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
5677 * linux-low.c (linux_emit_ops): New.
5678 (linux_target_ops): Install it.
5679 * linux-low.h (struct linux_target_ops): New field emit_ops.
5680
92b72907
UW
56812010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
5682
5683 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
5684 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
5685
fa593d66
PA
56862010-06-01 Pedro Alves <pedro@codesourcery.com>
5687 Stan Shebs <stan@codesourcery.com>
5688
5689 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
5690 (all): Depend on $(extra_libraries).
5691 (install-only): Install the IPA.
5692 (IPA_OBJS, IPA_LIB): New.
5693 (clean): Remove the IPA lib.
5694 (IPAGENT_CFLAGS): New.
5695 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
5696 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
5697 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
5698 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
5699 * configure.ac: Check for atomic builtins support in the compiler.
5700 (IPA_DEPFILES, extra_libraries): Define.
5701 * configure.srv (ipa_obj): Add description.
5702 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
5703 (i[34567]86-*-linux*): Set ipa_obj.
5704 (x86_64-*-linux*): Set ipa_obj.
5705 * linux-low.c (stabilizing_threads): New.
5706 (supports_fast_tracepoints): New.
5707 (linux_detach): Stabilize threads before detaching.
5708 (handle_tracepoints): Handle internal tracing breakpoints. Assert
5709 the lwp is either not stabilizing, or is moving out of a jump pad.
5710 (linux_fast_tracepoint_collecting): New.
5711 (maybe_move_out_of_jump_pad): New.
5712 (enqueue_one_deferred_signal): New.
5713 (dequeue_one_deferred_signal): New.
5714 (linux_wait_for_event_1): If moving out of a jump pad, defer
5715 pending signals to later.
5716 (linux_stabilize_threads): New.
5717 (linux_wait_1): Check if threads need moving out of jump pads, and
5718 do it if so.
5719 (stuck_in_jump_pad_callback): New.
5720 (move_out_of_jump_pad_callback): New.
5721 (lwp_running): New.
5722 (linux_resume_one_lwp): Handle moving out of jump pads.
5723 (linux_set_resume_request): Dequeue deferred signals.
5724 (need_step_over_p): Also step over fast tracepoint jumps.
5725 (start_step_over): Also uninsert fast tracepoint jumps.
5726 (finish_step_over): Also reinsert fast tracepoint jumps.
5727 (linux_install_fast_tracepoint_jump): New.
5728 (linux_target_ops): Install linux_stabilize_threads and
5729 linux_install_fast_tracepoint_jump_pad.
5730 * linux-low.h (linux_target_ops) <get_thread_area,
5731 install_fast_tracepoint_jump_pad>: New fields.
5732 (struct lwp_info) <collecting_fast_tracepoint,
5733 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
5734 (linux_get_thread_area): Declare.
5735 * linux-x86-low.c (jump_insn): New.
5736 (x86_get_thread_area): New.
5737 (append_insns): New.
5738 (push_opcode): New.
5739 (amd64_install_fast_tracepoint_jump_pad): New.
5740 (i386_install_fast_tracepoint_jump_pad): New.
5741 (x86_install_fast_tracepoint_jump_pad): New.
5742 (the_low_target): Install x86_get_thread_area and
5743 x86_install_fast_tracepoint_jump_pad.
5744 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
5745 (struct fast_tracepoint_jump): New.
5746 (fast_tracepoint_jump_insn): New.
5747 (fast_tracepoint_jump_shadow): New.
5748 (find_fast_tracepoint_jump_at): New.
5749 (fast_tracepoint_jump_here): New.
5750 (delete_fast_tracepoint_jump): New.
5751 (set_fast_tracepoint_jump): New.
5752 (uninsert_fast_tracepoint_jumps_at): New.
5753 (reinsert_fast_tracepoint_jumps_at): New.
5754 (set_breakpoint_at): Use write_inferior_memory.
5755 (uninsert_raw_breakpoint): Use write_inferior_memory.
5756 (check_mem_read): Mask out fast tracepoint jumps.
5757 (check_mem_write): Mask out fast tracepoint jumps.
5758 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
5759 (set_fast_tracepoint_jump): Declare.
5760 (delete_fast_tracepoint_jump)
5761 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
5762 (reinsert_fast_tracepoint_jumps_at): Declare.
5763 * regcache.c: Don't compile many functions when building the
5764 in-process agent library.
5765 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
5766 the register buffer in the heap.
5767 (free_register_cache): If the register buffer isn't owned by the
5768 regcache, don't free it.
5769 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
5770 pre-existing register caches.
5771 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
5772 type.
5773 (convert_ascii_to_int): : Constify `from' parameter type.
5774 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
5775 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
5776 the needed buffer in-place.
5777 (relocate_instruction): New.
5778 * server.c (handle_query) <qSymbols>: If the target supports
5779 tracepoints, give it a chance of looking up symbols. Report
5780 support for fast tracepoints.
5781 (handle_status): Stabilize threads.
5782 (process_serial_event): Adjust.
5783 * server.h (struct fast_tracepoint_jump): Forward declare.
5784 (struct process_info) <fast_tracepoint_jumps>: New field.
5785 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
5786 (decode_X_packet, decode_M_packet): Adjust.
5787 (relocate_instruction): Declare.
5788 (in_process_agent_loaded): Declare.
5789 (tracepoint_look_up_symbols): Declare.
5790 (struct fast_tpoint_collect_status): Declare.
5791 (fast_tracepoint_collecting): Declare.
5792 (force_unlock_trace_buffer): Declare.
5793 (handle_tracepoint_bkpts): Declare.
5794 (initialize_low_tracepoint)
5795 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
5796 * target.h (struct target_ops) <stabilize_threads,
5797 install_fast_tracepoint_jump_pad>: New fields.
5798 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
5799 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
5800 [HAVE_STDINT_H]: Include stdint.h.
5801 (trace_debug_1): Rename to ...
5802 (trace_vdebug): ... this.
5803 (trace_debug): Rename to ...
5804 (trace_debug_1): ... this. Add `level' parameter.
5805 (trace_debug): New.
5806 (ATTR_USED, ATTR_NOINLINE): New.
5807 (IP_AGENT_EXPORT): New.
5808 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5809 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
5810 (about_to_request_buffer_space, trace_buffer_is_full)
5811 (stopping_tracepoint, expr_eval_result, error_tracepoint)
5812 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
5813 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
5814 (traceframe_write_count, traceframes_created)
5815 (trace_state_variables)
5816 New renaming defines.
5817 (struct ipa_sym_addresses): New.
5818 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
5819 (symbol_list): New.
5820 (ipa_sym_addrs): New.
5821 (all_tracepoint_symbols_looked_up): New.
5822 (in_process_agent_loaded): New.
5823 (write_e_ipa_not_loaded): New.
5824 (maybe_write_ipa_not_loaded): New.
5825 (tracepoint_look_up_symbols): New.
5826 (debug_threads) [IN_PROCESS_AGENT]: New.
5827 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
5828 (UNKNOWN_SIDE_EFFECTS): New.
5829 (stop_tracing): New.
5830 (flush_trace_buffer): New.
5831 (stop_tracing_bkpt): New.
5832 (flush_trace_buffer_bkpt): New.
5833 (read_inferior_integer): New.
5834 (read_inferior_uinteger): New.
5835 (read_inferior_data_pointer): New.
5836 (write_inferior_data_pointer): New.
5837 (write_inferior_integer): New.
5838 (write_inferior_uinteger): New.
5839 (struct collect_static_trace_data_action): Delete.
5840 (enum tracepoint_type): New.
5841 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
5842 <actions_str, step_actions, step_actions_str>: Only include in
5843 GDBserver.
fa593d66
PA
5844 <orig_size, obj_addr_on_target, adjusted_insn_addr>
5845 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
5846 (tracepoints): Use IP_AGENT_EXPORT.
5847 (last_tracepoint): Don't include in the IPA.
5848 (stopping_tracepoint): Use IP_AGENT_EXPORT.
5849 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
5850 (alloced_trace_state_variables): New.
5851 (trace_state_variables): Use IP_AGENT_EXPORT.
5852 (traceframe_t): Delete unused variable.
5853 (circular_trace_buffer): Don't include in the IPA.
5854 (trace_buffer_start): Delete.
5855 (struct trace_buffer_control): New.
5856 (trace_buffer_free): Delete.
5857 (struct ipa_trace_buffer_control): New.
5858 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
5859 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
5860 New.
5861 (trace_buffer_ctrl): New.
5862 (TRACE_BUFFER_CTRL_CURR): New.
5863 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
5864 Reimplement as macros.
5865 (trace_buffer_wrap): Delete.
5866 (traceframe_write_count, traceframe_read_count)
5867 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
5868 (struct tracepoint_hit_ctx) <type>: New field.
5869 (struct fast_tracepoint_ctx): New.
5870 (memory_barrier): New.
5871 (cmpxchg): New.
5872 (record_tracepoint_error): Update atomically in the IPA.
5873 (clear_inferior_trace_buffer): New.
5874 (about_to_request_buffer_space): New.
5875 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
5876 updating the same buffer.
5877 (add_tracepoint): Default the tracepoint's type to trap
5878 tracepoint, and orig_size to -1.
5879 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
5880 internal variables.
5881 (create_trace_state_variable): New parameter `gdb'. Handle it.
5882 (clear_installed_tracepoints): Clear fast tracepoint jumps.
5883 (cmd_qtdp): Handle fast tracepoints.
5884 (cmd_qtdv): Adjust.
5885 (max_jump_pad_size): New.
5886 (gdb_jump_pad_head): New.
5887 (get_jump_space_head): New.
5888 (claim_jump_space): New.
5889 (sort_tracepoints): New.
5890 (MAX_JUMP_SIZE): New.
5891 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
5892 IPA.
5893 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
5894 support. Upload fast traceframes, and delete internal IPA
5895 breakpoints.
5896 (stop_tracing_handler): New.
5897 (flush_trace_buffer_handler): New.
5898 (cmd_qtstop): Upload fast tracepoints.
5899 (response_tracepoint): Handle fast tracepoints.
5900 (tracepoint_finished_step): Upload fast traceframes. Set the
5901 tracepoint hit context's tracepoint type.
5902 (handle_tracepoint_bkpts): New.
5903 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
5904 type. Add comment about fast tracepoints.
5905 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
5906 non-existing action_str field.
5907 (get_context_regcache): Handle fast tracepoints.
5908 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
5909 to the regcache.
5910 (fast_tracepoint_from_jump_pad_address): New.
5911 (fast_tracepoint_from_ipa_tpoint_address): New.
5912 (collecting_t): New.
5913 (force_unlock_trace_buffer): New.
5914 (fast_tracepoint_collecting): New.
5915 (collecting): New.
5916 (gdb_collect): New.
5917 (write_inferior_data_ptr): New.
5918 (target_tp_heap): New.
5919 (target_malloc): New.
5920 (download_agent_expr): New.
5921 (UALIGN): New.
5922 (download_tracepoints): New.
5923 (download_trace_state_variables): New.
5924 (upload_fast_traceframes): New.
5925 (IPA_FIRST_TRACEFRAME): New.
5926 (IPA_NEXT_TRACEFRAME_1): New.
5927 (IPA_NEXT_TRACEFRAME): New.
5928 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
5929 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
5930 (gdb_jump_pad_buffer_end): New.
5931 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
5932 (initialize_tracepoint): Adjust.
5933 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
5934 buffer. Initialize the low module.
5935 * utils.c (PREFIX, TOOLNAME): New.
5936 (malloc_failure): Use PREFIX.
5937 (error): In the IPA, an error causes an exit.
5938 (fatal, warning): Use PREFIX.
5939 (internal_error): Use TOOLNAME.
5940 (NUMCELLS): Increase to 10.
5941 * configure, config.in: Regenerate.
5942
d149dd1d
PA
59432010-06-01 Pedro Alves <pedro@codesourcery.com>
5944
5945 * server.c (handle_query) <qSupported>: Do two passes over the
5946 qSupported string to avoid nesting strtok.
5947
f6528abd
JK
59482010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5949
5950 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
5951 (CDEPS): New.
5952 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
5953 -Wl,--dynamic-list.
5954 * configure: Regenerate.
5955 * proc-service.list: New.
5956
ca2a87a0
JK
59572010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5958
5959 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
5960 New comment.
5961
363a6e9f
OS
59622010-05-26 Ozkan Sezer <sezeroz@gmail.com>
5963
5964 * gdbreplay.c (remote_open): Check error return from socket() call by
5965 its equality to -1 not by it being negative.
5966 * remote-utils.c (remote_open): Likewise.
5967
d23b6cb1
PA
59682010-05-23 Pedro Alves <pedro@codesourcery.com>
5969
5970 * config.h: Regenerate.
5971
28d3cf85
MK
59722010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
5973
5974 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
5975 doesn't provide PTRACE_GET_THREAD_AREA.
5976
fea36a59
MK
59772010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
5978
5979 * linux-m68k-low.c: Include <asm/ptrace.h>
5980 (ps_get_thread_area): Implement.
5981
24b066ba
DE
59822010-05-03 Doug Evans <dje@google.com>
5983
5984 * event-loop.c (struct callback_event): New struct.
5985 (callback_list): New global.
5986 (append_callback_event, delete_callback_event): New functions.
5987 (process_callback): New function.
5988 (start_event_loop): Call it.
5989 * remote-utils.c (NOT_SCHEDULED): Define.
5990 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
5991 moved out of readchar.
5992 (readchar): Rewrite. Call reschedule before returning.
5993 (reset_readchar): New function.
5994 (remote_close): Call it.
5995 (process_remaining, reschedule): New functions.
5996 * server.h (callback_handler_func): New typedef.
5997 (append_callback_event, delete_callback_event): Declare.
5998
9836d6ea
PA
59992010-05-03 Pedro Alves <pedro@codesourcery.com>
6000
6001 * proc-service.c (ps_pglobal_lookup): Use
6002 thread_db_look_up_one_symbol.
6003 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6004 parameter. Use it instead of all_symbols_looked_up.
6005 * server.h (struct process_info) <all_symbols_looked_up>: Delete
6006 field.
6007 (all_symbols_looked_up): Don't declare.
6008 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6009 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6010 field.
6011 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6012 Set all_symbols_looked_up here.
6013 (thread_db_look_up_one_symbol): New.
6014 (thread_db_get_tls_address): Adjust.
6015 (thread_db_load_search, try_thread_db_load_1): Always allocate the
6016 thread_db object on the heap, and tentatively set it in the
6017 process structure.
6018 (thread_db_init): Don't set all_symbols_looked_up here.
6019 * linux-low.h (thread_db_look_up_one_symbol): Declare.
6020
7984d532
PA
60212010-05-03 Pedro Alves <pedro@codesourcery.com>
6022
6023 * linux-low.c (linux_kill, linux_detach): Adjust.
6024 (status_pending_p_callback): Remove redundant statement. Check
6025 for !TARGET_WAITIKIND_IGNORE, instead of
6026 TARGET_WAITKIND_STOPPED.
6027 (handle_tracepoints): Make sure LWP is locked. Adjust.
6028 (linux_wait_for_event_1): Adjust.
6029 (linux_cancel_breakpoints): New.
6030 (unsuspend_one_lwp): New.
6031 (unsuspend_all_lwps): New.
6032 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
6033 (send_sigstop_callback): Change return type to int, add new
6034 `except' parameter and handle it.
6035 (suspend_and_send_sigstop_callback): New.
6036 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6037 pass them down. If SUSPEND, also increment the lwp's suspend
6038 count.
6039 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6040 (need_step_over_p): Don't consider suspended LWPs.
6041 (start_step_over): Adjust.
6042 (proceed_one_lwp): Change return type to int, add new `except'
6043 parameter and handle it.
6044 (unsuspend_and_proceed_one_lwp): New.
6045 (proceed_all_lwps): Use find_inferior instead of
6046 for_each_inferior.
6047 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6048 also decrement the suspend count of LWPs. Pass `except' down,
6049 instead of hacking its suspend count.
6050 (linux_pause_all): Add `freeze' parameter. Adjust.
6051 (linux_unpause_all): New.
6052 (linux_target_ops): Install linux_unpause_all.
6053 * server.c (handle_status): Adjust.
6054 * target.h (struct target_ops): New fields `unpause_all' and
6055 `cancel_breakpoints'. Add new parameter to `pause_all'.
6056 (pause_all): Add new `freeze' parameter.
6057 (unpause_all): New.
6058 (cancel_breakpoints): New.
6059 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6060 cancel breakpoints.
6061 (cmd_qtstart): Pause threads.
6062 (stop_tracing): Pause threads, and cancel breakpoints.
6063 * win32-low.c (win32_target_ops): Adjust.
6064
e471f25b
PA
60652010-05-03 Pedro Alves <pedro@codesourcery.com>
6066
6067 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6068 the inferior right away from here...
6069 (linux_wait_1): ... to here, and adjust to check the thread's
6070 last_resume_kind instead of the lwp's step or stop_expected flags.
6071
1915ef4f
PA
60722010-05-02 Pedro Alves <pedro@codesourcery.com>
6073
6074 * README: Use consistent `GDB' and `GDBserver' spellings.
6075
f9e39928
PA
60762010-05-02 Pedro Alves <pedro@codesourcery.com>
6077
6078 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6079 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
6080 (linux_detach_one_lwp): Assume the lwp is stopped.
6081 (any_thread_of): Delete.
6082 (linux_detach): Stop all lwps here. Don't blindly delete all
6083 breakpoints.
6084 (delete_lwp_callback): New.
6085 (linux_mourn): Delete all lwps of the process that is gone.
6086 (linux_wait_1): Don't delete the last lwp of the process here.
6087 * mem-break.h (mark_breakpoints_out): Declare.
6088 * mem-break.c (mark_breakpoints_out): New.
6089 (free_all_breakpoints): Use it.
6090 * server.c (handle_target_event): If the process is gone, mark
6091 breakpoints out.
6092 * thread-db.c (struct thread_db) <create_bp>: New field.
6093 (thread_db_enable_reporting): Fix prototype. Store a thread event
6094 breakpoint reference in the thread_db struct.
6095 (thread_db_load_search): Clear the thread_db object.
6096 (try_thread_db_load_1): Ditto.
6097 (switch_to_process): New.
6098 (disable_thread_event_reporting): Use it.
6099 (remove_thread_event_breakpoints): New.
6100 (thread_db_detach, thread_db_mourn): Use it.
6101
1e7fc18c
PA
61022010-05-01 Pedro Alves <pedro@codesourcery.com>
6103
6104 * linux-low.c (linux_enable_event_reporting): New.
6105 (linux_wait_for_event_1, handle_extended_wait): Use it.
6106
02fc4de7
PA
61072010-04-30 Pedro Alves <pedro@codesourcery.com>
6108
6109 * linux-low.c (linux_kill_one_lwp, linux_kill)
6110 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
6111 (send_sigstop): Take an lwp_info as parameter instead. Queue a
6112 SIGSTOP even if the LWP is stopped.
6113 (send_sigstop_callback): New.
6114 (stop_all_lwps): Use send_sigstop_callback instead.
6115 (linux_resume_one_thread): Adjust.
6116 (proceed_one_lwp): Still proceed an LWP that the client has
6117 requested to stop, if we haven't reported it as stopped yet. Make
6118 sure that LWPs the client want stopped, have a pending SIGSTOP.
6119
bc3b5632
DE
61202010-04-26 Doug Evans <dje@google.com>
6121
ae1ada35
DE
6122 * server.c (handle_general_set): Make static.
6123
bc3b5632
DE
6124 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
6125 Print received char after testing for error/eof instead of before.
6126 (input_interrupt): Tweak comment.
6127
65730243
DE
61282010-04-23 Doug Evans <dje@google.com>
6129
6130 * server.c (start_inferior): Print inferior argv if --debug.
6131
a8ae7dc0
AR
61322010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
6133
6134 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
6135 * nto-x86-low.c: Include server.h
6136
1c07cc19
PM
61372010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
6138
6139 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
6140 be consistent with other sources of this directory.
6141 (init_registers_amd64): Correct name of source file of this function
6142 in the comment.
6143
e0a61e09
PM
61442010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6145
6146 * configure.srv (x86_64-*-mingw*): New configuration for Windows
6147 64-bit executables.
6148
54709339
PM
61492010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6150
6151 * win32-i386-low.c: Add 64-bit support.
6152 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
6153 (init_registers_amd64): Declare.
6154 (mappings): Add 64-bit version of array.
6155 (init_windows_x86): New function.
6156 (the_low_target): Change init_arch field to init_windows_x86.
6157
e8f0053d
PM
61582010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6159
6160 * win32-low.c: Adapt to support also 64-bit architecture.
6161 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
6162 (get_image_name): Use SIZE_T type for local variable `done'.
6163 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
6164 (toolhelp_get_dll_name): Idem.
6165 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
6166 Use uintptr_t typecast to avoid warning.
6167 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
6168 (handle_exception): Use phex_nz to avoid warning.
6169 (win32_wait): Remove unused local variable `process'.
6170
c481e77e
PM
61712010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6172
6173 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
6174 `amd64-avx.o'.
6175
12ea4b69
PM
61762010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
6177
6178 * configure.ac: Use `ws2_32' library for srv_mingw.
6179 * configure: Regenerate.
6180 * gdbreplay.c: Include winsock2.h instead of winsock.h.
6181 * remote-utils.c: Likewise.
6182
f6d1620c
L
61832010-04-17 H.J. Lu <hongjiu.lu@intel.com>
6184
6185 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
6186 if __x86_64__ is defined.
6187
8e642873
PM
61882010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6189
6190 * configure: Regenerate.
6191
711e434b
PM
61922010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6193
6194 * server.c (handle_query): Handle 'qGetTIBAddr' query.
6195 * target.h (target_ops): New get_tib_address field.
6196 * win32-low.h (win32_thread_info): Add thread_local_base field.
6197 * win32-low.c (child_add_thread): Add tlb argument.
6198 Set thread_local_base field to TLB.
6199 (get_child_debug_event): Adapt to child_add_thread change.
6200 (win32_get_tib_address): New function.
6201 (win32_target_ops): Set get_tib_address field to
6202 win32_get_tib_address.
6203 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
6204
505106cd
PA
62052010-04-12 Pedro Alves <pedro@codesourcery.com>
6206
505106cd
PA
6207 * linux-low.c (linux_mourn): Also remove the process.
6208 * server.c (handle_target_event): Don't remove the process here.
6209 * nto-low.c (nto_mourn): New.
6210 (nto_target_ops): Install it.
6211 * spu-low.c (spu_mourn): New.
6212 (spu_target_ops): Install it.
6213 * win32-low.c (win32_mourn): New.
6214 (win32_target_ops): Install it.
6215
e8470a06
PA
62162010-04-12 Pedro Alves <pedro@codesourcery.com>
6217
6218 * server.h (buffer_xml_printf): Remove redundant `;'.
6219
45ba0d02
PA
62202010-04-12 Pedro Alves <pedro@codesourcery.com>
6221
6222 * regcache.c (set_register_cache): Invalidate regcaches before
6223 changing the register cache layout.
6224 (regcache_invalidate_one): Allow a NULL regcache.
6225 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
6226 regcaches before changing the register cache layout or the target
6227 regsets.
6228
59e04013
L
62292010-04-12 H.J. Lu <hongjiu.lu@intel.com>
6230
6231 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
6232 variable warning on Linux/x86-64.
6233
8336d594
PA
62342010-04-11 Pedro Alves <pedro@codesourcery.com>
6235
6236 GDBserver disconnected tracing support.
6237
6238 * linux-low.c (linux_remove_process): Delete.
6239 (add_lwp): Don't set last_resume_kind here.
6240 (linux_kill): Use `mourn'.
6241 (linux_detach): Use `thread_db_detach', and `mourn'.
6242 (linux_mourn): New.
6243 (linux_attach_lwp_1): Adjust comment.
6244 (linux_attach): last_resume_kind moved the thread_info; adjust.
6245 (status_pending_p_callback): Adjust.
6246 (linux_wait_for_event_1): Adjust.
6247 (count_events_callback, select_singlestep_lwp_callback)
6248 (select_event_lwp_callback, cancel_breakpoints_callback)
6249 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
6250 (proceed_one_lwp): Adjust.
6251 (linux_async): Add debug output.
6252 (linux_thread_stopped): New.
6253 (linux_pause_all): New.
6254 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
6255 linux_pause_all.
6256 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
6257 (thread_db_free): Delete declaration.
6258 (thread_db_detach, thread_db_mourn): Declare.
6259 * thread-db.c (thread_db_init): Use thread_db_mourn.
6260 (thread_db_free): Delete, split in two.
6261 (disable_thread_event_reporting): New.
6262 (thread_db_detach): New.
6263 (thread_db_mourn): New.
6264
6265 * server.h (struct thread_info) <last_resume_kind>: New field.
6266 <attached>: Add comment.
6267 <gdb_detached>: New field.
6268 (handler_func): Change return type to int.
6269 (handle_serial_event, handle_target_event): Ditto.
6270 (gdb_connected): Declare.
6271 (tracing): Delete.
6272 (disconnected_tracing): Declare.
6273 (stop_tracing): Declare.
6274
6275 * server.c (handle_query) <qSupported>: Report support for
6276 disconnected tracing.
6277 (queue_stop_reply_callback): Account for running threads.
6278 (gdb_wants_thread_stopped): New.
6279 (gdb_wants_all_threads_stopped): New.
6280 (gdb_reattached_process): New.
6281 (handle_status): Clear the `gdb_detached' flag of all processes.
6282 In all-stop, stop all threads.
6283 (main): Be sure to leave tfind mode. Handle disconnected tracing.
6284 (process_serial_event): If the remote connection breaks, or if an
6285 exit was forced with "monitor exit", force an event loop exit.
6286 Handle disconnected tracing on detach.
6287 (handle_serial_event): Adjust.
6288 (handle_target_event): If GDB isn't connected, forward events back
6289 to the inferior, unless the last process exited, in which case,
6290 exit gdbserver. Adjust interface.
6291
6292 * remote-utils.c (remote_open): Don't block in accept. Instead
6293 register an event loop source on the listen socket file
6294 descriptor. Refactor bits into ...
6295 (listen_desc): ... this new global.
6296 (gdb_connected): ... this new function.
6297 (enable_async_notification): ... this new function.
6298 (handle_accept_event): ... this new function.
6299 (remote_close): Clear remote_desc.
6300
6301 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
6302
6303 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
6304 New fields.
6305 (mourn_inferior): Define.
6306 (target_process_qsupported): Avoid the dangling else problem.
6307 (thread_stopped): Define.
6308 (pause_all): Define.
6309 (target_waitstatus_to_string): Declare.
6310 * target.c (target_waitstatus_to_string): New.
6311
6312 * tracepoint.c (tracing): Make extern.
6313 (disconnected_tracing): New.
6314 (stop_tracing): Make extern. Handle tracing stops due to GDB
6315 disconnecting.
6316 (cmd_qtdisconnected): New.
6317 (cmd_qtstatus): Report disconnected tracing status in trace reply.
6318 (handle_tracepoint_general_set): Handle QTDisconnected.
6319
6320 * event-loop.c (event_handler_func): Change return type to int.
6321 (process_event): Bail out if the event handler wants the event
6322 loop to stop.
6323 (handle_file_event): Ditto.
6324 (start_event_loop): Bail out if the event handler wants the event
6325 loop to stop.
6326
6327 * nto-low.c (nto_target_ops): Adjust.
6328 * spu-low.c (spu_wait): Don't remove the process here.
6329 (spu_target_ops): Adjust.
6330 * win32-low.c (win32_wait): Don't remove the process here.
6331 (win32_target_ops): Adjust.
6332
5d267c4c
PA
63332010-04-11 Pedro Alves <pedro@codesourcery.com>
6334
6335 * regcache.c (realloc_register_cache): Invalidate inferior's
6336 regcache before recreating it.
6337
623ccd72
PA
63382010-04-09 Pedro Alves <pedro@codesourcery.com>
6339
6340 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
6341
219f2f23
PA
63422010-04-09 Stan Shebs <stan@codesourcery.com>
6343 Pedro Alves <pedro@codesourcery.com>
6344
6345 * server.h (LONGEST): New.
6346 (struct thread_info) <while_stepping>: New field.
6347 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
6348 Declare.
6349 (initialize_tracepoint, handle_tracepoint_general_set)
6350 (handle_tracepoint_query, tracepoint_finished_step)
6351 (tracepoint_was_hit, release_while_stepping_state_list):
6352 (current_traceframe): Declare.
6353 * server.c (handle_general_set): Handle tracepoint packets.
6354 (read_memory): New.
6355 (write_memory): New.
6356 (handle_search_memory_1): Use read_memory.
6357 (handle_query): Report support for conditional tracepoints, trace
6358 state variables, and tracepoint sources. Handle tracepoint
6359 queries.
6360 (main): Initialize the tracepoints module.
6361 (process_serial_event): Handle traceframe reads/writes.
6362
6363 * linux-low.c (handle_tracepoints): New.
6364 (linux_wait_1): Call it.
6365 (linux_resume_one_lwp): Handle while-stepping.
6366 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
6367 (linux_target_ops): Install them.
6368 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
6369 New field.
6370 * linux-x86-low.c (x86_supports_tracepoints): New.
6371 (the_low_target). Install it.
6372
6373 * mem-break.h (delete_breakpoint): Declare.
6374 * mem-break.c (delete_breakpoint): Make external.
6375
6376 * target.h (struct target_ops): Add `supports_tracepoints',
6377 `read_pc', and `write_pc' fields.
6378 (target_supports_tracepoints): Define.
6379 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
6380 (phex_nz): New.
6381
6382 * regcache.h (struct regcache) <registers_owned>: New field.
6383 (init_register_cache, regcache_cpy): Declare.
6384 (regcache_read_pc, regcache_write_pc): Declare.
6385 (register_cache_size): Declare.
6386 (supply_regblock): Declare.
6387 * regcache.c (init_register_cache): New.
6388 (new_register_cache): Use it.
6389 (regcache_cpy): New.
6390 (register_cache_size): New.
6391 (supply_regblock): New.
6392 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 6393
219f2f23
PA
6394 * tracepoint.c: New.
6395
6396 * Makefile.in (OBS): Add tracepoint.o.
6397 (tracepoint.o): New rule.
6398
3a13a53b
L
63992010-04-08 H.J. Lu <hongjiu.lu@intel.com>
6400
6401 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
6402 (i386-mmx.o): New.
6403 (i386-mmx.c): Likewise.
6404 (i386-mmx-linux.o): Likewise.
6405 (i386-mmx-linux.c): Likewise.
6406
6407 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
6408 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
6409 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
6410 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
6411
6412 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
6413 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
6414 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
6415
1570b33e
L
64162010-04-07 H.J. Lu <hongjiu.lu@intel.com>
6417
6418 * Makefile.in (clean): Updated.
6419 (i386-avx.o): New.
6420 (i386-avx.c): Likewise.
6421 (i386-avx-linux.o): Likewise.
6422 (i386-avx-linux.c): Likewise.
6423 (amd64-avx.o): Likewise.
6424 (amd64-avx.c): Likewise.
6425 (amd64-avx-linux.o): Likewise.
6426 (amd64-avx-linux.c): Likewise.
6427
6428 * configure.srv (srv_i386_regobj): Add i386-avx.o.
6429 (srv_i386_linux_regobj): Add i386-avx-linux.o.
6430 (srv_amd64_regobj): Add amd64-avx.o.
6431 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
6432 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
6433 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
6434 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
6435 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
6436 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
6437 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
6438
6439 * i387-fp.c: Include "i386-xstate.h".
6440 (i387_xsave): New.
6441 (i387_cache_to_xsave): Likewise.
6442 (i387_xsave_to_cache): Likewise.
6443 (x86_xcr0): Likewise.
6444
6445 * i387-fp.h (i387_cache_to_xsave): Likewise.
6446 (i387_xsave_to_cache): Likewise.
6447 (x86_xcr0): Likewise.
6448
6449 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
6450 * linux-crisv32-low.c (target_regsets): Likewise.
6451 * linux-m68k-low.c (target_regsets): Likewise.
6452 * linux-mips-low.c (target_regsets): Likewise.
6453 * linux-ppc-low.c (target_regsets): Likewise.
6454 * linux-s390-low.c (target_regsets): Likewise.
6455 * linux-sh-low.c (target_regsets): Likewise.
6456 * linux-sparc-low.c (target_regsets): Likewise.
6457 * linux-xtensa-low.c (target_regsets): Likewise.
6458
6459 * linux-low.c: Include <sys/uio.h>.
6460 (regsets_fetch_inferior_registers): Support nt_type.
6461 (regsets_store_inferior_registers): Likewise.
6462 (linux_process_qsupported): New.
6463 (linux_target_ops): Add linux_process_qsupported.
6464
6465 * linux-low.h (regset_info): Add nt_type.
6466 (linux_target_ops): Add process_qsupported.
6467
6468 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
6469 and <sys/uio.h>.
6470 (init_registers_i386_avx_linux): New.
6471 (init_registers_amd64_avx_linux): Likewise.
6472 (xmltarget_i386_linux_no_xml): Likewise.
6473 (xmltarget_amd64_linux_no_xml): Likewise.
6474 (PTRACE_GETREGSET): Likewise.
6475 (PTRACE_SETREGSET): Likewise.
6476 (x86_fill_xstateregset): Likewise.
6477 (x86_store_xstateregset): Likewise.
6478 (use_xml): Likewise.
6479 (x86_linux_update_xmltarget): Likewise.
6480 (x86_linux_process_qsupported): Likewise.
6481 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
6482 (x86_arch_setup): Don't call init_registers_amd64_linux nor
6483 init_registers_i386_linux here. Call
6484 x86_linux_update_xmltarget.
6485 (the_low_target): Add x86_linux_process_qsupported.
6486
6487 * server.c (handle_query): Call target_process_qsupported.
6488
6489 * target.h (target_ops): Add process_qsupported.
6490 (target_process_qsupported): New.
6491
fc7238bb
PA
64922010-04-03 Pedro Alves <pedro@codesourcery.com>
6493
6494 * inferiors.c (add_thread): Set last_status kind to
6495 TARGET_WAITKIND_IGNORE.
6496 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
6497 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
6498 (linux_wait_1): Move `thread' local definition to block that uses
6499 it. Don't NULL initialize `event_child'.
6500 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
6501 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
6502 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
6503
bdabb078
PA
65042010-04-01 Pedro Alves <pedro@codesourcery.com>
6505
6506 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
6507 an extended waitstatus, or by a watchpoint.
6508 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
6509 thread was stepping or has been stopped by a watchpoint.
6510
d3bbe7a0
PA
65112010-04-01 Pedro Alves <pedro@codesourcery.com>
6512
6513 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
6514 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
6515 of another, then delete the previous, and validate all
6516 breakpoints.
6517 (validate_inserted_breakpoint): New.
6518 (delete_disabled_breakpoints): New.
6519 (validate_breakpoints): New.
6520 (check_mem_read): Validate breakpoints before trusting their
6521 shadow. Delete disabled breakpoints.
6522 (check_mem_write): Validate breakpoints before trusting they
6523 should be inserted. Delete disabled breakpoints.
6524 * mem-break.h (validate_breakpoints):
6525 * server.c (handle_query): Validate breakpoints when we see a
6526 qSymbol query.
6527
8b07ae33
PA
65282010-04-01 Pedro Alves <pedro@codesourcery.com>
6529
6530 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
6531 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
6532 if we could tell there's a GDB breakpoint at stop_pc.
6533 (need_step_over_p): Don't do a step over if we find a GDB
6534 breakpoint at the resume PC.
6535
6536 * mem-break.c (struct raw_breakpoint): New.
6537 (enum bkpt_type): New type `gdb_breakpoint'.
6538 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
6539 fields. New field `raw'.
6540 (find_raw_breakpoint_at): New.
6541 (set_raw_breakpoint_at): Handle refcounting. Create a raw
6542 breakpoint instead.
6543 (set_breakpoint_at): Adjust.
6544 (delete_raw_breakpoint): New.
6545 (release_breakpoint): New.
6546 (delete_breakpoint): Rename to...
6547 (delete_breakpoint_1): ... this. Add proc parameter. Use
6548 release_breakpoint. Return ENOENT.
6549 (delete_breakpoint): Reimplement.
6550 (find_breakpoint_at): Delete.
6551 (find_gdb_breakpoint_at): New.
6552 (delete_breakpoint_at): Delete.
6553 (set_gdb_breakpoint_at): New.
6554 (delete_gdb_breakpoint_at): New.
6555 (gdb_breakpoint_here): New.
6556 (set_reinsert_breakpoint): Use release_breakpoint.
6557 (uninsert_breakpoint): Rename to ...
6558 (uninsert_raw_breakpoint): ... this.
6559 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
6560 (reinsert_raw_breakpoint): Change parameter type to
6561 raw_breakpoint.
6562 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
6563 instead.
6564 (check_breakpoints): Adjust. Use release_breakpoint.
6565 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
6566 (breakpoint_inserted_here): Ditto.
6567 (check_mem_read): Adjust to iterate over raw breakpoints instead.
6568 Don't trust the breakpoint's shadow if it is not inserted.
6569 (check_mem_write): Adjust to iterate over raw breakpoints instead.
6570 (delete_all_breakpoints): Adjust.
6571 (free_all_breakpoints): Mark all breakpoints as uninserted, and
6572 use delete_breakpoint_1.
6573
6574 * mem-break.h (breakpoints_supported): Delete declaration.
6575 (set_gdb_breakpoint_at): Declare.
6576 (gdb_breakpoint_here): Declare.
6577 (delete_breakpoint_at): Delete.
6578 (delete_gdb_breakpoint_at): Declare.
6579
6580 * server.h (struct raw_breakpoint): Forward declare.
6581 (struct process_info): New field `raw_breakpoints'.
6582
6583 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
6584 breakpoints.
6585
6bf5e0ba
PA
65862010-03-24 Pedro Alves <pedro@codesourcery.com>
6587
6588 * linux-low.c (status_pending_p_callback): Fix comment.
6589 (linux_wait_for_event_1): Move most of the internal breakpoint
6590 handling from here...
6591 (linux_wait_1): ... to here.
6592 (count_events_callback): New.
6593 (select_singlestep_lwp_callback): New.
6594 (select_event_lwp_callback): New.
6595 (cancel_breakpoints_callback): New.
6596 (select_event_lwp): New.
6597 (linux_wait_1): Simplify internal breakpoint handling. Give equal
6598 priority to all LWPs that have had events that should be reported
6599 to the client. Cancel breakpoints when about to reporting the
6600 event to the client, not while stopping lwps. No longer cancel
6601 finished single-steps here.
6602 (cancel_finished_single_step): Delete.
6603 (cancel_finished_single_steps): Delete.
6604
414a389f
PA
66052010-03-24 Pedro Alves <pedro@codesourcery.com>
6606
6607 * mem-break.c (enum bkpt_type): New.
6608 (struct breakpoint): New field `type'.
6609 (set_breakpoint_at): Change return type to struct breakpoint
6610 pointer. Set type to `other_breakpoint' by default.
6611 (delete_breakpoint): Rewrite, supporting more than one breakpoint
6612 in the breakpoint list.
6613 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
6614 (reinsert_breakpoint): Rename to ...
6615 (reinsert_raw_breakpoint): ... this.
6616 (reinsert_breakpoints_at): Adjust.
6617 * mem-break.h (struct breakpoint): Declare.
6618 (set_breakpoint_at): Change return type to struct breakpoint
6619 pointer.
6620
2280c721
PA
66212010-03-24 Pedro Alves <pedro@codesourcery.com>
6622
6623 * server.c (handle_query): Assign, not compare.
6624
d50171e4
PA
66252010-03-24 Pedro Alves <pedro@codesourcery.com>
6626
6627 Teach linux gdbserver to step-over-breakpoints.
6628
6629 * linux-low.c (can_hardware_single_step): New.
6630 (supports_breakpoints): New.
6631 (handle_extended_wait): If stopping threads, read the stop pc of
6632 the new cloned LWP.
6633 (get_pc): New.
6634 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
6635 low target doesn't support retrieving the PC.
6636 (add_lwp): Set last_resume_kind to resume_continue.
6637 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
6638 (linux_attach): Don't clear stop_expected. Set the lwp's
6639 last_resume_kind to resume_stop.
6640 (linux_detach_one_lwp): Don't check for removed breakpoints.
6641 (check_removed_breakpoint): Delete.
6642 (status_pending_p): Rename to ...
6643 (status_pending_p_callback): ... this. Don't check for removed
6644 breakpoints. Don't consider threads that are stopped from GDB's
6645 perspective.
6646 (linux_wait_for_lwp): Always read the stop_pc here.
6647 (cancel_breakpoint): New.
6648 (step_over_bkpt): New global.
6649 (linux_wait_for_event_1): Implement stepping over breakpoints.
6650 (gdb_wants_lwp_stopped): New.
6651 (gdb_wants_all_stopped): New.
6652 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
6653 single-step traps here. Store the thread's last reported target
6654 wait status.
6655 (send_sigstop): Don't clear stop_expected. Always set it,
6656 instead.
6657 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
6658 (cancel_finished_single_step): New.
6659 (cancel_finished_single_steps): New.
6660 (wait_for_sigstop): Don't cancel finished single-step traps here.
6661 (linux_resume_one_lwp): Don't check for removed breakpoints.
6662 Don't set `step' on non-hardware step archs.
6663 (linux_set_resume_request): Ignore resume_stop requests if already
6664 stopping or stopped. Set the lwp's last_resume_kind.
6665 (resume_status_pending_p): Don't check for removed breakpoints.
6666 (need_step_over_p): New.
6667 (start_step_over): New.
6668 (finish_step_over): New.
6669 (linux_resume_one_thread): Always queue a sigstop for resume_stop
6670 requests. Clear the thread's last reported target waitstatus.
6671 Don't use the `suspended' flag. Don't consider pending breakpoints.
6672 (linux_resume): Start a step-over if necessary.
6673 (proceed_one_lwp): New.
6674 (proceed_all_lwps): New.
6675 (unstop_all_lwps): New.
6676 * linux-low.h (struct lwp_info): Rewrite comment for the
6677 `suspended' flag. Add the `stop_pc' field. Delete the
6678 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
6679 Add `'last_resume_kind' and `need_step_over' fields.
6680 * inferiors.c (struct thread_info): Delete, moved elsewhere.
6681 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
6682 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
6683 (set_raw_breakpoint_at): New.
6684 (set_breakpoint_at): Rewrite to use it.
6685 (reinsert_breakpoint_handler): Delete.
6686 (set_reinsert_breakpoint): New.
6687 (reinsert_breakpoint_by_bp): Delete.
6688 (delete_reinsert_breakpoints): New.
6689 (uninsert_breakpoint): Rewrite.
6690 (uninsert_breakpoints_at): New.
6691 (reinsert_breakpoint): Rewrite.
6692 (reinsert_breakpoints_at): New.
6693 (check_breakpoints): Rewrite.
6694 (breakpoint_here): New.
6695 (breakpoint_inserted_here): New.
6696 (check_mem_read): Adjust.
6697 * mem-break.h (breakpoints_supported, breakpoint_here)
6698 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
6699 (reinsert_breakpoint_by_bp): Delete declaration.
6700 (delete_reinsert_breakpoints): Declare.
6701 (reinsert_breakpoint): Delete declaration.
6702 (reinsert_breakpoints_at): Declare.
6703 (uninsert_breakpoint): Delete declaration.
6704 (uninsert_breakpoints_at): Declare.
6705 (check_breakpoints): Adjust prototype.
6706 * server.h: Adjust include order.
6707 (struct thread_info): Declare here. Add a `last_status' field.
6708
30ba68cb
MS
67092010-03-23 Michael Snyder <msnyder@vmware.com>
6710
6711 * server.c (crc32): New function.
6712 (handle_query): Add handling for 'qCRC:' request.
6713
b9a881c2
PA
67142010-03-23 Pedro Alves <pedro@codesourcery.com>
6715
6716 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
6717 lwp had been stopped by a watchpoint.
6718
e92d13d5
PA
67192010-03-16 Pedro Alves <pedro@codesourcery.com>
6720
6721 * server.h (internal_error): Declare.
6722 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
6723 * utils.c (internal_error): New function.
6724
64daa791
AS
67252010-03-15 Andreas Schwab <schwab@redhat.com>
6726
6727 * configure.srv: Fix typo setting srv_regobj.
6728
f52cd8cd
PA
67292010-03-15 Pedro Alves <pedro@codesourcery.com>
6730
6731 * linux-low.c (fetch_register): Avoid passing a non string literal
6732 format to `error'.
6733 (usr_store_inferior_registers): Ditto.
6734
93ae6fdc
PA
67352010-03-14 Pedro Alves <pedro@codesourcery.com>
6736
6737 * linux-low.c (linux_write_memory): Bail out early if peeking
6738 memory failed.
6739
c3adc08c
PA
67402010-03-14 Pedro Alves <pedro@codesourcery.com>
6741
6742 * linux-low.h (struct lwp_info): New fields
6743 `stopped_by_watchpoint' and `stopped_data_address'.
6744 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
6745 here, and cache them in the lwp object.
6746 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
6747 directly.
6748 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
6749 field.
6750 (linux_stopped_by_watchpoint): Rewrite.
6751 (linux_stopped_data_address): Rewrite.
6752
bce522a2
PA
67532010-03-06 Simo Melenius <simo.melenius@iki.fi>
6754
6755 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
6756 switching the current inferior, not before.
6757
90884b2b
L
67582010-03-01 H.J. Lu <hongjiu.lu@intel.com>
6759
6760 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
6761 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
6762 i386-linux.c and amd64-linux.c.
6763 (reg-i386.o): Removed.
6764 (reg-i386.c): Likewise.
6765 (reg-i386-linux.o): Likewise.
6766 (reg-i386-linux.c): Likewise.
6767 (reg-x86-64.o): Likewise.
6768 (reg-x86-64.c): Likewise.
6769 (reg-x86-64-linux.o): Likewise.
6770 (reg-x86-64-linux.c): Likewise.
6771 (i386.o): New.
6772 (i386.c): Likewise.
6773 (i386-linux.o): Likewise.
6774 (i386-linux.c): Likewise.
6775 (amd64.o): Likewise.
6776 (amd64.c): Likewise.
6777 (amd64-linux.o): Likewise.
6778 (amd64-linux.c): Likewise.
6779
6780 * configure.srv (srv_i386_regobj): New.
6781 (srv_i386_linux_regobj): Likewise.
6782 (srv_amd64_regobj): Likewise.
6783 (srv_amd64_linux_regobj): Likewise.
6784 (srv_i386_32bit_xmlfiles): Likewise.
6785 (srv_i386_64bit_xmlfiles): Likewise.
6786 (srv_i386_xmlfiles): Likewise.
6787 (srv_amd64_xmlfiles): Likewise.
6788 (srv_i386_linux_xmlfiles): Likewise.
6789 (srv_amd64_linux_xmlfiles): Likewise.
6790 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
6791 srv_xmlfiles to $srv_i386_xmlfiles.
6792 (i[34567]86-*-mingw32ce*): Likewise.
6793 (i[34567]86-*-mingw*): Likewise.
6794 (i[34567]86-*-nto*): Likewise.
6795 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
6796 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
6797 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
6798 (x86_64-*-linux*): Likewise.
6799
6800 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
6801 (init_registers_amd64_linux): New.
6802 (x86_arch_setup): Replace init_registers_x86_64_linux with
6803 init_registers_amd64_linux.
6804
193f13e6
MK
68052010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
6806
6807 * configure.ac: Check for libdl. If it is not available link against
6808 static libthread_db.
6809 * configure: Regenerate.
6810
85d721b8
PA
68112010-02-22 Pedro Alves <pedro@codesourcery.com>
6812
6813 PR9605
6814
6815 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
6816 handing a read watchpoint.
6817 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
6818
6076632b
DE
68192010-02-12 Doug Evans <dje@google.com>
6820
6821 * linux-low.c (linux_supports_tracefork_flag): Document.
6822 (linux_look_up_symbols): Add comment.
6823
3327ccf7
L
68242010-02-03 H.J. Lu <hongjiu.lu@intel.com>
6825
6826 * regcache.c (supply_register): Clear regcache if buf is NULL.
6827
0718675c 68282010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 6829 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
6830
6831 * inferiors.c (find_inferior): Add function documentation.
6832 (unloaded_dll): Handle the case where the unloaded dll has not
6833 been previously registered in the dll list.
6834
177321bd
DJ
68352010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
6836
6837 * linux-arm-low.c (thumb_breakpoint_len): Delete.
6838 (thumb2_breakpoint): New.
6839 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
6840
2b009048
DJ
68412010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
6842
6843 * linux-low.c (get_stop_pc): Check for SIGTRAP.
6844 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
6845 breakpoints.
6846
3be029c7
PA
68472010-01-21 Pedro Alves <pedro@codesourcery.com>
6848
6849 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
6850
18f5de3b
JK
68512010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6852
6853 * linux-s390-low.c (s390_collect_ptrace_register)
6854 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
6855
3743bb4f
DE
68562010-01-21 Doug Evans <dje@google.com>
6857
14ce3065
DE
6858 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
6859 (PTRACE_ARG4_TYPE): New macro.
6860 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
6861 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
6862 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
6863 (usr_store_inferior_registers): Ditto.
6864 (linux_read_memory, linux_write_memory): Ditto.
6865 (linux_test_for_tracefork): Ditto.
6866
3743bb4f
DE
6867 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
6868 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
6869
8b315be5
PA
68702010-01-21 Pedro Alves <pedro@codesourcery.com>
6871
6872 * proc-service.c (ps_lgetregs): Don't refetch registers from the
6873 target.
6874
85492558
PA
68752010-01-21 Pedro Alves <pedro@codesourcery.com>
6876
6877 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
6878 prototype to take a regcache. Adjust.
6879
442ea881
PA
68802010-01-20 Pedro Alves <pedro@codesourcery.com>
6881
6882 * regcache.h (struct thread_info): Forward declare.
6883 (struct regcache): New.
6884 (new_register_cache): Adjust prototype.
6885 (get_thread_regcache): Declare.
6886 (free_register_cache): Adjust prototype.
6887 (registers_to_string, registers_from_string): Ditto.
6888 (supply_register, supply_register_by_name, collect_register)
6889 (collect_register_as_string, collect_register_by_name): Ditto.
6890 * regcache.c (struct inferior_regcache_data): Delete.
6891 (get_regcache): Rename to ...
6892 (get_thread_regcache): ... this. Adjust. Switch inferior before
6893 fetching registers.
6894 (regcache_invalidate_one): Adjust.
6895 (regcache_invalidate): Fix prototype.
6896 (new_register_cache): Return the new register cache.
6897 (free_register_cache): Change prototype.
6898 (realloc_register_cache): Adjust.
6899 (registers_to_string): Change prototype to take a regcache. Adjust.
6900 (registers_from_string): Ditto.
6901 (register_data): Ditto.
6902 (supply_register): Ditto.
6903 (supply_register_by_name): Ditto.
6904 (collect_register): Ditto.
6905 (collect_register_as_string): Ditto.
6906 (collect_register_by_name): Ditto.
6907 * server.c (process_serial_event): Adjust.
6908 * linux-low.h (regset_fill_func, regset_store_func): Change
6909 prototype.
6910 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
6911 Change prototype.
6912 * linux-low.c (get_stop_pc): Adjust.
6913 (check_removed_breakpoint): Adjust.
6914 (linux_wait_for_event): Adjust.
6915 (linux_resume_one_lwp): Adjust.
6916 (fetch_register): Add regcache parameter. Adjust.
6917 (usr_store_inferior_registers): Ditto.
6918 (regsets_fetch_inferior_registers): Ditto.
6919 (regsets_store_inferior_registers): Ditto.
6920 (linux_fetch_registers, linux_store_registers): Ditto.
6921 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
6922 regcache. Adjust.
43aaf8b6
PA
6923 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
6924 Ditto.
442ea881
PA
6925 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
6926 prototype to take a regcache.
6927 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
6928 * remote-utils.c (convert_ascii_to_int, outreg)
6929 (prepare_resume_reply): Change prototype to take a regcache.
6930 Adjust.
6931 * target.h (struct target_ops) <fetch_registers, store_registers>:
6932 Change prototype to take a regcache.
6933 (fetch_inferior_registers, store_inferior_registers): Change
6934 prototype to take a regcache. Adjust.
6935 * proc-service.c (ps_lgetregs): Adjust.
6936 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
6937 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
6938 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
6939 take a regcache. Adjust.
6940 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
6941 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
6942 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
6943 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
6944 * linux-cris-low.c (cris_get_pc, cris_set_pc)
6945 (cris_cannot_fetch_register):
6946 (cris_breakpoint_at): Change prototype to take a regcache.
6947 Adjust.
6948 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
6949 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
6950 to take a regcache. Adjust.
6951 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
6952 Adjust.
6953 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
6954 take a regcache. Adjust.
6955 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
6956 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
6957 (m68k_set_pc): Change prototype to take a regcache. Adjust.
6958 * linux-mips-low.c (mips_get_pc):
6959 (mips_set_pc): Change prototype to take a regcache. Adjust.
6960 (mips_reinsert_addr): Adjust.
6961 (mips_collect_register): Change prototype to take a regcache.
6962 Adjust.
6963 (mips_supply_register):
6964 (mips_collect_register_32bit, mips_supply_register_32bit)
6965 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
6966 (mips_store_fpregset): Ditto.
43aaf8b6
PA
6967 * linux-ppc-low.c (ppc_supply_ptrace_register)
6968 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
6969 (parse_spufs_run): Adjust.
6970 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
6971 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
6972 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
6973 take a regcache. Adjust.
6974 * linux-s390-low.c (s390_collect_ptrace_register)
6975 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
6976 (s390_set_pc): Change prototype to take a regcache. Adjust.
6977 (s390_arch_setup): Adjust.
6978 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
6979 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
6980 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
6981 (sparc_fill_gregset, sparc_store_gregset_from_stack)
6982 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
6983 regcache. Adjust.
6984 (sparc_breakpoint_at): Adjust.
6985 * linux-xtensa-low.c (xtensa_fill_gregset):
6986 (xtensa_store_gregset):
6987 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
6988 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
6989 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
6990 prototype to take a regcache. Adjust.
6991 * win32-arm-low.c (arm_fetch_inferior_register)
6992 (arm_store_inferior_register): Change prototype to take a
6993 regcache. Adjust.
6994 * win32-i386-low.c (i386_fetch_inferior_register)
6995 (i386_store_inferior_register): Change prototype to take a
6996 regcache. Adjust.
6997 * win32-low.c (child_fetch_inferior_registers)
6998 (child_store_inferior_registers): Change prototype to take a
6999 regcache. Adjust.
7000 (win32_wait): Adjust.
7001 (win32_fetch_inferior_registers): Change prototype to take a
7002 regcache. Adjust.
7003 (win32_store_inferior_registers): Adjust.
7004 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7005 store_inferior_register>: Change prototype to take a regcache.
7006
60c3d7b0
DE
70072010-01-20 Doug Evans <dje@google.com>
7008
7009 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7010 #ifdef.
7011 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 7012 (W_STOPCODE): Provide definition if missing.
60c3d7b0 7013
dc146f7c
VP
70142010-01-13 Vladimir Prus <vladimir@codesourcery.com>
7015
7016 * linux-low.c (linux_core_of_thread): New.
7017 (compare_ints, show_process, list_threads): New.
7018 (linux_qxfer_osdata): Report threads and cores.
7019 (linux_target_op): Register linux_core_of_thread.
7020 * remote-utils.c (prepare_resume_reply): Report the core.
7021 (buffer_xml_printf): Support %d specifier.
7022 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
7023 New.
7024 (handle_query): Handle qXfer:threads. Announce availability
7025 thereof.
7026 * target.h (struct target_ops): New field core_of_thread.
7027
7803799a
UW
70282010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
7029
7030 * Makefile.in (clean): Remove new generated files.
7031 (reg-s390.o, reg-s390.c): Remove rules.
7032 (reg-s390x.o, reg-s390x.c): Likewise.
7033 (s390-linux32.o, s390-linux32.c): Add rules.
7034 (s390-linux64.o, s390-linux64.c): Likewise.
7035 (s390x-linux64.o, s390x-linux64.c): Likewise.
7036 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7037 * linux-s390-low.c: Include <elf.h>.
7038 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7039 (init_registers_s390): Remove prototype.
7040 (init_registers_s390x): Likewise.
7041 (init_registers_s390_linux32): Add prototype.
7042 (init_registers_s390_linux64): Likewise.
7043 (init_registers_s390x_linux64): Likewise.
7044 (s390_num_regs_3264): New define.
7045 (s390_regmap_3264): New global variable.
7046 (s390_cannot_fetch_register): Remove obsolete check.
7047 (s390_cannot_store_register): Likewise.
7048 (s390_collect_ptrace_register): Handle upper/lower register halves.
7049 (s390_supply_ptrace_register): Likewise.
7050 (s390_fill_gregset): Update to register number changes.
7051 (s390_get_hwcap): New routine.
7052 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7053 Install appropriate regmap and register set.
7054
6e7ffa39
JB
70552010-01-01 Joel Brobecker <brobecker@adacore.com>
7056
7057 * server.c (gdbserver_version): Update copyright year to 2010.
7058 * gdbreplay.c (gdbreplay_version): Likewise.
7059
957f3f49
DE
70602009-12-28 Doug Evans <dje@google.com>
7061
7062 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7063 elf/external.h. Include <elf.h> instead but only if necessary.
7064
ca5c370d
PA
70652009-12-28 Pedro Alves <pedro@codesourcery.com>
7066
7067 * linux-low.c (linux_remove_process): Remove `detaching'
7068 parameter. Don't release/detach from thread_db here.
7069 (linux_kill): Release/detach from thread_db here, ...
7070 (linux_detach): ... and here, before actually detaching.
7071 (linux_wait_1): ... and here, when a process exits.
7072 * thread-db.c (any_thread_of): New.
7073 (thread_db_free): Switch the current inferior to a thread of the
7074 passed in process.
7075
4ee62156
DE
70762009-12-21 Doug Evans <dje@google.com>
7077
d90e6a88
DE
7078 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7079
c5f62d5f
DE
7080 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7081 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7082 warning ifndef __NR_tkill. Move setting of errno there too.
7083 Delete unnecessary resetting of errno after syscall.
7084 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7085
10e86dd7
DE
7086 * configure.ac: Check for dladdr.
7087 * config.in: Regenerate.
7088 * configure: Regenerate.
7089 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7090 (try_thread_db_load): Update.
7091
4ee62156
DE
7092 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7093
00f515da
DE
70942009-12-18 Doug Evans <dje@google.com>
7095
e9464885
DE
7096 * event-loop.c: Include unistd.h if it exists.
7097
07d4f67e
DE
7098 * linux-low.c (my_waitpid): Move definition away from being in
7099 between linux_tracefork_child/linux_test_for_tracefork.
7100
00f515da
DE
7101 * gdb_proc_service.h (psaddr_t): Fix type.
7102 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7103 signature to match glibc.
7104
1de1badb
DE
71052009-12-16 Doug Evans <dje@google.com>
7106
7107 * linux-low.c (linux_read_memory): Fix argument to read.
7108
aeeb81d1
PA
71092009-11-26 Pedro Alves <pedro@codesourcery.com>
7110
7111 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
7112 events, don't leave current_inferior pointing at null.
7113
10357975
PA
71142009-11-26 Pedro Alves <pedro@codesourcery.com>
7115
7116 * win32-low.c (LOG): Delete.
7117 (OUTMSG): Output to stderr.
7118 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
7119 on compile time LOG macro.
7120 (win32_wait): Fix debug output.
7121
cf6e3471
PA
71222009-11-26 Pedro Alves <pedro@codesourcery.com>
7123
7124 * win32-low.c (win32_add_one_solib): If the dll name is
7125 "ntdll.dll", prepend the system directory to the dll path.
7126
0c85e18e
MK
71272009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
7128
7129 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
7130
9ac544ce 71312009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 7132 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
7133
7134 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
7135 * configure.ac: Check for __mcoldfire__ and set
7136 gdb_cv_m68k_is_coldfire.
7137 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
7138 reg-cf.o and reg-m68k.o.
7139 * configure: Regenerated.
7140
fd7dd3e6
PA
71412009-11-16 Pedro Alves <pedro@codesourcery.com>
7142
7143 * linux-low.c (linux_remove_process): Add `detaching' parameter.
7144 Pass it to thread_db_free.
7145 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
7146 proper `detaching' argument to linux_remove_process.
7147 * linux-low.h (thread_db_free): Add `detaching' parameter.
7148 * thread-db.c (thread_db_init): Pass false as `detaching' argument
7149 to thread_db_free.
7150 (thread_db_free): Add `detaching' parameter. Only
7151 call td_ta_clear_event if detaching from process.
7152
75aa492e
MK
71532009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
7154
7155 * thread-db.c (thread_db_free): Fix typo.
7156
21e1bee4
PP
71572009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
7158
7159 PR gdb/10838
7160 * thread-db.c (thread_db_free): Call td_ta_clear_event.
7161
8838b45e
NS
71622009-11-03 Nathan Sidwell <nathan@codesourcery.com>
7163
7164 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
7165 with an i686 compiler.
7166 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
7167 needed.
7168 * configure: Rebuilt.
7169
8a35fb51
SL
71702009-10-29 Sandra Loosemore <sandra@codesourcery.com>
7171
7172 PR gdb/10783
7173
7174 * server.c (handle_search_memory_1): Correct read_addr initialization
7175 in loop for searching subsequent chunks.
7176
96f15937
PP
71772009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
7178
7179 * configure.ac: New --with-libthread-db option.
7180 * thread-db.c: Allow direct dependence on libthread_db.
7181 (thread_db_free): Adjust.
7182 * config.in: Regenerate.
7183 * configure: Likewise.
889bf7c5 7184
5f7d1694
PP
71852009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
7186
7187 PR gdb/10757
7188 * thread-db.c (attach_thread): New function.
7189 (maybe_attach_thread): Return success/failure.
7190 (find_new_threads_callback): Adjust.
889bf7c5
PA
7191 (thread_db_find_new_threads): Loop until no new threads.
7192
88e3b899
PA
71932009-10-13 Pedro Alves <pedro@codesourcery.com>
7194
7195 * proc-service.c (ps_lgetregs): Formatting.
7196
cdbfd419
PP
71972009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
7198
7199 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
7200 * configure.ac: Adjust.
7201 * linux-low.h (struct process_info_private): Move members to struct
7202 thread_db.
7203 (thread_db_free, thread_db_handle_monitor_command): New prototype.
7204 * linux-low.c (linux_remove_process): Adjust.
7205 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
7206 * server.c (handle_query): Move code ...
7207 (handle_monitor_command): ... here. New function.
7208 * target.h (struct target_ops): New member.
7209 * thread-db.c (struct thread_db): New.
7210 (libthread_db_search_path): New variable.
7211 (thread_db_create_event, thread_db_enable_reporting)
7212 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
7213 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
7214 (try_thread_db_load_1, dladdr_to_soname): New functions.
7215 (try_thread_db_load, thread_db_load_search): New functions.
7216 (thread_db_init): Search for libthread_db.
7217 (thread_db_free): New function.
7218 (thread_db_handle_monitor_command): Likewise.
7219 * config.in: Regenerate.
7220 * configure: Regenerate.
889bf7c5 7221
4168d2d6
UW
72222009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
7223
7224 * spu-low.c (spu_kill): Wait for inferior to terminate.
7225 Call clear_inferiors.
7226 (spu_detach): Call clear_inferiors.
7227
81ecdfbb
RW
72282009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7229
7230 * aclocal.m4: Regenerate.
7231 * config.in: Likewise.
7232 * configure: Likewise.
7233
0b9ff2c0
UW
72342009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7235
7236 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
7237 (parse_spufs_run): New function.
7238 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
7239 (ppc_breakpoint_at): Handle SPU breakpoints.
7240
efcbbd14
UW
72412009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7242
7243 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
7244 (SPUFS_MAGIC): Define.
7245 (spu_enumerate_spu_ids): New function.
7246 (linux_qxfer_spu): New function.
7247 (linux_target_ops): Install linux_qxfer_spu.
7248
f4d9bade
UW
72492009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7250
7251 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
7252 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
7253 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
7254 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
7255 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
7256 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
7257 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
7258 (init_registers_powerpc_cell32l): Add prototype.
7259 (init_registers_powerpc_cell64l): Likewise.
7260 (ppc_arch_setup): Detect Cell/B.E. architecture.
7261
96e946ca
RW
72622009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7263
7264 * Makefile.in (datarootdir): New variable.
7265
58d6951d
DJ
72662009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7267
7268 * linux-low.c (linux_write_memory): Update debugging output.
7269 * Makefile.in (clean): Add new descriptions.
7270 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
7271 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
7272 * configure.srv: Add new files for arm*-*-linux*.
7273 * linux-arm-low.c: Add new declarations.
7274 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
7275 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
7276 (HWCAP_VFPv3D16): New.
7277 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
7278 instead of __IWMMXT__.
7279 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
7280 (arm_arch_setup): New.
7281 (target_regsets): Remove #ifdef. Add VFP regset.
7282 (the_low_target): Use arm_arch_setup.
7283
12b42a12
DJ
72842009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7285
7286 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
7287 the main thread again.
7288
ac8c974e
AR
72892009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
7290
7291 Adding Neutrino gdbserver.
7292 * configure: Regenerated.
7293 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
7294 * configure.srv (i[34567]86-*-nto*): New target.
7295 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
7296 * remote-utils.c [__QNX__]: Include sys/iomgr.h
7297 (nto_comctrl) [__QNX__]: New function.
7298 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
7299
4424e0c3 73002009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
7301
7302 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
7303 srv_tgtobj.
7304
912cf4ba
PA
73052009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
7306 Pedro Alves <pedro@codesourcery.com>
7307
7308 * win32-i386-low.c (i386_get_thread_context): Handle systems that
7309 don't support CONTEXT_EXTENDED_REGISTERS.
7310 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
7311 (the_low_target): Install them.
7312 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
7313 failing with ERROR_PIPE_NOT_CONNECTED.
7314
aa5ca48f
DE
73152009-06-30 Doug Evans <dje@google.com>
7316 Pierre Muller <muller@ics.u-strasbg.fr>
7317
7318 Add h/w watchpoint support to x86-linux, win32-i386.
7319 * Makefile.in (SFILES): Add i386-low.c
7320 (i386_low_h): Define.
7321 (i386-low.o): Add dependencies.
7322 (linux-x86-low.o): Add i386-low.h dependency.
7323 (win32-i386-low.o): Ditto.
7324 * i386-low.c: New file.
7325 * i386-low.h: New file.
7326 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
7327 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
7328 * linux-low.c (linux_add_process): Initialize arch_private.
7329 (linux_remove_process): Free arch_private.
7330 (add_lwp): Initialize arch_private.
7331 (delete_lwp): Free arch_private.
7332 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
7333 provided.
7334 * linux-low.h (process_info_private): New member arch_private.
7335 (lwp_info): New member arch_private.
7336 (linux_target_ops): New members new_process, new_thread,
7337 prepare_to_resume.
7338 (ptid_of): New macro.
7339 * linux-x86-low.c: Include stddef.h, i386-low.h.
7340 (arch_process_info): New struct.
7341 (arch_lwp_info): New struct.
7342 (x86_linux_dr_get, x86_linux_dr_set): New functions.
7343 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7344 (i386_dr_low_get_status): New function.
7345 (x86_insert_point, x86_remove_point): New functions.
7346 (x86_stopped_by_watchpoint): New function.
7347 (x86_stopped_data_address): New function.
7348 (x86_linux_new_process, x86_linux_new_thread): New functions.
7349 (x86_linux_prepare_to_resume): New function.
7350 (the_low_target): Add entries for insert_point, remove_point,
7351 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
7352 prepare_to_resume.
7353 * server.c (debug_hw_points): New global.
7354 (monitor_show_help): Document set debug-hw-points.
7355 (handle_query): Process "set debug-hw-points".
7356 * server.h (debug_hw_points): Declare.
7357 (paddress): Declare.
7358 * utils.c (NUMCELLS, CELLSIZE): New macros.
7359 (get_sell, xsnprintf, paddress): New functions.
7360 * win32-arm-low.c (the_low_target): Add entries for insert_point,
7361 remove_point, stopped_by_watchpoint, stopped_data_address.
7362 * win32-i386-low.c: Include i386-low.h.
7363 (debug_reg_state): Replaces dr.
7364 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7365 (i386_dr_low_get_status): New function.
7366 (i386_insert_point, i386_remove_point): New functions.
7367 (i386_stopped_by_watchpoint): New function.
7368 (i386_stopped_data_address): New function.
7369 (i386_initial_stuff): Update.
7370 (get_thread_context,set_thread_context,i386_thread_added): Update.
7371 (the_low_target): Add entries for insert_point,
7372 remove_point, stopped_by_watchpoint, stopped_data_address.
7373 * win32-low.c (win32_insert_watchpoint): New function.
7374 (win32_remove_watchpoint): New function.
7375 (win32_stopped_by_watchpoint): New function.
7376 (win32_stopped_data_address): New function.
7377 (win32_target_ops): Add entries for insert_watchpoint,
7378 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
7379 * win32-low.h (win32_target_ops): New members insert_point,
7380 remove_point, stopped_by_watchpoint, stopped_data_address.
7381
d993e290
PA
73822009-06-25 Pedro Alves <pedro@codesourcery.com>
7383
7384 * server.c (process_serial_event): Re-return unsupported, not
7385 error, if the type isn't recognized. Re-allow supporting only
7386 insert or remove packets. Also call require_running for
7387 breakpoints. Add missing break statement to default case. Tidy.
7388 * target.h (struct target_ops): Rename insert_watchpoint to
7389 insert_point, and remove_watchpoint to remove_point.
7390
7391 * linux-low.h (struct linux_target_ops): Likewise.
7392 * linux-low.c (linux_insert_watchpoint): Rename to ...
7393 (linux_insert_point): ... this. Adjust.
7394 (linux_remove_watchpoint): Rename to ...
7395 (linux_remove_point): ... this. Adjust.
7396 (linux_target_ops): Adjust.
7397 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
7398 (cris_insert_point): ... this.
7399 (cris_remove_watchpoint): Rename to ...
7400 (cris_remove_point): ... this.
7401 (the_low_target): Adjust.
7402
0f54c268
PM
74032009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
7404
7405 * server.c (handle_v_kill): Pass signal_pid to
7406 kill_inferior if multi_process is zero.
7407
c6314022
AR
74082009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
7409
7410 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
7411 * target.h (target_ops): Comment for *_watchpoint to make it clear
7412 the functions can get types '0' and '1'.
7413
4463ce24
AR
74142009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
7415
7416 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
7417 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
7418 * regcache.c (get_regcache): Likewise.
7419 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
7420 * win32-low.c (child_fetch_inferior_registers): Remove check for
7421 regno 0.
7422
cf8fd78b
PA
74232009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
7424 Pedro Alves <pedro@codesourcery.com>
7425
7426 * target.h (struct target_ops) <supports_multi_process>: New
7427 callback.
7428 (target_supports_multi_process): New.
7429 * server.c (handle_query): Even if GDB reports support, only
7430 enable multi-process if the target also supports it. Report
7431 multi-process support only if the target backend supports it.
7432 * linux-low.c (linux_supports_multi_process): New function.
7433 (linux_target_ops): Install it as target_supports_multi_process
7434 callback.
7435
47c0c975
DE
74362009-05-24 Doug Evans <dje@google.com>
7437
e09875d4
DE
7438 Global renaming of find_thread_pid to find_thread_ptid.
7439 * server.h (find_thread_ptid): Renamed from find_thread_pid.
7440 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
7441 All callers updated.
7442
e27d73f6
DE
7443 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
7444 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
7445 directly.
7446
47c0c975
DE
7447 * linux-low.c (get_stop_pc): Print pc if debug_threads.
7448 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
7449 (linux_resume_one_lwp): Ditto.
7450
2acc282a
DE
74512009-05-23 Doug Evans <dje@google.com>
7452
7453 * linux-low.c (linux_resume_one_lwp): Change type of first arg
7454 from struct inferior_list_entry * to struct lwp_info *.
7455 All callers updated.
7456
9f1036c1
DE
74572009-05-13 Doug Evans <dje@google.com>
7458
7459 * linux-x86-low.c: Don't include assert.h.
7460 (x86_siginfo_fixup): Use fatal, not assert.
7461 (x86_arch_setup): Fix comment.
7462
d0722149
DE
74632009-05-12 Doug Evans <dje@google.com>
7464
7465 Biarch support for i386/amd64 gdbserver.
7466 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
7467 Add linux-x86-low.c.
7468 (linux-i386-low.o, linux-x86-64-low.o): Delete.
7469 (linux-x86-low.o): Add.
7470 * linux-x86-64-low.c: Delete.
7471 * linux-i386-low.c: Delete.
7472 * linux-x86-low.c: New file.
7473 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
7474 linux-x86-low.o.
7475 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
7476 linux-x86-low.o.
7477 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
7478 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
7479 (linux_child_pid_to_exec_file): New function.
7480 (elf_64_header_p, elf_64_file_p): New functions.
7481 (siginfo_fixup): New function.
7482 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
7483 give target a chance to convert layout.
7484 * linux-low.h (linux_target_ops): New member siginfo_fixup.
7485 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
7486
fdeb2a12
DE
74872009-05-07 Doug Evans <dje@google.com>
7488
7489 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
7490 (regsets_store_inferior_registers): Ditto.
7491
a6dbe5df
PA
74922009-05-06 Pedro Alves <pedro@codesourcery.com>
7493
7494 PR server/10048
7495
7496 * linux-low.c (must_set_ptrace_flags): Delete.
7497 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
7498 of the global.
7499 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
7500 `lwp->must_set_ptrace_flags' instead.
ba42693b 7501 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
7502 (linux_wait_1): ... not here.
7503
5091eb23
DE
75042009-04-30 Doug Evans <dje@google.com>
7505
9f767825
DE
7506 * inferiors.c (started_inferior_callback): New function.
7507 (attached_inferior_callback): New function.
7508 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
7509 * server.c (print_started_pid, print_attached_pid): New functions.
7510 (detach_or_kill_for_exit): New function.
7511 (main): Call it instead of for_each_inferior (kill_inferior_callback).
7512 * server.h (have_started_inferiors_p): Declare.
7513 (have_attached_inferiors_p): Declare.
7514
5091eb23
DE
7515 * inferiors.c (remove_process): Fix memory leak, free process.
7516 * linux-low.c (linux_remove_process): New function.
7517 (linux_kill): Call it instead of remove_process.
7518 (linux_detach, linux_wait_1): Ditto.
7519
155c8968
PA
75202009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
7521
7522 * configure.srv: Add x86 Windows CE target.
7523
7fe519cb
UW
75242009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7525
7526 * inferiors.c (get_thread_process): Make global.
7527 * server.h (get_thread_process): Add prototype.
7528 * thread-db.c (find_one_thread): Use get_thread_process
7529 instead of current_process.
7530 (thread_db_get_tls_address): Do not crash if called when
7531 thread layer is not yet initialized.
7532
5472f405
UW
75332009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7534
7535 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
7536 * spu-low.c (current_tid): Rename to ...
7537 (current_ptid): ... this.
7538 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
7539 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
7540 ptid_get_lwp (current_ptid) instead of current_tid.
7541 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
7542 instead of current_tid. Use find_process_pid to verify pid
7543 argument is valid. Pass proper argument to remove_process.
7544 (spu_thread_alive): Compare current_ptid instead of current_tid.
7545 (spu_resume): Likewise.
7546
55ac2b99
PA
75472009-04-02 Pedro Alves <pedro@codesourcery.com>
7548
7549 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
7550 variable.
7551
95954743
PA
75522009-04-01 Pedro Alves <pedro@codesourcery.com>
7553
7554 Implement the multiprocess extensions, and add linux multiprocess
7555 support.
7556
7557 * server.h (ULONGEST): Declare.
7558 (struct ptid, ptid_t): New.
7559 (minus_one_ptid, null_ptid): Declare.
7560 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7561 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
7562 (struct inferior_list_entry): Change `id' type from unsigned from
7563 to ptid_t.
7564 (struct sym_cache, struct breakpoint, struct
7565 process_info_private): Forward declare.
7566 (struct process_info): Declare.
7567 (current_process): Declare.
7568 (all_processes): Declare.
7569 (initialize_inferiors): Declare.
7570 (add_thread): Adjust to use ptid_t.
7571 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
7572 (add_process, remove_process, find_thread_pid): Declare.
7573 (find_inferior_id): Adjust to use ptid_t.
7574 (cont_thread, general_thread, step_thread): Change type to ptid_t.
7575 (multi_process): Declare.
7576 (push_event): Adjust to use ptid_t.
7577 (read_ptid, write_ptid): Declare.
7578 (prepare_resume_reply): Adjust to use ptid_t.
7579 (clear_symbol_cache): Declare.
7580 * inferiors.c (all_processes): New.
7581 (null_ptid, minus_one_ptid): New.
7582 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7583 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
7584 (add_thread): Change unsigned long to ptid. Remove gdb_id
7585 parameter. Adjust.
7586 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
7587 (gdb_id_to_thread): Rename to ...
7588 (find_thread_pid): ... this. Change unsigned long to ptid.
7589 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
7590 (loaded_dll, pull_pid_from_list): Adjust.
7591 (add_process, remove_process, find_process_pid)
7592 (get_thread_process, current_process, initialize_inferiors): New.
7593 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
7594 (struct target_waitstatus) <related_pid>: Ditto.
7595 (struct target_ops) <kill, detach>: Add `pid' argument. Change
7596 return type to int.
7597 (struct target_ops) <join>: Add `pid' argument.
7598 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
7599 (struct target_ops) <wait>: Add `ptid' field. Change return type
7600 to ptid.
7601 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
7602 (mywait): Add `ptid' argument. Change return type to ptid_t.
7603 (target_pid_to_str): Declare.
7604 * target.c (set_desired_inferior): Adjust to use ptids.
7605 (mywait): Add new `ptid' argument. Adjust.
7606 (target_pid_to_str): New.
7607 * mem-break.h (free_all_breakpoints): Declare.
7608 * mem-break.c (breakpoints): Delelete.
7609 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
7610 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
7611 to use per-process breakpoint list.
7612 (free_all_breakpoints): New.
7613 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
7614 (symbol_cache, all_symbols_looked_up): Delete.
7615 (hexchars): New.
7616 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
7617 read_ptid): New.
7618 (prepare_resume_reply): Change ptid argument's type from unsigned
7619 long to ptid_t. Adjust. Implement W;process and X;process.
7620 (free_sym_cache, clear_symbol_cache): New.
7621 (look_up_one_symbol): Adjust to per-process symbol cache. *
7622 * server.c (cont_thread, general_thread, step_thread): Change type
7623 to ptid_t.
7624 (attached): Delete.
7625 (multi_process): New.
7626 (last_ptid): Change type to ptid_t.
7627 (struct vstop_notif) <ptid>: Change type to ptid_t.
7628 (queue_stop_reply, push_event): Change `ptid' argument's type to
7629 ptid_t.
7630 (discard_queued_stop_replies): Add `pid' argument.
7631 (start_inferior): Adjust to use ptids. Adjust to mywait interface
7632 changes. Don't reference the `attached' global.
7633 (attach_inferior): Adjust to mywait interface changes.
7634 (handle_query): Adjust to use ptids. Parse GDB's qSupported
7635 features. Handle and report "multiprocess+". Handle
7636 "qAttached:PID".
7637 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
7638 changes.
7639 (handle_v_kill): New.
7640 (handle_v_stopped): Adjust to use target_pid_to_str.
7641 (handle_v_requests): Allow multiple attaches and runs when
7642 multiprocess extensions are in effect. Handle "vKill".
7643 (myresume): Adjust to use ptids.
7644 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
7645 (handle_status): Adjust to discard_queued_stop_replies interface
7646 change.
7647 (first_thread_of, kill_inferior_callback)
7648 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
7649 (main): Call initialize_inferiors. Adjust to use ptids, killing
7650 and detaching from all inferiors. Handle multiprocess packet
7651 variants.
7652 * linux-low.h: Include gdb_proc_service.h.
7653 (struct process_info_private): New.
7654 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
7655 <lwpid_of>: Use ptid_get_lwp.
7656 (get_lwp_thread): Adjust.
7657 (struct lwp_info): Add `dead' member.
7658 (find_lwp_pid): Declare.
7659 * linux-low.c (thread_db_active): Delete.
7660 (new_inferior): Adjust comment.
7661 (inferior_pid): Delete.
7662 (linux_add_process): New.
7663 (handle_extended_wait): Adjust.
7664 (add_lwp): Change unsigned long to ptid.
7665 (linux_create_inferior): Add process to processes table. Adjust
7666 to use ptids. Don't set new_inferior here.
7667 (linux_attach_lwp): Rename to ...
7668 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
7669 it. Adjust to use ptids.
7670 (linux_attach_lwp): New.
7671 (linux_attach): Add process to processes table. Don't set
7672 new_inferior here.
7673 (struct counter): New.
7674 (second_thread_of_pid_p, last_thread_of_process_p): New.
7675 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
7676 multiple processes.
7677 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
7678 processes. Remove process from process table.
7679 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
7680 to multiple processes.
7681 (any_thread_of): New.
7682 (linux_detach): Add `pid' argument, and handle it. Remove process
7683 from processes table.
7684 (linux_join): Add `pid' argument. Handle it.
7685 (linux_thread_alive): Change unsighed long argument to ptid_t.
7686 Consider dead lwps as not being alive.
7687 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
7688 threads we're not interested in.
7689 (same_lwp, find_lwp_pid): New.
7690 (linux_wait_for_lwp): Change `pid' argument's type from int to
7691 ptid_t. Adjust.
7692 (linux_wait_for_event): Rename to ...
7693 (linux_wait_for_event_1): ... this. Change `pid' argument's type
7694 from int to ptid_t. Adjust.
7695 (linux_wait_for_event): New.
7696 (linux_wait_1): Add `ptid' argument. Change return type to
7697 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
7698 that exit from the process table.
7699 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
7700 Adjust.
7701 (mark_lwp_dead): New.
7702 (wait_for_sigstop): Adjust to use ptids. If a process exits while
7703 stopping all threads, mark its main lwp as dead.
7704 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
7705 ptids.
7706 (fetch_register, usr_store_inferior_registers)
7707 (regsets_fetch_inferior_registers)
7708 (regsets_store_inferior_registers, linux_read_memory)
7709 (linux_write_memory): Inline `inferior_pid'.
7710 (linux_look_up_symbols): Adjust to use per-process
7711 `thread_db_active'.
7712 (linux_request_interrupt): Adjust to use ptids.
7713 (linux_read_auxv): Inline `inferior_pid'.
7714 (initialize_low): Don't reference thread_db_active.
7715 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
7716 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
7717 (ps_getpid): Return the pid of the current inferior.
7718 * thread-db.c (proc_handle, thread_agent): Delete.
7719 (thread_db_create_event, thread_db_enable_reporting): Adjust to
7720 per-process data.
7721 (find_one_thread): Change argument type to ptid_t. Adjust to
7722 per-process data.
7723 (maybe_attach_thread): Adjust to per-process data and ptids.
7724 (thread_db_find_new_threads): Ditto.
7725 (thread_db_init): Ditto.
7726 * spu-low.c (spu_create_inferior, spu_attach): Add process to
7727 processes table. Adjust to use ptids.
7728 (spu_kill, spu_detach): Adjust interface. Remove process from
7729 processes table.
7730 (spu_join, spu_thread_alive): Adjust interface.
7731 (spu_wait): Adjust interface. Remove process from processes
7732 table. Adjust to use ptids.
7733 * win32-low.c (current_inferior_tid): Delete.
7734 (current_inferior_ptid): New.
7735 (debug_event_ptid): New.
7736 (thread_rec): Take a ptid. Adjust.
7737 (child_add_thread): Add `pid' argument. Adjust to use ptids.
7738 (child_delete_thread): Ditto.
7739 (do_initial_child_stuff): Add `attached' argument. Add process to
7740 processes table.
7741 (child_fetch_inferior_registers, child_store_inferior_registers):
7742 Adjust.
7743 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
7744 (win32_attach): Pass 1 to do_initial_child_stuff.
7745 (win32_kill): Adjust interface. Remove process from processes
7746 table.
7747 (win32_detach): Ditto.
7748 (win32_join): Adjust interface.
7749 (win32_thread_alive): Take a ptid.
7750 (win32_resume): Adjust to use ptids.
7751 (get_child_debug_event): Ditto.
7752 (win32_wait): Adjust interface. Remove exiting process from
7753 processes table.
7754
bd99dc85
PA
77552009-04-01 Pedro Alves <pedro@codesourcery.com>
7756
7757 Non-stop mode support.
7758
7759 * server.h (non_stop): Declare.
7760 (gdb_client_data, handler_func): Declare.
7761 (delete_file_handler, add_file_handler, start_event_loop):
7762 Declare.
7763 (handle_serial_event, handle_target_event, push_event)
7764 (putpkt_notif): Declare.
7765 * target.h (enum resume_kind): New.
7766 (struct thread_resume): Replace `step' field by `kind' field.
7767 (TARGET_WNOHANG): Define.
7768 (struct target_ops) <wait>: Add `options' argument.
7769 <supports_non_stop, async, start_non_stop>: New fields.
7770 (target_supports_non_stop, target_async): New.
7771 (start_non_stop): Declare.
7772 (mywait): Add `options' argument.
7773 * target.c (mywait): Add `options' argument. Print child exit
7774 notifications here.
7775 (start_non_stop): New.
7776 * server.c (non_stop, own_buf, mem_buf): New globals.
7777 (struct vstop_notif): New.
7778 (notif_queue): New global.
7779 (queue_stop_reply, push_event, discard_queued_stop_replies)
7780 (send_next_stop_reply): New.
7781 (start_inferior): Adjust to use resume_kind. Adjust to mywait
7782 interface changes.
7783 (attach_inferior): In non-stop mode, don't wait for the target
7784 here.
7785 (handle_general_set): Handle QNonStop.
7786 (handle_query): When handling qC, return the current general
7787 thread, instead of the first thread of the list.
7788 (handle_query): If the backend supports non-stop mode, include
7789 QNonStop+ in the qSupported query response.
7790 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
7791 and non-stop mode.
7792 (handle_v_attach, handle_v_run): Handle non-stop mode.
7793 (handle_v_stopped): New.
7794 (handle_v_requests): Report support for vCont;t. Handle vStopped.
7795 (myresume): Adjust to use resume_kind. Handle non-stop.
7796 (queue_stop_reply_callback): New.
7797 (handle_status): Handle non-stop mode.
7798 (main): Clear non_stop flag on reconnection. Use the event-loop.
7799 Refactor serial protocol handling from here ...
7800 (process_serial_event): ... to this new function. When GDB
7801 selects any thread, select one here. In non-stop mode, wait until
7802 GDB acks all pending events before exiting.
7803 (handle_serial_event, handle_target_event): New.
7804 * remote-utils.c (remote_open): Install remote_desc in the event
7805 loop.
7806 (remote_close): Remove remote_desc from the event loop.
7807 (putpkt_binary): Rename to...
7808 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
7809 (putpkt_binary): New as wrapper around putpkt_binary_1.
7810 (putpkt_notif): New.
7811 (prepare_resume_reply): In non-stop mode, don't change the
7812 general_thread.
7813 * event-loop.c: New.
7814 * Makefile.in (OBJ): Add event-loop.o.
7815 (event-loop.o): New rule.
7816
7817 * linux-low.h (pid_of): Moved here.
7818 (lwpid_of): New.
7819 (get_lwp_thread): Use lwpid_of.
7820 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
7821 * linux-low.c (pid_of): Delete.
7822 (inferior_pid): Use lwpid_of.
7823 (linux_event_pipe): New.
7824 (target_is_async_p): New.
7825 (delete_lwp): New.
7826 (handle_extended_wait): Use lwpid_of.
7827 (add_lwp): Don't set lwpid field.
7828 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
7829 (linux_kill_one_lwp): If killing a running lwp, stop it first.
7830 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
7831 (linux_detach_one_lwp): If detaching from a running lwp, stop it
7832 first. Adjust to linux_wait_for_event interface changes. Use
7833 lwpid_of.
7834 (linux_detach): Don't delete the main lwp here.
7835 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
7836 (status_pending_p): Don't consider explicitly suspended lwps.
7837 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
7838 pointer. Add OPTIONS argument. Change return type to int. Use
7839 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
7840 (linux_wait_for_event): Take an integer pid instead of a lwp_info
7841 pointer. Add status pointer argument. Return a pid instead of a
7842 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
7843 changes. In non-stop mode, don't switch to a random thread.
7844 (linux_wait): Rename to...
7845 (linux_wait_1): ... this. Add target_options argument, and handle
7846 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
7847 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
7848 clean exit and signal exit code. Don't stop all threads in
7849 non-stop mode. In all-stop mode, only stop all threads when
7850 reporting a stop to GDB. Handle explicit thread stop requests.
7851 (async_file_flush, async_file_mark): New.
7852 (linux_wait): New.
7853 (send_sigstop): Use lwpid_of.
7854 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
7855 interface changes. In non-stop mode, don't switch to a random
7856 thread.
7857 (linux_resume_one_lwp): Use lwpid_of.
7858 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
7859 (linux_resume_one_thread): ... this. Handle resume_stop. In
7860 non-stop mode, don't look for pending flag in all threads.
7861 (resume_status_pending_p): Don't consider explicitly suspended
7862 threads.
7863 (my_waitpid): Reimplement. Emulate __WALL.
7864 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
7865 Use lwpid_of.
7866 (sigchld_handler, linux_supports_non_stop, linux_async)
7867 (linux_start_non_stop): New.
7868 (linux_target_ops): Register linux_supports_non_stop, linux_async
7869 and linux_start_non_stop.
7870 (initialize_low): Install SIGCHLD handler.
7871 * thread-db.c (thread_db_create_event, find_one_thread)
7872 (thread_db_get_tls_address): Use lwpid_of.
7873 * win32-low.c (win32_detach): Adjust to use resume_kind.
7874 (win32_wait): Add `options' argument.
7875 * spu-low.c (spu_resume): Adjust to use resume_kind.
7876 (spu_wait): Add `options' argument.
7877
5b1c542e
PA
78782009-04-01 Pedro Alves <pedro@codesourcery.com>
7879
7880 Decouple target code from remote protocol.
7881
7882 * target.h (enum target_waitkind): New.
7883 (struct target_waitstatus): New.
7884 (struct target_ops) <wait>: Return an unsigned long. Take a
7885 target_waitstatus pointer instead of a char pointer.
7886 (mywait): Likewise.
7887 * target.c (mywait): Change prototype to return an unsigned long.
7888 Take a target_waitstatus pointer instead of a char pointer. Adjust.
7889 * server.h (thread_from_wait, old_thread_from_wait): Delete
7890 declarations.
7891 (prepare_resume_reply): Change prototype to take a
7892 target_waitstatus.
7893 * server.c (thread_from_wait, old_thread_from_wait): Delete.
7894 (last_status, last_ptid): New.
7895 (start_inferior): Remove "statusptr" argument. Adjust. Return a
7896 pid instead of a signal.
7897 (attach_inferior): Remove "status" and "signal" parameters.
7898 Adjust.
7899 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
7900 not as an address.
7901 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
7902 (handle_v_requests, myresume): Remove "status" and "signal"
7903 parameters. Adjust.
7904 (handle_status): New.
7905 (main): Delete local `status'. Adjust.
7906 * remote-utils.c: Include target.h.
7907 (prepare_resume_reply): Change prototype to take a
7908 target_waitstatus. Adjust.
7909
7910 * linux-low.c (linux_wait): Adjust to new target_ops->wait
7911 interface.
7912 * spu-low.c (spu_wait): Adjust.
7913 * win32-low.c (enum target_waitkind, struct target_waitstatus):
7914 Delete.
7915 (win32_wait): Adjust.
7916
2bd7c093
PA
79172009-04-01 Pedro Alves <pedro@codesourcery.com>
7918
7919 * target.h (struct thread_resume): Delete leave_stopped member.
7920 (struct target_ops): Add a `n' argument to the `resume' callback.
7921 * server.c (start_inferior): Adjust.
7922 (handle_v_cont, myresume): Adjust.
7923 * linux-low.c (check_removed_breakpoint): Adjust to resume
7924 interface change, and to removed leave_stopped field.
7925 (resume_ptr): Delete.
7926 (struct thread_resume_array): New.
7927 (linux_set_resume_request): Add new `arg' parameter. Adjust to
7928 resume interface change.
7929 (linux_continue_one_thread, linux_queue_one_thread)
7930 (resume_status_pending_p): Check if the resume field is NULL
7931 instead of checking the leave_stopped member.
7932 (linux_resume): Adjust to the target resume interface change.
7933 * spu-low.c (spu_resume): Adjust to the target resume interface
7934 change.
7935 * win32-low.c (win32_detach, win32_resume): Ditto.
7936
c35fafde
PA
79372009-04-01 Pedro Alves <pedro@codesourcery.com>
7938
7939 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
7940 flag.
7941 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
7942 pending.
7943 (linux_continue_one_thread): Only preserve the stepping flag if
7944 there's a pending breakpoint.
7945
0a59d50b
PA
79462009-03-31 Pedro Alves <pedro@codesourcery.com>
7947
7948 * server.c (main): After the inferior having exited, call
7949 remote_close before exiting gdbserver.
7950
f04c6d38
TJB
79512009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
7952
7953 Fix size of FPSCR in Power 7 processors.
7954 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
7955 (PPC_FEATURE_HAS_DFP): New #define.
7956 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
7957 size of the FPSCR.
7958
78e5cee6
PA
79592009-03-23 Pedro Alves <pedro@codesourcery.com>
7960
7961 * server.c (handle_query) Whitespace and formatting.
7962
1b3f6016
PA
79632009-03-22 Pedro Alves <pedro@codesourcery.com>
7964
7965 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
7966 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
7967 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
7968 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
7969 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
7970 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
7971 Makefile.in, configure.ac: Fix whitespace throughout.
7972 * configure: Regenerate.
7973
a07b2135
PA
79742009-03-22 Pedro Alves <pedro@codesourcery.com>
7975
7976 * inferiors.c (find_inferior): Make it safe for the callback
7977 function to delete the currently iterated inferior.
7978
67cc2626
PA
79792009-03-22 Pedro Alves <pedro@codesourcery.com>
7980
7981 * Makefile.in (linuw_low_h): Move higher.
7982 (thread-db.o): Depend on $(linux_low_h).
7983
54a0b537
PA
79842009-03-17 Pedro Alves <pedro@codesourcery.com>
7985
7986 Rename "process" to "lwp" throughout.
7987
7988 * linux-low.c (all_processes): Rename to...
7989 (all_lwps): ... this.
7990 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
7991 (add_process): Rename to ...
7992 (add_lwp): ... this. Adjust.
7993 (linux_create_inferior): Adjust.
7994 (linux_attach_lwp): Adjust.
7995 (linux_attach): Adjust.
7996 (linux_kill_one_process): Rename to ...
7997 (linux_kill_one_lwp): ... this. Adjust.
7998 (linux_kill): Adjust.
7999 (linux_detach_one_process): Rename to ...
8000 (linux_detach_one_lwp): ... this. Adjust.
8001 (linux_detach): Adjust.
8002 (check_removed_breakpoint): Adjust.
8003 (status_pending_p): Adjust.
8004 (linux_wait_for_process): Rename to ...
8005 (linux_wait_for_lwp): ... this. Adjust.
8006 (linux_wait_for_event): Adjust.
8007 (send_sigstop): Adjust.
8008 (wait_for_sigstop): Adjust.
8009 (stop_all_processes): Rename to ...
8010 (stop_all_lwps): ... this.
8011 (linux_resume_one_process): Rename to ...
8012 (linux_resume_one_lwp): ... this. Adjust.
8013 (linux_set_resume_request, linux_continue_one_thread)
8014 (linux_queue_one_thread, resume_status_pending_p)
8015 (usr_store_inferior_registers, regsets_store_inferior_registers)
8016 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8017 Adjust.
8018 * linux-low.h (get_process): Rename to ...
8019 (get_lwp): ... this. Adjust.
8020 (get_thread_process): Rename to ...
8021 (get_thread_lwp): ... this. Adjust.
8022 (get_process_thread): Rename to ...
8023 (get_lwp_thread): ... this. Adjust.
8024 (struct process_info): Rename to ...
8025 (struct lwp_info): ... this.
8026 (all_processes): Rename to ...
8027 (all_lwps): ... this.
8028 * proc-service.c (ps_lgetregs): Adjust.
8029 * thread-db.c (thread_db_create_event, find_one_thread)
8030 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
8031
0b16c5cf
PA
80322009-03-14 Pedro Alves <pedro@codesourcery.com>
8033
8034 * server.c (handle_query): Handle "qAttached".
8035
32de4b9d
NS
80362009-03-13 Nathan Sidwell <nathan@codesourcery.com>
8037
8038 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8039 GPLv3, update license URL.
8040
2aecd87f
DE
80412009-03-01 Doug Evans <dje@google.com>
8042
93efd302 8043 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
8044 (server_h): Add gdb_signals.h.
8045 (signals.o): Update.
8046 * server.h (target_signal_from_host,target_signal_to_host_p)
8047 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8048
86b1f9c5
PM
80492009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8050
8051 * remote-utils.c (getpkt): Also generate remote-debug
8052 information if noack_mode is set.
8053
4aa995e1
PA
80542009-02-06 Pedro Alves <pedro@codesourcery.com>
8055
8056 * server.c (handle_query): Report qXfer:siginfo:read and
8057 qXfer:siginfo:write as supported and handle them.
8058 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8059 * linux-low.c (linux_xfer_siginfo): New.
8060 (linux_target_ops): Set it.
8061
62709adf
PA
80622009-01-26 Pedro Alves <pedro@codesourcery.com>
8063
8064 * server.c (gdbserver_usage): Mention --remote-debug.
8065 (main): Accept '--remote-debug' switch.
8066
aef93bd7
DE
80672009-01-18 Doug Evans <dje@google.com>
8068
8069 * regcache.c (new_register_cache): No need to check result of xcalloc.
8070 * server.c (handle_search_memory): Back out calls to xmalloc,
8071 result is checked and error is returned to user upon failure.
8072 (handle_query): Ditto. Add more checks for result of malloc.
8073 (handle_v_cont): Check result of malloc, report error back to
8074 user upon failure.
8075 (handle_v_run): Ditto. Call freeargv.
8076 * server.h (freeargv): Declare.
8077 * utils.c (freeargv): New fn.
8078
54363045
DE
80792009-01-15 Doug Evans <dje@google.com>
8080
f626972c
DE
8081 * gdbreplay.c (perror_with_name): Make arg const char *.
8082 * server.h (target_signal_to_name): Make return type const char *.
0842e787 8083 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 8084 * utils.c (perror_with_name): Make arg const char *.
54363045 8085
18aae699
PA
80862009-01-14 Pedro Alves <pedro@codesourcery.com>
8087
8088 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8089 when handling a EXIT_PROCESS_DEBUG_EVENT.
8090
ff703abe
JB
80912009-01-06 Joel Brobecker <brobecker@adacore.com>
8092
8093 * gdbreplay.c (gdbreplay_version): Update copyright year.
8094 * server.c (gdbserver_version): Likewise.
8095
f21cc1a2 80962009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
8097
8098 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 8099 (handle_extended_wait): Improve comment.
0e21c1ec 8100
bca929d3
DE
81012008-12-13 Doug Evans <dje@google.com>
8102
8103 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8104 * server.h (ATTR_MALLOC): New macro.
8105 (xmalloc,xcalloc,xstrdup): Declare.
8106 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
8107 * inferiors.c: Ditto.
8108 * linux-low.c: Ditto.
8109 * mem-break.c: Ditto.
8110 * regcache.c: Ditto.
8111 * remote-utils.c: Ditto.
8112 * server.c: Ditto.
8113 * target.c: Ditto.
8114 * win32-low.c: Ditto.
8115
97438e3f
DE
81162008-12-12 Doug Evans <dje@google.com>
8117
896c7fbb
DE
8118 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
8119 in debugging printf.
8120
97438e3f
DE
8121 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
8122
e3b886f8
DE
81232008-12-09 Doug Evans <dje@google.com>
8124
8125 * linux-low.h (struct process_info): Delete member tid, unused.
8126 * thread-db.c (find_one_thread): Update.
8127 (maybe_attach_thread): Update.
8128
07e059b5
VP
81292008-12-02 Pedro Alves <pedro@codesourcery.com>
8130
889bf7c5
PA
8131 * target.h (struct target_ops): Add qxfer_osdata member.
8132 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
8133 and dirent.h.
8134 (linux_qxfer_osdata): New functions.
8135 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
8136 callback.
8137 * server.c (handle_query): Handle "qXfer:osdata:read:".
8138 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
8139 (buffer_xml_printf): New functions.
8140 * server.h (struct buffer): New.
8141 (buffer_grow_str, buffer_grow_str0): New macros.
8142 (buffer_grow, buffer_free, buffer_init, buffer_finish)
8143 (buffer_xml_printf): Declare.
07e059b5 8144
4cab47ab
DE
81452008-11-24 Doug Evans <dje@google.com>
8146
8147 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
8148
f142445f
DJ
81492008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
8150
8151 * server.c (handle_v_run): Always use the supplied argument list.
8152
d0107bb6 81532008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 8154
d0107bb6
BW
8155 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
8156 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 8157
2c4ad781
TJB
81582008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
8159
8160 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
8161 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
8162 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
8163 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
8164 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
8165 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
8166 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
8167 XML target descriptions.
8168 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
8169 when inferior is running on an ISA 2.05 or later processor. Add
8170 special case to return offset for full 64-bit slot of FPSCR when
8171 in 32-bits.
8172
dfb64f85
DJ
81732008-11-14 Daniel Gutson <dgutson@codesourcery.com>
8174
8175 * Makefile.in (SFILES, clean): Added sparc64 files.
8176 (reg-sparc64.o, reg-sparc64.c): New.
8177 * configure.srv (sparc*-*-linux*): New configuration.
8178 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
8179 syscall arguments for SPARC.
8180 (regsets_store_inferior_registers): Likewise.
8181 * linux-sparc-low.c: New file.
8182
66b6e1dd
DE
81832008-10-21 Doug Evans <dje@google.com>
8184
8185 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
8186 (READLINE_DIR,READLINE_DEP): Delete.
8187 (INTERNAL_CFLAGS): Update.
8188 (LINTFLAGS): Update.
8189
9b710a42
PA
81902008-10-10 Pedro Alves <pedro@codesourcery.com>
8191
8192 * server.c (handle_v_run): If GDB didn't specify an argv, use the
8193 whole argv from the last run, not just argv[0].
8194
5822d809
PA
81952008-09-08 Pedro Alves <pedro@codesourcery.com>
8196
8197 * regcache.c (new_register_cache): Return NULL if the register
8198 cache size isn't known yet.
8199 (free_register_cache): Avoid dereferencing a NULL regcache.
8200
74aac56f
DJ
82012008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8202
8203 * configure.srv: Merge MIPS and MIPS64.
8204
400b20f5
MR
82052008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
8206
8207 * Makefile.in (uninstall): Apply $(EXEEXT) too.
8208
677c5bb1
LM
82092008-08-18 Luis Machado <luisgpm@br.ibm.com>
8210
8211 * Makefile.in: Add required vsx dependencies.
8212
8213 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
8214 Declare init_registers_powerpc_vsx32l.
8215 Declare init_registers_powerpc_vsx64l.
8216 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
8217 (ppc_arch_setup): Check for VSX in hwcap.
8218 (ppc_fill_vsxregset): New function.
8219 (ppc_store_vsxregset): New function.
8220 Add new VSX entry in regset_info target_regsets.
8221
8222 * configure.srv: Add new VSX dependencies.
8223
a6f3e723
SL
82242008-08-12 Pedro Alves <pedro@codesourcery.com>
8225
8226 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
8227 (remote_open): Set or clear transport_is_reliable.
8228 (putpkt_binary): Don't expect acks in noack mode.
8229 (getpkt): Don't send ack/nac in noack mode.
8230 * server.c (handle_general_set): Handle QStartNoAckMode.
8231 (handle_query): If connected by tcp pass QStartNoAckMode+ in
8232 qSupported.
8233 (main): Reset noack_mode on every connection.
8234 * server.h (noack_mode): Declare.
8235
a417dc56
RW
82362008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8237
8238 * Makefile.in (GDBREPLAY_OBS): New variable.
8239 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
8240
3221518c
UW
82412008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
8242 Daniel Jacobowitz <dan@codesourcery.com>
8243
8244 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
8245 (usr_store_inferior_registers): Likewise.
8246 (regsets_store_inferior_registers): Likewise.
8247
ec56be1b
PA
82482008-07-31 Rolf Jansen <rj@surtec.com>
8249 Pedro Alves <pedro@codesourcery.com>
8250
8251 * configure.ac: Check for memmem declaration.
8252 * server.c [HAVE_MALLOC_H]: Include malloc.h.
8253 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
8254 (disable_packet_qfThreadInfo): Unconditionally compile.
8255 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
8256 * configure, config.in: Regenerate.
8257
2fe5e3ff
DE
82582008-07-28 Doug Kwan <dougkwan@google.com>
8259
8260 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
8261 (linux_write_memory): Remove declaration of errno.
8262
836acd6d
UW
82632008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
8264
8265 * linux-low.c (handle_extended_wait): Do not use "status"
8266 variable uninitialized.
8267
aeba519e
PA
82682008-07-07 Pedro Alves <pedro@codesourcery.com>
8269
8270 * server.c (handle_v_attach): Inhibit reporting dll changes.
8271
db42f210
PA
82722008-06-27 Pedro Alves <pedro@codesourcery.com>
8273
8274 * remote-utils.c (prepare_resume_reply): If requested, don't
8275 output "thread:TID" in the T stop reply.
8276
8277 * server.c (disable_packet_vCont, disable_packet_Tthread)
8278 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
8279 (handle_query): If requested, disable support for qC, qfThreadInfo
8280 and qsThreadInfo.
8281 (handle_v_requests): If requested, disable support for vCont.
8282 (gdbserver_show_disableable): New.
8283 (main): Handle --disable-packet and --disable-packet=LIST.
8284
8285 * server.h (disable_packet_vCont, disable_packet_Tthread)
8286 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
8287
8e4c5421
CD
82882008-06-20 Carlos O'Donell <carlos@codesourcery.com>
8289
8290 * server.c (gdbserver_usage): Mention --version.
8291
6e23a804
DJ
82922008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
8293
8294 * Makefile.in (gdbreplay.o): New rule.
8295
90aa6a40
JM
82962008-06-06 Joseph Myers <joseph@codesourcery.com>
8297
8298 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
8299 message, not gdbserver.
8300
c16158bc 83012008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
8302 Nathan Sidwell <nathan@codesourcery.com>
8303 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
8304
8305 * acinclude.m4: Include ../../config/acx.m4.
8306 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
8307 * configure, config.in: Regenerate.
8308 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
8309 * server.c (gdbserver_version): Print PKGVERSION.
8310 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
8311 (main): Adjust gdbserver_usage calls.
8312 * gdbreplay.c (version, host_name): Add declarations.
8313 (gdbreplay_version, gdbreplay_usage): New.
8314 (main): Accept --version and --help options.
8315
aeb75bf5
DJ
83162008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
8317
8318 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
8319 (arm_breakpoint_at): Handle Thumb.
8320 (the_low_target): Add comment.
8321
76b233dd
UW
83222008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
8323
8324 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
8325
08388c79
DE
83262008-05-09 Doug Evans <dje@google.com>
8327
a3c83fae
DE
8328 * server.h (decode_search_memory_packet): Declare.
8329 * remote-utils.c (decode_search_memory_packet): New fn.
8330 * server.c (handle_search_memory_1): New fn.
08388c79
DE
8331 (handle_search_memory): New fn.
8332 (handle_query): Process qSearch:memory packets.
8333
bb9c3d36
UW
83342008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
8335
8336 * regcache.c (registers_length): Remove.
8337 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
8338 full register packet.
8339 * regcache.h (registers_length): Remove prototype.
8340 * server.h (PBUFSIZ): Define to 16384.
8341
7284e1be
UW
83422008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
8343
8344 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
8345 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
8346 powerpc-64l.o, and powerpc-altivec64l.o.
8347 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
8348 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
8349 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
8350 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
8351 rs6000/power-linux.xml, and rs6000/power64-linux.xml
8352 to srv_xmlfiles.
8353
8354 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
8355 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
8356 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
8357 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
8358 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
8359 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
8360 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
8361 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
8362 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
8363 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
8364 (clean): Update.
8365
8366 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
8367 (init_registers_powerpc_32l): ... this new prototype.
8368 (init_registers_powerpc_32): Remove, replace by ...
8369 (init_registers_powerpc_altivec32l): ... this new prototype.
8370 (init_registers_powerpc_e500): Remove, replace by ...
8371 (init_registers_powerpc_e500l): ... this new prototype.
8372 (init_registers_ppc64): Remove, replace by ...
8373 (init_registers_powerpc_64l): ... this new prototype.
8374 (init_registers_powerpc_64): Remove, replace by ...
8375 (init_registers_powerpc_altivec64l): ... this new prototype.
8376 (ppc_num_regs): Set to 73.
8377 (PT_ORIG_R3, PT_TRAP): Define if necessary.
8378 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
8379 (ppc_cannot_store_register): Handle orig_r3 and trap.
8380 (ppc_arch_setup): Update init_registers_... calls.
8381 (ppc_fill_gregset): Handle orig_r3 and trap.
8382
8383 * inferiors.c (clear_inferiors): Reset current_inferior.
8384
fdc59709
PB
83852008-04-23 Paolo Bonzini <bonzini@gnu.org>
8386
889bf7c5
PA
8387 * acinclude.m4: Add override.m4.
8388 * configure: Regenerate.
fdc59709 8389
c9b2f845
UW
83902008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8391
8392 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
8393 initial call to init_register_ppc64.
8394
550512b8
UW
83952008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8396
43aaf8b6
PA
8397 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
8398 single powerpc*-*-linux* case.
550512b8
UW
8399 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
8400
b6430ec3
UW
84012008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
8402
8403 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 8404 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
8405 from reg_xmlfiles.
8406 * linux-ppc-low.c: Include <elf.h>.
8407 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
8408 (ppc_hwcap): New global variable.
8409 (ppc_regmap): Remove __SPE__ #ifdef sections.
8410 (ppc_regmap_e500): New global variable.
8411 (ppc_cannot_store_register): Update __SPE__ special case.
8412 (ppc_get_hwcap): New function.
8413 (ppc_arch_setup): Use it to determine whether inferior supports
8414 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
8415 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
8416 Do not access registers if target does not support AltiVec.
8417 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
8418 Do not access registers if target does not support SPE.
8419 (target_regsets): Unconditionally include AltiVec and SPE regsets.
8420
52fa2412
UW
84212008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
8422
8423 * linux-low.c (disabled_regsets, num_regsets): New.
8424 (use_regsets_p): Delete.
8425 (linux_wait_for_process): Clear disabled_regsets.
8426 (regsets_fetch_inferior_registers): Check and set it.
8427 (regsets_store_inferior_registers): Likewise.
8428 (linux_fetch_registers, linux_store_registers): Do not use
8429 use_regsets_p.
8430 (initialize_low): Allocate disabled_regsets.
8431
e28b3332
DJ
84322008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
8433
8434 * Makefile.in (LIBOBJS): New.
8435 (OBS): Use LIBOBJS.
8436 (memmem.o): New rule.
8437 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
8438 * configure: Regenerated.
8439
4536995d
UW
84402008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
8441
8442 * server.c (handle_query): Never return "unsupported" for
8443 qXfer:features:read queries.
8444
221c031f
UW
84452008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
8446
8447 * server.c (get_features_xml): Fix inverted condition.
8448 (handle_query): Always support qXfer:feature:read.
8449
ccd213ac
DJ
84502008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
8451
8452 * server.c (wrapper_argv): New.
8453 (start_inferior): Handle wrapper_argv. If set, expect an extra
8454 trap.
8455 (gdbserver_usage): Document --wrapper.
8456 (main): Parse --wrapper.
8457
6fe305f7
UW
84582008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8459
8460 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
8461 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
8462 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
8463 (ppc_set_pc): Likewise.
8464 (ppc_arch_setup): New function.
8465 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
8466 of collect_register.
889bf7c5 8467 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 8468
5b0a002e
UW
84692008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8470
8471 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
8472 instead of linux-ppc64-low.o.
8473 * linux-ppc64-low.c: Remove file.
8474 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
8475 (linux-ppc64-low.o): Remove rule.
8476
8477 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
8478 (init_registers_powerpc_64): Likewise.
8479 (ppc_regmap): Conditionally define depending on __powerpc64__.
8480 (ppc_cannot_store_register): Do not special-case "fpscr" when
8481 compiled on __powerpc64__.
8482 (ppc_collect_ptrace_register): New function.
8483 (ppc_supply_ptrace_register): New function.
8484 (ppc_breakpoint): Change type to "unsigned int".
8485 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
8486 (the_low_target): Conditionally provide initializers for the
889bf7c5 8487 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
8488 collect_ptrace_register and supply_ptrace_register members.
8489
9b4b61c8
UW
84902008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8491
8492 * regcache.h (gdbserver_xmltarget): Add extern declaration.
8493 * server.c (gdbserver_xmltarget): Define.
8494 (get_features_xml): Use it to replace "target.xml" and arch_string.
8495
8496 * configure.srv: Remove srv_xmltarget. Add XML files that were
8497 mentioned there to srv_xmlfiles instead. Remove conditional tests
8498 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
8499 srv_xmlfiles and srv_regobj to include all possible choices.
8500 * configure.ac (srv_xmltarget): Remove.
8501 (srv_xmlfiles): Do not add "target.xml".
8502 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
8503 checks for supplementary target information.
8504 * configure: Regenerate.
8505 * Makefile.in (XML_TARGET): Remove.
8506 (target.xml): Remove rule.
8507 (clean): Do not clean up target.xml.
8508 (.PRECIOUS): Do not mention target.xml.
8509
8510 * target.h (struct target_ops): Remove arch_string member.
8511 * linux-low.c (linux_arch_string): Remove.
8512 (linux_target_ops): Remove arch_string initializer.
8513 * linux-low.h (struct linux_target_ops): Remove arch_string member.
8514 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
8515 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
8516 * spu-low.c (spu_arch_string): Remove.
8517 (spu_target_ops): Remove arch_string initializer.
8518 * win32-low.c (win32_arch_string): Remove.
8519 (win32_target_ops): Remove arch_string initializer.
8520 * win32-low.h (struct win32_target_ops): Remove arch_string member.
8521 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
8522 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
8523
ee1a7ae4
UW
85242008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8525
8526 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
8527 by collect_ptrace_register and supply_ptrace_register hooks.
8528 * linux-low.c (fetch_register): Use supply_ptrace_register callback
8529 instead of checking for the_low_target.left_pad_xfer.
8530 (usr_store_inferior_registers): Use collect_ptrace_register callback
8531 instead of checking for the_low_target.left_pad_xfer.
8532
8533 * linux-s390-low.c (s390_collect_ptrace_register): New function.
8534 (s390_supply_ptrace_register): Likewise.
8535 (s390_fill_gregset): Call s390_collect_ptrace_register.
8536 (the_low_target): Update.
8537
8538 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
8539 (ppc_supply_ptrace_register): Likewise.
8540 (the_low_target): Update.
8541
8542 * linux-i386-low.c (the_low_target): Update.
8543 * linux-x86-64-low.c (the_low_target): Update.
8544
d61ddec4
UW
85452008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8546
8547 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
8548 reg-s390.o and reg-s390x.o.
8549
8550 * linux-low.c (new_inferior): New global variable.
8551 (linux_create_inferior, linux_attach): Set it.
8552 (linux_wait_for_process): Call the_low_target.arch_setup after the
8553 target has stopped for the first time.
8554 (initialize_low): Do not call the_low_target.arch_setup.
8555
8556 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
8557 (s390_set_pc): Likewise.
8558 (s390_arch_setup): New function.
8559 (the_low_target): Use s390_arch_setup as arch_setup routine.
8560
8561 * regcache.c (realloc_register_cache): New function.
8562 (set_register_cache): Call it for each existing regcache.
8563
d05b4ac3
UW
85642008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8565
8566 * server.h (init_registers): Remove prototype.
8567
8568 * linux-low.h (struct linux_target_ops): Add arch_setup field.
8569 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
8570 instead of init_registers ().
8571 * linux-arm-low.c (init_registers_arm): Add prototype.
8572 (init_registers_arm_with_iwmmxt): Likewise.
8573 (the_low_target): Add initializer for arch_setup field.
8574 * linux-cris-low.c (init_registers_cris): Add prototype.
8575 (the_low_target): Add initializer for arch_setup field.
8576 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
8577 (the_low_target): Add initializer for arch_setup field.
8578 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
8579 (the_low_target): Add initializer for arch_setup field.
8580 * linux-ia64-low.c (init_registers_ia64): Add prototype.
8581 (the_low_target): Add initializer for arch_setup field.
8582 * linux-m32r-low.c (init_registers_m32r): Add prototype.
8583 (the_low_target): Add initializer for arch_setup field.
8584 * linux-m68k-low.c (init_registers_m68k): Add prototype.
8585 (the_low_target): Add initializer for arch_setup field.
8586 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
8587 (init_registers_mips64_linux): Likewise.
8588 (the_low_target): Add initializer for arch_setup field.
8589 * linux-ppc-low.c (init_registers_ppc): Add prototype.
8590 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
8591 (the_low_target): Add initializer for arch_setup field.
8592 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
8593 (init_registers_powerpc_64): Likewise.
8594 (the_low_target): Add initializer for arch_setup field.
8595 * linux-s390-low.c (init_registers_s390): Add prototype.
8596 (init_registers_s390x): Likewise.
8597 (the_low_target): Add initializer for arch_setup field.
8598 * linux-sh-low.c (init_registers_sh): Add prototype.
8599 (the_low_target): Add initializer for arch_setup field.
8600 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
8601 (the_low_target): Add initializer for arch_setup field.
8602 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
8603 (the_low_target): Add initializer for arch_setup field.
8604
8605 * win32-low.h (struct win32_target_ops): Add arch_setup field.
8606 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
8607 instead of init_registers ().
8608 * win32-arm-low.c (init_registers_arm): Add prototype.
8609 (the_low_target): Add initializer for arch_setup field.
8610 * win32-i386-low.c (init_registers_i386): Add prototype.
8611 (the_low_target): Add initializer for arch_setup field.
8612
8613 * spu-low.c (init_registers_spu): Add prototype.
8614 (initialize_low): Call initialie_registers_spu () instead of
8615 initialize_registers ().
8616
fd96d250
PA
86172008-02-19 Pedro Alves <pedro@codesourcery.com>
8618
8619 * server.c (handle_v_requests): When handling the vRun and vAttach
8620 packets, if already debugging a process, don't kill it. Return an
8621 error instead.
8622
d41b6bb4
DJ
86232008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
8624
8625 * server.c (handle_query): Correct length check.
8626
5ac588cf
PA
86272008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
8628
8629 * win32-low.c (do_initial_child_stuff): Add process handle
8630 parameter. Set current_process_handle and current_process_id from the
8631 parameters. Clear globals.
8632 (win32_create_inferior): Don't set current_process_handle and
8633 current_process_id here. Instead pass them on the call to
8634 do_initial_child_stuff.
8635 (win32_attach): Likewise.
8636 (win32_clear_inferiors): New.
8637 (win32_kill): Don't close the current process handle or the
8638 current thread handle here. Instead call win32_clear_inferiors.
8639 (win32_detach): Don't open a new handle to the process. Call
8640 win32_clear_inferiors.
8641 (win32_join): Don't rely on current_process_handle; open a new
8642 handle using the process id.
8643 (win32_wait): Call win32_clear_inferiors when the inferior process
8644 has exited.
8645
ecd7ecbc
DJ
86462008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
8647
8648 * server.c (monitor_show_help): Add "exit".
8649
1525d545
MG
86502008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
8651
ecd7ecbc 8652 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
8653 (clean): Add reg-xtensa.c.
8654 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
8655 * configure.srv (xtensa*-*-linux*) New target.
8656 * linux-xtensa-low.c: New.
8657 * xtensa-xtregs.c: New.
1525d545 8658
59a016f0
PA
86592008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
8660
8661 * hostio.c: Don't include errno.h.
8662 (errno_to_fileio_errno): Move to hostio-errno.
8663 * hostio.c: (hostio_error): Remove the error parameter. Defer the
8664 error number outputting to the target->hostio_last_error callback.
8665 (hostio_packet_error): Use FILEIO_EINVAL directly.
8666 (handle_open, handle_pread, hostio_error, handle_unlink): Update
8667 calls to hostio_error.
8668 * hostio-errno.c: New.
8669 * server.h (hostio_last_error_from_errno): Declare.
8670 * target.h (target_ops): Add hostio_last_error member.
8671 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
8672 as hostio_last_error handler.
889bf7c5 8673 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
8674 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
8675 (wince_hostio_last_error): New functions.
8676 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
8677 as hostio_last_error handler.
8678 (win32_target_ops) [!_WIN32_WCE]: Register
8679 hostio_last_error_from_errno as hostio_last_error handler.
8680 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
8681 (hostio-errno.o): New rule.
8682 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
8683 * configure.srv (srv_hostio_err_objs): New variable. Default to
8684 hostio-errno.o.
8685 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
8686 * configure: Regenerate.
8687
2d717e4f
DJ
86882008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8689
8690 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
8691 (linux_kill, linux_detach): Clean up the process list.
8692 * remote-utils.c (remote_open): Improve port number parsing.
8693 (putpkt_binary, input_interrupt): Only send interrupts if the target
8694 is running.
8695 * server.c (extended_protocol): Make static.
8696 (attached): Define earlier.
8697 (exit_requested, response_needed, program_argv): New variables.
8698 (target_running): New.
8699 (start_inferior): Clear attached here.
8700 (attach_inferior): Set attached here.
8701 (require_running): Define.
8702 (handle_query): Use require_running and target_running. Implement
8703 "monitor exit".
8704 (handle_v_attach, handle_v_run): New.
8705 (handle_v_requests): Use require_running. Handle vAttach and vRun.
8706 (gdbserver_usage): Update.
8707 (main): Redo argument parsing. Handle --debug and --multi. Handle
8708 --attach along with other options or after the port. Save
8709 program_argv. Support no initial program. Resynchronize
8710 communication with GDB after an error. Handle "monitor exit".
8711 Use require_running and target_running. Always allow the extended
8712 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
8713 restart in extended mode.
8714 * README: Refer to the GDB manual. Update --attach usage.
8715
7407e2de
AS
87162007-12-20 Andreas Schwab <schwab@suse.de>
8717
8718 * linux-low.c (STACK_SIZE): Define.
8719 (linux_tracefork_child): Use it. Use __clone2 on ia64.
8720 (linux_test_for_tracefork): Likewise.
8721
b65d95c5
DJ
87222007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
8723
8724 * linux-low.c (linux_wait_for_event): Update messages. Do not
8725 reinsert auto-delete breakpoints.
8726 * mem-break.c (struct breakpoint): Change return type of handler to
8727 int.
8728 (set_breakpoint_at): Update handler type.
8729 (reinsert_breakpoint_handler): Return 1 instead of calling
8730 delete_breakpoint.
8731 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
8732 setting a new one.
8733 (check_breakpoints): Delete auto-delete breakpoints and return 2.
8734 * mem-break.h (set_breakpoint_at): Update handler type.
8735 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
8736 * win32-low.c (auto_delete_breakpoint): New.
8737 (get_child_debug_event): Use it.
8738
4e799345
DJ
87392007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
8740
8741 * configure.ac: Check for pread and pwrite.
8742 * hostio.c (handle_pread): Fall back to lseek and read.
8743 (handle_pwrite): Fall back to lseek and write.
8744 * config.in, configure: Regenerated.
8745
27524b67
DJ
87462007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
8747
8748 * server.c (myresume): Add own_buf argument.
8749 (main): Update calls.
8750
a20d5e98
DJ
87512007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
8752
8753 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
8754 * remote-utils.c (remote_open): Do not call disable_async_io.
8755 (block_async_io): Delete.
8756 (unblock_async_io): Make static.
8757 (initialize_async_io): New.
8758 * server.c (handle_v_cont): Handle async I/O here.
8759 (myresume): Likewise. Move other common resume tasks here...
8760 (main): ... from here. Call initialize_async_io. Disable async
8761 I/O before the main loop.
8762 * server.h (initialize_async_io): Declare.
8763 (block_async_io, unblock_async_io): Delete prototypes.
8764 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
8765
b79d787e
DJ
87662007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
8767
8768 * remote-utils.c (readchar): Allow binary data in received messages.
8769
d97903b2
PA
87702007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8771
8772 * win32-low.c (attaching): New global.
8773 (win32_create_inferior): Clear the `attaching' global.
8774 (win32_attach): Set the `attaching' global.
8775 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
8776 attaching. Only set a breakpoint at the entry point if not
8777 attaching.
8778
311de423
PA
87792007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8780
8781 * server.c (main): Don't report dll events on the initial
8782 connection on attaches.
8783
6c2d16d2
PA
87842007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8785
8786 * server.c (main): Relax numerical bases supported for the pid of
8787 the --attach command line argument.
8788
5ca906e6
PA
87892007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8790
8791 * win32-low.c (win32_attach): Call OpenProcess before
8792 DebugActiveProcess, not after. Add last error output to error
8793 call.
8794
9c6c8194
PA
87952007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8796
8797 * win32-low.c (win32_get_thread_context)
8798 (win32_set_thread_context): New functions.
8799 (thread_rec): Use win32_get_thread_context.
8800 (continue_one_thread, win32_resume): Use win32_set_thread_context.
8801 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
8802 field.
8803
4d5d1aaa
PA
88042007-12-03 Leo Zayas
8805 Pedro Alves <pedro_alves@portugalmail.pt>
8806
8807 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
8808 global variables.
8809 (child_add_thread): Minor cleanup.
8810 (child_continue): Resume artificially suspended threads before
8811 calling ContinueDebugEvent.
8812 (suspend_one_thread): New.
8813 (fake_breakpoint_event): New.
8814 (get_child_debug_event): Change return type to int. Check here if
8815 gdb sent an interrupt request. If a soft interrupt was requested,
8816 fake a breakpoint event. Return 0 if there is no event to handle,
8817 and 1 otherwise.
8818 (win32_wait): Don't check here if gdb sent an interrupt request.
8819 Ensure there is a valid event to handle.
8820 (win32_request_interrupt): Add soft interruption method as last
8821 resort.
8822
c436e841
PA
88232007-12-03 Leo Zayas
8824 Pedro Alves <pedro_alves@portugalmail.pt>
8825
8826 * win32-low.h (win32_thread_info): Add descriptions to the
8827 structure members. Replace `suspend_count' counter by a
8828 `suspended' flag.
8829 * win32-low.c (thread_rec): Update condition of when to get the
8830 context from the inferior. Rely on ContextFlags being set if it
8831 has already been retrieved. Only suspend the inferior thread if
8832 we haven't already. Warn if that fails.
8833 (continue_one_thread): s/suspend_count/suspended/. Only call
8834 ResumeThread once. Warn if that fails.
8835
e7b5fa67
PA
88362007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
8837
8838 * win32-low.c (win32_wait): Don't read from the inferior when it
8839 has already exited.
8840
a385171d
PA
88412007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
8842
8843 * Makefile.in (win32_low_h): New variable.
8844 (win32-low.o): Add dependency on $(win32_low_h).
8845 (win32-arm-low.o, win32-i386-low.o): New rules.
8846
f80c84b3
DJ
88472007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
8848
8849 * hostio.c: Correct copyright year.
8850
a6b151f1
DJ
88512007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
8852
8853 * Makefile.in (OBS): Add hostio.o.
8854 (hostio.o): New rule.
8855 * server.h (handle_vFile): Declare.
8856 * hostio.c: New file.
8857 * server.c (handle_v_requests): Take packet_len and new_packet_len
8858 for binary packets. Call handle_vFile.
8859 (main): Update call to handle_v_requests.
8860
f9387fc3
DJ
88612007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
8862
8863 * linux-low.c: Include <sched.h>.
8864
51c2684e
DJ
88652007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
8866
8867 * linux-low.c (linux_tracefork_grandchild): New.
8868 (linux_tracefork_child): Use clone.
8869 (linux_test_for_tracefork): Use clone; allocate and free a stack.
8870
75f83163
JB
88712007-10-31 Joel Brobecker <brobecker@adacore.com>
8872
8873 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
8874
da5898ce
DJ
88752007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
8876
8877 * linux-low.c (handle_extended_wait): Handle unexpected signals.
8878
24a09b5f
DJ
88792007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
8880
8881 * inferiors.c (change_inferior_id): Delete.
8882 (add_pid_to_list, pull_pid_from_list): New.
8883 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
8884 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
8885 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
8886 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
8887 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
8888 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
8889 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
8890 (using_threads): Always set to 1.
8891 (handle_extended_wait): New.
8892 (add_process): Do not set TID.
8893 (linux_create_inferior): Set must_set_ptrace_flags.
8894 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
8895 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
8896 (linux_thread_alive): Rename TID argument to LWPID.
8897 (linux_wait_for_process): Handle unknown processes. Do not use TID.
8898 (linux_wait_for_event): Do not use TID or check using_threads. Update
8899 call to dead_thread_notify. Call handle_extended_wait.
8900 (linux_create_inferior): Use PTRACE_SETOPTIONS.
8901 (send_sigstop): Delete sigstop_sent.
8902 (wait_for_sigstop): Avoid TID.
8903 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
8904 (linux_test_for_tracefork): New.
8905 (linux_lookup_signals): Use thread_db_active and
8906 linux_supports_tracefork_flag.
8907 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
8908 * linux-low.h (get_process_thread): Avoid TID.
8909 (struct process_ifo): Move thread_known and tid to the end. Remove
8910 sigstop_sent.
8911 (linux_attach_lwp, thread_db_init): Update prototypes.
8912 * server.h (change_inferior_id): Delete prototype.
8913 (add_pid_to_list, pull_pid_from_list): New prototypes.
8914 * thread-db.c (thread_db_use_events): New.
8915 (find_first_thread): Rename to...
8916 (find_one_thread): ...this. Update callers and messages. Do not
8917 call fatal. Check thread_db_use_events. Do not call
8918 change_inferior_id or new_thread_notify.
8919 (maybe_attach_thread): Update. Do not call new_thread_notify.
8920 (thread_db_init): Set thread_db_use_events. Check use_events.
8921 * utils.c (fatal, warning): Correct message prefix.
8922
30ed0a8f
DJ
89232007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
8924
8925 * Makefile.in (clean): Remove new files.
8926 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
8927 (powerpc-64.o, powerpc-64.c): New rules.
8928 * configure.srv: Use alternate register sets for powerpc64-*-linux*
8929 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
8930 with SPE.
8931 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
8932 SPE targets.
8933 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
8934 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
8935 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
8936 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
8937 (target_regsets): Add AltiVec and SPE register sets.
8938 * configure.ac: Check for AltiVec and SPE.
8939 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
8940 (ppc_fill_vrregset, ppc_store_vrregset): New.
8941 (target_regsets): Add AltiVec register set.
8942 * configure: Regenerated.
8943
fd462a61
DJ
89442007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
8945
8946 * linux-low.c (O_LARGEFILE): Define.
8947 (linux_read_memory): Use /proc/PID/mem.
8948 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
8949 * configure, config.in: Regenerated.
8950
69f223ed
DJ
89512007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8952
8953 * linux-low.c (linux_wait_for_event): Do not pass signals while
8954 single-stepping.
8955
aec18585
PA
89562007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
8957
8958 * win32-low.c (create_process): New.
8959 (win32_create_inferior): Use create_process instead of
8960 CreateProcess. If create_process failed retry appending an ".exe"
8961 suffix. Store the GetLastError result immediatelly after
8962 create_process calls and use it on the call to error.
8963
34d86ddd
PA
89642007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
8965
8966 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
8967
5a0e3bd0
JB
89682007-08-23 Joel Brobecker <brobecker@adacore.com>
8969
8970 * configure.ac: Switch license to GPLv3.
8971
f88c79e6
MS
89722007-08-01 Michael Snyder <msnyder@access-company.com>
8973
8974 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
8975
6b3d9b83
PA
89762007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
8977
8978 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
8979 typedef.
8980 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
8981 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
8982 CloseToolhelp32Snapshot.
8983 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
8984 CloseToolhelp32Snapshot.
8985
c588c53c
MS
89862007-07-27 Michael Snyder <michael.snyder@access-company.com>
8987
8988 * server.c (main): Check for inferior exit before main loop.
8989
aa0403d9
PA
89902007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
8991
8992 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
8993 instead of on tmp_desc.
8994
255e7678
DJ
89952007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
8996 Daniel Jacobowitz <dan@codesourcery.com>
8997
8998 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
8999 (add_thread): Minor cleanups.
9000 (clear_inferiors): Move lower in the file. Clear the DLL
9001 list.
9002 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9003 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9004 (xml_escape_text): New.
9005 * server.c (handle_query): Handle qXfer:libraries:read. Report it
9006 for qSupported.
9007 (handle_v_cont): Report errors.
9008 (gdbserver_version): Update.
9009 (main): Correct size of own_buf. Do not report initial DLL events.
9010 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9011 (unloaded_dll, xml_escape_text): New.
9012 * win32-low.c (enum target_waitkind): Update comments.
9013 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9014 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9015 (win32_EnumProcessModules, win32_GetModuleInformation)
9016 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9017 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9018 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9019 (win32_Module32First, win32_Module32Next, load_toolhelp)
9020 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
9021 (get_child_debug_event): Handle DLL events.
9022 (win32_wait): Likewise.
9023
0d37add9
DJ
90242007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9025
9026 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
9027 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
9028
45e2715e
PA
90292007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9030
9031 * win32-low.c (handle_output_debug_string): Ignore event if not
9032 waiting.
9033
c5674cf1
PA
90342007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9035
9036 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9037
2bbe3cc1
DJ
90382007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9039
9040 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9041
ae13219e
DJ
90422007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9043
9044 * inferiors.c (change_inferior_id): Add comment.
9045 * linux-low.c (check_removed_breakpoint): Add an early
9046 prototype. Improve debug output.
9047 (linux_attach): Doc update.
9048 (linux_detach_one_process, linux_detach): Clean up before releasing
9049 each process.
9050 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9051 * linux-low.h (struct process_info): Doc improvement.
9052 * mem-break.c (delete_all_breakpoints): New.
9053 * mem-break.h (delete_all_breakpoints): New prototype.
9054 * thread-db.c (find_first_thread): New.
9055 (thread_db_create_event): Call it instead of
9056 thread_db_find_new_threads. Clean up unused variables.
9057 (maybe_attach_thread): Remove first thread handling.
9058 (thread_db_find_new_threads): Use find_first_thread.
9059 (thread_db_get_tls_address): Likewise.
9060
4105de34
DJ
90612007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9062
9063 * thread-db.c (thread_db_find_new_threads): Add prototype.
9064 (thread_db_create_event): Check for the main thread before adding
9065 a new thread.
9066 (maybe_attach_thread): Only enable event reporting if TID == 0.
9067 (thread_db_get_tls_address): Check for new threads.
9068
2b876972
DJ
90692007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
9070
9071 * linux-low.c (linux_create_inferior): Try execv before execvp.
9072 * spu-low.c (spu_create_inferior): Likewise.
9073
7a245884
DJ
90742007-06-13 Mike Frysinger <vapier@gentoo.org>
9075
9076 * linux-low.c (linux_create_inferior): Change execv to execvp.
9077 * spu-low.c (spu_create_inferior): Likewies.
9078
117ce543
DJ
90792007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
9080
9081 * Makefile.in (clean): Clean new files instead of deleted ones.
9082 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9083 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9084 rules.
9085 * configure.srv: Specify XML files and new regformats for MIPS and
9086 MIPS64 GNU/Linux.
9087 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9088 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9089 an entry for the restart register.
9090 (mips_cannot_fetch_register, mips_cannot_store_register)
9091 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9092 register names to match the XML descriptions.
9093 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9094 restart register instead of $0.
9095
0e7f50da
UW
90962007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9097 Markus Deuling <deuling@de.ibm.com>
9098
9099 * remote-utils.c (decode_xfer_write): New function.
9100 * server.h (decode_xfer_write): Add prototype.
9101 * server.c (handle_query): Add PACKET_LEN argument. Support
9102 qXfer:spu:read and qXfer:spu:write packets.
9103 (main): Pass packet_len to handle_query.
9104 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9105 * target.h (target_ops): Add qxfer_spu.
9106
374c1d38
UW
91072007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9108
9109 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
9110 accessing non-seekable spufs files.
9111
bb63802a
UW
91122007-05-16 Markus Deuling <deuling@de.ibm.com>
9113
889bf7c5 9114 * server.c (handle_query): Add reply for qC packet.
bb63802a 9115
7390519e
PA
91162007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9117 Leo Zayas <lerele@champenstudios@com>
9118
9119 * server.h (check_remote_input_interrupt_request): New function.
9120 * remote_utils.c (INVALID_DESCRIPTOR): New define.
9121 (remote_desc): Initialize with INVALID_DESCRIPTOR.
9122 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
9123 (check_remote_input_interrupt_request): New function.
9124 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 9125 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
9126 winapi_GenerateConsoleCtrlEvent): New typedefs.
9127 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
9128 to 250 ms.
9129 (win32_wait): Check for remote interrupt request
9130 with check_remote_input_interrupt_request.
9131 (win32_request_interrupt): New function.
9132 (win32_target_op): Set request_interrupt to win32_request_interrupt.
9133
34b34921
PA
91342007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9135
9136 * win32-low.c (debug_registers_changed,
9137 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
9138 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
9139 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
9140 (thread_rec): Get context using the low target.
9141 (child_add_thread): Call thread_added on the low target,
9142 which does the same thing.
9143 (regptr): Delete.
9144 (do_initial_child_stuff): Remove debug registers references.
9145 Set context using the low target. Resume threads after
9146 setting the contexts.
9147 (child_continue): Remove dead variable. Remove debug
9148 registers references.
9149 (child_fetch_inferior_registers): Go through the low target.
9150 (do_child_store_inferior_registers): Remove.
9151 (child_store_inferior_registers): Go through the low target.
9152 (win32_resume): Remove debug registers references.
9153 Set context using the low target.
9154 (handle_exception): Change return type to void. Don't record
9155 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
9156 first chance exception.
889bf7c5 9157 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
9158 goto loop. Always return after waiting for debug event.
9159 (win32_wait): Convert to switch statement. Handle spurious
9160 events.
9161
9162 * win32-i386-low.c (debug_registers_changed,
9163 debug_registers_used): New.
9164 (initial_stuff): Rename to ...
9165 (i386_initial_stuff): ... this. Clear debug registers
9166 state variables.
9167 (store_debug_registers): Delete.
9168 (i386_get_thread_context): New.
9169 (load_debug_registers): Delete.
9170 (i386_set_thread_context): New.
9171 (i386_thread_added): New.
9172 (single_step): Rename to ...
9173 (i386_single_step): ... this.
9174 (do_fetch_inferior_registers): Rename to ...
9175 (i386_fetch_inferior_register): ... this.
9176 (i386_store_inferior_register): New.
9177 (the_low_target): Adapt to new interface.
9178
9179 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
9180 (arm_get_thread_context): New.
9181 (arm_set_thread_context): New.
9182 (regptr): New.
9183 (do_fetch_inferior_registers): Rename to ...
9184 (arm_fetch_inferior_register): ... this.
9185 (arm_store_inferior_register): New.
9186 (arm_wince_breakpoint): Reimplement as unsigned long.
9187 (arm_wince_breakpoint_len): Define.
9188 (the_low_target): Adapt to new interface.
9189
9190 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
9191 load_debug_registers. Add get_thread_context, set_thread_context,
9192 thread_added and store_inferior_register. Rename
9193 fetch_inferior_registers to fetch_inferior_register.
9194 (regptr): Remove declaration.
9195
dd6953e1
PA
91962007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9197
9198 * linux-low.c (linux_detach): Change return type to int. Return 0.
9199 * spu-low.c (spu_detach): Likewise.
9200
444d6139
PA
92012007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9202
9203 * target.h (target_ops): Change return type of detach to int.
9204 Add join.
9205 (join_inferior): New.
9206 * server.c (main): Don't skip detach support on mingw32.
9207 If the inferior doesn't support detaching return error.
9208 Call join_inferior instead of using waitpid.
9209 * linux-low.c (linux_join): New.
9210 (linux_target_op): Add linux_join.
9211 * spu-low.c (spu_join): New.
9212 (spu_target_ops): Add spu_join.
9213 * win32-low.c (win32_detach): Adapt to new interface.
9214 Reopen current_process_handle before detaching. Issue a child
9215 resume before detaching.
9216 (win32_join): New.
9217 (win32_target_op): Add win32_join.
9218
1d5315fe
PA
92192007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9220
9221 * win32-low.c (win32-attach): Fix return value.
9222 * target.h (target_ops): Describe ATTACH return values.
9223
bf914831
PA
92242007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9225
9226 * win32-low.c (GETPROCADDRESS): Define.
9227 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
9228 (winapi_DebugSetProcessKillOnExit): Likewise.
9229 (win32_create_inferior): Force usage of ansi CreateProcessA.
9230 (win32_attach): Use GETPROCADDRESS.
9231 (win32_detach): Likewise.
9232
f72f3e60
PA
92332007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9234
9235 * win32-low.c (win32_wait): Don't use WSTOPSIG.
9236
ed50f18f
PA
92372007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
9238
9239 * win32-low.c: Commit leftover changes from 2007-03-29.
9240
0c2ead7e
DJ
92412007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9242
9243 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
9244 fields short instead of int. Add explicit padding.
9245 (i387_cache_to_fsave): Remove unnecessary casts.
9246 (i387_fsave_to_cache): Doc fix.
9247 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
9248
73725ff3
DJ
92492007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9250
9251 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
9252 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
9253
d99f33d8
PA
92542007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9255
9256 * configure.srv (arm*-*-mingw32ce*): Move near the other
9257 arm targets.
9258
68070c10
PA
92592007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9260
2482afc6 9261 * configure.ac: Add errno checking.
68070c10
PA
9262 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
9263 sys/file.h and malloc.h.
9264 (AC_CHECK_DECLS): Add perror.
9265 (srv_mingwce): Handle.
2482afc6 9266 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
9267 win32-i386-low.o to srv_tgtobj.
9268 (i[34567]86-*-mingw*): Likewise.
9269 (arm*-*-mingw32ce*): Add case.
9270 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9271 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
9272 [__MINGW32CE__] (strerror): New function.
9273 [__MINGW32CE__] (errno): Define to GetLastError.
9274 [__MINGW32CE__] (COUNTOF): New macro.
9275 (remote_open): Remove extra close call.
9276 * mem-break.c (delete_breakpoint_at): New function.
9277 * mem-break.h (delete_breakpoint_at): Declare.
9278 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9279 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
9280 [USE_WIN32API] (read, write): Add char* casts.
9281 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
9282 * server.h: Include wincecompat.h on Windows CE.
9283 [HAVE_ERRNO_H]: Check.
9284 (perror): Declare if not declared.
9285 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
9286 (perror_with_name): Remove errno declaration.
9287 * wincecompat.h: New.
9288 * wincecompat.c: New.
9289 * win32-low.h: New.
9290 * win32-arm-low.c: New.
9291 * win32-i386-low.c: New.
9292 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
9293 (OUTMSG2): Make it safe.
9294 (_T): New macro.
9295 (COUNTOF): New macro.
9296 (NUM_REGS): Get it from the low target.
9297 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
9298 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
9299 (thread_rec): Let low target handle debug registers.
9300 (child_add_thread): Likewise.
9301 (child_init_thread_list): Likewise.
9302 (continue_one_thread): Likewise.
9303 (regptr): New.
9304 (do_child_fetch_inferior_registers): Move to ...
9305 * win32-i386-low.c: ... here, and rename to ...
9306 (do_fetch_inferior_registers): ... this.
889bf7c5 9307 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
9308 Go through the low target.
9309 (do_child_store_inferior_registers): Use regptr.
9310 (strwinerror): New function.
9311 (win32_create_inferior): Handle Windows CE.
9312 Use strwinerror instead of strerror on Windows error
9313 codes. Add program to the error output.
9314 Don't close the main thread handle on Windows CE.
9315 (win32_attach): Use coredll.dll on Windows CE.
9316 (win32_kill): Close current process and current
9317 thread handles.
9318 (win32_detach): Use coredll.dll on Windows CE.
9319 (win32_resume): Let low target handle debug registers, and
9320 step request.
9321 (handle_exception): Add/Remove initial breakpoint. Avoid
9322 non-existant WSTOPSIG on Windows CE.
9323 (win32_read_inferior_memory): Cast to remove warning.
9324 (win32_arch_string): Go through the low target.
9325 (initialize_low): Call set_breakpoint_data with the low
9326 target's breakpoint.
9327 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
9328 FOP_REGNUM, mappings): Move to ...
9329 * win32-i386-low.c: ... here.
9330 * win32-low.c (win32_thread_info): Move to ...
9331 * win32-low.h: ... here.
9332 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
9333 win32-arm-low.c and wincecompat.c.
9334 (all:): Add $EXEEXT.
9335 (install-only:): Likewise.
9336 (gdbserver:): Likewise.
9337 (gdbreplay:): Likewise.
9338 * config.in: Regenerate.
9339 * configure: Regenerate.
9340
41093d81
PA
93412007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9342
9343 * win32-low.c: Rename typedef thread_info to
9344 win32_thread_info throughout.
9345
544afa54
PA
93462007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9347
9348 * win32-i386-low.c: Rename to ...
9349 * win32-low.c: ... this.
9350 * configure.srv: Replace win32-i386-low.o with win32-low.o.
9351 * Makefile.in: Likewise.
9352
bce7165d
PA
93532007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
9354
9355 * remote-utils.c (monitor_output): Constify msg parameter.
9356 * server.h (monitor_output): Likewise.
9357 * win32-i386-low.c (handle_output_debug_string): New.
9358 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
9359 handle_output_debug_string.
9360 (get_child_debug_event): Likewise.
9361
506c7aa0
DJ
93622007-03-27 Mat Hostetter <mat@lcs.mit.edu>
9363
9364 * server.c (main): Correct strtoul check.
9365
42c81e2a
DJ
93662007-03-27 Jon Ringle <jon@ringle.org>
9367
9368 * linux-low.c: Check __ARCH_HAS_MMU__ also.
9369
9453113a
DJ
93702007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
9371
9372 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
9373
64a69107
DJ
93742007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
9375
9376 * terminal.h: Check HAVE_SGTTY_H.
9377
93782007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
9379
9380 * remote-utils.c (remote_open): Print out the assigned port number.
9381
c74d0ad8
DJ
93822007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
9383
9384 * remote-utils.c (monitor_output): New function.
9385 * server.c (debug_threads): Define here.
9386 (monitor_show_help): New function.
9387 (handle_query): Handle qRcmd.
9388 (main): Do not handle 'd' packet.
9389 * server.h (debug_threads, remote_debug, monitor_output): Declare.
9390 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
9391 of debug_threads.
9392
de7c3b4a
PA
93932007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9394
9395 * Makefile.in (EXEEXT): New.
9396 (clean): Use $(EXEEXT).
9397
ef57601b
PA
93982007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9399
9400 * target.h (target_ops): Rename send_signal to request_interrupt,
9401 and remove enum target_signal parameter.
9402 * linux-low.c (linux_request_interrupt): Rename from
9403 linux_send_signal, and always send SIGINT.
9404 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
9405 and always send SIGINT.
9406 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
9407 of send_signal.
9408 (input_interrupt): Likewise.
9409
820f2bda
PA
94102007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9411
9412 * server.c (get_features_xml): Check if target implemented
9413 arch_string.
9414 * win32-i386-low.c (win32_arch_string): New.
9415 (win32_target_ops): Add win32_arch_string as arch_string member.
9416
ab39bf24
UW
94172007-02-22 Markus Deuling <deuling@de.ibm.com>
9418
9419 * spu-low.c (spu_arch_string): New.
9420 (spu_target_ops): Add spu_arch_string.
9421
61ff6e04
DJ
94222007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
9423
9424 * remote-utils.c: Remove HAVE_TERMINAL_H check.
9425 * configure.ac: Do not check for terminal.h.
9426 * configure, config.in: Regenerated.
9427
fb1e4ffc
DJ
94282007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9429
9430 * Makefile.in (OBS): Add $(XML_BUILTIN).
9431 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
9432 (clean): Update.
9433 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
9434 (arm-with-iwmmxt.c): New.
9435 * config.in, configure: Regenerate.
9436 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
9437 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
9438 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
9439 (arm*-*-linux*): Add iWMMXt and regset support.
9440 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
9441 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
9442 (arm_store_wmmxregset, target_regsets): New.
9443 * server.c (get_features_xml): Take annex argument. Check builtin
9444 XML documents.
9445 (handle_query): Handle multiple annexes.
9446
0f48aa01
DJ
94472007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9448
9449 * remote-utils.c [USE_WIN32API] (read, write): Define.
9450 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
9451 write.
9452
23181151
DJ
94532007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
9454
9455 * linux-i386-low.c (the_low_target): Set arch_string.
9456 * linux-x86-64-low.c (the_low_target): Likewise.
9457 * linux-low.c (linux_arch_string): New.
9458 (linux_target_ops): Add it.
9459 * linux-low.h (struct linux_target_ops): Add arch_string.
9460 * server.c (write_qxfer_response): Use const void * for DATA.
9461 (get_features_xml): New.
9462 (handle_query): Handle qXfer:features:read. Report it for qSupported.
9463 * target.h (struct target_ops): Add arch_string method.
9464
9d606399
DJ
94652007-01-03 Denis Pilat <denis.pilat@st.com>
9466 Daniel Jacobowitz <dan@codesourcery.com>
9467
9468 * linux-low.c (linux_kill): Handle being called with no threads.
9469 * win32-i386-low.c (win32_kill): Likewise.
9470 (get_child_debug_event): Clear current_process_handle.
9471
94722006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
9473 Daniel Jacobowitz <dan@codesourcery.com>
9474
9475 * remote-utils.c (remote_open): Check the type of specified
9476 serial port devices before opening them.
9477 * server.c (main): Kill the inferior if an error occurs during
9478 the first remote_open.
9479
a5e13d24
DJ
94802006-12-05 Markus Deuling <deuling@de.ibm.com>
9481
9482 * README: Update supported targets.
9483
186947f7
DJ
94842006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
9485
9486 * Makefile.in (clean): Remove reg-mips64.c.
9487 (reg-mips64.c, reg-mips64.o): New rules.
9488 * configure.srv: Handle mips64. Include regset support for mips.
9489 * linux-mips-low.c (union mips_register): New.
9490 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
9491 (mips_breakpoint, mips_breakpoint_at): Use int.
9492 (mips_collect_register, mips_supply_register)
9493 (mips_collect_register_32bit, mips_supply_register_32bit)
9494 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9495 (mips_store_fpregset, target_regsets): New.
9496 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
9497
a13e2c95
UW
94982006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
9499
9500 * configure.srv: Add target "spu*-*-*".
9501 * Makefile.in (clean): Remove reg-spu.c.
9502 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
9503 * spu-low.c: New file.
9504
cb7283db
DJ
95052006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9506
9507 * configure.ac: Correct td_thr_tls_get_addr test.
9508 * configure: Regenerated.
9509
89be2091
DJ
95102006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9511
9512 * linux-low.c (linux_wait_for_event): Reformat. Use the
9513 pass_signals array.
9514 * remote-utils.c (decode_address_to_semicolon): New.
9515 * server.c (pass_signals, handle_general_set): New.
9516 (handle_query): Mention QPassSignals for qSupported.
9517 (main): Call handle_general_set.
9518 * server.h (pass_signals, decode_address_to_semicolon): New.
9519
000ef4f0
DJ
95202006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
9521
9522 * server.c (handle_query): Correct error handling for read_auxv.
9523
b7149293
UW
95242005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
9525
9526 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
9527 and srv_linux_thread_db to yes.
9528 * linux-s390-low.c (s390_fill_gregset): New function.
9529 (target_regsets): Define data structure.
9530
dae5f5cf
DJ
95312006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
9532
9533 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
9534 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
9535 * config.in, configure: Regenerated.
9536 * inferiors.c (gdb_id_to_thread): New function.
9537 (gdb_id_to_thread_id): Use it.
9538 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
9539 * linux-low.h (struct process_info): Add th member.
9540 (thread_db_get_tls_address): New prototype.
9541 * remote-utils.c (decode_address): Make non-static.
9542 * server.c (handle_query): Handle qGetTLSAddr.
9543 * server.h (gdb_id_to_thread, decode_address): New prototypes.
9544 * target.h (struct target_ops): Add get_tls_address.
9545 * thread-db.c (maybe_attach_thread): Save the thread handle.
9546 (thread_db_get_tls_address): New.
9547
32ca6d61
DJ
95482006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
9549
9550 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
9551 (linux_resume_one_process): Take a siginfo_t *. Update all
9552 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
9553 (struct pending_signals): Add a siginfo_t.
9554 (linux_wait_for_process): Always set last_status.
9555 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
9556 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
9557 * linux-low.h (struct process_info): Add last_status.
9558
5ffff7c1
DJ
95592006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
9560
9561 * remote-utils.c (try_rle): New function.
9562 (putpkt_binary): Use it.
9563
8695c747
DJ
95642006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
9565
9566 * Makefile.in (clean): Clean reg-x86-64-linux.c.
9567 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
9568 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
9569 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
9570 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
9571 point registers.
9572
290fadea
RS
95732006-08-08 Richard Sandiford <richard@codesourcery.com>
9574
9575 * server.c (terminal_fd): New variable.
9576 (old_foreground_pgrp): Likewise.
9577 (restore_old_foreground_pgrp): New function.
9578 (start_inferior): Record the terminal file descriptor in terminal_fd
9579 and its original foreground group in old_foreground_pgrp. Register
9580 restore_old_foreground_pgrp with atexit().
9581
9f2e1e63
DJ
95822006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
9583
9584 * server.c (handle_query): Correct qPart to qXfer.
9585
b80864fb
DJ
95862006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
9587
9588 * configure.ac: Check for more headers which are missing on
9589 Windows. Automatically supply -lwsock32 and USE_WIN32API.
9590 * configure.srv: Add Cygwin and mingw32.
9591 * remote-utils.c: Don't include headers unconditionally which
9592 are missing on mingw32. Include <winsock.h> for mingw32.
9593 (remote_open): Adjust for mingw32 support. Flush
9594 standard error after writing to it.
9595 (remote_close, putpkt_binary, input_interrupt, block_async_io)
9596 (unblock_async_io, enable_async_io, disable_async_io)
9597 (readchar, getpkt): Update for Winsock support.
9598 (prepare_resume_reply): Expect a protocol signal number.
9599 * server.c: Disable <sys/wait.h> on mingw32.
9600 (start_inferior): Adjust for mingw32 support. Flush
9601 standard error after writing to it.
9602 (attach_inferior): Likewise. Use protocol signal
9603 numbers.
9604 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
9605 and names.
9606 * win32-i386-low.c: New file.
9607 * Makefile.in (XM_CLIBS): Set.
9608 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
9609 (win32-i386-low.o): New dependency rule.
9610 * linux-low.c (linux_wait): Use target signal numbers.
9611 * target.h (struct target_ops): Doc fix.
9612 * server.h (target_signal_to_name): New prototype.
9613 * gdbreplay.c: Don't include headers unconditionally which
9614 are missing on mingw32. Include <winsock.h> for mingw32.
9615 (remote_close, remote_open): Adjust for Winsock support.
9616 * configure, config.in: Regenerated.
9617
0876f84a
DJ
96182006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9619
9620 * server.c (decode_xfer_read, write_qxfer_response): New.
9621 (handle_query): Take a packet length argument. Handle
9622 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
9623 the qSupported response.
9624 (main): Update call to handle_query.
9625
01f9e8fa
DJ
96262006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
9627
9628 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
9629 (putpkt_binary): Renamed from putpkt and adjusted for binary
9630 data.
9631 (putpkt): New wrapper for putpkt_binary.
9632 (readchar): Don't mask off the high bit.
9633 (decode_X_packet): New function.
9634 * server.c (main): Call putpkt_binary if a handler sets the packet
9635 length. Save the length of the incoming packet. Handle 'X'.
9636 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
9637
be2a5f71
DJ
96382006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
9639
9640 * server.c (handle_query): Handle qSupported.
9641
ea025f5f
DJ
96422006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9643
9644 * remote-utils.c (all_symbols_looked_up): New variable.
9645 (look_up_one_symbol): Check it.
9646 * server.h (look_up_one_symbol): New declaration.
9647 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
9648
9308fc88
DJ
96492006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9650
9651 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 9652 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
9653 (PTRACE_GET_THREAD_AREA): Define.
9654 (ps_get_thread_area): New function.
9655
52fb6437
NS
96562006-05-09 Nathan Sidwell <nathan@codesourcery.com>
9657
9658 * configure.srv (m68k*-*-uclinux*): New target.
9659 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
9660 (linux_resume_one_process): Remove extraneous cast.
9661 (linux_read_offsets): New.
9662 (linux_target_op): Add linux_read_offsets on mmuless systems.
9663 * server.c (handle_query): Add qOffsets logic.
9664 * target.h (struct target_ops): Add read_offsets.
9665
21b0f40c
DJ
96662006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
9667
9668 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
9669 (PTRACE_GET_THREAD_AREA): Define.
9670 (ps_get_thread_area): New function.
9671 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
9672 (linux-x86-64-low.o): Update.
9673
0050a760
DJ
96742006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
9675
9676 * configure.ac: Remove checks for prfpregset_t.
9677 * gdb_proc_service.h: New file.
9678 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
9679 new "gdb_proc_service.h".
9680 * proc-service.c: Likewise.
9681 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
9682 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
9683 * Makefile.in (gdb_proc_service_h): Updated.
9684 * configure, config.in: Regenerated.
9685
b92a518e
DJ
96862006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
9687
9688 * remote-utils.c (prepare_resume_reply): Move declaration
9689 of gdb_id_from_wait to the top of the block.
9690
545587ee
DJ
96912006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
9692
9693 * linux-low.c (regsets_store_inferior_registers): Read the regset
9694 from the target before filling it.
9695
9db87ebd
DJ
96962006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9697
9698 * server.c (attach_inferior): Return SIGTRAP for a successful
9699 attach.
9700
dd24457d
DJ
97012006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9702
9703 * Makefile.in (OBS): Add version.o.
9704 (STAGESTUFF): Delete.
9705 (version.o): Add dependencies.
9706 (version.c): Replace rule.
9707 (clean): Remove version.c.
9708 * server.c (gdbserver_version): New.
9709 (gdbserver_usage): Use printf.
9710 (main): Handle --version and --help.
9711 * server.h (version, host_name): Add declarations.
9712
6f0f660e
EZ
97132005-12-23 Eli Zaretskii <eliz@gnu.org>
9714
889bf7c5
PA
9715 * linux-arm-low.c:
9716 * linux-arm-low.c:
9717 * inferiors.c:
9718 * i387-fp.h:
9719 * i387-fp.c:
9720 * gdbreplay.c:
9721 * regcache.c:
9722 * proc-service.c:
9723 * mem-break.h:
9724 * mem-break.c:
9725 * linux-x86-64-low.c:
9726 * linux-sh-low.c:
9727 * linux-s390-low.c:
9728 * linux-ppc64-low.c:
9729 * linux-ppc-low.c:
9730 * linux-mips-low.c:
9731 * linux-m68k-low.c:
9732 * linux-m32r-low.c:
9733 * linux-low.h:
9734 * linux-low.c:
9735 * linux-ia64-low.c:
9736 * linux-i386-low.c:
9737 * linux-crisv32-low.c:
9738 * thread-db.c:
9739 * terminal.h:
9740 * target.h:
9741 * target.c:
9742 * server.h:
9743 * server.c:
9744 * remote-utils.c:
9745 * regcache.h:
9746 * utils.c:
9747 * Makefile.in:
9748 * configure.ac:
6f0f660e
EZ
9749 * gdbserver.1: Add (C) after Copyright. Update the FSF
9750 address.
9751
9d1fb177
DJ
97522005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
9753
9754 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
9755 (arm_breakpoint_at): Recognize both breakpoints.
9756 (the_low_target): Use the correct breakpoint instruction.
9757
011a70c2
DJ
97582005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
9759
9760 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
9761 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
9762 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
9763 (the_low_target): Update.
9764
7fb85e41
AS
97652005-10-25 Andreas Schwab <schwab@suse.de>
9766
9767 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
9768
9769 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
9770 (ia64_num_regs): Reduce to 462.
9771
3db0444b
DJ
97722005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
9773
9774 * acinclude.m4: Correct quoting.
9775 * aclocal.m4: Regenerated.
9776
9777 Suggested by SZOKOVACS Robert <szo@ies.hu>:
9778 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
9779 (thread_db_init): Call thread_db_err_str.
9780 * configure.ac: Check for TD_VERSION.
9781 * config.in, configure: Regenerated.
9782
bee0189a
DJ
97832005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9784
9785 * server.h (error, fatal, warning): Add ATTR_FORMAT.
9786
e9d25b98
DJ
97872005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9788
9789 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
9790 is not available. Define HAVE_PTRACE_GETREGS if it is.
9791 * config.in, configure: Regenerated.
9792 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
9793 * linux-i386-low.c, linux-m68k-low.c: Update to use
9794 HAVE_PTRACE_GETREGS.
9795 * linux-low.c (regsets_fetch_inferior_registers)
9796 (regsets_store_inferior_registers): Only return 0 if we processed
9797 GENERAL_REGS.
9798 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
9799 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
9800
a06660f7
DJ
98012005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9802
9803 * inferiors.c (struct thread_info): Add gdb_id.
9804 (add_thread): Add gdb_id argument.
9805 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
9806 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
9807 calls to add_thread.
9808 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
9809 * server.c (handle_query): Use thread_to_gdb_id.
9810 (handle_v_cont, main): Use gdb_id_to_thread_id.
9811 * server.h (add_thread): Update prototype.
9812 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
9813 prototypes.
9814
5a1f5858
DJ
98152005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9816
9817 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
9818 left-padded registers.
9819 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
9820 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
9821
e122f1f5
SE
98222005-07-01 Steve Ellcey <sje@cup.hp.com>
9823
9824 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
9825 * configure: Regenerate.
9826 * config.in: Regenerate.
9827 * server.h (NEED_DECLARATION_STRERROR):
9828 Replace with !HAVE_DECL_STRERROR.
9829
d592fa2f
DJ
98302005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
9831
9832 * linux-low.c (linux_wait, linux_send_signal): Don't test
9833 an unsigned long variable for > 0 if it could be MAX_ULONG.
9834 * server.c (myresume): Likewise.
9835 * target.c (set_desired_inferior): Likewise.
9836
ccbd4912
MK
98372005-06-13 Mark Kettenis <kettenis@gnu.org>
9838
9839 * configure.ac: Simplify and improve check for socklen_t.
9840 * configure, config.in: Regenerate.
9841
f450004a
DJ
98422005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
9843
9844 * acconfig.h: Remove.
9845 * configure.ac: Add a test for socklen_t. Use three-argument
9846 AC_DEFINE throughout.
9847 * config.in: Regenerated using autoheader 2.59.
9848 * configure: Regenerated.
9849
9850 * gdbreplay.c (socklen_t): Provide a default.
9851 (remote_open): Use socklen_t.
9852 * remote-utils.c (socklen_t): Provide a default.
9853 (remote_open): Use socklen_t.
9854 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
9855 unsigned char.
9856
9857 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
9858 char for buffers.
9859 * linux-low.c (linux_read_memory, linux_write_memory)
9860 (linux_read_auxv): Likewise.
9861 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
9862 (check_mem_write): Likewise.
9863 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
9864 Likewise.
9865 * regcache.c (struct inferior_rgcache_data, registers_to_string)
9866 (registers_from_string, register_data): Likewise.
9867 * server.c (handle_query, main): Likewise.
9868 * server.h (convert_ascii_to_int, convert_int_to_ascii)
9869 (decode_M_packet): Likewise.
9870 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
9871 * target.h (struct target_ops): Update read_memory, write_memory,
9872 and read_auxv.
9873 (read_inferior_memory, write_inferior_memory): Update.
9874 * linux-low.h (struct linux_target_ops): Change type of breakpoint
9875 to unsigned char *.
9876 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
9877 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
9878 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
9879 linux-s390-low.c, linux-sh-low.c: Update for changes in
9880 read_inferior_memory and the_low_target->breakpoint.
9881
eee84df1
DJ
98822005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
9883
9884 * Makefile.in (SFILES): Add linux-ppc64-low.c.
9885 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
9886 * configure.srv: Add powerpc64-*-linux*.
9887 * linux-ppc64-low.c: New file.
9888
45b134e5
OF
98892005-05-23 Orjan Friberg <orjanf@axis.com>
9890
9891 * linux-cris-low.c: New file with support for CRIS.
9892 * linux-crisv32-low.c: Ditto for CRISv32.
9893 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
9894 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 9895 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
9896 reg-crisv32.o, and reg-crisv32.c to make rules.
9897 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
9898 recognized targets.
9899
48d93c75
UW
99002005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
9901
9902 * linux-low.c (fetch_register): Ensure buffer size is a multiple
9903 of sizeof (PTRACE_XFER_TYPE).
9904 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
9905
e013ee27
OF
99062005-05-12 Orjan Friberg <orjanf@axis.com>
9907
889bf7c5 9908 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
9909 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
9910 pointers for hardware watchpoint support.
9911 * linux-low.h (struct linux_target_ops): Ditto.
9912 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
9913 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
9914 to linux_target_ops.
9915 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
9916 reply packet.
9917 * server.c (main): Recognize 'Z' and 'z' packets.
9918
b0ded00b
UW
99192005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
9920
9921 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
9922 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
9923 (the_low_target): Add new members.
9924
8643e2ad
DJ
99252005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
9926
9927 * proc-service.c (ps_lgetregs): Search all_processes instead of
9928 all_threads.
9929
fc620387
DJ
99302005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
9931
9932 * server.c (start_inferior): Change return type to int.
9933 (attach_inferior): Change sigptr to int *.
9934 (handle_v_cont, handle_v_requests): Change signal to int *.
9935 (main): Change signal to int.
9936
99372005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
9938
9939 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
9940 * configure.srv: Add m32r*-*-linux*.
9941 * linux-m32r-low.c: New file.
9942
e0e76420
DJ
99432005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
9944
9945 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
9946
a1928bad
DJ
99472005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
9948
9949 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
9950 Take unsigned long arguments for PIDs.
9951 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
9952 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
9953 (wait_for_sigstop, linux_resume_one_process)
9954 (regsets_fetch_inferior_registers, linux_send_signal)
9955 (linux_read_auxv): Likewise. Update the types of variables holding
9956 PIDs. Update format string specifiers.
9957 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
9958 * remote-utils.c (prepare_resume_reply): Likewise.
9959 * server.c (cont_thread, general_thread, step_thread)
9960 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
9961 unsigned long.
9962 (handle_query): Update format specifiers.
9963 (handle_v_cont, main): Use strtoul for thread IDs.
9964 * server.h (struct inferior_list_entry): Use unsigned long for ID.
9965 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
9966 (general_thread, step_thread, thread_from_wait)
9967 (old_thread_from_wait): Update.
9968 * target.h (struct thread_resume): Use unsigned long for THREAD.
9969 (struct target_ops): Use unsigned long for arguments to attach and
9970 thread_alive.
9971
dcdb98d2
DJ
99722005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
9973
9974 * acinclude.m4: Include bfd/bfd.m4 directly.
9975 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
9976 <agriffis@toolchain.org>.
9977 * aclocal.m4, configure: Regenerated.
9978
bec39cab
AC
99792005-01-07 Andrew Cagney <cagney@gnu.org>
9980
9981 * configure.ac: Rename configure.in, require autoconf 2.59.
9982 * configure: Re-generate.
9983
434c4c77
DJ
99842004-12-08 Daniel Jacobowitz <dan@debian.org>
9985
9986 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
9987 LIBS when finished.
9988 * aclocal.m4: Regenerated.
9989 * configure: Regenerated.
9990
db1d3e1b
AS
99912004-11-21 Andreas Schwab <schwab@suse.de>
9992
9993 * linux-m68k-low.c (m68k_num_gregs): Define.
9994 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
9995 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
9996 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
9997 (m68k_breakpoint_at): New. Add to the_low_target.
9998
9999 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10000 srv_linux_thread_db to yes.
10001
43360365
JB
100022004-10-20 Joel Brobecker <brobecker@gnat.com>
10003
10004 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10005 (ARCH_SET_FS): Likewise.
10006 (ARCH_GET_FS): Likewise.
10007 (ARCH_GET_GS): Likewise.
10008
fd500816
DJ
100092004-10-16 Daniel Jacobowitz <dan@debian.org>
10010
10011 * linux-i386-low.c (ps_get_thread_area): New.
10012 * linux-x86-64-low.c (ps_get_thread_area): New.
10013 * linux-low.c: Include <sys/syscall.h>.
10014 (linux_kill_one_process): Don't kill the first thread here.
10015 (linux_kill): Kill the first thread here.
10016 (kill_lwp): New function.
10017 (send_sigstop, linux_send_signal): Use it.
10018 * proc-service.c: Clean up #ifdefs.
10019 (fpregset_info): Delete.
10020 (ps_lgetregs): Update and enable implementation.
10021 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
10022 implementations.
10023 * remote-utils.c (struct sym_cache, symbol_cache): New.
10024 (input_interrupt): Print a clearer message.
10025 (async_io_enabled): New variable.
10026 (enable_async_io, disable_async_io): Use it. Update comments.
10027 (look_up_one_symbol): Use the symbol cache.
10028 * thread-db.c (thread_db_look_up_symbols): New function.
10029 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
10030
f6de3c42
DJ
100312004-10-16 Daniel Jacobowitz <dan@debian.org>
10032
10033 * configure.in: Test for -rdynamic.
10034 * configure: Regenerated.
10035 * Makefile (INTERNAL_LDFLAGS): New.
10036 (gdbserver, gdbreplay): Use it.
10037
2c0fc042
AC
100382004-09-02 Andrew Cagney <cagney@gnu.org>
10039
10040 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10041
075b3282
DJ
100422004-03-23 Daniel Jacobowitz <drow@mvista.com>
10043
10044 * linux-low.c (linux_wait): Clear all_processes list also.
10045
fa6a77dc
DJ
100462004-03-12 Daniel Jacobowitz <drow@mvista.com>
10047
10048 * linux-low.c: Include <errno.h>. Remove extern declaration of
10049 errno.
10050
6d782a97
DJ
100512004-03-12 Daniel Jacobowitz <drow@mvista.com>
10052
10053 * gdbreplay.c, server.h, utils.c: Update copyright years.
10054
3a7fb99b
DJ
100552004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10056
10057 * server.c (main): Print child status or termination signal from
10058 variable 'signal', not 'sig'.
10059
c3e735a6
DJ
100602004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10061
10062 * linux-low.c (linux_read_memory): Change return type to
10063 int. Check for and return error from ptrace().
10064 * target.c (read_inferior_memory): Change return type to int. Pass
10065 back return status from the_target->read_memory().
10066 * target.h (struct target_ops): Adapt *read_memory() prototype.
10067 Update comment.
10068 (read_inferior_memory): Adapt prototype.
10069 * server.c (main): Return an error packet if
10070 read_inferior_memory() returns an error.
10071
a59d1c82
DJ
100722004-03-04 Daniel Jacobowitz <drow@mvista.com>
10073
10074 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10075 Unify with other clean targets.
10076
dc3f8883
DJ
100772004-02-29 Daniel Jacobowitz <drow@mvista.com>
10078
10079 * server.c (handle_v_cont): Call set_desired_inferior.
10080
89a208da
DJ
100812004-02-29 Daniel Jacobowitz <drow@mvista.com>
10082
10083 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10084
62ea82f5
DJ
100852004-02-29 Daniel Jacobowitz <drow@mvista.com>
10086
10087 * linux-low.c (linux_wait): Unblock async I/O.
10088 (linux_resume): Block and enable async I/O.
10089 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10090 * server.h (block_async_io, unblock_async_io): Add prototypes.
10091
6910d122
DJ
100922004-02-29 Daniel Jacobowitz <drow@mvista.com>
10093
10094 * remote-utils.c (remote_open): Print a status notice after
10095 opening a TCP port.
10096 * server.c (attach_inferior): Print a status notice after
10097 attaching.
10098
100992004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
10100
10101 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10102
c89dc5d4
DJ
101032004-02-26 Daniel Jacobowitz <drow@mvista.com>
10104
10105 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
10106 error packet.
10107 * server.c, target.h: Update copyright years.
10108
4b8dad4a
RM
101092004-02-25 Roland McGrath <roland@redhat.com>
10110
10111 * target.h (struct target_ops): New member `read_auxv'.
10112 * server.c (handle_query): Handle qPart:auxv:read: query using that.
10113 * linux-low.c (linux_read_auxv): New function.
10114 (linux_target_ops): Initialize `read_auxv' member to that.
10115
d7446758
JB
101162004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10117
10118 Committed by Jim Blandy <jimb@redhat.com>.
10119
10120 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 10121 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
10122 instead of GPR_SIZE to distiguish s390 and s390x targets.
10123
5544ad89
DJ
101242004-01-31 Daniel Jacobowitz <drow@mvista.com>
10125
10126 * linux-low.c: Update copyright year.
10127 (check_removed_breakpoint): Clear pending_is_breakpoint.
10128 (linux_set_resume_request, linux_queue_one_thread)
10129 (resume_status_pending_p): New functions.
10130 (linux_continue_one_thread): Use process->resume.
10131 (linux_resume): Only resume threads if there are no pending events.
10132 * linux-low.h (struct process_info): Add resume request
10133 pointer.
10134
2a68b70e
DJ
101352004-01-30 Daniel Jacobowitz <drow@mvista.com>
10136
10137 * regcache.c (new_register_cache): Clear the allocated register
10138 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
10139
64386c31
DJ
101402003-10-13 Daniel Jacobowitz <drow@mvista.com>
10141
10142 * linux-low.c (linux_resume): Take a struct thread_resume *
10143 argument.
10144 (linux_wait): Update call.
10145 (resume_ptr): New static variable.
10146 (linux_continue_one_thread): Renamed from
10147 linux_continue_one_process. Use resume_ptr.
10148 (linux_resume): Use linux_continue_one_thread.
10149 * server.c (handle_v_cont, handle_v_requests): New functions.
10150 (myresume): New function.
10151 (main): Handle 'v' case.
10152 * target.h (struct thread_resume): New type.
10153 (struct target_ops): Change argument of "resume" to struct
10154 thread_resume *.
10155 (myresume): Delete macro.
10156
c938e9b0
L
101572003-08-08 H.J. Lu <hongjiu.lu@intel.com>
10158
10159 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
10160 (uninstall): Support DESTDIR.
10161
7f313d07
BC
10162Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
10163
10164 * configure.srv: Add xscale*linux copy of arm*linux entry.
10165
3b2fc2ea
DJ
101662003-07-24 Daniel Jacobowitz <drow@mvista.com>
10167
10168 * linux-arm-low.c (arm_reinsert_addr): New function.
10169 (the_low_target): Add arm_reinsert_addr.
10170
1c0a559e
MK
101712003-07-08 Mark Kettenis <kettenis@gnu.org>
10172
10173 * mem-break.c: Remove whitespace at end of file.
10174
43d5792c
DJ
101752003-06-28 Daniel Jacobowitz <drow@mvista.com>
10176
10177 * configure.in: Check whether we need to prototype strerror.
10178 * server.h: Optionally prototype strerror.
10179 * gdbreplay.c (perror_with_name): Use strerror.
10180 * linux-low.c (linux_attach_lwp): Use strerror.
10181 * utils.c (perror_with_name): Use strerror.
10182 * config.in, configure: Regenerated.
10183
c8a86edf
DJ
101842003-06-28 Daniel Jacobowitz <drow@mvista.com>
10185
10186 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
10187 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
10188
73d37363
DJ
101892003-06-20 Daniel Jacobowitz <drow@mvista.com>
10190
10191 * Makefile.in (SFILES): Update.
10192 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
10193 low-sun3.c: Remove files.
10194
6ad8ae5c
DJ
101952003-06-17 Daniel Jacobowitz <drow@mvista.com>
10196
10197 * linux-low.c: Move comment to linux_thread_alive where it belonged.
10198 (linux_detach_one_process, linux_detach): New functions.
10199 (linux_target_ops): Add linux_detach.
10200 * server.c (main): Handle 'D' packet.
10201 * target.h (struct target_ops): Add "detach" member.
10202 (detach_inferior): Define.
10203
1581182a
MK
102042003-06-13 Mark Kettenis <kettenis@gnu.org>
10205
10206 From Kelley Cook <kelleycook@wideopenwest.com>:
10207 * configure.srv: Accept i[34567]86 variants.
10208
e5379b03
DJ
102092003-06-05 Daniel Jacobowitz <drow@mvista.com>
10210
10211 * linux-low.c (linux_wait_for_event): Correct comment typos.
10212 (linux_resume_one_process): Call check_removed_breakpoint.
10213 (linux_send_signal): New function.
10214 (linux_target_ops): Add linux_send_signal.
10215 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
10216 of kill.
10217 * target.h (struct target_ops): Add send_signal.
10218
2ff29de4
JB
102192003-05-29 Jim Blandy <jimb@redhat.com>
10220
10221 * linux-low.c (usr_store_inferior_registers): Transfer buf in
10222 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
10223 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
10224 away part of the register's value.
10225
254787d4
DJ
102262003-03-26 Daniel Jacobowitz <drow@mvista.com>
10227
10228 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
10229 (linux_wait_for_event, linux_init_signals): Likewise.
10230
94e10508
DJ
102312003-03-17 Daniel Jacobowitz <drow@mvista.com>
10232
10233 * configure.in: Check for stdlib.h.
10234 * configure: Regenerated.
10235 * config.in: Regenerated.
10236
4c0711e0
DJ
102372003-01-04 Andreas Schwab <schwab@suse.de>
10238
10239 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
10240
ef66e766
AC
102412003-01-02 Andrew Cagney <ac131313@redhat.com>
10242
10243 * Makefile.in: Remove obsolete code.
10244
a1358604
DJ
102452002-11-20 Daniel Jacobowitz <drow@mvista.com>
10246
10247 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
10248 defined(PT_FPR0_HI).
10249
23ce3b1c
DJ
102502002-11-17 Stuart Hughes <seh@zee2.com>
10251
10252 * linux-arm-low.c (arm_num_regs): Increase.
10253 (arm_regmap): Include status register.
10254
102552002-11-17 Daniel Jacobowitz <drow@mvista.com>
10256
10257 * linux-low.c (register_addr): Remove incorrect -1 check.
10258
a9fa9f7d
DJ
102592002-08-29 Daniel Jacobowitz <drow@mvista.com>
10260
10261 * linux-low.c (linux_create_inferior): Call setpgid. Return
10262 the new PID.
10263 (unstopped_p, linux_signal_pid): Remove.
10264 (linux_target_ops): Remove linux_signal_pid.
10265 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
10266 global instead of target method.
10267 * target.h (struct target_ops): Remove signal_pid. Update comment
10268 for create_inferior.
10269 * server.c (signal_pid): New variable.
10270 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 10271 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
10272 (attach_inferior): Set signal_pid.
10273
17574093
DJ
102742002-08-23 Daniel Jacobowitz <drow@mvista.com>
10275
10276 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
10277
102782002-08-20 Jim Blandy <jimb@redhat.com>
10279
10280 * Makefile.in (LDFLAGS): Allow the configure script to establish a
10281 default for this.
10282
102832002-08-01 Andrew Cagney <cagney@redhat.com>
10284
10285 * Makefile.in: Make chill references obsolete.
10286
102872002-07-24 Kevin Buettner <kevinb@redhat.com>
10288
10289 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
10290 * configure: Regenerate.
10291 * config.in: Regenerate.
10292
102932002-07-09 David O'Brien <obrien@FreeBSD.org>
10294
10295 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
10296 (perror_with_name, remote_close, remote_open, expect, play): Static.
10297
102982002-07-04 Michal Ludvig <mludvig@suse.cz>
10299
4b8dad4a 10300 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
10301 byte offsets instead of an array of indexes.
10302 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
10303
103042002-06-13 Daniel Jacobowitz <drow@mvista.com>
10305
10306 * regcache.c: Add comment.
10307
103082002-06-11 Daniel Jacobowitz <drow@mvista.com>
10309
10310 * thread-db.c: New file.
10311 * proc-service.c: New file.
10312 * acinclude.m4: New file.
10313 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
10314 proc-service.o, and thread-db.o.
10315 (linux-low.o): Add USE_THREAD_DB.
10316 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
10317 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
10318 * aclocal.m4: Regenerated.
10319 * config.in: Regenerated.
10320 * configure: Regenerated.
10321 * configure.in: Check for proc_service.h, sys/procfs.h,
10322 thread_db.h, and linux/elf.h headrs.
10323 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
10324 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
10325 Check for -lthread_db and thread support.
10326 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
10327 PowerPC, and SuperH.
10328 * i387-fp.c: Constify arguments.
10329 * i387-fp.h: Likewise.
10330 * inferiors.c: (struct thread_info): Renamed from
10331 `struct inferior_info'. Remove PID member. Use generic inferior
10332 list header. All uses updated.
10333 (inferiors, signal_pid): Removed.
10334 (all_threads): New variable.
10335 (get_thread): Define.
10336 (add_inferior_to_list): New function.
10337 (for_each_inferior): New function.
10338 (change_inferior_id): New function.
10339 (add_inferior): Removed.
10340 (remove_inferior): New function.
10341 (add_thread): New function.
10342 (free_one_thread): New function.
10343 (remove_thread): New function.
10344 (clear_inferiors): Use for_each_inferior and free_one_thread.
10345 (find_inferior): New function.
10346 (find_inferior_id): New function.
10347 (inferior_target_data): Update argument type.
10348 (set_inferior_target_data): Likewise.
10349 (inferior_regcache_data): Likewise.
10350 (set_inferior_regcache_data): Likewise.
10351 * linux-low.c (linux_bp_reinsert): Remove.
10352 (all_processes, stopping_threads, using_thrads)
10353 (struct pending_signals, debug_threads, pid_of): New.
10354 (inferior_pid): Replace with macro.
10355 (struct inferior_linux_data): Remove.
10356 (get_stop_pc, add_process): New functions.
10357 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
10358 Use add_process and add_thread.
10359 (linux_attach_lwp): New function, based on old linux_attach. Use
10360 add_process and add_thread. Set stop_expected for new threads.
10361 (linux_attach): New function.
10362 (linux_kill_one_process): New function.
10363 (linux_kill): Kill all LWPs.
10364 (linux_thread_alive): Use find_inferior_id.
10365 (check_removed_breakpoints, status_pending_p): New functions.
10366 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
10367 Update. Use WNOHANG. Wait for cloned processes also. Update process
10368 struct for the found process.
10369 (linux_wait_for_event): New function.
10370 (linux_wait): Use it. Support LWPs.
10371 (send_sigstop, wait_for_sigstop, stop_all_processes)
10372 (linux_resume_one_process, linux_continue_one_process): New functions.
10373 (linux_resume): Support LWPs.
10374 (REGISTER_RAW_SIZE): Remove.
10375 (fetch_register): Use register_size instead. Call supply_register.
10376 (usr_store_inferior_registers): Likewise. Call collect_register.
10377 Fix recursive case.
10378 (regsets_fetch_inferior_registers): Improve error message.
10379 (regsets_store_inferior_registers): Add debugging.
10380 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
10381 (unstopped_p, linux_signal_pid): New functions.
10382 (linux_target_ops): Add linux_signal_pid.
10383 (linux_init_signals): New function.
10384 (initialize_low): Call it. Initialize using_threads.
10385 * regcache.c (inferior_regcache_data): Add valid
10386 flag.
10387 (get_regcache): Fetch registers lazily. Add fetch argument
10388 and update all callers.
10389 (regcache_invalidate_one, regcache_invalidate): New
10390 functions.
10391 (new_register_cache): Renamed from create_register_cache.
10392 Return the new regcache.
10393 (free_register_cache): Change argument to a void *.
10394 (registers_to_string, registers_from_string): Call get_regcache
10395 with fetch flag set.
10396 (register_data): Make static. Pass fetch flag to get_regcache.
10397 (supply_register): Call get_regcache with fetch flag clear.
10398 (collect_register): Call get_regcache with fetch flag set.
10399 (collect_register_as_string): New function.
10400 * regcache.h: Update.
10401 * remote-utils.c (putpkt): Flush after debug output and use
10402 stderr.
10403 Handle input interrupts while waiting for an ACK.
10404 (input_interrupt): Use signal_pid method.
10405 (getpkt): Flush after debug output and use stderr.
10406 (outreg): Use collect_register_as_string.
10407 (new_thread_notify, dead_thread_notify): New functions.
10408 (prepare_resume_reply): Check using_threads. Set thread_from_wait
10409 and general_thread.
10410 (look_up_one_symbol): Flush after debug output.
10411 * server.c (step_thread, server_waiting): New variables.
10412 (start_inferior): Don't use signal_pid. Update call to mywait.
10413 (attach_inferior): Update call to mywait.
10414 (handle_query): Handle qfThreadInfo and qsThreadInfo.
10415 (main): Don't fetch/store registers explicitly. Use
10416 set_desired_inferior. Support proposed ``Hs'' packet. Update
10417 calls to mywait.
10418 * server.h: Update.
10419 (struct inferior_list, struct_inferior_list_entry): New.
10420 * target.c (set_desired_inferior): New.
10421 (write_inferior_memory): Constify.
10422 (mywait): New function.
10423 * target.h: Update.
10424 (struct target_ops): New signal_pid method.
10425 (mywait): Removed macro, added prototype.
10426
10427 * linux-low.h (regset_func): Removed.
10428 (regset_fill_func, regset_store_func): New.
10429 (enum regset_type): New.
10430 (struct regset_info): Add type field. Use new operation types.
10431 (struct linux_target_ops): stop_pc renamed to get_pc.
10432 Add decr_pc_after_break and breakpoint_at.
10433 (get_process, get_thread_proess, get_process_thread)
10434 (strut process_info, all_processes, linux_attach_lwp)
10435 (thread_db_init): New.
10436
10437 * linux-arm-low.c (arm_get_pc, arm_set_pc,
10438 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
10439 (the_low_target): Add new members.
10440 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
10441 (i386_store_fpxregset): Constify.
10442 (target_regsets): Add new kind identifier.
10443 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
10444 (i386_set_pc): Add debugging.
10445 (i386_breakpoint_at): New function.
10446 (the_low_target): Add new members.
10447 * linux-mips-low.c (mips_get_pc, mips_set_pc)
10448 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
10449 (mips_breakpoint_at): New.
10450 (the_low_target): Add new members.
10451 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
10452 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
10453 (the_low_target): Add new members.
10454 * linux-sh-low.c (sh_get_pc, sh_set_pc)
10455 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
10456 (the_low_target): Add new members.
10457 * linux-x86-64-low.c (target_regsets): Add new kind
10458 identifier.
10459
104602002-05-15 Daniel Jacobowitz <drow@mvista.com>
10461
10462 From Martin Pool <mbp@samba.org>:
10463 * server.c (gdbserver_usage): New function.
10464 (main): Call it.
10465
104662002-05-14 Daniel Jacobowitz <drow@mvista.com>
10467
10468 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
10469 stop_at -> stop_pc.
10470
104712002-05-04 Andrew Cagney <ac131313@redhat.com>
10472
10473 * Makefile.in: Remove obsolete code.
10474
104752002-04-24 Michal Ludvig <mludvig@suse.cz>
10476
10477 * linux-low.c (regsets_fetch_inferior_registers),
10478 (regsets_store_inferior_registers): Removed cast to int from
10479 ptrace() calls.
10480 * regcache.h: Added declaration of struct inferior_info.
10481
104822002-04-20 Daniel Jacobowitz <drow@mvista.com>
10483
10484 * inferiors.c (struct inferior_info): Add regcache_data.
10485 (add_inferior): Call create_register_cache.
10486 (clear_inferiors): Call free_register_cache.
10487 (inferior_regcache_data, set_inferior_regcache_data): New functions.
10488 * regcache.c (struct inferior_regcache_data): New.
10489 (registers): Remove.
10490 (get_regcache): New function.
10491 (create_register_cache, free_register_cache): New functions.
10492 (set_register_cache): Don't initialize the register cache here.
10493 (registers_to_string, registers_from_string, register_data): Call
10494 get_regcache.
10495 * regcache.h: Add prototypes.
10496 * server.h: Likewise.
10497
104982002-04-20 Daniel Jacobowitz <drow@mvista.com>
10499
10500 * mem-break.c: New file.
10501 * mem-break.h: New file.
10502 * Makefile.in: Add mem-break.o rule; update server.h
10503 dependencies.
10504 * inferiors.c (struct inferior_info): Add target_data
10505 member.
10506 (clear_inferiors): Free target_data member if set.
10507 (inferior_target_data, set_inferior_target_data): New functions.
10508 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
10509 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
10510 * linux-low.c (linux_bp_reinsert): New variable.
10511 (struct inferior_linux_data): New.
10512 (linux_create_inferior): Use set_inferior_target_data.
10513 (linux_attach): Likewise. Call add_inferior.
10514 (linux_wait_for_one_inferior): New function.
10515 (linux_wait): Call it.
10516 (linux_write_memory): Add const.
10517 (initialize_low): Call set_breakpoint_data.
10518 * linux-low.h (struct linux_target_ops): Add breakpoint
10519 handling members.
10520 * server.c (attach_inferior): Remove extra add_inferior
10521 call.
10522 * server.h: Include mem-break.h. Update inferior.c
10523 prototypes.
10524 * target.c (read_inferior_memory)
10525 (write_inferior_memory): New functions.
10526 * target.h (read_inferior_memory)
10527 (write_inferior_memory): Change macros to prototypes.
10528 (struct target_ops): Update comments. Add const to write_memory
10529 definition.
10530
105312002-04-11 Daniel Jacobowitz <drow@mvista.com>
10532
10533 * linux-low.c (usr_store_inferior_registers): Support
10534 registers which are allowed to fail to store.
10535 * linux-low.h (linux_target_ops): Likewise.
10536 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
10537 (ppc_cannot_store_register): FPSCR may not be storable.
10538
105392002-04-09 Daniel Jacobowitz <drow@mvista.com>
10540
10541 * server.h: Include <string.h> if HAVE_STRING_H.
10542 * ChangeLog: Correct paths in last ChangeLog entry.
10543
105442002-04-09 Daniel Jacobowitz <drow@mvista.com>
10545
10546 * linux-low.h: Remove obsolete prototypes.
10547 (struct linux_target_ops): New.
10548 (extern the_low_target): New.
10549 * linux-low.c (num_regs, regmap): Remove declarations.
10550 (register_addr): Use the_low_target explicitly.
10551 (fetch_register): Likewise.
10552 (usr_fetch_inferior_registers): Likewise.
10553 (usr_store_inferior_registers): Likewise.
10554 * linux-arm-low.c (num_regs): Remove.
10555 (arm_num_regs): Define.
10556 (arm_regmap): Renamed from regmap, made static.
10557 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
10558 made static.
10559 (arm_cannot_store_register): Renamed from cannot_store_register,
10560 made static.
10561 (the_low_target): New.
10562 * linux-i386-low.c (num_regs): Remove.
10563 (i386_num_regs): Define.
10564 (i386_regmap): Renamed from regmap, made static.
10565 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
10566 made static.
10567 (i386_cannot_store_register): Renamed from cannot_store_register,
10568 made static.
10569 (the_low_target): New.
10570 * linux-ia64-low.c (num_regs): Remove.
10571 (ia64_num_regs): Define.
10572 (ia64_regmap): Renamed from regmap, made static.
10573 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
10574 made static.
10575 (ia64_cannot_store_register): Renamed from cannot_store_register,
10576 made static.
10577 (the_low_target): New.
10578 * linux-m68k-low.c (num_regs): Remove.
10579 (m68k_num_regs): Define.
10580 (m68k_regmap): Renamed from regmap, made static.
10581 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
10582 made static.
10583 (m68k_cannot_store_register): Renamed from cannot_store_register,
10584 made static.
10585 (the_low_target): New.
10586 * linux-mips-low.c (num_regs): Remove.
10587 (mips_num_regs): Define.
10588 (mips_regmap): Renamed from regmap, made static.
10589 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
10590 made static.
10591 (mips_cannot_store_register): Renamed from cannot_store_register,
10592 made static.
10593 (the_low_target): New.
10594 * linux-ppc-low.c (num_regs): Remove.
10595 (ppc_num_regs): Define.
10596 (ppc_regmap): Renamed from regmap, made static.
10597 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
10598 made static.
10599 (ppc_cannot_store_register): Renamed from cannot_store_register,
10600 made static.
10601 (the_low_target): New.
10602 * linux-s390-low.c (num_regs): Remove.
10603 (s390_num_regs): Define.
10604 (s390_regmap): Renamed from regmap, made static.
10605 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
10606 made static.
10607 (s390_cannot_store_register): Renamed from cannot_store_register,
10608 made static.
10609 (the_low_target): New.
10610 * linux-sh-low.c (num_regs): Remove.
10611 (sh_num_regs): Define.
10612 (sh_regmap): Renamed from regmap, made static.
10613 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
10614 made static.
10615 (sh_cannot_store_register): Renamed from cannot_store_register,
10616 made static.
10617 (the_low_target): New.
10618 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
10619 (the_low_target): New.
10620
106212002-04-09 Daniel Jacobowitz <drow@mvista.com>
10622
10623 * Makefile.in: Add stamp-h target.
10624 * configure.in: Create stamp-h.
10625 * configure: Regenerated.
10626
106272002-04-09 Daniel Jacobowitz <drow@mvista.com>
10628
10629 * inferiors.c: New file.
10630 * target.c: New file.
10631 * target.h: New file.
10632 * Makefile.in: Add target.o and inferiors.o. Update
10633 dependencies.
10634 * linux-low.c (inferior_pid): New static variable,
10635 moved from server.c.
10636 (linux_create_inferior): Renamed from create_inferior.
10637 Call add_inferior. Return 0 on success instead of a PID.
10638 (linux_attach): Renamed from myattach.
10639 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
10640 (linux_thread_alive): Renamed from mythread_alive.
10641 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
10642 child dies.
10643 (linux_resume): Renamed from myresume. Add missing ``return 0''.
10644 (regsets_store_inferior_registers): Correct error message.
10645 Add missing ``return 0''.
10646 (linux_fetch_registers): Renamed from fetch_inferior_registers.
10647 (linux_store_registers): Renamed from store_inferior_registers.
10648 (linux_read_memory): Renamed from read_inferior_memory.
10649 (linux_write_memory): Renamed from write_inferior_memory.
10650 (linux_target_ops): New structure.
10651 (initialize_low): Call set_target_ops ().
10652 * remote-utils.c (unhexify): New function.
10653 (hexify): New function.
10654 (input_interrupt): Send signals to ``signal_pid''.
10655 * server.c (inferior_pid): Remove.
10656 (start_inferior): Update create_inferior call.
10657 (attach_inferior): Call add_inferior.
10658 (handle_query): New function.
10659 (main): Call handle_query for `q' packets.
10660 * server.h: Include "target.h". Remove obsolete prototypes.
10661 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
10662
106632002-04-09 Daniel Jacobowitz <drow@mvista.com>
10664
10665 * Makefile.in: Add WARN_CFLAGS. Update configury
10666 dependencies.
10667 * configure.in: Check for <string.h>
10668 * configure: Regenerate.
10669 * config.in: Regenerate.
10670 * gdbreplay.c: Include needed system headers.
10671 (remote_open): Remove strchr prototype.
10672 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
10673 * regcache.c (supply_register): Change buf argument to const void *.
10674 (supply_register_by_name): Likewise.
10675 (collect_register): Change buf argument to void *.
10676 (collect_register_by_name): Likewise.
10677 * regcache.h: Add missing prototypes.
10678 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
10679 * server.c (handle_query): New function.
10680 (attached): New static variable, moved out of main.
10681 (main): Quiet longjmp clobber warnings.
10682 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
10683 * utils.c (error): Remove NORETURN.
10684 (fatal): Likewise.
This page took 1.888825 seconds and 4 git commands to generate.