Automatic date update in version.in
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
2db9a427
PA
12015-02-20 Pedro Alves <palves@redhat.com>
2
3 * thread-db.c: Include "nat/linux-procfs.h".
4 (thread_db_init): Skip listing new threads if the kernel supports
5 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
6
afa8d396
PA
72015-02-20 Pedro Alves <palves@redhat.com>
8
9 * linux-low.c (status_pending_p_callback): Use ptid_match.
10
c9587f88
AT
112015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
12
13 PR breakpoints/16812
14 * linux-low.c (wstatus_maybe_breakpoint): Remove.
15 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
16 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
17
b05ec7a5
AT
182015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
19
20 PR breakpoints/15956
21 * tracepoint.c (cmd_qtinit): Add check for current_thread.
22
d33501a5
MM
232015-02-09 Markus Metzger <markus.t.metzger@intel.com>
24
25 * linux-low.c (linux_low_btrace_conf): Print size.
26 * server.c (handle_btrace_conf_general_set): New.
27 (hanle_general_set): Call handle_btrace_conf_general_set.
28 (handle_query): Report Qbtrace-conf:bts:size as supported.
29
f4abbc16
MM
302015-02-09 Markus Metzger <markus.t.metzger@intel.com>
31
32 * linux-low.c (linux_low_enable_btrace): Update parameters.
33 (linux_low_btrace_conf): New.
34 (linux_target_ops)<to_btrace_conf>: Initialize.
35 * server.c (current_btrace_conf): New.
36 (handle_btrace_enable): Rename to ...
37 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
38 to target_enable_btrace. Update comment. Update users.
39 (handle_qxfer_btrace_conf): New.
40 (qxfer_packets): Add btrace-conf entry.
41 (handle_query): Report qXfer:btrace-conf:read as supported packet.
42 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
43 (target_ops)<read_btrace_conf>: New.
44 (target_enable_btrace): Update parameters.
45 (target_read_btrace_conf): New.
46
043c3577
MM
472015-02-09 Markus Metzger <markus.t.metzger@intel.com>
48
49 * server.c (handle_btrace_general_set): Remove call to
50 target_supports_btrace.
51 (supported_btrace_packets): New.
52 (handle_query): Call supported_btrace_packets.
53 * target.h: include btrace-common.h.
54 (btrace_target_info): Removed.
55 (supports_btrace, target_supports_btrace): Update parameters.
56
734b0e4b
MM
572015-02-09 Markus Metzger <markus.t.metzger@intel.com>
58
59 * Makefile.in (SFILES): Add common/btrace-common.c.
60 (OBS): Add common/btrace-common.o.
61 (btrace-common.o): Add build rules.
62 * linux-low: Include btrace-common.h.
63 (linux_low_read_btrace): Use struct btrace_data. Call
64 btrace_data_init and btrace_data_fini.
65
d6c146e9
PA
662015-02-06 Pedro Alves <palves@redhat.com>
67
68 * thread-db.c (find_new_threads_callback): Add debug output.
69
20ba1ce6
PA
702015-02-04 Pedro Alves <palves@redhat.com>
71
72 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
73 (resume_stopped_resumed_lwps): New function.
74 (linux_wait_for_event_filtered): Use it.
75
8cc73a39
SDJ
762015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
77
78 * Makefile.in (SFILES): Add linux-personality.c.
79 (linux-personality.o): New rule.
80 * configure.srv (srv_linux_obj): Add linux-personality.o to the
81 list of objects to be built.
82 * linux-low.c: Include nat/linux-personality.h.
83 (linux_create_inferior): Remove code to disable address space
84 randomization (moved to ../nat/linux-personality.c). Create
85 cleanup to disable address space randomization.
86
fb23d554
SDJ
872015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
88
89 * Makefile.in (posix-strerror.o): New rule.
90 (mingw-strerror.o): Likewise.
91 * configure: Regenerated.
92 * configure.ac: Source file ../common/common.host. Initialize new
93 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
94
cdf43629
YQ
952015-01-14 Yao Qi <yao@codesourcery.com>
96
97 * Makefile.in (SFILES): Add nat/ppc-linux.c.
98 (ppc-linux.o): New rule.
99 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
100 * configure.ac: AC_CHECK_FUNCS(getauxval).
101 * config.in: Re-generated.
102 * configure: Re-generated.
103 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
104 ppc64_64bit_inferior_p
105
514c5338
YQ
1062015-01-14 Yao Qi <yao@codesourcery.com>
107
108 * linux-ppc-low.c: Include "nat/ppc-linux.h".
109 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
110 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
111 (PT_ORIG_R3, PT_TRAP): Likewise.
112 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
113 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
114 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
115
3368c1e5
JB
1162015-01-10 Joel Brobecker <brobecker@adacore.com>
117
118 * i387-fp.c (i387_cache_to_xsave): In look over
119 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
120 zmmh_low_space field by use of zmmh_high_space.
121
582511be
PA
1222015-01-09 Pedro Alves <palves@redhat.com>
123
124 * linux-low.c (step_over_bkpt): Move higher up in the file.
125 (handle_extended_wait): Don't store the stop_pc here.
126 (get_stop_pc): Adjust comments and rename to ...
127 (check_stopped_by_breakpoint): ... this. Record whether the LWP
128 stopped for a software breakpoint or hardware breakpoint.
129 (thread_still_has_status_pending_p): New function.
130 (status_pending_p_callback): Use
131 thread_still_has_status_pending_p. If the event is no longer
132 interesting, resume the LWP.
133 (handle_tracepoints): Add assert.
134 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
135 (wstatus_maybe_breakpoint): New function.
136 (cancel_breakpoint): Delete function.
137 (check_stopped_by_watchpoint): New function, factored out from
138 linux_low_filter_event.
139 (lp_status_maybe_breakpoint): Delete function.
140 (linux_low_filter_event): Remove filter_ptid argument.
141 Leave thread group exits pending here. Store the LWP's stop PC.
142 Always leave events pending.
143 (linux_wait_for_event_filtered): Pull all events out of the
144 kernel, and leave them all pending.
145 (count_events_callback, select_event_lwp_callback): Consider all
146 events.
147 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
148 (select_event_lwp): Only give preference to the stepping LWP in
149 all-stop mode. Adjust comments.
150 (ignore_event): New function.
151 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
152 references to cancel_breakpoints. Adjust to renames. Also give
153 equal priority to all LWPs that have had events in non-stop mode.
154 If reporting a software breakpoint event, unadjust the LWP's PC.
155 (linux_wait): If linux_wait_1 returned an ignored event, retry.
156 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
157 Adjust.
158 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
159 (resume_status_pending_p): Use thread_still_has_status_pending_p.
160 (linux_stopped_by_watchpoint): Adjust.
161 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
162 * linux-low.h (enum lwp_stop_reason): New.
163 (struct lwp_info) <stop_pc>: Adjust comment.
164 <stopped_by_watchpoint>: Delete field.
165 <stop_reason>: New field.
166 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
167 * mem-break.c (software_breakpoint_inserted_here)
168 (hardware_breakpoint_inserted_here): New function.
169 * mem-break.h (software_breakpoint_inserted_here)
170 (hardware_breakpoint_inserted_here): Declare.
171 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
172 (cancel_breakpoints): Delete.
173 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
174 (upload_fast_traceframes): Remove references to
175 cancel_breakpoints.
176
a33e3959
PA
1772015-01-09 Pedro Alves <palves@redhat.com>
178
179 * thread-db.c (find_new_threads_callback): Ignore thread if the
180 kernel thread ID is -1.
181
8784d563
PA
1822015-01-09 Pedro Alves <palves@redhat.com>
183
184 * linux-low.c (linux_attach_fail_reason_string): Move to
185 nat/linux-ptrace.c, and rename.
186 (linux_attach_lwp): Update comment.
187 (attach_proc_task_lwp_callback): New function.
188 (linux_attach): Adjust to rename and use
189 linux_proc_attach_tgid_threads.
190 (linux_attach_fail_reason_string): Delete declaration.
191
76f2b779
JB
1922015-01-01 Joel Brobecker <brobecker@adacore.com>
193
194 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
195 * server.c (gdbserver_version): Likewise.
196
fafcc06a
SDJ
1972014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
198
199 * remote-utils.c: Include ctype.h.
200 (input_interrupt): Explicitly handle the case when the char
201 received is the NUL byte. Improve the printing of non-ASCII
202 characters.
203
beed38b8
JB
2042014-12-16 Joel Brobecker <brobecker@adacore.com>
205
206 * linux-low.c (linux_low_filter_event): Update call to
207 linux_enable_event_reporting following the addition of
208 a new parameter to that function.
209
bf330350
CU
2102014-12-16 Catalin Udma <catalin.udma@freescale.com>
211
212 PR server/17457
213 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
214 (AARCH64_FPCR_REGNO): Likewise.
215 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
216 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
217 (aarch64_store_fpregset): Likewise.
218
5227d625
JB
2192014-12-15 Joel Brobecker <brobecker@adacore.com>
220
221 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
222 Remove FIXME comment about assumption about N.
223
f93b65a0
JB
2242014-12-13 Joel Brobecker <brobecker@adacore.com>
225
226 * configure.ac: If large-file support is disabled in GDBserver,
227 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
228 * configure: Regenerate.
229
e5a9158d
AA
2302014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
231
232 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
233 warning upon ENODATA from ptrace.
234 * linux-s390-low.c (s390_store_tdb): New.
235 (s390_regsets): Add regset for NT_S390_TDB.
236
feea5f36
AA
2372014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
238
239 * linux-low.c (regsets_store_inferior_registers): Skip regsets
240 without a fill_function.
241 * linux-s390-low.c (s390_fill_last_break): Remove.
242 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
243 (s390_arch_setup): Use regset's size instead of fill_function for
244 loop end condition.
245
098dbe61
AA
2462014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
247
248 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
249 the regset's store function when ptrace returned an error.
250 * regcache.c (get_thread_regcache): Invalidate register cache
251 before fetching inferior's registers.
252
28eef672
AA
2532014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
254
255 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
256 while-loop as for-loop.
257 (regsets_store_inferior_registers): Likewise.
258
bdca27a2
YQ
2592014-11-28 Yao Qi <yao@codesourcery.com>
260
261 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
262 * config.in, configure: Re-generate.
263 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
264 is defined.
265
9c232dda
YQ
2662014-11-21 Yao Qi <yao@codesourcery.com>
267
268 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
269 (AC_CHECK_HEADERS): Remove malloc.h.
270 * configure: Re-generated.
271 * config.in: Re-generated.
272 * server.h: Don't include alloca.h and malloc.h.
273 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
274 Don't include malloc.h.
275
43968415
JB
2762014-11-17 Joel Brobecker <brobecker@adacore.com>
277
278 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
279 corresponding ERRNO check in same block.
280
40e91bc7
PA
2812014-11-12 Pedro Alves <palves@redhat.com>
282
283 * server.c (cont_thread): Update comment.
284 (start_inferior, attach_inferior): No longer clear cont_thread.
285 (handle_v_cont): No longer set cont_thread.
286 (captured_main): Clear cont_thread each time a GDB connects.
287
c2c118cf
PA
2882014-11-12 Pedro Alves <palves@redhat.com>
289
290 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
291 thread, and don't resume all threads if the Hc thread has exited.
292
78708b7c
PA
2932014-11-12 Pedro Alves <palves@redhat.com>
294
295 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
296 the process group instead of to a specific LWP.
297
a2abc7de
PA
2982014-10-15 Pedro Alves <palves@redhat.com>
299
300 PR server/17487
301 * win32-arm-low.c (arm_set_thread_context): Remove current_event
302 parameter.
303 (arm_set_thread_context): Delete.
304 (the_low_target): Adjust.
305 * win32-i386-low.c (debug_registers_changed)
306 (debug_registers_used): Delete.
307 (update_debug_registers_callback): New function.
308 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
309 needing to update their debug registers.
310 (win32_get_current_dr): New function.
311 (x86_dr_low_get_addr, x86_dr_low_get_control)
312 (x86_dr_low_get_status): Fetch the debug register from the thread
313 record's context.
314 (i386_initial_stuff): Adjust.
315 (i386_get_thread_context): Remove current_event parameter. Don't
316 clear debug_registers_changed nor copy DR values to
317 debug_reg_state.
318 (i386_set_thread_context): Delete.
319 (i386_prepare_to_resume): New function.
320 (i386_thread_added): Mark the thread as needing to update irs
321 debug registers.
322 (the_low_target): Remove i386_set_thread_context and install
323 i386_prepare_to_resume.
324 * win32-low.c (win32_get_thread_context): Adjust.
325 (win32_set_thread_context): Use SetThreadContext
326 directly.
327 (win32_prepare_to_resume): New function.
328 (win32_require_context): New function, factored out from ...
329 (thread_rec): ... this.
330 (continue_one_thread): Call win32_prepare_to_resume on each thread
331 we're about to continue.
332 (win32_resume): Call win32_prepare_to_resume on the event thread.
333 * win32-low.h (struct win32_thread_info)
334 <debug_registers_changed>: New field.
335 (struct win32_target_ops): Change prototype of set_thread_context,
336 delete set_thread_context and add prepare_to_resume.
337 (win32_require_context): New declaration.
338
a442d071
GB
3392014-10-08 Gary Benson <gbenson@redhat.com>
340
341 * server.h: Do not include common-exceptions.h.
342
6f1947e8
GB
3432014-10-08 Gary Benson <gbenson@redhat.com>
344
345 * server.h: Do not include cleanups.h.
346
63b434a4
JH
3472014-09-30 James Hogan <james.hogan@imgtec.com>
348
349 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
350 mips64-dsp-linux.c.
351
c4d9ceb6
YQ
3522014-09-23 Yao Qi <yao@codesourcery.com>
353
354 * linux-low.c (lp_status_maybe_breakpoint): New function.
355 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
356 (count_events_callback): Likewise.
357 (select_event_lwp_callback): Likewise.
358 (cancel_breakpoints_callback): Likewise.
359
89a5711c
DB
3602014-09-19 Don Breazeal <donb@codesourcery.com>
361
362 * linux-low.c (handle_extended_wait): Call
363 linux_ptrace_get_extended_event.
364 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
365 linux_is_extended_waitstatus.
366
bffc0964
JB
3672014-09-16 Joel Brobecker <brobecker@adacore.com>
368
369 * Makefile.in (CPPFLAGS): Define.
370 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
371 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
372
0bfdf32f
GB
3732014-09-16 Gary Benson <gbenson@redhat.com>
374
375 * inferiors.h (current_inferior): Renamed as...
376 (current_thread): New variable. All uses updated.
377 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
378 (maybe_move_out_of_jump_pad): Likewise.
379 (cancel_breakpoint): Likewise.
380 (linux_low_filter_event): Likewise.
381 (wait_for_sigstop): Likewise.
382 (linux_resume_one_lwp): Likewise.
383 (need_step_over_p): Likewise.
384 (start_step_over): Likewise.
385 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
386 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
387 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
388 and save_inferior as saved_thread.
389 * regcache.c (get_thread_regcache): Renamed saved_inferior as
390 saved_thread.
391 (regcache_invalidate_thread): Likewise.
392 * remote-utils.c (prepare_resume_reply): Likewise.
393 * thread-db.c (thread_db_get_tls_address): Likewise.
394 (disable_thread_event_reporting): Likewise.
395 (remove_thread_event_breakpoints): Likewise.
396 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
397 as saved_thread.
398 * target.h (set_desired_inferior): Renamed as...
399 (set_desired_thread): New declaration. All uses updated.
400 * server.c (myresume): Updated comment to reference thread instead
401 of inferior.
402 (handle_serial_event): Likewise.
403 (handle_target_event): Likewise.
404
361c8ade
GB
4052014-09-12 Tom Tromey <tromey@redhat.com>
406 Gary Benson <gbenson@redhat.com>
407
408 * regcache.h: Include common-regcache.h.
409 (regcache_read_pc): Don't declare.
410 * regcache.c (get_thread_regcache_for_ptid): New function.
411
bd9269f7
GB
4122014-09-11 Tom Tromey <tromey@redhat.com>
413 Gary Benson <gbenson@redhat.com>
414
415 * symbol.c: New file.
416 * Makefile.in (SFILES): Add symbol.c.
417 (OBS): Add symbol.o.
418
f8c1d06b
GB
4192014-09-11 Gary Benson <gbenson@redhat.com>
420
421 * target.c (target_stop_ptid, target_continue_ptid): New
422 functions.
423
721ec300
GB
4242014-09-11 Tom Tromey <tromey@redhat.com>
425 Gary Benson <gbenson@redhat.com>
426
427 * target.h: Include target/target.h.
428 * target.c (target_read_memory, target_read_uint32)
429 (target_write_memory): New functions.
430
c5e92cca
GB
4312014-09-11 Gary Benson <gbenson@redhat.com>
432
433 * server.h (debug_hw_points): Don't declare.
434 * server.c (debug_hw_points): Don't define. Replace all uses
435 with show_debug_regs.
436 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
437 all uses with show_debug_regs.
438
2e4bb98a
EBM
4392014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
440
441 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
442 endianness into account.
443 (ppc_supply_ptrace_register): Likewise.
444
ac740bc7
JH
4452014-09-03 James Hogan <james.hogan@imgtec.com>
446
447 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
448 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
449
97ea6506
GB
4502014-09-03 Gary Benson <gbenson@redhat.com>
451
452 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
453 ALL_DEBUG_ADDRESS_REGISTERS.
454
df7e5265
GB
4552014-09-02 Gary Benson <gbenson@redhat.com>
456
457 * i386-low.h: Renamed as...
458 * x86-low.h: New file. All type, function and variable name
459 prefixes changed from "i386_" to "x86_". All references updated.
460 * i386-low.c: Renamed as...
461 * x86-low.c: New file. All type, function and variable name
462 prefixes changed from "i386_" to "x86_". All references updated.
463
ed859da7
GB
4642014-09-02 Gary Benson <gbenson@redhat.com>
465
466 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
467 (x86_linux_new_thread): Likewise.
468
860789c7
GB
4692014-08-29 Gary Benson <gbenson@redhat.com>
470
471 * server.h (setjmp.h): Do not include.
472 (toplevel): Do not declare.
473 (common-exceptions.h): Include.
474 (cleanups.h): Likewise.
475 * server.c (toplevel): Do not define.
476 (exit_code): New static global.
477 (detach_or_kill_for_exit_cleanup): New function.
478 (main): New function. Original main renamed to...
479 (captured_main): New function.
480 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
481
ff55e1b5
GB
4822014-08-29 Gary Benson <gbenson@redhat.com>
483
484 * Makefile.in (SFILES): Add common/common-exceptions.c.
485 (OBS): Add common-exceptions.o.
486 (common-exceptions.o): New rule.
487 * utils.c (prepare_to_throw_exception): New function.
488
e9bcb658
GB
4892014-08-29 Gary Benson <gbenson@redhat.com>
490
491 * config.in: Regenerate.
492 * configure: Likewise.
493
e3180625
GB
4942014-08-29 Gary Benson <gbenson@redhat.com>
495
496 * Makefile.in (SFILES): Add common/cleanups.c.
497 (OBS): cleanups.o.
498 (cleanups.o): New rule.
499
e3d6ba5d
GB
5002014-08-29 Gary Benson <gbenson@redhat.com>
501
502 * utils.c (internal_vwarning): New function.
503
7096e886
GB
5042014-08-28 Gary Benson <gbenson@redhat.com>
505
506 * utils.h (fatal): Remove declaration.
507 * utils.c (fatal): Remove function.
508
14ce3192
GB
5092014-08-28 Gary Benson <gbenson@redhat.com>
510
511 * tracepoint.c (gdb_agent_init): Replace fatal with
512 perror_with_name.
513 (initialize_tracepoint): Likewise.
514
50278d59
GB
5152014-08-28 Gary Benson <gbenson@redhat.com>
516
517 * remote-utils.c (remote_prepare): Replace fatal with error.
518
aa96c426
GB
5192014-08-28 Gary Benson <gbenson@redhat.com>
520
521 * linux-low.c (linux_async): Replace fatal with warning.
522 Tidy up and return.
523 (linux_start_non_stop): Return -1 if linux_async failed.
524
f7160e97
GB
5252014-08-28 Gary Benson <gbenson@redhat.com>
526
527 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
528 gdb_assert.
529 (i386_dr_low_get_addr): Remove vague comment.
530 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
531 gdb_assert.
532
38e08fca
GB
5332014-08-28 Gary Benson <gbenson@redhat.com>
534
535 * inferiors.c (get_thread_process): Replace check with gdb_assert.
536 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
537 internal_error.
538 (linux_resume_one_lwp): Likewise.
539 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
540 gdb_assert.
541 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
542 with internal_error.
543 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
544 (init_register_cache): Replace fatal with gdb_assert_not_reached.
545 (find_register_by_name): Replace fatal with internal_error.
546 (find_regno): Likewise.
547 * tdesc.c (init_target_desc): Replace check with gdb_assert.
548 * thread-db.c (thread_db_create_event): Likewise.
549 (thread_db_load_search): Likewise.
550 (try_thread_db_load_1): Likewise.
551 * tracepoint.c (get_jump_space_head): Replace fatal with
552 internal_error.
553 (claim_trampoline_space): Likewise.
554 (have_fast_tracepoint_trampoline_buffer): Likewise.
555 (cmd_qtstart): Likewise.
556 (stop_tracing): Likewise.
557 (fast_tracepoint_collecting): Likewise.
558 (target_malloc): Likewise.
559 (download_tracepoint): Likewise.
560 (download_trace_state_variables): Replace check with gdb_assert.
561 (upload_fast_traceframes): Replace fatal with internal_error.
562
34abf635
GB
5632014-08-19 Tom Tromey <tromey@redhat.com>
564 Gary Benson <gbenson@redhat.com>
565
566 * Makefile.in (SFILES): Add common/common-debug.c.
567 (OBS): Add common-debug.o.
568 (common-debug.o): New rule.
569 * debug.h (debug_printf): Don't declare.
570 * debug.c (debug_printf): Renamed and rewritten as...
571 (debug_vprintf): New function.
572
f6e94d78
GB
5732014-08-19 Gary Benson <gbenson@redhat.com>
574
575 * utils.h: Do not include print-utils.h.
576
9239eeab
GB
5772014-08-19 Tom Tromey <tromey@redhat.com>
578 Gary Benson <gbenson@redhat.com>
579
580 * server.h: Add static assertion.
581 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
582
ef87c8bb
GB
5832014-08-19 Tom Tromey <tromey@redhat.com>
584 Gary Benson <gbenson@redhat.com>
585
586 * Makefile.in (SFILES): Add common/errors.c.
587 (OBS): Add errors.o.
588 (IPA_OBS): Add errors-ipa.o.
589 (errors.o): New rule.
590 (errors-ipa.o): Likewise.
591 * utils.h (perror_with_name, error, warning): Don't declare.
592 * utils.c (warning): Renamed and rewritten as...
593 (vwarning): New function.
594 (error): Renamed and rewritten as...
595 (verror): New function.
596 (internal_error): Renamed and rewritten as...
597 (internal_verror): New function.
598
bb974a24
GB
5992014-08-07 Gary Benson <gbenson@redhat.com>
600
601 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
602 * configure: Regenerate.
603 * config.in: Likewise.
604 * server.h: Do not include errno.h.
605 * event-loop.c: Likewise.
606 * hostio-errno.c: Likewise.
607 * linux-low.c: Likewise.
608 * remote-utils.c: Likewise.
609 * spu-low.c: Likewise.
610 * utils.c: Likewise.
611 * gdbreplay.c: Unconditionally include errno.h.
612
6d3d12eb
GB
6132014-08-07 Gary Benson <gbenson@redhat.com>
614
615 * server.h: Do not include string.h.
616 * event-loop.c: Likewise.
617 * linux-low.c: Likewise.
618 * regcache.c: Likewise.
619 * remote-utils.c: Likewise.
620 * spu-low.c: Likewise.
621 * utils.c: Likewise.
622
dccbb609
GB
6232014-08-07 Gary Benson <gbenson@redhat.com>
624
625 * server.h: Do not include gdb_assert.h.
626
e76df0d0
GB
6272014-08-07 Gary Benson <gbenson@redhat.com>
628
629 * server.h: Do not include common-utils.h.
630
4cb9c816
GB
6312014-08-07 Gary Benson <gbenson@redhat.com>
632
633 * server.h: Do not include ptid.h.
634 * notif.h: Likewise.
635
3995eeee
GB
6362014-08-07 Gary Benson <gbenson@redhat.com>
637
638 * server.h: Do not include gdb_locale.h.
639
cb9f1a9b
GB
6402014-08-07 Gary Benson <gbenson@redhat.com>
641
642 * server.h: Do not include gdb/signals.h.
643 * win32-low.c: Likewise.
644
a5fceff8
GB
6452014-08-07 Gary Benson <gbenson@redhat.com>
646
647 * server.h: Do not include pathmax.h.
648
b9391142
GB
6492014-08-07 Gary Benson <gbenson@redhat.com>
650
651 * server.h: Do not include libiberty.h.
652 * linux-bfin-low.c: Likewise.
653
0e443c87
GB
6542014-08-07 Gary Benson <gbenson@redhat.com>
655
656 * server.h: Do not include ansidecl.h.
657
8ebb3f56
GB
6582014-08-07 Gary Benson <gbenson@redhat.com>
659
660 * linux-x86-low.c: Do not include stddef.h.
661 * lynx-ppc-low.c: Likewise.
662 * tracepoint.c: Likewise.
663
8980bdf6
GB
6642014-08-07 Gary Benson <gbenson@redhat.com>
665
666 * server.h: Do not include stdarg.h.
667 * nto-low.c: Likewise.
668
d7096f71
GB
6692014-08-07 Gary Benson <gbenson@redhat.com>
670
671 * server.h: Do not include stdlib.h.
672 * inferiors.c: Likewise.
673 * linux-low.c: Likewise.
674 * regcache.c: Likewise.
675 * spu-low.c: Likewise.
676 * tracepoint.c: Likewise.
677 * utils.c: Likewise.
678
d02f550d
GB
6792014-08-07 Gary Benson <gbenson@redhat.com>
680
681 * server.h: Do not include stdio.h.
682 * linux-low.c: Likewise.
683 * remote-utils.c: Likewise.
684 * spu-low.c: Likewise.
685 * utils.c: Likewise.
686 * wincecompat.c: Likewise.
687
87f6c4e3
GB
6882014-08-06 Gary Benson <gbenson@redhat.com>
689
690 * regcache.c (init_register_cache): Move conditionals inside if.
691
7089dca4
GB
6922014-08-06 Gary Benson <gbenson@redhat.com>
693
694 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
695
462f517e
GB
6962014-07-31 Gary Benson <gbenson@redhat.com>
697
698 * ax.h: Do not include server.h.
699 * gdbthread.h: Likewise.
700 * lynx-low.h: Likewise.
701 * notif.h: Likewise.
702
976411d6
GB
7032014-07-30 Gary Benson <gbenson@redhat.com>
704
705 * server.h: Include common-defs.h.
706 Do not include config.h or build-gnulib-gdbserver/config.h.
707
d41f6d8e
GB
7082014-07-30 Gary Benson <gbenson@redhat.com>
709
710 * hostio-errno.c: Move server.h to top of includes list.
711 * inferiors.c: Likewise.
712 * linux-x86-low.c: Likewise.
713 * notif.c: Include server.h.
714
314c6a35
TT
7152014-07-24 Tom Tromey <tromey@redhat.com>
716 Gary Benson <gbenson@redhat.com>
717
718 * server.h (CORE_ADDR): Now unsigned.
719
69ff6be5
PA
7202014-07-16 Pedro Alves <palves@redhat.com>
721
722 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
723
ce9e3fe7
PA
7242014-07-15 Pedro Alves <palves@redhat.com>
725
726 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
727 copy.
728
e76126e8
PA
7292014-07-11 Pedro Alves <palves@redhat.com>
730
731 * linux-low.c (kill_wait_lwp): New function, based on
732 kill_one_lwp_callback, but use my_waitpid directly.
733 (kill_one_lwp_callback, linux_kill): Use it.
734
8e9db26e
PA
7352014-06-23 Pedro Alves <palves@redhat.com>
736
737 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
738 before setting DR0..DR3.
739
698b3e08
GB
7402014-06-20 Gary Benson <gbenson@redhat.com>
741
742 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
743 * configure: Regenerated.
744 * config.in: Likewise.
745
125f8a3d
GB
7462014-06-20 Gary Benson <gbenson@redhat.com>
747
748 * Makefile.in (SFILES): Update locations for files moved
749 from common to nat.
750 (object file files): Reordered.
751
42995dbd
GB
7522014-06-20 Gary Benson <gbenson@redhat.com>
753
754 * i386-low.h (i386_dr_low_can_set_addr): Removed.
755 (i386_dr_low_set_addr): Likewise.
756 (i386_dr_low_get_addr): Likewise.
757 (i386_dr_low_can_set_control): Likewise.
758 (i386_dr_low_set_control): Likewise.
759 (i386_dr_low_get_control): Likewise.
760 (i386_dr_low_get_status): Likewise.
761 (i386_get_debug_register_length): Likewise.
762 * linux-x86-low.c (i386_dr_low_set_addr):
763 Changed signature. Made static.
764 (i386_dr_low_get_addr): Likewise.
765 (i386_dr_low_set_control): Likewise.
766 (i386_dr_low_get_control): Likewise.
767 (i386_dr_low_get_status): Likewise.
768 (i386_dr_low): New global variable.
769 * win32-i386-low.c (i386_dr_low_set_addr):
770 Changed signature. Made static.
771 (i386_dr_low_get_addr): Likewise.
772 (i386_dr_low_set_control): Likewise.
773 (i386_dr_low_get_control): Likewise.
774 (i386_dr_low_get_status): Likewise.
775 (i386_dr_low): New global variable.
776
e1d2394b
MS
7772014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
778
779 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
780 * Makefile.in (AR, AR_FLAGS): Define.
781 * configure: Regenerate.
782
3a8ee006
GB
7832014-06-19 Gary Benson <gbenson@redhat.com>
784
785 * Makefile.in (i386-dregs.o): New rule.
786 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
787 * i386-low.c (target.h): Remove include.
788 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
789 (DR_CONTROL_SHIFT): Likewise.
790 (DR_CONTROL_SIZE): Likewise.
791 (DR_RW_EXECUTE): Likewise.
792 (DR_RW_WRITE): Likewise.
793 (DR_RW_READ): Likewise.
794 (DR_RW_IORW): Likewise.
795 (DR_LEN_1): Likewise.
796 (DR_LEN_2): Likewise.
797 (DR_LEN_4): Likewise.
798 (DR_LEN_8): Likewise.
799 (DR_LOCAL_ENABLE_SHIFT): Likewise.
800 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
801 (DR_ENABLE_SIZE): Likewise.
802 (DR_LOCAL_SLOWDOWN): Likewise.
803 (DR_GLOBAL_SLOWDOWN): Likewise.
804 (DR_CONTROL_RESERVED): Likewise.
805 (I386_DR_CONTROL_MASK): Likewise.
806 (I386_DR_VACANT): Likewise.
807 (I386_DR_LOCAL_ENABLE): Likewise.
808 (I386_DR_GLOBAL_ENABLE): Likewise.
809 (I386_DR_DISABLE): Likewise.
810 (I386_DR_SET_RW_LEN): Likewise.
811 (I386_DR_GET_RW_LEN): Likewise.
812 (I386_DR_WATCH_HIT): Likewise.
813 (i386_wp_op_t): Likewise.
814 (i386_show_dr): Likewise.
815 (i386_length_and_rw_bits): Likewise.
816 (i386_insert_aligned_watchpoint): Likewise.
817 (i386_remove_aligned_watchpoint): Likewise.
818 (i386_handle_nonaligned_watchpoint): Likewise.
819 i386_update_inferior_debug_regs(): Likewise.
820 (i386_dr_insert_watchpoint): Likewise.
821 (i386_dr_remove_watchpoint): Likewise.
822 (i386_dr_region_ok_for_watchpoint): Likewise.
823 (i386_dr_stopped_data_address): Likewise.
824 (i386_dr_stopped_by_watchpoint): Likewise.
825
8f26655c
GB
8262014-06-19 Gary Benson <gbenson@redhat.com>
827
828 * i386-low.c (i386_dr_show): Renamed to
829 i386_show_dr and made static. All uses updated.
830 (i386_dr_length_and_rw_bits): Renamed to
831 i386_length_and_rw_bits and made static.
832 All uses updated.
833 (i386_dr_insert_aligned_watchpoint): Renamed to
834 i386_insert_aligned_watchpoint and made static.
835 All uses updated.
836 (i386_dr_remove_aligned_watchpoint): Renamed to
837 i386_remove_aligned_watchpoint and made static.
838 All uses updated.
839 (i386_dr_update_inferior_debug_regs): Renamed to
840 i386_update_inferior_debug_regs and made static.
841 All uses updated.
842
b9228891
GB
8432014-06-18 Gary Benson <gbenson@redhat.com>
844
5171def3
GB
845 * i386-low.h (i386_dr_low_can_set_addr): New macro.
846 (i386_dr_low_can_set_control): Likewise.
847 (i386_get_debug_register_length): Likewise.
848 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
849 (i386_dr_low_can_set_control): Likewise.
850 (i386_get_debug_register_length): Likewise.
851
8522014-06-17 Gary Benson <gbenson@redhat.com>
853
b9228891
GB
854 * i386-low.h (i386-dregs.h): New include.
855 (DR_FIRSTADDR): Now in i386-dregs.h.
856 (DR_LASTADDR): Likewise.
857 (DR_NADDR): Likewise.
858 (DR_STATUS): Likewise.
859 (DR_CONTROL): Likewise.
860 (i386_debug_reg_state): Likewise.
861 (i386_dr_insert_watchpoint): Likewise.
862 (i386_dr_remove_watchpoint): Likewise.
863 (i386_dr_region_ok_for_watchpoint): Likewise.
864 (i386_dr_stopped_data_address): Likewise.
865 (i386_dr_stopped_by_watchpoint): Likewise.
866 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
867
4be83cc2
GB
8682014-06-18 Gary Benson <gbenson@redhat.com>
869
870 * i386-low.h (i386_low_insert_watchpoint): Renamed to
871 i386_dr_insert_watchpoint.
872 (i386_low_remove_watchpoint): Renamed to
873 i386_dr_remove_watchpoint.
874 (i386_low_region_ok_for_watchpoint): Renamed to
875 i386_dr_region_ok_for_watchpoint.
876 (i386_low_stopped_data_address): Renamed to
877 i386_dr_stopped_data_address.
878 (i386_low_stopped_by_watchpoint): Renamed to
879 i386_dr_stopped_by_watchpoint.
880 * i386-low.c (i386_show_dr): Renamed to
881 i386_dr_show and made nonstatic. All uses updated.
882 (i386_length_and_rw_bits): Renamed to
883 i386_dr_length_and_rw_bits and made nonstatic.
884 All uses updated.
885 (i386_insert_aligned_watchpoint): Renamed to
886 i386_dr_insert_aligned_watchpoint and made nonstatic.
887 All uses updated.
888 (i386_remove_aligned_watchpoint): Renamed to
889 i386_dr_remove_aligned_watchpoint and made nonstatic.
890 All uses updated.
891 (i386_update_inferior_debug_regs): Renamed to
892 i386_dr_update_inferior_debug_regs and made nonstatic.
893 All uses updated.
894 (i386_low_insert_watchpoint): Renamed to
895 i386_dr_insert_watchpoint. All uses updated.
896 (i386_low_remove_watchpoint): Renamed to
897 i386_dr_remove_watchpoint. All uses updated.
898 (i386_low_region_ok_for_watchpoint): Renamed to
899 i386_dr_region_ok_for_watchpoint. All uses updated.
900 (i386_low_stopped_data_address): Renamed to
901 i386_dr_stopped_data_address. All uses updated.
902 (i386_low_stopped_by_watchpoint): Renamed to
903 i386_dr_stopped_by_watchpoint. All uses updated.
904
131aa0d4
GB
9052014-06-18 Gary Benson <gbenson@redhat.com>
906
907 * i386-low.c (i386_dr_low_can_set_addr): New macro.
908 (i386_dr_low_can_set_control): Likewise.
909 (i386_insert_aligned_watchpoint): New check.
910
d9305f7f
GB
9112014-06-18 Gary Benson <gbenson@redhat.com>
912
913 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
914 Renamed to state.
915
e927c9fc
GB
9162014-06-18 Gary Benson <gbenson@redhat.com>
917
918 * i386-low.c (i386_length_and_rw_bits): Use internal_error
919 instead of fatal and error.
920 (i386_handle_nonaligned_watchpoint): Likewise.
921
1b6d4134
GB
9222014-06-18 Gary Benson <gbenson@redhat.com>
923
924 * i386-low.c (i386_get_debug_register_length): New macro.
925 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
926 (i386_show_dr): Use debug_printf instead of fprintf. Use
927 phex to format values.
928
6e62758f
GB
9292014-06-18 Gary Benson <gbenson@redhat.com>
930
931 * i386-low.h: Comment changes.
932 * i386-low.c: Likewise.
933
fc6e2f03
GB
9342014-06-18 Gary Benson <gbenson@redhat.com>
935
936 * i386-low.c: Whitespace changes.
937
f9d1eeed
TT
9382014-06-12 Tom Tromey <tromey@redhat.com>
939
940 * utils.c (freeargv): Remove.
941
0b04e523
TT
9422014-06-12 Tom Tromey <tromey@redhat.com>
943
944 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
945 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
946 (parse_debug_format_options): Likewise.
947 (gdbserver_usage): Likewise.
948 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
949 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
950 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
951 against libiberty.
952 ($(LIBGNU)): Depend on libiberty.
953 (all-lib): Recurse into all subdirs.
954 (install-only): Invoke "install" target in subdirs.
955 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
956 targets.
957 * configure: Rebuild.
958 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
959 for vasprintf, vsnprintf, or gettimeofday.
960 * configure.srv: Don't add safe-ctype.o or lbasename.o to
961 srv_tgtobj.
962
270c9937
JB
9632014-06-05 Joel Brobecker <brobecker@adacore.com>
964
965 * development.sh: Delete.
966 * Makefile.in (config.status): Adjust dependency on development.sh.
967 * configure.ac: Adjust development.sh source call.
968 * configure: Regenerate.
969
0a261ed8
PA
9702014-06-02 Pedro Alves <palves@redhat.com>
971
972 * ax.c (gdb_free_agent_expr): New function.
973 * ax.h (gdb_free_agent_expr): New declaration.
974 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
975 list.
976 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
977 static.
978 (clear_breakpoint_conditions_and_commands): New function.
979 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
980 (clear_breakpoint_conditions_and_commands): New declaration.
981
e9dae05e
RR
9822014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
983
984 * linux-aarch64-low.c (asm/ptrace.h): Include.
985
5876f503
JK
9862014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
987
988 Fix TLS access for -static -pthread.
989 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
990 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
991 (thread_db_load_search, try_thread_db_load_1): Initialize it.
992
802e8e6d
PA
9932014-05-20 Pedro Alves <palves@redhat.com>
994
995 * linux-aarch64-low.c (aarch64_insert_point)
996 (aarch64_remove_point): No longer check whether the type is
997 supported here. Adjust to new interface.
998 (the_low_target): Install aarch64_supports_z_point_type as
999 supports_z_point_type method.
1000 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
1001 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
1002 instead of a Z packet char. Adjust.
1003 (arm_supports_z_point_type): New function.
1004 (arm_insert_point, arm_remove_point): Adjust to new interface.
1005 (the_low_target): Install arm_supports_z_point_type.
1006 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1007 (cris_insert_point, cris_remove_point): Adjust to new interface.
1008 Don't check whether the type is supported here.
1009 (the_low_target): Install cris_supports_z_point_type.
1010 * linux-low.c (linux_supports_z_point_type): New function.
1011 (linux_insert_point, linux_remove_point): Adjust to new interface.
1012 * linux-low.h (struct linux_target_ops) <insert_point,
1013 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1014 raw_breakpoint pointer parameter.
1015 <supports_z_point_type>: New method.
1016 * linux-mips-low.c (mips_supports_z_point_type): New function.
1017 (mips_insert_point, mips_remove_point): Adjust to new interface.
1018 Use mips_supports_z_point_type.
1019 (the_low_target): Install mips_supports_z_point_type.
1020 * linux-ppc-low.c (the_low_target): Install NULL as
1021 supports_z_point_type method.
1022 * linux-s390-low.c (the_low_target): Install NULL as
1023 supports_z_point_type method.
1024 * linux-sparc-low.c (the_low_target): Install NULL as
1025 supports_z_point_type method.
1026 * linux-x86-low.c (x86_supports_z_point_type): New function.
1027 (x86_insert_point): Adjust to new insert_point interface. Use
1028 insert_memory_breakpoint. Adjust to new
1029 i386_low_insert_watchpoint interface.
1030 (x86_remove_point): Adjust to remove_point interface. Use
1031 remove_memory_breakpoint. Adjust to new
1032 i386_low_remove_watchpoint interface.
1033 (the_low_target): Install x86_supports_z_point_type.
1034 * lynx-low.c (lynx_target_ops): Install NULL as
1035 supports_z_point_type callback.
1036 * nto-low.c (nto_supports_z_point_type): New.
1037 (nto_insert_point, nto_remove_point): Adjust to new interface.
1038 (nto_target_ops): Install nto_supports_z_point_type.
1039 * mem-break.c: Adjust intro comment.
1040 (struct raw_breakpoint) <raw_type, size>: New fields.
1041 <inserted>: Update comment.
1042 <shlib_disabled>: Delete field.
1043 (enum bkpt_type) <gdb_breakpoint>: Delete value.
1044 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1045 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1046 (raw_bkpt_type_to_target_hw_bp_type): New function.
1047 (find_enabled_raw_code_breakpoint_at): New function.
1048 (find_raw_breakpoint_at): New type and size parameters. Use them.
1049 (insert_memory_breakpoint): New function, based off
1050 set_raw_breakpoint_at.
1051 (remove_memory_breakpoint): New function.
1052 (set_raw_breakpoint_at): Reimplement.
1053 (set_breakpoint): New, based on set_breakpoint_at.
1054 (set_breakpoint_at): Reimplement.
1055 (delete_raw_breakpoint): Go through the_target->remove_point
1056 instead of assuming memory breakpoints.
1057 (find_gdb_breakpoint_at): Delete.
1058 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1059 (find_gdb_breakpoint): New function.
1060 (set_gdb_breakpoint_at): Delete.
1061 (z_type_supported): New function.
1062 (set_gdb_breakpoint_1): New function, loosely based off
1063 set_gdb_breakpoint_at.
1064 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1065 (delete_gdb_breakpoint_at): Delete.
1066 (delete_gdb_breakpoint_1): New function, loosely based off
1067 delete_gdb_breakpoint_at.
1068 (delete_gdb_breakpoint): New function.
1069 (clear_gdb_breakpoint_conditions): Rename to ...
1070 (clear_breakpoint_conditions): ... this. Don't handle a NULL
1071 breakpoint.
1072 (add_condition_to_breakpoint): Make static.
1073 (add_breakpoint_condition): Take a struct breakpoint pointer
1074 instead of an address. Adjust.
1075 (gdb_condition_true_at_breakpoint): Rename to ...
1076 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1077 z_type parameter.
1078 (gdb_condition_true_at_breakpoint): Reimplement.
1079 (add_breakpoint_commands): Take a struct breakpoint pointer
1080 instead of an address. Adjust.
1081 (gdb_no_commands_at_breakpoint): Rename to ...
1082 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
1083 parameter. Return true if no breakpoint was found. Change debug
1084 output.
1085 (gdb_no_commands_at_breakpoint): Reimplement.
1086 (run_breakpoint_commands): Rename to ...
1087 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
1088 and change return type to boolean.
1089 (run_breakpoint_commands): New function.
1090 (gdb_breakpoint_here): Also check for Z1 breakpoints.
1091 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
1092 breakpoint. Go through the_target->remove_point instead of
1093 assuming memory breakpoint.
1094 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
1095 software and hardware breakpoints.
1096 (reinsert_raw_breakpoint): Go through the_target->insert_point
1097 instead of assuming memory breakpoint.
1098 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
1099 software and hardware breakpoints.
1100 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
1101 Check both software and hardware breakpoints.
1102 (validate_inserted_breakpoint): Assert the breakpoint is a
1103 software breakpoint. Set the inserted flag to -1 instead of
1104 setting shlib_disabled.
1105 (delete_disabled_breakpoints): Adjust.
1106 (validate_breakpoints): Only validate software breakpoints.
1107 Adjust to inserted flag change.
1108 (check_mem_read, check_mem_write): Skip breakpoint types other
1109 than software breakpoints. Adjust to inserted flag change.
1110 * mem-break.h (enum raw_bkpt_type): New enum.
1111 (raw_breakpoint, struct process_info): Forward declare.
1112 (Z_packet_to_target_hw_bp_type): Delete declaration.
1113 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
1114 (set_gdb_breakpoint, delete_gdb_breakpoint)
1115 (clear_breakpoint_conditions): New declarations.
1116 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
1117 (breakpoint_inserted_here): Update comment.
1118 (add_breakpoint_condition, add_breakpoint_commands): Replace
1119 address parameter with a breakpoint pointer parameter.
1120 (gdb_breakpoint_here): Update comment.
1121 (delete_gdb_breakpoint_at): Delete.
1122 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
1123 * server.c (process_point_options): Take a struct breakpoint
1124 pointer instead of an address. Adjust.
1125 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
1126 delete_gdb_breakpoint.
1127 * spu-low.c (spu_target_ops): Install NULL as
1128 supports_z_point_type method.
1129 * target.h: Include mem-break.h.
1130 (struct target_ops) <prepare_to_access_memory>: Update comment.
1131 <supports_z_point_type>: New field.
1132 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1133 instead of a char. Also take a raw breakpoint pointer.
1134 * win32-arm-low.c (the_low_target): Install NULL as
1135 supports_z_point_type.
1136 * win32-i386-low.c (i386_supports_z_point_type): New function.
1137 (i386_insert_point, i386_remove_point): Adjust to new interface.
1138 (the_low_target): Install i386_supports_z_point_type.
1139 * win32-low.c (win32_supports_z_point_type): New function.
1140 (win32_insert_point, win32_remove_point): Adjust to new interface.
1141 (win32_target_ops): Install win32_supports_z_point_type.
1142 * win32-low.h (struct win32_target_ops):
1143 <supports_z_point_type>: New method.
1144 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1145 instead of a char. Also take a raw breakpoint pointer.
1146
932539e3
PA
11472014-05-20 Pedro Alves <palves@redhat.com>
1148
1149 * mem-break.h: Include break-common.h.
1150 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1151 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
1152 (Z_packet_to_target_hw_bp_type): New declaration.
1153 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
1154 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
1155 (Z_PACKET_ACCESS_WP): Delete macros.
1156 (Z_packet_to_hw_type): Delete function.
1157 * i386-low.h: Don't include break-common.h here.
1158 (Z_packet_to_hw_type): Delete declaration.
1159 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
1160 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1161 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
1162 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1163 * linux-aarch64-low.c: Don't include break-common.h here.
1164 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1165 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
1166 (Z_packet_to_target_hw_bp_type): Delete function.
1167 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
1168 function.
1169 (mips_insert_point, mips_remove_point): Use
1170 Z_packet_to_target_hw_bp_type.
1171
4ff0d3d8
PA
11722014-05-20 Pedro Alves <palves@redhat.com>
1173
1174 * linux-aarch64-low.c: Include break-common.h.
1175 (enum target_point_type): Delete.
1176 (Z_packet_to_point_type): Rename to ...
1177 (Z_packet_to_target_hw_bp_type): ... this, and return a
1178 target_hw_bp_type instead.
1179 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
1180 instead of an enum target_point_type.
1181 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
1182 breakpoint type.
1183 (aarch64_dr_state_insert_one_point)
1184 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
1185 (aarch64_handle_aligned_watchpoint)
1186 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
1187 Take an enum target_hw_bp_type instead of an enum
1188 target_point_type.
1189 (aarch64_supports_z_point_type): New function.
1190 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
1191 use Z_packet_to_target_hw_bp_type.
1192
786dc519
JB
11932014-05-20 Joel Brobecker <brobecker@adacore.com>
1194
1195 * configure.ac: Only use -Werror by default when DEVELOPMENT
1196 is true.
1197 * configure: Regenerate.
1198
9e0aa64f
JK
11992014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
1200
1201 Fix gdbserver qGetTLSAddr for x86_64 -m32.
1202 * linux-x86-low.c (X86_64_USER_REGS): New.
1203 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
1204
2b577b92
YQ
12052014-04-28 Yao Qi <yao@codesourcery.com>
1206
1207 * Makefile.in (i386-avx512.c): Fix the typo of generated file
1208 name.
1209
94611da2
PA
12102014-04-25 Pedro Alves <palves@redhat.com>
1211
1212 PR server/16255
1213 * linux-low.c (linux_attach_fail_reason_string): New function.
1214 (linux_attach_lwp): Delete.
1215 (linux_attach_lwp_1): Rename to ...
1216 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
1217 argument. Remove "initial" parameter. Return int instead of
1218 void. Don't error or warn here.
1219 (linux_attach): Adjust to call linux_attach_lwp. Call error on
1220 failure to attach to the tgid. Call warning when failing to
1221 attach to an lwp.
1222 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
1223 argument. Remove "initial" parameter. Return int instead of
1224 void. Don't error or warn here.
1225 (linux_attach_fail_reason_string): New declaration.
1226 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
1227 interface change. Use linux_attach_fail_reason_string.
1228
01f9f808
MS
12292014-04-24 Michael Sturm <michael.sturm@mintel.com>
1230 Walfred Tedeschi <walfred.tedeschi@intel.com>
1231
1232 * Makefile.in: Added rules to handle new files
1233 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
1234 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
1235 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
1236 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
1237 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
1238 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
1239 x32-avx512-linux.o.
1240 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
1241 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
1242 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
1243 i386/x32-avx512.xml.
1244 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
1245 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
1246 i386/x32-avx512-linux.xml.
1247 * i387-fp.c (num_avx512_k_registers): New constant for number
1248 of K registers.
1249 (num_avx512_zmmh_low_registers): New constant for number of
1250 lower ZMM registers (0-15).
1251 (num_avx512_zmmh_high_registers): New constant for number of
1252 higher ZMM registers (16-31).
1253 (num_avx512_ymmh_registers): New contant for number of higher
1254 YMM registers (ymm16-31 added by avx521 on x86_64).
1255 (num_avx512_xmm_registers): New constant for number of higher
1256 XMM registers (xmm16-31 added by AVX512 on x86_64).
1257 (struct i387_xsave): Add space for AVX512 registers.
1258 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
1259 Add code to handle AVX512 registers.
1260 (i387_xsave_to_cache): Add code to handle AVX512 registers.
1261 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
1262 prototypei from generated file.
1263 (tdesc_amd64_avx512_linux): Likewise.
1264 (init_registers_x32_avx512_linux): Likewise.
1265 (tdesc_x32_avx512_linux): Likewise.
1266 (init_registers_i386_avx512_linux): Likewise.
1267 (tdesc_i386_avx512_linux): Likewise.
1268 (x86_64_regmap): Add AVX512 registers.
1269 (x86_linux_read_description): Add code to handle AVX512 XSTATE
1270 mask.
1271 (initialize_low_arch): Add code to initialize AVX512 registers.
1272
51aa91f9
PA
12732014-04-23 Pedro Alves <palves@redhat.com>
1274
1275 * mem-break.c (find_gdb_breakpoint_at): Make static.
1276 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
1277
a4165e94
PA
12782014-04-23 Pedro Alves <palves@redhat.com>
1279
1280 * i386-low.c: Don't include break-common.h here.
1281 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1282 prototype to take target_hw_bp_type as argument instead of a Z
1283 packet char.
1284 * i386-low.h: Include break-common.h here.
1285 (Z_packet_to_hw_type): Declare.
1286 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1287 prototypes.
1288 * linux-x86-low.c (x86_insert_point): Convert the packet number to
1289 a target_hw_bp_type before calling i386_low_insert_watchpoint.
1290 (x86_remove_point): Convert the packet number to a
1291 target_hw_bp_type before calling i386_low_remove_watchpoint.
1292 * win32-i386-low.c (i386_insert_point): Convert the packet number
1293 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
1294 (i386_remove_point): Convert the packet number to a
1295 target_hw_bp_type before calling i386_low_remove_watchpoint.
1296
b8acf843
PA
12972014-04-23 Pedro Alves <palves@redhat.com>
1298
1299 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
1300
d708bcd1
PA
13012014-04-10 Pedro Alves <palves@redhat.com>
1302
1303 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1304 Check if the condition or command is NULL before checking if the
1305 breakpoint is known. On success, return true.
1306 * mem-break.h (add_breakpoint_condition): Document return.
1307 (add_breakpoint_commands): Add describing comment.
1308 * server.c (skip_to_semicolon): New function.
1309 (process_point_options): Use it.
1310
2eec7d5b
PA
13112014-04-09 Pedro Alves <palves@redhat.com>
1312
1313 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
1314 to lwpid_of.
1315
fa96cb38
PA
13162014-02-27 Pedro Alves <palves@redhat.com>
1317
1318 PR 12702
1319 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
1320 macros.
1321 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
1322 output.
1323 (last_thread_of_process_p): Take a PID argument instead of a
1324 thread pointer.
1325 (linux_wait_for_lwp): Delete.
1326 (num_lwps, check_zombie_leaders, not_stopped_callback): New
1327 functions.
1328 (linux_low_filter_event): New function, party factored out from
1329 linux_wait_for_event.
1330 (linux_wait_for_event): Rename to ...
1331 (linux_wait_for_event_filtered): ... this. Add new filter ptid
1332 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
1333 sigsuspend. Check for zombie leaders.
1334 (linux_wait_for_event): Reimplement as wrapper around
1335 linux_wait_for_event_filtered.
1336 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
1337 a normal or signal exit is seen, it's the whole process exiting.
1338 (wait_for_sigstop): No longer a for_each_inferior callback.
1339 Rewrite on top of linux_wait_for_event_filtered.
1340 (stop_all_lwps): Call wait_for_sigstop directly.
1341 * server.c (resume, handle_target_event): Handle
1342 TARGET_WAITKIND_NO_RESUMED.
1343
d763de10
JB
13442014-02-26 Joel Brobecker <brobecker@adacore.com>
1345
1346 * win32-low.c (psapi_get_dll_name,
1347 * win32_CreateToolhelp32Snapshot): Delete.
1348 (win32_CreateToolhelp32Snapshot, win32_Module32First)
1349 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
1350 Delete.
1351 (handle_load_dll): Add function description.
1352 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
1353
850a0f76
JB
13542014-02-26 Joel Brobecker <brobecker@adacore.com>
1355
1356 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
1357 Add comment.
1358 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
1359 base address when calling win32_add_one_solib.
1360 (handle_load_dll): Delete local variable load_addr.
1361 Remove 0x1000 offset applied to DLL base address when calling
1362 win32_add_one_solib.
1363 (handle_unload_dll): Add comment.
1364
f25b3fc3
JB
13652014-02-26 Joel Brobecker <brobecker@adacore.com>
1366
1367 * win32-low.c (win32_add_all_dlls): Renames
1368 win32_ensure_ntdll_loaded. Rewrite function documentation.
1369 Adjust implementation to always load all DLLs.
1370 Add 0x1000 offset to DLL base address when calling
1371 win32_add_one_solib.
1372 (child_initialization_done): New static global.
1373 (do_initial_child_stuff): Set child_initialization_done to
1374 zero during child initialization, and 1 after. Replace call
1375 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
1376 Add comment.
1377 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
1378 (handle_unload_dll): Add function documentation.
1379 (get_child_debug_event): Ignore load and unload DLL events
1380 during child initialization.
1381
d86d4aaf
DE
13822014-02-20 Doug Evans <dje@google.com>
1383
3bc32da3 1384 Remove global all_lwps.
d86d4aaf
DE
1385 * inferiors.h (ptid_of): Move here from linux-low.h.
1386 (pid_of, lwpid_of): Ditto.
1387 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
1388 parameter is a struct thread_info * now.
1389 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
1390 directly. Pass &all_threads to find_inferior instead of &all_lwps.
1391 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
1392 directly.
1393 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
1394 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
1395 * linux-arm-low.c (update_registers_callback): Update, "entry"
1396 parameter is a struct thread_info * now.
1397 Fetch lwpid from current_inferior directly.
1398 (arm_insert_point): Pass &all_threads to find_inferior instead of
1399 &all_lwps.
1400 (arm_remove_point): Ditto.
1401 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
1402 (arm_prepare_to_resume): Fetch pid from thread.
1403 (arm_read_description): Fetch lwpid from current_inferior directly.
1404 * linux-low.c (all_lwps): Delete.
1405 (delete_lwp): Delete call to remove_inferior.
1406 (handle_extended_wait): Fetch lwpid from thread.
1407 (add_lwp): Don't set lwp->entry.id. Remove call to
1408 add_inferior_to_list.
1409 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
1410 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
1411 (kill_one_lwp_callback): Ditto.
1412 (linux_kill): Don't dereference NULL pointer.
1413 Fetch ptid,lwpid from thread.
1414 (get_detach_signal): Fetch ptid from thread.
1415 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
1416 Simplify call to regcache_invalidate_thread.
1417 (delete_lwp_callback): Update, "entry" parameter is a
1418 struct thread_info * now. Fetch pid from thread.
1419 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
1420 (status_pending_p_callback): Update, "entry" parameter is a
1421 struct thread_info * now. Fetch ptid from thread.
1422 (find_lwp_pid): Update, "entry" parameter is a
1423 struct thread_info * now.
1424 (linux_wait_for_lwp): Fetch pid from thread.
1425 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
1426 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
1427 (enqueue_one_deferred_signal): Fetch lwpid from thread.
1428 (dequeue_one_deferred_signal): Ditto.
1429 (cancel_breakpoint): Fetch ptid from current_inferior.
1430 (linux_wait_for_event): Pass &all_threads to find_inferior,
1431 not &all_lwps. Fetch ptid, lwpid from thread.
1432 (count_events_callback): Update, "entry" parameter is a
1433 struct thread_info * now.
1434 (select_singlestep_lwp_callback): Ditto.
1435 (select_event_lwp_callback): Ditto.
1436 (cancel_breakpoints_callback): Ditto.
1437 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
1438 not &all_lwps.
1439 (select_event_lwp): Ditto. Fetch ptid from event_thread.
1440 (unsuspend_one_lwp): Update, "entry" parameter is a
1441 struct thread_info * now.
1442 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
1443 not &all_lwps.
1444 (linux_stabilize_threads): Ditto. And for for_each_inferior.
1445 Fetch lwpid from thread, not lwp.
1446 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
1447 Pass &all_threads to find_inferior, not &all_lwps.
1448 (send_sigstop): Fetch lwpid from thread, not lwp.
1449 (send_sigstop_callback): Update, "entry" parameter is a
1450 struct thread_info * now.
1451 (suspend_and_send_sigstop_callback): Ditto.
1452 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
1453 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
1454 struct thread_info * now.
1455 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
1456 from thread, lwp.
1457 (lwp_running): Update, "entry" parameter is a
1458 struct thread_info * now.
1459 (stop_all_lwps): Fetch ptid from thread.
1460 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
1461 (linux_resume_one_lwp): Fetch lwpid from thread.
1462 (linux_set_resume_request): Update, "entry" parameter is a
1463 struct thread_info * now. Fetch pid, lwpid from thread.
1464 (resume_status_pending_p): Update, "entry" parameter is a
1465 struct thread_info * now.
1466 (need_step_over_p): Ditto. Fetch lwpid from thread.
1467 (start_step_over): Fetch lwpid from thread.
1468 (linux_resume_one_thread): Update, "entry" parameter is a
1469 struct thread_info * now. Fetch lwpid from thread.
1470 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
1471 (proceed_one_lwp): Update, "entry" parameter is a
1472 struct thread_info * now. Fetch lwpid from thread.
1473 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
1474 struct thread_info * now.
1475 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
1476 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
1477 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
1478 directly.
1479 (regsets_store_inferior_registers): Ditto.
1480 (fetch_register, store_register): Ditto.
1481 (linux_read_memory, linux_write_memory): Ditto.
1482 (linux_request_interrupt): Ditto.
1483 (linux_read_auxv): Ditto.
1484 (linux_xfer_siginfo): Ditto.
1485 (linux_qxfer_spu): Ditto.
1486 (linux_qxfer_libraries_svr4): Ditto.
1487 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
1488 moved to inferiors.h.
1489 (get_lwp): Delete.
1490 (get_thread_lwp): Update.
1491 (struct lwp_info): Delete member "entry". Simplify comment for
1492 member "thread".
1493 (all_lwps): Delete.
1494 * linux-mips-low.c (mips_read_description): Fetch lwpid from
1495 current_inferior directly.
1496 (update_watch_registers_callback): Update, "entry" parameter is a
1497 struct thread_info * now. Fetch pid from thread.
1498 (mips_linux_prepare_to_resume): Fetch ptid from thread.
1499 (mips_insert_point): Fetch lwpid from current_inferior.
1500 Pass &all_threads to find_inferior, not &all_lwps.
1501 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
1502 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
1503 directly.
1504 (mips_stopped_data_address): Ditto.
1505 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
1506 directly.
1507 * linux-tile-low.c (tile_arch_setup): Ditto.
1508 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
1509 (update_debug_registers_callback): Update, "entry" parameter is a
1510 struct thread_info * now. Fetch pid from thread.
1511 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
1512 Pass &all_threads to find_inferior, not &all_lwps.
1513 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
1514 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
1515 Pass &all_threads to find_inferior, not &all_lwps.
1516 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
1517 (i386_dr_low_get_status): Ditto.
1518 (x86_linux_prepare_to_resume): Fetch ptid from thread.
1519 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
1520 (x86_linux_read_description): Ditto.
1521 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
1522
3b8361aa
DE
15232014-02-20 Doug Evans <dje@google.com>
1524
1525 * inferiors.c (get_first_inferior): Fix buglet.
1526
f7667f0d
DE
15272014-02-19 Doug Evans <dje@google.com>
1528
1529 * gdbthread.h (add_thread): Change result type to struct thread_info *.
1530 * inferiors.c (add_thread): Change result type to struct thread_info *.
1531 All callers updated.
1532 (add_lwp): Call add_thread here instead of in callers.
1533 All callers updated.
1534 * linux-low.h (get_lwp_thread): Rewrite.
1535 (struct lwp_info): New member "thread".
1536
b3312d80
DE
15372014-02-19 Doug Evans <dje@google.com>
1538
1539 * linux-low.c (add_lwp): Change result to struct lwp_info *.
1540 All callers updated.
1541
ecc6f45c
DE
15422014-02-19 Doug Evans <dje@google.com>
1543
1544 * inferiors.c (add_thread): Fix whitespace.
1545
649ebbca
DE
15462014-02-19 Doug Evans <dje@google.com>
1547
1548 * dll.c (clear_dlls): Replace accessing list implemention details
1549 with API function.
1550 * gdbthread.h (get_first_thread): Declare.
1551 * inferiors.c (for_each_inferior_with_data): New function.
1552 (get_first_thread): New function.
1553 (find_thread_ptid): Simplify.
1554 (get_first_inferior): New function.
1555 (clear_list): Delete.
1556 (one_inferior_p): New function.
1557 (clear_inferior_list): New function.
1558 (clear_inferiors): Update.
1559 * inferiors.h (for_each_inferior_with_data): Declare.
1560 (clear_inferior_list): Declare.
1561 (one_inferior_p): Declare.
1562 (get_first_inferior): Declare.
1563 * linux-low.c (linux_wait_for_event): Replace accessing list
1564 implemention details with API function.
1565 * server.c (target_running): Ditto.
1566 (accumulate_file_name_length): New function.
1567 (emit_dll_description): New function.
1568 (handle_qxfer_libraries): Replace accessing list implemention
1569 details with API function.
1570 (handle_qxfer_threads_worker): New function.
1571 (handle_qxfer_threads_proper): Replace accessing list implemention
1572 details with API function.
1573 (handle_query): Ditto.
1574 (visit_actioned_threads_callback_ftype): New typedef.
1575 (visit_actioned_threads_data): New struct.
1576 (visit_actioned_threads): Rewrite to be find_inferior callback.
1577 (resume): Call find_inferior.
1578 (handle_status): Replace accessing list implemention
1579 details with API function.
1580 (process_serial_event): Replace accessing list implemention details
1581 with API function.
1582 * target.c (set_desired_inferior): Replace accessing list implemention
1583 details with API function.
1584 * tracepoint.c (same_process_p): New function.
1585 (gdb_agent_about_to_close): Replace accessing list implemention
1586 details with API function.
1587 * win32-low.c (child_delete_thread): Replace accessing list
1588 implemention details with API function.
1589 (match_dll_by_basename): New function.
1590 (dll_is_loaded_by_basename): New function.
1591 (win32_ensure_ntdll_loaded): Replace accessing list implemention
1592 details call to dll_is_loaded_by_basename.
1593
80894984
DE
15942014-02-19 Doug Evans <dje@google.com>
1595
1596 * dll.h (struct dll_info): Add comment.
1597 * gdbthread.h (struct thread_info): Add comment.
1598 (current_ptid): Simplify.
1599 * inferiors.c (add_process): Update.
1600 (remove_process): Update.
1601 * inferiors.h (struct process_info): Rename member "head" to "entry".
1602 * linux-low.c (delete_lwp): Update.
1603 (add_lwp): Update.
1604 (last_thread_of_process_p): Update.
1605 (kill_one_lwp_callback, linux_kill): Update.
1606 (status_pending_p_callback): Update.
1607 (wait_for_sigstop): Update. Simplify read of ptid.
1608 (start_step_over): Update.
1609 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
1610 (get_lwp_thread): Update.
1611 (struct lwp_info): Rename member "head" to "entry".
1612 * regcache.h (inferior_list_entry): Delete.
1613 * server.c (kill_inferior_callback): Update.
1614 (detach_or_kill_inferior_callback): Update.
1615 (print_started_pid): Update.
1616 (print_attached_pid): Update.
1617 (process_serial_event): Simplify read of ptid.
1618 * thread-db.c (thread_db_create_event): Update.
1619 (thread_db_get_tls_address): Update.
1620 * win32-low.c (current_inferior_ptid): Simplify.
1621
46917d26
TT
16222014-02-19 Tom Tromey <tromey@redhat.com>
1623
1624 * target.h (struct target_ops) <supports_btrace>: Add target_ops
1625 argument.
1626 (target_supports_btrace): Update.
1627
0759a81e
YQ
16282014-02-14 Yao Qi <yao@codesourcery.com>
1629
1630 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
1631 (rsp-low-ipa.o): New target.
1632
a7191e8b
TT
16332014-02-12 Tom Tromey <tromey@redhat.com>
1634
1635 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
1636 convert_ascii_to_int.
1637 * regcache.c (registers_to_string): Likewise.
1638 * remote-utils.c (decode_M_packet): Likewise.
1639 * server.c (process_serial_event): Likewise.
1640
ff0e980e
TT
16412014-02-12 Tom Tromey <tromey@redhat.com>
1642
1643 * server.c (handle_query, handle_v_run): Use hex2bin, not
1644 unhexify.
1645 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
1646
e9371aff
TT
16472014-02-12 Tom Tromey <tromey@redhat.com>
1648
1649 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
1650 convert_int_to_ascii.
1651 * regcache.c (registers_to_string, collect_register_as_string):
1652 Likewise.
1653 * remote-utils.c (look_up_one_symbol, relocate_instruction):
1654 Likewise.
1655 * server.c (process_serial_event): Likewise.
1656 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
1657 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
1658
971dc0b8
TT
16592014-02-12 Tom Tromey <tromey@redhat.com>
1660
1661 * remote-utils.c (look_up_one_symbol, monitor_output): Use
1662 bin2hex, not hexify.
1663 * tracepoint.c (cmd_qtstatus): Likewise.
1664
0a822afb
TT
16652014-02-12 Tom Tromey <tromey@redhat.com>
1666
1667 * remote-utils.c (monitor_output): Pass explicit length to
1668 hexify.
1669
9c3d6531
TT
16702014-02-12 Tom Tromey <tromey@redhat.com>
1671
1672 * tracepoint.c: Include rsp-low.h.
1673 * server.c: Include rsp-low.h.
1674 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
1675 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
1676 declare.
1677 * remote-utils.c: Include rsp-low.h.
1678 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
1679 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
1680 (convert_int_to_ascii, convert_ascii_to_int): Move to
1681 common/rsp-low.c.
1682 * regcache.c: Include rsp-low.h.
1683 * ax.c: Include rsp-low.h.
1684 * Makefile.in (SFILES): Add common/rsp-low.c.
1685 (OBS): Add rsp-low.o.
1686 (rsp-low.o): New target.
1687
01fd3ea5
TT
16882014-02-12 Tom Tromey <tromey@redhat.com>
1689
1690 * utils.h (pulongest, plongest, phex_nz): Don't declare.
1691 Include print-utils.h.
1692 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
1693 (plongest, thirty_two, phex_nz): Remove.
1694 * Makefile.in (SFILES): Add common/print-utils.c.
1695 (OBS): Add print-utils.o.
1696 (print-utils-ipa.o): New target.
1697 (print-utils.o): New target.
1698 (IPA_OBJS): Add print-utils-ipa.o.
1699
e99dc820
TT
17002014-02-06 Tom Tromey <tromey@redhat.com>
1701
1702 * Makefile.in (SFILES): Fix indentation.
1703
ee1e2d4f
DE
17042014-02-05 Doug Evans <dje@google.com>
1705
1706 * linux-low.c (linux_wait_for_event): Improve comment.
1707 (linux_wait_1): Keep current_inferior in sync with event_child.
1708
f5a02773
DE
17092014-01-22 Doug Evans <dje@google.com>
1710
1711 * gdbthread.h (gdb_id_to_thread): Delete, unused.
1712
87ce2a04
DE
17132014-01-22 Doug Evans <dje@google.com>
1714
1715 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
1716 * configure: Regenerate.
1717 * config.in: Regenerate.
1718 * Makefile.in (SFILES): Add debug.c.
1719 (OBS): Add debug.o.
1720 * debug.c: New file.
1721 * debug.h: New file.
1722 * linux-aarch64-low.c (*): Update all debugging printfs to use
1723 debug_printf instead of fprintf.
1724 * linux-arm-low.c (*): Ditto.
1725 * linux-cris-low.c (*): Ditto.
1726 * linux-crisv32-low.c (*): Ditto.
1727 * linux-m32r-low.c (*): Ditto.
1728 * linux-sparc-low.c (*): Ditto.
1729 * linux-x86.c (*): Ditto.
1730 * linux-low.c (*): Ditto.
1731 (linux_wait_1): Add calls to debug_enter, debug_exit.
1732 (linux_wait): Remove redundant debugging printf.
1733 (stop_all_lwps): Add calls to debug_enter, debug_exit.
1734 (linux_resume, unstop_all_lwps): Ditto.
1735 * mem-break.c (*): Update all debugging printfs to use
1736 debug_printf instead of fprintf.
1737 * remote-utils.c (*): Ditto.
1738 * thread-db.c (*): Ditto.
1739 * server.c #include <ctype.h>, "gdb_vecs.h".
1740 (debug_threads): Moved to debug.c.
1741 (*): Update all debugging printfs to use debug_printf instead of
1742 fprintf.
1743 (start_inferior): Replace call to fflush with call to debug_flush.
1744 (monitor_show_help): Mention set debug-format.
1745 (parse_debug_format_options): New function.
1746 (handle_monitor_command): Handle "monitor set debug-format".
1747 (gdbserver_usage): Mention --debug-format.
1748 (main): Parse --debug-format.
1749 * server.h (debug_threads): Declaration moved to debug.h.
1750 #include "debug.h".
1751 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
1752 trace_debug_1 that uses debug_printf.
1753 (tracepoint_look_up_symbols): Update all debugging printfs to use
1754 debug_printf instead of fprintf.
1755
e671835b
BS
17562014-01-20 Baruch Siach <baruch@tkos.co.il>
1757
1758 * linux-xtensa-low.c: Include asm/ptrace.h instead of
1759 sys/ptrace.h.
1760
b5737fa9
PA
17612014-01-17 Pedro Alves <palves@redhat.com>
1762
ea38d2a9 1763 PR build/16445
c7faa97a
PA
1764 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
1765 defined after including gdb_proc_service.h.
b5737fa9 1766
40ed484e
DE
17672014-01-16 Doug Evans <dje@google.com>
1768
1769 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
1770 (match_dll): Use it.
1771
969c39fb
MM
17722014-01-16 Markus Metzger <markus.t.metzger@intel.com>
1773
1774 * target.h (target_ops) <read_btrace>: Change parameters and
1775 return type to allow error reporting.
1776 * server.c (handle_qxfer_btrace): Support delta reads. Pass
1777 trace reading errors on.
1778 * linux-low.c (linux_low_read_btrace): Pass trace reading
1779 errors on.
1780 (linux_low_disable_btrace): New.
1781
ab7f45ba
DE
17822014-01-15 Doug Evans <dje@google.com>
1783
1784 * inferiors.c (thread_id_to_gdb_id): Delete.
1785 * inferiors.h (thread_id_to_gdb_id): Delete.
1786
66af0f44
EZ
17872014-01-13 Eli Zaretskii <eliz@gnu.org>
1788
1789 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
1790 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
1791 versions.
1792
9939e131
PA
17932014-01-08 Pedro Alves <palves@redhat.com>
1794
1795 * server.c (handle_status): Don't discard previous queued stop
1796 replies or thread's pending status here.
1797 (main) <disconnection>: Do it here instead.
1798
b7ea362b
PA
17992014-01-08 Pedro Alves <palves@redhat.com>
1800
1801 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
1802 * server.c (visit_actioned_threads, handle_pending_status): New
1803 function.
1804 (handle_v_cont): Factor out parts to ...
1805 (resume): ... this new function. If in all-stop, and a thread
1806 being resumed has a pending status, report it without actually
1807 resuming.
1808 (myresume): Adjust to use the new 'resume' function.
1809 (clear_pending_status_callback, set_pending_status_callback)
1810 (find_status_pending_thread_callback): New functions.
1811 (handle_status): Handle the case of multiple threads having
1812 interesting statuses to report. Report threads' real last signal
1813 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
1814 with an interesting thread to report the status for, instead of
1815 always reporting the status of the first thread.
1816
28498c42
JB
18172014-01-01 Joel Brobecker <brobecker@adacore.com>
1818
1819 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
1820 * gdbreplay.c (gdbreplay_version): Likewise.
1821
f45c82da
YZ
18222013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
1823
1824 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
1825 iov.iov_len with the real length in use.
1826
379a5e2d
JB
18272013-12-13 Joel Brobecker <brobecker@adacore.com>
1828
1829 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
1830 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
1831 for all targets that use win32-low.c.
1832 * win32-low.c (win32_ensure_ntdll_loaded): New function.
1833 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
1834
4210d83e
PA
18352013-12-13 Pedro Alves <palves@redhat.com>
1836
1837 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
1838 if equal to TARGET_WAITKIND_LOADED.
1839 * win32-low.c (cached_status): New static global.
1840 (win32_wait): Add declaration.
1841 (do_initial_child_stuff): Flush all initial pending debug events
1842 up to the initial breakpoint.
1843 (win32_wait): If CACHED_STATUS was set, return that instead
1844 of doing a real wait. Remove the code resuming the execution
1845 of the inferior after receiving a TARGET_WAITKIND_LOADED event
1846 during the initial phase. Also remove the code changing
1847 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
1848 TARGET_WAITKIND_STOPPED.
1849
e7f0d979
YQ
18502013-12-11 Yao Qi <yao@codesourcery.com>
1851
1852 * notif.c (handle_notif_ack): Return 0 if no notification
1853 matches.
1854
ebcf782c
DE
18552013-11-20 Doug Evans <dje@google.com>
1856
1857 * linux-low.c (linux_set_resume_request): Fix comment.
1858
20ad9378
DE
18592013-11-20 Doug Evans <dje@google.com>
1860
1861 * linux-low.c (resume_status_pending_p): Tweak comment.
1862
a196ebeb
WT
18632013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
1864
1865 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
1866 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
1867 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
1868 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
1869 (srv_amd64_regobj): Add amd64-mpx.o.
1870 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
1871 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
1872 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
1873 * i387-fp.c (num_pl_bnd_register) Added constant.
1874 (num_pl_bnd_cfg_registers) Added constant.
1875 (struct i387_xsave) Added reserved area and MPX fields.
1876 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
1877 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
1878 function.
1879 (tdesc_i386_mpx_linux): Add MPX amd64 target.
1880 (init_registers_amd64_mpx_linux): Declare new function.
1881 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
1882 (x86_64_regmap): Add MPX registers.
1883 (x86_linux_read_description): Add MPX case.
1884 (initialize_low_arch): Initialize MPX targets.
1885
0080a2f6
TT
18862013-11-18 Tom Tromey <tromey@redhat.com>
1887
1888 * configure: Rebuild.
1889 * configure.ac: Don't check for stdlib.h.
1890 * gdbreplay.c: Unconditionally include stdlib.h.
1891
2978b111
TT
18922013-11-18 Tom Tromey <tromey@redhat.com>
1893
1894 * config.in: Rebuild.
1895 * configure: Rebuild.
1896 * configure.ac: Don't use AC_HEADER_DIRENT.
1897
a3d08894
TT
18982013-11-18 Tom Tromey <tromey@redhat.com>
1899
1900 * server.h: Don't check HAVE_STRING_H.
1901 * gdbreplay.c: Don't check HAVE_STRING_H.
1902 * configure: Rebuild.
1903
0a5dd17d
TT
19042013-11-18 Tom Tromey <tromey@redhat.com>
1905
1906 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
1907 LIBGNU.
1908
1bd2f0ba
TT
19092013-11-08 Tom Tromey <tromey@redhat.com>
1910
1911 * configure, config.in: Rebuild.
1912 * configure.ac: Remove unused configury.
1913
3266f10b
TT
19142013-11-08 Tom Tromey <tromey@redhat.com>
1915
1916 * acinclude.m4: Include common.m4, codeset.m4.
1917 * configure, config.in: Rebuild.
1918 * configure.ac: Use GDB_AC_COMMON.
1919
6682d959
AA
19202013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
1921
1922 * linux-s390-low.c (HWCAP_S390_TE): New define.
1923 (s390_arch_setup): Consider the TE field in the HWCAP for
1924 determining 'have_regset_tdb'.
1925
fd0a4d76
SDJ
19262013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
1927
1928 PR gdb/16014
1929 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
1930 call to sizeof.
1931
1a3d890b
PA
19322013-10-02 Pedro Alves <palves@redhat.com>
1933
1934 * server.c (process_serial_event): Don't output "GDBserver
1935 exiting" if GDB is connected through stdio.
1936 * target.c (mywait): Likewise, be silent if GDB is connected
1937 through stdio.
1938
97ad4581
JB
19392013-10-01 Joel Brobecker <brobecker@adacore.com>
1940
1941 * lynx-low.c (lynx_add_threads_after_attach): New function.
1942 (lynx_attach): Remove call to add_thread. Add call to
1943 lynx_add_threads_after_attach instead.
1944
5b4e221c
MF
19452013-09-28 Mike Frysinger <vapier@gentoo.org>
1946
1947 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
1948 * config.in, configure: Regenerated.
1949
ee47b2f8
YQ
19502013-09-18 Yao Qi <yao@codesourcery.com>
1951
1952 PR server/15959
1953 * server.c (start_inferior): Clear 'resume_info'.
1954
d6707650 19552013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 1956
d6707650
JW
1957 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
1958 for each register.
1959
9243dd0e 19602013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 1961
9243dd0e
JW
1962 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
1963 linux-tile-low.o to srv_tgtobj.
1964
c623a6ef
WN
19652013-09-16 Will Newton <will.newton@linaro.org>
1966
1967 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
1968 out regs.
1969
fb71d39e
PA
19702013-09-06 Pedro Alves <palves@redhat.com>
1971
1972 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
1973 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
1974 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
1975 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
1976 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
1977 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
1978
8e7e9910
PA
19792013-09-06 Pedro Alves <palves@redhat.com>
1980
1981 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
1982 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
1983
7c3a12ca
PA
19842013-09-06 Pedro Alves <palves@redhat.com>
1985
1986 * linux-amd64-ipa.c: Include tracepoint.h.
1987 * linux-i386-ipa.c: Include tracepoint.h.
1988
8eb3d7b6
RW
19892013-09-06 Ricard Wanderlof <ricardw@axis.com>
1990
1991 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
1992 (ps_get_thread_area): New function.
1993
eddddb9d
RW
19942013-09-06 Ricard Wanderlof <ricardw@axis.com>
1995
1996 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
1997 (initialize_low_arch): Call init_registers_crisv32 rather than
1998 init_register_crisv32.
1999
533b0600
PA
20002013-09-05 Pedro Alves <palves@redhat.com>
2001
2002 * server.h (handle_vFile, hostio_last_error_from_errno): Move
2003 to ...
2004 * hostio.h: ... this new file.
2005 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2006 win32-low.c: Include hostio.h.
2007
0ce3d3b5
PA
20082013-09-05 Pedro Alves <palves@redhat.com>
2009
2010 * server.h (gdb_client_data, handler_func, callback_handler_func)
2011 (delete_file_handler, add_file_handler, append_callback_event)
2012 (delete_callback_event, start_event_loop, initialize_event_loop):
2013 Move to event-loop.h and include it.
2014 * event-loop.h: New file.
2015
799cdc37
PA
20162013-09-05 Pedro Alves <palves@redhat.com>
2017
2018 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2019 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2020 (loaded_dll, unloaded_dll): Move to ...
2021 * dll.h: ... this new file.
2022 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2023
6a6bbd9d
PA
20242013-09-05 Pedro Alves <palves@redhat.com>
2025
2026 * server.h (current_process, get_thread_process, all_processes)
2027 (add_inferior_to_list, for_each_inferior, current_inferior)
2028 (remove_inferior, add_process, remove_process, find_process_pid)
2029 (have_started_inferiors_p, have_attached_inferiors_p)
2030 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2031 (clear_inferiors, find_inferior, find_inferior_id)
2032 (inferior_target_data, set_inferior_target_data)
2033 (inferior_regcache_data, set_inferior_regcache_data): Move to
2034 inferiors.h, and include it.
2035 * inferiors.h: New file.
2036
f699aaba
PA
20372013-09-05 Pedro Alves <palves@redhat.com>
2038
2039 * server.h (struct emit_ops, current_insn_ptr, emit_error):
2040 Move ...
2041 * ax.h: ... here.
2042
c144c7a0
PA
20432013-09-05 Pedro Alves <palves@redhat.com>
2044
2045 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2046 tracepoint.h.
2047 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2048 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2049 (handle_tracepoint_general_set, handle_tracepoint_query)
2050 (tracepoint_finished_step, tracepoint_was_hit)
2051 (release_while_stepping_state_list, current_traceframe)
2052 (in_readonly_region, traceframe_read_mem)
2053 (fetch_traceframe_registers, traceframe_read_sdata)
2054 (traceframe_read_info, struct fast_tpoint_collect_status)
2055 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2056 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2057 (supply_fast_tracepoint_registers)
2058 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2059 (ipa_tdesc, claim_trampoline_space)
2060 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2061 (agent_mem_read, agent_get_trace_state_variable_value)
2062 (agent_set_trace_state_variable_value, agent_tsv_read)
2063 (agent_mem_read_string, get_raw_reg_func_addr)
2064 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2065 * tracepoint.h: ... this new file.
2066
ff42e6ab
PA
20672013-09-05 Pedro Alves <palves@redhat.com>
2068
2069 * server.h (perror_with_name, error, fatal, warning, paddress)
2070 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2071 include it.
2072 * utils.h: New file.
2073
541af0f4
PA
20742013-09-05 Pedro Alves <palves@redhat.com>
2075
2076 * server.h (remote_debug, noack_mode, transport_is_reliable)
2077 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
2078 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
2079 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
2080 (write_enn, initialize_async_io, enable_async_io)
2081 (disable_async_io, check_remote_input_interrupt_request)
2082 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
2083 (dead_thread_notify, prepare_resume_reply)
2084 (decode_address_to_semicolon, decode_address, decode_m_packet)
2085 (decode_M_packet, decode_X_packet, decode_xfer_write)
2086 (decode_search_memory_packet, unhexify, hexify)
2087 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
2088 (look_up_one_symbol, relocate_instruction)
2089 (monitor_output): Move to remote-utils.h, and include it.
2090 * remote-utils.h: New file.
2091
eebdf26b
PA
20922013-09-05 Pedro Alves <palves@redhat.com>
2093
2094 * server.h (_): Delete.
2095
3aafd2ff
PA
20962013-09-02 Pedro Alves <palves@redhat.com>
2097
2098 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
2099 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
2100 allocated.
2101 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
2102
cee83bcb
PM
21032013-09-02 Pierre Muller <muller@sourceware.org>
2104
2105 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
2106 or WriteProcessMemory complete successfully and handle
2107 ERROR_PARTIAL_COPY error.
2108
9a13b2fa
PA
21092013-09-02 Pedro Alves <palves@redhat.com>
2110
2111 * server.c (gdb_read_memory): Return -1 on traceframe memory read
2112 error instead of EIO.
2113
602e3198
JK
21142013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2115
2116 PR server/15604
2117 * linux-low.c: Include filestuff.h.
2118 (linux_create_inferior) <pid == 0>: Call close_most_fds.
2119 * lynx-low.c: Include filestuff.h.
2120 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
2121 * server.c: Include filestuff.h.
2122 (main): Call notice_open_fds.
2123 * spu-low.c: Include filestuff.h.
2124 (spu_create_inferior) <pid == 0>: Call close_most_fds.
2125
96d7229d
LM
21262013-08-22 Luis Machado <lgustavo@codesourcery.com>
2127
2128 * Makefile.in: Explain why ../target and ../nat are not
2129 listed as include file search paths.
2130 (linux-waitpid.o): New object file rule.
2131 * configure.srv (srv_native_linux_obj): New variable.
2132 Replace all occurrences of linux native object files with
2133 $srv_native_linux_obj.
2134 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
2135 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
2136 (linux_enable_event_reporting): Remove declaration.
2137 (my_waitpid): Moved to common/linux-waitpid.c.
2138 (linux_wait_for_event): Pass ptid when calling
2139 linux_enable_event_reporting.
2140 (linux_supports_tracefork_flag): Remove.
2141 (linux_enable_event_reporting): Likewise.
2142 (linux_tracefork_grandchild): Remove.
2143 (STACK_SIZE): Moved to common/linux-ptrace.c.
2144 (linux_tracefork_child): Remove.
2145 (linux_test_for_tracefork): Remove.
2146 (linux_look_up_symbols): Call linux_supports_traceclone.
2147 (initialize_low): Remove call to linux_test_for_tracefork.
2148 * linux-low.h (PTRACE_TYPE_ARG3): Move to
2149 common/linux-ptrace.h.
2150 (PTRACE_TYPE_ARG4): Likewise.
2151 Include linux-ptrace.h.
2152
32940073
PA
21532013-08-21 Pedro Alves <palves@redhat.com>
2154
2155 * config.in: Renegerate.
2156
33b60d58 21572013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 2158
33b60d58
LM
2159 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
2160 (SFILES): Remove $(srcdir)/common/target-common.c and
2161 add $(srcdir)/target/waitstatus.c.
2162 (OBS): Remove target-common.o and add waitstatus.o.
2163 (server_h): Remove $(srcdir)/../common/target-common.h and
2164 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
2165 and $(srcdir)/../target/waitstatus.h.
2166 (target-common.o): Remove.
2167 (waitstatus.o): New target object file.
2168 * target.h: Do not include target-common.h and
2169 include target/resume.h, target/wait.h and
2170 target/waitstatus.h.
2171
b8e1b30e
LM
21722013-08-13 Luis Machado <lgustavo@codesourcery.com>
2173
2174 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2175 to PTRACE_TYPE_ARG3.
2176 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2177 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
2178 PTRACE_TYPE_ARG4.
2179 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
2180 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
2181
7a60ad40
YQ
21822013-07-27 Jie Zhang <jie@codesourcery.com>
2183 Daniel Jacobowitz <dan@codesourcery.com>
2184 Yao Qi <yao@codesourcery.com>
2185
2186 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
2187 (mips-linux-watch.o): New rule.
2188 (mips_linux_watch_h): New variable.
2189 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
2190 srv_tgtobj.
2191 * linux-mips-low.c: Include mips-linux-watch.h.
2192 (struct arch_process_info, struct arch_lwp_info): New.
2193 (update_watch_registers_callback): New function.
2194 (mips_linux_new_process, mips_linux_new_thread) New functions.
2195 (mips_linux_prepare_to_resume, mips_insert_point): New
2196 functions.
2197 (mips_remove_point, mips_stopped_by_watchpoint): New
2198 functions.
2199 (rsp_bp_type_to_target_hw_bp_type): New function.
2200 (mips_stopped_data_address): New function.
2201 (the_low_target): Add watchpoint support functions.
2202
de6f69ad
YQ
22032013-07-27 Yao Qi <yao@codesourcery.com>
2204
2205 * i386-low.c: Include break-common.h.
2206 (enum target_hw_bp_type): Remove.
2207
3360c0bf
LM
22082013-07-24 Luis Machado <lgustavo@codesourcery.com>
2209
2210 * Makefile.in (SFILES): /common/target-common.c.
2211 (OBS): Add target-common.o.
2212 (server_h): Add $(srcdir)/../common/target-common.h.
2213 (target-common.o): New target.
2214 * server.c (queue_stop_reply_callback): Free
2215 status string after use.
2216 * target.c (target_waitstatus_to_string): Remove.
2217 * target.h: Include target-common.h.
2218 (resume_kind): Likewise.
2219 (target_waitkind): Likewise.
2220 (target_waitstatus): Likewise.
2221 (TARGET_WNOHANG): Likewise.
2222
bd885420
YQ
22232013-07-04 Yao Qi <yao@codesourcery.com>
2224
2225 * Makefile.in (host_alias): Use @host_noncanonical@.
2226 (target_alias): Use @target_noncanonical@.
2227 * configure.ac: Use ACX_NONCANONICAL_TARGET and
2228 ACX_NONCANONICAL_HOST.
2229 * configure: Regenerated.
2230
2231 Revert:
2232 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2233
2234 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2235 * configure: Rebuild.
2236 * Makefile.in (version_host, version_target): Get from configure.
2237 (version.c): Use $(version_host) and $(version_target).
2238
17ef446e
PA
22392013-07-03 Pedro Alves <palves@redhat.com>
2240
2241 * Makefile.in (config.status): Depend on development.sh.
2242 * acinclude.m4: Include libmcheck.m4.
2243 * configure: Regenerate.
2244
7a9a7487
MG
22452013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2246
2247 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
2248 attribute inside the parentheses.
2249 (winapi_DebugSetProcessKillOnExit): Ditto.
2250 (winapi_DebugBreakProcess): Ditto.
2251 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 2252
49b64de6
MG
22532013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2254
2255 * notif.h (notif_event): Add a dummy member to avoid compiler
2256 errors.
2257
d5749ee7
PA
22582013-07-01 Pedro Alves <palves@redhat.com>
2259
2260 * hostio.c (HOSTIO_PATH_MAX): Define.
2261 (require_filename, handle_open, handle_unlink, handle_readlink):
2262 Use it.
2263
d8d2a3ee
PA
22642013-07-01 Pedro Alves <palves@redhat.com>
2265
2266 * server.h: Include "pathmax.h".
2267 * linux-low.c: Don't include sys/param.h.
2268 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
2269 MAXPATHLEN.
2270 * win32-low.c: Don't include sys/param.h.
2271 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
2272
bc7dea8d
PA
22732013-07-01 Pedro Alves <palves@redhat.com>
2274
2275 * event-loop.c: Don't check HAVE_UNISTD_H before including
2276 <unistd.h>.
2277 * gdbreplay.c: Likewise.
2278 * remote-utils.c: Likewise.
2279 * server.c: Likewise.
2280 * configure.ac: Don't check for unistd.h.
2281 * configure: Regenerate.
2282
d6c2da54
TT
22832013-06-28 Tom Tromey <tromey@redhat.com>
2284
2285 * Makefile.in (version.c): Use version.in, not
2286 common/version.in.
2287
257b6bec
MG
22882013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2289
2290 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2291 * configure: Rebuild.
2292 * Makefile.in (version_host, version_target): Get from configure.
2293 (version.c): Use $(version_host) and $(version_target).
2294
86ebe149
DK
22952013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2296
2297 Fix trace-status to output user name without trailing colon.
2298 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
2299
f30aa5af
DK
23002013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2301
2302 Fix trace-status to output proper start-time and stop-time.
2303 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
2304 output start time and stop time in hex as gdb expects.
2305
28a93511
YQ
23062013-06-26 Pedro Alves <pedro@codesourcery.com>
2307
2308 * tracepoint.c (build_traceframe_info_xml): Output trace state
2309 variables present in the trace buffer.
2310
01208463
TT
23112013-06-24 Tom Tromey <tromey@redhat.com>
2312
2313 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
2314 create-version.sh.
2315 (version.o): Remove.
2316 * gdbreplay.c: Include version.h.
2317 (version, host_name): Don't declare.
2318 * server.h: Include version.h.
2319 (version, host_name): Don't declare.
2320
760256f9
PA
23212013-06-12 Pedro Alves <palves@redhat.com>
2322
2323 * linux-x86-low.c (linux_is_elf64): Delete global.
2324 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
2325 with local linux_pid_exe_is_elf_64_file use.
2326
030031ee
PA
23272013-06-11 Pedro Alves <palves@redhat.com>
2328
2329 * linux-low.c (regset_disabled, disable_regset): New functions.
2330 (regsets_fetch_inferior_registers)
2331 (regsets_store_inferior_registers): Use them.
2332 (initialize_regsets_info); Don't allocate the disabled_regsets
2333 array here.
2334 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
2335 comment.
2336
5da6eb0a
PA
23372013-06-11 Pedro Alves <palves@redhat.com>
2338
2339 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
2340 xmalloc.
2341
7e5aaa09
PA
23422013-06-11 Pedro Alves <palves@redhat.com>
2343
2344 * linux-x86-low.c (initialize_low_arch): Call
2345 init_registers_x32_avx_linux.
2346
d878444c
JK
23472013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
2348
2349 Fix compatibility with Android Bionic.
2350 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
2351 it is not empty.
2352
3aee8918
PA
23532013-06-07 Pedro Alves <palves@redhat.com>
2354
5f2b57b5 2355 PR server/14823
3aee8918
PA
2356 * Makefile.in (OBS): Add tdesc.o.
2357 (IPA_OBJS): Add tdesc-ipa.o.
2358 (tdesc-ipa.o): New rule.
2359 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
2360 interface.
2361 * linux-low.c (new_inferior): Delete.
2362 (disabled_regsets, num_regsets): Delete.
2363 (linux_add_process): Adjust to set the new per-process
2364 new_inferior flag.
2365 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
2366 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
2367 was a stop. When calling arch_setup, switch the current inferior
2368 to the thread that got an event.
2369 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
2370 (regsets_fetch_inferior_registers)
2371 (regsets_store_inferior_registers): New regsets_info parameter.
2372 Adjust to use it.
2373 (linux_register_in_regsets): New regs_info parameter. Adjust to
2374 use it.
2375 (register_addr, fetch_register, store_register): New usrregs_info
2376 parameter. Adjust to use it.
2377 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
2378 parameter regs_info. Adjust to use it.
2379 (linux_fetch_registers): Get the current inferior's regs_info, and
2380 adjust to use it.
2381 (linux_store_registers): Ditto.
2382 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
2383 (initialize_low): Don't initialize the target_regsets here. Call
2384 initialize_low_arch.
2385 * linux-low.h (target_regsets): Delete declaration.
2386 (struct regsets_info): New.
2387 (struct usrregs_info): New.
2388 (struct regs_info): New.
2389 (struct process_info_private) <new_inferior>: New field.
2390 (struct linux_target_ops): Delete the num_regs, regmap, and
2391 regset_bitmap fields. New field regs_info.
2392 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
2393 * i387-fp.c (num_xmm_registers): Delete.
2394 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
2395 calls to new interface.
2396 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
2397 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
2398 Infer the number of xmm registers from the regcache's target
2399 description.
2400 * i387-fp.h (num_xmm_registers): Delete.
2401 * inferiors.c (add_thread): Don't install the thread's regcache
2402 here.
2403 * proc-service.c (gregset_info): Fetch the current inferior's
2404 regs_info. Adjust to use it.
2405 * regcache.c: Include tdesc.h.
2406 (register_bytes, reg_defs, num_registers)
2407 (gdbserver_expedite_regs): Delete.
2408 (get_thread_regcache): If the thread doesn't have a regcache yet,
2409 create one, instead of aborting gdbserver.
2410 (regcache_invalidate_one): Rename to ...
2411 (regcache_invalidate_thread): ... this.
2412 (regcache_invalidate_one): New.
2413 (regcache_invalidate): Only invalidate registers of the current
2414 process.
2415 (init_register_cache): Add target_desc parameter, and use it.
2416 (new_register_cache): Ditto. Assert the target description has a
2417 non zero registers_size.
2418 (regcache_cpy): Add assertions. Adjust.
2419 (realloc_register_cache, set_register_cache): Delete.
2420 (registers_to_string, registers_from_string): Adjust.
2421 (find_register_by_name, find_regno, find_register_by_number)
2422 (register_cache_size): Add target_desc parameter, and use it.
2423 (free_register_cache_thread, free_register_cache_thread_one)
2424 (regcache_release, register_cache_size): New.
2425 (register_size): Add target_desc parameter, and use it.
2426 (register_data, supply_register, supply_register_zeroed)
2427 (supply_regblock, supply_register_by_name, collect_register)
2428 (collect_register_as_string, collect_register_by_name): Adjust.
2429 * regcache.h (struct target_desc): Forward declare.
2430 (struct regcache) <tdesc>: New field.
2431 (init_register_cache, new_register_cache): Add target_desc
2432 parameter.
2433 (regcache_invalidate_thread): Declare.
2434 (regcache_invalidate_one): Delete declaration.
2435 (regcache_release): Declare.
2436 (find_register_by_number, register_cache_size, register_size)
2437 (find_regno): Add target_desc parameter.
2438 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
2439 declarations.
2440 * remote-utils.c: Include tdesc.h.
2441 (outreg, prepare_resume_reply): Adjust.
2442 * server.c: Include tdesc.h.
2443 (gdbserver_xmltarget): Delete declaration.
2444 (get_features_xml, process_serial_event): Adjust.
2445 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
2446 declare.
2447 (struct process_info) <tdesc>: New field.
2448 (ipa_tdesc): Declare.
2449 * tdesc.c: New file.
2450 * tdesc.h: New file.
2451 * tracepoint.c: Include tdesc.h.
2452 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
2453 (get_context_regcache): Adjust to pass ipa_tdesc down.
2454 (do_action_at_tracepoint): Adjust to get the register cache size
2455 from the context regcache's description.
2456 (traceframe_walk_blocks): Adjust to get the register cache size
2457 from the current trace frame's description.
2458 (traceframe_get_pc): Adjust to get current trace frame's
2459 description and pass it down.
2460 (gdb_collect): Adjust to get the register cache size from the
2461 IPA's description.
2462 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
2463 (gdbserver_xmltarget): Delete.
2464 (initialize_low_tracepoint): Set the ipa's target description.
2465 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
2466 (initialize_low_tracepoint): Set the ipa's target description.
2467 * linux-x86-low.c: Include tdesc.h.
2468 [__x86_64__] (is_64bit_tdesc): New.
2469 (ps_get_thread_area, x86_get_thread_area): Use it.
2470 (i386_cannot_store_register): Rename to ...
2471 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
2472 (i386_cannot_fetch_register): Rename to ...
2473 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
2474 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
2475 to new interface.
2476 (target_regsets): Rename to ...
2477 (x86_regsets): ... this.
2478 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
2479 interface.
2480 (x86_siginfo_fixup): Use is_64bit_tdesc.
2481 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
2482 (tdesc_x32_avx_linux, tdesc_x32_linux)
2483 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
2484 Declare.
2485 (x86_linux_update_xmltarget): Delete.
2486 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
2487 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
2488 (AMD64_LINUX_USER64_CS): New.
2489 (x86_linux_read_description): New, based on
2490 x86_linux_update_xmltarget.
2491 (same_process_callback): New.
2492 (x86_arch_setup_process_callback): New.
2493 (x86_linux_update_xmltarget): New.
2494 (x86_regsets_info): New.
2495 (amd64_linux_regs_info): New.
2496 (i386_linux_usrregs_info): New.
2497 (i386_linux_regs_info): New.
2498 (x86_linux_regs_info): New.
2499 (x86_arch_setup): Reimplement.
2500 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
2501 (x86_emit_ops): Ditto.
2502 (the_low_target): Adjust. Install x86_linux_regs_info,
2503 x86_cannot_fetch_register, and x86_cannot_store_register.
2504 (initialize_low_arch): New.
2505 * linux-ia64-low.c (tdesc_ia64): Declare.
2506 (ia64_fetch_register): Adjust.
2507 (ia64_usrregs_info, regs_info): New globals.
2508 (ia64_regs_info): New function.
2509 (the_low_target): Adjust.
2510 (initialize_low_arch): New function.
2511 * linux-sparc-low.c (tdesc_sparc64): Declare.
2512 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
2513 Adjust.
2514 (sparc_arch_setup): New function.
2515 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
2516 (the_low_target): Adjust.
2517 (initialize_low_arch): New function.
2518 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
2519 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
2520 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
2521 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
2522 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
2523 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
2524 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
2525 (tdesc_powerpc_isa205_vsx64l): Declare.
2526 (ppc_cannot_store_register, ppc_collect_ptrace_register)
2527 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
2528 (ppc_set_pc, ppc_get_hwcap): Adjust.
2529 (ppc_usrregs_info): Forward declare.
2530 (!__powerpc64__) ppc_regmap_adjusted: New global.
2531 (ppc_arch_setup): Adjust to the current process'es target
2532 description.
2533 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
2534 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
2535 (ppc_store_evrregset): Adjust.
2536 (target_regsets): Rename to ...
2537 (ppc_regsets): ... this, and make static.
2538 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
2539 (ppc_regs_info): New function.
2540 (the_low_target): Adjust.
2541 (initialize_low_arch): New function.
2542 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
2543 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
2544 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
2545 (tdesc_s390x_linux64v2): Declare.
2546 (s390_collect_ptrace_register, s390_supply_ptrace_register)
2547 (s390_fill_gregset, s390_store_last_break): Adjust.
2548 (target_regsets): Rename to ...
2549 (s390_regsets): ... this, and make static.
2550 (s390_get_pc, s390_set_pc): Adjust.
2551 (s390_get_hwcap): New target_desc parameter, and use it.
2552 [__s390x__] (have_hwcap_s390_high_gprs): New global.
2553 (s390_arch_setup): Adjust to set the current process'es target
2554 description. Don't adjust the regmap.
2555 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
2556 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
2557 (regs_info_3264): New globals.
2558 (s390_regs_info): New function.
2559 (the_low_target): Adjust.
2560 (initialize_low_arch): New function.
2561 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
2562 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
2563 [__mips64] (init_registers_mips_linux)
2564 (init_registers_mips_dsp_linux): Delete defines.
2565 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
2566 (have_dsp): New global.
2567 (mips_read_description): New, based on mips_arch_setup.
2568 (mips_arch_setup): Reimplement.
2569 (get_usrregs_info): New function.
2570 (mips_cannot_fetch_register, mips_cannot_store_register)
2571 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
2572 (mips_fill_fpregset, mips_store_fpregset): Adjust.
2573 (target_regsets): Rename to ...
2574 (mips_regsets): ... this, and make static.
2575 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
2576 (dsp_regs_info, regs_info): New globals.
2577 (mips_regs_info): New function.
2578 (the_low_target): Adjust.
2579 (initialize_low_arch): New function.
2580 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
2581 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
2582 Declare.
2583 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
2584 (arm_read_description): New, with bits factored from
2585 arm_arch_setup.
2586 (arm_arch_setup): Reimplement.
2587 (target_regsets): Rename to ...
2588 (arm_regsets): ... this, and make static.
2589 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
2590 (arm_regs_info): New function.
2591 (the_low_target): Adjust.
2592 (initialize_low_arch): New function.
2593 * linux-m68k-low.c (tdesc_m68k): Declare.
2594 (target_regsets): Rename to ...
2595 (m68k_regsets): ... this, and make static.
2596 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
2597 (m68k_regs_info): New function.
2598 (m68k_arch_setup): New function.
2599 (the_low_target): Adjust.
2600 (initialize_low_arch): New function.
2601 * linux-sh-low.c (tdesc_sharch): Declare.
2602 (target_regsets): Rename to ...
2603 (sh_regsets): ... this, and make static.
2604 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
2605 (sh_regs_info, sh_arch_setup): New functions.
2606 (the_low_target): Adjust.
2607 (initialize_low_arch): New function.
2608 * linux-bfin-low.c (tdesc_bfin): Declare.
2609 (bfin_arch_setup): New function.
2610 (bfin_usrregs_info, regs_info): New globals.
2611 (bfin_regs_info): New function.
2612 (the_low_target): Adjust.
2613 (initialize_low_arch): New function.
2614 * linux-cris-low.c (tdesc_cris): Declare.
2615 (cris_arch_setup): New function.
2616 (cris_usrregs_info, regs_info): New globals.
2617 (cris_regs_info): New function.
2618 (the_low_target): Adjust.
2619 (initialize_low_arch): New function.
2620 * linux-cris-low.c (tdesc_crisv32): Declare.
2621 (cris_arch_setup): New function.
2622 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
2623 (cris_regs_info): New function.
2624 (the_low_target): Adjust.
2625 (initialize_low_arch): New function.
2626 * linux-m32r-low.c (tdesc_m32r): Declare.
2627 (m32r_arch_setup): New function.
2628 (m32r_usrregs_info, regs_info): New globals.
2629 (m32r_regs_info): Adjust.
2630 (initialize_low_arch): New function.
2631 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
2632 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
2633 (tic6x_usrregs_info): Forward declare.
2634 (tic6x_read_description): New function, based on ...
2635 (tic6x_arch_setup): ... this. Reimplement.
2636 (target_regsets): Rename to ...
2637 (tic6x_regsets): ... this, and make static.
2638 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
2639 (tic6x_regs_info): New function.
2640 (the_low_target): Adjust.
2641 (initialize_low_arch): New function.
2642 * linux-xtensa-low.c (tdesc_xtensa): Declare.
2643 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
2644 (target_regsets): Rename to ...
2645 (xtensa_regsets): ... this, and make static.
2646 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
2647 globals.
2648 (xtensa_arch_setup, xtensa_regs_info): New functions.
2649 (the_low_target): Adjust.
2650 (initialize_low_arch): New function.
2651 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
2652 (nios2_arch_setup): Set the current process'es tdesc.
2653 (target_regsets): Rename to ...
2654 (nios2_regsets): ... this.
2655 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
2656 (nios2_regs_info): New function.
2657 (the_low_target): Adjust.
2658 (initialize_low_arch): New function.
a261b8f5
PA
2659 * linux-aarch64-low.c (tdesc_aarch64): Declare.
2660 (aarch64_arch_setup): Set the current process'es tdesc.
2661 (target_regsets): Rename to ...
2662 (aarch64_regsets): ... this.
2663 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
2664 (aarch64_regs_info): New function.
2665 (the_low_target): Adjust.
2666 (initialize_low_arch): New function.
3aee8918
PA
2667 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
2668 globals.
2669 (target_regsets): Rename to ...
2670 (tile_regsets): ... this.
2671 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
2672 (tile_regs_info): New function.
2673 (tile_arch_setup): Set the current process'es tdesc.
2674 (the_low_target): Adjust.
2675 (initialize_low_arch): New function.
2676 * spu-low.c (tdesc_spu): Declare.
2677 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
2678 * win32-arm-low.c (tdesc_arm): Declare.
2679 (arm_arch_setup): New function.
2680 (the_low_target): Install arm_arch_setup instead of
2681 init_registers_arm.
2682 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
2683 (init_windows_x86): Rename to ...
2684 (i386_arch_setup): ... this. Set `win32_tdesc'.
2685 (the_low_target): Adjust.
2686 * win32-low.c (win32_tdesc): New global.
2687 (child_add_thread): Don't create the thread cache here.
2688 (do_initial_child_stuff): Set the new process'es tdesc.
2689 * win32-low.h (struct target_desc): Forward declare.
2690 (win32_tdesc): Declare.
2691 * lynx-i386-low.c (tdesc_i386): Declare global.
2692 (lynx_i386_arch_setup): Set `lynx_tdesc'.
2693 * lynx-low.c (lynx_tdesc): New global.
2694 (lynx_add_process): Set the new process'es tdesc.
2695 * lynx-low.h (struct target_desc): Forward declare.
2696 (lynx_tdesc): Declare global.
2697 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
2698 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
2699 * nto-low.c (nto_tdesc): New global.
2700 (do_attach): Set the new process'es tdesc.
2701 * nto-low.h (struct target_desc): Forward declare.
2702 (nto_tdesc): Declare.
2703 * nto-x86-low.c (tdesc_i386): Declare.
2704 (nto_x86_arch_setup): Set `nto_tdesc'.
2705
b1fbec62
GB
27062013-06-04 Gary Benson <gbenson@redhat.com>
2707
2708 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
2709 to qSupported response when appropriate.
2710 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
2711 with nonzero-length annex.
2712 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
2713 arguments supplied in annex.
2714
d1ec4ce7
DE
27152013-05-31 Doug Evans <dje@google.com>
2716
ac44adcb 2717 PR server/15594
d1ec4ce7
DE
2718 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
2719 64 bits in 64-cross-32 environment.
2720
9b25f2d3
PA
27212013-05-28 Pedro Alves <palves@redhat.com>
2722
2723 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
2724 (aarch64-without-fpu.c): Delete rule.
2725 * configure.srv (aarch64*-*-linux*): Remove references to
2726 aarch64-without-fpu.o and aarch64-without-fpu.xml.
2727 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
2728 declaration.
2729
6740dc9c
PA
27302013-05-24 Pedro Alves <palves@redhat.com>
2731
2732 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
2733 instead of strchr/decode_address. Error if the range isn't split
2734 with a ','. Don't assume there's be a ':' in the action.
2735
c2d6af84
PA
27362013-05-23 Yao Qi <yao@codesourcery.com>
2737 Pedro Alves <palves@redhat.com>
2738
2739 * linux-low.c (lwp_in_step_range): New function.
2740 (linux_wait_1): If the thread was range stepping and stopped
2741 outside the stepping range, report the stop to GDB. Otherwise,
2742 continue stepping. Add range stepping debug output.
2743 (linux_set_resume_request): Copy the step range from the resume
2744 request to the lwp.
2745 (linux_supports_range_stepping): New.
2746 (linux_target_ops) <supports_range_stepping>: Set to
2747 linux_supports_range_stepping.
2748 * linux-low.h (struct linux_target_ops)
2749 <supports_range_stepping>: New field.
2750 (struct lwp_info) <step_range_start, step_range_end>: New fields.
2751 * linux-x86-low.c (x86_supports_range_stepping): New.
2752 (the_low_target) <supports_range_stepping>: Set to
2753 x86_supports_range_stepping.
2754 * server.c (handle_v_cont): Handle 'r' action.
2755 (handle_v_requests): Append ";r" if the target supports range
2756 stepping.
2757 * target.h (struct thread_resume) <step_range_start,
2758 step_range_end>: New fields.
2759 (struct target_ops) <supports_range_stepping>:
2760 New field.
2761 (target_supports_range_stepping): New macro.
2762
58794e1a
JB
27632013-05-17 Joel Brobecker <brobecker@adacore.com>
2764
2765 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
2766 confusion in comment.
2767
d631c5a7
JB
27682013-05-17 Joel Brobecker <brobecker@adacore.com>
2769
2770 * lynx-low.c (struct process_info_private): New type.
2771 (lynx_add_process): New function.
2772 (lynx_create_inferior, lynx_attach): Replace calls to
2773 add_process by calls to lynx_add_process.
2774 (lynx_resume): If PTID is null, then try using
2775 current_process()->private->last_wait_event_ptid.
2776 Add comments.
2777 (lynx_clear_inferiors): Delete. The contents of that function
2778 has been inlined in lynx_mourn;
2779 (lynx_wait_1): Save the ptid in the process's private data.
2780 (lynx_mourn): Free the process' private data. Replace call
2781 to lynx_clear_inferiors by call to clear_inferiors.
2782
96f7a20f
YQ
27832013-05-17 Yao Qi <yao@codesourcery.com>
2784
2785 * i386-low.c (i386_length_and_rw_bits): Move the comment to
2786 the right place.
2787
db0dfaa0
LM
27882013-05-16 Luis Machado <lgustavo@codesourcery.com>
2789
2790 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
2791 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
2792 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
2793 PT_TEXT_END_ADDR guards. Update comments.
2794 (linux_target_op) <read_offsets>: Conditionally define to
2795 linux_read_offsets if the target is UCLIBC and if it defines
2796 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
2797
68f5f838
SL
27982013-05-06 Sandra Loosemore <sandra@codesourcery.com>
2799 Andrew Jenner <andrew@codesourcery.com>
2800
2801 * Makefile.in (SFILES): Add linux-nios2-low.c.
2802 (clean): Add action to delete nios2-linux.c.
2803 (nios2-linux.c): New rule.
2804 * configure.srv: Add nios2*-*-linux*.
2805 * linux-nios2-low.c: New.
2806
1ebff1fd
HAQ
28072013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
2808
2809 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
2810
f6150862
HZ
28112013-04-25 Hui Zhu <hui@codesourcery.com>
2812
2813 PR gdb/15186
f6150862
HZ
2814 * ax.c (ax_printf): Add fflush.
2815
614c279d
TT
28162013-04-22 Tom Tromey <tromey@redhat.com>
2817
2818 * Makefile.in (SFILES): Add filestuff.c.
2819 (OBS): Add filestuff.o.
2820 (filestuff.o): New target.
2821 * config.in, configure: Rebuild.
2822 * configure.ac: Check for fdwalk, pipe2.
2823
7d4e5717
PA
28242013-04-17 Pedro Alves <palves@redhat.com>
2825
2826 * configure.ac (USE_THREAD_DB): Delete variable.
2827 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
2828 Don't AC_SUBST USE_THREAD_DB.
2829 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
2830 * config.in, configure: Regenerate.
2831
d5c93e41
PA
28322013-04-16 Pedro Alves <palves@redhat.com>
2833
2834 * linux-low.h (struct lwp_info) <thread_known>: Move under
2835 the USE_THREAD_DB #ifdef.
2836
04f5fe89
PA
28372013-04-16 Pedro Alves <palves@redhat.com>
2838
2839 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
2840 (linux-low.o): Delete rule.
2841 * linux-low.h: Always include "gdb_thread_db.h" instead of
2842 conditionally including thread_db.h.
2843 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
2844 HAVE_THREAD_DB_H.
2845
480b27bf
JK
28462013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2847
2848 * Makefile.in (install-only): Fix make install regression.
2849
43662968
JK
28502013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
2851
2852 Convert man pages to texinfo, new gdbinit.5 texinfo page.
2853 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
2854 installation.
2855 * gdbserver.1: Remove.
2856
3e74e146
PA
28572013-03-22 Pedro Alves <palves@redhat.com>
2858
2859 * linux-low.c (handle_extended_wait): Don't call
2860 linux_enable_event_reporting.
2861
a8347a2a
TT
28622013-03-15 Tony Theodore <tonyt@logyst.com>
2863
2864 PR build/9098:
2865 * Makefile.in (SHELL): Use @SHELL@.
2866
eeb56fa7
SDJ
28672013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
2868
2869 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
2870 compiler warning.
2871
4fa7e2ff
JB
28722013-03-13 Joel Brobecker <brobecker@adacore.com>
2873
2874 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
2875 Remove extraneous NULL element.
2876
8ddb1965
YQ
28772013-03-13 Yao Qi <yao@codesourcery.com>
2878
2879 * tracepoint.c (traceframe_read_tsv): Look for the last matched
2880 'V' block in trace frame.
2881
9accd112
MM
28822013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2883
2884 * target.h (struct target_ops): Add btrace ops.
2885 (target_supports_btrace): New macro.
2886 (target_enable_btrace): New macro.
2887 (target_disable_btrace): New macro.
2888 (target_read_btrace): New macro.
2889 * gdbthread.h (struct thread_info): Add btrace field.
2890 * server.c: Include btrace-common.h.
2891 (handle_btrace_general_set): New function.
2892 (handle_btrace_enable): New function.
2893 (handle_btrace_disable): New function.
2894 (handle_general_set): Call handle_btrace_general_set.
2895 (handle_qxfer_btrace): New function.
2896 (struct qxfer qxfer_packets[]): Add btrace entry.
2897 * inferiors.c (remove_thread): Disable btrace.
2898 * linux-low: Include linux-btrace.h.
2899 (linux_low_enable_btrace): New function.
2900 (linux_low_read_btrace): New function.
2901 (linux_target_ops): Add btrace ops.
2902 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
2903 Add srv_linux_btrace=yes.
2904 (x86_64-*-linux*): Add linux-btrace.o.
2905 Add srv_linux_btrace=yes.
2906 * configure.ac: Define HAVE_LINUX_BTRACE.
2907 * config.in: Regenerated.
2908 * configure: Regenerated.
2909
5cc22e4c
MM
29102013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2911
2912 * server.c (handle_qxfer): Preserve error message if -3 is
2913 returned.
2914 (qxfer): Document the -3 return value.
2915
7c97f91e
MM
29162013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2917
2918 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
2919 (linux_btrace_h): New variable.
2920 (linux-btrace.o): New rule.
2921
be9a119c 29222013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
2923 Hafiz Abid Qadeer <abidh@codesourcery.com>
2924
2925 * tracepoint.c (trace_buffer_size): New global.
2926 (DEFAULT_TRACE_BUFFER_SIZE): New define.
2927 (init_trace_buffer): Change to one-argument function. Allocate
2928 trace buffer memory.
2929 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
2930 handle QTBuffer:size packet.
2931 (cmd_bigqtbuffer_size): New function.
2932 (initialize_tracepoint): Call init_trace_buffer with
2933 DEFAULT_TRACE_BUFFER_SIZE.
2934 * server.c (handle_query): Add QTBuffer:size in the
2935 supported packets.
2936
e64f7499
YQ
29372013-03-07 Yao Qi <yao@codesourcery.com>
2938
2939 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
2940 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
2941 of -1.
2942 (cmd_qtsp): Adjust condition. Do post increment.
2943 Set cur_action and cur_step_action back to 0.
2944
f0ae6fc3
PA
29452013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
2946
2947 PR server/15236
2948 * linux-low.c (linux_write_memory): Return early success if LEN is
2949 zero.
2950
b5b0b0af
CV
29512013-03-05 Corinna Vinschen <vinschen@redhat.de>
2952
334ad4a8 2953 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 2954
589bc927
TT
29552013-02-28 Tom Tromey <tromey@redhat.com>
2956
2957 * configure.ac: Invoke AC_SYS_LARGEFILE.
2958 * configure, config.in: Rebuild.
2959
dfe07582
CV
29602013-02-28 Corinna Vinschen <vinschen@redhat.com>
2961
2962 * win32-low.c: Throughout, fix format strings and casts of
2963 printf-like functions to avoid type related warnings on all
2964 platforms.
2965 (get_child_debug_event): Print dwDebugEventCode as hex since
2966 that's how it's usually documented.
2967
736cd585
YQ
29682013-02-28 Yao Qi <yao@codesourcery.com>
2969
2970 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
2971 pulongest.
2972
e1f58301
JW
29732013-02-27 Jiong Wang <jiwang@tilera.com>
2974
2975 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
2976 (reg-tilegx32.c): New rule.
2977 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
2978 * linux-tile-low.c (tile_arch_setup): New function. Invoke
2979 different register info initializer according to elf class.
2980 (init_registers_tilgx32): New function. The tilegx32 register info
2981 initializer.
2982 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
2983 (tile_store_gregset): Likewise.
2984
d171ca78
YQ
29852013-02-27 Yao Qi <yao@codesourcery.com>
2986
2987 * server.c (process_point_options): Print debug message when
2988 debug_threads is true.
2989
282bbdf3
YQ
29902013-02-26 Yao Qi <yao@codesourcery.com>
2991
2992 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
2993
aca22551
PA
29942013-02-19 Pedro Alves <palves@redhat.com>
2995 Kai Tietz <ktietz@redhat.com>
2996
2997 PR gdb/15161
2998
2999 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
3000 instead of strtoul to extract address from packet.
3001 (process_serial_event) <'z'>: Likewise.
3002
4f3cee1c
YQ
30032013-02-18 Yao Qi <yao@codesourcery.com>
3004
3005 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3006
8e1d55a3
PA
30072013-02-14 Pedro Alves <palves@redhat.com>
3008
3009 Plug memory leak.
3010
3011 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3012 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3013
458820da
PA
30142013-02-14 Pedro Alves <palves@redhat.com>
3015
3016 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3017
baea0dae
PA
30182013-02-14 Pedro Alves <palves@redhat.com>
3019
3020 * tracepoint.c (save_string): Delete.
3021 (add_tracepoint_action): Use savestring instead of save_string.
3022
0b1afbb3
PA
30232013-02-12 Pedro Alves <palves@redhat.com>
3024
3025 * linux-xtensa-low.c: Ditto.
3026 * xtensa-xtregs.c: Ditto.
3027
8a4ac37e
PA
30282013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3029
3030 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3031 thread_db.
3032
148de6bb
MS
30332013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3034
3035 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3036 aarch64_num_wp_regs and aarch64_num_bp_regs to
3037 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3038
55fac6e0
MS
30392013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3040
3041 * linux-aarch64-low.c (ps_get_thread_area): Replace
3042 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3043
176eb98c
MS
30442013-02-04 Jim MacArthur <jim.macarthur@arm.com>
3045 Marcus Shawcroft <marcus.shawcroft@arm.com>
3046 Nigel Stephens <nigel.stephens@arm.com>
3047 Yufeng Zhang <yufeng.zhang@arm.com>
3048
3049 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3050 (aarch64.c, aarch64-without-fpu.c): New targets.
3051 * configure.srv (aarch64*-*-linux*): New.
3052 * linux-aarch64-low.c: New file.
3053
56f7af9c
MS
30542013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3055
43aaf8b6 3056 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
3057 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3058 (dequeue_one_deferred_signal, linux_resume_one_thread)
3059 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3060 (linux_tracefork_grandchild, linux_test_for_tracefork)
3061 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3062 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3063 where the argument is 0.
3064
60f662b0
YQ
30652013-01-25 Yao Qi <yao@codesourcery.com>
3066
3067 * event-loop.c: Include "queue.h".
3068 (gdb_event_p): New typedef.
3069 (struct gdb_event) <next_event>: Remove.
3070 (event_queue): Change to QUEUE(gdb_event_p).
3071 (async_queue_event): Remove.
3072 (gdb_event_xfree): New.
3073 (initialize_event_loop): New.
3074 (process_event): Use API from QUEUE.
3075 (wait_for_event): Likewise.
3076 * server.c (main): Call initialize_event_loop.
3077 * server.h (initialize_event_loop): Declare.
3078
5ae4861a
YQ
30792013-01-18 Yao Qi <yao@codesourcery.com>
3080
3081 * ax.h (struct eval_agent_expr_context): New.
3082 (gdb_eval_agent_expr): Update declaration.
3083 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
3084 TFRAME. Add new argument CTX.
3085 * server.h (struct eval_agent_expr_context): Declare.
3086 (agent_mem_read, agent_tsv_read): Update declaration.
3087 (agent_mem_read_string): Likewise.
3088 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
3089 (add_traceframe_block): Add new argument TPOINT.
3090 Increase TPOINT->traceframe_usage.
3091 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
3092 eval_tracepoint_agent_expr.
3093 (condition_true_at_tracepoint): Likewise.
3094 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
3095 (agent_mem_read_string, agent_tsv_read): Likewise.
3096
85e00e85
YQ
30972013-01-16 Yao Qi <yao@codesourcery.com>
3098
3099 * linux-low.c (linux_resume_one_lwp): Don't check
3100 'lwp->bp_reinsert != 0'.
3101
4039cf45
JB
31022013-01-07 Joel Brobecker <brobecker@adacore.com>
3103 Pedro Alves <palves@redhat.com>
3104
3105 * lynx-low.c (ptrace_request_to_str): Define a temporary
3106 macro and use it to simplify this function's implementation.
3107
9044dee2
JB
31082013-01-07 Joel Brobecker <brobecker@adacore.com>
3109
3110 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
3111 sets errno.
3112
e6352c8f
JB
31132013-01-07 Joel Brobecker <brobecker@adacore.com>
3114
3115 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
3116
50681a27
JB
31172013-01-07 Joel Brobecker <brobecker@adacore.com>
3118
3119 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
3120
3f6e77ef
JB
31212013-01-07 Joel Brobecker <brobecker@adacore.com>
3122
3123 * lynx-low.c (lynx_resume): Use the resume_info parameter
3124 to determine the ptid for the lynx_ptrace call, unless
3125 it is equal to minus_one_ptid, in which case we use the
3126 ptid of the current_inferior.
3127 (lynx_wait_1): After having received a thread create/exit
3128 event, resume the inferior's execution using the signaling
3129 thread's ptid, rather than the old ptid.
3130
7fda33ae
JB
31312013-01-07 Joel Brobecker <brobecker@adacore.com>
3132
3133 * lynx-low.c (lynx_resume): Delete variable ret.
3134
b9786c74
JB
31352013-01-01 Joel Brobecker <brobecker@adacore.com>
3136
3137 * gdbreplay.c (gdbreplay_version): Update copyright year.
3138 * server.c (gdbserver_version): Likewise.
3139
8b93d60f
JB
31402012-12-17 Joel Brobecker <brobecker@adacore.com>
3141
3142 * lynx-low.c (lynx_wait_1): Add debug trace before adding
3143 new thread.
3144
037335a7
JB
31452012-12-17 Joel Brobecker <brobecker@adacore.com>
3146
3147 * lynx-low.c (ptrace_request_to_str): Add handling for
3148 PTRACE_GETTRACESIG.
3149
52d4cbd8
JB
31502012-12-17 Joel Brobecker <brobecker@adacore.com>
3151
3152 * lynx-low.c (lynx_attach): Delete variable new_process.
3153
ab8f6ca9
JB
31542012-12-17 Joel Brobecker <brobecker@adacore.com>
3155
3156 * lynx-low.c (lynx_create_inferior): Delete variable
3157 new_process.
3158
78cbc024
JB
31592012-12-17 Joel Brobecker <brobecker@adacore.com>
3160
3161 * lynx-low.c (ptrace_request_to_str): Do not handle
3162 PTRACE_GETTHREADLIST if this macro does not exist.
3163
14a00470
YQ
31642012-12-15 Yao Qi <yao@codesourcery.com>
3165
3166 * Makefile.in (OBS): Add notif.o.
3167 * notif.c, notif.h: New.
3168 * server.c: Include "notif.h".
3169 (struct vstop_notif) <next>: Remove.
3170 <base>: New field.
3171 (queue_stop_reply): Update.
3172 (push_event, send_next_stop_reply): Remove.
3173 (discard_queued_stop_replies): Update.
3174 (notif_stop): New variable.
3175 (handle_v_stopped): Remove.
3176 (handle_v_requests): Don't call handle_v_stopped. Call
3177 handle_ack_notif instead.
3178 (queue_stop_reply_callback): Call notif_event_enque instead
3179 of queue_stop_reply.
3180 (handle_status): Don't call send_next_stop_reply, call
3181 notif_write_event instead.
3182 (kill_inferior_callback): Likewise.
3183 (detach_or_kill_inferior_callback): Likewise.
3184 (main): Call initialize_notif.
3185 (process_serial_event): Call QUEUE_is_empty.
3186 (handle_target_event): Call notif_push instead of push event.
3187 * server.h (push_event): Remove declaration.
3188
61c125b9
TT
31892012-12-10 Tom Tromey <tromey@redhat.com>
3190
3191 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
3192 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
3193 macros.
3194 (.c.o): Rewrite.
3195 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
3196 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
3197 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
3198 (amd64-linux-ipa.o, ax.o): Rewrite.
3199 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
3200 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
3201 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
3202 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
3203 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
3204 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
3205 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
3206 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
3207 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
3208 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
3209 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
3210 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
3211 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
3212 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
3213 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
3214 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
3215 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
3216 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
3217 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
3218 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
3219 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
3220 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
3221 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
3222 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
3223 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
3224 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
3225 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
3226 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
3227 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
3228 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
3229 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
3230 (reg-tilegx.o): Remove.
3231 (all_object_files): New macro.
3232 Include .deps files.
3233 * aclocal.m4, configure: Rebuild.
3234 * acinclude.m4: Include depstand.m4, lead-dot.m4.
3235 * configure.ac: Invoke ZW_CREATE_DEPDIR,
3236 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
3237
e90e9ad9
TT
32382012-12-05 Tom Tromey <tromey@redhat.com>
3239
3240 PR gdb/14917:
3241 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
3242
02d403bf 32432012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
3244
3245 * configure.ac: Check for linux/perf_event.h.
3246 * config.in: Regenerated.
3247 * configure: Regenerated.
3248
0270a750
PA
32492012-11-26 Maxime Villard <rustyBSD@gmx.fr>
3250
3251 * hostio.c (handle_readlink): Decrease buffer size
3252 parameter passed to readlink by one byte.
3253
8c29b58e
YQ
32542012-11-26 Yao Qi <yao@codesourcery.com>
3255
3256 * configure.ac (build_warnings): Append '-Wempty-body'.
3257 * configure: Regenerated.
3258 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
3259 body.
3260
8bdce1ff
PM
32612012-11-15 Pierre Muller <muller@sourceware.org>
3262
3263 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
3264 * config.in: Regenerate.
3265 * configure: Regenerate.
3266 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
3267 Use "gdb_wait.h" header instead of <sys/wait.h> header.
3268 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3269 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
3270 header.
3271 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
3272 instead of <sys/wait.h> header.
3273 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3274
02d403bf 32752012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
3276
3277 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
3278 (various make rules): Remove -DGDBSERVER
3279
fbd5db48
YQ
32802012-11-09 Yao Qi <yao@codesourcery.com>
3281
3282 * spu-low.c (current_ptid): Move it to ..
3283 * gdbthread.h: ... here. New.
3284 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
3285 * server.c (myresume, process_serial_event): Likewise.
3286 * thread-db.c (thread_db_find_new_threads): Likewise.
3287 * tracepoint.c (run_inferior_command): Likewise.
3288
b3dc46ff
AB
32892012-10-01 Andrew Burgess <aburgess@broadcom.com>
3290
3291 * server.c (handle_search_memory_1): Include access length in
3292 warning message.
3293
07c04788
HPN
32942012-09-05 Michael Brandt <michael.brandt@axis.com>
3295
3296 * linux-crisv32-low.c: Fix compile errors.
3297
918d227b
YQ
32982012-09-04 Yao Qi <yao@codesourcery.com>
3299
3300 * tracepoint.c (cmd_qtsv): Adjust debug message.
3301 Don't check CUR_TPOINT.
3302
18c1b81a
YQ
33032012-08-28 Yao Qi <yao@codesourcery.com>
3304
3305 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
3306 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
3307 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
3308 Remove declarations of xmalloc, xreallloc, xstrdup and
3309 freeargv.
3310 * Makefile.in (libiberty_h): New.
3311 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
3312 (linux-bfin-low.o): Append dependency 'libiberty.h'.
3313
dc82f37b
YQ
33142012-08-23 Yao Qi <yao@codesourcery.com>
3315
3316 * server.h: Remove declaration of 'xsnprintf'.
3317
406b1477
KS
33182012-08-22 Keith Seitz <keiths@redhat.com>
3319
3320 * server.h: Include build-gnulib-gbserver/config.h.
3321 * gdbreplay.c: Likewise.
3322
e6712ff1
DE
33232012-08-08 Doug Evans <dje@google.com>
3324
3325 * Makefile.in (SFILES): Add gdb_vecs.c.
3326 (OBS): Add gdb_vecs.o.
3327 (gdb_vecs_h, host_defs_h): New variables.
3328 (thread-db.o): Add $(gdb_vecs_h) dependency.
3329 (gdb_vecs.o): New rule.
3330 * thread-db.c: #include "gdb_vecs.h".
3331 (thread_db_load_search): Use a vector to iterate over path elements.
3332 Handle text appearing after "$pdir".
3333
3334 * configure.ac: Add check for strstr.
3335 * config.in: Regenerate.
3336 * configure: Regenerate.
3337
7c3270ae
UW
33382012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
3339
3340 * hostio.c (handle_pread): If pread fails, fall back to attempting
3341 lseek/read.
3342 (handle_pwrite): Likewise for pwrite.
3343
b62e2b27
UW
33442012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
3345
3346 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
3347 between unsupported TYPE and unimplementable ADDR/LEN combination.
3348 (arm_insert_point): Act on new return value.
3349
78a99e91
PA
33502012-07-31 Pedro Alves <palves@redhat.com>
3351
3352 * server.c (process_point_options): Only skip tokens if we find
3353 one that is unrecognized. Don't treat 'X' specially while
3354 skipping unrecognized tokens.
3355
fcf303ab
UW
33562012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
3357
3358 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
3359 to 4-byte-align HW breakpoint addresses for Thumb.
3360
7255706c
YQ
33612012-07-27 Yao Qi <yao@codesourcery.com>
3362
3363 PR remote/14161.
3364
3365 * server.h: Declare gdb_agent_about_to_close.
3366 * target.c (kill_inferior): Include "agent.h".
3367 New. Send command 'kill'.
3368 * target.h (kill_inferior): Removed macro.
3369 * tracepoint.c (gdb_agent_about_to_close): New.
3370 (gdb_agent_helper_thread): Handle command 'close'.
3371 Wait endlessly until the inferior stops.
3372 Install gdb_agent_remove_socket to atexit hook.
3373 (agent_socket_name): New static variable.
3374 (gdb_agent_socket_init): Replace local variable 'name' with
3375 'agent_socket_name'.
3376 (gdb_agent_remove_socket): New.
3377
5a3f286f
YQ
33782012-07-27 Yao Qi <yao@codesourcery.com>
3379
3380 * server.c (process_point_options): Stop at 'X' when parsing.
3381
961bd387
ME
33822012-07-19 Michael Eager <eager@eagercon.com>
3383
a261b8f5 3384 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
3385 to hw_execute.
3386 * linux-x86-low.c (x86_insert_point, x86_remove_point):
3387 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
3388 hardware breakpoint.
3389
aa7c7447
JK
33902012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3391
3392 * gdbserver/linux-low.c (initialize_low): Call
3393 linux_ptrace_init_warnings.
3394
7f216e7c
DE
33952012-07-02 Doug Evans <dje@google.com>
3396
3397 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
3398 pointer to int.
3399
d3ce09f5
SS
34002012-07-02 Stan Shebs <stan@codesourcery.com>
3401
3402 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
3403 (ax.o): Add it to build rule.
3404 (ax-ipa.o): Ditto.
3405 (OBS): Add format.o.
3406 (IPA_OBS): Add format.o.
3407 * server.c (handle_query): Claim support for breakpoint commands.
3408 (process_point_options): Add command case.
3409 (process_serial_event): Leave running if there are printfs in
3410 effect.
3411 * mem-break.h (any_persistent_commands): Declare.
3412 (add_breakpoint_commands): Declare.
3413 (gdb_no_commands_at_breakpoint): Declare.
3414 (run_breakpoint_commands): Declare.
3415 * mem-break.c (struct point_command_list): New struct.
3416 (struct breakpoint): New field command_list.
3417 (any_persistent_commands): New function.
3418 (add_commands_to_breakpoint): New function.
3419 (add_breakpoint_commands): New function.
3420 (gdb_no_commands_at_breakpoint): New function.
3421 (run_breakpoint_commands): New function.
3422 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
3423 locally.
3424 * ax.c: Include format.h.
3425 (ax_printf): New function.
3426 (gdb_eval_agent_expr): Add printf opcode.
3427
2f8f6aed
YQ
34282012-06-13 Yao Qi <yao@codesourcery.com>
3429
3430 * server.c (start_inferior): Remove duplicated writes to fields
3431 'last_resume_kind' and 'last_status' of 'current_inferior'.
3432
0c9070b3
YQ
34332012-06-12 Yao Qi <yao@codesourcery.com>
3434 Pedro Alves <palves@redhat.com>
3435
3436 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
3437 comment.
3438 * server.c (handle_v_cont): Extend comment.
3439
c52daf70
YQ
34402012-06-11 Yao Qi <yao@codesourcery.com>
3441
3442 * linux-low.c (linux_attach): Add 'static'.
3443
d38bbb0a
YQ
34442012-06-06 Yao Qi <yao@codesourcery.com>
3445
3446 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
3447
89dc0afd
JK
34482012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
3449
3450 Fix gcc -flto compilation warning.
3451 * server.c (main): Make variable multi_mode and attach volatile.
3452
75f62ce7
TJB
34532012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3454
3455 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
3456 if the platform doesn't know about it.
3457
65f479b6
PA
34582012-05-30 Jeff Kenton <jkenton@tilera.com>
3459
3460 * Makefile.in (SFILES): Add linux-tile-low.c.
3461 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
3462 * configure.srv: Handle tilegx-*-linux*.
3463 * linux-tile-low.c: New file.
3464
0c5bf5a9
JK
34652012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3466
3467 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
3468
a493e3e2
PA
34692012-05-24 Pedro Alves <palves@redhat.com>
3470
3471 PR gdb/7205
3472
43aaf8b6 3473 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 3474
2ea28649
PA
34752012-05-24 Pedro Alves <palves@redhat.com>
3476
3477 PR gdb/7205
3478
3479 Replace target_signal with gdb_signal throughout.
3480
8d409d16
MR
34812012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
3482
3483 * linux-low.c (linux_store_registers): Avoid the copying sequence
3484 when no data has been retrieved by ptrace.
3485
23512c01
MGD
34862012-05-22 Will Deacon <will.deacon@arm.com>
3487
3488 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
3489 Include asm/ptrace.h.
3490 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
3491 already defined.
3492
4934b29e
MR
34932012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
3494
3495 * linux-low.c (linux_store_registers): Don't re-retrieve data
3496 with ptrace that has already been obtained from /proc. Always
3497 copy any data retrieved with ptrace to the buffer supplied.
3498
bde24c0a
PA
34992012-05-11 Yao Qi <yao@codesourcery.com>
3500 Pedro Alves <palves@redhat.com>
3501
3502 * linux-low.c (enum stopping_threads_kind): New.
3503 (stopping_threads): Change type to `enum stopping_threads_kind'.
3504 (handle_extended_wait): If stopping and suspending threads, leave
3505 the new_lwp suspended too.
3506 (linux_wait_for_event): Adjust.
3507 (stop_all_lwps): Set `stopping_threads' to
3508 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
3509 whether we're suspending threads or just stopping them. Assert no
3510 recursion happens.
3511
623b6bdf
YQ
35122012-04-29 Yao Qi <yao@codesourcery.com>
3513
3514 * server.h: Move some code to ...
3515 * gdbthread.h: ... here. New.
3516 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
3517 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
3518 (nto-low.o, win32-low.o): Likewise.
3519 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
3520 * regcache.c, remote-utils.c, server.c: Likewise.
3521 * target.c, tracepoint.c, win32-low.c: Likewise.
3522
f15f9948
TJB
35232012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3524
3525 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
3526 (PTRACE_ARG4_TYPE): Likewise.
3527 (PTRACE_XFER_TYPE): Likewise.
3528 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
3529 ptrace to PTRACE_ARG3_TYPE.
3530 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
3531 (PTRACE_ARG4_TYPE): Likewise.
3532 (PTRACE_XFER_TYPE): Likewise.
3533 (linux_detach_one_lwp): Cast fourth argument of
3534 ptrace to long then PTRACE_ARG4_TYPE.
3535 (regsets_fetch_inferior_registers): Cast third argument of
3536 ptrace to long then PTRACE_ARG3_TYPE.
3537 (regsets_store_inferior_registers): Likewise.
3538
38ea300a
PA
35392012-04-20 Pedro Alves <palves@redhat.com>
3540
3541 * configure: Regenerate.
3542
c971b7fa
PA
35432012-04-19 Pedro Alves <palves@redhat.com>
3544
43aaf8b6 3545 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 3546 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
3547 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
3548 (all, install-only, uninstall, clean-info, all-lib, clean): No
3549 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
3550 (maintainer-clean realclean distclean): Use subdir_do.
3551 (subdir_do): New.
3552 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 3553 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
3554 * acinclude.m4: Include acx_configure_dir.m4.
3555 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
3556 calls. Call AC_PROG_RANLIB. Configure gnulib using
3557 ACX_CONFIGURE_DIR.
3558 (GNULIB): New.
3559 (GNULIB_STDINT_H): Adjust.
3560 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
3561 * gdbreplay.c: Include build-gnulib/config.h.
3562 * server.h: Likewise.
3563 * aclocal.m4: Regenerate.
3564 * config.in: Regenerate.
3565 * configure: Regenerate.
c971b7fa 3566
809277f8
PA
35672012-04-19 Pedro Alves <palves@redhat.com>
3568
3569 * Makefile.in (LIBGNU, INCGNU): Adjust.
3570 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
3571 (all, install-only, uninstall, clean-info, all-lib, clean)
3572 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
3573 * configure.ac: Adjust AC_OUTPUT output.
3574 * aclocal.m4: Regenerate.
3575 * configure: Regenerate.
3576
fd9bb8b8
PA
35772012-04-19 Pedro Alves <palves@redhat.com>
3578
3579 * Makefile.in (generated_files): New.
3580 (server_h): Remove the explicit dependency on config.h, and depend
3581 on $generated_files.
3582
1c298c66
PA
35832012-04-19 Pedro Alves <palves@redhat.com>
3584
3585 * Makefile.in (INCGNU): Add -Ignulib.
3586
57c4b50b
PA
35872012-04-19 Pedro Alves <palves@redhat.com>
3588
3589 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
3590 (INCGNU): ... this, and spell out -I here.
3591 (GNULIB_LIB): Rename to ...
3592 (LIBGNU): ... this.
3593 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
3594
1030e047
PA
35952012-04-19 Pedro Alves <palves@redhat.com>
3596
3597 * config.in: Regenerate.
3598
447d4319
PA
35992012-04-19 Pedro Alves <palves@redhat.com>
3600
3601 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
3602 * server.h (memmem): Remove declaration.
3603 * config.in: Regenerate.
3604 * configure: Regenerate.
3605
aad9eab9
YQ
36062012-04-19 Yao Qi <yao@codesourcery.com>
3607
3608 * Makefile.in (SFILES): Add common/vec.c.
3609 (OBS): Add vec.o.
3610 (vec.o): New rule.
3611
3e10640f
YQ
36122012-04-19 Yao Qi <yao@codesourcery.com>
3613
3614 * remote-utils.c (prepare_resume_reply): Replace with macro
3615 target_core_of_thread.
3616 * server.c (handle_qxfer_threads_proper): Likewise.
3617 * target.h (traget_core_of_thread): New macro.
3618
71622373
PA
36192012-04-18 Pedro Alves <palves@redhat.com>
3620
3621 * aclocal.m4: Regenerate.
3622 * configure: Regenerate.
3623
80d26939
YQ
36242012-04-16 Yao Qi <yao@codesourcery.com>
3625
3626 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
3627 duplicated on address.
3628
42476b70
YQ
36292012-04-16 Yao Qi <yao@codesourcery.com>
3630
3631 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
3632 (struct tracepoint_action_ops) <send>: New field.
3633 (m_tracepoint_action_send, r_tracepoint_action_send): New.
3634 (agent_expr_send, x_tracepoint_action_send): New.
3635 (l_tracepoint_action_send): New.
3636 (cmd_qtdp): Download and install tracepoint
3637 according to `use_agent'.
3638 (run_inferior_command): Add one more parameter `len'.
3639 Update callers.
3640 (tracepoint_send_agent): New.
3641 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
3642
7bc83639
YQ
36432012-04-16 Yao Qi <yao@codesourcery.com>
3644
3645 * tracepoint.c (download_tracepoints): Moved to ...
3646 (cmd_qtstart): ... here.
3647
5f18041e
YQ
36482012-04-14 Yao Qi <yao@codesourcery.com>
3649
3650 * tracepoint.c: Include inttypes.h.
3651 (struct collect_memory_action): Use sized types.
3652 (struct tracepoint): Likewise.
3653 (cmd_qtdp, stop_tracing): Update print specifiers.
3654 (cmd_qtp, response_tracepoint): Likewise.
3655 (collect_data_at_tracepoint): Likewise.
3656 (collect_data_at_step): Likewise.
3657
55a8c076
YQ
36582012-04-14 Yao Qi <yao@codesourcery.com>
3659
3660 Import gnulib module inttypes.
3661 * aclocal.m4, config.in, configure: Regenerated.
3662
dc750257
YQ
36632012-04-14 Yao Qi <yao@codesourcery.com>
3664
3665 * Makefile.in (maintainer-clean, realclean, distclean): Remove
3666 Makefile and config.status at last.
3667
0ab5faf9
YQ
36682012-04-13 Yao Qi <yao@codesourcery.com>
3669
3670 * tracepoint.c: Include stdint.h unconditionally.
3671
18f5fd81
TJB
36722012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3673
3674 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
3675 on BFD_HAVE_SYS_PROCFS_TYPE.
3676 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
3677 * configure: Regenerate.
3678 * config.in: Likewise.
3679
4d47af5c
L
36802012-04-13 H.J. Lu <hongjiu.lu@intel.com>
3681
3682 * Makefile.in (clean): Also remove x32.c x32-linux.c
3683 x32-avx.c x32-avx-linux.c.
3684 (x32.o): New target.
3685 (x32.c): Likewise.
3686 (x32-linux.o): Likewise.
3687 (x32-linux.c): Likewise.
3688 (x32-avx.o): Likewise.
3689 (x32-avx.c): Likewise.
3690 (x32-avx-linux.o): Likewise.
3691 (x32-avx-linux.c): Likewise.
3692
3693 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
3694 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
3695 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
3696 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
3697 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
3698 i386/x32-avx-linux.xml.
3699
3700 * linux-x86-low.c (init_registers_x32_linux): New prototype.
3701 (init_registers_x32_avx_linux): Likwise.
3702 (x86_linux_update_xmltarget): Call init_registers_x32_linux
3703 or init_registers_x32_avx_linux if linux_is_elf64 is false.
3704
ecedbe58
PA
37052012-04-13 Pedro Alves <palves@redhat.com>
3706
3707 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
3708 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
3709 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
3710 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
3711 the sub-make.
3712
c92b5177
L
37132012-04-12 H.J. Lu <hongjiu.lu@intel.com>
3714
3715 * linux-x86-low.c (compat_x32_clock_t): New.
3716 (compat_x32_siginfo_t): Likewise.
3717 (compat_x32_siginfo_from_siginfo): Likewise.
3718 (siginfo_from_compat_x32_siginfo): Likewise.
3719 (linux_is_elf64): Likewise.
3720 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
3721 and siginfo_from_compat_x32_siginfo for x32.
3722 (x86_arch_setup): Set linux_is_elf64.
3723
214d508e
L
37242012-04-12 H.J. Lu <hongjiu.lu@intel.com>
3725
3726 PR gdb/13969
3727 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
3728 e_machine field.
3729 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
3730 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
3731 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
3732 compatible with process.
3733
c9a1864a
YQ
37342012-04-12 Yao Qi <yao@codesourcery.com>
3735
3736 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
3737 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
3738 (install-only, install-info, clean): Handle sub dir gnulib.
3739 (all-lib, am--refresh): New targets.
3740 (memmem.o): Remove target.
3741 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
3742 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
3743 (AC_REPLACE_FUNCS): Remove memmem.
3744 Invoke gl_INIT and AM_INIT_AUTOMAKE.
3745 (AC_OUTPUT): Generate Makefile in gnulib/.
3746 * aclocal.m4, config.in, configure: Regenerated.
3747
367ba2c2
MR
37482012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
3749
3750 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
3751
9d236627
PA
37522012-04-05 Pedro Alves <palves@redhat.com>
3753
3754 -Werror=strict-aliasing
3755
3756 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
3757 pointer.
3758
111217b3
PA
37592012-04-04 Pedro Alves <palves@redhat.com>
3760
3761 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
3762 (sparc_store_gregset_from_stack, sparc_store_gregset)
3763 (sparc_breakpoint_at): Fix formatting.
3764
8365dcf5
TJB
37652012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3766
3767 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
3768 are available.
3769 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
3770 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
3771 * config.in: Regenerate.
3772 * configure: Likewise.
3773
689cc2ae
PA
37742012-03-29 Pedro Alves <palves@redhat.com>
3775
3776 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
3777 Correct ptrace arguments.
3778
c14dfd32
PA
37792012-03-28 Pedro Alves <palves@redhat.com>
3780
3781 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
3782 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
3783 (IA64_FR1_REGNUM): New defines.
3784 (ia64_fetch_register): New.
3785 (the_low_target): Install it.
3786 * linux-low.h (struct linux_target_ops) <fetch_register>: New
3787 field.
3788 * linux-low.c (linux_fetch_registers): Try the
3789 the_low_target.fetch_register hook first.
3790
3791 * linux-arm-low.c (the_low_target): Adjust.
3792 * linux-bfin-low.c (the_low_target): Adjust.
3793 * linux-cris-low.c (the_low_target): Adjust.
3794 * linux-crisv32-low.c (the_low_target): Adjust.
3795 * linux-m32r-low.c (the_low_target): Adjust.
3796 * linux-m68k-low.c (the_low_target): Adjust.
3797 * linux-mips-low.c (the_low_target): Adjust.
3798 * linux-ppc-low.c (the_low_target): Adjust.
3799 * linux-s390-low.c (the_low_target): Adjust.
3800 * linux-sh-low.c (the_low_target): Adjust.
3801 * linux-sparc-low.c (the_low_target): Adjust.
3802 * linux-tic6x-low.c (the_low_target): Adjust.
3803 * linux-x86-low.c (the_low_target): Adjust.
3804 * linux-xtensa-low.c (the_low_target): Adjust.
3805
63c88e13
PA
38062012-03-26 Pedro Alves <palves@redhat.com>
3807
3808 * server.c (handle_qxfer_libraries): Don't bail early if
3809 the_target->qxfer_libraries_svr4 is not NULL.
3810
fb723180
PA
38112012-03-26 Pedro Alves <palves@redhat.com>
3812
3813 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
3814
0afae3cf
PA
38152012-03-23 Pedro Alves <palves@redhat.com>
3816
3817 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
3818 "library-list-svr4" element's start tag when the the DSO list is
3819 empty.
3820
485f1ee4
PA
38212012-03-23 Pedro Alves <palves@redhat.com>
3822
3823 * linux-low.c (read_one_ptr): Read the inferior's pointer through
3824 a variable whose type size is the same as the inferior's pointer
3825 size.
3826
a5362b9a
TS
38272012-03-21 Thomas Schwinge <thomas@codesourcery.com>
3828
3829 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
3830 struct siginfo.
3831 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
3832 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3833 * linux-low.h: Include <signal.h>.
3834 (struct siginfo): Remove forward declaration.
3835 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
3836 struct siginfo.
3837
d226c142
MF
38382012-03-21 Mike Frysinger <vapier@gentoo.org>
3839
3840 * .gitignore: Ignore more files.
3841
122f36ef
PA
38422012-03-19 Pedro Alves <palves@redhat.com>
3843 Jan Kratochvil <jan.kratochvil@redhat.com>
3844
3845 * server.c (cont_thread, general_thread): Add describing comments.
3846 (start_inferior): Clear `cont_thread'.
3847 (handle_v_cont): Don't set `cont_thread' if resuming all threads
3848 of a process.
3849
fc3e5175
YQ
38502012-03-15 Yao Qi <yao@codesourcery.com>
3851
3852 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
3853 handling to ...
3854 (cmd_qtdp): ... here.
3855
8d0d92cd
YQ
38562012-03-15 Yao Qi <yao@codesourcery.com>
3857
3858 * tracepoint.c (struct tracepoint_action_ops): New.
3859 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
3860 (m_tracepoint_action_download): New.
3861 (r_tracepoint_action_download): New.
3862 (x_tracepoint_action_download): New.
3863 (l_tracepoint_action_download): New.
3864 (add_tracepoint_action): Install `action->ops' according type.
3865 (download_tracepoint_1): Move code `download' function pointer
3866 of various tracepoint_action_ops.
3867
87b0bb13
JK
38682012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
3869
3870 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
3871 linux_ptrace_attach_warnings.
3872
5f572dec
JK
38732012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
3874
3875 * Makefile.in (linux-ptrace.o): New.
3876 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
3877 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
3878 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
3879 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
3880 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
3881 of these targets.
3882 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
3883
f4647387
YQ
38842012-03-08 Yao Qi <yao@codesourcery.com>
3885 Pedro Alves <palves@redhat.com>
3886
3887 Fix PR server/13392.
3888 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
3889 offset of JMP insn.
3890 * tracepoint.c (remove_tracepoint): New.
3891 (cmd_qtdp): Call remove_tracepoint when failed to install.
3892
9b224c5e
PA
38932012-03-07 Pedro Alves <palves@redhat.com>
3894
3895 * linux-low.c (get_detach_signal): New.
3896 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
3897 Pass on pending signals to PTRACE_DETACH. Check the result of the
3898 ptrace call.
3899 * server.c (program_signals, program_signals_p): New.
3900 (handle_general_set): Handle QProgramSignals.
3901 * server.h (program_signals, program_signals_p): Declare.
3902
e237a7e2
JK
39032012-03-05 Pedro Alves <palves@redhat.com>
3904 Jan Kratochvil <jan.kratochvil@redhat.com>
3905
3906 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
3907 New comment why.
3908
5808517f
YQ
39092012-03-03 Yao Qi <yao@codesourcery.com>
3910
3911 * tracepoint.c (tracepoint_look_up_symbols): Update call to
3912 agent_look_up_symbols.
3913
58b4daa5
YQ
39142012-03-03 Yao Qi <yao@codesourcery.com>
3915
3916 * Makefile.in (linux-low.o): Keep dependence on agent.h.
3917 (linux-x86-low.o): Likewise.
3918 * server.h: Remove in_process_agent_loaded.
3919 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
3920 common/agent.c.
3921 Update callers.
3922
8ffcbaaf
YQ
39232012-03-03 Yao Qi <yao@codesourcery.com>
3924
3925 * tracepoint.c (gdb_agent_capability): New global.
3926 (in_process_agent_loaded_ust): Renamed to
3927 `in_process_agent_supports_ust'.
3928 Update callers.
3929 (in_process_agent_supports_ust): Call agent_capability_check.
3930 (clear_installed_tracepoints): Assert that agent supports
3931 agent.
3932
d1feda86
YQ
39332012-03-03 Yao Qi <yao@codesourcery.com>
3934
3935 * linux-low.c (linux_supports_agent): New.
3936 (linux_target_ops): Initialize field `supports_agent' with
3937 linux_supports_agent.
3938 * target.h (struct target_ops) <supports_agent>: New.
3939 (target_supports_agent): New macro.
3940 * server.c (handle_general_set): Handle packet 'QAgent'.
3941 (handle_query): Send `QAgent+'.
3942 * Makefile.in (server.o): Depends on agent.h.
3943
2fa291ac
YQ
39442012-03-03 Yao Qi <yao@codesourcery.com>
3945
3946 * Makefile.in (OBS): Add agent.o.
3947 Add new rule for agent.o.
3948 Track dependence of tracepoint.c on agent.h.
3949 * tracepoint.c (run_inferior_command_1):
3950 (run_inferior_command): Call agent_run_command.
3951 (gdb_ust_connect_sync_socket): Deleted. Move it to
3952 common/agent.c.
3953 (resume_thread, stop_thread): Likewise.
3954 (gdb_ust_socket_init): Renamed to ...
3955 (gdb_agent_socket_init): ... New.
3956 (gdb_ust_thread): Renamed to ...
3957 (gdb_agent_helper_thread): ... New.
3958 (gdb_ust_init): Move some code to ...
3959 (gdb_agent_init): ... here. New.
3960 [HAVE_UST]: Call gdb_ust_init.
3961 (initialize_tracepoint_ftlib): Call gdb_agent_init.
3962 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
3963 * config.in, configure: Regenerated.
3964
05044653
PA
39652012-03-02 Pedro Alves <palves@redhat.com>
3966
3967 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
3968 * linux-low.c (struct simple_pid_list): New.
3969 (stopped_pids): New a struct simple_pid_list pointer.
3970 (add_to_pid_list, pull_pid_from_list): New.
3971 (handle_extended_wait): Don't assume the first signal new children
3972 report is SIGSTOP. Adjust call to pull_pid_from_list.
3973 (linux_wait_for_lwp): Adjust.
3974
8d00225b
YQ
39752012-03-02 Yao Qi <yao@codesourcery.com>
3976
3977 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
3978 debug log.
3979
19560ba5
YQ
39802012-03-02 Yao Qi <yao@codesourcery.com>
3981
3982 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
3983 `stop_pc' and `tpoint'. Update caller.
3984
1faeff08
MR
39852012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
3986
3987 * linux-low.h (linux_target_ops): Add regset_bitmap member.
3988 * linux-low.c (use_linux_regsets): New macro.
3989 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
3990 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
3991 (linux_register_in_regsets): New function.
3992 (usr_fetch_inferior_registers): Skip registers covered by
3993 regsets.
3994 (usr_store_inferior_registers): Likewise.
3995 (usr_fetch_inferior_registers): New macro.
3996 (usr_store_inferior_registers): Likewise.
3997 (linux_fetch_registers): Handle mixed regset/non-regset targets.
3998 (linux_store_registers): Likewise.
3999 * linux-mips-low.c (init_registers_mips_dsp_linux): New
4000 prototype.
4001 (init_registers_mips64_dsp_linux): Likewise.
4002 (init_registers_mips_linux): New macro.
4003 (init_registers_mips_dsp_linux): Likewise.
4004 (mips_dsp_num_regs): Likewise.
4005 (DSP_BASE, DSP_CONTROL): New fallback macros.
4006 (mips_base_regs): New macro.
4007 (mips_regmap): Use it. Fix the size.
4008 (mips_dsp_regmap): New variable.
4009 (mips_dsp_regset_bitmap): Likewise.
4010 (mips_arch_setup): New function.
4011 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4012 than mips_regmap.
4013 (mips_cannot_store_register): Likewise.
4014 (the_low_target): Update .arch_setup, .num_regs and .regmap
4015 initializers. Add .regset_bitmap initializer.
4016 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4017 initializer.
4018 * linux-bfin-low.c (the_low_target): Likewise.
4019 * linux-cris-low.c (the_low_target): Likewise.
4020 * linux-crisv32-low.c (the_low_target): Likewise.
4021 * linux-ia64-low.c (the_low_target): Likewise.
4022 * linux-m32r-low.c (the_low_target): Likewise.
4023 * linux-m68k-low.c (the_low_target): Likewise.
4024 * linux-ppc-low.c (the_low_target): Likewise.
4025 * linux-s390-low.c (the_low_target): Likewise.
4026 * linux-sh-low.c (the_low_target): Likewise.
4027 * linux-sparc-low.c (the_low_target): Likewise.
4028 * linux-tic6x-low.c (the_low_target): Likewise.
4029 * linux-x86-low.c (the_low_target): Likewise.
4030 * linux-xtensa-low.c (the_low_target): Likewise.
4031 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4032 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4033 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4034 srv_xmlfiles.
4035 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4036 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4037
c03e6ccc
YQ
40382012-02-29 Yao Qi <yao@codesourcery.com>
4039 Pedro Alves <palves@redhat.com>
4040
4041 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4042 `step_over_finished' is true.
4043
644cebc9
PA
40442012-02-27 Pedro Alves <palves@redhat.com>
4045
4046 * linux-low.c (pid_is_stopped): Delete, moved to common/.
4047 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4048
c14d7ab2
PA
40492012-02-27 Pedro Alves <palves@redhat.com>
4050
4051 PR server/9684
4052 * linux-low.c (pid_is_stopped): New.
4053 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4054
412c89dd
LM
40552012-02-25 Luis Machado <lgustavo@codesourcery.com>
4056
4057 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4058 of conditions.
4059
b745defe
MR
40602012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4061
4062 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4063
9f3a5c85
LM
40642012-02-24 Luis Machado <lgustavo@codesourcery>
4065
4066 * server.c (handle_query): Advertise support for target-side
4067 breakpoint condition evaluation.
4068 (process_point_options): New function.
4069 (process_serial_event): When inserting a breakpoint, check for
4070 a target-side condition that should be evaluated.
4071
4072 * mem-break.c: Include regcache.h and ax.h.
4073 (point_cond_list_t): New data structure.
4074 (breakpoint) <cond_list>: New field.
4075 (find_gdb_breakpoint_at): Make non-static.
4076 (delete_gdb_breakpoint_at): Clear any target-side
4077 conditions.
4078 (clear_gdb_breakpoint_conditions): New function.
4079 (add_condition_to_breakpoint): Likewise.
4080 (add_breakpoint_condition): Likewise.
4081 (gdb_condition_true_at_breakpoint): Likewise.
4082 (gdb_breakpoint_here): Return result directly instead
4083 of going through a local variable.
4084
4085 * mem-break.h (find_gdb_breakpoint_at): New prototype.
4086 (clear_gdb_breakpoint_conditions): Likewise.
4087 (add_breakpoint_condition): Likewise.
4088 (gdb_condition_true_at_breakpoint): Likewise.
4089
4090 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
4091 (need_step_over_p): Take target-side breakpoint condition into
4092 consideration.
4093
5e1dc496
LM
40942012-02-24 Luis Machado <lgustavo@codesourcery>
4095
4096 * server.h: Include tracepoint.h.
4097 (agent_mem_read, agent_get_trace_state_variable_value,
4098 agent_set_trace_state_variable_value,
4099 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
4100 get_set_tsv_func_addr): New prototypes.
4101
4102 * ax.h: New include file.
4103 * ax.c: New source file.
4104
4105 * tracepoint.c: Include ax.h.
4106 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
4107 agent_expr, eval_result_type): Move to ax.h.
4108 (parse_agent_expr): Rename to ...
4109 (gdb_parse_agent_expr): ... this, make it non-static and move
4110 to ax.h.
4111 (unparse_agent_expr) Rename to ...
4112 (gdb_unparse_agent_expr): ... this, make it non-static and move
4113 to ax.h.
4114 (eval_agent_expr): Rename to ...
4115 (eval_tracepoint_agent_expr): ... this.
4116 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
4117 forward declarations.
4118 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
4119 (agent_get_trace_state_variable_value): New function.
4120 (agent_set_trace_state_variable_value): New function.
4121 (cmd_qtdp): Call gdb_parse_agent_expr (...).
4122 (response_tracepoint): Call gdb_unparse_agent_expr (...).
4123 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
4124 (condition_true_at_tracepoint): Likewise.
4125 (parse_agent_expr): Rename to ...
4126 (gdb_parse_agent_expr): ... this and move to ax.c.
4127 (unparse_agent_expr): Rename to ...
4128 (gdb_unparse_agent_expr): ... this and move to ax.c.
4129 (gdb_agent_op_name): Move to ax.c.
4130 (eval_agent_expr): Rename to ...
4131 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
4132 and move to ax.c.
4133 (eval_tracepoint_agent_expr): New function.
4134 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 4135 non-static.
5e1dc496
LM
4136 (current_insn_ptr, emit_error, struct bytecode_address): Move to
4137 ax.c.
4138 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
4139 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
4140 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
4141 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
4142 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
4143 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
4144 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
4145 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
4146 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
4147 (compile_bytecodes): Remove forward declaration.
4148 (is_goto_target): Move to ax.c.
4149 (compile_bytecodes): Move to ax.c and call
4150 agent_get_trace_state_variable_value (...) and
4151 agent_set_trace_state_variable_value (...).
4152
4153 * Makefile.in: Update ax.c and IPA dependencies.
4154
277e4e52
PA
41552012-02-24 Pedro Alves <palves@redhat.com>
4156
4157 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
4158 (cmd_bigqtbuffer_circular): ... this. Only handle
4159 'QTBuffer:circular:'.
4160 (handle_tracepoint_general_set): Adjust.
4161
bf4c19f7
YQ
41622012-02-16 Yao Qi <yao@codesourcery.com>
4163
4164 * inferiors.c: Move code to ...
4165 * dll.c: .... here. New.
4166 * server.h: Declare clear_dlls.
4167 * Makefile.in (SFILES): Add dll.c.
4168 (OBS): Add dll.o
4169 (dll.o): New rule.
4170
d73f2619
YQ
41712012-02-11 Yao Qi <yao@codesourcery.com>
4172
4173 * server.c: (handle_monitor_command): Add a new parameter
4174 `own_buf'.
4175 (handle_query): Update caller.
4176
f8255c2a
JB
41772012-02-09 Joel Brobecker <brobecker@adacore.com>
4178
4179 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
4180 * configure, config.in: Regenerate.
4181 * hostio.c: Provide an alternate implementation if HAVE_READLINK
4182 is not defined.
4183
da84f473
PA
41842012-02-02 Pedro Alves <palves@redhat.com>
4185
4186 Try SIGKILL first, then PTRACE_KILL.
4187 * linux-low.c (linux_kill_one_lwp): New.
4188 (linux_kill_one_lwp): Rename to ...
4189 (kill_one_lwp_callback): ... this. Use the new
4190 linux_kill_one_lwp.
4191
e886a173
PA
41922012-02-02 Pedro Alves <palves@redhat.com>
4193
4194 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
4195 inferior.
4196
be07f1a2
PA
41972012-01-27 Pedro Alves <palves@redhat.com>
4198
4199 * linux-low.c (linux_child_pid_to_exec_file): Delete.
4200 (elf_64_file_p): Make static.
4201 (linux_pid_exe_is_elf_64_file): New.
4202 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
4203 Delete declarations.
4204 (linux_pid_exe_is_elf_64_file): Declare.
4205 * linux-x86-low.c (x86_arch_setup): Use
4206 linux_pid_exe_is_elf_64_file.
4207
d8301ad1
JK
42082012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4209
4210 * linux-low.c (linux_wait_for_event_1): Rename to ...
4211 (linux_wait_for_event): ... here and merge it with former
4212 linux_wait_for_event - new variable wait_ptid, use it.
4213 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
4214
01b17894
PA
42152012-01-23 Pedro Alves <palves@redhat.com>
4216
4217 * server.c (main): Avoid yet another case of infinite loop while
4218 detaching/killing after a longjmp.
4219
e825046f
JK
42202012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4221
4222 Code cleanup.
4223 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
4224
b9e7b9c3
UW
42252012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
4226
4227 * hostio.c (handle_readlink): New function.
4228 (handle_vFile): Call it to handle "vFile:readlink" packets.
4229
901f9912
UW
42302012-01-20 Pedro Alves <palves@redhat.com>
4231 Ulrich Weigand <ulrich.weigand@linaro.org>
4232
4233 * server.c (handle_v_requests): Only support vAttach and vRun to
4234 start multiple processes when in extended protocol mode.
4235
fc1ab1a0
PA
42362012-01-17 Pedro Alves <palves@redhat.com>
4237
4238 * tracepoint.c (initialize_tracepoint): Use mmap instead of
4239 memalign plus mprotect to allocate the scratch buffer.
4240
7d5d4e98
PA
42412012-01-13 Pedro Alves <palves@redhat.com>
4242
4243 * server.c (attach_inferior): Clear `cont_thread'.
4244
f128d5e9
PA
42452012-01-13 Pedro Alves <palves@redhat.com>
4246
4247 * server.c (main): Avoid infinite loop while detaching/killing
4248 after a longjmp.
4249
06db92f0
DE
42502012-01-09 Doug Evans <dje@google.com>
4251
4252 * server.c (start_inferior): Set last_ptid in --wrapper case.
4253
32d92999
YQ
42542012-01-06 Yao Qi <yao@codesourcery.com>
4255
4256 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
4257 defined.
4258 [IN_PROCESS_AGENT] (debug_agent): New global variable.
4259
5e0a92a9
YQ
42602012-01-04 Yao Qi <yao@codesourcery.com>
4261
4262 * tracepoint.c (cmd_qtdp): Print debug message
4263 for static tracepoint.
4264
ae639e8c
YQ
42652012-01-04 Yao Qi <yao@codesourcery.com>
4266
4267 * tracepoint.c (trace_vdebug): Differentiate debug message
4268 between gdbserver and IPA.
4269
f72429c5
YQ
42702012-01-03 Yao Qi <yao@codesourcery.com>
4271
4272 * tracepoint.c (tracepoint_was_hit): Don't collect for
4273 static tracepoint.
4274
12c3e59c
JB
42752012-01-02 Joel Brobecker <brobecker@adacore.com>
4276
4277 * terminal.h: Reformat copyright header.
4278
67827812
JB
42792012-01-02 Joel Brobecker <brobecker@adacore.com>
4280
4281 * server.c (gdbserver_version): Update copyright year.
4282 * gdbreplay.c (gdbreplay_version): Likewise.
4283
3e52c33d
JK
42842011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
4285
4286 * linux-low.c (linux_create_inferior): Put empty if clause for write.
4287
4288 Revert:
4289 2011-12-18 Hui Zhu <teawater@gmail.com>
4290 * linux-low.c (linux_create_inferior): Save return value to ret.
4291
66f1260e
HZ
42922011-12-18 Hui Zhu <teawater@gmail.com>
4293
4294 * linux-low.c (linux_create_inferior): Save return value to ret.
4295
e77616d7
DE
42962011-12-16 Doug Evans <dje@google.com>
4297
e7b06c57
DE
4298 * linux-low.c (linux_create_inferior): If stdio connection,
4299 redirect stdin from /dev/null, stdout to stderr.
4300 * remote-utils.c (remote_is_stdio): New static global.
4301 (remote_connection_is_stdio): New function.
4302 (remote_prepare): Handle stdio connection.
4303 (remote_open): Ditto.
4304 (remote_close): Don't close stdin for stdio connections.
4305 (read_prim,write_prim): New functions. Replace all calls to
4306 read/write to these.
4307 * server.c (main): Watch for "-" argument. Move call to
4308 remote_prepare before start_inferior.
4309 * server.h (STDIO_CONNECTION_NAME): New macro.
4310 (remote_connection_is_stdio): Declare.
4311
e77616d7
DE
4312 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
4313 in debugging output.
4314
82067193
YQ
43152011-12-15 Yao Qi <yao@codesourcery.com>
4316
4317 * tracepoint.c: Include sys/syscall.h.
4318 (gdb_ust_thread): Remove preprocessor conditional.
4319
82bfbe7e
PA
43202011-12-14 Pedro Alves <pedro@codesourcery.com>
4321
4322 * linux-low.c (linux_detach_one_lwp): Call
4323 the_low_target.prepare_to_resume before detaching.
4324
712c6575
YQ
43252011-12-14 Yao Qi <yao@codesourcery.com>
4326
4327 * tracepoint.c (gdb_ust_thread): Don't ignore return value
4328 of write.
4329
d54d1edf
YQ
43302011-12-14 Yao Qi <yao@codesourcery.com>
4331
4332 * i386-low.c (i386_low_stopped_data_address): Initialize local
4333 variable `control'.
4334
6210a125
PA
43352011-12-13 Pedro Alves <pedro@codesourcery.com>
4336
4337 PR remote/13492
4338
4339 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
4340 DR_CONTROL unless necessary. Extend comments.
4341 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
4342 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
4343
2ece8244
YQ
43442011-12-13 Yao Qi <yao@codesourcery.com>
4345
4346 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
4347 macros.
4348 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
4349
784867a5
JK
43502011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
4351
4352 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
4353 Print new debug message for such case.
4354
6bf36717
JK
43552011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4356
4357 Fix overlapping memcpy.
4358 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
4359 the read_inferior_memory transfer.
4360 (delete_fast_tracepoint_jump): New variable buf. Use it for the
4361 write_inferior_memory transfer.
4362 (set_fast_tracepoint_jump): New variable buf. Use it for the
4363 read_inferior_memory and write_inferior_memory transfers.
4364 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
4365 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
4366 Use it for the write_inferior_memory transfer.
4367 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
4368 buffers.
4369
50275556
MR
43702011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4371
4372 * linux-low.c (fetch_register, store_register): Make code
4373 consistent, fix formatting.
4374
7325beb4
MR
43752011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4376
4377 * linux-low.c (usr_store_inferior_registers): Factor out code
4378 to handle individual registers into...
4379 (store_register): ... this new function.
4380
c642a434
UW
43812011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
4382
4383 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
4384 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
4385 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
4386 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
4387 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
4388 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
4389 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
4390 (srv_xmlfiles): Add new XML files.
4391
4392 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
4393 and <sys/uio.h>.
4394 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
4395 (init_registers_s390_linux32v1): Add prototype.
4396 (init_registers_s390_linux32v2): Likewise.
4397 (init_registers_s390_linux64v1): Likewise.
4398 (init_registers_s390_linux64v2): Likewise.
4399 (init_registers_s390x_linux64v1): Likewise.
4400 (init_registers_s390x_linux64v2): Likewise.
4401 (s390_num_regs): Increment to 52.
4402 (s390_regmap): Add orig_r2 register.
4403 (s390_num_regs_3264): Increment to 68.
4404 (s390_regmap_3264): Add orig_r2 register.
4405 (s390_collect_ptrace_register): Handle orig_r2 register.
4406 (s390_supply_ptrace_register): Likewise.
4407 (s390_fill_last_break): New function.
4408 (s390_store_last_break): Likewise.
4409 (s390_fill_system_call): New function.
4410 (s390_store_system_call): Likewise.
4411 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
4412 register sets.
4413 (s390_check_regset): New function.
4414 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
4415 NT_S390_SYSTEM_CALL regsets and use appropriate description.
4416 Update target_regsets for available register sets.
4417
2268b414
JK
44182011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
4419 Jan Kratochvil <jan.kratochvil@redhat.com>
4420
4421 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
4422 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
4423 New.
4424 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
4425 * linux-low.h (struct process_info_private): New member r_debug.
4426 * server.c (handle_qxfer_libraries): Call
4427 the_target->qxfer_libraries_svr4.
4428 (handle_qxfer_libraries_svr4): New function.
4429 (qxfer_packets): New entry "libraries-svr4".
4430 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
4431 * target.h (struct target_ops): New member qxfer_libraries_svr4.
4432 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
4433 PACKET_qXfer_libraries_svr4.
4434
d6db1fab
UW
44352011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
4436
4437 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
4438 PSW address/mask between 8-byte and 16-byte formats.
4439 (s390_supply_ptrace_register): Likewise.
4440 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
4441 basic addressing mode bit.
4442
242f5f1c
SS
44432011-11-24 Stan Shebs <stan@codesourcery.com>
4444
4445 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
4446
f196051f
SS
44472011-11-17 Stan Shebs <stan@codesourcery.com>
4448
4449 * tracepoint.c (struct tracepoint): New field traceframe_usage.
4450 (tracing_start_time): New global.
4451 (tracing_stop_time): New global.
4452 (tracing_user_name): New global.
4453 (tracing_notes): New global.
4454 (tracing_stop_note): New global.
4455 (cmd_qtstart): Set traceframe_usage, start_time.
4456 (stop_tracing): Set stop_time.
4457 (cmd_qtstatus): Report additional status.
4458 (cmd_qtp): New function.
4459 (handle_tracepoint_query): Call it.
4460 (cmd_qtnotes): New function.
4461 (handle_tracepoint_general_set): Call it.
4462 (get_timestamp): Rename from tsv_get_timestamp.
4463
405f8e94
SS
44642011-11-14 Stan Shebs <stan@codesourcery.com>
4465 Kwok Cheung Yeung <kcy@codesourcery.com>
4466
4467 * linux-x86-low.c (small_jump_insn): New.
4468 (i386_install_fast_tracepoint_jump_pad): Add arguments for
4469 trampoline and error message, build a trampoline and issue a small
4470 jump instruction to it.
4471 (x86_install_fast_tracepoint_jump_pad): Add arguments for
4472 trampoline and error message.
4473 (x86_get_min_fast_tracepoint_insn_len): New.
4474 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
4475 * linux-low.h (struct linux_target_ops): Add arguments to
4476 install_fast_tracepoint_jump_pad operation, add new operation.
4477 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
4478 arguments.
4479 (linux_get_min_fast_tracepoint_insn_len): New function.
4480 (linux_target_op): Add new operation.
4481 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
4482 (gdb_trampoline_buffer_end): Ditto.
4483 (gdb_trampoline_buffer_error): Ditto.
4484 (struct ipa_sym_addresses): Add fields for new IPA variables.
4485 (symbol_list): Add entries for new IPA variables.
4486 (struct tracepoint): Add fields to hold the address range of the
4487 trampoline used by the tracepoint.
4488 (trampoline_buffer_head): New static variable.
4489 (trampoline_buffer_tail): Ditto.
4490 (claim_trampoline_space): New function.
4491 (have_fast_tracepoint_trampoline_buffer): New function.
4492 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
4493 structure.
4494 (install_fast_tracepoint): Ditto, also add error buffer argument.
4495 (cmd_qtminftpilen): New function.
4496 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
4497 (fast_tracepoint_from_trampoline_address): New function.
4498 (fast_tracepoint_collecting): Handle trampoline as part of jump
4499 pad space.
4500 (set_trampoline_buffer_space): New function.
4501 (initialize_tracepoint): Initialize new IPA variables.
4502 * target.h (struct target_ops): Add arguments to
4503 install_fast_tracepoint_jump_pad operation, add new
4504 get_min_fast_tracepoint_insn_len operation.
4505 (target_get_min_fast_tracepoint_insn_len): New.
4506 (install_fast_tracepoint_jump_pad): Add arguments.
4507 * server.h (IPA_BUFSIZ): Define.
4508 * linux-i386-ipa.c: Include extra header files.
4509 (initialize_fast_tracepoint_trampoline_buffer): New function.
4510 (initialize_low_tracepoint): Call it.
4511 * server.h (set_trampoline_buffer_space): Declare.
4512 (claim_trampoline_space): Ditto.
4513 (have_fast_tracepoint_trampoline_buffer): Ditto.
4514
1e4d1764
YQ
45152011-11-14 Yao Qi <yao@codesourcery.com>
4516
4517 * server.c (handle_query): Handle InstallInTrace for qSupported.
4518 * tracepoint.c (add_tracepoint): Sort list.
4519 (install_tracepoint, download_tracepoint): New.
4520 (cmd_qtdp): Call them to install and download tracepoints.
4521 (sort_tracepoints): Removed.
4522 (cmd_qtstart): Update.
4523
5c73ff4e
YQ
45242011-11-14 Yao Qi <yao@codesourcery.com>
4525
4526 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
4527 * mem-break.h: Declare.
4528 * tracepoint.c (cmd_qtstart): Move some code to ...
4529 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
4530 New.
4531 (download_tracepoints): Move some code to ...
4532 (download_tracepoint_1): ... here. New.
4533
86a30030
YQ
45342011-11-08 Yao Qi <yao@codesourcery.com>
4535
4536 * remote-utils.c (relocate_instruction): A comment fix.
4537
8d26e50c
JB
45382011-11-07 Joel Brobecker <brobecker@adacore.com>
4539
4540 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
4541 (i386_dr_low_get_control, i386_dr_low_get_status): Use
4542 dr_status_mirror and dr_control_mirror from debug_reg_state.
4543 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
4544 (i386_initial_stuff): Remove use of deleted globals.
4545 (i386_get_thread_context, i386_set_thread_context,
4546 i386_thread_added): Use dr_status_mirror and dr_control_mirror
4547 from debug_reg_state.
4548
a59306a3
YQ
45492011-11-05 Yao Qi <yao@codesourcery.com>
4550
4551 * tracepoint.c (gdb_collect): Loop over tracepoints of same
4552 address as TPOINT's.
4553
3065dfb6
SS
45542011-11-02 Stan Shebs <stan@codesourcery.com>
4555
4556 * tracepoint.c (agent_mem_read_string): New function.
4557 (eval_agent_expr): Call it for tracenz.
4558 * server.c (handle_query): Report support for tracenz.
4559
fd0d8c7c
YQ
45602011-11-02 Yao Qi <yao@codesourcery.com>
4561
4562 * tracepoint.c (cmd_qtstart): Remove unused local variables.
4563
609086b1
YQ
45642011-11-02 Yao Qi <yao@codesourcery.com>
4565
4566 * target.h: Fix a typo in comment.
4567
b9fd1791
PA
45682011-10-31 Pedro Alves <pedro@codesourcery.com>
4569
4570 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
4571 clobber the breakpoints' shadows with fast tracepoint jumps.
4572 * mem-break.h (check_mem_write): Add `myaddr' parameter.
4573 * target.c (write_inferior_memory): Also pass MYADDR down to
4574 check_mem_write.
4575
03583c20
UW
45762011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
4577
4578 * configure.ac: Check support for personality routine.
4579 * configure: Regenerate.
4580 * config.in: Likewise.
4581 * linux-low.c: Include <sys/personality.h>.
4582 Define ADDR_NO_RANDOMIZE if necessary.
4583 (linux_create_inferior): Disable address space randomization when
4584 forking inferior, if requested.
4585 (linux_supports_disable_randomization): New function.
4586 (linux_target_ops): Install it.
4587 * server.h (disable_randomization): Declare.
4588 * server.c (disable_randomization): New global variable.
4589 (handle_general_set): Handle QDisableRandomization.
4590 (handle_query): Likewise for qSupported.
4591 (main): Support --disable-randomization and --no-disable-randomization
4592 command line arguments.
4593 * target.h (struct target_ops): Add supports_disable_randomization.
4594 (target_supports_disable_randomization): New macro.
4595
723b724b
MF
45962011-09-29 Mike Frysinger <vapier@gentoo.org>
4597
4598 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
4599 ifdef check.
4600 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
4601 [!PT_GETDSBT] (target_loadmap): New definition.
4602 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
4603 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
4604 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
4605 and PT_GETDSBT to LINUX_LOADMAP.
4606 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
4607 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
4608
55329a5c 46092011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
4610
4611 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
4612 (arm_linux_hwbp_cap): New static variable.
4613 (arm_linux_get_hwbp_cap): Replace by ...
4614 (arm_linux_init_hwbp_cap): ... this new function.
4615 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
4616 (arm_linux_get_hw_watchpoint_count): Likewise.
4617 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4618 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
4619 (arm_prepare_to_resume): Use perror_with_name instead of error.
4620
55329a5c 46212011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
4622
4623 * linux-arm-low.c: Include <signal.h>.
4624 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
4625 (struct arm_linux_hwbp_cap): New data type.
4626 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
4627 (struct arm_linux_hw_breakpoint): New data type.
4628 (MAX_BPTS, MAX_WPTS): Define.
4629 (struct arch_process_info, struct arch_lwp_info): New data types.
4630 (arm_linux_get_hwbp_cap): New function.
4631 (arm_linux_get_hw_breakpoint_count): Likewise.
4632 (arm_linux_get_hw_watchpoint_count): Likewise.
4633 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4634 (arm_hwbp_control_initialize): Likewise.
4635 (arm_hwbp_control_is_enabled): Likewise.
4636 (arm_hwbp_control_is_initialized): Likewise.
4637 (arm_hwbp_control_disable): Likewise.
4638 (arm_linux_hw_breakpoint_equal): Likewise.
4639 (arm_linux_hw_point_initialize): Likewise.
4640 (struct update_registers_data): New data structure.
4641 (update_registers_callback: New function.
4642 (arm_insert_point): Likewise.
4643 (arm_remove_point): Likewise.
4644 (arm_stopped_by_watchpoint): Likewise.
4645 (arm_stopped_data_address): Likewise.
4646 (arm_new_process): Likewise.
4647 (arm_new_thread): Likewise.
4648 (arm_prepare_to_resume): Likewise.
4649 (the_low_target): Register arm_insert_point, arm_remove_point,
4650 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
4651 arm_new_thread, and arm_prepare_to_resume.
4652
6b9801d4
SS
46532011-09-15 Stan Shebs <stan@codesourcery.com>
4654
4655 * server.h (struct emit_ops): Add compare-goto fields.
4656 * tracepoint.c (gdb_agent_op_sizes): New table.
4657 (emit_eq_goto): New function.
4658 (emit_ne_goto): New function.
4659 (emit_lt_goto): New function.
4660 (emit_le_goto): New function.
4661 (emit_gt_goto): New function.
4662 (emit_ge_goto): New function.
4663 (is_goto_target): New function.
4664 (compile_bytecodes): Recognize special cases of compare-goto
4665 combinations and call specialized emitters for them.
4666 * linux-x86-low.c (amd64_emit_eq_goto): New function.
4667 (amd64_emit_ne_goto): New function.
4668 (amd64_emit_lt_goto): New function.
4669 (amd64_emit_le_goto): New function.
4670 (amd64_emit_gt_goto): New function.
4671 (amd64_emit_ge_goto): New function.
4672 (amd64_emit_ops): Add the new functions.
4673 (i386_emit_eq_goto): New function.
4674 (i386_emit_ne_goto): New function.
4675 (i386_emit_lt_goto): New function.
4676 (i386_emit_le_goto): New function.
4677 (i386_emit_gt_goto): New function.
4678 (i386_emit_ge_goto): New function.
4679 (i386_emit_ops): Add the new functions.
4680
bf15cbda
SS
46812011-09-08 Stan Shebs <stan@codesourcery.com>
4682
4683 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
4684 (i386_emit_epilogue): Restore %ebx.
4685
943ca1dd
JZ
46862011-08-31 Jie Zhang <jzhang918@gmail.com>
4687
4688 * server.c (step_thread): Remove definition.
4689 (process_serial_event): Don't handle Hs.
4690 * server.h (step_thread): Remove declaration.
4691 * target.c (set_desired_inferior): Remove use of step_thread.
4692
e3deef73
LM
46932011-08-24 Luis Machado <lgustavo@codesourcery.com>
4694
4695 * linux-low.c: Include linux-procfs.h.
4696 (linux_attach_lwp_1): Update comments.
4697 (linux_attach): Scan for existing threads when attaching to a
4698 process that is the tgid.
4699 * Makefile.in: Update dependencies.
4700
13da1c97
LM
47012011-08-24 Luis Machado <lgustavo@codesourcery.com>
4702
4703 * configure.srv: Add linux-procfs.o dependencies.
4704
881127c9
YQ
47052011-08-14 Yao Qi <yao@codesourcery.com>
4706
4707 * target.h (struct target_ops): Fix indent.
4708 * win32-low.c (win32_target_ops): Fix comment.
4709
58dbd541
YQ
47102011-08-14 Andrew Jenner <andrew@codesourcery.com>
4711 Yao Qi <yao@codesourcery.com>
4712
4713 * Makefile.in (clean): Remove tic6x-*.c files.
4714 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
4715 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
4716 (tic6x-c64xp-linux.c): Likewise.
4717 * configure.srv: Add support for tic6x-*-uclinux.
4718 * linux-tic6x-low.c: New.
4719 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
4720
78d85199
YQ
47212011-08-14 Andrew Stubbs <ams@codesourcery.com>
4722 Yao Qi <yao@codesourcery.com>
4723
4724 * target.h (struct target_ops): Add read_loadmap.
4725 * linux-low.c (struct target_loadseg): New type.
4726 (struct target_loadmap): New type.
4727 (linux_read_loadmap): New function.
4728 (linux_target_ops): Add linux_read_loadmap.
4729 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
4730 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
4731 to NULL.
78d85199 4732
a959a88d
EZ
47332011-08-05 Eli Zaretskii <eliz@gnu.org>
4734
4735 * win32-low.c: Include <stdint.h>.
4736
1ced966e
PA
47372011-07-22 Pedro Alves <pedro@codesourcery.com>
4738
4739 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
4740 to the inferior here.
4741 (i386_remove_aligned_watchpoint): Ditto.
4742 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
4743 fit part of the watchpoint in the debug registers.
4744 (i386_update_inferior_debug_regs): New.
4745 (i386_low_insert_watchpoint): Work on a local mirror of the debug
4746 registers, and only update the inferior on success.
4747 (i386_low_remove_watchpoint): Ditto.
4748
d26e3629
KY
47492011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
4750
4751 * linux-low.c (compare_ints, unique, list_threads, show_process,
4752 linux_core_of_thread): Delete.
4753 (linux_target_ops): Change linux_core_of_thread to
4754 linux_common_core_of_thread.
4755 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
4756 * utils.c (malloc_failure): Change type of argument.
4757 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
4758 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
4759 common/linux-osdata.c, common/ptid.c and common/buffer.c.
4760 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
4761 (IPA_OBJS): Add common-utils-ipa.o.
4762 (ptid_h, linux_osdata_h): New macros.
4763 (server_h): Add common/common-utils.h, common/xml-utils.h,
4764 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
4765 common/ptid.h.
4766 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
4767 ptid.o, buffer.o): New rules.
4768 (linux-low.o): Add common/linux-osdata.h as a dependency.
4769 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
4770 * configure.ac: Add AC_HEADER_DIRENT check.
4771 * config.in: Regenerate.
4772 * configure: Regenerate.
4773 * remote-utils.c (xml_escape_text): Delete.
4774 (buffer_grow, buffer_free, buffer_init, buffer_finish,
4775 buffer_xml_printf): Move to common/buffer.c.
4776 * server.c (main): Remove call to initialize_inferiors.
4777 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
4778 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
4779 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
4780 internal_error, gdb_assert, gdb_assert_fail): Delete.
4781 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
4782 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
4783 common/buffer.h.
4784 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
4785 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
4786 initialize_inferiors): Delete.
4787
2275a1a7
PA
47882011-07-20 Pedro Alves <pedro@codesourcery.com>
4789
4790 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
4791 symbol error.
4792
0a5b1e09
PA
47932011-05-31 Pedro Alves <pedro@codesourcery.com>
4794
4795 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
4796 assertion.
4797 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
4798
6938fd34
YQ
47992011-05-26 Yao Qi <yao@codesourcery.com>
4800
4801 * Makefile.in (thread-db.o): Track dependence to
4802 common/gdb_thread_db.h.
4803 * thread-db.c: include gdb_thread_db.h from right place.
4804
b481f9e0
TT
48052011-05-16 Adrian Cornish <gnu@bluedreamer.com>
4806
4807 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
4808 __FILE__ and __LINE__ to internal_error.
4809
98a5dd13
DE
48102011-05-13 Doug Evans <dje@google.com>
4811
4812 * thread-db.c (try_thread_db_load_from_sdir): New function.
4813 (try_thread_db_load_from_dir): New function.
4814 (thread_db_load_search): Handle $sdir, ignore $pdir.
4815 Remove trying of system directories if search of
4816 libthread-db-search-path fails, that is now done via $sdir.
4817
d248b706
KY
48182011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
4819
4820 * server.c (handle_query): Add EnableDisableTracepoints to the list
4821 of supported features.
43aaf8b6 4822 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 4823 tracepoints.
43aaf8b6
PA
4824 (cmd_qtenable_disable): New.
4825 (cmd_qtstart): Install tracepoints even if disabled.
4826 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
4827 receiving a QTEnable or QTDisable packet.
4828 (gdb_collect): Skip data collection if fast tracepoint is disabled.
4829 (ust_marker_to_static_tracepoint): Do not ignore disabled static
4830 tracepoints.
4831 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 4832
84e578fb
DE
48332011-05-10 Doug Evans <dje@google.com>
4834
4835 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
4836
71f55dd8
DE
48372011-05-04 Doug Evans <dje@google.com>
4838
4839 * linux-low.c (linux_join): Skip process lookup.
4840 * spu-low.c (spu_join): Ditto.
4841 * server.c (join_inferiors_callback): Delete.
4842 (process_serial_event): For 'D' packet (detach) call join_inferior
4843 directly.
4844
4d393d60
JM
48452011-05-04 Joseph Myers <joseph@codesourcery.com>
4846
4847 * README: Don't mention xscale*-*-linux*.
4848 * configure.srv (xscale*-*-linux*): Don't handle target.
4849
b00ad6ff
NF
48502011-04-27 Nathan Froyd <froydnj@codesourcery.com>
4851
4852 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
4853 casting pointers.
4854 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
4855 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
4856 (i386_emit_void_call_2): Likewise.
4857
af96c192
YQ
48582011-04-26 Yao Qi <yao@codesourcery.com>
4859
43aaf8b6
PA
4860 * linux-low.c: Move common macros to linux-ptrace.h.
4861 Include linux-ptrace.h.
af96c192
YQ
4862 * Makefile.in (linux_ptrace_h): New.
4863 (linux-low.o): Depends on linux-ptrace.h.
4864
03f2bd59
JK
48652011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
4866
4867 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
4868 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
4869 (remote_prepare): New function with most of the TCP code from ...
4870 (remote_open): ... here. Detect PORT here unconditionally. Move also
4871 setting transport_is_reliable.
4872 * server.c (run_once): New variable.
4873 (gdbserver_usage): Document it.
4874 (main): Set run_once for `--once'. Call remote_prepare. Exit after
4875 the first run if RUN_ONCE.
4876 * server.h (run_once, remote_prepare): New declarations.
4877
7a9dd1b2
TT
48782011-04-19 Tom Tromey <tromey@redhat.com>
4879
4880 * win32-low.c (handle_load_dll): Remove duplicate "the".
4881
81239425
PM
48822011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
4883
4884 Remove support for old Cygwin 1.5 versions.
4885 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
4886 function to avoid warning.
4887 (win32_add_one_solib): Use cygwin_conv_path function to avoid
4888 warning.
4889
9e0627f1
PM
48902011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
4891
4892 * gdbserver/server.h (Macro _): Define it if not available.
4893
588eebee
MS
48942011-03-14 Michael Snyder <msnyder@vmware.com>
4895
348af9f7 4896 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 4897
43f70d4c
JB
48982011-03-10 Joel Brobecker <brobecker@adacore.com>
4899
4900 * Makefile.in (maintainer-clean realclean distclean): Remove
4901 "make ... subdir_do" command.
4902
348af9f7
MS
49032011-03-10 Michael Snyder <msnyder@vmware.com>
4904
4905 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
4906
4907 * server.c (handle_v_run): Free alloced buffer on early return.
4908
e637a4f5
YQ
49092011-03-09 Yao Qi <yao@codesourcery.com>
4910
4911 Revert:
4912 2011-03-04 Yao Qi <yao@codesourcery.com>
4913
4914 * Makefile.in: Remove GNU make feature --directory.
4915
4916 2011-03-05 Yao Qi <yao@codesourcery.com>
4917
4918 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
4919 (subdir_do): New make target. Copied from gdb/Makefile.
4920 (maintainer-clean, realclean, distclean, clean): Call corresponding
4921 make targets in common/Makefile.
4922
4923 2011-02-11 Yao Qi <yao@codesourcery.com>
4924
4925 * configure.ac: Call AC_PROG_RANLIB.
4926 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
4927 * configure: Regenerate.
4928
e6edda56
JK
49292011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4930
4931 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
4932
e5141119
JB
49332011-03-06 Yao Qi <yao@codesourcery.com>
4934
4935 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
4936
64794aa4
JB
49372011-03-05 Yao Qi <yao@codesourcery.com>
4938
4939 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
4940 (subdir_do): New make target. Copied from gdb/Makefile.
4941 (maintainer-clean, realclean, distclean, clean): Call corresponding
4942 make targets in common/Makefile.
4943
7a762829
YQ
49442011-03-04 Yao Qi <yao@codesourcery.com>
4945
4946 * Makefile.in: Remove GNU make feature --directory.
4947
348af9f7
MS
49482011-03-04 Michael Snyder <msnyder@vmware.com>
4949
4950 * server.c (queue_stop_reply): Call xmalloc not malloc.
4951
49522011-03-02 Michael Snyder <msnyder@vmware.com>
4953
4954 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
4955
9f72fee2
MS
49562011-02-28 Michael Snyder <msnyder@vmware.com>
4957
588eebee
MS
4958 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
4959 (cmd_qtframe): Ditto.
4960 (cmd_qtbuffer): Ditto.
4961 (cmd_bigqtbuffer): Ditto.
4962
9f72fee2
MS
4963 * utils.c (decimal2str): Initialize 'width' to nine, then
4964 don't mess with it.
4965
8040bd49
UW
49662011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
4967
4968 * hostio.c (require_data): Free *data, not data.
4969
7e52cbd0
JK
49702011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4971
4972 * hostio.c (require_data): Use free, not xfree.
4973
9130f83e
MS
49742011-02-27 Michael Snyder <msnyder@vmware.com>
4975
4b812f4e
MS
4976 * server.c (handle_query): Discard unused value.
4977
9130f83e
MS
4978 * hostio.c (require_data): Free malloc memory before returning
4979 error.
4980
69d37113
MS
49812011-02-26 Michael Snyder <msnyder@vmware.com>
4982
4983 * linux-low.c (list_threads): Call closedir for dirent.
4984
35f5825a
MS
49852011-02-27 Michael Snyder <msnyder@vmware.com>
4986
2a589cef
MS
4987 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
4988 a case statement falls through.
4989
0adea5f7
MS
4990 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
4991
35f5825a
MS
4992 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
4993 in comparison.
4994
238f1c74
MS
49952011-02-26 Michael Snyder <msnyder@vmware.com>
4996
4997 * utils.c (decimal2str): Eliminate dead code and dead param.
4998 (pulongest): Drop dead param from call to decimal2str.
4999 (plongest): Ditto.
5000
633ff500
JB
50012011-02-24 Joel Brobecker <brobecker@adacore.com>
5002
5003 Revert the following patch (not approved yet):
5004 2011-02-21 Hui Zhu <teawater@gmail.com>
5005 * tracepoint.c (tp_printf): New function.
5006 (eval_agent_expr): Handle gdb_agent_op_printf.
5007
f9c6ff72
HZ
50082011-02-21 Hui Zhu <teawater@gmail.com>
5009
5010 * tracepoint.c (tp_printf): New function.
5011 (eval_agent_expr): Handle gdb_agent_op_printf.
5012
94d5e490
TT
50132011-02-18 Tom Tromey <tromey@redhat.com>
5014
5015 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5016 (tracepoint.o): Likewise.
5017 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5018 (gdb_agent_op_names): Likewise.
5019
c7f96d2b
TT
50202011-02-18 Tom Tromey <tromey@redhat.com>
5021
5022 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5023 gdb_agent_op_rot>: New constants.
5024 (gdb_agent_op_names): Add pick and roll.
5025 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5026 cases.
5027
0feedb2c
JK
50282011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5029
5030 * aclocal.m4: Regenerated with aclocal-1.11.1.
5031
b3b9301e
PA
50322011-02-14 Pedro Alves <pedro@codesourcery.com>
5033
5034 * server.c (handle_qxfer_traceframe_info): New.
5035 (qxfer_packets): Register "traceframe-info".
5036 (handle_query): Report support for qXfer:traceframe-info:read+.
5037 * tracepoint.c (match_blocktype): New.
5038 (traceframe_find_block_type): Rename to ...
5039 (traceframe_walk_blocks): ... this. Add callback filter argument,
5040 and use it.
5041 (traceframe_find_block_type): New, reimplemented on top of
5042 traceframe_walk_blocks.
5043 (build_traceframe_info_xml): New.
5044 (traceframe_read_info): New.
5045 * server.h (traceframe_read_info): Declare.
5046
4f3e6fb7
YQ
50472011-02-11 Yao Qi <yao@codesourcery.com>
5048
5049 * configure.ac: Call AC_PROG_RANLIB.
5050 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5051 * configure: Regenerate.
5052
764880b7
PA
50532011-02-07 Pedro Alves <pedro@codesourcery.com>
5054
5055 * server.c (gdb_read_memory): Change return semantics to allow
5056 partial transfers.
5057 (handle_search_memory_1): Adjust.
5058 (process_serial_event) <'m' packet>: Handle partial transfers.
5059 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5060
1c79eb8a
PA
50612011-01-28 Pedro Alves <pedro@codesourcery.com>
5062
5063 * regcache.c (init_register_cache): Initialize
5064 regcache->register_status.
5065 (free_register_cache): Release regcache->register_status.
5066 (regcache_cpy): Copy register_status.
5067 (registers_to_string): Print 'x's for unavailable registers.
5068 (supply_register): Mark the register's status valid or
5069 unavailable, depending on whether a buffer was passed in or not.
5070 (supply_register_zeroed): New.
5071 (supply_regblock): Mark the registers' status valid or
5072 unavailable, depending on whether a buffer was passed in or not.
5073 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5074 (struct regcache): New `register_status' field.
5075 (supply_register_zeroed): Declare.
5076 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5077 supply_register_zeroed, rather than passing a NULL buffer to
5078 supply_register.
5079 * tracepoint.c (fetch_traceframe_registers): Update comment.
5080
85724a0e
PA
50812011-01-28 Pedro Alves <pedro@codesourcery.com>
5082
5083 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
5084 buffer explicit.
5085
d08aafef
PA
50862011-01-25 Pedro Alves <pedro@codesourcery.com>
5087
5088 * server.h (decode_xfer_write): Change prototype.
5089 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
5090 and don't extract the annex here.
5091 * server.c (decode_xfer_read): Remove `annex' parameter,
5092 and don't extract the annex here.
5093 (decode_xfer): New.
5094 (struct qxfer): New.
5095 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
5096 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
5097 (handle_qxfer_statictrace): New functions, abstracted out from
5098 handle_query, and made to use the struct qxfer interface.
5099 (handle_threads_qxfer_proper): Rename to ...
5100 (handle_qxfer_threads_proper): ... this.
5101 (handle_threads_qxfer): Rename to ...
5102 (handle_qxfer_threads): ... this. Adjust.
5103 (qxfer_packets): New array.
5104 (handle_qxfer): New function.
5105 (handle_query): Use handle_qxfer.
5106
493e2a69
MS
51072011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
5108
5109 * gdbreplay.c: Shorten lines of >= 80 columns.
5110 * linux-low.c: Ditto.
5111 * linux-ppc-low.c: Ditto.
5112 * linux-s390-low.c: Ditto.
5113 * linux-sparc-low.c: Ditto.
5114 * linux-x86-low.c: Ditto.
5115 * linux-xtensa-low.c: Ditto.
5116 * mem-break.c: Ditto.
5117 * nto-low.c: Ditto.
5118 * regcache.h: Ditto.
5119 * remote-utils.c: Ditto.
5120 * server.c: Ditto.
5121 * server.h: Ditto.
5122 * thread-db.c: Ditto.
5123 * tracepoint.c: Ditto.
5124 * utils.c: Ditto.
5125 * win32-low.h: Ditto.
5126
44944448
JB
51272011-01-05 Joel Brobecker <brobecker@adacore.com>
5128
5129 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
5130 update.
5131
71ce852c
JB
51322011-01-01 Joel Brobecker <brobecker@adacore.com>
5133
5134 * server.c (gdbserver_version): Update copyright year in version
5135 output.
5136 * gdbreplay.c (gdbreplay_version): Ditto.
5137
eb826dc6
MF
51382010-12-29 Jie Zhang <jie.zhang@analog.com>
5139
5140 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
5141 * linux-bfin-low.c: New file.
5142 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
5143 PT_DATA_ADDR for BFIN targets.
5144 * Makefile.in (SFILES): Add linux-bfin-low.c.
5145 (clean): Remove reg-bfin.c.
5146 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
5147 * README: Mention supported Blackfin targets.
5148
39ab222a
MF
51492010-12-23 Mike Frysinger <vapier@gentoo.org>
5150
5151 * .gitignore: New file.
5152
a1f2ce7d
MF
51532010-11-16 Mike Frysinger <vapier@gentoo.org>
5154
5155 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
5156
f474844c
JZ
51572010-10-22 Jie Zhang <jie@codesourcery.com>
5158
5159 * Makefile.in: Add FLAGS_TO_PASS variable.
5160 (install): Remove dependency of install-only and recursively
5161 invoke make for install-only.
5162
f1048712
DE
51632010-10-04 Doug Evans <dje@google.com>
5164
5165 * Makefile.in (uninstall): Use $(DESTDIR).
5166
b53a1623
PA
51672010-09-24 Pedro Alves <pedro@codesourcery.com>
5168
e6ee044d
PA
5169 PR gdb/11842
5170
b53a1623
PA
5171 * linux-x86-low.c (compat_siginfo_from_siginfo)
5172 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
5173 si_code is < 0. Check for si_code == SI_TIMER before checking for
5174 si_code < 0.
5175
fa1bd1e4
JB
51762010-09-13 Joel Brobecker <brobecker@adacore.com>
5177
5178 * lynx-i386-low.c: New file.
5179 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
5180
47fac8f8
JB
51812010-09-13 Joel Brobecker <brobecker@adacore.com>
5182
5183 * lynx-low.c (ptrace_request_to_str): Remove handling for
5184 request values that have been removed in LynxOS 5.x.
5185
1adfc54d
JB
51862010-09-13 Joel Brobecker <brobecker@adacore.com>
5187
5188 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
5189 <ptrace.h>
5190
c2a66c29
NS
51912010-09-09 Nathan Sidwell <nathan@codesourcery.com>
5192
5193 * configure.ac: Add --enable-inprocess-agent option.
5194 * configure: Rebuilt.
5195
32fcada3
YQ
51962010-09-06 Yao Qi <yao@codesourcery.com>
5197
5198 * linux-low.c (linux_kill): Remove unused variable.
5199 (linux_stabilize_threads): Likewise.
5200 * server.c (start_inferior): Likewise.
5201 (queue_stop_reply_callback): Likewise.
5202 * tracepoint.c (do_action_at_tracepoint): Likewise.
5203
0cccb683
YQ
52042010-09-06 Yao Qi <yao@codesourcery.com>
5205
5206 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
5207 on return.
5208
423ec54c
JK
52092010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5210
5211 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
5212
12ac6819
PA
52132010-09-06 Pedro Alves <pedro@codesourcery.com>
5214
5215 * Makefile.in (install-only): Replace $IPA_DEPFILES with
5216 "$(IPA_DEPFILES)".
5217
8ed54b31
JB
52182010-09-01 Joel Brobecker <brobecker@adacore.com>
5219
5220 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
5221 gdbserver/lynx-ppc-low.c: New files.
5222 * Makefile.in (lynx_low_h): New variable.
5223 (lynx-low.o, lynx-ppc-low.o): New rules.
5224 * configure.ac: On LynxOS, link with -lnetinet.
5225 * configure.srv: Add handling of powerpc-*-lynxos* targets.
5226 * configure: regenerate.
5227
bb0116a4
JB
52282010-09-01 Joel Brobecker <brobecker@adacore.com>
5229
5230 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
5231 * configure.ac: Add check for vasprintf and vsnprintf.
5232 * configure, config.in: Regenerate.
5233 * server.h (vasprintf, vsnprintf): Add conditional declarations.
5234
a778ab81 52352010-09-01 Joel Brobecker <brobecker@adacore.com>
5236
5237 * gdbreplay.c: Move include of alloca.h up, next to include of
5238 malloc.h.
5239 * server.h: Add include of malloc.h.
5240 * mem-break.c: Remove include of malloc.h.
5241 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
5242
8b034a19 52432010-09-01 Joel Brobecker <brobecker@adacore.com>
5244
5245 * Makefile.in (memmem.o): Build with -Wno-error.
5246
52472010-09-01 Joel Brobecker <brobecker@adacore.com>
5248
5249 * utils.c (xsnprintf): Make non-static.
5250 * server.h: Add xsnprintf declaration.
5251 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
5252 replace calls to snprintf by calls to xsnprintf throughout.
5253
52542010-09-01 Joel Brobecker <brobecker@adacore.com>
5255
5256 * configure.ac: Add configure check for alloca.
5257 * configure, config.in: Regenerate.
5258 * server.h: Include alloca.h if it exists.
5259 * gdbreplay.c: Include alloca.h if it exists.
5260
1a981360
PA
52612010-08-28 Pedro Alves <pedro@codesourcery.com>
5262
5263 * linux-low.c (__SIGRTMIN): Define if not already defined.
5264 (linux_create_inferior): Check for __ANDROID__ rather than
5265 __SIGRTMIN.
5266 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
5267 are already deferred.
5268 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
5269 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
5270 stopped and already has a pending signal to report.
5271 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
5272 a pending signal to report or is moving out of a jump pad.
5273 (linux_init_signals): Check for __ANDROID__ rather than
5274 __SIGRTMIN.
5275
b4d51a55
PA
52762010-08-28 Pedro Alves <pedro@codesourcery.com>
5277
5278 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
5279 debug_threads check. Avoid a linear search when not doing debug
5280 output.
5281
ec48365d
PA
52822010-08-27 Pedro Alves <pedro@codesourcery.com>
5283
5284 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
5285 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
5286 (struct file_handler) <fd>: Change type to gdb_fildes_t.
5287 (process_event): Change local fd's type to gdb_fildes_t.
5288 (create_file_handler): Adjust prototype.
5289 (delete_file_handler): Adjust prototype.
5290 (handle_file_event): Adjust prototype. Use pfildes.
5291 (create_file_event): Adjsut prototype.
5292 * remote-utils.c (remote_desc, listen_desc): Change type to
5293 gdb_fildes_t.
5294 * server.h: New gdb_fildes_t typedef.
5295 [USE_WIN32API]: Include winsock2.h.
5296 (delete_file_handler, add_file_handler): Adjust prototypes.
5297 (pfildes): Declare.
5298 * utils.c (pfildes): New.
5299
854d88f0
PA
53002010-08-27 Pedro Alves <pedro@codesourcery.com>
5301
5302 * configure.ac (build_warnings): Add -Wno-char-subscripts.
5303 * configure: Regenerate.
5304
0146f85b
PA
53052010-08-27 Pedro Alves <pedro@codesourcery.com>
5306
5307 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
5308 (linux_done_accessing_memory): ... this.
5309 (linux_target_ops): Adjust.
5310 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
5311 * nto-low.c (nto_target_ops): Adjust comment.
5312 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
5313 * spu-low.c (spu_target_ops): Adjust comment.
5314 * target.h (target_ops): Rename unprepare_to_access_memory field
5315 to done_accessing_memory.
5316 (unprepare_to_access_memory): Rename to ...
5317 (done_accessing_memory): ... this.
5318
90d74c30
PA
53192010-08-26 Pedro Alves <pedro@codesourcery.com>
5320
5321 * linux-low.c (linux_prepare_to_access_memory): New.
5322 (linux_unprepare_to_access_memory): New.
5323 (linux_target_ops): Install them.
5324 * server.c (read_memory): Rename to ...
5325 (gdb_read_memory): ... this. Use
5326 prepare_to_access_memory/prepare_to_access_memory.
5327 (write_memory): Rename to ...
5328 (gdb_write_memory): ... this. Use
5329 prepare_to_access_memory/prepare_to_access_memory.
5330 (handle_search_memory_1): Adjust.
5331 (process_serial_event): Adjust.
5332 * target.h (struct target_ops): New fields
5333 prepare_to_access_memory and unprepare_to_access_memory.
5334 (prepare_to_access_memory, unprepare_to_access_memory): New.
5335 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
5336 prepare_to_access_memory/prepare_to_access_memory.
5337 * nto-low.c (nto_target_ops): Adjust.
5338 * spu-low.c (spu_target_ops): Adjust.
5339 * win32-low.c (win32_target_ops): Adjust.
5340
fd467969
PA
53412010-08-26 Pedro Alves <pedro@codesourcery.com>
5342
5343 * Makefile.in (WARN_CFLAGS): Get it from configure.
5344 (WERROR_CFLAGS): New.
5345 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
5346 * configure.ac: Introduce --enable-werror, which adds -Werror to
5347 the compiler command line. Enabled by default. Disable with
5348 --disable-werror. Add -Wdeclaration-after-statement
5349 Wpointer-arith and -Wformat-nonliteral to warning flags.
5350 * configure: Regenerate.
5351
331e2f5f
PA
53522010-08-26 Pedro Alves <pedro@codesourcery.com>
5353
5354 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
5355
e581f2b4
PA
53562010-08-26 Pedro Alves <pedro@codesourcery.com>
5357
5358 * gdbreplay.c (remote_error): New.
5359 (gdbchar): New.
5360 (expect): Use gdbchar. Check for error reading from GDB.
5361 Clarify sync error output.
5362 (play): Check for errors writing to GDB.
5363 * linux-low.c (sigchld_handler): Really ignore `write' errors.
5364 * remote-utils.c (getpkt): Check for errors writing to the remote
5365 descriptor.
5366
3c11dd79
PA
53672010-08-25 Pedro Alves <pedro@codesourcery.com>
5368
5369 * linux-low.c (linux_wait_1): Move non-debugging code out of
5370 `debug_threads' control.
5371
d20a8ad9
PA
53722010-08-25 Pedro Alves <pedro@codesourcery.com>
5373
5374 * linux-low.c (linux_wait_1): Don't set last_status here.
5375 * server.c (push_event, queue_stop_reply_callback): Assert we're
5376 not pushing a TARGET_WAITKIND_IGNORE event.
5377 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
5378 (myresume, handle_target_event): Set the thread's last_resume_kind
5379 and last_status from the target returned status.
5380
964e4306
PA
53812010-08-25 Pedro Alves <pedro@codesourcery.com>
5382
5383 PR threads/10729
5384
5385 * linux-x86-low.c (update_debug_registers_callback): New.
5386 (i386_dr_low_set_addr): Use it.
5387 (i386_dr_low_get_addr): New.
5388 (i386_dr_low_set_control): Use update_debug_registers_callback.
5389 (i386_dr_low_get_control): New.
5390 (i386_dr_low_get_status): Adjust.
5391 * linux-low.c (linux_stop_lwp): New.
5392 * linux-low.h (linux_stop_lwp): Declare.
5393
5394 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
5395 argument instead of a i386_debug_reg_state.
5396 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
5397 a i386_debug_reg_state.
5398 (i386_insert_aligned_watchpoint): Adjust.
5399 (i386_remove_aligned_watchpoint): Adjust.
5400 (i386_low_stopped_data_address): Read the debug registers from the
5401 inferior instead of from the mirrors.
5402 * i386-low.h (struct i386_debug_reg_state): Extend comment.
5403 (i386_dr_low_get_addr): Declare.
5404 (i386_dr_low_get_control): Declare.
5405 (i386_dr_low_get_status): Change prototype.
5406
5407 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
5408 (i386_dr_low_get_addr): New.
5409 (i386_dr_low_get_control): New.
5410 (i386_dr_low_get_status): Adjust prototype. Return
5411 dr_status_mirror.
5412 (i386_initial_stuff): Clear dr_status_mirror and
5413 dr_control_mirror.
5414 (i386_get_thread_context): Adjust.
5415 (i386_set_thread_context): Adjust.
5416 (i386_thread_added): Adjust.
5417
5f21a75b
PA
54182010-08-24 Pedro Alves <pedro@codesourcery.com>
5419
5420 * linux-low.h (linux_thread_area): Delete declaration.
5421
3e4c1235
TS
54222010-08-11 Thomas Schwinge <thomas@codesourcery.com>
5423
5424 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
5425 after its termination.
5426
1971b033
PA
54272010-08-09 Pedro Alves <pedro@codesourcery.com>
5428
5429 * linux-low.c (gdb_wants_lwp_stopped): Delete.
5430 (gdb_wants_all_stopped): Delete.
5431 (linux_wait_1): Don't call them.
5432 * server.c (handle_v_cont): Tag all threads as want-stopped.
5433 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
5434 stopped as "client-wants-stopped".
5435
310444ac
PA
54362010-07-31 Pedro Alves <pedro@codesourcery.com>
5437
5438 * Makefile.in (signals_h): New.
5439 (server_h): Depend on it.
5440 (server.o): Don't depend on $(signals_def).
5441 (signals.o): Depend on $(signals_def).
5442
a19cae16
JK
54432010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
5444
5445 * Makefile.in (signals_def): New.
5446 (server_h): Append include/gdb/signals.h and signals_def.
5447 (server.o): Append signals_def.
5448
30d50328
JK
54492010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5450
5451 * server.c (handle_target_event): Use target_signal_to_host for
5452 resume_info.sig initialization.
5453 * target.h (struct thread_resume) <sig>: New comment.
5454
5c3216e2
OS
54552010-07-20 Ozkan Sezer <sezeroz@gmail.com>
5456
c6f46ca0
OS
5457 * server.c (handle_query): strcpy() the returned string from paddress()
5458 instead of sprintf().
5c3216e2
OS
5459 * utils.c (paddress): Return phex_nz().
5460
6bd31874
JB
54612010-07-07 Joel Brobecker <brobecker@adacore.com>
5462
5463 * server.c (handle_v_cont): Call mourn_inferior if process
5464 just exited.
5465 (myresume): Likewise.
5466
0fb4aa4b
PA
54672010-07-01 Pedro Alves <pedro@codesourcery.com>
5468
5469 Static tracepoints, and integration with UST.
5470
5471 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
5472 * mem-break.c (uninsert_all_breakpoints)
5473 (reinsert_all_breakpoints): New.
5474 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
5475 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
5476 (gdb_agent_ust_loaded, helper_thread_id)
5477 (gdb_agent_helper_thread_id): New macros.
5478 (struct ipa_sym_addresses): Add addr_ust_loaded,
5479 addr_helper_thread_id, addr_cmd_buf.
5480 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
5481 (in_process_agent_loaded_ust): New.
5482 (write_e_ust_not_loaded): New.
5483 (maybe_write_ipa_ust_not_loaded): New.
5484 (struct collect_static_trace_data_action): New.
5485 (enum tracepoint_type) <static_tracepoint>: New.
5486 (struct tracepoint) <handle>: Mention static tracepoints.
5487 (struct static_tracepoint_ctx): New.
5488 (CMD_BUF_SIZE): New.
5489 (add_tracepoint_action): Handle static tracepoint actions.
5490 (unprobe_marker_at): New.
5491 (clear_installed_tracepoints): Handle static tracepoints.
5492 (cmd_qtdp): Handle static tracepoints.
5493 (probe_marker_at): New.
5494 (cmd_qtstart): Handle static tracepoints.
5495 (response_tracepoint): Handle static tracepoints.
5496 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
5497 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
5498 (get_context_regcache): Handle static tracepoints.
5499 (do_action_at_tracepoint): Handle static tracepoint actions.
5500 (traceframe_find_block_type): Handle static trace data blocks.
5501 (traceframe_read_sdata): New.
5502 (download_tracepoints): Download static tracepoint actions.
5503 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
5504 (GDB_PROBE_NAME): New.
5505 (ust_ops): New.
5506 (GET_UST_SYM): New.
5507 (USTF): New.
5508 (dlsym_ust): New.
5509 (ust_marker_to_static_tracepoint): New.
5510 (gdb_probe): New.
5511 (collect_ust_data_at_tracepoint): New.
5512 (gdb_ust_probe): New.
5513 (UNIX_PATH_MAX, SOCK_DIR): New.
5514 (gdb_ust_connect_sync_socket): New.
5515 (resume_thread, stop_thread): New.
5516 (run_inferior_command): New.
5517 (init_named_socket): New.
5518 (gdb_ust_socket_init): New.
5519 (cstr_to_hexstr): New.
5520 (next_st): New.
5521 (first_marker, next_marker): New.
5522 (response_ust_marker): New.
5523 (cmd_qtfstm, cmd_qtsstm): New.
5524 (unprobe_marker_at, probe_marker_at): New.
5525 (cmd_qtstmat, gdb_ust_thread): New.
5526 (gdb_ust_init): New.
5527 (initialize_tracepoint_ftlib): Call gdb_ust_init.
5528 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
5529 (ST_REGENTRY): New.
5530 (x86_64_st_collect_regmap): New.
5531 (X86_64_NUM_ST_COLLECT_GREGS): New.
5532 (AMD64_RIP_REGNUM): New.
5533 (supply_static_tracepoint_registers): New.
5534 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
5535 (ST_REGENTRY): New.
5536 (i386_st_collect_regmap): New.
5537 (i386_NUM_ST_COLLECT_GREGS): New.
5538 (supply_static_tracepoint_registers): New.
5539 * server.c (handle_query): Handle qXfer:statictrace:read.
5540 <qSupported>: Report support for StaticTracepoints, and
5541 qXfer:statictrace:read features.
5542 * server.h (traceframe_read_sdata)
5543 (supply_static_tracepoint_registers): Declare.
5544 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
5545 (unpack_varlen_hex): Include in IPA build.
5546 * Makefile.in (ustlibs, ustinc): New.
5547 (IPA_OBJS): Add remote-utils-ipa.o.
5548 ($(IPA_LIB)): Link -ldl and -lpthread.
5549 (UST_CFLAGS): New.
5550 (IPAGENT_CFLAGS): Add UST_CFLAGS.
5551 * config.in, configure: Regenerate.
5552
9e4344e5
PA
55532010-06-20 Ian Lance Taylor <iant@google.com>
5554 Pedro Alves <pedro@codesourcery.com>
5555
5556 * linux-x86-low.c (always_true): Delete.
5557 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
5558 trying to fool the compiler with always_true.
5559
c6beb2cb
PA
55602010-06-20 Pedro Alves <pedro@codesourcery.com>
5561
5562 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
5563 conditions in gdbserver.
5564
d2ed6730
UW
55652010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
5566
5567 * spu-low.c (spu_read_memory): Wrap around local store limit.
5568 (spu_write_memory): Likewise.
5569
4e29fb54
PA
55702010-06-15 Pedro Alves <pedro@codesourcery.com>
5571
5572 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
5573 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
5574 LONGEST uses.
5575 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
5576 uses.
5577 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
5578 uses with LONGEST uses.
5579
6a271cae
PA
55802010-06-14 Stan Shebs <stan@codesourcery.com>
5581 Pedro Alves <pedro@codesourcery.com>
5582
5583 Bytecode compiler.
5584
5585 * linux-x86-low.c: Include limits.h.
5586 (add_insns): New.
5587 (always_true): New.
5588 (EMIT_ASM): New.
5589 (EMIT_ASM32): New.
5590 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
5591 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
5592 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
5593 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
5594 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
5595 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
5596 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
5597 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
5598 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
5599 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
5600 (amd64_emit_void_call_2): New.
5601 (amd64_emit_ops): New.
5602 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
5603 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
5604 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
5605 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
5606 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
5607 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
5608 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
5609 (i386_emit_call, i386_emit_reg, i386_emit_pop)
5610 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
5611 (i386_emit_stack_adjust, i386_emit_int_call_1)
5612 (i386_emit_void_call_2): New.
5613 (i386_emit_ops): New.
5614 (x86_emit_ops): New.
5615 (the_low_target): Install x86_emit_ops.
5616 * server.h (struct emit_ops): New.
5617 (get_raw_reg_func_addr): Declare.
5618 (current_insn_ptr, emit_error): Declare.
5619 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
5620 (set_trace_state_variable_value): New defines.
5621 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
5622 addr_get_trace_state_variable_value and
5623 addr_set_trace_state_variable_value.
5624 (symbol_list): New fields for get_raw_reg,
5625 get_trace_state_variable_value and set_trace_state_variable_value.
5626 (condfn): New typedef.
5627 (struct tracepoint): New field `compiled_cond'.
5628 (do_action_at_tracepoint): Clear compiled_cond.
5629 (get_trace_state_variable_value, set_trace_state_variable_value):
5630 Export in the IPA.
5631 (condition_true_at_tracepoint): If there's a compiled condition,
5632 run that.
5633 (current_insn_ptr, emit_error): New globals.
5634 (struct bytecode_address): New.
5635 (get_raw_reg_func_addr): New.
5636 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
5637 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
5638 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
5639 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
5640 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
5641 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
5642 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
5643 (compile_tracepoint_condition, compile_bytecodes): New.
5644 * target.h (emit_ops): Forward declare.
5645 (struct target_ops): New field emit_ops.
5646 (target_emit_ops): New.
5647 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
5648 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
5649 * linux-low.c (linux_emit_ops): New.
5650 (linux_target_ops): Install it.
5651 * linux-low.h (struct linux_target_ops): New field emit_ops.
5652
92b72907
UW
56532010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
5654
5655 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
5656 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
5657
fa593d66
PA
56582010-06-01 Pedro Alves <pedro@codesourcery.com>
5659 Stan Shebs <stan@codesourcery.com>
5660
5661 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
5662 (all): Depend on $(extra_libraries).
5663 (install-only): Install the IPA.
5664 (IPA_OBJS, IPA_LIB): New.
5665 (clean): Remove the IPA lib.
5666 (IPAGENT_CFLAGS): New.
5667 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
5668 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
5669 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
5670 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
5671 * configure.ac: Check for atomic builtins support in the compiler.
5672 (IPA_DEPFILES, extra_libraries): Define.
5673 * configure.srv (ipa_obj): Add description.
5674 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
5675 (i[34567]86-*-linux*): Set ipa_obj.
5676 (x86_64-*-linux*): Set ipa_obj.
5677 * linux-low.c (stabilizing_threads): New.
5678 (supports_fast_tracepoints): New.
5679 (linux_detach): Stabilize threads before detaching.
5680 (handle_tracepoints): Handle internal tracing breakpoints. Assert
5681 the lwp is either not stabilizing, or is moving out of a jump pad.
5682 (linux_fast_tracepoint_collecting): New.
5683 (maybe_move_out_of_jump_pad): New.
5684 (enqueue_one_deferred_signal): New.
5685 (dequeue_one_deferred_signal): New.
5686 (linux_wait_for_event_1): If moving out of a jump pad, defer
5687 pending signals to later.
5688 (linux_stabilize_threads): New.
5689 (linux_wait_1): Check if threads need moving out of jump pads, and
5690 do it if so.
5691 (stuck_in_jump_pad_callback): New.
5692 (move_out_of_jump_pad_callback): New.
5693 (lwp_running): New.
5694 (linux_resume_one_lwp): Handle moving out of jump pads.
5695 (linux_set_resume_request): Dequeue deferred signals.
5696 (need_step_over_p): Also step over fast tracepoint jumps.
5697 (start_step_over): Also uninsert fast tracepoint jumps.
5698 (finish_step_over): Also reinsert fast tracepoint jumps.
5699 (linux_install_fast_tracepoint_jump): New.
5700 (linux_target_ops): Install linux_stabilize_threads and
5701 linux_install_fast_tracepoint_jump_pad.
5702 * linux-low.h (linux_target_ops) <get_thread_area,
5703 install_fast_tracepoint_jump_pad>: New fields.
5704 (struct lwp_info) <collecting_fast_tracepoint,
5705 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
5706 (linux_get_thread_area): Declare.
5707 * linux-x86-low.c (jump_insn): New.
5708 (x86_get_thread_area): New.
5709 (append_insns): New.
5710 (push_opcode): New.
5711 (amd64_install_fast_tracepoint_jump_pad): New.
5712 (i386_install_fast_tracepoint_jump_pad): New.
5713 (x86_install_fast_tracepoint_jump_pad): New.
5714 (the_low_target): Install x86_get_thread_area and
5715 x86_install_fast_tracepoint_jump_pad.
5716 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
5717 (struct fast_tracepoint_jump): New.
5718 (fast_tracepoint_jump_insn): New.
5719 (fast_tracepoint_jump_shadow): New.
5720 (find_fast_tracepoint_jump_at): New.
5721 (fast_tracepoint_jump_here): New.
5722 (delete_fast_tracepoint_jump): New.
5723 (set_fast_tracepoint_jump): New.
5724 (uninsert_fast_tracepoint_jumps_at): New.
5725 (reinsert_fast_tracepoint_jumps_at): New.
5726 (set_breakpoint_at): Use write_inferior_memory.
5727 (uninsert_raw_breakpoint): Use write_inferior_memory.
5728 (check_mem_read): Mask out fast tracepoint jumps.
5729 (check_mem_write): Mask out fast tracepoint jumps.
5730 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
5731 (set_fast_tracepoint_jump): Declare.
5732 (delete_fast_tracepoint_jump)
5733 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
5734 (reinsert_fast_tracepoint_jumps_at): Declare.
5735 * regcache.c: Don't compile many functions when building the
5736 in-process agent library.
5737 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
5738 the register buffer in the heap.
5739 (free_register_cache): If the register buffer isn't owned by the
5740 regcache, don't free it.
5741 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
5742 pre-existing register caches.
5743 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
5744 type.
5745 (convert_ascii_to_int): : Constify `from' parameter type.
5746 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
5747 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
5748 the needed buffer in-place.
5749 (relocate_instruction): New.
5750 * server.c (handle_query) <qSymbols>: If the target supports
5751 tracepoints, give it a chance of looking up symbols. Report
5752 support for fast tracepoints.
5753 (handle_status): Stabilize threads.
5754 (process_serial_event): Adjust.
5755 * server.h (struct fast_tracepoint_jump): Forward declare.
5756 (struct process_info) <fast_tracepoint_jumps>: New field.
5757 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
5758 (decode_X_packet, decode_M_packet): Adjust.
5759 (relocate_instruction): Declare.
5760 (in_process_agent_loaded): Declare.
5761 (tracepoint_look_up_symbols): Declare.
5762 (struct fast_tpoint_collect_status): Declare.
5763 (fast_tracepoint_collecting): Declare.
5764 (force_unlock_trace_buffer): Declare.
5765 (handle_tracepoint_bkpts): Declare.
5766 (initialize_low_tracepoint)
5767 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
5768 * target.h (struct target_ops) <stabilize_threads,
5769 install_fast_tracepoint_jump_pad>: New fields.
5770 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
5771 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
5772 [HAVE_STDINT_H]: Include stdint.h.
5773 (trace_debug_1): Rename to ...
5774 (trace_vdebug): ... this.
5775 (trace_debug): Rename to ...
5776 (trace_debug_1): ... this. Add `level' parameter.
5777 (trace_debug): New.
5778 (ATTR_USED, ATTR_NOINLINE): New.
5779 (IP_AGENT_EXPORT): New.
5780 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5781 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
5782 (about_to_request_buffer_space, trace_buffer_is_full)
5783 (stopping_tracepoint, expr_eval_result, error_tracepoint)
5784 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
5785 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
5786 (traceframe_write_count, traceframes_created)
5787 (trace_state_variables)
5788 New renaming defines.
5789 (struct ipa_sym_addresses): New.
5790 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
5791 (symbol_list): New.
5792 (ipa_sym_addrs): New.
5793 (all_tracepoint_symbols_looked_up): New.
5794 (in_process_agent_loaded): New.
5795 (write_e_ipa_not_loaded): New.
5796 (maybe_write_ipa_not_loaded): New.
5797 (tracepoint_look_up_symbols): New.
5798 (debug_threads) [IN_PROCESS_AGENT]: New.
5799 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
5800 (UNKNOWN_SIDE_EFFECTS): New.
5801 (stop_tracing): New.
5802 (flush_trace_buffer): New.
5803 (stop_tracing_bkpt): New.
5804 (flush_trace_buffer_bkpt): New.
5805 (read_inferior_integer): New.
5806 (read_inferior_uinteger): New.
5807 (read_inferior_data_pointer): New.
5808 (write_inferior_data_pointer): New.
5809 (write_inferior_integer): New.
5810 (write_inferior_uinteger): New.
5811 (struct collect_static_trace_data_action): Delete.
5812 (enum tracepoint_type): New.
5813 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
5814 <actions_str, step_actions, step_actions_str>: Only include in
5815 GDBserver.
fa593d66
PA
5816 <orig_size, obj_addr_on_target, adjusted_insn_addr>
5817 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
5818 (tracepoints): Use IP_AGENT_EXPORT.
5819 (last_tracepoint): Don't include in the IPA.
5820 (stopping_tracepoint): Use IP_AGENT_EXPORT.
5821 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
5822 (alloced_trace_state_variables): New.
5823 (trace_state_variables): Use IP_AGENT_EXPORT.
5824 (traceframe_t): Delete unused variable.
5825 (circular_trace_buffer): Don't include in the IPA.
5826 (trace_buffer_start): Delete.
5827 (struct trace_buffer_control): New.
5828 (trace_buffer_free): Delete.
5829 (struct ipa_trace_buffer_control): New.
5830 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
5831 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
5832 New.
5833 (trace_buffer_ctrl): New.
5834 (TRACE_BUFFER_CTRL_CURR): New.
5835 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
5836 Reimplement as macros.
5837 (trace_buffer_wrap): Delete.
5838 (traceframe_write_count, traceframe_read_count)
5839 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
5840 (struct tracepoint_hit_ctx) <type>: New field.
5841 (struct fast_tracepoint_ctx): New.
5842 (memory_barrier): New.
5843 (cmpxchg): New.
5844 (record_tracepoint_error): Update atomically in the IPA.
5845 (clear_inferior_trace_buffer): New.
5846 (about_to_request_buffer_space): New.
5847 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
5848 updating the same buffer.
5849 (add_tracepoint): Default the tracepoint's type to trap
5850 tracepoint, and orig_size to -1.
5851 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
5852 internal variables.
5853 (create_trace_state_variable): New parameter `gdb'. Handle it.
5854 (clear_installed_tracepoints): Clear fast tracepoint jumps.
5855 (cmd_qtdp): Handle fast tracepoints.
5856 (cmd_qtdv): Adjust.
5857 (max_jump_pad_size): New.
5858 (gdb_jump_pad_head): New.
5859 (get_jump_space_head): New.
5860 (claim_jump_space): New.
5861 (sort_tracepoints): New.
5862 (MAX_JUMP_SIZE): New.
5863 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
5864 IPA.
5865 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
5866 support. Upload fast traceframes, and delete internal IPA
5867 breakpoints.
5868 (stop_tracing_handler): New.
5869 (flush_trace_buffer_handler): New.
5870 (cmd_qtstop): Upload fast tracepoints.
5871 (response_tracepoint): Handle fast tracepoints.
5872 (tracepoint_finished_step): Upload fast traceframes. Set the
5873 tracepoint hit context's tracepoint type.
5874 (handle_tracepoint_bkpts): New.
5875 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
5876 type. Add comment about fast tracepoints.
5877 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
5878 non-existing action_str field.
5879 (get_context_regcache): Handle fast tracepoints.
5880 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
5881 to the regcache.
5882 (fast_tracepoint_from_jump_pad_address): New.
5883 (fast_tracepoint_from_ipa_tpoint_address): New.
5884 (collecting_t): New.
5885 (force_unlock_trace_buffer): New.
5886 (fast_tracepoint_collecting): New.
5887 (collecting): New.
5888 (gdb_collect): New.
5889 (write_inferior_data_ptr): New.
5890 (target_tp_heap): New.
5891 (target_malloc): New.
5892 (download_agent_expr): New.
5893 (UALIGN): New.
5894 (download_tracepoints): New.
5895 (download_trace_state_variables): New.
5896 (upload_fast_traceframes): New.
5897 (IPA_FIRST_TRACEFRAME): New.
5898 (IPA_NEXT_TRACEFRAME_1): New.
5899 (IPA_NEXT_TRACEFRAME): New.
5900 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
5901 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
5902 (gdb_jump_pad_buffer_end): New.
5903 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
5904 (initialize_tracepoint): Adjust.
5905 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
5906 buffer. Initialize the low module.
5907 * utils.c (PREFIX, TOOLNAME): New.
5908 (malloc_failure): Use PREFIX.
5909 (error): In the IPA, an error causes an exit.
5910 (fatal, warning): Use PREFIX.
5911 (internal_error): Use TOOLNAME.
5912 (NUMCELLS): Increase to 10.
5913 * configure, config.in: Regenerate.
5914
d149dd1d
PA
59152010-06-01 Pedro Alves <pedro@codesourcery.com>
5916
5917 * server.c (handle_query) <qSupported>: Do two passes over the
5918 qSupported string to avoid nesting strtok.
5919
f6528abd
JK
59202010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5921
5922 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
5923 (CDEPS): New.
5924 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
5925 -Wl,--dynamic-list.
5926 * configure: Regenerate.
5927 * proc-service.list: New.
5928
ca2a87a0
JK
59292010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5930
5931 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
5932 New comment.
5933
363a6e9f
OS
59342010-05-26 Ozkan Sezer <sezeroz@gmail.com>
5935
5936 * gdbreplay.c (remote_open): Check error return from socket() call by
5937 its equality to -1 not by it being negative.
5938 * remote-utils.c (remote_open): Likewise.
5939
d23b6cb1
PA
59402010-05-23 Pedro Alves <pedro@codesourcery.com>
5941
5942 * config.h: Regenerate.
5943
28d3cf85
MK
59442010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
5945
5946 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
5947 doesn't provide PTRACE_GET_THREAD_AREA.
5948
fea36a59
MK
59492010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
5950
5951 * linux-m68k-low.c: Include <asm/ptrace.h>
5952 (ps_get_thread_area): Implement.
5953
24b066ba
DE
59542010-05-03 Doug Evans <dje@google.com>
5955
5956 * event-loop.c (struct callback_event): New struct.
5957 (callback_list): New global.
5958 (append_callback_event, delete_callback_event): New functions.
5959 (process_callback): New function.
5960 (start_event_loop): Call it.
5961 * remote-utils.c (NOT_SCHEDULED): Define.
5962 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
5963 moved out of readchar.
5964 (readchar): Rewrite. Call reschedule before returning.
5965 (reset_readchar): New function.
5966 (remote_close): Call it.
5967 (process_remaining, reschedule): New functions.
5968 * server.h (callback_handler_func): New typedef.
5969 (append_callback_event, delete_callback_event): Declare.
5970
9836d6ea
PA
59712010-05-03 Pedro Alves <pedro@codesourcery.com>
5972
5973 * proc-service.c (ps_pglobal_lookup): Use
5974 thread_db_look_up_one_symbol.
5975 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
5976 parameter. Use it instead of all_symbols_looked_up.
5977 * server.h (struct process_info) <all_symbols_looked_up>: Delete
5978 field.
5979 (all_symbols_looked_up): Don't declare.
5980 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
5981 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
5982 field.
5983 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
5984 Set all_symbols_looked_up here.
5985 (thread_db_look_up_one_symbol): New.
5986 (thread_db_get_tls_address): Adjust.
5987 (thread_db_load_search, try_thread_db_load_1): Always allocate the
5988 thread_db object on the heap, and tentatively set it in the
5989 process structure.
5990 (thread_db_init): Don't set all_symbols_looked_up here.
5991 * linux-low.h (thread_db_look_up_one_symbol): Declare.
5992
7984d532
PA
59932010-05-03 Pedro Alves <pedro@codesourcery.com>
5994
5995 * linux-low.c (linux_kill, linux_detach): Adjust.
5996 (status_pending_p_callback): Remove redundant statement. Check
5997 for !TARGET_WAITIKIND_IGNORE, instead of
5998 TARGET_WAITKIND_STOPPED.
5999 (handle_tracepoints): Make sure LWP is locked. Adjust.
6000 (linux_wait_for_event_1): Adjust.
6001 (linux_cancel_breakpoints): New.
6002 (unsuspend_one_lwp): New.
6003 (unsuspend_all_lwps): New.
6004 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
6005 (send_sigstop_callback): Change return type to int, add new
6006 `except' parameter and handle it.
6007 (suspend_and_send_sigstop_callback): New.
6008 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6009 pass them down. If SUSPEND, also increment the lwp's suspend
6010 count.
6011 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6012 (need_step_over_p): Don't consider suspended LWPs.
6013 (start_step_over): Adjust.
6014 (proceed_one_lwp): Change return type to int, add new `except'
6015 parameter and handle it.
6016 (unsuspend_and_proceed_one_lwp): New.
6017 (proceed_all_lwps): Use find_inferior instead of
6018 for_each_inferior.
6019 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6020 also decrement the suspend count of LWPs. Pass `except' down,
6021 instead of hacking its suspend count.
6022 (linux_pause_all): Add `freeze' parameter. Adjust.
6023 (linux_unpause_all): New.
6024 (linux_target_ops): Install linux_unpause_all.
6025 * server.c (handle_status): Adjust.
6026 * target.h (struct target_ops): New fields `unpause_all' and
6027 `cancel_breakpoints'. Add new parameter to `pause_all'.
6028 (pause_all): Add new `freeze' parameter.
6029 (unpause_all): New.
6030 (cancel_breakpoints): New.
6031 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6032 cancel breakpoints.
6033 (cmd_qtstart): Pause threads.
6034 (stop_tracing): Pause threads, and cancel breakpoints.
6035 * win32-low.c (win32_target_ops): Adjust.
6036
e471f25b
PA
60372010-05-03 Pedro Alves <pedro@codesourcery.com>
6038
6039 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6040 the inferior right away from here...
6041 (linux_wait_1): ... to here, and adjust to check the thread's
6042 last_resume_kind instead of the lwp's step or stop_expected flags.
6043
1915ef4f
PA
60442010-05-02 Pedro Alves <pedro@codesourcery.com>
6045
6046 * README: Use consistent `GDB' and `GDBserver' spellings.
6047
f9e39928
PA
60482010-05-02 Pedro Alves <pedro@codesourcery.com>
6049
6050 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6051 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
6052 (linux_detach_one_lwp): Assume the lwp is stopped.
6053 (any_thread_of): Delete.
6054 (linux_detach): Stop all lwps here. Don't blindly delete all
6055 breakpoints.
6056 (delete_lwp_callback): New.
6057 (linux_mourn): Delete all lwps of the process that is gone.
6058 (linux_wait_1): Don't delete the last lwp of the process here.
6059 * mem-break.h (mark_breakpoints_out): Declare.
6060 * mem-break.c (mark_breakpoints_out): New.
6061 (free_all_breakpoints): Use it.
6062 * server.c (handle_target_event): If the process is gone, mark
6063 breakpoints out.
6064 * thread-db.c (struct thread_db) <create_bp>: New field.
6065 (thread_db_enable_reporting): Fix prototype. Store a thread event
6066 breakpoint reference in the thread_db struct.
6067 (thread_db_load_search): Clear the thread_db object.
6068 (try_thread_db_load_1): Ditto.
6069 (switch_to_process): New.
6070 (disable_thread_event_reporting): Use it.
6071 (remove_thread_event_breakpoints): New.
6072 (thread_db_detach, thread_db_mourn): Use it.
6073
1e7fc18c
PA
60742010-05-01 Pedro Alves <pedro@codesourcery.com>
6075
6076 * linux-low.c (linux_enable_event_reporting): New.
6077 (linux_wait_for_event_1, handle_extended_wait): Use it.
6078
02fc4de7
PA
60792010-04-30 Pedro Alves <pedro@codesourcery.com>
6080
6081 * linux-low.c (linux_kill_one_lwp, linux_kill)
6082 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
6083 (send_sigstop): Take an lwp_info as parameter instead. Queue a
6084 SIGSTOP even if the LWP is stopped.
6085 (send_sigstop_callback): New.
6086 (stop_all_lwps): Use send_sigstop_callback instead.
6087 (linux_resume_one_thread): Adjust.
6088 (proceed_one_lwp): Still proceed an LWP that the client has
6089 requested to stop, if we haven't reported it as stopped yet. Make
6090 sure that LWPs the client want stopped, have a pending SIGSTOP.
6091
bc3b5632
DE
60922010-04-26 Doug Evans <dje@google.com>
6093
ae1ada35
DE
6094 * server.c (handle_general_set): Make static.
6095
bc3b5632
DE
6096 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
6097 Print received char after testing for error/eof instead of before.
6098 (input_interrupt): Tweak comment.
6099
65730243
DE
61002010-04-23 Doug Evans <dje@google.com>
6101
6102 * server.c (start_inferior): Print inferior argv if --debug.
6103
a8ae7dc0
AR
61042010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
6105
6106 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
6107 * nto-x86-low.c: Include server.h
6108
1c07cc19
PM
61092010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
6110
6111 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
6112 be consistent with other sources of this directory.
6113 (init_registers_amd64): Correct name of source file of this function
6114 in the comment.
6115
e0a61e09
PM
61162010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6117
6118 * configure.srv (x86_64-*-mingw*): New configuration for Windows
6119 64-bit executables.
6120
54709339
PM
61212010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6122
6123 * win32-i386-low.c: Add 64-bit support.
6124 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
6125 (init_registers_amd64): Declare.
6126 (mappings): Add 64-bit version of array.
6127 (init_windows_x86): New function.
6128 (the_low_target): Change init_arch field to init_windows_x86.
6129
e8f0053d
PM
61302010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6131
6132 * win32-low.c: Adapt to support also 64-bit architecture.
6133 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
6134 (get_image_name): Use SIZE_T type for local variable `done'.
6135 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
6136 (toolhelp_get_dll_name): Idem.
6137 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
6138 Use uintptr_t typecast to avoid warning.
6139 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
6140 (handle_exception): Use phex_nz to avoid warning.
6141 (win32_wait): Remove unused local variable `process'.
6142
c481e77e
PM
61432010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6144
6145 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
6146 `amd64-avx.o'.
6147
12ea4b69
PM
61482010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
6149
6150 * configure.ac: Use `ws2_32' library for srv_mingw.
6151 * configure: Regenerate.
6152 * gdbreplay.c: Include winsock2.h instead of winsock.h.
6153 * remote-utils.c: Likewise.
6154
f6d1620c
L
61552010-04-17 H.J. Lu <hongjiu.lu@intel.com>
6156
6157 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
6158 if __x86_64__ is defined.
6159
8e642873
PM
61602010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6161
6162 * configure: Regenerate.
6163
711e434b
PM
61642010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6165
6166 * server.c (handle_query): Handle 'qGetTIBAddr' query.
6167 * target.h (target_ops): New get_tib_address field.
6168 * win32-low.h (win32_thread_info): Add thread_local_base field.
6169 * win32-low.c (child_add_thread): Add tlb argument.
6170 Set thread_local_base field to TLB.
6171 (get_child_debug_event): Adapt to child_add_thread change.
6172 (win32_get_tib_address): New function.
6173 (win32_target_ops): Set get_tib_address field to
6174 win32_get_tib_address.
6175 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
6176
505106cd
PA
61772010-04-12 Pedro Alves <pedro@codesourcery.com>
6178
505106cd
PA
6179 * linux-low.c (linux_mourn): Also remove the process.
6180 * server.c (handle_target_event): Don't remove the process here.
6181 * nto-low.c (nto_mourn): New.
6182 (nto_target_ops): Install it.
6183 * spu-low.c (spu_mourn): New.
6184 (spu_target_ops): Install it.
6185 * win32-low.c (win32_mourn): New.
6186 (win32_target_ops): Install it.
6187
e8470a06
PA
61882010-04-12 Pedro Alves <pedro@codesourcery.com>
6189
6190 * server.h (buffer_xml_printf): Remove redundant `;'.
6191
45ba0d02
PA
61922010-04-12 Pedro Alves <pedro@codesourcery.com>
6193
6194 * regcache.c (set_register_cache): Invalidate regcaches before
6195 changing the register cache layout.
6196 (regcache_invalidate_one): Allow a NULL regcache.
6197 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
6198 regcaches before changing the register cache layout or the target
6199 regsets.
6200
59e04013
L
62012010-04-12 H.J. Lu <hongjiu.lu@intel.com>
6202
6203 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
6204 variable warning on Linux/x86-64.
6205
8336d594
PA
62062010-04-11 Pedro Alves <pedro@codesourcery.com>
6207
6208 GDBserver disconnected tracing support.
6209
6210 * linux-low.c (linux_remove_process): Delete.
6211 (add_lwp): Don't set last_resume_kind here.
6212 (linux_kill): Use `mourn'.
6213 (linux_detach): Use `thread_db_detach', and `mourn'.
6214 (linux_mourn): New.
6215 (linux_attach_lwp_1): Adjust comment.
6216 (linux_attach): last_resume_kind moved the thread_info; adjust.
6217 (status_pending_p_callback): Adjust.
6218 (linux_wait_for_event_1): Adjust.
6219 (count_events_callback, select_singlestep_lwp_callback)
6220 (select_event_lwp_callback, cancel_breakpoints_callback)
6221 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
6222 (proceed_one_lwp): Adjust.
6223 (linux_async): Add debug output.
6224 (linux_thread_stopped): New.
6225 (linux_pause_all): New.
6226 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
6227 linux_pause_all.
6228 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
6229 (thread_db_free): Delete declaration.
6230 (thread_db_detach, thread_db_mourn): Declare.
6231 * thread-db.c (thread_db_init): Use thread_db_mourn.
6232 (thread_db_free): Delete, split in two.
6233 (disable_thread_event_reporting): New.
6234 (thread_db_detach): New.
6235 (thread_db_mourn): New.
6236
6237 * server.h (struct thread_info) <last_resume_kind>: New field.
6238 <attached>: Add comment.
6239 <gdb_detached>: New field.
6240 (handler_func): Change return type to int.
6241 (handle_serial_event, handle_target_event): Ditto.
6242 (gdb_connected): Declare.
6243 (tracing): Delete.
6244 (disconnected_tracing): Declare.
6245 (stop_tracing): Declare.
6246
6247 * server.c (handle_query) <qSupported>: Report support for
6248 disconnected tracing.
6249 (queue_stop_reply_callback): Account for running threads.
6250 (gdb_wants_thread_stopped): New.
6251 (gdb_wants_all_threads_stopped): New.
6252 (gdb_reattached_process): New.
6253 (handle_status): Clear the `gdb_detached' flag of all processes.
6254 In all-stop, stop all threads.
6255 (main): Be sure to leave tfind mode. Handle disconnected tracing.
6256 (process_serial_event): If the remote connection breaks, or if an
6257 exit was forced with "monitor exit", force an event loop exit.
6258 Handle disconnected tracing on detach.
6259 (handle_serial_event): Adjust.
6260 (handle_target_event): If GDB isn't connected, forward events back
6261 to the inferior, unless the last process exited, in which case,
6262 exit gdbserver. Adjust interface.
6263
6264 * remote-utils.c (remote_open): Don't block in accept. Instead
6265 register an event loop source on the listen socket file
6266 descriptor. Refactor bits into ...
6267 (listen_desc): ... this new global.
6268 (gdb_connected): ... this new function.
6269 (enable_async_notification): ... this new function.
6270 (handle_accept_event): ... this new function.
6271 (remote_close): Clear remote_desc.
6272
6273 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
6274
6275 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
6276 New fields.
6277 (mourn_inferior): Define.
6278 (target_process_qsupported): Avoid the dangling else problem.
6279 (thread_stopped): Define.
6280 (pause_all): Define.
6281 (target_waitstatus_to_string): Declare.
6282 * target.c (target_waitstatus_to_string): New.
6283
6284 * tracepoint.c (tracing): Make extern.
6285 (disconnected_tracing): New.
6286 (stop_tracing): Make extern. Handle tracing stops due to GDB
6287 disconnecting.
6288 (cmd_qtdisconnected): New.
6289 (cmd_qtstatus): Report disconnected tracing status in trace reply.
6290 (handle_tracepoint_general_set): Handle QTDisconnected.
6291
6292 * event-loop.c (event_handler_func): Change return type to int.
6293 (process_event): Bail out if the event handler wants the event
6294 loop to stop.
6295 (handle_file_event): Ditto.
6296 (start_event_loop): Bail out if the event handler wants the event
6297 loop to stop.
6298
6299 * nto-low.c (nto_target_ops): Adjust.
6300 * spu-low.c (spu_wait): Don't remove the process here.
6301 (spu_target_ops): Adjust.
6302 * win32-low.c (win32_wait): Don't remove the process here.
6303 (win32_target_ops): Adjust.
6304
5d267c4c
PA
63052010-04-11 Pedro Alves <pedro@codesourcery.com>
6306
6307 * regcache.c (realloc_register_cache): Invalidate inferior's
6308 regcache before recreating it.
6309
623ccd72
PA
63102010-04-09 Pedro Alves <pedro@codesourcery.com>
6311
6312 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
6313
219f2f23
PA
63142010-04-09 Stan Shebs <stan@codesourcery.com>
6315 Pedro Alves <pedro@codesourcery.com>
6316
6317 * server.h (LONGEST): New.
6318 (struct thread_info) <while_stepping>: New field.
6319 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
6320 Declare.
6321 (initialize_tracepoint, handle_tracepoint_general_set)
6322 (handle_tracepoint_query, tracepoint_finished_step)
6323 (tracepoint_was_hit, release_while_stepping_state_list):
6324 (current_traceframe): Declare.
6325 * server.c (handle_general_set): Handle tracepoint packets.
6326 (read_memory): New.
6327 (write_memory): New.
6328 (handle_search_memory_1): Use read_memory.
6329 (handle_query): Report support for conditional tracepoints, trace
6330 state variables, and tracepoint sources. Handle tracepoint
6331 queries.
6332 (main): Initialize the tracepoints module.
6333 (process_serial_event): Handle traceframe reads/writes.
6334
6335 * linux-low.c (handle_tracepoints): New.
6336 (linux_wait_1): Call it.
6337 (linux_resume_one_lwp): Handle while-stepping.
6338 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
6339 (linux_target_ops): Install them.
6340 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
6341 New field.
6342 * linux-x86-low.c (x86_supports_tracepoints): New.
6343 (the_low_target). Install it.
6344
6345 * mem-break.h (delete_breakpoint): Declare.
6346 * mem-break.c (delete_breakpoint): Make external.
6347
6348 * target.h (struct target_ops): Add `supports_tracepoints',
6349 `read_pc', and `write_pc' fields.
6350 (target_supports_tracepoints): Define.
6351 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
6352 (phex_nz): New.
6353
6354 * regcache.h (struct regcache) <registers_owned>: New field.
6355 (init_register_cache, regcache_cpy): Declare.
6356 (regcache_read_pc, regcache_write_pc): Declare.
6357 (register_cache_size): Declare.
6358 (supply_regblock): Declare.
6359 * regcache.c (init_register_cache): New.
6360 (new_register_cache): Use it.
6361 (regcache_cpy): New.
6362 (register_cache_size): New.
6363 (supply_regblock): New.
6364 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 6365
219f2f23
PA
6366 * tracepoint.c: New.
6367
6368 * Makefile.in (OBS): Add tracepoint.o.
6369 (tracepoint.o): New rule.
6370
3a13a53b
L
63712010-04-08 H.J. Lu <hongjiu.lu@intel.com>
6372
6373 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
6374 (i386-mmx.o): New.
6375 (i386-mmx.c): Likewise.
6376 (i386-mmx-linux.o): Likewise.
6377 (i386-mmx-linux.c): Likewise.
6378
6379 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
6380 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
6381 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
6382 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
6383
6384 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
6385 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
6386 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
6387
1570b33e
L
63882010-04-07 H.J. Lu <hongjiu.lu@intel.com>
6389
6390 * Makefile.in (clean): Updated.
6391 (i386-avx.o): New.
6392 (i386-avx.c): Likewise.
6393 (i386-avx-linux.o): Likewise.
6394 (i386-avx-linux.c): Likewise.
6395 (amd64-avx.o): Likewise.
6396 (amd64-avx.c): Likewise.
6397 (amd64-avx-linux.o): Likewise.
6398 (amd64-avx-linux.c): Likewise.
6399
6400 * configure.srv (srv_i386_regobj): Add i386-avx.o.
6401 (srv_i386_linux_regobj): Add i386-avx-linux.o.
6402 (srv_amd64_regobj): Add amd64-avx.o.
6403 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
6404 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
6405 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
6406 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
6407 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
6408 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
6409 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
6410
6411 * i387-fp.c: Include "i386-xstate.h".
6412 (i387_xsave): New.
6413 (i387_cache_to_xsave): Likewise.
6414 (i387_xsave_to_cache): Likewise.
6415 (x86_xcr0): Likewise.
6416
6417 * i387-fp.h (i387_cache_to_xsave): Likewise.
6418 (i387_xsave_to_cache): Likewise.
6419 (x86_xcr0): Likewise.
6420
6421 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
6422 * linux-crisv32-low.c (target_regsets): Likewise.
6423 * linux-m68k-low.c (target_regsets): Likewise.
6424 * linux-mips-low.c (target_regsets): Likewise.
6425 * linux-ppc-low.c (target_regsets): Likewise.
6426 * linux-s390-low.c (target_regsets): Likewise.
6427 * linux-sh-low.c (target_regsets): Likewise.
6428 * linux-sparc-low.c (target_regsets): Likewise.
6429 * linux-xtensa-low.c (target_regsets): Likewise.
6430
6431 * linux-low.c: Include <sys/uio.h>.
6432 (regsets_fetch_inferior_registers): Support nt_type.
6433 (regsets_store_inferior_registers): Likewise.
6434 (linux_process_qsupported): New.
6435 (linux_target_ops): Add linux_process_qsupported.
6436
6437 * linux-low.h (regset_info): Add nt_type.
6438 (linux_target_ops): Add process_qsupported.
6439
6440 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
6441 and <sys/uio.h>.
6442 (init_registers_i386_avx_linux): New.
6443 (init_registers_amd64_avx_linux): Likewise.
6444 (xmltarget_i386_linux_no_xml): Likewise.
6445 (xmltarget_amd64_linux_no_xml): Likewise.
6446 (PTRACE_GETREGSET): Likewise.
6447 (PTRACE_SETREGSET): Likewise.
6448 (x86_fill_xstateregset): Likewise.
6449 (x86_store_xstateregset): Likewise.
6450 (use_xml): Likewise.
6451 (x86_linux_update_xmltarget): Likewise.
6452 (x86_linux_process_qsupported): Likewise.
6453 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
6454 (x86_arch_setup): Don't call init_registers_amd64_linux nor
6455 init_registers_i386_linux here. Call
6456 x86_linux_update_xmltarget.
6457 (the_low_target): Add x86_linux_process_qsupported.
6458
6459 * server.c (handle_query): Call target_process_qsupported.
6460
6461 * target.h (target_ops): Add process_qsupported.
6462 (target_process_qsupported): New.
6463
fc7238bb
PA
64642010-04-03 Pedro Alves <pedro@codesourcery.com>
6465
6466 * inferiors.c (add_thread): Set last_status kind to
6467 TARGET_WAITKIND_IGNORE.
6468 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
6469 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
6470 (linux_wait_1): Move `thread' local definition to block that uses
6471 it. Don't NULL initialize `event_child'.
6472 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
6473 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
6474 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
6475
bdabb078
PA
64762010-04-01 Pedro Alves <pedro@codesourcery.com>
6477
6478 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
6479 an extended waitstatus, or by a watchpoint.
6480 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
6481 thread was stepping or has been stopped by a watchpoint.
6482
d3bbe7a0
PA
64832010-04-01 Pedro Alves <pedro@codesourcery.com>
6484
6485 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
6486 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
6487 of another, then delete the previous, and validate all
6488 breakpoints.
6489 (validate_inserted_breakpoint): New.
6490 (delete_disabled_breakpoints): New.
6491 (validate_breakpoints): New.
6492 (check_mem_read): Validate breakpoints before trusting their
6493 shadow. Delete disabled breakpoints.
6494 (check_mem_write): Validate breakpoints before trusting they
6495 should be inserted. Delete disabled breakpoints.
6496 * mem-break.h (validate_breakpoints):
6497 * server.c (handle_query): Validate breakpoints when we see a
6498 qSymbol query.
6499
8b07ae33
PA
65002010-04-01 Pedro Alves <pedro@codesourcery.com>
6501
6502 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
6503 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
6504 if we could tell there's a GDB breakpoint at stop_pc.
6505 (need_step_over_p): Don't do a step over if we find a GDB
6506 breakpoint at the resume PC.
6507
6508 * mem-break.c (struct raw_breakpoint): New.
6509 (enum bkpt_type): New type `gdb_breakpoint'.
6510 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
6511 fields. New field `raw'.
6512 (find_raw_breakpoint_at): New.
6513 (set_raw_breakpoint_at): Handle refcounting. Create a raw
6514 breakpoint instead.
6515 (set_breakpoint_at): Adjust.
6516 (delete_raw_breakpoint): New.
6517 (release_breakpoint): New.
6518 (delete_breakpoint): Rename to...
6519 (delete_breakpoint_1): ... this. Add proc parameter. Use
6520 release_breakpoint. Return ENOENT.
6521 (delete_breakpoint): Reimplement.
6522 (find_breakpoint_at): Delete.
6523 (find_gdb_breakpoint_at): New.
6524 (delete_breakpoint_at): Delete.
6525 (set_gdb_breakpoint_at): New.
6526 (delete_gdb_breakpoint_at): New.
6527 (gdb_breakpoint_here): New.
6528 (set_reinsert_breakpoint): Use release_breakpoint.
6529 (uninsert_breakpoint): Rename to ...
6530 (uninsert_raw_breakpoint): ... this.
6531 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
6532 (reinsert_raw_breakpoint): Change parameter type to
6533 raw_breakpoint.
6534 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
6535 instead.
6536 (check_breakpoints): Adjust. Use release_breakpoint.
6537 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
6538 (breakpoint_inserted_here): Ditto.
6539 (check_mem_read): Adjust to iterate over raw breakpoints instead.
6540 Don't trust the breakpoint's shadow if it is not inserted.
6541 (check_mem_write): Adjust to iterate over raw breakpoints instead.
6542 (delete_all_breakpoints): Adjust.
6543 (free_all_breakpoints): Mark all breakpoints as uninserted, and
6544 use delete_breakpoint_1.
6545
6546 * mem-break.h (breakpoints_supported): Delete declaration.
6547 (set_gdb_breakpoint_at): Declare.
6548 (gdb_breakpoint_here): Declare.
6549 (delete_breakpoint_at): Delete.
6550 (delete_gdb_breakpoint_at): Declare.
6551
6552 * server.h (struct raw_breakpoint): Forward declare.
6553 (struct process_info): New field `raw_breakpoints'.
6554
6555 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
6556 breakpoints.
6557
6bf5e0ba
PA
65582010-03-24 Pedro Alves <pedro@codesourcery.com>
6559
6560 * linux-low.c (status_pending_p_callback): Fix comment.
6561 (linux_wait_for_event_1): Move most of the internal breakpoint
6562 handling from here...
6563 (linux_wait_1): ... to here.
6564 (count_events_callback): New.
6565 (select_singlestep_lwp_callback): New.
6566 (select_event_lwp_callback): New.
6567 (cancel_breakpoints_callback): New.
6568 (select_event_lwp): New.
6569 (linux_wait_1): Simplify internal breakpoint handling. Give equal
6570 priority to all LWPs that have had events that should be reported
6571 to the client. Cancel breakpoints when about to reporting the
6572 event to the client, not while stopping lwps. No longer cancel
6573 finished single-steps here.
6574 (cancel_finished_single_step): Delete.
6575 (cancel_finished_single_steps): Delete.
6576
414a389f
PA
65772010-03-24 Pedro Alves <pedro@codesourcery.com>
6578
6579 * mem-break.c (enum bkpt_type): New.
6580 (struct breakpoint): New field `type'.
6581 (set_breakpoint_at): Change return type to struct breakpoint
6582 pointer. Set type to `other_breakpoint' by default.
6583 (delete_breakpoint): Rewrite, supporting more than one breakpoint
6584 in the breakpoint list.
6585 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
6586 (reinsert_breakpoint): Rename to ...
6587 (reinsert_raw_breakpoint): ... this.
6588 (reinsert_breakpoints_at): Adjust.
6589 * mem-break.h (struct breakpoint): Declare.
6590 (set_breakpoint_at): Change return type to struct breakpoint
6591 pointer.
6592
2280c721
PA
65932010-03-24 Pedro Alves <pedro@codesourcery.com>
6594
6595 * server.c (handle_query): Assign, not compare.
6596
d50171e4
PA
65972010-03-24 Pedro Alves <pedro@codesourcery.com>
6598
6599 Teach linux gdbserver to step-over-breakpoints.
6600
6601 * linux-low.c (can_hardware_single_step): New.
6602 (supports_breakpoints): New.
6603 (handle_extended_wait): If stopping threads, read the stop pc of
6604 the new cloned LWP.
6605 (get_pc): New.
6606 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
6607 low target doesn't support retrieving the PC.
6608 (add_lwp): Set last_resume_kind to resume_continue.
6609 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
6610 (linux_attach): Don't clear stop_expected. Set the lwp's
6611 last_resume_kind to resume_stop.
6612 (linux_detach_one_lwp): Don't check for removed breakpoints.
6613 (check_removed_breakpoint): Delete.
6614 (status_pending_p): Rename to ...
6615 (status_pending_p_callback): ... this. Don't check for removed
6616 breakpoints. Don't consider threads that are stopped from GDB's
6617 perspective.
6618 (linux_wait_for_lwp): Always read the stop_pc here.
6619 (cancel_breakpoint): New.
6620 (step_over_bkpt): New global.
6621 (linux_wait_for_event_1): Implement stepping over breakpoints.
6622 (gdb_wants_lwp_stopped): New.
6623 (gdb_wants_all_stopped): New.
6624 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
6625 single-step traps here. Store the thread's last reported target
6626 wait status.
6627 (send_sigstop): Don't clear stop_expected. Always set it,
6628 instead.
6629 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
6630 (cancel_finished_single_step): New.
6631 (cancel_finished_single_steps): New.
6632 (wait_for_sigstop): Don't cancel finished single-step traps here.
6633 (linux_resume_one_lwp): Don't check for removed breakpoints.
6634 Don't set `step' on non-hardware step archs.
6635 (linux_set_resume_request): Ignore resume_stop requests if already
6636 stopping or stopped. Set the lwp's last_resume_kind.
6637 (resume_status_pending_p): Don't check for removed breakpoints.
6638 (need_step_over_p): New.
6639 (start_step_over): New.
6640 (finish_step_over): New.
6641 (linux_resume_one_thread): Always queue a sigstop for resume_stop
6642 requests. Clear the thread's last reported target waitstatus.
6643 Don't use the `suspended' flag. Don't consider pending breakpoints.
6644 (linux_resume): Start a step-over if necessary.
6645 (proceed_one_lwp): New.
6646 (proceed_all_lwps): New.
6647 (unstop_all_lwps): New.
6648 * linux-low.h (struct lwp_info): Rewrite comment for the
6649 `suspended' flag. Add the `stop_pc' field. Delete the
6650 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
6651 Add `'last_resume_kind' and `need_step_over' fields.
6652 * inferiors.c (struct thread_info): Delete, moved elsewhere.
6653 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
6654 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
6655 (set_raw_breakpoint_at): New.
6656 (set_breakpoint_at): Rewrite to use it.
6657 (reinsert_breakpoint_handler): Delete.
6658 (set_reinsert_breakpoint): New.
6659 (reinsert_breakpoint_by_bp): Delete.
6660 (delete_reinsert_breakpoints): New.
6661 (uninsert_breakpoint): Rewrite.
6662 (uninsert_breakpoints_at): New.
6663 (reinsert_breakpoint): Rewrite.
6664 (reinsert_breakpoints_at): New.
6665 (check_breakpoints): Rewrite.
6666 (breakpoint_here): New.
6667 (breakpoint_inserted_here): New.
6668 (check_mem_read): Adjust.
6669 * mem-break.h (breakpoints_supported, breakpoint_here)
6670 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
6671 (reinsert_breakpoint_by_bp): Delete declaration.
6672 (delete_reinsert_breakpoints): Declare.
6673 (reinsert_breakpoint): Delete declaration.
6674 (reinsert_breakpoints_at): Declare.
6675 (uninsert_breakpoint): Delete declaration.
6676 (uninsert_breakpoints_at): Declare.
6677 (check_breakpoints): Adjust prototype.
6678 * server.h: Adjust include order.
6679 (struct thread_info): Declare here. Add a `last_status' field.
6680
30ba68cb
MS
66812010-03-23 Michael Snyder <msnyder@vmware.com>
6682
6683 * server.c (crc32): New function.
6684 (handle_query): Add handling for 'qCRC:' request.
6685
b9a881c2
PA
66862010-03-23 Pedro Alves <pedro@codesourcery.com>
6687
6688 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
6689 lwp had been stopped by a watchpoint.
6690
e92d13d5
PA
66912010-03-16 Pedro Alves <pedro@codesourcery.com>
6692
6693 * server.h (internal_error): Declare.
6694 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
6695 * utils.c (internal_error): New function.
6696
64daa791
AS
66972010-03-15 Andreas Schwab <schwab@redhat.com>
6698
6699 * configure.srv: Fix typo setting srv_regobj.
6700
f52cd8cd
PA
67012010-03-15 Pedro Alves <pedro@codesourcery.com>
6702
6703 * linux-low.c (fetch_register): Avoid passing a non string literal
6704 format to `error'.
6705 (usr_store_inferior_registers): Ditto.
6706
93ae6fdc
PA
67072010-03-14 Pedro Alves <pedro@codesourcery.com>
6708
6709 * linux-low.c (linux_write_memory): Bail out early if peeking
6710 memory failed.
6711
c3adc08c
PA
67122010-03-14 Pedro Alves <pedro@codesourcery.com>
6713
6714 * linux-low.h (struct lwp_info): New fields
6715 `stopped_by_watchpoint' and `stopped_data_address'.
6716 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
6717 here, and cache them in the lwp object.
6718 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
6719 directly.
6720 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
6721 field.
6722 (linux_stopped_by_watchpoint): Rewrite.
6723 (linux_stopped_data_address): Rewrite.
6724
bce522a2
PA
67252010-03-06 Simo Melenius <simo.melenius@iki.fi>
6726
6727 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
6728 switching the current inferior, not before.
6729
90884b2b
L
67302010-03-01 H.J. Lu <hongjiu.lu@intel.com>
6731
6732 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
6733 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
6734 i386-linux.c and amd64-linux.c.
6735 (reg-i386.o): Removed.
6736 (reg-i386.c): Likewise.
6737 (reg-i386-linux.o): Likewise.
6738 (reg-i386-linux.c): Likewise.
6739 (reg-x86-64.o): Likewise.
6740 (reg-x86-64.c): Likewise.
6741 (reg-x86-64-linux.o): Likewise.
6742 (reg-x86-64-linux.c): Likewise.
6743 (i386.o): New.
6744 (i386.c): Likewise.
6745 (i386-linux.o): Likewise.
6746 (i386-linux.c): Likewise.
6747 (amd64.o): Likewise.
6748 (amd64.c): Likewise.
6749 (amd64-linux.o): Likewise.
6750 (amd64-linux.c): Likewise.
6751
6752 * configure.srv (srv_i386_regobj): New.
6753 (srv_i386_linux_regobj): Likewise.
6754 (srv_amd64_regobj): Likewise.
6755 (srv_amd64_linux_regobj): Likewise.
6756 (srv_i386_32bit_xmlfiles): Likewise.
6757 (srv_i386_64bit_xmlfiles): Likewise.
6758 (srv_i386_xmlfiles): Likewise.
6759 (srv_amd64_xmlfiles): Likewise.
6760 (srv_i386_linux_xmlfiles): Likewise.
6761 (srv_amd64_linux_xmlfiles): Likewise.
6762 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
6763 srv_xmlfiles to $srv_i386_xmlfiles.
6764 (i[34567]86-*-mingw32ce*): Likewise.
6765 (i[34567]86-*-mingw*): Likewise.
6766 (i[34567]86-*-nto*): Likewise.
6767 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
6768 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
6769 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
6770 (x86_64-*-linux*): Likewise.
6771
6772 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
6773 (init_registers_amd64_linux): New.
6774 (x86_arch_setup): Replace init_registers_x86_64_linux with
6775 init_registers_amd64_linux.
6776
193f13e6
MK
67772010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
6778
6779 * configure.ac: Check for libdl. If it is not available link against
6780 static libthread_db.
6781 * configure: Regenerate.
6782
85d721b8
PA
67832010-02-22 Pedro Alves <pedro@codesourcery.com>
6784
6785 PR9605
6786
6787 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
6788 handing a read watchpoint.
6789 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
6790
6076632b
DE
67912010-02-12 Doug Evans <dje@google.com>
6792
6793 * linux-low.c (linux_supports_tracefork_flag): Document.
6794 (linux_look_up_symbols): Add comment.
6795
3327ccf7
L
67962010-02-03 H.J. Lu <hongjiu.lu@intel.com>
6797
6798 * regcache.c (supply_register): Clear regcache if buf is NULL.
6799
0718675c 68002010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 6801 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
6802
6803 * inferiors.c (find_inferior): Add function documentation.
6804 (unloaded_dll): Handle the case where the unloaded dll has not
6805 been previously registered in the dll list.
6806
177321bd
DJ
68072010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
6808
6809 * linux-arm-low.c (thumb_breakpoint_len): Delete.
6810 (thumb2_breakpoint): New.
6811 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
6812
2b009048
DJ
68132010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
6814
6815 * linux-low.c (get_stop_pc): Check for SIGTRAP.
6816 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
6817 breakpoints.
6818
3be029c7
PA
68192010-01-21 Pedro Alves <pedro@codesourcery.com>
6820
6821 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
6822
18f5de3b
JK
68232010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6824
6825 * linux-s390-low.c (s390_collect_ptrace_register)
6826 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
6827
3743bb4f
DE
68282010-01-21 Doug Evans <dje@google.com>
6829
14ce3065
DE
6830 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
6831 (PTRACE_ARG4_TYPE): New macro.
6832 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
6833 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
6834 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
6835 (usr_store_inferior_registers): Ditto.
6836 (linux_read_memory, linux_write_memory): Ditto.
6837 (linux_test_for_tracefork): Ditto.
6838
3743bb4f
DE
6839 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
6840 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
6841
8b315be5
PA
68422010-01-21 Pedro Alves <pedro@codesourcery.com>
6843
6844 * proc-service.c (ps_lgetregs): Don't refetch registers from the
6845 target.
6846
85492558
PA
68472010-01-21 Pedro Alves <pedro@codesourcery.com>
6848
6849 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
6850 prototype to take a regcache. Adjust.
6851
442ea881
PA
68522010-01-20 Pedro Alves <pedro@codesourcery.com>
6853
6854 * regcache.h (struct thread_info): Forward declare.
6855 (struct regcache): New.
6856 (new_register_cache): Adjust prototype.
6857 (get_thread_regcache): Declare.
6858 (free_register_cache): Adjust prototype.
6859 (registers_to_string, registers_from_string): Ditto.
6860 (supply_register, supply_register_by_name, collect_register)
6861 (collect_register_as_string, collect_register_by_name): Ditto.
6862 * regcache.c (struct inferior_regcache_data): Delete.
6863 (get_regcache): Rename to ...
6864 (get_thread_regcache): ... this. Adjust. Switch inferior before
6865 fetching registers.
6866 (regcache_invalidate_one): Adjust.
6867 (regcache_invalidate): Fix prototype.
6868 (new_register_cache): Return the new register cache.
6869 (free_register_cache): Change prototype.
6870 (realloc_register_cache): Adjust.
6871 (registers_to_string): Change prototype to take a regcache. Adjust.
6872 (registers_from_string): Ditto.
6873 (register_data): Ditto.
6874 (supply_register): Ditto.
6875 (supply_register_by_name): Ditto.
6876 (collect_register): Ditto.
6877 (collect_register_as_string): Ditto.
6878 (collect_register_by_name): Ditto.
6879 * server.c (process_serial_event): Adjust.
6880 * linux-low.h (regset_fill_func, regset_store_func): Change
6881 prototype.
6882 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
6883 Change prototype.
6884 * linux-low.c (get_stop_pc): Adjust.
6885 (check_removed_breakpoint): Adjust.
6886 (linux_wait_for_event): Adjust.
6887 (linux_resume_one_lwp): Adjust.
6888 (fetch_register): Add regcache parameter. Adjust.
6889 (usr_store_inferior_registers): Ditto.
6890 (regsets_fetch_inferior_registers): Ditto.
6891 (regsets_store_inferior_registers): Ditto.
6892 (linux_fetch_registers, linux_store_registers): Ditto.
6893 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
6894 regcache. Adjust.
43aaf8b6
PA
6895 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
6896 Ditto.
442ea881
PA
6897 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
6898 prototype to take a regcache.
6899 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
6900 * remote-utils.c (convert_ascii_to_int, outreg)
6901 (prepare_resume_reply): Change prototype to take a regcache.
6902 Adjust.
6903 * target.h (struct target_ops) <fetch_registers, store_registers>:
6904 Change prototype to take a regcache.
6905 (fetch_inferior_registers, store_inferior_registers): Change
6906 prototype to take a regcache. Adjust.
6907 * proc-service.c (ps_lgetregs): Adjust.
6908 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
6909 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
6910 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
6911 take a regcache. Adjust.
6912 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
6913 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
6914 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
6915 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
6916 * linux-cris-low.c (cris_get_pc, cris_set_pc)
6917 (cris_cannot_fetch_register):
6918 (cris_breakpoint_at): Change prototype to take a regcache.
6919 Adjust.
6920 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
6921 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
6922 to take a regcache. Adjust.
6923 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
6924 Adjust.
6925 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
6926 take a regcache. Adjust.
6927 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
6928 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
6929 (m68k_set_pc): Change prototype to take a regcache. Adjust.
6930 * linux-mips-low.c (mips_get_pc):
6931 (mips_set_pc): Change prototype to take a regcache. Adjust.
6932 (mips_reinsert_addr): Adjust.
6933 (mips_collect_register): Change prototype to take a regcache.
6934 Adjust.
6935 (mips_supply_register):
6936 (mips_collect_register_32bit, mips_supply_register_32bit)
6937 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
6938 (mips_store_fpregset): Ditto.
43aaf8b6
PA
6939 * linux-ppc-low.c (ppc_supply_ptrace_register)
6940 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
6941 (parse_spufs_run): Adjust.
6942 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
6943 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
6944 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
6945 take a regcache. Adjust.
6946 * linux-s390-low.c (s390_collect_ptrace_register)
6947 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
6948 (s390_set_pc): Change prototype to take a regcache. Adjust.
6949 (s390_arch_setup): Adjust.
6950 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
6951 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
6952 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
6953 (sparc_fill_gregset, sparc_store_gregset_from_stack)
6954 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
6955 regcache. Adjust.
6956 (sparc_breakpoint_at): Adjust.
6957 * linux-xtensa-low.c (xtensa_fill_gregset):
6958 (xtensa_store_gregset):
6959 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
6960 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
6961 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
6962 prototype to take a regcache. Adjust.
6963 * win32-arm-low.c (arm_fetch_inferior_register)
6964 (arm_store_inferior_register): Change prototype to take a
6965 regcache. Adjust.
6966 * win32-i386-low.c (i386_fetch_inferior_register)
6967 (i386_store_inferior_register): Change prototype to take a
6968 regcache. Adjust.
6969 * win32-low.c (child_fetch_inferior_registers)
6970 (child_store_inferior_registers): Change prototype to take a
6971 regcache. Adjust.
6972 (win32_wait): Adjust.
6973 (win32_fetch_inferior_registers): Change prototype to take a
6974 regcache. Adjust.
6975 (win32_store_inferior_registers): Adjust.
6976 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
6977 store_inferior_register>: Change prototype to take a regcache.
6978
60c3d7b0
DE
69792010-01-20 Doug Evans <dje@google.com>
6980
6981 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
6982 #ifdef.
6983 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 6984 (W_STOPCODE): Provide definition if missing.
60c3d7b0 6985
dc146f7c
VP
69862010-01-13 Vladimir Prus <vladimir@codesourcery.com>
6987
6988 * linux-low.c (linux_core_of_thread): New.
6989 (compare_ints, show_process, list_threads): New.
6990 (linux_qxfer_osdata): Report threads and cores.
6991 (linux_target_op): Register linux_core_of_thread.
6992 * remote-utils.c (prepare_resume_reply): Report the core.
6993 (buffer_xml_printf): Support %d specifier.
6994 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
6995 New.
6996 (handle_query): Handle qXfer:threads. Announce availability
6997 thereof.
6998 * target.h (struct target_ops): New field core_of_thread.
6999
7803799a
UW
70002010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
7001
7002 * Makefile.in (clean): Remove new generated files.
7003 (reg-s390.o, reg-s390.c): Remove rules.
7004 (reg-s390x.o, reg-s390x.c): Likewise.
7005 (s390-linux32.o, s390-linux32.c): Add rules.
7006 (s390-linux64.o, s390-linux64.c): Likewise.
7007 (s390x-linux64.o, s390x-linux64.c): Likewise.
7008 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7009 * linux-s390-low.c: Include <elf.h>.
7010 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7011 (init_registers_s390): Remove prototype.
7012 (init_registers_s390x): Likewise.
7013 (init_registers_s390_linux32): Add prototype.
7014 (init_registers_s390_linux64): Likewise.
7015 (init_registers_s390x_linux64): Likewise.
7016 (s390_num_regs_3264): New define.
7017 (s390_regmap_3264): New global variable.
7018 (s390_cannot_fetch_register): Remove obsolete check.
7019 (s390_cannot_store_register): Likewise.
7020 (s390_collect_ptrace_register): Handle upper/lower register halves.
7021 (s390_supply_ptrace_register): Likewise.
7022 (s390_fill_gregset): Update to register number changes.
7023 (s390_get_hwcap): New routine.
7024 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7025 Install appropriate regmap and register set.
7026
6e7ffa39
JB
70272010-01-01 Joel Brobecker <brobecker@adacore.com>
7028
7029 * server.c (gdbserver_version): Update copyright year to 2010.
7030 * gdbreplay.c (gdbreplay_version): Likewise.
7031
957f3f49
DE
70322009-12-28 Doug Evans <dje@google.com>
7033
7034 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7035 elf/external.h. Include <elf.h> instead but only if necessary.
7036
ca5c370d
PA
70372009-12-28 Pedro Alves <pedro@codesourcery.com>
7038
7039 * linux-low.c (linux_remove_process): Remove `detaching'
7040 parameter. Don't release/detach from thread_db here.
7041 (linux_kill): Release/detach from thread_db here, ...
7042 (linux_detach): ... and here, before actually detaching.
7043 (linux_wait_1): ... and here, when a process exits.
7044 * thread-db.c (any_thread_of): New.
7045 (thread_db_free): Switch the current inferior to a thread of the
7046 passed in process.
7047
4ee62156
DE
70482009-12-21 Doug Evans <dje@google.com>
7049
d90e6a88
DE
7050 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7051
c5f62d5f
DE
7052 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7053 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7054 warning ifndef __NR_tkill. Move setting of errno there too.
7055 Delete unnecessary resetting of errno after syscall.
7056 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7057
10e86dd7
DE
7058 * configure.ac: Check for dladdr.
7059 * config.in: Regenerate.
7060 * configure: Regenerate.
7061 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7062 (try_thread_db_load): Update.
7063
4ee62156
DE
7064 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7065
00f515da
DE
70662009-12-18 Doug Evans <dje@google.com>
7067
e9464885
DE
7068 * event-loop.c: Include unistd.h if it exists.
7069
07d4f67e
DE
7070 * linux-low.c (my_waitpid): Move definition away from being in
7071 between linux_tracefork_child/linux_test_for_tracefork.
7072
00f515da
DE
7073 * gdb_proc_service.h (psaddr_t): Fix type.
7074 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7075 signature to match glibc.
7076
1de1badb
DE
70772009-12-16 Doug Evans <dje@google.com>
7078
7079 * linux-low.c (linux_read_memory): Fix argument to read.
7080
aeeb81d1
PA
70812009-11-26 Pedro Alves <pedro@codesourcery.com>
7082
7083 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
7084 events, don't leave current_inferior pointing at null.
7085
10357975
PA
70862009-11-26 Pedro Alves <pedro@codesourcery.com>
7087
7088 * win32-low.c (LOG): Delete.
7089 (OUTMSG): Output to stderr.
7090 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
7091 on compile time LOG macro.
7092 (win32_wait): Fix debug output.
7093
cf6e3471
PA
70942009-11-26 Pedro Alves <pedro@codesourcery.com>
7095
7096 * win32-low.c (win32_add_one_solib): If the dll name is
7097 "ntdll.dll", prepend the system directory to the dll path.
7098
0c85e18e
MK
70992009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
7100
7101 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
7102
9ac544ce 71032009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 7104 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
7105
7106 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
7107 * configure.ac: Check for __mcoldfire__ and set
7108 gdb_cv_m68k_is_coldfire.
7109 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
7110 reg-cf.o and reg-m68k.o.
7111 * configure: Regenerated.
7112
fd7dd3e6
PA
71132009-11-16 Pedro Alves <pedro@codesourcery.com>
7114
7115 * linux-low.c (linux_remove_process): Add `detaching' parameter.
7116 Pass it to thread_db_free.
7117 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
7118 proper `detaching' argument to linux_remove_process.
7119 * linux-low.h (thread_db_free): Add `detaching' parameter.
7120 * thread-db.c (thread_db_init): Pass false as `detaching' argument
7121 to thread_db_free.
7122 (thread_db_free): Add `detaching' parameter. Only
7123 call td_ta_clear_event if detaching from process.
7124
75aa492e
MK
71252009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
7126
7127 * thread-db.c (thread_db_free): Fix typo.
7128
21e1bee4
PP
71292009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
7130
7131 PR gdb/10838
7132 * thread-db.c (thread_db_free): Call td_ta_clear_event.
7133
8838b45e
NS
71342009-11-03 Nathan Sidwell <nathan@codesourcery.com>
7135
7136 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
7137 with an i686 compiler.
7138 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
7139 needed.
7140 * configure: Rebuilt.
7141
8a35fb51
SL
71422009-10-29 Sandra Loosemore <sandra@codesourcery.com>
7143
7144 PR gdb/10783
7145
7146 * server.c (handle_search_memory_1): Correct read_addr initialization
7147 in loop for searching subsequent chunks.
7148
96f15937
PP
71492009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
7150
7151 * configure.ac: New --with-libthread-db option.
7152 * thread-db.c: Allow direct dependence on libthread_db.
7153 (thread_db_free): Adjust.
7154 * config.in: Regenerate.
7155 * configure: Likewise.
889bf7c5 7156
5f7d1694
PP
71572009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
7158
7159 PR gdb/10757
7160 * thread-db.c (attach_thread): New function.
7161 (maybe_attach_thread): Return success/failure.
7162 (find_new_threads_callback): Adjust.
889bf7c5
PA
7163 (thread_db_find_new_threads): Loop until no new threads.
7164
88e3b899
PA
71652009-10-13 Pedro Alves <pedro@codesourcery.com>
7166
7167 * proc-service.c (ps_lgetregs): Formatting.
7168
cdbfd419
PP
71692009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
7170
7171 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
7172 * configure.ac: Adjust.
7173 * linux-low.h (struct process_info_private): Move members to struct
7174 thread_db.
7175 (thread_db_free, thread_db_handle_monitor_command): New prototype.
7176 * linux-low.c (linux_remove_process): Adjust.
7177 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
7178 * server.c (handle_query): Move code ...
7179 (handle_monitor_command): ... here. New function.
7180 * target.h (struct target_ops): New member.
7181 * thread-db.c (struct thread_db): New.
7182 (libthread_db_search_path): New variable.
7183 (thread_db_create_event, thread_db_enable_reporting)
7184 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
7185 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
7186 (try_thread_db_load_1, dladdr_to_soname): New functions.
7187 (try_thread_db_load, thread_db_load_search): New functions.
7188 (thread_db_init): Search for libthread_db.
7189 (thread_db_free): New function.
7190 (thread_db_handle_monitor_command): Likewise.
7191 * config.in: Regenerate.
7192 * configure: Regenerate.
889bf7c5 7193
4168d2d6
UW
71942009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
7195
7196 * spu-low.c (spu_kill): Wait for inferior to terminate.
7197 Call clear_inferiors.
7198 (spu_detach): Call clear_inferiors.
7199
81ecdfbb
RW
72002009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7201
7202 * aclocal.m4: Regenerate.
7203 * config.in: Likewise.
7204 * configure: Likewise.
7205
0b9ff2c0
UW
72062009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7207
7208 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
7209 (parse_spufs_run): New function.
7210 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
7211 (ppc_breakpoint_at): Handle SPU breakpoints.
7212
efcbbd14
UW
72132009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7214
7215 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
7216 (SPUFS_MAGIC): Define.
7217 (spu_enumerate_spu_ids): New function.
7218 (linux_qxfer_spu): New function.
7219 (linux_target_ops): Install linux_qxfer_spu.
7220
f4d9bade
UW
72212009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7222
7223 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
7224 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
7225 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
7226 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
7227 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
7228 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
7229 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
7230 (init_registers_powerpc_cell32l): Add prototype.
7231 (init_registers_powerpc_cell64l): Likewise.
7232 (ppc_arch_setup): Detect Cell/B.E. architecture.
7233
96e946ca
RW
72342009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7235
7236 * Makefile.in (datarootdir): New variable.
7237
58d6951d
DJ
72382009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7239
7240 * linux-low.c (linux_write_memory): Update debugging output.
7241 * Makefile.in (clean): Add new descriptions.
7242 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
7243 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
7244 * configure.srv: Add new files for arm*-*-linux*.
7245 * linux-arm-low.c: Add new declarations.
7246 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
7247 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
7248 (HWCAP_VFPv3D16): New.
7249 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
7250 instead of __IWMMXT__.
7251 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
7252 (arm_arch_setup): New.
7253 (target_regsets): Remove #ifdef. Add VFP regset.
7254 (the_low_target): Use arm_arch_setup.
7255
12b42a12
DJ
72562009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7257
7258 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
7259 the main thread again.
7260
ac8c974e
AR
72612009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
7262
7263 Adding Neutrino gdbserver.
7264 * configure: Regenerated.
7265 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
7266 * configure.srv (i[34567]86-*-nto*): New target.
7267 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
7268 * remote-utils.c [__QNX__]: Include sys/iomgr.h
7269 (nto_comctrl) [__QNX__]: New function.
7270 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
7271
4424e0c3 72722009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
7273
7274 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
7275 srv_tgtobj.
7276
912cf4ba
PA
72772009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
7278 Pedro Alves <pedro@codesourcery.com>
7279
7280 * win32-i386-low.c (i386_get_thread_context): Handle systems that
7281 don't support CONTEXT_EXTENDED_REGISTERS.
7282 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
7283 (the_low_target): Install them.
7284 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
7285 failing with ERROR_PIPE_NOT_CONNECTED.
7286
aa5ca48f
DE
72872009-06-30 Doug Evans <dje@google.com>
7288 Pierre Muller <muller@ics.u-strasbg.fr>
7289
7290 Add h/w watchpoint support to x86-linux, win32-i386.
7291 * Makefile.in (SFILES): Add i386-low.c
7292 (i386_low_h): Define.
7293 (i386-low.o): Add dependencies.
7294 (linux-x86-low.o): Add i386-low.h dependency.
7295 (win32-i386-low.o): Ditto.
7296 * i386-low.c: New file.
7297 * i386-low.h: New file.
7298 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
7299 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
7300 * linux-low.c (linux_add_process): Initialize arch_private.
7301 (linux_remove_process): Free arch_private.
7302 (add_lwp): Initialize arch_private.
7303 (delete_lwp): Free arch_private.
7304 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
7305 provided.
7306 * linux-low.h (process_info_private): New member arch_private.
7307 (lwp_info): New member arch_private.
7308 (linux_target_ops): New members new_process, new_thread,
7309 prepare_to_resume.
7310 (ptid_of): New macro.
7311 * linux-x86-low.c: Include stddef.h, i386-low.h.
7312 (arch_process_info): New struct.
7313 (arch_lwp_info): New struct.
7314 (x86_linux_dr_get, x86_linux_dr_set): New functions.
7315 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7316 (i386_dr_low_get_status): New function.
7317 (x86_insert_point, x86_remove_point): New functions.
7318 (x86_stopped_by_watchpoint): New function.
7319 (x86_stopped_data_address): New function.
7320 (x86_linux_new_process, x86_linux_new_thread): New functions.
7321 (x86_linux_prepare_to_resume): New function.
7322 (the_low_target): Add entries for insert_point, remove_point,
7323 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
7324 prepare_to_resume.
7325 * server.c (debug_hw_points): New global.
7326 (monitor_show_help): Document set debug-hw-points.
7327 (handle_query): Process "set debug-hw-points".
7328 * server.h (debug_hw_points): Declare.
7329 (paddress): Declare.
7330 * utils.c (NUMCELLS, CELLSIZE): New macros.
7331 (get_sell, xsnprintf, paddress): New functions.
7332 * win32-arm-low.c (the_low_target): Add entries for insert_point,
7333 remove_point, stopped_by_watchpoint, stopped_data_address.
7334 * win32-i386-low.c: Include i386-low.h.
7335 (debug_reg_state): Replaces dr.
7336 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7337 (i386_dr_low_get_status): New function.
7338 (i386_insert_point, i386_remove_point): New functions.
7339 (i386_stopped_by_watchpoint): New function.
7340 (i386_stopped_data_address): New function.
7341 (i386_initial_stuff): Update.
7342 (get_thread_context,set_thread_context,i386_thread_added): Update.
7343 (the_low_target): Add entries for insert_point,
7344 remove_point, stopped_by_watchpoint, stopped_data_address.
7345 * win32-low.c (win32_insert_watchpoint): New function.
7346 (win32_remove_watchpoint): New function.
7347 (win32_stopped_by_watchpoint): New function.
7348 (win32_stopped_data_address): New function.
7349 (win32_target_ops): Add entries for insert_watchpoint,
7350 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
7351 * win32-low.h (win32_target_ops): New members insert_point,
7352 remove_point, stopped_by_watchpoint, stopped_data_address.
7353
d993e290
PA
73542009-06-25 Pedro Alves <pedro@codesourcery.com>
7355
7356 * server.c (process_serial_event): Re-return unsupported, not
7357 error, if the type isn't recognized. Re-allow supporting only
7358 insert or remove packets. Also call require_running for
7359 breakpoints. Add missing break statement to default case. Tidy.
7360 * target.h (struct target_ops): Rename insert_watchpoint to
7361 insert_point, and remove_watchpoint to remove_point.
7362
7363 * linux-low.h (struct linux_target_ops): Likewise.
7364 * linux-low.c (linux_insert_watchpoint): Rename to ...
7365 (linux_insert_point): ... this. Adjust.
7366 (linux_remove_watchpoint): Rename to ...
7367 (linux_remove_point): ... this. Adjust.
7368 (linux_target_ops): Adjust.
7369 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
7370 (cris_insert_point): ... this.
7371 (cris_remove_watchpoint): Rename to ...
7372 (cris_remove_point): ... this.
7373 (the_low_target): Adjust.
7374
0f54c268
PM
73752009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
7376
7377 * server.c (handle_v_kill): Pass signal_pid to
7378 kill_inferior if multi_process is zero.
7379
c6314022
AR
73802009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
7381
7382 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
7383 * target.h (target_ops): Comment for *_watchpoint to make it clear
7384 the functions can get types '0' and '1'.
7385
4463ce24
AR
73862009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
7387
7388 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
7389 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
7390 * regcache.c (get_regcache): Likewise.
7391 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
7392 * win32-low.c (child_fetch_inferior_registers): Remove check for
7393 regno 0.
7394
cf8fd78b
PA
73952009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
7396 Pedro Alves <pedro@codesourcery.com>
7397
7398 * target.h (struct target_ops) <supports_multi_process>: New
7399 callback.
7400 (target_supports_multi_process): New.
7401 * server.c (handle_query): Even if GDB reports support, only
7402 enable multi-process if the target also supports it. Report
7403 multi-process support only if the target backend supports it.
7404 * linux-low.c (linux_supports_multi_process): New function.
7405 (linux_target_ops): Install it as target_supports_multi_process
7406 callback.
7407
47c0c975
DE
74082009-05-24 Doug Evans <dje@google.com>
7409
e09875d4
DE
7410 Global renaming of find_thread_pid to find_thread_ptid.
7411 * server.h (find_thread_ptid): Renamed from find_thread_pid.
7412 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
7413 All callers updated.
7414
e27d73f6
DE
7415 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
7416 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
7417 directly.
7418
47c0c975
DE
7419 * linux-low.c (get_stop_pc): Print pc if debug_threads.
7420 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
7421 (linux_resume_one_lwp): Ditto.
7422
2acc282a
DE
74232009-05-23 Doug Evans <dje@google.com>
7424
7425 * linux-low.c (linux_resume_one_lwp): Change type of first arg
7426 from struct inferior_list_entry * to struct lwp_info *.
7427 All callers updated.
7428
9f1036c1
DE
74292009-05-13 Doug Evans <dje@google.com>
7430
7431 * linux-x86-low.c: Don't include assert.h.
7432 (x86_siginfo_fixup): Use fatal, not assert.
7433 (x86_arch_setup): Fix comment.
7434
d0722149
DE
74352009-05-12 Doug Evans <dje@google.com>
7436
7437 Biarch support for i386/amd64 gdbserver.
7438 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
7439 Add linux-x86-low.c.
7440 (linux-i386-low.o, linux-x86-64-low.o): Delete.
7441 (linux-x86-low.o): Add.
7442 * linux-x86-64-low.c: Delete.
7443 * linux-i386-low.c: Delete.
7444 * linux-x86-low.c: New file.
7445 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
7446 linux-x86-low.o.
7447 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
7448 linux-x86-low.o.
7449 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
7450 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
7451 (linux_child_pid_to_exec_file): New function.
7452 (elf_64_header_p, elf_64_file_p): New functions.
7453 (siginfo_fixup): New function.
7454 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
7455 give target a chance to convert layout.
7456 * linux-low.h (linux_target_ops): New member siginfo_fixup.
7457 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
7458
fdeb2a12
DE
74592009-05-07 Doug Evans <dje@google.com>
7460
7461 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
7462 (regsets_store_inferior_registers): Ditto.
7463
a6dbe5df
PA
74642009-05-06 Pedro Alves <pedro@codesourcery.com>
7465
7466 PR server/10048
7467
7468 * linux-low.c (must_set_ptrace_flags): Delete.
7469 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
7470 of the global.
7471 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
7472 `lwp->must_set_ptrace_flags' instead.
ba42693b 7473 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
7474 (linux_wait_1): ... not here.
7475
5091eb23
DE
74762009-04-30 Doug Evans <dje@google.com>
7477
9f767825
DE
7478 * inferiors.c (started_inferior_callback): New function.
7479 (attached_inferior_callback): New function.
7480 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
7481 * server.c (print_started_pid, print_attached_pid): New functions.
7482 (detach_or_kill_for_exit): New function.
7483 (main): Call it instead of for_each_inferior (kill_inferior_callback).
7484 * server.h (have_started_inferiors_p): Declare.
7485 (have_attached_inferiors_p): Declare.
7486
5091eb23
DE
7487 * inferiors.c (remove_process): Fix memory leak, free process.
7488 * linux-low.c (linux_remove_process): New function.
7489 (linux_kill): Call it instead of remove_process.
7490 (linux_detach, linux_wait_1): Ditto.
7491
155c8968
PA
74922009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
7493
7494 * configure.srv: Add x86 Windows CE target.
7495
7fe519cb
UW
74962009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7497
7498 * inferiors.c (get_thread_process): Make global.
7499 * server.h (get_thread_process): Add prototype.
7500 * thread-db.c (find_one_thread): Use get_thread_process
7501 instead of current_process.
7502 (thread_db_get_tls_address): Do not crash if called when
7503 thread layer is not yet initialized.
7504
5472f405
UW
75052009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7506
7507 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
7508 * spu-low.c (current_tid): Rename to ...
7509 (current_ptid): ... this.
7510 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
7511 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
7512 ptid_get_lwp (current_ptid) instead of current_tid.
7513 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
7514 instead of current_tid. Use find_process_pid to verify pid
7515 argument is valid. Pass proper argument to remove_process.
7516 (spu_thread_alive): Compare current_ptid instead of current_tid.
7517 (spu_resume): Likewise.
7518
55ac2b99
PA
75192009-04-02 Pedro Alves <pedro@codesourcery.com>
7520
7521 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
7522 variable.
7523
95954743
PA
75242009-04-01 Pedro Alves <pedro@codesourcery.com>
7525
7526 Implement the multiprocess extensions, and add linux multiprocess
7527 support.
7528
7529 * server.h (ULONGEST): Declare.
7530 (struct ptid, ptid_t): New.
7531 (minus_one_ptid, null_ptid): Declare.
7532 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7533 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
7534 (struct inferior_list_entry): Change `id' type from unsigned from
7535 to ptid_t.
7536 (struct sym_cache, struct breakpoint, struct
7537 process_info_private): Forward declare.
7538 (struct process_info): Declare.
7539 (current_process): Declare.
7540 (all_processes): Declare.
7541 (initialize_inferiors): Declare.
7542 (add_thread): Adjust to use ptid_t.
7543 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
7544 (add_process, remove_process, find_thread_pid): Declare.
7545 (find_inferior_id): Adjust to use ptid_t.
7546 (cont_thread, general_thread, step_thread): Change type to ptid_t.
7547 (multi_process): Declare.
7548 (push_event): Adjust to use ptid_t.
7549 (read_ptid, write_ptid): Declare.
7550 (prepare_resume_reply): Adjust to use ptid_t.
7551 (clear_symbol_cache): Declare.
7552 * inferiors.c (all_processes): New.
7553 (null_ptid, minus_one_ptid): New.
7554 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7555 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
7556 (add_thread): Change unsigned long to ptid. Remove gdb_id
7557 parameter. Adjust.
7558 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
7559 (gdb_id_to_thread): Rename to ...
7560 (find_thread_pid): ... this. Change unsigned long to ptid.
7561 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
7562 (loaded_dll, pull_pid_from_list): Adjust.
7563 (add_process, remove_process, find_process_pid)
7564 (get_thread_process, current_process, initialize_inferiors): New.
7565 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
7566 (struct target_waitstatus) <related_pid>: Ditto.
7567 (struct target_ops) <kill, detach>: Add `pid' argument. Change
7568 return type to int.
7569 (struct target_ops) <join>: Add `pid' argument.
7570 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
7571 (struct target_ops) <wait>: Add `ptid' field. Change return type
7572 to ptid.
7573 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
7574 (mywait): Add `ptid' argument. Change return type to ptid_t.
7575 (target_pid_to_str): Declare.
7576 * target.c (set_desired_inferior): Adjust to use ptids.
7577 (mywait): Add new `ptid' argument. Adjust.
7578 (target_pid_to_str): New.
7579 * mem-break.h (free_all_breakpoints): Declare.
7580 * mem-break.c (breakpoints): Delelete.
7581 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
7582 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
7583 to use per-process breakpoint list.
7584 (free_all_breakpoints): New.
7585 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
7586 (symbol_cache, all_symbols_looked_up): Delete.
7587 (hexchars): New.
7588 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
7589 read_ptid): New.
7590 (prepare_resume_reply): Change ptid argument's type from unsigned
7591 long to ptid_t. Adjust. Implement W;process and X;process.
7592 (free_sym_cache, clear_symbol_cache): New.
7593 (look_up_one_symbol): Adjust to per-process symbol cache. *
7594 * server.c (cont_thread, general_thread, step_thread): Change type
7595 to ptid_t.
7596 (attached): Delete.
7597 (multi_process): New.
7598 (last_ptid): Change type to ptid_t.
7599 (struct vstop_notif) <ptid>: Change type to ptid_t.
7600 (queue_stop_reply, push_event): Change `ptid' argument's type to
7601 ptid_t.
7602 (discard_queued_stop_replies): Add `pid' argument.
7603 (start_inferior): Adjust to use ptids. Adjust to mywait interface
7604 changes. Don't reference the `attached' global.
7605 (attach_inferior): Adjust to mywait interface changes.
7606 (handle_query): Adjust to use ptids. Parse GDB's qSupported
7607 features. Handle and report "multiprocess+". Handle
7608 "qAttached:PID".
7609 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
7610 changes.
7611 (handle_v_kill): New.
7612 (handle_v_stopped): Adjust to use target_pid_to_str.
7613 (handle_v_requests): Allow multiple attaches and runs when
7614 multiprocess extensions are in effect. Handle "vKill".
7615 (myresume): Adjust to use ptids.
7616 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
7617 (handle_status): Adjust to discard_queued_stop_replies interface
7618 change.
7619 (first_thread_of, kill_inferior_callback)
7620 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
7621 (main): Call initialize_inferiors. Adjust to use ptids, killing
7622 and detaching from all inferiors. Handle multiprocess packet
7623 variants.
7624 * linux-low.h: Include gdb_proc_service.h.
7625 (struct process_info_private): New.
7626 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
7627 <lwpid_of>: Use ptid_get_lwp.
7628 (get_lwp_thread): Adjust.
7629 (struct lwp_info): Add `dead' member.
7630 (find_lwp_pid): Declare.
7631 * linux-low.c (thread_db_active): Delete.
7632 (new_inferior): Adjust comment.
7633 (inferior_pid): Delete.
7634 (linux_add_process): New.
7635 (handle_extended_wait): Adjust.
7636 (add_lwp): Change unsigned long to ptid.
7637 (linux_create_inferior): Add process to processes table. Adjust
7638 to use ptids. Don't set new_inferior here.
7639 (linux_attach_lwp): Rename to ...
7640 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
7641 it. Adjust to use ptids.
7642 (linux_attach_lwp): New.
7643 (linux_attach): Add process to processes table. Don't set
7644 new_inferior here.
7645 (struct counter): New.
7646 (second_thread_of_pid_p, last_thread_of_process_p): New.
7647 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
7648 multiple processes.
7649 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
7650 processes. Remove process from process table.
7651 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
7652 to multiple processes.
7653 (any_thread_of): New.
7654 (linux_detach): Add `pid' argument, and handle it. Remove process
7655 from processes table.
7656 (linux_join): Add `pid' argument. Handle it.
7657 (linux_thread_alive): Change unsighed long argument to ptid_t.
7658 Consider dead lwps as not being alive.
7659 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
7660 threads we're not interested in.
7661 (same_lwp, find_lwp_pid): New.
7662 (linux_wait_for_lwp): Change `pid' argument's type from int to
7663 ptid_t. Adjust.
7664 (linux_wait_for_event): Rename to ...
7665 (linux_wait_for_event_1): ... this. Change `pid' argument's type
7666 from int to ptid_t. Adjust.
7667 (linux_wait_for_event): New.
7668 (linux_wait_1): Add `ptid' argument. Change return type to
7669 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
7670 that exit from the process table.
7671 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
7672 Adjust.
7673 (mark_lwp_dead): New.
7674 (wait_for_sigstop): Adjust to use ptids. If a process exits while
7675 stopping all threads, mark its main lwp as dead.
7676 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
7677 ptids.
7678 (fetch_register, usr_store_inferior_registers)
7679 (regsets_fetch_inferior_registers)
7680 (regsets_store_inferior_registers, linux_read_memory)
7681 (linux_write_memory): Inline `inferior_pid'.
7682 (linux_look_up_symbols): Adjust to use per-process
7683 `thread_db_active'.
7684 (linux_request_interrupt): Adjust to use ptids.
7685 (linux_read_auxv): Inline `inferior_pid'.
7686 (initialize_low): Don't reference thread_db_active.
7687 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
7688 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
7689 (ps_getpid): Return the pid of the current inferior.
7690 * thread-db.c (proc_handle, thread_agent): Delete.
7691 (thread_db_create_event, thread_db_enable_reporting): Adjust to
7692 per-process data.
7693 (find_one_thread): Change argument type to ptid_t. Adjust to
7694 per-process data.
7695 (maybe_attach_thread): Adjust to per-process data and ptids.
7696 (thread_db_find_new_threads): Ditto.
7697 (thread_db_init): Ditto.
7698 * spu-low.c (spu_create_inferior, spu_attach): Add process to
7699 processes table. Adjust to use ptids.
7700 (spu_kill, spu_detach): Adjust interface. Remove process from
7701 processes table.
7702 (spu_join, spu_thread_alive): Adjust interface.
7703 (spu_wait): Adjust interface. Remove process from processes
7704 table. Adjust to use ptids.
7705 * win32-low.c (current_inferior_tid): Delete.
7706 (current_inferior_ptid): New.
7707 (debug_event_ptid): New.
7708 (thread_rec): Take a ptid. Adjust.
7709 (child_add_thread): Add `pid' argument. Adjust to use ptids.
7710 (child_delete_thread): Ditto.
7711 (do_initial_child_stuff): Add `attached' argument. Add process to
7712 processes table.
7713 (child_fetch_inferior_registers, child_store_inferior_registers):
7714 Adjust.
7715 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
7716 (win32_attach): Pass 1 to do_initial_child_stuff.
7717 (win32_kill): Adjust interface. Remove process from processes
7718 table.
7719 (win32_detach): Ditto.
7720 (win32_join): Adjust interface.
7721 (win32_thread_alive): Take a ptid.
7722 (win32_resume): Adjust to use ptids.
7723 (get_child_debug_event): Ditto.
7724 (win32_wait): Adjust interface. Remove exiting process from
7725 processes table.
7726
bd99dc85
PA
77272009-04-01 Pedro Alves <pedro@codesourcery.com>
7728
7729 Non-stop mode support.
7730
7731 * server.h (non_stop): Declare.
7732 (gdb_client_data, handler_func): Declare.
7733 (delete_file_handler, add_file_handler, start_event_loop):
7734 Declare.
7735 (handle_serial_event, handle_target_event, push_event)
7736 (putpkt_notif): Declare.
7737 * target.h (enum resume_kind): New.
7738 (struct thread_resume): Replace `step' field by `kind' field.
7739 (TARGET_WNOHANG): Define.
7740 (struct target_ops) <wait>: Add `options' argument.
7741 <supports_non_stop, async, start_non_stop>: New fields.
7742 (target_supports_non_stop, target_async): New.
7743 (start_non_stop): Declare.
7744 (mywait): Add `options' argument.
7745 * target.c (mywait): Add `options' argument. Print child exit
7746 notifications here.
7747 (start_non_stop): New.
7748 * server.c (non_stop, own_buf, mem_buf): New globals.
7749 (struct vstop_notif): New.
7750 (notif_queue): New global.
7751 (queue_stop_reply, push_event, discard_queued_stop_replies)
7752 (send_next_stop_reply): New.
7753 (start_inferior): Adjust to use resume_kind. Adjust to mywait
7754 interface changes.
7755 (attach_inferior): In non-stop mode, don't wait for the target
7756 here.
7757 (handle_general_set): Handle QNonStop.
7758 (handle_query): When handling qC, return the current general
7759 thread, instead of the first thread of the list.
7760 (handle_query): If the backend supports non-stop mode, include
7761 QNonStop+ in the qSupported query response.
7762 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
7763 and non-stop mode.
7764 (handle_v_attach, handle_v_run): Handle non-stop mode.
7765 (handle_v_stopped): New.
7766 (handle_v_requests): Report support for vCont;t. Handle vStopped.
7767 (myresume): Adjust to use resume_kind. Handle non-stop.
7768 (queue_stop_reply_callback): New.
7769 (handle_status): Handle non-stop mode.
7770 (main): Clear non_stop flag on reconnection. Use the event-loop.
7771 Refactor serial protocol handling from here ...
7772 (process_serial_event): ... to this new function. When GDB
7773 selects any thread, select one here. In non-stop mode, wait until
7774 GDB acks all pending events before exiting.
7775 (handle_serial_event, handle_target_event): New.
7776 * remote-utils.c (remote_open): Install remote_desc in the event
7777 loop.
7778 (remote_close): Remove remote_desc from the event loop.
7779 (putpkt_binary): Rename to...
7780 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
7781 (putpkt_binary): New as wrapper around putpkt_binary_1.
7782 (putpkt_notif): New.
7783 (prepare_resume_reply): In non-stop mode, don't change the
7784 general_thread.
7785 * event-loop.c: New.
7786 * Makefile.in (OBJ): Add event-loop.o.
7787 (event-loop.o): New rule.
7788
7789 * linux-low.h (pid_of): Moved here.
7790 (lwpid_of): New.
7791 (get_lwp_thread): Use lwpid_of.
7792 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
7793 * linux-low.c (pid_of): Delete.
7794 (inferior_pid): Use lwpid_of.
7795 (linux_event_pipe): New.
7796 (target_is_async_p): New.
7797 (delete_lwp): New.
7798 (handle_extended_wait): Use lwpid_of.
7799 (add_lwp): Don't set lwpid field.
7800 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
7801 (linux_kill_one_lwp): If killing a running lwp, stop it first.
7802 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
7803 (linux_detach_one_lwp): If detaching from a running lwp, stop it
7804 first. Adjust to linux_wait_for_event interface changes. Use
7805 lwpid_of.
7806 (linux_detach): Don't delete the main lwp here.
7807 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
7808 (status_pending_p): Don't consider explicitly suspended lwps.
7809 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
7810 pointer. Add OPTIONS argument. Change return type to int. Use
7811 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
7812 (linux_wait_for_event): Take an integer pid instead of a lwp_info
7813 pointer. Add status pointer argument. Return a pid instead of a
7814 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
7815 changes. In non-stop mode, don't switch to a random thread.
7816 (linux_wait): Rename to...
7817 (linux_wait_1): ... this. Add target_options argument, and handle
7818 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
7819 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
7820 clean exit and signal exit code. Don't stop all threads in
7821 non-stop mode. In all-stop mode, only stop all threads when
7822 reporting a stop to GDB. Handle explicit thread stop requests.
7823 (async_file_flush, async_file_mark): New.
7824 (linux_wait): New.
7825 (send_sigstop): Use lwpid_of.
7826 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
7827 interface changes. In non-stop mode, don't switch to a random
7828 thread.
7829 (linux_resume_one_lwp): Use lwpid_of.
7830 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
7831 (linux_resume_one_thread): ... this. Handle resume_stop. In
7832 non-stop mode, don't look for pending flag in all threads.
7833 (resume_status_pending_p): Don't consider explicitly suspended
7834 threads.
7835 (my_waitpid): Reimplement. Emulate __WALL.
7836 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
7837 Use lwpid_of.
7838 (sigchld_handler, linux_supports_non_stop, linux_async)
7839 (linux_start_non_stop): New.
7840 (linux_target_ops): Register linux_supports_non_stop, linux_async
7841 and linux_start_non_stop.
7842 (initialize_low): Install SIGCHLD handler.
7843 * thread-db.c (thread_db_create_event, find_one_thread)
7844 (thread_db_get_tls_address): Use lwpid_of.
7845 * win32-low.c (win32_detach): Adjust to use resume_kind.
7846 (win32_wait): Add `options' argument.
7847 * spu-low.c (spu_resume): Adjust to use resume_kind.
7848 (spu_wait): Add `options' argument.
7849
5b1c542e
PA
78502009-04-01 Pedro Alves <pedro@codesourcery.com>
7851
7852 Decouple target code from remote protocol.
7853
7854 * target.h (enum target_waitkind): New.
7855 (struct target_waitstatus): New.
7856 (struct target_ops) <wait>: Return an unsigned long. Take a
7857 target_waitstatus pointer instead of a char pointer.
7858 (mywait): Likewise.
7859 * target.c (mywait): Change prototype to return an unsigned long.
7860 Take a target_waitstatus pointer instead of a char pointer. Adjust.
7861 * server.h (thread_from_wait, old_thread_from_wait): Delete
7862 declarations.
7863 (prepare_resume_reply): Change prototype to take a
7864 target_waitstatus.
7865 * server.c (thread_from_wait, old_thread_from_wait): Delete.
7866 (last_status, last_ptid): New.
7867 (start_inferior): Remove "statusptr" argument. Adjust. Return a
7868 pid instead of a signal.
7869 (attach_inferior): Remove "status" and "signal" parameters.
7870 Adjust.
7871 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
7872 not as an address.
7873 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
7874 (handle_v_requests, myresume): Remove "status" and "signal"
7875 parameters. Adjust.
7876 (handle_status): New.
7877 (main): Delete local `status'. Adjust.
7878 * remote-utils.c: Include target.h.
7879 (prepare_resume_reply): Change prototype to take a
7880 target_waitstatus. Adjust.
7881
7882 * linux-low.c (linux_wait): Adjust to new target_ops->wait
7883 interface.
7884 * spu-low.c (spu_wait): Adjust.
7885 * win32-low.c (enum target_waitkind, struct target_waitstatus):
7886 Delete.
7887 (win32_wait): Adjust.
7888
2bd7c093
PA
78892009-04-01 Pedro Alves <pedro@codesourcery.com>
7890
7891 * target.h (struct thread_resume): Delete leave_stopped member.
7892 (struct target_ops): Add a `n' argument to the `resume' callback.
7893 * server.c (start_inferior): Adjust.
7894 (handle_v_cont, myresume): Adjust.
7895 * linux-low.c (check_removed_breakpoint): Adjust to resume
7896 interface change, and to removed leave_stopped field.
7897 (resume_ptr): Delete.
7898 (struct thread_resume_array): New.
7899 (linux_set_resume_request): Add new `arg' parameter. Adjust to
7900 resume interface change.
7901 (linux_continue_one_thread, linux_queue_one_thread)
7902 (resume_status_pending_p): Check if the resume field is NULL
7903 instead of checking the leave_stopped member.
7904 (linux_resume): Adjust to the target resume interface change.
7905 * spu-low.c (spu_resume): Adjust to the target resume interface
7906 change.
7907 * win32-low.c (win32_detach, win32_resume): Ditto.
7908
c35fafde
PA
79092009-04-01 Pedro Alves <pedro@codesourcery.com>
7910
7911 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
7912 flag.
7913 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
7914 pending.
7915 (linux_continue_one_thread): Only preserve the stepping flag if
7916 there's a pending breakpoint.
7917
0a59d50b
PA
79182009-03-31 Pedro Alves <pedro@codesourcery.com>
7919
7920 * server.c (main): After the inferior having exited, call
7921 remote_close before exiting gdbserver.
7922
f04c6d38
TJB
79232009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
7924
7925 Fix size of FPSCR in Power 7 processors.
7926 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
7927 (PPC_FEATURE_HAS_DFP): New #define.
7928 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
7929 size of the FPSCR.
7930
78e5cee6
PA
79312009-03-23 Pedro Alves <pedro@codesourcery.com>
7932
7933 * server.c (handle_query) Whitespace and formatting.
7934
1b3f6016
PA
79352009-03-22 Pedro Alves <pedro@codesourcery.com>
7936
7937 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
7938 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
7939 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
7940 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
7941 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
7942 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
7943 Makefile.in, configure.ac: Fix whitespace throughout.
7944 * configure: Regenerate.
7945
a07b2135
PA
79462009-03-22 Pedro Alves <pedro@codesourcery.com>
7947
7948 * inferiors.c (find_inferior): Make it safe for the callback
7949 function to delete the currently iterated inferior.
7950
67cc2626
PA
79512009-03-22 Pedro Alves <pedro@codesourcery.com>
7952
7953 * Makefile.in (linuw_low_h): Move higher.
7954 (thread-db.o): Depend on $(linux_low_h).
7955
54a0b537
PA
79562009-03-17 Pedro Alves <pedro@codesourcery.com>
7957
7958 Rename "process" to "lwp" throughout.
7959
7960 * linux-low.c (all_processes): Rename to...
7961 (all_lwps): ... this.
7962 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
7963 (add_process): Rename to ...
7964 (add_lwp): ... this. Adjust.
7965 (linux_create_inferior): Adjust.
7966 (linux_attach_lwp): Adjust.
7967 (linux_attach): Adjust.
7968 (linux_kill_one_process): Rename to ...
7969 (linux_kill_one_lwp): ... this. Adjust.
7970 (linux_kill): Adjust.
7971 (linux_detach_one_process): Rename to ...
7972 (linux_detach_one_lwp): ... this. Adjust.
7973 (linux_detach): Adjust.
7974 (check_removed_breakpoint): Adjust.
7975 (status_pending_p): Adjust.
7976 (linux_wait_for_process): Rename to ...
7977 (linux_wait_for_lwp): ... this. Adjust.
7978 (linux_wait_for_event): Adjust.
7979 (send_sigstop): Adjust.
7980 (wait_for_sigstop): Adjust.
7981 (stop_all_processes): Rename to ...
7982 (stop_all_lwps): ... this.
7983 (linux_resume_one_process): Rename to ...
7984 (linux_resume_one_lwp): ... this. Adjust.
7985 (linux_set_resume_request, linux_continue_one_thread)
7986 (linux_queue_one_thread, resume_status_pending_p)
7987 (usr_store_inferior_registers, regsets_store_inferior_registers)
7988 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
7989 Adjust.
7990 * linux-low.h (get_process): Rename to ...
7991 (get_lwp): ... this. Adjust.
7992 (get_thread_process): Rename to ...
7993 (get_thread_lwp): ... this. Adjust.
7994 (get_process_thread): Rename to ...
7995 (get_lwp_thread): ... this. Adjust.
7996 (struct process_info): Rename to ...
7997 (struct lwp_info): ... this.
7998 (all_processes): Rename to ...
7999 (all_lwps): ... this.
8000 * proc-service.c (ps_lgetregs): Adjust.
8001 * thread-db.c (thread_db_create_event, find_one_thread)
8002 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
8003
0b16c5cf
PA
80042009-03-14 Pedro Alves <pedro@codesourcery.com>
8005
8006 * server.c (handle_query): Handle "qAttached".
8007
32de4b9d
NS
80082009-03-13 Nathan Sidwell <nathan@codesourcery.com>
8009
8010 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8011 GPLv3, update license URL.
8012
2aecd87f
DE
80132009-03-01 Doug Evans <dje@google.com>
8014
93efd302 8015 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
8016 (server_h): Add gdb_signals.h.
8017 (signals.o): Update.
8018 * server.h (target_signal_from_host,target_signal_to_host_p)
8019 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8020
86b1f9c5
PM
80212009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8022
8023 * remote-utils.c (getpkt): Also generate remote-debug
8024 information if noack_mode is set.
8025
4aa995e1
PA
80262009-02-06 Pedro Alves <pedro@codesourcery.com>
8027
8028 * server.c (handle_query): Report qXfer:siginfo:read and
8029 qXfer:siginfo:write as supported and handle them.
8030 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8031 * linux-low.c (linux_xfer_siginfo): New.
8032 (linux_target_ops): Set it.
8033
62709adf
PA
80342009-01-26 Pedro Alves <pedro@codesourcery.com>
8035
8036 * server.c (gdbserver_usage): Mention --remote-debug.
8037 (main): Accept '--remote-debug' switch.
8038
aef93bd7
DE
80392009-01-18 Doug Evans <dje@google.com>
8040
8041 * regcache.c (new_register_cache): No need to check result of xcalloc.
8042 * server.c (handle_search_memory): Back out calls to xmalloc,
8043 result is checked and error is returned to user upon failure.
8044 (handle_query): Ditto. Add more checks for result of malloc.
8045 (handle_v_cont): Check result of malloc, report error back to
8046 user upon failure.
8047 (handle_v_run): Ditto. Call freeargv.
8048 * server.h (freeargv): Declare.
8049 * utils.c (freeargv): New fn.
8050
54363045
DE
80512009-01-15 Doug Evans <dje@google.com>
8052
f626972c
DE
8053 * gdbreplay.c (perror_with_name): Make arg const char *.
8054 * server.h (target_signal_to_name): Make return type const char *.
0842e787 8055 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 8056 * utils.c (perror_with_name): Make arg const char *.
54363045 8057
18aae699
PA
80582009-01-14 Pedro Alves <pedro@codesourcery.com>
8059
8060 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8061 when handling a EXIT_PROCESS_DEBUG_EVENT.
8062
ff703abe
JB
80632009-01-06 Joel Brobecker <brobecker@adacore.com>
8064
8065 * gdbreplay.c (gdbreplay_version): Update copyright year.
8066 * server.c (gdbserver_version): Likewise.
8067
f21cc1a2 80682009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
8069
8070 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 8071 (handle_extended_wait): Improve comment.
0e21c1ec 8072
bca929d3
DE
80732008-12-13 Doug Evans <dje@google.com>
8074
8075 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8076 * server.h (ATTR_MALLOC): New macro.
8077 (xmalloc,xcalloc,xstrdup): Declare.
8078 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
8079 * inferiors.c: Ditto.
8080 * linux-low.c: Ditto.
8081 * mem-break.c: Ditto.
8082 * regcache.c: Ditto.
8083 * remote-utils.c: Ditto.
8084 * server.c: Ditto.
8085 * target.c: Ditto.
8086 * win32-low.c: Ditto.
8087
97438e3f
DE
80882008-12-12 Doug Evans <dje@google.com>
8089
896c7fbb
DE
8090 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
8091 in debugging printf.
8092
97438e3f
DE
8093 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
8094
e3b886f8
DE
80952008-12-09 Doug Evans <dje@google.com>
8096
8097 * linux-low.h (struct process_info): Delete member tid, unused.
8098 * thread-db.c (find_one_thread): Update.
8099 (maybe_attach_thread): Update.
8100
07e059b5
VP
81012008-12-02 Pedro Alves <pedro@codesourcery.com>
8102
889bf7c5
PA
8103 * target.h (struct target_ops): Add qxfer_osdata member.
8104 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
8105 and dirent.h.
8106 (linux_qxfer_osdata): New functions.
8107 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
8108 callback.
8109 * server.c (handle_query): Handle "qXfer:osdata:read:".
8110 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
8111 (buffer_xml_printf): New functions.
8112 * server.h (struct buffer): New.
8113 (buffer_grow_str, buffer_grow_str0): New macros.
8114 (buffer_grow, buffer_free, buffer_init, buffer_finish)
8115 (buffer_xml_printf): Declare.
07e059b5 8116
4cab47ab
DE
81172008-11-24 Doug Evans <dje@google.com>
8118
8119 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
8120
f142445f
DJ
81212008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
8122
8123 * server.c (handle_v_run): Always use the supplied argument list.
8124
d0107bb6 81252008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 8126
d0107bb6
BW
8127 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
8128 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 8129
2c4ad781
TJB
81302008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
8131
8132 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
8133 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
8134 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
8135 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
8136 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
8137 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
8138 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
8139 XML target descriptions.
8140 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
8141 when inferior is running on an ISA 2.05 or later processor. Add
8142 special case to return offset for full 64-bit slot of FPSCR when
8143 in 32-bits.
8144
dfb64f85
DJ
81452008-11-14 Daniel Gutson <dgutson@codesourcery.com>
8146
8147 * Makefile.in (SFILES, clean): Added sparc64 files.
8148 (reg-sparc64.o, reg-sparc64.c): New.
8149 * configure.srv (sparc*-*-linux*): New configuration.
8150 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
8151 syscall arguments for SPARC.
8152 (regsets_store_inferior_registers): Likewise.
8153 * linux-sparc-low.c: New file.
8154
66b6e1dd
DE
81552008-10-21 Doug Evans <dje@google.com>
8156
8157 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
8158 (READLINE_DIR,READLINE_DEP): Delete.
8159 (INTERNAL_CFLAGS): Update.
8160 (LINTFLAGS): Update.
8161
9b710a42
PA
81622008-10-10 Pedro Alves <pedro@codesourcery.com>
8163
8164 * server.c (handle_v_run): If GDB didn't specify an argv, use the
8165 whole argv from the last run, not just argv[0].
8166
5822d809
PA
81672008-09-08 Pedro Alves <pedro@codesourcery.com>
8168
8169 * regcache.c (new_register_cache): Return NULL if the register
8170 cache size isn't known yet.
8171 (free_register_cache): Avoid dereferencing a NULL regcache.
8172
74aac56f
DJ
81732008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8174
8175 * configure.srv: Merge MIPS and MIPS64.
8176
400b20f5
MR
81772008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
8178
8179 * Makefile.in (uninstall): Apply $(EXEEXT) too.
8180
677c5bb1
LM
81812008-08-18 Luis Machado <luisgpm@br.ibm.com>
8182
8183 * Makefile.in: Add required vsx dependencies.
8184
8185 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
8186 Declare init_registers_powerpc_vsx32l.
8187 Declare init_registers_powerpc_vsx64l.
8188 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
8189 (ppc_arch_setup): Check for VSX in hwcap.
8190 (ppc_fill_vsxregset): New function.
8191 (ppc_store_vsxregset): New function.
8192 Add new VSX entry in regset_info target_regsets.
8193
8194 * configure.srv: Add new VSX dependencies.
8195
a6f3e723
SL
81962008-08-12 Pedro Alves <pedro@codesourcery.com>
8197
8198 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
8199 (remote_open): Set or clear transport_is_reliable.
8200 (putpkt_binary): Don't expect acks in noack mode.
8201 (getpkt): Don't send ack/nac in noack mode.
8202 * server.c (handle_general_set): Handle QStartNoAckMode.
8203 (handle_query): If connected by tcp pass QStartNoAckMode+ in
8204 qSupported.
8205 (main): Reset noack_mode on every connection.
8206 * server.h (noack_mode): Declare.
8207
a417dc56
RW
82082008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8209
8210 * Makefile.in (GDBREPLAY_OBS): New variable.
8211 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
8212
3221518c
UW
82132008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
8214 Daniel Jacobowitz <dan@codesourcery.com>
8215
8216 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
8217 (usr_store_inferior_registers): Likewise.
8218 (regsets_store_inferior_registers): Likewise.
8219
ec56be1b
PA
82202008-07-31 Rolf Jansen <rj@surtec.com>
8221 Pedro Alves <pedro@codesourcery.com>
8222
8223 * configure.ac: Check for memmem declaration.
8224 * server.c [HAVE_MALLOC_H]: Include malloc.h.
8225 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
8226 (disable_packet_qfThreadInfo): Unconditionally compile.
8227 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
8228 * configure, config.in: Regenerate.
8229
2fe5e3ff
DE
82302008-07-28 Doug Kwan <dougkwan@google.com>
8231
8232 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
8233 (linux_write_memory): Remove declaration of errno.
8234
836acd6d
UW
82352008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
8236
8237 * linux-low.c (handle_extended_wait): Do not use "status"
8238 variable uninitialized.
8239
aeba519e
PA
82402008-07-07 Pedro Alves <pedro@codesourcery.com>
8241
8242 * server.c (handle_v_attach): Inhibit reporting dll changes.
8243
db42f210
PA
82442008-06-27 Pedro Alves <pedro@codesourcery.com>
8245
8246 * remote-utils.c (prepare_resume_reply): If requested, don't
8247 output "thread:TID" in the T stop reply.
8248
8249 * server.c (disable_packet_vCont, disable_packet_Tthread)
8250 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
8251 (handle_query): If requested, disable support for qC, qfThreadInfo
8252 and qsThreadInfo.
8253 (handle_v_requests): If requested, disable support for vCont.
8254 (gdbserver_show_disableable): New.
8255 (main): Handle --disable-packet and --disable-packet=LIST.
8256
8257 * server.h (disable_packet_vCont, disable_packet_Tthread)
8258 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
8259
8e4c5421
CD
82602008-06-20 Carlos O'Donell <carlos@codesourcery.com>
8261
8262 * server.c (gdbserver_usage): Mention --version.
8263
6e23a804
DJ
82642008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
8265
8266 * Makefile.in (gdbreplay.o): New rule.
8267
90aa6a40
JM
82682008-06-06 Joseph Myers <joseph@codesourcery.com>
8269
8270 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
8271 message, not gdbserver.
8272
c16158bc 82732008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
8274 Nathan Sidwell <nathan@codesourcery.com>
8275 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
8276
8277 * acinclude.m4: Include ../../config/acx.m4.
8278 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
8279 * configure, config.in: Regenerate.
8280 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
8281 * server.c (gdbserver_version): Print PKGVERSION.
8282 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
8283 (main): Adjust gdbserver_usage calls.
8284 * gdbreplay.c (version, host_name): Add declarations.
8285 (gdbreplay_version, gdbreplay_usage): New.
8286 (main): Accept --version and --help options.
8287
aeb75bf5
DJ
82882008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
8289
8290 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
8291 (arm_breakpoint_at): Handle Thumb.
8292 (the_low_target): Add comment.
8293
76b233dd
UW
82942008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
8295
8296 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
8297
08388c79
DE
82982008-05-09 Doug Evans <dje@google.com>
8299
a3c83fae
DE
8300 * server.h (decode_search_memory_packet): Declare.
8301 * remote-utils.c (decode_search_memory_packet): New fn.
8302 * server.c (handle_search_memory_1): New fn.
08388c79
DE
8303 (handle_search_memory): New fn.
8304 (handle_query): Process qSearch:memory packets.
8305
bb9c3d36
UW
83062008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
8307
8308 * regcache.c (registers_length): Remove.
8309 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
8310 full register packet.
8311 * regcache.h (registers_length): Remove prototype.
8312 * server.h (PBUFSIZ): Define to 16384.
8313
7284e1be
UW
83142008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
8315
8316 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
8317 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
8318 powerpc-64l.o, and powerpc-altivec64l.o.
8319 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
8320 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
8321 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
8322 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
8323 rs6000/power-linux.xml, and rs6000/power64-linux.xml
8324 to srv_xmlfiles.
8325
8326 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
8327 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
8328 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
8329 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
8330 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
8331 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
8332 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
8333 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
8334 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
8335 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
8336 (clean): Update.
8337
8338 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
8339 (init_registers_powerpc_32l): ... this new prototype.
8340 (init_registers_powerpc_32): Remove, replace by ...
8341 (init_registers_powerpc_altivec32l): ... this new prototype.
8342 (init_registers_powerpc_e500): Remove, replace by ...
8343 (init_registers_powerpc_e500l): ... this new prototype.
8344 (init_registers_ppc64): Remove, replace by ...
8345 (init_registers_powerpc_64l): ... this new prototype.
8346 (init_registers_powerpc_64): Remove, replace by ...
8347 (init_registers_powerpc_altivec64l): ... this new prototype.
8348 (ppc_num_regs): Set to 73.
8349 (PT_ORIG_R3, PT_TRAP): Define if necessary.
8350 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
8351 (ppc_cannot_store_register): Handle orig_r3 and trap.
8352 (ppc_arch_setup): Update init_registers_... calls.
8353 (ppc_fill_gregset): Handle orig_r3 and trap.
8354
8355 * inferiors.c (clear_inferiors): Reset current_inferior.
8356
fdc59709
PB
83572008-04-23 Paolo Bonzini <bonzini@gnu.org>
8358
889bf7c5
PA
8359 * acinclude.m4: Add override.m4.
8360 * configure: Regenerate.
fdc59709 8361
c9b2f845
UW
83622008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8363
8364 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
8365 initial call to init_register_ppc64.
8366
550512b8
UW
83672008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8368
43aaf8b6
PA
8369 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
8370 single powerpc*-*-linux* case.
550512b8
UW
8371 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
8372
b6430ec3
UW
83732008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
8374
8375 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 8376 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
8377 from reg_xmlfiles.
8378 * linux-ppc-low.c: Include <elf.h>.
8379 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
8380 (ppc_hwcap): New global variable.
8381 (ppc_regmap): Remove __SPE__ #ifdef sections.
8382 (ppc_regmap_e500): New global variable.
8383 (ppc_cannot_store_register): Update __SPE__ special case.
8384 (ppc_get_hwcap): New function.
8385 (ppc_arch_setup): Use it to determine whether inferior supports
8386 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
8387 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
8388 Do not access registers if target does not support AltiVec.
8389 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
8390 Do not access registers if target does not support SPE.
8391 (target_regsets): Unconditionally include AltiVec and SPE regsets.
8392
52fa2412
UW
83932008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
8394
8395 * linux-low.c (disabled_regsets, num_regsets): New.
8396 (use_regsets_p): Delete.
8397 (linux_wait_for_process): Clear disabled_regsets.
8398 (regsets_fetch_inferior_registers): Check and set it.
8399 (regsets_store_inferior_registers): Likewise.
8400 (linux_fetch_registers, linux_store_registers): Do not use
8401 use_regsets_p.
8402 (initialize_low): Allocate disabled_regsets.
8403
e28b3332
DJ
84042008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
8405
8406 * Makefile.in (LIBOBJS): New.
8407 (OBS): Use LIBOBJS.
8408 (memmem.o): New rule.
8409 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
8410 * configure: Regenerated.
8411
4536995d
UW
84122008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
8413
8414 * server.c (handle_query): Never return "unsupported" for
8415 qXfer:features:read queries.
8416
221c031f
UW
84172008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
8418
8419 * server.c (get_features_xml): Fix inverted condition.
8420 (handle_query): Always support qXfer:feature:read.
8421
ccd213ac
DJ
84222008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
8423
8424 * server.c (wrapper_argv): New.
8425 (start_inferior): Handle wrapper_argv. If set, expect an extra
8426 trap.
8427 (gdbserver_usage): Document --wrapper.
8428 (main): Parse --wrapper.
8429
6fe305f7
UW
84302008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8431
8432 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
8433 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
8434 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
8435 (ppc_set_pc): Likewise.
8436 (ppc_arch_setup): New function.
8437 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
8438 of collect_register.
889bf7c5 8439 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 8440
5b0a002e
UW
84412008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8442
8443 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
8444 instead of linux-ppc64-low.o.
8445 * linux-ppc64-low.c: Remove file.
8446 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
8447 (linux-ppc64-low.o): Remove rule.
8448
8449 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
8450 (init_registers_powerpc_64): Likewise.
8451 (ppc_regmap): Conditionally define depending on __powerpc64__.
8452 (ppc_cannot_store_register): Do not special-case "fpscr" when
8453 compiled on __powerpc64__.
8454 (ppc_collect_ptrace_register): New function.
8455 (ppc_supply_ptrace_register): New function.
8456 (ppc_breakpoint): Change type to "unsigned int".
8457 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
8458 (the_low_target): Conditionally provide initializers for the
889bf7c5 8459 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
8460 collect_ptrace_register and supply_ptrace_register members.
8461
9b4b61c8
UW
84622008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8463
8464 * regcache.h (gdbserver_xmltarget): Add extern declaration.
8465 * server.c (gdbserver_xmltarget): Define.
8466 (get_features_xml): Use it to replace "target.xml" and arch_string.
8467
8468 * configure.srv: Remove srv_xmltarget. Add XML files that were
8469 mentioned there to srv_xmlfiles instead. Remove conditional tests
8470 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
8471 srv_xmlfiles and srv_regobj to include all possible choices.
8472 * configure.ac (srv_xmltarget): Remove.
8473 (srv_xmlfiles): Do not add "target.xml".
8474 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
8475 checks for supplementary target information.
8476 * configure: Regenerate.
8477 * Makefile.in (XML_TARGET): Remove.
8478 (target.xml): Remove rule.
8479 (clean): Do not clean up target.xml.
8480 (.PRECIOUS): Do not mention target.xml.
8481
8482 * target.h (struct target_ops): Remove arch_string member.
8483 * linux-low.c (linux_arch_string): Remove.
8484 (linux_target_ops): Remove arch_string initializer.
8485 * linux-low.h (struct linux_target_ops): Remove arch_string member.
8486 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
8487 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
8488 * spu-low.c (spu_arch_string): Remove.
8489 (spu_target_ops): Remove arch_string initializer.
8490 * win32-low.c (win32_arch_string): Remove.
8491 (win32_target_ops): Remove arch_string initializer.
8492 * win32-low.h (struct win32_target_ops): Remove arch_string member.
8493 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
8494 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
8495
ee1a7ae4
UW
84962008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8497
8498 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
8499 by collect_ptrace_register and supply_ptrace_register hooks.
8500 * linux-low.c (fetch_register): Use supply_ptrace_register callback
8501 instead of checking for the_low_target.left_pad_xfer.
8502 (usr_store_inferior_registers): Use collect_ptrace_register callback
8503 instead of checking for the_low_target.left_pad_xfer.
8504
8505 * linux-s390-low.c (s390_collect_ptrace_register): New function.
8506 (s390_supply_ptrace_register): Likewise.
8507 (s390_fill_gregset): Call s390_collect_ptrace_register.
8508 (the_low_target): Update.
8509
8510 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
8511 (ppc_supply_ptrace_register): Likewise.
8512 (the_low_target): Update.
8513
8514 * linux-i386-low.c (the_low_target): Update.
8515 * linux-x86-64-low.c (the_low_target): Update.
8516
d61ddec4
UW
85172008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8518
8519 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
8520 reg-s390.o and reg-s390x.o.
8521
8522 * linux-low.c (new_inferior): New global variable.
8523 (linux_create_inferior, linux_attach): Set it.
8524 (linux_wait_for_process): Call the_low_target.arch_setup after the
8525 target has stopped for the first time.
8526 (initialize_low): Do not call the_low_target.arch_setup.
8527
8528 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
8529 (s390_set_pc): Likewise.
8530 (s390_arch_setup): New function.
8531 (the_low_target): Use s390_arch_setup as arch_setup routine.
8532
8533 * regcache.c (realloc_register_cache): New function.
8534 (set_register_cache): Call it for each existing regcache.
8535
d05b4ac3
UW
85362008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8537
8538 * server.h (init_registers): Remove prototype.
8539
8540 * linux-low.h (struct linux_target_ops): Add arch_setup field.
8541 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
8542 instead of init_registers ().
8543 * linux-arm-low.c (init_registers_arm): Add prototype.
8544 (init_registers_arm_with_iwmmxt): Likewise.
8545 (the_low_target): Add initializer for arch_setup field.
8546 * linux-cris-low.c (init_registers_cris): Add prototype.
8547 (the_low_target): Add initializer for arch_setup field.
8548 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
8549 (the_low_target): Add initializer for arch_setup field.
8550 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
8551 (the_low_target): Add initializer for arch_setup field.
8552 * linux-ia64-low.c (init_registers_ia64): Add prototype.
8553 (the_low_target): Add initializer for arch_setup field.
8554 * linux-m32r-low.c (init_registers_m32r): Add prototype.
8555 (the_low_target): Add initializer for arch_setup field.
8556 * linux-m68k-low.c (init_registers_m68k): Add prototype.
8557 (the_low_target): Add initializer for arch_setup field.
8558 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
8559 (init_registers_mips64_linux): Likewise.
8560 (the_low_target): Add initializer for arch_setup field.
8561 * linux-ppc-low.c (init_registers_ppc): Add prototype.
8562 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
8563 (the_low_target): Add initializer for arch_setup field.
8564 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
8565 (init_registers_powerpc_64): Likewise.
8566 (the_low_target): Add initializer for arch_setup field.
8567 * linux-s390-low.c (init_registers_s390): Add prototype.
8568 (init_registers_s390x): Likewise.
8569 (the_low_target): Add initializer for arch_setup field.
8570 * linux-sh-low.c (init_registers_sh): Add prototype.
8571 (the_low_target): Add initializer for arch_setup field.
8572 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
8573 (the_low_target): Add initializer for arch_setup field.
8574 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
8575 (the_low_target): Add initializer for arch_setup field.
8576
8577 * win32-low.h (struct win32_target_ops): Add arch_setup field.
8578 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
8579 instead of init_registers ().
8580 * win32-arm-low.c (init_registers_arm): Add prototype.
8581 (the_low_target): Add initializer for arch_setup field.
8582 * win32-i386-low.c (init_registers_i386): Add prototype.
8583 (the_low_target): Add initializer for arch_setup field.
8584
8585 * spu-low.c (init_registers_spu): Add prototype.
8586 (initialize_low): Call initialie_registers_spu () instead of
8587 initialize_registers ().
8588
fd96d250
PA
85892008-02-19 Pedro Alves <pedro@codesourcery.com>
8590
8591 * server.c (handle_v_requests): When handling the vRun and vAttach
8592 packets, if already debugging a process, don't kill it. Return an
8593 error instead.
8594
d41b6bb4
DJ
85952008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
8596
8597 * server.c (handle_query): Correct length check.
8598
5ac588cf
PA
85992008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
8600
8601 * win32-low.c (do_initial_child_stuff): Add process handle
8602 parameter. Set current_process_handle and current_process_id from the
8603 parameters. Clear globals.
8604 (win32_create_inferior): Don't set current_process_handle and
8605 current_process_id here. Instead pass them on the call to
8606 do_initial_child_stuff.
8607 (win32_attach): Likewise.
8608 (win32_clear_inferiors): New.
8609 (win32_kill): Don't close the current process handle or the
8610 current thread handle here. Instead call win32_clear_inferiors.
8611 (win32_detach): Don't open a new handle to the process. Call
8612 win32_clear_inferiors.
8613 (win32_join): Don't rely on current_process_handle; open a new
8614 handle using the process id.
8615 (win32_wait): Call win32_clear_inferiors when the inferior process
8616 has exited.
8617
ecd7ecbc
DJ
86182008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
8619
8620 * server.c (monitor_show_help): Add "exit".
8621
1525d545
MG
86222008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
8623
ecd7ecbc 8624 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
8625 (clean): Add reg-xtensa.c.
8626 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
8627 * configure.srv (xtensa*-*-linux*) New target.
8628 * linux-xtensa-low.c: New.
8629 * xtensa-xtregs.c: New.
1525d545 8630
59a016f0
PA
86312008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
8632
8633 * hostio.c: Don't include errno.h.
8634 (errno_to_fileio_errno): Move to hostio-errno.
8635 * hostio.c: (hostio_error): Remove the error parameter. Defer the
8636 error number outputting to the target->hostio_last_error callback.
8637 (hostio_packet_error): Use FILEIO_EINVAL directly.
8638 (handle_open, handle_pread, hostio_error, handle_unlink): Update
8639 calls to hostio_error.
8640 * hostio-errno.c: New.
8641 * server.h (hostio_last_error_from_errno): Declare.
8642 * target.h (target_ops): Add hostio_last_error member.
8643 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
8644 as hostio_last_error handler.
889bf7c5 8645 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
8646 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
8647 (wince_hostio_last_error): New functions.
8648 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
8649 as hostio_last_error handler.
8650 (win32_target_ops) [!_WIN32_WCE]: Register
8651 hostio_last_error_from_errno as hostio_last_error handler.
8652 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
8653 (hostio-errno.o): New rule.
8654 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
8655 * configure.srv (srv_hostio_err_objs): New variable. Default to
8656 hostio-errno.o.
8657 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
8658 * configure: Regenerate.
8659
2d717e4f
DJ
86602008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8661
8662 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
8663 (linux_kill, linux_detach): Clean up the process list.
8664 * remote-utils.c (remote_open): Improve port number parsing.
8665 (putpkt_binary, input_interrupt): Only send interrupts if the target
8666 is running.
8667 * server.c (extended_protocol): Make static.
8668 (attached): Define earlier.
8669 (exit_requested, response_needed, program_argv): New variables.
8670 (target_running): New.
8671 (start_inferior): Clear attached here.
8672 (attach_inferior): Set attached here.
8673 (require_running): Define.
8674 (handle_query): Use require_running and target_running. Implement
8675 "monitor exit".
8676 (handle_v_attach, handle_v_run): New.
8677 (handle_v_requests): Use require_running. Handle vAttach and vRun.
8678 (gdbserver_usage): Update.
8679 (main): Redo argument parsing. Handle --debug and --multi. Handle
8680 --attach along with other options or after the port. Save
8681 program_argv. Support no initial program. Resynchronize
8682 communication with GDB after an error. Handle "monitor exit".
8683 Use require_running and target_running. Always allow the extended
8684 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
8685 restart in extended mode.
8686 * README: Refer to the GDB manual. Update --attach usage.
8687
7407e2de
AS
86882007-12-20 Andreas Schwab <schwab@suse.de>
8689
8690 * linux-low.c (STACK_SIZE): Define.
8691 (linux_tracefork_child): Use it. Use __clone2 on ia64.
8692 (linux_test_for_tracefork): Likewise.
8693
b65d95c5
DJ
86942007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
8695
8696 * linux-low.c (linux_wait_for_event): Update messages. Do not
8697 reinsert auto-delete breakpoints.
8698 * mem-break.c (struct breakpoint): Change return type of handler to
8699 int.
8700 (set_breakpoint_at): Update handler type.
8701 (reinsert_breakpoint_handler): Return 1 instead of calling
8702 delete_breakpoint.
8703 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
8704 setting a new one.
8705 (check_breakpoints): Delete auto-delete breakpoints and return 2.
8706 * mem-break.h (set_breakpoint_at): Update handler type.
8707 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
8708 * win32-low.c (auto_delete_breakpoint): New.
8709 (get_child_debug_event): Use it.
8710
4e799345
DJ
87112007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
8712
8713 * configure.ac: Check for pread and pwrite.
8714 * hostio.c (handle_pread): Fall back to lseek and read.
8715 (handle_pwrite): Fall back to lseek and write.
8716 * config.in, configure: Regenerated.
8717
27524b67
DJ
87182007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
8719
8720 * server.c (myresume): Add own_buf argument.
8721 (main): Update calls.
8722
a20d5e98
DJ
87232007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
8724
8725 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
8726 * remote-utils.c (remote_open): Do not call disable_async_io.
8727 (block_async_io): Delete.
8728 (unblock_async_io): Make static.
8729 (initialize_async_io): New.
8730 * server.c (handle_v_cont): Handle async I/O here.
8731 (myresume): Likewise. Move other common resume tasks here...
8732 (main): ... from here. Call initialize_async_io. Disable async
8733 I/O before the main loop.
8734 * server.h (initialize_async_io): Declare.
8735 (block_async_io, unblock_async_io): Delete prototypes.
8736 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
8737
b79d787e
DJ
87382007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
8739
8740 * remote-utils.c (readchar): Allow binary data in received messages.
8741
d97903b2
PA
87422007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8743
8744 * win32-low.c (attaching): New global.
8745 (win32_create_inferior): Clear the `attaching' global.
8746 (win32_attach): Set the `attaching' global.
8747 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
8748 attaching. Only set a breakpoint at the entry point if not
8749 attaching.
8750
311de423
PA
87512007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8752
8753 * server.c (main): Don't report dll events on the initial
8754 connection on attaches.
8755
6c2d16d2
PA
87562007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8757
8758 * server.c (main): Relax numerical bases supported for the pid of
8759 the --attach command line argument.
8760
5ca906e6
PA
87612007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8762
8763 * win32-low.c (win32_attach): Call OpenProcess before
8764 DebugActiveProcess, not after. Add last error output to error
8765 call.
8766
9c6c8194
PA
87672007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8768
8769 * win32-low.c (win32_get_thread_context)
8770 (win32_set_thread_context): New functions.
8771 (thread_rec): Use win32_get_thread_context.
8772 (continue_one_thread, win32_resume): Use win32_set_thread_context.
8773 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
8774 field.
8775
4d5d1aaa
PA
87762007-12-03 Leo Zayas
8777 Pedro Alves <pedro_alves@portugalmail.pt>
8778
8779 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
8780 global variables.
8781 (child_add_thread): Minor cleanup.
8782 (child_continue): Resume artificially suspended threads before
8783 calling ContinueDebugEvent.
8784 (suspend_one_thread): New.
8785 (fake_breakpoint_event): New.
8786 (get_child_debug_event): Change return type to int. Check here if
8787 gdb sent an interrupt request. If a soft interrupt was requested,
8788 fake a breakpoint event. Return 0 if there is no event to handle,
8789 and 1 otherwise.
8790 (win32_wait): Don't check here if gdb sent an interrupt request.
8791 Ensure there is a valid event to handle.
8792 (win32_request_interrupt): Add soft interruption method as last
8793 resort.
8794
c436e841
PA
87952007-12-03 Leo Zayas
8796 Pedro Alves <pedro_alves@portugalmail.pt>
8797
8798 * win32-low.h (win32_thread_info): Add descriptions to the
8799 structure members. Replace `suspend_count' counter by a
8800 `suspended' flag.
8801 * win32-low.c (thread_rec): Update condition of when to get the
8802 context from the inferior. Rely on ContextFlags being set if it
8803 has already been retrieved. Only suspend the inferior thread if
8804 we haven't already. Warn if that fails.
8805 (continue_one_thread): s/suspend_count/suspended/. Only call
8806 ResumeThread once. Warn if that fails.
8807
e7b5fa67
PA
88082007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
8809
8810 * win32-low.c (win32_wait): Don't read from the inferior when it
8811 has already exited.
8812
a385171d
PA
88132007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
8814
8815 * Makefile.in (win32_low_h): New variable.
8816 (win32-low.o): Add dependency on $(win32_low_h).
8817 (win32-arm-low.o, win32-i386-low.o): New rules.
8818
f80c84b3
DJ
88192007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
8820
8821 * hostio.c: Correct copyright year.
8822
a6b151f1
DJ
88232007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
8824
8825 * Makefile.in (OBS): Add hostio.o.
8826 (hostio.o): New rule.
8827 * server.h (handle_vFile): Declare.
8828 * hostio.c: New file.
8829 * server.c (handle_v_requests): Take packet_len and new_packet_len
8830 for binary packets. Call handle_vFile.
8831 (main): Update call to handle_v_requests.
8832
f9387fc3
DJ
88332007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
8834
8835 * linux-low.c: Include <sched.h>.
8836
51c2684e
DJ
88372007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
8838
8839 * linux-low.c (linux_tracefork_grandchild): New.
8840 (linux_tracefork_child): Use clone.
8841 (linux_test_for_tracefork): Use clone; allocate and free a stack.
8842
75f83163
JB
88432007-10-31 Joel Brobecker <brobecker@adacore.com>
8844
8845 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
8846
da5898ce
DJ
88472007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
8848
8849 * linux-low.c (handle_extended_wait): Handle unexpected signals.
8850
24a09b5f
DJ
88512007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
8852
8853 * inferiors.c (change_inferior_id): Delete.
8854 (add_pid_to_list, pull_pid_from_list): New.
8855 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
8856 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
8857 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
8858 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
8859 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
8860 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
8861 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
8862 (using_threads): Always set to 1.
8863 (handle_extended_wait): New.
8864 (add_process): Do not set TID.
8865 (linux_create_inferior): Set must_set_ptrace_flags.
8866 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
8867 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
8868 (linux_thread_alive): Rename TID argument to LWPID.
8869 (linux_wait_for_process): Handle unknown processes. Do not use TID.
8870 (linux_wait_for_event): Do not use TID or check using_threads. Update
8871 call to dead_thread_notify. Call handle_extended_wait.
8872 (linux_create_inferior): Use PTRACE_SETOPTIONS.
8873 (send_sigstop): Delete sigstop_sent.
8874 (wait_for_sigstop): Avoid TID.
8875 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
8876 (linux_test_for_tracefork): New.
8877 (linux_lookup_signals): Use thread_db_active and
8878 linux_supports_tracefork_flag.
8879 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
8880 * linux-low.h (get_process_thread): Avoid TID.
8881 (struct process_ifo): Move thread_known and tid to the end. Remove
8882 sigstop_sent.
8883 (linux_attach_lwp, thread_db_init): Update prototypes.
8884 * server.h (change_inferior_id): Delete prototype.
8885 (add_pid_to_list, pull_pid_from_list): New prototypes.
8886 * thread-db.c (thread_db_use_events): New.
8887 (find_first_thread): Rename to...
8888 (find_one_thread): ...this. Update callers and messages. Do not
8889 call fatal. Check thread_db_use_events. Do not call
8890 change_inferior_id or new_thread_notify.
8891 (maybe_attach_thread): Update. Do not call new_thread_notify.
8892 (thread_db_init): Set thread_db_use_events. Check use_events.
8893 * utils.c (fatal, warning): Correct message prefix.
8894
30ed0a8f
DJ
88952007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
8896
8897 * Makefile.in (clean): Remove new files.
8898 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
8899 (powerpc-64.o, powerpc-64.c): New rules.
8900 * configure.srv: Use alternate register sets for powerpc64-*-linux*
8901 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
8902 with SPE.
8903 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
8904 SPE targets.
8905 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
8906 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
8907 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
8908 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
8909 (target_regsets): Add AltiVec and SPE register sets.
8910 * configure.ac: Check for AltiVec and SPE.
8911 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
8912 (ppc_fill_vrregset, ppc_store_vrregset): New.
8913 (target_regsets): Add AltiVec register set.
8914 * configure: Regenerated.
8915
fd462a61
DJ
89162007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
8917
8918 * linux-low.c (O_LARGEFILE): Define.
8919 (linux_read_memory): Use /proc/PID/mem.
8920 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
8921 * configure, config.in: Regenerated.
8922
69f223ed
DJ
89232007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8924
8925 * linux-low.c (linux_wait_for_event): Do not pass signals while
8926 single-stepping.
8927
aec18585
PA
89282007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
8929
8930 * win32-low.c (create_process): New.
8931 (win32_create_inferior): Use create_process instead of
8932 CreateProcess. If create_process failed retry appending an ".exe"
8933 suffix. Store the GetLastError result immediatelly after
8934 create_process calls and use it on the call to error.
8935
34d86ddd
PA
89362007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
8937
8938 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
8939
5a0e3bd0
JB
89402007-08-23 Joel Brobecker <brobecker@adacore.com>
8941
8942 * configure.ac: Switch license to GPLv3.
8943
f88c79e6
MS
89442007-08-01 Michael Snyder <msnyder@access-company.com>
8945
8946 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
8947
6b3d9b83
PA
89482007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
8949
8950 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
8951 typedef.
8952 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
8953 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
8954 CloseToolhelp32Snapshot.
8955 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
8956 CloseToolhelp32Snapshot.
8957
c588c53c
MS
89582007-07-27 Michael Snyder <michael.snyder@access-company.com>
8959
8960 * server.c (main): Check for inferior exit before main loop.
8961
aa0403d9
PA
89622007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
8963
8964 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
8965 instead of on tmp_desc.
8966
255e7678
DJ
89672007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
8968 Daniel Jacobowitz <dan@codesourcery.com>
8969
8970 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
8971 (add_thread): Minor cleanups.
8972 (clear_inferiors): Move lower in the file. Clear the DLL
8973 list.
8974 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
8975 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
8976 (xml_escape_text): New.
8977 * server.c (handle_query): Handle qXfer:libraries:read. Report it
8978 for qSupported.
8979 (handle_v_cont): Report errors.
8980 (gdbserver_version): Update.
8981 (main): Correct size of own_buf. Do not report initial DLL events.
8982 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
8983 (unloaded_dll, xml_escape_text): New.
8984 * win32-low.c (enum target_waitkind): Update comments.
8985 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
8986 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
8987 (win32_EnumProcessModules, win32_GetModuleInformation)
8988 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
8989 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
8990 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
8991 (win32_Module32First, win32_Module32Next, load_toolhelp)
8992 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
8993 (get_child_debug_event): Handle DLL events.
8994 (win32_wait): Likewise.
8995
0d37add9
DJ
89962007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
8997
8998 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
8999 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
9000
45e2715e
PA
90012007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9002
9003 * win32-low.c (handle_output_debug_string): Ignore event if not
9004 waiting.
9005
c5674cf1
PA
90062007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9007
9008 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9009
2bbe3cc1
DJ
90102007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9011
9012 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9013
ae13219e
DJ
90142007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9015
9016 * inferiors.c (change_inferior_id): Add comment.
9017 * linux-low.c (check_removed_breakpoint): Add an early
9018 prototype. Improve debug output.
9019 (linux_attach): Doc update.
9020 (linux_detach_one_process, linux_detach): Clean up before releasing
9021 each process.
9022 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9023 * linux-low.h (struct process_info): Doc improvement.
9024 * mem-break.c (delete_all_breakpoints): New.
9025 * mem-break.h (delete_all_breakpoints): New prototype.
9026 * thread-db.c (find_first_thread): New.
9027 (thread_db_create_event): Call it instead of
9028 thread_db_find_new_threads. Clean up unused variables.
9029 (maybe_attach_thread): Remove first thread handling.
9030 (thread_db_find_new_threads): Use find_first_thread.
9031 (thread_db_get_tls_address): Likewise.
9032
4105de34
DJ
90332007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9034
9035 * thread-db.c (thread_db_find_new_threads): Add prototype.
9036 (thread_db_create_event): Check for the main thread before adding
9037 a new thread.
9038 (maybe_attach_thread): Only enable event reporting if TID == 0.
9039 (thread_db_get_tls_address): Check for new threads.
9040
2b876972
DJ
90412007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
9042
9043 * linux-low.c (linux_create_inferior): Try execv before execvp.
9044 * spu-low.c (spu_create_inferior): Likewise.
9045
7a245884
DJ
90462007-06-13 Mike Frysinger <vapier@gentoo.org>
9047
9048 * linux-low.c (linux_create_inferior): Change execv to execvp.
9049 * spu-low.c (spu_create_inferior): Likewies.
9050
117ce543
DJ
90512007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
9052
9053 * Makefile.in (clean): Clean new files instead of deleted ones.
9054 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9055 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9056 rules.
9057 * configure.srv: Specify XML files and new regformats for MIPS and
9058 MIPS64 GNU/Linux.
9059 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9060 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9061 an entry for the restart register.
9062 (mips_cannot_fetch_register, mips_cannot_store_register)
9063 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9064 register names to match the XML descriptions.
9065 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9066 restart register instead of $0.
9067
0e7f50da
UW
90682007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9069 Markus Deuling <deuling@de.ibm.com>
9070
9071 * remote-utils.c (decode_xfer_write): New function.
9072 * server.h (decode_xfer_write): Add prototype.
9073 * server.c (handle_query): Add PACKET_LEN argument. Support
9074 qXfer:spu:read and qXfer:spu:write packets.
9075 (main): Pass packet_len to handle_query.
9076 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9077 * target.h (target_ops): Add qxfer_spu.
9078
374c1d38
UW
90792007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9080
9081 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
9082 accessing non-seekable spufs files.
9083
bb63802a
UW
90842007-05-16 Markus Deuling <deuling@de.ibm.com>
9085
889bf7c5 9086 * server.c (handle_query): Add reply for qC packet.
bb63802a 9087
7390519e
PA
90882007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9089 Leo Zayas <lerele@champenstudios@com>
9090
9091 * server.h (check_remote_input_interrupt_request): New function.
9092 * remote_utils.c (INVALID_DESCRIPTOR): New define.
9093 (remote_desc): Initialize with INVALID_DESCRIPTOR.
9094 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
9095 (check_remote_input_interrupt_request): New function.
9096 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 9097 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
9098 winapi_GenerateConsoleCtrlEvent): New typedefs.
9099 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
9100 to 250 ms.
9101 (win32_wait): Check for remote interrupt request
9102 with check_remote_input_interrupt_request.
9103 (win32_request_interrupt): New function.
9104 (win32_target_op): Set request_interrupt to win32_request_interrupt.
9105
34b34921
PA
91062007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9107
9108 * win32-low.c (debug_registers_changed,
9109 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
9110 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
9111 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
9112 (thread_rec): Get context using the low target.
9113 (child_add_thread): Call thread_added on the low target,
9114 which does the same thing.
9115 (regptr): Delete.
9116 (do_initial_child_stuff): Remove debug registers references.
9117 Set context using the low target. Resume threads after
9118 setting the contexts.
9119 (child_continue): Remove dead variable. Remove debug
9120 registers references.
9121 (child_fetch_inferior_registers): Go through the low target.
9122 (do_child_store_inferior_registers): Remove.
9123 (child_store_inferior_registers): Go through the low target.
9124 (win32_resume): Remove debug registers references.
9125 Set context using the low target.
9126 (handle_exception): Change return type to void. Don't record
9127 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
9128 first chance exception.
889bf7c5 9129 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
9130 goto loop. Always return after waiting for debug event.
9131 (win32_wait): Convert to switch statement. Handle spurious
9132 events.
9133
9134 * win32-i386-low.c (debug_registers_changed,
9135 debug_registers_used): New.
9136 (initial_stuff): Rename to ...
9137 (i386_initial_stuff): ... this. Clear debug registers
9138 state variables.
9139 (store_debug_registers): Delete.
9140 (i386_get_thread_context): New.
9141 (load_debug_registers): Delete.
9142 (i386_set_thread_context): New.
9143 (i386_thread_added): New.
9144 (single_step): Rename to ...
9145 (i386_single_step): ... this.
9146 (do_fetch_inferior_registers): Rename to ...
9147 (i386_fetch_inferior_register): ... this.
9148 (i386_store_inferior_register): New.
9149 (the_low_target): Adapt to new interface.
9150
9151 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
9152 (arm_get_thread_context): New.
9153 (arm_set_thread_context): New.
9154 (regptr): New.
9155 (do_fetch_inferior_registers): Rename to ...
9156 (arm_fetch_inferior_register): ... this.
9157 (arm_store_inferior_register): New.
9158 (arm_wince_breakpoint): Reimplement as unsigned long.
9159 (arm_wince_breakpoint_len): Define.
9160 (the_low_target): Adapt to new interface.
9161
9162 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
9163 load_debug_registers. Add get_thread_context, set_thread_context,
9164 thread_added and store_inferior_register. Rename
9165 fetch_inferior_registers to fetch_inferior_register.
9166 (regptr): Remove declaration.
9167
dd6953e1
PA
91682007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9169
9170 * linux-low.c (linux_detach): Change return type to int. Return 0.
9171 * spu-low.c (spu_detach): Likewise.
9172
444d6139
PA
91732007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9174
9175 * target.h (target_ops): Change return type of detach to int.
9176 Add join.
9177 (join_inferior): New.
9178 * server.c (main): Don't skip detach support on mingw32.
9179 If the inferior doesn't support detaching return error.
9180 Call join_inferior instead of using waitpid.
9181 * linux-low.c (linux_join): New.
9182 (linux_target_op): Add linux_join.
9183 * spu-low.c (spu_join): New.
9184 (spu_target_ops): Add spu_join.
9185 * win32-low.c (win32_detach): Adapt to new interface.
9186 Reopen current_process_handle before detaching. Issue a child
9187 resume before detaching.
9188 (win32_join): New.
9189 (win32_target_op): Add win32_join.
9190
1d5315fe
PA
91912007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9192
9193 * win32-low.c (win32-attach): Fix return value.
9194 * target.h (target_ops): Describe ATTACH return values.
9195
bf914831
PA
91962007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9197
9198 * win32-low.c (GETPROCADDRESS): Define.
9199 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
9200 (winapi_DebugSetProcessKillOnExit): Likewise.
9201 (win32_create_inferior): Force usage of ansi CreateProcessA.
9202 (win32_attach): Use GETPROCADDRESS.
9203 (win32_detach): Likewise.
9204
f72f3e60
PA
92052007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9206
9207 * win32-low.c (win32_wait): Don't use WSTOPSIG.
9208
ed50f18f
PA
92092007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
9210
9211 * win32-low.c: Commit leftover changes from 2007-03-29.
9212
0c2ead7e
DJ
92132007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9214
9215 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
9216 fields short instead of int. Add explicit padding.
9217 (i387_cache_to_fsave): Remove unnecessary casts.
9218 (i387_fsave_to_cache): Doc fix.
9219 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
9220
73725ff3
DJ
92212007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9222
9223 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
9224 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
9225
d99f33d8
PA
92262007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9227
9228 * configure.srv (arm*-*-mingw32ce*): Move near the other
9229 arm targets.
9230
68070c10
PA
92312007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9232
2482afc6 9233 * configure.ac: Add errno checking.
68070c10
PA
9234 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
9235 sys/file.h and malloc.h.
9236 (AC_CHECK_DECLS): Add perror.
9237 (srv_mingwce): Handle.
2482afc6 9238 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
9239 win32-i386-low.o to srv_tgtobj.
9240 (i[34567]86-*-mingw*): Likewise.
9241 (arm*-*-mingw32ce*): Add case.
9242 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9243 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
9244 [__MINGW32CE__] (strerror): New function.
9245 [__MINGW32CE__] (errno): Define to GetLastError.
9246 [__MINGW32CE__] (COUNTOF): New macro.
9247 (remote_open): Remove extra close call.
9248 * mem-break.c (delete_breakpoint_at): New function.
9249 * mem-break.h (delete_breakpoint_at): Declare.
9250 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9251 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
9252 [USE_WIN32API] (read, write): Add char* casts.
9253 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
9254 * server.h: Include wincecompat.h on Windows CE.
9255 [HAVE_ERRNO_H]: Check.
9256 (perror): Declare if not declared.
9257 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
9258 (perror_with_name): Remove errno declaration.
9259 * wincecompat.h: New.
9260 * wincecompat.c: New.
9261 * win32-low.h: New.
9262 * win32-arm-low.c: New.
9263 * win32-i386-low.c: New.
9264 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
9265 (OUTMSG2): Make it safe.
9266 (_T): New macro.
9267 (COUNTOF): New macro.
9268 (NUM_REGS): Get it from the low target.
9269 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
9270 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
9271 (thread_rec): Let low target handle debug registers.
9272 (child_add_thread): Likewise.
9273 (child_init_thread_list): Likewise.
9274 (continue_one_thread): Likewise.
9275 (regptr): New.
9276 (do_child_fetch_inferior_registers): Move to ...
9277 * win32-i386-low.c: ... here, and rename to ...
9278 (do_fetch_inferior_registers): ... this.
889bf7c5 9279 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
9280 Go through the low target.
9281 (do_child_store_inferior_registers): Use regptr.
9282 (strwinerror): New function.
9283 (win32_create_inferior): Handle Windows CE.
9284 Use strwinerror instead of strerror on Windows error
9285 codes. Add program to the error output.
9286 Don't close the main thread handle on Windows CE.
9287 (win32_attach): Use coredll.dll on Windows CE.
9288 (win32_kill): Close current process and current
9289 thread handles.
9290 (win32_detach): Use coredll.dll on Windows CE.
9291 (win32_resume): Let low target handle debug registers, and
9292 step request.
9293 (handle_exception): Add/Remove initial breakpoint. Avoid
9294 non-existant WSTOPSIG on Windows CE.
9295 (win32_read_inferior_memory): Cast to remove warning.
9296 (win32_arch_string): Go through the low target.
9297 (initialize_low): Call set_breakpoint_data with the low
9298 target's breakpoint.
9299 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
9300 FOP_REGNUM, mappings): Move to ...
9301 * win32-i386-low.c: ... here.
9302 * win32-low.c (win32_thread_info): Move to ...
9303 * win32-low.h: ... here.
9304 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
9305 win32-arm-low.c and wincecompat.c.
9306 (all:): Add $EXEEXT.
9307 (install-only:): Likewise.
9308 (gdbserver:): Likewise.
9309 (gdbreplay:): Likewise.
9310 * config.in: Regenerate.
9311 * configure: Regenerate.
9312
41093d81
PA
93132007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9314
9315 * win32-low.c: Rename typedef thread_info to
9316 win32_thread_info throughout.
9317
544afa54
PA
93182007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9319
9320 * win32-i386-low.c: Rename to ...
9321 * win32-low.c: ... this.
9322 * configure.srv: Replace win32-i386-low.o with win32-low.o.
9323 * Makefile.in: Likewise.
9324
bce7165d
PA
93252007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
9326
9327 * remote-utils.c (monitor_output): Constify msg parameter.
9328 * server.h (monitor_output): Likewise.
9329 * win32-i386-low.c (handle_output_debug_string): New.
9330 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
9331 handle_output_debug_string.
9332 (get_child_debug_event): Likewise.
9333
506c7aa0
DJ
93342007-03-27 Mat Hostetter <mat@lcs.mit.edu>
9335
9336 * server.c (main): Correct strtoul check.
9337
42c81e2a
DJ
93382007-03-27 Jon Ringle <jon@ringle.org>
9339
9340 * linux-low.c: Check __ARCH_HAS_MMU__ also.
9341
9453113a
DJ
93422007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
9343
9344 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
9345
64a69107
DJ
93462007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
9347
9348 * terminal.h: Check HAVE_SGTTY_H.
9349
93502007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
9351
9352 * remote-utils.c (remote_open): Print out the assigned port number.
9353
c74d0ad8
DJ
93542007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
9355
9356 * remote-utils.c (monitor_output): New function.
9357 * server.c (debug_threads): Define here.
9358 (monitor_show_help): New function.
9359 (handle_query): Handle qRcmd.
9360 (main): Do not handle 'd' packet.
9361 * server.h (debug_threads, remote_debug, monitor_output): Declare.
9362 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
9363 of debug_threads.
9364
de7c3b4a
PA
93652007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9366
9367 * Makefile.in (EXEEXT): New.
9368 (clean): Use $(EXEEXT).
9369
ef57601b
PA
93702007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9371
9372 * target.h (target_ops): Rename send_signal to request_interrupt,
9373 and remove enum target_signal parameter.
9374 * linux-low.c (linux_request_interrupt): Rename from
9375 linux_send_signal, and always send SIGINT.
9376 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
9377 and always send SIGINT.
9378 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
9379 of send_signal.
9380 (input_interrupt): Likewise.
9381
820f2bda
PA
93822007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9383
9384 * server.c (get_features_xml): Check if target implemented
9385 arch_string.
9386 * win32-i386-low.c (win32_arch_string): New.
9387 (win32_target_ops): Add win32_arch_string as arch_string member.
9388
ab39bf24
UW
93892007-02-22 Markus Deuling <deuling@de.ibm.com>
9390
9391 * spu-low.c (spu_arch_string): New.
9392 (spu_target_ops): Add spu_arch_string.
9393
61ff6e04
DJ
93942007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
9395
9396 * remote-utils.c: Remove HAVE_TERMINAL_H check.
9397 * configure.ac: Do not check for terminal.h.
9398 * configure, config.in: Regenerated.
9399
fb1e4ffc
DJ
94002007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9401
9402 * Makefile.in (OBS): Add $(XML_BUILTIN).
9403 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
9404 (clean): Update.
9405 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
9406 (arm-with-iwmmxt.c): New.
9407 * config.in, configure: Regenerate.
9408 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
9409 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
9410 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
9411 (arm*-*-linux*): Add iWMMXt and regset support.
9412 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
9413 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
9414 (arm_store_wmmxregset, target_regsets): New.
9415 * server.c (get_features_xml): Take annex argument. Check builtin
9416 XML documents.
9417 (handle_query): Handle multiple annexes.
9418
0f48aa01
DJ
94192007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9420
9421 * remote-utils.c [USE_WIN32API] (read, write): Define.
9422 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
9423 write.
9424
23181151
DJ
94252007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
9426
9427 * linux-i386-low.c (the_low_target): Set arch_string.
9428 * linux-x86-64-low.c (the_low_target): Likewise.
9429 * linux-low.c (linux_arch_string): New.
9430 (linux_target_ops): Add it.
9431 * linux-low.h (struct linux_target_ops): Add arch_string.
9432 * server.c (write_qxfer_response): Use const void * for DATA.
9433 (get_features_xml): New.
9434 (handle_query): Handle qXfer:features:read. Report it for qSupported.
9435 * target.h (struct target_ops): Add arch_string method.
9436
9d606399
DJ
94372007-01-03 Denis Pilat <denis.pilat@st.com>
9438 Daniel Jacobowitz <dan@codesourcery.com>
9439
9440 * linux-low.c (linux_kill): Handle being called with no threads.
9441 * win32-i386-low.c (win32_kill): Likewise.
9442 (get_child_debug_event): Clear current_process_handle.
9443
94442006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
9445 Daniel Jacobowitz <dan@codesourcery.com>
9446
9447 * remote-utils.c (remote_open): Check the type of specified
9448 serial port devices before opening them.
9449 * server.c (main): Kill the inferior if an error occurs during
9450 the first remote_open.
9451
a5e13d24
DJ
94522006-12-05 Markus Deuling <deuling@de.ibm.com>
9453
9454 * README: Update supported targets.
9455
186947f7
DJ
94562006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
9457
9458 * Makefile.in (clean): Remove reg-mips64.c.
9459 (reg-mips64.c, reg-mips64.o): New rules.
9460 * configure.srv: Handle mips64. Include regset support for mips.
9461 * linux-mips-low.c (union mips_register): New.
9462 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
9463 (mips_breakpoint, mips_breakpoint_at): Use int.
9464 (mips_collect_register, mips_supply_register)
9465 (mips_collect_register_32bit, mips_supply_register_32bit)
9466 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9467 (mips_store_fpregset, target_regsets): New.
9468 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
9469
a13e2c95
UW
94702006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
9471
9472 * configure.srv: Add target "spu*-*-*".
9473 * Makefile.in (clean): Remove reg-spu.c.
9474 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
9475 * spu-low.c: New file.
9476
cb7283db
DJ
94772006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9478
9479 * configure.ac: Correct td_thr_tls_get_addr test.
9480 * configure: Regenerated.
9481
89be2091
DJ
94822006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9483
9484 * linux-low.c (linux_wait_for_event): Reformat. Use the
9485 pass_signals array.
9486 * remote-utils.c (decode_address_to_semicolon): New.
9487 * server.c (pass_signals, handle_general_set): New.
9488 (handle_query): Mention QPassSignals for qSupported.
9489 (main): Call handle_general_set.
9490 * server.h (pass_signals, decode_address_to_semicolon): New.
9491
000ef4f0
DJ
94922006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
9493
9494 * server.c (handle_query): Correct error handling for read_auxv.
9495
b7149293
UW
94962005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
9497
9498 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
9499 and srv_linux_thread_db to yes.
9500 * linux-s390-low.c (s390_fill_gregset): New function.
9501 (target_regsets): Define data structure.
9502
dae5f5cf
DJ
95032006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
9504
9505 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
9506 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
9507 * config.in, configure: Regenerated.
9508 * inferiors.c (gdb_id_to_thread): New function.
9509 (gdb_id_to_thread_id): Use it.
9510 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
9511 * linux-low.h (struct process_info): Add th member.
9512 (thread_db_get_tls_address): New prototype.
9513 * remote-utils.c (decode_address): Make non-static.
9514 * server.c (handle_query): Handle qGetTLSAddr.
9515 * server.h (gdb_id_to_thread, decode_address): New prototypes.
9516 * target.h (struct target_ops): Add get_tls_address.
9517 * thread-db.c (maybe_attach_thread): Save the thread handle.
9518 (thread_db_get_tls_address): New.
9519
32ca6d61
DJ
95202006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
9521
9522 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
9523 (linux_resume_one_process): Take a siginfo_t *. Update all
9524 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
9525 (struct pending_signals): Add a siginfo_t.
9526 (linux_wait_for_process): Always set last_status.
9527 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
9528 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
9529 * linux-low.h (struct process_info): Add last_status.
9530
5ffff7c1
DJ
95312006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
9532
9533 * remote-utils.c (try_rle): New function.
9534 (putpkt_binary): Use it.
9535
8695c747
DJ
95362006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
9537
9538 * Makefile.in (clean): Clean reg-x86-64-linux.c.
9539 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
9540 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
9541 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
9542 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
9543 point registers.
9544
290fadea
RS
95452006-08-08 Richard Sandiford <richard@codesourcery.com>
9546
9547 * server.c (terminal_fd): New variable.
9548 (old_foreground_pgrp): Likewise.
9549 (restore_old_foreground_pgrp): New function.
9550 (start_inferior): Record the terminal file descriptor in terminal_fd
9551 and its original foreground group in old_foreground_pgrp. Register
9552 restore_old_foreground_pgrp with atexit().
9553
9f2e1e63
DJ
95542006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
9555
9556 * server.c (handle_query): Correct qPart to qXfer.
9557
b80864fb
DJ
95582006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
9559
9560 * configure.ac: Check for more headers which are missing on
9561 Windows. Automatically supply -lwsock32 and USE_WIN32API.
9562 * configure.srv: Add Cygwin and mingw32.
9563 * remote-utils.c: Don't include headers unconditionally which
9564 are missing on mingw32. Include <winsock.h> for mingw32.
9565 (remote_open): Adjust for mingw32 support. Flush
9566 standard error after writing to it.
9567 (remote_close, putpkt_binary, input_interrupt, block_async_io)
9568 (unblock_async_io, enable_async_io, disable_async_io)
9569 (readchar, getpkt): Update for Winsock support.
9570 (prepare_resume_reply): Expect a protocol signal number.
9571 * server.c: Disable <sys/wait.h> on mingw32.
9572 (start_inferior): Adjust for mingw32 support. Flush
9573 standard error after writing to it.
9574 (attach_inferior): Likewise. Use protocol signal
9575 numbers.
9576 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
9577 and names.
9578 * win32-i386-low.c: New file.
9579 * Makefile.in (XM_CLIBS): Set.
9580 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
9581 (win32-i386-low.o): New dependency rule.
9582 * linux-low.c (linux_wait): Use target signal numbers.
9583 * target.h (struct target_ops): Doc fix.
9584 * server.h (target_signal_to_name): New prototype.
9585 * gdbreplay.c: Don't include headers unconditionally which
9586 are missing on mingw32. Include <winsock.h> for mingw32.
9587 (remote_close, remote_open): Adjust for Winsock support.
9588 * configure, config.in: Regenerated.
9589
0876f84a
DJ
95902006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9591
9592 * server.c (decode_xfer_read, write_qxfer_response): New.
9593 (handle_query): Take a packet length argument. Handle
9594 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
9595 the qSupported response.
9596 (main): Update call to handle_query.
9597
01f9e8fa
DJ
95982006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
9599
9600 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
9601 (putpkt_binary): Renamed from putpkt and adjusted for binary
9602 data.
9603 (putpkt): New wrapper for putpkt_binary.
9604 (readchar): Don't mask off the high bit.
9605 (decode_X_packet): New function.
9606 * server.c (main): Call putpkt_binary if a handler sets the packet
9607 length. Save the length of the incoming packet. Handle 'X'.
9608 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
9609
be2a5f71
DJ
96102006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
9611
9612 * server.c (handle_query): Handle qSupported.
9613
ea025f5f
DJ
96142006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9615
9616 * remote-utils.c (all_symbols_looked_up): New variable.
9617 (look_up_one_symbol): Check it.
9618 * server.h (look_up_one_symbol): New declaration.
9619 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
9620
9308fc88
DJ
96212006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9622
9623 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 9624 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
9625 (PTRACE_GET_THREAD_AREA): Define.
9626 (ps_get_thread_area): New function.
9627
52fb6437
NS
96282006-05-09 Nathan Sidwell <nathan@codesourcery.com>
9629
9630 * configure.srv (m68k*-*-uclinux*): New target.
9631 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
9632 (linux_resume_one_process): Remove extraneous cast.
9633 (linux_read_offsets): New.
9634 (linux_target_op): Add linux_read_offsets on mmuless systems.
9635 * server.c (handle_query): Add qOffsets logic.
9636 * target.h (struct target_ops): Add read_offsets.
9637
21b0f40c
DJ
96382006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
9639
9640 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
9641 (PTRACE_GET_THREAD_AREA): Define.
9642 (ps_get_thread_area): New function.
9643 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
9644 (linux-x86-64-low.o): Update.
9645
0050a760
DJ
96462006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
9647
9648 * configure.ac: Remove checks for prfpregset_t.
9649 * gdb_proc_service.h: New file.
9650 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
9651 new "gdb_proc_service.h".
9652 * proc-service.c: Likewise.
9653 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
9654 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
9655 * Makefile.in (gdb_proc_service_h): Updated.
9656 * configure, config.in: Regenerated.
9657
b92a518e
DJ
96582006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
9659
9660 * remote-utils.c (prepare_resume_reply): Move declaration
9661 of gdb_id_from_wait to the top of the block.
9662
545587ee
DJ
96632006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
9664
9665 * linux-low.c (regsets_store_inferior_registers): Read the regset
9666 from the target before filling it.
9667
9db87ebd
DJ
96682006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9669
9670 * server.c (attach_inferior): Return SIGTRAP for a successful
9671 attach.
9672
dd24457d
DJ
96732006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9674
9675 * Makefile.in (OBS): Add version.o.
9676 (STAGESTUFF): Delete.
9677 (version.o): Add dependencies.
9678 (version.c): Replace rule.
9679 (clean): Remove version.c.
9680 * server.c (gdbserver_version): New.
9681 (gdbserver_usage): Use printf.
9682 (main): Handle --version and --help.
9683 * server.h (version, host_name): Add declarations.
9684
6f0f660e
EZ
96852005-12-23 Eli Zaretskii <eliz@gnu.org>
9686
889bf7c5
PA
9687 * linux-arm-low.c:
9688 * linux-arm-low.c:
9689 * inferiors.c:
9690 * i387-fp.h:
9691 * i387-fp.c:
9692 * gdbreplay.c:
9693 * regcache.c:
9694 * proc-service.c:
9695 * mem-break.h:
9696 * mem-break.c:
9697 * linux-x86-64-low.c:
9698 * linux-sh-low.c:
9699 * linux-s390-low.c:
9700 * linux-ppc64-low.c:
9701 * linux-ppc-low.c:
9702 * linux-mips-low.c:
9703 * linux-m68k-low.c:
9704 * linux-m32r-low.c:
9705 * linux-low.h:
9706 * linux-low.c:
9707 * linux-ia64-low.c:
9708 * linux-i386-low.c:
9709 * linux-crisv32-low.c:
9710 * thread-db.c:
9711 * terminal.h:
9712 * target.h:
9713 * target.c:
9714 * server.h:
9715 * server.c:
9716 * remote-utils.c:
9717 * regcache.h:
9718 * utils.c:
9719 * Makefile.in:
9720 * configure.ac:
6f0f660e
EZ
9721 * gdbserver.1: Add (C) after Copyright. Update the FSF
9722 address.
9723
9d1fb177
DJ
97242005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
9725
9726 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
9727 (arm_breakpoint_at): Recognize both breakpoints.
9728 (the_low_target): Use the correct breakpoint instruction.
9729
011a70c2
DJ
97302005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
9731
9732 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
9733 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
9734 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
9735 (the_low_target): Update.
9736
7fb85e41
AS
97372005-10-25 Andreas Schwab <schwab@suse.de>
9738
9739 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
9740
9741 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
9742 (ia64_num_regs): Reduce to 462.
9743
3db0444b
DJ
97442005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
9745
9746 * acinclude.m4: Correct quoting.
9747 * aclocal.m4: Regenerated.
9748
9749 Suggested by SZOKOVACS Robert <szo@ies.hu>:
9750 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
9751 (thread_db_init): Call thread_db_err_str.
9752 * configure.ac: Check for TD_VERSION.
9753 * config.in, configure: Regenerated.
9754
bee0189a
DJ
97552005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9756
9757 * server.h (error, fatal, warning): Add ATTR_FORMAT.
9758
e9d25b98
DJ
97592005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9760
9761 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
9762 is not available. Define HAVE_PTRACE_GETREGS if it is.
9763 * config.in, configure: Regenerated.
9764 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
9765 * linux-i386-low.c, linux-m68k-low.c: Update to use
9766 HAVE_PTRACE_GETREGS.
9767 * linux-low.c (regsets_fetch_inferior_registers)
9768 (regsets_store_inferior_registers): Only return 0 if we processed
9769 GENERAL_REGS.
9770 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
9771 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
9772
a06660f7
DJ
97732005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9774
9775 * inferiors.c (struct thread_info): Add gdb_id.
9776 (add_thread): Add gdb_id argument.
9777 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
9778 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
9779 calls to add_thread.
9780 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
9781 * server.c (handle_query): Use thread_to_gdb_id.
9782 (handle_v_cont, main): Use gdb_id_to_thread_id.
9783 * server.h (add_thread): Update prototype.
9784 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
9785 prototypes.
9786
5a1f5858
DJ
97872005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9788
9789 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
9790 left-padded registers.
9791 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
9792 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
9793
e122f1f5
SE
97942005-07-01 Steve Ellcey <sje@cup.hp.com>
9795
9796 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
9797 * configure: Regenerate.
9798 * config.in: Regenerate.
9799 * server.h (NEED_DECLARATION_STRERROR):
9800 Replace with !HAVE_DECL_STRERROR.
9801
d592fa2f
DJ
98022005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
9803
9804 * linux-low.c (linux_wait, linux_send_signal): Don't test
9805 an unsigned long variable for > 0 if it could be MAX_ULONG.
9806 * server.c (myresume): Likewise.
9807 * target.c (set_desired_inferior): Likewise.
9808
ccbd4912
MK
98092005-06-13 Mark Kettenis <kettenis@gnu.org>
9810
9811 * configure.ac: Simplify and improve check for socklen_t.
9812 * configure, config.in: Regenerate.
9813
f450004a
DJ
98142005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
9815
9816 * acconfig.h: Remove.
9817 * configure.ac: Add a test for socklen_t. Use three-argument
9818 AC_DEFINE throughout.
9819 * config.in: Regenerated using autoheader 2.59.
9820 * configure: Regenerated.
9821
9822 * gdbreplay.c (socklen_t): Provide a default.
9823 (remote_open): Use socklen_t.
9824 * remote-utils.c (socklen_t): Provide a default.
9825 (remote_open): Use socklen_t.
9826 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
9827 unsigned char.
9828
9829 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
9830 char for buffers.
9831 * linux-low.c (linux_read_memory, linux_write_memory)
9832 (linux_read_auxv): Likewise.
9833 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
9834 (check_mem_write): Likewise.
9835 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
9836 Likewise.
9837 * regcache.c (struct inferior_rgcache_data, registers_to_string)
9838 (registers_from_string, register_data): Likewise.
9839 * server.c (handle_query, main): Likewise.
9840 * server.h (convert_ascii_to_int, convert_int_to_ascii)
9841 (decode_M_packet): Likewise.
9842 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
9843 * target.h (struct target_ops): Update read_memory, write_memory,
9844 and read_auxv.
9845 (read_inferior_memory, write_inferior_memory): Update.
9846 * linux-low.h (struct linux_target_ops): Change type of breakpoint
9847 to unsigned char *.
9848 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
9849 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
9850 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
9851 linux-s390-low.c, linux-sh-low.c: Update for changes in
9852 read_inferior_memory and the_low_target->breakpoint.
9853
eee84df1
DJ
98542005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
9855
9856 * Makefile.in (SFILES): Add linux-ppc64-low.c.
9857 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
9858 * configure.srv: Add powerpc64-*-linux*.
9859 * linux-ppc64-low.c: New file.
9860
45b134e5
OF
98612005-05-23 Orjan Friberg <orjanf@axis.com>
9862
9863 * linux-cris-low.c: New file with support for CRIS.
9864 * linux-crisv32-low.c: Ditto for CRISv32.
9865 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
9866 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 9867 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
9868 reg-crisv32.o, and reg-crisv32.c to make rules.
9869 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
9870 recognized targets.
9871
48d93c75
UW
98722005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
9873
9874 * linux-low.c (fetch_register): Ensure buffer size is a multiple
9875 of sizeof (PTRACE_XFER_TYPE).
9876 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
9877
e013ee27
OF
98782005-05-12 Orjan Friberg <orjanf@axis.com>
9879
889bf7c5 9880 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
9881 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
9882 pointers for hardware watchpoint support.
9883 * linux-low.h (struct linux_target_ops): Ditto.
9884 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
9885 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
9886 to linux_target_ops.
9887 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
9888 reply packet.
9889 * server.c (main): Recognize 'Z' and 'z' packets.
9890
b0ded00b
UW
98912005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
9892
9893 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
9894 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
9895 (the_low_target): Add new members.
9896
8643e2ad
DJ
98972005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
9898
9899 * proc-service.c (ps_lgetregs): Search all_processes instead of
9900 all_threads.
9901
fc620387
DJ
99022005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
9903
9904 * server.c (start_inferior): Change return type to int.
9905 (attach_inferior): Change sigptr to int *.
9906 (handle_v_cont, handle_v_requests): Change signal to int *.
9907 (main): Change signal to int.
9908
99092005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
9910
9911 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
9912 * configure.srv: Add m32r*-*-linux*.
9913 * linux-m32r-low.c: New file.
9914
e0e76420
DJ
99152005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
9916
9917 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
9918
a1928bad
DJ
99192005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
9920
9921 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
9922 Take unsigned long arguments for PIDs.
9923 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
9924 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
9925 (wait_for_sigstop, linux_resume_one_process)
9926 (regsets_fetch_inferior_registers, linux_send_signal)
9927 (linux_read_auxv): Likewise. Update the types of variables holding
9928 PIDs. Update format string specifiers.
9929 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
9930 * remote-utils.c (prepare_resume_reply): Likewise.
9931 * server.c (cont_thread, general_thread, step_thread)
9932 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
9933 unsigned long.
9934 (handle_query): Update format specifiers.
9935 (handle_v_cont, main): Use strtoul for thread IDs.
9936 * server.h (struct inferior_list_entry): Use unsigned long for ID.
9937 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
9938 (general_thread, step_thread, thread_from_wait)
9939 (old_thread_from_wait): Update.
9940 * target.h (struct thread_resume): Use unsigned long for THREAD.
9941 (struct target_ops): Use unsigned long for arguments to attach and
9942 thread_alive.
9943
dcdb98d2
DJ
99442005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
9945
9946 * acinclude.m4: Include bfd/bfd.m4 directly.
9947 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
9948 <agriffis@toolchain.org>.
9949 * aclocal.m4, configure: Regenerated.
9950
bec39cab
AC
99512005-01-07 Andrew Cagney <cagney@gnu.org>
9952
9953 * configure.ac: Rename configure.in, require autoconf 2.59.
9954 * configure: Re-generate.
9955
434c4c77
DJ
99562004-12-08 Daniel Jacobowitz <dan@debian.org>
9957
9958 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
9959 LIBS when finished.
9960 * aclocal.m4: Regenerated.
9961 * configure: Regenerated.
9962
db1d3e1b
AS
99632004-11-21 Andreas Schwab <schwab@suse.de>
9964
9965 * linux-m68k-low.c (m68k_num_gregs): Define.
9966 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
9967 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
9968 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
9969 (m68k_breakpoint_at): New. Add to the_low_target.
9970
9971 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
9972 srv_linux_thread_db to yes.
9973
43360365
JB
99742004-10-20 Joel Brobecker <brobecker@gnat.com>
9975
9976 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
9977 (ARCH_SET_FS): Likewise.
9978 (ARCH_GET_FS): Likewise.
9979 (ARCH_GET_GS): Likewise.
9980
fd500816
DJ
99812004-10-16 Daniel Jacobowitz <dan@debian.org>
9982
9983 * linux-i386-low.c (ps_get_thread_area): New.
9984 * linux-x86-64-low.c (ps_get_thread_area): New.
9985 * linux-low.c: Include <sys/syscall.h>.
9986 (linux_kill_one_process): Don't kill the first thread here.
9987 (linux_kill): Kill the first thread here.
9988 (kill_lwp): New function.
9989 (send_sigstop, linux_send_signal): Use it.
9990 * proc-service.c: Clean up #ifdefs.
9991 (fpregset_info): Delete.
9992 (ps_lgetregs): Update and enable implementation.
9993 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
9994 implementations.
9995 * remote-utils.c (struct sym_cache, symbol_cache): New.
9996 (input_interrupt): Print a clearer message.
9997 (async_io_enabled): New variable.
9998 (enable_async_io, disable_async_io): Use it. Update comments.
9999 (look_up_one_symbol): Use the symbol cache.
10000 * thread-db.c (thread_db_look_up_symbols): New function.
10001 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
10002
f6de3c42
DJ
100032004-10-16 Daniel Jacobowitz <dan@debian.org>
10004
10005 * configure.in: Test for -rdynamic.
10006 * configure: Regenerated.
10007 * Makefile (INTERNAL_LDFLAGS): New.
10008 (gdbserver, gdbreplay): Use it.
10009
2c0fc042
AC
100102004-09-02 Andrew Cagney <cagney@gnu.org>
10011
10012 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10013
075b3282
DJ
100142004-03-23 Daniel Jacobowitz <drow@mvista.com>
10015
10016 * linux-low.c (linux_wait): Clear all_processes list also.
10017
fa6a77dc
DJ
100182004-03-12 Daniel Jacobowitz <drow@mvista.com>
10019
10020 * linux-low.c: Include <errno.h>. Remove extern declaration of
10021 errno.
10022
6d782a97
DJ
100232004-03-12 Daniel Jacobowitz <drow@mvista.com>
10024
10025 * gdbreplay.c, server.h, utils.c: Update copyright years.
10026
3a7fb99b
DJ
100272004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10028
10029 * server.c (main): Print child status or termination signal from
10030 variable 'signal', not 'sig'.
10031
c3e735a6
DJ
100322004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10033
10034 * linux-low.c (linux_read_memory): Change return type to
10035 int. Check for and return error from ptrace().
10036 * target.c (read_inferior_memory): Change return type to int. Pass
10037 back return status from the_target->read_memory().
10038 * target.h (struct target_ops): Adapt *read_memory() prototype.
10039 Update comment.
10040 (read_inferior_memory): Adapt prototype.
10041 * server.c (main): Return an error packet if
10042 read_inferior_memory() returns an error.
10043
a59d1c82
DJ
100442004-03-04 Daniel Jacobowitz <drow@mvista.com>
10045
10046 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10047 Unify with other clean targets.
10048
dc3f8883
DJ
100492004-02-29 Daniel Jacobowitz <drow@mvista.com>
10050
10051 * server.c (handle_v_cont): Call set_desired_inferior.
10052
89a208da
DJ
100532004-02-29 Daniel Jacobowitz <drow@mvista.com>
10054
10055 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10056
62ea82f5
DJ
100572004-02-29 Daniel Jacobowitz <drow@mvista.com>
10058
10059 * linux-low.c (linux_wait): Unblock async I/O.
10060 (linux_resume): Block and enable async I/O.
10061 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10062 * server.h (block_async_io, unblock_async_io): Add prototypes.
10063
6910d122
DJ
100642004-02-29 Daniel Jacobowitz <drow@mvista.com>
10065
10066 * remote-utils.c (remote_open): Print a status notice after
10067 opening a TCP port.
10068 * server.c (attach_inferior): Print a status notice after
10069 attaching.
10070
100712004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
10072
10073 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10074
c89dc5d4
DJ
100752004-02-26 Daniel Jacobowitz <drow@mvista.com>
10076
10077 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
10078 error packet.
10079 * server.c, target.h: Update copyright years.
10080
4b8dad4a
RM
100812004-02-25 Roland McGrath <roland@redhat.com>
10082
10083 * target.h (struct target_ops): New member `read_auxv'.
10084 * server.c (handle_query): Handle qPart:auxv:read: query using that.
10085 * linux-low.c (linux_read_auxv): New function.
10086 (linux_target_ops): Initialize `read_auxv' member to that.
10087
d7446758
JB
100882004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10089
10090 Committed by Jim Blandy <jimb@redhat.com>.
10091
10092 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 10093 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
10094 instead of GPR_SIZE to distiguish s390 and s390x targets.
10095
5544ad89
DJ
100962004-01-31 Daniel Jacobowitz <drow@mvista.com>
10097
10098 * linux-low.c: Update copyright year.
10099 (check_removed_breakpoint): Clear pending_is_breakpoint.
10100 (linux_set_resume_request, linux_queue_one_thread)
10101 (resume_status_pending_p): New functions.
10102 (linux_continue_one_thread): Use process->resume.
10103 (linux_resume): Only resume threads if there are no pending events.
10104 * linux-low.h (struct process_info): Add resume request
10105 pointer.
10106
2a68b70e
DJ
101072004-01-30 Daniel Jacobowitz <drow@mvista.com>
10108
10109 * regcache.c (new_register_cache): Clear the allocated register
10110 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
10111
64386c31
DJ
101122003-10-13 Daniel Jacobowitz <drow@mvista.com>
10113
10114 * linux-low.c (linux_resume): Take a struct thread_resume *
10115 argument.
10116 (linux_wait): Update call.
10117 (resume_ptr): New static variable.
10118 (linux_continue_one_thread): Renamed from
10119 linux_continue_one_process. Use resume_ptr.
10120 (linux_resume): Use linux_continue_one_thread.
10121 * server.c (handle_v_cont, handle_v_requests): New functions.
10122 (myresume): New function.
10123 (main): Handle 'v' case.
10124 * target.h (struct thread_resume): New type.
10125 (struct target_ops): Change argument of "resume" to struct
10126 thread_resume *.
10127 (myresume): Delete macro.
10128
c938e9b0
L
101292003-08-08 H.J. Lu <hongjiu.lu@intel.com>
10130
10131 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
10132 (uninstall): Support DESTDIR.
10133
7f313d07
BC
10134Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
10135
10136 * configure.srv: Add xscale*linux copy of arm*linux entry.
10137
3b2fc2ea
DJ
101382003-07-24 Daniel Jacobowitz <drow@mvista.com>
10139
10140 * linux-arm-low.c (arm_reinsert_addr): New function.
10141 (the_low_target): Add arm_reinsert_addr.
10142
1c0a559e
MK
101432003-07-08 Mark Kettenis <kettenis@gnu.org>
10144
10145 * mem-break.c: Remove whitespace at end of file.
10146
43d5792c
DJ
101472003-06-28 Daniel Jacobowitz <drow@mvista.com>
10148
10149 * configure.in: Check whether we need to prototype strerror.
10150 * server.h: Optionally prototype strerror.
10151 * gdbreplay.c (perror_with_name): Use strerror.
10152 * linux-low.c (linux_attach_lwp): Use strerror.
10153 * utils.c (perror_with_name): Use strerror.
10154 * config.in, configure: Regenerated.
10155
c8a86edf
DJ
101562003-06-28 Daniel Jacobowitz <drow@mvista.com>
10157
10158 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
10159 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
10160
73d37363
DJ
101612003-06-20 Daniel Jacobowitz <drow@mvista.com>
10162
10163 * Makefile.in (SFILES): Update.
10164 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
10165 low-sun3.c: Remove files.
10166
6ad8ae5c
DJ
101672003-06-17 Daniel Jacobowitz <drow@mvista.com>
10168
10169 * linux-low.c: Move comment to linux_thread_alive where it belonged.
10170 (linux_detach_one_process, linux_detach): New functions.
10171 (linux_target_ops): Add linux_detach.
10172 * server.c (main): Handle 'D' packet.
10173 * target.h (struct target_ops): Add "detach" member.
10174 (detach_inferior): Define.
10175
1581182a
MK
101762003-06-13 Mark Kettenis <kettenis@gnu.org>
10177
10178 From Kelley Cook <kelleycook@wideopenwest.com>:
10179 * configure.srv: Accept i[34567]86 variants.
10180
e5379b03
DJ
101812003-06-05 Daniel Jacobowitz <drow@mvista.com>
10182
10183 * linux-low.c (linux_wait_for_event): Correct comment typos.
10184 (linux_resume_one_process): Call check_removed_breakpoint.
10185 (linux_send_signal): New function.
10186 (linux_target_ops): Add linux_send_signal.
10187 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
10188 of kill.
10189 * target.h (struct target_ops): Add send_signal.
10190
2ff29de4
JB
101912003-05-29 Jim Blandy <jimb@redhat.com>
10192
10193 * linux-low.c (usr_store_inferior_registers): Transfer buf in
10194 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
10195 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
10196 away part of the register's value.
10197
254787d4
DJ
101982003-03-26 Daniel Jacobowitz <drow@mvista.com>
10199
10200 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
10201 (linux_wait_for_event, linux_init_signals): Likewise.
10202
94e10508
DJ
102032003-03-17 Daniel Jacobowitz <drow@mvista.com>
10204
10205 * configure.in: Check for stdlib.h.
10206 * configure: Regenerated.
10207 * config.in: Regenerated.
10208
4c0711e0
DJ
102092003-01-04 Andreas Schwab <schwab@suse.de>
10210
10211 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
10212
ef66e766
AC
102132003-01-02 Andrew Cagney <ac131313@redhat.com>
10214
10215 * Makefile.in: Remove obsolete code.
10216
a1358604
DJ
102172002-11-20 Daniel Jacobowitz <drow@mvista.com>
10218
10219 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
10220 defined(PT_FPR0_HI).
10221
23ce3b1c
DJ
102222002-11-17 Stuart Hughes <seh@zee2.com>
10223
10224 * linux-arm-low.c (arm_num_regs): Increase.
10225 (arm_regmap): Include status register.
10226
102272002-11-17 Daniel Jacobowitz <drow@mvista.com>
10228
10229 * linux-low.c (register_addr): Remove incorrect -1 check.
10230
a9fa9f7d
DJ
102312002-08-29 Daniel Jacobowitz <drow@mvista.com>
10232
10233 * linux-low.c (linux_create_inferior): Call setpgid. Return
10234 the new PID.
10235 (unstopped_p, linux_signal_pid): Remove.
10236 (linux_target_ops): Remove linux_signal_pid.
10237 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
10238 global instead of target method.
10239 * target.h (struct target_ops): Remove signal_pid. Update comment
10240 for create_inferior.
10241 * server.c (signal_pid): New variable.
10242 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 10243 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
10244 (attach_inferior): Set signal_pid.
10245
17574093
DJ
102462002-08-23 Daniel Jacobowitz <drow@mvista.com>
10247
10248 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
10249
102502002-08-20 Jim Blandy <jimb@redhat.com>
10251
10252 * Makefile.in (LDFLAGS): Allow the configure script to establish a
10253 default for this.
10254
102552002-08-01 Andrew Cagney <cagney@redhat.com>
10256
10257 * Makefile.in: Make chill references obsolete.
10258
102592002-07-24 Kevin Buettner <kevinb@redhat.com>
10260
10261 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
10262 * configure: Regenerate.
10263 * config.in: Regenerate.
10264
102652002-07-09 David O'Brien <obrien@FreeBSD.org>
10266
10267 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
10268 (perror_with_name, remote_close, remote_open, expect, play): Static.
10269
102702002-07-04 Michal Ludvig <mludvig@suse.cz>
10271
4b8dad4a 10272 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
10273 byte offsets instead of an array of indexes.
10274 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
10275
102762002-06-13 Daniel Jacobowitz <drow@mvista.com>
10277
10278 * regcache.c: Add comment.
10279
102802002-06-11 Daniel Jacobowitz <drow@mvista.com>
10281
10282 * thread-db.c: New file.
10283 * proc-service.c: New file.
10284 * acinclude.m4: New file.
10285 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
10286 proc-service.o, and thread-db.o.
10287 (linux-low.o): Add USE_THREAD_DB.
10288 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
10289 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
10290 * aclocal.m4: Regenerated.
10291 * config.in: Regenerated.
10292 * configure: Regenerated.
10293 * configure.in: Check for proc_service.h, sys/procfs.h,
10294 thread_db.h, and linux/elf.h headrs.
10295 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
10296 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
10297 Check for -lthread_db and thread support.
10298 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
10299 PowerPC, and SuperH.
10300 * i387-fp.c: Constify arguments.
10301 * i387-fp.h: Likewise.
10302 * inferiors.c: (struct thread_info): Renamed from
10303 `struct inferior_info'. Remove PID member. Use generic inferior
10304 list header. All uses updated.
10305 (inferiors, signal_pid): Removed.
10306 (all_threads): New variable.
10307 (get_thread): Define.
10308 (add_inferior_to_list): New function.
10309 (for_each_inferior): New function.
10310 (change_inferior_id): New function.
10311 (add_inferior): Removed.
10312 (remove_inferior): New function.
10313 (add_thread): New function.
10314 (free_one_thread): New function.
10315 (remove_thread): New function.
10316 (clear_inferiors): Use for_each_inferior and free_one_thread.
10317 (find_inferior): New function.
10318 (find_inferior_id): New function.
10319 (inferior_target_data): Update argument type.
10320 (set_inferior_target_data): Likewise.
10321 (inferior_regcache_data): Likewise.
10322 (set_inferior_regcache_data): Likewise.
10323 * linux-low.c (linux_bp_reinsert): Remove.
10324 (all_processes, stopping_threads, using_thrads)
10325 (struct pending_signals, debug_threads, pid_of): New.
10326 (inferior_pid): Replace with macro.
10327 (struct inferior_linux_data): Remove.
10328 (get_stop_pc, add_process): New functions.
10329 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
10330 Use add_process and add_thread.
10331 (linux_attach_lwp): New function, based on old linux_attach. Use
10332 add_process and add_thread. Set stop_expected for new threads.
10333 (linux_attach): New function.
10334 (linux_kill_one_process): New function.
10335 (linux_kill): Kill all LWPs.
10336 (linux_thread_alive): Use find_inferior_id.
10337 (check_removed_breakpoints, status_pending_p): New functions.
10338 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
10339 Update. Use WNOHANG. Wait for cloned processes also. Update process
10340 struct for the found process.
10341 (linux_wait_for_event): New function.
10342 (linux_wait): Use it. Support LWPs.
10343 (send_sigstop, wait_for_sigstop, stop_all_processes)
10344 (linux_resume_one_process, linux_continue_one_process): New functions.
10345 (linux_resume): Support LWPs.
10346 (REGISTER_RAW_SIZE): Remove.
10347 (fetch_register): Use register_size instead. Call supply_register.
10348 (usr_store_inferior_registers): Likewise. Call collect_register.
10349 Fix recursive case.
10350 (regsets_fetch_inferior_registers): Improve error message.
10351 (regsets_store_inferior_registers): Add debugging.
10352 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
10353 (unstopped_p, linux_signal_pid): New functions.
10354 (linux_target_ops): Add linux_signal_pid.
10355 (linux_init_signals): New function.
10356 (initialize_low): Call it. Initialize using_threads.
10357 * regcache.c (inferior_regcache_data): Add valid
10358 flag.
10359 (get_regcache): Fetch registers lazily. Add fetch argument
10360 and update all callers.
10361 (regcache_invalidate_one, regcache_invalidate): New
10362 functions.
10363 (new_register_cache): Renamed from create_register_cache.
10364 Return the new regcache.
10365 (free_register_cache): Change argument to a void *.
10366 (registers_to_string, registers_from_string): Call get_regcache
10367 with fetch flag set.
10368 (register_data): Make static. Pass fetch flag to get_regcache.
10369 (supply_register): Call get_regcache with fetch flag clear.
10370 (collect_register): Call get_regcache with fetch flag set.
10371 (collect_register_as_string): New function.
10372 * regcache.h: Update.
10373 * remote-utils.c (putpkt): Flush after debug output and use
10374 stderr.
10375 Handle input interrupts while waiting for an ACK.
10376 (input_interrupt): Use signal_pid method.
10377 (getpkt): Flush after debug output and use stderr.
10378 (outreg): Use collect_register_as_string.
10379 (new_thread_notify, dead_thread_notify): New functions.
10380 (prepare_resume_reply): Check using_threads. Set thread_from_wait
10381 and general_thread.
10382 (look_up_one_symbol): Flush after debug output.
10383 * server.c (step_thread, server_waiting): New variables.
10384 (start_inferior): Don't use signal_pid. Update call to mywait.
10385 (attach_inferior): Update call to mywait.
10386 (handle_query): Handle qfThreadInfo and qsThreadInfo.
10387 (main): Don't fetch/store registers explicitly. Use
10388 set_desired_inferior. Support proposed ``Hs'' packet. Update
10389 calls to mywait.
10390 * server.h: Update.
10391 (struct inferior_list, struct_inferior_list_entry): New.
10392 * target.c (set_desired_inferior): New.
10393 (write_inferior_memory): Constify.
10394 (mywait): New function.
10395 * target.h: Update.
10396 (struct target_ops): New signal_pid method.
10397 (mywait): Removed macro, added prototype.
10398
10399 * linux-low.h (regset_func): Removed.
10400 (regset_fill_func, regset_store_func): New.
10401 (enum regset_type): New.
10402 (struct regset_info): Add type field. Use new operation types.
10403 (struct linux_target_ops): stop_pc renamed to get_pc.
10404 Add decr_pc_after_break and breakpoint_at.
10405 (get_process, get_thread_proess, get_process_thread)
10406 (strut process_info, all_processes, linux_attach_lwp)
10407 (thread_db_init): New.
10408
10409 * linux-arm-low.c (arm_get_pc, arm_set_pc,
10410 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
10411 (the_low_target): Add new members.
10412 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
10413 (i386_store_fpxregset): Constify.
10414 (target_regsets): Add new kind identifier.
10415 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
10416 (i386_set_pc): Add debugging.
10417 (i386_breakpoint_at): New function.
10418 (the_low_target): Add new members.
10419 * linux-mips-low.c (mips_get_pc, mips_set_pc)
10420 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
10421 (mips_breakpoint_at): New.
10422 (the_low_target): Add new members.
10423 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
10424 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
10425 (the_low_target): Add new members.
10426 * linux-sh-low.c (sh_get_pc, sh_set_pc)
10427 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
10428 (the_low_target): Add new members.
10429 * linux-x86-64-low.c (target_regsets): Add new kind
10430 identifier.
10431
104322002-05-15 Daniel Jacobowitz <drow@mvista.com>
10433
10434 From Martin Pool <mbp@samba.org>:
10435 * server.c (gdbserver_usage): New function.
10436 (main): Call it.
10437
104382002-05-14 Daniel Jacobowitz <drow@mvista.com>
10439
10440 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
10441 stop_at -> stop_pc.
10442
104432002-05-04 Andrew Cagney <ac131313@redhat.com>
10444
10445 * Makefile.in: Remove obsolete code.
10446
104472002-04-24 Michal Ludvig <mludvig@suse.cz>
10448
10449 * linux-low.c (regsets_fetch_inferior_registers),
10450 (regsets_store_inferior_registers): Removed cast to int from
10451 ptrace() calls.
10452 * regcache.h: Added declaration of struct inferior_info.
10453
104542002-04-20 Daniel Jacobowitz <drow@mvista.com>
10455
10456 * inferiors.c (struct inferior_info): Add regcache_data.
10457 (add_inferior): Call create_register_cache.
10458 (clear_inferiors): Call free_register_cache.
10459 (inferior_regcache_data, set_inferior_regcache_data): New functions.
10460 * regcache.c (struct inferior_regcache_data): New.
10461 (registers): Remove.
10462 (get_regcache): New function.
10463 (create_register_cache, free_register_cache): New functions.
10464 (set_register_cache): Don't initialize the register cache here.
10465 (registers_to_string, registers_from_string, register_data): Call
10466 get_regcache.
10467 * regcache.h: Add prototypes.
10468 * server.h: Likewise.
10469
104702002-04-20 Daniel Jacobowitz <drow@mvista.com>
10471
10472 * mem-break.c: New file.
10473 * mem-break.h: New file.
10474 * Makefile.in: Add mem-break.o rule; update server.h
10475 dependencies.
10476 * inferiors.c (struct inferior_info): Add target_data
10477 member.
10478 (clear_inferiors): Free target_data member if set.
10479 (inferior_target_data, set_inferior_target_data): New functions.
10480 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
10481 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
10482 * linux-low.c (linux_bp_reinsert): New variable.
10483 (struct inferior_linux_data): New.
10484 (linux_create_inferior): Use set_inferior_target_data.
10485 (linux_attach): Likewise. Call add_inferior.
10486 (linux_wait_for_one_inferior): New function.
10487 (linux_wait): Call it.
10488 (linux_write_memory): Add const.
10489 (initialize_low): Call set_breakpoint_data.
10490 * linux-low.h (struct linux_target_ops): Add breakpoint
10491 handling members.
10492 * server.c (attach_inferior): Remove extra add_inferior
10493 call.
10494 * server.h: Include mem-break.h. Update inferior.c
10495 prototypes.
10496 * target.c (read_inferior_memory)
10497 (write_inferior_memory): New functions.
10498 * target.h (read_inferior_memory)
10499 (write_inferior_memory): Change macros to prototypes.
10500 (struct target_ops): Update comments. Add const to write_memory
10501 definition.
10502
105032002-04-11 Daniel Jacobowitz <drow@mvista.com>
10504
10505 * linux-low.c (usr_store_inferior_registers): Support
10506 registers which are allowed to fail to store.
10507 * linux-low.h (linux_target_ops): Likewise.
10508 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
10509 (ppc_cannot_store_register): FPSCR may not be storable.
10510
105112002-04-09 Daniel Jacobowitz <drow@mvista.com>
10512
10513 * server.h: Include <string.h> if HAVE_STRING_H.
10514 * ChangeLog: Correct paths in last ChangeLog entry.
10515
105162002-04-09 Daniel Jacobowitz <drow@mvista.com>
10517
10518 * linux-low.h: Remove obsolete prototypes.
10519 (struct linux_target_ops): New.
10520 (extern the_low_target): New.
10521 * linux-low.c (num_regs, regmap): Remove declarations.
10522 (register_addr): Use the_low_target explicitly.
10523 (fetch_register): Likewise.
10524 (usr_fetch_inferior_registers): Likewise.
10525 (usr_store_inferior_registers): Likewise.
10526 * linux-arm-low.c (num_regs): Remove.
10527 (arm_num_regs): Define.
10528 (arm_regmap): Renamed from regmap, made static.
10529 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
10530 made static.
10531 (arm_cannot_store_register): Renamed from cannot_store_register,
10532 made static.
10533 (the_low_target): New.
10534 * linux-i386-low.c (num_regs): Remove.
10535 (i386_num_regs): Define.
10536 (i386_regmap): Renamed from regmap, made static.
10537 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
10538 made static.
10539 (i386_cannot_store_register): Renamed from cannot_store_register,
10540 made static.
10541 (the_low_target): New.
10542 * linux-ia64-low.c (num_regs): Remove.
10543 (ia64_num_regs): Define.
10544 (ia64_regmap): Renamed from regmap, made static.
10545 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
10546 made static.
10547 (ia64_cannot_store_register): Renamed from cannot_store_register,
10548 made static.
10549 (the_low_target): New.
10550 * linux-m68k-low.c (num_regs): Remove.
10551 (m68k_num_regs): Define.
10552 (m68k_regmap): Renamed from regmap, made static.
10553 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
10554 made static.
10555 (m68k_cannot_store_register): Renamed from cannot_store_register,
10556 made static.
10557 (the_low_target): New.
10558 * linux-mips-low.c (num_regs): Remove.
10559 (mips_num_regs): Define.
10560 (mips_regmap): Renamed from regmap, made static.
10561 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
10562 made static.
10563 (mips_cannot_store_register): Renamed from cannot_store_register,
10564 made static.
10565 (the_low_target): New.
10566 * linux-ppc-low.c (num_regs): Remove.
10567 (ppc_num_regs): Define.
10568 (ppc_regmap): Renamed from regmap, made static.
10569 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
10570 made static.
10571 (ppc_cannot_store_register): Renamed from cannot_store_register,
10572 made static.
10573 (the_low_target): New.
10574 * linux-s390-low.c (num_regs): Remove.
10575 (s390_num_regs): Define.
10576 (s390_regmap): Renamed from regmap, made static.
10577 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
10578 made static.
10579 (s390_cannot_store_register): Renamed from cannot_store_register,
10580 made static.
10581 (the_low_target): New.
10582 * linux-sh-low.c (num_regs): Remove.
10583 (sh_num_regs): Define.
10584 (sh_regmap): Renamed from regmap, made static.
10585 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
10586 made static.
10587 (sh_cannot_store_register): Renamed from cannot_store_register,
10588 made static.
10589 (the_low_target): New.
10590 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
10591 (the_low_target): New.
10592
105932002-04-09 Daniel Jacobowitz <drow@mvista.com>
10594
10595 * Makefile.in: Add stamp-h target.
10596 * configure.in: Create stamp-h.
10597 * configure: Regenerated.
10598
105992002-04-09 Daniel Jacobowitz <drow@mvista.com>
10600
10601 * inferiors.c: New file.
10602 * target.c: New file.
10603 * target.h: New file.
10604 * Makefile.in: Add target.o and inferiors.o. Update
10605 dependencies.
10606 * linux-low.c (inferior_pid): New static variable,
10607 moved from server.c.
10608 (linux_create_inferior): Renamed from create_inferior.
10609 Call add_inferior. Return 0 on success instead of a PID.
10610 (linux_attach): Renamed from myattach.
10611 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
10612 (linux_thread_alive): Renamed from mythread_alive.
10613 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
10614 child dies.
10615 (linux_resume): Renamed from myresume. Add missing ``return 0''.
10616 (regsets_store_inferior_registers): Correct error message.
10617 Add missing ``return 0''.
10618 (linux_fetch_registers): Renamed from fetch_inferior_registers.
10619 (linux_store_registers): Renamed from store_inferior_registers.
10620 (linux_read_memory): Renamed from read_inferior_memory.
10621 (linux_write_memory): Renamed from write_inferior_memory.
10622 (linux_target_ops): New structure.
10623 (initialize_low): Call set_target_ops ().
10624 * remote-utils.c (unhexify): New function.
10625 (hexify): New function.
10626 (input_interrupt): Send signals to ``signal_pid''.
10627 * server.c (inferior_pid): Remove.
10628 (start_inferior): Update create_inferior call.
10629 (attach_inferior): Call add_inferior.
10630 (handle_query): New function.
10631 (main): Call handle_query for `q' packets.
10632 * server.h: Include "target.h". Remove obsolete prototypes.
10633 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
10634
106352002-04-09 Daniel Jacobowitz <drow@mvista.com>
10636
10637 * Makefile.in: Add WARN_CFLAGS. Update configury
10638 dependencies.
10639 * configure.in: Check for <string.h>
10640 * configure: Regenerate.
10641 * config.in: Regenerate.
10642 * gdbreplay.c: Include needed system headers.
10643 (remote_open): Remove strchr prototype.
10644 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
10645 * regcache.c (supply_register): Change buf argument to const void *.
10646 (supply_register_by_name): Likewise.
10647 (collect_register): Change buf argument to void *.
10648 (collect_register_by_name): Likewise.
10649 * regcache.h: Add missing prototypes.
10650 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
10651 * server.c (handle_query): New function.
10652 (attached): New static variable, moved out of main.
10653 (main): Quiet longjmp clobber warnings.
10654 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
10655 * utils.c (error): Remove NORETURN.
10656 (fatal): Likewise.
This page took 1.614859 seconds and 4 git commands to generate.