btrace: add struct btrace_data
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
734b0e4b
MM
12015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2
3 * Makefile.in (SFILES): Add common/btrace-common.c.
4 (OBS): Add common/btrace-common.o.
5 (btrace-common.o): Add build rules.
6 * linux-low: Include btrace-common.h.
7 (linux_low_read_btrace): Use struct btrace_data. Call
8 btrace_data_init and btrace_data_fini.
9
d6c146e9
PA
102015-02-06 Pedro Alves <palves@redhat.com>
11
12 * thread-db.c (find_new_threads_callback): Add debug output.
13
20ba1ce6
PA
142015-02-04 Pedro Alves <palves@redhat.com>
15
16 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
17 (resume_stopped_resumed_lwps): New function.
18 (linux_wait_for_event_filtered): Use it.
19
8cc73a39
SDJ
202015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
21
22 * Makefile.in (SFILES): Add linux-personality.c.
23 (linux-personality.o): New rule.
24 * configure.srv (srv_linux_obj): Add linux-personality.o to the
25 list of objects to be built.
26 * linux-low.c: Include nat/linux-personality.h.
27 (linux_create_inferior): Remove code to disable address space
28 randomization (moved to ../nat/linux-personality.c). Create
29 cleanup to disable address space randomization.
30
fb23d554
SDJ
312015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
32
33 * Makefile.in (posix-strerror.o): New rule.
34 (mingw-strerror.o): Likewise.
35 * configure: Regenerated.
36 * configure.ac: Source file ../common/common.host. Initialize new
37 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
38
cdf43629
YQ
392015-01-14 Yao Qi <yao@codesourcery.com>
40
41 * Makefile.in (SFILES): Add nat/ppc-linux.c.
42 (ppc-linux.o): New rule.
43 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
44 * configure.ac: AC_CHECK_FUNCS(getauxval).
45 * config.in: Re-generated.
46 * configure: Re-generated.
47 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
48 ppc64_64bit_inferior_p
49
514c5338
YQ
502015-01-14 Yao Qi <yao@codesourcery.com>
51
52 * linux-ppc-low.c: Include "nat/ppc-linux.h".
53 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
54 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
55 (PT_ORIG_R3, PT_TRAP): Likewise.
56 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
57 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
58 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
59
3368c1e5
JB
602015-01-10 Joel Brobecker <brobecker@adacore.com>
61
62 * i387-fp.c (i387_cache_to_xsave): In look over
63 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
64 zmmh_low_space field by use of zmmh_high_space.
65
582511be
PA
662015-01-09 Pedro Alves <palves@redhat.com>
67
68 * linux-low.c (step_over_bkpt): Move higher up in the file.
69 (handle_extended_wait): Don't store the stop_pc here.
70 (get_stop_pc): Adjust comments and rename to ...
71 (check_stopped_by_breakpoint): ... this. Record whether the LWP
72 stopped for a software breakpoint or hardware breakpoint.
73 (thread_still_has_status_pending_p): New function.
74 (status_pending_p_callback): Use
75 thread_still_has_status_pending_p. If the event is no longer
76 interesting, resume the LWP.
77 (handle_tracepoints): Add assert.
78 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
79 (wstatus_maybe_breakpoint): New function.
80 (cancel_breakpoint): Delete function.
81 (check_stopped_by_watchpoint): New function, factored out from
82 linux_low_filter_event.
83 (lp_status_maybe_breakpoint): Delete function.
84 (linux_low_filter_event): Remove filter_ptid argument.
85 Leave thread group exits pending here. Store the LWP's stop PC.
86 Always leave events pending.
87 (linux_wait_for_event_filtered): Pull all events out of the
88 kernel, and leave them all pending.
89 (count_events_callback, select_event_lwp_callback): Consider all
90 events.
91 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
92 (select_event_lwp): Only give preference to the stepping LWP in
93 all-stop mode. Adjust comments.
94 (ignore_event): New function.
95 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
96 references to cancel_breakpoints. Adjust to renames. Also give
97 equal priority to all LWPs that have had events in non-stop mode.
98 If reporting a software breakpoint event, unadjust the LWP's PC.
99 (linux_wait): If linux_wait_1 returned an ignored event, retry.
100 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
101 Adjust.
102 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
103 (resume_status_pending_p): Use thread_still_has_status_pending_p.
104 (linux_stopped_by_watchpoint): Adjust.
105 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
106 * linux-low.h (enum lwp_stop_reason): New.
107 (struct lwp_info) <stop_pc>: Adjust comment.
108 <stopped_by_watchpoint>: Delete field.
109 <stop_reason>: New field.
110 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
111 * mem-break.c (software_breakpoint_inserted_here)
112 (hardware_breakpoint_inserted_here): New function.
113 * mem-break.h (software_breakpoint_inserted_here)
114 (hardware_breakpoint_inserted_here): Declare.
115 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
116 (cancel_breakpoints): Delete.
117 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
118 (upload_fast_traceframes): Remove references to
119 cancel_breakpoints.
120
a33e3959
PA
1212015-01-09 Pedro Alves <palves@redhat.com>
122
123 * thread-db.c (find_new_threads_callback): Ignore thread if the
124 kernel thread ID is -1.
125
8784d563
PA
1262015-01-09 Pedro Alves <palves@redhat.com>
127
128 * linux-low.c (linux_attach_fail_reason_string): Move to
129 nat/linux-ptrace.c, and rename.
130 (linux_attach_lwp): Update comment.
131 (attach_proc_task_lwp_callback): New function.
132 (linux_attach): Adjust to rename and use
133 linux_proc_attach_tgid_threads.
134 (linux_attach_fail_reason_string): Delete declaration.
135
76f2b779
JB
1362015-01-01 Joel Brobecker <brobecker@adacore.com>
137
138 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
139 * server.c (gdbserver_version): Likewise.
140
fafcc06a
SDJ
1412014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
142
143 * remote-utils.c: Include ctype.h.
144 (input_interrupt): Explicitly handle the case when the char
145 received is the NUL byte. Improve the printing of non-ASCII
146 characters.
147
beed38b8
JB
1482014-12-16 Joel Brobecker <brobecker@adacore.com>
149
150 * linux-low.c (linux_low_filter_event): Update call to
151 linux_enable_event_reporting following the addition of
152 a new parameter to that function.
153
bf330350
CU
1542014-12-16 Catalin Udma <catalin.udma@freescale.com>
155
156 PR server/17457
157 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
158 (AARCH64_FPCR_REGNO): Likewise.
159 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
160 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
161 (aarch64_store_fpregset): Likewise.
162
5227d625
JB
1632014-12-15 Joel Brobecker <brobecker@adacore.com>
164
165 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
166 Remove FIXME comment about assumption about N.
167
f93b65a0
JB
1682014-12-13 Joel Brobecker <brobecker@adacore.com>
169
170 * configure.ac: If large-file support is disabled in GDBserver,
171 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
172 * configure: Regenerate.
173
e5a9158d
AA
1742014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
175
176 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
177 warning upon ENODATA from ptrace.
178 * linux-s390-low.c (s390_store_tdb): New.
179 (s390_regsets): Add regset for NT_S390_TDB.
180
feea5f36
AA
1812014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
182
183 * linux-low.c (regsets_store_inferior_registers): Skip regsets
184 without a fill_function.
185 * linux-s390-low.c (s390_fill_last_break): Remove.
186 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
187 (s390_arch_setup): Use regset's size instead of fill_function for
188 loop end condition.
189
098dbe61
AA
1902014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
191
192 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
193 the regset's store function when ptrace returned an error.
194 * regcache.c (get_thread_regcache): Invalidate register cache
195 before fetching inferior's registers.
196
28eef672
AA
1972014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
198
199 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
200 while-loop as for-loop.
201 (regsets_store_inferior_registers): Likewise.
202
bdca27a2
YQ
2032014-11-28 Yao Qi <yao@codesourcery.com>
204
205 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
206 * config.in, configure: Re-generate.
207 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
208 is defined.
209
9c232dda
YQ
2102014-11-21 Yao Qi <yao@codesourcery.com>
211
212 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
213 (AC_CHECK_HEADERS): Remove malloc.h.
214 * configure: Re-generated.
215 * config.in: Re-generated.
216 * server.h: Don't include alloca.h and malloc.h.
217 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
218 Don't include malloc.h.
219
43968415
JB
2202014-11-17 Joel Brobecker <brobecker@adacore.com>
221
222 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
223 corresponding ERRNO check in same block.
224
40e91bc7
PA
2252014-11-12 Pedro Alves <palves@redhat.com>
226
227 * server.c (cont_thread): Update comment.
228 (start_inferior, attach_inferior): No longer clear cont_thread.
229 (handle_v_cont): No longer set cont_thread.
230 (captured_main): Clear cont_thread each time a GDB connects.
231
c2c118cf
PA
2322014-11-12 Pedro Alves <palves@redhat.com>
233
234 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
235 thread, and don't resume all threads if the Hc thread has exited.
236
78708b7c
PA
2372014-11-12 Pedro Alves <palves@redhat.com>
238
239 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
240 the process group instead of to a specific LWP.
241
a2abc7de
PA
2422014-10-15 Pedro Alves <palves@redhat.com>
243
244 PR server/17487
245 * win32-arm-low.c (arm_set_thread_context): Remove current_event
246 parameter.
247 (arm_set_thread_context): Delete.
248 (the_low_target): Adjust.
249 * win32-i386-low.c (debug_registers_changed)
250 (debug_registers_used): Delete.
251 (update_debug_registers_callback): New function.
252 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
253 needing to update their debug registers.
254 (win32_get_current_dr): New function.
255 (x86_dr_low_get_addr, x86_dr_low_get_control)
256 (x86_dr_low_get_status): Fetch the debug register from the thread
257 record's context.
258 (i386_initial_stuff): Adjust.
259 (i386_get_thread_context): Remove current_event parameter. Don't
260 clear debug_registers_changed nor copy DR values to
261 debug_reg_state.
262 (i386_set_thread_context): Delete.
263 (i386_prepare_to_resume): New function.
264 (i386_thread_added): Mark the thread as needing to update irs
265 debug registers.
266 (the_low_target): Remove i386_set_thread_context and install
267 i386_prepare_to_resume.
268 * win32-low.c (win32_get_thread_context): Adjust.
269 (win32_set_thread_context): Use SetThreadContext
270 directly.
271 (win32_prepare_to_resume): New function.
272 (win32_require_context): New function, factored out from ...
273 (thread_rec): ... this.
274 (continue_one_thread): Call win32_prepare_to_resume on each thread
275 we're about to continue.
276 (win32_resume): Call win32_prepare_to_resume on the event thread.
277 * win32-low.h (struct win32_thread_info)
278 <debug_registers_changed>: New field.
279 (struct win32_target_ops): Change prototype of set_thread_context,
280 delete set_thread_context and add prepare_to_resume.
281 (win32_require_context): New declaration.
282
a442d071
GB
2832014-10-08 Gary Benson <gbenson@redhat.com>
284
285 * server.h: Do not include common-exceptions.h.
286
6f1947e8
GB
2872014-10-08 Gary Benson <gbenson@redhat.com>
288
289 * server.h: Do not include cleanups.h.
290
63b434a4
JH
2912014-09-30 James Hogan <james.hogan@imgtec.com>
292
293 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
294 mips64-dsp-linux.c.
295
c4d9ceb6
YQ
2962014-09-23 Yao Qi <yao@codesourcery.com>
297
298 * linux-low.c (lp_status_maybe_breakpoint): New function.
299 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
300 (count_events_callback): Likewise.
301 (select_event_lwp_callback): Likewise.
302 (cancel_breakpoints_callback): Likewise.
303
89a5711c
DB
3042014-09-19 Don Breazeal <donb@codesourcery.com>
305
306 * linux-low.c (handle_extended_wait): Call
307 linux_ptrace_get_extended_event.
308 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
309 linux_is_extended_waitstatus.
310
bffc0964
JB
3112014-09-16 Joel Brobecker <brobecker@adacore.com>
312
313 * Makefile.in (CPPFLAGS): Define.
314 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
315 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
316
0bfdf32f
GB
3172014-09-16 Gary Benson <gbenson@redhat.com>
318
319 * inferiors.h (current_inferior): Renamed as...
320 (current_thread): New variable. All uses updated.
321 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
322 (maybe_move_out_of_jump_pad): Likewise.
323 (cancel_breakpoint): Likewise.
324 (linux_low_filter_event): Likewise.
325 (wait_for_sigstop): Likewise.
326 (linux_resume_one_lwp): Likewise.
327 (need_step_over_p): Likewise.
328 (start_step_over): Likewise.
329 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
330 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
331 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
332 and save_inferior as saved_thread.
333 * regcache.c (get_thread_regcache): Renamed saved_inferior as
334 saved_thread.
335 (regcache_invalidate_thread): Likewise.
336 * remote-utils.c (prepare_resume_reply): Likewise.
337 * thread-db.c (thread_db_get_tls_address): Likewise.
338 (disable_thread_event_reporting): Likewise.
339 (remove_thread_event_breakpoints): Likewise.
340 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
341 as saved_thread.
342 * target.h (set_desired_inferior): Renamed as...
343 (set_desired_thread): New declaration. All uses updated.
344 * server.c (myresume): Updated comment to reference thread instead
345 of inferior.
346 (handle_serial_event): Likewise.
347 (handle_target_event): Likewise.
348
361c8ade
GB
3492014-09-12 Tom Tromey <tromey@redhat.com>
350 Gary Benson <gbenson@redhat.com>
351
352 * regcache.h: Include common-regcache.h.
353 (regcache_read_pc): Don't declare.
354 * regcache.c (get_thread_regcache_for_ptid): New function.
355
bd9269f7
GB
3562014-09-11 Tom Tromey <tromey@redhat.com>
357 Gary Benson <gbenson@redhat.com>
358
359 * symbol.c: New file.
360 * Makefile.in (SFILES): Add symbol.c.
361 (OBS): Add symbol.o.
362
f8c1d06b
GB
3632014-09-11 Gary Benson <gbenson@redhat.com>
364
365 * target.c (target_stop_ptid, target_continue_ptid): New
366 functions.
367
721ec300
GB
3682014-09-11 Tom Tromey <tromey@redhat.com>
369 Gary Benson <gbenson@redhat.com>
370
371 * target.h: Include target/target.h.
372 * target.c (target_read_memory, target_read_uint32)
373 (target_write_memory): New functions.
374
c5e92cca
GB
3752014-09-11 Gary Benson <gbenson@redhat.com>
376
377 * server.h (debug_hw_points): Don't declare.
378 * server.c (debug_hw_points): Don't define. Replace all uses
379 with show_debug_regs.
380 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
381 all uses with show_debug_regs.
382
2e4bb98a
EBM
3832014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
384
385 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
386 endianness into account.
387 (ppc_supply_ptrace_register): Likewise.
388
ac740bc7
JH
3892014-09-03 James Hogan <james.hogan@imgtec.com>
390
391 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
392 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
393
97ea6506
GB
3942014-09-03 Gary Benson <gbenson@redhat.com>
395
396 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
397 ALL_DEBUG_ADDRESS_REGISTERS.
398
df7e5265
GB
3992014-09-02 Gary Benson <gbenson@redhat.com>
400
401 * i386-low.h: Renamed as...
402 * x86-low.h: New file. All type, function and variable name
403 prefixes changed from "i386_" to "x86_". All references updated.
404 * i386-low.c: Renamed as...
405 * x86-low.c: New file. All type, function and variable name
406 prefixes changed from "i386_" to "x86_". All references updated.
407
ed859da7
GB
4082014-09-02 Gary Benson <gbenson@redhat.com>
409
410 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
411 (x86_linux_new_thread): Likewise.
412
860789c7
GB
4132014-08-29 Gary Benson <gbenson@redhat.com>
414
415 * server.h (setjmp.h): Do not include.
416 (toplevel): Do not declare.
417 (common-exceptions.h): Include.
418 (cleanups.h): Likewise.
419 * server.c (toplevel): Do not define.
420 (exit_code): New static global.
421 (detach_or_kill_for_exit_cleanup): New function.
422 (main): New function. Original main renamed to...
423 (captured_main): New function.
424 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
425
ff55e1b5
GB
4262014-08-29 Gary Benson <gbenson@redhat.com>
427
428 * Makefile.in (SFILES): Add common/common-exceptions.c.
429 (OBS): Add common-exceptions.o.
430 (common-exceptions.o): New rule.
431 * utils.c (prepare_to_throw_exception): New function.
432
e9bcb658
GB
4332014-08-29 Gary Benson <gbenson@redhat.com>
434
435 * config.in: Regenerate.
436 * configure: Likewise.
437
e3180625
GB
4382014-08-29 Gary Benson <gbenson@redhat.com>
439
440 * Makefile.in (SFILES): Add common/cleanups.c.
441 (OBS): cleanups.o.
442 (cleanups.o): New rule.
443
e3d6ba5d
GB
4442014-08-29 Gary Benson <gbenson@redhat.com>
445
446 * utils.c (internal_vwarning): New function.
447
7096e886
GB
4482014-08-28 Gary Benson <gbenson@redhat.com>
449
450 * utils.h (fatal): Remove declaration.
451 * utils.c (fatal): Remove function.
452
14ce3192
GB
4532014-08-28 Gary Benson <gbenson@redhat.com>
454
455 * tracepoint.c (gdb_agent_init): Replace fatal with
456 perror_with_name.
457 (initialize_tracepoint): Likewise.
458
50278d59
GB
4592014-08-28 Gary Benson <gbenson@redhat.com>
460
461 * remote-utils.c (remote_prepare): Replace fatal with error.
462
aa96c426
GB
4632014-08-28 Gary Benson <gbenson@redhat.com>
464
465 * linux-low.c (linux_async): Replace fatal with warning.
466 Tidy up and return.
467 (linux_start_non_stop): Return -1 if linux_async failed.
468
f7160e97
GB
4692014-08-28 Gary Benson <gbenson@redhat.com>
470
471 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
472 gdb_assert.
473 (i386_dr_low_get_addr): Remove vague comment.
474 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
475 gdb_assert.
476
38e08fca
GB
4772014-08-28 Gary Benson <gbenson@redhat.com>
478
479 * inferiors.c (get_thread_process): Replace check with gdb_assert.
480 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
481 internal_error.
482 (linux_resume_one_lwp): Likewise.
483 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
484 gdb_assert.
485 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
486 with internal_error.
487 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
488 (init_register_cache): Replace fatal with gdb_assert_not_reached.
489 (find_register_by_name): Replace fatal with internal_error.
490 (find_regno): Likewise.
491 * tdesc.c (init_target_desc): Replace check with gdb_assert.
492 * thread-db.c (thread_db_create_event): Likewise.
493 (thread_db_load_search): Likewise.
494 (try_thread_db_load_1): Likewise.
495 * tracepoint.c (get_jump_space_head): Replace fatal with
496 internal_error.
497 (claim_trampoline_space): Likewise.
498 (have_fast_tracepoint_trampoline_buffer): Likewise.
499 (cmd_qtstart): Likewise.
500 (stop_tracing): Likewise.
501 (fast_tracepoint_collecting): Likewise.
502 (target_malloc): Likewise.
503 (download_tracepoint): Likewise.
504 (download_trace_state_variables): Replace check with gdb_assert.
505 (upload_fast_traceframes): Replace fatal with internal_error.
506
34abf635
GB
5072014-08-19 Tom Tromey <tromey@redhat.com>
508 Gary Benson <gbenson@redhat.com>
509
510 * Makefile.in (SFILES): Add common/common-debug.c.
511 (OBS): Add common-debug.o.
512 (common-debug.o): New rule.
513 * debug.h (debug_printf): Don't declare.
514 * debug.c (debug_printf): Renamed and rewritten as...
515 (debug_vprintf): New function.
516
f6e94d78
GB
5172014-08-19 Gary Benson <gbenson@redhat.com>
518
519 * utils.h: Do not include print-utils.h.
520
9239eeab
GB
5212014-08-19 Tom Tromey <tromey@redhat.com>
522 Gary Benson <gbenson@redhat.com>
523
524 * server.h: Add static assertion.
525 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
526
ef87c8bb
GB
5272014-08-19 Tom Tromey <tromey@redhat.com>
528 Gary Benson <gbenson@redhat.com>
529
530 * Makefile.in (SFILES): Add common/errors.c.
531 (OBS): Add errors.o.
532 (IPA_OBS): Add errors-ipa.o.
533 (errors.o): New rule.
534 (errors-ipa.o): Likewise.
535 * utils.h (perror_with_name, error, warning): Don't declare.
536 * utils.c (warning): Renamed and rewritten as...
537 (vwarning): New function.
538 (error): Renamed and rewritten as...
539 (verror): New function.
540 (internal_error): Renamed and rewritten as...
541 (internal_verror): New function.
542
bb974a24
GB
5432014-08-07 Gary Benson <gbenson@redhat.com>
544
545 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
546 * configure: Regenerate.
547 * config.in: Likewise.
548 * server.h: Do not include errno.h.
549 * event-loop.c: Likewise.
550 * hostio-errno.c: Likewise.
551 * linux-low.c: Likewise.
552 * remote-utils.c: Likewise.
553 * spu-low.c: Likewise.
554 * utils.c: Likewise.
555 * gdbreplay.c: Unconditionally include errno.h.
556
6d3d12eb
GB
5572014-08-07 Gary Benson <gbenson@redhat.com>
558
559 * server.h: Do not include string.h.
560 * event-loop.c: Likewise.
561 * linux-low.c: Likewise.
562 * regcache.c: Likewise.
563 * remote-utils.c: Likewise.
564 * spu-low.c: Likewise.
565 * utils.c: Likewise.
566
dccbb609
GB
5672014-08-07 Gary Benson <gbenson@redhat.com>
568
569 * server.h: Do not include gdb_assert.h.
570
e76df0d0
GB
5712014-08-07 Gary Benson <gbenson@redhat.com>
572
573 * server.h: Do not include common-utils.h.
574
4cb9c816
GB
5752014-08-07 Gary Benson <gbenson@redhat.com>
576
577 * server.h: Do not include ptid.h.
578 * notif.h: Likewise.
579
3995eeee
GB
5802014-08-07 Gary Benson <gbenson@redhat.com>
581
582 * server.h: Do not include gdb_locale.h.
583
cb9f1a9b
GB
5842014-08-07 Gary Benson <gbenson@redhat.com>
585
586 * server.h: Do not include gdb/signals.h.
587 * win32-low.c: Likewise.
588
a5fceff8
GB
5892014-08-07 Gary Benson <gbenson@redhat.com>
590
591 * server.h: Do not include pathmax.h.
592
b9391142
GB
5932014-08-07 Gary Benson <gbenson@redhat.com>
594
595 * server.h: Do not include libiberty.h.
596 * linux-bfin-low.c: Likewise.
597
0e443c87
GB
5982014-08-07 Gary Benson <gbenson@redhat.com>
599
600 * server.h: Do not include ansidecl.h.
601
8ebb3f56
GB
6022014-08-07 Gary Benson <gbenson@redhat.com>
603
604 * linux-x86-low.c: Do not include stddef.h.
605 * lynx-ppc-low.c: Likewise.
606 * tracepoint.c: Likewise.
607
8980bdf6
GB
6082014-08-07 Gary Benson <gbenson@redhat.com>
609
610 * server.h: Do not include stdarg.h.
611 * nto-low.c: Likewise.
612
d7096f71
GB
6132014-08-07 Gary Benson <gbenson@redhat.com>
614
615 * server.h: Do not include stdlib.h.
616 * inferiors.c: Likewise.
617 * linux-low.c: Likewise.
618 * regcache.c: Likewise.
619 * spu-low.c: Likewise.
620 * tracepoint.c: Likewise.
621 * utils.c: Likewise.
622
d02f550d
GB
6232014-08-07 Gary Benson <gbenson@redhat.com>
624
625 * server.h: Do not include stdio.h.
626 * linux-low.c: Likewise.
627 * remote-utils.c: Likewise.
628 * spu-low.c: Likewise.
629 * utils.c: Likewise.
630 * wincecompat.c: Likewise.
631
87f6c4e3
GB
6322014-08-06 Gary Benson <gbenson@redhat.com>
633
634 * regcache.c (init_register_cache): Move conditionals inside if.
635
7089dca4
GB
6362014-08-06 Gary Benson <gbenson@redhat.com>
637
638 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
639
462f517e
GB
6402014-07-31 Gary Benson <gbenson@redhat.com>
641
642 * ax.h: Do not include server.h.
643 * gdbthread.h: Likewise.
644 * lynx-low.h: Likewise.
645 * notif.h: Likewise.
646
976411d6
GB
6472014-07-30 Gary Benson <gbenson@redhat.com>
648
649 * server.h: Include common-defs.h.
650 Do not include config.h or build-gnulib-gdbserver/config.h.
651
d41f6d8e
GB
6522014-07-30 Gary Benson <gbenson@redhat.com>
653
654 * hostio-errno.c: Move server.h to top of includes list.
655 * inferiors.c: Likewise.
656 * linux-x86-low.c: Likewise.
657 * notif.c: Include server.h.
658
314c6a35
TT
6592014-07-24 Tom Tromey <tromey@redhat.com>
660 Gary Benson <gbenson@redhat.com>
661
662 * server.h (CORE_ADDR): Now unsigned.
663
69ff6be5
PA
6642014-07-16 Pedro Alves <palves@redhat.com>
665
666 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
667
ce9e3fe7
PA
6682014-07-15 Pedro Alves <palves@redhat.com>
669
670 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
671 copy.
672
e76126e8
PA
6732014-07-11 Pedro Alves <palves@redhat.com>
674
675 * linux-low.c (kill_wait_lwp): New function, based on
676 kill_one_lwp_callback, but use my_waitpid directly.
677 (kill_one_lwp_callback, linux_kill): Use it.
678
8e9db26e
PA
6792014-06-23 Pedro Alves <palves@redhat.com>
680
681 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
682 before setting DR0..DR3.
683
698b3e08
GB
6842014-06-20 Gary Benson <gbenson@redhat.com>
685
686 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
687 * configure: Regenerated.
688 * config.in: Likewise.
689
125f8a3d
GB
6902014-06-20 Gary Benson <gbenson@redhat.com>
691
692 * Makefile.in (SFILES): Update locations for files moved
693 from common to nat.
694 (object file files): Reordered.
695
42995dbd
GB
6962014-06-20 Gary Benson <gbenson@redhat.com>
697
698 * i386-low.h (i386_dr_low_can_set_addr): Removed.
699 (i386_dr_low_set_addr): Likewise.
700 (i386_dr_low_get_addr): Likewise.
701 (i386_dr_low_can_set_control): Likewise.
702 (i386_dr_low_set_control): Likewise.
703 (i386_dr_low_get_control): Likewise.
704 (i386_dr_low_get_status): Likewise.
705 (i386_get_debug_register_length): Likewise.
706 * linux-x86-low.c (i386_dr_low_set_addr):
707 Changed signature. Made static.
708 (i386_dr_low_get_addr): Likewise.
709 (i386_dr_low_set_control): Likewise.
710 (i386_dr_low_get_control): Likewise.
711 (i386_dr_low_get_status): Likewise.
712 (i386_dr_low): New global variable.
713 * win32-i386-low.c (i386_dr_low_set_addr):
714 Changed signature. Made static.
715 (i386_dr_low_get_addr): Likewise.
716 (i386_dr_low_set_control): Likewise.
717 (i386_dr_low_get_control): Likewise.
718 (i386_dr_low_get_status): Likewise.
719 (i386_dr_low): New global variable.
720
e1d2394b
MS
7212014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
722
723 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
724 * Makefile.in (AR, AR_FLAGS): Define.
725 * configure: Regenerate.
726
3a8ee006
GB
7272014-06-19 Gary Benson <gbenson@redhat.com>
728
729 * Makefile.in (i386-dregs.o): New rule.
730 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
731 * i386-low.c (target.h): Remove include.
732 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
733 (DR_CONTROL_SHIFT): Likewise.
734 (DR_CONTROL_SIZE): Likewise.
735 (DR_RW_EXECUTE): Likewise.
736 (DR_RW_WRITE): Likewise.
737 (DR_RW_READ): Likewise.
738 (DR_RW_IORW): Likewise.
739 (DR_LEN_1): Likewise.
740 (DR_LEN_2): Likewise.
741 (DR_LEN_4): Likewise.
742 (DR_LEN_8): Likewise.
743 (DR_LOCAL_ENABLE_SHIFT): Likewise.
744 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
745 (DR_ENABLE_SIZE): Likewise.
746 (DR_LOCAL_SLOWDOWN): Likewise.
747 (DR_GLOBAL_SLOWDOWN): Likewise.
748 (DR_CONTROL_RESERVED): Likewise.
749 (I386_DR_CONTROL_MASK): Likewise.
750 (I386_DR_VACANT): Likewise.
751 (I386_DR_LOCAL_ENABLE): Likewise.
752 (I386_DR_GLOBAL_ENABLE): Likewise.
753 (I386_DR_DISABLE): Likewise.
754 (I386_DR_SET_RW_LEN): Likewise.
755 (I386_DR_GET_RW_LEN): Likewise.
756 (I386_DR_WATCH_HIT): Likewise.
757 (i386_wp_op_t): Likewise.
758 (i386_show_dr): Likewise.
759 (i386_length_and_rw_bits): Likewise.
760 (i386_insert_aligned_watchpoint): Likewise.
761 (i386_remove_aligned_watchpoint): Likewise.
762 (i386_handle_nonaligned_watchpoint): Likewise.
763 i386_update_inferior_debug_regs(): Likewise.
764 (i386_dr_insert_watchpoint): Likewise.
765 (i386_dr_remove_watchpoint): Likewise.
766 (i386_dr_region_ok_for_watchpoint): Likewise.
767 (i386_dr_stopped_data_address): Likewise.
768 (i386_dr_stopped_by_watchpoint): Likewise.
769
8f26655c
GB
7702014-06-19 Gary Benson <gbenson@redhat.com>
771
772 * i386-low.c (i386_dr_show): Renamed to
773 i386_show_dr and made static. All uses updated.
774 (i386_dr_length_and_rw_bits): Renamed to
775 i386_length_and_rw_bits and made static.
776 All uses updated.
777 (i386_dr_insert_aligned_watchpoint): Renamed to
778 i386_insert_aligned_watchpoint and made static.
779 All uses updated.
780 (i386_dr_remove_aligned_watchpoint): Renamed to
781 i386_remove_aligned_watchpoint and made static.
782 All uses updated.
783 (i386_dr_update_inferior_debug_regs): Renamed to
784 i386_update_inferior_debug_regs and made static.
785 All uses updated.
786
b9228891
GB
7872014-06-18 Gary Benson <gbenson@redhat.com>
788
5171def3
GB
789 * i386-low.h (i386_dr_low_can_set_addr): New macro.
790 (i386_dr_low_can_set_control): Likewise.
791 (i386_get_debug_register_length): Likewise.
792 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
793 (i386_dr_low_can_set_control): Likewise.
794 (i386_get_debug_register_length): Likewise.
795
7962014-06-17 Gary Benson <gbenson@redhat.com>
797
b9228891
GB
798 * i386-low.h (i386-dregs.h): New include.
799 (DR_FIRSTADDR): Now in i386-dregs.h.
800 (DR_LASTADDR): Likewise.
801 (DR_NADDR): Likewise.
802 (DR_STATUS): Likewise.
803 (DR_CONTROL): Likewise.
804 (i386_debug_reg_state): Likewise.
805 (i386_dr_insert_watchpoint): Likewise.
806 (i386_dr_remove_watchpoint): Likewise.
807 (i386_dr_region_ok_for_watchpoint): Likewise.
808 (i386_dr_stopped_data_address): Likewise.
809 (i386_dr_stopped_by_watchpoint): Likewise.
810 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
811
4be83cc2
GB
8122014-06-18 Gary Benson <gbenson@redhat.com>
813
814 * i386-low.h (i386_low_insert_watchpoint): Renamed to
815 i386_dr_insert_watchpoint.
816 (i386_low_remove_watchpoint): Renamed to
817 i386_dr_remove_watchpoint.
818 (i386_low_region_ok_for_watchpoint): Renamed to
819 i386_dr_region_ok_for_watchpoint.
820 (i386_low_stopped_data_address): Renamed to
821 i386_dr_stopped_data_address.
822 (i386_low_stopped_by_watchpoint): Renamed to
823 i386_dr_stopped_by_watchpoint.
824 * i386-low.c (i386_show_dr): Renamed to
825 i386_dr_show and made nonstatic. All uses updated.
826 (i386_length_and_rw_bits): Renamed to
827 i386_dr_length_and_rw_bits and made nonstatic.
828 All uses updated.
829 (i386_insert_aligned_watchpoint): Renamed to
830 i386_dr_insert_aligned_watchpoint and made nonstatic.
831 All uses updated.
832 (i386_remove_aligned_watchpoint): Renamed to
833 i386_dr_remove_aligned_watchpoint and made nonstatic.
834 All uses updated.
835 (i386_update_inferior_debug_regs): Renamed to
836 i386_dr_update_inferior_debug_regs and made nonstatic.
837 All uses updated.
838 (i386_low_insert_watchpoint): Renamed to
839 i386_dr_insert_watchpoint. All uses updated.
840 (i386_low_remove_watchpoint): Renamed to
841 i386_dr_remove_watchpoint. All uses updated.
842 (i386_low_region_ok_for_watchpoint): Renamed to
843 i386_dr_region_ok_for_watchpoint. All uses updated.
844 (i386_low_stopped_data_address): Renamed to
845 i386_dr_stopped_data_address. All uses updated.
846 (i386_low_stopped_by_watchpoint): Renamed to
847 i386_dr_stopped_by_watchpoint. All uses updated.
848
131aa0d4
GB
8492014-06-18 Gary Benson <gbenson@redhat.com>
850
851 * i386-low.c (i386_dr_low_can_set_addr): New macro.
852 (i386_dr_low_can_set_control): Likewise.
853 (i386_insert_aligned_watchpoint): New check.
854
d9305f7f
GB
8552014-06-18 Gary Benson <gbenson@redhat.com>
856
857 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
858 Renamed to state.
859
e927c9fc
GB
8602014-06-18 Gary Benson <gbenson@redhat.com>
861
862 * i386-low.c (i386_length_and_rw_bits): Use internal_error
863 instead of fatal and error.
864 (i386_handle_nonaligned_watchpoint): Likewise.
865
1b6d4134
GB
8662014-06-18 Gary Benson <gbenson@redhat.com>
867
868 * i386-low.c (i386_get_debug_register_length): New macro.
869 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
870 (i386_show_dr): Use debug_printf instead of fprintf. Use
871 phex to format values.
872
6e62758f
GB
8732014-06-18 Gary Benson <gbenson@redhat.com>
874
875 * i386-low.h: Comment changes.
876 * i386-low.c: Likewise.
877
fc6e2f03
GB
8782014-06-18 Gary Benson <gbenson@redhat.com>
879
880 * i386-low.c: Whitespace changes.
881
f9d1eeed
TT
8822014-06-12 Tom Tromey <tromey@redhat.com>
883
884 * utils.c (freeargv): Remove.
885
0b04e523
TT
8862014-06-12 Tom Tromey <tromey@redhat.com>
887
888 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
889 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
890 (parse_debug_format_options): Likewise.
891 (gdbserver_usage): Likewise.
892 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
893 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
894 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
895 against libiberty.
896 ($(LIBGNU)): Depend on libiberty.
897 (all-lib): Recurse into all subdirs.
898 (install-only): Invoke "install" target in subdirs.
899 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
900 targets.
901 * configure: Rebuild.
902 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
903 for vasprintf, vsnprintf, or gettimeofday.
904 * configure.srv: Don't add safe-ctype.o or lbasename.o to
905 srv_tgtobj.
906
270c9937
JB
9072014-06-05 Joel Brobecker <brobecker@adacore.com>
908
909 * development.sh: Delete.
910 * Makefile.in (config.status): Adjust dependency on development.sh.
911 * configure.ac: Adjust development.sh source call.
912 * configure: Regenerate.
913
0a261ed8
PA
9142014-06-02 Pedro Alves <palves@redhat.com>
915
916 * ax.c (gdb_free_agent_expr): New function.
917 * ax.h (gdb_free_agent_expr): New declaration.
918 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
919 list.
920 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
921 static.
922 (clear_breakpoint_conditions_and_commands): New function.
923 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
924 (clear_breakpoint_conditions_and_commands): New declaration.
925
e9dae05e
RR
9262014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
927
928 * linux-aarch64-low.c (asm/ptrace.h): Include.
929
5876f503
JK
9302014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
931
932 Fix TLS access for -static -pthread.
933 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
934 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
935 (thread_db_load_search, try_thread_db_load_1): Initialize it.
936
802e8e6d
PA
9372014-05-20 Pedro Alves <palves@redhat.com>
938
939 * linux-aarch64-low.c (aarch64_insert_point)
940 (aarch64_remove_point): No longer check whether the type is
941 supported here. Adjust to new interface.
942 (the_low_target): Install aarch64_supports_z_point_type as
943 supports_z_point_type method.
944 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
945 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
946 instead of a Z packet char. Adjust.
947 (arm_supports_z_point_type): New function.
948 (arm_insert_point, arm_remove_point): Adjust to new interface.
949 (the_low_target): Install arm_supports_z_point_type.
950 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
951 (cris_insert_point, cris_remove_point): Adjust to new interface.
952 Don't check whether the type is supported here.
953 (the_low_target): Install cris_supports_z_point_type.
954 * linux-low.c (linux_supports_z_point_type): New function.
955 (linux_insert_point, linux_remove_point): Adjust to new interface.
956 * linux-low.h (struct linux_target_ops) <insert_point,
957 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
958 raw_breakpoint pointer parameter.
959 <supports_z_point_type>: New method.
960 * linux-mips-low.c (mips_supports_z_point_type): New function.
961 (mips_insert_point, mips_remove_point): Adjust to new interface.
962 Use mips_supports_z_point_type.
963 (the_low_target): Install mips_supports_z_point_type.
964 * linux-ppc-low.c (the_low_target): Install NULL as
965 supports_z_point_type method.
966 * linux-s390-low.c (the_low_target): Install NULL as
967 supports_z_point_type method.
968 * linux-sparc-low.c (the_low_target): Install NULL as
969 supports_z_point_type method.
970 * linux-x86-low.c (x86_supports_z_point_type): New function.
971 (x86_insert_point): Adjust to new insert_point interface. Use
972 insert_memory_breakpoint. Adjust to new
973 i386_low_insert_watchpoint interface.
974 (x86_remove_point): Adjust to remove_point interface. Use
975 remove_memory_breakpoint. Adjust to new
976 i386_low_remove_watchpoint interface.
977 (the_low_target): Install x86_supports_z_point_type.
978 * lynx-low.c (lynx_target_ops): Install NULL as
979 supports_z_point_type callback.
980 * nto-low.c (nto_supports_z_point_type): New.
981 (nto_insert_point, nto_remove_point): Adjust to new interface.
982 (nto_target_ops): Install nto_supports_z_point_type.
983 * mem-break.c: Adjust intro comment.
984 (struct raw_breakpoint) <raw_type, size>: New fields.
985 <inserted>: Update comment.
986 <shlib_disabled>: Delete field.
987 (enum bkpt_type) <gdb_breakpoint>: Delete value.
988 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
989 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
990 (raw_bkpt_type_to_target_hw_bp_type): New function.
991 (find_enabled_raw_code_breakpoint_at): New function.
992 (find_raw_breakpoint_at): New type and size parameters. Use them.
993 (insert_memory_breakpoint): New function, based off
994 set_raw_breakpoint_at.
995 (remove_memory_breakpoint): New function.
996 (set_raw_breakpoint_at): Reimplement.
997 (set_breakpoint): New, based on set_breakpoint_at.
998 (set_breakpoint_at): Reimplement.
999 (delete_raw_breakpoint): Go through the_target->remove_point
1000 instead of assuming memory breakpoints.
1001 (find_gdb_breakpoint_at): Delete.
1002 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1003 (find_gdb_breakpoint): New function.
1004 (set_gdb_breakpoint_at): Delete.
1005 (z_type_supported): New function.
1006 (set_gdb_breakpoint_1): New function, loosely based off
1007 set_gdb_breakpoint_at.
1008 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1009 (delete_gdb_breakpoint_at): Delete.
1010 (delete_gdb_breakpoint_1): New function, loosely based off
1011 delete_gdb_breakpoint_at.
1012 (delete_gdb_breakpoint): New function.
1013 (clear_gdb_breakpoint_conditions): Rename to ...
1014 (clear_breakpoint_conditions): ... this. Don't handle a NULL
1015 breakpoint.
1016 (add_condition_to_breakpoint): Make static.
1017 (add_breakpoint_condition): Take a struct breakpoint pointer
1018 instead of an address. Adjust.
1019 (gdb_condition_true_at_breakpoint): Rename to ...
1020 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1021 z_type parameter.
1022 (gdb_condition_true_at_breakpoint): Reimplement.
1023 (add_breakpoint_commands): Take a struct breakpoint pointer
1024 instead of an address. Adjust.
1025 (gdb_no_commands_at_breakpoint): Rename to ...
1026 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
1027 parameter. Return true if no breakpoint was found. Change debug
1028 output.
1029 (gdb_no_commands_at_breakpoint): Reimplement.
1030 (run_breakpoint_commands): Rename to ...
1031 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
1032 and change return type to boolean.
1033 (run_breakpoint_commands): New function.
1034 (gdb_breakpoint_here): Also check for Z1 breakpoints.
1035 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
1036 breakpoint. Go through the_target->remove_point instead of
1037 assuming memory breakpoint.
1038 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
1039 software and hardware breakpoints.
1040 (reinsert_raw_breakpoint): Go through the_target->insert_point
1041 instead of assuming memory breakpoint.
1042 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
1043 software and hardware breakpoints.
1044 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
1045 Check both software and hardware breakpoints.
1046 (validate_inserted_breakpoint): Assert the breakpoint is a
1047 software breakpoint. Set the inserted flag to -1 instead of
1048 setting shlib_disabled.
1049 (delete_disabled_breakpoints): Adjust.
1050 (validate_breakpoints): Only validate software breakpoints.
1051 Adjust to inserted flag change.
1052 (check_mem_read, check_mem_write): Skip breakpoint types other
1053 than software breakpoints. Adjust to inserted flag change.
1054 * mem-break.h (enum raw_bkpt_type): New enum.
1055 (raw_breakpoint, struct process_info): Forward declare.
1056 (Z_packet_to_target_hw_bp_type): Delete declaration.
1057 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
1058 (set_gdb_breakpoint, delete_gdb_breakpoint)
1059 (clear_breakpoint_conditions): New declarations.
1060 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
1061 (breakpoint_inserted_here): Update comment.
1062 (add_breakpoint_condition, add_breakpoint_commands): Replace
1063 address parameter with a breakpoint pointer parameter.
1064 (gdb_breakpoint_here): Update comment.
1065 (delete_gdb_breakpoint_at): Delete.
1066 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
1067 * server.c (process_point_options): Take a struct breakpoint
1068 pointer instead of an address. Adjust.
1069 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
1070 delete_gdb_breakpoint.
1071 * spu-low.c (spu_target_ops): Install NULL as
1072 supports_z_point_type method.
1073 * target.h: Include mem-break.h.
1074 (struct target_ops) <prepare_to_access_memory>: Update comment.
1075 <supports_z_point_type>: New field.
1076 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1077 instead of a char. Also take a raw breakpoint pointer.
1078 * win32-arm-low.c (the_low_target): Install NULL as
1079 supports_z_point_type.
1080 * win32-i386-low.c (i386_supports_z_point_type): New function.
1081 (i386_insert_point, i386_remove_point): Adjust to new interface.
1082 (the_low_target): Install i386_supports_z_point_type.
1083 * win32-low.c (win32_supports_z_point_type): New function.
1084 (win32_insert_point, win32_remove_point): Adjust to new interface.
1085 (win32_target_ops): Install win32_supports_z_point_type.
1086 * win32-low.h (struct win32_target_ops):
1087 <supports_z_point_type>: New method.
1088 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1089 instead of a char. Also take a raw breakpoint pointer.
1090
932539e3
PA
10912014-05-20 Pedro Alves <palves@redhat.com>
1092
1093 * mem-break.h: Include break-common.h.
1094 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1095 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
1096 (Z_packet_to_target_hw_bp_type): New declaration.
1097 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
1098 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
1099 (Z_PACKET_ACCESS_WP): Delete macros.
1100 (Z_packet_to_hw_type): Delete function.
1101 * i386-low.h: Don't include break-common.h here.
1102 (Z_packet_to_hw_type): Delete declaration.
1103 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
1104 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1105 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
1106 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1107 * linux-aarch64-low.c: Don't include break-common.h here.
1108 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1109 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
1110 (Z_packet_to_target_hw_bp_type): Delete function.
1111 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
1112 function.
1113 (mips_insert_point, mips_remove_point): Use
1114 Z_packet_to_target_hw_bp_type.
1115
4ff0d3d8
PA
11162014-05-20 Pedro Alves <palves@redhat.com>
1117
1118 * linux-aarch64-low.c: Include break-common.h.
1119 (enum target_point_type): Delete.
1120 (Z_packet_to_point_type): Rename to ...
1121 (Z_packet_to_target_hw_bp_type): ... this, and return a
1122 target_hw_bp_type instead.
1123 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
1124 instead of an enum target_point_type.
1125 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
1126 breakpoint type.
1127 (aarch64_dr_state_insert_one_point)
1128 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
1129 (aarch64_handle_aligned_watchpoint)
1130 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
1131 Take an enum target_hw_bp_type instead of an enum
1132 target_point_type.
1133 (aarch64_supports_z_point_type): New function.
1134 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
1135 use Z_packet_to_target_hw_bp_type.
1136
786dc519
JB
11372014-05-20 Joel Brobecker <brobecker@adacore.com>
1138
1139 * configure.ac: Only use -Werror by default when DEVELOPMENT
1140 is true.
1141 * configure: Regenerate.
1142
9e0aa64f
JK
11432014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
1144
1145 Fix gdbserver qGetTLSAddr for x86_64 -m32.
1146 * linux-x86-low.c (X86_64_USER_REGS): New.
1147 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
1148
2b577b92
YQ
11492014-04-28 Yao Qi <yao@codesourcery.com>
1150
1151 * Makefile.in (i386-avx512.c): Fix the typo of generated file
1152 name.
1153
94611da2
PA
11542014-04-25 Pedro Alves <palves@redhat.com>
1155
1156 PR server/16255
1157 * linux-low.c (linux_attach_fail_reason_string): New function.
1158 (linux_attach_lwp): Delete.
1159 (linux_attach_lwp_1): Rename to ...
1160 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
1161 argument. Remove "initial" parameter. Return int instead of
1162 void. Don't error or warn here.
1163 (linux_attach): Adjust to call linux_attach_lwp. Call error on
1164 failure to attach to the tgid. Call warning when failing to
1165 attach to an lwp.
1166 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
1167 argument. Remove "initial" parameter. Return int instead of
1168 void. Don't error or warn here.
1169 (linux_attach_fail_reason_string): New declaration.
1170 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
1171 interface change. Use linux_attach_fail_reason_string.
1172
01f9f808
MS
11732014-04-24 Michael Sturm <michael.sturm@mintel.com>
1174 Walfred Tedeschi <walfred.tedeschi@intel.com>
1175
1176 * Makefile.in: Added rules to handle new files
1177 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
1178 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
1179 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
1180 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
1181 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
1182 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
1183 x32-avx512-linux.o.
1184 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
1185 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
1186 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
1187 i386/x32-avx512.xml.
1188 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
1189 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
1190 i386/x32-avx512-linux.xml.
1191 * i387-fp.c (num_avx512_k_registers): New constant for number
1192 of K registers.
1193 (num_avx512_zmmh_low_registers): New constant for number of
1194 lower ZMM registers (0-15).
1195 (num_avx512_zmmh_high_registers): New constant for number of
1196 higher ZMM registers (16-31).
1197 (num_avx512_ymmh_registers): New contant for number of higher
1198 YMM registers (ymm16-31 added by avx521 on x86_64).
1199 (num_avx512_xmm_registers): New constant for number of higher
1200 XMM registers (xmm16-31 added by AVX512 on x86_64).
1201 (struct i387_xsave): Add space for AVX512 registers.
1202 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
1203 Add code to handle AVX512 registers.
1204 (i387_xsave_to_cache): Add code to handle AVX512 registers.
1205 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
1206 prototypei from generated file.
1207 (tdesc_amd64_avx512_linux): Likewise.
1208 (init_registers_x32_avx512_linux): Likewise.
1209 (tdesc_x32_avx512_linux): Likewise.
1210 (init_registers_i386_avx512_linux): Likewise.
1211 (tdesc_i386_avx512_linux): Likewise.
1212 (x86_64_regmap): Add AVX512 registers.
1213 (x86_linux_read_description): Add code to handle AVX512 XSTATE
1214 mask.
1215 (initialize_low_arch): Add code to initialize AVX512 registers.
1216
51aa91f9
PA
12172014-04-23 Pedro Alves <palves@redhat.com>
1218
1219 * mem-break.c (find_gdb_breakpoint_at): Make static.
1220 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
1221
a4165e94
PA
12222014-04-23 Pedro Alves <palves@redhat.com>
1223
1224 * i386-low.c: Don't include break-common.h here.
1225 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1226 prototype to take target_hw_bp_type as argument instead of a Z
1227 packet char.
1228 * i386-low.h: Include break-common.h here.
1229 (Z_packet_to_hw_type): Declare.
1230 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1231 prototypes.
1232 * linux-x86-low.c (x86_insert_point): Convert the packet number to
1233 a target_hw_bp_type before calling i386_low_insert_watchpoint.
1234 (x86_remove_point): Convert the packet number to a
1235 target_hw_bp_type before calling i386_low_remove_watchpoint.
1236 * win32-i386-low.c (i386_insert_point): Convert the packet number
1237 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
1238 (i386_remove_point): Convert the packet number to a
1239 target_hw_bp_type before calling i386_low_remove_watchpoint.
1240
b8acf843
PA
12412014-04-23 Pedro Alves <palves@redhat.com>
1242
1243 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
1244
d708bcd1
PA
12452014-04-10 Pedro Alves <palves@redhat.com>
1246
1247 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1248 Check if the condition or command is NULL before checking if the
1249 breakpoint is known. On success, return true.
1250 * mem-break.h (add_breakpoint_condition): Document return.
1251 (add_breakpoint_commands): Add describing comment.
1252 * server.c (skip_to_semicolon): New function.
1253 (process_point_options): Use it.
1254
2eec7d5b
PA
12552014-04-09 Pedro Alves <palves@redhat.com>
1256
1257 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
1258 to lwpid_of.
1259
fa96cb38
PA
12602014-02-27 Pedro Alves <palves@redhat.com>
1261
1262 PR 12702
1263 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
1264 macros.
1265 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
1266 output.
1267 (last_thread_of_process_p): Take a PID argument instead of a
1268 thread pointer.
1269 (linux_wait_for_lwp): Delete.
1270 (num_lwps, check_zombie_leaders, not_stopped_callback): New
1271 functions.
1272 (linux_low_filter_event): New function, party factored out from
1273 linux_wait_for_event.
1274 (linux_wait_for_event): Rename to ...
1275 (linux_wait_for_event_filtered): ... this. Add new filter ptid
1276 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
1277 sigsuspend. Check for zombie leaders.
1278 (linux_wait_for_event): Reimplement as wrapper around
1279 linux_wait_for_event_filtered.
1280 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
1281 a normal or signal exit is seen, it's the whole process exiting.
1282 (wait_for_sigstop): No longer a for_each_inferior callback.
1283 Rewrite on top of linux_wait_for_event_filtered.
1284 (stop_all_lwps): Call wait_for_sigstop directly.
1285 * server.c (resume, handle_target_event): Handle
1286 TARGET_WAITKIND_NO_RESUMED.
1287
d763de10
JB
12882014-02-26 Joel Brobecker <brobecker@adacore.com>
1289
1290 * win32-low.c (psapi_get_dll_name,
1291 * win32_CreateToolhelp32Snapshot): Delete.
1292 (win32_CreateToolhelp32Snapshot, win32_Module32First)
1293 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
1294 Delete.
1295 (handle_load_dll): Add function description.
1296 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
1297
850a0f76
JB
12982014-02-26 Joel Brobecker <brobecker@adacore.com>
1299
1300 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
1301 Add comment.
1302 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
1303 base address when calling win32_add_one_solib.
1304 (handle_load_dll): Delete local variable load_addr.
1305 Remove 0x1000 offset applied to DLL base address when calling
1306 win32_add_one_solib.
1307 (handle_unload_dll): Add comment.
1308
f25b3fc3
JB
13092014-02-26 Joel Brobecker <brobecker@adacore.com>
1310
1311 * win32-low.c (win32_add_all_dlls): Renames
1312 win32_ensure_ntdll_loaded. Rewrite function documentation.
1313 Adjust implementation to always load all DLLs.
1314 Add 0x1000 offset to DLL base address when calling
1315 win32_add_one_solib.
1316 (child_initialization_done): New static global.
1317 (do_initial_child_stuff): Set child_initialization_done to
1318 zero during child initialization, and 1 after. Replace call
1319 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
1320 Add comment.
1321 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
1322 (handle_unload_dll): Add function documentation.
1323 (get_child_debug_event): Ignore load and unload DLL events
1324 during child initialization.
1325
d86d4aaf
DE
13262014-02-20 Doug Evans <dje@google.com>
1327
3bc32da3 1328 Remove global all_lwps.
d86d4aaf
DE
1329 * inferiors.h (ptid_of): Move here from linux-low.h.
1330 (pid_of, lwpid_of): Ditto.
1331 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
1332 parameter is a struct thread_info * now.
1333 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
1334 directly. Pass &all_threads to find_inferior instead of &all_lwps.
1335 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
1336 directly.
1337 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
1338 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
1339 * linux-arm-low.c (update_registers_callback): Update, "entry"
1340 parameter is a struct thread_info * now.
1341 Fetch lwpid from current_inferior directly.
1342 (arm_insert_point): Pass &all_threads to find_inferior instead of
1343 &all_lwps.
1344 (arm_remove_point): Ditto.
1345 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
1346 (arm_prepare_to_resume): Fetch pid from thread.
1347 (arm_read_description): Fetch lwpid from current_inferior directly.
1348 * linux-low.c (all_lwps): Delete.
1349 (delete_lwp): Delete call to remove_inferior.
1350 (handle_extended_wait): Fetch lwpid from thread.
1351 (add_lwp): Don't set lwp->entry.id. Remove call to
1352 add_inferior_to_list.
1353 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
1354 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
1355 (kill_one_lwp_callback): Ditto.
1356 (linux_kill): Don't dereference NULL pointer.
1357 Fetch ptid,lwpid from thread.
1358 (get_detach_signal): Fetch ptid from thread.
1359 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
1360 Simplify call to regcache_invalidate_thread.
1361 (delete_lwp_callback): Update, "entry" parameter is a
1362 struct thread_info * now. Fetch pid from thread.
1363 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
1364 (status_pending_p_callback): Update, "entry" parameter is a
1365 struct thread_info * now. Fetch ptid from thread.
1366 (find_lwp_pid): Update, "entry" parameter is a
1367 struct thread_info * now.
1368 (linux_wait_for_lwp): Fetch pid from thread.
1369 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
1370 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
1371 (enqueue_one_deferred_signal): Fetch lwpid from thread.
1372 (dequeue_one_deferred_signal): Ditto.
1373 (cancel_breakpoint): Fetch ptid from current_inferior.
1374 (linux_wait_for_event): Pass &all_threads to find_inferior,
1375 not &all_lwps. Fetch ptid, lwpid from thread.
1376 (count_events_callback): Update, "entry" parameter is a
1377 struct thread_info * now.
1378 (select_singlestep_lwp_callback): Ditto.
1379 (select_event_lwp_callback): Ditto.
1380 (cancel_breakpoints_callback): Ditto.
1381 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
1382 not &all_lwps.
1383 (select_event_lwp): Ditto. Fetch ptid from event_thread.
1384 (unsuspend_one_lwp): Update, "entry" parameter is a
1385 struct thread_info * now.
1386 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
1387 not &all_lwps.
1388 (linux_stabilize_threads): Ditto. And for for_each_inferior.
1389 Fetch lwpid from thread, not lwp.
1390 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
1391 Pass &all_threads to find_inferior, not &all_lwps.
1392 (send_sigstop): Fetch lwpid from thread, not lwp.
1393 (send_sigstop_callback): Update, "entry" parameter is a
1394 struct thread_info * now.
1395 (suspend_and_send_sigstop_callback): Ditto.
1396 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
1397 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
1398 struct thread_info * now.
1399 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
1400 from thread, lwp.
1401 (lwp_running): Update, "entry" parameter is a
1402 struct thread_info * now.
1403 (stop_all_lwps): Fetch ptid from thread.
1404 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
1405 (linux_resume_one_lwp): Fetch lwpid from thread.
1406 (linux_set_resume_request): Update, "entry" parameter is a
1407 struct thread_info * now. Fetch pid, lwpid from thread.
1408 (resume_status_pending_p): Update, "entry" parameter is a
1409 struct thread_info * now.
1410 (need_step_over_p): Ditto. Fetch lwpid from thread.
1411 (start_step_over): Fetch lwpid from thread.
1412 (linux_resume_one_thread): Update, "entry" parameter is a
1413 struct thread_info * now. Fetch lwpid from thread.
1414 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
1415 (proceed_one_lwp): Update, "entry" parameter is a
1416 struct thread_info * now. Fetch lwpid from thread.
1417 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
1418 struct thread_info * now.
1419 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
1420 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
1421 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
1422 directly.
1423 (regsets_store_inferior_registers): Ditto.
1424 (fetch_register, store_register): Ditto.
1425 (linux_read_memory, linux_write_memory): Ditto.
1426 (linux_request_interrupt): Ditto.
1427 (linux_read_auxv): Ditto.
1428 (linux_xfer_siginfo): Ditto.
1429 (linux_qxfer_spu): Ditto.
1430 (linux_qxfer_libraries_svr4): Ditto.
1431 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
1432 moved to inferiors.h.
1433 (get_lwp): Delete.
1434 (get_thread_lwp): Update.
1435 (struct lwp_info): Delete member "entry". Simplify comment for
1436 member "thread".
1437 (all_lwps): Delete.
1438 * linux-mips-low.c (mips_read_description): Fetch lwpid from
1439 current_inferior directly.
1440 (update_watch_registers_callback): Update, "entry" parameter is a
1441 struct thread_info * now. Fetch pid from thread.
1442 (mips_linux_prepare_to_resume): Fetch ptid from thread.
1443 (mips_insert_point): Fetch lwpid from current_inferior.
1444 Pass &all_threads to find_inferior, not &all_lwps.
1445 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
1446 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
1447 directly.
1448 (mips_stopped_data_address): Ditto.
1449 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
1450 directly.
1451 * linux-tile-low.c (tile_arch_setup): Ditto.
1452 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
1453 (update_debug_registers_callback): Update, "entry" parameter is a
1454 struct thread_info * now. Fetch pid from thread.
1455 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
1456 Pass &all_threads to find_inferior, not &all_lwps.
1457 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
1458 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
1459 Pass &all_threads to find_inferior, not &all_lwps.
1460 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
1461 (i386_dr_low_get_status): Ditto.
1462 (x86_linux_prepare_to_resume): Fetch ptid from thread.
1463 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
1464 (x86_linux_read_description): Ditto.
1465 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
1466
3b8361aa
DE
14672014-02-20 Doug Evans <dje@google.com>
1468
1469 * inferiors.c (get_first_inferior): Fix buglet.
1470
f7667f0d
DE
14712014-02-19 Doug Evans <dje@google.com>
1472
1473 * gdbthread.h (add_thread): Change result type to struct thread_info *.
1474 * inferiors.c (add_thread): Change result type to struct thread_info *.
1475 All callers updated.
1476 (add_lwp): Call add_thread here instead of in callers.
1477 All callers updated.
1478 * linux-low.h (get_lwp_thread): Rewrite.
1479 (struct lwp_info): New member "thread".
1480
b3312d80
DE
14812014-02-19 Doug Evans <dje@google.com>
1482
1483 * linux-low.c (add_lwp): Change result to struct lwp_info *.
1484 All callers updated.
1485
ecc6f45c
DE
14862014-02-19 Doug Evans <dje@google.com>
1487
1488 * inferiors.c (add_thread): Fix whitespace.
1489
649ebbca
DE
14902014-02-19 Doug Evans <dje@google.com>
1491
1492 * dll.c (clear_dlls): Replace accessing list implemention details
1493 with API function.
1494 * gdbthread.h (get_first_thread): Declare.
1495 * inferiors.c (for_each_inferior_with_data): New function.
1496 (get_first_thread): New function.
1497 (find_thread_ptid): Simplify.
1498 (get_first_inferior): New function.
1499 (clear_list): Delete.
1500 (one_inferior_p): New function.
1501 (clear_inferior_list): New function.
1502 (clear_inferiors): Update.
1503 * inferiors.h (for_each_inferior_with_data): Declare.
1504 (clear_inferior_list): Declare.
1505 (one_inferior_p): Declare.
1506 (get_first_inferior): Declare.
1507 * linux-low.c (linux_wait_for_event): Replace accessing list
1508 implemention details with API function.
1509 * server.c (target_running): Ditto.
1510 (accumulate_file_name_length): New function.
1511 (emit_dll_description): New function.
1512 (handle_qxfer_libraries): Replace accessing list implemention
1513 details with API function.
1514 (handle_qxfer_threads_worker): New function.
1515 (handle_qxfer_threads_proper): Replace accessing list implemention
1516 details with API function.
1517 (handle_query): Ditto.
1518 (visit_actioned_threads_callback_ftype): New typedef.
1519 (visit_actioned_threads_data): New struct.
1520 (visit_actioned_threads): Rewrite to be find_inferior callback.
1521 (resume): Call find_inferior.
1522 (handle_status): Replace accessing list implemention
1523 details with API function.
1524 (process_serial_event): Replace accessing list implemention details
1525 with API function.
1526 * target.c (set_desired_inferior): Replace accessing list implemention
1527 details with API function.
1528 * tracepoint.c (same_process_p): New function.
1529 (gdb_agent_about_to_close): Replace accessing list implemention
1530 details with API function.
1531 * win32-low.c (child_delete_thread): Replace accessing list
1532 implemention details with API function.
1533 (match_dll_by_basename): New function.
1534 (dll_is_loaded_by_basename): New function.
1535 (win32_ensure_ntdll_loaded): Replace accessing list implemention
1536 details call to dll_is_loaded_by_basename.
1537
80894984
DE
15382014-02-19 Doug Evans <dje@google.com>
1539
1540 * dll.h (struct dll_info): Add comment.
1541 * gdbthread.h (struct thread_info): Add comment.
1542 (current_ptid): Simplify.
1543 * inferiors.c (add_process): Update.
1544 (remove_process): Update.
1545 * inferiors.h (struct process_info): Rename member "head" to "entry".
1546 * linux-low.c (delete_lwp): Update.
1547 (add_lwp): Update.
1548 (last_thread_of_process_p): Update.
1549 (kill_one_lwp_callback, linux_kill): Update.
1550 (status_pending_p_callback): Update.
1551 (wait_for_sigstop): Update. Simplify read of ptid.
1552 (start_step_over): Update.
1553 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
1554 (get_lwp_thread): Update.
1555 (struct lwp_info): Rename member "head" to "entry".
1556 * regcache.h (inferior_list_entry): Delete.
1557 * server.c (kill_inferior_callback): Update.
1558 (detach_or_kill_inferior_callback): Update.
1559 (print_started_pid): Update.
1560 (print_attached_pid): Update.
1561 (process_serial_event): Simplify read of ptid.
1562 * thread-db.c (thread_db_create_event): Update.
1563 (thread_db_get_tls_address): Update.
1564 * win32-low.c (current_inferior_ptid): Simplify.
1565
46917d26
TT
15662014-02-19 Tom Tromey <tromey@redhat.com>
1567
1568 * target.h (struct target_ops) <supports_btrace>: Add target_ops
1569 argument.
1570 (target_supports_btrace): Update.
1571
0759a81e
YQ
15722014-02-14 Yao Qi <yao@codesourcery.com>
1573
1574 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
1575 (rsp-low-ipa.o): New target.
1576
a7191e8b
TT
15772014-02-12 Tom Tromey <tromey@redhat.com>
1578
1579 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
1580 convert_ascii_to_int.
1581 * regcache.c (registers_to_string): Likewise.
1582 * remote-utils.c (decode_M_packet): Likewise.
1583 * server.c (process_serial_event): Likewise.
1584
ff0e980e
TT
15852014-02-12 Tom Tromey <tromey@redhat.com>
1586
1587 * server.c (handle_query, handle_v_run): Use hex2bin, not
1588 unhexify.
1589 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
1590
e9371aff
TT
15912014-02-12 Tom Tromey <tromey@redhat.com>
1592
1593 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
1594 convert_int_to_ascii.
1595 * regcache.c (registers_to_string, collect_register_as_string):
1596 Likewise.
1597 * remote-utils.c (look_up_one_symbol, relocate_instruction):
1598 Likewise.
1599 * server.c (process_serial_event): Likewise.
1600 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
1601 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
1602
971dc0b8
TT
16032014-02-12 Tom Tromey <tromey@redhat.com>
1604
1605 * remote-utils.c (look_up_one_symbol, monitor_output): Use
1606 bin2hex, not hexify.
1607 * tracepoint.c (cmd_qtstatus): Likewise.
1608
0a822afb
TT
16092014-02-12 Tom Tromey <tromey@redhat.com>
1610
1611 * remote-utils.c (monitor_output): Pass explicit length to
1612 hexify.
1613
9c3d6531
TT
16142014-02-12 Tom Tromey <tromey@redhat.com>
1615
1616 * tracepoint.c: Include rsp-low.h.
1617 * server.c: Include rsp-low.h.
1618 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
1619 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
1620 declare.
1621 * remote-utils.c: Include rsp-low.h.
1622 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
1623 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
1624 (convert_int_to_ascii, convert_ascii_to_int): Move to
1625 common/rsp-low.c.
1626 * regcache.c: Include rsp-low.h.
1627 * ax.c: Include rsp-low.h.
1628 * Makefile.in (SFILES): Add common/rsp-low.c.
1629 (OBS): Add rsp-low.o.
1630 (rsp-low.o): New target.
1631
01fd3ea5
TT
16322014-02-12 Tom Tromey <tromey@redhat.com>
1633
1634 * utils.h (pulongest, plongest, phex_nz): Don't declare.
1635 Include print-utils.h.
1636 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
1637 (plongest, thirty_two, phex_nz): Remove.
1638 * Makefile.in (SFILES): Add common/print-utils.c.
1639 (OBS): Add print-utils.o.
1640 (print-utils-ipa.o): New target.
1641 (print-utils.o): New target.
1642 (IPA_OBJS): Add print-utils-ipa.o.
1643
e99dc820
TT
16442014-02-06 Tom Tromey <tromey@redhat.com>
1645
1646 * Makefile.in (SFILES): Fix indentation.
1647
ee1e2d4f
DE
16482014-02-05 Doug Evans <dje@google.com>
1649
1650 * linux-low.c (linux_wait_for_event): Improve comment.
1651 (linux_wait_1): Keep current_inferior in sync with event_child.
1652
f5a02773
DE
16532014-01-22 Doug Evans <dje@google.com>
1654
1655 * gdbthread.h (gdb_id_to_thread): Delete, unused.
1656
87ce2a04
DE
16572014-01-22 Doug Evans <dje@google.com>
1658
1659 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
1660 * configure: Regenerate.
1661 * config.in: Regenerate.
1662 * Makefile.in (SFILES): Add debug.c.
1663 (OBS): Add debug.o.
1664 * debug.c: New file.
1665 * debug.h: New file.
1666 * linux-aarch64-low.c (*): Update all debugging printfs to use
1667 debug_printf instead of fprintf.
1668 * linux-arm-low.c (*): Ditto.
1669 * linux-cris-low.c (*): Ditto.
1670 * linux-crisv32-low.c (*): Ditto.
1671 * linux-m32r-low.c (*): Ditto.
1672 * linux-sparc-low.c (*): Ditto.
1673 * linux-x86.c (*): Ditto.
1674 * linux-low.c (*): Ditto.
1675 (linux_wait_1): Add calls to debug_enter, debug_exit.
1676 (linux_wait): Remove redundant debugging printf.
1677 (stop_all_lwps): Add calls to debug_enter, debug_exit.
1678 (linux_resume, unstop_all_lwps): Ditto.
1679 * mem-break.c (*): Update all debugging printfs to use
1680 debug_printf instead of fprintf.
1681 * remote-utils.c (*): Ditto.
1682 * thread-db.c (*): Ditto.
1683 * server.c #include <ctype.h>, "gdb_vecs.h".
1684 (debug_threads): Moved to debug.c.
1685 (*): Update all debugging printfs to use debug_printf instead of
1686 fprintf.
1687 (start_inferior): Replace call to fflush with call to debug_flush.
1688 (monitor_show_help): Mention set debug-format.
1689 (parse_debug_format_options): New function.
1690 (handle_monitor_command): Handle "monitor set debug-format".
1691 (gdbserver_usage): Mention --debug-format.
1692 (main): Parse --debug-format.
1693 * server.h (debug_threads): Declaration moved to debug.h.
1694 #include "debug.h".
1695 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
1696 trace_debug_1 that uses debug_printf.
1697 (tracepoint_look_up_symbols): Update all debugging printfs to use
1698 debug_printf instead of fprintf.
1699
e671835b
BS
17002014-01-20 Baruch Siach <baruch@tkos.co.il>
1701
1702 * linux-xtensa-low.c: Include asm/ptrace.h instead of
1703 sys/ptrace.h.
1704
b5737fa9
PA
17052014-01-17 Pedro Alves <palves@redhat.com>
1706
ea38d2a9 1707 PR build/16445
c7faa97a
PA
1708 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
1709 defined after including gdb_proc_service.h.
b5737fa9 1710
40ed484e
DE
17112014-01-16 Doug Evans <dje@google.com>
1712
1713 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
1714 (match_dll): Use it.
1715
969c39fb
MM
17162014-01-16 Markus Metzger <markus.t.metzger@intel.com>
1717
1718 * target.h (target_ops) <read_btrace>: Change parameters and
1719 return type to allow error reporting.
1720 * server.c (handle_qxfer_btrace): Support delta reads. Pass
1721 trace reading errors on.
1722 * linux-low.c (linux_low_read_btrace): Pass trace reading
1723 errors on.
1724 (linux_low_disable_btrace): New.
1725
ab7f45ba
DE
17262014-01-15 Doug Evans <dje@google.com>
1727
1728 * inferiors.c (thread_id_to_gdb_id): Delete.
1729 * inferiors.h (thread_id_to_gdb_id): Delete.
1730
66af0f44
EZ
17312014-01-13 Eli Zaretskii <eliz@gnu.org>
1732
1733 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
1734 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
1735 versions.
1736
9939e131
PA
17372014-01-08 Pedro Alves <palves@redhat.com>
1738
1739 * server.c (handle_status): Don't discard previous queued stop
1740 replies or thread's pending status here.
1741 (main) <disconnection>: Do it here instead.
1742
b7ea362b
PA
17432014-01-08 Pedro Alves <palves@redhat.com>
1744
1745 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
1746 * server.c (visit_actioned_threads, handle_pending_status): New
1747 function.
1748 (handle_v_cont): Factor out parts to ...
1749 (resume): ... this new function. If in all-stop, and a thread
1750 being resumed has a pending status, report it without actually
1751 resuming.
1752 (myresume): Adjust to use the new 'resume' function.
1753 (clear_pending_status_callback, set_pending_status_callback)
1754 (find_status_pending_thread_callback): New functions.
1755 (handle_status): Handle the case of multiple threads having
1756 interesting statuses to report. Report threads' real last signal
1757 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
1758 with an interesting thread to report the status for, instead of
1759 always reporting the status of the first thread.
1760
28498c42
JB
17612014-01-01 Joel Brobecker <brobecker@adacore.com>
1762
1763 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
1764 * gdbreplay.c (gdbreplay_version): Likewise.
1765
f45c82da
YZ
17662013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
1767
1768 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
1769 iov.iov_len with the real length in use.
1770
379a5e2d
JB
17712013-12-13 Joel Brobecker <brobecker@adacore.com>
1772
1773 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
1774 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
1775 for all targets that use win32-low.c.
1776 * win32-low.c (win32_ensure_ntdll_loaded): New function.
1777 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
1778
4210d83e
PA
17792013-12-13 Pedro Alves <palves@redhat.com>
1780
1781 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
1782 if equal to TARGET_WAITKIND_LOADED.
1783 * win32-low.c (cached_status): New static global.
1784 (win32_wait): Add declaration.
1785 (do_initial_child_stuff): Flush all initial pending debug events
1786 up to the initial breakpoint.
1787 (win32_wait): If CACHED_STATUS was set, return that instead
1788 of doing a real wait. Remove the code resuming the execution
1789 of the inferior after receiving a TARGET_WAITKIND_LOADED event
1790 during the initial phase. Also remove the code changing
1791 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
1792 TARGET_WAITKIND_STOPPED.
1793
e7f0d979
YQ
17942013-12-11 Yao Qi <yao@codesourcery.com>
1795
1796 * notif.c (handle_notif_ack): Return 0 if no notification
1797 matches.
1798
ebcf782c
DE
17992013-11-20 Doug Evans <dje@google.com>
1800
1801 * linux-low.c (linux_set_resume_request): Fix comment.
1802
20ad9378
DE
18032013-11-20 Doug Evans <dje@google.com>
1804
1805 * linux-low.c (resume_status_pending_p): Tweak comment.
1806
a196ebeb
WT
18072013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
1808
1809 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
1810 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
1811 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
1812 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
1813 (srv_amd64_regobj): Add amd64-mpx.o.
1814 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
1815 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
1816 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
1817 * i387-fp.c (num_pl_bnd_register) Added constant.
1818 (num_pl_bnd_cfg_registers) Added constant.
1819 (struct i387_xsave) Added reserved area and MPX fields.
1820 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
1821 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
1822 function.
1823 (tdesc_i386_mpx_linux): Add MPX amd64 target.
1824 (init_registers_amd64_mpx_linux): Declare new function.
1825 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
1826 (x86_64_regmap): Add MPX registers.
1827 (x86_linux_read_description): Add MPX case.
1828 (initialize_low_arch): Initialize MPX targets.
1829
0080a2f6
TT
18302013-11-18 Tom Tromey <tromey@redhat.com>
1831
1832 * configure: Rebuild.
1833 * configure.ac: Don't check for stdlib.h.
1834 * gdbreplay.c: Unconditionally include stdlib.h.
1835
2978b111
TT
18362013-11-18 Tom Tromey <tromey@redhat.com>
1837
1838 * config.in: Rebuild.
1839 * configure: Rebuild.
1840 * configure.ac: Don't use AC_HEADER_DIRENT.
1841
a3d08894
TT
18422013-11-18 Tom Tromey <tromey@redhat.com>
1843
1844 * server.h: Don't check HAVE_STRING_H.
1845 * gdbreplay.c: Don't check HAVE_STRING_H.
1846 * configure: Rebuild.
1847
0a5dd17d
TT
18482013-11-18 Tom Tromey <tromey@redhat.com>
1849
1850 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
1851 LIBGNU.
1852
1bd2f0ba
TT
18532013-11-08 Tom Tromey <tromey@redhat.com>
1854
1855 * configure, config.in: Rebuild.
1856 * configure.ac: Remove unused configury.
1857
3266f10b
TT
18582013-11-08 Tom Tromey <tromey@redhat.com>
1859
1860 * acinclude.m4: Include common.m4, codeset.m4.
1861 * configure, config.in: Rebuild.
1862 * configure.ac: Use GDB_AC_COMMON.
1863
6682d959
AA
18642013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
1865
1866 * linux-s390-low.c (HWCAP_S390_TE): New define.
1867 (s390_arch_setup): Consider the TE field in the HWCAP for
1868 determining 'have_regset_tdb'.
1869
fd0a4d76
SDJ
18702013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
1871
1872 PR gdb/16014
1873 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
1874 call to sizeof.
1875
1a3d890b
PA
18762013-10-02 Pedro Alves <palves@redhat.com>
1877
1878 * server.c (process_serial_event): Don't output "GDBserver
1879 exiting" if GDB is connected through stdio.
1880 * target.c (mywait): Likewise, be silent if GDB is connected
1881 through stdio.
1882
97ad4581
JB
18832013-10-01 Joel Brobecker <brobecker@adacore.com>
1884
1885 * lynx-low.c (lynx_add_threads_after_attach): New function.
1886 (lynx_attach): Remove call to add_thread. Add call to
1887 lynx_add_threads_after_attach instead.
1888
5b4e221c
MF
18892013-09-28 Mike Frysinger <vapier@gentoo.org>
1890
1891 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
1892 * config.in, configure: Regenerated.
1893
ee47b2f8
YQ
18942013-09-18 Yao Qi <yao@codesourcery.com>
1895
1896 PR server/15959
1897 * server.c (start_inferior): Clear 'resume_info'.
1898
d6707650 18992013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 1900
d6707650
JW
1901 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
1902 for each register.
1903
9243dd0e 19042013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 1905
9243dd0e
JW
1906 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
1907 linux-tile-low.o to srv_tgtobj.
1908
c623a6ef
WN
19092013-09-16 Will Newton <will.newton@linaro.org>
1910
1911 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
1912 out regs.
1913
fb71d39e
PA
19142013-09-06 Pedro Alves <palves@redhat.com>
1915
1916 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
1917 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
1918 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
1919 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
1920 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
1921 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
1922
8e7e9910
PA
19232013-09-06 Pedro Alves <palves@redhat.com>
1924
1925 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
1926 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
1927
7c3a12ca
PA
19282013-09-06 Pedro Alves <palves@redhat.com>
1929
1930 * linux-amd64-ipa.c: Include tracepoint.h.
1931 * linux-i386-ipa.c: Include tracepoint.h.
1932
8eb3d7b6
RW
19332013-09-06 Ricard Wanderlof <ricardw@axis.com>
1934
1935 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
1936 (ps_get_thread_area): New function.
1937
eddddb9d
RW
19382013-09-06 Ricard Wanderlof <ricardw@axis.com>
1939
1940 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
1941 (initialize_low_arch): Call init_registers_crisv32 rather than
1942 init_register_crisv32.
1943
533b0600
PA
19442013-09-05 Pedro Alves <palves@redhat.com>
1945
1946 * server.h (handle_vFile, hostio_last_error_from_errno): Move
1947 to ...
1948 * hostio.h: ... this new file.
1949 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
1950 win32-low.c: Include hostio.h.
1951
0ce3d3b5
PA
19522013-09-05 Pedro Alves <palves@redhat.com>
1953
1954 * server.h (gdb_client_data, handler_func, callback_handler_func)
1955 (delete_file_handler, add_file_handler, append_callback_event)
1956 (delete_callback_event, start_event_loop, initialize_event_loop):
1957 Move to event-loop.h and include it.
1958 * event-loop.h: New file.
1959
799cdc37
PA
19602013-09-05 Pedro Alves <palves@redhat.com>
1961
1962 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
1963 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
1964 (loaded_dll, unloaded_dll): Move to ...
1965 * dll.h: ... this new file.
1966 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
1967
6a6bbd9d
PA
19682013-09-05 Pedro Alves <palves@redhat.com>
1969
1970 * server.h (current_process, get_thread_process, all_processes)
1971 (add_inferior_to_list, for_each_inferior, current_inferior)
1972 (remove_inferior, add_process, remove_process, find_process_pid)
1973 (have_started_inferiors_p, have_attached_inferiors_p)
1974 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
1975 (clear_inferiors, find_inferior, find_inferior_id)
1976 (inferior_target_data, set_inferior_target_data)
1977 (inferior_regcache_data, set_inferior_regcache_data): Move to
1978 inferiors.h, and include it.
1979 * inferiors.h: New file.
1980
f699aaba
PA
19812013-09-05 Pedro Alves <palves@redhat.com>
1982
1983 * server.h (struct emit_ops, current_insn_ptr, emit_error):
1984 Move ...
1985 * ax.h: ... here.
1986
c144c7a0
PA
19872013-09-05 Pedro Alves <palves@redhat.com>
1988
1989 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
1990 tracepoint.h.
1991 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
1992 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
1993 (handle_tracepoint_general_set, handle_tracepoint_query)
1994 (tracepoint_finished_step, tracepoint_was_hit)
1995 (release_while_stepping_state_list, current_traceframe)
1996 (in_readonly_region, traceframe_read_mem)
1997 (fetch_traceframe_registers, traceframe_read_sdata)
1998 (traceframe_read_info, struct fast_tpoint_collect_status)
1999 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2000 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2001 (supply_fast_tracepoint_registers)
2002 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2003 (ipa_tdesc, claim_trampoline_space)
2004 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2005 (agent_mem_read, agent_get_trace_state_variable_value)
2006 (agent_set_trace_state_variable_value, agent_tsv_read)
2007 (agent_mem_read_string, get_raw_reg_func_addr)
2008 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2009 * tracepoint.h: ... this new file.
2010
ff42e6ab
PA
20112013-09-05 Pedro Alves <palves@redhat.com>
2012
2013 * server.h (perror_with_name, error, fatal, warning, paddress)
2014 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2015 include it.
2016 * utils.h: New file.
2017
541af0f4
PA
20182013-09-05 Pedro Alves <palves@redhat.com>
2019
2020 * server.h (remote_debug, noack_mode, transport_is_reliable)
2021 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
2022 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
2023 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
2024 (write_enn, initialize_async_io, enable_async_io)
2025 (disable_async_io, check_remote_input_interrupt_request)
2026 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
2027 (dead_thread_notify, prepare_resume_reply)
2028 (decode_address_to_semicolon, decode_address, decode_m_packet)
2029 (decode_M_packet, decode_X_packet, decode_xfer_write)
2030 (decode_search_memory_packet, unhexify, hexify)
2031 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
2032 (look_up_one_symbol, relocate_instruction)
2033 (monitor_output): Move to remote-utils.h, and include it.
2034 * remote-utils.h: New file.
2035
eebdf26b
PA
20362013-09-05 Pedro Alves <palves@redhat.com>
2037
2038 * server.h (_): Delete.
2039
3aafd2ff
PA
20402013-09-02 Pedro Alves <palves@redhat.com>
2041
2042 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
2043 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
2044 allocated.
2045 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
2046
cee83bcb
PM
20472013-09-02 Pierre Muller <muller@sourceware.org>
2048
2049 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
2050 or WriteProcessMemory complete successfully and handle
2051 ERROR_PARTIAL_COPY error.
2052
9a13b2fa
PA
20532013-09-02 Pedro Alves <palves@redhat.com>
2054
2055 * server.c (gdb_read_memory): Return -1 on traceframe memory read
2056 error instead of EIO.
2057
602e3198
JK
20582013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2059
2060 PR server/15604
2061 * linux-low.c: Include filestuff.h.
2062 (linux_create_inferior) <pid == 0>: Call close_most_fds.
2063 * lynx-low.c: Include filestuff.h.
2064 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
2065 * server.c: Include filestuff.h.
2066 (main): Call notice_open_fds.
2067 * spu-low.c: Include filestuff.h.
2068 (spu_create_inferior) <pid == 0>: Call close_most_fds.
2069
96d7229d
LM
20702013-08-22 Luis Machado <lgustavo@codesourcery.com>
2071
2072 * Makefile.in: Explain why ../target and ../nat are not
2073 listed as include file search paths.
2074 (linux-waitpid.o): New object file rule.
2075 * configure.srv (srv_native_linux_obj): New variable.
2076 Replace all occurrences of linux native object files with
2077 $srv_native_linux_obj.
2078 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
2079 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
2080 (linux_enable_event_reporting): Remove declaration.
2081 (my_waitpid): Moved to common/linux-waitpid.c.
2082 (linux_wait_for_event): Pass ptid when calling
2083 linux_enable_event_reporting.
2084 (linux_supports_tracefork_flag): Remove.
2085 (linux_enable_event_reporting): Likewise.
2086 (linux_tracefork_grandchild): Remove.
2087 (STACK_SIZE): Moved to common/linux-ptrace.c.
2088 (linux_tracefork_child): Remove.
2089 (linux_test_for_tracefork): Remove.
2090 (linux_look_up_symbols): Call linux_supports_traceclone.
2091 (initialize_low): Remove call to linux_test_for_tracefork.
2092 * linux-low.h (PTRACE_TYPE_ARG3): Move to
2093 common/linux-ptrace.h.
2094 (PTRACE_TYPE_ARG4): Likewise.
2095 Include linux-ptrace.h.
2096
32940073
PA
20972013-08-21 Pedro Alves <palves@redhat.com>
2098
2099 * config.in: Renegerate.
2100
33b60d58 21012013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 2102
33b60d58
LM
2103 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
2104 (SFILES): Remove $(srcdir)/common/target-common.c and
2105 add $(srcdir)/target/waitstatus.c.
2106 (OBS): Remove target-common.o and add waitstatus.o.
2107 (server_h): Remove $(srcdir)/../common/target-common.h and
2108 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
2109 and $(srcdir)/../target/waitstatus.h.
2110 (target-common.o): Remove.
2111 (waitstatus.o): New target object file.
2112 * target.h: Do not include target-common.h and
2113 include target/resume.h, target/wait.h and
2114 target/waitstatus.h.
2115
b8e1b30e
LM
21162013-08-13 Luis Machado <lgustavo@codesourcery.com>
2117
2118 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2119 to PTRACE_TYPE_ARG3.
2120 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2121 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
2122 PTRACE_TYPE_ARG4.
2123 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
2124 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
2125
7a60ad40
YQ
21262013-07-27 Jie Zhang <jie@codesourcery.com>
2127 Daniel Jacobowitz <dan@codesourcery.com>
2128 Yao Qi <yao@codesourcery.com>
2129
2130 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
2131 (mips-linux-watch.o): New rule.
2132 (mips_linux_watch_h): New variable.
2133 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
2134 srv_tgtobj.
2135 * linux-mips-low.c: Include mips-linux-watch.h.
2136 (struct arch_process_info, struct arch_lwp_info): New.
2137 (update_watch_registers_callback): New function.
2138 (mips_linux_new_process, mips_linux_new_thread) New functions.
2139 (mips_linux_prepare_to_resume, mips_insert_point): New
2140 functions.
2141 (mips_remove_point, mips_stopped_by_watchpoint): New
2142 functions.
2143 (rsp_bp_type_to_target_hw_bp_type): New function.
2144 (mips_stopped_data_address): New function.
2145 (the_low_target): Add watchpoint support functions.
2146
de6f69ad
YQ
21472013-07-27 Yao Qi <yao@codesourcery.com>
2148
2149 * i386-low.c: Include break-common.h.
2150 (enum target_hw_bp_type): Remove.
2151
3360c0bf
LM
21522013-07-24 Luis Machado <lgustavo@codesourcery.com>
2153
2154 * Makefile.in (SFILES): /common/target-common.c.
2155 (OBS): Add target-common.o.
2156 (server_h): Add $(srcdir)/../common/target-common.h.
2157 (target-common.o): New target.
2158 * server.c (queue_stop_reply_callback): Free
2159 status string after use.
2160 * target.c (target_waitstatus_to_string): Remove.
2161 * target.h: Include target-common.h.
2162 (resume_kind): Likewise.
2163 (target_waitkind): Likewise.
2164 (target_waitstatus): Likewise.
2165 (TARGET_WNOHANG): Likewise.
2166
bd885420
YQ
21672013-07-04 Yao Qi <yao@codesourcery.com>
2168
2169 * Makefile.in (host_alias): Use @host_noncanonical@.
2170 (target_alias): Use @target_noncanonical@.
2171 * configure.ac: Use ACX_NONCANONICAL_TARGET and
2172 ACX_NONCANONICAL_HOST.
2173 * configure: Regenerated.
2174
2175 Revert:
2176 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2177
2178 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2179 * configure: Rebuild.
2180 * Makefile.in (version_host, version_target): Get from configure.
2181 (version.c): Use $(version_host) and $(version_target).
2182
17ef446e
PA
21832013-07-03 Pedro Alves <palves@redhat.com>
2184
2185 * Makefile.in (config.status): Depend on development.sh.
2186 * acinclude.m4: Include libmcheck.m4.
2187 * configure: Regenerate.
2188
7a9a7487
MG
21892013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2190
2191 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
2192 attribute inside the parentheses.
2193 (winapi_DebugSetProcessKillOnExit): Ditto.
2194 (winapi_DebugBreakProcess): Ditto.
2195 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 2196
49b64de6
MG
21972013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2198
2199 * notif.h (notif_event): Add a dummy member to avoid compiler
2200 errors.
2201
d5749ee7
PA
22022013-07-01 Pedro Alves <palves@redhat.com>
2203
2204 * hostio.c (HOSTIO_PATH_MAX): Define.
2205 (require_filename, handle_open, handle_unlink, handle_readlink):
2206 Use it.
2207
d8d2a3ee
PA
22082013-07-01 Pedro Alves <palves@redhat.com>
2209
2210 * server.h: Include "pathmax.h".
2211 * linux-low.c: Don't include sys/param.h.
2212 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
2213 MAXPATHLEN.
2214 * win32-low.c: Don't include sys/param.h.
2215 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
2216
bc7dea8d
PA
22172013-07-01 Pedro Alves <palves@redhat.com>
2218
2219 * event-loop.c: Don't check HAVE_UNISTD_H before including
2220 <unistd.h>.
2221 * gdbreplay.c: Likewise.
2222 * remote-utils.c: Likewise.
2223 * server.c: Likewise.
2224 * configure.ac: Don't check for unistd.h.
2225 * configure: Regenerate.
2226
d6c2da54
TT
22272013-06-28 Tom Tromey <tromey@redhat.com>
2228
2229 * Makefile.in (version.c): Use version.in, not
2230 common/version.in.
2231
257b6bec
MG
22322013-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
86ebe149
DK
22392013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2240
2241 Fix trace-status to output user name without trailing colon.
2242 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
2243
f30aa5af
DK
22442013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2245
2246 Fix trace-status to output proper start-time and stop-time.
2247 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
2248 output start time and stop time in hex as gdb expects.
2249
28a93511
YQ
22502013-06-26 Pedro Alves <pedro@codesourcery.com>
2251
2252 * tracepoint.c (build_traceframe_info_xml): Output trace state
2253 variables present in the trace buffer.
2254
01208463
TT
22552013-06-24 Tom Tromey <tromey@redhat.com>
2256
2257 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
2258 create-version.sh.
2259 (version.o): Remove.
2260 * gdbreplay.c: Include version.h.
2261 (version, host_name): Don't declare.
2262 * server.h: Include version.h.
2263 (version, host_name): Don't declare.
2264
760256f9
PA
22652013-06-12 Pedro Alves <palves@redhat.com>
2266
2267 * linux-x86-low.c (linux_is_elf64): Delete global.
2268 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
2269 with local linux_pid_exe_is_elf_64_file use.
2270
030031ee
PA
22712013-06-11 Pedro Alves <palves@redhat.com>
2272
2273 * linux-low.c (regset_disabled, disable_regset): New functions.
2274 (regsets_fetch_inferior_registers)
2275 (regsets_store_inferior_registers): Use them.
2276 (initialize_regsets_info); Don't allocate the disabled_regsets
2277 array here.
2278 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
2279 comment.
2280
5da6eb0a
PA
22812013-06-11 Pedro Alves <palves@redhat.com>
2282
2283 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
2284 xmalloc.
2285
7e5aaa09
PA
22862013-06-11 Pedro Alves <palves@redhat.com>
2287
2288 * linux-x86-low.c (initialize_low_arch): Call
2289 init_registers_x32_avx_linux.
2290
d878444c
JK
22912013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
2292
2293 Fix compatibility with Android Bionic.
2294 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
2295 it is not empty.
2296
3aee8918
PA
22972013-06-07 Pedro Alves <palves@redhat.com>
2298
5f2b57b5 2299 PR server/14823
3aee8918
PA
2300 * Makefile.in (OBS): Add tdesc.o.
2301 (IPA_OBJS): Add tdesc-ipa.o.
2302 (tdesc-ipa.o): New rule.
2303 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
2304 interface.
2305 * linux-low.c (new_inferior): Delete.
2306 (disabled_regsets, num_regsets): Delete.
2307 (linux_add_process): Adjust to set the new per-process
2308 new_inferior flag.
2309 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
2310 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
2311 was a stop. When calling arch_setup, switch the current inferior
2312 to the thread that got an event.
2313 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
2314 (regsets_fetch_inferior_registers)
2315 (regsets_store_inferior_registers): New regsets_info parameter.
2316 Adjust to use it.
2317 (linux_register_in_regsets): New regs_info parameter. Adjust to
2318 use it.
2319 (register_addr, fetch_register, store_register): New usrregs_info
2320 parameter. Adjust to use it.
2321 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
2322 parameter regs_info. Adjust to use it.
2323 (linux_fetch_registers): Get the current inferior's regs_info, and
2324 adjust to use it.
2325 (linux_store_registers): Ditto.
2326 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
2327 (initialize_low): Don't initialize the target_regsets here. Call
2328 initialize_low_arch.
2329 * linux-low.h (target_regsets): Delete declaration.
2330 (struct regsets_info): New.
2331 (struct usrregs_info): New.
2332 (struct regs_info): New.
2333 (struct process_info_private) <new_inferior>: New field.
2334 (struct linux_target_ops): Delete the num_regs, regmap, and
2335 regset_bitmap fields. New field regs_info.
2336 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
2337 * i387-fp.c (num_xmm_registers): Delete.
2338 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
2339 calls to new interface.
2340 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
2341 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
2342 Infer the number of xmm registers from the regcache's target
2343 description.
2344 * i387-fp.h (num_xmm_registers): Delete.
2345 * inferiors.c (add_thread): Don't install the thread's regcache
2346 here.
2347 * proc-service.c (gregset_info): Fetch the current inferior's
2348 regs_info. Adjust to use it.
2349 * regcache.c: Include tdesc.h.
2350 (register_bytes, reg_defs, num_registers)
2351 (gdbserver_expedite_regs): Delete.
2352 (get_thread_regcache): If the thread doesn't have a regcache yet,
2353 create one, instead of aborting gdbserver.
2354 (regcache_invalidate_one): Rename to ...
2355 (regcache_invalidate_thread): ... this.
2356 (regcache_invalidate_one): New.
2357 (regcache_invalidate): Only invalidate registers of the current
2358 process.
2359 (init_register_cache): Add target_desc parameter, and use it.
2360 (new_register_cache): Ditto. Assert the target description has a
2361 non zero registers_size.
2362 (regcache_cpy): Add assertions. Adjust.
2363 (realloc_register_cache, set_register_cache): Delete.
2364 (registers_to_string, registers_from_string): Adjust.
2365 (find_register_by_name, find_regno, find_register_by_number)
2366 (register_cache_size): Add target_desc parameter, and use it.
2367 (free_register_cache_thread, free_register_cache_thread_one)
2368 (regcache_release, register_cache_size): New.
2369 (register_size): Add target_desc parameter, and use it.
2370 (register_data, supply_register, supply_register_zeroed)
2371 (supply_regblock, supply_register_by_name, collect_register)
2372 (collect_register_as_string, collect_register_by_name): Adjust.
2373 * regcache.h (struct target_desc): Forward declare.
2374 (struct regcache) <tdesc>: New field.
2375 (init_register_cache, new_register_cache): Add target_desc
2376 parameter.
2377 (regcache_invalidate_thread): Declare.
2378 (regcache_invalidate_one): Delete declaration.
2379 (regcache_release): Declare.
2380 (find_register_by_number, register_cache_size, register_size)
2381 (find_regno): Add target_desc parameter.
2382 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
2383 declarations.
2384 * remote-utils.c: Include tdesc.h.
2385 (outreg, prepare_resume_reply): Adjust.
2386 * server.c: Include tdesc.h.
2387 (gdbserver_xmltarget): Delete declaration.
2388 (get_features_xml, process_serial_event): Adjust.
2389 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
2390 declare.
2391 (struct process_info) <tdesc>: New field.
2392 (ipa_tdesc): Declare.
2393 * tdesc.c: New file.
2394 * tdesc.h: New file.
2395 * tracepoint.c: Include tdesc.h.
2396 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
2397 (get_context_regcache): Adjust to pass ipa_tdesc down.
2398 (do_action_at_tracepoint): Adjust to get the register cache size
2399 from the context regcache's description.
2400 (traceframe_walk_blocks): Adjust to get the register cache size
2401 from the current trace frame's description.
2402 (traceframe_get_pc): Adjust to get current trace frame's
2403 description and pass it down.
2404 (gdb_collect): Adjust to get the register cache size from the
2405 IPA's description.
2406 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
2407 (gdbserver_xmltarget): Delete.
2408 (initialize_low_tracepoint): Set the ipa's target description.
2409 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
2410 (initialize_low_tracepoint): Set the ipa's target description.
2411 * linux-x86-low.c: Include tdesc.h.
2412 [__x86_64__] (is_64bit_tdesc): New.
2413 (ps_get_thread_area, x86_get_thread_area): Use it.
2414 (i386_cannot_store_register): Rename to ...
2415 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
2416 (i386_cannot_fetch_register): Rename to ...
2417 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
2418 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
2419 to new interface.
2420 (target_regsets): Rename to ...
2421 (x86_regsets): ... this.
2422 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
2423 interface.
2424 (x86_siginfo_fixup): Use is_64bit_tdesc.
2425 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
2426 (tdesc_x32_avx_linux, tdesc_x32_linux)
2427 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
2428 Declare.
2429 (x86_linux_update_xmltarget): Delete.
2430 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
2431 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
2432 (AMD64_LINUX_USER64_CS): New.
2433 (x86_linux_read_description): New, based on
2434 x86_linux_update_xmltarget.
2435 (same_process_callback): New.
2436 (x86_arch_setup_process_callback): New.
2437 (x86_linux_update_xmltarget): New.
2438 (x86_regsets_info): New.
2439 (amd64_linux_regs_info): New.
2440 (i386_linux_usrregs_info): New.
2441 (i386_linux_regs_info): New.
2442 (x86_linux_regs_info): New.
2443 (x86_arch_setup): Reimplement.
2444 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
2445 (x86_emit_ops): Ditto.
2446 (the_low_target): Adjust. Install x86_linux_regs_info,
2447 x86_cannot_fetch_register, and x86_cannot_store_register.
2448 (initialize_low_arch): New.
2449 * linux-ia64-low.c (tdesc_ia64): Declare.
2450 (ia64_fetch_register): Adjust.
2451 (ia64_usrregs_info, regs_info): New globals.
2452 (ia64_regs_info): New function.
2453 (the_low_target): Adjust.
2454 (initialize_low_arch): New function.
2455 * linux-sparc-low.c (tdesc_sparc64): Declare.
2456 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
2457 Adjust.
2458 (sparc_arch_setup): New function.
2459 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
2460 (the_low_target): Adjust.
2461 (initialize_low_arch): New function.
2462 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
2463 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
2464 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
2465 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
2466 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
2467 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
2468 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
2469 (tdesc_powerpc_isa205_vsx64l): Declare.
2470 (ppc_cannot_store_register, ppc_collect_ptrace_register)
2471 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
2472 (ppc_set_pc, ppc_get_hwcap): Adjust.
2473 (ppc_usrregs_info): Forward declare.
2474 (!__powerpc64__) ppc_regmap_adjusted: New global.
2475 (ppc_arch_setup): Adjust to the current process'es target
2476 description.
2477 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
2478 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
2479 (ppc_store_evrregset): Adjust.
2480 (target_regsets): Rename to ...
2481 (ppc_regsets): ... this, and make static.
2482 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
2483 (ppc_regs_info): New function.
2484 (the_low_target): Adjust.
2485 (initialize_low_arch): New function.
2486 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
2487 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
2488 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
2489 (tdesc_s390x_linux64v2): Declare.
2490 (s390_collect_ptrace_register, s390_supply_ptrace_register)
2491 (s390_fill_gregset, s390_store_last_break): Adjust.
2492 (target_regsets): Rename to ...
2493 (s390_regsets): ... this, and make static.
2494 (s390_get_pc, s390_set_pc): Adjust.
2495 (s390_get_hwcap): New target_desc parameter, and use it.
2496 [__s390x__] (have_hwcap_s390_high_gprs): New global.
2497 (s390_arch_setup): Adjust to set the current process'es target
2498 description. Don't adjust the regmap.
2499 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
2500 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
2501 (regs_info_3264): New globals.
2502 (s390_regs_info): New function.
2503 (the_low_target): Adjust.
2504 (initialize_low_arch): New function.
2505 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
2506 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
2507 [__mips64] (init_registers_mips_linux)
2508 (init_registers_mips_dsp_linux): Delete defines.
2509 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
2510 (have_dsp): New global.
2511 (mips_read_description): New, based on mips_arch_setup.
2512 (mips_arch_setup): Reimplement.
2513 (get_usrregs_info): New function.
2514 (mips_cannot_fetch_register, mips_cannot_store_register)
2515 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
2516 (mips_fill_fpregset, mips_store_fpregset): Adjust.
2517 (target_regsets): Rename to ...
2518 (mips_regsets): ... this, and make static.
2519 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
2520 (dsp_regs_info, regs_info): New globals.
2521 (mips_regs_info): New function.
2522 (the_low_target): Adjust.
2523 (initialize_low_arch): New function.
2524 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
2525 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
2526 Declare.
2527 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
2528 (arm_read_description): New, with bits factored from
2529 arm_arch_setup.
2530 (arm_arch_setup): Reimplement.
2531 (target_regsets): Rename to ...
2532 (arm_regsets): ... this, and make static.
2533 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
2534 (arm_regs_info): New function.
2535 (the_low_target): Adjust.
2536 (initialize_low_arch): New function.
2537 * linux-m68k-low.c (tdesc_m68k): Declare.
2538 (target_regsets): Rename to ...
2539 (m68k_regsets): ... this, and make static.
2540 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
2541 (m68k_regs_info): New function.
2542 (m68k_arch_setup): New function.
2543 (the_low_target): Adjust.
2544 (initialize_low_arch): New function.
2545 * linux-sh-low.c (tdesc_sharch): Declare.
2546 (target_regsets): Rename to ...
2547 (sh_regsets): ... this, and make static.
2548 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
2549 (sh_regs_info, sh_arch_setup): New functions.
2550 (the_low_target): Adjust.
2551 (initialize_low_arch): New function.
2552 * linux-bfin-low.c (tdesc_bfin): Declare.
2553 (bfin_arch_setup): New function.
2554 (bfin_usrregs_info, regs_info): New globals.
2555 (bfin_regs_info): New function.
2556 (the_low_target): Adjust.
2557 (initialize_low_arch): New function.
2558 * linux-cris-low.c (tdesc_cris): Declare.
2559 (cris_arch_setup): New function.
2560 (cris_usrregs_info, regs_info): New globals.
2561 (cris_regs_info): New function.
2562 (the_low_target): Adjust.
2563 (initialize_low_arch): New function.
2564 * linux-cris-low.c (tdesc_crisv32): Declare.
2565 (cris_arch_setup): New function.
2566 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
2567 (cris_regs_info): New function.
2568 (the_low_target): Adjust.
2569 (initialize_low_arch): New function.
2570 * linux-m32r-low.c (tdesc_m32r): Declare.
2571 (m32r_arch_setup): New function.
2572 (m32r_usrregs_info, regs_info): New globals.
2573 (m32r_regs_info): Adjust.
2574 (initialize_low_arch): New function.
2575 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
2576 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
2577 (tic6x_usrregs_info): Forward declare.
2578 (tic6x_read_description): New function, based on ...
2579 (tic6x_arch_setup): ... this. Reimplement.
2580 (target_regsets): Rename to ...
2581 (tic6x_regsets): ... this, and make static.
2582 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
2583 (tic6x_regs_info): New function.
2584 (the_low_target): Adjust.
2585 (initialize_low_arch): New function.
2586 * linux-xtensa-low.c (tdesc_xtensa): Declare.
2587 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
2588 (target_regsets): Rename to ...
2589 (xtensa_regsets): ... this, and make static.
2590 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
2591 globals.
2592 (xtensa_arch_setup, xtensa_regs_info): New functions.
2593 (the_low_target): Adjust.
2594 (initialize_low_arch): New function.
2595 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
2596 (nios2_arch_setup): Set the current process'es tdesc.
2597 (target_regsets): Rename to ...
2598 (nios2_regsets): ... this.
2599 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
2600 (nios2_regs_info): New function.
2601 (the_low_target): Adjust.
2602 (initialize_low_arch): New function.
a261b8f5
PA
2603 * linux-aarch64-low.c (tdesc_aarch64): Declare.
2604 (aarch64_arch_setup): Set the current process'es tdesc.
2605 (target_regsets): Rename to ...
2606 (aarch64_regsets): ... this.
2607 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
2608 (aarch64_regs_info): New function.
2609 (the_low_target): Adjust.
2610 (initialize_low_arch): New function.
3aee8918
PA
2611 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
2612 globals.
2613 (target_regsets): Rename to ...
2614 (tile_regsets): ... this.
2615 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
2616 (tile_regs_info): New function.
2617 (tile_arch_setup): Set the current process'es tdesc.
2618 (the_low_target): Adjust.
2619 (initialize_low_arch): New function.
2620 * spu-low.c (tdesc_spu): Declare.
2621 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
2622 * win32-arm-low.c (tdesc_arm): Declare.
2623 (arm_arch_setup): New function.
2624 (the_low_target): Install arm_arch_setup instead of
2625 init_registers_arm.
2626 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
2627 (init_windows_x86): Rename to ...
2628 (i386_arch_setup): ... this. Set `win32_tdesc'.
2629 (the_low_target): Adjust.
2630 * win32-low.c (win32_tdesc): New global.
2631 (child_add_thread): Don't create the thread cache here.
2632 (do_initial_child_stuff): Set the new process'es tdesc.
2633 * win32-low.h (struct target_desc): Forward declare.
2634 (win32_tdesc): Declare.
2635 * lynx-i386-low.c (tdesc_i386): Declare global.
2636 (lynx_i386_arch_setup): Set `lynx_tdesc'.
2637 * lynx-low.c (lynx_tdesc): New global.
2638 (lynx_add_process): Set the new process'es tdesc.
2639 * lynx-low.h (struct target_desc): Forward declare.
2640 (lynx_tdesc): Declare global.
2641 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
2642 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
2643 * nto-low.c (nto_tdesc): New global.
2644 (do_attach): Set the new process'es tdesc.
2645 * nto-low.h (struct target_desc): Forward declare.
2646 (nto_tdesc): Declare.
2647 * nto-x86-low.c (tdesc_i386): Declare.
2648 (nto_x86_arch_setup): Set `nto_tdesc'.
2649
b1fbec62
GB
26502013-06-04 Gary Benson <gbenson@redhat.com>
2651
2652 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
2653 to qSupported response when appropriate.
2654 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
2655 with nonzero-length annex.
2656 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
2657 arguments supplied in annex.
2658
d1ec4ce7
DE
26592013-05-31 Doug Evans <dje@google.com>
2660
ac44adcb 2661 PR server/15594
d1ec4ce7
DE
2662 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
2663 64 bits in 64-cross-32 environment.
2664
9b25f2d3
PA
26652013-05-28 Pedro Alves <palves@redhat.com>
2666
2667 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
2668 (aarch64-without-fpu.c): Delete rule.
2669 * configure.srv (aarch64*-*-linux*): Remove references to
2670 aarch64-without-fpu.o and aarch64-without-fpu.xml.
2671 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
2672 declaration.
2673
6740dc9c
PA
26742013-05-24 Pedro Alves <palves@redhat.com>
2675
2676 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
2677 instead of strchr/decode_address. Error if the range isn't split
2678 with a ','. Don't assume there's be a ':' in the action.
2679
c2d6af84
PA
26802013-05-23 Yao Qi <yao@codesourcery.com>
2681 Pedro Alves <palves@redhat.com>
2682
2683 * linux-low.c (lwp_in_step_range): New function.
2684 (linux_wait_1): If the thread was range stepping and stopped
2685 outside the stepping range, report the stop to GDB. Otherwise,
2686 continue stepping. Add range stepping debug output.
2687 (linux_set_resume_request): Copy the step range from the resume
2688 request to the lwp.
2689 (linux_supports_range_stepping): New.
2690 (linux_target_ops) <supports_range_stepping>: Set to
2691 linux_supports_range_stepping.
2692 * linux-low.h (struct linux_target_ops)
2693 <supports_range_stepping>: New field.
2694 (struct lwp_info) <step_range_start, step_range_end>: New fields.
2695 * linux-x86-low.c (x86_supports_range_stepping): New.
2696 (the_low_target) <supports_range_stepping>: Set to
2697 x86_supports_range_stepping.
2698 * server.c (handle_v_cont): Handle 'r' action.
2699 (handle_v_requests): Append ";r" if the target supports range
2700 stepping.
2701 * target.h (struct thread_resume) <step_range_start,
2702 step_range_end>: New fields.
2703 (struct target_ops) <supports_range_stepping>:
2704 New field.
2705 (target_supports_range_stepping): New macro.
2706
58794e1a
JB
27072013-05-17 Joel Brobecker <brobecker@adacore.com>
2708
2709 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
2710 confusion in comment.
2711
d631c5a7
JB
27122013-05-17 Joel Brobecker <brobecker@adacore.com>
2713
2714 * lynx-low.c (struct process_info_private): New type.
2715 (lynx_add_process): New function.
2716 (lynx_create_inferior, lynx_attach): Replace calls to
2717 add_process by calls to lynx_add_process.
2718 (lynx_resume): If PTID is null, then try using
2719 current_process()->private->last_wait_event_ptid.
2720 Add comments.
2721 (lynx_clear_inferiors): Delete. The contents of that function
2722 has been inlined in lynx_mourn;
2723 (lynx_wait_1): Save the ptid in the process's private data.
2724 (lynx_mourn): Free the process' private data. Replace call
2725 to lynx_clear_inferiors by call to clear_inferiors.
2726
96f7a20f
YQ
27272013-05-17 Yao Qi <yao@codesourcery.com>
2728
2729 * i386-low.c (i386_length_and_rw_bits): Move the comment to
2730 the right place.
2731
db0dfaa0
LM
27322013-05-16 Luis Machado <lgustavo@codesourcery.com>
2733
2734 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
2735 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
2736 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
2737 PT_TEXT_END_ADDR guards. Update comments.
2738 (linux_target_op) <read_offsets>: Conditionally define to
2739 linux_read_offsets if the target is UCLIBC and if it defines
2740 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
2741
68f5f838
SL
27422013-05-06 Sandra Loosemore <sandra@codesourcery.com>
2743 Andrew Jenner <andrew@codesourcery.com>
2744
2745 * Makefile.in (SFILES): Add linux-nios2-low.c.
2746 (clean): Add action to delete nios2-linux.c.
2747 (nios2-linux.c): New rule.
2748 * configure.srv: Add nios2*-*-linux*.
2749 * linux-nios2-low.c: New.
2750
1ebff1fd
HAQ
27512013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
2752
2753 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
2754
f6150862
HZ
27552013-04-25 Hui Zhu <hui@codesourcery.com>
2756
2757 PR gdb/15186
f6150862
HZ
2758 * ax.c (ax_printf): Add fflush.
2759
614c279d
TT
27602013-04-22 Tom Tromey <tromey@redhat.com>
2761
2762 * Makefile.in (SFILES): Add filestuff.c.
2763 (OBS): Add filestuff.o.
2764 (filestuff.o): New target.
2765 * config.in, configure: Rebuild.
2766 * configure.ac: Check for fdwalk, pipe2.
2767
7d4e5717
PA
27682013-04-17 Pedro Alves <palves@redhat.com>
2769
2770 * configure.ac (USE_THREAD_DB): Delete variable.
2771 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
2772 Don't AC_SUBST USE_THREAD_DB.
2773 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
2774 * config.in, configure: Regenerate.
2775
d5c93e41
PA
27762013-04-16 Pedro Alves <palves@redhat.com>
2777
2778 * linux-low.h (struct lwp_info) <thread_known>: Move under
2779 the USE_THREAD_DB #ifdef.
2780
04f5fe89
PA
27812013-04-16 Pedro Alves <palves@redhat.com>
2782
2783 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
2784 (linux-low.o): Delete rule.
2785 * linux-low.h: Always include "gdb_thread_db.h" instead of
2786 conditionally including thread_db.h.
2787 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
2788 HAVE_THREAD_DB_H.
2789
480b27bf
JK
27902013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2791
2792 * Makefile.in (install-only): Fix make install regression.
2793
43662968
JK
27942013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
2795
2796 Convert man pages to texinfo, new gdbinit.5 texinfo page.
2797 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
2798 installation.
2799 * gdbserver.1: Remove.
2800
3e74e146
PA
28012013-03-22 Pedro Alves <palves@redhat.com>
2802
2803 * linux-low.c (handle_extended_wait): Don't call
2804 linux_enable_event_reporting.
2805
a8347a2a
TT
28062013-03-15 Tony Theodore <tonyt@logyst.com>
2807
2808 PR build/9098:
2809 * Makefile.in (SHELL): Use @SHELL@.
2810
eeb56fa7
SDJ
28112013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
2812
2813 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
2814 compiler warning.
2815
4fa7e2ff
JB
28162013-03-13 Joel Brobecker <brobecker@adacore.com>
2817
2818 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
2819 Remove extraneous NULL element.
2820
8ddb1965
YQ
28212013-03-13 Yao Qi <yao@codesourcery.com>
2822
2823 * tracepoint.c (traceframe_read_tsv): Look for the last matched
2824 'V' block in trace frame.
2825
9accd112
MM
28262013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2827
2828 * target.h (struct target_ops): Add btrace ops.
2829 (target_supports_btrace): New macro.
2830 (target_enable_btrace): New macro.
2831 (target_disable_btrace): New macro.
2832 (target_read_btrace): New macro.
2833 * gdbthread.h (struct thread_info): Add btrace field.
2834 * server.c: Include btrace-common.h.
2835 (handle_btrace_general_set): New function.
2836 (handle_btrace_enable): New function.
2837 (handle_btrace_disable): New function.
2838 (handle_general_set): Call handle_btrace_general_set.
2839 (handle_qxfer_btrace): New function.
2840 (struct qxfer qxfer_packets[]): Add btrace entry.
2841 * inferiors.c (remove_thread): Disable btrace.
2842 * linux-low: Include linux-btrace.h.
2843 (linux_low_enable_btrace): New function.
2844 (linux_low_read_btrace): New function.
2845 (linux_target_ops): Add btrace ops.
2846 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
2847 Add srv_linux_btrace=yes.
2848 (x86_64-*-linux*): Add linux-btrace.o.
2849 Add srv_linux_btrace=yes.
2850 * configure.ac: Define HAVE_LINUX_BTRACE.
2851 * config.in: Regenerated.
2852 * configure: Regenerated.
2853
5cc22e4c
MM
28542013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2855
2856 * server.c (handle_qxfer): Preserve error message if -3 is
2857 returned.
2858 (qxfer): Document the -3 return value.
2859
7c97f91e
MM
28602013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2861
2862 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
2863 (linux_btrace_h): New variable.
2864 (linux-btrace.o): New rule.
2865
be9a119c 28662013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
2867 Hafiz Abid Qadeer <abidh@codesourcery.com>
2868
2869 * tracepoint.c (trace_buffer_size): New global.
2870 (DEFAULT_TRACE_BUFFER_SIZE): New define.
2871 (init_trace_buffer): Change to one-argument function. Allocate
2872 trace buffer memory.
2873 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
2874 handle QTBuffer:size packet.
2875 (cmd_bigqtbuffer_size): New function.
2876 (initialize_tracepoint): Call init_trace_buffer with
2877 DEFAULT_TRACE_BUFFER_SIZE.
2878 * server.c (handle_query): Add QTBuffer:size in the
2879 supported packets.
2880
e64f7499
YQ
28812013-03-07 Yao Qi <yao@codesourcery.com>
2882
2883 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
2884 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
2885 of -1.
2886 (cmd_qtsp): Adjust condition. Do post increment.
2887 Set cur_action and cur_step_action back to 0.
2888
f0ae6fc3
PA
28892013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
2890
2891 PR server/15236
2892 * linux-low.c (linux_write_memory): Return early success if LEN is
2893 zero.
2894
b5b0b0af
CV
28952013-03-05 Corinna Vinschen <vinschen@redhat.de>
2896
334ad4a8 2897 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 2898
589bc927
TT
28992013-02-28 Tom Tromey <tromey@redhat.com>
2900
2901 * configure.ac: Invoke AC_SYS_LARGEFILE.
2902 * configure, config.in: Rebuild.
2903
dfe07582
CV
29042013-02-28 Corinna Vinschen <vinschen@redhat.com>
2905
2906 * win32-low.c: Throughout, fix format strings and casts of
2907 printf-like functions to avoid type related warnings on all
2908 platforms.
2909 (get_child_debug_event): Print dwDebugEventCode as hex since
2910 that's how it's usually documented.
2911
736cd585
YQ
29122013-02-28 Yao Qi <yao@codesourcery.com>
2913
2914 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
2915 pulongest.
2916
e1f58301
JW
29172013-02-27 Jiong Wang <jiwang@tilera.com>
2918
2919 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
2920 (reg-tilegx32.c): New rule.
2921 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
2922 * linux-tile-low.c (tile_arch_setup): New function. Invoke
2923 different register info initializer according to elf class.
2924 (init_registers_tilgx32): New function. The tilegx32 register info
2925 initializer.
2926 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
2927 (tile_store_gregset): Likewise.
2928
d171ca78
YQ
29292013-02-27 Yao Qi <yao@codesourcery.com>
2930
2931 * server.c (process_point_options): Print debug message when
2932 debug_threads is true.
2933
282bbdf3
YQ
29342013-02-26 Yao Qi <yao@codesourcery.com>
2935
2936 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
2937
aca22551
PA
29382013-02-19 Pedro Alves <palves@redhat.com>
2939 Kai Tietz <ktietz@redhat.com>
2940
2941 PR gdb/15161
2942
2943 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
2944 instead of strtoul to extract address from packet.
2945 (process_serial_event) <'z'>: Likewise.
2946
4f3cee1c
YQ
29472013-02-18 Yao Qi <yao@codesourcery.com>
2948
2949 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
2950
8e1d55a3
PA
29512013-02-14 Pedro Alves <palves@redhat.com>
2952
2953 Plug memory leak.
2954
2955 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
2956 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
2957
458820da
PA
29582013-02-14 Pedro Alves <palves@redhat.com>
2959
2960 * tracepoint.c (cmd_qtdpsrc): Use savestring.
2961
baea0dae
PA
29622013-02-14 Pedro Alves <palves@redhat.com>
2963
2964 * tracepoint.c (save_string): Delete.
2965 (add_tracepoint_action): Use savestring instead of save_string.
2966
0b1afbb3
PA
29672013-02-12 Pedro Alves <palves@redhat.com>
2968
2969 * linux-xtensa-low.c: Ditto.
2970 * xtensa-xtregs.c: Ditto.
2971
8a4ac37e
PA
29722013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
2973
2974 * thread-db.c (thread_db_get_tls_address): NULL pointer check
2975 thread_db.
2976
148de6bb
MS
29772013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
2978
2979 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
2980 aarch64_num_wp_regs and aarch64_num_bp_regs to
2981 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
2982
55fac6e0
MS
29832013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
2984
2985 * linux-aarch64-low.c (ps_get_thread_area): Replace
2986 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
2987
176eb98c
MS
29882013-02-04 Jim MacArthur <jim.macarthur@arm.com>
2989 Marcus Shawcroft <marcus.shawcroft@arm.com>
2990 Nigel Stephens <nigel.stephens@arm.com>
2991 Yufeng Zhang <yufeng.zhang@arm.com>
2992
2993 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
2994 (aarch64.c, aarch64-without-fpu.c): New targets.
2995 * configure.srv (aarch64*-*-linux*): New.
2996 * linux-aarch64-low.c: New file.
2997
56f7af9c
MS
29982013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
2999
43aaf8b6 3000 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
3001 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3002 (dequeue_one_deferred_signal, linux_resume_one_thread)
3003 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3004 (linux_tracefork_grandchild, linux_test_for_tracefork)
3005 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3006 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3007 where the argument is 0.
3008
60f662b0
YQ
30092013-01-25 Yao Qi <yao@codesourcery.com>
3010
3011 * event-loop.c: Include "queue.h".
3012 (gdb_event_p): New typedef.
3013 (struct gdb_event) <next_event>: Remove.
3014 (event_queue): Change to QUEUE(gdb_event_p).
3015 (async_queue_event): Remove.
3016 (gdb_event_xfree): New.
3017 (initialize_event_loop): New.
3018 (process_event): Use API from QUEUE.
3019 (wait_for_event): Likewise.
3020 * server.c (main): Call initialize_event_loop.
3021 * server.h (initialize_event_loop): Declare.
3022
5ae4861a
YQ
30232013-01-18 Yao Qi <yao@codesourcery.com>
3024
3025 * ax.h (struct eval_agent_expr_context): New.
3026 (gdb_eval_agent_expr): Update declaration.
3027 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
3028 TFRAME. Add new argument CTX.
3029 * server.h (struct eval_agent_expr_context): Declare.
3030 (agent_mem_read, agent_tsv_read): Update declaration.
3031 (agent_mem_read_string): Likewise.
3032 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
3033 (add_traceframe_block): Add new argument TPOINT.
3034 Increase TPOINT->traceframe_usage.
3035 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
3036 eval_tracepoint_agent_expr.
3037 (condition_true_at_tracepoint): Likewise.
3038 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
3039 (agent_mem_read_string, agent_tsv_read): Likewise.
3040
85e00e85
YQ
30412013-01-16 Yao Qi <yao@codesourcery.com>
3042
3043 * linux-low.c (linux_resume_one_lwp): Don't check
3044 'lwp->bp_reinsert != 0'.
3045
4039cf45
JB
30462013-01-07 Joel Brobecker <brobecker@adacore.com>
3047 Pedro Alves <palves@redhat.com>
3048
3049 * lynx-low.c (ptrace_request_to_str): Define a temporary
3050 macro and use it to simplify this function's implementation.
3051
9044dee2
JB
30522013-01-07 Joel Brobecker <brobecker@adacore.com>
3053
3054 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
3055 sets errno.
3056
e6352c8f
JB
30572013-01-07 Joel Brobecker <brobecker@adacore.com>
3058
3059 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
3060
50681a27
JB
30612013-01-07 Joel Brobecker <brobecker@adacore.com>
3062
3063 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
3064
3f6e77ef
JB
30652013-01-07 Joel Brobecker <brobecker@adacore.com>
3066
3067 * lynx-low.c (lynx_resume): Use the resume_info parameter
3068 to determine the ptid for the lynx_ptrace call, unless
3069 it is equal to minus_one_ptid, in which case we use the
3070 ptid of the current_inferior.
3071 (lynx_wait_1): After having received a thread create/exit
3072 event, resume the inferior's execution using the signaling
3073 thread's ptid, rather than the old ptid.
3074
7fda33ae
JB
30752013-01-07 Joel Brobecker <brobecker@adacore.com>
3076
3077 * lynx-low.c (lynx_resume): Delete variable ret.
3078
b9786c74
JB
30792013-01-01 Joel Brobecker <brobecker@adacore.com>
3080
3081 * gdbreplay.c (gdbreplay_version): Update copyright year.
3082 * server.c (gdbserver_version): Likewise.
3083
8b93d60f
JB
30842012-12-17 Joel Brobecker <brobecker@adacore.com>
3085
3086 * lynx-low.c (lynx_wait_1): Add debug trace before adding
3087 new thread.
3088
037335a7
JB
30892012-12-17 Joel Brobecker <brobecker@adacore.com>
3090
3091 * lynx-low.c (ptrace_request_to_str): Add handling for
3092 PTRACE_GETTRACESIG.
3093
52d4cbd8
JB
30942012-12-17 Joel Brobecker <brobecker@adacore.com>
3095
3096 * lynx-low.c (lynx_attach): Delete variable new_process.
3097
ab8f6ca9
JB
30982012-12-17 Joel Brobecker <brobecker@adacore.com>
3099
3100 * lynx-low.c (lynx_create_inferior): Delete variable
3101 new_process.
3102
78cbc024
JB
31032012-12-17 Joel Brobecker <brobecker@adacore.com>
3104
3105 * lynx-low.c (ptrace_request_to_str): Do not handle
3106 PTRACE_GETTHREADLIST if this macro does not exist.
3107
14a00470
YQ
31082012-12-15 Yao Qi <yao@codesourcery.com>
3109
3110 * Makefile.in (OBS): Add notif.o.
3111 * notif.c, notif.h: New.
3112 * server.c: Include "notif.h".
3113 (struct vstop_notif) <next>: Remove.
3114 <base>: New field.
3115 (queue_stop_reply): Update.
3116 (push_event, send_next_stop_reply): Remove.
3117 (discard_queued_stop_replies): Update.
3118 (notif_stop): New variable.
3119 (handle_v_stopped): Remove.
3120 (handle_v_requests): Don't call handle_v_stopped. Call
3121 handle_ack_notif instead.
3122 (queue_stop_reply_callback): Call notif_event_enque instead
3123 of queue_stop_reply.
3124 (handle_status): Don't call send_next_stop_reply, call
3125 notif_write_event instead.
3126 (kill_inferior_callback): Likewise.
3127 (detach_or_kill_inferior_callback): Likewise.
3128 (main): Call initialize_notif.
3129 (process_serial_event): Call QUEUE_is_empty.
3130 (handle_target_event): Call notif_push instead of push event.
3131 * server.h (push_event): Remove declaration.
3132
61c125b9
TT
31332012-12-10 Tom Tromey <tromey@redhat.com>
3134
3135 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
3136 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
3137 macros.
3138 (.c.o): Rewrite.
3139 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
3140 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
3141 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
3142 (amd64-linux-ipa.o, ax.o): Rewrite.
3143 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
3144 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
3145 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
3146 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
3147 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
3148 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
3149 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
3150 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
3151 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
3152 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
3153 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
3154 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
3155 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
3156 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
3157 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
3158 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
3159 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
3160 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
3161 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
3162 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
3163 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
3164 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
3165 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
3166 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
3167 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
3168 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
3169 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
3170 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
3171 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
3172 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
3173 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
3174 (reg-tilegx.o): Remove.
3175 (all_object_files): New macro.
3176 Include .deps files.
3177 * aclocal.m4, configure: Rebuild.
3178 * acinclude.m4: Include depstand.m4, lead-dot.m4.
3179 * configure.ac: Invoke ZW_CREATE_DEPDIR,
3180 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
3181
e90e9ad9
TT
31822012-12-05 Tom Tromey <tromey@redhat.com>
3183
3184 PR gdb/14917:
3185 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
3186
02d403bf 31872012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
3188
3189 * configure.ac: Check for linux/perf_event.h.
3190 * config.in: Regenerated.
3191 * configure: Regenerated.
3192
0270a750
PA
31932012-11-26 Maxime Villard <rustyBSD@gmx.fr>
3194
3195 * hostio.c (handle_readlink): Decrease buffer size
3196 parameter passed to readlink by one byte.
3197
8c29b58e
YQ
31982012-11-26 Yao Qi <yao@codesourcery.com>
3199
3200 * configure.ac (build_warnings): Append '-Wempty-body'.
3201 * configure: Regenerated.
3202 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
3203 body.
3204
8bdce1ff
PM
32052012-11-15 Pierre Muller <muller@sourceware.org>
3206
3207 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
3208 * config.in: Regenerate.
3209 * configure: Regenerate.
3210 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
3211 Use "gdb_wait.h" header instead of <sys/wait.h> header.
3212 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3213 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
3214 header.
3215 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
3216 instead of <sys/wait.h> header.
3217 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3218
02d403bf 32192012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
3220
3221 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
3222 (various make rules): Remove -DGDBSERVER
3223
fbd5db48
YQ
32242012-11-09 Yao Qi <yao@codesourcery.com>
3225
3226 * spu-low.c (current_ptid): Move it to ..
3227 * gdbthread.h: ... here. New.
3228 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
3229 * server.c (myresume, process_serial_event): Likewise.
3230 * thread-db.c (thread_db_find_new_threads): Likewise.
3231 * tracepoint.c (run_inferior_command): Likewise.
3232
b3dc46ff
AB
32332012-10-01 Andrew Burgess <aburgess@broadcom.com>
3234
3235 * server.c (handle_search_memory_1): Include access length in
3236 warning message.
3237
07c04788
HPN
32382012-09-05 Michael Brandt <michael.brandt@axis.com>
3239
3240 * linux-crisv32-low.c: Fix compile errors.
3241
918d227b
YQ
32422012-09-04 Yao Qi <yao@codesourcery.com>
3243
3244 * tracepoint.c (cmd_qtsv): Adjust debug message.
3245 Don't check CUR_TPOINT.
3246
18c1b81a
YQ
32472012-08-28 Yao Qi <yao@codesourcery.com>
3248
3249 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
3250 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
3251 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
3252 Remove declarations of xmalloc, xreallloc, xstrdup and
3253 freeargv.
3254 * Makefile.in (libiberty_h): New.
3255 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
3256 (linux-bfin-low.o): Append dependency 'libiberty.h'.
3257
dc82f37b
YQ
32582012-08-23 Yao Qi <yao@codesourcery.com>
3259
3260 * server.h: Remove declaration of 'xsnprintf'.
3261
406b1477
KS
32622012-08-22 Keith Seitz <keiths@redhat.com>
3263
3264 * server.h: Include build-gnulib-gbserver/config.h.
3265 * gdbreplay.c: Likewise.
3266
e6712ff1
DE
32672012-08-08 Doug Evans <dje@google.com>
3268
3269 * Makefile.in (SFILES): Add gdb_vecs.c.
3270 (OBS): Add gdb_vecs.o.
3271 (gdb_vecs_h, host_defs_h): New variables.
3272 (thread-db.o): Add $(gdb_vecs_h) dependency.
3273 (gdb_vecs.o): New rule.
3274 * thread-db.c: #include "gdb_vecs.h".
3275 (thread_db_load_search): Use a vector to iterate over path elements.
3276 Handle text appearing after "$pdir".
3277
3278 * configure.ac: Add check for strstr.
3279 * config.in: Regenerate.
3280 * configure: Regenerate.
3281
7c3270ae
UW
32822012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
3283
3284 * hostio.c (handle_pread): If pread fails, fall back to attempting
3285 lseek/read.
3286 (handle_pwrite): Likewise for pwrite.
3287
b62e2b27
UW
32882012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
3289
3290 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
3291 between unsupported TYPE and unimplementable ADDR/LEN combination.
3292 (arm_insert_point): Act on new return value.
3293
78a99e91
PA
32942012-07-31 Pedro Alves <palves@redhat.com>
3295
3296 * server.c (process_point_options): Only skip tokens if we find
3297 one that is unrecognized. Don't treat 'X' specially while
3298 skipping unrecognized tokens.
3299
fcf303ab
UW
33002012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
3301
3302 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
3303 to 4-byte-align HW breakpoint addresses for Thumb.
3304
7255706c
YQ
33052012-07-27 Yao Qi <yao@codesourcery.com>
3306
3307 PR remote/14161.
3308
3309 * server.h: Declare gdb_agent_about_to_close.
3310 * target.c (kill_inferior): Include "agent.h".
3311 New. Send command 'kill'.
3312 * target.h (kill_inferior): Removed macro.
3313 * tracepoint.c (gdb_agent_about_to_close): New.
3314 (gdb_agent_helper_thread): Handle command 'close'.
3315 Wait endlessly until the inferior stops.
3316 Install gdb_agent_remove_socket to atexit hook.
3317 (agent_socket_name): New static variable.
3318 (gdb_agent_socket_init): Replace local variable 'name' with
3319 'agent_socket_name'.
3320 (gdb_agent_remove_socket): New.
3321
5a3f286f
YQ
33222012-07-27 Yao Qi <yao@codesourcery.com>
3323
3324 * server.c (process_point_options): Stop at 'X' when parsing.
3325
961bd387
ME
33262012-07-19 Michael Eager <eager@eagercon.com>
3327
a261b8f5 3328 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
3329 to hw_execute.
3330 * linux-x86-low.c (x86_insert_point, x86_remove_point):
3331 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
3332 hardware breakpoint.
3333
aa7c7447
JK
33342012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3335
3336 * gdbserver/linux-low.c (initialize_low): Call
3337 linux_ptrace_init_warnings.
3338
7f216e7c
DE
33392012-07-02 Doug Evans <dje@google.com>
3340
3341 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
3342 pointer to int.
3343
d3ce09f5
SS
33442012-07-02 Stan Shebs <stan@codesourcery.com>
3345
3346 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
3347 (ax.o): Add it to build rule.
3348 (ax-ipa.o): Ditto.
3349 (OBS): Add format.o.
3350 (IPA_OBS): Add format.o.
3351 * server.c (handle_query): Claim support for breakpoint commands.
3352 (process_point_options): Add command case.
3353 (process_serial_event): Leave running if there are printfs in
3354 effect.
3355 * mem-break.h (any_persistent_commands): Declare.
3356 (add_breakpoint_commands): Declare.
3357 (gdb_no_commands_at_breakpoint): Declare.
3358 (run_breakpoint_commands): Declare.
3359 * mem-break.c (struct point_command_list): New struct.
3360 (struct breakpoint): New field command_list.
3361 (any_persistent_commands): New function.
3362 (add_commands_to_breakpoint): New function.
3363 (add_breakpoint_commands): New function.
3364 (gdb_no_commands_at_breakpoint): New function.
3365 (run_breakpoint_commands): New function.
3366 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
3367 locally.
3368 * ax.c: Include format.h.
3369 (ax_printf): New function.
3370 (gdb_eval_agent_expr): Add printf opcode.
3371
2f8f6aed
YQ
33722012-06-13 Yao Qi <yao@codesourcery.com>
3373
3374 * server.c (start_inferior): Remove duplicated writes to fields
3375 'last_resume_kind' and 'last_status' of 'current_inferior'.
3376
0c9070b3
YQ
33772012-06-12 Yao Qi <yao@codesourcery.com>
3378 Pedro Alves <palves@redhat.com>
3379
3380 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
3381 comment.
3382 * server.c (handle_v_cont): Extend comment.
3383
c52daf70
YQ
33842012-06-11 Yao Qi <yao@codesourcery.com>
3385
3386 * linux-low.c (linux_attach): Add 'static'.
3387
d38bbb0a
YQ
33882012-06-06 Yao Qi <yao@codesourcery.com>
3389
3390 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
3391
89dc0afd
JK
33922012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
3393
3394 Fix gcc -flto compilation warning.
3395 * server.c (main): Make variable multi_mode and attach volatile.
3396
75f62ce7
TJB
33972012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3398
3399 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
3400 if the platform doesn't know about it.
3401
65f479b6
PA
34022012-05-30 Jeff Kenton <jkenton@tilera.com>
3403
3404 * Makefile.in (SFILES): Add linux-tile-low.c.
3405 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
3406 * configure.srv: Handle tilegx-*-linux*.
3407 * linux-tile-low.c: New file.
3408
0c5bf5a9
JK
34092012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3410
3411 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
3412
a493e3e2
PA
34132012-05-24 Pedro Alves <palves@redhat.com>
3414
3415 PR gdb/7205
3416
43aaf8b6 3417 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 3418
2ea28649
PA
34192012-05-24 Pedro Alves <palves@redhat.com>
3420
3421 PR gdb/7205
3422
3423 Replace target_signal with gdb_signal throughout.
3424
8d409d16
MR
34252012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
3426
3427 * linux-low.c (linux_store_registers): Avoid the copying sequence
3428 when no data has been retrieved by ptrace.
3429
23512c01
MGD
34302012-05-22 Will Deacon <will.deacon@arm.com>
3431
3432 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
3433 Include asm/ptrace.h.
3434 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
3435 already defined.
3436
4934b29e
MR
34372012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
3438
3439 * linux-low.c (linux_store_registers): Don't re-retrieve data
3440 with ptrace that has already been obtained from /proc. Always
3441 copy any data retrieved with ptrace to the buffer supplied.
3442
bde24c0a
PA
34432012-05-11 Yao Qi <yao@codesourcery.com>
3444 Pedro Alves <palves@redhat.com>
3445
3446 * linux-low.c (enum stopping_threads_kind): New.
3447 (stopping_threads): Change type to `enum stopping_threads_kind'.
3448 (handle_extended_wait): If stopping and suspending threads, leave
3449 the new_lwp suspended too.
3450 (linux_wait_for_event): Adjust.
3451 (stop_all_lwps): Set `stopping_threads' to
3452 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
3453 whether we're suspending threads or just stopping them. Assert no
3454 recursion happens.
3455
623b6bdf
YQ
34562012-04-29 Yao Qi <yao@codesourcery.com>
3457
3458 * server.h: Move some code to ...
3459 * gdbthread.h: ... here. New.
3460 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
3461 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
3462 (nto-low.o, win32-low.o): Likewise.
3463 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
3464 * regcache.c, remote-utils.c, server.c: Likewise.
3465 * target.c, tracepoint.c, win32-low.c: Likewise.
3466
f15f9948
TJB
34672012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3468
3469 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
3470 (PTRACE_ARG4_TYPE): Likewise.
3471 (PTRACE_XFER_TYPE): Likewise.
3472 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
3473 ptrace to PTRACE_ARG3_TYPE.
3474 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
3475 (PTRACE_ARG4_TYPE): Likewise.
3476 (PTRACE_XFER_TYPE): Likewise.
3477 (linux_detach_one_lwp): Cast fourth argument of
3478 ptrace to long then PTRACE_ARG4_TYPE.
3479 (regsets_fetch_inferior_registers): Cast third argument of
3480 ptrace to long then PTRACE_ARG3_TYPE.
3481 (regsets_store_inferior_registers): Likewise.
3482
38ea300a
PA
34832012-04-20 Pedro Alves <palves@redhat.com>
3484
3485 * configure: Regenerate.
3486
c971b7fa
PA
34872012-04-19 Pedro Alves <palves@redhat.com>
3488
43aaf8b6 3489 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 3490 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
3491 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
3492 (all, install-only, uninstall, clean-info, all-lib, clean): No
3493 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
3494 (maintainer-clean realclean distclean): Use subdir_do.
3495 (subdir_do): New.
3496 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 3497 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
3498 * acinclude.m4: Include acx_configure_dir.m4.
3499 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
3500 calls. Call AC_PROG_RANLIB. Configure gnulib using
3501 ACX_CONFIGURE_DIR.
3502 (GNULIB): New.
3503 (GNULIB_STDINT_H): Adjust.
3504 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
3505 * gdbreplay.c: Include build-gnulib/config.h.
3506 * server.h: Likewise.
3507 * aclocal.m4: Regenerate.
3508 * config.in: Regenerate.
3509 * configure: Regenerate.
c971b7fa 3510
809277f8
PA
35112012-04-19 Pedro Alves <palves@redhat.com>
3512
3513 * Makefile.in (LIBGNU, INCGNU): Adjust.
3514 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
3515 (all, install-only, uninstall, clean-info, all-lib, clean)
3516 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
3517 * configure.ac: Adjust AC_OUTPUT output.
3518 * aclocal.m4: Regenerate.
3519 * configure: Regenerate.
3520
fd9bb8b8
PA
35212012-04-19 Pedro Alves <palves@redhat.com>
3522
3523 * Makefile.in (generated_files): New.
3524 (server_h): Remove the explicit dependency on config.h, and depend
3525 on $generated_files.
3526
1c298c66
PA
35272012-04-19 Pedro Alves <palves@redhat.com>
3528
3529 * Makefile.in (INCGNU): Add -Ignulib.
3530
57c4b50b
PA
35312012-04-19 Pedro Alves <palves@redhat.com>
3532
3533 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
3534 (INCGNU): ... this, and spell out -I here.
3535 (GNULIB_LIB): Rename to ...
3536 (LIBGNU): ... this.
3537 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
3538
1030e047
PA
35392012-04-19 Pedro Alves <palves@redhat.com>
3540
3541 * config.in: Regenerate.
3542
447d4319
PA
35432012-04-19 Pedro Alves <palves@redhat.com>
3544
3545 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
3546 * server.h (memmem): Remove declaration.
3547 * config.in: Regenerate.
3548 * configure: Regenerate.
3549
aad9eab9
YQ
35502012-04-19 Yao Qi <yao@codesourcery.com>
3551
3552 * Makefile.in (SFILES): Add common/vec.c.
3553 (OBS): Add vec.o.
3554 (vec.o): New rule.
3555
3e10640f
YQ
35562012-04-19 Yao Qi <yao@codesourcery.com>
3557
3558 * remote-utils.c (prepare_resume_reply): Replace with macro
3559 target_core_of_thread.
3560 * server.c (handle_qxfer_threads_proper): Likewise.
3561 * target.h (traget_core_of_thread): New macro.
3562
71622373
PA
35632012-04-18 Pedro Alves <palves@redhat.com>
3564
3565 * aclocal.m4: Regenerate.
3566 * configure: Regenerate.
3567
80d26939
YQ
35682012-04-16 Yao Qi <yao@codesourcery.com>
3569
3570 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
3571 duplicated on address.
3572
42476b70
YQ
35732012-04-16 Yao Qi <yao@codesourcery.com>
3574
3575 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
3576 (struct tracepoint_action_ops) <send>: New field.
3577 (m_tracepoint_action_send, r_tracepoint_action_send): New.
3578 (agent_expr_send, x_tracepoint_action_send): New.
3579 (l_tracepoint_action_send): New.
3580 (cmd_qtdp): Download and install tracepoint
3581 according to `use_agent'.
3582 (run_inferior_command): Add one more parameter `len'.
3583 Update callers.
3584 (tracepoint_send_agent): New.
3585 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
3586
7bc83639
YQ
35872012-04-16 Yao Qi <yao@codesourcery.com>
3588
3589 * tracepoint.c (download_tracepoints): Moved to ...
3590 (cmd_qtstart): ... here.
3591
5f18041e
YQ
35922012-04-14 Yao Qi <yao@codesourcery.com>
3593
3594 * tracepoint.c: Include inttypes.h.
3595 (struct collect_memory_action): Use sized types.
3596 (struct tracepoint): Likewise.
3597 (cmd_qtdp, stop_tracing): Update print specifiers.
3598 (cmd_qtp, response_tracepoint): Likewise.
3599 (collect_data_at_tracepoint): Likewise.
3600 (collect_data_at_step): Likewise.
3601
55a8c076
YQ
36022012-04-14 Yao Qi <yao@codesourcery.com>
3603
3604 Import gnulib module inttypes.
3605 * aclocal.m4, config.in, configure: Regenerated.
3606
dc750257
YQ
36072012-04-14 Yao Qi <yao@codesourcery.com>
3608
3609 * Makefile.in (maintainer-clean, realclean, distclean): Remove
3610 Makefile and config.status at last.
3611
0ab5faf9
YQ
36122012-04-13 Yao Qi <yao@codesourcery.com>
3613
3614 * tracepoint.c: Include stdint.h unconditionally.
3615
18f5fd81
TJB
36162012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3617
3618 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
3619 on BFD_HAVE_SYS_PROCFS_TYPE.
3620 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
3621 * configure: Regenerate.
3622 * config.in: Likewise.
3623
4d47af5c
L
36242012-04-13 H.J. Lu <hongjiu.lu@intel.com>
3625
3626 * Makefile.in (clean): Also remove x32.c x32-linux.c
3627 x32-avx.c x32-avx-linux.c.
3628 (x32.o): New target.
3629 (x32.c): Likewise.
3630 (x32-linux.o): Likewise.
3631 (x32-linux.c): Likewise.
3632 (x32-avx.o): Likewise.
3633 (x32-avx.c): Likewise.
3634 (x32-avx-linux.o): Likewise.
3635 (x32-avx-linux.c): Likewise.
3636
3637 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
3638 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
3639 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
3640 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
3641 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
3642 i386/x32-avx-linux.xml.
3643
3644 * linux-x86-low.c (init_registers_x32_linux): New prototype.
3645 (init_registers_x32_avx_linux): Likwise.
3646 (x86_linux_update_xmltarget): Call init_registers_x32_linux
3647 or init_registers_x32_avx_linux if linux_is_elf64 is false.
3648
ecedbe58
PA
36492012-04-13 Pedro Alves <palves@redhat.com>
3650
3651 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
3652 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
3653 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
3654 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
3655 the sub-make.
3656
c92b5177
L
36572012-04-12 H.J. Lu <hongjiu.lu@intel.com>
3658
3659 * linux-x86-low.c (compat_x32_clock_t): New.
3660 (compat_x32_siginfo_t): Likewise.
3661 (compat_x32_siginfo_from_siginfo): Likewise.
3662 (siginfo_from_compat_x32_siginfo): Likewise.
3663 (linux_is_elf64): Likewise.
3664 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
3665 and siginfo_from_compat_x32_siginfo for x32.
3666 (x86_arch_setup): Set linux_is_elf64.
3667
214d508e
L
36682012-04-12 H.J. Lu <hongjiu.lu@intel.com>
3669
3670 PR gdb/13969
3671 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
3672 e_machine field.
3673 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
3674 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
3675 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
3676 compatible with process.
3677
c9a1864a
YQ
36782012-04-12 Yao Qi <yao@codesourcery.com>
3679
3680 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
3681 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
3682 (install-only, install-info, clean): Handle sub dir gnulib.
3683 (all-lib, am--refresh): New targets.
3684 (memmem.o): Remove target.
3685 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
3686 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
3687 (AC_REPLACE_FUNCS): Remove memmem.
3688 Invoke gl_INIT and AM_INIT_AUTOMAKE.
3689 (AC_OUTPUT): Generate Makefile in gnulib/.
3690 * aclocal.m4, config.in, configure: Regenerated.
3691
367ba2c2
MR
36922012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
3693
3694 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
3695
9d236627
PA
36962012-04-05 Pedro Alves <palves@redhat.com>
3697
3698 -Werror=strict-aliasing
3699
3700 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
3701 pointer.
3702
111217b3
PA
37032012-04-04 Pedro Alves <palves@redhat.com>
3704
3705 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
3706 (sparc_store_gregset_from_stack, sparc_store_gregset)
3707 (sparc_breakpoint_at): Fix formatting.
3708
8365dcf5
TJB
37092012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3710
3711 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
3712 are available.
3713 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
3714 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
3715 * config.in: Regenerate.
3716 * configure: Likewise.
3717
689cc2ae
PA
37182012-03-29 Pedro Alves <palves@redhat.com>
3719
3720 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
3721 Correct ptrace arguments.
3722
c14dfd32
PA
37232012-03-28 Pedro Alves <palves@redhat.com>
3724
3725 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
3726 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
3727 (IA64_FR1_REGNUM): New defines.
3728 (ia64_fetch_register): New.
3729 (the_low_target): Install it.
3730 * linux-low.h (struct linux_target_ops) <fetch_register>: New
3731 field.
3732 * linux-low.c (linux_fetch_registers): Try the
3733 the_low_target.fetch_register hook first.
3734
3735 * linux-arm-low.c (the_low_target): Adjust.
3736 * linux-bfin-low.c (the_low_target): Adjust.
3737 * linux-cris-low.c (the_low_target): Adjust.
3738 * linux-crisv32-low.c (the_low_target): Adjust.
3739 * linux-m32r-low.c (the_low_target): Adjust.
3740 * linux-m68k-low.c (the_low_target): Adjust.
3741 * linux-mips-low.c (the_low_target): Adjust.
3742 * linux-ppc-low.c (the_low_target): Adjust.
3743 * linux-s390-low.c (the_low_target): Adjust.
3744 * linux-sh-low.c (the_low_target): Adjust.
3745 * linux-sparc-low.c (the_low_target): Adjust.
3746 * linux-tic6x-low.c (the_low_target): Adjust.
3747 * linux-x86-low.c (the_low_target): Adjust.
3748 * linux-xtensa-low.c (the_low_target): Adjust.
3749
63c88e13
PA
37502012-03-26 Pedro Alves <palves@redhat.com>
3751
3752 * server.c (handle_qxfer_libraries): Don't bail early if
3753 the_target->qxfer_libraries_svr4 is not NULL.
3754
fb723180
PA
37552012-03-26 Pedro Alves <palves@redhat.com>
3756
3757 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
3758
0afae3cf
PA
37592012-03-23 Pedro Alves <palves@redhat.com>
3760
3761 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
3762 "library-list-svr4" element's start tag when the the DSO list is
3763 empty.
3764
485f1ee4
PA
37652012-03-23 Pedro Alves <palves@redhat.com>
3766
3767 * linux-low.c (read_one_ptr): Read the inferior's pointer through
3768 a variable whose type size is the same as the inferior's pointer
3769 size.
3770
a5362b9a
TS
37712012-03-21 Thomas Schwinge <thomas@codesourcery.com>
3772
3773 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
3774 struct siginfo.
3775 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
3776 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3777 * linux-low.h: Include <signal.h>.
3778 (struct siginfo): Remove forward declaration.
3779 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
3780 struct siginfo.
3781
d226c142
MF
37822012-03-21 Mike Frysinger <vapier@gentoo.org>
3783
3784 * .gitignore: Ignore more files.
3785
122f36ef
PA
37862012-03-19 Pedro Alves <palves@redhat.com>
3787 Jan Kratochvil <jan.kratochvil@redhat.com>
3788
3789 * server.c (cont_thread, general_thread): Add describing comments.
3790 (start_inferior): Clear `cont_thread'.
3791 (handle_v_cont): Don't set `cont_thread' if resuming all threads
3792 of a process.
3793
fc3e5175
YQ
37942012-03-15 Yao Qi <yao@codesourcery.com>
3795
3796 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
3797 handling to ...
3798 (cmd_qtdp): ... here.
3799
8d0d92cd
YQ
38002012-03-15 Yao Qi <yao@codesourcery.com>
3801
3802 * tracepoint.c (struct tracepoint_action_ops): New.
3803 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
3804 (m_tracepoint_action_download): New.
3805 (r_tracepoint_action_download): New.
3806 (x_tracepoint_action_download): New.
3807 (l_tracepoint_action_download): New.
3808 (add_tracepoint_action): Install `action->ops' according type.
3809 (download_tracepoint_1): Move code `download' function pointer
3810 of various tracepoint_action_ops.
3811
87b0bb13
JK
38122012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
3813
3814 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
3815 linux_ptrace_attach_warnings.
3816
5f572dec
JK
38172012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
3818
3819 * Makefile.in (linux-ptrace.o): New.
3820 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
3821 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
3822 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
3823 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
3824 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
3825 of these targets.
3826 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
3827
f4647387
YQ
38282012-03-08 Yao Qi <yao@codesourcery.com>
3829 Pedro Alves <palves@redhat.com>
3830
3831 Fix PR server/13392.
3832 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
3833 offset of JMP insn.
3834 * tracepoint.c (remove_tracepoint): New.
3835 (cmd_qtdp): Call remove_tracepoint when failed to install.
3836
9b224c5e
PA
38372012-03-07 Pedro Alves <palves@redhat.com>
3838
3839 * linux-low.c (get_detach_signal): New.
3840 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
3841 Pass on pending signals to PTRACE_DETACH. Check the result of the
3842 ptrace call.
3843 * server.c (program_signals, program_signals_p): New.
3844 (handle_general_set): Handle QProgramSignals.
3845 * server.h (program_signals, program_signals_p): Declare.
3846
e237a7e2
JK
38472012-03-05 Pedro Alves <palves@redhat.com>
3848 Jan Kratochvil <jan.kratochvil@redhat.com>
3849
3850 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
3851 New comment why.
3852
5808517f
YQ
38532012-03-03 Yao Qi <yao@codesourcery.com>
3854
3855 * tracepoint.c (tracepoint_look_up_symbols): Update call to
3856 agent_look_up_symbols.
3857
58b4daa5
YQ
38582012-03-03 Yao Qi <yao@codesourcery.com>
3859
3860 * Makefile.in (linux-low.o): Keep dependence on agent.h.
3861 (linux-x86-low.o): Likewise.
3862 * server.h: Remove in_process_agent_loaded.
3863 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
3864 common/agent.c.
3865 Update callers.
3866
8ffcbaaf
YQ
38672012-03-03 Yao Qi <yao@codesourcery.com>
3868
3869 * tracepoint.c (gdb_agent_capability): New global.
3870 (in_process_agent_loaded_ust): Renamed to
3871 `in_process_agent_supports_ust'.
3872 Update callers.
3873 (in_process_agent_supports_ust): Call agent_capability_check.
3874 (clear_installed_tracepoints): Assert that agent supports
3875 agent.
3876
d1feda86
YQ
38772012-03-03 Yao Qi <yao@codesourcery.com>
3878
3879 * linux-low.c (linux_supports_agent): New.
3880 (linux_target_ops): Initialize field `supports_agent' with
3881 linux_supports_agent.
3882 * target.h (struct target_ops) <supports_agent>: New.
3883 (target_supports_agent): New macro.
3884 * server.c (handle_general_set): Handle packet 'QAgent'.
3885 (handle_query): Send `QAgent+'.
3886 * Makefile.in (server.o): Depends on agent.h.
3887
2fa291ac
YQ
38882012-03-03 Yao Qi <yao@codesourcery.com>
3889
3890 * Makefile.in (OBS): Add agent.o.
3891 Add new rule for agent.o.
3892 Track dependence of tracepoint.c on agent.h.
3893 * tracepoint.c (run_inferior_command_1):
3894 (run_inferior_command): Call agent_run_command.
3895 (gdb_ust_connect_sync_socket): Deleted. Move it to
3896 common/agent.c.
3897 (resume_thread, stop_thread): Likewise.
3898 (gdb_ust_socket_init): Renamed to ...
3899 (gdb_agent_socket_init): ... New.
3900 (gdb_ust_thread): Renamed to ...
3901 (gdb_agent_helper_thread): ... New.
3902 (gdb_ust_init): Move some code to ...
3903 (gdb_agent_init): ... here. New.
3904 [HAVE_UST]: Call gdb_ust_init.
3905 (initialize_tracepoint_ftlib): Call gdb_agent_init.
3906 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
3907 * config.in, configure: Regenerated.
3908
05044653
PA
39092012-03-02 Pedro Alves <palves@redhat.com>
3910
3911 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
3912 * linux-low.c (struct simple_pid_list): New.
3913 (stopped_pids): New a struct simple_pid_list pointer.
3914 (add_to_pid_list, pull_pid_from_list): New.
3915 (handle_extended_wait): Don't assume the first signal new children
3916 report is SIGSTOP. Adjust call to pull_pid_from_list.
3917 (linux_wait_for_lwp): Adjust.
3918
8d00225b
YQ
39192012-03-02 Yao Qi <yao@codesourcery.com>
3920
3921 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
3922 debug log.
3923
19560ba5
YQ
39242012-03-02 Yao Qi <yao@codesourcery.com>
3925
3926 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
3927 `stop_pc' and `tpoint'. Update caller.
3928
1faeff08
MR
39292012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
3930
3931 * linux-low.h (linux_target_ops): Add regset_bitmap member.
3932 * linux-low.c (use_linux_regsets): New macro.
3933 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
3934 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
3935 (linux_register_in_regsets): New function.
3936 (usr_fetch_inferior_registers): Skip registers covered by
3937 regsets.
3938 (usr_store_inferior_registers): Likewise.
3939 (usr_fetch_inferior_registers): New macro.
3940 (usr_store_inferior_registers): Likewise.
3941 (linux_fetch_registers): Handle mixed regset/non-regset targets.
3942 (linux_store_registers): Likewise.
3943 * linux-mips-low.c (init_registers_mips_dsp_linux): New
3944 prototype.
3945 (init_registers_mips64_dsp_linux): Likewise.
3946 (init_registers_mips_linux): New macro.
3947 (init_registers_mips_dsp_linux): Likewise.
3948 (mips_dsp_num_regs): Likewise.
3949 (DSP_BASE, DSP_CONTROL): New fallback macros.
3950 (mips_base_regs): New macro.
3951 (mips_regmap): Use it. Fix the size.
3952 (mips_dsp_regmap): New variable.
3953 (mips_dsp_regset_bitmap): Likewise.
3954 (mips_arch_setup): New function.
3955 (mips_cannot_fetch_register): Use the_low_target.regmap rather
3956 than mips_regmap.
3957 (mips_cannot_store_register): Likewise.
3958 (the_low_target): Update .arch_setup, .num_regs and .regmap
3959 initializers. Add .regset_bitmap initializer.
3960 * linux-arm-low.c (the_low_target): Add .regset_bitmap
3961 initializer.
3962 * linux-bfin-low.c (the_low_target): Likewise.
3963 * linux-cris-low.c (the_low_target): Likewise.
3964 * linux-crisv32-low.c (the_low_target): Likewise.
3965 * linux-ia64-low.c (the_low_target): Likewise.
3966 * linux-m32r-low.c (the_low_target): Likewise.
3967 * linux-m68k-low.c (the_low_target): Likewise.
3968 * linux-ppc-low.c (the_low_target): Likewise.
3969 * linux-s390-low.c (the_low_target): Likewise.
3970 * linux-sh-low.c (the_low_target): Likewise.
3971 * linux-sparc-low.c (the_low_target): Likewise.
3972 * linux-tic6x-low.c (the_low_target): Likewise.
3973 * linux-x86-low.c (the_low_target): Likewise.
3974 * linux-xtensa-low.c (the_low_target): Likewise.
3975 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
3976 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
3977 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
3978 srv_xmlfiles.
3979 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
3980 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
3981
c03e6ccc
YQ
39822012-02-29 Yao Qi <yao@codesourcery.com>
3983 Pedro Alves <palves@redhat.com>
3984
3985 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
3986 `step_over_finished' is true.
3987
644cebc9
PA
39882012-02-27 Pedro Alves <palves@redhat.com>
3989
3990 * linux-low.c (pid_is_stopped): Delete, moved to common/.
3991 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
3992
c14d7ab2
PA
39932012-02-27 Pedro Alves <palves@redhat.com>
3994
3995 PR server/9684
3996 * linux-low.c (pid_is_stopped): New.
3997 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
3998
412c89dd
LM
39992012-02-25 Luis Machado <lgustavo@codesourcery.com>
4000
4001 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4002 of conditions.
4003
b745defe
MR
40042012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4005
4006 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4007
9f3a5c85
LM
40082012-02-24 Luis Machado <lgustavo@codesourcery>
4009
4010 * server.c (handle_query): Advertise support for target-side
4011 breakpoint condition evaluation.
4012 (process_point_options): New function.
4013 (process_serial_event): When inserting a breakpoint, check for
4014 a target-side condition that should be evaluated.
4015
4016 * mem-break.c: Include regcache.h and ax.h.
4017 (point_cond_list_t): New data structure.
4018 (breakpoint) <cond_list>: New field.
4019 (find_gdb_breakpoint_at): Make non-static.
4020 (delete_gdb_breakpoint_at): Clear any target-side
4021 conditions.
4022 (clear_gdb_breakpoint_conditions): New function.
4023 (add_condition_to_breakpoint): Likewise.
4024 (add_breakpoint_condition): Likewise.
4025 (gdb_condition_true_at_breakpoint): Likewise.
4026 (gdb_breakpoint_here): Return result directly instead
4027 of going through a local variable.
4028
4029 * mem-break.h (find_gdb_breakpoint_at): New prototype.
4030 (clear_gdb_breakpoint_conditions): Likewise.
4031 (add_breakpoint_condition): Likewise.
4032 (gdb_condition_true_at_breakpoint): Likewise.
4033
4034 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
4035 (need_step_over_p): Take target-side breakpoint condition into
4036 consideration.
4037
5e1dc496
LM
40382012-02-24 Luis Machado <lgustavo@codesourcery>
4039
4040 * server.h: Include tracepoint.h.
4041 (agent_mem_read, agent_get_trace_state_variable_value,
4042 agent_set_trace_state_variable_value,
4043 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
4044 get_set_tsv_func_addr): New prototypes.
4045
4046 * ax.h: New include file.
4047 * ax.c: New source file.
4048
4049 * tracepoint.c: Include ax.h.
4050 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
4051 agent_expr, eval_result_type): Move to ax.h.
4052 (parse_agent_expr): Rename to ...
4053 (gdb_parse_agent_expr): ... this, make it non-static and move
4054 to ax.h.
4055 (unparse_agent_expr) Rename to ...
4056 (gdb_unparse_agent_expr): ... this, make it non-static and move
4057 to ax.h.
4058 (eval_agent_expr): Rename to ...
4059 (eval_tracepoint_agent_expr): ... this.
4060 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
4061 forward declarations.
4062 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
4063 (agent_get_trace_state_variable_value): New function.
4064 (agent_set_trace_state_variable_value): New function.
4065 (cmd_qtdp): Call gdb_parse_agent_expr (...).
4066 (response_tracepoint): Call gdb_unparse_agent_expr (...).
4067 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
4068 (condition_true_at_tracepoint): Likewise.
4069 (parse_agent_expr): Rename to ...
4070 (gdb_parse_agent_expr): ... this and move to ax.c.
4071 (unparse_agent_expr): Rename to ...
4072 (gdb_unparse_agent_expr): ... this and move to ax.c.
4073 (gdb_agent_op_name): Move to ax.c.
4074 (eval_agent_expr): Rename to ...
4075 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
4076 and move to ax.c.
4077 (eval_tracepoint_agent_expr): New function.
4078 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 4079 non-static.
5e1dc496
LM
4080 (current_insn_ptr, emit_error, struct bytecode_address): Move to
4081 ax.c.
4082 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
4083 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
4084 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
4085 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
4086 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
4087 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
4088 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
4089 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
4090 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
4091 (compile_bytecodes): Remove forward declaration.
4092 (is_goto_target): Move to ax.c.
4093 (compile_bytecodes): Move to ax.c and call
4094 agent_get_trace_state_variable_value (...) and
4095 agent_set_trace_state_variable_value (...).
4096
4097 * Makefile.in: Update ax.c and IPA dependencies.
4098
277e4e52
PA
40992012-02-24 Pedro Alves <palves@redhat.com>
4100
4101 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
4102 (cmd_bigqtbuffer_circular): ... this. Only handle
4103 'QTBuffer:circular:'.
4104 (handle_tracepoint_general_set): Adjust.
4105
bf4c19f7
YQ
41062012-02-16 Yao Qi <yao@codesourcery.com>
4107
4108 * inferiors.c: Move code to ...
4109 * dll.c: .... here. New.
4110 * server.h: Declare clear_dlls.
4111 * Makefile.in (SFILES): Add dll.c.
4112 (OBS): Add dll.o
4113 (dll.o): New rule.
4114
d73f2619
YQ
41152012-02-11 Yao Qi <yao@codesourcery.com>
4116
4117 * server.c: (handle_monitor_command): Add a new parameter
4118 `own_buf'.
4119 (handle_query): Update caller.
4120
f8255c2a
JB
41212012-02-09 Joel Brobecker <brobecker@adacore.com>
4122
4123 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
4124 * configure, config.in: Regenerate.
4125 * hostio.c: Provide an alternate implementation if HAVE_READLINK
4126 is not defined.
4127
da84f473
PA
41282012-02-02 Pedro Alves <palves@redhat.com>
4129
4130 Try SIGKILL first, then PTRACE_KILL.
4131 * linux-low.c (linux_kill_one_lwp): New.
4132 (linux_kill_one_lwp): Rename to ...
4133 (kill_one_lwp_callback): ... this. Use the new
4134 linux_kill_one_lwp.
4135
e886a173
PA
41362012-02-02 Pedro Alves <palves@redhat.com>
4137
4138 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
4139 inferior.
4140
be07f1a2
PA
41412012-01-27 Pedro Alves <palves@redhat.com>
4142
4143 * linux-low.c (linux_child_pid_to_exec_file): Delete.
4144 (elf_64_file_p): Make static.
4145 (linux_pid_exe_is_elf_64_file): New.
4146 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
4147 Delete declarations.
4148 (linux_pid_exe_is_elf_64_file): Declare.
4149 * linux-x86-low.c (x86_arch_setup): Use
4150 linux_pid_exe_is_elf_64_file.
4151
d8301ad1
JK
41522012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4153
4154 * linux-low.c (linux_wait_for_event_1): Rename to ...
4155 (linux_wait_for_event): ... here and merge it with former
4156 linux_wait_for_event - new variable wait_ptid, use it.
4157 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
4158
01b17894
PA
41592012-01-23 Pedro Alves <palves@redhat.com>
4160
4161 * server.c (main): Avoid yet another case of infinite loop while
4162 detaching/killing after a longjmp.
4163
e825046f
JK
41642012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4165
4166 Code cleanup.
4167 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
4168
b9e7b9c3
UW
41692012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
4170
4171 * hostio.c (handle_readlink): New function.
4172 (handle_vFile): Call it to handle "vFile:readlink" packets.
4173
901f9912
UW
41742012-01-20 Pedro Alves <palves@redhat.com>
4175 Ulrich Weigand <ulrich.weigand@linaro.org>
4176
4177 * server.c (handle_v_requests): Only support vAttach and vRun to
4178 start multiple processes when in extended protocol mode.
4179
fc1ab1a0
PA
41802012-01-17 Pedro Alves <palves@redhat.com>
4181
4182 * tracepoint.c (initialize_tracepoint): Use mmap instead of
4183 memalign plus mprotect to allocate the scratch buffer.
4184
7d5d4e98
PA
41852012-01-13 Pedro Alves <palves@redhat.com>
4186
4187 * server.c (attach_inferior): Clear `cont_thread'.
4188
f128d5e9
PA
41892012-01-13 Pedro Alves <palves@redhat.com>
4190
4191 * server.c (main): Avoid infinite loop while detaching/killing
4192 after a longjmp.
4193
06db92f0
DE
41942012-01-09 Doug Evans <dje@google.com>
4195
4196 * server.c (start_inferior): Set last_ptid in --wrapper case.
4197
32d92999
YQ
41982012-01-06 Yao Qi <yao@codesourcery.com>
4199
4200 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
4201 defined.
4202 [IN_PROCESS_AGENT] (debug_agent): New global variable.
4203
5e0a92a9
YQ
42042012-01-04 Yao Qi <yao@codesourcery.com>
4205
4206 * tracepoint.c (cmd_qtdp): Print debug message
4207 for static tracepoint.
4208
ae639e8c
YQ
42092012-01-04 Yao Qi <yao@codesourcery.com>
4210
4211 * tracepoint.c (trace_vdebug): Differentiate debug message
4212 between gdbserver and IPA.
4213
f72429c5
YQ
42142012-01-03 Yao Qi <yao@codesourcery.com>
4215
4216 * tracepoint.c (tracepoint_was_hit): Don't collect for
4217 static tracepoint.
4218
12c3e59c
JB
42192012-01-02 Joel Brobecker <brobecker@adacore.com>
4220
4221 * terminal.h: Reformat copyright header.
4222
67827812
JB
42232012-01-02 Joel Brobecker <brobecker@adacore.com>
4224
4225 * server.c (gdbserver_version): Update copyright year.
4226 * gdbreplay.c (gdbreplay_version): Likewise.
4227
3e52c33d
JK
42282011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
4229
4230 * linux-low.c (linux_create_inferior): Put empty if clause for write.
4231
4232 Revert:
4233 2011-12-18 Hui Zhu <teawater@gmail.com>
4234 * linux-low.c (linux_create_inferior): Save return value to ret.
4235
66f1260e
HZ
42362011-12-18 Hui Zhu <teawater@gmail.com>
4237
4238 * linux-low.c (linux_create_inferior): Save return value to ret.
4239
e77616d7
DE
42402011-12-16 Doug Evans <dje@google.com>
4241
e7b06c57
DE
4242 * linux-low.c (linux_create_inferior): If stdio connection,
4243 redirect stdin from /dev/null, stdout to stderr.
4244 * remote-utils.c (remote_is_stdio): New static global.
4245 (remote_connection_is_stdio): New function.
4246 (remote_prepare): Handle stdio connection.
4247 (remote_open): Ditto.
4248 (remote_close): Don't close stdin for stdio connections.
4249 (read_prim,write_prim): New functions. Replace all calls to
4250 read/write to these.
4251 * server.c (main): Watch for "-" argument. Move call to
4252 remote_prepare before start_inferior.
4253 * server.h (STDIO_CONNECTION_NAME): New macro.
4254 (remote_connection_is_stdio): Declare.
4255
e77616d7
DE
4256 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
4257 in debugging output.
4258
82067193
YQ
42592011-12-15 Yao Qi <yao@codesourcery.com>
4260
4261 * tracepoint.c: Include sys/syscall.h.
4262 (gdb_ust_thread): Remove preprocessor conditional.
4263
82bfbe7e
PA
42642011-12-14 Pedro Alves <pedro@codesourcery.com>
4265
4266 * linux-low.c (linux_detach_one_lwp): Call
4267 the_low_target.prepare_to_resume before detaching.
4268
712c6575
YQ
42692011-12-14 Yao Qi <yao@codesourcery.com>
4270
4271 * tracepoint.c (gdb_ust_thread): Don't ignore return value
4272 of write.
4273
d54d1edf
YQ
42742011-12-14 Yao Qi <yao@codesourcery.com>
4275
4276 * i386-low.c (i386_low_stopped_data_address): Initialize local
4277 variable `control'.
4278
6210a125
PA
42792011-12-13 Pedro Alves <pedro@codesourcery.com>
4280
4281 PR remote/13492
4282
4283 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
4284 DR_CONTROL unless necessary. Extend comments.
4285 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
4286 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
4287
2ece8244
YQ
42882011-12-13 Yao Qi <yao@codesourcery.com>
4289
4290 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
4291 macros.
4292 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
4293
784867a5
JK
42942011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
4295
4296 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
4297 Print new debug message for such case.
4298
6bf36717
JK
42992011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4300
4301 Fix overlapping memcpy.
4302 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
4303 the read_inferior_memory transfer.
4304 (delete_fast_tracepoint_jump): New variable buf. Use it for the
4305 write_inferior_memory transfer.
4306 (set_fast_tracepoint_jump): New variable buf. Use it for the
4307 read_inferior_memory and write_inferior_memory transfers.
4308 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
4309 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
4310 Use it for the write_inferior_memory transfer.
4311 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
4312 buffers.
4313
50275556
MR
43142011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4315
4316 * linux-low.c (fetch_register, store_register): Make code
4317 consistent, fix formatting.
4318
7325beb4
MR
43192011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4320
4321 * linux-low.c (usr_store_inferior_registers): Factor out code
4322 to handle individual registers into...
4323 (store_register): ... this new function.
4324
c642a434
UW
43252011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
4326
4327 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
4328 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
4329 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
4330 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
4331 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
4332 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
4333 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
4334 (srv_xmlfiles): Add new XML files.
4335
4336 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
4337 and <sys/uio.h>.
4338 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
4339 (init_registers_s390_linux32v1): Add prototype.
4340 (init_registers_s390_linux32v2): Likewise.
4341 (init_registers_s390_linux64v1): Likewise.
4342 (init_registers_s390_linux64v2): Likewise.
4343 (init_registers_s390x_linux64v1): Likewise.
4344 (init_registers_s390x_linux64v2): Likewise.
4345 (s390_num_regs): Increment to 52.
4346 (s390_regmap): Add orig_r2 register.
4347 (s390_num_regs_3264): Increment to 68.
4348 (s390_regmap_3264): Add orig_r2 register.
4349 (s390_collect_ptrace_register): Handle orig_r2 register.
4350 (s390_supply_ptrace_register): Likewise.
4351 (s390_fill_last_break): New function.
4352 (s390_store_last_break): Likewise.
4353 (s390_fill_system_call): New function.
4354 (s390_store_system_call): Likewise.
4355 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
4356 register sets.
4357 (s390_check_regset): New function.
4358 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
4359 NT_S390_SYSTEM_CALL regsets and use appropriate description.
4360 Update target_regsets for available register sets.
4361
2268b414
JK
43622011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
4363 Jan Kratochvil <jan.kratochvil@redhat.com>
4364
4365 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
4366 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
4367 New.
4368 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
4369 * linux-low.h (struct process_info_private): New member r_debug.
4370 * server.c (handle_qxfer_libraries): Call
4371 the_target->qxfer_libraries_svr4.
4372 (handle_qxfer_libraries_svr4): New function.
4373 (qxfer_packets): New entry "libraries-svr4".
4374 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
4375 * target.h (struct target_ops): New member qxfer_libraries_svr4.
4376 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
4377 PACKET_qXfer_libraries_svr4.
4378
d6db1fab
UW
43792011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
4380
4381 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
4382 PSW address/mask between 8-byte and 16-byte formats.
4383 (s390_supply_ptrace_register): Likewise.
4384 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
4385 basic addressing mode bit.
4386
242f5f1c
SS
43872011-11-24 Stan Shebs <stan@codesourcery.com>
4388
4389 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
4390
f196051f
SS
43912011-11-17 Stan Shebs <stan@codesourcery.com>
4392
4393 * tracepoint.c (struct tracepoint): New field traceframe_usage.
4394 (tracing_start_time): New global.
4395 (tracing_stop_time): New global.
4396 (tracing_user_name): New global.
4397 (tracing_notes): New global.
4398 (tracing_stop_note): New global.
4399 (cmd_qtstart): Set traceframe_usage, start_time.
4400 (stop_tracing): Set stop_time.
4401 (cmd_qtstatus): Report additional status.
4402 (cmd_qtp): New function.
4403 (handle_tracepoint_query): Call it.
4404 (cmd_qtnotes): New function.
4405 (handle_tracepoint_general_set): Call it.
4406 (get_timestamp): Rename from tsv_get_timestamp.
4407
405f8e94
SS
44082011-11-14 Stan Shebs <stan@codesourcery.com>
4409 Kwok Cheung Yeung <kcy@codesourcery.com>
4410
4411 * linux-x86-low.c (small_jump_insn): New.
4412 (i386_install_fast_tracepoint_jump_pad): Add arguments for
4413 trampoline and error message, build a trampoline and issue a small
4414 jump instruction to it.
4415 (x86_install_fast_tracepoint_jump_pad): Add arguments for
4416 trampoline and error message.
4417 (x86_get_min_fast_tracepoint_insn_len): New.
4418 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
4419 * linux-low.h (struct linux_target_ops): Add arguments to
4420 install_fast_tracepoint_jump_pad operation, add new operation.
4421 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
4422 arguments.
4423 (linux_get_min_fast_tracepoint_insn_len): New function.
4424 (linux_target_op): Add new operation.
4425 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
4426 (gdb_trampoline_buffer_end): Ditto.
4427 (gdb_trampoline_buffer_error): Ditto.
4428 (struct ipa_sym_addresses): Add fields for new IPA variables.
4429 (symbol_list): Add entries for new IPA variables.
4430 (struct tracepoint): Add fields to hold the address range of the
4431 trampoline used by the tracepoint.
4432 (trampoline_buffer_head): New static variable.
4433 (trampoline_buffer_tail): Ditto.
4434 (claim_trampoline_space): New function.
4435 (have_fast_tracepoint_trampoline_buffer): New function.
4436 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
4437 structure.
4438 (install_fast_tracepoint): Ditto, also add error buffer argument.
4439 (cmd_qtminftpilen): New function.
4440 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
4441 (fast_tracepoint_from_trampoline_address): New function.
4442 (fast_tracepoint_collecting): Handle trampoline as part of jump
4443 pad space.
4444 (set_trampoline_buffer_space): New function.
4445 (initialize_tracepoint): Initialize new IPA variables.
4446 * target.h (struct target_ops): Add arguments to
4447 install_fast_tracepoint_jump_pad operation, add new
4448 get_min_fast_tracepoint_insn_len operation.
4449 (target_get_min_fast_tracepoint_insn_len): New.
4450 (install_fast_tracepoint_jump_pad): Add arguments.
4451 * server.h (IPA_BUFSIZ): Define.
4452 * linux-i386-ipa.c: Include extra header files.
4453 (initialize_fast_tracepoint_trampoline_buffer): New function.
4454 (initialize_low_tracepoint): Call it.
4455 * server.h (set_trampoline_buffer_space): Declare.
4456 (claim_trampoline_space): Ditto.
4457 (have_fast_tracepoint_trampoline_buffer): Ditto.
4458
1e4d1764
YQ
44592011-11-14 Yao Qi <yao@codesourcery.com>
4460
4461 * server.c (handle_query): Handle InstallInTrace for qSupported.
4462 * tracepoint.c (add_tracepoint): Sort list.
4463 (install_tracepoint, download_tracepoint): New.
4464 (cmd_qtdp): Call them to install and download tracepoints.
4465 (sort_tracepoints): Removed.
4466 (cmd_qtstart): Update.
4467
5c73ff4e
YQ
44682011-11-14 Yao Qi <yao@codesourcery.com>
4469
4470 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
4471 * mem-break.h: Declare.
4472 * tracepoint.c (cmd_qtstart): Move some code to ...
4473 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
4474 New.
4475 (download_tracepoints): Move some code to ...
4476 (download_tracepoint_1): ... here. New.
4477
86a30030
YQ
44782011-11-08 Yao Qi <yao@codesourcery.com>
4479
4480 * remote-utils.c (relocate_instruction): A comment fix.
4481
8d26e50c
JB
44822011-11-07 Joel Brobecker <brobecker@adacore.com>
4483
4484 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
4485 (i386_dr_low_get_control, i386_dr_low_get_status): Use
4486 dr_status_mirror and dr_control_mirror from debug_reg_state.
4487 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
4488 (i386_initial_stuff): Remove use of deleted globals.
4489 (i386_get_thread_context, i386_set_thread_context,
4490 i386_thread_added): Use dr_status_mirror and dr_control_mirror
4491 from debug_reg_state.
4492
a59306a3
YQ
44932011-11-05 Yao Qi <yao@codesourcery.com>
4494
4495 * tracepoint.c (gdb_collect): Loop over tracepoints of same
4496 address as TPOINT's.
4497
3065dfb6
SS
44982011-11-02 Stan Shebs <stan@codesourcery.com>
4499
4500 * tracepoint.c (agent_mem_read_string): New function.
4501 (eval_agent_expr): Call it for tracenz.
4502 * server.c (handle_query): Report support for tracenz.
4503
fd0d8c7c
YQ
45042011-11-02 Yao Qi <yao@codesourcery.com>
4505
4506 * tracepoint.c (cmd_qtstart): Remove unused local variables.
4507
609086b1
YQ
45082011-11-02 Yao Qi <yao@codesourcery.com>
4509
4510 * target.h: Fix a typo in comment.
4511
b9fd1791
PA
45122011-10-31 Pedro Alves <pedro@codesourcery.com>
4513
4514 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
4515 clobber the breakpoints' shadows with fast tracepoint jumps.
4516 * mem-break.h (check_mem_write): Add `myaddr' parameter.
4517 * target.c (write_inferior_memory): Also pass MYADDR down to
4518 check_mem_write.
4519
03583c20
UW
45202011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
4521
4522 * configure.ac: Check support for personality routine.
4523 * configure: Regenerate.
4524 * config.in: Likewise.
4525 * linux-low.c: Include <sys/personality.h>.
4526 Define ADDR_NO_RANDOMIZE if necessary.
4527 (linux_create_inferior): Disable address space randomization when
4528 forking inferior, if requested.
4529 (linux_supports_disable_randomization): New function.
4530 (linux_target_ops): Install it.
4531 * server.h (disable_randomization): Declare.
4532 * server.c (disable_randomization): New global variable.
4533 (handle_general_set): Handle QDisableRandomization.
4534 (handle_query): Likewise for qSupported.
4535 (main): Support --disable-randomization and --no-disable-randomization
4536 command line arguments.
4537 * target.h (struct target_ops): Add supports_disable_randomization.
4538 (target_supports_disable_randomization): New macro.
4539
723b724b
MF
45402011-09-29 Mike Frysinger <vapier@gentoo.org>
4541
4542 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
4543 ifdef check.
4544 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
4545 [!PT_GETDSBT] (target_loadmap): New definition.
4546 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
4547 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
4548 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
4549 and PT_GETDSBT to LINUX_LOADMAP.
4550 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
4551 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
4552
55329a5c 45532011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
4554
4555 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
4556 (arm_linux_hwbp_cap): New static variable.
4557 (arm_linux_get_hwbp_cap): Replace by ...
4558 (arm_linux_init_hwbp_cap): ... this new function.
4559 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
4560 (arm_linux_get_hw_watchpoint_count): Likewise.
4561 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4562 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
4563 (arm_prepare_to_resume): Use perror_with_name instead of error.
4564
55329a5c 45652011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
4566
4567 * linux-arm-low.c: Include <signal.h>.
4568 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
4569 (struct arm_linux_hwbp_cap): New data type.
4570 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
4571 (struct arm_linux_hw_breakpoint): New data type.
4572 (MAX_BPTS, MAX_WPTS): Define.
4573 (struct arch_process_info, struct arch_lwp_info): New data types.
4574 (arm_linux_get_hwbp_cap): New function.
4575 (arm_linux_get_hw_breakpoint_count): Likewise.
4576 (arm_linux_get_hw_watchpoint_count): Likewise.
4577 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4578 (arm_hwbp_control_initialize): Likewise.
4579 (arm_hwbp_control_is_enabled): Likewise.
4580 (arm_hwbp_control_is_initialized): Likewise.
4581 (arm_hwbp_control_disable): Likewise.
4582 (arm_linux_hw_breakpoint_equal): Likewise.
4583 (arm_linux_hw_point_initialize): Likewise.
4584 (struct update_registers_data): New data structure.
4585 (update_registers_callback: New function.
4586 (arm_insert_point): Likewise.
4587 (arm_remove_point): Likewise.
4588 (arm_stopped_by_watchpoint): Likewise.
4589 (arm_stopped_data_address): Likewise.
4590 (arm_new_process): Likewise.
4591 (arm_new_thread): Likewise.
4592 (arm_prepare_to_resume): Likewise.
4593 (the_low_target): Register arm_insert_point, arm_remove_point,
4594 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
4595 arm_new_thread, and arm_prepare_to_resume.
4596
6b9801d4
SS
45972011-09-15 Stan Shebs <stan@codesourcery.com>
4598
4599 * server.h (struct emit_ops): Add compare-goto fields.
4600 * tracepoint.c (gdb_agent_op_sizes): New table.
4601 (emit_eq_goto): New function.
4602 (emit_ne_goto): New function.
4603 (emit_lt_goto): New function.
4604 (emit_le_goto): New function.
4605 (emit_gt_goto): New function.
4606 (emit_ge_goto): New function.
4607 (is_goto_target): New function.
4608 (compile_bytecodes): Recognize special cases of compare-goto
4609 combinations and call specialized emitters for them.
4610 * linux-x86-low.c (amd64_emit_eq_goto): New function.
4611 (amd64_emit_ne_goto): New function.
4612 (amd64_emit_lt_goto): New function.
4613 (amd64_emit_le_goto): New function.
4614 (amd64_emit_gt_goto): New function.
4615 (amd64_emit_ge_goto): New function.
4616 (amd64_emit_ops): Add the new functions.
4617 (i386_emit_eq_goto): New function.
4618 (i386_emit_ne_goto): New function.
4619 (i386_emit_lt_goto): New function.
4620 (i386_emit_le_goto): New function.
4621 (i386_emit_gt_goto): New function.
4622 (i386_emit_ge_goto): New function.
4623 (i386_emit_ops): Add the new functions.
4624
bf15cbda
SS
46252011-09-08 Stan Shebs <stan@codesourcery.com>
4626
4627 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
4628 (i386_emit_epilogue): Restore %ebx.
4629
943ca1dd
JZ
46302011-08-31 Jie Zhang <jzhang918@gmail.com>
4631
4632 * server.c (step_thread): Remove definition.
4633 (process_serial_event): Don't handle Hs.
4634 * server.h (step_thread): Remove declaration.
4635 * target.c (set_desired_inferior): Remove use of step_thread.
4636
e3deef73
LM
46372011-08-24 Luis Machado <lgustavo@codesourcery.com>
4638
4639 * linux-low.c: Include linux-procfs.h.
4640 (linux_attach_lwp_1): Update comments.
4641 (linux_attach): Scan for existing threads when attaching to a
4642 process that is the tgid.
4643 * Makefile.in: Update dependencies.
4644
13da1c97
LM
46452011-08-24 Luis Machado <lgustavo@codesourcery.com>
4646
4647 * configure.srv: Add linux-procfs.o dependencies.
4648
881127c9
YQ
46492011-08-14 Yao Qi <yao@codesourcery.com>
4650
4651 * target.h (struct target_ops): Fix indent.
4652 * win32-low.c (win32_target_ops): Fix comment.
4653
58dbd541
YQ
46542011-08-14 Andrew Jenner <andrew@codesourcery.com>
4655 Yao Qi <yao@codesourcery.com>
4656
4657 * Makefile.in (clean): Remove tic6x-*.c files.
4658 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
4659 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
4660 (tic6x-c64xp-linux.c): Likewise.
4661 * configure.srv: Add support for tic6x-*-uclinux.
4662 * linux-tic6x-low.c: New.
4663 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
4664
78d85199
YQ
46652011-08-14 Andrew Stubbs <ams@codesourcery.com>
4666 Yao Qi <yao@codesourcery.com>
4667
4668 * target.h (struct target_ops): Add read_loadmap.
4669 * linux-low.c (struct target_loadseg): New type.
4670 (struct target_loadmap): New type.
4671 (linux_read_loadmap): New function.
4672 (linux_target_ops): Add linux_read_loadmap.
4673 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
4674 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
4675 to NULL.
78d85199 4676
a959a88d
EZ
46772011-08-05 Eli Zaretskii <eliz@gnu.org>
4678
4679 * win32-low.c: Include <stdint.h>.
4680
1ced966e
PA
46812011-07-22 Pedro Alves <pedro@codesourcery.com>
4682
4683 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
4684 to the inferior here.
4685 (i386_remove_aligned_watchpoint): Ditto.
4686 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
4687 fit part of the watchpoint in the debug registers.
4688 (i386_update_inferior_debug_regs): New.
4689 (i386_low_insert_watchpoint): Work on a local mirror of the debug
4690 registers, and only update the inferior on success.
4691 (i386_low_remove_watchpoint): Ditto.
4692
d26e3629
KY
46932011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
4694
4695 * linux-low.c (compare_ints, unique, list_threads, show_process,
4696 linux_core_of_thread): Delete.
4697 (linux_target_ops): Change linux_core_of_thread to
4698 linux_common_core_of_thread.
4699 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
4700 * utils.c (malloc_failure): Change type of argument.
4701 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
4702 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
4703 common/linux-osdata.c, common/ptid.c and common/buffer.c.
4704 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
4705 (IPA_OBJS): Add common-utils-ipa.o.
4706 (ptid_h, linux_osdata_h): New macros.
4707 (server_h): Add common/common-utils.h, common/xml-utils.h,
4708 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
4709 common/ptid.h.
4710 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
4711 ptid.o, buffer.o): New rules.
4712 (linux-low.o): Add common/linux-osdata.h as a dependency.
4713 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
4714 * configure.ac: Add AC_HEADER_DIRENT check.
4715 * config.in: Regenerate.
4716 * configure: Regenerate.
4717 * remote-utils.c (xml_escape_text): Delete.
4718 (buffer_grow, buffer_free, buffer_init, buffer_finish,
4719 buffer_xml_printf): Move to common/buffer.c.
4720 * server.c (main): Remove call to initialize_inferiors.
4721 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
4722 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
4723 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
4724 internal_error, gdb_assert, gdb_assert_fail): Delete.
4725 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
4726 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
4727 common/buffer.h.
4728 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
4729 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
4730 initialize_inferiors): Delete.
4731
2275a1a7
PA
47322011-07-20 Pedro Alves <pedro@codesourcery.com>
4733
4734 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
4735 symbol error.
4736
0a5b1e09
PA
47372011-05-31 Pedro Alves <pedro@codesourcery.com>
4738
4739 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
4740 assertion.
4741 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
4742
6938fd34
YQ
47432011-05-26 Yao Qi <yao@codesourcery.com>
4744
4745 * Makefile.in (thread-db.o): Track dependence to
4746 common/gdb_thread_db.h.
4747 * thread-db.c: include gdb_thread_db.h from right place.
4748
b481f9e0
TT
47492011-05-16 Adrian Cornish <gnu@bluedreamer.com>
4750
4751 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
4752 __FILE__ and __LINE__ to internal_error.
4753
98a5dd13
DE
47542011-05-13 Doug Evans <dje@google.com>
4755
4756 * thread-db.c (try_thread_db_load_from_sdir): New function.
4757 (try_thread_db_load_from_dir): New function.
4758 (thread_db_load_search): Handle $sdir, ignore $pdir.
4759 Remove trying of system directories if search of
4760 libthread-db-search-path fails, that is now done via $sdir.
4761
d248b706
KY
47622011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
4763
4764 * server.c (handle_query): Add EnableDisableTracepoints to the list
4765 of supported features.
43aaf8b6 4766 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 4767 tracepoints.
43aaf8b6
PA
4768 (cmd_qtenable_disable): New.
4769 (cmd_qtstart): Install tracepoints even if disabled.
4770 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
4771 receiving a QTEnable or QTDisable packet.
4772 (gdb_collect): Skip data collection if fast tracepoint is disabled.
4773 (ust_marker_to_static_tracepoint): Do not ignore disabled static
4774 tracepoints.
4775 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 4776
84e578fb
DE
47772011-05-10 Doug Evans <dje@google.com>
4778
4779 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
4780
71f55dd8
DE
47812011-05-04 Doug Evans <dje@google.com>
4782
4783 * linux-low.c (linux_join): Skip process lookup.
4784 * spu-low.c (spu_join): Ditto.
4785 * server.c (join_inferiors_callback): Delete.
4786 (process_serial_event): For 'D' packet (detach) call join_inferior
4787 directly.
4788
4d393d60
JM
47892011-05-04 Joseph Myers <joseph@codesourcery.com>
4790
4791 * README: Don't mention xscale*-*-linux*.
4792 * configure.srv (xscale*-*-linux*): Don't handle target.
4793
b00ad6ff
NF
47942011-04-27 Nathan Froyd <froydnj@codesourcery.com>
4795
4796 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
4797 casting pointers.
4798 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
4799 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
4800 (i386_emit_void_call_2): Likewise.
4801
af96c192
YQ
48022011-04-26 Yao Qi <yao@codesourcery.com>
4803
43aaf8b6
PA
4804 * linux-low.c: Move common macros to linux-ptrace.h.
4805 Include linux-ptrace.h.
af96c192
YQ
4806 * Makefile.in (linux_ptrace_h): New.
4807 (linux-low.o): Depends on linux-ptrace.h.
4808
03f2bd59
JK
48092011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
4810
4811 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
4812 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
4813 (remote_prepare): New function with most of the TCP code from ...
4814 (remote_open): ... here. Detect PORT here unconditionally. Move also
4815 setting transport_is_reliable.
4816 * server.c (run_once): New variable.
4817 (gdbserver_usage): Document it.
4818 (main): Set run_once for `--once'. Call remote_prepare. Exit after
4819 the first run if RUN_ONCE.
4820 * server.h (run_once, remote_prepare): New declarations.
4821
7a9dd1b2
TT
48222011-04-19 Tom Tromey <tromey@redhat.com>
4823
4824 * win32-low.c (handle_load_dll): Remove duplicate "the".
4825
81239425
PM
48262011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
4827
4828 Remove support for old Cygwin 1.5 versions.
4829 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
4830 function to avoid warning.
4831 (win32_add_one_solib): Use cygwin_conv_path function to avoid
4832 warning.
4833
9e0627f1
PM
48342011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
4835
4836 * gdbserver/server.h (Macro _): Define it if not available.
4837
588eebee
MS
48382011-03-14 Michael Snyder <msnyder@vmware.com>
4839
348af9f7 4840 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 4841
43f70d4c
JB
48422011-03-10 Joel Brobecker <brobecker@adacore.com>
4843
4844 * Makefile.in (maintainer-clean realclean distclean): Remove
4845 "make ... subdir_do" command.
4846
348af9f7
MS
48472011-03-10 Michael Snyder <msnyder@vmware.com>
4848
4849 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
4850
4851 * server.c (handle_v_run): Free alloced buffer on early return.
4852
e637a4f5
YQ
48532011-03-09 Yao Qi <yao@codesourcery.com>
4854
4855 Revert:
4856 2011-03-04 Yao Qi <yao@codesourcery.com>
4857
4858 * Makefile.in: Remove GNU make feature --directory.
4859
4860 2011-03-05 Yao Qi <yao@codesourcery.com>
4861
4862 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
4863 (subdir_do): New make target. Copied from gdb/Makefile.
4864 (maintainer-clean, realclean, distclean, clean): Call corresponding
4865 make targets in common/Makefile.
4866
4867 2011-02-11 Yao Qi <yao@codesourcery.com>
4868
4869 * configure.ac: Call AC_PROG_RANLIB.
4870 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
4871 * configure: Regenerate.
4872
e6edda56
JK
48732011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4874
4875 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
4876
e5141119
JB
48772011-03-06 Yao Qi <yao@codesourcery.com>
4878
4879 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
4880
64794aa4
JB
48812011-03-05 Yao Qi <yao@codesourcery.com>
4882
4883 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
4884 (subdir_do): New make target. Copied from gdb/Makefile.
4885 (maintainer-clean, realclean, distclean, clean): Call corresponding
4886 make targets in common/Makefile.
4887
7a762829
YQ
48882011-03-04 Yao Qi <yao@codesourcery.com>
4889
4890 * Makefile.in: Remove GNU make feature --directory.
4891
348af9f7
MS
48922011-03-04 Michael Snyder <msnyder@vmware.com>
4893
4894 * server.c (queue_stop_reply): Call xmalloc not malloc.
4895
48962011-03-02 Michael Snyder <msnyder@vmware.com>
4897
4898 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
4899
9f72fee2
MS
49002011-02-28 Michael Snyder <msnyder@vmware.com>
4901
588eebee
MS
4902 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
4903 (cmd_qtframe): Ditto.
4904 (cmd_qtbuffer): Ditto.
4905 (cmd_bigqtbuffer): Ditto.
4906
9f72fee2
MS
4907 * utils.c (decimal2str): Initialize 'width' to nine, then
4908 don't mess with it.
4909
8040bd49
UW
49102011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
4911
4912 * hostio.c (require_data): Free *data, not data.
4913
7e52cbd0
JK
49142011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4915
4916 * hostio.c (require_data): Use free, not xfree.
4917
9130f83e
MS
49182011-02-27 Michael Snyder <msnyder@vmware.com>
4919
4b812f4e
MS
4920 * server.c (handle_query): Discard unused value.
4921
9130f83e
MS
4922 * hostio.c (require_data): Free malloc memory before returning
4923 error.
4924
69d37113
MS
49252011-02-26 Michael Snyder <msnyder@vmware.com>
4926
4927 * linux-low.c (list_threads): Call closedir for dirent.
4928
35f5825a
MS
49292011-02-27 Michael Snyder <msnyder@vmware.com>
4930
2a589cef
MS
4931 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
4932 a case statement falls through.
4933
0adea5f7
MS
4934 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
4935
35f5825a
MS
4936 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
4937 in comparison.
4938
238f1c74
MS
49392011-02-26 Michael Snyder <msnyder@vmware.com>
4940
4941 * utils.c (decimal2str): Eliminate dead code and dead param.
4942 (pulongest): Drop dead param from call to decimal2str.
4943 (plongest): Ditto.
4944
633ff500
JB
49452011-02-24 Joel Brobecker <brobecker@adacore.com>
4946
4947 Revert the following patch (not approved yet):
4948 2011-02-21 Hui Zhu <teawater@gmail.com>
4949 * tracepoint.c (tp_printf): New function.
4950 (eval_agent_expr): Handle gdb_agent_op_printf.
4951
f9c6ff72
HZ
49522011-02-21 Hui Zhu <teawater@gmail.com>
4953
4954 * tracepoint.c (tp_printf): New function.
4955 (eval_agent_expr): Handle gdb_agent_op_printf.
4956
94d5e490
TT
49572011-02-18 Tom Tromey <tromey@redhat.com>
4958
4959 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
4960 (tracepoint.o): Likewise.
4961 * tracepoint.c (enum gdb_agent_op): Use ax.def.
4962 (gdb_agent_op_names): Likewise.
4963
c7f96d2b
TT
49642011-02-18 Tom Tromey <tromey@redhat.com>
4965
4966 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
4967 gdb_agent_op_rot>: New constants.
4968 (gdb_agent_op_names): Add pick and roll.
4969 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
4970 cases.
4971
0feedb2c
JK
49722011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4973
4974 * aclocal.m4: Regenerated with aclocal-1.11.1.
4975
b3b9301e
PA
49762011-02-14 Pedro Alves <pedro@codesourcery.com>
4977
4978 * server.c (handle_qxfer_traceframe_info): New.
4979 (qxfer_packets): Register "traceframe-info".
4980 (handle_query): Report support for qXfer:traceframe-info:read+.
4981 * tracepoint.c (match_blocktype): New.
4982 (traceframe_find_block_type): Rename to ...
4983 (traceframe_walk_blocks): ... this. Add callback filter argument,
4984 and use it.
4985 (traceframe_find_block_type): New, reimplemented on top of
4986 traceframe_walk_blocks.
4987 (build_traceframe_info_xml): New.
4988 (traceframe_read_info): New.
4989 * server.h (traceframe_read_info): Declare.
4990
4f3e6fb7
YQ
49912011-02-11 Yao Qi <yao@codesourcery.com>
4992
4993 * configure.ac: Call AC_PROG_RANLIB.
4994 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
4995 * configure: Regenerate.
4996
764880b7
PA
49972011-02-07 Pedro Alves <pedro@codesourcery.com>
4998
4999 * server.c (gdb_read_memory): Change return semantics to allow
5000 partial transfers.
5001 (handle_search_memory_1): Adjust.
5002 (process_serial_event) <'m' packet>: Handle partial transfers.
5003 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5004
1c79eb8a
PA
50052011-01-28 Pedro Alves <pedro@codesourcery.com>
5006
5007 * regcache.c (init_register_cache): Initialize
5008 regcache->register_status.
5009 (free_register_cache): Release regcache->register_status.
5010 (regcache_cpy): Copy register_status.
5011 (registers_to_string): Print 'x's for unavailable registers.
5012 (supply_register): Mark the register's status valid or
5013 unavailable, depending on whether a buffer was passed in or not.
5014 (supply_register_zeroed): New.
5015 (supply_regblock): Mark the registers' status valid or
5016 unavailable, depending on whether a buffer was passed in or not.
5017 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5018 (struct regcache): New `register_status' field.
5019 (supply_register_zeroed): Declare.
5020 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5021 supply_register_zeroed, rather than passing a NULL buffer to
5022 supply_register.
5023 * tracepoint.c (fetch_traceframe_registers): Update comment.
5024
85724a0e
PA
50252011-01-28 Pedro Alves <pedro@codesourcery.com>
5026
5027 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
5028 buffer explicit.
5029
d08aafef
PA
50302011-01-25 Pedro Alves <pedro@codesourcery.com>
5031
5032 * server.h (decode_xfer_write): Change prototype.
5033 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
5034 and don't extract the annex here.
5035 * server.c (decode_xfer_read): Remove `annex' parameter,
5036 and don't extract the annex here.
5037 (decode_xfer): New.
5038 (struct qxfer): New.
5039 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
5040 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
5041 (handle_qxfer_statictrace): New functions, abstracted out from
5042 handle_query, and made to use the struct qxfer interface.
5043 (handle_threads_qxfer_proper): Rename to ...
5044 (handle_qxfer_threads_proper): ... this.
5045 (handle_threads_qxfer): Rename to ...
5046 (handle_qxfer_threads): ... this. Adjust.
5047 (qxfer_packets): New array.
5048 (handle_qxfer): New function.
5049 (handle_query): Use handle_qxfer.
5050
493e2a69
MS
50512011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
5052
5053 * gdbreplay.c: Shorten lines of >= 80 columns.
5054 * linux-low.c: Ditto.
5055 * linux-ppc-low.c: Ditto.
5056 * linux-s390-low.c: Ditto.
5057 * linux-sparc-low.c: Ditto.
5058 * linux-x86-low.c: Ditto.
5059 * linux-xtensa-low.c: Ditto.
5060 * mem-break.c: Ditto.
5061 * nto-low.c: Ditto.
5062 * regcache.h: Ditto.
5063 * remote-utils.c: Ditto.
5064 * server.c: Ditto.
5065 * server.h: Ditto.
5066 * thread-db.c: Ditto.
5067 * tracepoint.c: Ditto.
5068 * utils.c: Ditto.
5069 * win32-low.h: Ditto.
5070
44944448
JB
50712011-01-05 Joel Brobecker <brobecker@adacore.com>
5072
5073 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
5074 update.
5075
71ce852c
JB
50762011-01-01 Joel Brobecker <brobecker@adacore.com>
5077
5078 * server.c (gdbserver_version): Update copyright year in version
5079 output.
5080 * gdbreplay.c (gdbreplay_version): Ditto.
5081
eb826dc6
MF
50822010-12-29 Jie Zhang <jie.zhang@analog.com>
5083
5084 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
5085 * linux-bfin-low.c: New file.
5086 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
5087 PT_DATA_ADDR for BFIN targets.
5088 * Makefile.in (SFILES): Add linux-bfin-low.c.
5089 (clean): Remove reg-bfin.c.
5090 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
5091 * README: Mention supported Blackfin targets.
5092
39ab222a
MF
50932010-12-23 Mike Frysinger <vapier@gentoo.org>
5094
5095 * .gitignore: New file.
5096
a1f2ce7d
MF
50972010-11-16 Mike Frysinger <vapier@gentoo.org>
5098
5099 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
5100
f474844c
JZ
51012010-10-22 Jie Zhang <jie@codesourcery.com>
5102
5103 * Makefile.in: Add FLAGS_TO_PASS variable.
5104 (install): Remove dependency of install-only and recursively
5105 invoke make for install-only.
5106
f1048712
DE
51072010-10-04 Doug Evans <dje@google.com>
5108
5109 * Makefile.in (uninstall): Use $(DESTDIR).
5110
b53a1623
PA
51112010-09-24 Pedro Alves <pedro@codesourcery.com>
5112
e6ee044d
PA
5113 PR gdb/11842
5114
b53a1623
PA
5115 * linux-x86-low.c (compat_siginfo_from_siginfo)
5116 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
5117 si_code is < 0. Check for si_code == SI_TIMER before checking for
5118 si_code < 0.
5119
fa1bd1e4
JB
51202010-09-13 Joel Brobecker <brobecker@adacore.com>
5121
5122 * lynx-i386-low.c: New file.
5123 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
5124
47fac8f8
JB
51252010-09-13 Joel Brobecker <brobecker@adacore.com>
5126
5127 * lynx-low.c (ptrace_request_to_str): Remove handling for
5128 request values that have been removed in LynxOS 5.x.
5129
1adfc54d
JB
51302010-09-13 Joel Brobecker <brobecker@adacore.com>
5131
5132 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
5133 <ptrace.h>
5134
c2a66c29
NS
51352010-09-09 Nathan Sidwell <nathan@codesourcery.com>
5136
5137 * configure.ac: Add --enable-inprocess-agent option.
5138 * configure: Rebuilt.
5139
32fcada3
YQ
51402010-09-06 Yao Qi <yao@codesourcery.com>
5141
5142 * linux-low.c (linux_kill): Remove unused variable.
5143 (linux_stabilize_threads): Likewise.
5144 * server.c (start_inferior): Likewise.
5145 (queue_stop_reply_callback): Likewise.
5146 * tracepoint.c (do_action_at_tracepoint): Likewise.
5147
0cccb683
YQ
51482010-09-06 Yao Qi <yao@codesourcery.com>
5149
5150 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
5151 on return.
5152
423ec54c
JK
51532010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5154
5155 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
5156
12ac6819
PA
51572010-09-06 Pedro Alves <pedro@codesourcery.com>
5158
5159 * Makefile.in (install-only): Replace $IPA_DEPFILES with
5160 "$(IPA_DEPFILES)".
5161
8ed54b31
JB
51622010-09-01 Joel Brobecker <brobecker@adacore.com>
5163
5164 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
5165 gdbserver/lynx-ppc-low.c: New files.
5166 * Makefile.in (lynx_low_h): New variable.
5167 (lynx-low.o, lynx-ppc-low.o): New rules.
5168 * configure.ac: On LynxOS, link with -lnetinet.
5169 * configure.srv: Add handling of powerpc-*-lynxos* targets.
5170 * configure: regenerate.
5171
bb0116a4
JB
51722010-09-01 Joel Brobecker <brobecker@adacore.com>
5173
5174 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
5175 * configure.ac: Add check for vasprintf and vsnprintf.
5176 * configure, config.in: Regenerate.
5177 * server.h (vasprintf, vsnprintf): Add conditional declarations.
5178
a778ab81 51792010-09-01 Joel Brobecker <brobecker@adacore.com>
5180
5181 * gdbreplay.c: Move include of alloca.h up, next to include of
5182 malloc.h.
5183 * server.h: Add include of malloc.h.
5184 * mem-break.c: Remove include of malloc.h.
5185 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
5186
8b034a19 51872010-09-01 Joel Brobecker <brobecker@adacore.com>
5188
5189 * Makefile.in (memmem.o): Build with -Wno-error.
5190
51912010-09-01 Joel Brobecker <brobecker@adacore.com>
5192
5193 * utils.c (xsnprintf): Make non-static.
5194 * server.h: Add xsnprintf declaration.
5195 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
5196 replace calls to snprintf by calls to xsnprintf throughout.
5197
51982010-09-01 Joel Brobecker <brobecker@adacore.com>
5199
5200 * configure.ac: Add configure check for alloca.
5201 * configure, config.in: Regenerate.
5202 * server.h: Include alloca.h if it exists.
5203 * gdbreplay.c: Include alloca.h if it exists.
5204
1a981360
PA
52052010-08-28 Pedro Alves <pedro@codesourcery.com>
5206
5207 * linux-low.c (__SIGRTMIN): Define if not already defined.
5208 (linux_create_inferior): Check for __ANDROID__ rather than
5209 __SIGRTMIN.
5210 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
5211 are already deferred.
5212 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
5213 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
5214 stopped and already has a pending signal to report.
5215 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
5216 a pending signal to report or is moving out of a jump pad.
5217 (linux_init_signals): Check for __ANDROID__ rather than
5218 __SIGRTMIN.
5219
b4d51a55
PA
52202010-08-28 Pedro Alves <pedro@codesourcery.com>
5221
5222 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
5223 debug_threads check. Avoid a linear search when not doing debug
5224 output.
5225
ec48365d
PA
52262010-08-27 Pedro Alves <pedro@codesourcery.com>
5227
5228 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
5229 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
5230 (struct file_handler) <fd>: Change type to gdb_fildes_t.
5231 (process_event): Change local fd's type to gdb_fildes_t.
5232 (create_file_handler): Adjust prototype.
5233 (delete_file_handler): Adjust prototype.
5234 (handle_file_event): Adjust prototype. Use pfildes.
5235 (create_file_event): Adjsut prototype.
5236 * remote-utils.c (remote_desc, listen_desc): Change type to
5237 gdb_fildes_t.
5238 * server.h: New gdb_fildes_t typedef.
5239 [USE_WIN32API]: Include winsock2.h.
5240 (delete_file_handler, add_file_handler): Adjust prototypes.
5241 (pfildes): Declare.
5242 * utils.c (pfildes): New.
5243
854d88f0
PA
52442010-08-27 Pedro Alves <pedro@codesourcery.com>
5245
5246 * configure.ac (build_warnings): Add -Wno-char-subscripts.
5247 * configure: Regenerate.
5248
0146f85b
PA
52492010-08-27 Pedro Alves <pedro@codesourcery.com>
5250
5251 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
5252 (linux_done_accessing_memory): ... this.
5253 (linux_target_ops): Adjust.
5254 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
5255 * nto-low.c (nto_target_ops): Adjust comment.
5256 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
5257 * spu-low.c (spu_target_ops): Adjust comment.
5258 * target.h (target_ops): Rename unprepare_to_access_memory field
5259 to done_accessing_memory.
5260 (unprepare_to_access_memory): Rename to ...
5261 (done_accessing_memory): ... this.
5262
90d74c30
PA
52632010-08-26 Pedro Alves <pedro@codesourcery.com>
5264
5265 * linux-low.c (linux_prepare_to_access_memory): New.
5266 (linux_unprepare_to_access_memory): New.
5267 (linux_target_ops): Install them.
5268 * server.c (read_memory): Rename to ...
5269 (gdb_read_memory): ... this. Use
5270 prepare_to_access_memory/prepare_to_access_memory.
5271 (write_memory): Rename to ...
5272 (gdb_write_memory): ... this. Use
5273 prepare_to_access_memory/prepare_to_access_memory.
5274 (handle_search_memory_1): Adjust.
5275 (process_serial_event): Adjust.
5276 * target.h (struct target_ops): New fields
5277 prepare_to_access_memory and unprepare_to_access_memory.
5278 (prepare_to_access_memory, unprepare_to_access_memory): New.
5279 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
5280 prepare_to_access_memory/prepare_to_access_memory.
5281 * nto-low.c (nto_target_ops): Adjust.
5282 * spu-low.c (spu_target_ops): Adjust.
5283 * win32-low.c (win32_target_ops): Adjust.
5284
fd467969
PA
52852010-08-26 Pedro Alves <pedro@codesourcery.com>
5286
5287 * Makefile.in (WARN_CFLAGS): Get it from configure.
5288 (WERROR_CFLAGS): New.
5289 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
5290 * configure.ac: Introduce --enable-werror, which adds -Werror to
5291 the compiler command line. Enabled by default. Disable with
5292 --disable-werror. Add -Wdeclaration-after-statement
5293 Wpointer-arith and -Wformat-nonliteral to warning flags.
5294 * configure: Regenerate.
5295
331e2f5f
PA
52962010-08-26 Pedro Alves <pedro@codesourcery.com>
5297
5298 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
5299
e581f2b4
PA
53002010-08-26 Pedro Alves <pedro@codesourcery.com>
5301
5302 * gdbreplay.c (remote_error): New.
5303 (gdbchar): New.
5304 (expect): Use gdbchar. Check for error reading from GDB.
5305 Clarify sync error output.
5306 (play): Check for errors writing to GDB.
5307 * linux-low.c (sigchld_handler): Really ignore `write' errors.
5308 * remote-utils.c (getpkt): Check for errors writing to the remote
5309 descriptor.
5310
3c11dd79
PA
53112010-08-25 Pedro Alves <pedro@codesourcery.com>
5312
5313 * linux-low.c (linux_wait_1): Move non-debugging code out of
5314 `debug_threads' control.
5315
d20a8ad9
PA
53162010-08-25 Pedro Alves <pedro@codesourcery.com>
5317
5318 * linux-low.c (linux_wait_1): Don't set last_status here.
5319 * server.c (push_event, queue_stop_reply_callback): Assert we're
5320 not pushing a TARGET_WAITKIND_IGNORE event.
5321 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
5322 (myresume, handle_target_event): Set the thread's last_resume_kind
5323 and last_status from the target returned status.
5324
964e4306
PA
53252010-08-25 Pedro Alves <pedro@codesourcery.com>
5326
5327 PR threads/10729
5328
5329 * linux-x86-low.c (update_debug_registers_callback): New.
5330 (i386_dr_low_set_addr): Use it.
5331 (i386_dr_low_get_addr): New.
5332 (i386_dr_low_set_control): Use update_debug_registers_callback.
5333 (i386_dr_low_get_control): New.
5334 (i386_dr_low_get_status): Adjust.
5335 * linux-low.c (linux_stop_lwp): New.
5336 * linux-low.h (linux_stop_lwp): Declare.
5337
5338 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
5339 argument instead of a i386_debug_reg_state.
5340 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
5341 a i386_debug_reg_state.
5342 (i386_insert_aligned_watchpoint): Adjust.
5343 (i386_remove_aligned_watchpoint): Adjust.
5344 (i386_low_stopped_data_address): Read the debug registers from the
5345 inferior instead of from the mirrors.
5346 * i386-low.h (struct i386_debug_reg_state): Extend comment.
5347 (i386_dr_low_get_addr): Declare.
5348 (i386_dr_low_get_control): Declare.
5349 (i386_dr_low_get_status): Change prototype.
5350
5351 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
5352 (i386_dr_low_get_addr): New.
5353 (i386_dr_low_get_control): New.
5354 (i386_dr_low_get_status): Adjust prototype. Return
5355 dr_status_mirror.
5356 (i386_initial_stuff): Clear dr_status_mirror and
5357 dr_control_mirror.
5358 (i386_get_thread_context): Adjust.
5359 (i386_set_thread_context): Adjust.
5360 (i386_thread_added): Adjust.
5361
5f21a75b
PA
53622010-08-24 Pedro Alves <pedro@codesourcery.com>
5363
5364 * linux-low.h (linux_thread_area): Delete declaration.
5365
3e4c1235
TS
53662010-08-11 Thomas Schwinge <thomas@codesourcery.com>
5367
5368 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
5369 after its termination.
5370
1971b033
PA
53712010-08-09 Pedro Alves <pedro@codesourcery.com>
5372
5373 * linux-low.c (gdb_wants_lwp_stopped): Delete.
5374 (gdb_wants_all_stopped): Delete.
5375 (linux_wait_1): Don't call them.
5376 * server.c (handle_v_cont): Tag all threads as want-stopped.
5377 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
5378 stopped as "client-wants-stopped".
5379
310444ac
PA
53802010-07-31 Pedro Alves <pedro@codesourcery.com>
5381
5382 * Makefile.in (signals_h): New.
5383 (server_h): Depend on it.
5384 (server.o): Don't depend on $(signals_def).
5385 (signals.o): Depend on $(signals_def).
5386
a19cae16
JK
53872010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
5388
5389 * Makefile.in (signals_def): New.
5390 (server_h): Append include/gdb/signals.h and signals_def.
5391 (server.o): Append signals_def.
5392
30d50328
JK
53932010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5394
5395 * server.c (handle_target_event): Use target_signal_to_host for
5396 resume_info.sig initialization.
5397 * target.h (struct thread_resume) <sig>: New comment.
5398
5c3216e2
OS
53992010-07-20 Ozkan Sezer <sezeroz@gmail.com>
5400
c6f46ca0
OS
5401 * server.c (handle_query): strcpy() the returned string from paddress()
5402 instead of sprintf().
5c3216e2
OS
5403 * utils.c (paddress): Return phex_nz().
5404
6bd31874
JB
54052010-07-07 Joel Brobecker <brobecker@adacore.com>
5406
5407 * server.c (handle_v_cont): Call mourn_inferior if process
5408 just exited.
5409 (myresume): Likewise.
5410
0fb4aa4b
PA
54112010-07-01 Pedro Alves <pedro@codesourcery.com>
5412
5413 Static tracepoints, and integration with UST.
5414
5415 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
5416 * mem-break.c (uninsert_all_breakpoints)
5417 (reinsert_all_breakpoints): New.
5418 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
5419 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
5420 (gdb_agent_ust_loaded, helper_thread_id)
5421 (gdb_agent_helper_thread_id): New macros.
5422 (struct ipa_sym_addresses): Add addr_ust_loaded,
5423 addr_helper_thread_id, addr_cmd_buf.
5424 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
5425 (in_process_agent_loaded_ust): New.
5426 (write_e_ust_not_loaded): New.
5427 (maybe_write_ipa_ust_not_loaded): New.
5428 (struct collect_static_trace_data_action): New.
5429 (enum tracepoint_type) <static_tracepoint>: New.
5430 (struct tracepoint) <handle>: Mention static tracepoints.
5431 (struct static_tracepoint_ctx): New.
5432 (CMD_BUF_SIZE): New.
5433 (add_tracepoint_action): Handle static tracepoint actions.
5434 (unprobe_marker_at): New.
5435 (clear_installed_tracepoints): Handle static tracepoints.
5436 (cmd_qtdp): Handle static tracepoints.
5437 (probe_marker_at): New.
5438 (cmd_qtstart): Handle static tracepoints.
5439 (response_tracepoint): Handle static tracepoints.
5440 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
5441 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
5442 (get_context_regcache): Handle static tracepoints.
5443 (do_action_at_tracepoint): Handle static tracepoint actions.
5444 (traceframe_find_block_type): Handle static trace data blocks.
5445 (traceframe_read_sdata): New.
5446 (download_tracepoints): Download static tracepoint actions.
5447 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
5448 (GDB_PROBE_NAME): New.
5449 (ust_ops): New.
5450 (GET_UST_SYM): New.
5451 (USTF): New.
5452 (dlsym_ust): New.
5453 (ust_marker_to_static_tracepoint): New.
5454 (gdb_probe): New.
5455 (collect_ust_data_at_tracepoint): New.
5456 (gdb_ust_probe): New.
5457 (UNIX_PATH_MAX, SOCK_DIR): New.
5458 (gdb_ust_connect_sync_socket): New.
5459 (resume_thread, stop_thread): New.
5460 (run_inferior_command): New.
5461 (init_named_socket): New.
5462 (gdb_ust_socket_init): New.
5463 (cstr_to_hexstr): New.
5464 (next_st): New.
5465 (first_marker, next_marker): New.
5466 (response_ust_marker): New.
5467 (cmd_qtfstm, cmd_qtsstm): New.
5468 (unprobe_marker_at, probe_marker_at): New.
5469 (cmd_qtstmat, gdb_ust_thread): New.
5470 (gdb_ust_init): New.
5471 (initialize_tracepoint_ftlib): Call gdb_ust_init.
5472 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
5473 (ST_REGENTRY): New.
5474 (x86_64_st_collect_regmap): New.
5475 (X86_64_NUM_ST_COLLECT_GREGS): New.
5476 (AMD64_RIP_REGNUM): New.
5477 (supply_static_tracepoint_registers): New.
5478 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
5479 (ST_REGENTRY): New.
5480 (i386_st_collect_regmap): New.
5481 (i386_NUM_ST_COLLECT_GREGS): New.
5482 (supply_static_tracepoint_registers): New.
5483 * server.c (handle_query): Handle qXfer:statictrace:read.
5484 <qSupported>: Report support for StaticTracepoints, and
5485 qXfer:statictrace:read features.
5486 * server.h (traceframe_read_sdata)
5487 (supply_static_tracepoint_registers): Declare.
5488 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
5489 (unpack_varlen_hex): Include in IPA build.
5490 * Makefile.in (ustlibs, ustinc): New.
5491 (IPA_OBJS): Add remote-utils-ipa.o.
5492 ($(IPA_LIB)): Link -ldl and -lpthread.
5493 (UST_CFLAGS): New.
5494 (IPAGENT_CFLAGS): Add UST_CFLAGS.
5495 * config.in, configure: Regenerate.
5496
9e4344e5
PA
54972010-06-20 Ian Lance Taylor <iant@google.com>
5498 Pedro Alves <pedro@codesourcery.com>
5499
5500 * linux-x86-low.c (always_true): Delete.
5501 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
5502 trying to fool the compiler with always_true.
5503
c6beb2cb
PA
55042010-06-20 Pedro Alves <pedro@codesourcery.com>
5505
5506 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
5507 conditions in gdbserver.
5508
d2ed6730
UW
55092010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
5510
5511 * spu-low.c (spu_read_memory): Wrap around local store limit.
5512 (spu_write_memory): Likewise.
5513
4e29fb54
PA
55142010-06-15 Pedro Alves <pedro@codesourcery.com>
5515
5516 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
5517 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
5518 LONGEST uses.
5519 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
5520 uses.
5521 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
5522 uses with LONGEST uses.
5523
6a271cae
PA
55242010-06-14 Stan Shebs <stan@codesourcery.com>
5525 Pedro Alves <pedro@codesourcery.com>
5526
5527 Bytecode compiler.
5528
5529 * linux-x86-low.c: Include limits.h.
5530 (add_insns): New.
5531 (always_true): New.
5532 (EMIT_ASM): New.
5533 (EMIT_ASM32): New.
5534 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
5535 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
5536 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
5537 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
5538 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
5539 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
5540 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
5541 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
5542 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
5543 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
5544 (amd64_emit_void_call_2): New.
5545 (amd64_emit_ops): New.
5546 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
5547 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
5548 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
5549 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
5550 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
5551 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
5552 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
5553 (i386_emit_call, i386_emit_reg, i386_emit_pop)
5554 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
5555 (i386_emit_stack_adjust, i386_emit_int_call_1)
5556 (i386_emit_void_call_2): New.
5557 (i386_emit_ops): New.
5558 (x86_emit_ops): New.
5559 (the_low_target): Install x86_emit_ops.
5560 * server.h (struct emit_ops): New.
5561 (get_raw_reg_func_addr): Declare.
5562 (current_insn_ptr, emit_error): Declare.
5563 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
5564 (set_trace_state_variable_value): New defines.
5565 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
5566 addr_get_trace_state_variable_value and
5567 addr_set_trace_state_variable_value.
5568 (symbol_list): New fields for get_raw_reg,
5569 get_trace_state_variable_value and set_trace_state_variable_value.
5570 (condfn): New typedef.
5571 (struct tracepoint): New field `compiled_cond'.
5572 (do_action_at_tracepoint): Clear compiled_cond.
5573 (get_trace_state_variable_value, set_trace_state_variable_value):
5574 Export in the IPA.
5575 (condition_true_at_tracepoint): If there's a compiled condition,
5576 run that.
5577 (current_insn_ptr, emit_error): New globals.
5578 (struct bytecode_address): New.
5579 (get_raw_reg_func_addr): New.
5580 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
5581 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
5582 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
5583 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
5584 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
5585 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
5586 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
5587 (compile_tracepoint_condition, compile_bytecodes): New.
5588 * target.h (emit_ops): Forward declare.
5589 (struct target_ops): New field emit_ops.
5590 (target_emit_ops): New.
5591 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
5592 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
5593 * linux-low.c (linux_emit_ops): New.
5594 (linux_target_ops): Install it.
5595 * linux-low.h (struct linux_target_ops): New field emit_ops.
5596
92b72907
UW
55972010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
5598
5599 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
5600 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
5601
fa593d66
PA
56022010-06-01 Pedro Alves <pedro@codesourcery.com>
5603 Stan Shebs <stan@codesourcery.com>
5604
5605 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
5606 (all): Depend on $(extra_libraries).
5607 (install-only): Install the IPA.
5608 (IPA_OBJS, IPA_LIB): New.
5609 (clean): Remove the IPA lib.
5610 (IPAGENT_CFLAGS): New.
5611 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
5612 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
5613 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
5614 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
5615 * configure.ac: Check for atomic builtins support in the compiler.
5616 (IPA_DEPFILES, extra_libraries): Define.
5617 * configure.srv (ipa_obj): Add description.
5618 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
5619 (i[34567]86-*-linux*): Set ipa_obj.
5620 (x86_64-*-linux*): Set ipa_obj.
5621 * linux-low.c (stabilizing_threads): New.
5622 (supports_fast_tracepoints): New.
5623 (linux_detach): Stabilize threads before detaching.
5624 (handle_tracepoints): Handle internal tracing breakpoints. Assert
5625 the lwp is either not stabilizing, or is moving out of a jump pad.
5626 (linux_fast_tracepoint_collecting): New.
5627 (maybe_move_out_of_jump_pad): New.
5628 (enqueue_one_deferred_signal): New.
5629 (dequeue_one_deferred_signal): New.
5630 (linux_wait_for_event_1): If moving out of a jump pad, defer
5631 pending signals to later.
5632 (linux_stabilize_threads): New.
5633 (linux_wait_1): Check if threads need moving out of jump pads, and
5634 do it if so.
5635 (stuck_in_jump_pad_callback): New.
5636 (move_out_of_jump_pad_callback): New.
5637 (lwp_running): New.
5638 (linux_resume_one_lwp): Handle moving out of jump pads.
5639 (linux_set_resume_request): Dequeue deferred signals.
5640 (need_step_over_p): Also step over fast tracepoint jumps.
5641 (start_step_over): Also uninsert fast tracepoint jumps.
5642 (finish_step_over): Also reinsert fast tracepoint jumps.
5643 (linux_install_fast_tracepoint_jump): New.
5644 (linux_target_ops): Install linux_stabilize_threads and
5645 linux_install_fast_tracepoint_jump_pad.
5646 * linux-low.h (linux_target_ops) <get_thread_area,
5647 install_fast_tracepoint_jump_pad>: New fields.
5648 (struct lwp_info) <collecting_fast_tracepoint,
5649 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
5650 (linux_get_thread_area): Declare.
5651 * linux-x86-low.c (jump_insn): New.
5652 (x86_get_thread_area): New.
5653 (append_insns): New.
5654 (push_opcode): New.
5655 (amd64_install_fast_tracepoint_jump_pad): New.
5656 (i386_install_fast_tracepoint_jump_pad): New.
5657 (x86_install_fast_tracepoint_jump_pad): New.
5658 (the_low_target): Install x86_get_thread_area and
5659 x86_install_fast_tracepoint_jump_pad.
5660 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
5661 (struct fast_tracepoint_jump): New.
5662 (fast_tracepoint_jump_insn): New.
5663 (fast_tracepoint_jump_shadow): New.
5664 (find_fast_tracepoint_jump_at): New.
5665 (fast_tracepoint_jump_here): New.
5666 (delete_fast_tracepoint_jump): New.
5667 (set_fast_tracepoint_jump): New.
5668 (uninsert_fast_tracepoint_jumps_at): New.
5669 (reinsert_fast_tracepoint_jumps_at): New.
5670 (set_breakpoint_at): Use write_inferior_memory.
5671 (uninsert_raw_breakpoint): Use write_inferior_memory.
5672 (check_mem_read): Mask out fast tracepoint jumps.
5673 (check_mem_write): Mask out fast tracepoint jumps.
5674 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
5675 (set_fast_tracepoint_jump): Declare.
5676 (delete_fast_tracepoint_jump)
5677 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
5678 (reinsert_fast_tracepoint_jumps_at): Declare.
5679 * regcache.c: Don't compile many functions when building the
5680 in-process agent library.
5681 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
5682 the register buffer in the heap.
5683 (free_register_cache): If the register buffer isn't owned by the
5684 regcache, don't free it.
5685 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
5686 pre-existing register caches.
5687 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
5688 type.
5689 (convert_ascii_to_int): : Constify `from' parameter type.
5690 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
5691 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
5692 the needed buffer in-place.
5693 (relocate_instruction): New.
5694 * server.c (handle_query) <qSymbols>: If the target supports
5695 tracepoints, give it a chance of looking up symbols. Report
5696 support for fast tracepoints.
5697 (handle_status): Stabilize threads.
5698 (process_serial_event): Adjust.
5699 * server.h (struct fast_tracepoint_jump): Forward declare.
5700 (struct process_info) <fast_tracepoint_jumps>: New field.
5701 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
5702 (decode_X_packet, decode_M_packet): Adjust.
5703 (relocate_instruction): Declare.
5704 (in_process_agent_loaded): Declare.
5705 (tracepoint_look_up_symbols): Declare.
5706 (struct fast_tpoint_collect_status): Declare.
5707 (fast_tracepoint_collecting): Declare.
5708 (force_unlock_trace_buffer): Declare.
5709 (handle_tracepoint_bkpts): Declare.
5710 (initialize_low_tracepoint)
5711 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
5712 * target.h (struct target_ops) <stabilize_threads,
5713 install_fast_tracepoint_jump_pad>: New fields.
5714 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
5715 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
5716 [HAVE_STDINT_H]: Include stdint.h.
5717 (trace_debug_1): Rename to ...
5718 (trace_vdebug): ... this.
5719 (trace_debug): Rename to ...
5720 (trace_debug_1): ... this. Add `level' parameter.
5721 (trace_debug): New.
5722 (ATTR_USED, ATTR_NOINLINE): New.
5723 (IP_AGENT_EXPORT): New.
5724 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5725 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
5726 (about_to_request_buffer_space, trace_buffer_is_full)
5727 (stopping_tracepoint, expr_eval_result, error_tracepoint)
5728 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
5729 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
5730 (traceframe_write_count, traceframes_created)
5731 (trace_state_variables)
5732 New renaming defines.
5733 (struct ipa_sym_addresses): New.
5734 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
5735 (symbol_list): New.
5736 (ipa_sym_addrs): New.
5737 (all_tracepoint_symbols_looked_up): New.
5738 (in_process_agent_loaded): New.
5739 (write_e_ipa_not_loaded): New.
5740 (maybe_write_ipa_not_loaded): New.
5741 (tracepoint_look_up_symbols): New.
5742 (debug_threads) [IN_PROCESS_AGENT]: New.
5743 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
5744 (UNKNOWN_SIDE_EFFECTS): New.
5745 (stop_tracing): New.
5746 (flush_trace_buffer): New.
5747 (stop_tracing_bkpt): New.
5748 (flush_trace_buffer_bkpt): New.
5749 (read_inferior_integer): New.
5750 (read_inferior_uinteger): New.
5751 (read_inferior_data_pointer): New.
5752 (write_inferior_data_pointer): New.
5753 (write_inferior_integer): New.
5754 (write_inferior_uinteger): New.
5755 (struct collect_static_trace_data_action): Delete.
5756 (enum tracepoint_type): New.
5757 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
5758 <actions_str, step_actions, step_actions_str>: Only include in
5759 GDBserver.
fa593d66
PA
5760 <orig_size, obj_addr_on_target, adjusted_insn_addr>
5761 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
5762 (tracepoints): Use IP_AGENT_EXPORT.
5763 (last_tracepoint): Don't include in the IPA.
5764 (stopping_tracepoint): Use IP_AGENT_EXPORT.
5765 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
5766 (alloced_trace_state_variables): New.
5767 (trace_state_variables): Use IP_AGENT_EXPORT.
5768 (traceframe_t): Delete unused variable.
5769 (circular_trace_buffer): Don't include in the IPA.
5770 (trace_buffer_start): Delete.
5771 (struct trace_buffer_control): New.
5772 (trace_buffer_free): Delete.
5773 (struct ipa_trace_buffer_control): New.
5774 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
5775 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
5776 New.
5777 (trace_buffer_ctrl): New.
5778 (TRACE_BUFFER_CTRL_CURR): New.
5779 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
5780 Reimplement as macros.
5781 (trace_buffer_wrap): Delete.
5782 (traceframe_write_count, traceframe_read_count)
5783 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
5784 (struct tracepoint_hit_ctx) <type>: New field.
5785 (struct fast_tracepoint_ctx): New.
5786 (memory_barrier): New.
5787 (cmpxchg): New.
5788 (record_tracepoint_error): Update atomically in the IPA.
5789 (clear_inferior_trace_buffer): New.
5790 (about_to_request_buffer_space): New.
5791 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
5792 updating the same buffer.
5793 (add_tracepoint): Default the tracepoint's type to trap
5794 tracepoint, and orig_size to -1.
5795 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
5796 internal variables.
5797 (create_trace_state_variable): New parameter `gdb'. Handle it.
5798 (clear_installed_tracepoints): Clear fast tracepoint jumps.
5799 (cmd_qtdp): Handle fast tracepoints.
5800 (cmd_qtdv): Adjust.
5801 (max_jump_pad_size): New.
5802 (gdb_jump_pad_head): New.
5803 (get_jump_space_head): New.
5804 (claim_jump_space): New.
5805 (sort_tracepoints): New.
5806 (MAX_JUMP_SIZE): New.
5807 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
5808 IPA.
5809 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
5810 support. Upload fast traceframes, and delete internal IPA
5811 breakpoints.
5812 (stop_tracing_handler): New.
5813 (flush_trace_buffer_handler): New.
5814 (cmd_qtstop): Upload fast tracepoints.
5815 (response_tracepoint): Handle fast tracepoints.
5816 (tracepoint_finished_step): Upload fast traceframes. Set the
5817 tracepoint hit context's tracepoint type.
5818 (handle_tracepoint_bkpts): New.
5819 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
5820 type. Add comment about fast tracepoints.
5821 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
5822 non-existing action_str field.
5823 (get_context_regcache): Handle fast tracepoints.
5824 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
5825 to the regcache.
5826 (fast_tracepoint_from_jump_pad_address): New.
5827 (fast_tracepoint_from_ipa_tpoint_address): New.
5828 (collecting_t): New.
5829 (force_unlock_trace_buffer): New.
5830 (fast_tracepoint_collecting): New.
5831 (collecting): New.
5832 (gdb_collect): New.
5833 (write_inferior_data_ptr): New.
5834 (target_tp_heap): New.
5835 (target_malloc): New.
5836 (download_agent_expr): New.
5837 (UALIGN): New.
5838 (download_tracepoints): New.
5839 (download_trace_state_variables): New.
5840 (upload_fast_traceframes): New.
5841 (IPA_FIRST_TRACEFRAME): New.
5842 (IPA_NEXT_TRACEFRAME_1): New.
5843 (IPA_NEXT_TRACEFRAME): New.
5844 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
5845 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
5846 (gdb_jump_pad_buffer_end): New.
5847 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
5848 (initialize_tracepoint): Adjust.
5849 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
5850 buffer. Initialize the low module.
5851 * utils.c (PREFIX, TOOLNAME): New.
5852 (malloc_failure): Use PREFIX.
5853 (error): In the IPA, an error causes an exit.
5854 (fatal, warning): Use PREFIX.
5855 (internal_error): Use TOOLNAME.
5856 (NUMCELLS): Increase to 10.
5857 * configure, config.in: Regenerate.
5858
d149dd1d
PA
58592010-06-01 Pedro Alves <pedro@codesourcery.com>
5860
5861 * server.c (handle_query) <qSupported>: Do two passes over the
5862 qSupported string to avoid nesting strtok.
5863
f6528abd
JK
58642010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5865
5866 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
5867 (CDEPS): New.
5868 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
5869 -Wl,--dynamic-list.
5870 * configure: Regenerate.
5871 * proc-service.list: New.
5872
ca2a87a0
JK
58732010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5874
5875 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
5876 New comment.
5877
363a6e9f
OS
58782010-05-26 Ozkan Sezer <sezeroz@gmail.com>
5879
5880 * gdbreplay.c (remote_open): Check error return from socket() call by
5881 its equality to -1 not by it being negative.
5882 * remote-utils.c (remote_open): Likewise.
5883
d23b6cb1
PA
58842010-05-23 Pedro Alves <pedro@codesourcery.com>
5885
5886 * config.h: Regenerate.
5887
28d3cf85
MK
58882010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
5889
5890 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
5891 doesn't provide PTRACE_GET_THREAD_AREA.
5892
fea36a59
MK
58932010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
5894
5895 * linux-m68k-low.c: Include <asm/ptrace.h>
5896 (ps_get_thread_area): Implement.
5897
24b066ba
DE
58982010-05-03 Doug Evans <dje@google.com>
5899
5900 * event-loop.c (struct callback_event): New struct.
5901 (callback_list): New global.
5902 (append_callback_event, delete_callback_event): New functions.
5903 (process_callback): New function.
5904 (start_event_loop): Call it.
5905 * remote-utils.c (NOT_SCHEDULED): Define.
5906 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
5907 moved out of readchar.
5908 (readchar): Rewrite. Call reschedule before returning.
5909 (reset_readchar): New function.
5910 (remote_close): Call it.
5911 (process_remaining, reschedule): New functions.
5912 * server.h (callback_handler_func): New typedef.
5913 (append_callback_event, delete_callback_event): Declare.
5914
9836d6ea
PA
59152010-05-03 Pedro Alves <pedro@codesourcery.com>
5916
5917 * proc-service.c (ps_pglobal_lookup): Use
5918 thread_db_look_up_one_symbol.
5919 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
5920 parameter. Use it instead of all_symbols_looked_up.
5921 * server.h (struct process_info) <all_symbols_looked_up>: Delete
5922 field.
5923 (all_symbols_looked_up): Don't declare.
5924 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
5925 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
5926 field.
5927 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
5928 Set all_symbols_looked_up here.
5929 (thread_db_look_up_one_symbol): New.
5930 (thread_db_get_tls_address): Adjust.
5931 (thread_db_load_search, try_thread_db_load_1): Always allocate the
5932 thread_db object on the heap, and tentatively set it in the
5933 process structure.
5934 (thread_db_init): Don't set all_symbols_looked_up here.
5935 * linux-low.h (thread_db_look_up_one_symbol): Declare.
5936
7984d532
PA
59372010-05-03 Pedro Alves <pedro@codesourcery.com>
5938
5939 * linux-low.c (linux_kill, linux_detach): Adjust.
5940 (status_pending_p_callback): Remove redundant statement. Check
5941 for !TARGET_WAITIKIND_IGNORE, instead of
5942 TARGET_WAITKIND_STOPPED.
5943 (handle_tracepoints): Make sure LWP is locked. Adjust.
5944 (linux_wait_for_event_1): Adjust.
5945 (linux_cancel_breakpoints): New.
5946 (unsuspend_one_lwp): New.
5947 (unsuspend_all_lwps): New.
5948 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
5949 (send_sigstop_callback): Change return type to int, add new
5950 `except' parameter and handle it.
5951 (suspend_and_send_sigstop_callback): New.
5952 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
5953 pass them down. If SUSPEND, also increment the lwp's suspend
5954 count.
5955 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
5956 (need_step_over_p): Don't consider suspended LWPs.
5957 (start_step_over): Adjust.
5958 (proceed_one_lwp): Change return type to int, add new `except'
5959 parameter and handle it.
5960 (unsuspend_and_proceed_one_lwp): New.
5961 (proceed_all_lwps): Use find_inferior instead of
5962 for_each_inferior.
5963 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
5964 also decrement the suspend count of LWPs. Pass `except' down,
5965 instead of hacking its suspend count.
5966 (linux_pause_all): Add `freeze' parameter. Adjust.
5967 (linux_unpause_all): New.
5968 (linux_target_ops): Install linux_unpause_all.
5969 * server.c (handle_status): Adjust.
5970 * target.h (struct target_ops): New fields `unpause_all' and
5971 `cancel_breakpoints'. Add new parameter to `pause_all'.
5972 (pause_all): Add new `freeze' parameter.
5973 (unpause_all): New.
5974 (cancel_breakpoints): New.
5975 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
5976 cancel breakpoints.
5977 (cmd_qtstart): Pause threads.
5978 (stop_tracing): Pause threads, and cancel breakpoints.
5979 * win32-low.c (win32_target_ops): Adjust.
5980
e471f25b
PA
59812010-05-03 Pedro Alves <pedro@codesourcery.com>
5982
5983 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
5984 the inferior right away from here...
5985 (linux_wait_1): ... to here, and adjust to check the thread's
5986 last_resume_kind instead of the lwp's step or stop_expected flags.
5987
1915ef4f
PA
59882010-05-02 Pedro Alves <pedro@codesourcery.com>
5989
5990 * README: Use consistent `GDB' and `GDBserver' spellings.
5991
f9e39928
PA
59922010-05-02 Pedro Alves <pedro@codesourcery.com>
5993
5994 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
5995 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
5996 (linux_detach_one_lwp): Assume the lwp is stopped.
5997 (any_thread_of): Delete.
5998 (linux_detach): Stop all lwps here. Don't blindly delete all
5999 breakpoints.
6000 (delete_lwp_callback): New.
6001 (linux_mourn): Delete all lwps of the process that is gone.
6002 (linux_wait_1): Don't delete the last lwp of the process here.
6003 * mem-break.h (mark_breakpoints_out): Declare.
6004 * mem-break.c (mark_breakpoints_out): New.
6005 (free_all_breakpoints): Use it.
6006 * server.c (handle_target_event): If the process is gone, mark
6007 breakpoints out.
6008 * thread-db.c (struct thread_db) <create_bp>: New field.
6009 (thread_db_enable_reporting): Fix prototype. Store a thread event
6010 breakpoint reference in the thread_db struct.
6011 (thread_db_load_search): Clear the thread_db object.
6012 (try_thread_db_load_1): Ditto.
6013 (switch_to_process): New.
6014 (disable_thread_event_reporting): Use it.
6015 (remove_thread_event_breakpoints): New.
6016 (thread_db_detach, thread_db_mourn): Use it.
6017
1e7fc18c
PA
60182010-05-01 Pedro Alves <pedro@codesourcery.com>
6019
6020 * linux-low.c (linux_enable_event_reporting): New.
6021 (linux_wait_for_event_1, handle_extended_wait): Use it.
6022
02fc4de7
PA
60232010-04-30 Pedro Alves <pedro@codesourcery.com>
6024
6025 * linux-low.c (linux_kill_one_lwp, linux_kill)
6026 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
6027 (send_sigstop): Take an lwp_info as parameter instead. Queue a
6028 SIGSTOP even if the LWP is stopped.
6029 (send_sigstop_callback): New.
6030 (stop_all_lwps): Use send_sigstop_callback instead.
6031 (linux_resume_one_thread): Adjust.
6032 (proceed_one_lwp): Still proceed an LWP that the client has
6033 requested to stop, if we haven't reported it as stopped yet. Make
6034 sure that LWPs the client want stopped, have a pending SIGSTOP.
6035
bc3b5632
DE
60362010-04-26 Doug Evans <dje@google.com>
6037
ae1ada35
DE
6038 * server.c (handle_general_set): Make static.
6039
bc3b5632
DE
6040 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
6041 Print received char after testing for error/eof instead of before.
6042 (input_interrupt): Tweak comment.
6043
65730243
DE
60442010-04-23 Doug Evans <dje@google.com>
6045
6046 * server.c (start_inferior): Print inferior argv if --debug.
6047
a8ae7dc0
AR
60482010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
6049
6050 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
6051 * nto-x86-low.c: Include server.h
6052
1c07cc19
PM
60532010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
6054
6055 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
6056 be consistent with other sources of this directory.
6057 (init_registers_amd64): Correct name of source file of this function
6058 in the comment.
6059
e0a61e09
PM
60602010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6061
6062 * configure.srv (x86_64-*-mingw*): New configuration for Windows
6063 64-bit executables.
6064
54709339
PM
60652010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6066
6067 * win32-i386-low.c: Add 64-bit support.
6068 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
6069 (init_registers_amd64): Declare.
6070 (mappings): Add 64-bit version of array.
6071 (init_windows_x86): New function.
6072 (the_low_target): Change init_arch field to init_windows_x86.
6073
e8f0053d
PM
60742010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6075
6076 * win32-low.c: Adapt to support also 64-bit architecture.
6077 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
6078 (get_image_name): Use SIZE_T type for local variable `done'.
6079 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
6080 (toolhelp_get_dll_name): Idem.
6081 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
6082 Use uintptr_t typecast to avoid warning.
6083 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
6084 (handle_exception): Use phex_nz to avoid warning.
6085 (win32_wait): Remove unused local variable `process'.
6086
c481e77e
PM
60872010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6088
6089 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
6090 `amd64-avx.o'.
6091
12ea4b69
PM
60922010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
6093
6094 * configure.ac: Use `ws2_32' library for srv_mingw.
6095 * configure: Regenerate.
6096 * gdbreplay.c: Include winsock2.h instead of winsock.h.
6097 * remote-utils.c: Likewise.
6098
f6d1620c
L
60992010-04-17 H.J. Lu <hongjiu.lu@intel.com>
6100
6101 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
6102 if __x86_64__ is defined.
6103
8e642873
PM
61042010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6105
6106 * configure: Regenerate.
6107
711e434b
PM
61082010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6109
6110 * server.c (handle_query): Handle 'qGetTIBAddr' query.
6111 * target.h (target_ops): New get_tib_address field.
6112 * win32-low.h (win32_thread_info): Add thread_local_base field.
6113 * win32-low.c (child_add_thread): Add tlb argument.
6114 Set thread_local_base field to TLB.
6115 (get_child_debug_event): Adapt to child_add_thread change.
6116 (win32_get_tib_address): New function.
6117 (win32_target_ops): Set get_tib_address field to
6118 win32_get_tib_address.
6119 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
6120
505106cd
PA
61212010-04-12 Pedro Alves <pedro@codesourcery.com>
6122
505106cd
PA
6123 * linux-low.c (linux_mourn): Also remove the process.
6124 * server.c (handle_target_event): Don't remove the process here.
6125 * nto-low.c (nto_mourn): New.
6126 (nto_target_ops): Install it.
6127 * spu-low.c (spu_mourn): New.
6128 (spu_target_ops): Install it.
6129 * win32-low.c (win32_mourn): New.
6130 (win32_target_ops): Install it.
6131
e8470a06
PA
61322010-04-12 Pedro Alves <pedro@codesourcery.com>
6133
6134 * server.h (buffer_xml_printf): Remove redundant `;'.
6135
45ba0d02
PA
61362010-04-12 Pedro Alves <pedro@codesourcery.com>
6137
6138 * regcache.c (set_register_cache): Invalidate regcaches before
6139 changing the register cache layout.
6140 (regcache_invalidate_one): Allow a NULL regcache.
6141 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
6142 regcaches before changing the register cache layout or the target
6143 regsets.
6144
59e04013
L
61452010-04-12 H.J. Lu <hongjiu.lu@intel.com>
6146
6147 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
6148 variable warning on Linux/x86-64.
6149
8336d594
PA
61502010-04-11 Pedro Alves <pedro@codesourcery.com>
6151
6152 GDBserver disconnected tracing support.
6153
6154 * linux-low.c (linux_remove_process): Delete.
6155 (add_lwp): Don't set last_resume_kind here.
6156 (linux_kill): Use `mourn'.
6157 (linux_detach): Use `thread_db_detach', and `mourn'.
6158 (linux_mourn): New.
6159 (linux_attach_lwp_1): Adjust comment.
6160 (linux_attach): last_resume_kind moved the thread_info; adjust.
6161 (status_pending_p_callback): Adjust.
6162 (linux_wait_for_event_1): Adjust.
6163 (count_events_callback, select_singlestep_lwp_callback)
6164 (select_event_lwp_callback, cancel_breakpoints_callback)
6165 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
6166 (proceed_one_lwp): Adjust.
6167 (linux_async): Add debug output.
6168 (linux_thread_stopped): New.
6169 (linux_pause_all): New.
6170 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
6171 linux_pause_all.
6172 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
6173 (thread_db_free): Delete declaration.
6174 (thread_db_detach, thread_db_mourn): Declare.
6175 * thread-db.c (thread_db_init): Use thread_db_mourn.
6176 (thread_db_free): Delete, split in two.
6177 (disable_thread_event_reporting): New.
6178 (thread_db_detach): New.
6179 (thread_db_mourn): New.
6180
6181 * server.h (struct thread_info) <last_resume_kind>: New field.
6182 <attached>: Add comment.
6183 <gdb_detached>: New field.
6184 (handler_func): Change return type to int.
6185 (handle_serial_event, handle_target_event): Ditto.
6186 (gdb_connected): Declare.
6187 (tracing): Delete.
6188 (disconnected_tracing): Declare.
6189 (stop_tracing): Declare.
6190
6191 * server.c (handle_query) <qSupported>: Report support for
6192 disconnected tracing.
6193 (queue_stop_reply_callback): Account for running threads.
6194 (gdb_wants_thread_stopped): New.
6195 (gdb_wants_all_threads_stopped): New.
6196 (gdb_reattached_process): New.
6197 (handle_status): Clear the `gdb_detached' flag of all processes.
6198 In all-stop, stop all threads.
6199 (main): Be sure to leave tfind mode. Handle disconnected tracing.
6200 (process_serial_event): If the remote connection breaks, or if an
6201 exit was forced with "monitor exit", force an event loop exit.
6202 Handle disconnected tracing on detach.
6203 (handle_serial_event): Adjust.
6204 (handle_target_event): If GDB isn't connected, forward events back
6205 to the inferior, unless the last process exited, in which case,
6206 exit gdbserver. Adjust interface.
6207
6208 * remote-utils.c (remote_open): Don't block in accept. Instead
6209 register an event loop source on the listen socket file
6210 descriptor. Refactor bits into ...
6211 (listen_desc): ... this new global.
6212 (gdb_connected): ... this new function.
6213 (enable_async_notification): ... this new function.
6214 (handle_accept_event): ... this new function.
6215 (remote_close): Clear remote_desc.
6216
6217 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
6218
6219 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
6220 New fields.
6221 (mourn_inferior): Define.
6222 (target_process_qsupported): Avoid the dangling else problem.
6223 (thread_stopped): Define.
6224 (pause_all): Define.
6225 (target_waitstatus_to_string): Declare.
6226 * target.c (target_waitstatus_to_string): New.
6227
6228 * tracepoint.c (tracing): Make extern.
6229 (disconnected_tracing): New.
6230 (stop_tracing): Make extern. Handle tracing stops due to GDB
6231 disconnecting.
6232 (cmd_qtdisconnected): New.
6233 (cmd_qtstatus): Report disconnected tracing status in trace reply.
6234 (handle_tracepoint_general_set): Handle QTDisconnected.
6235
6236 * event-loop.c (event_handler_func): Change return type to int.
6237 (process_event): Bail out if the event handler wants the event
6238 loop to stop.
6239 (handle_file_event): Ditto.
6240 (start_event_loop): Bail out if the event handler wants the event
6241 loop to stop.
6242
6243 * nto-low.c (nto_target_ops): Adjust.
6244 * spu-low.c (spu_wait): Don't remove the process here.
6245 (spu_target_ops): Adjust.
6246 * win32-low.c (win32_wait): Don't remove the process here.
6247 (win32_target_ops): Adjust.
6248
5d267c4c
PA
62492010-04-11 Pedro Alves <pedro@codesourcery.com>
6250
6251 * regcache.c (realloc_register_cache): Invalidate inferior's
6252 regcache before recreating it.
6253
623ccd72
PA
62542010-04-09 Pedro Alves <pedro@codesourcery.com>
6255
6256 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
6257
219f2f23
PA
62582010-04-09 Stan Shebs <stan@codesourcery.com>
6259 Pedro Alves <pedro@codesourcery.com>
6260
6261 * server.h (LONGEST): New.
6262 (struct thread_info) <while_stepping>: New field.
6263 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
6264 Declare.
6265 (initialize_tracepoint, handle_tracepoint_general_set)
6266 (handle_tracepoint_query, tracepoint_finished_step)
6267 (tracepoint_was_hit, release_while_stepping_state_list):
6268 (current_traceframe): Declare.
6269 * server.c (handle_general_set): Handle tracepoint packets.
6270 (read_memory): New.
6271 (write_memory): New.
6272 (handle_search_memory_1): Use read_memory.
6273 (handle_query): Report support for conditional tracepoints, trace
6274 state variables, and tracepoint sources. Handle tracepoint
6275 queries.
6276 (main): Initialize the tracepoints module.
6277 (process_serial_event): Handle traceframe reads/writes.
6278
6279 * linux-low.c (handle_tracepoints): New.
6280 (linux_wait_1): Call it.
6281 (linux_resume_one_lwp): Handle while-stepping.
6282 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
6283 (linux_target_ops): Install them.
6284 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
6285 New field.
6286 * linux-x86-low.c (x86_supports_tracepoints): New.
6287 (the_low_target). Install it.
6288
6289 * mem-break.h (delete_breakpoint): Declare.
6290 * mem-break.c (delete_breakpoint): Make external.
6291
6292 * target.h (struct target_ops): Add `supports_tracepoints',
6293 `read_pc', and `write_pc' fields.
6294 (target_supports_tracepoints): Define.
6295 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
6296 (phex_nz): New.
6297
6298 * regcache.h (struct regcache) <registers_owned>: New field.
6299 (init_register_cache, regcache_cpy): Declare.
6300 (regcache_read_pc, regcache_write_pc): Declare.
6301 (register_cache_size): Declare.
6302 (supply_regblock): Declare.
6303 * regcache.c (init_register_cache): New.
6304 (new_register_cache): Use it.
6305 (regcache_cpy): New.
6306 (register_cache_size): New.
6307 (supply_regblock): New.
6308 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 6309
219f2f23
PA
6310 * tracepoint.c: New.
6311
6312 * Makefile.in (OBS): Add tracepoint.o.
6313 (tracepoint.o): New rule.
6314
3a13a53b
L
63152010-04-08 H.J. Lu <hongjiu.lu@intel.com>
6316
6317 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
6318 (i386-mmx.o): New.
6319 (i386-mmx.c): Likewise.
6320 (i386-mmx-linux.o): Likewise.
6321 (i386-mmx-linux.c): Likewise.
6322
6323 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
6324 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
6325 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
6326 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
6327
6328 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
6329 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
6330 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
6331
1570b33e
L
63322010-04-07 H.J. Lu <hongjiu.lu@intel.com>
6333
6334 * Makefile.in (clean): Updated.
6335 (i386-avx.o): New.
6336 (i386-avx.c): Likewise.
6337 (i386-avx-linux.o): Likewise.
6338 (i386-avx-linux.c): Likewise.
6339 (amd64-avx.o): Likewise.
6340 (amd64-avx.c): Likewise.
6341 (amd64-avx-linux.o): Likewise.
6342 (amd64-avx-linux.c): Likewise.
6343
6344 * configure.srv (srv_i386_regobj): Add i386-avx.o.
6345 (srv_i386_linux_regobj): Add i386-avx-linux.o.
6346 (srv_amd64_regobj): Add amd64-avx.o.
6347 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
6348 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
6349 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
6350 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
6351 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
6352 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
6353 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
6354
6355 * i387-fp.c: Include "i386-xstate.h".
6356 (i387_xsave): New.
6357 (i387_cache_to_xsave): Likewise.
6358 (i387_xsave_to_cache): Likewise.
6359 (x86_xcr0): Likewise.
6360
6361 * i387-fp.h (i387_cache_to_xsave): Likewise.
6362 (i387_xsave_to_cache): Likewise.
6363 (x86_xcr0): Likewise.
6364
6365 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
6366 * linux-crisv32-low.c (target_regsets): Likewise.
6367 * linux-m68k-low.c (target_regsets): Likewise.
6368 * linux-mips-low.c (target_regsets): Likewise.
6369 * linux-ppc-low.c (target_regsets): Likewise.
6370 * linux-s390-low.c (target_regsets): Likewise.
6371 * linux-sh-low.c (target_regsets): Likewise.
6372 * linux-sparc-low.c (target_regsets): Likewise.
6373 * linux-xtensa-low.c (target_regsets): Likewise.
6374
6375 * linux-low.c: Include <sys/uio.h>.
6376 (regsets_fetch_inferior_registers): Support nt_type.
6377 (regsets_store_inferior_registers): Likewise.
6378 (linux_process_qsupported): New.
6379 (linux_target_ops): Add linux_process_qsupported.
6380
6381 * linux-low.h (regset_info): Add nt_type.
6382 (linux_target_ops): Add process_qsupported.
6383
6384 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
6385 and <sys/uio.h>.
6386 (init_registers_i386_avx_linux): New.
6387 (init_registers_amd64_avx_linux): Likewise.
6388 (xmltarget_i386_linux_no_xml): Likewise.
6389 (xmltarget_amd64_linux_no_xml): Likewise.
6390 (PTRACE_GETREGSET): Likewise.
6391 (PTRACE_SETREGSET): Likewise.
6392 (x86_fill_xstateregset): Likewise.
6393 (x86_store_xstateregset): Likewise.
6394 (use_xml): Likewise.
6395 (x86_linux_update_xmltarget): Likewise.
6396 (x86_linux_process_qsupported): Likewise.
6397 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
6398 (x86_arch_setup): Don't call init_registers_amd64_linux nor
6399 init_registers_i386_linux here. Call
6400 x86_linux_update_xmltarget.
6401 (the_low_target): Add x86_linux_process_qsupported.
6402
6403 * server.c (handle_query): Call target_process_qsupported.
6404
6405 * target.h (target_ops): Add process_qsupported.
6406 (target_process_qsupported): New.
6407
fc7238bb
PA
64082010-04-03 Pedro Alves <pedro@codesourcery.com>
6409
6410 * inferiors.c (add_thread): Set last_status kind to
6411 TARGET_WAITKIND_IGNORE.
6412 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
6413 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
6414 (linux_wait_1): Move `thread' local definition to block that uses
6415 it. Don't NULL initialize `event_child'.
6416 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
6417 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
6418 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
6419
bdabb078
PA
64202010-04-01 Pedro Alves <pedro@codesourcery.com>
6421
6422 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
6423 an extended waitstatus, or by a watchpoint.
6424 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
6425 thread was stepping or has been stopped by a watchpoint.
6426
d3bbe7a0
PA
64272010-04-01 Pedro Alves <pedro@codesourcery.com>
6428
6429 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
6430 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
6431 of another, then delete the previous, and validate all
6432 breakpoints.
6433 (validate_inserted_breakpoint): New.
6434 (delete_disabled_breakpoints): New.
6435 (validate_breakpoints): New.
6436 (check_mem_read): Validate breakpoints before trusting their
6437 shadow. Delete disabled breakpoints.
6438 (check_mem_write): Validate breakpoints before trusting they
6439 should be inserted. Delete disabled breakpoints.
6440 * mem-break.h (validate_breakpoints):
6441 * server.c (handle_query): Validate breakpoints when we see a
6442 qSymbol query.
6443
8b07ae33
PA
64442010-04-01 Pedro Alves <pedro@codesourcery.com>
6445
6446 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
6447 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
6448 if we could tell there's a GDB breakpoint at stop_pc.
6449 (need_step_over_p): Don't do a step over if we find a GDB
6450 breakpoint at the resume PC.
6451
6452 * mem-break.c (struct raw_breakpoint): New.
6453 (enum bkpt_type): New type `gdb_breakpoint'.
6454 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
6455 fields. New field `raw'.
6456 (find_raw_breakpoint_at): New.
6457 (set_raw_breakpoint_at): Handle refcounting. Create a raw
6458 breakpoint instead.
6459 (set_breakpoint_at): Adjust.
6460 (delete_raw_breakpoint): New.
6461 (release_breakpoint): New.
6462 (delete_breakpoint): Rename to...
6463 (delete_breakpoint_1): ... this. Add proc parameter. Use
6464 release_breakpoint. Return ENOENT.
6465 (delete_breakpoint): Reimplement.
6466 (find_breakpoint_at): Delete.
6467 (find_gdb_breakpoint_at): New.
6468 (delete_breakpoint_at): Delete.
6469 (set_gdb_breakpoint_at): New.
6470 (delete_gdb_breakpoint_at): New.
6471 (gdb_breakpoint_here): New.
6472 (set_reinsert_breakpoint): Use release_breakpoint.
6473 (uninsert_breakpoint): Rename to ...
6474 (uninsert_raw_breakpoint): ... this.
6475 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
6476 (reinsert_raw_breakpoint): Change parameter type to
6477 raw_breakpoint.
6478 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
6479 instead.
6480 (check_breakpoints): Adjust. Use release_breakpoint.
6481 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
6482 (breakpoint_inserted_here): Ditto.
6483 (check_mem_read): Adjust to iterate over raw breakpoints instead.
6484 Don't trust the breakpoint's shadow if it is not inserted.
6485 (check_mem_write): Adjust to iterate over raw breakpoints instead.
6486 (delete_all_breakpoints): Adjust.
6487 (free_all_breakpoints): Mark all breakpoints as uninserted, and
6488 use delete_breakpoint_1.
6489
6490 * mem-break.h (breakpoints_supported): Delete declaration.
6491 (set_gdb_breakpoint_at): Declare.
6492 (gdb_breakpoint_here): Declare.
6493 (delete_breakpoint_at): Delete.
6494 (delete_gdb_breakpoint_at): Declare.
6495
6496 * server.h (struct raw_breakpoint): Forward declare.
6497 (struct process_info): New field `raw_breakpoints'.
6498
6499 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
6500 breakpoints.
6501
6bf5e0ba
PA
65022010-03-24 Pedro Alves <pedro@codesourcery.com>
6503
6504 * linux-low.c (status_pending_p_callback): Fix comment.
6505 (linux_wait_for_event_1): Move most of the internal breakpoint
6506 handling from here...
6507 (linux_wait_1): ... to here.
6508 (count_events_callback): New.
6509 (select_singlestep_lwp_callback): New.
6510 (select_event_lwp_callback): New.
6511 (cancel_breakpoints_callback): New.
6512 (select_event_lwp): New.
6513 (linux_wait_1): Simplify internal breakpoint handling. Give equal
6514 priority to all LWPs that have had events that should be reported
6515 to the client. Cancel breakpoints when about to reporting the
6516 event to the client, not while stopping lwps. No longer cancel
6517 finished single-steps here.
6518 (cancel_finished_single_step): Delete.
6519 (cancel_finished_single_steps): Delete.
6520
414a389f
PA
65212010-03-24 Pedro Alves <pedro@codesourcery.com>
6522
6523 * mem-break.c (enum bkpt_type): New.
6524 (struct breakpoint): New field `type'.
6525 (set_breakpoint_at): Change return type to struct breakpoint
6526 pointer. Set type to `other_breakpoint' by default.
6527 (delete_breakpoint): Rewrite, supporting more than one breakpoint
6528 in the breakpoint list.
6529 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
6530 (reinsert_breakpoint): Rename to ...
6531 (reinsert_raw_breakpoint): ... this.
6532 (reinsert_breakpoints_at): Adjust.
6533 * mem-break.h (struct breakpoint): Declare.
6534 (set_breakpoint_at): Change return type to struct breakpoint
6535 pointer.
6536
2280c721
PA
65372010-03-24 Pedro Alves <pedro@codesourcery.com>
6538
6539 * server.c (handle_query): Assign, not compare.
6540
d50171e4
PA
65412010-03-24 Pedro Alves <pedro@codesourcery.com>
6542
6543 Teach linux gdbserver to step-over-breakpoints.
6544
6545 * linux-low.c (can_hardware_single_step): New.
6546 (supports_breakpoints): New.
6547 (handle_extended_wait): If stopping threads, read the stop pc of
6548 the new cloned LWP.
6549 (get_pc): New.
6550 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
6551 low target doesn't support retrieving the PC.
6552 (add_lwp): Set last_resume_kind to resume_continue.
6553 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
6554 (linux_attach): Don't clear stop_expected. Set the lwp's
6555 last_resume_kind to resume_stop.
6556 (linux_detach_one_lwp): Don't check for removed breakpoints.
6557 (check_removed_breakpoint): Delete.
6558 (status_pending_p): Rename to ...
6559 (status_pending_p_callback): ... this. Don't check for removed
6560 breakpoints. Don't consider threads that are stopped from GDB's
6561 perspective.
6562 (linux_wait_for_lwp): Always read the stop_pc here.
6563 (cancel_breakpoint): New.
6564 (step_over_bkpt): New global.
6565 (linux_wait_for_event_1): Implement stepping over breakpoints.
6566 (gdb_wants_lwp_stopped): New.
6567 (gdb_wants_all_stopped): New.
6568 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
6569 single-step traps here. Store the thread's last reported target
6570 wait status.
6571 (send_sigstop): Don't clear stop_expected. Always set it,
6572 instead.
6573 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
6574 (cancel_finished_single_step): New.
6575 (cancel_finished_single_steps): New.
6576 (wait_for_sigstop): Don't cancel finished single-step traps here.
6577 (linux_resume_one_lwp): Don't check for removed breakpoints.
6578 Don't set `step' on non-hardware step archs.
6579 (linux_set_resume_request): Ignore resume_stop requests if already
6580 stopping or stopped. Set the lwp's last_resume_kind.
6581 (resume_status_pending_p): Don't check for removed breakpoints.
6582 (need_step_over_p): New.
6583 (start_step_over): New.
6584 (finish_step_over): New.
6585 (linux_resume_one_thread): Always queue a sigstop for resume_stop
6586 requests. Clear the thread's last reported target waitstatus.
6587 Don't use the `suspended' flag. Don't consider pending breakpoints.
6588 (linux_resume): Start a step-over if necessary.
6589 (proceed_one_lwp): New.
6590 (proceed_all_lwps): New.
6591 (unstop_all_lwps): New.
6592 * linux-low.h (struct lwp_info): Rewrite comment for the
6593 `suspended' flag. Add the `stop_pc' field. Delete the
6594 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
6595 Add `'last_resume_kind' and `need_step_over' fields.
6596 * inferiors.c (struct thread_info): Delete, moved elsewhere.
6597 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
6598 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
6599 (set_raw_breakpoint_at): New.
6600 (set_breakpoint_at): Rewrite to use it.
6601 (reinsert_breakpoint_handler): Delete.
6602 (set_reinsert_breakpoint): New.
6603 (reinsert_breakpoint_by_bp): Delete.
6604 (delete_reinsert_breakpoints): New.
6605 (uninsert_breakpoint): Rewrite.
6606 (uninsert_breakpoints_at): New.
6607 (reinsert_breakpoint): Rewrite.
6608 (reinsert_breakpoints_at): New.
6609 (check_breakpoints): Rewrite.
6610 (breakpoint_here): New.
6611 (breakpoint_inserted_here): New.
6612 (check_mem_read): Adjust.
6613 * mem-break.h (breakpoints_supported, breakpoint_here)
6614 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
6615 (reinsert_breakpoint_by_bp): Delete declaration.
6616 (delete_reinsert_breakpoints): Declare.
6617 (reinsert_breakpoint): Delete declaration.
6618 (reinsert_breakpoints_at): Declare.
6619 (uninsert_breakpoint): Delete declaration.
6620 (uninsert_breakpoints_at): Declare.
6621 (check_breakpoints): Adjust prototype.
6622 * server.h: Adjust include order.
6623 (struct thread_info): Declare here. Add a `last_status' field.
6624
30ba68cb
MS
66252010-03-23 Michael Snyder <msnyder@vmware.com>
6626
6627 * server.c (crc32): New function.
6628 (handle_query): Add handling for 'qCRC:' request.
6629
b9a881c2
PA
66302010-03-23 Pedro Alves <pedro@codesourcery.com>
6631
6632 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
6633 lwp had been stopped by a watchpoint.
6634
e92d13d5
PA
66352010-03-16 Pedro Alves <pedro@codesourcery.com>
6636
6637 * server.h (internal_error): Declare.
6638 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
6639 * utils.c (internal_error): New function.
6640
64daa791
AS
66412010-03-15 Andreas Schwab <schwab@redhat.com>
6642
6643 * configure.srv: Fix typo setting srv_regobj.
6644
f52cd8cd
PA
66452010-03-15 Pedro Alves <pedro@codesourcery.com>
6646
6647 * linux-low.c (fetch_register): Avoid passing a non string literal
6648 format to `error'.
6649 (usr_store_inferior_registers): Ditto.
6650
93ae6fdc
PA
66512010-03-14 Pedro Alves <pedro@codesourcery.com>
6652
6653 * linux-low.c (linux_write_memory): Bail out early if peeking
6654 memory failed.
6655
c3adc08c
PA
66562010-03-14 Pedro Alves <pedro@codesourcery.com>
6657
6658 * linux-low.h (struct lwp_info): New fields
6659 `stopped_by_watchpoint' and `stopped_data_address'.
6660 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
6661 here, and cache them in the lwp object.
6662 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
6663 directly.
6664 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
6665 field.
6666 (linux_stopped_by_watchpoint): Rewrite.
6667 (linux_stopped_data_address): Rewrite.
6668
bce522a2
PA
66692010-03-06 Simo Melenius <simo.melenius@iki.fi>
6670
6671 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
6672 switching the current inferior, not before.
6673
90884b2b
L
66742010-03-01 H.J. Lu <hongjiu.lu@intel.com>
6675
6676 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
6677 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
6678 i386-linux.c and amd64-linux.c.
6679 (reg-i386.o): Removed.
6680 (reg-i386.c): Likewise.
6681 (reg-i386-linux.o): Likewise.
6682 (reg-i386-linux.c): Likewise.
6683 (reg-x86-64.o): Likewise.
6684 (reg-x86-64.c): Likewise.
6685 (reg-x86-64-linux.o): Likewise.
6686 (reg-x86-64-linux.c): Likewise.
6687 (i386.o): New.
6688 (i386.c): Likewise.
6689 (i386-linux.o): Likewise.
6690 (i386-linux.c): Likewise.
6691 (amd64.o): Likewise.
6692 (amd64.c): Likewise.
6693 (amd64-linux.o): Likewise.
6694 (amd64-linux.c): Likewise.
6695
6696 * configure.srv (srv_i386_regobj): New.
6697 (srv_i386_linux_regobj): Likewise.
6698 (srv_amd64_regobj): Likewise.
6699 (srv_amd64_linux_regobj): Likewise.
6700 (srv_i386_32bit_xmlfiles): Likewise.
6701 (srv_i386_64bit_xmlfiles): Likewise.
6702 (srv_i386_xmlfiles): Likewise.
6703 (srv_amd64_xmlfiles): Likewise.
6704 (srv_i386_linux_xmlfiles): Likewise.
6705 (srv_amd64_linux_xmlfiles): Likewise.
6706 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
6707 srv_xmlfiles to $srv_i386_xmlfiles.
6708 (i[34567]86-*-mingw32ce*): Likewise.
6709 (i[34567]86-*-mingw*): Likewise.
6710 (i[34567]86-*-nto*): Likewise.
6711 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
6712 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
6713 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
6714 (x86_64-*-linux*): Likewise.
6715
6716 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
6717 (init_registers_amd64_linux): New.
6718 (x86_arch_setup): Replace init_registers_x86_64_linux with
6719 init_registers_amd64_linux.
6720
193f13e6
MK
67212010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
6722
6723 * configure.ac: Check for libdl. If it is not available link against
6724 static libthread_db.
6725 * configure: Regenerate.
6726
85d721b8
PA
67272010-02-22 Pedro Alves <pedro@codesourcery.com>
6728
6729 PR9605
6730
6731 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
6732 handing a read watchpoint.
6733 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
6734
6076632b
DE
67352010-02-12 Doug Evans <dje@google.com>
6736
6737 * linux-low.c (linux_supports_tracefork_flag): Document.
6738 (linux_look_up_symbols): Add comment.
6739
3327ccf7
L
67402010-02-03 H.J. Lu <hongjiu.lu@intel.com>
6741
6742 * regcache.c (supply_register): Clear regcache if buf is NULL.
6743
0718675c 67442010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 6745 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
6746
6747 * inferiors.c (find_inferior): Add function documentation.
6748 (unloaded_dll): Handle the case where the unloaded dll has not
6749 been previously registered in the dll list.
6750
177321bd
DJ
67512010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
6752
6753 * linux-arm-low.c (thumb_breakpoint_len): Delete.
6754 (thumb2_breakpoint): New.
6755 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
6756
2b009048
DJ
67572010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
6758
6759 * linux-low.c (get_stop_pc): Check for SIGTRAP.
6760 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
6761 breakpoints.
6762
3be029c7
PA
67632010-01-21 Pedro Alves <pedro@codesourcery.com>
6764
6765 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
6766
18f5de3b
JK
67672010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6768
6769 * linux-s390-low.c (s390_collect_ptrace_register)
6770 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
6771
3743bb4f
DE
67722010-01-21 Doug Evans <dje@google.com>
6773
14ce3065
DE
6774 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
6775 (PTRACE_ARG4_TYPE): New macro.
6776 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
6777 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
6778 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
6779 (usr_store_inferior_registers): Ditto.
6780 (linux_read_memory, linux_write_memory): Ditto.
6781 (linux_test_for_tracefork): Ditto.
6782
3743bb4f
DE
6783 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
6784 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
6785
8b315be5
PA
67862010-01-21 Pedro Alves <pedro@codesourcery.com>
6787
6788 * proc-service.c (ps_lgetregs): Don't refetch registers from the
6789 target.
6790
85492558
PA
67912010-01-21 Pedro Alves <pedro@codesourcery.com>
6792
6793 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
6794 prototype to take a regcache. Adjust.
6795
442ea881
PA
67962010-01-20 Pedro Alves <pedro@codesourcery.com>
6797
6798 * regcache.h (struct thread_info): Forward declare.
6799 (struct regcache): New.
6800 (new_register_cache): Adjust prototype.
6801 (get_thread_regcache): Declare.
6802 (free_register_cache): Adjust prototype.
6803 (registers_to_string, registers_from_string): Ditto.
6804 (supply_register, supply_register_by_name, collect_register)
6805 (collect_register_as_string, collect_register_by_name): Ditto.
6806 * regcache.c (struct inferior_regcache_data): Delete.
6807 (get_regcache): Rename to ...
6808 (get_thread_regcache): ... this. Adjust. Switch inferior before
6809 fetching registers.
6810 (regcache_invalidate_one): Adjust.
6811 (regcache_invalidate): Fix prototype.
6812 (new_register_cache): Return the new register cache.
6813 (free_register_cache): Change prototype.
6814 (realloc_register_cache): Adjust.
6815 (registers_to_string): Change prototype to take a regcache. Adjust.
6816 (registers_from_string): Ditto.
6817 (register_data): Ditto.
6818 (supply_register): Ditto.
6819 (supply_register_by_name): Ditto.
6820 (collect_register): Ditto.
6821 (collect_register_as_string): Ditto.
6822 (collect_register_by_name): Ditto.
6823 * server.c (process_serial_event): Adjust.
6824 * linux-low.h (regset_fill_func, regset_store_func): Change
6825 prototype.
6826 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
6827 Change prototype.
6828 * linux-low.c (get_stop_pc): Adjust.
6829 (check_removed_breakpoint): Adjust.
6830 (linux_wait_for_event): Adjust.
6831 (linux_resume_one_lwp): Adjust.
6832 (fetch_register): Add regcache parameter. Adjust.
6833 (usr_store_inferior_registers): Ditto.
6834 (regsets_fetch_inferior_registers): Ditto.
6835 (regsets_store_inferior_registers): Ditto.
6836 (linux_fetch_registers, linux_store_registers): Ditto.
6837 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
6838 regcache. Adjust.
43aaf8b6
PA
6839 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
6840 Ditto.
442ea881
PA
6841 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
6842 prototype to take a regcache.
6843 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
6844 * remote-utils.c (convert_ascii_to_int, outreg)
6845 (prepare_resume_reply): Change prototype to take a regcache.
6846 Adjust.
6847 * target.h (struct target_ops) <fetch_registers, store_registers>:
6848 Change prototype to take a regcache.
6849 (fetch_inferior_registers, store_inferior_registers): Change
6850 prototype to take a regcache. Adjust.
6851 * proc-service.c (ps_lgetregs): Adjust.
6852 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
6853 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
6854 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
6855 take a regcache. Adjust.
6856 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
6857 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
6858 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
6859 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
6860 * linux-cris-low.c (cris_get_pc, cris_set_pc)
6861 (cris_cannot_fetch_register):
6862 (cris_breakpoint_at): Change prototype to take a regcache.
6863 Adjust.
6864 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
6865 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
6866 to take a regcache. Adjust.
6867 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
6868 Adjust.
6869 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
6870 take a regcache. Adjust.
6871 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
6872 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
6873 (m68k_set_pc): Change prototype to take a regcache. Adjust.
6874 * linux-mips-low.c (mips_get_pc):
6875 (mips_set_pc): Change prototype to take a regcache. Adjust.
6876 (mips_reinsert_addr): Adjust.
6877 (mips_collect_register): Change prototype to take a regcache.
6878 Adjust.
6879 (mips_supply_register):
6880 (mips_collect_register_32bit, mips_supply_register_32bit)
6881 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
6882 (mips_store_fpregset): Ditto.
43aaf8b6
PA
6883 * linux-ppc-low.c (ppc_supply_ptrace_register)
6884 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
6885 (parse_spufs_run): Adjust.
6886 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
6887 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
6888 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
6889 take a regcache. Adjust.
6890 * linux-s390-low.c (s390_collect_ptrace_register)
6891 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
6892 (s390_set_pc): Change prototype to take a regcache. Adjust.
6893 (s390_arch_setup): Adjust.
6894 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
6895 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
6896 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
6897 (sparc_fill_gregset, sparc_store_gregset_from_stack)
6898 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
6899 regcache. Adjust.
6900 (sparc_breakpoint_at): Adjust.
6901 * linux-xtensa-low.c (xtensa_fill_gregset):
6902 (xtensa_store_gregset):
6903 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
6904 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
6905 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
6906 prototype to take a regcache. Adjust.
6907 * win32-arm-low.c (arm_fetch_inferior_register)
6908 (arm_store_inferior_register): Change prototype to take a
6909 regcache. Adjust.
6910 * win32-i386-low.c (i386_fetch_inferior_register)
6911 (i386_store_inferior_register): Change prototype to take a
6912 regcache. Adjust.
6913 * win32-low.c (child_fetch_inferior_registers)
6914 (child_store_inferior_registers): Change prototype to take a
6915 regcache. Adjust.
6916 (win32_wait): Adjust.
6917 (win32_fetch_inferior_registers): Change prototype to take a
6918 regcache. Adjust.
6919 (win32_store_inferior_registers): Adjust.
6920 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
6921 store_inferior_register>: Change prototype to take a regcache.
6922
60c3d7b0
DE
69232010-01-20 Doug Evans <dje@google.com>
6924
6925 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
6926 #ifdef.
6927 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 6928 (W_STOPCODE): Provide definition if missing.
60c3d7b0 6929
dc146f7c
VP
69302010-01-13 Vladimir Prus <vladimir@codesourcery.com>
6931
6932 * linux-low.c (linux_core_of_thread): New.
6933 (compare_ints, show_process, list_threads): New.
6934 (linux_qxfer_osdata): Report threads and cores.
6935 (linux_target_op): Register linux_core_of_thread.
6936 * remote-utils.c (prepare_resume_reply): Report the core.
6937 (buffer_xml_printf): Support %d specifier.
6938 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
6939 New.
6940 (handle_query): Handle qXfer:threads. Announce availability
6941 thereof.
6942 * target.h (struct target_ops): New field core_of_thread.
6943
7803799a
UW
69442010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
6945
6946 * Makefile.in (clean): Remove new generated files.
6947 (reg-s390.o, reg-s390.c): Remove rules.
6948 (reg-s390x.o, reg-s390x.c): Likewise.
6949 (s390-linux32.o, s390-linux32.c): Add rules.
6950 (s390-linux64.o, s390-linux64.c): Likewise.
6951 (s390x-linux64.o, s390x-linux64.c): Likewise.
6952 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
6953 * linux-s390-low.c: Include <elf.h>.
6954 (HWCAP_S390_HIGH_GPRS): Define if undefined.
6955 (init_registers_s390): Remove prototype.
6956 (init_registers_s390x): Likewise.
6957 (init_registers_s390_linux32): Add prototype.
6958 (init_registers_s390_linux64): Likewise.
6959 (init_registers_s390x_linux64): Likewise.
6960 (s390_num_regs_3264): New define.
6961 (s390_regmap_3264): New global variable.
6962 (s390_cannot_fetch_register): Remove obsolete check.
6963 (s390_cannot_store_register): Likewise.
6964 (s390_collect_ptrace_register): Handle upper/lower register halves.
6965 (s390_supply_ptrace_register): Likewise.
6966 (s390_fill_gregset): Update to register number changes.
6967 (s390_get_hwcap): New routine.
6968 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
6969 Install appropriate regmap and register set.
6970
6e7ffa39
JB
69712010-01-01 Joel Brobecker <brobecker@adacore.com>
6972
6973 * server.c (gdbserver_version): Update copyright year to 2010.
6974 * gdbreplay.c (gdbreplay_version): Likewise.
6975
957f3f49
DE
69762009-12-28 Doug Evans <dje@google.com>
6977
6978 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
6979 elf/external.h. Include <elf.h> instead but only if necessary.
6980
ca5c370d
PA
69812009-12-28 Pedro Alves <pedro@codesourcery.com>
6982
6983 * linux-low.c (linux_remove_process): Remove `detaching'
6984 parameter. Don't release/detach from thread_db here.
6985 (linux_kill): Release/detach from thread_db here, ...
6986 (linux_detach): ... and here, before actually detaching.
6987 (linux_wait_1): ... and here, when a process exits.
6988 * thread-db.c (any_thread_of): New.
6989 (thread_db_free): Switch the current inferior to a thread of the
6990 passed in process.
6991
4ee62156
DE
69922009-12-21 Doug Evans <dje@google.com>
6993
d90e6a88
DE
6994 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
6995
c5f62d5f
DE
6996 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
6997 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
6998 warning ifndef __NR_tkill. Move setting of errno there too.
6999 Delete unnecessary resetting of errno after syscall.
7000 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7001
10e86dd7
DE
7002 * configure.ac: Check for dladdr.
7003 * config.in: Regenerate.
7004 * configure: Regenerate.
7005 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7006 (try_thread_db_load): Update.
7007
4ee62156
DE
7008 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7009
00f515da
DE
70102009-12-18 Doug Evans <dje@google.com>
7011
e9464885
DE
7012 * event-loop.c: Include unistd.h if it exists.
7013
07d4f67e
DE
7014 * linux-low.c (my_waitpid): Move definition away from being in
7015 between linux_tracefork_child/linux_test_for_tracefork.
7016
00f515da
DE
7017 * gdb_proc_service.h (psaddr_t): Fix type.
7018 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7019 signature to match glibc.
7020
1de1badb
DE
70212009-12-16 Doug Evans <dje@google.com>
7022
7023 * linux-low.c (linux_read_memory): Fix argument to read.
7024
aeeb81d1
PA
70252009-11-26 Pedro Alves <pedro@codesourcery.com>
7026
7027 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
7028 events, don't leave current_inferior pointing at null.
7029
10357975
PA
70302009-11-26 Pedro Alves <pedro@codesourcery.com>
7031
7032 * win32-low.c (LOG): Delete.
7033 (OUTMSG): Output to stderr.
7034 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
7035 on compile time LOG macro.
7036 (win32_wait): Fix debug output.
7037
cf6e3471
PA
70382009-11-26 Pedro Alves <pedro@codesourcery.com>
7039
7040 * win32-low.c (win32_add_one_solib): If the dll name is
7041 "ntdll.dll", prepend the system directory to the dll path.
7042
0c85e18e
MK
70432009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
7044
7045 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
7046
9ac544ce 70472009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 7048 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
7049
7050 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
7051 * configure.ac: Check for __mcoldfire__ and set
7052 gdb_cv_m68k_is_coldfire.
7053 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
7054 reg-cf.o and reg-m68k.o.
7055 * configure: Regenerated.
7056
fd7dd3e6
PA
70572009-11-16 Pedro Alves <pedro@codesourcery.com>
7058
7059 * linux-low.c (linux_remove_process): Add `detaching' parameter.
7060 Pass it to thread_db_free.
7061 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
7062 proper `detaching' argument to linux_remove_process.
7063 * linux-low.h (thread_db_free): Add `detaching' parameter.
7064 * thread-db.c (thread_db_init): Pass false as `detaching' argument
7065 to thread_db_free.
7066 (thread_db_free): Add `detaching' parameter. Only
7067 call td_ta_clear_event if detaching from process.
7068
75aa492e
MK
70692009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
7070
7071 * thread-db.c (thread_db_free): Fix typo.
7072
21e1bee4
PP
70732009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
7074
7075 PR gdb/10838
7076 * thread-db.c (thread_db_free): Call td_ta_clear_event.
7077
8838b45e
NS
70782009-11-03 Nathan Sidwell <nathan@codesourcery.com>
7079
7080 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
7081 with an i686 compiler.
7082 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
7083 needed.
7084 * configure: Rebuilt.
7085
8a35fb51
SL
70862009-10-29 Sandra Loosemore <sandra@codesourcery.com>
7087
7088 PR gdb/10783
7089
7090 * server.c (handle_search_memory_1): Correct read_addr initialization
7091 in loop for searching subsequent chunks.
7092
96f15937
PP
70932009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
7094
7095 * configure.ac: New --with-libthread-db option.
7096 * thread-db.c: Allow direct dependence on libthread_db.
7097 (thread_db_free): Adjust.
7098 * config.in: Regenerate.
7099 * configure: Likewise.
889bf7c5 7100
5f7d1694
PP
71012009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
7102
7103 PR gdb/10757
7104 * thread-db.c (attach_thread): New function.
7105 (maybe_attach_thread): Return success/failure.
7106 (find_new_threads_callback): Adjust.
889bf7c5
PA
7107 (thread_db_find_new_threads): Loop until no new threads.
7108
88e3b899
PA
71092009-10-13 Pedro Alves <pedro@codesourcery.com>
7110
7111 * proc-service.c (ps_lgetregs): Formatting.
7112
cdbfd419
PP
71132009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
7114
7115 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
7116 * configure.ac: Adjust.
7117 * linux-low.h (struct process_info_private): Move members to struct
7118 thread_db.
7119 (thread_db_free, thread_db_handle_monitor_command): New prototype.
7120 * linux-low.c (linux_remove_process): Adjust.
7121 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
7122 * server.c (handle_query): Move code ...
7123 (handle_monitor_command): ... here. New function.
7124 * target.h (struct target_ops): New member.
7125 * thread-db.c (struct thread_db): New.
7126 (libthread_db_search_path): New variable.
7127 (thread_db_create_event, thread_db_enable_reporting)
7128 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
7129 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
7130 (try_thread_db_load_1, dladdr_to_soname): New functions.
7131 (try_thread_db_load, thread_db_load_search): New functions.
7132 (thread_db_init): Search for libthread_db.
7133 (thread_db_free): New function.
7134 (thread_db_handle_monitor_command): Likewise.
7135 * config.in: Regenerate.
7136 * configure: Regenerate.
889bf7c5 7137
4168d2d6
UW
71382009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
7139
7140 * spu-low.c (spu_kill): Wait for inferior to terminate.
7141 Call clear_inferiors.
7142 (spu_detach): Call clear_inferiors.
7143
81ecdfbb
RW
71442009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7145
7146 * aclocal.m4: Regenerate.
7147 * config.in: Likewise.
7148 * configure: Likewise.
7149
0b9ff2c0
UW
71502009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7151
7152 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
7153 (parse_spufs_run): New function.
7154 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
7155 (ppc_breakpoint_at): Handle SPU breakpoints.
7156
efcbbd14
UW
71572009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7158
7159 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
7160 (SPUFS_MAGIC): Define.
7161 (spu_enumerate_spu_ids): New function.
7162 (linux_qxfer_spu): New function.
7163 (linux_target_ops): Install linux_qxfer_spu.
7164
f4d9bade
UW
71652009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7166
7167 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
7168 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
7169 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
7170 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
7171 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
7172 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
7173 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
7174 (init_registers_powerpc_cell32l): Add prototype.
7175 (init_registers_powerpc_cell64l): Likewise.
7176 (ppc_arch_setup): Detect Cell/B.E. architecture.
7177
96e946ca
RW
71782009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7179
7180 * Makefile.in (datarootdir): New variable.
7181
58d6951d
DJ
71822009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7183
7184 * linux-low.c (linux_write_memory): Update debugging output.
7185 * Makefile.in (clean): Add new descriptions.
7186 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
7187 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
7188 * configure.srv: Add new files for arm*-*-linux*.
7189 * linux-arm-low.c: Add new declarations.
7190 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
7191 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
7192 (HWCAP_VFPv3D16): New.
7193 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
7194 instead of __IWMMXT__.
7195 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
7196 (arm_arch_setup): New.
7197 (target_regsets): Remove #ifdef. Add VFP regset.
7198 (the_low_target): Use arm_arch_setup.
7199
12b42a12
DJ
72002009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7201
7202 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
7203 the main thread again.
7204
ac8c974e
AR
72052009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
7206
7207 Adding Neutrino gdbserver.
7208 * configure: Regenerated.
7209 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
7210 * configure.srv (i[34567]86-*-nto*): New target.
7211 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
7212 * remote-utils.c [__QNX__]: Include sys/iomgr.h
7213 (nto_comctrl) [__QNX__]: New function.
7214 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
7215
4424e0c3 72162009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
7217
7218 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
7219 srv_tgtobj.
7220
912cf4ba
PA
72212009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
7222 Pedro Alves <pedro@codesourcery.com>
7223
7224 * win32-i386-low.c (i386_get_thread_context): Handle systems that
7225 don't support CONTEXT_EXTENDED_REGISTERS.
7226 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
7227 (the_low_target): Install them.
7228 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
7229 failing with ERROR_PIPE_NOT_CONNECTED.
7230
aa5ca48f
DE
72312009-06-30 Doug Evans <dje@google.com>
7232 Pierre Muller <muller@ics.u-strasbg.fr>
7233
7234 Add h/w watchpoint support to x86-linux, win32-i386.
7235 * Makefile.in (SFILES): Add i386-low.c
7236 (i386_low_h): Define.
7237 (i386-low.o): Add dependencies.
7238 (linux-x86-low.o): Add i386-low.h dependency.
7239 (win32-i386-low.o): Ditto.
7240 * i386-low.c: New file.
7241 * i386-low.h: New file.
7242 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
7243 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
7244 * linux-low.c (linux_add_process): Initialize arch_private.
7245 (linux_remove_process): Free arch_private.
7246 (add_lwp): Initialize arch_private.
7247 (delete_lwp): Free arch_private.
7248 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
7249 provided.
7250 * linux-low.h (process_info_private): New member arch_private.
7251 (lwp_info): New member arch_private.
7252 (linux_target_ops): New members new_process, new_thread,
7253 prepare_to_resume.
7254 (ptid_of): New macro.
7255 * linux-x86-low.c: Include stddef.h, i386-low.h.
7256 (arch_process_info): New struct.
7257 (arch_lwp_info): New struct.
7258 (x86_linux_dr_get, x86_linux_dr_set): New functions.
7259 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7260 (i386_dr_low_get_status): New function.
7261 (x86_insert_point, x86_remove_point): New functions.
7262 (x86_stopped_by_watchpoint): New function.
7263 (x86_stopped_data_address): New function.
7264 (x86_linux_new_process, x86_linux_new_thread): New functions.
7265 (x86_linux_prepare_to_resume): New function.
7266 (the_low_target): Add entries for insert_point, remove_point,
7267 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
7268 prepare_to_resume.
7269 * server.c (debug_hw_points): New global.
7270 (monitor_show_help): Document set debug-hw-points.
7271 (handle_query): Process "set debug-hw-points".
7272 * server.h (debug_hw_points): Declare.
7273 (paddress): Declare.
7274 * utils.c (NUMCELLS, CELLSIZE): New macros.
7275 (get_sell, xsnprintf, paddress): New functions.
7276 * win32-arm-low.c (the_low_target): Add entries for insert_point,
7277 remove_point, stopped_by_watchpoint, stopped_data_address.
7278 * win32-i386-low.c: Include i386-low.h.
7279 (debug_reg_state): Replaces dr.
7280 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7281 (i386_dr_low_get_status): New function.
7282 (i386_insert_point, i386_remove_point): New functions.
7283 (i386_stopped_by_watchpoint): New function.
7284 (i386_stopped_data_address): New function.
7285 (i386_initial_stuff): Update.
7286 (get_thread_context,set_thread_context,i386_thread_added): Update.
7287 (the_low_target): Add entries for insert_point,
7288 remove_point, stopped_by_watchpoint, stopped_data_address.
7289 * win32-low.c (win32_insert_watchpoint): New function.
7290 (win32_remove_watchpoint): New function.
7291 (win32_stopped_by_watchpoint): New function.
7292 (win32_stopped_data_address): New function.
7293 (win32_target_ops): Add entries for insert_watchpoint,
7294 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
7295 * win32-low.h (win32_target_ops): New members insert_point,
7296 remove_point, stopped_by_watchpoint, stopped_data_address.
7297
d993e290
PA
72982009-06-25 Pedro Alves <pedro@codesourcery.com>
7299
7300 * server.c (process_serial_event): Re-return unsupported, not
7301 error, if the type isn't recognized. Re-allow supporting only
7302 insert or remove packets. Also call require_running for
7303 breakpoints. Add missing break statement to default case. Tidy.
7304 * target.h (struct target_ops): Rename insert_watchpoint to
7305 insert_point, and remove_watchpoint to remove_point.
7306
7307 * linux-low.h (struct linux_target_ops): Likewise.
7308 * linux-low.c (linux_insert_watchpoint): Rename to ...
7309 (linux_insert_point): ... this. Adjust.
7310 (linux_remove_watchpoint): Rename to ...
7311 (linux_remove_point): ... this. Adjust.
7312 (linux_target_ops): Adjust.
7313 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
7314 (cris_insert_point): ... this.
7315 (cris_remove_watchpoint): Rename to ...
7316 (cris_remove_point): ... this.
7317 (the_low_target): Adjust.
7318
0f54c268
PM
73192009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
7320
7321 * server.c (handle_v_kill): Pass signal_pid to
7322 kill_inferior if multi_process is zero.
7323
c6314022
AR
73242009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
7325
7326 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
7327 * target.h (target_ops): Comment for *_watchpoint to make it clear
7328 the functions can get types '0' and '1'.
7329
4463ce24
AR
73302009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
7331
7332 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
7333 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
7334 * regcache.c (get_regcache): Likewise.
7335 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
7336 * win32-low.c (child_fetch_inferior_registers): Remove check for
7337 regno 0.
7338
cf8fd78b
PA
73392009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
7340 Pedro Alves <pedro@codesourcery.com>
7341
7342 * target.h (struct target_ops) <supports_multi_process>: New
7343 callback.
7344 (target_supports_multi_process): New.
7345 * server.c (handle_query): Even if GDB reports support, only
7346 enable multi-process if the target also supports it. Report
7347 multi-process support only if the target backend supports it.
7348 * linux-low.c (linux_supports_multi_process): New function.
7349 (linux_target_ops): Install it as target_supports_multi_process
7350 callback.
7351
47c0c975
DE
73522009-05-24 Doug Evans <dje@google.com>
7353
e09875d4
DE
7354 Global renaming of find_thread_pid to find_thread_ptid.
7355 * server.h (find_thread_ptid): Renamed from find_thread_pid.
7356 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
7357 All callers updated.
7358
e27d73f6
DE
7359 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
7360 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
7361 directly.
7362
47c0c975
DE
7363 * linux-low.c (get_stop_pc): Print pc if debug_threads.
7364 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
7365 (linux_resume_one_lwp): Ditto.
7366
2acc282a
DE
73672009-05-23 Doug Evans <dje@google.com>
7368
7369 * linux-low.c (linux_resume_one_lwp): Change type of first arg
7370 from struct inferior_list_entry * to struct lwp_info *.
7371 All callers updated.
7372
9f1036c1
DE
73732009-05-13 Doug Evans <dje@google.com>
7374
7375 * linux-x86-low.c: Don't include assert.h.
7376 (x86_siginfo_fixup): Use fatal, not assert.
7377 (x86_arch_setup): Fix comment.
7378
d0722149
DE
73792009-05-12 Doug Evans <dje@google.com>
7380
7381 Biarch support for i386/amd64 gdbserver.
7382 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
7383 Add linux-x86-low.c.
7384 (linux-i386-low.o, linux-x86-64-low.o): Delete.
7385 (linux-x86-low.o): Add.
7386 * linux-x86-64-low.c: Delete.
7387 * linux-i386-low.c: Delete.
7388 * linux-x86-low.c: New file.
7389 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
7390 linux-x86-low.o.
7391 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
7392 linux-x86-low.o.
7393 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
7394 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
7395 (linux_child_pid_to_exec_file): New function.
7396 (elf_64_header_p, elf_64_file_p): New functions.
7397 (siginfo_fixup): New function.
7398 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
7399 give target a chance to convert layout.
7400 * linux-low.h (linux_target_ops): New member siginfo_fixup.
7401 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
7402
fdeb2a12
DE
74032009-05-07 Doug Evans <dje@google.com>
7404
7405 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
7406 (regsets_store_inferior_registers): Ditto.
7407
a6dbe5df
PA
74082009-05-06 Pedro Alves <pedro@codesourcery.com>
7409
7410 PR server/10048
7411
7412 * linux-low.c (must_set_ptrace_flags): Delete.
7413 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
7414 of the global.
7415 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
7416 `lwp->must_set_ptrace_flags' instead.
ba42693b 7417 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
7418 (linux_wait_1): ... not here.
7419
5091eb23
DE
74202009-04-30 Doug Evans <dje@google.com>
7421
9f767825
DE
7422 * inferiors.c (started_inferior_callback): New function.
7423 (attached_inferior_callback): New function.
7424 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
7425 * server.c (print_started_pid, print_attached_pid): New functions.
7426 (detach_or_kill_for_exit): New function.
7427 (main): Call it instead of for_each_inferior (kill_inferior_callback).
7428 * server.h (have_started_inferiors_p): Declare.
7429 (have_attached_inferiors_p): Declare.
7430
5091eb23
DE
7431 * inferiors.c (remove_process): Fix memory leak, free process.
7432 * linux-low.c (linux_remove_process): New function.
7433 (linux_kill): Call it instead of remove_process.
7434 (linux_detach, linux_wait_1): Ditto.
7435
155c8968
PA
74362009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
7437
7438 * configure.srv: Add x86 Windows CE target.
7439
7fe519cb
UW
74402009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7441
7442 * inferiors.c (get_thread_process): Make global.
7443 * server.h (get_thread_process): Add prototype.
7444 * thread-db.c (find_one_thread): Use get_thread_process
7445 instead of current_process.
7446 (thread_db_get_tls_address): Do not crash if called when
7447 thread layer is not yet initialized.
7448
5472f405
UW
74492009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7450
7451 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
7452 * spu-low.c (current_tid): Rename to ...
7453 (current_ptid): ... this.
7454 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
7455 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
7456 ptid_get_lwp (current_ptid) instead of current_tid.
7457 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
7458 instead of current_tid. Use find_process_pid to verify pid
7459 argument is valid. Pass proper argument to remove_process.
7460 (spu_thread_alive): Compare current_ptid instead of current_tid.
7461 (spu_resume): Likewise.
7462
55ac2b99
PA
74632009-04-02 Pedro Alves <pedro@codesourcery.com>
7464
7465 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
7466 variable.
7467
95954743
PA
74682009-04-01 Pedro Alves <pedro@codesourcery.com>
7469
7470 Implement the multiprocess extensions, and add linux multiprocess
7471 support.
7472
7473 * server.h (ULONGEST): Declare.
7474 (struct ptid, ptid_t): New.
7475 (minus_one_ptid, null_ptid): Declare.
7476 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7477 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
7478 (struct inferior_list_entry): Change `id' type from unsigned from
7479 to ptid_t.
7480 (struct sym_cache, struct breakpoint, struct
7481 process_info_private): Forward declare.
7482 (struct process_info): Declare.
7483 (current_process): Declare.
7484 (all_processes): Declare.
7485 (initialize_inferiors): Declare.
7486 (add_thread): Adjust to use ptid_t.
7487 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
7488 (add_process, remove_process, find_thread_pid): Declare.
7489 (find_inferior_id): Adjust to use ptid_t.
7490 (cont_thread, general_thread, step_thread): Change type to ptid_t.
7491 (multi_process): Declare.
7492 (push_event): Adjust to use ptid_t.
7493 (read_ptid, write_ptid): Declare.
7494 (prepare_resume_reply): Adjust to use ptid_t.
7495 (clear_symbol_cache): Declare.
7496 * inferiors.c (all_processes): New.
7497 (null_ptid, minus_one_ptid): New.
7498 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7499 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
7500 (add_thread): Change unsigned long to ptid. Remove gdb_id
7501 parameter. Adjust.
7502 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
7503 (gdb_id_to_thread): Rename to ...
7504 (find_thread_pid): ... this. Change unsigned long to ptid.
7505 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
7506 (loaded_dll, pull_pid_from_list): Adjust.
7507 (add_process, remove_process, find_process_pid)
7508 (get_thread_process, current_process, initialize_inferiors): New.
7509 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
7510 (struct target_waitstatus) <related_pid>: Ditto.
7511 (struct target_ops) <kill, detach>: Add `pid' argument. Change
7512 return type to int.
7513 (struct target_ops) <join>: Add `pid' argument.
7514 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
7515 (struct target_ops) <wait>: Add `ptid' field. Change return type
7516 to ptid.
7517 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
7518 (mywait): Add `ptid' argument. Change return type to ptid_t.
7519 (target_pid_to_str): Declare.
7520 * target.c (set_desired_inferior): Adjust to use ptids.
7521 (mywait): Add new `ptid' argument. Adjust.
7522 (target_pid_to_str): New.
7523 * mem-break.h (free_all_breakpoints): Declare.
7524 * mem-break.c (breakpoints): Delelete.
7525 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
7526 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
7527 to use per-process breakpoint list.
7528 (free_all_breakpoints): New.
7529 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
7530 (symbol_cache, all_symbols_looked_up): Delete.
7531 (hexchars): New.
7532 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
7533 read_ptid): New.
7534 (prepare_resume_reply): Change ptid argument's type from unsigned
7535 long to ptid_t. Adjust. Implement W;process and X;process.
7536 (free_sym_cache, clear_symbol_cache): New.
7537 (look_up_one_symbol): Adjust to per-process symbol cache. *
7538 * server.c (cont_thread, general_thread, step_thread): Change type
7539 to ptid_t.
7540 (attached): Delete.
7541 (multi_process): New.
7542 (last_ptid): Change type to ptid_t.
7543 (struct vstop_notif) <ptid>: Change type to ptid_t.
7544 (queue_stop_reply, push_event): Change `ptid' argument's type to
7545 ptid_t.
7546 (discard_queued_stop_replies): Add `pid' argument.
7547 (start_inferior): Adjust to use ptids. Adjust to mywait interface
7548 changes. Don't reference the `attached' global.
7549 (attach_inferior): Adjust to mywait interface changes.
7550 (handle_query): Adjust to use ptids. Parse GDB's qSupported
7551 features. Handle and report "multiprocess+". Handle
7552 "qAttached:PID".
7553 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
7554 changes.
7555 (handle_v_kill): New.
7556 (handle_v_stopped): Adjust to use target_pid_to_str.
7557 (handle_v_requests): Allow multiple attaches and runs when
7558 multiprocess extensions are in effect. Handle "vKill".
7559 (myresume): Adjust to use ptids.
7560 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
7561 (handle_status): Adjust to discard_queued_stop_replies interface
7562 change.
7563 (first_thread_of, kill_inferior_callback)
7564 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
7565 (main): Call initialize_inferiors. Adjust to use ptids, killing
7566 and detaching from all inferiors. Handle multiprocess packet
7567 variants.
7568 * linux-low.h: Include gdb_proc_service.h.
7569 (struct process_info_private): New.
7570 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
7571 <lwpid_of>: Use ptid_get_lwp.
7572 (get_lwp_thread): Adjust.
7573 (struct lwp_info): Add `dead' member.
7574 (find_lwp_pid): Declare.
7575 * linux-low.c (thread_db_active): Delete.
7576 (new_inferior): Adjust comment.
7577 (inferior_pid): Delete.
7578 (linux_add_process): New.
7579 (handle_extended_wait): Adjust.
7580 (add_lwp): Change unsigned long to ptid.
7581 (linux_create_inferior): Add process to processes table. Adjust
7582 to use ptids. Don't set new_inferior here.
7583 (linux_attach_lwp): Rename to ...
7584 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
7585 it. Adjust to use ptids.
7586 (linux_attach_lwp): New.
7587 (linux_attach): Add process to processes table. Don't set
7588 new_inferior here.
7589 (struct counter): New.
7590 (second_thread_of_pid_p, last_thread_of_process_p): New.
7591 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
7592 multiple processes.
7593 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
7594 processes. Remove process from process table.
7595 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
7596 to multiple processes.
7597 (any_thread_of): New.
7598 (linux_detach): Add `pid' argument, and handle it. Remove process
7599 from processes table.
7600 (linux_join): Add `pid' argument. Handle it.
7601 (linux_thread_alive): Change unsighed long argument to ptid_t.
7602 Consider dead lwps as not being alive.
7603 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
7604 threads we're not interested in.
7605 (same_lwp, find_lwp_pid): New.
7606 (linux_wait_for_lwp): Change `pid' argument's type from int to
7607 ptid_t. Adjust.
7608 (linux_wait_for_event): Rename to ...
7609 (linux_wait_for_event_1): ... this. Change `pid' argument's type
7610 from int to ptid_t. Adjust.
7611 (linux_wait_for_event): New.
7612 (linux_wait_1): Add `ptid' argument. Change return type to
7613 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
7614 that exit from the process table.
7615 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
7616 Adjust.
7617 (mark_lwp_dead): New.
7618 (wait_for_sigstop): Adjust to use ptids. If a process exits while
7619 stopping all threads, mark its main lwp as dead.
7620 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
7621 ptids.
7622 (fetch_register, usr_store_inferior_registers)
7623 (regsets_fetch_inferior_registers)
7624 (regsets_store_inferior_registers, linux_read_memory)
7625 (linux_write_memory): Inline `inferior_pid'.
7626 (linux_look_up_symbols): Adjust to use per-process
7627 `thread_db_active'.
7628 (linux_request_interrupt): Adjust to use ptids.
7629 (linux_read_auxv): Inline `inferior_pid'.
7630 (initialize_low): Don't reference thread_db_active.
7631 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
7632 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
7633 (ps_getpid): Return the pid of the current inferior.
7634 * thread-db.c (proc_handle, thread_agent): Delete.
7635 (thread_db_create_event, thread_db_enable_reporting): Adjust to
7636 per-process data.
7637 (find_one_thread): Change argument type to ptid_t. Adjust to
7638 per-process data.
7639 (maybe_attach_thread): Adjust to per-process data and ptids.
7640 (thread_db_find_new_threads): Ditto.
7641 (thread_db_init): Ditto.
7642 * spu-low.c (spu_create_inferior, spu_attach): Add process to
7643 processes table. Adjust to use ptids.
7644 (spu_kill, spu_detach): Adjust interface. Remove process from
7645 processes table.
7646 (spu_join, spu_thread_alive): Adjust interface.
7647 (spu_wait): Adjust interface. Remove process from processes
7648 table. Adjust to use ptids.
7649 * win32-low.c (current_inferior_tid): Delete.
7650 (current_inferior_ptid): New.
7651 (debug_event_ptid): New.
7652 (thread_rec): Take a ptid. Adjust.
7653 (child_add_thread): Add `pid' argument. Adjust to use ptids.
7654 (child_delete_thread): Ditto.
7655 (do_initial_child_stuff): Add `attached' argument. Add process to
7656 processes table.
7657 (child_fetch_inferior_registers, child_store_inferior_registers):
7658 Adjust.
7659 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
7660 (win32_attach): Pass 1 to do_initial_child_stuff.
7661 (win32_kill): Adjust interface. Remove process from processes
7662 table.
7663 (win32_detach): Ditto.
7664 (win32_join): Adjust interface.
7665 (win32_thread_alive): Take a ptid.
7666 (win32_resume): Adjust to use ptids.
7667 (get_child_debug_event): Ditto.
7668 (win32_wait): Adjust interface. Remove exiting process from
7669 processes table.
7670
bd99dc85
PA
76712009-04-01 Pedro Alves <pedro@codesourcery.com>
7672
7673 Non-stop mode support.
7674
7675 * server.h (non_stop): Declare.
7676 (gdb_client_data, handler_func): Declare.
7677 (delete_file_handler, add_file_handler, start_event_loop):
7678 Declare.
7679 (handle_serial_event, handle_target_event, push_event)
7680 (putpkt_notif): Declare.
7681 * target.h (enum resume_kind): New.
7682 (struct thread_resume): Replace `step' field by `kind' field.
7683 (TARGET_WNOHANG): Define.
7684 (struct target_ops) <wait>: Add `options' argument.
7685 <supports_non_stop, async, start_non_stop>: New fields.
7686 (target_supports_non_stop, target_async): New.
7687 (start_non_stop): Declare.
7688 (mywait): Add `options' argument.
7689 * target.c (mywait): Add `options' argument. Print child exit
7690 notifications here.
7691 (start_non_stop): New.
7692 * server.c (non_stop, own_buf, mem_buf): New globals.
7693 (struct vstop_notif): New.
7694 (notif_queue): New global.
7695 (queue_stop_reply, push_event, discard_queued_stop_replies)
7696 (send_next_stop_reply): New.
7697 (start_inferior): Adjust to use resume_kind. Adjust to mywait
7698 interface changes.
7699 (attach_inferior): In non-stop mode, don't wait for the target
7700 here.
7701 (handle_general_set): Handle QNonStop.
7702 (handle_query): When handling qC, return the current general
7703 thread, instead of the first thread of the list.
7704 (handle_query): If the backend supports non-stop mode, include
7705 QNonStop+ in the qSupported query response.
7706 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
7707 and non-stop mode.
7708 (handle_v_attach, handle_v_run): Handle non-stop mode.
7709 (handle_v_stopped): New.
7710 (handle_v_requests): Report support for vCont;t. Handle vStopped.
7711 (myresume): Adjust to use resume_kind. Handle non-stop.
7712 (queue_stop_reply_callback): New.
7713 (handle_status): Handle non-stop mode.
7714 (main): Clear non_stop flag on reconnection. Use the event-loop.
7715 Refactor serial protocol handling from here ...
7716 (process_serial_event): ... to this new function. When GDB
7717 selects any thread, select one here. In non-stop mode, wait until
7718 GDB acks all pending events before exiting.
7719 (handle_serial_event, handle_target_event): New.
7720 * remote-utils.c (remote_open): Install remote_desc in the event
7721 loop.
7722 (remote_close): Remove remote_desc from the event loop.
7723 (putpkt_binary): Rename to...
7724 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
7725 (putpkt_binary): New as wrapper around putpkt_binary_1.
7726 (putpkt_notif): New.
7727 (prepare_resume_reply): In non-stop mode, don't change the
7728 general_thread.
7729 * event-loop.c: New.
7730 * Makefile.in (OBJ): Add event-loop.o.
7731 (event-loop.o): New rule.
7732
7733 * linux-low.h (pid_of): Moved here.
7734 (lwpid_of): New.
7735 (get_lwp_thread): Use lwpid_of.
7736 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
7737 * linux-low.c (pid_of): Delete.
7738 (inferior_pid): Use lwpid_of.
7739 (linux_event_pipe): New.
7740 (target_is_async_p): New.
7741 (delete_lwp): New.
7742 (handle_extended_wait): Use lwpid_of.
7743 (add_lwp): Don't set lwpid field.
7744 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
7745 (linux_kill_one_lwp): If killing a running lwp, stop it first.
7746 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
7747 (linux_detach_one_lwp): If detaching from a running lwp, stop it
7748 first. Adjust to linux_wait_for_event interface changes. Use
7749 lwpid_of.
7750 (linux_detach): Don't delete the main lwp here.
7751 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
7752 (status_pending_p): Don't consider explicitly suspended lwps.
7753 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
7754 pointer. Add OPTIONS argument. Change return type to int. Use
7755 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
7756 (linux_wait_for_event): Take an integer pid instead of a lwp_info
7757 pointer. Add status pointer argument. Return a pid instead of a
7758 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
7759 changes. In non-stop mode, don't switch to a random thread.
7760 (linux_wait): Rename to...
7761 (linux_wait_1): ... this. Add target_options argument, and handle
7762 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
7763 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
7764 clean exit and signal exit code. Don't stop all threads in
7765 non-stop mode. In all-stop mode, only stop all threads when
7766 reporting a stop to GDB. Handle explicit thread stop requests.
7767 (async_file_flush, async_file_mark): New.
7768 (linux_wait): New.
7769 (send_sigstop): Use lwpid_of.
7770 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
7771 interface changes. In non-stop mode, don't switch to a random
7772 thread.
7773 (linux_resume_one_lwp): Use lwpid_of.
7774 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
7775 (linux_resume_one_thread): ... this. Handle resume_stop. In
7776 non-stop mode, don't look for pending flag in all threads.
7777 (resume_status_pending_p): Don't consider explicitly suspended
7778 threads.
7779 (my_waitpid): Reimplement. Emulate __WALL.
7780 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
7781 Use lwpid_of.
7782 (sigchld_handler, linux_supports_non_stop, linux_async)
7783 (linux_start_non_stop): New.
7784 (linux_target_ops): Register linux_supports_non_stop, linux_async
7785 and linux_start_non_stop.
7786 (initialize_low): Install SIGCHLD handler.
7787 * thread-db.c (thread_db_create_event, find_one_thread)
7788 (thread_db_get_tls_address): Use lwpid_of.
7789 * win32-low.c (win32_detach): Adjust to use resume_kind.
7790 (win32_wait): Add `options' argument.
7791 * spu-low.c (spu_resume): Adjust to use resume_kind.
7792 (spu_wait): Add `options' argument.
7793
5b1c542e
PA
77942009-04-01 Pedro Alves <pedro@codesourcery.com>
7795
7796 Decouple target code from remote protocol.
7797
7798 * target.h (enum target_waitkind): New.
7799 (struct target_waitstatus): New.
7800 (struct target_ops) <wait>: Return an unsigned long. Take a
7801 target_waitstatus pointer instead of a char pointer.
7802 (mywait): Likewise.
7803 * target.c (mywait): Change prototype to return an unsigned long.
7804 Take a target_waitstatus pointer instead of a char pointer. Adjust.
7805 * server.h (thread_from_wait, old_thread_from_wait): Delete
7806 declarations.
7807 (prepare_resume_reply): Change prototype to take a
7808 target_waitstatus.
7809 * server.c (thread_from_wait, old_thread_from_wait): Delete.
7810 (last_status, last_ptid): New.
7811 (start_inferior): Remove "statusptr" argument. Adjust. Return a
7812 pid instead of a signal.
7813 (attach_inferior): Remove "status" and "signal" parameters.
7814 Adjust.
7815 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
7816 not as an address.
7817 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
7818 (handle_v_requests, myresume): Remove "status" and "signal"
7819 parameters. Adjust.
7820 (handle_status): New.
7821 (main): Delete local `status'. Adjust.
7822 * remote-utils.c: Include target.h.
7823 (prepare_resume_reply): Change prototype to take a
7824 target_waitstatus. Adjust.
7825
7826 * linux-low.c (linux_wait): Adjust to new target_ops->wait
7827 interface.
7828 * spu-low.c (spu_wait): Adjust.
7829 * win32-low.c (enum target_waitkind, struct target_waitstatus):
7830 Delete.
7831 (win32_wait): Adjust.
7832
2bd7c093
PA
78332009-04-01 Pedro Alves <pedro@codesourcery.com>
7834
7835 * target.h (struct thread_resume): Delete leave_stopped member.
7836 (struct target_ops): Add a `n' argument to the `resume' callback.
7837 * server.c (start_inferior): Adjust.
7838 (handle_v_cont, myresume): Adjust.
7839 * linux-low.c (check_removed_breakpoint): Adjust to resume
7840 interface change, and to removed leave_stopped field.
7841 (resume_ptr): Delete.
7842 (struct thread_resume_array): New.
7843 (linux_set_resume_request): Add new `arg' parameter. Adjust to
7844 resume interface change.
7845 (linux_continue_one_thread, linux_queue_one_thread)
7846 (resume_status_pending_p): Check if the resume field is NULL
7847 instead of checking the leave_stopped member.
7848 (linux_resume): Adjust to the target resume interface change.
7849 * spu-low.c (spu_resume): Adjust to the target resume interface
7850 change.
7851 * win32-low.c (win32_detach, win32_resume): Ditto.
7852
c35fafde
PA
78532009-04-01 Pedro Alves <pedro@codesourcery.com>
7854
7855 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
7856 flag.
7857 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
7858 pending.
7859 (linux_continue_one_thread): Only preserve the stepping flag if
7860 there's a pending breakpoint.
7861
0a59d50b
PA
78622009-03-31 Pedro Alves <pedro@codesourcery.com>
7863
7864 * server.c (main): After the inferior having exited, call
7865 remote_close before exiting gdbserver.
7866
f04c6d38
TJB
78672009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
7868
7869 Fix size of FPSCR in Power 7 processors.
7870 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
7871 (PPC_FEATURE_HAS_DFP): New #define.
7872 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
7873 size of the FPSCR.
7874
78e5cee6
PA
78752009-03-23 Pedro Alves <pedro@codesourcery.com>
7876
7877 * server.c (handle_query) Whitespace and formatting.
7878
1b3f6016
PA
78792009-03-22 Pedro Alves <pedro@codesourcery.com>
7880
7881 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
7882 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
7883 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
7884 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
7885 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
7886 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
7887 Makefile.in, configure.ac: Fix whitespace throughout.
7888 * configure: Regenerate.
7889
a07b2135
PA
78902009-03-22 Pedro Alves <pedro@codesourcery.com>
7891
7892 * inferiors.c (find_inferior): Make it safe for the callback
7893 function to delete the currently iterated inferior.
7894
67cc2626
PA
78952009-03-22 Pedro Alves <pedro@codesourcery.com>
7896
7897 * Makefile.in (linuw_low_h): Move higher.
7898 (thread-db.o): Depend on $(linux_low_h).
7899
54a0b537
PA
79002009-03-17 Pedro Alves <pedro@codesourcery.com>
7901
7902 Rename "process" to "lwp" throughout.
7903
7904 * linux-low.c (all_processes): Rename to...
7905 (all_lwps): ... this.
7906 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
7907 (add_process): Rename to ...
7908 (add_lwp): ... this. Adjust.
7909 (linux_create_inferior): Adjust.
7910 (linux_attach_lwp): Adjust.
7911 (linux_attach): Adjust.
7912 (linux_kill_one_process): Rename to ...
7913 (linux_kill_one_lwp): ... this. Adjust.
7914 (linux_kill): Adjust.
7915 (linux_detach_one_process): Rename to ...
7916 (linux_detach_one_lwp): ... this. Adjust.
7917 (linux_detach): Adjust.
7918 (check_removed_breakpoint): Adjust.
7919 (status_pending_p): Adjust.
7920 (linux_wait_for_process): Rename to ...
7921 (linux_wait_for_lwp): ... this. Adjust.
7922 (linux_wait_for_event): Adjust.
7923 (send_sigstop): Adjust.
7924 (wait_for_sigstop): Adjust.
7925 (stop_all_processes): Rename to ...
7926 (stop_all_lwps): ... this.
7927 (linux_resume_one_process): Rename to ...
7928 (linux_resume_one_lwp): ... this. Adjust.
7929 (linux_set_resume_request, linux_continue_one_thread)
7930 (linux_queue_one_thread, resume_status_pending_p)
7931 (usr_store_inferior_registers, regsets_store_inferior_registers)
7932 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
7933 Adjust.
7934 * linux-low.h (get_process): Rename to ...
7935 (get_lwp): ... this. Adjust.
7936 (get_thread_process): Rename to ...
7937 (get_thread_lwp): ... this. Adjust.
7938 (get_process_thread): Rename to ...
7939 (get_lwp_thread): ... this. Adjust.
7940 (struct process_info): Rename to ...
7941 (struct lwp_info): ... this.
7942 (all_processes): Rename to ...
7943 (all_lwps): ... this.
7944 * proc-service.c (ps_lgetregs): Adjust.
7945 * thread-db.c (thread_db_create_event, find_one_thread)
7946 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
7947
0b16c5cf
PA
79482009-03-14 Pedro Alves <pedro@codesourcery.com>
7949
7950 * server.c (handle_query): Handle "qAttached".
7951
32de4b9d
NS
79522009-03-13 Nathan Sidwell <nathan@codesourcery.com>
7953
7954 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
7955 GPLv3, update license URL.
7956
2aecd87f
DE
79572009-03-01 Doug Evans <dje@google.com>
7958
93efd302 7959 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
7960 (server_h): Add gdb_signals.h.
7961 (signals.o): Update.
7962 * server.h (target_signal_from_host,target_signal_to_host_p)
7963 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
7964
86b1f9c5
PM
79652009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
7966
7967 * remote-utils.c (getpkt): Also generate remote-debug
7968 information if noack_mode is set.
7969
4aa995e1
PA
79702009-02-06 Pedro Alves <pedro@codesourcery.com>
7971
7972 * server.c (handle_query): Report qXfer:siginfo:read and
7973 qXfer:siginfo:write as supported and handle them.
7974 * target.h (struct target_ops) <qxfer_siginfo>: New field.
7975 * linux-low.c (linux_xfer_siginfo): New.
7976 (linux_target_ops): Set it.
7977
62709adf
PA
79782009-01-26 Pedro Alves <pedro@codesourcery.com>
7979
7980 * server.c (gdbserver_usage): Mention --remote-debug.
7981 (main): Accept '--remote-debug' switch.
7982
aef93bd7
DE
79832009-01-18 Doug Evans <dje@google.com>
7984
7985 * regcache.c (new_register_cache): No need to check result of xcalloc.
7986 * server.c (handle_search_memory): Back out calls to xmalloc,
7987 result is checked and error is returned to user upon failure.
7988 (handle_query): Ditto. Add more checks for result of malloc.
7989 (handle_v_cont): Check result of malloc, report error back to
7990 user upon failure.
7991 (handle_v_run): Ditto. Call freeargv.
7992 * server.h (freeargv): Declare.
7993 * utils.c (freeargv): New fn.
7994
54363045
DE
79952009-01-15 Doug Evans <dje@google.com>
7996
f626972c
DE
7997 * gdbreplay.c (perror_with_name): Make arg const char *.
7998 * server.h (target_signal_to_name): Make return type const char *.
0842e787 7999 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 8000 * utils.c (perror_with_name): Make arg const char *.
54363045 8001
18aae699
PA
80022009-01-14 Pedro Alves <pedro@codesourcery.com>
8003
8004 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8005 when handling a EXIT_PROCESS_DEBUG_EVENT.
8006
ff703abe
JB
80072009-01-06 Joel Brobecker <brobecker@adacore.com>
8008
8009 * gdbreplay.c (gdbreplay_version): Update copyright year.
8010 * server.c (gdbserver_version): Likewise.
8011
f21cc1a2 80122009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
8013
8014 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 8015 (handle_extended_wait): Improve comment.
0e21c1ec 8016
bca929d3
DE
80172008-12-13 Doug Evans <dje@google.com>
8018
8019 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8020 * server.h (ATTR_MALLOC): New macro.
8021 (xmalloc,xcalloc,xstrdup): Declare.
8022 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
8023 * inferiors.c: Ditto.
8024 * linux-low.c: Ditto.
8025 * mem-break.c: Ditto.
8026 * regcache.c: Ditto.
8027 * remote-utils.c: Ditto.
8028 * server.c: Ditto.
8029 * target.c: Ditto.
8030 * win32-low.c: Ditto.
8031
97438e3f
DE
80322008-12-12 Doug Evans <dje@google.com>
8033
896c7fbb
DE
8034 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
8035 in debugging printf.
8036
97438e3f
DE
8037 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
8038
e3b886f8
DE
80392008-12-09 Doug Evans <dje@google.com>
8040
8041 * linux-low.h (struct process_info): Delete member tid, unused.
8042 * thread-db.c (find_one_thread): Update.
8043 (maybe_attach_thread): Update.
8044
07e059b5
VP
80452008-12-02 Pedro Alves <pedro@codesourcery.com>
8046
889bf7c5
PA
8047 * target.h (struct target_ops): Add qxfer_osdata member.
8048 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
8049 and dirent.h.
8050 (linux_qxfer_osdata): New functions.
8051 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
8052 callback.
8053 * server.c (handle_query): Handle "qXfer:osdata:read:".
8054 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
8055 (buffer_xml_printf): New functions.
8056 * server.h (struct buffer): New.
8057 (buffer_grow_str, buffer_grow_str0): New macros.
8058 (buffer_grow, buffer_free, buffer_init, buffer_finish)
8059 (buffer_xml_printf): Declare.
07e059b5 8060
4cab47ab
DE
80612008-11-24 Doug Evans <dje@google.com>
8062
8063 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
8064
f142445f
DJ
80652008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
8066
8067 * server.c (handle_v_run): Always use the supplied argument list.
8068
d0107bb6 80692008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 8070
d0107bb6
BW
8071 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
8072 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 8073
2c4ad781
TJB
80742008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
8075
8076 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
8077 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
8078 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
8079 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
8080 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
8081 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
8082 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
8083 XML target descriptions.
8084 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
8085 when inferior is running on an ISA 2.05 or later processor. Add
8086 special case to return offset for full 64-bit slot of FPSCR when
8087 in 32-bits.
8088
dfb64f85
DJ
80892008-11-14 Daniel Gutson <dgutson@codesourcery.com>
8090
8091 * Makefile.in (SFILES, clean): Added sparc64 files.
8092 (reg-sparc64.o, reg-sparc64.c): New.
8093 * configure.srv (sparc*-*-linux*): New configuration.
8094 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
8095 syscall arguments for SPARC.
8096 (regsets_store_inferior_registers): Likewise.
8097 * linux-sparc-low.c: New file.
8098
66b6e1dd
DE
80992008-10-21 Doug Evans <dje@google.com>
8100
8101 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
8102 (READLINE_DIR,READLINE_DEP): Delete.
8103 (INTERNAL_CFLAGS): Update.
8104 (LINTFLAGS): Update.
8105
9b710a42
PA
81062008-10-10 Pedro Alves <pedro@codesourcery.com>
8107
8108 * server.c (handle_v_run): If GDB didn't specify an argv, use the
8109 whole argv from the last run, not just argv[0].
8110
5822d809
PA
81112008-09-08 Pedro Alves <pedro@codesourcery.com>
8112
8113 * regcache.c (new_register_cache): Return NULL if the register
8114 cache size isn't known yet.
8115 (free_register_cache): Avoid dereferencing a NULL regcache.
8116
74aac56f
DJ
81172008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8118
8119 * configure.srv: Merge MIPS and MIPS64.
8120
400b20f5
MR
81212008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
8122
8123 * Makefile.in (uninstall): Apply $(EXEEXT) too.
8124
677c5bb1
LM
81252008-08-18 Luis Machado <luisgpm@br.ibm.com>
8126
8127 * Makefile.in: Add required vsx dependencies.
8128
8129 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
8130 Declare init_registers_powerpc_vsx32l.
8131 Declare init_registers_powerpc_vsx64l.
8132 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
8133 (ppc_arch_setup): Check for VSX in hwcap.
8134 (ppc_fill_vsxregset): New function.
8135 (ppc_store_vsxregset): New function.
8136 Add new VSX entry in regset_info target_regsets.
8137
8138 * configure.srv: Add new VSX dependencies.
8139
a6f3e723
SL
81402008-08-12 Pedro Alves <pedro@codesourcery.com>
8141
8142 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
8143 (remote_open): Set or clear transport_is_reliable.
8144 (putpkt_binary): Don't expect acks in noack mode.
8145 (getpkt): Don't send ack/nac in noack mode.
8146 * server.c (handle_general_set): Handle QStartNoAckMode.
8147 (handle_query): If connected by tcp pass QStartNoAckMode+ in
8148 qSupported.
8149 (main): Reset noack_mode on every connection.
8150 * server.h (noack_mode): Declare.
8151
a417dc56
RW
81522008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8153
8154 * Makefile.in (GDBREPLAY_OBS): New variable.
8155 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
8156
3221518c
UW
81572008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
8158 Daniel Jacobowitz <dan@codesourcery.com>
8159
8160 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
8161 (usr_store_inferior_registers): Likewise.
8162 (regsets_store_inferior_registers): Likewise.
8163
ec56be1b
PA
81642008-07-31 Rolf Jansen <rj@surtec.com>
8165 Pedro Alves <pedro@codesourcery.com>
8166
8167 * configure.ac: Check for memmem declaration.
8168 * server.c [HAVE_MALLOC_H]: Include malloc.h.
8169 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
8170 (disable_packet_qfThreadInfo): Unconditionally compile.
8171 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
8172 * configure, config.in: Regenerate.
8173
2fe5e3ff
DE
81742008-07-28 Doug Kwan <dougkwan@google.com>
8175
8176 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
8177 (linux_write_memory): Remove declaration of errno.
8178
836acd6d
UW
81792008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
8180
8181 * linux-low.c (handle_extended_wait): Do not use "status"
8182 variable uninitialized.
8183
aeba519e
PA
81842008-07-07 Pedro Alves <pedro@codesourcery.com>
8185
8186 * server.c (handle_v_attach): Inhibit reporting dll changes.
8187
db42f210
PA
81882008-06-27 Pedro Alves <pedro@codesourcery.com>
8189
8190 * remote-utils.c (prepare_resume_reply): If requested, don't
8191 output "thread:TID" in the T stop reply.
8192
8193 * server.c (disable_packet_vCont, disable_packet_Tthread)
8194 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
8195 (handle_query): If requested, disable support for qC, qfThreadInfo
8196 and qsThreadInfo.
8197 (handle_v_requests): If requested, disable support for vCont.
8198 (gdbserver_show_disableable): New.
8199 (main): Handle --disable-packet and --disable-packet=LIST.
8200
8201 * server.h (disable_packet_vCont, disable_packet_Tthread)
8202 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
8203
8e4c5421
CD
82042008-06-20 Carlos O'Donell <carlos@codesourcery.com>
8205
8206 * server.c (gdbserver_usage): Mention --version.
8207
6e23a804
DJ
82082008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
8209
8210 * Makefile.in (gdbreplay.o): New rule.
8211
90aa6a40
JM
82122008-06-06 Joseph Myers <joseph@codesourcery.com>
8213
8214 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
8215 message, not gdbserver.
8216
c16158bc 82172008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
8218 Nathan Sidwell <nathan@codesourcery.com>
8219 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
8220
8221 * acinclude.m4: Include ../../config/acx.m4.
8222 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
8223 * configure, config.in: Regenerate.
8224 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
8225 * server.c (gdbserver_version): Print PKGVERSION.
8226 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
8227 (main): Adjust gdbserver_usage calls.
8228 * gdbreplay.c (version, host_name): Add declarations.
8229 (gdbreplay_version, gdbreplay_usage): New.
8230 (main): Accept --version and --help options.
8231
aeb75bf5
DJ
82322008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
8233
8234 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
8235 (arm_breakpoint_at): Handle Thumb.
8236 (the_low_target): Add comment.
8237
76b233dd
UW
82382008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
8239
8240 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
8241
08388c79
DE
82422008-05-09 Doug Evans <dje@google.com>
8243
a3c83fae
DE
8244 * server.h (decode_search_memory_packet): Declare.
8245 * remote-utils.c (decode_search_memory_packet): New fn.
8246 * server.c (handle_search_memory_1): New fn.
08388c79
DE
8247 (handle_search_memory): New fn.
8248 (handle_query): Process qSearch:memory packets.
8249
bb9c3d36
UW
82502008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
8251
8252 * regcache.c (registers_length): Remove.
8253 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
8254 full register packet.
8255 * regcache.h (registers_length): Remove prototype.
8256 * server.h (PBUFSIZ): Define to 16384.
8257
7284e1be
UW
82582008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
8259
8260 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
8261 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
8262 powerpc-64l.o, and powerpc-altivec64l.o.
8263 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
8264 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
8265 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
8266 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
8267 rs6000/power-linux.xml, and rs6000/power64-linux.xml
8268 to srv_xmlfiles.
8269
8270 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
8271 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
8272 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
8273 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
8274 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
8275 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
8276 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
8277 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
8278 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
8279 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
8280 (clean): Update.
8281
8282 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
8283 (init_registers_powerpc_32l): ... this new prototype.
8284 (init_registers_powerpc_32): Remove, replace by ...
8285 (init_registers_powerpc_altivec32l): ... this new prototype.
8286 (init_registers_powerpc_e500): Remove, replace by ...
8287 (init_registers_powerpc_e500l): ... this new prototype.
8288 (init_registers_ppc64): Remove, replace by ...
8289 (init_registers_powerpc_64l): ... this new prototype.
8290 (init_registers_powerpc_64): Remove, replace by ...
8291 (init_registers_powerpc_altivec64l): ... this new prototype.
8292 (ppc_num_regs): Set to 73.
8293 (PT_ORIG_R3, PT_TRAP): Define if necessary.
8294 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
8295 (ppc_cannot_store_register): Handle orig_r3 and trap.
8296 (ppc_arch_setup): Update init_registers_... calls.
8297 (ppc_fill_gregset): Handle orig_r3 and trap.
8298
8299 * inferiors.c (clear_inferiors): Reset current_inferior.
8300
fdc59709
PB
83012008-04-23 Paolo Bonzini <bonzini@gnu.org>
8302
889bf7c5
PA
8303 * acinclude.m4: Add override.m4.
8304 * configure: Regenerate.
fdc59709 8305
c9b2f845
UW
83062008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8307
8308 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
8309 initial call to init_register_ppc64.
8310
550512b8
UW
83112008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8312
43aaf8b6
PA
8313 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
8314 single powerpc*-*-linux* case.
550512b8
UW
8315 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
8316
b6430ec3
UW
83172008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
8318
8319 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 8320 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
8321 from reg_xmlfiles.
8322 * linux-ppc-low.c: Include <elf.h>.
8323 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
8324 (ppc_hwcap): New global variable.
8325 (ppc_regmap): Remove __SPE__ #ifdef sections.
8326 (ppc_regmap_e500): New global variable.
8327 (ppc_cannot_store_register): Update __SPE__ special case.
8328 (ppc_get_hwcap): New function.
8329 (ppc_arch_setup): Use it to determine whether inferior supports
8330 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
8331 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
8332 Do not access registers if target does not support AltiVec.
8333 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
8334 Do not access registers if target does not support SPE.
8335 (target_regsets): Unconditionally include AltiVec and SPE regsets.
8336
52fa2412
UW
83372008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
8338
8339 * linux-low.c (disabled_regsets, num_regsets): New.
8340 (use_regsets_p): Delete.
8341 (linux_wait_for_process): Clear disabled_regsets.
8342 (regsets_fetch_inferior_registers): Check and set it.
8343 (regsets_store_inferior_registers): Likewise.
8344 (linux_fetch_registers, linux_store_registers): Do not use
8345 use_regsets_p.
8346 (initialize_low): Allocate disabled_regsets.
8347
e28b3332
DJ
83482008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
8349
8350 * Makefile.in (LIBOBJS): New.
8351 (OBS): Use LIBOBJS.
8352 (memmem.o): New rule.
8353 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
8354 * configure: Regenerated.
8355
4536995d
UW
83562008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
8357
8358 * server.c (handle_query): Never return "unsupported" for
8359 qXfer:features:read queries.
8360
221c031f
UW
83612008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
8362
8363 * server.c (get_features_xml): Fix inverted condition.
8364 (handle_query): Always support qXfer:feature:read.
8365
ccd213ac
DJ
83662008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
8367
8368 * server.c (wrapper_argv): New.
8369 (start_inferior): Handle wrapper_argv. If set, expect an extra
8370 trap.
8371 (gdbserver_usage): Document --wrapper.
8372 (main): Parse --wrapper.
8373
6fe305f7
UW
83742008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8375
8376 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
8377 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
8378 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
8379 (ppc_set_pc): Likewise.
8380 (ppc_arch_setup): New function.
8381 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
8382 of collect_register.
889bf7c5 8383 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 8384
5b0a002e
UW
83852008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8386
8387 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
8388 instead of linux-ppc64-low.o.
8389 * linux-ppc64-low.c: Remove file.
8390 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
8391 (linux-ppc64-low.o): Remove rule.
8392
8393 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
8394 (init_registers_powerpc_64): Likewise.
8395 (ppc_regmap): Conditionally define depending on __powerpc64__.
8396 (ppc_cannot_store_register): Do not special-case "fpscr" when
8397 compiled on __powerpc64__.
8398 (ppc_collect_ptrace_register): New function.
8399 (ppc_supply_ptrace_register): New function.
8400 (ppc_breakpoint): Change type to "unsigned int".
8401 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
8402 (the_low_target): Conditionally provide initializers for the
889bf7c5 8403 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
8404 collect_ptrace_register and supply_ptrace_register members.
8405
9b4b61c8
UW
84062008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8407
8408 * regcache.h (gdbserver_xmltarget): Add extern declaration.
8409 * server.c (gdbserver_xmltarget): Define.
8410 (get_features_xml): Use it to replace "target.xml" and arch_string.
8411
8412 * configure.srv: Remove srv_xmltarget. Add XML files that were
8413 mentioned there to srv_xmlfiles instead. Remove conditional tests
8414 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
8415 srv_xmlfiles and srv_regobj to include all possible choices.
8416 * configure.ac (srv_xmltarget): Remove.
8417 (srv_xmlfiles): Do not add "target.xml".
8418 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
8419 checks for supplementary target information.
8420 * configure: Regenerate.
8421 * Makefile.in (XML_TARGET): Remove.
8422 (target.xml): Remove rule.
8423 (clean): Do not clean up target.xml.
8424 (.PRECIOUS): Do not mention target.xml.
8425
8426 * target.h (struct target_ops): Remove arch_string member.
8427 * linux-low.c (linux_arch_string): Remove.
8428 (linux_target_ops): Remove arch_string initializer.
8429 * linux-low.h (struct linux_target_ops): Remove arch_string member.
8430 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
8431 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
8432 * spu-low.c (spu_arch_string): Remove.
8433 (spu_target_ops): Remove arch_string initializer.
8434 * win32-low.c (win32_arch_string): Remove.
8435 (win32_target_ops): Remove arch_string initializer.
8436 * win32-low.h (struct win32_target_ops): Remove arch_string member.
8437 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
8438 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
8439
ee1a7ae4
UW
84402008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8441
8442 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
8443 by collect_ptrace_register and supply_ptrace_register hooks.
8444 * linux-low.c (fetch_register): Use supply_ptrace_register callback
8445 instead of checking for the_low_target.left_pad_xfer.
8446 (usr_store_inferior_registers): Use collect_ptrace_register callback
8447 instead of checking for the_low_target.left_pad_xfer.
8448
8449 * linux-s390-low.c (s390_collect_ptrace_register): New function.
8450 (s390_supply_ptrace_register): Likewise.
8451 (s390_fill_gregset): Call s390_collect_ptrace_register.
8452 (the_low_target): Update.
8453
8454 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
8455 (ppc_supply_ptrace_register): Likewise.
8456 (the_low_target): Update.
8457
8458 * linux-i386-low.c (the_low_target): Update.
8459 * linux-x86-64-low.c (the_low_target): Update.
8460
d61ddec4
UW
84612008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8462
8463 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
8464 reg-s390.o and reg-s390x.o.
8465
8466 * linux-low.c (new_inferior): New global variable.
8467 (linux_create_inferior, linux_attach): Set it.
8468 (linux_wait_for_process): Call the_low_target.arch_setup after the
8469 target has stopped for the first time.
8470 (initialize_low): Do not call the_low_target.arch_setup.
8471
8472 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
8473 (s390_set_pc): Likewise.
8474 (s390_arch_setup): New function.
8475 (the_low_target): Use s390_arch_setup as arch_setup routine.
8476
8477 * regcache.c (realloc_register_cache): New function.
8478 (set_register_cache): Call it for each existing regcache.
8479
d05b4ac3
UW
84802008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8481
8482 * server.h (init_registers): Remove prototype.
8483
8484 * linux-low.h (struct linux_target_ops): Add arch_setup field.
8485 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
8486 instead of init_registers ().
8487 * linux-arm-low.c (init_registers_arm): Add prototype.
8488 (init_registers_arm_with_iwmmxt): Likewise.
8489 (the_low_target): Add initializer for arch_setup field.
8490 * linux-cris-low.c (init_registers_cris): Add prototype.
8491 (the_low_target): Add initializer for arch_setup field.
8492 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
8493 (the_low_target): Add initializer for arch_setup field.
8494 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
8495 (the_low_target): Add initializer for arch_setup field.
8496 * linux-ia64-low.c (init_registers_ia64): Add prototype.
8497 (the_low_target): Add initializer for arch_setup field.
8498 * linux-m32r-low.c (init_registers_m32r): Add prototype.
8499 (the_low_target): Add initializer for arch_setup field.
8500 * linux-m68k-low.c (init_registers_m68k): Add prototype.
8501 (the_low_target): Add initializer for arch_setup field.
8502 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
8503 (init_registers_mips64_linux): Likewise.
8504 (the_low_target): Add initializer for arch_setup field.
8505 * linux-ppc-low.c (init_registers_ppc): Add prototype.
8506 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
8507 (the_low_target): Add initializer for arch_setup field.
8508 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
8509 (init_registers_powerpc_64): Likewise.
8510 (the_low_target): Add initializer for arch_setup field.
8511 * linux-s390-low.c (init_registers_s390): Add prototype.
8512 (init_registers_s390x): Likewise.
8513 (the_low_target): Add initializer for arch_setup field.
8514 * linux-sh-low.c (init_registers_sh): Add prototype.
8515 (the_low_target): Add initializer for arch_setup field.
8516 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
8517 (the_low_target): Add initializer for arch_setup field.
8518 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
8519 (the_low_target): Add initializer for arch_setup field.
8520
8521 * win32-low.h (struct win32_target_ops): Add arch_setup field.
8522 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
8523 instead of init_registers ().
8524 * win32-arm-low.c (init_registers_arm): Add prototype.
8525 (the_low_target): Add initializer for arch_setup field.
8526 * win32-i386-low.c (init_registers_i386): Add prototype.
8527 (the_low_target): Add initializer for arch_setup field.
8528
8529 * spu-low.c (init_registers_spu): Add prototype.
8530 (initialize_low): Call initialie_registers_spu () instead of
8531 initialize_registers ().
8532
fd96d250
PA
85332008-02-19 Pedro Alves <pedro@codesourcery.com>
8534
8535 * server.c (handle_v_requests): When handling the vRun and vAttach
8536 packets, if already debugging a process, don't kill it. Return an
8537 error instead.
8538
d41b6bb4
DJ
85392008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
8540
8541 * server.c (handle_query): Correct length check.
8542
5ac588cf
PA
85432008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
8544
8545 * win32-low.c (do_initial_child_stuff): Add process handle
8546 parameter. Set current_process_handle and current_process_id from the
8547 parameters. Clear globals.
8548 (win32_create_inferior): Don't set current_process_handle and
8549 current_process_id here. Instead pass them on the call to
8550 do_initial_child_stuff.
8551 (win32_attach): Likewise.
8552 (win32_clear_inferiors): New.
8553 (win32_kill): Don't close the current process handle or the
8554 current thread handle here. Instead call win32_clear_inferiors.
8555 (win32_detach): Don't open a new handle to the process. Call
8556 win32_clear_inferiors.
8557 (win32_join): Don't rely on current_process_handle; open a new
8558 handle using the process id.
8559 (win32_wait): Call win32_clear_inferiors when the inferior process
8560 has exited.
8561
ecd7ecbc
DJ
85622008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
8563
8564 * server.c (monitor_show_help): Add "exit".
8565
1525d545
MG
85662008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
8567
ecd7ecbc 8568 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
8569 (clean): Add reg-xtensa.c.
8570 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
8571 * configure.srv (xtensa*-*-linux*) New target.
8572 * linux-xtensa-low.c: New.
8573 * xtensa-xtregs.c: New.
1525d545 8574
59a016f0
PA
85752008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
8576
8577 * hostio.c: Don't include errno.h.
8578 (errno_to_fileio_errno): Move to hostio-errno.
8579 * hostio.c: (hostio_error): Remove the error parameter. Defer the
8580 error number outputting to the target->hostio_last_error callback.
8581 (hostio_packet_error): Use FILEIO_EINVAL directly.
8582 (handle_open, handle_pread, hostio_error, handle_unlink): Update
8583 calls to hostio_error.
8584 * hostio-errno.c: New.
8585 * server.h (hostio_last_error_from_errno): Declare.
8586 * target.h (target_ops): Add hostio_last_error member.
8587 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
8588 as hostio_last_error handler.
889bf7c5 8589 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
8590 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
8591 (wince_hostio_last_error): New functions.
8592 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
8593 as hostio_last_error handler.
8594 (win32_target_ops) [!_WIN32_WCE]: Register
8595 hostio_last_error_from_errno as hostio_last_error handler.
8596 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
8597 (hostio-errno.o): New rule.
8598 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
8599 * configure.srv (srv_hostio_err_objs): New variable. Default to
8600 hostio-errno.o.
8601 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
8602 * configure: Regenerate.
8603
2d717e4f
DJ
86042008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8605
8606 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
8607 (linux_kill, linux_detach): Clean up the process list.
8608 * remote-utils.c (remote_open): Improve port number parsing.
8609 (putpkt_binary, input_interrupt): Only send interrupts if the target
8610 is running.
8611 * server.c (extended_protocol): Make static.
8612 (attached): Define earlier.
8613 (exit_requested, response_needed, program_argv): New variables.
8614 (target_running): New.
8615 (start_inferior): Clear attached here.
8616 (attach_inferior): Set attached here.
8617 (require_running): Define.
8618 (handle_query): Use require_running and target_running. Implement
8619 "monitor exit".
8620 (handle_v_attach, handle_v_run): New.
8621 (handle_v_requests): Use require_running. Handle vAttach and vRun.
8622 (gdbserver_usage): Update.
8623 (main): Redo argument parsing. Handle --debug and --multi. Handle
8624 --attach along with other options or after the port. Save
8625 program_argv. Support no initial program. Resynchronize
8626 communication with GDB after an error. Handle "monitor exit".
8627 Use require_running and target_running. Always allow the extended
8628 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
8629 restart in extended mode.
8630 * README: Refer to the GDB manual. Update --attach usage.
8631
7407e2de
AS
86322007-12-20 Andreas Schwab <schwab@suse.de>
8633
8634 * linux-low.c (STACK_SIZE): Define.
8635 (linux_tracefork_child): Use it. Use __clone2 on ia64.
8636 (linux_test_for_tracefork): Likewise.
8637
b65d95c5
DJ
86382007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
8639
8640 * linux-low.c (linux_wait_for_event): Update messages. Do not
8641 reinsert auto-delete breakpoints.
8642 * mem-break.c (struct breakpoint): Change return type of handler to
8643 int.
8644 (set_breakpoint_at): Update handler type.
8645 (reinsert_breakpoint_handler): Return 1 instead of calling
8646 delete_breakpoint.
8647 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
8648 setting a new one.
8649 (check_breakpoints): Delete auto-delete breakpoints and return 2.
8650 * mem-break.h (set_breakpoint_at): Update handler type.
8651 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
8652 * win32-low.c (auto_delete_breakpoint): New.
8653 (get_child_debug_event): Use it.
8654
4e799345
DJ
86552007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
8656
8657 * configure.ac: Check for pread and pwrite.
8658 * hostio.c (handle_pread): Fall back to lseek and read.
8659 (handle_pwrite): Fall back to lseek and write.
8660 * config.in, configure: Regenerated.
8661
27524b67
DJ
86622007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
8663
8664 * server.c (myresume): Add own_buf argument.
8665 (main): Update calls.
8666
a20d5e98
DJ
86672007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
8668
8669 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
8670 * remote-utils.c (remote_open): Do not call disable_async_io.
8671 (block_async_io): Delete.
8672 (unblock_async_io): Make static.
8673 (initialize_async_io): New.
8674 * server.c (handle_v_cont): Handle async I/O here.
8675 (myresume): Likewise. Move other common resume tasks here...
8676 (main): ... from here. Call initialize_async_io. Disable async
8677 I/O before the main loop.
8678 * server.h (initialize_async_io): Declare.
8679 (block_async_io, unblock_async_io): Delete prototypes.
8680 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
8681
b79d787e
DJ
86822007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
8683
8684 * remote-utils.c (readchar): Allow binary data in received messages.
8685
d97903b2
PA
86862007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8687
8688 * win32-low.c (attaching): New global.
8689 (win32_create_inferior): Clear the `attaching' global.
8690 (win32_attach): Set the `attaching' global.
8691 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
8692 attaching. Only set a breakpoint at the entry point if not
8693 attaching.
8694
311de423
PA
86952007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8696
8697 * server.c (main): Don't report dll events on the initial
8698 connection on attaches.
8699
6c2d16d2
PA
87002007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8701
8702 * server.c (main): Relax numerical bases supported for the pid of
8703 the --attach command line argument.
8704
5ca906e6
PA
87052007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8706
8707 * win32-low.c (win32_attach): Call OpenProcess before
8708 DebugActiveProcess, not after. Add last error output to error
8709 call.
8710
9c6c8194
PA
87112007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8712
8713 * win32-low.c (win32_get_thread_context)
8714 (win32_set_thread_context): New functions.
8715 (thread_rec): Use win32_get_thread_context.
8716 (continue_one_thread, win32_resume): Use win32_set_thread_context.
8717 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
8718 field.
8719
4d5d1aaa
PA
87202007-12-03 Leo Zayas
8721 Pedro Alves <pedro_alves@portugalmail.pt>
8722
8723 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
8724 global variables.
8725 (child_add_thread): Minor cleanup.
8726 (child_continue): Resume artificially suspended threads before
8727 calling ContinueDebugEvent.
8728 (suspend_one_thread): New.
8729 (fake_breakpoint_event): New.
8730 (get_child_debug_event): Change return type to int. Check here if
8731 gdb sent an interrupt request. If a soft interrupt was requested,
8732 fake a breakpoint event. Return 0 if there is no event to handle,
8733 and 1 otherwise.
8734 (win32_wait): Don't check here if gdb sent an interrupt request.
8735 Ensure there is a valid event to handle.
8736 (win32_request_interrupt): Add soft interruption method as last
8737 resort.
8738
c436e841
PA
87392007-12-03 Leo Zayas
8740 Pedro Alves <pedro_alves@portugalmail.pt>
8741
8742 * win32-low.h (win32_thread_info): Add descriptions to the
8743 structure members. Replace `suspend_count' counter by a
8744 `suspended' flag.
8745 * win32-low.c (thread_rec): Update condition of when to get the
8746 context from the inferior. Rely on ContextFlags being set if it
8747 has already been retrieved. Only suspend the inferior thread if
8748 we haven't already. Warn if that fails.
8749 (continue_one_thread): s/suspend_count/suspended/. Only call
8750 ResumeThread once. Warn if that fails.
8751
e7b5fa67
PA
87522007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
8753
8754 * win32-low.c (win32_wait): Don't read from the inferior when it
8755 has already exited.
8756
a385171d
PA
87572007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
8758
8759 * Makefile.in (win32_low_h): New variable.
8760 (win32-low.o): Add dependency on $(win32_low_h).
8761 (win32-arm-low.o, win32-i386-low.o): New rules.
8762
f80c84b3
DJ
87632007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
8764
8765 * hostio.c: Correct copyright year.
8766
a6b151f1
DJ
87672007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
8768
8769 * Makefile.in (OBS): Add hostio.o.
8770 (hostio.o): New rule.
8771 * server.h (handle_vFile): Declare.
8772 * hostio.c: New file.
8773 * server.c (handle_v_requests): Take packet_len and new_packet_len
8774 for binary packets. Call handle_vFile.
8775 (main): Update call to handle_v_requests.
8776
f9387fc3
DJ
87772007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
8778
8779 * linux-low.c: Include <sched.h>.
8780
51c2684e
DJ
87812007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
8782
8783 * linux-low.c (linux_tracefork_grandchild): New.
8784 (linux_tracefork_child): Use clone.
8785 (linux_test_for_tracefork): Use clone; allocate and free a stack.
8786
75f83163
JB
87872007-10-31 Joel Brobecker <brobecker@adacore.com>
8788
8789 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
8790
da5898ce
DJ
87912007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
8792
8793 * linux-low.c (handle_extended_wait): Handle unexpected signals.
8794
24a09b5f
DJ
87952007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
8796
8797 * inferiors.c (change_inferior_id): Delete.
8798 (add_pid_to_list, pull_pid_from_list): New.
8799 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
8800 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
8801 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
8802 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
8803 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
8804 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
8805 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
8806 (using_threads): Always set to 1.
8807 (handle_extended_wait): New.
8808 (add_process): Do not set TID.
8809 (linux_create_inferior): Set must_set_ptrace_flags.
8810 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
8811 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
8812 (linux_thread_alive): Rename TID argument to LWPID.
8813 (linux_wait_for_process): Handle unknown processes. Do not use TID.
8814 (linux_wait_for_event): Do not use TID or check using_threads. Update
8815 call to dead_thread_notify. Call handle_extended_wait.
8816 (linux_create_inferior): Use PTRACE_SETOPTIONS.
8817 (send_sigstop): Delete sigstop_sent.
8818 (wait_for_sigstop): Avoid TID.
8819 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
8820 (linux_test_for_tracefork): New.
8821 (linux_lookup_signals): Use thread_db_active and
8822 linux_supports_tracefork_flag.
8823 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
8824 * linux-low.h (get_process_thread): Avoid TID.
8825 (struct process_ifo): Move thread_known and tid to the end. Remove
8826 sigstop_sent.
8827 (linux_attach_lwp, thread_db_init): Update prototypes.
8828 * server.h (change_inferior_id): Delete prototype.
8829 (add_pid_to_list, pull_pid_from_list): New prototypes.
8830 * thread-db.c (thread_db_use_events): New.
8831 (find_first_thread): Rename to...
8832 (find_one_thread): ...this. Update callers and messages. Do not
8833 call fatal. Check thread_db_use_events. Do not call
8834 change_inferior_id or new_thread_notify.
8835 (maybe_attach_thread): Update. Do not call new_thread_notify.
8836 (thread_db_init): Set thread_db_use_events. Check use_events.
8837 * utils.c (fatal, warning): Correct message prefix.
8838
30ed0a8f
DJ
88392007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
8840
8841 * Makefile.in (clean): Remove new files.
8842 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
8843 (powerpc-64.o, powerpc-64.c): New rules.
8844 * configure.srv: Use alternate register sets for powerpc64-*-linux*
8845 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
8846 with SPE.
8847 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
8848 SPE targets.
8849 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
8850 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
8851 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
8852 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
8853 (target_regsets): Add AltiVec and SPE register sets.
8854 * configure.ac: Check for AltiVec and SPE.
8855 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
8856 (ppc_fill_vrregset, ppc_store_vrregset): New.
8857 (target_regsets): Add AltiVec register set.
8858 * configure: Regenerated.
8859
fd462a61
DJ
88602007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
8861
8862 * linux-low.c (O_LARGEFILE): Define.
8863 (linux_read_memory): Use /proc/PID/mem.
8864 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
8865 * configure, config.in: Regenerated.
8866
69f223ed
DJ
88672007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8868
8869 * linux-low.c (linux_wait_for_event): Do not pass signals while
8870 single-stepping.
8871
aec18585
PA
88722007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
8873
8874 * win32-low.c (create_process): New.
8875 (win32_create_inferior): Use create_process instead of
8876 CreateProcess. If create_process failed retry appending an ".exe"
8877 suffix. Store the GetLastError result immediatelly after
8878 create_process calls and use it on the call to error.
8879
34d86ddd
PA
88802007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
8881
8882 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
8883
5a0e3bd0
JB
88842007-08-23 Joel Brobecker <brobecker@adacore.com>
8885
8886 * configure.ac: Switch license to GPLv3.
8887
f88c79e6
MS
88882007-08-01 Michael Snyder <msnyder@access-company.com>
8889
8890 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
8891
6b3d9b83
PA
88922007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
8893
8894 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
8895 typedef.
8896 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
8897 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
8898 CloseToolhelp32Snapshot.
8899 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
8900 CloseToolhelp32Snapshot.
8901
c588c53c
MS
89022007-07-27 Michael Snyder <michael.snyder@access-company.com>
8903
8904 * server.c (main): Check for inferior exit before main loop.
8905
aa0403d9
PA
89062007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
8907
8908 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
8909 instead of on tmp_desc.
8910
255e7678
DJ
89112007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
8912 Daniel Jacobowitz <dan@codesourcery.com>
8913
8914 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
8915 (add_thread): Minor cleanups.
8916 (clear_inferiors): Move lower in the file. Clear the DLL
8917 list.
8918 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
8919 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
8920 (xml_escape_text): New.
8921 * server.c (handle_query): Handle qXfer:libraries:read. Report it
8922 for qSupported.
8923 (handle_v_cont): Report errors.
8924 (gdbserver_version): Update.
8925 (main): Correct size of own_buf. Do not report initial DLL events.
8926 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
8927 (unloaded_dll, xml_escape_text): New.
8928 * win32-low.c (enum target_waitkind): Update comments.
8929 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
8930 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
8931 (win32_EnumProcessModules, win32_GetModuleInformation)
8932 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
8933 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
8934 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
8935 (win32_Module32First, win32_Module32Next, load_toolhelp)
8936 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
8937 (get_child_debug_event): Handle DLL events.
8938 (win32_wait): Likewise.
8939
0d37add9
DJ
89402007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
8941
8942 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
8943 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
8944
45e2715e
PA
89452007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
8946
8947 * win32-low.c (handle_output_debug_string): Ignore event if not
8948 waiting.
8949
c5674cf1
PA
89502007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
8951
8952 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
8953
2bbe3cc1
DJ
89542007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
8955
8956 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
8957
ae13219e
DJ
89582007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
8959
8960 * inferiors.c (change_inferior_id): Add comment.
8961 * linux-low.c (check_removed_breakpoint): Add an early
8962 prototype. Improve debug output.
8963 (linux_attach): Doc update.
8964 (linux_detach_one_process, linux_detach): Clean up before releasing
8965 each process.
8966 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
8967 * linux-low.h (struct process_info): Doc improvement.
8968 * mem-break.c (delete_all_breakpoints): New.
8969 * mem-break.h (delete_all_breakpoints): New prototype.
8970 * thread-db.c (find_first_thread): New.
8971 (thread_db_create_event): Call it instead of
8972 thread_db_find_new_threads. Clean up unused variables.
8973 (maybe_attach_thread): Remove first thread handling.
8974 (thread_db_find_new_threads): Use find_first_thread.
8975 (thread_db_get_tls_address): Likewise.
8976
4105de34
DJ
89772007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
8978
8979 * thread-db.c (thread_db_find_new_threads): Add prototype.
8980 (thread_db_create_event): Check for the main thread before adding
8981 a new thread.
8982 (maybe_attach_thread): Only enable event reporting if TID == 0.
8983 (thread_db_get_tls_address): Check for new threads.
8984
2b876972
DJ
89852007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
8986
8987 * linux-low.c (linux_create_inferior): Try execv before execvp.
8988 * spu-low.c (spu_create_inferior): Likewise.
8989
7a245884
DJ
89902007-06-13 Mike Frysinger <vapier@gentoo.org>
8991
8992 * linux-low.c (linux_create_inferior): Change execv to execvp.
8993 * spu-low.c (spu_create_inferior): Likewies.
8994
117ce543
DJ
89952007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
8996
8997 * Makefile.in (clean): Clean new files instead of deleted ones.
8998 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
8999 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9000 rules.
9001 * configure.srv: Specify XML files and new regformats for MIPS and
9002 MIPS64 GNU/Linux.
9003 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9004 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9005 an entry for the restart register.
9006 (mips_cannot_fetch_register, mips_cannot_store_register)
9007 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9008 register names to match the XML descriptions.
9009 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9010 restart register instead of $0.
9011
0e7f50da
UW
90122007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9013 Markus Deuling <deuling@de.ibm.com>
9014
9015 * remote-utils.c (decode_xfer_write): New function.
9016 * server.h (decode_xfer_write): Add prototype.
9017 * server.c (handle_query): Add PACKET_LEN argument. Support
9018 qXfer:spu:read and qXfer:spu:write packets.
9019 (main): Pass packet_len to handle_query.
9020 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9021 * target.h (target_ops): Add qxfer_spu.
9022
374c1d38
UW
90232007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9024
9025 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
9026 accessing non-seekable spufs files.
9027
bb63802a
UW
90282007-05-16 Markus Deuling <deuling@de.ibm.com>
9029
889bf7c5 9030 * server.c (handle_query): Add reply for qC packet.
bb63802a 9031
7390519e
PA
90322007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9033 Leo Zayas <lerele@champenstudios@com>
9034
9035 * server.h (check_remote_input_interrupt_request): New function.
9036 * remote_utils.c (INVALID_DESCRIPTOR): New define.
9037 (remote_desc): Initialize with INVALID_DESCRIPTOR.
9038 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
9039 (check_remote_input_interrupt_request): New function.
9040 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 9041 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
9042 winapi_GenerateConsoleCtrlEvent): New typedefs.
9043 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
9044 to 250 ms.
9045 (win32_wait): Check for remote interrupt request
9046 with check_remote_input_interrupt_request.
9047 (win32_request_interrupt): New function.
9048 (win32_target_op): Set request_interrupt to win32_request_interrupt.
9049
34b34921
PA
90502007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9051
9052 * win32-low.c (debug_registers_changed,
9053 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
9054 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
9055 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
9056 (thread_rec): Get context using the low target.
9057 (child_add_thread): Call thread_added on the low target,
9058 which does the same thing.
9059 (regptr): Delete.
9060 (do_initial_child_stuff): Remove debug registers references.
9061 Set context using the low target. Resume threads after
9062 setting the contexts.
9063 (child_continue): Remove dead variable. Remove debug
9064 registers references.
9065 (child_fetch_inferior_registers): Go through the low target.
9066 (do_child_store_inferior_registers): Remove.
9067 (child_store_inferior_registers): Go through the low target.
9068 (win32_resume): Remove debug registers references.
9069 Set context using the low target.
9070 (handle_exception): Change return type to void. Don't record
9071 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
9072 first chance exception.
889bf7c5 9073 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
9074 goto loop. Always return after waiting for debug event.
9075 (win32_wait): Convert to switch statement. Handle spurious
9076 events.
9077
9078 * win32-i386-low.c (debug_registers_changed,
9079 debug_registers_used): New.
9080 (initial_stuff): Rename to ...
9081 (i386_initial_stuff): ... this. Clear debug registers
9082 state variables.
9083 (store_debug_registers): Delete.
9084 (i386_get_thread_context): New.
9085 (load_debug_registers): Delete.
9086 (i386_set_thread_context): New.
9087 (i386_thread_added): New.
9088 (single_step): Rename to ...
9089 (i386_single_step): ... this.
9090 (do_fetch_inferior_registers): Rename to ...
9091 (i386_fetch_inferior_register): ... this.
9092 (i386_store_inferior_register): New.
9093 (the_low_target): Adapt to new interface.
9094
9095 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
9096 (arm_get_thread_context): New.
9097 (arm_set_thread_context): New.
9098 (regptr): New.
9099 (do_fetch_inferior_registers): Rename to ...
9100 (arm_fetch_inferior_register): ... this.
9101 (arm_store_inferior_register): New.
9102 (arm_wince_breakpoint): Reimplement as unsigned long.
9103 (arm_wince_breakpoint_len): Define.
9104 (the_low_target): Adapt to new interface.
9105
9106 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
9107 load_debug_registers. Add get_thread_context, set_thread_context,
9108 thread_added and store_inferior_register. Rename
9109 fetch_inferior_registers to fetch_inferior_register.
9110 (regptr): Remove declaration.
9111
dd6953e1
PA
91122007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9113
9114 * linux-low.c (linux_detach): Change return type to int. Return 0.
9115 * spu-low.c (spu_detach): Likewise.
9116
444d6139
PA
91172007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9118
9119 * target.h (target_ops): Change return type of detach to int.
9120 Add join.
9121 (join_inferior): New.
9122 * server.c (main): Don't skip detach support on mingw32.
9123 If the inferior doesn't support detaching return error.
9124 Call join_inferior instead of using waitpid.
9125 * linux-low.c (linux_join): New.
9126 (linux_target_op): Add linux_join.
9127 * spu-low.c (spu_join): New.
9128 (spu_target_ops): Add spu_join.
9129 * win32-low.c (win32_detach): Adapt to new interface.
9130 Reopen current_process_handle before detaching. Issue a child
9131 resume before detaching.
9132 (win32_join): New.
9133 (win32_target_op): Add win32_join.
9134
1d5315fe
PA
91352007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9136
9137 * win32-low.c (win32-attach): Fix return value.
9138 * target.h (target_ops): Describe ATTACH return values.
9139
bf914831
PA
91402007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9141
9142 * win32-low.c (GETPROCADDRESS): Define.
9143 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
9144 (winapi_DebugSetProcessKillOnExit): Likewise.
9145 (win32_create_inferior): Force usage of ansi CreateProcessA.
9146 (win32_attach): Use GETPROCADDRESS.
9147 (win32_detach): Likewise.
9148
f72f3e60
PA
91492007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9150
9151 * win32-low.c (win32_wait): Don't use WSTOPSIG.
9152
ed50f18f
PA
91532007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
9154
9155 * win32-low.c: Commit leftover changes from 2007-03-29.
9156
0c2ead7e
DJ
91572007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9158
9159 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
9160 fields short instead of int. Add explicit padding.
9161 (i387_cache_to_fsave): Remove unnecessary casts.
9162 (i387_fsave_to_cache): Doc fix.
9163 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
9164
73725ff3
DJ
91652007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9166
9167 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
9168 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
9169
d99f33d8
PA
91702007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9171
9172 * configure.srv (arm*-*-mingw32ce*): Move near the other
9173 arm targets.
9174
68070c10
PA
91752007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9176
2482afc6 9177 * configure.ac: Add errno checking.
68070c10
PA
9178 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
9179 sys/file.h and malloc.h.
9180 (AC_CHECK_DECLS): Add perror.
9181 (srv_mingwce): Handle.
2482afc6 9182 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
9183 win32-i386-low.o to srv_tgtobj.
9184 (i[34567]86-*-mingw*): Likewise.
9185 (arm*-*-mingw32ce*): Add case.
9186 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9187 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
9188 [__MINGW32CE__] (strerror): New function.
9189 [__MINGW32CE__] (errno): Define to GetLastError.
9190 [__MINGW32CE__] (COUNTOF): New macro.
9191 (remote_open): Remove extra close call.
9192 * mem-break.c (delete_breakpoint_at): New function.
9193 * mem-break.h (delete_breakpoint_at): Declare.
9194 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9195 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
9196 [USE_WIN32API] (read, write): Add char* casts.
9197 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
9198 * server.h: Include wincecompat.h on Windows CE.
9199 [HAVE_ERRNO_H]: Check.
9200 (perror): Declare if not declared.
9201 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
9202 (perror_with_name): Remove errno declaration.
9203 * wincecompat.h: New.
9204 * wincecompat.c: New.
9205 * win32-low.h: New.
9206 * win32-arm-low.c: New.
9207 * win32-i386-low.c: New.
9208 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
9209 (OUTMSG2): Make it safe.
9210 (_T): New macro.
9211 (COUNTOF): New macro.
9212 (NUM_REGS): Get it from the low target.
9213 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
9214 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
9215 (thread_rec): Let low target handle debug registers.
9216 (child_add_thread): Likewise.
9217 (child_init_thread_list): Likewise.
9218 (continue_one_thread): Likewise.
9219 (regptr): New.
9220 (do_child_fetch_inferior_registers): Move to ...
9221 * win32-i386-low.c: ... here, and rename to ...
9222 (do_fetch_inferior_registers): ... this.
889bf7c5 9223 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
9224 Go through the low target.
9225 (do_child_store_inferior_registers): Use regptr.
9226 (strwinerror): New function.
9227 (win32_create_inferior): Handle Windows CE.
9228 Use strwinerror instead of strerror on Windows error
9229 codes. Add program to the error output.
9230 Don't close the main thread handle on Windows CE.
9231 (win32_attach): Use coredll.dll on Windows CE.
9232 (win32_kill): Close current process and current
9233 thread handles.
9234 (win32_detach): Use coredll.dll on Windows CE.
9235 (win32_resume): Let low target handle debug registers, and
9236 step request.
9237 (handle_exception): Add/Remove initial breakpoint. Avoid
9238 non-existant WSTOPSIG on Windows CE.
9239 (win32_read_inferior_memory): Cast to remove warning.
9240 (win32_arch_string): Go through the low target.
9241 (initialize_low): Call set_breakpoint_data with the low
9242 target's breakpoint.
9243 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
9244 FOP_REGNUM, mappings): Move to ...
9245 * win32-i386-low.c: ... here.
9246 * win32-low.c (win32_thread_info): Move to ...
9247 * win32-low.h: ... here.
9248 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
9249 win32-arm-low.c and wincecompat.c.
9250 (all:): Add $EXEEXT.
9251 (install-only:): Likewise.
9252 (gdbserver:): Likewise.
9253 (gdbreplay:): Likewise.
9254 * config.in: Regenerate.
9255 * configure: Regenerate.
9256
41093d81
PA
92572007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9258
9259 * win32-low.c: Rename typedef thread_info to
9260 win32_thread_info throughout.
9261
544afa54
PA
92622007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9263
9264 * win32-i386-low.c: Rename to ...
9265 * win32-low.c: ... this.
9266 * configure.srv: Replace win32-i386-low.o with win32-low.o.
9267 * Makefile.in: Likewise.
9268
bce7165d
PA
92692007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
9270
9271 * remote-utils.c (monitor_output): Constify msg parameter.
9272 * server.h (monitor_output): Likewise.
9273 * win32-i386-low.c (handle_output_debug_string): New.
9274 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
9275 handle_output_debug_string.
9276 (get_child_debug_event): Likewise.
9277
506c7aa0
DJ
92782007-03-27 Mat Hostetter <mat@lcs.mit.edu>
9279
9280 * server.c (main): Correct strtoul check.
9281
42c81e2a
DJ
92822007-03-27 Jon Ringle <jon@ringle.org>
9283
9284 * linux-low.c: Check __ARCH_HAS_MMU__ also.
9285
9453113a
DJ
92862007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
9287
9288 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
9289
64a69107
DJ
92902007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
9291
9292 * terminal.h: Check HAVE_SGTTY_H.
9293
92942007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
9295
9296 * remote-utils.c (remote_open): Print out the assigned port number.
9297
c74d0ad8
DJ
92982007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
9299
9300 * remote-utils.c (monitor_output): New function.
9301 * server.c (debug_threads): Define here.
9302 (monitor_show_help): New function.
9303 (handle_query): Handle qRcmd.
9304 (main): Do not handle 'd' packet.
9305 * server.h (debug_threads, remote_debug, monitor_output): Declare.
9306 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
9307 of debug_threads.
9308
de7c3b4a
PA
93092007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9310
9311 * Makefile.in (EXEEXT): New.
9312 (clean): Use $(EXEEXT).
9313
ef57601b
PA
93142007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9315
9316 * target.h (target_ops): Rename send_signal to request_interrupt,
9317 and remove enum target_signal parameter.
9318 * linux-low.c (linux_request_interrupt): Rename from
9319 linux_send_signal, and always send SIGINT.
9320 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
9321 and always send SIGINT.
9322 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
9323 of send_signal.
9324 (input_interrupt): Likewise.
9325
820f2bda
PA
93262007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9327
9328 * server.c (get_features_xml): Check if target implemented
9329 arch_string.
9330 * win32-i386-low.c (win32_arch_string): New.
9331 (win32_target_ops): Add win32_arch_string as arch_string member.
9332
ab39bf24
UW
93332007-02-22 Markus Deuling <deuling@de.ibm.com>
9334
9335 * spu-low.c (spu_arch_string): New.
9336 (spu_target_ops): Add spu_arch_string.
9337
61ff6e04
DJ
93382007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
9339
9340 * remote-utils.c: Remove HAVE_TERMINAL_H check.
9341 * configure.ac: Do not check for terminal.h.
9342 * configure, config.in: Regenerated.
9343
fb1e4ffc
DJ
93442007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9345
9346 * Makefile.in (OBS): Add $(XML_BUILTIN).
9347 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
9348 (clean): Update.
9349 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
9350 (arm-with-iwmmxt.c): New.
9351 * config.in, configure: Regenerate.
9352 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
9353 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
9354 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
9355 (arm*-*-linux*): Add iWMMXt and regset support.
9356 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
9357 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
9358 (arm_store_wmmxregset, target_regsets): New.
9359 * server.c (get_features_xml): Take annex argument. Check builtin
9360 XML documents.
9361 (handle_query): Handle multiple annexes.
9362
0f48aa01
DJ
93632007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9364
9365 * remote-utils.c [USE_WIN32API] (read, write): Define.
9366 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
9367 write.
9368
23181151
DJ
93692007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
9370
9371 * linux-i386-low.c (the_low_target): Set arch_string.
9372 * linux-x86-64-low.c (the_low_target): Likewise.
9373 * linux-low.c (linux_arch_string): New.
9374 (linux_target_ops): Add it.
9375 * linux-low.h (struct linux_target_ops): Add arch_string.
9376 * server.c (write_qxfer_response): Use const void * for DATA.
9377 (get_features_xml): New.
9378 (handle_query): Handle qXfer:features:read. Report it for qSupported.
9379 * target.h (struct target_ops): Add arch_string method.
9380
9d606399
DJ
93812007-01-03 Denis Pilat <denis.pilat@st.com>
9382 Daniel Jacobowitz <dan@codesourcery.com>
9383
9384 * linux-low.c (linux_kill): Handle being called with no threads.
9385 * win32-i386-low.c (win32_kill): Likewise.
9386 (get_child_debug_event): Clear current_process_handle.
9387
93882006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
9389 Daniel Jacobowitz <dan@codesourcery.com>
9390
9391 * remote-utils.c (remote_open): Check the type of specified
9392 serial port devices before opening them.
9393 * server.c (main): Kill the inferior if an error occurs during
9394 the first remote_open.
9395
a5e13d24
DJ
93962006-12-05 Markus Deuling <deuling@de.ibm.com>
9397
9398 * README: Update supported targets.
9399
186947f7
DJ
94002006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
9401
9402 * Makefile.in (clean): Remove reg-mips64.c.
9403 (reg-mips64.c, reg-mips64.o): New rules.
9404 * configure.srv: Handle mips64. Include regset support for mips.
9405 * linux-mips-low.c (union mips_register): New.
9406 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
9407 (mips_breakpoint, mips_breakpoint_at): Use int.
9408 (mips_collect_register, mips_supply_register)
9409 (mips_collect_register_32bit, mips_supply_register_32bit)
9410 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9411 (mips_store_fpregset, target_regsets): New.
9412 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
9413
a13e2c95
UW
94142006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
9415
9416 * configure.srv: Add target "spu*-*-*".
9417 * Makefile.in (clean): Remove reg-spu.c.
9418 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
9419 * spu-low.c: New file.
9420
cb7283db
DJ
94212006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9422
9423 * configure.ac: Correct td_thr_tls_get_addr test.
9424 * configure: Regenerated.
9425
89be2091
DJ
94262006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9427
9428 * linux-low.c (linux_wait_for_event): Reformat. Use the
9429 pass_signals array.
9430 * remote-utils.c (decode_address_to_semicolon): New.
9431 * server.c (pass_signals, handle_general_set): New.
9432 (handle_query): Mention QPassSignals for qSupported.
9433 (main): Call handle_general_set.
9434 * server.h (pass_signals, decode_address_to_semicolon): New.
9435
000ef4f0
DJ
94362006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
9437
9438 * server.c (handle_query): Correct error handling for read_auxv.
9439
b7149293
UW
94402005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
9441
9442 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
9443 and srv_linux_thread_db to yes.
9444 * linux-s390-low.c (s390_fill_gregset): New function.
9445 (target_regsets): Define data structure.
9446
dae5f5cf
DJ
94472006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
9448
9449 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
9450 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
9451 * config.in, configure: Regenerated.
9452 * inferiors.c (gdb_id_to_thread): New function.
9453 (gdb_id_to_thread_id): Use it.
9454 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
9455 * linux-low.h (struct process_info): Add th member.
9456 (thread_db_get_tls_address): New prototype.
9457 * remote-utils.c (decode_address): Make non-static.
9458 * server.c (handle_query): Handle qGetTLSAddr.
9459 * server.h (gdb_id_to_thread, decode_address): New prototypes.
9460 * target.h (struct target_ops): Add get_tls_address.
9461 * thread-db.c (maybe_attach_thread): Save the thread handle.
9462 (thread_db_get_tls_address): New.
9463
32ca6d61
DJ
94642006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
9465
9466 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
9467 (linux_resume_one_process): Take a siginfo_t *. Update all
9468 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
9469 (struct pending_signals): Add a siginfo_t.
9470 (linux_wait_for_process): Always set last_status.
9471 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
9472 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
9473 * linux-low.h (struct process_info): Add last_status.
9474
5ffff7c1
DJ
94752006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
9476
9477 * remote-utils.c (try_rle): New function.
9478 (putpkt_binary): Use it.
9479
8695c747
DJ
94802006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
9481
9482 * Makefile.in (clean): Clean reg-x86-64-linux.c.
9483 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
9484 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
9485 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
9486 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
9487 point registers.
9488
290fadea
RS
94892006-08-08 Richard Sandiford <richard@codesourcery.com>
9490
9491 * server.c (terminal_fd): New variable.
9492 (old_foreground_pgrp): Likewise.
9493 (restore_old_foreground_pgrp): New function.
9494 (start_inferior): Record the terminal file descriptor in terminal_fd
9495 and its original foreground group in old_foreground_pgrp. Register
9496 restore_old_foreground_pgrp with atexit().
9497
9f2e1e63
DJ
94982006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
9499
9500 * server.c (handle_query): Correct qPart to qXfer.
9501
b80864fb
DJ
95022006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
9503
9504 * configure.ac: Check for more headers which are missing on
9505 Windows. Automatically supply -lwsock32 and USE_WIN32API.
9506 * configure.srv: Add Cygwin and mingw32.
9507 * remote-utils.c: Don't include headers unconditionally which
9508 are missing on mingw32. Include <winsock.h> for mingw32.
9509 (remote_open): Adjust for mingw32 support. Flush
9510 standard error after writing to it.
9511 (remote_close, putpkt_binary, input_interrupt, block_async_io)
9512 (unblock_async_io, enable_async_io, disable_async_io)
9513 (readchar, getpkt): Update for Winsock support.
9514 (prepare_resume_reply): Expect a protocol signal number.
9515 * server.c: Disable <sys/wait.h> on mingw32.
9516 (start_inferior): Adjust for mingw32 support. Flush
9517 standard error after writing to it.
9518 (attach_inferior): Likewise. Use protocol signal
9519 numbers.
9520 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
9521 and names.
9522 * win32-i386-low.c: New file.
9523 * Makefile.in (XM_CLIBS): Set.
9524 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
9525 (win32-i386-low.o): New dependency rule.
9526 * linux-low.c (linux_wait): Use target signal numbers.
9527 * target.h (struct target_ops): Doc fix.
9528 * server.h (target_signal_to_name): New prototype.
9529 * gdbreplay.c: Don't include headers unconditionally which
9530 are missing on mingw32. Include <winsock.h> for mingw32.
9531 (remote_close, remote_open): Adjust for Winsock support.
9532 * configure, config.in: Regenerated.
9533
0876f84a
DJ
95342006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9535
9536 * server.c (decode_xfer_read, write_qxfer_response): New.
9537 (handle_query): Take a packet length argument. Handle
9538 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
9539 the qSupported response.
9540 (main): Update call to handle_query.
9541
01f9e8fa
DJ
95422006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
9543
9544 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
9545 (putpkt_binary): Renamed from putpkt and adjusted for binary
9546 data.
9547 (putpkt): New wrapper for putpkt_binary.
9548 (readchar): Don't mask off the high bit.
9549 (decode_X_packet): New function.
9550 * server.c (main): Call putpkt_binary if a handler sets the packet
9551 length. Save the length of the incoming packet. Handle 'X'.
9552 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
9553
be2a5f71
DJ
95542006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
9555
9556 * server.c (handle_query): Handle qSupported.
9557
ea025f5f
DJ
95582006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9559
9560 * remote-utils.c (all_symbols_looked_up): New variable.
9561 (look_up_one_symbol): Check it.
9562 * server.h (look_up_one_symbol): New declaration.
9563 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
9564
9308fc88
DJ
95652006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9566
9567 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 9568 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
9569 (PTRACE_GET_THREAD_AREA): Define.
9570 (ps_get_thread_area): New function.
9571
52fb6437
NS
95722006-05-09 Nathan Sidwell <nathan@codesourcery.com>
9573
9574 * configure.srv (m68k*-*-uclinux*): New target.
9575 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
9576 (linux_resume_one_process): Remove extraneous cast.
9577 (linux_read_offsets): New.
9578 (linux_target_op): Add linux_read_offsets on mmuless systems.
9579 * server.c (handle_query): Add qOffsets logic.
9580 * target.h (struct target_ops): Add read_offsets.
9581
21b0f40c
DJ
95822006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
9583
9584 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
9585 (PTRACE_GET_THREAD_AREA): Define.
9586 (ps_get_thread_area): New function.
9587 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
9588 (linux-x86-64-low.o): Update.
9589
0050a760
DJ
95902006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
9591
9592 * configure.ac: Remove checks for prfpregset_t.
9593 * gdb_proc_service.h: New file.
9594 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
9595 new "gdb_proc_service.h".
9596 * proc-service.c: Likewise.
9597 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
9598 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
9599 * Makefile.in (gdb_proc_service_h): Updated.
9600 * configure, config.in: Regenerated.
9601
b92a518e
DJ
96022006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
9603
9604 * remote-utils.c (prepare_resume_reply): Move declaration
9605 of gdb_id_from_wait to the top of the block.
9606
545587ee
DJ
96072006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
9608
9609 * linux-low.c (regsets_store_inferior_registers): Read the regset
9610 from the target before filling it.
9611
9db87ebd
DJ
96122006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9613
9614 * server.c (attach_inferior): Return SIGTRAP for a successful
9615 attach.
9616
dd24457d
DJ
96172006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9618
9619 * Makefile.in (OBS): Add version.o.
9620 (STAGESTUFF): Delete.
9621 (version.o): Add dependencies.
9622 (version.c): Replace rule.
9623 (clean): Remove version.c.
9624 * server.c (gdbserver_version): New.
9625 (gdbserver_usage): Use printf.
9626 (main): Handle --version and --help.
9627 * server.h (version, host_name): Add declarations.
9628
6f0f660e
EZ
96292005-12-23 Eli Zaretskii <eliz@gnu.org>
9630
889bf7c5
PA
9631 * linux-arm-low.c:
9632 * linux-arm-low.c:
9633 * inferiors.c:
9634 * i387-fp.h:
9635 * i387-fp.c:
9636 * gdbreplay.c:
9637 * regcache.c:
9638 * proc-service.c:
9639 * mem-break.h:
9640 * mem-break.c:
9641 * linux-x86-64-low.c:
9642 * linux-sh-low.c:
9643 * linux-s390-low.c:
9644 * linux-ppc64-low.c:
9645 * linux-ppc-low.c:
9646 * linux-mips-low.c:
9647 * linux-m68k-low.c:
9648 * linux-m32r-low.c:
9649 * linux-low.h:
9650 * linux-low.c:
9651 * linux-ia64-low.c:
9652 * linux-i386-low.c:
9653 * linux-crisv32-low.c:
9654 * thread-db.c:
9655 * terminal.h:
9656 * target.h:
9657 * target.c:
9658 * server.h:
9659 * server.c:
9660 * remote-utils.c:
9661 * regcache.h:
9662 * utils.c:
9663 * Makefile.in:
9664 * configure.ac:
6f0f660e
EZ
9665 * gdbserver.1: Add (C) after Copyright. Update the FSF
9666 address.
9667
9d1fb177
DJ
96682005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
9669
9670 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
9671 (arm_breakpoint_at): Recognize both breakpoints.
9672 (the_low_target): Use the correct breakpoint instruction.
9673
011a70c2
DJ
96742005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
9675
9676 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
9677 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
9678 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
9679 (the_low_target): Update.
9680
7fb85e41
AS
96812005-10-25 Andreas Schwab <schwab@suse.de>
9682
9683 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
9684
9685 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
9686 (ia64_num_regs): Reduce to 462.
9687
3db0444b
DJ
96882005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
9689
9690 * acinclude.m4: Correct quoting.
9691 * aclocal.m4: Regenerated.
9692
9693 Suggested by SZOKOVACS Robert <szo@ies.hu>:
9694 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
9695 (thread_db_init): Call thread_db_err_str.
9696 * configure.ac: Check for TD_VERSION.
9697 * config.in, configure: Regenerated.
9698
bee0189a
DJ
96992005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9700
9701 * server.h (error, fatal, warning): Add ATTR_FORMAT.
9702
e9d25b98
DJ
97032005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9704
9705 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
9706 is not available. Define HAVE_PTRACE_GETREGS if it is.
9707 * config.in, configure: Regenerated.
9708 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
9709 * linux-i386-low.c, linux-m68k-low.c: Update to use
9710 HAVE_PTRACE_GETREGS.
9711 * linux-low.c (regsets_fetch_inferior_registers)
9712 (regsets_store_inferior_registers): Only return 0 if we processed
9713 GENERAL_REGS.
9714 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
9715 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
9716
a06660f7
DJ
97172005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9718
9719 * inferiors.c (struct thread_info): Add gdb_id.
9720 (add_thread): Add gdb_id argument.
9721 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
9722 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
9723 calls to add_thread.
9724 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
9725 * server.c (handle_query): Use thread_to_gdb_id.
9726 (handle_v_cont, main): Use gdb_id_to_thread_id.
9727 * server.h (add_thread): Update prototype.
9728 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
9729 prototypes.
9730
5a1f5858
DJ
97312005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9732
9733 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
9734 left-padded registers.
9735 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
9736 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
9737
e122f1f5
SE
97382005-07-01 Steve Ellcey <sje@cup.hp.com>
9739
9740 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
9741 * configure: Regenerate.
9742 * config.in: Regenerate.
9743 * server.h (NEED_DECLARATION_STRERROR):
9744 Replace with !HAVE_DECL_STRERROR.
9745
d592fa2f
DJ
97462005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
9747
9748 * linux-low.c (linux_wait, linux_send_signal): Don't test
9749 an unsigned long variable for > 0 if it could be MAX_ULONG.
9750 * server.c (myresume): Likewise.
9751 * target.c (set_desired_inferior): Likewise.
9752
ccbd4912
MK
97532005-06-13 Mark Kettenis <kettenis@gnu.org>
9754
9755 * configure.ac: Simplify and improve check for socklen_t.
9756 * configure, config.in: Regenerate.
9757
f450004a
DJ
97582005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
9759
9760 * acconfig.h: Remove.
9761 * configure.ac: Add a test for socklen_t. Use three-argument
9762 AC_DEFINE throughout.
9763 * config.in: Regenerated using autoheader 2.59.
9764 * configure: Regenerated.
9765
9766 * gdbreplay.c (socklen_t): Provide a default.
9767 (remote_open): Use socklen_t.
9768 * remote-utils.c (socklen_t): Provide a default.
9769 (remote_open): Use socklen_t.
9770 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
9771 unsigned char.
9772
9773 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
9774 char for buffers.
9775 * linux-low.c (linux_read_memory, linux_write_memory)
9776 (linux_read_auxv): Likewise.
9777 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
9778 (check_mem_write): Likewise.
9779 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
9780 Likewise.
9781 * regcache.c (struct inferior_rgcache_data, registers_to_string)
9782 (registers_from_string, register_data): Likewise.
9783 * server.c (handle_query, main): Likewise.
9784 * server.h (convert_ascii_to_int, convert_int_to_ascii)
9785 (decode_M_packet): Likewise.
9786 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
9787 * target.h (struct target_ops): Update read_memory, write_memory,
9788 and read_auxv.
9789 (read_inferior_memory, write_inferior_memory): Update.
9790 * linux-low.h (struct linux_target_ops): Change type of breakpoint
9791 to unsigned char *.
9792 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
9793 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
9794 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
9795 linux-s390-low.c, linux-sh-low.c: Update for changes in
9796 read_inferior_memory and the_low_target->breakpoint.
9797
eee84df1
DJ
97982005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
9799
9800 * Makefile.in (SFILES): Add linux-ppc64-low.c.
9801 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
9802 * configure.srv: Add powerpc64-*-linux*.
9803 * linux-ppc64-low.c: New file.
9804
45b134e5
OF
98052005-05-23 Orjan Friberg <orjanf@axis.com>
9806
9807 * linux-cris-low.c: New file with support for CRIS.
9808 * linux-crisv32-low.c: Ditto for CRISv32.
9809 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
9810 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 9811 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
9812 reg-crisv32.o, and reg-crisv32.c to make rules.
9813 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
9814 recognized targets.
9815
48d93c75
UW
98162005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
9817
9818 * linux-low.c (fetch_register): Ensure buffer size is a multiple
9819 of sizeof (PTRACE_XFER_TYPE).
9820 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
9821
e013ee27
OF
98222005-05-12 Orjan Friberg <orjanf@axis.com>
9823
889bf7c5 9824 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
9825 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
9826 pointers for hardware watchpoint support.
9827 * linux-low.h (struct linux_target_ops): Ditto.
9828 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
9829 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
9830 to linux_target_ops.
9831 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
9832 reply packet.
9833 * server.c (main): Recognize 'Z' and 'z' packets.
9834
b0ded00b
UW
98352005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
9836
9837 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
9838 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
9839 (the_low_target): Add new members.
9840
8643e2ad
DJ
98412005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
9842
9843 * proc-service.c (ps_lgetregs): Search all_processes instead of
9844 all_threads.
9845
fc620387
DJ
98462005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
9847
9848 * server.c (start_inferior): Change return type to int.
9849 (attach_inferior): Change sigptr to int *.
9850 (handle_v_cont, handle_v_requests): Change signal to int *.
9851 (main): Change signal to int.
9852
98532005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
9854
9855 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
9856 * configure.srv: Add m32r*-*-linux*.
9857 * linux-m32r-low.c: New file.
9858
e0e76420
DJ
98592005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
9860
9861 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
9862
a1928bad
DJ
98632005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
9864
9865 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
9866 Take unsigned long arguments for PIDs.
9867 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
9868 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
9869 (wait_for_sigstop, linux_resume_one_process)
9870 (regsets_fetch_inferior_registers, linux_send_signal)
9871 (linux_read_auxv): Likewise. Update the types of variables holding
9872 PIDs. Update format string specifiers.
9873 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
9874 * remote-utils.c (prepare_resume_reply): Likewise.
9875 * server.c (cont_thread, general_thread, step_thread)
9876 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
9877 unsigned long.
9878 (handle_query): Update format specifiers.
9879 (handle_v_cont, main): Use strtoul for thread IDs.
9880 * server.h (struct inferior_list_entry): Use unsigned long for ID.
9881 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
9882 (general_thread, step_thread, thread_from_wait)
9883 (old_thread_from_wait): Update.
9884 * target.h (struct thread_resume): Use unsigned long for THREAD.
9885 (struct target_ops): Use unsigned long for arguments to attach and
9886 thread_alive.
9887
dcdb98d2
DJ
98882005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
9889
9890 * acinclude.m4: Include bfd/bfd.m4 directly.
9891 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
9892 <agriffis@toolchain.org>.
9893 * aclocal.m4, configure: Regenerated.
9894
bec39cab
AC
98952005-01-07 Andrew Cagney <cagney@gnu.org>
9896
9897 * configure.ac: Rename configure.in, require autoconf 2.59.
9898 * configure: Re-generate.
9899
434c4c77
DJ
99002004-12-08 Daniel Jacobowitz <dan@debian.org>
9901
9902 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
9903 LIBS when finished.
9904 * aclocal.m4: Regenerated.
9905 * configure: Regenerated.
9906
db1d3e1b
AS
99072004-11-21 Andreas Schwab <schwab@suse.de>
9908
9909 * linux-m68k-low.c (m68k_num_gregs): Define.
9910 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
9911 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
9912 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
9913 (m68k_breakpoint_at): New. Add to the_low_target.
9914
9915 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
9916 srv_linux_thread_db to yes.
9917
43360365
JB
99182004-10-20 Joel Brobecker <brobecker@gnat.com>
9919
9920 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
9921 (ARCH_SET_FS): Likewise.
9922 (ARCH_GET_FS): Likewise.
9923 (ARCH_GET_GS): Likewise.
9924
fd500816
DJ
99252004-10-16 Daniel Jacobowitz <dan@debian.org>
9926
9927 * linux-i386-low.c (ps_get_thread_area): New.
9928 * linux-x86-64-low.c (ps_get_thread_area): New.
9929 * linux-low.c: Include <sys/syscall.h>.
9930 (linux_kill_one_process): Don't kill the first thread here.
9931 (linux_kill): Kill the first thread here.
9932 (kill_lwp): New function.
9933 (send_sigstop, linux_send_signal): Use it.
9934 * proc-service.c: Clean up #ifdefs.
9935 (fpregset_info): Delete.
9936 (ps_lgetregs): Update and enable implementation.
9937 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
9938 implementations.
9939 * remote-utils.c (struct sym_cache, symbol_cache): New.
9940 (input_interrupt): Print a clearer message.
9941 (async_io_enabled): New variable.
9942 (enable_async_io, disable_async_io): Use it. Update comments.
9943 (look_up_one_symbol): Use the symbol cache.
9944 * thread-db.c (thread_db_look_up_symbols): New function.
9945 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
9946
f6de3c42
DJ
99472004-10-16 Daniel Jacobowitz <dan@debian.org>
9948
9949 * configure.in: Test for -rdynamic.
9950 * configure: Regenerated.
9951 * Makefile (INTERNAL_LDFLAGS): New.
9952 (gdbserver, gdbreplay): Use it.
9953
2c0fc042
AC
99542004-09-02 Andrew Cagney <cagney@gnu.org>
9955
9956 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
9957
075b3282
DJ
99582004-03-23 Daniel Jacobowitz <drow@mvista.com>
9959
9960 * linux-low.c (linux_wait): Clear all_processes list also.
9961
fa6a77dc
DJ
99622004-03-12 Daniel Jacobowitz <drow@mvista.com>
9963
9964 * linux-low.c: Include <errno.h>. Remove extern declaration of
9965 errno.
9966
6d782a97
DJ
99672004-03-12 Daniel Jacobowitz <drow@mvista.com>
9968
9969 * gdbreplay.c, server.h, utils.c: Update copyright years.
9970
3a7fb99b
DJ
99712004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
9972
9973 * server.c (main): Print child status or termination signal from
9974 variable 'signal', not 'sig'.
9975
c3e735a6
DJ
99762004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
9977
9978 * linux-low.c (linux_read_memory): Change return type to
9979 int. Check for and return error from ptrace().
9980 * target.c (read_inferior_memory): Change return type to int. Pass
9981 back return status from the_target->read_memory().
9982 * target.h (struct target_ops): Adapt *read_memory() prototype.
9983 Update comment.
9984 (read_inferior_memory): Adapt prototype.
9985 * server.c (main): Return an error packet if
9986 read_inferior_memory() returns an error.
9987
a59d1c82
DJ
99882004-03-04 Daniel Jacobowitz <drow@mvista.com>
9989
9990 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
9991 Unify with other clean targets.
9992
dc3f8883
DJ
99932004-02-29 Daniel Jacobowitz <drow@mvista.com>
9994
9995 * server.c (handle_v_cont): Call set_desired_inferior.
9996
89a208da
DJ
99972004-02-29 Daniel Jacobowitz <drow@mvista.com>
9998
9999 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10000
62ea82f5
DJ
100012004-02-29 Daniel Jacobowitz <drow@mvista.com>
10002
10003 * linux-low.c (linux_wait): Unblock async I/O.
10004 (linux_resume): Block and enable async I/O.
10005 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10006 * server.h (block_async_io, unblock_async_io): Add prototypes.
10007
6910d122
DJ
100082004-02-29 Daniel Jacobowitz <drow@mvista.com>
10009
10010 * remote-utils.c (remote_open): Print a status notice after
10011 opening a TCP port.
10012 * server.c (attach_inferior): Print a status notice after
10013 attaching.
10014
100152004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
10016
10017 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10018
c89dc5d4
DJ
100192004-02-26 Daniel Jacobowitz <drow@mvista.com>
10020
10021 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
10022 error packet.
10023 * server.c, target.h: Update copyright years.
10024
4b8dad4a
RM
100252004-02-25 Roland McGrath <roland@redhat.com>
10026
10027 * target.h (struct target_ops): New member `read_auxv'.
10028 * server.c (handle_query): Handle qPart:auxv:read: query using that.
10029 * linux-low.c (linux_read_auxv): New function.
10030 (linux_target_ops): Initialize `read_auxv' member to that.
10031
d7446758
JB
100322004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10033
10034 Committed by Jim Blandy <jimb@redhat.com>.
10035
10036 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 10037 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
10038 instead of GPR_SIZE to distiguish s390 and s390x targets.
10039
5544ad89
DJ
100402004-01-31 Daniel Jacobowitz <drow@mvista.com>
10041
10042 * linux-low.c: Update copyright year.
10043 (check_removed_breakpoint): Clear pending_is_breakpoint.
10044 (linux_set_resume_request, linux_queue_one_thread)
10045 (resume_status_pending_p): New functions.
10046 (linux_continue_one_thread): Use process->resume.
10047 (linux_resume): Only resume threads if there are no pending events.
10048 * linux-low.h (struct process_info): Add resume request
10049 pointer.
10050
2a68b70e
DJ
100512004-01-30 Daniel Jacobowitz <drow@mvista.com>
10052
10053 * regcache.c (new_register_cache): Clear the allocated register
10054 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
10055
64386c31
DJ
100562003-10-13 Daniel Jacobowitz <drow@mvista.com>
10057
10058 * linux-low.c (linux_resume): Take a struct thread_resume *
10059 argument.
10060 (linux_wait): Update call.
10061 (resume_ptr): New static variable.
10062 (linux_continue_one_thread): Renamed from
10063 linux_continue_one_process. Use resume_ptr.
10064 (linux_resume): Use linux_continue_one_thread.
10065 * server.c (handle_v_cont, handle_v_requests): New functions.
10066 (myresume): New function.
10067 (main): Handle 'v' case.
10068 * target.h (struct thread_resume): New type.
10069 (struct target_ops): Change argument of "resume" to struct
10070 thread_resume *.
10071 (myresume): Delete macro.
10072
c938e9b0
L
100732003-08-08 H.J. Lu <hongjiu.lu@intel.com>
10074
10075 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
10076 (uninstall): Support DESTDIR.
10077
7f313d07
BC
10078Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
10079
10080 * configure.srv: Add xscale*linux copy of arm*linux entry.
10081
3b2fc2ea
DJ
100822003-07-24 Daniel Jacobowitz <drow@mvista.com>
10083
10084 * linux-arm-low.c (arm_reinsert_addr): New function.
10085 (the_low_target): Add arm_reinsert_addr.
10086
1c0a559e
MK
100872003-07-08 Mark Kettenis <kettenis@gnu.org>
10088
10089 * mem-break.c: Remove whitespace at end of file.
10090
43d5792c
DJ
100912003-06-28 Daniel Jacobowitz <drow@mvista.com>
10092
10093 * configure.in: Check whether we need to prototype strerror.
10094 * server.h: Optionally prototype strerror.
10095 * gdbreplay.c (perror_with_name): Use strerror.
10096 * linux-low.c (linux_attach_lwp): Use strerror.
10097 * utils.c (perror_with_name): Use strerror.
10098 * config.in, configure: Regenerated.
10099
c8a86edf
DJ
101002003-06-28 Daniel Jacobowitz <drow@mvista.com>
10101
10102 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
10103 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
10104
73d37363
DJ
101052003-06-20 Daniel Jacobowitz <drow@mvista.com>
10106
10107 * Makefile.in (SFILES): Update.
10108 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
10109 low-sun3.c: Remove files.
10110
6ad8ae5c
DJ
101112003-06-17 Daniel Jacobowitz <drow@mvista.com>
10112
10113 * linux-low.c: Move comment to linux_thread_alive where it belonged.
10114 (linux_detach_one_process, linux_detach): New functions.
10115 (linux_target_ops): Add linux_detach.
10116 * server.c (main): Handle 'D' packet.
10117 * target.h (struct target_ops): Add "detach" member.
10118 (detach_inferior): Define.
10119
1581182a
MK
101202003-06-13 Mark Kettenis <kettenis@gnu.org>
10121
10122 From Kelley Cook <kelleycook@wideopenwest.com>:
10123 * configure.srv: Accept i[34567]86 variants.
10124
e5379b03
DJ
101252003-06-05 Daniel Jacobowitz <drow@mvista.com>
10126
10127 * linux-low.c (linux_wait_for_event): Correct comment typos.
10128 (linux_resume_one_process): Call check_removed_breakpoint.
10129 (linux_send_signal): New function.
10130 (linux_target_ops): Add linux_send_signal.
10131 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
10132 of kill.
10133 * target.h (struct target_ops): Add send_signal.
10134
2ff29de4
JB
101352003-05-29 Jim Blandy <jimb@redhat.com>
10136
10137 * linux-low.c (usr_store_inferior_registers): Transfer buf in
10138 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
10139 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
10140 away part of the register's value.
10141
254787d4
DJ
101422003-03-26 Daniel Jacobowitz <drow@mvista.com>
10143
10144 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
10145 (linux_wait_for_event, linux_init_signals): Likewise.
10146
94e10508
DJ
101472003-03-17 Daniel Jacobowitz <drow@mvista.com>
10148
10149 * configure.in: Check for stdlib.h.
10150 * configure: Regenerated.
10151 * config.in: Regenerated.
10152
4c0711e0
DJ
101532003-01-04 Andreas Schwab <schwab@suse.de>
10154
10155 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
10156
ef66e766
AC
101572003-01-02 Andrew Cagney <ac131313@redhat.com>
10158
10159 * Makefile.in: Remove obsolete code.
10160
a1358604
DJ
101612002-11-20 Daniel Jacobowitz <drow@mvista.com>
10162
10163 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
10164 defined(PT_FPR0_HI).
10165
23ce3b1c
DJ
101662002-11-17 Stuart Hughes <seh@zee2.com>
10167
10168 * linux-arm-low.c (arm_num_regs): Increase.
10169 (arm_regmap): Include status register.
10170
101712002-11-17 Daniel Jacobowitz <drow@mvista.com>
10172
10173 * linux-low.c (register_addr): Remove incorrect -1 check.
10174
a9fa9f7d
DJ
101752002-08-29 Daniel Jacobowitz <drow@mvista.com>
10176
10177 * linux-low.c (linux_create_inferior): Call setpgid. Return
10178 the new PID.
10179 (unstopped_p, linux_signal_pid): Remove.
10180 (linux_target_ops): Remove linux_signal_pid.
10181 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
10182 global instead of target method.
10183 * target.h (struct target_ops): Remove signal_pid. Update comment
10184 for create_inferior.
10185 * server.c (signal_pid): New variable.
10186 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 10187 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
10188 (attach_inferior): Set signal_pid.
10189
17574093
DJ
101902002-08-23 Daniel Jacobowitz <drow@mvista.com>
10191
10192 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
10193
101942002-08-20 Jim Blandy <jimb@redhat.com>
10195
10196 * Makefile.in (LDFLAGS): Allow the configure script to establish a
10197 default for this.
10198
101992002-08-01 Andrew Cagney <cagney@redhat.com>
10200
10201 * Makefile.in: Make chill references obsolete.
10202
102032002-07-24 Kevin Buettner <kevinb@redhat.com>
10204
10205 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
10206 * configure: Regenerate.
10207 * config.in: Regenerate.
10208
102092002-07-09 David O'Brien <obrien@FreeBSD.org>
10210
10211 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
10212 (perror_with_name, remote_close, remote_open, expect, play): Static.
10213
102142002-07-04 Michal Ludvig <mludvig@suse.cz>
10215
4b8dad4a 10216 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
10217 byte offsets instead of an array of indexes.
10218 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
10219
102202002-06-13 Daniel Jacobowitz <drow@mvista.com>
10221
10222 * regcache.c: Add comment.
10223
102242002-06-11 Daniel Jacobowitz <drow@mvista.com>
10225
10226 * thread-db.c: New file.
10227 * proc-service.c: New file.
10228 * acinclude.m4: New file.
10229 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
10230 proc-service.o, and thread-db.o.
10231 (linux-low.o): Add USE_THREAD_DB.
10232 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
10233 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
10234 * aclocal.m4: Regenerated.
10235 * config.in: Regenerated.
10236 * configure: Regenerated.
10237 * configure.in: Check for proc_service.h, sys/procfs.h,
10238 thread_db.h, and linux/elf.h headrs.
10239 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
10240 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
10241 Check for -lthread_db and thread support.
10242 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
10243 PowerPC, and SuperH.
10244 * i387-fp.c: Constify arguments.
10245 * i387-fp.h: Likewise.
10246 * inferiors.c: (struct thread_info): Renamed from
10247 `struct inferior_info'. Remove PID member. Use generic inferior
10248 list header. All uses updated.
10249 (inferiors, signal_pid): Removed.
10250 (all_threads): New variable.
10251 (get_thread): Define.
10252 (add_inferior_to_list): New function.
10253 (for_each_inferior): New function.
10254 (change_inferior_id): New function.
10255 (add_inferior): Removed.
10256 (remove_inferior): New function.
10257 (add_thread): New function.
10258 (free_one_thread): New function.
10259 (remove_thread): New function.
10260 (clear_inferiors): Use for_each_inferior and free_one_thread.
10261 (find_inferior): New function.
10262 (find_inferior_id): New function.
10263 (inferior_target_data): Update argument type.
10264 (set_inferior_target_data): Likewise.
10265 (inferior_regcache_data): Likewise.
10266 (set_inferior_regcache_data): Likewise.
10267 * linux-low.c (linux_bp_reinsert): Remove.
10268 (all_processes, stopping_threads, using_thrads)
10269 (struct pending_signals, debug_threads, pid_of): New.
10270 (inferior_pid): Replace with macro.
10271 (struct inferior_linux_data): Remove.
10272 (get_stop_pc, add_process): New functions.
10273 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
10274 Use add_process and add_thread.
10275 (linux_attach_lwp): New function, based on old linux_attach. Use
10276 add_process and add_thread. Set stop_expected for new threads.
10277 (linux_attach): New function.
10278 (linux_kill_one_process): New function.
10279 (linux_kill): Kill all LWPs.
10280 (linux_thread_alive): Use find_inferior_id.
10281 (check_removed_breakpoints, status_pending_p): New functions.
10282 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
10283 Update. Use WNOHANG. Wait for cloned processes also. Update process
10284 struct for the found process.
10285 (linux_wait_for_event): New function.
10286 (linux_wait): Use it. Support LWPs.
10287 (send_sigstop, wait_for_sigstop, stop_all_processes)
10288 (linux_resume_one_process, linux_continue_one_process): New functions.
10289 (linux_resume): Support LWPs.
10290 (REGISTER_RAW_SIZE): Remove.
10291 (fetch_register): Use register_size instead. Call supply_register.
10292 (usr_store_inferior_registers): Likewise. Call collect_register.
10293 Fix recursive case.
10294 (regsets_fetch_inferior_registers): Improve error message.
10295 (regsets_store_inferior_registers): Add debugging.
10296 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
10297 (unstopped_p, linux_signal_pid): New functions.
10298 (linux_target_ops): Add linux_signal_pid.
10299 (linux_init_signals): New function.
10300 (initialize_low): Call it. Initialize using_threads.
10301 * regcache.c (inferior_regcache_data): Add valid
10302 flag.
10303 (get_regcache): Fetch registers lazily. Add fetch argument
10304 and update all callers.
10305 (regcache_invalidate_one, regcache_invalidate): New
10306 functions.
10307 (new_register_cache): Renamed from create_register_cache.
10308 Return the new regcache.
10309 (free_register_cache): Change argument to a void *.
10310 (registers_to_string, registers_from_string): Call get_regcache
10311 with fetch flag set.
10312 (register_data): Make static. Pass fetch flag to get_regcache.
10313 (supply_register): Call get_regcache with fetch flag clear.
10314 (collect_register): Call get_regcache with fetch flag set.
10315 (collect_register_as_string): New function.
10316 * regcache.h: Update.
10317 * remote-utils.c (putpkt): Flush after debug output and use
10318 stderr.
10319 Handle input interrupts while waiting for an ACK.
10320 (input_interrupt): Use signal_pid method.
10321 (getpkt): Flush after debug output and use stderr.
10322 (outreg): Use collect_register_as_string.
10323 (new_thread_notify, dead_thread_notify): New functions.
10324 (prepare_resume_reply): Check using_threads. Set thread_from_wait
10325 and general_thread.
10326 (look_up_one_symbol): Flush after debug output.
10327 * server.c (step_thread, server_waiting): New variables.
10328 (start_inferior): Don't use signal_pid. Update call to mywait.
10329 (attach_inferior): Update call to mywait.
10330 (handle_query): Handle qfThreadInfo and qsThreadInfo.
10331 (main): Don't fetch/store registers explicitly. Use
10332 set_desired_inferior. Support proposed ``Hs'' packet. Update
10333 calls to mywait.
10334 * server.h: Update.
10335 (struct inferior_list, struct_inferior_list_entry): New.
10336 * target.c (set_desired_inferior): New.
10337 (write_inferior_memory): Constify.
10338 (mywait): New function.
10339 * target.h: Update.
10340 (struct target_ops): New signal_pid method.
10341 (mywait): Removed macro, added prototype.
10342
10343 * linux-low.h (regset_func): Removed.
10344 (regset_fill_func, regset_store_func): New.
10345 (enum regset_type): New.
10346 (struct regset_info): Add type field. Use new operation types.
10347 (struct linux_target_ops): stop_pc renamed to get_pc.
10348 Add decr_pc_after_break and breakpoint_at.
10349 (get_process, get_thread_proess, get_process_thread)
10350 (strut process_info, all_processes, linux_attach_lwp)
10351 (thread_db_init): New.
10352
10353 * linux-arm-low.c (arm_get_pc, arm_set_pc,
10354 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
10355 (the_low_target): Add new members.
10356 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
10357 (i386_store_fpxregset): Constify.
10358 (target_regsets): Add new kind identifier.
10359 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
10360 (i386_set_pc): Add debugging.
10361 (i386_breakpoint_at): New function.
10362 (the_low_target): Add new members.
10363 * linux-mips-low.c (mips_get_pc, mips_set_pc)
10364 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
10365 (mips_breakpoint_at): New.
10366 (the_low_target): Add new members.
10367 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
10368 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
10369 (the_low_target): Add new members.
10370 * linux-sh-low.c (sh_get_pc, sh_set_pc)
10371 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
10372 (the_low_target): Add new members.
10373 * linux-x86-64-low.c (target_regsets): Add new kind
10374 identifier.
10375
103762002-05-15 Daniel Jacobowitz <drow@mvista.com>
10377
10378 From Martin Pool <mbp@samba.org>:
10379 * server.c (gdbserver_usage): New function.
10380 (main): Call it.
10381
103822002-05-14 Daniel Jacobowitz <drow@mvista.com>
10383
10384 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
10385 stop_at -> stop_pc.
10386
103872002-05-04 Andrew Cagney <ac131313@redhat.com>
10388
10389 * Makefile.in: Remove obsolete code.
10390
103912002-04-24 Michal Ludvig <mludvig@suse.cz>
10392
10393 * linux-low.c (regsets_fetch_inferior_registers),
10394 (regsets_store_inferior_registers): Removed cast to int from
10395 ptrace() calls.
10396 * regcache.h: Added declaration of struct inferior_info.
10397
103982002-04-20 Daniel Jacobowitz <drow@mvista.com>
10399
10400 * inferiors.c (struct inferior_info): Add regcache_data.
10401 (add_inferior): Call create_register_cache.
10402 (clear_inferiors): Call free_register_cache.
10403 (inferior_regcache_data, set_inferior_regcache_data): New functions.
10404 * regcache.c (struct inferior_regcache_data): New.
10405 (registers): Remove.
10406 (get_regcache): New function.
10407 (create_register_cache, free_register_cache): New functions.
10408 (set_register_cache): Don't initialize the register cache here.
10409 (registers_to_string, registers_from_string, register_data): Call
10410 get_regcache.
10411 * regcache.h: Add prototypes.
10412 * server.h: Likewise.
10413
104142002-04-20 Daniel Jacobowitz <drow@mvista.com>
10415
10416 * mem-break.c: New file.
10417 * mem-break.h: New file.
10418 * Makefile.in: Add mem-break.o rule; update server.h
10419 dependencies.
10420 * inferiors.c (struct inferior_info): Add target_data
10421 member.
10422 (clear_inferiors): Free target_data member if set.
10423 (inferior_target_data, set_inferior_target_data): New functions.
10424 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
10425 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
10426 * linux-low.c (linux_bp_reinsert): New variable.
10427 (struct inferior_linux_data): New.
10428 (linux_create_inferior): Use set_inferior_target_data.
10429 (linux_attach): Likewise. Call add_inferior.
10430 (linux_wait_for_one_inferior): New function.
10431 (linux_wait): Call it.
10432 (linux_write_memory): Add const.
10433 (initialize_low): Call set_breakpoint_data.
10434 * linux-low.h (struct linux_target_ops): Add breakpoint
10435 handling members.
10436 * server.c (attach_inferior): Remove extra add_inferior
10437 call.
10438 * server.h: Include mem-break.h. Update inferior.c
10439 prototypes.
10440 * target.c (read_inferior_memory)
10441 (write_inferior_memory): New functions.
10442 * target.h (read_inferior_memory)
10443 (write_inferior_memory): Change macros to prototypes.
10444 (struct target_ops): Update comments. Add const to write_memory
10445 definition.
10446
104472002-04-11 Daniel Jacobowitz <drow@mvista.com>
10448
10449 * linux-low.c (usr_store_inferior_registers): Support
10450 registers which are allowed to fail to store.
10451 * linux-low.h (linux_target_ops): Likewise.
10452 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
10453 (ppc_cannot_store_register): FPSCR may not be storable.
10454
104552002-04-09 Daniel Jacobowitz <drow@mvista.com>
10456
10457 * server.h: Include <string.h> if HAVE_STRING_H.
10458 * ChangeLog: Correct paths in last ChangeLog entry.
10459
104602002-04-09 Daniel Jacobowitz <drow@mvista.com>
10461
10462 * linux-low.h: Remove obsolete prototypes.
10463 (struct linux_target_ops): New.
10464 (extern the_low_target): New.
10465 * linux-low.c (num_regs, regmap): Remove declarations.
10466 (register_addr): Use the_low_target explicitly.
10467 (fetch_register): Likewise.
10468 (usr_fetch_inferior_registers): Likewise.
10469 (usr_store_inferior_registers): Likewise.
10470 * linux-arm-low.c (num_regs): Remove.
10471 (arm_num_regs): Define.
10472 (arm_regmap): Renamed from regmap, made static.
10473 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
10474 made static.
10475 (arm_cannot_store_register): Renamed from cannot_store_register,
10476 made static.
10477 (the_low_target): New.
10478 * linux-i386-low.c (num_regs): Remove.
10479 (i386_num_regs): Define.
10480 (i386_regmap): Renamed from regmap, made static.
10481 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
10482 made static.
10483 (i386_cannot_store_register): Renamed from cannot_store_register,
10484 made static.
10485 (the_low_target): New.
10486 * linux-ia64-low.c (num_regs): Remove.
10487 (ia64_num_regs): Define.
10488 (ia64_regmap): Renamed from regmap, made static.
10489 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
10490 made static.
10491 (ia64_cannot_store_register): Renamed from cannot_store_register,
10492 made static.
10493 (the_low_target): New.
10494 * linux-m68k-low.c (num_regs): Remove.
10495 (m68k_num_regs): Define.
10496 (m68k_regmap): Renamed from regmap, made static.
10497 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
10498 made static.
10499 (m68k_cannot_store_register): Renamed from cannot_store_register,
10500 made static.
10501 (the_low_target): New.
10502 * linux-mips-low.c (num_regs): Remove.
10503 (mips_num_regs): Define.
10504 (mips_regmap): Renamed from regmap, made static.
10505 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
10506 made static.
10507 (mips_cannot_store_register): Renamed from cannot_store_register,
10508 made static.
10509 (the_low_target): New.
10510 * linux-ppc-low.c (num_regs): Remove.
10511 (ppc_num_regs): Define.
10512 (ppc_regmap): Renamed from regmap, made static.
10513 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
10514 made static.
10515 (ppc_cannot_store_register): Renamed from cannot_store_register,
10516 made static.
10517 (the_low_target): New.
10518 * linux-s390-low.c (num_regs): Remove.
10519 (s390_num_regs): Define.
10520 (s390_regmap): Renamed from regmap, made static.
10521 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
10522 made static.
10523 (s390_cannot_store_register): Renamed from cannot_store_register,
10524 made static.
10525 (the_low_target): New.
10526 * linux-sh-low.c (num_regs): Remove.
10527 (sh_num_regs): Define.
10528 (sh_regmap): Renamed from regmap, made static.
10529 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
10530 made static.
10531 (sh_cannot_store_register): Renamed from cannot_store_register,
10532 made static.
10533 (the_low_target): New.
10534 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
10535 (the_low_target): New.
10536
105372002-04-09 Daniel Jacobowitz <drow@mvista.com>
10538
10539 * Makefile.in: Add stamp-h target.
10540 * configure.in: Create stamp-h.
10541 * configure: Regenerated.
10542
105432002-04-09 Daniel Jacobowitz <drow@mvista.com>
10544
10545 * inferiors.c: New file.
10546 * target.c: New file.
10547 * target.h: New file.
10548 * Makefile.in: Add target.o and inferiors.o. Update
10549 dependencies.
10550 * linux-low.c (inferior_pid): New static variable,
10551 moved from server.c.
10552 (linux_create_inferior): Renamed from create_inferior.
10553 Call add_inferior. Return 0 on success instead of a PID.
10554 (linux_attach): Renamed from myattach.
10555 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
10556 (linux_thread_alive): Renamed from mythread_alive.
10557 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
10558 child dies.
10559 (linux_resume): Renamed from myresume. Add missing ``return 0''.
10560 (regsets_store_inferior_registers): Correct error message.
10561 Add missing ``return 0''.
10562 (linux_fetch_registers): Renamed from fetch_inferior_registers.
10563 (linux_store_registers): Renamed from store_inferior_registers.
10564 (linux_read_memory): Renamed from read_inferior_memory.
10565 (linux_write_memory): Renamed from write_inferior_memory.
10566 (linux_target_ops): New structure.
10567 (initialize_low): Call set_target_ops ().
10568 * remote-utils.c (unhexify): New function.
10569 (hexify): New function.
10570 (input_interrupt): Send signals to ``signal_pid''.
10571 * server.c (inferior_pid): Remove.
10572 (start_inferior): Update create_inferior call.
10573 (attach_inferior): Call add_inferior.
10574 (handle_query): New function.
10575 (main): Call handle_query for `q' packets.
10576 * server.h: Include "target.h". Remove obsolete prototypes.
10577 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
10578
105792002-04-09 Daniel Jacobowitz <drow@mvista.com>
10580
10581 * Makefile.in: Add WARN_CFLAGS. Update configury
10582 dependencies.
10583 * configure.in: Check for <string.h>
10584 * configure: Regenerate.
10585 * config.in: Regenerate.
10586 * gdbreplay.c: Include needed system headers.
10587 (remote_open): Remove strchr prototype.
10588 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
10589 * regcache.c (supply_register): Change buf argument to const void *.
10590 (supply_register_by_name): Likewise.
10591 (collect_register): Change buf argument to void *.
10592 (collect_register_by_name): Likewise.
10593 * regcache.h: Add missing prototypes.
10594 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
10595 * server.c (handle_query): New function.
10596 (attached): New static variable, moved out of main.
10597 (main): Quiet longjmp clobber warnings.
10598 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
10599 * utils.c (error): Remove NORETURN.
10600 (fatal): Likewise.
This page took 2.382376 seconds and 4 git commands to generate.