]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
Move NEWS entries to the right section
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
5227d625
JB
12014-12-15 Joel Brobecker <brobecker@adacore.com>
2
3 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
4 Remove FIXME comment about assumption about N.
5
f93b65a0
JB
62014-12-13 Joel Brobecker <brobecker@adacore.com>
7
8 * configure.ac: If large-file support is disabled in GDBserver,
9 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
10 * configure: Regenerate.
11
e5a9158d
AA
122014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
13
14 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
15 warning upon ENODATA from ptrace.
16 * linux-s390-low.c (s390_store_tdb): New.
17 (s390_regsets): Add regset for NT_S390_TDB.
18
feea5f36
AA
192014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
20
21 * linux-low.c (regsets_store_inferior_registers): Skip regsets
22 without a fill_function.
23 * linux-s390-low.c (s390_fill_last_break): Remove.
24 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
25 (s390_arch_setup): Use regset's size instead of fill_function for
26 loop end condition.
27
098dbe61
AA
282014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
29
30 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
31 the regset's store function when ptrace returned an error.
32 * regcache.c (get_thread_regcache): Invalidate register cache
33 before fetching inferior's registers.
34
28eef672
AA
352014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
36
37 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
38 while-loop as for-loop.
39 (regsets_store_inferior_registers): Likewise.
40
bdca27a2
YQ
412014-11-28 Yao Qi <yao@codesourcery.com>
42
43 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
44 * config.in, configure: Re-generate.
45 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
46 is defined.
47
9c232dda
YQ
482014-11-21 Yao Qi <yao@codesourcery.com>
49
50 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
51 (AC_CHECK_HEADERS): Remove malloc.h.
52 * configure: Re-generated.
53 * config.in: Re-generated.
54 * server.h: Don't include alloca.h and malloc.h.
55 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
56 Don't include malloc.h.
57
43968415
JB
582014-11-17 Joel Brobecker <brobecker@adacore.com>
59
60 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
61 corresponding ERRNO check in same block.
62
40e91bc7
PA
632014-11-12 Pedro Alves <palves@redhat.com>
64
65 * server.c (cont_thread): Update comment.
66 (start_inferior, attach_inferior): No longer clear cont_thread.
67 (handle_v_cont): No longer set cont_thread.
68 (captured_main): Clear cont_thread each time a GDB connects.
69
c2c118cf
PA
702014-11-12 Pedro Alves <palves@redhat.com>
71
72 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
73 thread, and don't resume all threads if the Hc thread has exited.
74
78708b7c
PA
752014-11-12 Pedro Alves <palves@redhat.com>
76
77 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
78 the process group instead of to a specific LWP.
79
a2abc7de
PA
802014-10-15 Pedro Alves <palves@redhat.com>
81
82 PR server/17487
83 * win32-arm-low.c (arm_set_thread_context): Remove current_event
84 parameter.
85 (arm_set_thread_context): Delete.
86 (the_low_target): Adjust.
87 * win32-i386-low.c (debug_registers_changed)
88 (debug_registers_used): Delete.
89 (update_debug_registers_callback): New function.
90 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
91 needing to update their debug registers.
92 (win32_get_current_dr): New function.
93 (x86_dr_low_get_addr, x86_dr_low_get_control)
94 (x86_dr_low_get_status): Fetch the debug register from the thread
95 record's context.
96 (i386_initial_stuff): Adjust.
97 (i386_get_thread_context): Remove current_event parameter. Don't
98 clear debug_registers_changed nor copy DR values to
99 debug_reg_state.
100 (i386_set_thread_context): Delete.
101 (i386_prepare_to_resume): New function.
102 (i386_thread_added): Mark the thread as needing to update irs
103 debug registers.
104 (the_low_target): Remove i386_set_thread_context and install
105 i386_prepare_to_resume.
106 * win32-low.c (win32_get_thread_context): Adjust.
107 (win32_set_thread_context): Use SetThreadContext
108 directly.
109 (win32_prepare_to_resume): New function.
110 (win32_require_context): New function, factored out from ...
111 (thread_rec): ... this.
112 (continue_one_thread): Call win32_prepare_to_resume on each thread
113 we're about to continue.
114 (win32_resume): Call win32_prepare_to_resume on the event thread.
115 * win32-low.h (struct win32_thread_info)
116 <debug_registers_changed>: New field.
117 (struct win32_target_ops): Change prototype of set_thread_context,
118 delete set_thread_context and add prepare_to_resume.
119 (win32_require_context): New declaration.
120
a442d071
GB
1212014-10-08 Gary Benson <gbenson@redhat.com>
122
123 * server.h: Do not include common-exceptions.h.
124
6f1947e8
GB
1252014-10-08 Gary Benson <gbenson@redhat.com>
126
127 * server.h: Do not include cleanups.h.
128
63b434a4
JH
1292014-09-30 James Hogan <james.hogan@imgtec.com>
130
131 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
132 mips64-dsp-linux.c.
133
c4d9ceb6
YQ
1342014-09-23 Yao Qi <yao@codesourcery.com>
135
136 * linux-low.c (lp_status_maybe_breakpoint): New function.
137 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
138 (count_events_callback): Likewise.
139 (select_event_lwp_callback): Likewise.
140 (cancel_breakpoints_callback): Likewise.
141
89a5711c
DB
1422014-09-19 Don Breazeal <donb@codesourcery.com>
143
144 * linux-low.c (handle_extended_wait): Call
145 linux_ptrace_get_extended_event.
146 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
147 linux_is_extended_waitstatus.
148
bffc0964
JB
1492014-09-16 Joel Brobecker <brobecker@adacore.com>
150
151 * Makefile.in (CPPFLAGS): Define.
152 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
153 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
154
0bfdf32f
GB
1552014-09-16 Gary Benson <gbenson@redhat.com>
156
157 * inferiors.h (current_inferior): Renamed as...
158 (current_thread): New variable. All uses updated.
159 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
160 (maybe_move_out_of_jump_pad): Likewise.
161 (cancel_breakpoint): Likewise.
162 (linux_low_filter_event): Likewise.
163 (wait_for_sigstop): Likewise.
164 (linux_resume_one_lwp): Likewise.
165 (need_step_over_p): Likewise.
166 (start_step_over): Likewise.
167 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
168 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
169 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
170 and save_inferior as saved_thread.
171 * regcache.c (get_thread_regcache): Renamed saved_inferior as
172 saved_thread.
173 (regcache_invalidate_thread): Likewise.
174 * remote-utils.c (prepare_resume_reply): Likewise.
175 * thread-db.c (thread_db_get_tls_address): Likewise.
176 (disable_thread_event_reporting): Likewise.
177 (remove_thread_event_breakpoints): Likewise.
178 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
179 as saved_thread.
180 * target.h (set_desired_inferior): Renamed as...
181 (set_desired_thread): New declaration. All uses updated.
182 * server.c (myresume): Updated comment to reference thread instead
183 of inferior.
184 (handle_serial_event): Likewise.
185 (handle_target_event): Likewise.
186
361c8ade
GB
1872014-09-12 Tom Tromey <tromey@redhat.com>
188 Gary Benson <gbenson@redhat.com>
189
190 * regcache.h: Include common-regcache.h.
191 (regcache_read_pc): Don't declare.
192 * regcache.c (get_thread_regcache_for_ptid): New function.
193
bd9269f7
GB
1942014-09-11 Tom Tromey <tromey@redhat.com>
195 Gary Benson <gbenson@redhat.com>
196
197 * symbol.c: New file.
198 * Makefile.in (SFILES): Add symbol.c.
199 (OBS): Add symbol.o.
200
f8c1d06b
GB
2012014-09-11 Gary Benson <gbenson@redhat.com>
202
203 * target.c (target_stop_ptid, target_continue_ptid): New
204 functions.
205
721ec300
GB
2062014-09-11 Tom Tromey <tromey@redhat.com>
207 Gary Benson <gbenson@redhat.com>
208
209 * target.h: Include target/target.h.
210 * target.c (target_read_memory, target_read_uint32)
211 (target_write_memory): New functions.
212
c5e92cca
GB
2132014-09-11 Gary Benson <gbenson@redhat.com>
214
215 * server.h (debug_hw_points): Don't declare.
216 * server.c (debug_hw_points): Don't define. Replace all uses
217 with show_debug_regs.
218 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
219 all uses with show_debug_regs.
220
2e4bb98a
EBM
2212014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
222
223 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
224 endianness into account.
225 (ppc_supply_ptrace_register): Likewise.
226
ac740bc7
JH
2272014-09-03 James Hogan <james.hogan@imgtec.com>
228
229 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
230 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
231
97ea6506
GB
2322014-09-03 Gary Benson <gbenson@redhat.com>
233
234 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
235 ALL_DEBUG_ADDRESS_REGISTERS.
236
df7e5265
GB
2372014-09-02 Gary Benson <gbenson@redhat.com>
238
239 * i386-low.h: Renamed as...
240 * x86-low.h: New file. All type, function and variable name
241 prefixes changed from "i386_" to "x86_". All references updated.
242 * i386-low.c: Renamed as...
243 * x86-low.c: New file. All type, function and variable name
244 prefixes changed from "i386_" to "x86_". All references updated.
245
ed859da7
GB
2462014-09-02 Gary Benson <gbenson@redhat.com>
247
248 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
249 (x86_linux_new_thread): Likewise.
250
860789c7
GB
2512014-08-29 Gary Benson <gbenson@redhat.com>
252
253 * server.h (setjmp.h): Do not include.
254 (toplevel): Do not declare.
255 (common-exceptions.h): Include.
256 (cleanups.h): Likewise.
257 * server.c (toplevel): Do not define.
258 (exit_code): New static global.
259 (detach_or_kill_for_exit_cleanup): New function.
260 (main): New function. Original main renamed to...
261 (captured_main): New function.
262 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
263
ff55e1b5
GB
2642014-08-29 Gary Benson <gbenson@redhat.com>
265
266 * Makefile.in (SFILES): Add common/common-exceptions.c.
267 (OBS): Add common-exceptions.o.
268 (common-exceptions.o): New rule.
269 * utils.c (prepare_to_throw_exception): New function.
270
e9bcb658
GB
2712014-08-29 Gary Benson <gbenson@redhat.com>
272
273 * config.in: Regenerate.
274 * configure: Likewise.
275
e3180625
GB
2762014-08-29 Gary Benson <gbenson@redhat.com>
277
278 * Makefile.in (SFILES): Add common/cleanups.c.
279 (OBS): cleanups.o.
280 (cleanups.o): New rule.
281
e3d6ba5d
GB
2822014-08-29 Gary Benson <gbenson@redhat.com>
283
284 * utils.c (internal_vwarning): New function.
285
7096e886
GB
2862014-08-28 Gary Benson <gbenson@redhat.com>
287
288 * utils.h (fatal): Remove declaration.
289 * utils.c (fatal): Remove function.
290
14ce3192
GB
2912014-08-28 Gary Benson <gbenson@redhat.com>
292
293 * tracepoint.c (gdb_agent_init): Replace fatal with
294 perror_with_name.
295 (initialize_tracepoint): Likewise.
296
50278d59
GB
2972014-08-28 Gary Benson <gbenson@redhat.com>
298
299 * remote-utils.c (remote_prepare): Replace fatal with error.
300
aa96c426
GB
3012014-08-28 Gary Benson <gbenson@redhat.com>
302
303 * linux-low.c (linux_async): Replace fatal with warning.
304 Tidy up and return.
305 (linux_start_non_stop): Return -1 if linux_async failed.
306
f7160e97
GB
3072014-08-28 Gary Benson <gbenson@redhat.com>
308
309 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
310 gdb_assert.
311 (i386_dr_low_get_addr): Remove vague comment.
312 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
313 gdb_assert.
314
38e08fca
GB
3152014-08-28 Gary Benson <gbenson@redhat.com>
316
317 * inferiors.c (get_thread_process): Replace check with gdb_assert.
318 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
319 internal_error.
320 (linux_resume_one_lwp): Likewise.
321 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
322 gdb_assert.
323 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
324 with internal_error.
325 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
326 (init_register_cache): Replace fatal with gdb_assert_not_reached.
327 (find_register_by_name): Replace fatal with internal_error.
328 (find_regno): Likewise.
329 * tdesc.c (init_target_desc): Replace check with gdb_assert.
330 * thread-db.c (thread_db_create_event): Likewise.
331 (thread_db_load_search): Likewise.
332 (try_thread_db_load_1): Likewise.
333 * tracepoint.c (get_jump_space_head): Replace fatal with
334 internal_error.
335 (claim_trampoline_space): Likewise.
336 (have_fast_tracepoint_trampoline_buffer): Likewise.
337 (cmd_qtstart): Likewise.
338 (stop_tracing): Likewise.
339 (fast_tracepoint_collecting): Likewise.
340 (target_malloc): Likewise.
341 (download_tracepoint): Likewise.
342 (download_trace_state_variables): Replace check with gdb_assert.
343 (upload_fast_traceframes): Replace fatal with internal_error.
344
34abf635
GB
3452014-08-19 Tom Tromey <tromey@redhat.com>
346 Gary Benson <gbenson@redhat.com>
347
348 * Makefile.in (SFILES): Add common/common-debug.c.
349 (OBS): Add common-debug.o.
350 (common-debug.o): New rule.
351 * debug.h (debug_printf): Don't declare.
352 * debug.c (debug_printf): Renamed and rewritten as...
353 (debug_vprintf): New function.
354
f6e94d78
GB
3552014-08-19 Gary Benson <gbenson@redhat.com>
356
357 * utils.h: Do not include print-utils.h.
358
9239eeab
GB
3592014-08-19 Tom Tromey <tromey@redhat.com>
360 Gary Benson <gbenson@redhat.com>
361
362 * server.h: Add static assertion.
363 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
364
ef87c8bb
GB
3652014-08-19 Tom Tromey <tromey@redhat.com>
366 Gary Benson <gbenson@redhat.com>
367
368 * Makefile.in (SFILES): Add common/errors.c.
369 (OBS): Add errors.o.
370 (IPA_OBS): Add errors-ipa.o.
371 (errors.o): New rule.
372 (errors-ipa.o): Likewise.
373 * utils.h (perror_with_name, error, warning): Don't declare.
374 * utils.c (warning): Renamed and rewritten as...
375 (vwarning): New function.
376 (error): Renamed and rewritten as...
377 (verror): New function.
378 (internal_error): Renamed and rewritten as...
379 (internal_verror): New function.
380
bb974a24
GB
3812014-08-07 Gary Benson <gbenson@redhat.com>
382
383 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
384 * configure: Regenerate.
385 * config.in: Likewise.
386 * server.h: Do not include errno.h.
387 * event-loop.c: Likewise.
388 * hostio-errno.c: Likewise.
389 * linux-low.c: Likewise.
390 * remote-utils.c: Likewise.
391 * spu-low.c: Likewise.
392 * utils.c: Likewise.
393 * gdbreplay.c: Unconditionally include errno.h.
394
6d3d12eb
GB
3952014-08-07 Gary Benson <gbenson@redhat.com>
396
397 * server.h: Do not include string.h.
398 * event-loop.c: Likewise.
399 * linux-low.c: Likewise.
400 * regcache.c: Likewise.
401 * remote-utils.c: Likewise.
402 * spu-low.c: Likewise.
403 * utils.c: Likewise.
404
dccbb609
GB
4052014-08-07 Gary Benson <gbenson@redhat.com>
406
407 * server.h: Do not include gdb_assert.h.
408
e76df0d0
GB
4092014-08-07 Gary Benson <gbenson@redhat.com>
410
411 * server.h: Do not include common-utils.h.
412
4cb9c816
GB
4132014-08-07 Gary Benson <gbenson@redhat.com>
414
415 * server.h: Do not include ptid.h.
416 * notif.h: Likewise.
417
3995eeee
GB
4182014-08-07 Gary Benson <gbenson@redhat.com>
419
420 * server.h: Do not include gdb_locale.h.
421
cb9f1a9b
GB
4222014-08-07 Gary Benson <gbenson@redhat.com>
423
424 * server.h: Do not include gdb/signals.h.
425 * win32-low.c: Likewise.
426
a5fceff8
GB
4272014-08-07 Gary Benson <gbenson@redhat.com>
428
429 * server.h: Do not include pathmax.h.
430
b9391142
GB
4312014-08-07 Gary Benson <gbenson@redhat.com>
432
433 * server.h: Do not include libiberty.h.
434 * linux-bfin-low.c: Likewise.
435
0e443c87
GB
4362014-08-07 Gary Benson <gbenson@redhat.com>
437
438 * server.h: Do not include ansidecl.h.
439
8ebb3f56
GB
4402014-08-07 Gary Benson <gbenson@redhat.com>
441
442 * linux-x86-low.c: Do not include stddef.h.
443 * lynx-ppc-low.c: Likewise.
444 * tracepoint.c: Likewise.
445
8980bdf6
GB
4462014-08-07 Gary Benson <gbenson@redhat.com>
447
448 * server.h: Do not include stdarg.h.
449 * nto-low.c: Likewise.
450
d7096f71
GB
4512014-08-07 Gary Benson <gbenson@redhat.com>
452
453 * server.h: Do not include stdlib.h.
454 * inferiors.c: Likewise.
455 * linux-low.c: Likewise.
456 * regcache.c: Likewise.
457 * spu-low.c: Likewise.
458 * tracepoint.c: Likewise.
459 * utils.c: Likewise.
460
d02f550d
GB
4612014-08-07 Gary Benson <gbenson@redhat.com>
462
463 * server.h: Do not include stdio.h.
464 * linux-low.c: Likewise.
465 * remote-utils.c: Likewise.
466 * spu-low.c: Likewise.
467 * utils.c: Likewise.
468 * wincecompat.c: Likewise.
469
87f6c4e3
GB
4702014-08-06 Gary Benson <gbenson@redhat.com>
471
472 * regcache.c (init_register_cache): Move conditionals inside if.
473
7089dca4
GB
4742014-08-06 Gary Benson <gbenson@redhat.com>
475
476 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
477
462f517e
GB
4782014-07-31 Gary Benson <gbenson@redhat.com>
479
480 * ax.h: Do not include server.h.
481 * gdbthread.h: Likewise.
482 * lynx-low.h: Likewise.
483 * notif.h: Likewise.
484
976411d6
GB
4852014-07-30 Gary Benson <gbenson@redhat.com>
486
487 * server.h: Include common-defs.h.
488 Do not include config.h or build-gnulib-gdbserver/config.h.
489
d41f6d8e
GB
4902014-07-30 Gary Benson <gbenson@redhat.com>
491
492 * hostio-errno.c: Move server.h to top of includes list.
493 * inferiors.c: Likewise.
494 * linux-x86-low.c: Likewise.
495 * notif.c: Include server.h.
496
314c6a35
TT
4972014-07-24 Tom Tromey <tromey@redhat.com>
498 Gary Benson <gbenson@redhat.com>
499
500 * server.h (CORE_ADDR): Now unsigned.
501
69ff6be5
PA
5022014-07-16 Pedro Alves <palves@redhat.com>
503
504 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
505
ce9e3fe7
PA
5062014-07-15 Pedro Alves <palves@redhat.com>
507
508 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
509 copy.
510
e76126e8
PA
5112014-07-11 Pedro Alves <palves@redhat.com>
512
513 * linux-low.c (kill_wait_lwp): New function, based on
514 kill_one_lwp_callback, but use my_waitpid directly.
515 (kill_one_lwp_callback, linux_kill): Use it.
516
8e9db26e
PA
5172014-06-23 Pedro Alves <palves@redhat.com>
518
519 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
520 before setting DR0..DR3.
521
698b3e08
GB
5222014-06-20 Gary Benson <gbenson@redhat.com>
523
524 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
525 * configure: Regenerated.
526 * config.in: Likewise.
527
125f8a3d
GB
5282014-06-20 Gary Benson <gbenson@redhat.com>
529
530 * Makefile.in (SFILES): Update locations for files moved
531 from common to nat.
532 (object file files): Reordered.
533
42995dbd
GB
5342014-06-20 Gary Benson <gbenson@redhat.com>
535
536 * i386-low.h (i386_dr_low_can_set_addr): Removed.
537 (i386_dr_low_set_addr): Likewise.
538 (i386_dr_low_get_addr): Likewise.
539 (i386_dr_low_can_set_control): Likewise.
540 (i386_dr_low_set_control): Likewise.
541 (i386_dr_low_get_control): Likewise.
542 (i386_dr_low_get_status): Likewise.
543 (i386_get_debug_register_length): Likewise.
544 * linux-x86-low.c (i386_dr_low_set_addr):
545 Changed signature. Made static.
546 (i386_dr_low_get_addr): Likewise.
547 (i386_dr_low_set_control): Likewise.
548 (i386_dr_low_get_control): Likewise.
549 (i386_dr_low_get_status): Likewise.
550 (i386_dr_low): New global variable.
551 * win32-i386-low.c (i386_dr_low_set_addr):
552 Changed signature. Made static.
553 (i386_dr_low_get_addr): Likewise.
554 (i386_dr_low_set_control): Likewise.
555 (i386_dr_low_get_control): Likewise.
556 (i386_dr_low_get_status): Likewise.
557 (i386_dr_low): New global variable.
558
e1d2394b
MS
5592014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
560
561 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
562 * Makefile.in (AR, AR_FLAGS): Define.
563 * configure: Regenerate.
564
3a8ee006
GB
5652014-06-19 Gary Benson <gbenson@redhat.com>
566
567 * Makefile.in (i386-dregs.o): New rule.
568 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
569 * i386-low.c (target.h): Remove include.
570 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
571 (DR_CONTROL_SHIFT): Likewise.
572 (DR_CONTROL_SIZE): Likewise.
573 (DR_RW_EXECUTE): Likewise.
574 (DR_RW_WRITE): Likewise.
575 (DR_RW_READ): Likewise.
576 (DR_RW_IORW): Likewise.
577 (DR_LEN_1): Likewise.
578 (DR_LEN_2): Likewise.
579 (DR_LEN_4): Likewise.
580 (DR_LEN_8): Likewise.
581 (DR_LOCAL_ENABLE_SHIFT): Likewise.
582 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
583 (DR_ENABLE_SIZE): Likewise.
584 (DR_LOCAL_SLOWDOWN): Likewise.
585 (DR_GLOBAL_SLOWDOWN): Likewise.
586 (DR_CONTROL_RESERVED): Likewise.
587 (I386_DR_CONTROL_MASK): Likewise.
588 (I386_DR_VACANT): Likewise.
589 (I386_DR_LOCAL_ENABLE): Likewise.
590 (I386_DR_GLOBAL_ENABLE): Likewise.
591 (I386_DR_DISABLE): Likewise.
592 (I386_DR_SET_RW_LEN): Likewise.
593 (I386_DR_GET_RW_LEN): Likewise.
594 (I386_DR_WATCH_HIT): Likewise.
595 (i386_wp_op_t): Likewise.
596 (i386_show_dr): Likewise.
597 (i386_length_and_rw_bits): Likewise.
598 (i386_insert_aligned_watchpoint): Likewise.
599 (i386_remove_aligned_watchpoint): Likewise.
600 (i386_handle_nonaligned_watchpoint): Likewise.
601 i386_update_inferior_debug_regs(): Likewise.
602 (i386_dr_insert_watchpoint): Likewise.
603 (i386_dr_remove_watchpoint): Likewise.
604 (i386_dr_region_ok_for_watchpoint): Likewise.
605 (i386_dr_stopped_data_address): Likewise.
606 (i386_dr_stopped_by_watchpoint): Likewise.
607
8f26655c
GB
6082014-06-19 Gary Benson <gbenson@redhat.com>
609
610 * i386-low.c (i386_dr_show): Renamed to
611 i386_show_dr and made static. All uses updated.
612 (i386_dr_length_and_rw_bits): Renamed to
613 i386_length_and_rw_bits and made static.
614 All uses updated.
615 (i386_dr_insert_aligned_watchpoint): Renamed to
616 i386_insert_aligned_watchpoint and made static.
617 All uses updated.
618 (i386_dr_remove_aligned_watchpoint): Renamed to
619 i386_remove_aligned_watchpoint and made static.
620 All uses updated.
621 (i386_dr_update_inferior_debug_regs): Renamed to
622 i386_update_inferior_debug_regs and made static.
623 All uses updated.
624
b9228891
GB
6252014-06-18 Gary Benson <gbenson@redhat.com>
626
5171def3
GB
627 * i386-low.h (i386_dr_low_can_set_addr): New macro.
628 (i386_dr_low_can_set_control): Likewise.
629 (i386_get_debug_register_length): Likewise.
630 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
631 (i386_dr_low_can_set_control): Likewise.
632 (i386_get_debug_register_length): Likewise.
633
6342014-06-17 Gary Benson <gbenson@redhat.com>
635
b9228891
GB
636 * i386-low.h (i386-dregs.h): New include.
637 (DR_FIRSTADDR): Now in i386-dregs.h.
638 (DR_LASTADDR): Likewise.
639 (DR_NADDR): Likewise.
640 (DR_STATUS): Likewise.
641 (DR_CONTROL): Likewise.
642 (i386_debug_reg_state): Likewise.
643 (i386_dr_insert_watchpoint): Likewise.
644 (i386_dr_remove_watchpoint): Likewise.
645 (i386_dr_region_ok_for_watchpoint): Likewise.
646 (i386_dr_stopped_data_address): Likewise.
647 (i386_dr_stopped_by_watchpoint): Likewise.
648 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
649
4be83cc2
GB
6502014-06-18 Gary Benson <gbenson@redhat.com>
651
652 * i386-low.h (i386_low_insert_watchpoint): Renamed to
653 i386_dr_insert_watchpoint.
654 (i386_low_remove_watchpoint): Renamed to
655 i386_dr_remove_watchpoint.
656 (i386_low_region_ok_for_watchpoint): Renamed to
657 i386_dr_region_ok_for_watchpoint.
658 (i386_low_stopped_data_address): Renamed to
659 i386_dr_stopped_data_address.
660 (i386_low_stopped_by_watchpoint): Renamed to
661 i386_dr_stopped_by_watchpoint.
662 * i386-low.c (i386_show_dr): Renamed to
663 i386_dr_show and made nonstatic. All uses updated.
664 (i386_length_and_rw_bits): Renamed to
665 i386_dr_length_and_rw_bits and made nonstatic.
666 All uses updated.
667 (i386_insert_aligned_watchpoint): Renamed to
668 i386_dr_insert_aligned_watchpoint and made nonstatic.
669 All uses updated.
670 (i386_remove_aligned_watchpoint): Renamed to
671 i386_dr_remove_aligned_watchpoint and made nonstatic.
672 All uses updated.
673 (i386_update_inferior_debug_regs): Renamed to
674 i386_dr_update_inferior_debug_regs and made nonstatic.
675 All uses updated.
676 (i386_low_insert_watchpoint): Renamed to
677 i386_dr_insert_watchpoint. All uses updated.
678 (i386_low_remove_watchpoint): Renamed to
679 i386_dr_remove_watchpoint. All uses updated.
680 (i386_low_region_ok_for_watchpoint): Renamed to
681 i386_dr_region_ok_for_watchpoint. All uses updated.
682 (i386_low_stopped_data_address): Renamed to
683 i386_dr_stopped_data_address. All uses updated.
684 (i386_low_stopped_by_watchpoint): Renamed to
685 i386_dr_stopped_by_watchpoint. All uses updated.
686
131aa0d4
GB
6872014-06-18 Gary Benson <gbenson@redhat.com>
688
689 * i386-low.c (i386_dr_low_can_set_addr): New macro.
690 (i386_dr_low_can_set_control): Likewise.
691 (i386_insert_aligned_watchpoint): New check.
692
d9305f7f
GB
6932014-06-18 Gary Benson <gbenson@redhat.com>
694
695 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
696 Renamed to state.
697
e927c9fc
GB
6982014-06-18 Gary Benson <gbenson@redhat.com>
699
700 * i386-low.c (i386_length_and_rw_bits): Use internal_error
701 instead of fatal and error.
702 (i386_handle_nonaligned_watchpoint): Likewise.
703
1b6d4134
GB
7042014-06-18 Gary Benson <gbenson@redhat.com>
705
706 * i386-low.c (i386_get_debug_register_length): New macro.
707 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
708 (i386_show_dr): Use debug_printf instead of fprintf. Use
709 phex to format values.
710
6e62758f
GB
7112014-06-18 Gary Benson <gbenson@redhat.com>
712
713 * i386-low.h: Comment changes.
714 * i386-low.c: Likewise.
715
fc6e2f03
GB
7162014-06-18 Gary Benson <gbenson@redhat.com>
717
718 * i386-low.c: Whitespace changes.
719
f9d1eeed
TT
7202014-06-12 Tom Tromey <tromey@redhat.com>
721
722 * utils.c (freeargv): Remove.
723
0b04e523
TT
7242014-06-12 Tom Tromey <tromey@redhat.com>
725
726 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
727 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
728 (parse_debug_format_options): Likewise.
729 (gdbserver_usage): Likewise.
730 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
731 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
732 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
733 against libiberty.
734 ($(LIBGNU)): Depend on libiberty.
735 (all-lib): Recurse into all subdirs.
736 (install-only): Invoke "install" target in subdirs.
737 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
738 targets.
739 * configure: Rebuild.
740 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
741 for vasprintf, vsnprintf, or gettimeofday.
742 * configure.srv: Don't add safe-ctype.o or lbasename.o to
743 srv_tgtobj.
744
270c9937
JB
7452014-06-05 Joel Brobecker <brobecker@adacore.com>
746
747 * development.sh: Delete.
748 * Makefile.in (config.status): Adjust dependency on development.sh.
749 * configure.ac: Adjust development.sh source call.
750 * configure: Regenerate.
751
0a261ed8
PA
7522014-06-02 Pedro Alves <palves@redhat.com>
753
754 * ax.c (gdb_free_agent_expr): New function.
755 * ax.h (gdb_free_agent_expr): New declaration.
756 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
757 list.
758 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
759 static.
760 (clear_breakpoint_conditions_and_commands): New function.
761 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
762 (clear_breakpoint_conditions_and_commands): New declaration.
763
e9dae05e
RR
7642014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
765
766 * linux-aarch64-low.c (asm/ptrace.h): Include.
767
5876f503
JK
7682014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
769
770 Fix TLS access for -static -pthread.
771 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
772 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
773 (thread_db_load_search, try_thread_db_load_1): Initialize it.
774
802e8e6d
PA
7752014-05-20 Pedro Alves <palves@redhat.com>
776
777 * linux-aarch64-low.c (aarch64_insert_point)
778 (aarch64_remove_point): No longer check whether the type is
779 supported here. Adjust to new interface.
780 (the_low_target): Install aarch64_supports_z_point_type as
781 supports_z_point_type method.
782 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
783 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
784 instead of a Z packet char. Adjust.
785 (arm_supports_z_point_type): New function.
786 (arm_insert_point, arm_remove_point): Adjust to new interface.
787 (the_low_target): Install arm_supports_z_point_type.
788 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
789 (cris_insert_point, cris_remove_point): Adjust to new interface.
790 Don't check whether the type is supported here.
791 (the_low_target): Install cris_supports_z_point_type.
792 * linux-low.c (linux_supports_z_point_type): New function.
793 (linux_insert_point, linux_remove_point): Adjust to new interface.
794 * linux-low.h (struct linux_target_ops) <insert_point,
795 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
796 raw_breakpoint pointer parameter.
797 <supports_z_point_type>: New method.
798 * linux-mips-low.c (mips_supports_z_point_type): New function.
799 (mips_insert_point, mips_remove_point): Adjust to new interface.
800 Use mips_supports_z_point_type.
801 (the_low_target): Install mips_supports_z_point_type.
802 * linux-ppc-low.c (the_low_target): Install NULL as
803 supports_z_point_type method.
804 * linux-s390-low.c (the_low_target): Install NULL as
805 supports_z_point_type method.
806 * linux-sparc-low.c (the_low_target): Install NULL as
807 supports_z_point_type method.
808 * linux-x86-low.c (x86_supports_z_point_type): New function.
809 (x86_insert_point): Adjust to new insert_point interface. Use
810 insert_memory_breakpoint. Adjust to new
811 i386_low_insert_watchpoint interface.
812 (x86_remove_point): Adjust to remove_point interface. Use
813 remove_memory_breakpoint. Adjust to new
814 i386_low_remove_watchpoint interface.
815 (the_low_target): Install x86_supports_z_point_type.
816 * lynx-low.c (lynx_target_ops): Install NULL as
817 supports_z_point_type callback.
818 * nto-low.c (nto_supports_z_point_type): New.
819 (nto_insert_point, nto_remove_point): Adjust to new interface.
820 (nto_target_ops): Install nto_supports_z_point_type.
821 * mem-break.c: Adjust intro comment.
822 (struct raw_breakpoint) <raw_type, size>: New fields.
823 <inserted>: Update comment.
824 <shlib_disabled>: Delete field.
825 (enum bkpt_type) <gdb_breakpoint>: Delete value.
826 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
827 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
828 (raw_bkpt_type_to_target_hw_bp_type): New function.
829 (find_enabled_raw_code_breakpoint_at): New function.
830 (find_raw_breakpoint_at): New type and size parameters. Use them.
831 (insert_memory_breakpoint): New function, based off
832 set_raw_breakpoint_at.
833 (remove_memory_breakpoint): New function.
834 (set_raw_breakpoint_at): Reimplement.
835 (set_breakpoint): New, based on set_breakpoint_at.
836 (set_breakpoint_at): Reimplement.
837 (delete_raw_breakpoint): Go through the_target->remove_point
838 instead of assuming memory breakpoints.
839 (find_gdb_breakpoint_at): Delete.
840 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
841 (find_gdb_breakpoint): New function.
842 (set_gdb_breakpoint_at): Delete.
843 (z_type_supported): New function.
844 (set_gdb_breakpoint_1): New function, loosely based off
845 set_gdb_breakpoint_at.
846 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
847 (delete_gdb_breakpoint_at): Delete.
848 (delete_gdb_breakpoint_1): New function, loosely based off
849 delete_gdb_breakpoint_at.
850 (delete_gdb_breakpoint): New function.
851 (clear_gdb_breakpoint_conditions): Rename to ...
852 (clear_breakpoint_conditions): ... this. Don't handle a NULL
853 breakpoint.
854 (add_condition_to_breakpoint): Make static.
855 (add_breakpoint_condition): Take a struct breakpoint pointer
856 instead of an address. Adjust.
857 (gdb_condition_true_at_breakpoint): Rename to ...
858 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
859 z_type parameter.
860 (gdb_condition_true_at_breakpoint): Reimplement.
861 (add_breakpoint_commands): Take a struct breakpoint pointer
862 instead of an address. Adjust.
863 (gdb_no_commands_at_breakpoint): Rename to ...
864 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
865 parameter. Return true if no breakpoint was found. Change debug
866 output.
867 (gdb_no_commands_at_breakpoint): Reimplement.
868 (run_breakpoint_commands): Rename to ...
869 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
870 and change return type to boolean.
871 (run_breakpoint_commands): New function.
872 (gdb_breakpoint_here): Also check for Z1 breakpoints.
873 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
874 breakpoint. Go through the_target->remove_point instead of
875 assuming memory breakpoint.
876 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
877 software and hardware breakpoints.
878 (reinsert_raw_breakpoint): Go through the_target->insert_point
879 instead of assuming memory breakpoint.
880 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
881 software and hardware breakpoints.
882 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
883 Check both software and hardware breakpoints.
884 (validate_inserted_breakpoint): Assert the breakpoint is a
885 software breakpoint. Set the inserted flag to -1 instead of
886 setting shlib_disabled.
887 (delete_disabled_breakpoints): Adjust.
888 (validate_breakpoints): Only validate software breakpoints.
889 Adjust to inserted flag change.
890 (check_mem_read, check_mem_write): Skip breakpoint types other
891 than software breakpoints. Adjust to inserted flag change.
892 * mem-break.h (enum raw_bkpt_type): New enum.
893 (raw_breakpoint, struct process_info): Forward declare.
894 (Z_packet_to_target_hw_bp_type): Delete declaration.
895 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
896 (set_gdb_breakpoint, delete_gdb_breakpoint)
897 (clear_breakpoint_conditions): New declarations.
898 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
899 (breakpoint_inserted_here): Update comment.
900 (add_breakpoint_condition, add_breakpoint_commands): Replace
901 address parameter with a breakpoint pointer parameter.
902 (gdb_breakpoint_here): Update comment.
903 (delete_gdb_breakpoint_at): Delete.
904 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
905 * server.c (process_point_options): Take a struct breakpoint
906 pointer instead of an address. Adjust.
907 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
908 delete_gdb_breakpoint.
909 * spu-low.c (spu_target_ops): Install NULL as
910 supports_z_point_type method.
911 * target.h: Include mem-break.h.
912 (struct target_ops) <prepare_to_access_memory>: Update comment.
913 <supports_z_point_type>: New field.
914 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
915 instead of a char. Also take a raw breakpoint pointer.
916 * win32-arm-low.c (the_low_target): Install NULL as
917 supports_z_point_type.
918 * win32-i386-low.c (i386_supports_z_point_type): New function.
919 (i386_insert_point, i386_remove_point): Adjust to new interface.
920 (the_low_target): Install i386_supports_z_point_type.
921 * win32-low.c (win32_supports_z_point_type): New function.
922 (win32_insert_point, win32_remove_point): Adjust to new interface.
923 (win32_target_ops): Install win32_supports_z_point_type.
924 * win32-low.h (struct win32_target_ops):
925 <supports_z_point_type>: New method.
926 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
927 instead of a char. Also take a raw breakpoint pointer.
928
932539e3
PA
9292014-05-20 Pedro Alves <palves@redhat.com>
930
931 * mem-break.h: Include break-common.h.
932 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
933 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
934 (Z_packet_to_target_hw_bp_type): New declaration.
935 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
936 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
937 (Z_PACKET_ACCESS_WP): Delete macros.
938 (Z_packet_to_hw_type): Delete function.
939 * i386-low.h: Don't include break-common.h here.
940 (Z_packet_to_hw_type): Delete declaration.
941 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
942 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
943 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
944 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
945 * linux-aarch64-low.c: Don't include break-common.h here.
946 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
947 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
948 (Z_packet_to_target_hw_bp_type): Delete function.
949 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
950 function.
951 (mips_insert_point, mips_remove_point): Use
952 Z_packet_to_target_hw_bp_type.
953
4ff0d3d8
PA
9542014-05-20 Pedro Alves <palves@redhat.com>
955
956 * linux-aarch64-low.c: Include break-common.h.
957 (enum target_point_type): Delete.
958 (Z_packet_to_point_type): Rename to ...
959 (Z_packet_to_target_hw_bp_type): ... this, and return a
960 target_hw_bp_type instead.
961 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
962 instead of an enum target_point_type.
963 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
964 breakpoint type.
965 (aarch64_dr_state_insert_one_point)
966 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
967 (aarch64_handle_aligned_watchpoint)
968 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
969 Take an enum target_hw_bp_type instead of an enum
970 target_point_type.
971 (aarch64_supports_z_point_type): New function.
972 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
973 use Z_packet_to_target_hw_bp_type.
974
786dc519
JB
9752014-05-20 Joel Brobecker <brobecker@adacore.com>
976
977 * configure.ac: Only use -Werror by default when DEVELOPMENT
978 is true.
979 * configure: Regenerate.
980
9e0aa64f
JK
9812014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
982
983 Fix gdbserver qGetTLSAddr for x86_64 -m32.
984 * linux-x86-low.c (X86_64_USER_REGS): New.
985 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
986
2b577b92
YQ
9872014-04-28 Yao Qi <yao@codesourcery.com>
988
989 * Makefile.in (i386-avx512.c): Fix the typo of generated file
990 name.
991
94611da2
PA
9922014-04-25 Pedro Alves <palves@redhat.com>
993
994 PR server/16255
995 * linux-low.c (linux_attach_fail_reason_string): New function.
996 (linux_attach_lwp): Delete.
997 (linux_attach_lwp_1): Rename to ...
998 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
999 argument. Remove "initial" parameter. Return int instead of
1000 void. Don't error or warn here.
1001 (linux_attach): Adjust to call linux_attach_lwp. Call error on
1002 failure to attach to the tgid. Call warning when failing to
1003 attach to an lwp.
1004 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
1005 argument. Remove "initial" parameter. Return int instead of
1006 void. Don't error or warn here.
1007 (linux_attach_fail_reason_string): New declaration.
1008 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
1009 interface change. Use linux_attach_fail_reason_string.
1010
01f9f808
MS
10112014-04-24 Michael Sturm <michael.sturm@mintel.com>
1012 Walfred Tedeschi <walfred.tedeschi@intel.com>
1013
1014 * Makefile.in: Added rules to handle new files
1015 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
1016 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
1017 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
1018 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
1019 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
1020 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
1021 x32-avx512-linux.o.
1022 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
1023 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
1024 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
1025 i386/x32-avx512.xml.
1026 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
1027 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
1028 i386/x32-avx512-linux.xml.
1029 * i387-fp.c (num_avx512_k_registers): New constant for number
1030 of K registers.
1031 (num_avx512_zmmh_low_registers): New constant for number of
1032 lower ZMM registers (0-15).
1033 (num_avx512_zmmh_high_registers): New constant for number of
1034 higher ZMM registers (16-31).
1035 (num_avx512_ymmh_registers): New contant for number of higher
1036 YMM registers (ymm16-31 added by avx521 on x86_64).
1037 (num_avx512_xmm_registers): New constant for number of higher
1038 XMM registers (xmm16-31 added by AVX512 on x86_64).
1039 (struct i387_xsave): Add space for AVX512 registers.
1040 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
1041 Add code to handle AVX512 registers.
1042 (i387_xsave_to_cache): Add code to handle AVX512 registers.
1043 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
1044 prototypei from generated file.
1045 (tdesc_amd64_avx512_linux): Likewise.
1046 (init_registers_x32_avx512_linux): Likewise.
1047 (tdesc_x32_avx512_linux): Likewise.
1048 (init_registers_i386_avx512_linux): Likewise.
1049 (tdesc_i386_avx512_linux): Likewise.
1050 (x86_64_regmap): Add AVX512 registers.
1051 (x86_linux_read_description): Add code to handle AVX512 XSTATE
1052 mask.
1053 (initialize_low_arch): Add code to initialize AVX512 registers.
1054
51aa91f9
PA
10552014-04-23 Pedro Alves <palves@redhat.com>
1056
1057 * mem-break.c (find_gdb_breakpoint_at): Make static.
1058 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
1059
a4165e94
PA
10602014-04-23 Pedro Alves <palves@redhat.com>
1061
1062 * i386-low.c: Don't include break-common.h here.
1063 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1064 prototype to take target_hw_bp_type as argument instead of a Z
1065 packet char.
1066 * i386-low.h: Include break-common.h here.
1067 (Z_packet_to_hw_type): Declare.
1068 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1069 prototypes.
1070 * linux-x86-low.c (x86_insert_point): Convert the packet number to
1071 a target_hw_bp_type before calling i386_low_insert_watchpoint.
1072 (x86_remove_point): Convert the packet number to a
1073 target_hw_bp_type before calling i386_low_remove_watchpoint.
1074 * win32-i386-low.c (i386_insert_point): Convert the packet number
1075 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
1076 (i386_remove_point): Convert the packet number to a
1077 target_hw_bp_type before calling i386_low_remove_watchpoint.
1078
b8acf843
PA
10792014-04-23 Pedro Alves <palves@redhat.com>
1080
1081 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
1082
d708bcd1
PA
10832014-04-10 Pedro Alves <palves@redhat.com>
1084
1085 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1086 Check if the condition or command is NULL before checking if the
1087 breakpoint is known. On success, return true.
1088 * mem-break.h (add_breakpoint_condition): Document return.
1089 (add_breakpoint_commands): Add describing comment.
1090 * server.c (skip_to_semicolon): New function.
1091 (process_point_options): Use it.
1092
2eec7d5b
PA
10932014-04-09 Pedro Alves <palves@redhat.com>
1094
1095 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
1096 to lwpid_of.
1097
fa96cb38
PA
10982014-02-27 Pedro Alves <palves@redhat.com>
1099
1100 PR 12702
1101 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
1102 macros.
1103 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
1104 output.
1105 (last_thread_of_process_p): Take a PID argument instead of a
1106 thread pointer.
1107 (linux_wait_for_lwp): Delete.
1108 (num_lwps, check_zombie_leaders, not_stopped_callback): New
1109 functions.
1110 (linux_low_filter_event): New function, party factored out from
1111 linux_wait_for_event.
1112 (linux_wait_for_event): Rename to ...
1113 (linux_wait_for_event_filtered): ... this. Add new filter ptid
1114 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
1115 sigsuspend. Check for zombie leaders.
1116 (linux_wait_for_event): Reimplement as wrapper around
1117 linux_wait_for_event_filtered.
1118 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
1119 a normal or signal exit is seen, it's the whole process exiting.
1120 (wait_for_sigstop): No longer a for_each_inferior callback.
1121 Rewrite on top of linux_wait_for_event_filtered.
1122 (stop_all_lwps): Call wait_for_sigstop directly.
1123 * server.c (resume, handle_target_event): Handle
1124 TARGET_WAITKIND_NO_RESUMED.
1125
d763de10
JB
11262014-02-26 Joel Brobecker <brobecker@adacore.com>
1127
1128 * win32-low.c (psapi_get_dll_name,
1129 * win32_CreateToolhelp32Snapshot): Delete.
1130 (win32_CreateToolhelp32Snapshot, win32_Module32First)
1131 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
1132 Delete.
1133 (handle_load_dll): Add function description.
1134 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
1135
850a0f76
JB
11362014-02-26 Joel Brobecker <brobecker@adacore.com>
1137
1138 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
1139 Add comment.
1140 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
1141 base address when calling win32_add_one_solib.
1142 (handle_load_dll): Delete local variable load_addr.
1143 Remove 0x1000 offset applied to DLL base address when calling
1144 win32_add_one_solib.
1145 (handle_unload_dll): Add comment.
1146
f25b3fc3
JB
11472014-02-26 Joel Brobecker <brobecker@adacore.com>
1148
1149 * win32-low.c (win32_add_all_dlls): Renames
1150 win32_ensure_ntdll_loaded. Rewrite function documentation.
1151 Adjust implementation to always load all DLLs.
1152 Add 0x1000 offset to DLL base address when calling
1153 win32_add_one_solib.
1154 (child_initialization_done): New static global.
1155 (do_initial_child_stuff): Set child_initialization_done to
1156 zero during child initialization, and 1 after. Replace call
1157 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
1158 Add comment.
1159 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
1160 (handle_unload_dll): Add function documentation.
1161 (get_child_debug_event): Ignore load and unload DLL events
1162 during child initialization.
1163
d86d4aaf
DE
11642014-02-20 Doug Evans <dje@google.com>
1165
3bc32da3 1166 Remove global all_lwps.
d86d4aaf
DE
1167 * inferiors.h (ptid_of): Move here from linux-low.h.
1168 (pid_of, lwpid_of): Ditto.
1169 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
1170 parameter is a struct thread_info * now.
1171 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
1172 directly. Pass &all_threads to find_inferior instead of &all_lwps.
1173 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
1174 directly.
1175 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
1176 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
1177 * linux-arm-low.c (update_registers_callback): Update, "entry"
1178 parameter is a struct thread_info * now.
1179 Fetch lwpid from current_inferior directly.
1180 (arm_insert_point): Pass &all_threads to find_inferior instead of
1181 &all_lwps.
1182 (arm_remove_point): Ditto.
1183 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
1184 (arm_prepare_to_resume): Fetch pid from thread.
1185 (arm_read_description): Fetch lwpid from current_inferior directly.
1186 * linux-low.c (all_lwps): Delete.
1187 (delete_lwp): Delete call to remove_inferior.
1188 (handle_extended_wait): Fetch lwpid from thread.
1189 (add_lwp): Don't set lwp->entry.id. Remove call to
1190 add_inferior_to_list.
1191 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
1192 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
1193 (kill_one_lwp_callback): Ditto.
1194 (linux_kill): Don't dereference NULL pointer.
1195 Fetch ptid,lwpid from thread.
1196 (get_detach_signal): Fetch ptid from thread.
1197 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
1198 Simplify call to regcache_invalidate_thread.
1199 (delete_lwp_callback): Update, "entry" parameter is a
1200 struct thread_info * now. Fetch pid from thread.
1201 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
1202 (status_pending_p_callback): Update, "entry" parameter is a
1203 struct thread_info * now. Fetch ptid from thread.
1204 (find_lwp_pid): Update, "entry" parameter is a
1205 struct thread_info * now.
1206 (linux_wait_for_lwp): Fetch pid from thread.
1207 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
1208 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
1209 (enqueue_one_deferred_signal): Fetch lwpid from thread.
1210 (dequeue_one_deferred_signal): Ditto.
1211 (cancel_breakpoint): Fetch ptid from current_inferior.
1212 (linux_wait_for_event): Pass &all_threads to find_inferior,
1213 not &all_lwps. Fetch ptid, lwpid from thread.
1214 (count_events_callback): Update, "entry" parameter is a
1215 struct thread_info * now.
1216 (select_singlestep_lwp_callback): Ditto.
1217 (select_event_lwp_callback): Ditto.
1218 (cancel_breakpoints_callback): Ditto.
1219 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
1220 not &all_lwps.
1221 (select_event_lwp): Ditto. Fetch ptid from event_thread.
1222 (unsuspend_one_lwp): Update, "entry" parameter is a
1223 struct thread_info * now.
1224 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
1225 not &all_lwps.
1226 (linux_stabilize_threads): Ditto. And for for_each_inferior.
1227 Fetch lwpid from thread, not lwp.
1228 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
1229 Pass &all_threads to find_inferior, not &all_lwps.
1230 (send_sigstop): Fetch lwpid from thread, not lwp.
1231 (send_sigstop_callback): Update, "entry" parameter is a
1232 struct thread_info * now.
1233 (suspend_and_send_sigstop_callback): Ditto.
1234 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
1235 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
1236 struct thread_info * now.
1237 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
1238 from thread, lwp.
1239 (lwp_running): Update, "entry" parameter is a
1240 struct thread_info * now.
1241 (stop_all_lwps): Fetch ptid from thread.
1242 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
1243 (linux_resume_one_lwp): Fetch lwpid from thread.
1244 (linux_set_resume_request): Update, "entry" parameter is a
1245 struct thread_info * now. Fetch pid, lwpid from thread.
1246 (resume_status_pending_p): Update, "entry" parameter is a
1247 struct thread_info * now.
1248 (need_step_over_p): Ditto. Fetch lwpid from thread.
1249 (start_step_over): Fetch lwpid from thread.
1250 (linux_resume_one_thread): Update, "entry" parameter is a
1251 struct thread_info * now. Fetch lwpid from thread.
1252 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
1253 (proceed_one_lwp): Update, "entry" parameter is a
1254 struct thread_info * now. Fetch lwpid from thread.
1255 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
1256 struct thread_info * now.
1257 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
1258 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
1259 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
1260 directly.
1261 (regsets_store_inferior_registers): Ditto.
1262 (fetch_register, store_register): Ditto.
1263 (linux_read_memory, linux_write_memory): Ditto.
1264 (linux_request_interrupt): Ditto.
1265 (linux_read_auxv): Ditto.
1266 (linux_xfer_siginfo): Ditto.
1267 (linux_qxfer_spu): Ditto.
1268 (linux_qxfer_libraries_svr4): Ditto.
1269 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
1270 moved to inferiors.h.
1271 (get_lwp): Delete.
1272 (get_thread_lwp): Update.
1273 (struct lwp_info): Delete member "entry". Simplify comment for
1274 member "thread".
1275 (all_lwps): Delete.
1276 * linux-mips-low.c (mips_read_description): Fetch lwpid from
1277 current_inferior directly.
1278 (update_watch_registers_callback): Update, "entry" parameter is a
1279 struct thread_info * now. Fetch pid from thread.
1280 (mips_linux_prepare_to_resume): Fetch ptid from thread.
1281 (mips_insert_point): Fetch lwpid from current_inferior.
1282 Pass &all_threads to find_inferior, not &all_lwps.
1283 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
1284 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
1285 directly.
1286 (mips_stopped_data_address): Ditto.
1287 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
1288 directly.
1289 * linux-tile-low.c (tile_arch_setup): Ditto.
1290 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
1291 (update_debug_registers_callback): Update, "entry" parameter is a
1292 struct thread_info * now. Fetch pid from thread.
1293 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
1294 Pass &all_threads to find_inferior, not &all_lwps.
1295 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
1296 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
1297 Pass &all_threads to find_inferior, not &all_lwps.
1298 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
1299 (i386_dr_low_get_status): Ditto.
1300 (x86_linux_prepare_to_resume): Fetch ptid from thread.
1301 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
1302 (x86_linux_read_description): Ditto.
1303 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
1304
3b8361aa
DE
13052014-02-20 Doug Evans <dje@google.com>
1306
1307 * inferiors.c (get_first_inferior): Fix buglet.
1308
f7667f0d
DE
13092014-02-19 Doug Evans <dje@google.com>
1310
1311 * gdbthread.h (add_thread): Change result type to struct thread_info *.
1312 * inferiors.c (add_thread): Change result type to struct thread_info *.
1313 All callers updated.
1314 (add_lwp): Call add_thread here instead of in callers.
1315 All callers updated.
1316 * linux-low.h (get_lwp_thread): Rewrite.
1317 (struct lwp_info): New member "thread".
1318
b3312d80
DE
13192014-02-19 Doug Evans <dje@google.com>
1320
1321 * linux-low.c (add_lwp): Change result to struct lwp_info *.
1322 All callers updated.
1323
ecc6f45c
DE
13242014-02-19 Doug Evans <dje@google.com>
1325
1326 * inferiors.c (add_thread): Fix whitespace.
1327
649ebbca
DE
13282014-02-19 Doug Evans <dje@google.com>
1329
1330 * dll.c (clear_dlls): Replace accessing list implemention details
1331 with API function.
1332 * gdbthread.h (get_first_thread): Declare.
1333 * inferiors.c (for_each_inferior_with_data): New function.
1334 (get_first_thread): New function.
1335 (find_thread_ptid): Simplify.
1336 (get_first_inferior): New function.
1337 (clear_list): Delete.
1338 (one_inferior_p): New function.
1339 (clear_inferior_list): New function.
1340 (clear_inferiors): Update.
1341 * inferiors.h (for_each_inferior_with_data): Declare.
1342 (clear_inferior_list): Declare.
1343 (one_inferior_p): Declare.
1344 (get_first_inferior): Declare.
1345 * linux-low.c (linux_wait_for_event): Replace accessing list
1346 implemention details with API function.
1347 * server.c (target_running): Ditto.
1348 (accumulate_file_name_length): New function.
1349 (emit_dll_description): New function.
1350 (handle_qxfer_libraries): Replace accessing list implemention
1351 details with API function.
1352 (handle_qxfer_threads_worker): New function.
1353 (handle_qxfer_threads_proper): Replace accessing list implemention
1354 details with API function.
1355 (handle_query): Ditto.
1356 (visit_actioned_threads_callback_ftype): New typedef.
1357 (visit_actioned_threads_data): New struct.
1358 (visit_actioned_threads): Rewrite to be find_inferior callback.
1359 (resume): Call find_inferior.
1360 (handle_status): Replace accessing list implemention
1361 details with API function.
1362 (process_serial_event): Replace accessing list implemention details
1363 with API function.
1364 * target.c (set_desired_inferior): Replace accessing list implemention
1365 details with API function.
1366 * tracepoint.c (same_process_p): New function.
1367 (gdb_agent_about_to_close): Replace accessing list implemention
1368 details with API function.
1369 * win32-low.c (child_delete_thread): Replace accessing list
1370 implemention details with API function.
1371 (match_dll_by_basename): New function.
1372 (dll_is_loaded_by_basename): New function.
1373 (win32_ensure_ntdll_loaded): Replace accessing list implemention
1374 details call to dll_is_loaded_by_basename.
1375
80894984
DE
13762014-02-19 Doug Evans <dje@google.com>
1377
1378 * dll.h (struct dll_info): Add comment.
1379 * gdbthread.h (struct thread_info): Add comment.
1380 (current_ptid): Simplify.
1381 * inferiors.c (add_process): Update.
1382 (remove_process): Update.
1383 * inferiors.h (struct process_info): Rename member "head" to "entry".
1384 * linux-low.c (delete_lwp): Update.
1385 (add_lwp): Update.
1386 (last_thread_of_process_p): Update.
1387 (kill_one_lwp_callback, linux_kill): Update.
1388 (status_pending_p_callback): Update.
1389 (wait_for_sigstop): Update. Simplify read of ptid.
1390 (start_step_over): Update.
1391 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
1392 (get_lwp_thread): Update.
1393 (struct lwp_info): Rename member "head" to "entry".
1394 * regcache.h (inferior_list_entry): Delete.
1395 * server.c (kill_inferior_callback): Update.
1396 (detach_or_kill_inferior_callback): Update.
1397 (print_started_pid): Update.
1398 (print_attached_pid): Update.
1399 (process_serial_event): Simplify read of ptid.
1400 * thread-db.c (thread_db_create_event): Update.
1401 (thread_db_get_tls_address): Update.
1402 * win32-low.c (current_inferior_ptid): Simplify.
1403
46917d26
TT
14042014-02-19 Tom Tromey <tromey@redhat.com>
1405
1406 * target.h (struct target_ops) <supports_btrace>: Add target_ops
1407 argument.
1408 (target_supports_btrace): Update.
1409
0759a81e
YQ
14102014-02-14 Yao Qi <yao@codesourcery.com>
1411
1412 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
1413 (rsp-low-ipa.o): New target.
1414
a7191e8b
TT
14152014-02-12 Tom Tromey <tromey@redhat.com>
1416
1417 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
1418 convert_ascii_to_int.
1419 * regcache.c (registers_to_string): Likewise.
1420 * remote-utils.c (decode_M_packet): Likewise.
1421 * server.c (process_serial_event): Likewise.
1422
ff0e980e
TT
14232014-02-12 Tom Tromey <tromey@redhat.com>
1424
1425 * server.c (handle_query, handle_v_run): Use hex2bin, not
1426 unhexify.
1427 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
1428
e9371aff
TT
14292014-02-12 Tom Tromey <tromey@redhat.com>
1430
1431 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
1432 convert_int_to_ascii.
1433 * regcache.c (registers_to_string, collect_register_as_string):
1434 Likewise.
1435 * remote-utils.c (look_up_one_symbol, relocate_instruction):
1436 Likewise.
1437 * server.c (process_serial_event): Likewise.
1438 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
1439 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
1440
971dc0b8
TT
14412014-02-12 Tom Tromey <tromey@redhat.com>
1442
1443 * remote-utils.c (look_up_one_symbol, monitor_output): Use
1444 bin2hex, not hexify.
1445 * tracepoint.c (cmd_qtstatus): Likewise.
1446
0a822afb
TT
14472014-02-12 Tom Tromey <tromey@redhat.com>
1448
1449 * remote-utils.c (monitor_output): Pass explicit length to
1450 hexify.
1451
9c3d6531
TT
14522014-02-12 Tom Tromey <tromey@redhat.com>
1453
1454 * tracepoint.c: Include rsp-low.h.
1455 * server.c: Include rsp-low.h.
1456 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
1457 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
1458 declare.
1459 * remote-utils.c: Include rsp-low.h.
1460 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
1461 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
1462 (convert_int_to_ascii, convert_ascii_to_int): Move to
1463 common/rsp-low.c.
1464 * regcache.c: Include rsp-low.h.
1465 * ax.c: Include rsp-low.h.
1466 * Makefile.in (SFILES): Add common/rsp-low.c.
1467 (OBS): Add rsp-low.o.
1468 (rsp-low.o): New target.
1469
01fd3ea5
TT
14702014-02-12 Tom Tromey <tromey@redhat.com>
1471
1472 * utils.h (pulongest, plongest, phex_nz): Don't declare.
1473 Include print-utils.h.
1474 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
1475 (plongest, thirty_two, phex_nz): Remove.
1476 * Makefile.in (SFILES): Add common/print-utils.c.
1477 (OBS): Add print-utils.o.
1478 (print-utils-ipa.o): New target.
1479 (print-utils.o): New target.
1480 (IPA_OBJS): Add print-utils-ipa.o.
1481
e99dc820
TT
14822014-02-06 Tom Tromey <tromey@redhat.com>
1483
1484 * Makefile.in (SFILES): Fix indentation.
1485
ee1e2d4f
DE
14862014-02-05 Doug Evans <dje@google.com>
1487
1488 * linux-low.c (linux_wait_for_event): Improve comment.
1489 (linux_wait_1): Keep current_inferior in sync with event_child.
1490
f5a02773
DE
14912014-01-22 Doug Evans <dje@google.com>
1492
1493 * gdbthread.h (gdb_id_to_thread): Delete, unused.
1494
87ce2a04
DE
14952014-01-22 Doug Evans <dje@google.com>
1496
1497 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
1498 * configure: Regenerate.
1499 * config.in: Regenerate.
1500 * Makefile.in (SFILES): Add debug.c.
1501 (OBS): Add debug.o.
1502 * debug.c: New file.
1503 * debug.h: New file.
1504 * linux-aarch64-low.c (*): Update all debugging printfs to use
1505 debug_printf instead of fprintf.
1506 * linux-arm-low.c (*): Ditto.
1507 * linux-cris-low.c (*): Ditto.
1508 * linux-crisv32-low.c (*): Ditto.
1509 * linux-m32r-low.c (*): Ditto.
1510 * linux-sparc-low.c (*): Ditto.
1511 * linux-x86.c (*): Ditto.
1512 * linux-low.c (*): Ditto.
1513 (linux_wait_1): Add calls to debug_enter, debug_exit.
1514 (linux_wait): Remove redundant debugging printf.
1515 (stop_all_lwps): Add calls to debug_enter, debug_exit.
1516 (linux_resume, unstop_all_lwps): Ditto.
1517 * mem-break.c (*): Update all debugging printfs to use
1518 debug_printf instead of fprintf.
1519 * remote-utils.c (*): Ditto.
1520 * thread-db.c (*): Ditto.
1521 * server.c #include <ctype.h>, "gdb_vecs.h".
1522 (debug_threads): Moved to debug.c.
1523 (*): Update all debugging printfs to use debug_printf instead of
1524 fprintf.
1525 (start_inferior): Replace call to fflush with call to debug_flush.
1526 (monitor_show_help): Mention set debug-format.
1527 (parse_debug_format_options): New function.
1528 (handle_monitor_command): Handle "monitor set debug-format".
1529 (gdbserver_usage): Mention --debug-format.
1530 (main): Parse --debug-format.
1531 * server.h (debug_threads): Declaration moved to debug.h.
1532 #include "debug.h".
1533 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
1534 trace_debug_1 that uses debug_printf.
1535 (tracepoint_look_up_symbols): Update all debugging printfs to use
1536 debug_printf instead of fprintf.
1537
e671835b
BS
15382014-01-20 Baruch Siach <baruch@tkos.co.il>
1539
1540 * linux-xtensa-low.c: Include asm/ptrace.h instead of
1541 sys/ptrace.h.
1542
b5737fa9
PA
15432014-01-17 Pedro Alves <palves@redhat.com>
1544
ea38d2a9 1545 PR build/16445
c7faa97a
PA
1546 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
1547 defined after including gdb_proc_service.h.
b5737fa9 1548
40ed484e
DE
15492014-01-16 Doug Evans <dje@google.com>
1550
1551 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
1552 (match_dll): Use it.
1553
969c39fb
MM
15542014-01-16 Markus Metzger <markus.t.metzger@intel.com>
1555
1556 * target.h (target_ops) <read_btrace>: Change parameters and
1557 return type to allow error reporting.
1558 * server.c (handle_qxfer_btrace): Support delta reads. Pass
1559 trace reading errors on.
1560 * linux-low.c (linux_low_read_btrace): Pass trace reading
1561 errors on.
1562 (linux_low_disable_btrace): New.
1563
ab7f45ba
DE
15642014-01-15 Doug Evans <dje@google.com>
1565
1566 * inferiors.c (thread_id_to_gdb_id): Delete.
1567 * inferiors.h (thread_id_to_gdb_id): Delete.
1568
66af0f44
EZ
15692014-01-13 Eli Zaretskii <eliz@gnu.org>
1570
1571 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
1572 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
1573 versions.
1574
9939e131
PA
15752014-01-08 Pedro Alves <palves@redhat.com>
1576
1577 * server.c (handle_status): Don't discard previous queued stop
1578 replies or thread's pending status here.
1579 (main) <disconnection>: Do it here instead.
1580
b7ea362b
PA
15812014-01-08 Pedro Alves <palves@redhat.com>
1582
1583 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
1584 * server.c (visit_actioned_threads, handle_pending_status): New
1585 function.
1586 (handle_v_cont): Factor out parts to ...
1587 (resume): ... this new function. If in all-stop, and a thread
1588 being resumed has a pending status, report it without actually
1589 resuming.
1590 (myresume): Adjust to use the new 'resume' function.
1591 (clear_pending_status_callback, set_pending_status_callback)
1592 (find_status_pending_thread_callback): New functions.
1593 (handle_status): Handle the case of multiple threads having
1594 interesting statuses to report. Report threads' real last signal
1595 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
1596 with an interesting thread to report the status for, instead of
1597 always reporting the status of the first thread.
1598
28498c42
JB
15992014-01-01 Joel Brobecker <brobecker@adacore.com>
1600
1601 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
1602 * gdbreplay.c (gdbreplay_version): Likewise.
1603
f45c82da
YZ
16042013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
1605
1606 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
1607 iov.iov_len with the real length in use.
1608
379a5e2d
JB
16092013-12-13 Joel Brobecker <brobecker@adacore.com>
1610
1611 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
1612 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
1613 for all targets that use win32-low.c.
1614 * win32-low.c (win32_ensure_ntdll_loaded): New function.
1615 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
1616
4210d83e
PA
16172013-12-13 Pedro Alves <palves@redhat.com>
1618
1619 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
1620 if equal to TARGET_WAITKIND_LOADED.
1621 * win32-low.c (cached_status): New static global.
1622 (win32_wait): Add declaration.
1623 (do_initial_child_stuff): Flush all initial pending debug events
1624 up to the initial breakpoint.
1625 (win32_wait): If CACHED_STATUS was set, return that instead
1626 of doing a real wait. Remove the code resuming the execution
1627 of the inferior after receiving a TARGET_WAITKIND_LOADED event
1628 during the initial phase. Also remove the code changing
1629 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
1630 TARGET_WAITKIND_STOPPED.
1631
e7f0d979
YQ
16322013-12-11 Yao Qi <yao@codesourcery.com>
1633
1634 * notif.c (handle_notif_ack): Return 0 if no notification
1635 matches.
1636
ebcf782c
DE
16372013-11-20 Doug Evans <dje@google.com>
1638
1639 * linux-low.c (linux_set_resume_request): Fix comment.
1640
20ad9378
DE
16412013-11-20 Doug Evans <dje@google.com>
1642
1643 * linux-low.c (resume_status_pending_p): Tweak comment.
1644
a196ebeb
WT
16452013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
1646
1647 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
1648 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
1649 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
1650 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
1651 (srv_amd64_regobj): Add amd64-mpx.o.
1652 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
1653 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
1654 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
1655 * i387-fp.c (num_pl_bnd_register) Added constant.
1656 (num_pl_bnd_cfg_registers) Added constant.
1657 (struct i387_xsave) Added reserved area and MPX fields.
1658 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
1659 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
1660 function.
1661 (tdesc_i386_mpx_linux): Add MPX amd64 target.
1662 (init_registers_amd64_mpx_linux): Declare new function.
1663 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
1664 (x86_64_regmap): Add MPX registers.
1665 (x86_linux_read_description): Add MPX case.
1666 (initialize_low_arch): Initialize MPX targets.
1667
0080a2f6
TT
16682013-11-18 Tom Tromey <tromey@redhat.com>
1669
1670 * configure: Rebuild.
1671 * configure.ac: Don't check for stdlib.h.
1672 * gdbreplay.c: Unconditionally include stdlib.h.
1673
2978b111
TT
16742013-11-18 Tom Tromey <tromey@redhat.com>
1675
1676 * config.in: Rebuild.
1677 * configure: Rebuild.
1678 * configure.ac: Don't use AC_HEADER_DIRENT.
1679
a3d08894
TT
16802013-11-18 Tom Tromey <tromey@redhat.com>
1681
1682 * server.h: Don't check HAVE_STRING_H.
1683 * gdbreplay.c: Don't check HAVE_STRING_H.
1684 * configure: Rebuild.
1685
0a5dd17d
TT
16862013-11-18 Tom Tromey <tromey@redhat.com>
1687
1688 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
1689 LIBGNU.
1690
1bd2f0ba
TT
16912013-11-08 Tom Tromey <tromey@redhat.com>
1692
1693 * configure, config.in: Rebuild.
1694 * configure.ac: Remove unused configury.
1695
3266f10b
TT
16962013-11-08 Tom Tromey <tromey@redhat.com>
1697
1698 * acinclude.m4: Include common.m4, codeset.m4.
1699 * configure, config.in: Rebuild.
1700 * configure.ac: Use GDB_AC_COMMON.
1701
6682d959
AA
17022013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
1703
1704 * linux-s390-low.c (HWCAP_S390_TE): New define.
1705 (s390_arch_setup): Consider the TE field in the HWCAP for
1706 determining 'have_regset_tdb'.
1707
fd0a4d76
SDJ
17082013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
1709
1710 PR gdb/16014
1711 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
1712 call to sizeof.
1713
1a3d890b
PA
17142013-10-02 Pedro Alves <palves@redhat.com>
1715
1716 * server.c (process_serial_event): Don't output "GDBserver
1717 exiting" if GDB is connected through stdio.
1718 * target.c (mywait): Likewise, be silent if GDB is connected
1719 through stdio.
1720
97ad4581
JB
17212013-10-01 Joel Brobecker <brobecker@adacore.com>
1722
1723 * lynx-low.c (lynx_add_threads_after_attach): New function.
1724 (lynx_attach): Remove call to add_thread. Add call to
1725 lynx_add_threads_after_attach instead.
1726
5b4e221c
MF
17272013-09-28 Mike Frysinger <vapier@gentoo.org>
1728
1729 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
1730 * config.in, configure: Regenerated.
1731
ee47b2f8
YQ
17322013-09-18 Yao Qi <yao@codesourcery.com>
1733
1734 PR server/15959
1735 * server.c (start_inferior): Clear 'resume_info'.
1736
d6707650 17372013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 1738
d6707650
JW
1739 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
1740 for each register.
1741
9243dd0e 17422013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 1743
9243dd0e
JW
1744 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
1745 linux-tile-low.o to srv_tgtobj.
1746
c623a6ef
WN
17472013-09-16 Will Newton <will.newton@linaro.org>
1748
1749 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
1750 out regs.
1751
fb71d39e
PA
17522013-09-06 Pedro Alves <palves@redhat.com>
1753
1754 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
1755 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
1756 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
1757 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
1758 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
1759 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
1760
8e7e9910
PA
17612013-09-06 Pedro Alves <palves@redhat.com>
1762
1763 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
1764 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
1765
7c3a12ca
PA
17662013-09-06 Pedro Alves <palves@redhat.com>
1767
1768 * linux-amd64-ipa.c: Include tracepoint.h.
1769 * linux-i386-ipa.c: Include tracepoint.h.
1770
8eb3d7b6
RW
17712013-09-06 Ricard Wanderlof <ricardw@axis.com>
1772
1773 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
1774 (ps_get_thread_area): New function.
1775
eddddb9d
RW
17762013-09-06 Ricard Wanderlof <ricardw@axis.com>
1777
1778 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
1779 (initialize_low_arch): Call init_registers_crisv32 rather than
1780 init_register_crisv32.
1781
533b0600
PA
17822013-09-05 Pedro Alves <palves@redhat.com>
1783
1784 * server.h (handle_vFile, hostio_last_error_from_errno): Move
1785 to ...
1786 * hostio.h: ... this new file.
1787 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
1788 win32-low.c: Include hostio.h.
1789
0ce3d3b5
PA
17902013-09-05 Pedro Alves <palves@redhat.com>
1791
1792 * server.h (gdb_client_data, handler_func, callback_handler_func)
1793 (delete_file_handler, add_file_handler, append_callback_event)
1794 (delete_callback_event, start_event_loop, initialize_event_loop):
1795 Move to event-loop.h and include it.
1796 * event-loop.h: New file.
1797
799cdc37
PA
17982013-09-05 Pedro Alves <palves@redhat.com>
1799
1800 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
1801 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
1802 (loaded_dll, unloaded_dll): Move to ...
1803 * dll.h: ... this new file.
1804 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
1805
6a6bbd9d
PA
18062013-09-05 Pedro Alves <palves@redhat.com>
1807
1808 * server.h (current_process, get_thread_process, all_processes)
1809 (add_inferior_to_list, for_each_inferior, current_inferior)
1810 (remove_inferior, add_process, remove_process, find_process_pid)
1811 (have_started_inferiors_p, have_attached_inferiors_p)
1812 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
1813 (clear_inferiors, find_inferior, find_inferior_id)
1814 (inferior_target_data, set_inferior_target_data)
1815 (inferior_regcache_data, set_inferior_regcache_data): Move to
1816 inferiors.h, and include it.
1817 * inferiors.h: New file.
1818
f699aaba
PA
18192013-09-05 Pedro Alves <palves@redhat.com>
1820
1821 * server.h (struct emit_ops, current_insn_ptr, emit_error):
1822 Move ...
1823 * ax.h: ... here.
1824
c144c7a0
PA
18252013-09-05 Pedro Alves <palves@redhat.com>
1826
1827 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
1828 tracepoint.h.
1829 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
1830 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
1831 (handle_tracepoint_general_set, handle_tracepoint_query)
1832 (tracepoint_finished_step, tracepoint_was_hit)
1833 (release_while_stepping_state_list, current_traceframe)
1834 (in_readonly_region, traceframe_read_mem)
1835 (fetch_traceframe_registers, traceframe_read_sdata)
1836 (traceframe_read_info, struct fast_tpoint_collect_status)
1837 (fast_tracepoint_collecting, force_unlock_trace_buffer)
1838 (handle_tracepoit_bkpts, initialize_low_tracepoint)
1839 (supply_fast_tracepoint_registers)
1840 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
1841 (ipa_tdesc, claim_trampoline_space)
1842 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
1843 (agent_mem_read, agent_get_trace_state_variable_value)
1844 (agent_set_trace_state_variable_value, agent_tsv_read)
1845 (agent_mem_read_string, get_raw_reg_func_addr)
1846 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
1847 * tracepoint.h: ... this new file.
1848
ff42e6ab
PA
18492013-09-05 Pedro Alves <palves@redhat.com>
1850
1851 * server.h (perror_with_name, error, fatal, warning, paddress)
1852 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
1853 include it.
1854 * utils.h: New file.
1855
541af0f4
PA
18562013-09-05 Pedro Alves <palves@redhat.com>
1857
1858 * server.h (remote_debug, noack_mode, transport_is_reliable)
1859 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
1860 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
1861 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
1862 (write_enn, initialize_async_io, enable_async_io)
1863 (disable_async_io, check_remote_input_interrupt_request)
1864 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
1865 (dead_thread_notify, prepare_resume_reply)
1866 (decode_address_to_semicolon, decode_address, decode_m_packet)
1867 (decode_M_packet, decode_X_packet, decode_xfer_write)
1868 (decode_search_memory_packet, unhexify, hexify)
1869 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
1870 (look_up_one_symbol, relocate_instruction)
1871 (monitor_output): Move to remote-utils.h, and include it.
1872 * remote-utils.h: New file.
1873
eebdf26b
PA
18742013-09-05 Pedro Alves <palves@redhat.com>
1875
1876 * server.h (_): Delete.
1877
3aafd2ff
PA
18782013-09-02 Pedro Alves <palves@redhat.com>
1879
1880 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
1881 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
1882 allocated.
1883 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
1884
cee83bcb
PM
18852013-09-02 Pierre Muller <muller@sourceware.org>
1886
1887 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
1888 or WriteProcessMemory complete successfully and handle
1889 ERROR_PARTIAL_COPY error.
1890
9a13b2fa
PA
18912013-09-02 Pedro Alves <palves@redhat.com>
1892
1893 * server.c (gdb_read_memory): Return -1 on traceframe memory read
1894 error instead of EIO.
1895
602e3198
JK
18962013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1897
1898 PR server/15604
1899 * linux-low.c: Include filestuff.h.
1900 (linux_create_inferior) <pid == 0>: Call close_most_fds.
1901 * lynx-low.c: Include filestuff.h.
1902 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
1903 * server.c: Include filestuff.h.
1904 (main): Call notice_open_fds.
1905 * spu-low.c: Include filestuff.h.
1906 (spu_create_inferior) <pid == 0>: Call close_most_fds.
1907
96d7229d
LM
19082013-08-22 Luis Machado <lgustavo@codesourcery.com>
1909
1910 * Makefile.in: Explain why ../target and ../nat are not
1911 listed as include file search paths.
1912 (linux-waitpid.o): New object file rule.
1913 * configure.srv (srv_native_linux_obj): New variable.
1914 Replace all occurrences of linux native object files with
1915 $srv_native_linux_obj.
1916 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
1917 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
1918 (linux_enable_event_reporting): Remove declaration.
1919 (my_waitpid): Moved to common/linux-waitpid.c.
1920 (linux_wait_for_event): Pass ptid when calling
1921 linux_enable_event_reporting.
1922 (linux_supports_tracefork_flag): Remove.
1923 (linux_enable_event_reporting): Likewise.
1924 (linux_tracefork_grandchild): Remove.
1925 (STACK_SIZE): Moved to common/linux-ptrace.c.
1926 (linux_tracefork_child): Remove.
1927 (linux_test_for_tracefork): Remove.
1928 (linux_look_up_symbols): Call linux_supports_traceclone.
1929 (initialize_low): Remove call to linux_test_for_tracefork.
1930 * linux-low.h (PTRACE_TYPE_ARG3): Move to
1931 common/linux-ptrace.h.
1932 (PTRACE_TYPE_ARG4): Likewise.
1933 Include linux-ptrace.h.
1934
32940073
PA
19352013-08-21 Pedro Alves <palves@redhat.com>
1936
1937 * config.in: Renegerate.
1938
33b60d58 19392013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 1940
33b60d58
LM
1941 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
1942 (SFILES): Remove $(srcdir)/common/target-common.c and
1943 add $(srcdir)/target/waitstatus.c.
1944 (OBS): Remove target-common.o and add waitstatus.o.
1945 (server_h): Remove $(srcdir)/../common/target-common.h and
1946 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
1947 and $(srcdir)/../target/waitstatus.h.
1948 (target-common.o): Remove.
1949 (waitstatus.o): New target object file.
1950 * target.h: Do not include target-common.h and
1951 include target/resume.h, target/wait.h and
1952 target/waitstatus.h.
1953
b8e1b30e
LM
19542013-08-13 Luis Machado <lgustavo@codesourcery.com>
1955
1956 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
1957 to PTRACE_TYPE_ARG3.
1958 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
1959 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
1960 PTRACE_TYPE_ARG4.
1961 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
1962 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
1963
7a60ad40
YQ
19642013-07-27 Jie Zhang <jie@codesourcery.com>
1965 Daniel Jacobowitz <dan@codesourcery.com>
1966 Yao Qi <yao@codesourcery.com>
1967
1968 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
1969 (mips-linux-watch.o): New rule.
1970 (mips_linux_watch_h): New variable.
1971 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
1972 srv_tgtobj.
1973 * linux-mips-low.c: Include mips-linux-watch.h.
1974 (struct arch_process_info, struct arch_lwp_info): New.
1975 (update_watch_registers_callback): New function.
1976 (mips_linux_new_process, mips_linux_new_thread) New functions.
1977 (mips_linux_prepare_to_resume, mips_insert_point): New
1978 functions.
1979 (mips_remove_point, mips_stopped_by_watchpoint): New
1980 functions.
1981 (rsp_bp_type_to_target_hw_bp_type): New function.
1982 (mips_stopped_data_address): New function.
1983 (the_low_target): Add watchpoint support functions.
1984
de6f69ad
YQ
19852013-07-27 Yao Qi <yao@codesourcery.com>
1986
1987 * i386-low.c: Include break-common.h.
1988 (enum target_hw_bp_type): Remove.
1989
3360c0bf
LM
19902013-07-24 Luis Machado <lgustavo@codesourcery.com>
1991
1992 * Makefile.in (SFILES): /common/target-common.c.
1993 (OBS): Add target-common.o.
1994 (server_h): Add $(srcdir)/../common/target-common.h.
1995 (target-common.o): New target.
1996 * server.c (queue_stop_reply_callback): Free
1997 status string after use.
1998 * target.c (target_waitstatus_to_string): Remove.
1999 * target.h: Include target-common.h.
2000 (resume_kind): Likewise.
2001 (target_waitkind): Likewise.
2002 (target_waitstatus): Likewise.
2003 (TARGET_WNOHANG): Likewise.
2004
bd885420
YQ
20052013-07-04 Yao Qi <yao@codesourcery.com>
2006
2007 * Makefile.in (host_alias): Use @host_noncanonical@.
2008 (target_alias): Use @target_noncanonical@.
2009 * configure.ac: Use ACX_NONCANONICAL_TARGET and
2010 ACX_NONCANONICAL_HOST.
2011 * configure: Regenerated.
2012
2013 Revert:
2014 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2015
2016 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2017 * configure: Rebuild.
2018 * Makefile.in (version_host, version_target): Get from configure.
2019 (version.c): Use $(version_host) and $(version_target).
2020
17ef446e
PA
20212013-07-03 Pedro Alves <palves@redhat.com>
2022
2023 * Makefile.in (config.status): Depend on development.sh.
2024 * acinclude.m4: Include libmcheck.m4.
2025 * configure: Regenerate.
2026
7a9a7487
MG
20272013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2028
2029 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
2030 attribute inside the parentheses.
2031 (winapi_DebugSetProcessKillOnExit): Ditto.
2032 (winapi_DebugBreakProcess): Ditto.
2033 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 2034
49b64de6
MG
20352013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2036
2037 * notif.h (notif_event): Add a dummy member to avoid compiler
2038 errors.
2039
d5749ee7
PA
20402013-07-01 Pedro Alves <palves@redhat.com>
2041
2042 * hostio.c (HOSTIO_PATH_MAX): Define.
2043 (require_filename, handle_open, handle_unlink, handle_readlink):
2044 Use it.
2045
d8d2a3ee
PA
20462013-07-01 Pedro Alves <palves@redhat.com>
2047
2048 * server.h: Include "pathmax.h".
2049 * linux-low.c: Don't include sys/param.h.
2050 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
2051 MAXPATHLEN.
2052 * win32-low.c: Don't include sys/param.h.
2053 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
2054
bc7dea8d
PA
20552013-07-01 Pedro Alves <palves@redhat.com>
2056
2057 * event-loop.c: Don't check HAVE_UNISTD_H before including
2058 <unistd.h>.
2059 * gdbreplay.c: Likewise.
2060 * remote-utils.c: Likewise.
2061 * server.c: Likewise.
2062 * configure.ac: Don't check for unistd.h.
2063 * configure: Regenerate.
2064
d6c2da54
TT
20652013-06-28 Tom Tromey <tromey@redhat.com>
2066
2067 * Makefile.in (version.c): Use version.in, not
2068 common/version.in.
2069
257b6bec
MG
20702013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2071
2072 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2073 * configure: Rebuild.
2074 * Makefile.in (version_host, version_target): Get from configure.
2075 (version.c): Use $(version_host) and $(version_target).
2076
86ebe149
DK
20772013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2078
2079 Fix trace-status to output user name without trailing colon.
2080 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
2081
f30aa5af
DK
20822013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2083
2084 Fix trace-status to output proper start-time and stop-time.
2085 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
2086 output start time and stop time in hex as gdb expects.
2087
28a93511
YQ
20882013-06-26 Pedro Alves <pedro@codesourcery.com>
2089
2090 * tracepoint.c (build_traceframe_info_xml): Output trace state
2091 variables present in the trace buffer.
2092
01208463
TT
20932013-06-24 Tom Tromey <tromey@redhat.com>
2094
2095 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
2096 create-version.sh.
2097 (version.o): Remove.
2098 * gdbreplay.c: Include version.h.
2099 (version, host_name): Don't declare.
2100 * server.h: Include version.h.
2101 (version, host_name): Don't declare.
2102
760256f9
PA
21032013-06-12 Pedro Alves <palves@redhat.com>
2104
2105 * linux-x86-low.c (linux_is_elf64): Delete global.
2106 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
2107 with local linux_pid_exe_is_elf_64_file use.
2108
030031ee
PA
21092013-06-11 Pedro Alves <palves@redhat.com>
2110
2111 * linux-low.c (regset_disabled, disable_regset): New functions.
2112 (regsets_fetch_inferior_registers)
2113 (regsets_store_inferior_registers): Use them.
2114 (initialize_regsets_info); Don't allocate the disabled_regsets
2115 array here.
2116 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
2117 comment.
2118
5da6eb0a
PA
21192013-06-11 Pedro Alves <palves@redhat.com>
2120
2121 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
2122 xmalloc.
2123
7e5aaa09
PA
21242013-06-11 Pedro Alves <palves@redhat.com>
2125
2126 * linux-x86-low.c (initialize_low_arch): Call
2127 init_registers_x32_avx_linux.
2128
d878444c
JK
21292013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
2130
2131 Fix compatibility with Android Bionic.
2132 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
2133 it is not empty.
2134
3aee8918
PA
21352013-06-07 Pedro Alves <palves@redhat.com>
2136
5f2b57b5 2137 PR server/14823
3aee8918
PA
2138 * Makefile.in (OBS): Add tdesc.o.
2139 (IPA_OBJS): Add tdesc-ipa.o.
2140 (tdesc-ipa.o): New rule.
2141 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
2142 interface.
2143 * linux-low.c (new_inferior): Delete.
2144 (disabled_regsets, num_regsets): Delete.
2145 (linux_add_process): Adjust to set the new per-process
2146 new_inferior flag.
2147 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
2148 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
2149 was a stop. When calling arch_setup, switch the current inferior
2150 to the thread that got an event.
2151 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
2152 (regsets_fetch_inferior_registers)
2153 (regsets_store_inferior_registers): New regsets_info parameter.
2154 Adjust to use it.
2155 (linux_register_in_regsets): New regs_info parameter. Adjust to
2156 use it.
2157 (register_addr, fetch_register, store_register): New usrregs_info
2158 parameter. Adjust to use it.
2159 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
2160 parameter regs_info. Adjust to use it.
2161 (linux_fetch_registers): Get the current inferior's regs_info, and
2162 adjust to use it.
2163 (linux_store_registers): Ditto.
2164 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
2165 (initialize_low): Don't initialize the target_regsets here. Call
2166 initialize_low_arch.
2167 * linux-low.h (target_regsets): Delete declaration.
2168 (struct regsets_info): New.
2169 (struct usrregs_info): New.
2170 (struct regs_info): New.
2171 (struct process_info_private) <new_inferior>: New field.
2172 (struct linux_target_ops): Delete the num_regs, regmap, and
2173 regset_bitmap fields. New field regs_info.
2174 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
2175 * i387-fp.c (num_xmm_registers): Delete.
2176 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
2177 calls to new interface.
2178 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
2179 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
2180 Infer the number of xmm registers from the regcache's target
2181 description.
2182 * i387-fp.h (num_xmm_registers): Delete.
2183 * inferiors.c (add_thread): Don't install the thread's regcache
2184 here.
2185 * proc-service.c (gregset_info): Fetch the current inferior's
2186 regs_info. Adjust to use it.
2187 * regcache.c: Include tdesc.h.
2188 (register_bytes, reg_defs, num_registers)
2189 (gdbserver_expedite_regs): Delete.
2190 (get_thread_regcache): If the thread doesn't have a regcache yet,
2191 create one, instead of aborting gdbserver.
2192 (regcache_invalidate_one): Rename to ...
2193 (regcache_invalidate_thread): ... this.
2194 (regcache_invalidate_one): New.
2195 (regcache_invalidate): Only invalidate registers of the current
2196 process.
2197 (init_register_cache): Add target_desc parameter, and use it.
2198 (new_register_cache): Ditto. Assert the target description has a
2199 non zero registers_size.
2200 (regcache_cpy): Add assertions. Adjust.
2201 (realloc_register_cache, set_register_cache): Delete.
2202 (registers_to_string, registers_from_string): Adjust.
2203 (find_register_by_name, find_regno, find_register_by_number)
2204 (register_cache_size): Add target_desc parameter, and use it.
2205 (free_register_cache_thread, free_register_cache_thread_one)
2206 (regcache_release, register_cache_size): New.
2207 (register_size): Add target_desc parameter, and use it.
2208 (register_data, supply_register, supply_register_zeroed)
2209 (supply_regblock, supply_register_by_name, collect_register)
2210 (collect_register_as_string, collect_register_by_name): Adjust.
2211 * regcache.h (struct target_desc): Forward declare.
2212 (struct regcache) <tdesc>: New field.
2213 (init_register_cache, new_register_cache): Add target_desc
2214 parameter.
2215 (regcache_invalidate_thread): Declare.
2216 (regcache_invalidate_one): Delete declaration.
2217 (regcache_release): Declare.
2218 (find_register_by_number, register_cache_size, register_size)
2219 (find_regno): Add target_desc parameter.
2220 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
2221 declarations.
2222 * remote-utils.c: Include tdesc.h.
2223 (outreg, prepare_resume_reply): Adjust.
2224 * server.c: Include tdesc.h.
2225 (gdbserver_xmltarget): Delete declaration.
2226 (get_features_xml, process_serial_event): Adjust.
2227 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
2228 declare.
2229 (struct process_info) <tdesc>: New field.
2230 (ipa_tdesc): Declare.
2231 * tdesc.c: New file.
2232 * tdesc.h: New file.
2233 * tracepoint.c: Include tdesc.h.
2234 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
2235 (get_context_regcache): Adjust to pass ipa_tdesc down.
2236 (do_action_at_tracepoint): Adjust to get the register cache size
2237 from the context regcache's description.
2238 (traceframe_walk_blocks): Adjust to get the register cache size
2239 from the current trace frame's description.
2240 (traceframe_get_pc): Adjust to get current trace frame's
2241 description and pass it down.
2242 (gdb_collect): Adjust to get the register cache size from the
2243 IPA's description.
2244 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
2245 (gdbserver_xmltarget): Delete.
2246 (initialize_low_tracepoint): Set the ipa's target description.
2247 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
2248 (initialize_low_tracepoint): Set the ipa's target description.
2249 * linux-x86-low.c: Include tdesc.h.
2250 [__x86_64__] (is_64bit_tdesc): New.
2251 (ps_get_thread_area, x86_get_thread_area): Use it.
2252 (i386_cannot_store_register): Rename to ...
2253 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
2254 (i386_cannot_fetch_register): Rename to ...
2255 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
2256 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
2257 to new interface.
2258 (target_regsets): Rename to ...
2259 (x86_regsets): ... this.
2260 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
2261 interface.
2262 (x86_siginfo_fixup): Use is_64bit_tdesc.
2263 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
2264 (tdesc_x32_avx_linux, tdesc_x32_linux)
2265 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
2266 Declare.
2267 (x86_linux_update_xmltarget): Delete.
2268 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
2269 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
2270 (AMD64_LINUX_USER64_CS): New.
2271 (x86_linux_read_description): New, based on
2272 x86_linux_update_xmltarget.
2273 (same_process_callback): New.
2274 (x86_arch_setup_process_callback): New.
2275 (x86_linux_update_xmltarget): New.
2276 (x86_regsets_info): New.
2277 (amd64_linux_regs_info): New.
2278 (i386_linux_usrregs_info): New.
2279 (i386_linux_regs_info): New.
2280 (x86_linux_regs_info): New.
2281 (x86_arch_setup): Reimplement.
2282 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
2283 (x86_emit_ops): Ditto.
2284 (the_low_target): Adjust. Install x86_linux_regs_info,
2285 x86_cannot_fetch_register, and x86_cannot_store_register.
2286 (initialize_low_arch): New.
2287 * linux-ia64-low.c (tdesc_ia64): Declare.
2288 (ia64_fetch_register): Adjust.
2289 (ia64_usrregs_info, regs_info): New globals.
2290 (ia64_regs_info): New function.
2291 (the_low_target): Adjust.
2292 (initialize_low_arch): New function.
2293 * linux-sparc-low.c (tdesc_sparc64): Declare.
2294 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
2295 Adjust.
2296 (sparc_arch_setup): New function.
2297 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
2298 (the_low_target): Adjust.
2299 (initialize_low_arch): New function.
2300 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
2301 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
2302 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
2303 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
2304 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
2305 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
2306 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
2307 (tdesc_powerpc_isa205_vsx64l): Declare.
2308 (ppc_cannot_store_register, ppc_collect_ptrace_register)
2309 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
2310 (ppc_set_pc, ppc_get_hwcap): Adjust.
2311 (ppc_usrregs_info): Forward declare.
2312 (!__powerpc64__) ppc_regmap_adjusted: New global.
2313 (ppc_arch_setup): Adjust to the current process'es target
2314 description.
2315 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
2316 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
2317 (ppc_store_evrregset): Adjust.
2318 (target_regsets): Rename to ...
2319 (ppc_regsets): ... this, and make static.
2320 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
2321 (ppc_regs_info): New function.
2322 (the_low_target): Adjust.
2323 (initialize_low_arch): New function.
2324 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
2325 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
2326 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
2327 (tdesc_s390x_linux64v2): Declare.
2328 (s390_collect_ptrace_register, s390_supply_ptrace_register)
2329 (s390_fill_gregset, s390_store_last_break): Adjust.
2330 (target_regsets): Rename to ...
2331 (s390_regsets): ... this, and make static.
2332 (s390_get_pc, s390_set_pc): Adjust.
2333 (s390_get_hwcap): New target_desc parameter, and use it.
2334 [__s390x__] (have_hwcap_s390_high_gprs): New global.
2335 (s390_arch_setup): Adjust to set the current process'es target
2336 description. Don't adjust the regmap.
2337 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
2338 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
2339 (regs_info_3264): New globals.
2340 (s390_regs_info): New function.
2341 (the_low_target): Adjust.
2342 (initialize_low_arch): New function.
2343 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
2344 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
2345 [__mips64] (init_registers_mips_linux)
2346 (init_registers_mips_dsp_linux): Delete defines.
2347 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
2348 (have_dsp): New global.
2349 (mips_read_description): New, based on mips_arch_setup.
2350 (mips_arch_setup): Reimplement.
2351 (get_usrregs_info): New function.
2352 (mips_cannot_fetch_register, mips_cannot_store_register)
2353 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
2354 (mips_fill_fpregset, mips_store_fpregset): Adjust.
2355 (target_regsets): Rename to ...
2356 (mips_regsets): ... this, and make static.
2357 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
2358 (dsp_regs_info, regs_info): New globals.
2359 (mips_regs_info): New function.
2360 (the_low_target): Adjust.
2361 (initialize_low_arch): New function.
2362 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
2363 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
2364 Declare.
2365 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
2366 (arm_read_description): New, with bits factored from
2367 arm_arch_setup.
2368 (arm_arch_setup): Reimplement.
2369 (target_regsets): Rename to ...
2370 (arm_regsets): ... this, and make static.
2371 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
2372 (arm_regs_info): New function.
2373 (the_low_target): Adjust.
2374 (initialize_low_arch): New function.
2375 * linux-m68k-low.c (tdesc_m68k): Declare.
2376 (target_regsets): Rename to ...
2377 (m68k_regsets): ... this, and make static.
2378 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
2379 (m68k_regs_info): New function.
2380 (m68k_arch_setup): New function.
2381 (the_low_target): Adjust.
2382 (initialize_low_arch): New function.
2383 * linux-sh-low.c (tdesc_sharch): Declare.
2384 (target_regsets): Rename to ...
2385 (sh_regsets): ... this, and make static.
2386 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
2387 (sh_regs_info, sh_arch_setup): New functions.
2388 (the_low_target): Adjust.
2389 (initialize_low_arch): New function.
2390 * linux-bfin-low.c (tdesc_bfin): Declare.
2391 (bfin_arch_setup): New function.
2392 (bfin_usrregs_info, regs_info): New globals.
2393 (bfin_regs_info): New function.
2394 (the_low_target): Adjust.
2395 (initialize_low_arch): New function.
2396 * linux-cris-low.c (tdesc_cris): Declare.
2397 (cris_arch_setup): New function.
2398 (cris_usrregs_info, regs_info): New globals.
2399 (cris_regs_info): New function.
2400 (the_low_target): Adjust.
2401 (initialize_low_arch): New function.
2402 * linux-cris-low.c (tdesc_crisv32): Declare.
2403 (cris_arch_setup): New function.
2404 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
2405 (cris_regs_info): New function.
2406 (the_low_target): Adjust.
2407 (initialize_low_arch): New function.
2408 * linux-m32r-low.c (tdesc_m32r): Declare.
2409 (m32r_arch_setup): New function.
2410 (m32r_usrregs_info, regs_info): New globals.
2411 (m32r_regs_info): Adjust.
2412 (initialize_low_arch): New function.
2413 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
2414 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
2415 (tic6x_usrregs_info): Forward declare.
2416 (tic6x_read_description): New function, based on ...
2417 (tic6x_arch_setup): ... this. Reimplement.
2418 (target_regsets): Rename to ...
2419 (tic6x_regsets): ... this, and make static.
2420 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
2421 (tic6x_regs_info): New function.
2422 (the_low_target): Adjust.
2423 (initialize_low_arch): New function.
2424 * linux-xtensa-low.c (tdesc_xtensa): Declare.
2425 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
2426 (target_regsets): Rename to ...
2427 (xtensa_regsets): ... this, and make static.
2428 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
2429 globals.
2430 (xtensa_arch_setup, xtensa_regs_info): New functions.
2431 (the_low_target): Adjust.
2432 (initialize_low_arch): New function.
2433 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
2434 (nios2_arch_setup): Set the current process'es tdesc.
2435 (target_regsets): Rename to ...
2436 (nios2_regsets): ... this.
2437 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
2438 (nios2_regs_info): New function.
2439 (the_low_target): Adjust.
2440 (initialize_low_arch): New function.
a261b8f5
PA
2441 * linux-aarch64-low.c (tdesc_aarch64): Declare.
2442 (aarch64_arch_setup): Set the current process'es tdesc.
2443 (target_regsets): Rename to ...
2444 (aarch64_regsets): ... this.
2445 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
2446 (aarch64_regs_info): New function.
2447 (the_low_target): Adjust.
2448 (initialize_low_arch): New function.
3aee8918
PA
2449 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
2450 globals.
2451 (target_regsets): Rename to ...
2452 (tile_regsets): ... this.
2453 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
2454 (tile_regs_info): New function.
2455 (tile_arch_setup): Set the current process'es tdesc.
2456 (the_low_target): Adjust.
2457 (initialize_low_arch): New function.
2458 * spu-low.c (tdesc_spu): Declare.
2459 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
2460 * win32-arm-low.c (tdesc_arm): Declare.
2461 (arm_arch_setup): New function.
2462 (the_low_target): Install arm_arch_setup instead of
2463 init_registers_arm.
2464 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
2465 (init_windows_x86): Rename to ...
2466 (i386_arch_setup): ... this. Set `win32_tdesc'.
2467 (the_low_target): Adjust.
2468 * win32-low.c (win32_tdesc): New global.
2469 (child_add_thread): Don't create the thread cache here.
2470 (do_initial_child_stuff): Set the new process'es tdesc.
2471 * win32-low.h (struct target_desc): Forward declare.
2472 (win32_tdesc): Declare.
2473 * lynx-i386-low.c (tdesc_i386): Declare global.
2474 (lynx_i386_arch_setup): Set `lynx_tdesc'.
2475 * lynx-low.c (lynx_tdesc): New global.
2476 (lynx_add_process): Set the new process'es tdesc.
2477 * lynx-low.h (struct target_desc): Forward declare.
2478 (lynx_tdesc): Declare global.
2479 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
2480 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
2481 * nto-low.c (nto_tdesc): New global.
2482 (do_attach): Set the new process'es tdesc.
2483 * nto-low.h (struct target_desc): Forward declare.
2484 (nto_tdesc): Declare.
2485 * nto-x86-low.c (tdesc_i386): Declare.
2486 (nto_x86_arch_setup): Set `nto_tdesc'.
2487
b1fbec62
GB
24882013-06-04 Gary Benson <gbenson@redhat.com>
2489
2490 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
2491 to qSupported response when appropriate.
2492 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
2493 with nonzero-length annex.
2494 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
2495 arguments supplied in annex.
2496
d1ec4ce7
DE
24972013-05-31 Doug Evans <dje@google.com>
2498
ac44adcb 2499 PR server/15594
d1ec4ce7
DE
2500 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
2501 64 bits in 64-cross-32 environment.
2502
9b25f2d3
PA
25032013-05-28 Pedro Alves <palves@redhat.com>
2504
2505 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
2506 (aarch64-without-fpu.c): Delete rule.
2507 * configure.srv (aarch64*-*-linux*): Remove references to
2508 aarch64-without-fpu.o and aarch64-without-fpu.xml.
2509 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
2510 declaration.
2511
6740dc9c
PA
25122013-05-24 Pedro Alves <palves@redhat.com>
2513
2514 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
2515 instead of strchr/decode_address. Error if the range isn't split
2516 with a ','. Don't assume there's be a ':' in the action.
2517
c2d6af84
PA
25182013-05-23 Yao Qi <yao@codesourcery.com>
2519 Pedro Alves <palves@redhat.com>
2520
2521 * linux-low.c (lwp_in_step_range): New function.
2522 (linux_wait_1): If the thread was range stepping and stopped
2523 outside the stepping range, report the stop to GDB. Otherwise,
2524 continue stepping. Add range stepping debug output.
2525 (linux_set_resume_request): Copy the step range from the resume
2526 request to the lwp.
2527 (linux_supports_range_stepping): New.
2528 (linux_target_ops) <supports_range_stepping>: Set to
2529 linux_supports_range_stepping.
2530 * linux-low.h (struct linux_target_ops)
2531 <supports_range_stepping>: New field.
2532 (struct lwp_info) <step_range_start, step_range_end>: New fields.
2533 * linux-x86-low.c (x86_supports_range_stepping): New.
2534 (the_low_target) <supports_range_stepping>: Set to
2535 x86_supports_range_stepping.
2536 * server.c (handle_v_cont): Handle 'r' action.
2537 (handle_v_requests): Append ";r" if the target supports range
2538 stepping.
2539 * target.h (struct thread_resume) <step_range_start,
2540 step_range_end>: New fields.
2541 (struct target_ops) <supports_range_stepping>:
2542 New field.
2543 (target_supports_range_stepping): New macro.
2544
58794e1a
JB
25452013-05-17 Joel Brobecker <brobecker@adacore.com>
2546
2547 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
2548 confusion in comment.
2549
d631c5a7
JB
25502013-05-17 Joel Brobecker <brobecker@adacore.com>
2551
2552 * lynx-low.c (struct process_info_private): New type.
2553 (lynx_add_process): New function.
2554 (lynx_create_inferior, lynx_attach): Replace calls to
2555 add_process by calls to lynx_add_process.
2556 (lynx_resume): If PTID is null, then try using
2557 current_process()->private->last_wait_event_ptid.
2558 Add comments.
2559 (lynx_clear_inferiors): Delete. The contents of that function
2560 has been inlined in lynx_mourn;
2561 (lynx_wait_1): Save the ptid in the process's private data.
2562 (lynx_mourn): Free the process' private data. Replace call
2563 to lynx_clear_inferiors by call to clear_inferiors.
2564
96f7a20f
YQ
25652013-05-17 Yao Qi <yao@codesourcery.com>
2566
2567 * i386-low.c (i386_length_and_rw_bits): Move the comment to
2568 the right place.
2569
db0dfaa0
LM
25702013-05-16 Luis Machado <lgustavo@codesourcery.com>
2571
2572 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
2573 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
2574 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
2575 PT_TEXT_END_ADDR guards. Update comments.
2576 (linux_target_op) <read_offsets>: Conditionally define to
2577 linux_read_offsets if the target is UCLIBC and if it defines
2578 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
2579
68f5f838
SL
25802013-05-06 Sandra Loosemore <sandra@codesourcery.com>
2581 Andrew Jenner <andrew@codesourcery.com>
2582
2583 * Makefile.in (SFILES): Add linux-nios2-low.c.
2584 (clean): Add action to delete nios2-linux.c.
2585 (nios2-linux.c): New rule.
2586 * configure.srv: Add nios2*-*-linux*.
2587 * linux-nios2-low.c: New.
2588
1ebff1fd
HAQ
25892013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
2590
2591 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
2592
f6150862
HZ
25932013-04-25 Hui Zhu <hui@codesourcery.com>
2594
2595 PR gdb/15186
f6150862
HZ
2596 * ax.c (ax_printf): Add fflush.
2597
614c279d
TT
25982013-04-22 Tom Tromey <tromey@redhat.com>
2599
2600 * Makefile.in (SFILES): Add filestuff.c.
2601 (OBS): Add filestuff.o.
2602 (filestuff.o): New target.
2603 * config.in, configure: Rebuild.
2604 * configure.ac: Check for fdwalk, pipe2.
2605
7d4e5717
PA
26062013-04-17 Pedro Alves <palves@redhat.com>
2607
2608 * configure.ac (USE_THREAD_DB): Delete variable.
2609 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
2610 Don't AC_SUBST USE_THREAD_DB.
2611 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
2612 * config.in, configure: Regenerate.
2613
d5c93e41
PA
26142013-04-16 Pedro Alves <palves@redhat.com>
2615
2616 * linux-low.h (struct lwp_info) <thread_known>: Move under
2617 the USE_THREAD_DB #ifdef.
2618
04f5fe89
PA
26192013-04-16 Pedro Alves <palves@redhat.com>
2620
2621 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
2622 (linux-low.o): Delete rule.
2623 * linux-low.h: Always include "gdb_thread_db.h" instead of
2624 conditionally including thread_db.h.
2625 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
2626 HAVE_THREAD_DB_H.
2627
480b27bf
JK
26282013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2629
2630 * Makefile.in (install-only): Fix make install regression.
2631
43662968
JK
26322013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
2633
2634 Convert man pages to texinfo, new gdbinit.5 texinfo page.
2635 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
2636 installation.
2637 * gdbserver.1: Remove.
2638
3e74e146
PA
26392013-03-22 Pedro Alves <palves@redhat.com>
2640
2641 * linux-low.c (handle_extended_wait): Don't call
2642 linux_enable_event_reporting.
2643
a8347a2a
TT
26442013-03-15 Tony Theodore <tonyt@logyst.com>
2645
2646 PR build/9098:
2647 * Makefile.in (SHELL): Use @SHELL@.
2648
eeb56fa7
SDJ
26492013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
2650
2651 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
2652 compiler warning.
2653
4fa7e2ff
JB
26542013-03-13 Joel Brobecker <brobecker@adacore.com>
2655
2656 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
2657 Remove extraneous NULL element.
2658
8ddb1965
YQ
26592013-03-13 Yao Qi <yao@codesourcery.com>
2660
2661 * tracepoint.c (traceframe_read_tsv): Look for the last matched
2662 'V' block in trace frame.
2663
9accd112
MM
26642013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2665
2666 * target.h (struct target_ops): Add btrace ops.
2667 (target_supports_btrace): New macro.
2668 (target_enable_btrace): New macro.
2669 (target_disable_btrace): New macro.
2670 (target_read_btrace): New macro.
2671 * gdbthread.h (struct thread_info): Add btrace field.
2672 * server.c: Include btrace-common.h.
2673 (handle_btrace_general_set): New function.
2674 (handle_btrace_enable): New function.
2675 (handle_btrace_disable): New function.
2676 (handle_general_set): Call handle_btrace_general_set.
2677 (handle_qxfer_btrace): New function.
2678 (struct qxfer qxfer_packets[]): Add btrace entry.
2679 * inferiors.c (remove_thread): Disable btrace.
2680 * linux-low: Include linux-btrace.h.
2681 (linux_low_enable_btrace): New function.
2682 (linux_low_read_btrace): New function.
2683 (linux_target_ops): Add btrace ops.
2684 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
2685 Add srv_linux_btrace=yes.
2686 (x86_64-*-linux*): Add linux-btrace.o.
2687 Add srv_linux_btrace=yes.
2688 * configure.ac: Define HAVE_LINUX_BTRACE.
2689 * config.in: Regenerated.
2690 * configure: Regenerated.
2691
5cc22e4c
MM
26922013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2693
2694 * server.c (handle_qxfer): Preserve error message if -3 is
2695 returned.
2696 (qxfer): Document the -3 return value.
2697
7c97f91e
MM
26982013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2699
2700 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
2701 (linux_btrace_h): New variable.
2702 (linux-btrace.o): New rule.
2703
be9a119c 27042013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
2705 Hafiz Abid Qadeer <abidh@codesourcery.com>
2706
2707 * tracepoint.c (trace_buffer_size): New global.
2708 (DEFAULT_TRACE_BUFFER_SIZE): New define.
2709 (init_trace_buffer): Change to one-argument function. Allocate
2710 trace buffer memory.
2711 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
2712 handle QTBuffer:size packet.
2713 (cmd_bigqtbuffer_size): New function.
2714 (initialize_tracepoint): Call init_trace_buffer with
2715 DEFAULT_TRACE_BUFFER_SIZE.
2716 * server.c (handle_query): Add QTBuffer:size in the
2717 supported packets.
2718
e64f7499
YQ
27192013-03-07 Yao Qi <yao@codesourcery.com>
2720
2721 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
2722 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
2723 of -1.
2724 (cmd_qtsp): Adjust condition. Do post increment.
2725 Set cur_action and cur_step_action back to 0.
2726
f0ae6fc3
PA
27272013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
2728
2729 PR server/15236
2730 * linux-low.c (linux_write_memory): Return early success if LEN is
2731 zero.
2732
b5b0b0af
CV
27332013-03-05 Corinna Vinschen <vinschen@redhat.de>
2734
334ad4a8 2735 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 2736
589bc927
TT
27372013-02-28 Tom Tromey <tromey@redhat.com>
2738
2739 * configure.ac: Invoke AC_SYS_LARGEFILE.
2740 * configure, config.in: Rebuild.
2741
dfe07582
CV
27422013-02-28 Corinna Vinschen <vinschen@redhat.com>
2743
2744 * win32-low.c: Throughout, fix format strings and casts of
2745 printf-like functions to avoid type related warnings on all
2746 platforms.
2747 (get_child_debug_event): Print dwDebugEventCode as hex since
2748 that's how it's usually documented.
2749
736cd585
YQ
27502013-02-28 Yao Qi <yao@codesourcery.com>
2751
2752 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
2753 pulongest.
2754
e1f58301
JW
27552013-02-27 Jiong Wang <jiwang@tilera.com>
2756
2757 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
2758 (reg-tilegx32.c): New rule.
2759 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
2760 * linux-tile-low.c (tile_arch_setup): New function. Invoke
2761 different register info initializer according to elf class.
2762 (init_registers_tilgx32): New function. The tilegx32 register info
2763 initializer.
2764 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
2765 (tile_store_gregset): Likewise.
2766
d171ca78
YQ
27672013-02-27 Yao Qi <yao@codesourcery.com>
2768
2769 * server.c (process_point_options): Print debug message when
2770 debug_threads is true.
2771
282bbdf3
YQ
27722013-02-26 Yao Qi <yao@codesourcery.com>
2773
2774 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
2775
aca22551
PA
27762013-02-19 Pedro Alves <palves@redhat.com>
2777 Kai Tietz <ktietz@redhat.com>
2778
2779 PR gdb/15161
2780
2781 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
2782 instead of strtoul to extract address from packet.
2783 (process_serial_event) <'z'>: Likewise.
2784
4f3cee1c
YQ
27852013-02-18 Yao Qi <yao@codesourcery.com>
2786
2787 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
2788
8e1d55a3
PA
27892013-02-14 Pedro Alves <palves@redhat.com>
2790
2791 Plug memory leak.
2792
2793 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
2794 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
2795
458820da
PA
27962013-02-14 Pedro Alves <palves@redhat.com>
2797
2798 * tracepoint.c (cmd_qtdpsrc): Use savestring.
2799
baea0dae
PA
28002013-02-14 Pedro Alves <palves@redhat.com>
2801
2802 * tracepoint.c (save_string): Delete.
2803 (add_tracepoint_action): Use savestring instead of save_string.
2804
0b1afbb3
PA
28052013-02-12 Pedro Alves <palves@redhat.com>
2806
2807 * linux-xtensa-low.c: Ditto.
2808 * xtensa-xtregs.c: Ditto.
2809
8a4ac37e
PA
28102013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
2811
2812 * thread-db.c (thread_db_get_tls_address): NULL pointer check
2813 thread_db.
2814
148de6bb
MS
28152013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
2816
2817 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
2818 aarch64_num_wp_regs and aarch64_num_bp_regs to
2819 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
2820
55fac6e0
MS
28212013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
2822
2823 * linux-aarch64-low.c (ps_get_thread_area): Replace
2824 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
2825
176eb98c
MS
28262013-02-04 Jim MacArthur <jim.macarthur@arm.com>
2827 Marcus Shawcroft <marcus.shawcroft@arm.com>
2828 Nigel Stephens <nigel.stephens@arm.com>
2829 Yufeng Zhang <yufeng.zhang@arm.com>
2830
2831 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
2832 (aarch64.c, aarch64-without-fpu.c): New targets.
2833 * configure.srv (aarch64*-*-linux*): New.
2834 * linux-aarch64-low.c: New file.
2835
56f7af9c
MS
28362013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
2837
43aaf8b6 2838 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
2839 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
2840 (dequeue_one_deferred_signal, linux_resume_one_thread)
2841 (fetch_register, linux_write_memory, linux_enable_event_reporting)
2842 (linux_tracefork_grandchild, linux_test_for_tracefork)
2843 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
2844 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
2845 where the argument is 0.
2846
60f662b0
YQ
28472013-01-25 Yao Qi <yao@codesourcery.com>
2848
2849 * event-loop.c: Include "queue.h".
2850 (gdb_event_p): New typedef.
2851 (struct gdb_event) <next_event>: Remove.
2852 (event_queue): Change to QUEUE(gdb_event_p).
2853 (async_queue_event): Remove.
2854 (gdb_event_xfree): New.
2855 (initialize_event_loop): New.
2856 (process_event): Use API from QUEUE.
2857 (wait_for_event): Likewise.
2858 * server.c (main): Call initialize_event_loop.
2859 * server.h (initialize_event_loop): Declare.
2860
5ae4861a
YQ
28612013-01-18 Yao Qi <yao@codesourcery.com>
2862
2863 * ax.h (struct eval_agent_expr_context): New.
2864 (gdb_eval_agent_expr): Update declaration.
2865 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
2866 TFRAME. Add new argument CTX.
2867 * server.h (struct eval_agent_expr_context): Declare.
2868 (agent_mem_read, agent_tsv_read): Update declaration.
2869 (agent_mem_read_string): Likewise.
2870 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
2871 (add_traceframe_block): Add new argument TPOINT.
2872 Increase TPOINT->traceframe_usage.
2873 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
2874 eval_tracepoint_agent_expr.
2875 (condition_true_at_tracepoint): Likewise.
2876 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
2877 (agent_mem_read_string, agent_tsv_read): Likewise.
2878
85e00e85
YQ
28792013-01-16 Yao Qi <yao@codesourcery.com>
2880
2881 * linux-low.c (linux_resume_one_lwp): Don't check
2882 'lwp->bp_reinsert != 0'.
2883
4039cf45
JB
28842013-01-07 Joel Brobecker <brobecker@adacore.com>
2885 Pedro Alves <palves@redhat.com>
2886
2887 * lynx-low.c (ptrace_request_to_str): Define a temporary
2888 macro and use it to simplify this function's implementation.
2889
9044dee2
JB
28902013-01-07 Joel Brobecker <brobecker@adacore.com>
2891
2892 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
2893 sets errno.
2894
e6352c8f
JB
28952013-01-07 Joel Brobecker <brobecker@adacore.com>
2896
2897 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
2898
50681a27
JB
28992013-01-07 Joel Brobecker <brobecker@adacore.com>
2900
2901 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
2902
3f6e77ef
JB
29032013-01-07 Joel Brobecker <brobecker@adacore.com>
2904
2905 * lynx-low.c (lynx_resume): Use the resume_info parameter
2906 to determine the ptid for the lynx_ptrace call, unless
2907 it is equal to minus_one_ptid, in which case we use the
2908 ptid of the current_inferior.
2909 (lynx_wait_1): After having received a thread create/exit
2910 event, resume the inferior's execution using the signaling
2911 thread's ptid, rather than the old ptid.
2912
7fda33ae
JB
29132013-01-07 Joel Brobecker <brobecker@adacore.com>
2914
2915 * lynx-low.c (lynx_resume): Delete variable ret.
2916
b9786c74
JB
29172013-01-01 Joel Brobecker <brobecker@adacore.com>
2918
2919 * gdbreplay.c (gdbreplay_version): Update copyright year.
2920 * server.c (gdbserver_version): Likewise.
2921
8b93d60f
JB
29222012-12-17 Joel Brobecker <brobecker@adacore.com>
2923
2924 * lynx-low.c (lynx_wait_1): Add debug trace before adding
2925 new thread.
2926
037335a7
JB
29272012-12-17 Joel Brobecker <brobecker@adacore.com>
2928
2929 * lynx-low.c (ptrace_request_to_str): Add handling for
2930 PTRACE_GETTRACESIG.
2931
52d4cbd8
JB
29322012-12-17 Joel Brobecker <brobecker@adacore.com>
2933
2934 * lynx-low.c (lynx_attach): Delete variable new_process.
2935
ab8f6ca9
JB
29362012-12-17 Joel Brobecker <brobecker@adacore.com>
2937
2938 * lynx-low.c (lynx_create_inferior): Delete variable
2939 new_process.
2940
78cbc024
JB
29412012-12-17 Joel Brobecker <brobecker@adacore.com>
2942
2943 * lynx-low.c (ptrace_request_to_str): Do not handle
2944 PTRACE_GETTHREADLIST if this macro does not exist.
2945
14a00470
YQ
29462012-12-15 Yao Qi <yao@codesourcery.com>
2947
2948 * Makefile.in (OBS): Add notif.o.
2949 * notif.c, notif.h: New.
2950 * server.c: Include "notif.h".
2951 (struct vstop_notif) <next>: Remove.
2952 <base>: New field.
2953 (queue_stop_reply): Update.
2954 (push_event, send_next_stop_reply): Remove.
2955 (discard_queued_stop_replies): Update.
2956 (notif_stop): New variable.
2957 (handle_v_stopped): Remove.
2958 (handle_v_requests): Don't call handle_v_stopped. Call
2959 handle_ack_notif instead.
2960 (queue_stop_reply_callback): Call notif_event_enque instead
2961 of queue_stop_reply.
2962 (handle_status): Don't call send_next_stop_reply, call
2963 notif_write_event instead.
2964 (kill_inferior_callback): Likewise.
2965 (detach_or_kill_inferior_callback): Likewise.
2966 (main): Call initialize_notif.
2967 (process_serial_event): Call QUEUE_is_empty.
2968 (handle_target_event): Call notif_push instead of push event.
2969 * server.h (push_event): Remove declaration.
2970
61c125b9
TT
29712012-12-10 Tom Tromey <tromey@redhat.com>
2972
2973 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
2974 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
2975 macros.
2976 (.c.o): Rewrite.
2977 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
2978 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
2979 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
2980 (amd64-linux-ipa.o, ax.o): Rewrite.
2981 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
2982 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
2983 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
2984 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
2985 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
2986 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
2987 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
2988 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
2989 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
2990 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
2991 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
2992 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
2993 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
2994 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
2995 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
2996 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
2997 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
2998 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
2999 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
3000 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
3001 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
3002 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
3003 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
3004 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
3005 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
3006 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
3007 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
3008 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
3009 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
3010 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
3011 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
3012 (reg-tilegx.o): Remove.
3013 (all_object_files): New macro.
3014 Include .deps files.
3015 * aclocal.m4, configure: Rebuild.
3016 * acinclude.m4: Include depstand.m4, lead-dot.m4.
3017 * configure.ac: Invoke ZW_CREATE_DEPDIR,
3018 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
3019
e90e9ad9
TT
30202012-12-05 Tom Tromey <tromey@redhat.com>
3021
3022 PR gdb/14917:
3023 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
3024
02d403bf 30252012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
3026
3027 * configure.ac: Check for linux/perf_event.h.
3028 * config.in: Regenerated.
3029 * configure: Regenerated.
3030
0270a750
PA
30312012-11-26 Maxime Villard <rustyBSD@gmx.fr>
3032
3033 * hostio.c (handle_readlink): Decrease buffer size
3034 parameter passed to readlink by one byte.
3035
8c29b58e
YQ
30362012-11-26 Yao Qi <yao@codesourcery.com>
3037
3038 * configure.ac (build_warnings): Append '-Wempty-body'.
3039 * configure: Regenerated.
3040 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
3041 body.
3042
8bdce1ff
PM
30432012-11-15 Pierre Muller <muller@sourceware.org>
3044
3045 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
3046 * config.in: Regenerate.
3047 * configure: Regenerate.
3048 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
3049 Use "gdb_wait.h" header instead of <sys/wait.h> header.
3050 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3051 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
3052 header.
3053 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
3054 instead of <sys/wait.h> header.
3055 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3056
02d403bf 30572012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
3058
3059 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
3060 (various make rules): Remove -DGDBSERVER
3061
fbd5db48
YQ
30622012-11-09 Yao Qi <yao@codesourcery.com>
3063
3064 * spu-low.c (current_ptid): Move it to ..
3065 * gdbthread.h: ... here. New.
3066 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
3067 * server.c (myresume, process_serial_event): Likewise.
3068 * thread-db.c (thread_db_find_new_threads): Likewise.
3069 * tracepoint.c (run_inferior_command): Likewise.
3070
b3dc46ff
AB
30712012-10-01 Andrew Burgess <aburgess@broadcom.com>
3072
3073 * server.c (handle_search_memory_1): Include access length in
3074 warning message.
3075
07c04788
HPN
30762012-09-05 Michael Brandt <michael.brandt@axis.com>
3077
3078 * linux-crisv32-low.c: Fix compile errors.
3079
918d227b
YQ
30802012-09-04 Yao Qi <yao@codesourcery.com>
3081
3082 * tracepoint.c (cmd_qtsv): Adjust debug message.
3083 Don't check CUR_TPOINT.
3084
18c1b81a
YQ
30852012-08-28 Yao Qi <yao@codesourcery.com>
3086
3087 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
3088 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
3089 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
3090 Remove declarations of xmalloc, xreallloc, xstrdup and
3091 freeargv.
3092 * Makefile.in (libiberty_h): New.
3093 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
3094 (linux-bfin-low.o): Append dependency 'libiberty.h'.
3095
dc82f37b
YQ
30962012-08-23 Yao Qi <yao@codesourcery.com>
3097
3098 * server.h: Remove declaration of 'xsnprintf'.
3099
406b1477
KS
31002012-08-22 Keith Seitz <keiths@redhat.com>
3101
3102 * server.h: Include build-gnulib-gbserver/config.h.
3103 * gdbreplay.c: Likewise.
3104
e6712ff1
DE
31052012-08-08 Doug Evans <dje@google.com>
3106
3107 * Makefile.in (SFILES): Add gdb_vecs.c.
3108 (OBS): Add gdb_vecs.o.
3109 (gdb_vecs_h, host_defs_h): New variables.
3110 (thread-db.o): Add $(gdb_vecs_h) dependency.
3111 (gdb_vecs.o): New rule.
3112 * thread-db.c: #include "gdb_vecs.h".
3113 (thread_db_load_search): Use a vector to iterate over path elements.
3114 Handle text appearing after "$pdir".
3115
3116 * configure.ac: Add check for strstr.
3117 * config.in: Regenerate.
3118 * configure: Regenerate.
3119
7c3270ae
UW
31202012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
3121
3122 * hostio.c (handle_pread): If pread fails, fall back to attempting
3123 lseek/read.
3124 (handle_pwrite): Likewise for pwrite.
3125
b62e2b27
UW
31262012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
3127
3128 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
3129 between unsupported TYPE and unimplementable ADDR/LEN combination.
3130 (arm_insert_point): Act on new return value.
3131
78a99e91
PA
31322012-07-31 Pedro Alves <palves@redhat.com>
3133
3134 * server.c (process_point_options): Only skip tokens if we find
3135 one that is unrecognized. Don't treat 'X' specially while
3136 skipping unrecognized tokens.
3137
fcf303ab
UW
31382012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
3139
3140 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
3141 to 4-byte-align HW breakpoint addresses for Thumb.
3142
7255706c
YQ
31432012-07-27 Yao Qi <yao@codesourcery.com>
3144
3145 PR remote/14161.
3146
3147 * server.h: Declare gdb_agent_about_to_close.
3148 * target.c (kill_inferior): Include "agent.h".
3149 New. Send command 'kill'.
3150 * target.h (kill_inferior): Removed macro.
3151 * tracepoint.c (gdb_agent_about_to_close): New.
3152 (gdb_agent_helper_thread): Handle command 'close'.
3153 Wait endlessly until the inferior stops.
3154 Install gdb_agent_remove_socket to atexit hook.
3155 (agent_socket_name): New static variable.
3156 (gdb_agent_socket_init): Replace local variable 'name' with
3157 'agent_socket_name'.
3158 (gdb_agent_remove_socket): New.
3159
5a3f286f
YQ
31602012-07-27 Yao Qi <yao@codesourcery.com>
3161
3162 * server.c (process_point_options): Stop at 'X' when parsing.
3163
961bd387
ME
31642012-07-19 Michael Eager <eager@eagercon.com>
3165
a261b8f5 3166 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
3167 to hw_execute.
3168 * linux-x86-low.c (x86_insert_point, x86_remove_point):
3169 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
3170 hardware breakpoint.
3171
aa7c7447
JK
31722012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3173
3174 * gdbserver/linux-low.c (initialize_low): Call
3175 linux_ptrace_init_warnings.
3176
7f216e7c
DE
31772012-07-02 Doug Evans <dje@google.com>
3178
3179 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
3180 pointer to int.
3181
d3ce09f5
SS
31822012-07-02 Stan Shebs <stan@codesourcery.com>
3183
3184 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
3185 (ax.o): Add it to build rule.
3186 (ax-ipa.o): Ditto.
3187 (OBS): Add format.o.
3188 (IPA_OBS): Add format.o.
3189 * server.c (handle_query): Claim support for breakpoint commands.
3190 (process_point_options): Add command case.
3191 (process_serial_event): Leave running if there are printfs in
3192 effect.
3193 * mem-break.h (any_persistent_commands): Declare.
3194 (add_breakpoint_commands): Declare.
3195 (gdb_no_commands_at_breakpoint): Declare.
3196 (run_breakpoint_commands): Declare.
3197 * mem-break.c (struct point_command_list): New struct.
3198 (struct breakpoint): New field command_list.
3199 (any_persistent_commands): New function.
3200 (add_commands_to_breakpoint): New function.
3201 (add_breakpoint_commands): New function.
3202 (gdb_no_commands_at_breakpoint): New function.
3203 (run_breakpoint_commands): New function.
3204 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
3205 locally.
3206 * ax.c: Include format.h.
3207 (ax_printf): New function.
3208 (gdb_eval_agent_expr): Add printf opcode.
3209
2f8f6aed
YQ
32102012-06-13 Yao Qi <yao@codesourcery.com>
3211
3212 * server.c (start_inferior): Remove duplicated writes to fields
3213 'last_resume_kind' and 'last_status' of 'current_inferior'.
3214
0c9070b3
YQ
32152012-06-12 Yao Qi <yao@codesourcery.com>
3216 Pedro Alves <palves@redhat.com>
3217
3218 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
3219 comment.
3220 * server.c (handle_v_cont): Extend comment.
3221
c52daf70
YQ
32222012-06-11 Yao Qi <yao@codesourcery.com>
3223
3224 * linux-low.c (linux_attach): Add 'static'.
3225
d38bbb0a
YQ
32262012-06-06 Yao Qi <yao@codesourcery.com>
3227
3228 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
3229
89dc0afd
JK
32302012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
3231
3232 Fix gcc -flto compilation warning.
3233 * server.c (main): Make variable multi_mode and attach volatile.
3234
75f62ce7
TJB
32352012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3236
3237 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
3238 if the platform doesn't know about it.
3239
65f479b6
PA
32402012-05-30 Jeff Kenton <jkenton@tilera.com>
3241
3242 * Makefile.in (SFILES): Add linux-tile-low.c.
3243 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
3244 * configure.srv: Handle tilegx-*-linux*.
3245 * linux-tile-low.c: New file.
3246
0c5bf5a9
JK
32472012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3248
3249 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
3250
a493e3e2
PA
32512012-05-24 Pedro Alves <palves@redhat.com>
3252
3253 PR gdb/7205
3254
43aaf8b6 3255 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 3256
2ea28649
PA
32572012-05-24 Pedro Alves <palves@redhat.com>
3258
3259 PR gdb/7205
3260
3261 Replace target_signal with gdb_signal throughout.
3262
8d409d16
MR
32632012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
3264
3265 * linux-low.c (linux_store_registers): Avoid the copying sequence
3266 when no data has been retrieved by ptrace.
3267
23512c01
MGD
32682012-05-22 Will Deacon <will.deacon@arm.com>
3269
3270 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
3271 Include asm/ptrace.h.
3272 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
3273 already defined.
3274
4934b29e
MR
32752012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
3276
3277 * linux-low.c (linux_store_registers): Don't re-retrieve data
3278 with ptrace that has already been obtained from /proc. Always
3279 copy any data retrieved with ptrace to the buffer supplied.
3280
bde24c0a
PA
32812012-05-11 Yao Qi <yao@codesourcery.com>
3282 Pedro Alves <palves@redhat.com>
3283
3284 * linux-low.c (enum stopping_threads_kind): New.
3285 (stopping_threads): Change type to `enum stopping_threads_kind'.
3286 (handle_extended_wait): If stopping and suspending threads, leave
3287 the new_lwp suspended too.
3288 (linux_wait_for_event): Adjust.
3289 (stop_all_lwps): Set `stopping_threads' to
3290 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
3291 whether we're suspending threads or just stopping them. Assert no
3292 recursion happens.
3293
623b6bdf
YQ
32942012-04-29 Yao Qi <yao@codesourcery.com>
3295
3296 * server.h: Move some code to ...
3297 * gdbthread.h: ... here. New.
3298 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
3299 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
3300 (nto-low.o, win32-low.o): Likewise.
3301 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
3302 * regcache.c, remote-utils.c, server.c: Likewise.
3303 * target.c, tracepoint.c, win32-low.c: Likewise.
3304
f15f9948
TJB
33052012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3306
3307 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
3308 (PTRACE_ARG4_TYPE): Likewise.
3309 (PTRACE_XFER_TYPE): Likewise.
3310 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
3311 ptrace to PTRACE_ARG3_TYPE.
3312 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
3313 (PTRACE_ARG4_TYPE): Likewise.
3314 (PTRACE_XFER_TYPE): Likewise.
3315 (linux_detach_one_lwp): Cast fourth argument of
3316 ptrace to long then PTRACE_ARG4_TYPE.
3317 (regsets_fetch_inferior_registers): Cast third argument of
3318 ptrace to long then PTRACE_ARG3_TYPE.
3319 (regsets_store_inferior_registers): Likewise.
3320
38ea300a
PA
33212012-04-20 Pedro Alves <palves@redhat.com>
3322
3323 * configure: Regenerate.
3324
c971b7fa
PA
33252012-04-19 Pedro Alves <palves@redhat.com>
3326
43aaf8b6 3327 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 3328 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
3329 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
3330 (all, install-only, uninstall, clean-info, all-lib, clean): No
3331 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
3332 (maintainer-clean realclean distclean): Use subdir_do.
3333 (subdir_do): New.
3334 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 3335 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
3336 * acinclude.m4: Include acx_configure_dir.m4.
3337 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
3338 calls. Call AC_PROG_RANLIB. Configure gnulib using
3339 ACX_CONFIGURE_DIR.
3340 (GNULIB): New.
3341 (GNULIB_STDINT_H): Adjust.
3342 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
3343 * gdbreplay.c: Include build-gnulib/config.h.
3344 * server.h: Likewise.
3345 * aclocal.m4: Regenerate.
3346 * config.in: Regenerate.
3347 * configure: Regenerate.
c971b7fa 3348
809277f8
PA
33492012-04-19 Pedro Alves <palves@redhat.com>
3350
3351 * Makefile.in (LIBGNU, INCGNU): Adjust.
3352 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
3353 (all, install-only, uninstall, clean-info, all-lib, clean)
3354 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
3355 * configure.ac: Adjust AC_OUTPUT output.
3356 * aclocal.m4: Regenerate.
3357 * configure: Regenerate.
3358
fd9bb8b8
PA
33592012-04-19 Pedro Alves <palves@redhat.com>
3360
3361 * Makefile.in (generated_files): New.
3362 (server_h): Remove the explicit dependency on config.h, and depend
3363 on $generated_files.
3364
1c298c66
PA
33652012-04-19 Pedro Alves <palves@redhat.com>
3366
3367 * Makefile.in (INCGNU): Add -Ignulib.
3368
57c4b50b
PA
33692012-04-19 Pedro Alves <palves@redhat.com>
3370
3371 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
3372 (INCGNU): ... this, and spell out -I here.
3373 (GNULIB_LIB): Rename to ...
3374 (LIBGNU): ... this.
3375 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
3376
1030e047
PA
33772012-04-19 Pedro Alves <palves@redhat.com>
3378
3379 * config.in: Regenerate.
3380
447d4319
PA
33812012-04-19 Pedro Alves <palves@redhat.com>
3382
3383 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
3384 * server.h (memmem): Remove declaration.
3385 * config.in: Regenerate.
3386 * configure: Regenerate.
3387
aad9eab9
YQ
33882012-04-19 Yao Qi <yao@codesourcery.com>
3389
3390 * Makefile.in (SFILES): Add common/vec.c.
3391 (OBS): Add vec.o.
3392 (vec.o): New rule.
3393
3e10640f
YQ
33942012-04-19 Yao Qi <yao@codesourcery.com>
3395
3396 * remote-utils.c (prepare_resume_reply): Replace with macro
3397 target_core_of_thread.
3398 * server.c (handle_qxfer_threads_proper): Likewise.
3399 * target.h (traget_core_of_thread): New macro.
3400
71622373
PA
34012012-04-18 Pedro Alves <palves@redhat.com>
3402
3403 * aclocal.m4: Regenerate.
3404 * configure: Regenerate.
3405
80d26939
YQ
34062012-04-16 Yao Qi <yao@codesourcery.com>
3407
3408 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
3409 duplicated on address.
3410
42476b70
YQ
34112012-04-16 Yao Qi <yao@codesourcery.com>
3412
3413 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
3414 (struct tracepoint_action_ops) <send>: New field.
3415 (m_tracepoint_action_send, r_tracepoint_action_send): New.
3416 (agent_expr_send, x_tracepoint_action_send): New.
3417 (l_tracepoint_action_send): New.
3418 (cmd_qtdp): Download and install tracepoint
3419 according to `use_agent'.
3420 (run_inferior_command): Add one more parameter `len'.
3421 Update callers.
3422 (tracepoint_send_agent): New.
3423 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
3424
7bc83639
YQ
34252012-04-16 Yao Qi <yao@codesourcery.com>
3426
3427 * tracepoint.c (download_tracepoints): Moved to ...
3428 (cmd_qtstart): ... here.
3429
5f18041e
YQ
34302012-04-14 Yao Qi <yao@codesourcery.com>
3431
3432 * tracepoint.c: Include inttypes.h.
3433 (struct collect_memory_action): Use sized types.
3434 (struct tracepoint): Likewise.
3435 (cmd_qtdp, stop_tracing): Update print specifiers.
3436 (cmd_qtp, response_tracepoint): Likewise.
3437 (collect_data_at_tracepoint): Likewise.
3438 (collect_data_at_step): Likewise.
3439
55a8c076
YQ
34402012-04-14 Yao Qi <yao@codesourcery.com>
3441
3442 Import gnulib module inttypes.
3443 * aclocal.m4, config.in, configure: Regenerated.
3444
dc750257
YQ
34452012-04-14 Yao Qi <yao@codesourcery.com>
3446
3447 * Makefile.in (maintainer-clean, realclean, distclean): Remove
3448 Makefile and config.status at last.
3449
0ab5faf9
YQ
34502012-04-13 Yao Qi <yao@codesourcery.com>
3451
3452 * tracepoint.c: Include stdint.h unconditionally.
3453
18f5fd81
TJB
34542012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3455
3456 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
3457 on BFD_HAVE_SYS_PROCFS_TYPE.
3458 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
3459 * configure: Regenerate.
3460 * config.in: Likewise.
3461
4d47af5c
L
34622012-04-13 H.J. Lu <hongjiu.lu@intel.com>
3463
3464 * Makefile.in (clean): Also remove x32.c x32-linux.c
3465 x32-avx.c x32-avx-linux.c.
3466 (x32.o): New target.
3467 (x32.c): Likewise.
3468 (x32-linux.o): Likewise.
3469 (x32-linux.c): Likewise.
3470 (x32-avx.o): Likewise.
3471 (x32-avx.c): Likewise.
3472 (x32-avx-linux.o): Likewise.
3473 (x32-avx-linux.c): Likewise.
3474
3475 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
3476 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
3477 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
3478 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
3479 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
3480 i386/x32-avx-linux.xml.
3481
3482 * linux-x86-low.c (init_registers_x32_linux): New prototype.
3483 (init_registers_x32_avx_linux): Likwise.
3484 (x86_linux_update_xmltarget): Call init_registers_x32_linux
3485 or init_registers_x32_avx_linux if linux_is_elf64 is false.
3486
ecedbe58
PA
34872012-04-13 Pedro Alves <palves@redhat.com>
3488
3489 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
3490 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
3491 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
3492 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
3493 the sub-make.
3494
c92b5177
L
34952012-04-12 H.J. Lu <hongjiu.lu@intel.com>
3496
3497 * linux-x86-low.c (compat_x32_clock_t): New.
3498 (compat_x32_siginfo_t): Likewise.
3499 (compat_x32_siginfo_from_siginfo): Likewise.
3500 (siginfo_from_compat_x32_siginfo): Likewise.
3501 (linux_is_elf64): Likewise.
3502 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
3503 and siginfo_from_compat_x32_siginfo for x32.
3504 (x86_arch_setup): Set linux_is_elf64.
3505
214d508e
L
35062012-04-12 H.J. Lu <hongjiu.lu@intel.com>
3507
3508 PR gdb/13969
3509 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
3510 e_machine field.
3511 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
3512 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
3513 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
3514 compatible with process.
3515
c9a1864a
YQ
35162012-04-12 Yao Qi <yao@codesourcery.com>
3517
3518 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
3519 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
3520 (install-only, install-info, clean): Handle sub dir gnulib.
3521 (all-lib, am--refresh): New targets.
3522 (memmem.o): Remove target.
3523 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
3524 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
3525 (AC_REPLACE_FUNCS): Remove memmem.
3526 Invoke gl_INIT and AM_INIT_AUTOMAKE.
3527 (AC_OUTPUT): Generate Makefile in gnulib/.
3528 * aclocal.m4, config.in, configure: Regenerated.
3529
367ba2c2
MR
35302012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
3531
3532 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
3533
9d236627
PA
35342012-04-05 Pedro Alves <palves@redhat.com>
3535
3536 -Werror=strict-aliasing
3537
3538 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
3539 pointer.
3540
111217b3
PA
35412012-04-04 Pedro Alves <palves@redhat.com>
3542
3543 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
3544 (sparc_store_gregset_from_stack, sparc_store_gregset)
3545 (sparc_breakpoint_at): Fix formatting.
3546
8365dcf5
TJB
35472012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3548
3549 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
3550 are available.
3551 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
3552 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
3553 * config.in: Regenerate.
3554 * configure: Likewise.
3555
689cc2ae
PA
35562012-03-29 Pedro Alves <palves@redhat.com>
3557
3558 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
3559 Correct ptrace arguments.
3560
c14dfd32
PA
35612012-03-28 Pedro Alves <palves@redhat.com>
3562
3563 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
3564 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
3565 (IA64_FR1_REGNUM): New defines.
3566 (ia64_fetch_register): New.
3567 (the_low_target): Install it.
3568 * linux-low.h (struct linux_target_ops) <fetch_register>: New
3569 field.
3570 * linux-low.c (linux_fetch_registers): Try the
3571 the_low_target.fetch_register hook first.
3572
3573 * linux-arm-low.c (the_low_target): Adjust.
3574 * linux-bfin-low.c (the_low_target): Adjust.
3575 * linux-cris-low.c (the_low_target): Adjust.
3576 * linux-crisv32-low.c (the_low_target): Adjust.
3577 * linux-m32r-low.c (the_low_target): Adjust.
3578 * linux-m68k-low.c (the_low_target): Adjust.
3579 * linux-mips-low.c (the_low_target): Adjust.
3580 * linux-ppc-low.c (the_low_target): Adjust.
3581 * linux-s390-low.c (the_low_target): Adjust.
3582 * linux-sh-low.c (the_low_target): Adjust.
3583 * linux-sparc-low.c (the_low_target): Adjust.
3584 * linux-tic6x-low.c (the_low_target): Adjust.
3585 * linux-x86-low.c (the_low_target): Adjust.
3586 * linux-xtensa-low.c (the_low_target): Adjust.
3587
63c88e13
PA
35882012-03-26 Pedro Alves <palves@redhat.com>
3589
3590 * server.c (handle_qxfer_libraries): Don't bail early if
3591 the_target->qxfer_libraries_svr4 is not NULL.
3592
fb723180
PA
35932012-03-26 Pedro Alves <palves@redhat.com>
3594
3595 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
3596
0afae3cf
PA
35972012-03-23 Pedro Alves <palves@redhat.com>
3598
3599 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
3600 "library-list-svr4" element's start tag when the the DSO list is
3601 empty.
3602
485f1ee4
PA
36032012-03-23 Pedro Alves <palves@redhat.com>
3604
3605 * linux-low.c (read_one_ptr): Read the inferior's pointer through
3606 a variable whose type size is the same as the inferior's pointer
3607 size.
3608
a5362b9a
TS
36092012-03-21 Thomas Schwinge <thomas@codesourcery.com>
3610
3611 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
3612 struct siginfo.
3613 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
3614 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3615 * linux-low.h: Include <signal.h>.
3616 (struct siginfo): Remove forward declaration.
3617 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
3618 struct siginfo.
3619
d226c142
MF
36202012-03-21 Mike Frysinger <vapier@gentoo.org>
3621
3622 * .gitignore: Ignore more files.
3623
122f36ef
PA
36242012-03-19 Pedro Alves <palves@redhat.com>
3625 Jan Kratochvil <jan.kratochvil@redhat.com>
3626
3627 * server.c (cont_thread, general_thread): Add describing comments.
3628 (start_inferior): Clear `cont_thread'.
3629 (handle_v_cont): Don't set `cont_thread' if resuming all threads
3630 of a process.
3631
fc3e5175
YQ
36322012-03-15 Yao Qi <yao@codesourcery.com>
3633
3634 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
3635 handling to ...
3636 (cmd_qtdp): ... here.
3637
8d0d92cd
YQ
36382012-03-15 Yao Qi <yao@codesourcery.com>
3639
3640 * tracepoint.c (struct tracepoint_action_ops): New.
3641 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
3642 (m_tracepoint_action_download): New.
3643 (r_tracepoint_action_download): New.
3644 (x_tracepoint_action_download): New.
3645 (l_tracepoint_action_download): New.
3646 (add_tracepoint_action): Install `action->ops' according type.
3647 (download_tracepoint_1): Move code `download' function pointer
3648 of various tracepoint_action_ops.
3649
87b0bb13
JK
36502012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
3651
3652 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
3653 linux_ptrace_attach_warnings.
3654
5f572dec
JK
36552012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
3656
3657 * Makefile.in (linux-ptrace.o): New.
3658 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
3659 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
3660 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
3661 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
3662 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
3663 of these targets.
3664 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
3665
f4647387
YQ
36662012-03-08 Yao Qi <yao@codesourcery.com>
3667 Pedro Alves <palves@redhat.com>
3668
3669 Fix PR server/13392.
3670 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
3671 offset of JMP insn.
3672 * tracepoint.c (remove_tracepoint): New.
3673 (cmd_qtdp): Call remove_tracepoint when failed to install.
3674
9b224c5e
PA
36752012-03-07 Pedro Alves <palves@redhat.com>
3676
3677 * linux-low.c (get_detach_signal): New.
3678 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
3679 Pass on pending signals to PTRACE_DETACH. Check the result of the
3680 ptrace call.
3681 * server.c (program_signals, program_signals_p): New.
3682 (handle_general_set): Handle QProgramSignals.
3683 * server.h (program_signals, program_signals_p): Declare.
3684
e237a7e2
JK
36852012-03-05 Pedro Alves <palves@redhat.com>
3686 Jan Kratochvil <jan.kratochvil@redhat.com>
3687
3688 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
3689 New comment why.
3690
5808517f
YQ
36912012-03-03 Yao Qi <yao@codesourcery.com>
3692
3693 * tracepoint.c (tracepoint_look_up_symbols): Update call to
3694 agent_look_up_symbols.
3695
58b4daa5
YQ
36962012-03-03 Yao Qi <yao@codesourcery.com>
3697
3698 * Makefile.in (linux-low.o): Keep dependence on agent.h.
3699 (linux-x86-low.o): Likewise.
3700 * server.h: Remove in_process_agent_loaded.
3701 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
3702 common/agent.c.
3703 Update callers.
3704
8ffcbaaf
YQ
37052012-03-03 Yao Qi <yao@codesourcery.com>
3706
3707 * tracepoint.c (gdb_agent_capability): New global.
3708 (in_process_agent_loaded_ust): Renamed to
3709 `in_process_agent_supports_ust'.
3710 Update callers.
3711 (in_process_agent_supports_ust): Call agent_capability_check.
3712 (clear_installed_tracepoints): Assert that agent supports
3713 agent.
3714
d1feda86
YQ
37152012-03-03 Yao Qi <yao@codesourcery.com>
3716
3717 * linux-low.c (linux_supports_agent): New.
3718 (linux_target_ops): Initialize field `supports_agent' with
3719 linux_supports_agent.
3720 * target.h (struct target_ops) <supports_agent>: New.
3721 (target_supports_agent): New macro.
3722 * server.c (handle_general_set): Handle packet 'QAgent'.
3723 (handle_query): Send `QAgent+'.
3724 * Makefile.in (server.o): Depends on agent.h.
3725
2fa291ac
YQ
37262012-03-03 Yao Qi <yao@codesourcery.com>
3727
3728 * Makefile.in (OBS): Add agent.o.
3729 Add new rule for agent.o.
3730 Track dependence of tracepoint.c on agent.h.
3731 * tracepoint.c (run_inferior_command_1):
3732 (run_inferior_command): Call agent_run_command.
3733 (gdb_ust_connect_sync_socket): Deleted. Move it to
3734 common/agent.c.
3735 (resume_thread, stop_thread): Likewise.
3736 (gdb_ust_socket_init): Renamed to ...
3737 (gdb_agent_socket_init): ... New.
3738 (gdb_ust_thread): Renamed to ...
3739 (gdb_agent_helper_thread): ... New.
3740 (gdb_ust_init): Move some code to ...
3741 (gdb_agent_init): ... here. New.
3742 [HAVE_UST]: Call gdb_ust_init.
3743 (initialize_tracepoint_ftlib): Call gdb_agent_init.
3744 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
3745 * config.in, configure: Regenerated.
3746
05044653
PA
37472012-03-02 Pedro Alves <palves@redhat.com>
3748
3749 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
3750 * linux-low.c (struct simple_pid_list): New.
3751 (stopped_pids): New a struct simple_pid_list pointer.
3752 (add_to_pid_list, pull_pid_from_list): New.
3753 (handle_extended_wait): Don't assume the first signal new children
3754 report is SIGSTOP. Adjust call to pull_pid_from_list.
3755 (linux_wait_for_lwp): Adjust.
3756
8d00225b
YQ
37572012-03-02 Yao Qi <yao@codesourcery.com>
3758
3759 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
3760 debug log.
3761
19560ba5
YQ
37622012-03-02 Yao Qi <yao@codesourcery.com>
3763
3764 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
3765 `stop_pc' and `tpoint'. Update caller.
3766
1faeff08
MR
37672012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
3768
3769 * linux-low.h (linux_target_ops): Add regset_bitmap member.
3770 * linux-low.c (use_linux_regsets): New macro.
3771 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
3772 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
3773 (linux_register_in_regsets): New function.
3774 (usr_fetch_inferior_registers): Skip registers covered by
3775 regsets.
3776 (usr_store_inferior_registers): Likewise.
3777 (usr_fetch_inferior_registers): New macro.
3778 (usr_store_inferior_registers): Likewise.
3779 (linux_fetch_registers): Handle mixed regset/non-regset targets.
3780 (linux_store_registers): Likewise.
3781 * linux-mips-low.c (init_registers_mips_dsp_linux): New
3782 prototype.
3783 (init_registers_mips64_dsp_linux): Likewise.
3784 (init_registers_mips_linux): New macro.
3785 (init_registers_mips_dsp_linux): Likewise.
3786 (mips_dsp_num_regs): Likewise.
3787 (DSP_BASE, DSP_CONTROL): New fallback macros.
3788 (mips_base_regs): New macro.
3789 (mips_regmap): Use it. Fix the size.
3790 (mips_dsp_regmap): New variable.
3791 (mips_dsp_regset_bitmap): Likewise.
3792 (mips_arch_setup): New function.
3793 (mips_cannot_fetch_register): Use the_low_target.regmap rather
3794 than mips_regmap.
3795 (mips_cannot_store_register): Likewise.
3796 (the_low_target): Update .arch_setup, .num_regs and .regmap
3797 initializers. Add .regset_bitmap initializer.
3798 * linux-arm-low.c (the_low_target): Add .regset_bitmap
3799 initializer.
3800 * linux-bfin-low.c (the_low_target): Likewise.
3801 * linux-cris-low.c (the_low_target): Likewise.
3802 * linux-crisv32-low.c (the_low_target): Likewise.
3803 * linux-ia64-low.c (the_low_target): Likewise.
3804 * linux-m32r-low.c (the_low_target): Likewise.
3805 * linux-m68k-low.c (the_low_target): Likewise.
3806 * linux-ppc-low.c (the_low_target): Likewise.
3807 * linux-s390-low.c (the_low_target): Likewise.
3808 * linux-sh-low.c (the_low_target): Likewise.
3809 * linux-sparc-low.c (the_low_target): Likewise.
3810 * linux-tic6x-low.c (the_low_target): Likewise.
3811 * linux-x86-low.c (the_low_target): Likewise.
3812 * linux-xtensa-low.c (the_low_target): Likewise.
3813 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
3814 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
3815 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
3816 srv_xmlfiles.
3817 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
3818 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
3819
c03e6ccc
YQ
38202012-02-29 Yao Qi <yao@codesourcery.com>
3821 Pedro Alves <palves@redhat.com>
3822
3823 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
3824 `step_over_finished' is true.
3825
644cebc9
PA
38262012-02-27 Pedro Alves <palves@redhat.com>
3827
3828 * linux-low.c (pid_is_stopped): Delete, moved to common/.
3829 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
3830
c14d7ab2
PA
38312012-02-27 Pedro Alves <palves@redhat.com>
3832
3833 PR server/9684
3834 * linux-low.c (pid_is_stopped): New.
3835 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
3836
412c89dd
LM
38372012-02-25 Luis Machado <lgustavo@codesourcery.com>
3838
3839 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
3840 of conditions.
3841
b745defe
MR
38422012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
3843
3844 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
3845
9f3a5c85
LM
38462012-02-24 Luis Machado <lgustavo@codesourcery>
3847
3848 * server.c (handle_query): Advertise support for target-side
3849 breakpoint condition evaluation.
3850 (process_point_options): New function.
3851 (process_serial_event): When inserting a breakpoint, check for
3852 a target-side condition that should be evaluated.
3853
3854 * mem-break.c: Include regcache.h and ax.h.
3855 (point_cond_list_t): New data structure.
3856 (breakpoint) <cond_list>: New field.
3857 (find_gdb_breakpoint_at): Make non-static.
3858 (delete_gdb_breakpoint_at): Clear any target-side
3859 conditions.
3860 (clear_gdb_breakpoint_conditions): New function.
3861 (add_condition_to_breakpoint): Likewise.
3862 (add_breakpoint_condition): Likewise.
3863 (gdb_condition_true_at_breakpoint): Likewise.
3864 (gdb_breakpoint_here): Return result directly instead
3865 of going through a local variable.
3866
3867 * mem-break.h (find_gdb_breakpoint_at): New prototype.
3868 (clear_gdb_breakpoint_conditions): Likewise.
3869 (add_breakpoint_condition): Likewise.
3870 (gdb_condition_true_at_breakpoint): Likewise.
3871
3872 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
3873 (need_step_over_p): Take target-side breakpoint condition into
3874 consideration.
3875
5e1dc496
LM
38762012-02-24 Luis Machado <lgustavo@codesourcery>
3877
3878 * server.h: Include tracepoint.h.
3879 (agent_mem_read, agent_get_trace_state_variable_value,
3880 agent_set_trace_state_variable_value,
3881 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
3882 get_set_tsv_func_addr): New prototypes.
3883
3884 * ax.h: New include file.
3885 * ax.c: New source file.
3886
3887 * tracepoint.c: Include ax.h.
3888 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
3889 agent_expr, eval_result_type): Move to ax.h.
3890 (parse_agent_expr): Rename to ...
3891 (gdb_parse_agent_expr): ... this, make it non-static and move
3892 to ax.h.
3893 (unparse_agent_expr) Rename to ...
3894 (gdb_unparse_agent_expr): ... this, make it non-static and move
3895 to ax.h.
3896 (eval_agent_expr): Rename to ...
3897 (eval_tracepoint_agent_expr): ... this.
3898 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
3899 forward declarations.
3900 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
3901 (agent_get_trace_state_variable_value): New function.
3902 (agent_set_trace_state_variable_value): New function.
3903 (cmd_qtdp): Call gdb_parse_agent_expr (...).
3904 (response_tracepoint): Call gdb_unparse_agent_expr (...).
3905 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
3906 (condition_true_at_tracepoint): Likewise.
3907 (parse_agent_expr): Rename to ...
3908 (gdb_parse_agent_expr): ... this and move to ax.c.
3909 (unparse_agent_expr): Rename to ...
3910 (gdb_unparse_agent_expr): ... this and move to ax.c.
3911 (gdb_agent_op_name): Move to ax.c.
3912 (eval_agent_expr): Rename to ...
3913 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
3914 and move to ax.c.
3915 (eval_tracepoint_agent_expr): New function.
3916 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 3917 non-static.
5e1dc496
LM
3918 (current_insn_ptr, emit_error, struct bytecode_address): Move to
3919 ax.c.
3920 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
3921 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
3922 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
3923 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
3924 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
3925 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
3926 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
3927 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
3928 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
3929 (compile_bytecodes): Remove forward declaration.
3930 (is_goto_target): Move to ax.c.
3931 (compile_bytecodes): Move to ax.c and call
3932 agent_get_trace_state_variable_value (...) and
3933 agent_set_trace_state_variable_value (...).
3934
3935 * Makefile.in: Update ax.c and IPA dependencies.
3936
277e4e52
PA
39372012-02-24 Pedro Alves <palves@redhat.com>
3938
3939 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
3940 (cmd_bigqtbuffer_circular): ... this. Only handle
3941 'QTBuffer:circular:'.
3942 (handle_tracepoint_general_set): Adjust.
3943
bf4c19f7
YQ
39442012-02-16 Yao Qi <yao@codesourcery.com>
3945
3946 * inferiors.c: Move code to ...
3947 * dll.c: .... here. New.
3948 * server.h: Declare clear_dlls.
3949 * Makefile.in (SFILES): Add dll.c.
3950 (OBS): Add dll.o
3951 (dll.o): New rule.
3952
d73f2619
YQ
39532012-02-11 Yao Qi <yao@codesourcery.com>
3954
3955 * server.c: (handle_monitor_command): Add a new parameter
3956 `own_buf'.
3957 (handle_query): Update caller.
3958
f8255c2a
JB
39592012-02-09 Joel Brobecker <brobecker@adacore.com>
3960
3961 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
3962 * configure, config.in: Regenerate.
3963 * hostio.c: Provide an alternate implementation if HAVE_READLINK
3964 is not defined.
3965
da84f473
PA
39662012-02-02 Pedro Alves <palves@redhat.com>
3967
3968 Try SIGKILL first, then PTRACE_KILL.
3969 * linux-low.c (linux_kill_one_lwp): New.
3970 (linux_kill_one_lwp): Rename to ...
3971 (kill_one_lwp_callback): ... this. Use the new
3972 linux_kill_one_lwp.
3973
e886a173
PA
39742012-02-02 Pedro Alves <palves@redhat.com>
3975
3976 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
3977 inferior.
3978
be07f1a2
PA
39792012-01-27 Pedro Alves <palves@redhat.com>
3980
3981 * linux-low.c (linux_child_pid_to_exec_file): Delete.
3982 (elf_64_file_p): Make static.
3983 (linux_pid_exe_is_elf_64_file): New.
3984 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
3985 Delete declarations.
3986 (linux_pid_exe_is_elf_64_file): Declare.
3987 * linux-x86-low.c (x86_arch_setup): Use
3988 linux_pid_exe_is_elf_64_file.
3989
d8301ad1
JK
39902012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
3991
3992 * linux-low.c (linux_wait_for_event_1): Rename to ...
3993 (linux_wait_for_event): ... here and merge it with former
3994 linux_wait_for_event - new variable wait_ptid, use it.
3995 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
3996
01b17894
PA
39972012-01-23 Pedro Alves <palves@redhat.com>
3998
3999 * server.c (main): Avoid yet another case of infinite loop while
4000 detaching/killing after a longjmp.
4001
e825046f
JK
40022012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4003
4004 Code cleanup.
4005 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
4006
b9e7b9c3
UW
40072012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
4008
4009 * hostio.c (handle_readlink): New function.
4010 (handle_vFile): Call it to handle "vFile:readlink" packets.
4011
901f9912
UW
40122012-01-20 Pedro Alves <palves@redhat.com>
4013 Ulrich Weigand <ulrich.weigand@linaro.org>
4014
4015 * server.c (handle_v_requests): Only support vAttach and vRun to
4016 start multiple processes when in extended protocol mode.
4017
fc1ab1a0
PA
40182012-01-17 Pedro Alves <palves@redhat.com>
4019
4020 * tracepoint.c (initialize_tracepoint): Use mmap instead of
4021 memalign plus mprotect to allocate the scratch buffer.
4022
7d5d4e98
PA
40232012-01-13 Pedro Alves <palves@redhat.com>
4024
4025 * server.c (attach_inferior): Clear `cont_thread'.
4026
f128d5e9
PA
40272012-01-13 Pedro Alves <palves@redhat.com>
4028
4029 * server.c (main): Avoid infinite loop while detaching/killing
4030 after a longjmp.
4031
06db92f0
DE
40322012-01-09 Doug Evans <dje@google.com>
4033
4034 * server.c (start_inferior): Set last_ptid in --wrapper case.
4035
32d92999
YQ
40362012-01-06 Yao Qi <yao@codesourcery.com>
4037
4038 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
4039 defined.
4040 [IN_PROCESS_AGENT] (debug_agent): New global variable.
4041
5e0a92a9
YQ
40422012-01-04 Yao Qi <yao@codesourcery.com>
4043
4044 * tracepoint.c (cmd_qtdp): Print debug message
4045 for static tracepoint.
4046
ae639e8c
YQ
40472012-01-04 Yao Qi <yao@codesourcery.com>
4048
4049 * tracepoint.c (trace_vdebug): Differentiate debug message
4050 between gdbserver and IPA.
4051
f72429c5
YQ
40522012-01-03 Yao Qi <yao@codesourcery.com>
4053
4054 * tracepoint.c (tracepoint_was_hit): Don't collect for
4055 static tracepoint.
4056
12c3e59c
JB
40572012-01-02 Joel Brobecker <brobecker@adacore.com>
4058
4059 * terminal.h: Reformat copyright header.
4060
67827812
JB
40612012-01-02 Joel Brobecker <brobecker@adacore.com>
4062
4063 * server.c (gdbserver_version): Update copyright year.
4064 * gdbreplay.c (gdbreplay_version): Likewise.
4065
3e52c33d
JK
40662011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
4067
4068 * linux-low.c (linux_create_inferior): Put empty if clause for write.
4069
4070 Revert:
4071 2011-12-18 Hui Zhu <teawater@gmail.com>
4072 * linux-low.c (linux_create_inferior): Save return value to ret.
4073
66f1260e
HZ
40742011-12-18 Hui Zhu <teawater@gmail.com>
4075
4076 * linux-low.c (linux_create_inferior): Save return value to ret.
4077
e77616d7
DE
40782011-12-16 Doug Evans <dje@google.com>
4079
e7b06c57
DE
4080 * linux-low.c (linux_create_inferior): If stdio connection,
4081 redirect stdin from /dev/null, stdout to stderr.
4082 * remote-utils.c (remote_is_stdio): New static global.
4083 (remote_connection_is_stdio): New function.
4084 (remote_prepare): Handle stdio connection.
4085 (remote_open): Ditto.
4086 (remote_close): Don't close stdin for stdio connections.
4087 (read_prim,write_prim): New functions. Replace all calls to
4088 read/write to these.
4089 * server.c (main): Watch for "-" argument. Move call to
4090 remote_prepare before start_inferior.
4091 * server.h (STDIO_CONNECTION_NAME): New macro.
4092 (remote_connection_is_stdio): Declare.
4093
e77616d7
DE
4094 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
4095 in debugging output.
4096
82067193
YQ
40972011-12-15 Yao Qi <yao@codesourcery.com>
4098
4099 * tracepoint.c: Include sys/syscall.h.
4100 (gdb_ust_thread): Remove preprocessor conditional.
4101
82bfbe7e
PA
41022011-12-14 Pedro Alves <pedro@codesourcery.com>
4103
4104 * linux-low.c (linux_detach_one_lwp): Call
4105 the_low_target.prepare_to_resume before detaching.
4106
712c6575
YQ
41072011-12-14 Yao Qi <yao@codesourcery.com>
4108
4109 * tracepoint.c (gdb_ust_thread): Don't ignore return value
4110 of write.
4111
d54d1edf
YQ
41122011-12-14 Yao Qi <yao@codesourcery.com>
4113
4114 * i386-low.c (i386_low_stopped_data_address): Initialize local
4115 variable `control'.
4116
6210a125
PA
41172011-12-13 Pedro Alves <pedro@codesourcery.com>
4118
4119 PR remote/13492
4120
4121 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
4122 DR_CONTROL unless necessary. Extend comments.
4123 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
4124 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
4125
2ece8244
YQ
41262011-12-13 Yao Qi <yao@codesourcery.com>
4127
4128 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
4129 macros.
4130 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
4131
784867a5
JK
41322011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
4133
4134 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
4135 Print new debug message for such case.
4136
6bf36717
JK
41372011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4138
4139 Fix overlapping memcpy.
4140 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
4141 the read_inferior_memory transfer.
4142 (delete_fast_tracepoint_jump): New variable buf. Use it for the
4143 write_inferior_memory transfer.
4144 (set_fast_tracepoint_jump): New variable buf. Use it for the
4145 read_inferior_memory and write_inferior_memory transfers.
4146 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
4147 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
4148 Use it for the write_inferior_memory transfer.
4149 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
4150 buffers.
4151
50275556
MR
41522011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4153
4154 * linux-low.c (fetch_register, store_register): Make code
4155 consistent, fix formatting.
4156
7325beb4
MR
41572011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4158
4159 * linux-low.c (usr_store_inferior_registers): Factor out code
4160 to handle individual registers into...
4161 (store_register): ... this new function.
4162
c642a434
UW
41632011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
4164
4165 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
4166 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
4167 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
4168 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
4169 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
4170 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
4171 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
4172 (srv_xmlfiles): Add new XML files.
4173
4174 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
4175 and <sys/uio.h>.
4176 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
4177 (init_registers_s390_linux32v1): Add prototype.
4178 (init_registers_s390_linux32v2): Likewise.
4179 (init_registers_s390_linux64v1): Likewise.
4180 (init_registers_s390_linux64v2): Likewise.
4181 (init_registers_s390x_linux64v1): Likewise.
4182 (init_registers_s390x_linux64v2): Likewise.
4183 (s390_num_regs): Increment to 52.
4184 (s390_regmap): Add orig_r2 register.
4185 (s390_num_regs_3264): Increment to 68.
4186 (s390_regmap_3264): Add orig_r2 register.
4187 (s390_collect_ptrace_register): Handle orig_r2 register.
4188 (s390_supply_ptrace_register): Likewise.
4189 (s390_fill_last_break): New function.
4190 (s390_store_last_break): Likewise.
4191 (s390_fill_system_call): New function.
4192 (s390_store_system_call): Likewise.
4193 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
4194 register sets.
4195 (s390_check_regset): New function.
4196 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
4197 NT_S390_SYSTEM_CALL regsets and use appropriate description.
4198 Update target_regsets for available register sets.
4199
2268b414
JK
42002011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
4201 Jan Kratochvil <jan.kratochvil@redhat.com>
4202
4203 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
4204 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
4205 New.
4206 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
4207 * linux-low.h (struct process_info_private): New member r_debug.
4208 * server.c (handle_qxfer_libraries): Call
4209 the_target->qxfer_libraries_svr4.
4210 (handle_qxfer_libraries_svr4): New function.
4211 (qxfer_packets): New entry "libraries-svr4".
4212 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
4213 * target.h (struct target_ops): New member qxfer_libraries_svr4.
4214 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
4215 PACKET_qXfer_libraries_svr4.
4216
d6db1fab
UW
42172011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
4218
4219 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
4220 PSW address/mask between 8-byte and 16-byte formats.
4221 (s390_supply_ptrace_register): Likewise.
4222 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
4223 basic addressing mode bit.
4224
242f5f1c
SS
42252011-11-24 Stan Shebs <stan@codesourcery.com>
4226
4227 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
4228
f196051f
SS
42292011-11-17 Stan Shebs <stan@codesourcery.com>
4230
4231 * tracepoint.c (struct tracepoint): New field traceframe_usage.
4232 (tracing_start_time): New global.
4233 (tracing_stop_time): New global.
4234 (tracing_user_name): New global.
4235 (tracing_notes): New global.
4236 (tracing_stop_note): New global.
4237 (cmd_qtstart): Set traceframe_usage, start_time.
4238 (stop_tracing): Set stop_time.
4239 (cmd_qtstatus): Report additional status.
4240 (cmd_qtp): New function.
4241 (handle_tracepoint_query): Call it.
4242 (cmd_qtnotes): New function.
4243 (handle_tracepoint_general_set): Call it.
4244 (get_timestamp): Rename from tsv_get_timestamp.
4245
405f8e94
SS
42462011-11-14 Stan Shebs <stan@codesourcery.com>
4247 Kwok Cheung Yeung <kcy@codesourcery.com>
4248
4249 * linux-x86-low.c (small_jump_insn): New.
4250 (i386_install_fast_tracepoint_jump_pad): Add arguments for
4251 trampoline and error message, build a trampoline and issue a small
4252 jump instruction to it.
4253 (x86_install_fast_tracepoint_jump_pad): Add arguments for
4254 trampoline and error message.
4255 (x86_get_min_fast_tracepoint_insn_len): New.
4256 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
4257 * linux-low.h (struct linux_target_ops): Add arguments to
4258 install_fast_tracepoint_jump_pad operation, add new operation.
4259 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
4260 arguments.
4261 (linux_get_min_fast_tracepoint_insn_len): New function.
4262 (linux_target_op): Add new operation.
4263 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
4264 (gdb_trampoline_buffer_end): Ditto.
4265 (gdb_trampoline_buffer_error): Ditto.
4266 (struct ipa_sym_addresses): Add fields for new IPA variables.
4267 (symbol_list): Add entries for new IPA variables.
4268 (struct tracepoint): Add fields to hold the address range of the
4269 trampoline used by the tracepoint.
4270 (trampoline_buffer_head): New static variable.
4271 (trampoline_buffer_tail): Ditto.
4272 (claim_trampoline_space): New function.
4273 (have_fast_tracepoint_trampoline_buffer): New function.
4274 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
4275 structure.
4276 (install_fast_tracepoint): Ditto, also add error buffer argument.
4277 (cmd_qtminftpilen): New function.
4278 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
4279 (fast_tracepoint_from_trampoline_address): New function.
4280 (fast_tracepoint_collecting): Handle trampoline as part of jump
4281 pad space.
4282 (set_trampoline_buffer_space): New function.
4283 (initialize_tracepoint): Initialize new IPA variables.
4284 * target.h (struct target_ops): Add arguments to
4285 install_fast_tracepoint_jump_pad operation, add new
4286 get_min_fast_tracepoint_insn_len operation.
4287 (target_get_min_fast_tracepoint_insn_len): New.
4288 (install_fast_tracepoint_jump_pad): Add arguments.
4289 * server.h (IPA_BUFSIZ): Define.
4290 * linux-i386-ipa.c: Include extra header files.
4291 (initialize_fast_tracepoint_trampoline_buffer): New function.
4292 (initialize_low_tracepoint): Call it.
4293 * server.h (set_trampoline_buffer_space): Declare.
4294 (claim_trampoline_space): Ditto.
4295 (have_fast_tracepoint_trampoline_buffer): Ditto.
4296
1e4d1764
YQ
42972011-11-14 Yao Qi <yao@codesourcery.com>
4298
4299 * server.c (handle_query): Handle InstallInTrace for qSupported.
4300 * tracepoint.c (add_tracepoint): Sort list.
4301 (install_tracepoint, download_tracepoint): New.
4302 (cmd_qtdp): Call them to install and download tracepoints.
4303 (sort_tracepoints): Removed.
4304 (cmd_qtstart): Update.
4305
5c73ff4e
YQ
43062011-11-14 Yao Qi <yao@codesourcery.com>
4307
4308 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
4309 * mem-break.h: Declare.
4310 * tracepoint.c (cmd_qtstart): Move some code to ...
4311 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
4312 New.
4313 (download_tracepoints): Move some code to ...
4314 (download_tracepoint_1): ... here. New.
4315
86a30030
YQ
43162011-11-08 Yao Qi <yao@codesourcery.com>
4317
4318 * remote-utils.c (relocate_instruction): A comment fix.
4319
8d26e50c
JB
43202011-11-07 Joel Brobecker <brobecker@adacore.com>
4321
4322 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
4323 (i386_dr_low_get_control, i386_dr_low_get_status): Use
4324 dr_status_mirror and dr_control_mirror from debug_reg_state.
4325 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
4326 (i386_initial_stuff): Remove use of deleted globals.
4327 (i386_get_thread_context, i386_set_thread_context,
4328 i386_thread_added): Use dr_status_mirror and dr_control_mirror
4329 from debug_reg_state.
4330
a59306a3
YQ
43312011-11-05 Yao Qi <yao@codesourcery.com>
4332
4333 * tracepoint.c (gdb_collect): Loop over tracepoints of same
4334 address as TPOINT's.
4335
3065dfb6
SS
43362011-11-02 Stan Shebs <stan@codesourcery.com>
4337
4338 * tracepoint.c (agent_mem_read_string): New function.
4339 (eval_agent_expr): Call it for tracenz.
4340 * server.c (handle_query): Report support for tracenz.
4341
fd0d8c7c
YQ
43422011-11-02 Yao Qi <yao@codesourcery.com>
4343
4344 * tracepoint.c (cmd_qtstart): Remove unused local variables.
4345
609086b1
YQ
43462011-11-02 Yao Qi <yao@codesourcery.com>
4347
4348 * target.h: Fix a typo in comment.
4349
b9fd1791
PA
43502011-10-31 Pedro Alves <pedro@codesourcery.com>
4351
4352 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
4353 clobber the breakpoints' shadows with fast tracepoint jumps.
4354 * mem-break.h (check_mem_write): Add `myaddr' parameter.
4355 * target.c (write_inferior_memory): Also pass MYADDR down to
4356 check_mem_write.
4357
03583c20
UW
43582011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
4359
4360 * configure.ac: Check support for personality routine.
4361 * configure: Regenerate.
4362 * config.in: Likewise.
4363 * linux-low.c: Include <sys/personality.h>.
4364 Define ADDR_NO_RANDOMIZE if necessary.
4365 (linux_create_inferior): Disable address space randomization when
4366 forking inferior, if requested.
4367 (linux_supports_disable_randomization): New function.
4368 (linux_target_ops): Install it.
4369 * server.h (disable_randomization): Declare.
4370 * server.c (disable_randomization): New global variable.
4371 (handle_general_set): Handle QDisableRandomization.
4372 (handle_query): Likewise for qSupported.
4373 (main): Support --disable-randomization and --no-disable-randomization
4374 command line arguments.
4375 * target.h (struct target_ops): Add supports_disable_randomization.
4376 (target_supports_disable_randomization): New macro.
4377
723b724b
MF
43782011-09-29 Mike Frysinger <vapier@gentoo.org>
4379
4380 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
4381 ifdef check.
4382 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
4383 [!PT_GETDSBT] (target_loadmap): New definition.
4384 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
4385 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
4386 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
4387 and PT_GETDSBT to LINUX_LOADMAP.
4388 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
4389 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
4390
55329a5c 43912011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
4392
4393 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
4394 (arm_linux_hwbp_cap): New static variable.
4395 (arm_linux_get_hwbp_cap): Replace by ...
4396 (arm_linux_init_hwbp_cap): ... this new function.
4397 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
4398 (arm_linux_get_hw_watchpoint_count): Likewise.
4399 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4400 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
4401 (arm_prepare_to_resume): Use perror_with_name instead of error.
4402
55329a5c 44032011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
4404
4405 * linux-arm-low.c: Include <signal.h>.
4406 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
4407 (struct arm_linux_hwbp_cap): New data type.
4408 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
4409 (struct arm_linux_hw_breakpoint): New data type.
4410 (MAX_BPTS, MAX_WPTS): Define.
4411 (struct arch_process_info, struct arch_lwp_info): New data types.
4412 (arm_linux_get_hwbp_cap): New function.
4413 (arm_linux_get_hw_breakpoint_count): Likewise.
4414 (arm_linux_get_hw_watchpoint_count): Likewise.
4415 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4416 (arm_hwbp_control_initialize): Likewise.
4417 (arm_hwbp_control_is_enabled): Likewise.
4418 (arm_hwbp_control_is_initialized): Likewise.
4419 (arm_hwbp_control_disable): Likewise.
4420 (arm_linux_hw_breakpoint_equal): Likewise.
4421 (arm_linux_hw_point_initialize): Likewise.
4422 (struct update_registers_data): New data structure.
4423 (update_registers_callback: New function.
4424 (arm_insert_point): Likewise.
4425 (arm_remove_point): Likewise.
4426 (arm_stopped_by_watchpoint): Likewise.
4427 (arm_stopped_data_address): Likewise.
4428 (arm_new_process): Likewise.
4429 (arm_new_thread): Likewise.
4430 (arm_prepare_to_resume): Likewise.
4431 (the_low_target): Register arm_insert_point, arm_remove_point,
4432 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
4433 arm_new_thread, and arm_prepare_to_resume.
4434
6b9801d4
SS
44352011-09-15 Stan Shebs <stan@codesourcery.com>
4436
4437 * server.h (struct emit_ops): Add compare-goto fields.
4438 * tracepoint.c (gdb_agent_op_sizes): New table.
4439 (emit_eq_goto): New function.
4440 (emit_ne_goto): New function.
4441 (emit_lt_goto): New function.
4442 (emit_le_goto): New function.
4443 (emit_gt_goto): New function.
4444 (emit_ge_goto): New function.
4445 (is_goto_target): New function.
4446 (compile_bytecodes): Recognize special cases of compare-goto
4447 combinations and call specialized emitters for them.
4448 * linux-x86-low.c (amd64_emit_eq_goto): New function.
4449 (amd64_emit_ne_goto): New function.
4450 (amd64_emit_lt_goto): New function.
4451 (amd64_emit_le_goto): New function.
4452 (amd64_emit_gt_goto): New function.
4453 (amd64_emit_ge_goto): New function.
4454 (amd64_emit_ops): Add the new functions.
4455 (i386_emit_eq_goto): New function.
4456 (i386_emit_ne_goto): New function.
4457 (i386_emit_lt_goto): New function.
4458 (i386_emit_le_goto): New function.
4459 (i386_emit_gt_goto): New function.
4460 (i386_emit_ge_goto): New function.
4461 (i386_emit_ops): Add the new functions.
4462
bf15cbda
SS
44632011-09-08 Stan Shebs <stan@codesourcery.com>
4464
4465 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
4466 (i386_emit_epilogue): Restore %ebx.
4467
943ca1dd
JZ
44682011-08-31 Jie Zhang <jzhang918@gmail.com>
4469
4470 * server.c (step_thread): Remove definition.
4471 (process_serial_event): Don't handle Hs.
4472 * server.h (step_thread): Remove declaration.
4473 * target.c (set_desired_inferior): Remove use of step_thread.
4474
e3deef73
LM
44752011-08-24 Luis Machado <lgustavo@codesourcery.com>
4476
4477 * linux-low.c: Include linux-procfs.h.
4478 (linux_attach_lwp_1): Update comments.
4479 (linux_attach): Scan for existing threads when attaching to a
4480 process that is the tgid.
4481 * Makefile.in: Update dependencies.
4482
13da1c97
LM
44832011-08-24 Luis Machado <lgustavo@codesourcery.com>
4484
4485 * configure.srv: Add linux-procfs.o dependencies.
4486
881127c9
YQ
44872011-08-14 Yao Qi <yao@codesourcery.com>
4488
4489 * target.h (struct target_ops): Fix indent.
4490 * win32-low.c (win32_target_ops): Fix comment.
4491
58dbd541
YQ
44922011-08-14 Andrew Jenner <andrew@codesourcery.com>
4493 Yao Qi <yao@codesourcery.com>
4494
4495 * Makefile.in (clean): Remove tic6x-*.c files.
4496 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
4497 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
4498 (tic6x-c64xp-linux.c): Likewise.
4499 * configure.srv: Add support for tic6x-*-uclinux.
4500 * linux-tic6x-low.c: New.
4501 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
4502
78d85199
YQ
45032011-08-14 Andrew Stubbs <ams@codesourcery.com>
4504 Yao Qi <yao@codesourcery.com>
4505
4506 * target.h (struct target_ops): Add read_loadmap.
4507 * linux-low.c (struct target_loadseg): New type.
4508 (struct target_loadmap): New type.
4509 (linux_read_loadmap): New function.
4510 (linux_target_ops): Add linux_read_loadmap.
4511 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
4512 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
4513 to NULL.
78d85199 4514
a959a88d
EZ
45152011-08-05 Eli Zaretskii <eliz@gnu.org>
4516
4517 * win32-low.c: Include <stdint.h>.
4518
1ced966e
PA
45192011-07-22 Pedro Alves <pedro@codesourcery.com>
4520
4521 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
4522 to the inferior here.
4523 (i386_remove_aligned_watchpoint): Ditto.
4524 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
4525 fit part of the watchpoint in the debug registers.
4526 (i386_update_inferior_debug_regs): New.
4527 (i386_low_insert_watchpoint): Work on a local mirror of the debug
4528 registers, and only update the inferior on success.
4529 (i386_low_remove_watchpoint): Ditto.
4530
d26e3629
KY
45312011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
4532
4533 * linux-low.c (compare_ints, unique, list_threads, show_process,
4534 linux_core_of_thread): Delete.
4535 (linux_target_ops): Change linux_core_of_thread to
4536 linux_common_core_of_thread.
4537 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
4538 * utils.c (malloc_failure): Change type of argument.
4539 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
4540 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
4541 common/linux-osdata.c, common/ptid.c and common/buffer.c.
4542 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
4543 (IPA_OBJS): Add common-utils-ipa.o.
4544 (ptid_h, linux_osdata_h): New macros.
4545 (server_h): Add common/common-utils.h, common/xml-utils.h,
4546 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
4547 common/ptid.h.
4548 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
4549 ptid.o, buffer.o): New rules.
4550 (linux-low.o): Add common/linux-osdata.h as a dependency.
4551 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
4552 * configure.ac: Add AC_HEADER_DIRENT check.
4553 * config.in: Regenerate.
4554 * configure: Regenerate.
4555 * remote-utils.c (xml_escape_text): Delete.
4556 (buffer_grow, buffer_free, buffer_init, buffer_finish,
4557 buffer_xml_printf): Move to common/buffer.c.
4558 * server.c (main): Remove call to initialize_inferiors.
4559 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
4560 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
4561 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
4562 internal_error, gdb_assert, gdb_assert_fail): Delete.
4563 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
4564 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
4565 common/buffer.h.
4566 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
4567 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
4568 initialize_inferiors): Delete.
4569
2275a1a7
PA
45702011-07-20 Pedro Alves <pedro@codesourcery.com>
4571
4572 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
4573 symbol error.
4574
0a5b1e09
PA
45752011-05-31 Pedro Alves <pedro@codesourcery.com>
4576
4577 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
4578 assertion.
4579 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
4580
6938fd34
YQ
45812011-05-26 Yao Qi <yao@codesourcery.com>
4582
4583 * Makefile.in (thread-db.o): Track dependence to
4584 common/gdb_thread_db.h.
4585 * thread-db.c: include gdb_thread_db.h from right place.
4586
b481f9e0
TT
45872011-05-16 Adrian Cornish <gnu@bluedreamer.com>
4588
4589 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
4590 __FILE__ and __LINE__ to internal_error.
4591
98a5dd13
DE
45922011-05-13 Doug Evans <dje@google.com>
4593
4594 * thread-db.c (try_thread_db_load_from_sdir): New function.
4595 (try_thread_db_load_from_dir): New function.
4596 (thread_db_load_search): Handle $sdir, ignore $pdir.
4597 Remove trying of system directories if search of
4598 libthread-db-search-path fails, that is now done via $sdir.
4599
d248b706
KY
46002011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
4601
4602 * server.c (handle_query): Add EnableDisableTracepoints to the list
4603 of supported features.
43aaf8b6 4604 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 4605 tracepoints.
43aaf8b6
PA
4606 (cmd_qtenable_disable): New.
4607 (cmd_qtstart): Install tracepoints even if disabled.
4608 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
4609 receiving a QTEnable or QTDisable packet.
4610 (gdb_collect): Skip data collection if fast tracepoint is disabled.
4611 (ust_marker_to_static_tracepoint): Do not ignore disabled static
4612 tracepoints.
4613 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 4614
84e578fb
DE
46152011-05-10 Doug Evans <dje@google.com>
4616
4617 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
4618
71f55dd8
DE
46192011-05-04 Doug Evans <dje@google.com>
4620
4621 * linux-low.c (linux_join): Skip process lookup.
4622 * spu-low.c (spu_join): Ditto.
4623 * server.c (join_inferiors_callback): Delete.
4624 (process_serial_event): For 'D' packet (detach) call join_inferior
4625 directly.
4626
4d393d60
JM
46272011-05-04 Joseph Myers <joseph@codesourcery.com>
4628
4629 * README: Don't mention xscale*-*-linux*.
4630 * configure.srv (xscale*-*-linux*): Don't handle target.
4631
b00ad6ff
NF
46322011-04-27 Nathan Froyd <froydnj@codesourcery.com>
4633
4634 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
4635 casting pointers.
4636 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
4637 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
4638 (i386_emit_void_call_2): Likewise.
4639
af96c192
YQ
46402011-04-26 Yao Qi <yao@codesourcery.com>
4641
43aaf8b6
PA
4642 * linux-low.c: Move common macros to linux-ptrace.h.
4643 Include linux-ptrace.h.
af96c192
YQ
4644 * Makefile.in (linux_ptrace_h): New.
4645 (linux-low.o): Depends on linux-ptrace.h.
4646
03f2bd59
JK
46472011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
4648
4649 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
4650 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
4651 (remote_prepare): New function with most of the TCP code from ...
4652 (remote_open): ... here. Detect PORT here unconditionally. Move also
4653 setting transport_is_reliable.
4654 * server.c (run_once): New variable.
4655 (gdbserver_usage): Document it.
4656 (main): Set run_once for `--once'. Call remote_prepare. Exit after
4657 the first run if RUN_ONCE.
4658 * server.h (run_once, remote_prepare): New declarations.
4659
7a9dd1b2
TT
46602011-04-19 Tom Tromey <tromey@redhat.com>
4661
4662 * win32-low.c (handle_load_dll): Remove duplicate "the".
4663
81239425
PM
46642011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
4665
4666 Remove support for old Cygwin 1.5 versions.
4667 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
4668 function to avoid warning.
4669 (win32_add_one_solib): Use cygwin_conv_path function to avoid
4670 warning.
4671
9e0627f1
PM
46722011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
4673
4674 * gdbserver/server.h (Macro _): Define it if not available.
4675
588eebee
MS
46762011-03-14 Michael Snyder <msnyder@vmware.com>
4677
348af9f7 4678 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 4679
43f70d4c
JB
46802011-03-10 Joel Brobecker <brobecker@adacore.com>
4681
4682 * Makefile.in (maintainer-clean realclean distclean): Remove
4683 "make ... subdir_do" command.
4684
348af9f7
MS
46852011-03-10 Michael Snyder <msnyder@vmware.com>
4686
4687 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
4688
4689 * server.c (handle_v_run): Free alloced buffer on early return.
4690
e637a4f5
YQ
46912011-03-09 Yao Qi <yao@codesourcery.com>
4692
4693 Revert:
4694 2011-03-04 Yao Qi <yao@codesourcery.com>
4695
4696 * Makefile.in: Remove GNU make feature --directory.
4697
4698 2011-03-05 Yao Qi <yao@codesourcery.com>
4699
4700 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
4701 (subdir_do): New make target. Copied from gdb/Makefile.
4702 (maintainer-clean, realclean, distclean, clean): Call corresponding
4703 make targets in common/Makefile.
4704
4705 2011-02-11 Yao Qi <yao@codesourcery.com>
4706
4707 * configure.ac: Call AC_PROG_RANLIB.
4708 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
4709 * configure: Regenerate.
4710
e6edda56
JK
47112011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4712
4713 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
4714
e5141119
JB
47152011-03-06 Yao Qi <yao@codesourcery.com>
4716
4717 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
4718
64794aa4
JB
47192011-03-05 Yao Qi <yao@codesourcery.com>
4720
4721 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
4722 (subdir_do): New make target. Copied from gdb/Makefile.
4723 (maintainer-clean, realclean, distclean, clean): Call corresponding
4724 make targets in common/Makefile.
4725
7a762829
YQ
47262011-03-04 Yao Qi <yao@codesourcery.com>
4727
4728 * Makefile.in: Remove GNU make feature --directory.
4729
348af9f7
MS
47302011-03-04 Michael Snyder <msnyder@vmware.com>
4731
4732 * server.c (queue_stop_reply): Call xmalloc not malloc.
4733
47342011-03-02 Michael Snyder <msnyder@vmware.com>
4735
4736 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
4737
9f72fee2
MS
47382011-02-28 Michael Snyder <msnyder@vmware.com>
4739
588eebee
MS
4740 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
4741 (cmd_qtframe): Ditto.
4742 (cmd_qtbuffer): Ditto.
4743 (cmd_bigqtbuffer): Ditto.
4744
9f72fee2
MS
4745 * utils.c (decimal2str): Initialize 'width' to nine, then
4746 don't mess with it.
4747
8040bd49
UW
47482011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
4749
4750 * hostio.c (require_data): Free *data, not data.
4751
7e52cbd0
JK
47522011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4753
4754 * hostio.c (require_data): Use free, not xfree.
4755
9130f83e
MS
47562011-02-27 Michael Snyder <msnyder@vmware.com>
4757
4b812f4e
MS
4758 * server.c (handle_query): Discard unused value.
4759
9130f83e
MS
4760 * hostio.c (require_data): Free malloc memory before returning
4761 error.
4762
69d37113
MS
47632011-02-26 Michael Snyder <msnyder@vmware.com>
4764
4765 * linux-low.c (list_threads): Call closedir for dirent.
4766
35f5825a
MS
47672011-02-27 Michael Snyder <msnyder@vmware.com>
4768
2a589cef
MS
4769 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
4770 a case statement falls through.
4771
0adea5f7
MS
4772 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
4773
35f5825a
MS
4774 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
4775 in comparison.
4776
238f1c74
MS
47772011-02-26 Michael Snyder <msnyder@vmware.com>
4778
4779 * utils.c (decimal2str): Eliminate dead code and dead param.
4780 (pulongest): Drop dead param from call to decimal2str.
4781 (plongest): Ditto.
4782
633ff500
JB
47832011-02-24 Joel Brobecker <brobecker@adacore.com>
4784
4785 Revert the following patch (not approved yet):
4786 2011-02-21 Hui Zhu <teawater@gmail.com>
4787 * tracepoint.c (tp_printf): New function.
4788 (eval_agent_expr): Handle gdb_agent_op_printf.
4789
f9c6ff72
HZ
47902011-02-21 Hui Zhu <teawater@gmail.com>
4791
4792 * tracepoint.c (tp_printf): New function.
4793 (eval_agent_expr): Handle gdb_agent_op_printf.
4794
94d5e490
TT
47952011-02-18 Tom Tromey <tromey@redhat.com>
4796
4797 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
4798 (tracepoint.o): Likewise.
4799 * tracepoint.c (enum gdb_agent_op): Use ax.def.
4800 (gdb_agent_op_names): Likewise.
4801
c7f96d2b
TT
48022011-02-18 Tom Tromey <tromey@redhat.com>
4803
4804 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
4805 gdb_agent_op_rot>: New constants.
4806 (gdb_agent_op_names): Add pick and roll.
4807 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
4808 cases.
4809
0feedb2c
JK
48102011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4811
4812 * aclocal.m4: Regenerated with aclocal-1.11.1.
4813
b3b9301e
PA
48142011-02-14 Pedro Alves <pedro@codesourcery.com>
4815
4816 * server.c (handle_qxfer_traceframe_info): New.
4817 (qxfer_packets): Register "traceframe-info".
4818 (handle_query): Report support for qXfer:traceframe-info:read+.
4819 * tracepoint.c (match_blocktype): New.
4820 (traceframe_find_block_type): Rename to ...
4821 (traceframe_walk_blocks): ... this. Add callback filter argument,
4822 and use it.
4823 (traceframe_find_block_type): New, reimplemented on top of
4824 traceframe_walk_blocks.
4825 (build_traceframe_info_xml): New.
4826 (traceframe_read_info): New.
4827 * server.h (traceframe_read_info): Declare.
4828
4f3e6fb7
YQ
48292011-02-11 Yao Qi <yao@codesourcery.com>
4830
4831 * configure.ac: Call AC_PROG_RANLIB.
4832 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
4833 * configure: Regenerate.
4834
764880b7
PA
48352011-02-07 Pedro Alves <pedro@codesourcery.com>
4836
4837 * server.c (gdb_read_memory): Change return semantics to allow
4838 partial transfers.
4839 (handle_search_memory_1): Adjust.
4840 (process_serial_event) <'m' packet>: Handle partial transfers.
4841 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
4842
1c79eb8a
PA
48432011-01-28 Pedro Alves <pedro@codesourcery.com>
4844
4845 * regcache.c (init_register_cache): Initialize
4846 regcache->register_status.
4847 (free_register_cache): Release regcache->register_status.
4848 (regcache_cpy): Copy register_status.
4849 (registers_to_string): Print 'x's for unavailable registers.
4850 (supply_register): Mark the register's status valid or
4851 unavailable, depending on whether a buffer was passed in or not.
4852 (supply_register_zeroed): New.
4853 (supply_regblock): Mark the registers' status valid or
4854 unavailable, depending on whether a buffer was passed in or not.
4855 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
4856 (struct regcache): New `register_status' field.
4857 (supply_register_zeroed): Declare.
4858 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
4859 supply_register_zeroed, rather than passing a NULL buffer to
4860 supply_register.
4861 * tracepoint.c (fetch_traceframe_registers): Update comment.
4862
85724a0e
PA
48632011-01-28 Pedro Alves <pedro@codesourcery.com>
4864
4865 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
4866 buffer explicit.
4867
d08aafef
PA
48682011-01-25 Pedro Alves <pedro@codesourcery.com>
4869
4870 * server.h (decode_xfer_write): Change prototype.
4871 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
4872 and don't extract the annex here.
4873 * server.c (decode_xfer_read): Remove `annex' parameter,
4874 and don't extract the annex here.
4875 (decode_xfer): New.
4876 (struct qxfer): New.
4877 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
4878 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
4879 (handle_qxfer_statictrace): New functions, abstracted out from
4880 handle_query, and made to use the struct qxfer interface.
4881 (handle_threads_qxfer_proper): Rename to ...
4882 (handle_qxfer_threads_proper): ... this.
4883 (handle_threads_qxfer): Rename to ...
4884 (handle_qxfer_threads): ... this. Adjust.
4885 (qxfer_packets): New array.
4886 (handle_qxfer): New function.
4887 (handle_query): Use handle_qxfer.
4888
493e2a69
MS
48892011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
4890
4891 * gdbreplay.c: Shorten lines of >= 80 columns.
4892 * linux-low.c: Ditto.
4893 * linux-ppc-low.c: Ditto.
4894 * linux-s390-low.c: Ditto.
4895 * linux-sparc-low.c: Ditto.
4896 * linux-x86-low.c: Ditto.
4897 * linux-xtensa-low.c: Ditto.
4898 * mem-break.c: Ditto.
4899 * nto-low.c: Ditto.
4900 * regcache.h: Ditto.
4901 * remote-utils.c: Ditto.
4902 * server.c: Ditto.
4903 * server.h: Ditto.
4904 * thread-db.c: Ditto.
4905 * tracepoint.c: Ditto.
4906 * utils.c: Ditto.
4907 * win32-low.h: Ditto.
4908
44944448
JB
49092011-01-05 Joel Brobecker <brobecker@adacore.com>
4910
4911 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
4912 update.
4913
71ce852c
JB
49142011-01-01 Joel Brobecker <brobecker@adacore.com>
4915
4916 * server.c (gdbserver_version): Update copyright year in version
4917 output.
4918 * gdbreplay.c (gdbreplay_version): Ditto.
4919
eb826dc6
MF
49202010-12-29 Jie Zhang <jie.zhang@analog.com>
4921
4922 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
4923 * linux-bfin-low.c: New file.
4924 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
4925 PT_DATA_ADDR for BFIN targets.
4926 * Makefile.in (SFILES): Add linux-bfin-low.c.
4927 (clean): Remove reg-bfin.c.
4928 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
4929 * README: Mention supported Blackfin targets.
4930
39ab222a
MF
49312010-12-23 Mike Frysinger <vapier@gentoo.org>
4932
4933 * .gitignore: New file.
4934
a1f2ce7d
MF
49352010-11-16 Mike Frysinger <vapier@gentoo.org>
4936
4937 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
4938
f474844c
JZ
49392010-10-22 Jie Zhang <jie@codesourcery.com>
4940
4941 * Makefile.in: Add FLAGS_TO_PASS variable.
4942 (install): Remove dependency of install-only and recursively
4943 invoke make for install-only.
4944
f1048712
DE
49452010-10-04 Doug Evans <dje@google.com>
4946
4947 * Makefile.in (uninstall): Use $(DESTDIR).
4948
b53a1623
PA
49492010-09-24 Pedro Alves <pedro@codesourcery.com>
4950
e6ee044d
PA
4951 PR gdb/11842
4952
b53a1623
PA
4953 * linux-x86-low.c (compat_siginfo_from_siginfo)
4954 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
4955 si_code is < 0. Check for si_code == SI_TIMER before checking for
4956 si_code < 0.
4957
fa1bd1e4
JB
49582010-09-13 Joel Brobecker <brobecker@adacore.com>
4959
4960 * lynx-i386-low.c: New file.
4961 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
4962
47fac8f8
JB
49632010-09-13 Joel Brobecker <brobecker@adacore.com>
4964
4965 * lynx-low.c (ptrace_request_to_str): Remove handling for
4966 request values that have been removed in LynxOS 5.x.
4967
1adfc54d
JB
49682010-09-13 Joel Brobecker <brobecker@adacore.com>
4969
4970 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
4971 <ptrace.h>
4972
c2a66c29
NS
49732010-09-09 Nathan Sidwell <nathan@codesourcery.com>
4974
4975 * configure.ac: Add --enable-inprocess-agent option.
4976 * configure: Rebuilt.
4977
32fcada3
YQ
49782010-09-06 Yao Qi <yao@codesourcery.com>
4979
4980 * linux-low.c (linux_kill): Remove unused variable.
4981 (linux_stabilize_threads): Likewise.
4982 * server.c (start_inferior): Likewise.
4983 (queue_stop_reply_callback): Likewise.
4984 * tracepoint.c (do_action_at_tracepoint): Likewise.
4985
0cccb683
YQ
49862010-09-06 Yao Qi <yao@codesourcery.com>
4987
4988 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
4989 on return.
4990
423ec54c
JK
49912010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4992
4993 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
4994
12ac6819
PA
49952010-09-06 Pedro Alves <pedro@codesourcery.com>
4996
4997 * Makefile.in (install-only): Replace $IPA_DEPFILES with
4998 "$(IPA_DEPFILES)".
4999
8ed54b31
JB
50002010-09-01 Joel Brobecker <brobecker@adacore.com>
5001
5002 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
5003 gdbserver/lynx-ppc-low.c: New files.
5004 * Makefile.in (lynx_low_h): New variable.
5005 (lynx-low.o, lynx-ppc-low.o): New rules.
5006 * configure.ac: On LynxOS, link with -lnetinet.
5007 * configure.srv: Add handling of powerpc-*-lynxos* targets.
5008 * configure: regenerate.
5009
bb0116a4
JB
50102010-09-01 Joel Brobecker <brobecker@adacore.com>
5011
5012 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
5013 * configure.ac: Add check for vasprintf and vsnprintf.
5014 * configure, config.in: Regenerate.
5015 * server.h (vasprintf, vsnprintf): Add conditional declarations.
5016
a778ab81 50172010-09-01 Joel Brobecker <brobecker@adacore.com>
5018
5019 * gdbreplay.c: Move include of alloca.h up, next to include of
5020 malloc.h.
5021 * server.h: Add include of malloc.h.
5022 * mem-break.c: Remove include of malloc.h.
5023 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
5024
8b034a19 50252010-09-01 Joel Brobecker <brobecker@adacore.com>
5026
5027 * Makefile.in (memmem.o): Build with -Wno-error.
5028
50292010-09-01 Joel Brobecker <brobecker@adacore.com>
5030
5031 * utils.c (xsnprintf): Make non-static.
5032 * server.h: Add xsnprintf declaration.
5033 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
5034 replace calls to snprintf by calls to xsnprintf throughout.
5035
50362010-09-01 Joel Brobecker <brobecker@adacore.com>
5037
5038 * configure.ac: Add configure check for alloca.
5039 * configure, config.in: Regenerate.
5040 * server.h: Include alloca.h if it exists.
5041 * gdbreplay.c: Include alloca.h if it exists.
5042
1a981360
PA
50432010-08-28 Pedro Alves <pedro@codesourcery.com>
5044
5045 * linux-low.c (__SIGRTMIN): Define if not already defined.
5046 (linux_create_inferior): Check for __ANDROID__ rather than
5047 __SIGRTMIN.
5048 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
5049 are already deferred.
5050 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
5051 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
5052 stopped and already has a pending signal to report.
5053 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
5054 a pending signal to report or is moving out of a jump pad.
5055 (linux_init_signals): Check for __ANDROID__ rather than
5056 __SIGRTMIN.
5057
b4d51a55
PA
50582010-08-28 Pedro Alves <pedro@codesourcery.com>
5059
5060 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
5061 debug_threads check. Avoid a linear search when not doing debug
5062 output.
5063
ec48365d
PA
50642010-08-27 Pedro Alves <pedro@codesourcery.com>
5065
5066 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
5067 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
5068 (struct file_handler) <fd>: Change type to gdb_fildes_t.
5069 (process_event): Change local fd's type to gdb_fildes_t.
5070 (create_file_handler): Adjust prototype.
5071 (delete_file_handler): Adjust prototype.
5072 (handle_file_event): Adjust prototype. Use pfildes.
5073 (create_file_event): Adjsut prototype.
5074 * remote-utils.c (remote_desc, listen_desc): Change type to
5075 gdb_fildes_t.
5076 * server.h: New gdb_fildes_t typedef.
5077 [USE_WIN32API]: Include winsock2.h.
5078 (delete_file_handler, add_file_handler): Adjust prototypes.
5079 (pfildes): Declare.
5080 * utils.c (pfildes): New.
5081
854d88f0
PA
50822010-08-27 Pedro Alves <pedro@codesourcery.com>
5083
5084 * configure.ac (build_warnings): Add -Wno-char-subscripts.
5085 * configure: Regenerate.
5086
0146f85b
PA
50872010-08-27 Pedro Alves <pedro@codesourcery.com>
5088
5089 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
5090 (linux_done_accessing_memory): ... this.
5091 (linux_target_ops): Adjust.
5092 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
5093 * nto-low.c (nto_target_ops): Adjust comment.
5094 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
5095 * spu-low.c (spu_target_ops): Adjust comment.
5096 * target.h (target_ops): Rename unprepare_to_access_memory field
5097 to done_accessing_memory.
5098 (unprepare_to_access_memory): Rename to ...
5099 (done_accessing_memory): ... this.
5100
90d74c30
PA
51012010-08-26 Pedro Alves <pedro@codesourcery.com>
5102
5103 * linux-low.c (linux_prepare_to_access_memory): New.
5104 (linux_unprepare_to_access_memory): New.
5105 (linux_target_ops): Install them.
5106 * server.c (read_memory): Rename to ...
5107 (gdb_read_memory): ... this. Use
5108 prepare_to_access_memory/prepare_to_access_memory.
5109 (write_memory): Rename to ...
5110 (gdb_write_memory): ... this. Use
5111 prepare_to_access_memory/prepare_to_access_memory.
5112 (handle_search_memory_1): Adjust.
5113 (process_serial_event): Adjust.
5114 * target.h (struct target_ops): New fields
5115 prepare_to_access_memory and unprepare_to_access_memory.
5116 (prepare_to_access_memory, unprepare_to_access_memory): New.
5117 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
5118 prepare_to_access_memory/prepare_to_access_memory.
5119 * nto-low.c (nto_target_ops): Adjust.
5120 * spu-low.c (spu_target_ops): Adjust.
5121 * win32-low.c (win32_target_ops): Adjust.
5122
fd467969
PA
51232010-08-26 Pedro Alves <pedro@codesourcery.com>
5124
5125 * Makefile.in (WARN_CFLAGS): Get it from configure.
5126 (WERROR_CFLAGS): New.
5127 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
5128 * configure.ac: Introduce --enable-werror, which adds -Werror to
5129 the compiler command line. Enabled by default. Disable with
5130 --disable-werror. Add -Wdeclaration-after-statement
5131 Wpointer-arith and -Wformat-nonliteral to warning flags.
5132 * configure: Regenerate.
5133
331e2f5f
PA
51342010-08-26 Pedro Alves <pedro@codesourcery.com>
5135
5136 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
5137
e581f2b4
PA
51382010-08-26 Pedro Alves <pedro@codesourcery.com>
5139
5140 * gdbreplay.c (remote_error): New.
5141 (gdbchar): New.
5142 (expect): Use gdbchar. Check for error reading from GDB.
5143 Clarify sync error output.
5144 (play): Check for errors writing to GDB.
5145 * linux-low.c (sigchld_handler): Really ignore `write' errors.
5146 * remote-utils.c (getpkt): Check for errors writing to the remote
5147 descriptor.
5148
3c11dd79
PA
51492010-08-25 Pedro Alves <pedro@codesourcery.com>
5150
5151 * linux-low.c (linux_wait_1): Move non-debugging code out of
5152 `debug_threads' control.
5153
d20a8ad9
PA
51542010-08-25 Pedro Alves <pedro@codesourcery.com>
5155
5156 * linux-low.c (linux_wait_1): Don't set last_status here.
5157 * server.c (push_event, queue_stop_reply_callback): Assert we're
5158 not pushing a TARGET_WAITKIND_IGNORE event.
5159 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
5160 (myresume, handle_target_event): Set the thread's last_resume_kind
5161 and last_status from the target returned status.
5162
964e4306
PA
51632010-08-25 Pedro Alves <pedro@codesourcery.com>
5164
5165 PR threads/10729
5166
5167 * linux-x86-low.c (update_debug_registers_callback): New.
5168 (i386_dr_low_set_addr): Use it.
5169 (i386_dr_low_get_addr): New.
5170 (i386_dr_low_set_control): Use update_debug_registers_callback.
5171 (i386_dr_low_get_control): New.
5172 (i386_dr_low_get_status): Adjust.
5173 * linux-low.c (linux_stop_lwp): New.
5174 * linux-low.h (linux_stop_lwp): Declare.
5175
5176 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
5177 argument instead of a i386_debug_reg_state.
5178 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
5179 a i386_debug_reg_state.
5180 (i386_insert_aligned_watchpoint): Adjust.
5181 (i386_remove_aligned_watchpoint): Adjust.
5182 (i386_low_stopped_data_address): Read the debug registers from the
5183 inferior instead of from the mirrors.
5184 * i386-low.h (struct i386_debug_reg_state): Extend comment.
5185 (i386_dr_low_get_addr): Declare.
5186 (i386_dr_low_get_control): Declare.
5187 (i386_dr_low_get_status): Change prototype.
5188
5189 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
5190 (i386_dr_low_get_addr): New.
5191 (i386_dr_low_get_control): New.
5192 (i386_dr_low_get_status): Adjust prototype. Return
5193 dr_status_mirror.
5194 (i386_initial_stuff): Clear dr_status_mirror and
5195 dr_control_mirror.
5196 (i386_get_thread_context): Adjust.
5197 (i386_set_thread_context): Adjust.
5198 (i386_thread_added): Adjust.
5199
5f21a75b
PA
52002010-08-24 Pedro Alves <pedro@codesourcery.com>
5201
5202 * linux-low.h (linux_thread_area): Delete declaration.
5203
3e4c1235
TS
52042010-08-11 Thomas Schwinge <thomas@codesourcery.com>
5205
5206 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
5207 after its termination.
5208
1971b033
PA
52092010-08-09 Pedro Alves <pedro@codesourcery.com>
5210
5211 * linux-low.c (gdb_wants_lwp_stopped): Delete.
5212 (gdb_wants_all_stopped): Delete.
5213 (linux_wait_1): Don't call them.
5214 * server.c (handle_v_cont): Tag all threads as want-stopped.
5215 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
5216 stopped as "client-wants-stopped".
5217
310444ac
PA
52182010-07-31 Pedro Alves <pedro@codesourcery.com>
5219
5220 * Makefile.in (signals_h): New.
5221 (server_h): Depend on it.
5222 (server.o): Don't depend on $(signals_def).
5223 (signals.o): Depend on $(signals_def).
5224
a19cae16
JK
52252010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
5226
5227 * Makefile.in (signals_def): New.
5228 (server_h): Append include/gdb/signals.h and signals_def.
5229 (server.o): Append signals_def.
5230
30d50328
JK
52312010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5232
5233 * server.c (handle_target_event): Use target_signal_to_host for
5234 resume_info.sig initialization.
5235 * target.h (struct thread_resume) <sig>: New comment.
5236
5c3216e2
OS
52372010-07-20 Ozkan Sezer <sezeroz@gmail.com>
5238
c6f46ca0
OS
5239 * server.c (handle_query): strcpy() the returned string from paddress()
5240 instead of sprintf().
5c3216e2
OS
5241 * utils.c (paddress): Return phex_nz().
5242
6bd31874
JB
52432010-07-07 Joel Brobecker <brobecker@adacore.com>
5244
5245 * server.c (handle_v_cont): Call mourn_inferior if process
5246 just exited.
5247 (myresume): Likewise.
5248
0fb4aa4b
PA
52492010-07-01 Pedro Alves <pedro@codesourcery.com>
5250
5251 Static tracepoints, and integration with UST.
5252
5253 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
5254 * mem-break.c (uninsert_all_breakpoints)
5255 (reinsert_all_breakpoints): New.
5256 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
5257 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
5258 (gdb_agent_ust_loaded, helper_thread_id)
5259 (gdb_agent_helper_thread_id): New macros.
5260 (struct ipa_sym_addresses): Add addr_ust_loaded,
5261 addr_helper_thread_id, addr_cmd_buf.
5262 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
5263 (in_process_agent_loaded_ust): New.
5264 (write_e_ust_not_loaded): New.
5265 (maybe_write_ipa_ust_not_loaded): New.
5266 (struct collect_static_trace_data_action): New.
5267 (enum tracepoint_type) <static_tracepoint>: New.
5268 (struct tracepoint) <handle>: Mention static tracepoints.
5269 (struct static_tracepoint_ctx): New.
5270 (CMD_BUF_SIZE): New.
5271 (add_tracepoint_action): Handle static tracepoint actions.
5272 (unprobe_marker_at): New.
5273 (clear_installed_tracepoints): Handle static tracepoints.
5274 (cmd_qtdp): Handle static tracepoints.
5275 (probe_marker_at): New.
5276 (cmd_qtstart): Handle static tracepoints.
5277 (response_tracepoint): Handle static tracepoints.
5278 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
5279 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
5280 (get_context_regcache): Handle static tracepoints.
5281 (do_action_at_tracepoint): Handle static tracepoint actions.
5282 (traceframe_find_block_type): Handle static trace data blocks.
5283 (traceframe_read_sdata): New.
5284 (download_tracepoints): Download static tracepoint actions.
5285 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
5286 (GDB_PROBE_NAME): New.
5287 (ust_ops): New.
5288 (GET_UST_SYM): New.
5289 (USTF): New.
5290 (dlsym_ust): New.
5291 (ust_marker_to_static_tracepoint): New.
5292 (gdb_probe): New.
5293 (collect_ust_data_at_tracepoint): New.
5294 (gdb_ust_probe): New.
5295 (UNIX_PATH_MAX, SOCK_DIR): New.
5296 (gdb_ust_connect_sync_socket): New.
5297 (resume_thread, stop_thread): New.
5298 (run_inferior_command): New.
5299 (init_named_socket): New.
5300 (gdb_ust_socket_init): New.
5301 (cstr_to_hexstr): New.
5302 (next_st): New.
5303 (first_marker, next_marker): New.
5304 (response_ust_marker): New.
5305 (cmd_qtfstm, cmd_qtsstm): New.
5306 (unprobe_marker_at, probe_marker_at): New.
5307 (cmd_qtstmat, gdb_ust_thread): New.
5308 (gdb_ust_init): New.
5309 (initialize_tracepoint_ftlib): Call gdb_ust_init.
5310 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
5311 (ST_REGENTRY): New.
5312 (x86_64_st_collect_regmap): New.
5313 (X86_64_NUM_ST_COLLECT_GREGS): New.
5314 (AMD64_RIP_REGNUM): New.
5315 (supply_static_tracepoint_registers): New.
5316 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
5317 (ST_REGENTRY): New.
5318 (i386_st_collect_regmap): New.
5319 (i386_NUM_ST_COLLECT_GREGS): New.
5320 (supply_static_tracepoint_registers): New.
5321 * server.c (handle_query): Handle qXfer:statictrace:read.
5322 <qSupported>: Report support for StaticTracepoints, and
5323 qXfer:statictrace:read features.
5324 * server.h (traceframe_read_sdata)
5325 (supply_static_tracepoint_registers): Declare.
5326 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
5327 (unpack_varlen_hex): Include in IPA build.
5328 * Makefile.in (ustlibs, ustinc): New.
5329 (IPA_OBJS): Add remote-utils-ipa.o.
5330 ($(IPA_LIB)): Link -ldl and -lpthread.
5331 (UST_CFLAGS): New.
5332 (IPAGENT_CFLAGS): Add UST_CFLAGS.
5333 * config.in, configure: Regenerate.
5334
9e4344e5
PA
53352010-06-20 Ian Lance Taylor <iant@google.com>
5336 Pedro Alves <pedro@codesourcery.com>
5337
5338 * linux-x86-low.c (always_true): Delete.
5339 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
5340 trying to fool the compiler with always_true.
5341
c6beb2cb
PA
53422010-06-20 Pedro Alves <pedro@codesourcery.com>
5343
5344 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
5345 conditions in gdbserver.
5346
d2ed6730
UW
53472010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
5348
5349 * spu-low.c (spu_read_memory): Wrap around local store limit.
5350 (spu_write_memory): Likewise.
5351
4e29fb54
PA
53522010-06-15 Pedro Alves <pedro@codesourcery.com>
5353
5354 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
5355 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
5356 LONGEST uses.
5357 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
5358 uses.
5359 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
5360 uses with LONGEST uses.
5361
6a271cae
PA
53622010-06-14 Stan Shebs <stan@codesourcery.com>
5363 Pedro Alves <pedro@codesourcery.com>
5364
5365 Bytecode compiler.
5366
5367 * linux-x86-low.c: Include limits.h.
5368 (add_insns): New.
5369 (always_true): New.
5370 (EMIT_ASM): New.
5371 (EMIT_ASM32): New.
5372 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
5373 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
5374 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
5375 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
5376 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
5377 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
5378 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
5379 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
5380 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
5381 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
5382 (amd64_emit_void_call_2): New.
5383 (amd64_emit_ops): New.
5384 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
5385 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
5386 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
5387 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
5388 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
5389 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
5390 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
5391 (i386_emit_call, i386_emit_reg, i386_emit_pop)
5392 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
5393 (i386_emit_stack_adjust, i386_emit_int_call_1)
5394 (i386_emit_void_call_2): New.
5395 (i386_emit_ops): New.
5396 (x86_emit_ops): New.
5397 (the_low_target): Install x86_emit_ops.
5398 * server.h (struct emit_ops): New.
5399 (get_raw_reg_func_addr): Declare.
5400 (current_insn_ptr, emit_error): Declare.
5401 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
5402 (set_trace_state_variable_value): New defines.
5403 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
5404 addr_get_trace_state_variable_value and
5405 addr_set_trace_state_variable_value.
5406 (symbol_list): New fields for get_raw_reg,
5407 get_trace_state_variable_value and set_trace_state_variable_value.
5408 (condfn): New typedef.
5409 (struct tracepoint): New field `compiled_cond'.
5410 (do_action_at_tracepoint): Clear compiled_cond.
5411 (get_trace_state_variable_value, set_trace_state_variable_value):
5412 Export in the IPA.
5413 (condition_true_at_tracepoint): If there's a compiled condition,
5414 run that.
5415 (current_insn_ptr, emit_error): New globals.
5416 (struct bytecode_address): New.
5417 (get_raw_reg_func_addr): New.
5418 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
5419 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
5420 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
5421 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
5422 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
5423 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
5424 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
5425 (compile_tracepoint_condition, compile_bytecodes): New.
5426 * target.h (emit_ops): Forward declare.
5427 (struct target_ops): New field emit_ops.
5428 (target_emit_ops): New.
5429 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
5430 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
5431 * linux-low.c (linux_emit_ops): New.
5432 (linux_target_ops): Install it.
5433 * linux-low.h (struct linux_target_ops): New field emit_ops.
5434
92b72907
UW
54352010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
5436
5437 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
5438 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
5439
fa593d66
PA
54402010-06-01 Pedro Alves <pedro@codesourcery.com>
5441 Stan Shebs <stan@codesourcery.com>
5442
5443 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
5444 (all): Depend on $(extra_libraries).
5445 (install-only): Install the IPA.
5446 (IPA_OBJS, IPA_LIB): New.
5447 (clean): Remove the IPA lib.
5448 (IPAGENT_CFLAGS): New.
5449 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
5450 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
5451 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
5452 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
5453 * configure.ac: Check for atomic builtins support in the compiler.
5454 (IPA_DEPFILES, extra_libraries): Define.
5455 * configure.srv (ipa_obj): Add description.
5456 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
5457 (i[34567]86-*-linux*): Set ipa_obj.
5458 (x86_64-*-linux*): Set ipa_obj.
5459 * linux-low.c (stabilizing_threads): New.
5460 (supports_fast_tracepoints): New.
5461 (linux_detach): Stabilize threads before detaching.
5462 (handle_tracepoints): Handle internal tracing breakpoints. Assert
5463 the lwp is either not stabilizing, or is moving out of a jump pad.
5464 (linux_fast_tracepoint_collecting): New.
5465 (maybe_move_out_of_jump_pad): New.
5466 (enqueue_one_deferred_signal): New.
5467 (dequeue_one_deferred_signal): New.
5468 (linux_wait_for_event_1): If moving out of a jump pad, defer
5469 pending signals to later.
5470 (linux_stabilize_threads): New.
5471 (linux_wait_1): Check if threads need moving out of jump pads, and
5472 do it if so.
5473 (stuck_in_jump_pad_callback): New.
5474 (move_out_of_jump_pad_callback): New.
5475 (lwp_running): New.
5476 (linux_resume_one_lwp): Handle moving out of jump pads.
5477 (linux_set_resume_request): Dequeue deferred signals.
5478 (need_step_over_p): Also step over fast tracepoint jumps.
5479 (start_step_over): Also uninsert fast tracepoint jumps.
5480 (finish_step_over): Also reinsert fast tracepoint jumps.
5481 (linux_install_fast_tracepoint_jump): New.
5482 (linux_target_ops): Install linux_stabilize_threads and
5483 linux_install_fast_tracepoint_jump_pad.
5484 * linux-low.h (linux_target_ops) <get_thread_area,
5485 install_fast_tracepoint_jump_pad>: New fields.
5486 (struct lwp_info) <collecting_fast_tracepoint,
5487 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
5488 (linux_get_thread_area): Declare.
5489 * linux-x86-low.c (jump_insn): New.
5490 (x86_get_thread_area): New.
5491 (append_insns): New.
5492 (push_opcode): New.
5493 (amd64_install_fast_tracepoint_jump_pad): New.
5494 (i386_install_fast_tracepoint_jump_pad): New.
5495 (x86_install_fast_tracepoint_jump_pad): New.
5496 (the_low_target): Install x86_get_thread_area and
5497 x86_install_fast_tracepoint_jump_pad.
5498 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
5499 (struct fast_tracepoint_jump): New.
5500 (fast_tracepoint_jump_insn): New.
5501 (fast_tracepoint_jump_shadow): New.
5502 (find_fast_tracepoint_jump_at): New.
5503 (fast_tracepoint_jump_here): New.
5504 (delete_fast_tracepoint_jump): New.
5505 (set_fast_tracepoint_jump): New.
5506 (uninsert_fast_tracepoint_jumps_at): New.
5507 (reinsert_fast_tracepoint_jumps_at): New.
5508 (set_breakpoint_at): Use write_inferior_memory.
5509 (uninsert_raw_breakpoint): Use write_inferior_memory.
5510 (check_mem_read): Mask out fast tracepoint jumps.
5511 (check_mem_write): Mask out fast tracepoint jumps.
5512 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
5513 (set_fast_tracepoint_jump): Declare.
5514 (delete_fast_tracepoint_jump)
5515 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
5516 (reinsert_fast_tracepoint_jumps_at): Declare.
5517 * regcache.c: Don't compile many functions when building the
5518 in-process agent library.
5519 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
5520 the register buffer in the heap.
5521 (free_register_cache): If the register buffer isn't owned by the
5522 regcache, don't free it.
5523 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
5524 pre-existing register caches.
5525 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
5526 type.
5527 (convert_ascii_to_int): : Constify `from' parameter type.
5528 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
5529 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
5530 the needed buffer in-place.
5531 (relocate_instruction): New.
5532 * server.c (handle_query) <qSymbols>: If the target supports
5533 tracepoints, give it a chance of looking up symbols. Report
5534 support for fast tracepoints.
5535 (handle_status): Stabilize threads.
5536 (process_serial_event): Adjust.
5537 * server.h (struct fast_tracepoint_jump): Forward declare.
5538 (struct process_info) <fast_tracepoint_jumps>: New field.
5539 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
5540 (decode_X_packet, decode_M_packet): Adjust.
5541 (relocate_instruction): Declare.
5542 (in_process_agent_loaded): Declare.
5543 (tracepoint_look_up_symbols): Declare.
5544 (struct fast_tpoint_collect_status): Declare.
5545 (fast_tracepoint_collecting): Declare.
5546 (force_unlock_trace_buffer): Declare.
5547 (handle_tracepoint_bkpts): Declare.
5548 (initialize_low_tracepoint)
5549 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
5550 * target.h (struct target_ops) <stabilize_threads,
5551 install_fast_tracepoint_jump_pad>: New fields.
5552 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
5553 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
5554 [HAVE_STDINT_H]: Include stdint.h.
5555 (trace_debug_1): Rename to ...
5556 (trace_vdebug): ... this.
5557 (trace_debug): Rename to ...
5558 (trace_debug_1): ... this. Add `level' parameter.
5559 (trace_debug): New.
5560 (ATTR_USED, ATTR_NOINLINE): New.
5561 (IP_AGENT_EXPORT): New.
5562 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5563 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
5564 (about_to_request_buffer_space, trace_buffer_is_full)
5565 (stopping_tracepoint, expr_eval_result, error_tracepoint)
5566 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
5567 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
5568 (traceframe_write_count, traceframes_created)
5569 (trace_state_variables)
5570 New renaming defines.
5571 (struct ipa_sym_addresses): New.
5572 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
5573 (symbol_list): New.
5574 (ipa_sym_addrs): New.
5575 (all_tracepoint_symbols_looked_up): New.
5576 (in_process_agent_loaded): New.
5577 (write_e_ipa_not_loaded): New.
5578 (maybe_write_ipa_not_loaded): New.
5579 (tracepoint_look_up_symbols): New.
5580 (debug_threads) [IN_PROCESS_AGENT]: New.
5581 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
5582 (UNKNOWN_SIDE_EFFECTS): New.
5583 (stop_tracing): New.
5584 (flush_trace_buffer): New.
5585 (stop_tracing_bkpt): New.
5586 (flush_trace_buffer_bkpt): New.
5587 (read_inferior_integer): New.
5588 (read_inferior_uinteger): New.
5589 (read_inferior_data_pointer): New.
5590 (write_inferior_data_pointer): New.
5591 (write_inferior_integer): New.
5592 (write_inferior_uinteger): New.
5593 (struct collect_static_trace_data_action): Delete.
5594 (enum tracepoint_type): New.
5595 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
5596 <actions_str, step_actions, step_actions_str>: Only include in
5597 GDBserver.
fa593d66
PA
5598 <orig_size, obj_addr_on_target, adjusted_insn_addr>
5599 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
5600 (tracepoints): Use IP_AGENT_EXPORT.
5601 (last_tracepoint): Don't include in the IPA.
5602 (stopping_tracepoint): Use IP_AGENT_EXPORT.
5603 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
5604 (alloced_trace_state_variables): New.
5605 (trace_state_variables): Use IP_AGENT_EXPORT.
5606 (traceframe_t): Delete unused variable.
5607 (circular_trace_buffer): Don't include in the IPA.
5608 (trace_buffer_start): Delete.
5609 (struct trace_buffer_control): New.
5610 (trace_buffer_free): Delete.
5611 (struct ipa_trace_buffer_control): New.
5612 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
5613 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
5614 New.
5615 (trace_buffer_ctrl): New.
5616 (TRACE_BUFFER_CTRL_CURR): New.
5617 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
5618 Reimplement as macros.
5619 (trace_buffer_wrap): Delete.
5620 (traceframe_write_count, traceframe_read_count)
5621 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
5622 (struct tracepoint_hit_ctx) <type>: New field.
5623 (struct fast_tracepoint_ctx): New.
5624 (memory_barrier): New.
5625 (cmpxchg): New.
5626 (record_tracepoint_error): Update atomically in the IPA.
5627 (clear_inferior_trace_buffer): New.
5628 (about_to_request_buffer_space): New.
5629 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
5630 updating the same buffer.
5631 (add_tracepoint): Default the tracepoint's type to trap
5632 tracepoint, and orig_size to -1.
5633 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
5634 internal variables.
5635 (create_trace_state_variable): New parameter `gdb'. Handle it.
5636 (clear_installed_tracepoints): Clear fast tracepoint jumps.
5637 (cmd_qtdp): Handle fast tracepoints.
5638 (cmd_qtdv): Adjust.
5639 (max_jump_pad_size): New.
5640 (gdb_jump_pad_head): New.
5641 (get_jump_space_head): New.
5642 (claim_jump_space): New.
5643 (sort_tracepoints): New.
5644 (MAX_JUMP_SIZE): New.
5645 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
5646 IPA.
5647 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
5648 support. Upload fast traceframes, and delete internal IPA
5649 breakpoints.
5650 (stop_tracing_handler): New.
5651 (flush_trace_buffer_handler): New.
5652 (cmd_qtstop): Upload fast tracepoints.
5653 (response_tracepoint): Handle fast tracepoints.
5654 (tracepoint_finished_step): Upload fast traceframes. Set the
5655 tracepoint hit context's tracepoint type.
5656 (handle_tracepoint_bkpts): New.
5657 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
5658 type. Add comment about fast tracepoints.
5659 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
5660 non-existing action_str field.
5661 (get_context_regcache): Handle fast tracepoints.
5662 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
5663 to the regcache.
5664 (fast_tracepoint_from_jump_pad_address): New.
5665 (fast_tracepoint_from_ipa_tpoint_address): New.
5666 (collecting_t): New.
5667 (force_unlock_trace_buffer): New.
5668 (fast_tracepoint_collecting): New.
5669 (collecting): New.
5670 (gdb_collect): New.
5671 (write_inferior_data_ptr): New.
5672 (target_tp_heap): New.
5673 (target_malloc): New.
5674 (download_agent_expr): New.
5675 (UALIGN): New.
5676 (download_tracepoints): New.
5677 (download_trace_state_variables): New.
5678 (upload_fast_traceframes): New.
5679 (IPA_FIRST_TRACEFRAME): New.
5680 (IPA_NEXT_TRACEFRAME_1): New.
5681 (IPA_NEXT_TRACEFRAME): New.
5682 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
5683 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
5684 (gdb_jump_pad_buffer_end): New.
5685 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
5686 (initialize_tracepoint): Adjust.
5687 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
5688 buffer. Initialize the low module.
5689 * utils.c (PREFIX, TOOLNAME): New.
5690 (malloc_failure): Use PREFIX.
5691 (error): In the IPA, an error causes an exit.
5692 (fatal, warning): Use PREFIX.
5693 (internal_error): Use TOOLNAME.
5694 (NUMCELLS): Increase to 10.
5695 * configure, config.in: Regenerate.
5696
d149dd1d
PA
56972010-06-01 Pedro Alves <pedro@codesourcery.com>
5698
5699 * server.c (handle_query) <qSupported>: Do two passes over the
5700 qSupported string to avoid nesting strtok.
5701
f6528abd
JK
57022010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5703
5704 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
5705 (CDEPS): New.
5706 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
5707 -Wl,--dynamic-list.
5708 * configure: Regenerate.
5709 * proc-service.list: New.
5710
ca2a87a0
JK
57112010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5712
5713 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
5714 New comment.
5715
363a6e9f
OS
57162010-05-26 Ozkan Sezer <sezeroz@gmail.com>
5717
5718 * gdbreplay.c (remote_open): Check error return from socket() call by
5719 its equality to -1 not by it being negative.
5720 * remote-utils.c (remote_open): Likewise.
5721
d23b6cb1
PA
57222010-05-23 Pedro Alves <pedro@codesourcery.com>
5723
5724 * config.h: Regenerate.
5725
28d3cf85
MK
57262010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
5727
5728 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
5729 doesn't provide PTRACE_GET_THREAD_AREA.
5730
fea36a59
MK
57312010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
5732
5733 * linux-m68k-low.c: Include <asm/ptrace.h>
5734 (ps_get_thread_area): Implement.
5735
24b066ba
DE
57362010-05-03 Doug Evans <dje@google.com>
5737
5738 * event-loop.c (struct callback_event): New struct.
5739 (callback_list): New global.
5740 (append_callback_event, delete_callback_event): New functions.
5741 (process_callback): New function.
5742 (start_event_loop): Call it.
5743 * remote-utils.c (NOT_SCHEDULED): Define.
5744 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
5745 moved out of readchar.
5746 (readchar): Rewrite. Call reschedule before returning.
5747 (reset_readchar): New function.
5748 (remote_close): Call it.
5749 (process_remaining, reschedule): New functions.
5750 * server.h (callback_handler_func): New typedef.
5751 (append_callback_event, delete_callback_event): Declare.
5752
9836d6ea
PA
57532010-05-03 Pedro Alves <pedro@codesourcery.com>
5754
5755 * proc-service.c (ps_pglobal_lookup): Use
5756 thread_db_look_up_one_symbol.
5757 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
5758 parameter. Use it instead of all_symbols_looked_up.
5759 * server.h (struct process_info) <all_symbols_looked_up>: Delete
5760 field.
5761 (all_symbols_looked_up): Don't declare.
5762 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
5763 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
5764 field.
5765 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
5766 Set all_symbols_looked_up here.
5767 (thread_db_look_up_one_symbol): New.
5768 (thread_db_get_tls_address): Adjust.
5769 (thread_db_load_search, try_thread_db_load_1): Always allocate the
5770 thread_db object on the heap, and tentatively set it in the
5771 process structure.
5772 (thread_db_init): Don't set all_symbols_looked_up here.
5773 * linux-low.h (thread_db_look_up_one_symbol): Declare.
5774
7984d532
PA
57752010-05-03 Pedro Alves <pedro@codesourcery.com>
5776
5777 * linux-low.c (linux_kill, linux_detach): Adjust.
5778 (status_pending_p_callback): Remove redundant statement. Check
5779 for !TARGET_WAITIKIND_IGNORE, instead of
5780 TARGET_WAITKIND_STOPPED.
5781 (handle_tracepoints): Make sure LWP is locked. Adjust.
5782 (linux_wait_for_event_1): Adjust.
5783 (linux_cancel_breakpoints): New.
5784 (unsuspend_one_lwp): New.
5785 (unsuspend_all_lwps): New.
5786 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
5787 (send_sigstop_callback): Change return type to int, add new
5788 `except' parameter and handle it.
5789 (suspend_and_send_sigstop_callback): New.
5790 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
5791 pass them down. If SUSPEND, also increment the lwp's suspend
5792 count.
5793 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
5794 (need_step_over_p): Don't consider suspended LWPs.
5795 (start_step_over): Adjust.
5796 (proceed_one_lwp): Change return type to int, add new `except'
5797 parameter and handle it.
5798 (unsuspend_and_proceed_one_lwp): New.
5799 (proceed_all_lwps): Use find_inferior instead of
5800 for_each_inferior.
5801 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
5802 also decrement the suspend count of LWPs. Pass `except' down,
5803 instead of hacking its suspend count.
5804 (linux_pause_all): Add `freeze' parameter. Adjust.
5805 (linux_unpause_all): New.
5806 (linux_target_ops): Install linux_unpause_all.
5807 * server.c (handle_status): Adjust.
5808 * target.h (struct target_ops): New fields `unpause_all' and
5809 `cancel_breakpoints'. Add new parameter to `pause_all'.
5810 (pause_all): Add new `freeze' parameter.
5811 (unpause_all): New.
5812 (cancel_breakpoints): New.
5813 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
5814 cancel breakpoints.
5815 (cmd_qtstart): Pause threads.
5816 (stop_tracing): Pause threads, and cancel breakpoints.
5817 * win32-low.c (win32_target_ops): Adjust.
5818
e471f25b
PA
58192010-05-03 Pedro Alves <pedro@codesourcery.com>
5820
5821 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
5822 the inferior right away from here...
5823 (linux_wait_1): ... to here, and adjust to check the thread's
5824 last_resume_kind instead of the lwp's step or stop_expected flags.
5825
1915ef4f
PA
58262010-05-02 Pedro Alves <pedro@codesourcery.com>
5827
5828 * README: Use consistent `GDB' and `GDBserver' spellings.
5829
f9e39928
PA
58302010-05-02 Pedro Alves <pedro@codesourcery.com>
5831
5832 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
5833 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
5834 (linux_detach_one_lwp): Assume the lwp is stopped.
5835 (any_thread_of): Delete.
5836 (linux_detach): Stop all lwps here. Don't blindly delete all
5837 breakpoints.
5838 (delete_lwp_callback): New.
5839 (linux_mourn): Delete all lwps of the process that is gone.
5840 (linux_wait_1): Don't delete the last lwp of the process here.
5841 * mem-break.h (mark_breakpoints_out): Declare.
5842 * mem-break.c (mark_breakpoints_out): New.
5843 (free_all_breakpoints): Use it.
5844 * server.c (handle_target_event): If the process is gone, mark
5845 breakpoints out.
5846 * thread-db.c (struct thread_db) <create_bp>: New field.
5847 (thread_db_enable_reporting): Fix prototype. Store a thread event
5848 breakpoint reference in the thread_db struct.
5849 (thread_db_load_search): Clear the thread_db object.
5850 (try_thread_db_load_1): Ditto.
5851 (switch_to_process): New.
5852 (disable_thread_event_reporting): Use it.
5853 (remove_thread_event_breakpoints): New.
5854 (thread_db_detach, thread_db_mourn): Use it.
5855
1e7fc18c
PA
58562010-05-01 Pedro Alves <pedro@codesourcery.com>
5857
5858 * linux-low.c (linux_enable_event_reporting): New.
5859 (linux_wait_for_event_1, handle_extended_wait): Use it.
5860
02fc4de7
PA
58612010-04-30 Pedro Alves <pedro@codesourcery.com>
5862
5863 * linux-low.c (linux_kill_one_lwp, linux_kill)
5864 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
5865 (send_sigstop): Take an lwp_info as parameter instead. Queue a
5866 SIGSTOP even if the LWP is stopped.
5867 (send_sigstop_callback): New.
5868 (stop_all_lwps): Use send_sigstop_callback instead.
5869 (linux_resume_one_thread): Adjust.
5870 (proceed_one_lwp): Still proceed an LWP that the client has
5871 requested to stop, if we haven't reported it as stopped yet. Make
5872 sure that LWPs the client want stopped, have a pending SIGSTOP.
5873
bc3b5632
DE
58742010-04-26 Doug Evans <dje@google.com>
5875
ae1ada35
DE
5876 * server.c (handle_general_set): Make static.
5877
bc3b5632
DE
5878 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
5879 Print received char after testing for error/eof instead of before.
5880 (input_interrupt): Tweak comment.
5881
65730243
DE
58822010-04-23 Doug Evans <dje@google.com>
5883
5884 * server.c (start_inferior): Print inferior argv if --debug.
5885
a8ae7dc0
AR
58862010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
5887
5888 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
5889 * nto-x86-low.c: Include server.h
5890
1c07cc19
PM
58912010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
5892
5893 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
5894 be consistent with other sources of this directory.
5895 (init_registers_amd64): Correct name of source file of this function
5896 in the comment.
5897
e0a61e09
PM
58982010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
5899
5900 * configure.srv (x86_64-*-mingw*): New configuration for Windows
5901 64-bit executables.
5902
54709339
PM
59032010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
5904
5905 * win32-i386-low.c: Add 64-bit support.
5906 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
5907 (init_registers_amd64): Declare.
5908 (mappings): Add 64-bit version of array.
5909 (init_windows_x86): New function.
5910 (the_low_target): Change init_arch field to init_windows_x86.
5911
e8f0053d
PM
59122010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
5913
5914 * win32-low.c: Adapt to support also 64-bit architecture.
5915 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
5916 (get_image_name): Use SIZE_T type for local variable `done'.
5917 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
5918 (toolhelp_get_dll_name): Idem.
5919 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
5920 Use uintptr_t typecast to avoid warning.
5921 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
5922 (handle_exception): Use phex_nz to avoid warning.
5923 (win32_wait): Remove unused local variable `process'.
5924
c481e77e
PM
59252010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
5926
5927 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
5928 `amd64-avx.o'.
5929
12ea4b69
PM
59302010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
5931
5932 * configure.ac: Use `ws2_32' library for srv_mingw.
5933 * configure: Regenerate.
5934 * gdbreplay.c: Include winsock2.h instead of winsock.h.
5935 * remote-utils.c: Likewise.
5936
f6d1620c
L
59372010-04-17 H.J. Lu <hongjiu.lu@intel.com>
5938
5939 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
5940 if __x86_64__ is defined.
5941
8e642873
PM
59422010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
5943
5944 * configure: Regenerate.
5945
711e434b
PM
59462010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
5947
5948 * server.c (handle_query): Handle 'qGetTIBAddr' query.
5949 * target.h (target_ops): New get_tib_address field.
5950 * win32-low.h (win32_thread_info): Add thread_local_base field.
5951 * win32-low.c (child_add_thread): Add tlb argument.
5952 Set thread_local_base field to TLB.
5953 (get_child_debug_event): Adapt to child_add_thread change.
5954 (win32_get_tib_address): New function.
5955 (win32_target_ops): Set get_tib_address field to
5956 win32_get_tib_address.
5957 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
5958
505106cd
PA
59592010-04-12 Pedro Alves <pedro@codesourcery.com>
5960
505106cd
PA
5961 * linux-low.c (linux_mourn): Also remove the process.
5962 * server.c (handle_target_event): Don't remove the process here.
5963 * nto-low.c (nto_mourn): New.
5964 (nto_target_ops): Install it.
5965 * spu-low.c (spu_mourn): New.
5966 (spu_target_ops): Install it.
5967 * win32-low.c (win32_mourn): New.
5968 (win32_target_ops): Install it.
5969
e8470a06
PA
59702010-04-12 Pedro Alves <pedro@codesourcery.com>
5971
5972 * server.h (buffer_xml_printf): Remove redundant `;'.
5973
45ba0d02
PA
59742010-04-12 Pedro Alves <pedro@codesourcery.com>
5975
5976 * regcache.c (set_register_cache): Invalidate regcaches before
5977 changing the register cache layout.
5978 (regcache_invalidate_one): Allow a NULL regcache.
5979 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
5980 regcaches before changing the register cache layout or the target
5981 regsets.
5982
59e04013
L
59832010-04-12 H.J. Lu <hongjiu.lu@intel.com>
5984
5985 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
5986 variable warning on Linux/x86-64.
5987
8336d594
PA
59882010-04-11 Pedro Alves <pedro@codesourcery.com>
5989
5990 GDBserver disconnected tracing support.
5991
5992 * linux-low.c (linux_remove_process): Delete.
5993 (add_lwp): Don't set last_resume_kind here.
5994 (linux_kill): Use `mourn'.
5995 (linux_detach): Use `thread_db_detach', and `mourn'.
5996 (linux_mourn): New.
5997 (linux_attach_lwp_1): Adjust comment.
5998 (linux_attach): last_resume_kind moved the thread_info; adjust.
5999 (status_pending_p_callback): Adjust.
6000 (linux_wait_for_event_1): Adjust.
6001 (count_events_callback, select_singlestep_lwp_callback)
6002 (select_event_lwp_callback, cancel_breakpoints_callback)
6003 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
6004 (proceed_one_lwp): Adjust.
6005 (linux_async): Add debug output.
6006 (linux_thread_stopped): New.
6007 (linux_pause_all): New.
6008 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
6009 linux_pause_all.
6010 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
6011 (thread_db_free): Delete declaration.
6012 (thread_db_detach, thread_db_mourn): Declare.
6013 * thread-db.c (thread_db_init): Use thread_db_mourn.
6014 (thread_db_free): Delete, split in two.
6015 (disable_thread_event_reporting): New.
6016 (thread_db_detach): New.
6017 (thread_db_mourn): New.
6018
6019 * server.h (struct thread_info) <last_resume_kind>: New field.
6020 <attached>: Add comment.
6021 <gdb_detached>: New field.
6022 (handler_func): Change return type to int.
6023 (handle_serial_event, handle_target_event): Ditto.
6024 (gdb_connected): Declare.
6025 (tracing): Delete.
6026 (disconnected_tracing): Declare.
6027 (stop_tracing): Declare.
6028
6029 * server.c (handle_query) <qSupported>: Report support for
6030 disconnected tracing.
6031 (queue_stop_reply_callback): Account for running threads.
6032 (gdb_wants_thread_stopped): New.
6033 (gdb_wants_all_threads_stopped): New.
6034 (gdb_reattached_process): New.
6035 (handle_status): Clear the `gdb_detached' flag of all processes.
6036 In all-stop, stop all threads.
6037 (main): Be sure to leave tfind mode. Handle disconnected tracing.
6038 (process_serial_event): If the remote connection breaks, or if an
6039 exit was forced with "monitor exit", force an event loop exit.
6040 Handle disconnected tracing on detach.
6041 (handle_serial_event): Adjust.
6042 (handle_target_event): If GDB isn't connected, forward events back
6043 to the inferior, unless the last process exited, in which case,
6044 exit gdbserver. Adjust interface.
6045
6046 * remote-utils.c (remote_open): Don't block in accept. Instead
6047 register an event loop source on the listen socket file
6048 descriptor. Refactor bits into ...
6049 (listen_desc): ... this new global.
6050 (gdb_connected): ... this new function.
6051 (enable_async_notification): ... this new function.
6052 (handle_accept_event): ... this new function.
6053 (remote_close): Clear remote_desc.
6054
6055 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
6056
6057 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
6058 New fields.
6059 (mourn_inferior): Define.
6060 (target_process_qsupported): Avoid the dangling else problem.
6061 (thread_stopped): Define.
6062 (pause_all): Define.
6063 (target_waitstatus_to_string): Declare.
6064 * target.c (target_waitstatus_to_string): New.
6065
6066 * tracepoint.c (tracing): Make extern.
6067 (disconnected_tracing): New.
6068 (stop_tracing): Make extern. Handle tracing stops due to GDB
6069 disconnecting.
6070 (cmd_qtdisconnected): New.
6071 (cmd_qtstatus): Report disconnected tracing status in trace reply.
6072 (handle_tracepoint_general_set): Handle QTDisconnected.
6073
6074 * event-loop.c (event_handler_func): Change return type to int.
6075 (process_event): Bail out if the event handler wants the event
6076 loop to stop.
6077 (handle_file_event): Ditto.
6078 (start_event_loop): Bail out if the event handler wants the event
6079 loop to stop.
6080
6081 * nto-low.c (nto_target_ops): Adjust.
6082 * spu-low.c (spu_wait): Don't remove the process here.
6083 (spu_target_ops): Adjust.
6084 * win32-low.c (win32_wait): Don't remove the process here.
6085 (win32_target_ops): Adjust.
6086
5d267c4c
PA
60872010-04-11 Pedro Alves <pedro@codesourcery.com>
6088
6089 * regcache.c (realloc_register_cache): Invalidate inferior's
6090 regcache before recreating it.
6091
623ccd72
PA
60922010-04-09 Pedro Alves <pedro@codesourcery.com>
6093
6094 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
6095
219f2f23
PA
60962010-04-09 Stan Shebs <stan@codesourcery.com>
6097 Pedro Alves <pedro@codesourcery.com>
6098
6099 * server.h (LONGEST): New.
6100 (struct thread_info) <while_stepping>: New field.
6101 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
6102 Declare.
6103 (initialize_tracepoint, handle_tracepoint_general_set)
6104 (handle_tracepoint_query, tracepoint_finished_step)
6105 (tracepoint_was_hit, release_while_stepping_state_list):
6106 (current_traceframe): Declare.
6107 * server.c (handle_general_set): Handle tracepoint packets.
6108 (read_memory): New.
6109 (write_memory): New.
6110 (handle_search_memory_1): Use read_memory.
6111 (handle_query): Report support for conditional tracepoints, trace
6112 state variables, and tracepoint sources. Handle tracepoint
6113 queries.
6114 (main): Initialize the tracepoints module.
6115 (process_serial_event): Handle traceframe reads/writes.
6116
6117 * linux-low.c (handle_tracepoints): New.
6118 (linux_wait_1): Call it.
6119 (linux_resume_one_lwp): Handle while-stepping.
6120 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
6121 (linux_target_ops): Install them.
6122 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
6123 New field.
6124 * linux-x86-low.c (x86_supports_tracepoints): New.
6125 (the_low_target). Install it.
6126
6127 * mem-break.h (delete_breakpoint): Declare.
6128 * mem-break.c (delete_breakpoint): Make external.
6129
6130 * target.h (struct target_ops): Add `supports_tracepoints',
6131 `read_pc', and `write_pc' fields.
6132 (target_supports_tracepoints): Define.
6133 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
6134 (phex_nz): New.
6135
6136 * regcache.h (struct regcache) <registers_owned>: New field.
6137 (init_register_cache, regcache_cpy): Declare.
6138 (regcache_read_pc, regcache_write_pc): Declare.
6139 (register_cache_size): Declare.
6140 (supply_regblock): Declare.
6141 * regcache.c (init_register_cache): New.
6142 (new_register_cache): Use it.
6143 (regcache_cpy): New.
6144 (register_cache_size): New.
6145 (supply_regblock): New.
6146 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 6147
219f2f23
PA
6148 * tracepoint.c: New.
6149
6150 * Makefile.in (OBS): Add tracepoint.o.
6151 (tracepoint.o): New rule.
6152
3a13a53b
L
61532010-04-08 H.J. Lu <hongjiu.lu@intel.com>
6154
6155 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
6156 (i386-mmx.o): New.
6157 (i386-mmx.c): Likewise.
6158 (i386-mmx-linux.o): Likewise.
6159 (i386-mmx-linux.c): Likewise.
6160
6161 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
6162 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
6163 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
6164 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
6165
6166 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
6167 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
6168 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
6169
1570b33e
L
61702010-04-07 H.J. Lu <hongjiu.lu@intel.com>
6171
6172 * Makefile.in (clean): Updated.
6173 (i386-avx.o): New.
6174 (i386-avx.c): Likewise.
6175 (i386-avx-linux.o): Likewise.
6176 (i386-avx-linux.c): Likewise.
6177 (amd64-avx.o): Likewise.
6178 (amd64-avx.c): Likewise.
6179 (amd64-avx-linux.o): Likewise.
6180 (amd64-avx-linux.c): Likewise.
6181
6182 * configure.srv (srv_i386_regobj): Add i386-avx.o.
6183 (srv_i386_linux_regobj): Add i386-avx-linux.o.
6184 (srv_amd64_regobj): Add amd64-avx.o.
6185 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
6186 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
6187 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
6188 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
6189 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
6190 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
6191 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
6192
6193 * i387-fp.c: Include "i386-xstate.h".
6194 (i387_xsave): New.
6195 (i387_cache_to_xsave): Likewise.
6196 (i387_xsave_to_cache): Likewise.
6197 (x86_xcr0): Likewise.
6198
6199 * i387-fp.h (i387_cache_to_xsave): Likewise.
6200 (i387_xsave_to_cache): Likewise.
6201 (x86_xcr0): Likewise.
6202
6203 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
6204 * linux-crisv32-low.c (target_regsets): Likewise.
6205 * linux-m68k-low.c (target_regsets): Likewise.
6206 * linux-mips-low.c (target_regsets): Likewise.
6207 * linux-ppc-low.c (target_regsets): Likewise.
6208 * linux-s390-low.c (target_regsets): Likewise.
6209 * linux-sh-low.c (target_regsets): Likewise.
6210 * linux-sparc-low.c (target_regsets): Likewise.
6211 * linux-xtensa-low.c (target_regsets): Likewise.
6212
6213 * linux-low.c: Include <sys/uio.h>.
6214 (regsets_fetch_inferior_registers): Support nt_type.
6215 (regsets_store_inferior_registers): Likewise.
6216 (linux_process_qsupported): New.
6217 (linux_target_ops): Add linux_process_qsupported.
6218
6219 * linux-low.h (regset_info): Add nt_type.
6220 (linux_target_ops): Add process_qsupported.
6221
6222 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
6223 and <sys/uio.h>.
6224 (init_registers_i386_avx_linux): New.
6225 (init_registers_amd64_avx_linux): Likewise.
6226 (xmltarget_i386_linux_no_xml): Likewise.
6227 (xmltarget_amd64_linux_no_xml): Likewise.
6228 (PTRACE_GETREGSET): Likewise.
6229 (PTRACE_SETREGSET): Likewise.
6230 (x86_fill_xstateregset): Likewise.
6231 (x86_store_xstateregset): Likewise.
6232 (use_xml): Likewise.
6233 (x86_linux_update_xmltarget): Likewise.
6234 (x86_linux_process_qsupported): Likewise.
6235 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
6236 (x86_arch_setup): Don't call init_registers_amd64_linux nor
6237 init_registers_i386_linux here. Call
6238 x86_linux_update_xmltarget.
6239 (the_low_target): Add x86_linux_process_qsupported.
6240
6241 * server.c (handle_query): Call target_process_qsupported.
6242
6243 * target.h (target_ops): Add process_qsupported.
6244 (target_process_qsupported): New.
6245
fc7238bb
PA
62462010-04-03 Pedro Alves <pedro@codesourcery.com>
6247
6248 * inferiors.c (add_thread): Set last_status kind to
6249 TARGET_WAITKIND_IGNORE.
6250 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
6251 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
6252 (linux_wait_1): Move `thread' local definition to block that uses
6253 it. Don't NULL initialize `event_child'.
6254 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
6255 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
6256 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
6257
bdabb078
PA
62582010-04-01 Pedro Alves <pedro@codesourcery.com>
6259
6260 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
6261 an extended waitstatus, or by a watchpoint.
6262 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
6263 thread was stepping or has been stopped by a watchpoint.
6264
d3bbe7a0
PA
62652010-04-01 Pedro Alves <pedro@codesourcery.com>
6266
6267 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
6268 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
6269 of another, then delete the previous, and validate all
6270 breakpoints.
6271 (validate_inserted_breakpoint): New.
6272 (delete_disabled_breakpoints): New.
6273 (validate_breakpoints): New.
6274 (check_mem_read): Validate breakpoints before trusting their
6275 shadow. Delete disabled breakpoints.
6276 (check_mem_write): Validate breakpoints before trusting they
6277 should be inserted. Delete disabled breakpoints.
6278 * mem-break.h (validate_breakpoints):
6279 * server.c (handle_query): Validate breakpoints when we see a
6280 qSymbol query.
6281
8b07ae33
PA
62822010-04-01 Pedro Alves <pedro@codesourcery.com>
6283
6284 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
6285 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
6286 if we could tell there's a GDB breakpoint at stop_pc.
6287 (need_step_over_p): Don't do a step over if we find a GDB
6288 breakpoint at the resume PC.
6289
6290 * mem-break.c (struct raw_breakpoint): New.
6291 (enum bkpt_type): New type `gdb_breakpoint'.
6292 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
6293 fields. New field `raw'.
6294 (find_raw_breakpoint_at): New.
6295 (set_raw_breakpoint_at): Handle refcounting. Create a raw
6296 breakpoint instead.
6297 (set_breakpoint_at): Adjust.
6298 (delete_raw_breakpoint): New.
6299 (release_breakpoint): New.
6300 (delete_breakpoint): Rename to...
6301 (delete_breakpoint_1): ... this. Add proc parameter. Use
6302 release_breakpoint. Return ENOENT.
6303 (delete_breakpoint): Reimplement.
6304 (find_breakpoint_at): Delete.
6305 (find_gdb_breakpoint_at): New.
6306 (delete_breakpoint_at): Delete.
6307 (set_gdb_breakpoint_at): New.
6308 (delete_gdb_breakpoint_at): New.
6309 (gdb_breakpoint_here): New.
6310 (set_reinsert_breakpoint): Use release_breakpoint.
6311 (uninsert_breakpoint): Rename to ...
6312 (uninsert_raw_breakpoint): ... this.
6313 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
6314 (reinsert_raw_breakpoint): Change parameter type to
6315 raw_breakpoint.
6316 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
6317 instead.
6318 (check_breakpoints): Adjust. Use release_breakpoint.
6319 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
6320 (breakpoint_inserted_here): Ditto.
6321 (check_mem_read): Adjust to iterate over raw breakpoints instead.
6322 Don't trust the breakpoint's shadow if it is not inserted.
6323 (check_mem_write): Adjust to iterate over raw breakpoints instead.
6324 (delete_all_breakpoints): Adjust.
6325 (free_all_breakpoints): Mark all breakpoints as uninserted, and
6326 use delete_breakpoint_1.
6327
6328 * mem-break.h (breakpoints_supported): Delete declaration.
6329 (set_gdb_breakpoint_at): Declare.
6330 (gdb_breakpoint_here): Declare.
6331 (delete_breakpoint_at): Delete.
6332 (delete_gdb_breakpoint_at): Declare.
6333
6334 * server.h (struct raw_breakpoint): Forward declare.
6335 (struct process_info): New field `raw_breakpoints'.
6336
6337 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
6338 breakpoints.
6339
6bf5e0ba
PA
63402010-03-24 Pedro Alves <pedro@codesourcery.com>
6341
6342 * linux-low.c (status_pending_p_callback): Fix comment.
6343 (linux_wait_for_event_1): Move most of the internal breakpoint
6344 handling from here...
6345 (linux_wait_1): ... to here.
6346 (count_events_callback): New.
6347 (select_singlestep_lwp_callback): New.
6348 (select_event_lwp_callback): New.
6349 (cancel_breakpoints_callback): New.
6350 (select_event_lwp): New.
6351 (linux_wait_1): Simplify internal breakpoint handling. Give equal
6352 priority to all LWPs that have had events that should be reported
6353 to the client. Cancel breakpoints when about to reporting the
6354 event to the client, not while stopping lwps. No longer cancel
6355 finished single-steps here.
6356 (cancel_finished_single_step): Delete.
6357 (cancel_finished_single_steps): Delete.
6358
414a389f
PA
63592010-03-24 Pedro Alves <pedro@codesourcery.com>
6360
6361 * mem-break.c (enum bkpt_type): New.
6362 (struct breakpoint): New field `type'.
6363 (set_breakpoint_at): Change return type to struct breakpoint
6364 pointer. Set type to `other_breakpoint' by default.
6365 (delete_breakpoint): Rewrite, supporting more than one breakpoint
6366 in the breakpoint list.
6367 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
6368 (reinsert_breakpoint): Rename to ...
6369 (reinsert_raw_breakpoint): ... this.
6370 (reinsert_breakpoints_at): Adjust.
6371 * mem-break.h (struct breakpoint): Declare.
6372 (set_breakpoint_at): Change return type to struct breakpoint
6373 pointer.
6374
2280c721
PA
63752010-03-24 Pedro Alves <pedro@codesourcery.com>
6376
6377 * server.c (handle_query): Assign, not compare.
6378
d50171e4
PA
63792010-03-24 Pedro Alves <pedro@codesourcery.com>
6380
6381 Teach linux gdbserver to step-over-breakpoints.
6382
6383 * linux-low.c (can_hardware_single_step): New.
6384 (supports_breakpoints): New.
6385 (handle_extended_wait): If stopping threads, read the stop pc of
6386 the new cloned LWP.
6387 (get_pc): New.
6388 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
6389 low target doesn't support retrieving the PC.
6390 (add_lwp): Set last_resume_kind to resume_continue.
6391 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
6392 (linux_attach): Don't clear stop_expected. Set the lwp's
6393 last_resume_kind to resume_stop.
6394 (linux_detach_one_lwp): Don't check for removed breakpoints.
6395 (check_removed_breakpoint): Delete.
6396 (status_pending_p): Rename to ...
6397 (status_pending_p_callback): ... this. Don't check for removed
6398 breakpoints. Don't consider threads that are stopped from GDB's
6399 perspective.
6400 (linux_wait_for_lwp): Always read the stop_pc here.
6401 (cancel_breakpoint): New.
6402 (step_over_bkpt): New global.
6403 (linux_wait_for_event_1): Implement stepping over breakpoints.
6404 (gdb_wants_lwp_stopped): New.
6405 (gdb_wants_all_stopped): New.
6406 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
6407 single-step traps here. Store the thread's last reported target
6408 wait status.
6409 (send_sigstop): Don't clear stop_expected. Always set it,
6410 instead.
6411 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
6412 (cancel_finished_single_step): New.
6413 (cancel_finished_single_steps): New.
6414 (wait_for_sigstop): Don't cancel finished single-step traps here.
6415 (linux_resume_one_lwp): Don't check for removed breakpoints.
6416 Don't set `step' on non-hardware step archs.
6417 (linux_set_resume_request): Ignore resume_stop requests if already
6418 stopping or stopped. Set the lwp's last_resume_kind.
6419 (resume_status_pending_p): Don't check for removed breakpoints.
6420 (need_step_over_p): New.
6421 (start_step_over): New.
6422 (finish_step_over): New.
6423 (linux_resume_one_thread): Always queue a sigstop for resume_stop
6424 requests. Clear the thread's last reported target waitstatus.
6425 Don't use the `suspended' flag. Don't consider pending breakpoints.
6426 (linux_resume): Start a step-over if necessary.
6427 (proceed_one_lwp): New.
6428 (proceed_all_lwps): New.
6429 (unstop_all_lwps): New.
6430 * linux-low.h (struct lwp_info): Rewrite comment for the
6431 `suspended' flag. Add the `stop_pc' field. Delete the
6432 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
6433 Add `'last_resume_kind' and `need_step_over' fields.
6434 * inferiors.c (struct thread_info): Delete, moved elsewhere.
6435 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
6436 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
6437 (set_raw_breakpoint_at): New.
6438 (set_breakpoint_at): Rewrite to use it.
6439 (reinsert_breakpoint_handler): Delete.
6440 (set_reinsert_breakpoint): New.
6441 (reinsert_breakpoint_by_bp): Delete.
6442 (delete_reinsert_breakpoints): New.
6443 (uninsert_breakpoint): Rewrite.
6444 (uninsert_breakpoints_at): New.
6445 (reinsert_breakpoint): Rewrite.
6446 (reinsert_breakpoints_at): New.
6447 (check_breakpoints): Rewrite.
6448 (breakpoint_here): New.
6449 (breakpoint_inserted_here): New.
6450 (check_mem_read): Adjust.
6451 * mem-break.h (breakpoints_supported, breakpoint_here)
6452 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
6453 (reinsert_breakpoint_by_bp): Delete declaration.
6454 (delete_reinsert_breakpoints): Declare.
6455 (reinsert_breakpoint): Delete declaration.
6456 (reinsert_breakpoints_at): Declare.
6457 (uninsert_breakpoint): Delete declaration.
6458 (uninsert_breakpoints_at): Declare.
6459 (check_breakpoints): Adjust prototype.
6460 * server.h: Adjust include order.
6461 (struct thread_info): Declare here. Add a `last_status' field.
6462
30ba68cb
MS
64632010-03-23 Michael Snyder <msnyder@vmware.com>
6464
6465 * server.c (crc32): New function.
6466 (handle_query): Add handling for 'qCRC:' request.
6467
b9a881c2
PA
64682010-03-23 Pedro Alves <pedro@codesourcery.com>
6469
6470 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
6471 lwp had been stopped by a watchpoint.
6472
e92d13d5
PA
64732010-03-16 Pedro Alves <pedro@codesourcery.com>
6474
6475 * server.h (internal_error): Declare.
6476 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
6477 * utils.c (internal_error): New function.
6478
64daa791
AS
64792010-03-15 Andreas Schwab <schwab@redhat.com>
6480
6481 * configure.srv: Fix typo setting srv_regobj.
6482
f52cd8cd
PA
64832010-03-15 Pedro Alves <pedro@codesourcery.com>
6484
6485 * linux-low.c (fetch_register): Avoid passing a non string literal
6486 format to `error'.
6487 (usr_store_inferior_registers): Ditto.
6488
93ae6fdc
PA
64892010-03-14 Pedro Alves <pedro@codesourcery.com>
6490
6491 * linux-low.c (linux_write_memory): Bail out early if peeking
6492 memory failed.
6493
c3adc08c
PA
64942010-03-14 Pedro Alves <pedro@codesourcery.com>
6495
6496 * linux-low.h (struct lwp_info): New fields
6497 `stopped_by_watchpoint' and `stopped_data_address'.
6498 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
6499 here, and cache them in the lwp object.
6500 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
6501 directly.
6502 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
6503 field.
6504 (linux_stopped_by_watchpoint): Rewrite.
6505 (linux_stopped_data_address): Rewrite.
6506
bce522a2
PA
65072010-03-06 Simo Melenius <simo.melenius@iki.fi>
6508
6509 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
6510 switching the current inferior, not before.
6511
90884b2b
L
65122010-03-01 H.J. Lu <hongjiu.lu@intel.com>
6513
6514 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
6515 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
6516 i386-linux.c and amd64-linux.c.
6517 (reg-i386.o): Removed.
6518 (reg-i386.c): Likewise.
6519 (reg-i386-linux.o): Likewise.
6520 (reg-i386-linux.c): Likewise.
6521 (reg-x86-64.o): Likewise.
6522 (reg-x86-64.c): Likewise.
6523 (reg-x86-64-linux.o): Likewise.
6524 (reg-x86-64-linux.c): Likewise.
6525 (i386.o): New.
6526 (i386.c): Likewise.
6527 (i386-linux.o): Likewise.
6528 (i386-linux.c): Likewise.
6529 (amd64.o): Likewise.
6530 (amd64.c): Likewise.
6531 (amd64-linux.o): Likewise.
6532 (amd64-linux.c): Likewise.
6533
6534 * configure.srv (srv_i386_regobj): New.
6535 (srv_i386_linux_regobj): Likewise.
6536 (srv_amd64_regobj): Likewise.
6537 (srv_amd64_linux_regobj): Likewise.
6538 (srv_i386_32bit_xmlfiles): Likewise.
6539 (srv_i386_64bit_xmlfiles): Likewise.
6540 (srv_i386_xmlfiles): Likewise.
6541 (srv_amd64_xmlfiles): Likewise.
6542 (srv_i386_linux_xmlfiles): Likewise.
6543 (srv_amd64_linux_xmlfiles): Likewise.
6544 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
6545 srv_xmlfiles to $srv_i386_xmlfiles.
6546 (i[34567]86-*-mingw32ce*): Likewise.
6547 (i[34567]86-*-mingw*): Likewise.
6548 (i[34567]86-*-nto*): Likewise.
6549 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
6550 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
6551 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
6552 (x86_64-*-linux*): Likewise.
6553
6554 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
6555 (init_registers_amd64_linux): New.
6556 (x86_arch_setup): Replace init_registers_x86_64_linux with
6557 init_registers_amd64_linux.
6558
193f13e6
MK
65592010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
6560
6561 * configure.ac: Check for libdl. If it is not available link against
6562 static libthread_db.
6563 * configure: Regenerate.
6564
85d721b8
PA
65652010-02-22 Pedro Alves <pedro@codesourcery.com>
6566
6567 PR9605
6568
6569 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
6570 handing a read watchpoint.
6571 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
6572
6076632b
DE
65732010-02-12 Doug Evans <dje@google.com>
6574
6575 * linux-low.c (linux_supports_tracefork_flag): Document.
6576 (linux_look_up_symbols): Add comment.
6577
3327ccf7
L
65782010-02-03 H.J. Lu <hongjiu.lu@intel.com>
6579
6580 * regcache.c (supply_register): Clear regcache if buf is NULL.
6581
0718675c 65822010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 6583 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
6584
6585 * inferiors.c (find_inferior): Add function documentation.
6586 (unloaded_dll): Handle the case where the unloaded dll has not
6587 been previously registered in the dll list.
6588
177321bd
DJ
65892010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
6590
6591 * linux-arm-low.c (thumb_breakpoint_len): Delete.
6592 (thumb2_breakpoint): New.
6593 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
6594
2b009048
DJ
65952010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
6596
6597 * linux-low.c (get_stop_pc): Check for SIGTRAP.
6598 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
6599 breakpoints.
6600
3be029c7
PA
66012010-01-21 Pedro Alves <pedro@codesourcery.com>
6602
6603 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
6604
18f5de3b
JK
66052010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6606
6607 * linux-s390-low.c (s390_collect_ptrace_register)
6608 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
6609
3743bb4f
DE
66102010-01-21 Doug Evans <dje@google.com>
6611
14ce3065
DE
6612 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
6613 (PTRACE_ARG4_TYPE): New macro.
6614 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
6615 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
6616 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
6617 (usr_store_inferior_registers): Ditto.
6618 (linux_read_memory, linux_write_memory): Ditto.
6619 (linux_test_for_tracefork): Ditto.
6620
3743bb4f
DE
6621 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
6622 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
6623
8b315be5
PA
66242010-01-21 Pedro Alves <pedro@codesourcery.com>
6625
6626 * proc-service.c (ps_lgetregs): Don't refetch registers from the
6627 target.
6628
85492558
PA
66292010-01-21 Pedro Alves <pedro@codesourcery.com>
6630
6631 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
6632 prototype to take a regcache. Adjust.
6633
442ea881
PA
66342010-01-20 Pedro Alves <pedro@codesourcery.com>
6635
6636 * regcache.h (struct thread_info): Forward declare.
6637 (struct regcache): New.
6638 (new_register_cache): Adjust prototype.
6639 (get_thread_regcache): Declare.
6640 (free_register_cache): Adjust prototype.
6641 (registers_to_string, registers_from_string): Ditto.
6642 (supply_register, supply_register_by_name, collect_register)
6643 (collect_register_as_string, collect_register_by_name): Ditto.
6644 * regcache.c (struct inferior_regcache_data): Delete.
6645 (get_regcache): Rename to ...
6646 (get_thread_regcache): ... this. Adjust. Switch inferior before
6647 fetching registers.
6648 (regcache_invalidate_one): Adjust.
6649 (regcache_invalidate): Fix prototype.
6650 (new_register_cache): Return the new register cache.
6651 (free_register_cache): Change prototype.
6652 (realloc_register_cache): Adjust.
6653 (registers_to_string): Change prototype to take a regcache. Adjust.
6654 (registers_from_string): Ditto.
6655 (register_data): Ditto.
6656 (supply_register): Ditto.
6657 (supply_register_by_name): Ditto.
6658 (collect_register): Ditto.
6659 (collect_register_as_string): Ditto.
6660 (collect_register_by_name): Ditto.
6661 * server.c (process_serial_event): Adjust.
6662 * linux-low.h (regset_fill_func, regset_store_func): Change
6663 prototype.
6664 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
6665 Change prototype.
6666 * linux-low.c (get_stop_pc): Adjust.
6667 (check_removed_breakpoint): Adjust.
6668 (linux_wait_for_event): Adjust.
6669 (linux_resume_one_lwp): Adjust.
6670 (fetch_register): Add regcache parameter. Adjust.
6671 (usr_store_inferior_registers): Ditto.
6672 (regsets_fetch_inferior_registers): Ditto.
6673 (regsets_store_inferior_registers): Ditto.
6674 (linux_fetch_registers, linux_store_registers): Ditto.
6675 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
6676 regcache. Adjust.
43aaf8b6
PA
6677 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
6678 Ditto.
442ea881
PA
6679 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
6680 prototype to take a regcache.
6681 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
6682 * remote-utils.c (convert_ascii_to_int, outreg)
6683 (prepare_resume_reply): Change prototype to take a regcache.
6684 Adjust.
6685 * target.h (struct target_ops) <fetch_registers, store_registers>:
6686 Change prototype to take a regcache.
6687 (fetch_inferior_registers, store_inferior_registers): Change
6688 prototype to take a regcache. Adjust.
6689 * proc-service.c (ps_lgetregs): Adjust.
6690 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
6691 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
6692 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
6693 take a regcache. Adjust.
6694 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
6695 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
6696 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
6697 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
6698 * linux-cris-low.c (cris_get_pc, cris_set_pc)
6699 (cris_cannot_fetch_register):
6700 (cris_breakpoint_at): Change prototype to take a regcache.
6701 Adjust.
6702 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
6703 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
6704 to take a regcache. Adjust.
6705 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
6706 Adjust.
6707 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
6708 take a regcache. Adjust.
6709 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
6710 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
6711 (m68k_set_pc): Change prototype to take a regcache. Adjust.
6712 * linux-mips-low.c (mips_get_pc):
6713 (mips_set_pc): Change prototype to take a regcache. Adjust.
6714 (mips_reinsert_addr): Adjust.
6715 (mips_collect_register): Change prototype to take a regcache.
6716 Adjust.
6717 (mips_supply_register):
6718 (mips_collect_register_32bit, mips_supply_register_32bit)
6719 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
6720 (mips_store_fpregset): Ditto.
43aaf8b6
PA
6721 * linux-ppc-low.c (ppc_supply_ptrace_register)
6722 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
6723 (parse_spufs_run): Adjust.
6724 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
6725 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
6726 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
6727 take a regcache. Adjust.
6728 * linux-s390-low.c (s390_collect_ptrace_register)
6729 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
6730 (s390_set_pc): Change prototype to take a regcache. Adjust.
6731 (s390_arch_setup): Adjust.
6732 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
6733 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
6734 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
6735 (sparc_fill_gregset, sparc_store_gregset_from_stack)
6736 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
6737 regcache. Adjust.
6738 (sparc_breakpoint_at): Adjust.
6739 * linux-xtensa-low.c (xtensa_fill_gregset):
6740 (xtensa_store_gregset):
6741 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
6742 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
6743 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
6744 prototype to take a regcache. Adjust.
6745 * win32-arm-low.c (arm_fetch_inferior_register)
6746 (arm_store_inferior_register): Change prototype to take a
6747 regcache. Adjust.
6748 * win32-i386-low.c (i386_fetch_inferior_register)
6749 (i386_store_inferior_register): Change prototype to take a
6750 regcache. Adjust.
6751 * win32-low.c (child_fetch_inferior_registers)
6752 (child_store_inferior_registers): Change prototype to take a
6753 regcache. Adjust.
6754 (win32_wait): Adjust.
6755 (win32_fetch_inferior_registers): Change prototype to take a
6756 regcache. Adjust.
6757 (win32_store_inferior_registers): Adjust.
6758 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
6759 store_inferior_register>: Change prototype to take a regcache.
6760
60c3d7b0
DE
67612010-01-20 Doug Evans <dje@google.com>
6762
6763 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
6764 #ifdef.
6765 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 6766 (W_STOPCODE): Provide definition if missing.
60c3d7b0 6767
dc146f7c
VP
67682010-01-13 Vladimir Prus <vladimir@codesourcery.com>
6769
6770 * linux-low.c (linux_core_of_thread): New.
6771 (compare_ints, show_process, list_threads): New.
6772 (linux_qxfer_osdata): Report threads and cores.
6773 (linux_target_op): Register linux_core_of_thread.
6774 * remote-utils.c (prepare_resume_reply): Report the core.
6775 (buffer_xml_printf): Support %d specifier.
6776 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
6777 New.
6778 (handle_query): Handle qXfer:threads. Announce availability
6779 thereof.
6780 * target.h (struct target_ops): New field core_of_thread.
6781
7803799a
UW
67822010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
6783
6784 * Makefile.in (clean): Remove new generated files.
6785 (reg-s390.o, reg-s390.c): Remove rules.
6786 (reg-s390x.o, reg-s390x.c): Likewise.
6787 (s390-linux32.o, s390-linux32.c): Add rules.
6788 (s390-linux64.o, s390-linux64.c): Likewise.
6789 (s390x-linux64.o, s390x-linux64.c): Likewise.
6790 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
6791 * linux-s390-low.c: Include <elf.h>.
6792 (HWCAP_S390_HIGH_GPRS): Define if undefined.
6793 (init_registers_s390): Remove prototype.
6794 (init_registers_s390x): Likewise.
6795 (init_registers_s390_linux32): Add prototype.
6796 (init_registers_s390_linux64): Likewise.
6797 (init_registers_s390x_linux64): Likewise.
6798 (s390_num_regs_3264): New define.
6799 (s390_regmap_3264): New global variable.
6800 (s390_cannot_fetch_register): Remove obsolete check.
6801 (s390_cannot_store_register): Likewise.
6802 (s390_collect_ptrace_register): Handle upper/lower register halves.
6803 (s390_supply_ptrace_register): Likewise.
6804 (s390_fill_gregset): Update to register number changes.
6805 (s390_get_hwcap): New routine.
6806 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
6807 Install appropriate regmap and register set.
6808
6e7ffa39
JB
68092010-01-01 Joel Brobecker <brobecker@adacore.com>
6810
6811 * server.c (gdbserver_version): Update copyright year to 2010.
6812 * gdbreplay.c (gdbreplay_version): Likewise.
6813
957f3f49
DE
68142009-12-28 Doug Evans <dje@google.com>
6815
6816 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
6817 elf/external.h. Include <elf.h> instead but only if necessary.
6818
ca5c370d
PA
68192009-12-28 Pedro Alves <pedro@codesourcery.com>
6820
6821 * linux-low.c (linux_remove_process): Remove `detaching'
6822 parameter. Don't release/detach from thread_db here.
6823 (linux_kill): Release/detach from thread_db here, ...
6824 (linux_detach): ... and here, before actually detaching.
6825 (linux_wait_1): ... and here, when a process exits.
6826 * thread-db.c (any_thread_of): New.
6827 (thread_db_free): Switch the current inferior to a thread of the
6828 passed in process.
6829
4ee62156
DE
68302009-12-21 Doug Evans <dje@google.com>
6831
d90e6a88
DE
6832 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
6833
c5f62d5f
DE
6834 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
6835 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
6836 warning ifndef __NR_tkill. Move setting of errno there too.
6837 Delete unnecessary resetting of errno after syscall.
6838 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
6839
10e86dd7
DE
6840 * configure.ac: Check for dladdr.
6841 * config.in: Regenerate.
6842 * configure: Regenerate.
6843 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
6844 (try_thread_db_load): Update.
6845
4ee62156
DE
6846 * linux-low.c (my_waitpid): Delete unnecessary prototype.
6847
00f515da
DE
68482009-12-18 Doug Evans <dje@google.com>
6849
e9464885
DE
6850 * event-loop.c: Include unistd.h if it exists.
6851
07d4f67e
DE
6852 * linux-low.c (my_waitpid): Move definition away from being in
6853 between linux_tracefork_child/linux_test_for_tracefork.
6854
00f515da
DE
6855 * gdb_proc_service.h (psaddr_t): Fix type.
6856 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
6857 signature to match glibc.
6858
1de1badb
DE
68592009-12-16 Doug Evans <dje@google.com>
6860
6861 * linux-low.c (linux_read_memory): Fix argument to read.
6862
aeeb81d1
PA
68632009-11-26 Pedro Alves <pedro@codesourcery.com>
6864
6865 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
6866 events, don't leave current_inferior pointing at null.
6867
10357975
PA
68682009-11-26 Pedro Alves <pedro@codesourcery.com>
6869
6870 * win32-low.c (LOG): Delete.
6871 (OUTMSG): Output to stderr.
6872 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
6873 on compile time LOG macro.
6874 (win32_wait): Fix debug output.
6875
cf6e3471
PA
68762009-11-26 Pedro Alves <pedro@codesourcery.com>
6877
6878 * win32-low.c (win32_add_one_solib): If the dll name is
6879 "ntdll.dll", prepend the system directory to the dll path.
6880
0c85e18e
MK
68812009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
6882
6883 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
6884
9ac544ce 68852009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 6886 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
6887
6888 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
6889 * configure.ac: Check for __mcoldfire__ and set
6890 gdb_cv_m68k_is_coldfire.
6891 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
6892 reg-cf.o and reg-m68k.o.
6893 * configure: Regenerated.
6894
fd7dd3e6
PA
68952009-11-16 Pedro Alves <pedro@codesourcery.com>
6896
6897 * linux-low.c (linux_remove_process): Add `detaching' parameter.
6898 Pass it to thread_db_free.
6899 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
6900 proper `detaching' argument to linux_remove_process.
6901 * linux-low.h (thread_db_free): Add `detaching' parameter.
6902 * thread-db.c (thread_db_init): Pass false as `detaching' argument
6903 to thread_db_free.
6904 (thread_db_free): Add `detaching' parameter. Only
6905 call td_ta_clear_event if detaching from process.
6906
75aa492e
MK
69072009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
6908
6909 * thread-db.c (thread_db_free): Fix typo.
6910
21e1bee4
PP
69112009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
6912
6913 PR gdb/10838
6914 * thread-db.c (thread_db_free): Call td_ta_clear_event.
6915
8838b45e
NS
69162009-11-03 Nathan Sidwell <nathan@codesourcery.com>
6917
6918 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
6919 with an i686 compiler.
6920 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
6921 needed.
6922 * configure: Rebuilt.
6923
8a35fb51
SL
69242009-10-29 Sandra Loosemore <sandra@codesourcery.com>
6925
6926 PR gdb/10783
6927
6928 * server.c (handle_search_memory_1): Correct read_addr initialization
6929 in loop for searching subsequent chunks.
6930
96f15937
PP
69312009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
6932
6933 * configure.ac: New --with-libthread-db option.
6934 * thread-db.c: Allow direct dependence on libthread_db.
6935 (thread_db_free): Adjust.
6936 * config.in: Regenerate.
6937 * configure: Likewise.
889bf7c5 6938
5f7d1694
PP
69392009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
6940
6941 PR gdb/10757
6942 * thread-db.c (attach_thread): New function.
6943 (maybe_attach_thread): Return success/failure.
6944 (find_new_threads_callback): Adjust.
889bf7c5
PA
6945 (thread_db_find_new_threads): Loop until no new threads.
6946
88e3b899
PA
69472009-10-13 Pedro Alves <pedro@codesourcery.com>
6948
6949 * proc-service.c (ps_lgetregs): Formatting.
6950
cdbfd419
PP
69512009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
6952
6953 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
6954 * configure.ac: Adjust.
6955 * linux-low.h (struct process_info_private): Move members to struct
6956 thread_db.
6957 (thread_db_free, thread_db_handle_monitor_command): New prototype.
6958 * linux-low.c (linux_remove_process): Adjust.
6959 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
6960 * server.c (handle_query): Move code ...
6961 (handle_monitor_command): ... here. New function.
6962 * target.h (struct target_ops): New member.
6963 * thread-db.c (struct thread_db): New.
6964 (libthread_db_search_path): New variable.
6965 (thread_db_create_event, thread_db_enable_reporting)
6966 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
6967 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
6968 (try_thread_db_load_1, dladdr_to_soname): New functions.
6969 (try_thread_db_load, thread_db_load_search): New functions.
6970 (thread_db_init): Search for libthread_db.
6971 (thread_db_free): New function.
6972 (thread_db_handle_monitor_command): Likewise.
6973 * config.in: Regenerate.
6974 * configure: Regenerate.
889bf7c5 6975
4168d2d6
UW
69762009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
6977
6978 * spu-low.c (spu_kill): Wait for inferior to terminate.
6979 Call clear_inferiors.
6980 (spu_detach): Call clear_inferiors.
6981
81ecdfbb
RW
69822009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6983
6984 * aclocal.m4: Regenerate.
6985 * config.in: Likewise.
6986 * configure: Likewise.
6987
0b9ff2c0
UW
69882009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
6989
6990 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
6991 (parse_spufs_run): New function.
6992 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
6993 (ppc_breakpoint_at): Handle SPU breakpoints.
6994
efcbbd14
UW
69952009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
6996
6997 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
6998 (SPUFS_MAGIC): Define.
6999 (spu_enumerate_spu_ids): New function.
7000 (linux_qxfer_spu): New function.
7001 (linux_target_ops): Install linux_qxfer_spu.
7002
f4d9bade
UW
70032009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7004
7005 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
7006 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
7007 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
7008 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
7009 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
7010 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
7011 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
7012 (init_registers_powerpc_cell32l): Add prototype.
7013 (init_registers_powerpc_cell64l): Likewise.
7014 (ppc_arch_setup): Detect Cell/B.E. architecture.
7015
96e946ca
RW
70162009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7017
7018 * Makefile.in (datarootdir): New variable.
7019
58d6951d
DJ
70202009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7021
7022 * linux-low.c (linux_write_memory): Update debugging output.
7023 * Makefile.in (clean): Add new descriptions.
7024 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
7025 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
7026 * configure.srv: Add new files for arm*-*-linux*.
7027 * linux-arm-low.c: Add new declarations.
7028 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
7029 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
7030 (HWCAP_VFPv3D16): New.
7031 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
7032 instead of __IWMMXT__.
7033 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
7034 (arm_arch_setup): New.
7035 (target_regsets): Remove #ifdef. Add VFP regset.
7036 (the_low_target): Use arm_arch_setup.
7037
12b42a12
DJ
70382009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7039
7040 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
7041 the main thread again.
7042
ac8c974e
AR
70432009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
7044
7045 Adding Neutrino gdbserver.
7046 * configure: Regenerated.
7047 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
7048 * configure.srv (i[34567]86-*-nto*): New target.
7049 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
7050 * remote-utils.c [__QNX__]: Include sys/iomgr.h
7051 (nto_comctrl) [__QNX__]: New function.
7052 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
7053
4424e0c3 70542009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
7055
7056 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
7057 srv_tgtobj.
7058
912cf4ba
PA
70592009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
7060 Pedro Alves <pedro@codesourcery.com>
7061
7062 * win32-i386-low.c (i386_get_thread_context): Handle systems that
7063 don't support CONTEXT_EXTENDED_REGISTERS.
7064 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
7065 (the_low_target): Install them.
7066 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
7067 failing with ERROR_PIPE_NOT_CONNECTED.
7068
aa5ca48f
DE
70692009-06-30 Doug Evans <dje@google.com>
7070 Pierre Muller <muller@ics.u-strasbg.fr>
7071
7072 Add h/w watchpoint support to x86-linux, win32-i386.
7073 * Makefile.in (SFILES): Add i386-low.c
7074 (i386_low_h): Define.
7075 (i386-low.o): Add dependencies.
7076 (linux-x86-low.o): Add i386-low.h dependency.
7077 (win32-i386-low.o): Ditto.
7078 * i386-low.c: New file.
7079 * i386-low.h: New file.
7080 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
7081 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
7082 * linux-low.c (linux_add_process): Initialize arch_private.
7083 (linux_remove_process): Free arch_private.
7084 (add_lwp): Initialize arch_private.
7085 (delete_lwp): Free arch_private.
7086 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
7087 provided.
7088 * linux-low.h (process_info_private): New member arch_private.
7089 (lwp_info): New member arch_private.
7090 (linux_target_ops): New members new_process, new_thread,
7091 prepare_to_resume.
7092 (ptid_of): New macro.
7093 * linux-x86-low.c: Include stddef.h, i386-low.h.
7094 (arch_process_info): New struct.
7095 (arch_lwp_info): New struct.
7096 (x86_linux_dr_get, x86_linux_dr_set): New functions.
7097 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7098 (i386_dr_low_get_status): New function.
7099 (x86_insert_point, x86_remove_point): New functions.
7100 (x86_stopped_by_watchpoint): New function.
7101 (x86_stopped_data_address): New function.
7102 (x86_linux_new_process, x86_linux_new_thread): New functions.
7103 (x86_linux_prepare_to_resume): New function.
7104 (the_low_target): Add entries for insert_point, remove_point,
7105 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
7106 prepare_to_resume.
7107 * server.c (debug_hw_points): New global.
7108 (monitor_show_help): Document set debug-hw-points.
7109 (handle_query): Process "set debug-hw-points".
7110 * server.h (debug_hw_points): Declare.
7111 (paddress): Declare.
7112 * utils.c (NUMCELLS, CELLSIZE): New macros.
7113 (get_sell, xsnprintf, paddress): New functions.
7114 * win32-arm-low.c (the_low_target): Add entries for insert_point,
7115 remove_point, stopped_by_watchpoint, stopped_data_address.
7116 * win32-i386-low.c: Include i386-low.h.
7117 (debug_reg_state): Replaces dr.
7118 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7119 (i386_dr_low_get_status): New function.
7120 (i386_insert_point, i386_remove_point): New functions.
7121 (i386_stopped_by_watchpoint): New function.
7122 (i386_stopped_data_address): New function.
7123 (i386_initial_stuff): Update.
7124 (get_thread_context,set_thread_context,i386_thread_added): Update.
7125 (the_low_target): Add entries for insert_point,
7126 remove_point, stopped_by_watchpoint, stopped_data_address.
7127 * win32-low.c (win32_insert_watchpoint): New function.
7128 (win32_remove_watchpoint): New function.
7129 (win32_stopped_by_watchpoint): New function.
7130 (win32_stopped_data_address): New function.
7131 (win32_target_ops): Add entries for insert_watchpoint,
7132 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
7133 * win32-low.h (win32_target_ops): New members insert_point,
7134 remove_point, stopped_by_watchpoint, stopped_data_address.
7135
d993e290
PA
71362009-06-25 Pedro Alves <pedro@codesourcery.com>
7137
7138 * server.c (process_serial_event): Re-return unsupported, not
7139 error, if the type isn't recognized. Re-allow supporting only
7140 insert or remove packets. Also call require_running for
7141 breakpoints. Add missing break statement to default case. Tidy.
7142 * target.h (struct target_ops): Rename insert_watchpoint to
7143 insert_point, and remove_watchpoint to remove_point.
7144
7145 * linux-low.h (struct linux_target_ops): Likewise.
7146 * linux-low.c (linux_insert_watchpoint): Rename to ...
7147 (linux_insert_point): ... this. Adjust.
7148 (linux_remove_watchpoint): Rename to ...
7149 (linux_remove_point): ... this. Adjust.
7150 (linux_target_ops): Adjust.
7151 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
7152 (cris_insert_point): ... this.
7153 (cris_remove_watchpoint): Rename to ...
7154 (cris_remove_point): ... this.
7155 (the_low_target): Adjust.
7156
0f54c268
PM
71572009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
7158
7159 * server.c (handle_v_kill): Pass signal_pid to
7160 kill_inferior if multi_process is zero.
7161
c6314022
AR
71622009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
7163
7164 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
7165 * target.h (target_ops): Comment for *_watchpoint to make it clear
7166 the functions can get types '0' and '1'.
7167
4463ce24
AR
71682009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
7169
7170 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
7171 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
7172 * regcache.c (get_regcache): Likewise.
7173 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
7174 * win32-low.c (child_fetch_inferior_registers): Remove check for
7175 regno 0.
7176
cf8fd78b
PA
71772009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
7178 Pedro Alves <pedro@codesourcery.com>
7179
7180 * target.h (struct target_ops) <supports_multi_process>: New
7181 callback.
7182 (target_supports_multi_process): New.
7183 * server.c (handle_query): Even if GDB reports support, only
7184 enable multi-process if the target also supports it. Report
7185 multi-process support only if the target backend supports it.
7186 * linux-low.c (linux_supports_multi_process): New function.
7187 (linux_target_ops): Install it as target_supports_multi_process
7188 callback.
7189
47c0c975
DE
71902009-05-24 Doug Evans <dje@google.com>
7191
e09875d4
DE
7192 Global renaming of find_thread_pid to find_thread_ptid.
7193 * server.h (find_thread_ptid): Renamed from find_thread_pid.
7194 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
7195 All callers updated.
7196
e27d73f6
DE
7197 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
7198 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
7199 directly.
7200
47c0c975
DE
7201 * linux-low.c (get_stop_pc): Print pc if debug_threads.
7202 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
7203 (linux_resume_one_lwp): Ditto.
7204
2acc282a
DE
72052009-05-23 Doug Evans <dje@google.com>
7206
7207 * linux-low.c (linux_resume_one_lwp): Change type of first arg
7208 from struct inferior_list_entry * to struct lwp_info *.
7209 All callers updated.
7210
9f1036c1
DE
72112009-05-13 Doug Evans <dje@google.com>
7212
7213 * linux-x86-low.c: Don't include assert.h.
7214 (x86_siginfo_fixup): Use fatal, not assert.
7215 (x86_arch_setup): Fix comment.
7216
d0722149
DE
72172009-05-12 Doug Evans <dje@google.com>
7218
7219 Biarch support for i386/amd64 gdbserver.
7220 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
7221 Add linux-x86-low.c.
7222 (linux-i386-low.o, linux-x86-64-low.o): Delete.
7223 (linux-x86-low.o): Add.
7224 * linux-x86-64-low.c: Delete.
7225 * linux-i386-low.c: Delete.
7226 * linux-x86-low.c: New file.
7227 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
7228 linux-x86-low.o.
7229 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
7230 linux-x86-low.o.
7231 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
7232 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
7233 (linux_child_pid_to_exec_file): New function.
7234 (elf_64_header_p, elf_64_file_p): New functions.
7235 (siginfo_fixup): New function.
7236 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
7237 give target a chance to convert layout.
7238 * linux-low.h (linux_target_ops): New member siginfo_fixup.
7239 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
7240
fdeb2a12
DE
72412009-05-07 Doug Evans <dje@google.com>
7242
7243 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
7244 (regsets_store_inferior_registers): Ditto.
7245
a6dbe5df
PA
72462009-05-06 Pedro Alves <pedro@codesourcery.com>
7247
7248 PR server/10048
7249
7250 * linux-low.c (must_set_ptrace_flags): Delete.
7251 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
7252 of the global.
7253 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
7254 `lwp->must_set_ptrace_flags' instead.
ba42693b 7255 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
7256 (linux_wait_1): ... not here.
7257
5091eb23
DE
72582009-04-30 Doug Evans <dje@google.com>
7259
9f767825
DE
7260 * inferiors.c (started_inferior_callback): New function.
7261 (attached_inferior_callback): New function.
7262 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
7263 * server.c (print_started_pid, print_attached_pid): New functions.
7264 (detach_or_kill_for_exit): New function.
7265 (main): Call it instead of for_each_inferior (kill_inferior_callback).
7266 * server.h (have_started_inferiors_p): Declare.
7267 (have_attached_inferiors_p): Declare.
7268
5091eb23
DE
7269 * inferiors.c (remove_process): Fix memory leak, free process.
7270 * linux-low.c (linux_remove_process): New function.
7271 (linux_kill): Call it instead of remove_process.
7272 (linux_detach, linux_wait_1): Ditto.
7273
155c8968
PA
72742009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
7275
7276 * configure.srv: Add x86 Windows CE target.
7277
7fe519cb
UW
72782009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7279
7280 * inferiors.c (get_thread_process): Make global.
7281 * server.h (get_thread_process): Add prototype.
7282 * thread-db.c (find_one_thread): Use get_thread_process
7283 instead of current_process.
7284 (thread_db_get_tls_address): Do not crash if called when
7285 thread layer is not yet initialized.
7286
5472f405
UW
72872009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7288
7289 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
7290 * spu-low.c (current_tid): Rename to ...
7291 (current_ptid): ... this.
7292 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
7293 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
7294 ptid_get_lwp (current_ptid) instead of current_tid.
7295 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
7296 instead of current_tid. Use find_process_pid to verify pid
7297 argument is valid. Pass proper argument to remove_process.
7298 (spu_thread_alive): Compare current_ptid instead of current_tid.
7299 (spu_resume): Likewise.
7300
55ac2b99
PA
73012009-04-02 Pedro Alves <pedro@codesourcery.com>
7302
7303 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
7304 variable.
7305
95954743
PA
73062009-04-01 Pedro Alves <pedro@codesourcery.com>
7307
7308 Implement the multiprocess extensions, and add linux multiprocess
7309 support.
7310
7311 * server.h (ULONGEST): Declare.
7312 (struct ptid, ptid_t): New.
7313 (minus_one_ptid, null_ptid): Declare.
7314 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7315 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
7316 (struct inferior_list_entry): Change `id' type from unsigned from
7317 to ptid_t.
7318 (struct sym_cache, struct breakpoint, struct
7319 process_info_private): Forward declare.
7320 (struct process_info): Declare.
7321 (current_process): Declare.
7322 (all_processes): Declare.
7323 (initialize_inferiors): Declare.
7324 (add_thread): Adjust to use ptid_t.
7325 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
7326 (add_process, remove_process, find_thread_pid): Declare.
7327 (find_inferior_id): Adjust to use ptid_t.
7328 (cont_thread, general_thread, step_thread): Change type to ptid_t.
7329 (multi_process): Declare.
7330 (push_event): Adjust to use ptid_t.
7331 (read_ptid, write_ptid): Declare.
7332 (prepare_resume_reply): Adjust to use ptid_t.
7333 (clear_symbol_cache): Declare.
7334 * inferiors.c (all_processes): New.
7335 (null_ptid, minus_one_ptid): New.
7336 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7337 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
7338 (add_thread): Change unsigned long to ptid. Remove gdb_id
7339 parameter. Adjust.
7340 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
7341 (gdb_id_to_thread): Rename to ...
7342 (find_thread_pid): ... this. Change unsigned long to ptid.
7343 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
7344 (loaded_dll, pull_pid_from_list): Adjust.
7345 (add_process, remove_process, find_process_pid)
7346 (get_thread_process, current_process, initialize_inferiors): New.
7347 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
7348 (struct target_waitstatus) <related_pid>: Ditto.
7349 (struct target_ops) <kill, detach>: Add `pid' argument. Change
7350 return type to int.
7351 (struct target_ops) <join>: Add `pid' argument.
7352 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
7353 (struct target_ops) <wait>: Add `ptid' field. Change return type
7354 to ptid.
7355 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
7356 (mywait): Add `ptid' argument. Change return type to ptid_t.
7357 (target_pid_to_str): Declare.
7358 * target.c (set_desired_inferior): Adjust to use ptids.
7359 (mywait): Add new `ptid' argument. Adjust.
7360 (target_pid_to_str): New.
7361 * mem-break.h (free_all_breakpoints): Declare.
7362 * mem-break.c (breakpoints): Delelete.
7363 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
7364 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
7365 to use per-process breakpoint list.
7366 (free_all_breakpoints): New.
7367 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
7368 (symbol_cache, all_symbols_looked_up): Delete.
7369 (hexchars): New.
7370 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
7371 read_ptid): New.
7372 (prepare_resume_reply): Change ptid argument's type from unsigned
7373 long to ptid_t. Adjust. Implement W;process and X;process.
7374 (free_sym_cache, clear_symbol_cache): New.
7375 (look_up_one_symbol): Adjust to per-process symbol cache. *
7376 * server.c (cont_thread, general_thread, step_thread): Change type
7377 to ptid_t.
7378 (attached): Delete.
7379 (multi_process): New.
7380 (last_ptid): Change type to ptid_t.
7381 (struct vstop_notif) <ptid>: Change type to ptid_t.
7382 (queue_stop_reply, push_event): Change `ptid' argument's type to
7383 ptid_t.
7384 (discard_queued_stop_replies): Add `pid' argument.
7385 (start_inferior): Adjust to use ptids. Adjust to mywait interface
7386 changes. Don't reference the `attached' global.
7387 (attach_inferior): Adjust to mywait interface changes.
7388 (handle_query): Adjust to use ptids. Parse GDB's qSupported
7389 features. Handle and report "multiprocess+". Handle
7390 "qAttached:PID".
7391 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
7392 changes.
7393 (handle_v_kill): New.
7394 (handle_v_stopped): Adjust to use target_pid_to_str.
7395 (handle_v_requests): Allow multiple attaches and runs when
7396 multiprocess extensions are in effect. Handle "vKill".
7397 (myresume): Adjust to use ptids.
7398 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
7399 (handle_status): Adjust to discard_queued_stop_replies interface
7400 change.
7401 (first_thread_of, kill_inferior_callback)
7402 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
7403 (main): Call initialize_inferiors. Adjust to use ptids, killing
7404 and detaching from all inferiors. Handle multiprocess packet
7405 variants.
7406 * linux-low.h: Include gdb_proc_service.h.
7407 (struct process_info_private): New.
7408 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
7409 <lwpid_of>: Use ptid_get_lwp.
7410 (get_lwp_thread): Adjust.
7411 (struct lwp_info): Add `dead' member.
7412 (find_lwp_pid): Declare.
7413 * linux-low.c (thread_db_active): Delete.
7414 (new_inferior): Adjust comment.
7415 (inferior_pid): Delete.
7416 (linux_add_process): New.
7417 (handle_extended_wait): Adjust.
7418 (add_lwp): Change unsigned long to ptid.
7419 (linux_create_inferior): Add process to processes table. Adjust
7420 to use ptids. Don't set new_inferior here.
7421 (linux_attach_lwp): Rename to ...
7422 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
7423 it. Adjust to use ptids.
7424 (linux_attach_lwp): New.
7425 (linux_attach): Add process to processes table. Don't set
7426 new_inferior here.
7427 (struct counter): New.
7428 (second_thread_of_pid_p, last_thread_of_process_p): New.
7429 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
7430 multiple processes.
7431 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
7432 processes. Remove process from process table.
7433 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
7434 to multiple processes.
7435 (any_thread_of): New.
7436 (linux_detach): Add `pid' argument, and handle it. Remove process
7437 from processes table.
7438 (linux_join): Add `pid' argument. Handle it.
7439 (linux_thread_alive): Change unsighed long argument to ptid_t.
7440 Consider dead lwps as not being alive.
7441 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
7442 threads we're not interested in.
7443 (same_lwp, find_lwp_pid): New.
7444 (linux_wait_for_lwp): Change `pid' argument's type from int to
7445 ptid_t. Adjust.
7446 (linux_wait_for_event): Rename to ...
7447 (linux_wait_for_event_1): ... this. Change `pid' argument's type
7448 from int to ptid_t. Adjust.
7449 (linux_wait_for_event): New.
7450 (linux_wait_1): Add `ptid' argument. Change return type to
7451 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
7452 that exit from the process table.
7453 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
7454 Adjust.
7455 (mark_lwp_dead): New.
7456 (wait_for_sigstop): Adjust to use ptids. If a process exits while
7457 stopping all threads, mark its main lwp as dead.
7458 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
7459 ptids.
7460 (fetch_register, usr_store_inferior_registers)
7461 (regsets_fetch_inferior_registers)
7462 (regsets_store_inferior_registers, linux_read_memory)
7463 (linux_write_memory): Inline `inferior_pid'.
7464 (linux_look_up_symbols): Adjust to use per-process
7465 `thread_db_active'.
7466 (linux_request_interrupt): Adjust to use ptids.
7467 (linux_read_auxv): Inline `inferior_pid'.
7468 (initialize_low): Don't reference thread_db_active.
7469 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
7470 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
7471 (ps_getpid): Return the pid of the current inferior.
7472 * thread-db.c (proc_handle, thread_agent): Delete.
7473 (thread_db_create_event, thread_db_enable_reporting): Adjust to
7474 per-process data.
7475 (find_one_thread): Change argument type to ptid_t. Adjust to
7476 per-process data.
7477 (maybe_attach_thread): Adjust to per-process data and ptids.
7478 (thread_db_find_new_threads): Ditto.
7479 (thread_db_init): Ditto.
7480 * spu-low.c (spu_create_inferior, spu_attach): Add process to
7481 processes table. Adjust to use ptids.
7482 (spu_kill, spu_detach): Adjust interface. Remove process from
7483 processes table.
7484 (spu_join, spu_thread_alive): Adjust interface.
7485 (spu_wait): Adjust interface. Remove process from processes
7486 table. Adjust to use ptids.
7487 * win32-low.c (current_inferior_tid): Delete.
7488 (current_inferior_ptid): New.
7489 (debug_event_ptid): New.
7490 (thread_rec): Take a ptid. Adjust.
7491 (child_add_thread): Add `pid' argument. Adjust to use ptids.
7492 (child_delete_thread): Ditto.
7493 (do_initial_child_stuff): Add `attached' argument. Add process to
7494 processes table.
7495 (child_fetch_inferior_registers, child_store_inferior_registers):
7496 Adjust.
7497 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
7498 (win32_attach): Pass 1 to do_initial_child_stuff.
7499 (win32_kill): Adjust interface. Remove process from processes
7500 table.
7501 (win32_detach): Ditto.
7502 (win32_join): Adjust interface.
7503 (win32_thread_alive): Take a ptid.
7504 (win32_resume): Adjust to use ptids.
7505 (get_child_debug_event): Ditto.
7506 (win32_wait): Adjust interface. Remove exiting process from
7507 processes table.
7508
bd99dc85
PA
75092009-04-01 Pedro Alves <pedro@codesourcery.com>
7510
7511 Non-stop mode support.
7512
7513 * server.h (non_stop): Declare.
7514 (gdb_client_data, handler_func): Declare.
7515 (delete_file_handler, add_file_handler, start_event_loop):
7516 Declare.
7517 (handle_serial_event, handle_target_event, push_event)
7518 (putpkt_notif): Declare.
7519 * target.h (enum resume_kind): New.
7520 (struct thread_resume): Replace `step' field by `kind' field.
7521 (TARGET_WNOHANG): Define.
7522 (struct target_ops) <wait>: Add `options' argument.
7523 <supports_non_stop, async, start_non_stop>: New fields.
7524 (target_supports_non_stop, target_async): New.
7525 (start_non_stop): Declare.
7526 (mywait): Add `options' argument.
7527 * target.c (mywait): Add `options' argument. Print child exit
7528 notifications here.
7529 (start_non_stop): New.
7530 * server.c (non_stop, own_buf, mem_buf): New globals.
7531 (struct vstop_notif): New.
7532 (notif_queue): New global.
7533 (queue_stop_reply, push_event, discard_queued_stop_replies)
7534 (send_next_stop_reply): New.
7535 (start_inferior): Adjust to use resume_kind. Adjust to mywait
7536 interface changes.
7537 (attach_inferior): In non-stop mode, don't wait for the target
7538 here.
7539 (handle_general_set): Handle QNonStop.
7540 (handle_query): When handling qC, return the current general
7541 thread, instead of the first thread of the list.
7542 (handle_query): If the backend supports non-stop mode, include
7543 QNonStop+ in the qSupported query response.
7544 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
7545 and non-stop mode.
7546 (handle_v_attach, handle_v_run): Handle non-stop mode.
7547 (handle_v_stopped): New.
7548 (handle_v_requests): Report support for vCont;t. Handle vStopped.
7549 (myresume): Adjust to use resume_kind. Handle non-stop.
7550 (queue_stop_reply_callback): New.
7551 (handle_status): Handle non-stop mode.
7552 (main): Clear non_stop flag on reconnection. Use the event-loop.
7553 Refactor serial protocol handling from here ...
7554 (process_serial_event): ... to this new function. When GDB
7555 selects any thread, select one here. In non-stop mode, wait until
7556 GDB acks all pending events before exiting.
7557 (handle_serial_event, handle_target_event): New.
7558 * remote-utils.c (remote_open): Install remote_desc in the event
7559 loop.
7560 (remote_close): Remove remote_desc from the event loop.
7561 (putpkt_binary): Rename to...
7562 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
7563 (putpkt_binary): New as wrapper around putpkt_binary_1.
7564 (putpkt_notif): New.
7565 (prepare_resume_reply): In non-stop mode, don't change the
7566 general_thread.
7567 * event-loop.c: New.
7568 * Makefile.in (OBJ): Add event-loop.o.
7569 (event-loop.o): New rule.
7570
7571 * linux-low.h (pid_of): Moved here.
7572 (lwpid_of): New.
7573 (get_lwp_thread): Use lwpid_of.
7574 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
7575 * linux-low.c (pid_of): Delete.
7576 (inferior_pid): Use lwpid_of.
7577 (linux_event_pipe): New.
7578 (target_is_async_p): New.
7579 (delete_lwp): New.
7580 (handle_extended_wait): Use lwpid_of.
7581 (add_lwp): Don't set lwpid field.
7582 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
7583 (linux_kill_one_lwp): If killing a running lwp, stop it first.
7584 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
7585 (linux_detach_one_lwp): If detaching from a running lwp, stop it
7586 first. Adjust to linux_wait_for_event interface changes. Use
7587 lwpid_of.
7588 (linux_detach): Don't delete the main lwp here.
7589 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
7590 (status_pending_p): Don't consider explicitly suspended lwps.
7591 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
7592 pointer. Add OPTIONS argument. Change return type to int. Use
7593 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
7594 (linux_wait_for_event): Take an integer pid instead of a lwp_info
7595 pointer. Add status pointer argument. Return a pid instead of a
7596 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
7597 changes. In non-stop mode, don't switch to a random thread.
7598 (linux_wait): Rename to...
7599 (linux_wait_1): ... this. Add target_options argument, and handle
7600 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
7601 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
7602 clean exit and signal exit code. Don't stop all threads in
7603 non-stop mode. In all-stop mode, only stop all threads when
7604 reporting a stop to GDB. Handle explicit thread stop requests.
7605 (async_file_flush, async_file_mark): New.
7606 (linux_wait): New.
7607 (send_sigstop): Use lwpid_of.
7608 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
7609 interface changes. In non-stop mode, don't switch to a random
7610 thread.
7611 (linux_resume_one_lwp): Use lwpid_of.
7612 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
7613 (linux_resume_one_thread): ... this. Handle resume_stop. In
7614 non-stop mode, don't look for pending flag in all threads.
7615 (resume_status_pending_p): Don't consider explicitly suspended
7616 threads.
7617 (my_waitpid): Reimplement. Emulate __WALL.
7618 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
7619 Use lwpid_of.
7620 (sigchld_handler, linux_supports_non_stop, linux_async)
7621 (linux_start_non_stop): New.
7622 (linux_target_ops): Register linux_supports_non_stop, linux_async
7623 and linux_start_non_stop.
7624 (initialize_low): Install SIGCHLD handler.
7625 * thread-db.c (thread_db_create_event, find_one_thread)
7626 (thread_db_get_tls_address): Use lwpid_of.
7627 * win32-low.c (win32_detach): Adjust to use resume_kind.
7628 (win32_wait): Add `options' argument.
7629 * spu-low.c (spu_resume): Adjust to use resume_kind.
7630 (spu_wait): Add `options' argument.
7631
5b1c542e
PA
76322009-04-01 Pedro Alves <pedro@codesourcery.com>
7633
7634 Decouple target code from remote protocol.
7635
7636 * target.h (enum target_waitkind): New.
7637 (struct target_waitstatus): New.
7638 (struct target_ops) <wait>: Return an unsigned long. Take a
7639 target_waitstatus pointer instead of a char pointer.
7640 (mywait): Likewise.
7641 * target.c (mywait): Change prototype to return an unsigned long.
7642 Take a target_waitstatus pointer instead of a char pointer. Adjust.
7643 * server.h (thread_from_wait, old_thread_from_wait): Delete
7644 declarations.
7645 (prepare_resume_reply): Change prototype to take a
7646 target_waitstatus.
7647 * server.c (thread_from_wait, old_thread_from_wait): Delete.
7648 (last_status, last_ptid): New.
7649 (start_inferior): Remove "statusptr" argument. Adjust. Return a
7650 pid instead of a signal.
7651 (attach_inferior): Remove "status" and "signal" parameters.
7652 Adjust.
7653 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
7654 not as an address.
7655 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
7656 (handle_v_requests, myresume): Remove "status" and "signal"
7657 parameters. Adjust.
7658 (handle_status): New.
7659 (main): Delete local `status'. Adjust.
7660 * remote-utils.c: Include target.h.
7661 (prepare_resume_reply): Change prototype to take a
7662 target_waitstatus. Adjust.
7663
7664 * linux-low.c (linux_wait): Adjust to new target_ops->wait
7665 interface.
7666 * spu-low.c (spu_wait): Adjust.
7667 * win32-low.c (enum target_waitkind, struct target_waitstatus):
7668 Delete.
7669 (win32_wait): Adjust.
7670
2bd7c093
PA
76712009-04-01 Pedro Alves <pedro@codesourcery.com>
7672
7673 * target.h (struct thread_resume): Delete leave_stopped member.
7674 (struct target_ops): Add a `n' argument to the `resume' callback.
7675 * server.c (start_inferior): Adjust.
7676 (handle_v_cont, myresume): Adjust.
7677 * linux-low.c (check_removed_breakpoint): Adjust to resume
7678 interface change, and to removed leave_stopped field.
7679 (resume_ptr): Delete.
7680 (struct thread_resume_array): New.
7681 (linux_set_resume_request): Add new `arg' parameter. Adjust to
7682 resume interface change.
7683 (linux_continue_one_thread, linux_queue_one_thread)
7684 (resume_status_pending_p): Check if the resume field is NULL
7685 instead of checking the leave_stopped member.
7686 (linux_resume): Adjust to the target resume interface change.
7687 * spu-low.c (spu_resume): Adjust to the target resume interface
7688 change.
7689 * win32-low.c (win32_detach, win32_resume): Ditto.
7690
c35fafde
PA
76912009-04-01 Pedro Alves <pedro@codesourcery.com>
7692
7693 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
7694 flag.
7695 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
7696 pending.
7697 (linux_continue_one_thread): Only preserve the stepping flag if
7698 there's a pending breakpoint.
7699
0a59d50b
PA
77002009-03-31 Pedro Alves <pedro@codesourcery.com>
7701
7702 * server.c (main): After the inferior having exited, call
7703 remote_close before exiting gdbserver.
7704
f04c6d38
TJB
77052009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
7706
7707 Fix size of FPSCR in Power 7 processors.
7708 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
7709 (PPC_FEATURE_HAS_DFP): New #define.
7710 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
7711 size of the FPSCR.
7712
78e5cee6
PA
77132009-03-23 Pedro Alves <pedro@codesourcery.com>
7714
7715 * server.c (handle_query) Whitespace and formatting.
7716
1b3f6016
PA
77172009-03-22 Pedro Alves <pedro@codesourcery.com>
7718
7719 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
7720 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
7721 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
7722 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
7723 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
7724 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
7725 Makefile.in, configure.ac: Fix whitespace throughout.
7726 * configure: Regenerate.
7727
a07b2135
PA
77282009-03-22 Pedro Alves <pedro@codesourcery.com>
7729
7730 * inferiors.c (find_inferior): Make it safe for the callback
7731 function to delete the currently iterated inferior.
7732
67cc2626
PA
77332009-03-22 Pedro Alves <pedro@codesourcery.com>
7734
7735 * Makefile.in (linuw_low_h): Move higher.
7736 (thread-db.o): Depend on $(linux_low_h).
7737
54a0b537
PA
77382009-03-17 Pedro Alves <pedro@codesourcery.com>
7739
7740 Rename "process" to "lwp" throughout.
7741
7742 * linux-low.c (all_processes): Rename to...
7743 (all_lwps): ... this.
7744 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
7745 (add_process): Rename to ...
7746 (add_lwp): ... this. Adjust.
7747 (linux_create_inferior): Adjust.
7748 (linux_attach_lwp): Adjust.
7749 (linux_attach): Adjust.
7750 (linux_kill_one_process): Rename to ...
7751 (linux_kill_one_lwp): ... this. Adjust.
7752 (linux_kill): Adjust.
7753 (linux_detach_one_process): Rename to ...
7754 (linux_detach_one_lwp): ... this. Adjust.
7755 (linux_detach): Adjust.
7756 (check_removed_breakpoint): Adjust.
7757 (status_pending_p): Adjust.
7758 (linux_wait_for_process): Rename to ...
7759 (linux_wait_for_lwp): ... this. Adjust.
7760 (linux_wait_for_event): Adjust.
7761 (send_sigstop): Adjust.
7762 (wait_for_sigstop): Adjust.
7763 (stop_all_processes): Rename to ...
7764 (stop_all_lwps): ... this.
7765 (linux_resume_one_process): Rename to ...
7766 (linux_resume_one_lwp): ... this. Adjust.
7767 (linux_set_resume_request, linux_continue_one_thread)
7768 (linux_queue_one_thread, resume_status_pending_p)
7769 (usr_store_inferior_registers, regsets_store_inferior_registers)
7770 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
7771 Adjust.
7772 * linux-low.h (get_process): Rename to ...
7773 (get_lwp): ... this. Adjust.
7774 (get_thread_process): Rename to ...
7775 (get_thread_lwp): ... this. Adjust.
7776 (get_process_thread): Rename to ...
7777 (get_lwp_thread): ... this. Adjust.
7778 (struct process_info): Rename to ...
7779 (struct lwp_info): ... this.
7780 (all_processes): Rename to ...
7781 (all_lwps): ... this.
7782 * proc-service.c (ps_lgetregs): Adjust.
7783 * thread-db.c (thread_db_create_event, find_one_thread)
7784 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
7785
0b16c5cf
PA
77862009-03-14 Pedro Alves <pedro@codesourcery.com>
7787
7788 * server.c (handle_query): Handle "qAttached".
7789
32de4b9d
NS
77902009-03-13 Nathan Sidwell <nathan@codesourcery.com>
7791
7792 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
7793 GPLv3, update license URL.
7794
2aecd87f
DE
77952009-03-01 Doug Evans <dje@google.com>
7796
93efd302 7797 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
7798 (server_h): Add gdb_signals.h.
7799 (signals.o): Update.
7800 * server.h (target_signal_from_host,target_signal_to_host_p)
7801 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
7802
86b1f9c5
PM
78032009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
7804
7805 * remote-utils.c (getpkt): Also generate remote-debug
7806 information if noack_mode is set.
7807
4aa995e1
PA
78082009-02-06 Pedro Alves <pedro@codesourcery.com>
7809
7810 * server.c (handle_query): Report qXfer:siginfo:read and
7811 qXfer:siginfo:write as supported and handle them.
7812 * target.h (struct target_ops) <qxfer_siginfo>: New field.
7813 * linux-low.c (linux_xfer_siginfo): New.
7814 (linux_target_ops): Set it.
7815
62709adf
PA
78162009-01-26 Pedro Alves <pedro@codesourcery.com>
7817
7818 * server.c (gdbserver_usage): Mention --remote-debug.
7819 (main): Accept '--remote-debug' switch.
7820
aef93bd7
DE
78212009-01-18 Doug Evans <dje@google.com>
7822
7823 * regcache.c (new_register_cache): No need to check result of xcalloc.
7824 * server.c (handle_search_memory): Back out calls to xmalloc,
7825 result is checked and error is returned to user upon failure.
7826 (handle_query): Ditto. Add more checks for result of malloc.
7827 (handle_v_cont): Check result of malloc, report error back to
7828 user upon failure.
7829 (handle_v_run): Ditto. Call freeargv.
7830 * server.h (freeargv): Declare.
7831 * utils.c (freeargv): New fn.
7832
54363045
DE
78332009-01-15 Doug Evans <dje@google.com>
7834
f626972c
DE
7835 * gdbreplay.c (perror_with_name): Make arg const char *.
7836 * server.h (target_signal_to_name): Make return type const char *.
0842e787 7837 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 7838 * utils.c (perror_with_name): Make arg const char *.
54363045 7839
18aae699
PA
78402009-01-14 Pedro Alves <pedro@codesourcery.com>
7841
7842 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
7843 when handling a EXIT_PROCESS_DEBUG_EVENT.
7844
ff703abe
JB
78452009-01-06 Joel Brobecker <brobecker@adacore.com>
7846
7847 * gdbreplay.c (gdbreplay_version): Update copyright year.
7848 * server.c (gdbserver_version): Likewise.
7849
f21cc1a2 78502009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
7851
7852 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 7853 (handle_extended_wait): Improve comment.
0e21c1ec 7854
bca929d3
DE
78552008-12-13 Doug Evans <dje@google.com>
7856
7857 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
7858 * server.h (ATTR_MALLOC): New macro.
7859 (xmalloc,xcalloc,xstrdup): Declare.
7860 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
7861 * inferiors.c: Ditto.
7862 * linux-low.c: Ditto.
7863 * mem-break.c: Ditto.
7864 * regcache.c: Ditto.
7865 * remote-utils.c: Ditto.
7866 * server.c: Ditto.
7867 * target.c: Ditto.
7868 * win32-low.c: Ditto.
7869
97438e3f
DE
78702008-12-12 Doug Evans <dje@google.com>
7871
896c7fbb
DE
7872 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
7873 in debugging printf.
7874
97438e3f
DE
7875 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
7876
e3b886f8
DE
78772008-12-09 Doug Evans <dje@google.com>
7878
7879 * linux-low.h (struct process_info): Delete member tid, unused.
7880 * thread-db.c (find_one_thread): Update.
7881 (maybe_attach_thread): Update.
7882
07e059b5
VP
78832008-12-02 Pedro Alves <pedro@codesourcery.com>
7884
889bf7c5
PA
7885 * target.h (struct target_ops): Add qxfer_osdata member.
7886 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
7887 and dirent.h.
7888 (linux_qxfer_osdata): New functions.
7889 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
7890 callback.
7891 * server.c (handle_query): Handle "qXfer:osdata:read:".
7892 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
7893 (buffer_xml_printf): New functions.
7894 * server.h (struct buffer): New.
7895 (buffer_grow_str, buffer_grow_str0): New macros.
7896 (buffer_grow, buffer_free, buffer_init, buffer_finish)
7897 (buffer_xml_printf): Declare.
07e059b5 7898
4cab47ab
DE
78992008-11-24 Doug Evans <dje@google.com>
7900
7901 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
7902
f142445f
DJ
79032008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
7904
7905 * server.c (handle_v_run): Always use the supplied argument list.
7906
d0107bb6 79072008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 7908
d0107bb6
BW
7909 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
7910 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 7911
2c4ad781
TJB
79122008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
7913
7914 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
7915 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
7916 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
7917 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
7918 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
7919 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
7920 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
7921 XML target descriptions.
7922 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
7923 when inferior is running on an ISA 2.05 or later processor. Add
7924 special case to return offset for full 64-bit slot of FPSCR when
7925 in 32-bits.
7926
dfb64f85
DJ
79272008-11-14 Daniel Gutson <dgutson@codesourcery.com>
7928
7929 * Makefile.in (SFILES, clean): Added sparc64 files.
7930 (reg-sparc64.o, reg-sparc64.c): New.
7931 * configure.srv (sparc*-*-linux*): New configuration.
7932 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
7933 syscall arguments for SPARC.
7934 (regsets_store_inferior_registers): Likewise.
7935 * linux-sparc-low.c: New file.
7936
66b6e1dd
DE
79372008-10-21 Doug Evans <dje@google.com>
7938
7939 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
7940 (READLINE_DIR,READLINE_DEP): Delete.
7941 (INTERNAL_CFLAGS): Update.
7942 (LINTFLAGS): Update.
7943
9b710a42
PA
79442008-10-10 Pedro Alves <pedro@codesourcery.com>
7945
7946 * server.c (handle_v_run): If GDB didn't specify an argv, use the
7947 whole argv from the last run, not just argv[0].
7948
5822d809
PA
79492008-09-08 Pedro Alves <pedro@codesourcery.com>
7950
7951 * regcache.c (new_register_cache): Return NULL if the register
7952 cache size isn't known yet.
7953 (free_register_cache): Avoid dereferencing a NULL regcache.
7954
74aac56f
DJ
79552008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
7956
7957 * configure.srv: Merge MIPS and MIPS64.
7958
400b20f5
MR
79592008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
7960
7961 * Makefile.in (uninstall): Apply $(EXEEXT) too.
7962
677c5bb1
LM
79632008-08-18 Luis Machado <luisgpm@br.ibm.com>
7964
7965 * Makefile.in: Add required vsx dependencies.
7966
7967 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
7968 Declare init_registers_powerpc_vsx32l.
7969 Declare init_registers_powerpc_vsx64l.
7970 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
7971 (ppc_arch_setup): Check for VSX in hwcap.
7972 (ppc_fill_vsxregset): New function.
7973 (ppc_store_vsxregset): New function.
7974 Add new VSX entry in regset_info target_regsets.
7975
7976 * configure.srv: Add new VSX dependencies.
7977
a6f3e723
SL
79782008-08-12 Pedro Alves <pedro@codesourcery.com>
7979
7980 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
7981 (remote_open): Set or clear transport_is_reliable.
7982 (putpkt_binary): Don't expect acks in noack mode.
7983 (getpkt): Don't send ack/nac in noack mode.
7984 * server.c (handle_general_set): Handle QStartNoAckMode.
7985 (handle_query): If connected by tcp pass QStartNoAckMode+ in
7986 qSupported.
7987 (main): Reset noack_mode on every connection.
7988 * server.h (noack_mode): Declare.
7989
a417dc56
RW
79902008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7991
7992 * Makefile.in (GDBREPLAY_OBS): New variable.
7993 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
7994
3221518c
UW
79952008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
7996 Daniel Jacobowitz <dan@codesourcery.com>
7997
7998 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
7999 (usr_store_inferior_registers): Likewise.
8000 (regsets_store_inferior_registers): Likewise.
8001
ec56be1b
PA
80022008-07-31 Rolf Jansen <rj@surtec.com>
8003 Pedro Alves <pedro@codesourcery.com>
8004
8005 * configure.ac: Check for memmem declaration.
8006 * server.c [HAVE_MALLOC_H]: Include malloc.h.
8007 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
8008 (disable_packet_qfThreadInfo): Unconditionally compile.
8009 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
8010 * configure, config.in: Regenerate.
8011
2fe5e3ff
DE
80122008-07-28 Doug Kwan <dougkwan@google.com>
8013
8014 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
8015 (linux_write_memory): Remove declaration of errno.
8016
836acd6d
UW
80172008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
8018
8019 * linux-low.c (handle_extended_wait): Do not use "status"
8020 variable uninitialized.
8021
aeba519e
PA
80222008-07-07 Pedro Alves <pedro@codesourcery.com>
8023
8024 * server.c (handle_v_attach): Inhibit reporting dll changes.
8025
db42f210
PA
80262008-06-27 Pedro Alves <pedro@codesourcery.com>
8027
8028 * remote-utils.c (prepare_resume_reply): If requested, don't
8029 output "thread:TID" in the T stop reply.
8030
8031 * server.c (disable_packet_vCont, disable_packet_Tthread)
8032 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
8033 (handle_query): If requested, disable support for qC, qfThreadInfo
8034 and qsThreadInfo.
8035 (handle_v_requests): If requested, disable support for vCont.
8036 (gdbserver_show_disableable): New.
8037 (main): Handle --disable-packet and --disable-packet=LIST.
8038
8039 * server.h (disable_packet_vCont, disable_packet_Tthread)
8040 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
8041
8e4c5421
CD
80422008-06-20 Carlos O'Donell <carlos@codesourcery.com>
8043
8044 * server.c (gdbserver_usage): Mention --version.
8045
6e23a804
DJ
80462008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
8047
8048 * Makefile.in (gdbreplay.o): New rule.
8049
90aa6a40
JM
80502008-06-06 Joseph Myers <joseph@codesourcery.com>
8051
8052 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
8053 message, not gdbserver.
8054
c16158bc 80552008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
8056 Nathan Sidwell <nathan@codesourcery.com>
8057 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
8058
8059 * acinclude.m4: Include ../../config/acx.m4.
8060 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
8061 * configure, config.in: Regenerate.
8062 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
8063 * server.c (gdbserver_version): Print PKGVERSION.
8064 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
8065 (main): Adjust gdbserver_usage calls.
8066 * gdbreplay.c (version, host_name): Add declarations.
8067 (gdbreplay_version, gdbreplay_usage): New.
8068 (main): Accept --version and --help options.
8069
aeb75bf5
DJ
80702008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
8071
8072 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
8073 (arm_breakpoint_at): Handle Thumb.
8074 (the_low_target): Add comment.
8075
76b233dd
UW
80762008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
8077
8078 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
8079
08388c79
DE
80802008-05-09 Doug Evans <dje@google.com>
8081
a3c83fae
DE
8082 * server.h (decode_search_memory_packet): Declare.
8083 * remote-utils.c (decode_search_memory_packet): New fn.
8084 * server.c (handle_search_memory_1): New fn.
08388c79
DE
8085 (handle_search_memory): New fn.
8086 (handle_query): Process qSearch:memory packets.
8087
bb9c3d36
UW
80882008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
8089
8090 * regcache.c (registers_length): Remove.
8091 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
8092 full register packet.
8093 * regcache.h (registers_length): Remove prototype.
8094 * server.h (PBUFSIZ): Define to 16384.
8095
7284e1be
UW
80962008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
8097
8098 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
8099 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
8100 powerpc-64l.o, and powerpc-altivec64l.o.
8101 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
8102 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
8103 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
8104 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
8105 rs6000/power-linux.xml, and rs6000/power64-linux.xml
8106 to srv_xmlfiles.
8107
8108 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
8109 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
8110 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
8111 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
8112 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
8113 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
8114 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
8115 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
8116 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
8117 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
8118 (clean): Update.
8119
8120 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
8121 (init_registers_powerpc_32l): ... this new prototype.
8122 (init_registers_powerpc_32): Remove, replace by ...
8123 (init_registers_powerpc_altivec32l): ... this new prototype.
8124 (init_registers_powerpc_e500): Remove, replace by ...
8125 (init_registers_powerpc_e500l): ... this new prototype.
8126 (init_registers_ppc64): Remove, replace by ...
8127 (init_registers_powerpc_64l): ... this new prototype.
8128 (init_registers_powerpc_64): Remove, replace by ...
8129 (init_registers_powerpc_altivec64l): ... this new prototype.
8130 (ppc_num_regs): Set to 73.
8131 (PT_ORIG_R3, PT_TRAP): Define if necessary.
8132 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
8133 (ppc_cannot_store_register): Handle orig_r3 and trap.
8134 (ppc_arch_setup): Update init_registers_... calls.
8135 (ppc_fill_gregset): Handle orig_r3 and trap.
8136
8137 * inferiors.c (clear_inferiors): Reset current_inferior.
8138
fdc59709
PB
81392008-04-23 Paolo Bonzini <bonzini@gnu.org>
8140
889bf7c5
PA
8141 * acinclude.m4: Add override.m4.
8142 * configure: Regenerate.
fdc59709 8143
c9b2f845
UW
81442008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8145
8146 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
8147 initial call to init_register_ppc64.
8148
550512b8
UW
81492008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8150
43aaf8b6
PA
8151 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
8152 single powerpc*-*-linux* case.
550512b8
UW
8153 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
8154
b6430ec3
UW
81552008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
8156
8157 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 8158 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
8159 from reg_xmlfiles.
8160 * linux-ppc-low.c: Include <elf.h>.
8161 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
8162 (ppc_hwcap): New global variable.
8163 (ppc_regmap): Remove __SPE__ #ifdef sections.
8164 (ppc_regmap_e500): New global variable.
8165 (ppc_cannot_store_register): Update __SPE__ special case.
8166 (ppc_get_hwcap): New function.
8167 (ppc_arch_setup): Use it to determine whether inferior supports
8168 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
8169 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
8170 Do not access registers if target does not support AltiVec.
8171 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
8172 Do not access registers if target does not support SPE.
8173 (target_regsets): Unconditionally include AltiVec and SPE regsets.
8174
52fa2412
UW
81752008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
8176
8177 * linux-low.c (disabled_regsets, num_regsets): New.
8178 (use_regsets_p): Delete.
8179 (linux_wait_for_process): Clear disabled_regsets.
8180 (regsets_fetch_inferior_registers): Check and set it.
8181 (regsets_store_inferior_registers): Likewise.
8182 (linux_fetch_registers, linux_store_registers): Do not use
8183 use_regsets_p.
8184 (initialize_low): Allocate disabled_regsets.
8185
e28b3332
DJ
81862008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
8187
8188 * Makefile.in (LIBOBJS): New.
8189 (OBS): Use LIBOBJS.
8190 (memmem.o): New rule.
8191 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
8192 * configure: Regenerated.
8193
4536995d
UW
81942008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
8195
8196 * server.c (handle_query): Never return "unsupported" for
8197 qXfer:features:read queries.
8198
221c031f
UW
81992008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
8200
8201 * server.c (get_features_xml): Fix inverted condition.
8202 (handle_query): Always support qXfer:feature:read.
8203
ccd213ac
DJ
82042008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
8205
8206 * server.c (wrapper_argv): New.
8207 (start_inferior): Handle wrapper_argv. If set, expect an extra
8208 trap.
8209 (gdbserver_usage): Document --wrapper.
8210 (main): Parse --wrapper.
8211
6fe305f7
UW
82122008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8213
8214 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
8215 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
8216 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
8217 (ppc_set_pc): Likewise.
8218 (ppc_arch_setup): New function.
8219 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
8220 of collect_register.
889bf7c5 8221 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 8222
5b0a002e
UW
82232008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8224
8225 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
8226 instead of linux-ppc64-low.o.
8227 * linux-ppc64-low.c: Remove file.
8228 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
8229 (linux-ppc64-low.o): Remove rule.
8230
8231 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
8232 (init_registers_powerpc_64): Likewise.
8233 (ppc_regmap): Conditionally define depending on __powerpc64__.
8234 (ppc_cannot_store_register): Do not special-case "fpscr" when
8235 compiled on __powerpc64__.
8236 (ppc_collect_ptrace_register): New function.
8237 (ppc_supply_ptrace_register): New function.
8238 (ppc_breakpoint): Change type to "unsigned int".
8239 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
8240 (the_low_target): Conditionally provide initializers for the
889bf7c5 8241 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
8242 collect_ptrace_register and supply_ptrace_register members.
8243
9b4b61c8
UW
82442008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8245
8246 * regcache.h (gdbserver_xmltarget): Add extern declaration.
8247 * server.c (gdbserver_xmltarget): Define.
8248 (get_features_xml): Use it to replace "target.xml" and arch_string.
8249
8250 * configure.srv: Remove srv_xmltarget. Add XML files that were
8251 mentioned there to srv_xmlfiles instead. Remove conditional tests
8252 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
8253 srv_xmlfiles and srv_regobj to include all possible choices.
8254 * configure.ac (srv_xmltarget): Remove.
8255 (srv_xmlfiles): Do not add "target.xml".
8256 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
8257 checks for supplementary target information.
8258 * configure: Regenerate.
8259 * Makefile.in (XML_TARGET): Remove.
8260 (target.xml): Remove rule.
8261 (clean): Do not clean up target.xml.
8262 (.PRECIOUS): Do not mention target.xml.
8263
8264 * target.h (struct target_ops): Remove arch_string member.
8265 * linux-low.c (linux_arch_string): Remove.
8266 (linux_target_ops): Remove arch_string initializer.
8267 * linux-low.h (struct linux_target_ops): Remove arch_string member.
8268 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
8269 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
8270 * spu-low.c (spu_arch_string): Remove.
8271 (spu_target_ops): Remove arch_string initializer.
8272 * win32-low.c (win32_arch_string): Remove.
8273 (win32_target_ops): Remove arch_string initializer.
8274 * win32-low.h (struct win32_target_ops): Remove arch_string member.
8275 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
8276 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
8277
ee1a7ae4
UW
82782008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8279
8280 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
8281 by collect_ptrace_register and supply_ptrace_register hooks.
8282 * linux-low.c (fetch_register): Use supply_ptrace_register callback
8283 instead of checking for the_low_target.left_pad_xfer.
8284 (usr_store_inferior_registers): Use collect_ptrace_register callback
8285 instead of checking for the_low_target.left_pad_xfer.
8286
8287 * linux-s390-low.c (s390_collect_ptrace_register): New function.
8288 (s390_supply_ptrace_register): Likewise.
8289 (s390_fill_gregset): Call s390_collect_ptrace_register.
8290 (the_low_target): Update.
8291
8292 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
8293 (ppc_supply_ptrace_register): Likewise.
8294 (the_low_target): Update.
8295
8296 * linux-i386-low.c (the_low_target): Update.
8297 * linux-x86-64-low.c (the_low_target): Update.
8298
d61ddec4
UW
82992008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8300
8301 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
8302 reg-s390.o and reg-s390x.o.
8303
8304 * linux-low.c (new_inferior): New global variable.
8305 (linux_create_inferior, linux_attach): Set it.
8306 (linux_wait_for_process): Call the_low_target.arch_setup after the
8307 target has stopped for the first time.
8308 (initialize_low): Do not call the_low_target.arch_setup.
8309
8310 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
8311 (s390_set_pc): Likewise.
8312 (s390_arch_setup): New function.
8313 (the_low_target): Use s390_arch_setup as arch_setup routine.
8314
8315 * regcache.c (realloc_register_cache): New function.
8316 (set_register_cache): Call it for each existing regcache.
8317
d05b4ac3
UW
83182008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8319
8320 * server.h (init_registers): Remove prototype.
8321
8322 * linux-low.h (struct linux_target_ops): Add arch_setup field.
8323 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
8324 instead of init_registers ().
8325 * linux-arm-low.c (init_registers_arm): Add prototype.
8326 (init_registers_arm_with_iwmmxt): Likewise.
8327 (the_low_target): Add initializer for arch_setup field.
8328 * linux-cris-low.c (init_registers_cris): Add prototype.
8329 (the_low_target): Add initializer for arch_setup field.
8330 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
8331 (the_low_target): Add initializer for arch_setup field.
8332 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
8333 (the_low_target): Add initializer for arch_setup field.
8334 * linux-ia64-low.c (init_registers_ia64): Add prototype.
8335 (the_low_target): Add initializer for arch_setup field.
8336 * linux-m32r-low.c (init_registers_m32r): Add prototype.
8337 (the_low_target): Add initializer for arch_setup field.
8338 * linux-m68k-low.c (init_registers_m68k): Add prototype.
8339 (the_low_target): Add initializer for arch_setup field.
8340 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
8341 (init_registers_mips64_linux): Likewise.
8342 (the_low_target): Add initializer for arch_setup field.
8343 * linux-ppc-low.c (init_registers_ppc): Add prototype.
8344 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
8345 (the_low_target): Add initializer for arch_setup field.
8346 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
8347 (init_registers_powerpc_64): Likewise.
8348 (the_low_target): Add initializer for arch_setup field.
8349 * linux-s390-low.c (init_registers_s390): Add prototype.
8350 (init_registers_s390x): Likewise.
8351 (the_low_target): Add initializer for arch_setup field.
8352 * linux-sh-low.c (init_registers_sh): Add prototype.
8353 (the_low_target): Add initializer for arch_setup field.
8354 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
8355 (the_low_target): Add initializer for arch_setup field.
8356 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
8357 (the_low_target): Add initializer for arch_setup field.
8358
8359 * win32-low.h (struct win32_target_ops): Add arch_setup field.
8360 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
8361 instead of init_registers ().
8362 * win32-arm-low.c (init_registers_arm): Add prototype.
8363 (the_low_target): Add initializer for arch_setup field.
8364 * win32-i386-low.c (init_registers_i386): Add prototype.
8365 (the_low_target): Add initializer for arch_setup field.
8366
8367 * spu-low.c (init_registers_spu): Add prototype.
8368 (initialize_low): Call initialie_registers_spu () instead of
8369 initialize_registers ().
8370
fd96d250
PA
83712008-02-19 Pedro Alves <pedro@codesourcery.com>
8372
8373 * server.c (handle_v_requests): When handling the vRun and vAttach
8374 packets, if already debugging a process, don't kill it. Return an
8375 error instead.
8376
d41b6bb4
DJ
83772008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
8378
8379 * server.c (handle_query): Correct length check.
8380
5ac588cf
PA
83812008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
8382
8383 * win32-low.c (do_initial_child_stuff): Add process handle
8384 parameter. Set current_process_handle and current_process_id from the
8385 parameters. Clear globals.
8386 (win32_create_inferior): Don't set current_process_handle and
8387 current_process_id here. Instead pass them on the call to
8388 do_initial_child_stuff.
8389 (win32_attach): Likewise.
8390 (win32_clear_inferiors): New.
8391 (win32_kill): Don't close the current process handle or the
8392 current thread handle here. Instead call win32_clear_inferiors.
8393 (win32_detach): Don't open a new handle to the process. Call
8394 win32_clear_inferiors.
8395 (win32_join): Don't rely on current_process_handle; open a new
8396 handle using the process id.
8397 (win32_wait): Call win32_clear_inferiors when the inferior process
8398 has exited.
8399
ecd7ecbc
DJ
84002008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
8401
8402 * server.c (monitor_show_help): Add "exit".
8403
1525d545
MG
84042008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
8405
ecd7ecbc 8406 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
8407 (clean): Add reg-xtensa.c.
8408 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
8409 * configure.srv (xtensa*-*-linux*) New target.
8410 * linux-xtensa-low.c: New.
8411 * xtensa-xtregs.c: New.
1525d545 8412
59a016f0
PA
84132008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
8414
8415 * hostio.c: Don't include errno.h.
8416 (errno_to_fileio_errno): Move to hostio-errno.
8417 * hostio.c: (hostio_error): Remove the error parameter. Defer the
8418 error number outputting to the target->hostio_last_error callback.
8419 (hostio_packet_error): Use FILEIO_EINVAL directly.
8420 (handle_open, handle_pread, hostio_error, handle_unlink): Update
8421 calls to hostio_error.
8422 * hostio-errno.c: New.
8423 * server.h (hostio_last_error_from_errno): Declare.
8424 * target.h (target_ops): Add hostio_last_error member.
8425 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
8426 as hostio_last_error handler.
889bf7c5 8427 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
8428 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
8429 (wince_hostio_last_error): New functions.
8430 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
8431 as hostio_last_error handler.
8432 (win32_target_ops) [!_WIN32_WCE]: Register
8433 hostio_last_error_from_errno as hostio_last_error handler.
8434 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
8435 (hostio-errno.o): New rule.
8436 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
8437 * configure.srv (srv_hostio_err_objs): New variable. Default to
8438 hostio-errno.o.
8439 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
8440 * configure: Regenerate.
8441
2d717e4f
DJ
84422008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8443
8444 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
8445 (linux_kill, linux_detach): Clean up the process list.
8446 * remote-utils.c (remote_open): Improve port number parsing.
8447 (putpkt_binary, input_interrupt): Only send interrupts if the target
8448 is running.
8449 * server.c (extended_protocol): Make static.
8450 (attached): Define earlier.
8451 (exit_requested, response_needed, program_argv): New variables.
8452 (target_running): New.
8453 (start_inferior): Clear attached here.
8454 (attach_inferior): Set attached here.
8455 (require_running): Define.
8456 (handle_query): Use require_running and target_running. Implement
8457 "monitor exit".
8458 (handle_v_attach, handle_v_run): New.
8459 (handle_v_requests): Use require_running. Handle vAttach and vRun.
8460 (gdbserver_usage): Update.
8461 (main): Redo argument parsing. Handle --debug and --multi. Handle
8462 --attach along with other options or after the port. Save
8463 program_argv. Support no initial program. Resynchronize
8464 communication with GDB after an error. Handle "monitor exit".
8465 Use require_running and target_running. Always allow the extended
8466 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
8467 restart in extended mode.
8468 * README: Refer to the GDB manual. Update --attach usage.
8469
7407e2de
AS
84702007-12-20 Andreas Schwab <schwab@suse.de>
8471
8472 * linux-low.c (STACK_SIZE): Define.
8473 (linux_tracefork_child): Use it. Use __clone2 on ia64.
8474 (linux_test_for_tracefork): Likewise.
8475
b65d95c5
DJ
84762007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
8477
8478 * linux-low.c (linux_wait_for_event): Update messages. Do not
8479 reinsert auto-delete breakpoints.
8480 * mem-break.c (struct breakpoint): Change return type of handler to
8481 int.
8482 (set_breakpoint_at): Update handler type.
8483 (reinsert_breakpoint_handler): Return 1 instead of calling
8484 delete_breakpoint.
8485 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
8486 setting a new one.
8487 (check_breakpoints): Delete auto-delete breakpoints and return 2.
8488 * mem-break.h (set_breakpoint_at): Update handler type.
8489 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
8490 * win32-low.c (auto_delete_breakpoint): New.
8491 (get_child_debug_event): Use it.
8492
4e799345
DJ
84932007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
8494
8495 * configure.ac: Check for pread and pwrite.
8496 * hostio.c (handle_pread): Fall back to lseek and read.
8497 (handle_pwrite): Fall back to lseek and write.
8498 * config.in, configure: Regenerated.
8499
27524b67
DJ
85002007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
8501
8502 * server.c (myresume): Add own_buf argument.
8503 (main): Update calls.
8504
a20d5e98
DJ
85052007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
8506
8507 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
8508 * remote-utils.c (remote_open): Do not call disable_async_io.
8509 (block_async_io): Delete.
8510 (unblock_async_io): Make static.
8511 (initialize_async_io): New.
8512 * server.c (handle_v_cont): Handle async I/O here.
8513 (myresume): Likewise. Move other common resume tasks here...
8514 (main): ... from here. Call initialize_async_io. Disable async
8515 I/O before the main loop.
8516 * server.h (initialize_async_io): Declare.
8517 (block_async_io, unblock_async_io): Delete prototypes.
8518 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
8519
b79d787e
DJ
85202007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
8521
8522 * remote-utils.c (readchar): Allow binary data in received messages.
8523
d97903b2
PA
85242007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8525
8526 * win32-low.c (attaching): New global.
8527 (win32_create_inferior): Clear the `attaching' global.
8528 (win32_attach): Set the `attaching' global.
8529 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
8530 attaching. Only set a breakpoint at the entry point if not
8531 attaching.
8532
311de423
PA
85332007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8534
8535 * server.c (main): Don't report dll events on the initial
8536 connection on attaches.
8537
6c2d16d2
PA
85382007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8539
8540 * server.c (main): Relax numerical bases supported for the pid of
8541 the --attach command line argument.
8542
5ca906e6
PA
85432007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8544
8545 * win32-low.c (win32_attach): Call OpenProcess before
8546 DebugActiveProcess, not after. Add last error output to error
8547 call.
8548
9c6c8194
PA
85492007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8550
8551 * win32-low.c (win32_get_thread_context)
8552 (win32_set_thread_context): New functions.
8553 (thread_rec): Use win32_get_thread_context.
8554 (continue_one_thread, win32_resume): Use win32_set_thread_context.
8555 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
8556 field.
8557
4d5d1aaa
PA
85582007-12-03 Leo Zayas
8559 Pedro Alves <pedro_alves@portugalmail.pt>
8560
8561 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
8562 global variables.
8563 (child_add_thread): Minor cleanup.
8564 (child_continue): Resume artificially suspended threads before
8565 calling ContinueDebugEvent.
8566 (suspend_one_thread): New.
8567 (fake_breakpoint_event): New.
8568 (get_child_debug_event): Change return type to int. Check here if
8569 gdb sent an interrupt request. If a soft interrupt was requested,
8570 fake a breakpoint event. Return 0 if there is no event to handle,
8571 and 1 otherwise.
8572 (win32_wait): Don't check here if gdb sent an interrupt request.
8573 Ensure there is a valid event to handle.
8574 (win32_request_interrupt): Add soft interruption method as last
8575 resort.
8576
c436e841
PA
85772007-12-03 Leo Zayas
8578 Pedro Alves <pedro_alves@portugalmail.pt>
8579
8580 * win32-low.h (win32_thread_info): Add descriptions to the
8581 structure members. Replace `suspend_count' counter by a
8582 `suspended' flag.
8583 * win32-low.c (thread_rec): Update condition of when to get the
8584 context from the inferior. Rely on ContextFlags being set if it
8585 has already been retrieved. Only suspend the inferior thread if
8586 we haven't already. Warn if that fails.
8587 (continue_one_thread): s/suspend_count/suspended/. Only call
8588 ResumeThread once. Warn if that fails.
8589
e7b5fa67
PA
85902007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
8591
8592 * win32-low.c (win32_wait): Don't read from the inferior when it
8593 has already exited.
8594
a385171d
PA
85952007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
8596
8597 * Makefile.in (win32_low_h): New variable.
8598 (win32-low.o): Add dependency on $(win32_low_h).
8599 (win32-arm-low.o, win32-i386-low.o): New rules.
8600
f80c84b3
DJ
86012007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
8602
8603 * hostio.c: Correct copyright year.
8604
a6b151f1
DJ
86052007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
8606
8607 * Makefile.in (OBS): Add hostio.o.
8608 (hostio.o): New rule.
8609 * server.h (handle_vFile): Declare.
8610 * hostio.c: New file.
8611 * server.c (handle_v_requests): Take packet_len and new_packet_len
8612 for binary packets. Call handle_vFile.
8613 (main): Update call to handle_v_requests.
8614
f9387fc3
DJ
86152007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
8616
8617 * linux-low.c: Include <sched.h>.
8618
51c2684e
DJ
86192007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
8620
8621 * linux-low.c (linux_tracefork_grandchild): New.
8622 (linux_tracefork_child): Use clone.
8623 (linux_test_for_tracefork): Use clone; allocate and free a stack.
8624
75f83163
JB
86252007-10-31 Joel Brobecker <brobecker@adacore.com>
8626
8627 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
8628
da5898ce
DJ
86292007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
8630
8631 * linux-low.c (handle_extended_wait): Handle unexpected signals.
8632
24a09b5f
DJ
86332007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
8634
8635 * inferiors.c (change_inferior_id): Delete.
8636 (add_pid_to_list, pull_pid_from_list): New.
8637 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
8638 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
8639 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
8640 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
8641 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
8642 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
8643 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
8644 (using_threads): Always set to 1.
8645 (handle_extended_wait): New.
8646 (add_process): Do not set TID.
8647 (linux_create_inferior): Set must_set_ptrace_flags.
8648 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
8649 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
8650 (linux_thread_alive): Rename TID argument to LWPID.
8651 (linux_wait_for_process): Handle unknown processes. Do not use TID.
8652 (linux_wait_for_event): Do not use TID or check using_threads. Update
8653 call to dead_thread_notify. Call handle_extended_wait.
8654 (linux_create_inferior): Use PTRACE_SETOPTIONS.
8655 (send_sigstop): Delete sigstop_sent.
8656 (wait_for_sigstop): Avoid TID.
8657 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
8658 (linux_test_for_tracefork): New.
8659 (linux_lookup_signals): Use thread_db_active and
8660 linux_supports_tracefork_flag.
8661 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
8662 * linux-low.h (get_process_thread): Avoid TID.
8663 (struct process_ifo): Move thread_known and tid to the end. Remove
8664 sigstop_sent.
8665 (linux_attach_lwp, thread_db_init): Update prototypes.
8666 * server.h (change_inferior_id): Delete prototype.
8667 (add_pid_to_list, pull_pid_from_list): New prototypes.
8668 * thread-db.c (thread_db_use_events): New.
8669 (find_first_thread): Rename to...
8670 (find_one_thread): ...this. Update callers and messages. Do not
8671 call fatal. Check thread_db_use_events. Do not call
8672 change_inferior_id or new_thread_notify.
8673 (maybe_attach_thread): Update. Do not call new_thread_notify.
8674 (thread_db_init): Set thread_db_use_events. Check use_events.
8675 * utils.c (fatal, warning): Correct message prefix.
8676
30ed0a8f
DJ
86772007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
8678
8679 * Makefile.in (clean): Remove new files.
8680 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
8681 (powerpc-64.o, powerpc-64.c): New rules.
8682 * configure.srv: Use alternate register sets for powerpc64-*-linux*
8683 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
8684 with SPE.
8685 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
8686 SPE targets.
8687 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
8688 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
8689 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
8690 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
8691 (target_regsets): Add AltiVec and SPE register sets.
8692 * configure.ac: Check for AltiVec and SPE.
8693 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
8694 (ppc_fill_vrregset, ppc_store_vrregset): New.
8695 (target_regsets): Add AltiVec register set.
8696 * configure: Regenerated.
8697
fd462a61
DJ
86982007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
8699
8700 * linux-low.c (O_LARGEFILE): Define.
8701 (linux_read_memory): Use /proc/PID/mem.
8702 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
8703 * configure, config.in: Regenerated.
8704
69f223ed
DJ
87052007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8706
8707 * linux-low.c (linux_wait_for_event): Do not pass signals while
8708 single-stepping.
8709
aec18585
PA
87102007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
8711
8712 * win32-low.c (create_process): New.
8713 (win32_create_inferior): Use create_process instead of
8714 CreateProcess. If create_process failed retry appending an ".exe"
8715 suffix. Store the GetLastError result immediatelly after
8716 create_process calls and use it on the call to error.
8717
34d86ddd
PA
87182007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
8719
8720 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
8721
5a0e3bd0
JB
87222007-08-23 Joel Brobecker <brobecker@adacore.com>
8723
8724 * configure.ac: Switch license to GPLv3.
8725
f88c79e6
MS
87262007-08-01 Michael Snyder <msnyder@access-company.com>
8727
8728 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
8729
6b3d9b83
PA
87302007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
8731
8732 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
8733 typedef.
8734 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
8735 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
8736 CloseToolhelp32Snapshot.
8737 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
8738 CloseToolhelp32Snapshot.
8739
c588c53c
MS
87402007-07-27 Michael Snyder <michael.snyder@access-company.com>
8741
8742 * server.c (main): Check for inferior exit before main loop.
8743
aa0403d9
PA
87442007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
8745
8746 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
8747 instead of on tmp_desc.
8748
255e7678
DJ
87492007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
8750 Daniel Jacobowitz <dan@codesourcery.com>
8751
8752 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
8753 (add_thread): Minor cleanups.
8754 (clear_inferiors): Move lower in the file. Clear the DLL
8755 list.
8756 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
8757 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
8758 (xml_escape_text): New.
8759 * server.c (handle_query): Handle qXfer:libraries:read. Report it
8760 for qSupported.
8761 (handle_v_cont): Report errors.
8762 (gdbserver_version): Update.
8763 (main): Correct size of own_buf. Do not report initial DLL events.
8764 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
8765 (unloaded_dll, xml_escape_text): New.
8766 * win32-low.c (enum target_waitkind): Update comments.
8767 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
8768 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
8769 (win32_EnumProcessModules, win32_GetModuleInformation)
8770 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
8771 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
8772 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
8773 (win32_Module32First, win32_Module32Next, load_toolhelp)
8774 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
8775 (get_child_debug_event): Handle DLL events.
8776 (win32_wait): Likewise.
8777
0d37add9
DJ
87782007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
8779
8780 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
8781 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
8782
45e2715e
PA
87832007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
8784
8785 * win32-low.c (handle_output_debug_string): Ignore event if not
8786 waiting.
8787
c5674cf1
PA
87882007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
8789
8790 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
8791
2bbe3cc1
DJ
87922007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
8793
8794 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
8795
ae13219e
DJ
87962007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
8797
8798 * inferiors.c (change_inferior_id): Add comment.
8799 * linux-low.c (check_removed_breakpoint): Add an early
8800 prototype. Improve debug output.
8801 (linux_attach): Doc update.
8802 (linux_detach_one_process, linux_detach): Clean up before releasing
8803 each process.
8804 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
8805 * linux-low.h (struct process_info): Doc improvement.
8806 * mem-break.c (delete_all_breakpoints): New.
8807 * mem-break.h (delete_all_breakpoints): New prototype.
8808 * thread-db.c (find_first_thread): New.
8809 (thread_db_create_event): Call it instead of
8810 thread_db_find_new_threads. Clean up unused variables.
8811 (maybe_attach_thread): Remove first thread handling.
8812 (thread_db_find_new_threads): Use find_first_thread.
8813 (thread_db_get_tls_address): Likewise.
8814
4105de34
DJ
88152007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
8816
8817 * thread-db.c (thread_db_find_new_threads): Add prototype.
8818 (thread_db_create_event): Check for the main thread before adding
8819 a new thread.
8820 (maybe_attach_thread): Only enable event reporting if TID == 0.
8821 (thread_db_get_tls_address): Check for new threads.
8822
2b876972
DJ
88232007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
8824
8825 * linux-low.c (linux_create_inferior): Try execv before execvp.
8826 * spu-low.c (spu_create_inferior): Likewise.
8827
7a245884
DJ
88282007-06-13 Mike Frysinger <vapier@gentoo.org>
8829
8830 * linux-low.c (linux_create_inferior): Change execv to execvp.
8831 * spu-low.c (spu_create_inferior): Likewies.
8832
117ce543
DJ
88332007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
8834
8835 * Makefile.in (clean): Clean new files instead of deleted ones.
8836 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
8837 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
8838 rules.
8839 * configure.srv: Specify XML files and new regformats for MIPS and
8840 MIPS64 GNU/Linux.
8841 * linux-mips-low.c (mips_num_regs): Set to only used registers.
8842 (mips_regmap): Do not fetch $0. Remove unused registers. Add
8843 an entry for the restart register.
8844 (mips_cannot_fetch_register, mips_cannot_store_register)
8845 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
8846 register names to match the XML descriptions.
8847 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
8848 restart register instead of $0.
8849
0e7f50da
UW
88502007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
8851 Markus Deuling <deuling@de.ibm.com>
8852
8853 * remote-utils.c (decode_xfer_write): New function.
8854 * server.h (decode_xfer_write): Add prototype.
8855 * server.c (handle_query): Add PACKET_LEN argument. Support
8856 qXfer:spu:read and qXfer:spu:write packets.
8857 (main): Pass packet_len to handle_query.
8858 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
8859 * target.h (target_ops): Add qxfer_spu.
8860
374c1d38
UW
88612007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
8862
8863 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
8864 accessing non-seekable spufs files.
8865
bb63802a
UW
88662007-05-16 Markus Deuling <deuling@de.ibm.com>
8867
889bf7c5 8868 * server.c (handle_query): Add reply for qC packet.
bb63802a 8869
7390519e
PA
88702007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8871 Leo Zayas <lerele@champenstudios@com>
8872
8873 * server.h (check_remote_input_interrupt_request): New function.
8874 * remote_utils.c (INVALID_DESCRIPTOR): New define.
8875 (remote_desc): Initialize with INVALID_DESCRIPTOR.
8876 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
8877 (check_remote_input_interrupt_request): New function.
8878 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 8879 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
8880 winapi_GenerateConsoleCtrlEvent): New typedefs.
8881 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
8882 to 250 ms.
8883 (win32_wait): Check for remote interrupt request
8884 with check_remote_input_interrupt_request.
8885 (win32_request_interrupt): New function.
8886 (win32_target_op): Set request_interrupt to win32_request_interrupt.
8887
34b34921
PA
88882007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8889
8890 * win32-low.c (debug_registers_changed,
8891 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
8892 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
8893 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
8894 (thread_rec): Get context using the low target.
8895 (child_add_thread): Call thread_added on the low target,
8896 which does the same thing.
8897 (regptr): Delete.
8898 (do_initial_child_stuff): Remove debug registers references.
8899 Set context using the low target. Resume threads after
8900 setting the contexts.
8901 (child_continue): Remove dead variable. Remove debug
8902 registers references.
8903 (child_fetch_inferior_registers): Go through the low target.
8904 (do_child_store_inferior_registers): Remove.
8905 (child_store_inferior_registers): Go through the low target.
8906 (win32_resume): Remove debug registers references.
8907 Set context using the low target.
8908 (handle_exception): Change return type to void. Don't record
8909 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
8910 first chance exception.
889bf7c5 8911 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
8912 goto loop. Always return after waiting for debug event.
8913 (win32_wait): Convert to switch statement. Handle spurious
8914 events.
8915
8916 * win32-i386-low.c (debug_registers_changed,
8917 debug_registers_used): New.
8918 (initial_stuff): Rename to ...
8919 (i386_initial_stuff): ... this. Clear debug registers
8920 state variables.
8921 (store_debug_registers): Delete.
8922 (i386_get_thread_context): New.
8923 (load_debug_registers): Delete.
8924 (i386_set_thread_context): New.
8925 (i386_thread_added): New.
8926 (single_step): Rename to ...
8927 (i386_single_step): ... this.
8928 (do_fetch_inferior_registers): Rename to ...
8929 (i386_fetch_inferior_register): ... this.
8930 (i386_store_inferior_register): New.
8931 (the_low_target): Adapt to new interface.
8932
8933 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
8934 (arm_get_thread_context): New.
8935 (arm_set_thread_context): New.
8936 (regptr): New.
8937 (do_fetch_inferior_registers): Rename to ...
8938 (arm_fetch_inferior_register): ... this.
8939 (arm_store_inferior_register): New.
8940 (arm_wince_breakpoint): Reimplement as unsigned long.
8941 (arm_wince_breakpoint_len): Define.
8942 (the_low_target): Adapt to new interface.
8943
8944 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
8945 load_debug_registers. Add get_thread_context, set_thread_context,
8946 thread_added and store_inferior_register. Rename
8947 fetch_inferior_registers to fetch_inferior_register.
8948 (regptr): Remove declaration.
8949
dd6953e1
PA
89502007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8951
8952 * linux-low.c (linux_detach): Change return type to int. Return 0.
8953 * spu-low.c (spu_detach): Likewise.
8954
444d6139
PA
89552007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8956
8957 * target.h (target_ops): Change return type of detach to int.
8958 Add join.
8959 (join_inferior): New.
8960 * server.c (main): Don't skip detach support on mingw32.
8961 If the inferior doesn't support detaching return error.
8962 Call join_inferior instead of using waitpid.
8963 * linux-low.c (linux_join): New.
8964 (linux_target_op): Add linux_join.
8965 * spu-low.c (spu_join): New.
8966 (spu_target_ops): Add spu_join.
8967 * win32-low.c (win32_detach): Adapt to new interface.
8968 Reopen current_process_handle before detaching. Issue a child
8969 resume before detaching.
8970 (win32_join): New.
8971 (win32_target_op): Add win32_join.
8972
1d5315fe
PA
89732007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8974
8975 * win32-low.c (win32-attach): Fix return value.
8976 * target.h (target_ops): Describe ATTACH return values.
8977
bf914831
PA
89782007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8979
8980 * win32-low.c (GETPROCADDRESS): Define.
8981 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
8982 (winapi_DebugSetProcessKillOnExit): Likewise.
8983 (win32_create_inferior): Force usage of ansi CreateProcessA.
8984 (win32_attach): Use GETPROCADDRESS.
8985 (win32_detach): Likewise.
8986
f72f3e60
PA
89872007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8988
8989 * win32-low.c (win32_wait): Don't use WSTOPSIG.
8990
ed50f18f
PA
89912007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
8992
8993 * win32-low.c: Commit leftover changes from 2007-03-29.
8994
0c2ead7e
DJ
89952007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
8996
8997 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
8998 fields short instead of int. Add explicit padding.
8999 (i387_cache_to_fsave): Remove unnecessary casts.
9000 (i387_fsave_to_cache): Doc fix.
9001 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
9002
73725ff3
DJ
90032007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9004
9005 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
9006 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
9007
d99f33d8
PA
90082007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9009
9010 * configure.srv (arm*-*-mingw32ce*): Move near the other
9011 arm targets.
9012
68070c10
PA
90132007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9014
2482afc6 9015 * configure.ac: Add errno checking.
68070c10
PA
9016 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
9017 sys/file.h and malloc.h.
9018 (AC_CHECK_DECLS): Add perror.
9019 (srv_mingwce): Handle.
2482afc6 9020 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
9021 win32-i386-low.o to srv_tgtobj.
9022 (i[34567]86-*-mingw*): Likewise.
9023 (arm*-*-mingw32ce*): Add case.
9024 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9025 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
9026 [__MINGW32CE__] (strerror): New function.
9027 [__MINGW32CE__] (errno): Define to GetLastError.
9028 [__MINGW32CE__] (COUNTOF): New macro.
9029 (remote_open): Remove extra close call.
9030 * mem-break.c (delete_breakpoint_at): New function.
9031 * mem-break.h (delete_breakpoint_at): Declare.
9032 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9033 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
9034 [USE_WIN32API] (read, write): Add char* casts.
9035 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
9036 * server.h: Include wincecompat.h on Windows CE.
9037 [HAVE_ERRNO_H]: Check.
9038 (perror): Declare if not declared.
9039 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
9040 (perror_with_name): Remove errno declaration.
9041 * wincecompat.h: New.
9042 * wincecompat.c: New.
9043 * win32-low.h: New.
9044 * win32-arm-low.c: New.
9045 * win32-i386-low.c: New.
9046 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
9047 (OUTMSG2): Make it safe.
9048 (_T): New macro.
9049 (COUNTOF): New macro.
9050 (NUM_REGS): Get it from the low target.
9051 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
9052 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
9053 (thread_rec): Let low target handle debug registers.
9054 (child_add_thread): Likewise.
9055 (child_init_thread_list): Likewise.
9056 (continue_one_thread): Likewise.
9057 (regptr): New.
9058 (do_child_fetch_inferior_registers): Move to ...
9059 * win32-i386-low.c: ... here, and rename to ...
9060 (do_fetch_inferior_registers): ... this.
889bf7c5 9061 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
9062 Go through the low target.
9063 (do_child_store_inferior_registers): Use regptr.
9064 (strwinerror): New function.
9065 (win32_create_inferior): Handle Windows CE.
9066 Use strwinerror instead of strerror on Windows error
9067 codes. Add program to the error output.
9068 Don't close the main thread handle on Windows CE.
9069 (win32_attach): Use coredll.dll on Windows CE.
9070 (win32_kill): Close current process and current
9071 thread handles.
9072 (win32_detach): Use coredll.dll on Windows CE.
9073 (win32_resume): Let low target handle debug registers, and
9074 step request.
9075 (handle_exception): Add/Remove initial breakpoint. Avoid
9076 non-existant WSTOPSIG on Windows CE.
9077 (win32_read_inferior_memory): Cast to remove warning.
9078 (win32_arch_string): Go through the low target.
9079 (initialize_low): Call set_breakpoint_data with the low
9080 target's breakpoint.
9081 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
9082 FOP_REGNUM, mappings): Move to ...
9083 * win32-i386-low.c: ... here.
9084 * win32-low.c (win32_thread_info): Move to ...
9085 * win32-low.h: ... here.
9086 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
9087 win32-arm-low.c and wincecompat.c.
9088 (all:): Add $EXEEXT.
9089 (install-only:): Likewise.
9090 (gdbserver:): Likewise.
9091 (gdbreplay:): Likewise.
9092 * config.in: Regenerate.
9093 * configure: Regenerate.
9094
41093d81
PA
90952007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9096
9097 * win32-low.c: Rename typedef thread_info to
9098 win32_thread_info throughout.
9099
544afa54
PA
91002007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9101
9102 * win32-i386-low.c: Rename to ...
9103 * win32-low.c: ... this.
9104 * configure.srv: Replace win32-i386-low.o with win32-low.o.
9105 * Makefile.in: Likewise.
9106
bce7165d
PA
91072007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
9108
9109 * remote-utils.c (monitor_output): Constify msg parameter.
9110 * server.h (monitor_output): Likewise.
9111 * win32-i386-low.c (handle_output_debug_string): New.
9112 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
9113 handle_output_debug_string.
9114 (get_child_debug_event): Likewise.
9115
506c7aa0
DJ
91162007-03-27 Mat Hostetter <mat@lcs.mit.edu>
9117
9118 * server.c (main): Correct strtoul check.
9119
42c81e2a
DJ
91202007-03-27 Jon Ringle <jon@ringle.org>
9121
9122 * linux-low.c: Check __ARCH_HAS_MMU__ also.
9123
9453113a
DJ
91242007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
9125
9126 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
9127
64a69107
DJ
91282007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
9129
9130 * terminal.h: Check HAVE_SGTTY_H.
9131
91322007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
9133
9134 * remote-utils.c (remote_open): Print out the assigned port number.
9135
c74d0ad8
DJ
91362007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
9137
9138 * remote-utils.c (monitor_output): New function.
9139 * server.c (debug_threads): Define here.
9140 (monitor_show_help): New function.
9141 (handle_query): Handle qRcmd.
9142 (main): Do not handle 'd' packet.
9143 * server.h (debug_threads, remote_debug, monitor_output): Declare.
9144 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
9145 of debug_threads.
9146
de7c3b4a
PA
91472007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9148
9149 * Makefile.in (EXEEXT): New.
9150 (clean): Use $(EXEEXT).
9151
ef57601b
PA
91522007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9153
9154 * target.h (target_ops): Rename send_signal to request_interrupt,
9155 and remove enum target_signal parameter.
9156 * linux-low.c (linux_request_interrupt): Rename from
9157 linux_send_signal, and always send SIGINT.
9158 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
9159 and always send SIGINT.
9160 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
9161 of send_signal.
9162 (input_interrupt): Likewise.
9163
820f2bda
PA
91642007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9165
9166 * server.c (get_features_xml): Check if target implemented
9167 arch_string.
9168 * win32-i386-low.c (win32_arch_string): New.
9169 (win32_target_ops): Add win32_arch_string as arch_string member.
9170
ab39bf24
UW
91712007-02-22 Markus Deuling <deuling@de.ibm.com>
9172
9173 * spu-low.c (spu_arch_string): New.
9174 (spu_target_ops): Add spu_arch_string.
9175
61ff6e04
DJ
91762007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
9177
9178 * remote-utils.c: Remove HAVE_TERMINAL_H check.
9179 * configure.ac: Do not check for terminal.h.
9180 * configure, config.in: Regenerated.
9181
fb1e4ffc
DJ
91822007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9183
9184 * Makefile.in (OBS): Add $(XML_BUILTIN).
9185 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
9186 (clean): Update.
9187 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
9188 (arm-with-iwmmxt.c): New.
9189 * config.in, configure: Regenerate.
9190 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
9191 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
9192 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
9193 (arm*-*-linux*): Add iWMMXt and regset support.
9194 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
9195 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
9196 (arm_store_wmmxregset, target_regsets): New.
9197 * server.c (get_features_xml): Take annex argument. Check builtin
9198 XML documents.
9199 (handle_query): Handle multiple annexes.
9200
0f48aa01
DJ
92012007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9202
9203 * remote-utils.c [USE_WIN32API] (read, write): Define.
9204 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
9205 write.
9206
23181151
DJ
92072007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
9208
9209 * linux-i386-low.c (the_low_target): Set arch_string.
9210 * linux-x86-64-low.c (the_low_target): Likewise.
9211 * linux-low.c (linux_arch_string): New.
9212 (linux_target_ops): Add it.
9213 * linux-low.h (struct linux_target_ops): Add arch_string.
9214 * server.c (write_qxfer_response): Use const void * for DATA.
9215 (get_features_xml): New.
9216 (handle_query): Handle qXfer:features:read. Report it for qSupported.
9217 * target.h (struct target_ops): Add arch_string method.
9218
9d606399
DJ
92192007-01-03 Denis Pilat <denis.pilat@st.com>
9220 Daniel Jacobowitz <dan@codesourcery.com>
9221
9222 * linux-low.c (linux_kill): Handle being called with no threads.
9223 * win32-i386-low.c (win32_kill): Likewise.
9224 (get_child_debug_event): Clear current_process_handle.
9225
92262006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
9227 Daniel Jacobowitz <dan@codesourcery.com>
9228
9229 * remote-utils.c (remote_open): Check the type of specified
9230 serial port devices before opening them.
9231 * server.c (main): Kill the inferior if an error occurs during
9232 the first remote_open.
9233
a5e13d24
DJ
92342006-12-05 Markus Deuling <deuling@de.ibm.com>
9235
9236 * README: Update supported targets.
9237
186947f7
DJ
92382006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
9239
9240 * Makefile.in (clean): Remove reg-mips64.c.
9241 (reg-mips64.c, reg-mips64.o): New rules.
9242 * configure.srv: Handle mips64. Include regset support for mips.
9243 * linux-mips-low.c (union mips_register): New.
9244 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
9245 (mips_breakpoint, mips_breakpoint_at): Use int.
9246 (mips_collect_register, mips_supply_register)
9247 (mips_collect_register_32bit, mips_supply_register_32bit)
9248 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9249 (mips_store_fpregset, target_regsets): New.
9250 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
9251
a13e2c95
UW
92522006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
9253
9254 * configure.srv: Add target "spu*-*-*".
9255 * Makefile.in (clean): Remove reg-spu.c.
9256 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
9257 * spu-low.c: New file.
9258
cb7283db
DJ
92592006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9260
9261 * configure.ac: Correct td_thr_tls_get_addr test.
9262 * configure: Regenerated.
9263
89be2091
DJ
92642006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9265
9266 * linux-low.c (linux_wait_for_event): Reformat. Use the
9267 pass_signals array.
9268 * remote-utils.c (decode_address_to_semicolon): New.
9269 * server.c (pass_signals, handle_general_set): New.
9270 (handle_query): Mention QPassSignals for qSupported.
9271 (main): Call handle_general_set.
9272 * server.h (pass_signals, decode_address_to_semicolon): New.
9273
000ef4f0
DJ
92742006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
9275
9276 * server.c (handle_query): Correct error handling for read_auxv.
9277
b7149293
UW
92782005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
9279
9280 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
9281 and srv_linux_thread_db to yes.
9282 * linux-s390-low.c (s390_fill_gregset): New function.
9283 (target_regsets): Define data structure.
9284
dae5f5cf
DJ
92852006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
9286
9287 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
9288 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
9289 * config.in, configure: Regenerated.
9290 * inferiors.c (gdb_id_to_thread): New function.
9291 (gdb_id_to_thread_id): Use it.
9292 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
9293 * linux-low.h (struct process_info): Add th member.
9294 (thread_db_get_tls_address): New prototype.
9295 * remote-utils.c (decode_address): Make non-static.
9296 * server.c (handle_query): Handle qGetTLSAddr.
9297 * server.h (gdb_id_to_thread, decode_address): New prototypes.
9298 * target.h (struct target_ops): Add get_tls_address.
9299 * thread-db.c (maybe_attach_thread): Save the thread handle.
9300 (thread_db_get_tls_address): New.
9301
32ca6d61
DJ
93022006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
9303
9304 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
9305 (linux_resume_one_process): Take a siginfo_t *. Update all
9306 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
9307 (struct pending_signals): Add a siginfo_t.
9308 (linux_wait_for_process): Always set last_status.
9309 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
9310 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
9311 * linux-low.h (struct process_info): Add last_status.
9312
5ffff7c1
DJ
93132006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
9314
9315 * remote-utils.c (try_rle): New function.
9316 (putpkt_binary): Use it.
9317
8695c747
DJ
93182006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
9319
9320 * Makefile.in (clean): Clean reg-x86-64-linux.c.
9321 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
9322 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
9323 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
9324 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
9325 point registers.
9326
290fadea
RS
93272006-08-08 Richard Sandiford <richard@codesourcery.com>
9328
9329 * server.c (terminal_fd): New variable.
9330 (old_foreground_pgrp): Likewise.
9331 (restore_old_foreground_pgrp): New function.
9332 (start_inferior): Record the terminal file descriptor in terminal_fd
9333 and its original foreground group in old_foreground_pgrp. Register
9334 restore_old_foreground_pgrp with atexit().
9335
9f2e1e63
DJ
93362006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
9337
9338 * server.c (handle_query): Correct qPart to qXfer.
9339
b80864fb
DJ
93402006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
9341
9342 * configure.ac: Check for more headers which are missing on
9343 Windows. Automatically supply -lwsock32 and USE_WIN32API.
9344 * configure.srv: Add Cygwin and mingw32.
9345 * remote-utils.c: Don't include headers unconditionally which
9346 are missing on mingw32. Include <winsock.h> for mingw32.
9347 (remote_open): Adjust for mingw32 support. Flush
9348 standard error after writing to it.
9349 (remote_close, putpkt_binary, input_interrupt, block_async_io)
9350 (unblock_async_io, enable_async_io, disable_async_io)
9351 (readchar, getpkt): Update for Winsock support.
9352 (prepare_resume_reply): Expect a protocol signal number.
9353 * server.c: Disable <sys/wait.h> on mingw32.
9354 (start_inferior): Adjust for mingw32 support. Flush
9355 standard error after writing to it.
9356 (attach_inferior): Likewise. Use protocol signal
9357 numbers.
9358 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
9359 and names.
9360 * win32-i386-low.c: New file.
9361 * Makefile.in (XM_CLIBS): Set.
9362 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
9363 (win32-i386-low.o): New dependency rule.
9364 * linux-low.c (linux_wait): Use target signal numbers.
9365 * target.h (struct target_ops): Doc fix.
9366 * server.h (target_signal_to_name): New prototype.
9367 * gdbreplay.c: Don't include headers unconditionally which
9368 are missing on mingw32. Include <winsock.h> for mingw32.
9369 (remote_close, remote_open): Adjust for Winsock support.
9370 * configure, config.in: Regenerated.
9371
0876f84a
DJ
93722006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9373
9374 * server.c (decode_xfer_read, write_qxfer_response): New.
9375 (handle_query): Take a packet length argument. Handle
9376 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
9377 the qSupported response.
9378 (main): Update call to handle_query.
9379
01f9e8fa
DJ
93802006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
9381
9382 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
9383 (putpkt_binary): Renamed from putpkt and adjusted for binary
9384 data.
9385 (putpkt): New wrapper for putpkt_binary.
9386 (readchar): Don't mask off the high bit.
9387 (decode_X_packet): New function.
9388 * server.c (main): Call putpkt_binary if a handler sets the packet
9389 length. Save the length of the incoming packet. Handle 'X'.
9390 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
9391
be2a5f71
DJ
93922006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
9393
9394 * server.c (handle_query): Handle qSupported.
9395
ea025f5f
DJ
93962006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9397
9398 * remote-utils.c (all_symbols_looked_up): New variable.
9399 (look_up_one_symbol): Check it.
9400 * server.h (look_up_one_symbol): New declaration.
9401 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
9402
9308fc88
DJ
94032006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9404
9405 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 9406 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
9407 (PTRACE_GET_THREAD_AREA): Define.
9408 (ps_get_thread_area): New function.
9409
52fb6437
NS
94102006-05-09 Nathan Sidwell <nathan@codesourcery.com>
9411
9412 * configure.srv (m68k*-*-uclinux*): New target.
9413 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
9414 (linux_resume_one_process): Remove extraneous cast.
9415 (linux_read_offsets): New.
9416 (linux_target_op): Add linux_read_offsets on mmuless systems.
9417 * server.c (handle_query): Add qOffsets logic.
9418 * target.h (struct target_ops): Add read_offsets.
9419
21b0f40c
DJ
94202006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
9421
9422 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
9423 (PTRACE_GET_THREAD_AREA): Define.
9424 (ps_get_thread_area): New function.
9425 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
9426 (linux-x86-64-low.o): Update.
9427
0050a760
DJ
94282006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
9429
9430 * configure.ac: Remove checks for prfpregset_t.
9431 * gdb_proc_service.h: New file.
9432 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
9433 new "gdb_proc_service.h".
9434 * proc-service.c: Likewise.
9435 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
9436 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
9437 * Makefile.in (gdb_proc_service_h): Updated.
9438 * configure, config.in: Regenerated.
9439
b92a518e
DJ
94402006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
9441
9442 * remote-utils.c (prepare_resume_reply): Move declaration
9443 of gdb_id_from_wait to the top of the block.
9444
545587ee
DJ
94452006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
9446
9447 * linux-low.c (regsets_store_inferior_registers): Read the regset
9448 from the target before filling it.
9449
9db87ebd
DJ
94502006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9451
9452 * server.c (attach_inferior): Return SIGTRAP for a successful
9453 attach.
9454
dd24457d
DJ
94552006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9456
9457 * Makefile.in (OBS): Add version.o.
9458 (STAGESTUFF): Delete.
9459 (version.o): Add dependencies.
9460 (version.c): Replace rule.
9461 (clean): Remove version.c.
9462 * server.c (gdbserver_version): New.
9463 (gdbserver_usage): Use printf.
9464 (main): Handle --version and --help.
9465 * server.h (version, host_name): Add declarations.
9466
6f0f660e
EZ
94672005-12-23 Eli Zaretskii <eliz@gnu.org>
9468
889bf7c5
PA
9469 * linux-arm-low.c:
9470 * linux-arm-low.c:
9471 * inferiors.c:
9472 * i387-fp.h:
9473 * i387-fp.c:
9474 * gdbreplay.c:
9475 * regcache.c:
9476 * proc-service.c:
9477 * mem-break.h:
9478 * mem-break.c:
9479 * linux-x86-64-low.c:
9480 * linux-sh-low.c:
9481 * linux-s390-low.c:
9482 * linux-ppc64-low.c:
9483 * linux-ppc-low.c:
9484 * linux-mips-low.c:
9485 * linux-m68k-low.c:
9486 * linux-m32r-low.c:
9487 * linux-low.h:
9488 * linux-low.c:
9489 * linux-ia64-low.c:
9490 * linux-i386-low.c:
9491 * linux-crisv32-low.c:
9492 * thread-db.c:
9493 * terminal.h:
9494 * target.h:
9495 * target.c:
9496 * server.h:
9497 * server.c:
9498 * remote-utils.c:
9499 * regcache.h:
9500 * utils.c:
9501 * Makefile.in:
9502 * configure.ac:
6f0f660e
EZ
9503 * gdbserver.1: Add (C) after Copyright. Update the FSF
9504 address.
9505
9d1fb177
DJ
95062005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
9507
9508 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
9509 (arm_breakpoint_at): Recognize both breakpoints.
9510 (the_low_target): Use the correct breakpoint instruction.
9511
011a70c2
DJ
95122005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
9513
9514 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
9515 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
9516 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
9517 (the_low_target): Update.
9518
7fb85e41
AS
95192005-10-25 Andreas Schwab <schwab@suse.de>
9520
9521 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
9522
9523 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
9524 (ia64_num_regs): Reduce to 462.
9525
3db0444b
DJ
95262005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
9527
9528 * acinclude.m4: Correct quoting.
9529 * aclocal.m4: Regenerated.
9530
9531 Suggested by SZOKOVACS Robert <szo@ies.hu>:
9532 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
9533 (thread_db_init): Call thread_db_err_str.
9534 * configure.ac: Check for TD_VERSION.
9535 * config.in, configure: Regenerated.
9536
bee0189a
DJ
95372005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9538
9539 * server.h (error, fatal, warning): Add ATTR_FORMAT.
9540
e9d25b98
DJ
95412005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9542
9543 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
9544 is not available. Define HAVE_PTRACE_GETREGS if it is.
9545 * config.in, configure: Regenerated.
9546 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
9547 * linux-i386-low.c, linux-m68k-low.c: Update to use
9548 HAVE_PTRACE_GETREGS.
9549 * linux-low.c (regsets_fetch_inferior_registers)
9550 (regsets_store_inferior_registers): Only return 0 if we processed
9551 GENERAL_REGS.
9552 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
9553 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
9554
a06660f7
DJ
95552005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9556
9557 * inferiors.c (struct thread_info): Add gdb_id.
9558 (add_thread): Add gdb_id argument.
9559 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
9560 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
9561 calls to add_thread.
9562 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
9563 * server.c (handle_query): Use thread_to_gdb_id.
9564 (handle_v_cont, main): Use gdb_id_to_thread_id.
9565 * server.h (add_thread): Update prototype.
9566 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
9567 prototypes.
9568
5a1f5858
DJ
95692005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9570
9571 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
9572 left-padded registers.
9573 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
9574 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
9575
e122f1f5
SE
95762005-07-01 Steve Ellcey <sje@cup.hp.com>
9577
9578 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
9579 * configure: Regenerate.
9580 * config.in: Regenerate.
9581 * server.h (NEED_DECLARATION_STRERROR):
9582 Replace with !HAVE_DECL_STRERROR.
9583
d592fa2f
DJ
95842005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
9585
9586 * linux-low.c (linux_wait, linux_send_signal): Don't test
9587 an unsigned long variable for > 0 if it could be MAX_ULONG.
9588 * server.c (myresume): Likewise.
9589 * target.c (set_desired_inferior): Likewise.
9590
ccbd4912
MK
95912005-06-13 Mark Kettenis <kettenis@gnu.org>
9592
9593 * configure.ac: Simplify and improve check for socklen_t.
9594 * configure, config.in: Regenerate.
9595
f450004a
DJ
95962005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
9597
9598 * acconfig.h: Remove.
9599 * configure.ac: Add a test for socklen_t. Use three-argument
9600 AC_DEFINE throughout.
9601 * config.in: Regenerated using autoheader 2.59.
9602 * configure: Regenerated.
9603
9604 * gdbreplay.c (socklen_t): Provide a default.
9605 (remote_open): Use socklen_t.
9606 * remote-utils.c (socklen_t): Provide a default.
9607 (remote_open): Use socklen_t.
9608 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
9609 unsigned char.
9610
9611 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
9612 char for buffers.
9613 * linux-low.c (linux_read_memory, linux_write_memory)
9614 (linux_read_auxv): Likewise.
9615 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
9616 (check_mem_write): Likewise.
9617 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
9618 Likewise.
9619 * regcache.c (struct inferior_rgcache_data, registers_to_string)
9620 (registers_from_string, register_data): Likewise.
9621 * server.c (handle_query, main): Likewise.
9622 * server.h (convert_ascii_to_int, convert_int_to_ascii)
9623 (decode_M_packet): Likewise.
9624 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
9625 * target.h (struct target_ops): Update read_memory, write_memory,
9626 and read_auxv.
9627 (read_inferior_memory, write_inferior_memory): Update.
9628 * linux-low.h (struct linux_target_ops): Change type of breakpoint
9629 to unsigned char *.
9630 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
9631 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
9632 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
9633 linux-s390-low.c, linux-sh-low.c: Update for changes in
9634 read_inferior_memory and the_low_target->breakpoint.
9635
eee84df1
DJ
96362005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
9637
9638 * Makefile.in (SFILES): Add linux-ppc64-low.c.
9639 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
9640 * configure.srv: Add powerpc64-*-linux*.
9641 * linux-ppc64-low.c: New file.
9642
45b134e5
OF
96432005-05-23 Orjan Friberg <orjanf@axis.com>
9644
9645 * linux-cris-low.c: New file with support for CRIS.
9646 * linux-crisv32-low.c: Ditto for CRISv32.
9647 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
9648 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 9649 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
9650 reg-crisv32.o, and reg-crisv32.c to make rules.
9651 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
9652 recognized targets.
9653
48d93c75
UW
96542005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
9655
9656 * linux-low.c (fetch_register): Ensure buffer size is a multiple
9657 of sizeof (PTRACE_XFER_TYPE).
9658 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
9659
e013ee27
OF
96602005-05-12 Orjan Friberg <orjanf@axis.com>
9661
889bf7c5 9662 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
9663 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
9664 pointers for hardware watchpoint support.
9665 * linux-low.h (struct linux_target_ops): Ditto.
9666 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
9667 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
9668 to linux_target_ops.
9669 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
9670 reply packet.
9671 * server.c (main): Recognize 'Z' and 'z' packets.
9672
b0ded00b
UW
96732005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
9674
9675 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
9676 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
9677 (the_low_target): Add new members.
9678
8643e2ad
DJ
96792005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
9680
9681 * proc-service.c (ps_lgetregs): Search all_processes instead of
9682 all_threads.
9683
fc620387
DJ
96842005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
9685
9686 * server.c (start_inferior): Change return type to int.
9687 (attach_inferior): Change sigptr to int *.
9688 (handle_v_cont, handle_v_requests): Change signal to int *.
9689 (main): Change signal to int.
9690
96912005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
9692
9693 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
9694 * configure.srv: Add m32r*-*-linux*.
9695 * linux-m32r-low.c: New file.
9696
e0e76420
DJ
96972005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
9698
9699 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
9700
a1928bad
DJ
97012005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
9702
9703 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
9704 Take unsigned long arguments for PIDs.
9705 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
9706 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
9707 (wait_for_sigstop, linux_resume_one_process)
9708 (regsets_fetch_inferior_registers, linux_send_signal)
9709 (linux_read_auxv): Likewise. Update the types of variables holding
9710 PIDs. Update format string specifiers.
9711 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
9712 * remote-utils.c (prepare_resume_reply): Likewise.
9713 * server.c (cont_thread, general_thread, step_thread)
9714 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
9715 unsigned long.
9716 (handle_query): Update format specifiers.
9717 (handle_v_cont, main): Use strtoul for thread IDs.
9718 * server.h (struct inferior_list_entry): Use unsigned long for ID.
9719 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
9720 (general_thread, step_thread, thread_from_wait)
9721 (old_thread_from_wait): Update.
9722 * target.h (struct thread_resume): Use unsigned long for THREAD.
9723 (struct target_ops): Use unsigned long for arguments to attach and
9724 thread_alive.
9725
dcdb98d2
DJ
97262005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
9727
9728 * acinclude.m4: Include bfd/bfd.m4 directly.
9729 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
9730 <agriffis@toolchain.org>.
9731 * aclocal.m4, configure: Regenerated.
9732
bec39cab
AC
97332005-01-07 Andrew Cagney <cagney@gnu.org>
9734
9735 * configure.ac: Rename configure.in, require autoconf 2.59.
9736 * configure: Re-generate.
9737
434c4c77
DJ
97382004-12-08 Daniel Jacobowitz <dan@debian.org>
9739
9740 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
9741 LIBS when finished.
9742 * aclocal.m4: Regenerated.
9743 * configure: Regenerated.
9744
db1d3e1b
AS
97452004-11-21 Andreas Schwab <schwab@suse.de>
9746
9747 * linux-m68k-low.c (m68k_num_gregs): Define.
9748 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
9749 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
9750 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
9751 (m68k_breakpoint_at): New. Add to the_low_target.
9752
9753 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
9754 srv_linux_thread_db to yes.
9755
43360365
JB
97562004-10-20 Joel Brobecker <brobecker@gnat.com>
9757
9758 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
9759 (ARCH_SET_FS): Likewise.
9760 (ARCH_GET_FS): Likewise.
9761 (ARCH_GET_GS): Likewise.
9762
fd500816
DJ
97632004-10-16 Daniel Jacobowitz <dan@debian.org>
9764
9765 * linux-i386-low.c (ps_get_thread_area): New.
9766 * linux-x86-64-low.c (ps_get_thread_area): New.
9767 * linux-low.c: Include <sys/syscall.h>.
9768 (linux_kill_one_process): Don't kill the first thread here.
9769 (linux_kill): Kill the first thread here.
9770 (kill_lwp): New function.
9771 (send_sigstop, linux_send_signal): Use it.
9772 * proc-service.c: Clean up #ifdefs.
9773 (fpregset_info): Delete.
9774 (ps_lgetregs): Update and enable implementation.
9775 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
9776 implementations.
9777 * remote-utils.c (struct sym_cache, symbol_cache): New.
9778 (input_interrupt): Print a clearer message.
9779 (async_io_enabled): New variable.
9780 (enable_async_io, disable_async_io): Use it. Update comments.
9781 (look_up_one_symbol): Use the symbol cache.
9782 * thread-db.c (thread_db_look_up_symbols): New function.
9783 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
9784
f6de3c42
DJ
97852004-10-16 Daniel Jacobowitz <dan@debian.org>
9786
9787 * configure.in: Test for -rdynamic.
9788 * configure: Regenerated.
9789 * Makefile (INTERNAL_LDFLAGS): New.
9790 (gdbserver, gdbreplay): Use it.
9791
2c0fc042
AC
97922004-09-02 Andrew Cagney <cagney@gnu.org>
9793
9794 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
9795
075b3282
DJ
97962004-03-23 Daniel Jacobowitz <drow@mvista.com>
9797
9798 * linux-low.c (linux_wait): Clear all_processes list also.
9799
fa6a77dc
DJ
98002004-03-12 Daniel Jacobowitz <drow@mvista.com>
9801
9802 * linux-low.c: Include <errno.h>. Remove extern declaration of
9803 errno.
9804
6d782a97
DJ
98052004-03-12 Daniel Jacobowitz <drow@mvista.com>
9806
9807 * gdbreplay.c, server.h, utils.c: Update copyright years.
9808
3a7fb99b
DJ
98092004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
9810
9811 * server.c (main): Print child status or termination signal from
9812 variable 'signal', not 'sig'.
9813
c3e735a6
DJ
98142004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
9815
9816 * linux-low.c (linux_read_memory): Change return type to
9817 int. Check for and return error from ptrace().
9818 * target.c (read_inferior_memory): Change return type to int. Pass
9819 back return status from the_target->read_memory().
9820 * target.h (struct target_ops): Adapt *read_memory() prototype.
9821 Update comment.
9822 (read_inferior_memory): Adapt prototype.
9823 * server.c (main): Return an error packet if
9824 read_inferior_memory() returns an error.
9825
a59d1c82
DJ
98262004-03-04 Daniel Jacobowitz <drow@mvista.com>
9827
9828 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
9829 Unify with other clean targets.
9830
dc3f8883
DJ
98312004-02-29 Daniel Jacobowitz <drow@mvista.com>
9832
9833 * server.c (handle_v_cont): Call set_desired_inferior.
9834
89a208da
DJ
98352004-02-29 Daniel Jacobowitz <drow@mvista.com>
9836
9837 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
9838
62ea82f5
DJ
98392004-02-29 Daniel Jacobowitz <drow@mvista.com>
9840
9841 * linux-low.c (linux_wait): Unblock async I/O.
9842 (linux_resume): Block and enable async I/O.
9843 * remote-utils.c (block_async_io, unblock_async_io): New functions.
9844 * server.h (block_async_io, unblock_async_io): Add prototypes.
9845
6910d122
DJ
98462004-02-29 Daniel Jacobowitz <drow@mvista.com>
9847
9848 * remote-utils.c (remote_open): Print a status notice after
9849 opening a TCP port.
9850 * server.c (attach_inferior): Print a status notice after
9851 attaching.
9852
98532004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
9854
9855 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
9856
c89dc5d4
DJ
98572004-02-26 Daniel Jacobowitz <drow@mvista.com>
9858
9859 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
9860 error packet.
9861 * server.c, target.h: Update copyright years.
9862
4b8dad4a
RM
98632004-02-25 Roland McGrath <roland@redhat.com>
9864
9865 * target.h (struct target_ops): New member `read_auxv'.
9866 * server.c (handle_query): Handle qPart:auxv:read: query using that.
9867 * linux-low.c (linux_read_auxv): New function.
9868 (linux_target_ops): Initialize `read_auxv' member to that.
9869
d7446758
JB
98702004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
9871
9872 Committed by Jim Blandy <jimb@redhat.com>.
9873
9874 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 9875 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
9876 instead of GPR_SIZE to distiguish s390 and s390x targets.
9877
5544ad89
DJ
98782004-01-31 Daniel Jacobowitz <drow@mvista.com>
9879
9880 * linux-low.c: Update copyright year.
9881 (check_removed_breakpoint): Clear pending_is_breakpoint.
9882 (linux_set_resume_request, linux_queue_one_thread)
9883 (resume_status_pending_p): New functions.
9884 (linux_continue_one_thread): Use process->resume.
9885 (linux_resume): Only resume threads if there are no pending events.
9886 * linux-low.h (struct process_info): Add resume request
9887 pointer.
9888
2a68b70e
DJ
98892004-01-30 Daniel Jacobowitz <drow@mvista.com>
9890
9891 * regcache.c (new_register_cache): Clear the allocated register
9892 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
9893
64386c31
DJ
98942003-10-13 Daniel Jacobowitz <drow@mvista.com>
9895
9896 * linux-low.c (linux_resume): Take a struct thread_resume *
9897 argument.
9898 (linux_wait): Update call.
9899 (resume_ptr): New static variable.
9900 (linux_continue_one_thread): Renamed from
9901 linux_continue_one_process. Use resume_ptr.
9902 (linux_resume): Use linux_continue_one_thread.
9903 * server.c (handle_v_cont, handle_v_requests): New functions.
9904 (myresume): New function.
9905 (main): Handle 'v' case.
9906 * target.h (struct thread_resume): New type.
9907 (struct target_ops): Change argument of "resume" to struct
9908 thread_resume *.
9909 (myresume): Delete macro.
9910
c938e9b0
L
99112003-08-08 H.J. Lu <hongjiu.lu@intel.com>
9912
9913 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
9914 (uninstall): Support DESTDIR.
9915
7f313d07
BC
9916Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
9917
9918 * configure.srv: Add xscale*linux copy of arm*linux entry.
9919
3b2fc2ea
DJ
99202003-07-24 Daniel Jacobowitz <drow@mvista.com>
9921
9922 * linux-arm-low.c (arm_reinsert_addr): New function.
9923 (the_low_target): Add arm_reinsert_addr.
9924
1c0a559e
MK
99252003-07-08 Mark Kettenis <kettenis@gnu.org>
9926
9927 * mem-break.c: Remove whitespace at end of file.
9928
43d5792c
DJ
99292003-06-28 Daniel Jacobowitz <drow@mvista.com>
9930
9931 * configure.in: Check whether we need to prototype strerror.
9932 * server.h: Optionally prototype strerror.
9933 * gdbreplay.c (perror_with_name): Use strerror.
9934 * linux-low.c (linux_attach_lwp): Use strerror.
9935 * utils.c (perror_with_name): Use strerror.
9936 * config.in, configure: Regenerated.
9937
c8a86edf
DJ
99382003-06-28 Daniel Jacobowitz <drow@mvista.com>
9939
9940 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
9941 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
9942
73d37363
DJ
99432003-06-20 Daniel Jacobowitz <drow@mvista.com>
9944
9945 * Makefile.in (SFILES): Update.
9946 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
9947 low-sun3.c: Remove files.
9948
6ad8ae5c
DJ
99492003-06-17 Daniel Jacobowitz <drow@mvista.com>
9950
9951 * linux-low.c: Move comment to linux_thread_alive where it belonged.
9952 (linux_detach_one_process, linux_detach): New functions.
9953 (linux_target_ops): Add linux_detach.
9954 * server.c (main): Handle 'D' packet.
9955 * target.h (struct target_ops): Add "detach" member.
9956 (detach_inferior): Define.
9957
1581182a
MK
99582003-06-13 Mark Kettenis <kettenis@gnu.org>
9959
9960 From Kelley Cook <kelleycook@wideopenwest.com>:
9961 * configure.srv: Accept i[34567]86 variants.
9962
e5379b03
DJ
99632003-06-05 Daniel Jacobowitz <drow@mvista.com>
9964
9965 * linux-low.c (linux_wait_for_event): Correct comment typos.
9966 (linux_resume_one_process): Call check_removed_breakpoint.
9967 (linux_send_signal): New function.
9968 (linux_target_ops): Add linux_send_signal.
9969 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
9970 of kill.
9971 * target.h (struct target_ops): Add send_signal.
9972
2ff29de4
JB
99732003-05-29 Jim Blandy <jimb@redhat.com>
9974
9975 * linux-low.c (usr_store_inferior_registers): Transfer buf in
9976 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
9977 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
9978 away part of the register's value.
9979
254787d4
DJ
99802003-03-26 Daniel Jacobowitz <drow@mvista.com>
9981
9982 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
9983 (linux_wait_for_event, linux_init_signals): Likewise.
9984
94e10508
DJ
99852003-03-17 Daniel Jacobowitz <drow@mvista.com>
9986
9987 * configure.in: Check for stdlib.h.
9988 * configure: Regenerated.
9989 * config.in: Regenerated.
9990
4c0711e0
DJ
99912003-01-04 Andreas Schwab <schwab@suse.de>
9992
9993 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
9994
ef66e766
AC
99952003-01-02 Andrew Cagney <ac131313@redhat.com>
9996
9997 * Makefile.in: Remove obsolete code.
9998
a1358604
DJ
99992002-11-20 Daniel Jacobowitz <drow@mvista.com>
10000
10001 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
10002 defined(PT_FPR0_HI).
10003
23ce3b1c
DJ
100042002-11-17 Stuart Hughes <seh@zee2.com>
10005
10006 * linux-arm-low.c (arm_num_regs): Increase.
10007 (arm_regmap): Include status register.
10008
100092002-11-17 Daniel Jacobowitz <drow@mvista.com>
10010
10011 * linux-low.c (register_addr): Remove incorrect -1 check.
10012
a9fa9f7d
DJ
100132002-08-29 Daniel Jacobowitz <drow@mvista.com>
10014
10015 * linux-low.c (linux_create_inferior): Call setpgid. Return
10016 the new PID.
10017 (unstopped_p, linux_signal_pid): Remove.
10018 (linux_target_ops): Remove linux_signal_pid.
10019 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
10020 global instead of target method.
10021 * target.h (struct target_ops): Remove signal_pid. Update comment
10022 for create_inferior.
10023 * server.c (signal_pid): New variable.
10024 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 10025 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
10026 (attach_inferior): Set signal_pid.
10027
17574093
DJ
100282002-08-23 Daniel Jacobowitz <drow@mvista.com>
10029
10030 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
10031
100322002-08-20 Jim Blandy <jimb@redhat.com>
10033
10034 * Makefile.in (LDFLAGS): Allow the configure script to establish a
10035 default for this.
10036
100372002-08-01 Andrew Cagney <cagney@redhat.com>
10038
10039 * Makefile.in: Make chill references obsolete.
10040
100412002-07-24 Kevin Buettner <kevinb@redhat.com>
10042
10043 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
10044 * configure: Regenerate.
10045 * config.in: Regenerate.
10046
100472002-07-09 David O'Brien <obrien@FreeBSD.org>
10048
10049 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
10050 (perror_with_name, remote_close, remote_open, expect, play): Static.
10051
100522002-07-04 Michal Ludvig <mludvig@suse.cz>
10053
4b8dad4a 10054 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
10055 byte offsets instead of an array of indexes.
10056 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
10057
100582002-06-13 Daniel Jacobowitz <drow@mvista.com>
10059
10060 * regcache.c: Add comment.
10061
100622002-06-11 Daniel Jacobowitz <drow@mvista.com>
10063
10064 * thread-db.c: New file.
10065 * proc-service.c: New file.
10066 * acinclude.m4: New file.
10067 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
10068 proc-service.o, and thread-db.o.
10069 (linux-low.o): Add USE_THREAD_DB.
10070 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
10071 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
10072 * aclocal.m4: Regenerated.
10073 * config.in: Regenerated.
10074 * configure: Regenerated.
10075 * configure.in: Check for proc_service.h, sys/procfs.h,
10076 thread_db.h, and linux/elf.h headrs.
10077 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
10078 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
10079 Check for -lthread_db and thread support.
10080 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
10081 PowerPC, and SuperH.
10082 * i387-fp.c: Constify arguments.
10083 * i387-fp.h: Likewise.
10084 * inferiors.c: (struct thread_info): Renamed from
10085 `struct inferior_info'. Remove PID member. Use generic inferior
10086 list header. All uses updated.
10087 (inferiors, signal_pid): Removed.
10088 (all_threads): New variable.
10089 (get_thread): Define.
10090 (add_inferior_to_list): New function.
10091 (for_each_inferior): New function.
10092 (change_inferior_id): New function.
10093 (add_inferior): Removed.
10094 (remove_inferior): New function.
10095 (add_thread): New function.
10096 (free_one_thread): New function.
10097 (remove_thread): New function.
10098 (clear_inferiors): Use for_each_inferior and free_one_thread.
10099 (find_inferior): New function.
10100 (find_inferior_id): New function.
10101 (inferior_target_data): Update argument type.
10102 (set_inferior_target_data): Likewise.
10103 (inferior_regcache_data): Likewise.
10104 (set_inferior_regcache_data): Likewise.
10105 * linux-low.c (linux_bp_reinsert): Remove.
10106 (all_processes, stopping_threads, using_thrads)
10107 (struct pending_signals, debug_threads, pid_of): New.
10108 (inferior_pid): Replace with macro.
10109 (struct inferior_linux_data): Remove.
10110 (get_stop_pc, add_process): New functions.
10111 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
10112 Use add_process and add_thread.
10113 (linux_attach_lwp): New function, based on old linux_attach. Use
10114 add_process and add_thread. Set stop_expected for new threads.
10115 (linux_attach): New function.
10116 (linux_kill_one_process): New function.
10117 (linux_kill): Kill all LWPs.
10118 (linux_thread_alive): Use find_inferior_id.
10119 (check_removed_breakpoints, status_pending_p): New functions.
10120 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
10121 Update. Use WNOHANG. Wait for cloned processes also. Update process
10122 struct for the found process.
10123 (linux_wait_for_event): New function.
10124 (linux_wait): Use it. Support LWPs.
10125 (send_sigstop, wait_for_sigstop, stop_all_processes)
10126 (linux_resume_one_process, linux_continue_one_process): New functions.
10127 (linux_resume): Support LWPs.
10128 (REGISTER_RAW_SIZE): Remove.
10129 (fetch_register): Use register_size instead. Call supply_register.
10130 (usr_store_inferior_registers): Likewise. Call collect_register.
10131 Fix recursive case.
10132 (regsets_fetch_inferior_registers): Improve error message.
10133 (regsets_store_inferior_registers): Add debugging.
10134 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
10135 (unstopped_p, linux_signal_pid): New functions.
10136 (linux_target_ops): Add linux_signal_pid.
10137 (linux_init_signals): New function.
10138 (initialize_low): Call it. Initialize using_threads.
10139 * regcache.c (inferior_regcache_data): Add valid
10140 flag.
10141 (get_regcache): Fetch registers lazily. Add fetch argument
10142 and update all callers.
10143 (regcache_invalidate_one, regcache_invalidate): New
10144 functions.
10145 (new_register_cache): Renamed from create_register_cache.
10146 Return the new regcache.
10147 (free_register_cache): Change argument to a void *.
10148 (registers_to_string, registers_from_string): Call get_regcache
10149 with fetch flag set.
10150 (register_data): Make static. Pass fetch flag to get_regcache.
10151 (supply_register): Call get_regcache with fetch flag clear.
10152 (collect_register): Call get_regcache with fetch flag set.
10153 (collect_register_as_string): New function.
10154 * regcache.h: Update.
10155 * remote-utils.c (putpkt): Flush after debug output and use
10156 stderr.
10157 Handle input interrupts while waiting for an ACK.
10158 (input_interrupt): Use signal_pid method.
10159 (getpkt): Flush after debug output and use stderr.
10160 (outreg): Use collect_register_as_string.
10161 (new_thread_notify, dead_thread_notify): New functions.
10162 (prepare_resume_reply): Check using_threads. Set thread_from_wait
10163 and general_thread.
10164 (look_up_one_symbol): Flush after debug output.
10165 * server.c (step_thread, server_waiting): New variables.
10166 (start_inferior): Don't use signal_pid. Update call to mywait.
10167 (attach_inferior): Update call to mywait.
10168 (handle_query): Handle qfThreadInfo and qsThreadInfo.
10169 (main): Don't fetch/store registers explicitly. Use
10170 set_desired_inferior. Support proposed ``Hs'' packet. Update
10171 calls to mywait.
10172 * server.h: Update.
10173 (struct inferior_list, struct_inferior_list_entry): New.
10174 * target.c (set_desired_inferior): New.
10175 (write_inferior_memory): Constify.
10176 (mywait): New function.
10177 * target.h: Update.
10178 (struct target_ops): New signal_pid method.
10179 (mywait): Removed macro, added prototype.
10180
10181 * linux-low.h (regset_func): Removed.
10182 (regset_fill_func, regset_store_func): New.
10183 (enum regset_type): New.
10184 (struct regset_info): Add type field. Use new operation types.
10185 (struct linux_target_ops): stop_pc renamed to get_pc.
10186 Add decr_pc_after_break and breakpoint_at.
10187 (get_process, get_thread_proess, get_process_thread)
10188 (strut process_info, all_processes, linux_attach_lwp)
10189 (thread_db_init): New.
10190
10191 * linux-arm-low.c (arm_get_pc, arm_set_pc,
10192 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
10193 (the_low_target): Add new members.
10194 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
10195 (i386_store_fpxregset): Constify.
10196 (target_regsets): Add new kind identifier.
10197 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
10198 (i386_set_pc): Add debugging.
10199 (i386_breakpoint_at): New function.
10200 (the_low_target): Add new members.
10201 * linux-mips-low.c (mips_get_pc, mips_set_pc)
10202 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
10203 (mips_breakpoint_at): New.
10204 (the_low_target): Add new members.
10205 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
10206 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
10207 (the_low_target): Add new members.
10208 * linux-sh-low.c (sh_get_pc, sh_set_pc)
10209 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
10210 (the_low_target): Add new members.
10211 * linux-x86-64-low.c (target_regsets): Add new kind
10212 identifier.
10213
102142002-05-15 Daniel Jacobowitz <drow@mvista.com>
10215
10216 From Martin Pool <mbp@samba.org>:
10217 * server.c (gdbserver_usage): New function.
10218 (main): Call it.
10219
102202002-05-14 Daniel Jacobowitz <drow@mvista.com>
10221
10222 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
10223 stop_at -> stop_pc.
10224
102252002-05-04 Andrew Cagney <ac131313@redhat.com>
10226
10227 * Makefile.in: Remove obsolete code.
10228
102292002-04-24 Michal Ludvig <mludvig@suse.cz>
10230
10231 * linux-low.c (regsets_fetch_inferior_registers),
10232 (regsets_store_inferior_registers): Removed cast to int from
10233 ptrace() calls.
10234 * regcache.h: Added declaration of struct inferior_info.
10235
102362002-04-20 Daniel Jacobowitz <drow@mvista.com>
10237
10238 * inferiors.c (struct inferior_info): Add regcache_data.
10239 (add_inferior): Call create_register_cache.
10240 (clear_inferiors): Call free_register_cache.
10241 (inferior_regcache_data, set_inferior_regcache_data): New functions.
10242 * regcache.c (struct inferior_regcache_data): New.
10243 (registers): Remove.
10244 (get_regcache): New function.
10245 (create_register_cache, free_register_cache): New functions.
10246 (set_register_cache): Don't initialize the register cache here.
10247 (registers_to_string, registers_from_string, register_data): Call
10248 get_regcache.
10249 * regcache.h: Add prototypes.
10250 * server.h: Likewise.
10251
102522002-04-20 Daniel Jacobowitz <drow@mvista.com>
10253
10254 * mem-break.c: New file.
10255 * mem-break.h: New file.
10256 * Makefile.in: Add mem-break.o rule; update server.h
10257 dependencies.
10258 * inferiors.c (struct inferior_info): Add target_data
10259 member.
10260 (clear_inferiors): Free target_data member if set.
10261 (inferior_target_data, set_inferior_target_data): New functions.
10262 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
10263 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
10264 * linux-low.c (linux_bp_reinsert): New variable.
10265 (struct inferior_linux_data): New.
10266 (linux_create_inferior): Use set_inferior_target_data.
10267 (linux_attach): Likewise. Call add_inferior.
10268 (linux_wait_for_one_inferior): New function.
10269 (linux_wait): Call it.
10270 (linux_write_memory): Add const.
10271 (initialize_low): Call set_breakpoint_data.
10272 * linux-low.h (struct linux_target_ops): Add breakpoint
10273 handling members.
10274 * server.c (attach_inferior): Remove extra add_inferior
10275 call.
10276 * server.h: Include mem-break.h. Update inferior.c
10277 prototypes.
10278 * target.c (read_inferior_memory)
10279 (write_inferior_memory): New functions.
10280 * target.h (read_inferior_memory)
10281 (write_inferior_memory): Change macros to prototypes.
10282 (struct target_ops): Update comments. Add const to write_memory
10283 definition.
10284
102852002-04-11 Daniel Jacobowitz <drow@mvista.com>
10286
10287 * linux-low.c (usr_store_inferior_registers): Support
10288 registers which are allowed to fail to store.
10289 * linux-low.h (linux_target_ops): Likewise.
10290 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
10291 (ppc_cannot_store_register): FPSCR may not be storable.
10292
102932002-04-09 Daniel Jacobowitz <drow@mvista.com>
10294
10295 * server.h: Include <string.h> if HAVE_STRING_H.
10296 * ChangeLog: Correct paths in last ChangeLog entry.
10297
102982002-04-09 Daniel Jacobowitz <drow@mvista.com>
10299
10300 * linux-low.h: Remove obsolete prototypes.
10301 (struct linux_target_ops): New.
10302 (extern the_low_target): New.
10303 * linux-low.c (num_regs, regmap): Remove declarations.
10304 (register_addr): Use the_low_target explicitly.
10305 (fetch_register): Likewise.
10306 (usr_fetch_inferior_registers): Likewise.
10307 (usr_store_inferior_registers): Likewise.
10308 * linux-arm-low.c (num_regs): Remove.
10309 (arm_num_regs): Define.
10310 (arm_regmap): Renamed from regmap, made static.
10311 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
10312 made static.
10313 (arm_cannot_store_register): Renamed from cannot_store_register,
10314 made static.
10315 (the_low_target): New.
10316 * linux-i386-low.c (num_regs): Remove.
10317 (i386_num_regs): Define.
10318 (i386_regmap): Renamed from regmap, made static.
10319 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
10320 made static.
10321 (i386_cannot_store_register): Renamed from cannot_store_register,
10322 made static.
10323 (the_low_target): New.
10324 * linux-ia64-low.c (num_regs): Remove.
10325 (ia64_num_regs): Define.
10326 (ia64_regmap): Renamed from regmap, made static.
10327 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
10328 made static.
10329 (ia64_cannot_store_register): Renamed from cannot_store_register,
10330 made static.
10331 (the_low_target): New.
10332 * linux-m68k-low.c (num_regs): Remove.
10333 (m68k_num_regs): Define.
10334 (m68k_regmap): Renamed from regmap, made static.
10335 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
10336 made static.
10337 (m68k_cannot_store_register): Renamed from cannot_store_register,
10338 made static.
10339 (the_low_target): New.
10340 * linux-mips-low.c (num_regs): Remove.
10341 (mips_num_regs): Define.
10342 (mips_regmap): Renamed from regmap, made static.
10343 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
10344 made static.
10345 (mips_cannot_store_register): Renamed from cannot_store_register,
10346 made static.
10347 (the_low_target): New.
10348 * linux-ppc-low.c (num_regs): Remove.
10349 (ppc_num_regs): Define.
10350 (ppc_regmap): Renamed from regmap, made static.
10351 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
10352 made static.
10353 (ppc_cannot_store_register): Renamed from cannot_store_register,
10354 made static.
10355 (the_low_target): New.
10356 * linux-s390-low.c (num_regs): Remove.
10357 (s390_num_regs): Define.
10358 (s390_regmap): Renamed from regmap, made static.
10359 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
10360 made static.
10361 (s390_cannot_store_register): Renamed from cannot_store_register,
10362 made static.
10363 (the_low_target): New.
10364 * linux-sh-low.c (num_regs): Remove.
10365 (sh_num_regs): Define.
10366 (sh_regmap): Renamed from regmap, made static.
10367 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
10368 made static.
10369 (sh_cannot_store_register): Renamed from cannot_store_register,
10370 made static.
10371 (the_low_target): New.
10372 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
10373 (the_low_target): New.
10374
103752002-04-09 Daniel Jacobowitz <drow@mvista.com>
10376
10377 * Makefile.in: Add stamp-h target.
10378 * configure.in: Create stamp-h.
10379 * configure: Regenerated.
10380
103812002-04-09 Daniel Jacobowitz <drow@mvista.com>
10382
10383 * inferiors.c: New file.
10384 * target.c: New file.
10385 * target.h: New file.
10386 * Makefile.in: Add target.o and inferiors.o. Update
10387 dependencies.
10388 * linux-low.c (inferior_pid): New static variable,
10389 moved from server.c.
10390 (linux_create_inferior): Renamed from create_inferior.
10391 Call add_inferior. Return 0 on success instead of a PID.
10392 (linux_attach): Renamed from myattach.
10393 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
10394 (linux_thread_alive): Renamed from mythread_alive.
10395 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
10396 child dies.
10397 (linux_resume): Renamed from myresume. Add missing ``return 0''.
10398 (regsets_store_inferior_registers): Correct error message.
10399 Add missing ``return 0''.
10400 (linux_fetch_registers): Renamed from fetch_inferior_registers.
10401 (linux_store_registers): Renamed from store_inferior_registers.
10402 (linux_read_memory): Renamed from read_inferior_memory.
10403 (linux_write_memory): Renamed from write_inferior_memory.
10404 (linux_target_ops): New structure.
10405 (initialize_low): Call set_target_ops ().
10406 * remote-utils.c (unhexify): New function.
10407 (hexify): New function.
10408 (input_interrupt): Send signals to ``signal_pid''.
10409 * server.c (inferior_pid): Remove.
10410 (start_inferior): Update create_inferior call.
10411 (attach_inferior): Call add_inferior.
10412 (handle_query): New function.
10413 (main): Call handle_query for `q' packets.
10414 * server.h: Include "target.h". Remove obsolete prototypes.
10415 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
10416
104172002-04-09 Daniel Jacobowitz <drow@mvista.com>
10418
10419 * Makefile.in: Add WARN_CFLAGS. Update configury
10420 dependencies.
10421 * configure.in: Check for <string.h>
10422 * configure: Regenerate.
10423 * config.in: Regenerate.
10424 * gdbreplay.c: Include needed system headers.
10425 (remote_open): Remove strchr prototype.
10426 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
10427 * regcache.c (supply_register): Change buf argument to const void *.
10428 (supply_register_by_name): Likewise.
10429 (collect_register): Change buf argument to void *.
10430 (collect_register_by_name): Likewise.
10431 * regcache.h: Add missing prototypes.
10432 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
10433 * server.c (handle_query): New function.
10434 (attached): New static variable, moved out of main.
10435 (main): Quiet longjmp clobber warnings.
10436 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
10437 * utils.c (error): Remove NORETURN.
10438 (fatal): Likewise.