]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
Call overloaded operators to perform operations on gdb.Value objects.
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
649ebbca
DE
12014-02-19 Doug Evans <dje@google.com>
2
3 * dll.c (clear_dlls): Replace accessing list implemention details
4 with API function.
5 * gdbthread.h (get_first_thread): Declare.
6 * inferiors.c (for_each_inferior_with_data): New function.
7 (get_first_thread): New function.
8 (find_thread_ptid): Simplify.
9 (get_first_inferior): New function.
10 (clear_list): Delete.
11 (one_inferior_p): New function.
12 (clear_inferior_list): New function.
13 (clear_inferiors): Update.
14 * inferiors.h (for_each_inferior_with_data): Declare.
15 (clear_inferior_list): Declare.
16 (one_inferior_p): Declare.
17 (get_first_inferior): Declare.
18 * linux-low.c (linux_wait_for_event): Replace accessing list
19 implemention details with API function.
20 * server.c (target_running): Ditto.
21 (accumulate_file_name_length): New function.
22 (emit_dll_description): New function.
23 (handle_qxfer_libraries): Replace accessing list implemention
24 details with API function.
25 (handle_qxfer_threads_worker): New function.
26 (handle_qxfer_threads_proper): Replace accessing list implemention
27 details with API function.
28 (handle_query): Ditto.
29 (visit_actioned_threads_callback_ftype): New typedef.
30 (visit_actioned_threads_data): New struct.
31 (visit_actioned_threads): Rewrite to be find_inferior callback.
32 (resume): Call find_inferior.
33 (handle_status): Replace accessing list implemention
34 details with API function.
35 (process_serial_event): Replace accessing list implemention details
36 with API function.
37 * target.c (set_desired_inferior): Replace accessing list implemention
38 details with API function.
39 * tracepoint.c (same_process_p): New function.
40 (gdb_agent_about_to_close): Replace accessing list implemention
41 details with API function.
42 * win32-low.c (child_delete_thread): Replace accessing list
43 implemention details with API function.
44 (match_dll_by_basename): New function.
45 (dll_is_loaded_by_basename): New function.
46 (win32_ensure_ntdll_loaded): Replace accessing list implemention
47 details call to dll_is_loaded_by_basename.
48
80894984
DE
492014-02-19 Doug Evans <dje@google.com>
50
51 * dll.h (struct dll_info): Add comment.
52 * gdbthread.h (struct thread_info): Add comment.
53 (current_ptid): Simplify.
54 * inferiors.c (add_process): Update.
55 (remove_process): Update.
56 * inferiors.h (struct process_info): Rename member "head" to "entry".
57 * linux-low.c (delete_lwp): Update.
58 (add_lwp): Update.
59 (last_thread_of_process_p): Update.
60 (kill_one_lwp_callback, linux_kill): Update.
61 (status_pending_p_callback): Update.
62 (wait_for_sigstop): Update. Simplify read of ptid.
63 (start_step_over): Update.
64 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
65 (get_lwp_thread): Update.
66 (struct lwp_info): Rename member "head" to "entry".
67 * regcache.h (inferior_list_entry): Delete.
68 * server.c (kill_inferior_callback): Update.
69 (detach_or_kill_inferior_callback): Update.
70 (print_started_pid): Update.
71 (print_attached_pid): Update.
72 (process_serial_event): Simplify read of ptid.
73 * thread-db.c (thread_db_create_event): Update.
74 (thread_db_get_tls_address): Update.
75 * win32-low.c (current_inferior_ptid): Simplify.
76
46917d26
TT
772014-02-19 Tom Tromey <tromey@redhat.com>
78
79 * target.h (struct target_ops) <supports_btrace>: Add target_ops
80 argument.
81 (target_supports_btrace): Update.
82
0759a81e
YQ
832014-02-14 Yao Qi <yao@codesourcery.com>
84
85 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
86 (rsp-low-ipa.o): New target.
87
a7191e8b
TT
882014-02-12 Tom Tromey <tromey@redhat.com>
89
90 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
91 convert_ascii_to_int.
92 * regcache.c (registers_to_string): Likewise.
93 * remote-utils.c (decode_M_packet): Likewise.
94 * server.c (process_serial_event): Likewise.
95
ff0e980e
TT
962014-02-12 Tom Tromey <tromey@redhat.com>
97
98 * server.c (handle_query, handle_v_run): Use hex2bin, not
99 unhexify.
100 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
101
e9371aff
TT
1022014-02-12 Tom Tromey <tromey@redhat.com>
103
104 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
105 convert_int_to_ascii.
106 * regcache.c (registers_to_string, collect_register_as_string):
107 Likewise.
108 * remote-utils.c (look_up_one_symbol, relocate_instruction):
109 Likewise.
110 * server.c (process_serial_event): Likewise.
111 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
112 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
113
971dc0b8
TT
1142014-02-12 Tom Tromey <tromey@redhat.com>
115
116 * remote-utils.c (look_up_one_symbol, monitor_output): Use
117 bin2hex, not hexify.
118 * tracepoint.c (cmd_qtstatus): Likewise.
119
0a822afb
TT
1202014-02-12 Tom Tromey <tromey@redhat.com>
121
122 * remote-utils.c (monitor_output): Pass explicit length to
123 hexify.
124
9c3d6531
TT
1252014-02-12 Tom Tromey <tromey@redhat.com>
126
127 * tracepoint.c: Include rsp-low.h.
128 * server.c: Include rsp-low.h.
129 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
130 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
131 declare.
132 * remote-utils.c: Include rsp-low.h.
133 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
134 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
135 (convert_int_to_ascii, convert_ascii_to_int): Move to
136 common/rsp-low.c.
137 * regcache.c: Include rsp-low.h.
138 * ax.c: Include rsp-low.h.
139 * Makefile.in (SFILES): Add common/rsp-low.c.
140 (OBS): Add rsp-low.o.
141 (rsp-low.o): New target.
142
01fd3ea5
TT
1432014-02-12 Tom Tromey <tromey@redhat.com>
144
145 * utils.h (pulongest, plongest, phex_nz): Don't declare.
146 Include print-utils.h.
147 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
148 (plongest, thirty_two, phex_nz): Remove.
149 * Makefile.in (SFILES): Add common/print-utils.c.
150 (OBS): Add print-utils.o.
151 (print-utils-ipa.o): New target.
152 (print-utils.o): New target.
153 (IPA_OBJS): Add print-utils-ipa.o.
154
e99dc820
TT
1552014-02-06 Tom Tromey <tromey@redhat.com>
156
157 * Makefile.in (SFILES): Fix indentation.
158
ee1e2d4f
DE
1592014-02-05 Doug Evans <dje@google.com>
160
161 * linux-low.c (linux_wait_for_event): Improve comment.
162 (linux_wait_1): Keep current_inferior in sync with event_child.
163
f5a02773
DE
1642014-01-22 Doug Evans <dje@google.com>
165
166 * gdbthread.h (gdb_id_to_thread): Delete, unused.
167
87ce2a04
DE
1682014-01-22 Doug Evans <dje@google.com>
169
170 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
171 * configure: Regenerate.
172 * config.in: Regenerate.
173 * Makefile.in (SFILES): Add debug.c.
174 (OBS): Add debug.o.
175 * debug.c: New file.
176 * debug.h: New file.
177 * linux-aarch64-low.c (*): Update all debugging printfs to use
178 debug_printf instead of fprintf.
179 * linux-arm-low.c (*): Ditto.
180 * linux-cris-low.c (*): Ditto.
181 * linux-crisv32-low.c (*): Ditto.
182 * linux-m32r-low.c (*): Ditto.
183 * linux-sparc-low.c (*): Ditto.
184 * linux-x86.c (*): Ditto.
185 * linux-low.c (*): Ditto.
186 (linux_wait_1): Add calls to debug_enter, debug_exit.
187 (linux_wait): Remove redundant debugging printf.
188 (stop_all_lwps): Add calls to debug_enter, debug_exit.
189 (linux_resume, unstop_all_lwps): Ditto.
190 * mem-break.c (*): Update all debugging printfs to use
191 debug_printf instead of fprintf.
192 * remote-utils.c (*): Ditto.
193 * thread-db.c (*): Ditto.
194 * server.c #include <ctype.h>, "gdb_vecs.h".
195 (debug_threads): Moved to debug.c.
196 (*): Update all debugging printfs to use debug_printf instead of
197 fprintf.
198 (start_inferior): Replace call to fflush with call to debug_flush.
199 (monitor_show_help): Mention set debug-format.
200 (parse_debug_format_options): New function.
201 (handle_monitor_command): Handle "monitor set debug-format".
202 (gdbserver_usage): Mention --debug-format.
203 (main): Parse --debug-format.
204 * server.h (debug_threads): Declaration moved to debug.h.
205 #include "debug.h".
206 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
207 trace_debug_1 that uses debug_printf.
208 (tracepoint_look_up_symbols): Update all debugging printfs to use
209 debug_printf instead of fprintf.
210
e671835b
BS
2112014-01-20 Baruch Siach <baruch@tkos.co.il>
212
213 * linux-xtensa-low.c: Include asm/ptrace.h instead of
214 sys/ptrace.h.
215
b5737fa9
PA
2162014-01-17 Pedro Alves <palves@redhat.com>
217
ea38d2a9 218 PR build/16445
c7faa97a
PA
219 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
220 defined after including gdb_proc_service.h.
b5737fa9 221
40ed484e
DE
2222014-01-16 Doug Evans <dje@google.com>
223
224 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
225 (match_dll): Use it.
226
969c39fb
MM
2272014-01-16 Markus Metzger <markus.t.metzger@intel.com>
228
229 * target.h (target_ops) <read_btrace>: Change parameters and
230 return type to allow error reporting.
231 * server.c (handle_qxfer_btrace): Support delta reads. Pass
232 trace reading errors on.
233 * linux-low.c (linux_low_read_btrace): Pass trace reading
234 errors on.
235 (linux_low_disable_btrace): New.
236
ab7f45ba
DE
2372014-01-15 Doug Evans <dje@google.com>
238
239 * inferiors.c (thread_id_to_gdb_id): Delete.
240 * inferiors.h (thread_id_to_gdb_id): Delete.
241
66af0f44
EZ
2422014-01-13 Eli Zaretskii <eliz@gnu.org>
243
244 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
245 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
246 versions.
247
9939e131
PA
2482014-01-08 Pedro Alves <palves@redhat.com>
249
250 * server.c (handle_status): Don't discard previous queued stop
251 replies or thread's pending status here.
252 (main) <disconnection>: Do it here instead.
253
b7ea362b
PA
2542014-01-08 Pedro Alves <palves@redhat.com>
255
256 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
257 * server.c (visit_actioned_threads, handle_pending_status): New
258 function.
259 (handle_v_cont): Factor out parts to ...
260 (resume): ... this new function. If in all-stop, and a thread
261 being resumed has a pending status, report it without actually
262 resuming.
263 (myresume): Adjust to use the new 'resume' function.
264 (clear_pending_status_callback, set_pending_status_callback)
265 (find_status_pending_thread_callback): New functions.
266 (handle_status): Handle the case of multiple threads having
267 interesting statuses to report. Report threads' real last signal
268 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
269 with an interesting thread to report the status for, instead of
270 always reporting the status of the first thread.
271
28498c42
JB
2722014-01-01 Joel Brobecker <brobecker@adacore.com>
273
274 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
275 * gdbreplay.c (gdbreplay_version): Likewise.
276
f45c82da
YZ
2772013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
278
279 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
280 iov.iov_len with the real length in use.
281
379a5e2d
JB
2822013-12-13 Joel Brobecker <brobecker@adacore.com>
283
284 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
285 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
286 for all targets that use win32-low.c.
287 * win32-low.c (win32_ensure_ntdll_loaded): New function.
288 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
289
4210d83e
PA
2902013-12-13 Pedro Alves <palves@redhat.com>
291
292 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
293 if equal to TARGET_WAITKIND_LOADED.
294 * win32-low.c (cached_status): New static global.
295 (win32_wait): Add declaration.
296 (do_initial_child_stuff): Flush all initial pending debug events
297 up to the initial breakpoint.
298 (win32_wait): If CACHED_STATUS was set, return that instead
299 of doing a real wait. Remove the code resuming the execution
300 of the inferior after receiving a TARGET_WAITKIND_LOADED event
301 during the initial phase. Also remove the code changing
302 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
303 TARGET_WAITKIND_STOPPED.
304
e7f0d979
YQ
3052013-12-11 Yao Qi <yao@codesourcery.com>
306
307 * notif.c (handle_notif_ack): Return 0 if no notification
308 matches.
309
ebcf782c
DE
3102013-11-20 Doug Evans <dje@google.com>
311
312 * linux-low.c (linux_set_resume_request): Fix comment.
313
20ad9378
DE
3142013-11-20 Doug Evans <dje@google.com>
315
316 * linux-low.c (resume_status_pending_p): Tweak comment.
317
a196ebeb
WT
3182013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
319
320 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
321 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
322 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
323 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
324 (srv_amd64_regobj): Add amd64-mpx.o.
325 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
326 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
327 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
328 * i387-fp.c (num_pl_bnd_register) Added constant.
329 (num_pl_bnd_cfg_registers) Added constant.
330 (struct i387_xsave) Added reserved area and MPX fields.
331 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
332 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
333 function.
334 (tdesc_i386_mpx_linux): Add MPX amd64 target.
335 (init_registers_amd64_mpx_linux): Declare new function.
336 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
337 (x86_64_regmap): Add MPX registers.
338 (x86_linux_read_description): Add MPX case.
339 (initialize_low_arch): Initialize MPX targets.
340
0080a2f6
TT
3412013-11-18 Tom Tromey <tromey@redhat.com>
342
343 * configure: Rebuild.
344 * configure.ac: Don't check for stdlib.h.
345 * gdbreplay.c: Unconditionally include stdlib.h.
346
2978b111
TT
3472013-11-18 Tom Tromey <tromey@redhat.com>
348
349 * config.in: Rebuild.
350 * configure: Rebuild.
351 * configure.ac: Don't use AC_HEADER_DIRENT.
352
a3d08894
TT
3532013-11-18 Tom Tromey <tromey@redhat.com>
354
355 * server.h: Don't check HAVE_STRING_H.
356 * gdbreplay.c: Don't check HAVE_STRING_H.
357 * configure: Rebuild.
358
0a5dd17d
TT
3592013-11-18 Tom Tromey <tromey@redhat.com>
360
361 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
362 LIBGNU.
363
1bd2f0ba
TT
3642013-11-08 Tom Tromey <tromey@redhat.com>
365
366 * configure, config.in: Rebuild.
367 * configure.ac: Remove unused configury.
368
3266f10b
TT
3692013-11-08 Tom Tromey <tromey@redhat.com>
370
371 * acinclude.m4: Include common.m4, codeset.m4.
372 * configure, config.in: Rebuild.
373 * configure.ac: Use GDB_AC_COMMON.
374
6682d959
AA
3752013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
376
377 * linux-s390-low.c (HWCAP_S390_TE): New define.
378 (s390_arch_setup): Consider the TE field in the HWCAP for
379 determining 'have_regset_tdb'.
380
fd0a4d76
SDJ
3812013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
382
383 PR gdb/16014
384 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
385 call to sizeof.
386
1a3d890b
PA
3872013-10-02 Pedro Alves <palves@redhat.com>
388
389 * server.c (process_serial_event): Don't output "GDBserver
390 exiting" if GDB is connected through stdio.
391 * target.c (mywait): Likewise, be silent if GDB is connected
392 through stdio.
393
97ad4581
JB
3942013-10-01 Joel Brobecker <brobecker@adacore.com>
395
396 * lynx-low.c (lynx_add_threads_after_attach): New function.
397 (lynx_attach): Remove call to add_thread. Add call to
398 lynx_add_threads_after_attach instead.
399
5b4e221c
MF
4002013-09-28 Mike Frysinger <vapier@gentoo.org>
401
402 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
403 * config.in, configure: Regenerated.
404
ee47b2f8
YQ
4052013-09-18 Yao Qi <yao@codesourcery.com>
406
407 PR server/15959
408 * server.c (start_inferior): Clear 'resume_info'.
409
d6707650 4102013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 411
d6707650
JW
412 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
413 for each register.
414
9243dd0e 4152013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 416
9243dd0e
JW
417 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
418 linux-tile-low.o to srv_tgtobj.
419
c623a6ef
WN
4202013-09-16 Will Newton <will.newton@linaro.org>
421
422 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
423 out regs.
424
fb71d39e
PA
4252013-09-06 Pedro Alves <palves@redhat.com>
426
427 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
428 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
429 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
430 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
431 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
432 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
433
8e7e9910
PA
4342013-09-06 Pedro Alves <palves@redhat.com>
435
436 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
437 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
438
7c3a12ca
PA
4392013-09-06 Pedro Alves <palves@redhat.com>
440
441 * linux-amd64-ipa.c: Include tracepoint.h.
442 * linux-i386-ipa.c: Include tracepoint.h.
443
8eb3d7b6
RW
4442013-09-06 Ricard Wanderlof <ricardw@axis.com>
445
446 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
447 (ps_get_thread_area): New function.
448
eddddb9d
RW
4492013-09-06 Ricard Wanderlof <ricardw@axis.com>
450
451 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
452 (initialize_low_arch): Call init_registers_crisv32 rather than
453 init_register_crisv32.
454
533b0600
PA
4552013-09-05 Pedro Alves <palves@redhat.com>
456
457 * server.h (handle_vFile, hostio_last_error_from_errno): Move
458 to ...
459 * hostio.h: ... this new file.
460 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
461 win32-low.c: Include hostio.h.
462
0ce3d3b5
PA
4632013-09-05 Pedro Alves <palves@redhat.com>
464
465 * server.h (gdb_client_data, handler_func, callback_handler_func)
466 (delete_file_handler, add_file_handler, append_callback_event)
467 (delete_callback_event, start_event_loop, initialize_event_loop):
468 Move to event-loop.h and include it.
469 * event-loop.h: New file.
470
799cdc37
PA
4712013-09-05 Pedro Alves <palves@redhat.com>
472
473 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
474 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
475 (loaded_dll, unloaded_dll): Move to ...
476 * dll.h: ... this new file.
477 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
478
6a6bbd9d
PA
4792013-09-05 Pedro Alves <palves@redhat.com>
480
481 * server.h (current_process, get_thread_process, all_processes)
482 (add_inferior_to_list, for_each_inferior, current_inferior)
483 (remove_inferior, add_process, remove_process, find_process_pid)
484 (have_started_inferiors_p, have_attached_inferiors_p)
485 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
486 (clear_inferiors, find_inferior, find_inferior_id)
487 (inferior_target_data, set_inferior_target_data)
488 (inferior_regcache_data, set_inferior_regcache_data): Move to
489 inferiors.h, and include it.
490 * inferiors.h: New file.
491
f699aaba
PA
4922013-09-05 Pedro Alves <palves@redhat.com>
493
494 * server.h (struct emit_ops, current_insn_ptr, emit_error):
495 Move ...
496 * ax.h: ... here.
497
c144c7a0
PA
4982013-09-05 Pedro Alves <palves@redhat.com>
499
500 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
501 tracepoint.h.
502 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
503 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
504 (handle_tracepoint_general_set, handle_tracepoint_query)
505 (tracepoint_finished_step, tracepoint_was_hit)
506 (release_while_stepping_state_list, current_traceframe)
507 (in_readonly_region, traceframe_read_mem)
508 (fetch_traceframe_registers, traceframe_read_sdata)
509 (traceframe_read_info, struct fast_tpoint_collect_status)
510 (fast_tracepoint_collecting, force_unlock_trace_buffer)
511 (handle_tracepoit_bkpts, initialize_low_tracepoint)
512 (supply_fast_tracepoint_registers)
513 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
514 (ipa_tdesc, claim_trampoline_space)
515 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
516 (agent_mem_read, agent_get_trace_state_variable_value)
517 (agent_set_trace_state_variable_value, agent_tsv_read)
518 (agent_mem_read_string, get_raw_reg_func_addr)
519 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
520 * tracepoint.h: ... this new file.
521
ff42e6ab
PA
5222013-09-05 Pedro Alves <palves@redhat.com>
523
524 * server.h (perror_with_name, error, fatal, warning, paddress)
525 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
526 include it.
527 * utils.h: New file.
528
541af0f4
PA
5292013-09-05 Pedro Alves <palves@redhat.com>
530
531 * server.h (remote_debug, noack_mode, transport_is_reliable)
532 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
533 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
534 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
535 (write_enn, initialize_async_io, enable_async_io)
536 (disable_async_io, check_remote_input_interrupt_request)
537 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
538 (dead_thread_notify, prepare_resume_reply)
539 (decode_address_to_semicolon, decode_address, decode_m_packet)
540 (decode_M_packet, decode_X_packet, decode_xfer_write)
541 (decode_search_memory_packet, unhexify, hexify)
542 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
543 (look_up_one_symbol, relocate_instruction)
544 (monitor_output): Move to remote-utils.h, and include it.
545 * remote-utils.h: New file.
546
eebdf26b
PA
5472013-09-05 Pedro Alves <palves@redhat.com>
548
549 * server.h (_): Delete.
550
3aafd2ff
PA
5512013-09-02 Pedro Alves <palves@redhat.com>
552
553 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
554 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
555 allocated.
556 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
557
cee83bcb
PM
5582013-09-02 Pierre Muller <muller@sourceware.org>
559
560 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
561 or WriteProcessMemory complete successfully and handle
562 ERROR_PARTIAL_COPY error.
563
9a13b2fa
PA
5642013-09-02 Pedro Alves <palves@redhat.com>
565
566 * server.c (gdb_read_memory): Return -1 on traceframe memory read
567 error instead of EIO.
568
602e3198
JK
5692013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
570
571 PR server/15604
572 * linux-low.c: Include filestuff.h.
573 (linux_create_inferior) <pid == 0>: Call close_most_fds.
574 * lynx-low.c: Include filestuff.h.
575 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
576 * server.c: Include filestuff.h.
577 (main): Call notice_open_fds.
578 * spu-low.c: Include filestuff.h.
579 (spu_create_inferior) <pid == 0>: Call close_most_fds.
580
96d7229d
LM
5812013-08-22 Luis Machado <lgustavo@codesourcery.com>
582
583 * Makefile.in: Explain why ../target and ../nat are not
584 listed as include file search paths.
585 (linux-waitpid.o): New object file rule.
586 * configure.srv (srv_native_linux_obj): New variable.
587 Replace all occurrences of linux native object files with
588 $srv_native_linux_obj.
589 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
590 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
591 (linux_enable_event_reporting): Remove declaration.
592 (my_waitpid): Moved to common/linux-waitpid.c.
593 (linux_wait_for_event): Pass ptid when calling
594 linux_enable_event_reporting.
595 (linux_supports_tracefork_flag): Remove.
596 (linux_enable_event_reporting): Likewise.
597 (linux_tracefork_grandchild): Remove.
598 (STACK_SIZE): Moved to common/linux-ptrace.c.
599 (linux_tracefork_child): Remove.
600 (linux_test_for_tracefork): Remove.
601 (linux_look_up_symbols): Call linux_supports_traceclone.
602 (initialize_low): Remove call to linux_test_for_tracefork.
603 * linux-low.h (PTRACE_TYPE_ARG3): Move to
604 common/linux-ptrace.h.
605 (PTRACE_TYPE_ARG4): Likewise.
606 Include linux-ptrace.h.
607
32940073
PA
6082013-08-21 Pedro Alves <palves@redhat.com>
609
610 * config.in: Renegerate.
611
33b60d58 6122013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 613
33b60d58
LM
614 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
615 (SFILES): Remove $(srcdir)/common/target-common.c and
616 add $(srcdir)/target/waitstatus.c.
617 (OBS): Remove target-common.o and add waitstatus.o.
618 (server_h): Remove $(srcdir)/../common/target-common.h and
619 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
620 and $(srcdir)/../target/waitstatus.h.
621 (target-common.o): Remove.
622 (waitstatus.o): New target object file.
623 * target.h: Do not include target-common.h and
624 include target/resume.h, target/wait.h and
625 target/waitstatus.h.
626
b8e1b30e
LM
6272013-08-13 Luis Machado <lgustavo@codesourcery.com>
628
629 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
630 to PTRACE_TYPE_ARG3.
631 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
632 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
633 PTRACE_TYPE_ARG4.
634 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
635 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
636
7a60ad40
YQ
6372013-07-27 Jie Zhang <jie@codesourcery.com>
638 Daniel Jacobowitz <dan@codesourcery.com>
639 Yao Qi <yao@codesourcery.com>
640
641 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
642 (mips-linux-watch.o): New rule.
643 (mips_linux_watch_h): New variable.
644 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
645 srv_tgtobj.
646 * linux-mips-low.c: Include mips-linux-watch.h.
647 (struct arch_process_info, struct arch_lwp_info): New.
648 (update_watch_registers_callback): New function.
649 (mips_linux_new_process, mips_linux_new_thread) New functions.
650 (mips_linux_prepare_to_resume, mips_insert_point): New
651 functions.
652 (mips_remove_point, mips_stopped_by_watchpoint): New
653 functions.
654 (rsp_bp_type_to_target_hw_bp_type): New function.
655 (mips_stopped_data_address): New function.
656 (the_low_target): Add watchpoint support functions.
657
de6f69ad
YQ
6582013-07-27 Yao Qi <yao@codesourcery.com>
659
660 * i386-low.c: Include break-common.h.
661 (enum target_hw_bp_type): Remove.
662
3360c0bf
LM
6632013-07-24 Luis Machado <lgustavo@codesourcery.com>
664
665 * Makefile.in (SFILES): /common/target-common.c.
666 (OBS): Add target-common.o.
667 (server_h): Add $(srcdir)/../common/target-common.h.
668 (target-common.o): New target.
669 * server.c (queue_stop_reply_callback): Free
670 status string after use.
671 * target.c (target_waitstatus_to_string): Remove.
672 * target.h: Include target-common.h.
673 (resume_kind): Likewise.
674 (target_waitkind): Likewise.
675 (target_waitstatus): Likewise.
676 (TARGET_WNOHANG): Likewise.
677
bd885420
YQ
6782013-07-04 Yao Qi <yao@codesourcery.com>
679
680 * Makefile.in (host_alias): Use @host_noncanonical@.
681 (target_alias): Use @target_noncanonical@.
682 * configure.ac: Use ACX_NONCANONICAL_TARGET and
683 ACX_NONCANONICAL_HOST.
684 * configure: Regenerated.
685
686 Revert:
687 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
688
689 * configure.ac (version_host, version_target): Set and AC_SUBST them.
690 * configure: Rebuild.
691 * Makefile.in (version_host, version_target): Get from configure.
692 (version.c): Use $(version_host) and $(version_target).
693
17ef446e
PA
6942013-07-03 Pedro Alves <palves@redhat.com>
695
696 * Makefile.in (config.status): Depend on development.sh.
697 * acinclude.m4: Include libmcheck.m4.
698 * configure: Regenerate.
699
7a9a7487
MG
7002013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
701
702 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
703 attribute inside the parentheses.
704 (winapi_DebugSetProcessKillOnExit): Ditto.
705 (winapi_DebugBreakProcess): Ditto.
706 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 707
49b64de6
MG
7082013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
709
710 * notif.h (notif_event): Add a dummy member to avoid compiler
711 errors.
712
d5749ee7
PA
7132013-07-01 Pedro Alves <palves@redhat.com>
714
715 * hostio.c (HOSTIO_PATH_MAX): Define.
716 (require_filename, handle_open, handle_unlink, handle_readlink):
717 Use it.
718
d8d2a3ee
PA
7192013-07-01 Pedro Alves <palves@redhat.com>
720
721 * server.h: Include "pathmax.h".
722 * linux-low.c: Don't include sys/param.h.
723 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
724 MAXPATHLEN.
725 * win32-low.c: Don't include sys/param.h.
726 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
727
bc7dea8d
PA
7282013-07-01 Pedro Alves <palves@redhat.com>
729
730 * event-loop.c: Don't check HAVE_UNISTD_H before including
731 <unistd.h>.
732 * gdbreplay.c: Likewise.
733 * remote-utils.c: Likewise.
734 * server.c: Likewise.
735 * configure.ac: Don't check for unistd.h.
736 * configure: Regenerate.
737
d6c2da54
TT
7382013-06-28 Tom Tromey <tromey@redhat.com>
739
740 * Makefile.in (version.c): Use version.in, not
741 common/version.in.
742
257b6bec
MG
7432013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
744
745 * configure.ac (version_host, version_target): Set and AC_SUBST them.
746 * configure: Rebuild.
747 * Makefile.in (version_host, version_target): Get from configure.
748 (version.c): Use $(version_host) and $(version_target).
749
86ebe149
DK
7502013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
751
752 Fix trace-status to output user name without trailing colon.
753 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
754
f30aa5af
DK
7552013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
756
757 Fix trace-status to output proper start-time and stop-time.
758 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
759 output start time and stop time in hex as gdb expects.
760
28a93511
YQ
7612013-06-26 Pedro Alves <pedro@codesourcery.com>
762
763 * tracepoint.c (build_traceframe_info_xml): Output trace state
764 variables present in the trace buffer.
765
01208463
TT
7662013-06-24 Tom Tromey <tromey@redhat.com>
767
768 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
769 create-version.sh.
770 (version.o): Remove.
771 * gdbreplay.c: Include version.h.
772 (version, host_name): Don't declare.
773 * server.h: Include version.h.
774 (version, host_name): Don't declare.
775
760256f9
PA
7762013-06-12 Pedro Alves <palves@redhat.com>
777
778 * linux-x86-low.c (linux_is_elf64): Delete global.
779 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
780 with local linux_pid_exe_is_elf_64_file use.
781
030031ee
PA
7822013-06-11 Pedro Alves <palves@redhat.com>
783
784 * linux-low.c (regset_disabled, disable_regset): New functions.
785 (regsets_fetch_inferior_registers)
786 (regsets_store_inferior_registers): Use them.
787 (initialize_regsets_info); Don't allocate the disabled_regsets
788 array here.
789 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
790 comment.
791
5da6eb0a
PA
7922013-06-11 Pedro Alves <palves@redhat.com>
793
794 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
795 xmalloc.
796
7e5aaa09
PA
7972013-06-11 Pedro Alves <palves@redhat.com>
798
799 * linux-x86-low.c (initialize_low_arch): Call
800 init_registers_x32_avx_linux.
801
d878444c
JK
8022013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
803
804 Fix compatibility with Android Bionic.
805 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
806 it is not empty.
807
3aee8918
PA
8082013-06-07 Pedro Alves <palves@redhat.com>
809
5f2b57b5 810 PR server/14823
3aee8918
PA
811 * Makefile.in (OBS): Add tdesc.o.
812 (IPA_OBJS): Add tdesc-ipa.o.
813 (tdesc-ipa.o): New rule.
814 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
815 interface.
816 * linux-low.c (new_inferior): Delete.
817 (disabled_regsets, num_regsets): Delete.
818 (linux_add_process): Adjust to set the new per-process
819 new_inferior flag.
820 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
821 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
822 was a stop. When calling arch_setup, switch the current inferior
823 to the thread that got an event.
824 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
825 (regsets_fetch_inferior_registers)
826 (regsets_store_inferior_registers): New regsets_info parameter.
827 Adjust to use it.
828 (linux_register_in_regsets): New regs_info parameter. Adjust to
829 use it.
830 (register_addr, fetch_register, store_register): New usrregs_info
831 parameter. Adjust to use it.
832 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
833 parameter regs_info. Adjust to use it.
834 (linux_fetch_registers): Get the current inferior's regs_info, and
835 adjust to use it.
836 (linux_store_registers): Ditto.
837 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
838 (initialize_low): Don't initialize the target_regsets here. Call
839 initialize_low_arch.
840 * linux-low.h (target_regsets): Delete declaration.
841 (struct regsets_info): New.
842 (struct usrregs_info): New.
843 (struct regs_info): New.
844 (struct process_info_private) <new_inferior>: New field.
845 (struct linux_target_ops): Delete the num_regs, regmap, and
846 regset_bitmap fields. New field regs_info.
847 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
848 * i387-fp.c (num_xmm_registers): Delete.
849 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
850 calls to new interface.
851 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
852 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
853 Infer the number of xmm registers from the regcache's target
854 description.
855 * i387-fp.h (num_xmm_registers): Delete.
856 * inferiors.c (add_thread): Don't install the thread's regcache
857 here.
858 * proc-service.c (gregset_info): Fetch the current inferior's
859 regs_info. Adjust to use it.
860 * regcache.c: Include tdesc.h.
861 (register_bytes, reg_defs, num_registers)
862 (gdbserver_expedite_regs): Delete.
863 (get_thread_regcache): If the thread doesn't have a regcache yet,
864 create one, instead of aborting gdbserver.
865 (regcache_invalidate_one): Rename to ...
866 (regcache_invalidate_thread): ... this.
867 (regcache_invalidate_one): New.
868 (regcache_invalidate): Only invalidate registers of the current
869 process.
870 (init_register_cache): Add target_desc parameter, and use it.
871 (new_register_cache): Ditto. Assert the target description has a
872 non zero registers_size.
873 (regcache_cpy): Add assertions. Adjust.
874 (realloc_register_cache, set_register_cache): Delete.
875 (registers_to_string, registers_from_string): Adjust.
876 (find_register_by_name, find_regno, find_register_by_number)
877 (register_cache_size): Add target_desc parameter, and use it.
878 (free_register_cache_thread, free_register_cache_thread_one)
879 (regcache_release, register_cache_size): New.
880 (register_size): Add target_desc parameter, and use it.
881 (register_data, supply_register, supply_register_zeroed)
882 (supply_regblock, supply_register_by_name, collect_register)
883 (collect_register_as_string, collect_register_by_name): Adjust.
884 * regcache.h (struct target_desc): Forward declare.
885 (struct regcache) <tdesc>: New field.
886 (init_register_cache, new_register_cache): Add target_desc
887 parameter.
888 (regcache_invalidate_thread): Declare.
889 (regcache_invalidate_one): Delete declaration.
890 (regcache_release): Declare.
891 (find_register_by_number, register_cache_size, register_size)
892 (find_regno): Add target_desc parameter.
893 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
894 declarations.
895 * remote-utils.c: Include tdesc.h.
896 (outreg, prepare_resume_reply): Adjust.
897 * server.c: Include tdesc.h.
898 (gdbserver_xmltarget): Delete declaration.
899 (get_features_xml, process_serial_event): Adjust.
900 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
901 declare.
902 (struct process_info) <tdesc>: New field.
903 (ipa_tdesc): Declare.
904 * tdesc.c: New file.
905 * tdesc.h: New file.
906 * tracepoint.c: Include tdesc.h.
907 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
908 (get_context_regcache): Adjust to pass ipa_tdesc down.
909 (do_action_at_tracepoint): Adjust to get the register cache size
910 from the context regcache's description.
911 (traceframe_walk_blocks): Adjust to get the register cache size
912 from the current trace frame's description.
913 (traceframe_get_pc): Adjust to get current trace frame's
914 description and pass it down.
915 (gdb_collect): Adjust to get the register cache size from the
916 IPA's description.
917 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
918 (gdbserver_xmltarget): Delete.
919 (initialize_low_tracepoint): Set the ipa's target description.
920 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
921 (initialize_low_tracepoint): Set the ipa's target description.
922 * linux-x86-low.c: Include tdesc.h.
923 [__x86_64__] (is_64bit_tdesc): New.
924 (ps_get_thread_area, x86_get_thread_area): Use it.
925 (i386_cannot_store_register): Rename to ...
926 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
927 (i386_cannot_fetch_register): Rename to ...
928 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
929 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
930 to new interface.
931 (target_regsets): Rename to ...
932 (x86_regsets): ... this.
933 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
934 interface.
935 (x86_siginfo_fixup): Use is_64bit_tdesc.
936 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
937 (tdesc_x32_avx_linux, tdesc_x32_linux)
938 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
939 Declare.
940 (x86_linux_update_xmltarget): Delete.
941 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
942 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
943 (AMD64_LINUX_USER64_CS): New.
944 (x86_linux_read_description): New, based on
945 x86_linux_update_xmltarget.
946 (same_process_callback): New.
947 (x86_arch_setup_process_callback): New.
948 (x86_linux_update_xmltarget): New.
949 (x86_regsets_info): New.
950 (amd64_linux_regs_info): New.
951 (i386_linux_usrregs_info): New.
952 (i386_linux_regs_info): New.
953 (x86_linux_regs_info): New.
954 (x86_arch_setup): Reimplement.
955 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
956 (x86_emit_ops): Ditto.
957 (the_low_target): Adjust. Install x86_linux_regs_info,
958 x86_cannot_fetch_register, and x86_cannot_store_register.
959 (initialize_low_arch): New.
960 * linux-ia64-low.c (tdesc_ia64): Declare.
961 (ia64_fetch_register): Adjust.
962 (ia64_usrregs_info, regs_info): New globals.
963 (ia64_regs_info): New function.
964 (the_low_target): Adjust.
965 (initialize_low_arch): New function.
966 * linux-sparc-low.c (tdesc_sparc64): Declare.
967 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
968 Adjust.
969 (sparc_arch_setup): New function.
970 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
971 (the_low_target): Adjust.
972 (initialize_low_arch): New function.
973 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
974 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
975 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
976 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
977 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
978 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
979 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
980 (tdesc_powerpc_isa205_vsx64l): Declare.
981 (ppc_cannot_store_register, ppc_collect_ptrace_register)
982 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
983 (ppc_set_pc, ppc_get_hwcap): Adjust.
984 (ppc_usrregs_info): Forward declare.
985 (!__powerpc64__) ppc_regmap_adjusted: New global.
986 (ppc_arch_setup): Adjust to the current process'es target
987 description.
988 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
989 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
990 (ppc_store_evrregset): Adjust.
991 (target_regsets): Rename to ...
992 (ppc_regsets): ... this, and make static.
993 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
994 (ppc_regs_info): New function.
995 (the_low_target): Adjust.
996 (initialize_low_arch): New function.
997 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
998 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
999 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
1000 (tdesc_s390x_linux64v2): Declare.
1001 (s390_collect_ptrace_register, s390_supply_ptrace_register)
1002 (s390_fill_gregset, s390_store_last_break): Adjust.
1003 (target_regsets): Rename to ...
1004 (s390_regsets): ... this, and make static.
1005 (s390_get_pc, s390_set_pc): Adjust.
1006 (s390_get_hwcap): New target_desc parameter, and use it.
1007 [__s390x__] (have_hwcap_s390_high_gprs): New global.
1008 (s390_arch_setup): Adjust to set the current process'es target
1009 description. Don't adjust the regmap.
1010 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
1011 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
1012 (regs_info_3264): New globals.
1013 (s390_regs_info): New function.
1014 (the_low_target): Adjust.
1015 (initialize_low_arch): New function.
1016 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
1017 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
1018 [__mips64] (init_registers_mips_linux)
1019 (init_registers_mips_dsp_linux): Delete defines.
1020 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
1021 (have_dsp): New global.
1022 (mips_read_description): New, based on mips_arch_setup.
1023 (mips_arch_setup): Reimplement.
1024 (get_usrregs_info): New function.
1025 (mips_cannot_fetch_register, mips_cannot_store_register)
1026 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
1027 (mips_fill_fpregset, mips_store_fpregset): Adjust.
1028 (target_regsets): Rename to ...
1029 (mips_regsets): ... this, and make static.
1030 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
1031 (dsp_regs_info, regs_info): New globals.
1032 (mips_regs_info): New function.
1033 (the_low_target): Adjust.
1034 (initialize_low_arch): New function.
1035 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
1036 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
1037 Declare.
1038 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
1039 (arm_read_description): New, with bits factored from
1040 arm_arch_setup.
1041 (arm_arch_setup): Reimplement.
1042 (target_regsets): Rename to ...
1043 (arm_regsets): ... this, and make static.
1044 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
1045 (arm_regs_info): New function.
1046 (the_low_target): Adjust.
1047 (initialize_low_arch): New function.
1048 * linux-m68k-low.c (tdesc_m68k): Declare.
1049 (target_regsets): Rename to ...
1050 (m68k_regsets): ... this, and make static.
1051 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
1052 (m68k_regs_info): New function.
1053 (m68k_arch_setup): New function.
1054 (the_low_target): Adjust.
1055 (initialize_low_arch): New function.
1056 * linux-sh-low.c (tdesc_sharch): Declare.
1057 (target_regsets): Rename to ...
1058 (sh_regsets): ... this, and make static.
1059 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
1060 (sh_regs_info, sh_arch_setup): New functions.
1061 (the_low_target): Adjust.
1062 (initialize_low_arch): New function.
1063 * linux-bfin-low.c (tdesc_bfin): Declare.
1064 (bfin_arch_setup): New function.
1065 (bfin_usrregs_info, regs_info): New globals.
1066 (bfin_regs_info): New function.
1067 (the_low_target): Adjust.
1068 (initialize_low_arch): New function.
1069 * linux-cris-low.c (tdesc_cris): Declare.
1070 (cris_arch_setup): New function.
1071 (cris_usrregs_info, regs_info): New globals.
1072 (cris_regs_info): New function.
1073 (the_low_target): Adjust.
1074 (initialize_low_arch): New function.
1075 * linux-cris-low.c (tdesc_crisv32): Declare.
1076 (cris_arch_setup): New function.
1077 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
1078 (cris_regs_info): New function.
1079 (the_low_target): Adjust.
1080 (initialize_low_arch): New function.
1081 * linux-m32r-low.c (tdesc_m32r): Declare.
1082 (m32r_arch_setup): New function.
1083 (m32r_usrregs_info, regs_info): New globals.
1084 (m32r_regs_info): Adjust.
1085 (initialize_low_arch): New function.
1086 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
1087 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
1088 (tic6x_usrregs_info): Forward declare.
1089 (tic6x_read_description): New function, based on ...
1090 (tic6x_arch_setup): ... this. Reimplement.
1091 (target_regsets): Rename to ...
1092 (tic6x_regsets): ... this, and make static.
1093 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
1094 (tic6x_regs_info): New function.
1095 (the_low_target): Adjust.
1096 (initialize_low_arch): New function.
1097 * linux-xtensa-low.c (tdesc_xtensa): Declare.
1098 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
1099 (target_regsets): Rename to ...
1100 (xtensa_regsets): ... this, and make static.
1101 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
1102 globals.
1103 (xtensa_arch_setup, xtensa_regs_info): New functions.
1104 (the_low_target): Adjust.
1105 (initialize_low_arch): New function.
1106 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
1107 (nios2_arch_setup): Set the current process'es tdesc.
1108 (target_regsets): Rename to ...
1109 (nios2_regsets): ... this.
1110 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
1111 (nios2_regs_info): New function.
1112 (the_low_target): Adjust.
1113 (initialize_low_arch): New function.
a261b8f5
PA
1114 * linux-aarch64-low.c (tdesc_aarch64): Declare.
1115 (aarch64_arch_setup): Set the current process'es tdesc.
1116 (target_regsets): Rename to ...
1117 (aarch64_regsets): ... this.
1118 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
1119 (aarch64_regs_info): New function.
1120 (the_low_target): Adjust.
1121 (initialize_low_arch): New function.
3aee8918
PA
1122 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
1123 globals.
1124 (target_regsets): Rename to ...
1125 (tile_regsets): ... this.
1126 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
1127 (tile_regs_info): New function.
1128 (tile_arch_setup): Set the current process'es tdesc.
1129 (the_low_target): Adjust.
1130 (initialize_low_arch): New function.
1131 * spu-low.c (tdesc_spu): Declare.
1132 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
1133 * win32-arm-low.c (tdesc_arm): Declare.
1134 (arm_arch_setup): New function.
1135 (the_low_target): Install arm_arch_setup instead of
1136 init_registers_arm.
1137 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
1138 (init_windows_x86): Rename to ...
1139 (i386_arch_setup): ... this. Set `win32_tdesc'.
1140 (the_low_target): Adjust.
1141 * win32-low.c (win32_tdesc): New global.
1142 (child_add_thread): Don't create the thread cache here.
1143 (do_initial_child_stuff): Set the new process'es tdesc.
1144 * win32-low.h (struct target_desc): Forward declare.
1145 (win32_tdesc): Declare.
1146 * lynx-i386-low.c (tdesc_i386): Declare global.
1147 (lynx_i386_arch_setup): Set `lynx_tdesc'.
1148 * lynx-low.c (lynx_tdesc): New global.
1149 (lynx_add_process): Set the new process'es tdesc.
1150 * lynx-low.h (struct target_desc): Forward declare.
1151 (lynx_tdesc): Declare global.
1152 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
1153 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
1154 * nto-low.c (nto_tdesc): New global.
1155 (do_attach): Set the new process'es tdesc.
1156 * nto-low.h (struct target_desc): Forward declare.
1157 (nto_tdesc): Declare.
1158 * nto-x86-low.c (tdesc_i386): Declare.
1159 (nto_x86_arch_setup): Set `nto_tdesc'.
1160
b1fbec62
GB
11612013-06-04 Gary Benson <gbenson@redhat.com>
1162
1163 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
1164 to qSupported response when appropriate.
1165 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
1166 with nonzero-length annex.
1167 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
1168 arguments supplied in annex.
1169
d1ec4ce7
DE
11702013-05-31 Doug Evans <dje@google.com>
1171
ac44adcb 1172 PR server/15594
d1ec4ce7
DE
1173 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
1174 64 bits in 64-cross-32 environment.
1175
9b25f2d3
PA
11762013-05-28 Pedro Alves <palves@redhat.com>
1177
1178 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
1179 (aarch64-without-fpu.c): Delete rule.
1180 * configure.srv (aarch64*-*-linux*): Remove references to
1181 aarch64-without-fpu.o and aarch64-without-fpu.xml.
1182 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
1183 declaration.
1184
6740dc9c
PA
11852013-05-24 Pedro Alves <palves@redhat.com>
1186
1187 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
1188 instead of strchr/decode_address. Error if the range isn't split
1189 with a ','. Don't assume there's be a ':' in the action.
1190
c2d6af84
PA
11912013-05-23 Yao Qi <yao@codesourcery.com>
1192 Pedro Alves <palves@redhat.com>
1193
1194 * linux-low.c (lwp_in_step_range): New function.
1195 (linux_wait_1): If the thread was range stepping and stopped
1196 outside the stepping range, report the stop to GDB. Otherwise,
1197 continue stepping. Add range stepping debug output.
1198 (linux_set_resume_request): Copy the step range from the resume
1199 request to the lwp.
1200 (linux_supports_range_stepping): New.
1201 (linux_target_ops) <supports_range_stepping>: Set to
1202 linux_supports_range_stepping.
1203 * linux-low.h (struct linux_target_ops)
1204 <supports_range_stepping>: New field.
1205 (struct lwp_info) <step_range_start, step_range_end>: New fields.
1206 * linux-x86-low.c (x86_supports_range_stepping): New.
1207 (the_low_target) <supports_range_stepping>: Set to
1208 x86_supports_range_stepping.
1209 * server.c (handle_v_cont): Handle 'r' action.
1210 (handle_v_requests): Append ";r" if the target supports range
1211 stepping.
1212 * target.h (struct thread_resume) <step_range_start,
1213 step_range_end>: New fields.
1214 (struct target_ops) <supports_range_stepping>:
1215 New field.
1216 (target_supports_range_stepping): New macro.
1217
58794e1a
JB
12182013-05-17 Joel Brobecker <brobecker@adacore.com>
1219
1220 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
1221 confusion in comment.
1222
d631c5a7
JB
12232013-05-17 Joel Brobecker <brobecker@adacore.com>
1224
1225 * lynx-low.c (struct process_info_private): New type.
1226 (lynx_add_process): New function.
1227 (lynx_create_inferior, lynx_attach): Replace calls to
1228 add_process by calls to lynx_add_process.
1229 (lynx_resume): If PTID is null, then try using
1230 current_process()->private->last_wait_event_ptid.
1231 Add comments.
1232 (lynx_clear_inferiors): Delete. The contents of that function
1233 has been inlined in lynx_mourn;
1234 (lynx_wait_1): Save the ptid in the process's private data.
1235 (lynx_mourn): Free the process' private data. Replace call
1236 to lynx_clear_inferiors by call to clear_inferiors.
1237
96f7a20f
YQ
12382013-05-17 Yao Qi <yao@codesourcery.com>
1239
1240 * i386-low.c (i386_length_and_rw_bits): Move the comment to
1241 the right place.
1242
db0dfaa0
LM
12432013-05-16 Luis Machado <lgustavo@codesourcery.com>
1244
1245 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
1246 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
1247 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
1248 PT_TEXT_END_ADDR guards. Update comments.
1249 (linux_target_op) <read_offsets>: Conditionally define to
1250 linux_read_offsets if the target is UCLIBC and if it defines
1251 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
1252
68f5f838
SL
12532013-05-06 Sandra Loosemore <sandra@codesourcery.com>
1254 Andrew Jenner <andrew@codesourcery.com>
1255
1256 * Makefile.in (SFILES): Add linux-nios2-low.c.
1257 (clean): Add action to delete nios2-linux.c.
1258 (nios2-linux.c): New rule.
1259 * configure.srv: Add nios2*-*-linux*.
1260 * linux-nios2-low.c: New.
1261
1ebff1fd
HAQ
12622013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
1263
1264 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
1265
f6150862
HZ
12662013-04-25 Hui Zhu <hui@codesourcery.com>
1267
1268 PR gdb/15186
f6150862
HZ
1269 * ax.c (ax_printf): Add fflush.
1270
614c279d
TT
12712013-04-22 Tom Tromey <tromey@redhat.com>
1272
1273 * Makefile.in (SFILES): Add filestuff.c.
1274 (OBS): Add filestuff.o.
1275 (filestuff.o): New target.
1276 * config.in, configure: Rebuild.
1277 * configure.ac: Check for fdwalk, pipe2.
1278
7d4e5717
PA
12792013-04-17 Pedro Alves <palves@redhat.com>
1280
1281 * configure.ac (USE_THREAD_DB): Delete variable.
1282 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
1283 Don't AC_SUBST USE_THREAD_DB.
1284 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
1285 * config.in, configure: Regenerate.
1286
d5c93e41
PA
12872013-04-16 Pedro Alves <palves@redhat.com>
1288
1289 * linux-low.h (struct lwp_info) <thread_known>: Move under
1290 the USE_THREAD_DB #ifdef.
1291
04f5fe89
PA
12922013-04-16 Pedro Alves <palves@redhat.com>
1293
1294 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
1295 (linux-low.o): Delete rule.
1296 * linux-low.h: Always include "gdb_thread_db.h" instead of
1297 conditionally including thread_db.h.
1298 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
1299 HAVE_THREAD_DB_H.
1300
480b27bf
JK
13012013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1302
1303 * Makefile.in (install-only): Fix make install regression.
1304
43662968
JK
13052013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
1306
1307 Convert man pages to texinfo, new gdbinit.5 texinfo page.
1308 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
1309 installation.
1310 * gdbserver.1: Remove.
1311
3e74e146
PA
13122013-03-22 Pedro Alves <palves@redhat.com>
1313
1314 * linux-low.c (handle_extended_wait): Don't call
1315 linux_enable_event_reporting.
1316
a8347a2a
TT
13172013-03-15 Tony Theodore <tonyt@logyst.com>
1318
1319 PR build/9098:
1320 * Makefile.in (SHELL): Use @SHELL@.
1321
eeb56fa7
SDJ
13222013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
1323
1324 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
1325 compiler warning.
1326
4fa7e2ff
JB
13272013-03-13 Joel Brobecker <brobecker@adacore.com>
1328
1329 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
1330 Remove extraneous NULL element.
1331
8ddb1965
YQ
13322013-03-13 Yao Qi <yao@codesourcery.com>
1333
1334 * tracepoint.c (traceframe_read_tsv): Look for the last matched
1335 'V' block in trace frame.
1336
9accd112
MM
13372013-03-11 Markus Metzger <markus.t.metzger@intel.com>
1338
1339 * target.h (struct target_ops): Add btrace ops.
1340 (target_supports_btrace): New macro.
1341 (target_enable_btrace): New macro.
1342 (target_disable_btrace): New macro.
1343 (target_read_btrace): New macro.
1344 * gdbthread.h (struct thread_info): Add btrace field.
1345 * server.c: Include btrace-common.h.
1346 (handle_btrace_general_set): New function.
1347 (handle_btrace_enable): New function.
1348 (handle_btrace_disable): New function.
1349 (handle_general_set): Call handle_btrace_general_set.
1350 (handle_qxfer_btrace): New function.
1351 (struct qxfer qxfer_packets[]): Add btrace entry.
1352 * inferiors.c (remove_thread): Disable btrace.
1353 * linux-low: Include linux-btrace.h.
1354 (linux_low_enable_btrace): New function.
1355 (linux_low_read_btrace): New function.
1356 (linux_target_ops): Add btrace ops.
1357 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
1358 Add srv_linux_btrace=yes.
1359 (x86_64-*-linux*): Add linux-btrace.o.
1360 Add srv_linux_btrace=yes.
1361 * configure.ac: Define HAVE_LINUX_BTRACE.
1362 * config.in: Regenerated.
1363 * configure: Regenerated.
1364
5cc22e4c
MM
13652013-03-11 Markus Metzger <markus.t.metzger@intel.com>
1366
1367 * server.c (handle_qxfer): Preserve error message if -3 is
1368 returned.
1369 (qxfer): Document the -3 return value.
1370
7c97f91e
MM
13712013-03-11 Markus Metzger <markus.t.metzger@intel.com>
1372
1373 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
1374 (linux_btrace_h): New variable.
1375 (linux-btrace.o): New rule.
1376
be9a119c 13772013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
1378 Hafiz Abid Qadeer <abidh@codesourcery.com>
1379
1380 * tracepoint.c (trace_buffer_size): New global.
1381 (DEFAULT_TRACE_BUFFER_SIZE): New define.
1382 (init_trace_buffer): Change to one-argument function. Allocate
1383 trace buffer memory.
1384 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
1385 handle QTBuffer:size packet.
1386 (cmd_bigqtbuffer_size): New function.
1387 (initialize_tracepoint): Call init_trace_buffer with
1388 DEFAULT_TRACE_BUFFER_SIZE.
1389 * server.c (handle_query): Add QTBuffer:size in the
1390 supported packets.
1391
e64f7499
YQ
13922013-03-07 Yao Qi <yao@codesourcery.com>
1393
1394 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
1395 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
1396 of -1.
1397 (cmd_qtsp): Adjust condition. Do post increment.
1398 Set cur_action and cur_step_action back to 0.
1399
f0ae6fc3
PA
14002013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
1401
1402 PR server/15236
1403 * linux-low.c (linux_write_memory): Return early success if LEN is
1404 zero.
1405
b5b0b0af
CV
14062013-03-05 Corinna Vinschen <vinschen@redhat.de>
1407
334ad4a8 1408 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 1409
589bc927
TT
14102013-02-28 Tom Tromey <tromey@redhat.com>
1411
1412 * configure.ac: Invoke AC_SYS_LARGEFILE.
1413 * configure, config.in: Rebuild.
1414
dfe07582
CV
14152013-02-28 Corinna Vinschen <vinschen@redhat.com>
1416
1417 * win32-low.c: Throughout, fix format strings and casts of
1418 printf-like functions to avoid type related warnings on all
1419 platforms.
1420 (get_child_debug_event): Print dwDebugEventCode as hex since
1421 that's how it's usually documented.
1422
736cd585
YQ
14232013-02-28 Yao Qi <yao@codesourcery.com>
1424
1425 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
1426 pulongest.
1427
e1f58301
JW
14282013-02-27 Jiong Wang <jiwang@tilera.com>
1429
1430 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
1431 (reg-tilegx32.c): New rule.
1432 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
1433 * linux-tile-low.c (tile_arch_setup): New function. Invoke
1434 different register info initializer according to elf class.
1435 (init_registers_tilgx32): New function. The tilegx32 register info
1436 initializer.
1437 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
1438 (tile_store_gregset): Likewise.
1439
d171ca78
YQ
14402013-02-27 Yao Qi <yao@codesourcery.com>
1441
1442 * server.c (process_point_options): Print debug message when
1443 debug_threads is true.
1444
282bbdf3
YQ
14452013-02-26 Yao Qi <yao@codesourcery.com>
1446
1447 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
1448
aca22551
PA
14492013-02-19 Pedro Alves <palves@redhat.com>
1450 Kai Tietz <ktietz@redhat.com>
1451
1452 PR gdb/15161
1453
1454 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
1455 instead of strtoul to extract address from packet.
1456 (process_serial_event) <'z'>: Likewise.
1457
4f3cee1c
YQ
14582013-02-18 Yao Qi <yao@codesourcery.com>
1459
1460 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
1461
8e1d55a3
PA
14622013-02-14 Pedro Alves <palves@redhat.com>
1463
1464 Plug memory leak.
1465
1466 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
1467 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
1468
458820da
PA
14692013-02-14 Pedro Alves <palves@redhat.com>
1470
1471 * tracepoint.c (cmd_qtdpsrc): Use savestring.
1472
baea0dae
PA
14732013-02-14 Pedro Alves <palves@redhat.com>
1474
1475 * tracepoint.c (save_string): Delete.
1476 (add_tracepoint_action): Use savestring instead of save_string.
1477
0b1afbb3
PA
14782013-02-12 Pedro Alves <palves@redhat.com>
1479
1480 * linux-xtensa-low.c: Ditto.
1481 * xtensa-xtregs.c: Ditto.
1482
8a4ac37e
PA
14832013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
1484
1485 * thread-db.c (thread_db_get_tls_address): NULL pointer check
1486 thread_db.
1487
148de6bb
MS
14882013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
1489
1490 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
1491 aarch64_num_wp_regs and aarch64_num_bp_regs to
1492 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
1493
55fac6e0
MS
14942013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
1495
1496 * linux-aarch64-low.c (ps_get_thread_area): Replace
1497 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
1498
176eb98c
MS
14992013-02-04 Jim MacArthur <jim.macarthur@arm.com>
1500 Marcus Shawcroft <marcus.shawcroft@arm.com>
1501 Nigel Stephens <nigel.stephens@arm.com>
1502 Yufeng Zhang <yufeng.zhang@arm.com>
1503
1504 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
1505 (aarch64.c, aarch64-without-fpu.c): New targets.
1506 * configure.srv (aarch64*-*-linux*): New.
1507 * linux-aarch64-low.c: New file.
1508
56f7af9c
MS
15092013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
1510
43aaf8b6 1511 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
1512 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
1513 (dequeue_one_deferred_signal, linux_resume_one_thread)
1514 (fetch_register, linux_write_memory, linux_enable_event_reporting)
1515 (linux_tracefork_grandchild, linux_test_for_tracefork)
1516 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
1517 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
1518 where the argument is 0.
1519
60f662b0
YQ
15202013-01-25 Yao Qi <yao@codesourcery.com>
1521
1522 * event-loop.c: Include "queue.h".
1523 (gdb_event_p): New typedef.
1524 (struct gdb_event) <next_event>: Remove.
1525 (event_queue): Change to QUEUE(gdb_event_p).
1526 (async_queue_event): Remove.
1527 (gdb_event_xfree): New.
1528 (initialize_event_loop): New.
1529 (process_event): Use API from QUEUE.
1530 (wait_for_event): Likewise.
1531 * server.c (main): Call initialize_event_loop.
1532 * server.h (initialize_event_loop): Declare.
1533
5ae4861a
YQ
15342013-01-18 Yao Qi <yao@codesourcery.com>
1535
1536 * ax.h (struct eval_agent_expr_context): New.
1537 (gdb_eval_agent_expr): Update declaration.
1538 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
1539 TFRAME. Add new argument CTX.
1540 * server.h (struct eval_agent_expr_context): Declare.
1541 (agent_mem_read, agent_tsv_read): Update declaration.
1542 (agent_mem_read_string): Likewise.
1543 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
1544 (add_traceframe_block): Add new argument TPOINT.
1545 Increase TPOINT->traceframe_usage.
1546 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
1547 eval_tracepoint_agent_expr.
1548 (condition_true_at_tracepoint): Likewise.
1549 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
1550 (agent_mem_read_string, agent_tsv_read): Likewise.
1551
85e00e85
YQ
15522013-01-16 Yao Qi <yao@codesourcery.com>
1553
1554 * linux-low.c (linux_resume_one_lwp): Don't check
1555 'lwp->bp_reinsert != 0'.
1556
4039cf45
JB
15572013-01-07 Joel Brobecker <brobecker@adacore.com>
1558 Pedro Alves <palves@redhat.com>
1559
1560 * lynx-low.c (ptrace_request_to_str): Define a temporary
1561 macro and use it to simplify this function's implementation.
1562
9044dee2
JB
15632013-01-07 Joel Brobecker <brobecker@adacore.com>
1564
1565 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
1566 sets errno.
1567
e6352c8f
JB
15682013-01-07 Joel Brobecker <brobecker@adacore.com>
1569
1570 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
1571
50681a27
JB
15722013-01-07 Joel Brobecker <brobecker@adacore.com>
1573
1574 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
1575
3f6e77ef
JB
15762013-01-07 Joel Brobecker <brobecker@adacore.com>
1577
1578 * lynx-low.c (lynx_resume): Use the resume_info parameter
1579 to determine the ptid for the lynx_ptrace call, unless
1580 it is equal to minus_one_ptid, in which case we use the
1581 ptid of the current_inferior.
1582 (lynx_wait_1): After having received a thread create/exit
1583 event, resume the inferior's execution using the signaling
1584 thread's ptid, rather than the old ptid.
1585
7fda33ae
JB
15862013-01-07 Joel Brobecker <brobecker@adacore.com>
1587
1588 * lynx-low.c (lynx_resume): Delete variable ret.
1589
b9786c74
JB
15902013-01-01 Joel Brobecker <brobecker@adacore.com>
1591
1592 * gdbreplay.c (gdbreplay_version): Update copyright year.
1593 * server.c (gdbserver_version): Likewise.
1594
8b93d60f
JB
15952012-12-17 Joel Brobecker <brobecker@adacore.com>
1596
1597 * lynx-low.c (lynx_wait_1): Add debug trace before adding
1598 new thread.
1599
037335a7
JB
16002012-12-17 Joel Brobecker <brobecker@adacore.com>
1601
1602 * lynx-low.c (ptrace_request_to_str): Add handling for
1603 PTRACE_GETTRACESIG.
1604
52d4cbd8
JB
16052012-12-17 Joel Brobecker <brobecker@adacore.com>
1606
1607 * lynx-low.c (lynx_attach): Delete variable new_process.
1608
ab8f6ca9
JB
16092012-12-17 Joel Brobecker <brobecker@adacore.com>
1610
1611 * lynx-low.c (lynx_create_inferior): Delete variable
1612 new_process.
1613
78cbc024
JB
16142012-12-17 Joel Brobecker <brobecker@adacore.com>
1615
1616 * lynx-low.c (ptrace_request_to_str): Do not handle
1617 PTRACE_GETTHREADLIST if this macro does not exist.
1618
14a00470
YQ
16192012-12-15 Yao Qi <yao@codesourcery.com>
1620
1621 * Makefile.in (OBS): Add notif.o.
1622 * notif.c, notif.h: New.
1623 * server.c: Include "notif.h".
1624 (struct vstop_notif) <next>: Remove.
1625 <base>: New field.
1626 (queue_stop_reply): Update.
1627 (push_event, send_next_stop_reply): Remove.
1628 (discard_queued_stop_replies): Update.
1629 (notif_stop): New variable.
1630 (handle_v_stopped): Remove.
1631 (handle_v_requests): Don't call handle_v_stopped. Call
1632 handle_ack_notif instead.
1633 (queue_stop_reply_callback): Call notif_event_enque instead
1634 of queue_stop_reply.
1635 (handle_status): Don't call send_next_stop_reply, call
1636 notif_write_event instead.
1637 (kill_inferior_callback): Likewise.
1638 (detach_or_kill_inferior_callback): Likewise.
1639 (main): Call initialize_notif.
1640 (process_serial_event): Call QUEUE_is_empty.
1641 (handle_target_event): Call notif_push instead of push event.
1642 * server.h (push_event): Remove declaration.
1643
61c125b9
TT
16442012-12-10 Tom Tromey <tromey@redhat.com>
1645
1646 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
1647 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
1648 macros.
1649 (.c.o): Rewrite.
1650 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
1651 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
1652 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
1653 (amd64-linux-ipa.o, ax.o): Rewrite.
1654 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
1655 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
1656 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
1657 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
1658 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
1659 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
1660 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
1661 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
1662 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
1663 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
1664 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
1665 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
1666 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
1667 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
1668 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
1669 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
1670 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
1671 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
1672 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
1673 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
1674 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
1675 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
1676 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
1677 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
1678 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
1679 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
1680 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
1681 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
1682 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
1683 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
1684 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
1685 (reg-tilegx.o): Remove.
1686 (all_object_files): New macro.
1687 Include .deps files.
1688 * aclocal.m4, configure: Rebuild.
1689 * acinclude.m4: Include depstand.m4, lead-dot.m4.
1690 * configure.ac: Invoke ZW_CREATE_DEPDIR,
1691 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
1692
e90e9ad9
TT
16932012-12-05 Tom Tromey <tromey@redhat.com>
1694
1695 PR gdb/14917:
1696 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
1697
02d403bf 16982012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
1699
1700 * configure.ac: Check for linux/perf_event.h.
1701 * config.in: Regenerated.
1702 * configure: Regenerated.
1703
0270a750
PA
17042012-11-26 Maxime Villard <rustyBSD@gmx.fr>
1705
1706 * hostio.c (handle_readlink): Decrease buffer size
1707 parameter passed to readlink by one byte.
1708
8c29b58e
YQ
17092012-11-26 Yao Qi <yao@codesourcery.com>
1710
1711 * configure.ac (build_warnings): Append '-Wempty-body'.
1712 * configure: Regenerated.
1713 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
1714 body.
1715
8bdce1ff
PM
17162012-11-15 Pierre Muller <muller@sourceware.org>
1717
1718 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
1719 * config.in: Regenerate.
1720 * configure: Regenerate.
1721 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
1722 Use "gdb_wait.h" header instead of <sys/wait.h> header.
1723 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
1724 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
1725 header.
1726 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
1727 instead of <sys/wait.h> header.
1728 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
1729
02d403bf 17302012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
1731
1732 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
1733 (various make rules): Remove -DGDBSERVER
1734
fbd5db48
YQ
17352012-11-09 Yao Qi <yao@codesourcery.com>
1736
1737 * spu-low.c (current_ptid): Move it to ..
1738 * gdbthread.h: ... here. New.
1739 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
1740 * server.c (myresume, process_serial_event): Likewise.
1741 * thread-db.c (thread_db_find_new_threads): Likewise.
1742 * tracepoint.c (run_inferior_command): Likewise.
1743
b3dc46ff
AB
17442012-10-01 Andrew Burgess <aburgess@broadcom.com>
1745
1746 * server.c (handle_search_memory_1): Include access length in
1747 warning message.
1748
07c04788
HPN
17492012-09-05 Michael Brandt <michael.brandt@axis.com>
1750
1751 * linux-crisv32-low.c: Fix compile errors.
1752
918d227b
YQ
17532012-09-04 Yao Qi <yao@codesourcery.com>
1754
1755 * tracepoint.c (cmd_qtsv): Adjust debug message.
1756 Don't check CUR_TPOINT.
1757
18c1b81a
YQ
17582012-08-28 Yao Qi <yao@codesourcery.com>
1759
1760 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
1761 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
1762 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
1763 Remove declarations of xmalloc, xreallloc, xstrdup and
1764 freeargv.
1765 * Makefile.in (libiberty_h): New.
1766 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
1767 (linux-bfin-low.o): Append dependency 'libiberty.h'.
1768
dc82f37b
YQ
17692012-08-23 Yao Qi <yao@codesourcery.com>
1770
1771 * server.h: Remove declaration of 'xsnprintf'.
1772
406b1477
KS
17732012-08-22 Keith Seitz <keiths@redhat.com>
1774
1775 * server.h: Include build-gnulib-gbserver/config.h.
1776 * gdbreplay.c: Likewise.
1777
e6712ff1
DE
17782012-08-08 Doug Evans <dje@google.com>
1779
1780 * Makefile.in (SFILES): Add gdb_vecs.c.
1781 (OBS): Add gdb_vecs.o.
1782 (gdb_vecs_h, host_defs_h): New variables.
1783 (thread-db.o): Add $(gdb_vecs_h) dependency.
1784 (gdb_vecs.o): New rule.
1785 * thread-db.c: #include "gdb_vecs.h".
1786 (thread_db_load_search): Use a vector to iterate over path elements.
1787 Handle text appearing after "$pdir".
1788
1789 * configure.ac: Add check for strstr.
1790 * config.in: Regenerate.
1791 * configure: Regenerate.
1792
7c3270ae
UW
17932012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
1794
1795 * hostio.c (handle_pread): If pread fails, fall back to attempting
1796 lseek/read.
1797 (handle_pwrite): Likewise for pwrite.
1798
b62e2b27
UW
17992012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
1800
1801 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
1802 between unsupported TYPE and unimplementable ADDR/LEN combination.
1803 (arm_insert_point): Act on new return value.
1804
78a99e91
PA
18052012-07-31 Pedro Alves <palves@redhat.com>
1806
1807 * server.c (process_point_options): Only skip tokens if we find
1808 one that is unrecognized. Don't treat 'X' specially while
1809 skipping unrecognized tokens.
1810
fcf303ab
UW
18112012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
1812
1813 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
1814 to 4-byte-align HW breakpoint addresses for Thumb.
1815
7255706c
YQ
18162012-07-27 Yao Qi <yao@codesourcery.com>
1817
1818 PR remote/14161.
1819
1820 * server.h: Declare gdb_agent_about_to_close.
1821 * target.c (kill_inferior): Include "agent.h".
1822 New. Send command 'kill'.
1823 * target.h (kill_inferior): Removed macro.
1824 * tracepoint.c (gdb_agent_about_to_close): New.
1825 (gdb_agent_helper_thread): Handle command 'close'.
1826 Wait endlessly until the inferior stops.
1827 Install gdb_agent_remove_socket to atexit hook.
1828 (agent_socket_name): New static variable.
1829 (gdb_agent_socket_init): Replace local variable 'name' with
1830 'agent_socket_name'.
1831 (gdb_agent_remove_socket): New.
1832
5a3f286f
YQ
18332012-07-27 Yao Qi <yao@codesourcery.com>
1834
1835 * server.c (process_point_options): Stop at 'X' when parsing.
1836
961bd387
ME
18372012-07-19 Michael Eager <eager@eagercon.com>
1838
a261b8f5 1839 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
1840 to hw_execute.
1841 * linux-x86-low.c (x86_insert_point, x86_remove_point):
1842 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
1843 hardware breakpoint.
1844
aa7c7447
JK
18452012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1846
1847 * gdbserver/linux-low.c (initialize_low): Call
1848 linux_ptrace_init_warnings.
1849
7f216e7c
DE
18502012-07-02 Doug Evans <dje@google.com>
1851
1852 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
1853 pointer to int.
1854
d3ce09f5
SS
18552012-07-02 Stan Shebs <stan@codesourcery.com>
1856
1857 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
1858 (ax.o): Add it to build rule.
1859 (ax-ipa.o): Ditto.
1860 (OBS): Add format.o.
1861 (IPA_OBS): Add format.o.
1862 * server.c (handle_query): Claim support for breakpoint commands.
1863 (process_point_options): Add command case.
1864 (process_serial_event): Leave running if there are printfs in
1865 effect.
1866 * mem-break.h (any_persistent_commands): Declare.
1867 (add_breakpoint_commands): Declare.
1868 (gdb_no_commands_at_breakpoint): Declare.
1869 (run_breakpoint_commands): Declare.
1870 * mem-break.c (struct point_command_list): New struct.
1871 (struct breakpoint): New field command_list.
1872 (any_persistent_commands): New function.
1873 (add_commands_to_breakpoint): New function.
1874 (add_breakpoint_commands): New function.
1875 (gdb_no_commands_at_breakpoint): New function.
1876 (run_breakpoint_commands): New function.
1877 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
1878 locally.
1879 * ax.c: Include format.h.
1880 (ax_printf): New function.
1881 (gdb_eval_agent_expr): Add printf opcode.
1882
2f8f6aed
YQ
18832012-06-13 Yao Qi <yao@codesourcery.com>
1884
1885 * server.c (start_inferior): Remove duplicated writes to fields
1886 'last_resume_kind' and 'last_status' of 'current_inferior'.
1887
0c9070b3
YQ
18882012-06-12 Yao Qi <yao@codesourcery.com>
1889 Pedro Alves <palves@redhat.com>
1890
1891 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
1892 comment.
1893 * server.c (handle_v_cont): Extend comment.
1894
c52daf70
YQ
18952012-06-11 Yao Qi <yao@codesourcery.com>
1896
1897 * linux-low.c (linux_attach): Add 'static'.
1898
d38bbb0a
YQ
18992012-06-06 Yao Qi <yao@codesourcery.com>
1900
1901 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
1902
89dc0afd
JK
19032012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
1904
1905 Fix gcc -flto compilation warning.
1906 * server.c (main): Make variable multi_mode and attach volatile.
1907
75f62ce7
TJB
19082012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
1909
1910 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
1911 if the platform doesn't know about it.
1912
65f479b6
PA
19132012-05-30 Jeff Kenton <jkenton@tilera.com>
1914
1915 * Makefile.in (SFILES): Add linux-tile-low.c.
1916 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
1917 * configure.srv: Handle tilegx-*-linux*.
1918 * linux-tile-low.c: New file.
1919
0c5bf5a9
JK
19202012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1921
1922 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
1923
a493e3e2
PA
19242012-05-24 Pedro Alves <palves@redhat.com>
1925
1926 PR gdb/7205
1927
43aaf8b6 1928 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 1929
2ea28649
PA
19302012-05-24 Pedro Alves <palves@redhat.com>
1931
1932 PR gdb/7205
1933
1934 Replace target_signal with gdb_signal throughout.
1935
8d409d16
MR
19362012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
1937
1938 * linux-low.c (linux_store_registers): Avoid the copying sequence
1939 when no data has been retrieved by ptrace.
1940
23512c01
MGD
19412012-05-22 Will Deacon <will.deacon@arm.com>
1942
1943 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
1944 Include asm/ptrace.h.
1945 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
1946 already defined.
1947
4934b29e
MR
19482012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
1949
1950 * linux-low.c (linux_store_registers): Don't re-retrieve data
1951 with ptrace that has already been obtained from /proc. Always
1952 copy any data retrieved with ptrace to the buffer supplied.
1953
bde24c0a
PA
19542012-05-11 Yao Qi <yao@codesourcery.com>
1955 Pedro Alves <palves@redhat.com>
1956
1957 * linux-low.c (enum stopping_threads_kind): New.
1958 (stopping_threads): Change type to `enum stopping_threads_kind'.
1959 (handle_extended_wait): If stopping and suspending threads, leave
1960 the new_lwp suspended too.
1961 (linux_wait_for_event): Adjust.
1962 (stop_all_lwps): Set `stopping_threads' to
1963 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
1964 whether we're suspending threads or just stopping them. Assert no
1965 recursion happens.
1966
623b6bdf
YQ
19672012-04-29 Yao Qi <yao@codesourcery.com>
1968
1969 * server.h: Move some code to ...
1970 * gdbthread.h: ... here. New.
1971 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
1972 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
1973 (nto-low.o, win32-low.o): Likewise.
1974 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
1975 * regcache.c, remote-utils.c, server.c: Likewise.
1976 * target.c, tracepoint.c, win32-low.c: Likewise.
1977
f15f9948
TJB
19782012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
1979
1980 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
1981 (PTRACE_ARG4_TYPE): Likewise.
1982 (PTRACE_XFER_TYPE): Likewise.
1983 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
1984 ptrace to PTRACE_ARG3_TYPE.
1985 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
1986 (PTRACE_ARG4_TYPE): Likewise.
1987 (PTRACE_XFER_TYPE): Likewise.
1988 (linux_detach_one_lwp): Cast fourth argument of
1989 ptrace to long then PTRACE_ARG4_TYPE.
1990 (regsets_fetch_inferior_registers): Cast third argument of
1991 ptrace to long then PTRACE_ARG3_TYPE.
1992 (regsets_store_inferior_registers): Likewise.
1993
38ea300a
PA
19942012-04-20 Pedro Alves <palves@redhat.com>
1995
1996 * configure: Regenerate.
1997
c971b7fa
PA
19982012-04-19 Pedro Alves <palves@redhat.com>
1999
43aaf8b6 2000 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 2001 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
2002 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
2003 (all, install-only, uninstall, clean-info, all-lib, clean): No
2004 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
2005 (maintainer-clean realclean distclean): Use subdir_do.
2006 (subdir_do): New.
2007 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 2008 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
2009 * acinclude.m4: Include acx_configure_dir.m4.
2010 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
2011 calls. Call AC_PROG_RANLIB. Configure gnulib using
2012 ACX_CONFIGURE_DIR.
2013 (GNULIB): New.
2014 (GNULIB_STDINT_H): Adjust.
2015 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
2016 * gdbreplay.c: Include build-gnulib/config.h.
2017 * server.h: Likewise.
2018 * aclocal.m4: Regenerate.
2019 * config.in: Regenerate.
2020 * configure: Regenerate.
c971b7fa 2021
809277f8
PA
20222012-04-19 Pedro Alves <palves@redhat.com>
2023
2024 * Makefile.in (LIBGNU, INCGNU): Adjust.
2025 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
2026 (all, install-only, uninstall, clean-info, all-lib, clean)
2027 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
2028 * configure.ac: Adjust AC_OUTPUT output.
2029 * aclocal.m4: Regenerate.
2030 * configure: Regenerate.
2031
fd9bb8b8
PA
20322012-04-19 Pedro Alves <palves@redhat.com>
2033
2034 * Makefile.in (generated_files): New.
2035 (server_h): Remove the explicit dependency on config.h, and depend
2036 on $generated_files.
2037
1c298c66
PA
20382012-04-19 Pedro Alves <palves@redhat.com>
2039
2040 * Makefile.in (INCGNU): Add -Ignulib.
2041
57c4b50b
PA
20422012-04-19 Pedro Alves <palves@redhat.com>
2043
2044 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
2045 (INCGNU): ... this, and spell out -I here.
2046 (GNULIB_LIB): Rename to ...
2047 (LIBGNU): ... this.
2048 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
2049
1030e047
PA
20502012-04-19 Pedro Alves <palves@redhat.com>
2051
2052 * config.in: Regenerate.
2053
447d4319
PA
20542012-04-19 Pedro Alves <palves@redhat.com>
2055
2056 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
2057 * server.h (memmem): Remove declaration.
2058 * config.in: Regenerate.
2059 * configure: Regenerate.
2060
aad9eab9
YQ
20612012-04-19 Yao Qi <yao@codesourcery.com>
2062
2063 * Makefile.in (SFILES): Add common/vec.c.
2064 (OBS): Add vec.o.
2065 (vec.o): New rule.
2066
3e10640f
YQ
20672012-04-19 Yao Qi <yao@codesourcery.com>
2068
2069 * remote-utils.c (prepare_resume_reply): Replace with macro
2070 target_core_of_thread.
2071 * server.c (handle_qxfer_threads_proper): Likewise.
2072 * target.h (traget_core_of_thread): New macro.
2073
71622373
PA
20742012-04-18 Pedro Alves <palves@redhat.com>
2075
2076 * aclocal.m4: Regenerate.
2077 * configure: Regenerate.
2078
80d26939
YQ
20792012-04-16 Yao Qi <yao@codesourcery.com>
2080
2081 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
2082 duplicated on address.
2083
42476b70
YQ
20842012-04-16 Yao Qi <yao@codesourcery.com>
2085
2086 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
2087 (struct tracepoint_action_ops) <send>: New field.
2088 (m_tracepoint_action_send, r_tracepoint_action_send): New.
2089 (agent_expr_send, x_tracepoint_action_send): New.
2090 (l_tracepoint_action_send): New.
2091 (cmd_qtdp): Download and install tracepoint
2092 according to `use_agent'.
2093 (run_inferior_command): Add one more parameter `len'.
2094 Update callers.
2095 (tracepoint_send_agent): New.
2096 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
2097
7bc83639
YQ
20982012-04-16 Yao Qi <yao@codesourcery.com>
2099
2100 * tracepoint.c (download_tracepoints): Moved to ...
2101 (cmd_qtstart): ... here.
2102
5f18041e
YQ
21032012-04-14 Yao Qi <yao@codesourcery.com>
2104
2105 * tracepoint.c: Include inttypes.h.
2106 (struct collect_memory_action): Use sized types.
2107 (struct tracepoint): Likewise.
2108 (cmd_qtdp, stop_tracing): Update print specifiers.
2109 (cmd_qtp, response_tracepoint): Likewise.
2110 (collect_data_at_tracepoint): Likewise.
2111 (collect_data_at_step): Likewise.
2112
55a8c076
YQ
21132012-04-14 Yao Qi <yao@codesourcery.com>
2114
2115 Import gnulib module inttypes.
2116 * aclocal.m4, config.in, configure: Regenerated.
2117
dc750257
YQ
21182012-04-14 Yao Qi <yao@codesourcery.com>
2119
2120 * Makefile.in (maintainer-clean, realclean, distclean): Remove
2121 Makefile and config.status at last.
2122
0ab5faf9
YQ
21232012-04-13 Yao Qi <yao@codesourcery.com>
2124
2125 * tracepoint.c: Include stdint.h unconditionally.
2126
18f5fd81
TJB
21272012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
2128
2129 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
2130 on BFD_HAVE_SYS_PROCFS_TYPE.
2131 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
2132 * configure: Regenerate.
2133 * config.in: Likewise.
2134
4d47af5c
L
21352012-04-13 H.J. Lu <hongjiu.lu@intel.com>
2136
2137 * Makefile.in (clean): Also remove x32.c x32-linux.c
2138 x32-avx.c x32-avx-linux.c.
2139 (x32.o): New target.
2140 (x32.c): Likewise.
2141 (x32-linux.o): Likewise.
2142 (x32-linux.c): Likewise.
2143 (x32-avx.o): Likewise.
2144 (x32-avx.c): Likewise.
2145 (x32-avx-linux.o): Likewise.
2146 (x32-avx-linux.c): Likewise.
2147
2148 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
2149 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
2150 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
2151 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
2152 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
2153 i386/x32-avx-linux.xml.
2154
2155 * linux-x86-low.c (init_registers_x32_linux): New prototype.
2156 (init_registers_x32_avx_linux): Likwise.
2157 (x86_linux_update_xmltarget): Call init_registers_x32_linux
2158 or init_registers_x32_avx_linux if linux_is_elf64 is false.
2159
ecedbe58
PA
21602012-04-13 Pedro Alves <palves@redhat.com>
2161
2162 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
2163 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
2164 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
2165 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
2166 the sub-make.
2167
c92b5177
L
21682012-04-12 H.J. Lu <hongjiu.lu@intel.com>
2169
2170 * linux-x86-low.c (compat_x32_clock_t): New.
2171 (compat_x32_siginfo_t): Likewise.
2172 (compat_x32_siginfo_from_siginfo): Likewise.
2173 (siginfo_from_compat_x32_siginfo): Likewise.
2174 (linux_is_elf64): Likewise.
2175 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
2176 and siginfo_from_compat_x32_siginfo for x32.
2177 (x86_arch_setup): Set linux_is_elf64.
2178
214d508e
L
21792012-04-12 H.J. Lu <hongjiu.lu@intel.com>
2180
2181 PR gdb/13969
2182 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
2183 e_machine field.
2184 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
2185 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
2186 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
2187 compatible with process.
2188
c9a1864a
YQ
21892012-04-12 Yao Qi <yao@codesourcery.com>
2190
2191 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
2192 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
2193 (install-only, install-info, clean): Handle sub dir gnulib.
2194 (all-lib, am--refresh): New targets.
2195 (memmem.o): Remove target.
2196 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
2197 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
2198 (AC_REPLACE_FUNCS): Remove memmem.
2199 Invoke gl_INIT and AM_INIT_AUTOMAKE.
2200 (AC_OUTPUT): Generate Makefile in gnulib/.
2201 * aclocal.m4, config.in, configure: Regenerated.
2202
367ba2c2
MR
22032012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
2204
2205 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
2206
9d236627
PA
22072012-04-05 Pedro Alves <palves@redhat.com>
2208
2209 -Werror=strict-aliasing
2210
2211 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
2212 pointer.
2213
111217b3
PA
22142012-04-04 Pedro Alves <palves@redhat.com>
2215
2216 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
2217 (sparc_store_gregset_from_stack, sparc_store_gregset)
2218 (sparc_breakpoint_at): Fix formatting.
2219
8365dcf5
TJB
22202012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
2221
2222 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
2223 are available.
2224 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
2225 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
2226 * config.in: Regenerate.
2227 * configure: Likewise.
2228
689cc2ae
PA
22292012-03-29 Pedro Alves <palves@redhat.com>
2230
2231 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
2232 Correct ptrace arguments.
2233
c14dfd32
PA
22342012-03-28 Pedro Alves <palves@redhat.com>
2235
2236 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
2237 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
2238 (IA64_FR1_REGNUM): New defines.
2239 (ia64_fetch_register): New.
2240 (the_low_target): Install it.
2241 * linux-low.h (struct linux_target_ops) <fetch_register>: New
2242 field.
2243 * linux-low.c (linux_fetch_registers): Try the
2244 the_low_target.fetch_register hook first.
2245
2246 * linux-arm-low.c (the_low_target): Adjust.
2247 * linux-bfin-low.c (the_low_target): Adjust.
2248 * linux-cris-low.c (the_low_target): Adjust.
2249 * linux-crisv32-low.c (the_low_target): Adjust.
2250 * linux-m32r-low.c (the_low_target): Adjust.
2251 * linux-m68k-low.c (the_low_target): Adjust.
2252 * linux-mips-low.c (the_low_target): Adjust.
2253 * linux-ppc-low.c (the_low_target): Adjust.
2254 * linux-s390-low.c (the_low_target): Adjust.
2255 * linux-sh-low.c (the_low_target): Adjust.
2256 * linux-sparc-low.c (the_low_target): Adjust.
2257 * linux-tic6x-low.c (the_low_target): Adjust.
2258 * linux-x86-low.c (the_low_target): Adjust.
2259 * linux-xtensa-low.c (the_low_target): Adjust.
2260
63c88e13
PA
22612012-03-26 Pedro Alves <palves@redhat.com>
2262
2263 * server.c (handle_qxfer_libraries): Don't bail early if
2264 the_target->qxfer_libraries_svr4 is not NULL.
2265
fb723180
PA
22662012-03-26 Pedro Alves <palves@redhat.com>
2267
2268 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
2269
0afae3cf
PA
22702012-03-23 Pedro Alves <palves@redhat.com>
2271
2272 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
2273 "library-list-svr4" element's start tag when the the DSO list is
2274 empty.
2275
485f1ee4
PA
22762012-03-23 Pedro Alves <palves@redhat.com>
2277
2278 * linux-low.c (read_one_ptr): Read the inferior's pointer through
2279 a variable whose type size is the same as the inferior's pointer
2280 size.
2281
a5362b9a
TS
22822012-03-21 Thomas Schwinge <thomas@codesourcery.com>
2283
2284 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
2285 struct siginfo.
2286 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
2287 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2288 * linux-low.h: Include <signal.h>.
2289 (struct siginfo): Remove forward declaration.
2290 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
2291 struct siginfo.
2292
d226c142
MF
22932012-03-21 Mike Frysinger <vapier@gentoo.org>
2294
2295 * .gitignore: Ignore more files.
2296
122f36ef
PA
22972012-03-19 Pedro Alves <palves@redhat.com>
2298 Jan Kratochvil <jan.kratochvil@redhat.com>
2299
2300 * server.c (cont_thread, general_thread): Add describing comments.
2301 (start_inferior): Clear `cont_thread'.
2302 (handle_v_cont): Don't set `cont_thread' if resuming all threads
2303 of a process.
2304
fc3e5175
YQ
23052012-03-15 Yao Qi <yao@codesourcery.com>
2306
2307 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
2308 handling to ...
2309 (cmd_qtdp): ... here.
2310
8d0d92cd
YQ
23112012-03-15 Yao Qi <yao@codesourcery.com>
2312
2313 * tracepoint.c (struct tracepoint_action_ops): New.
2314 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
2315 (m_tracepoint_action_download): New.
2316 (r_tracepoint_action_download): New.
2317 (x_tracepoint_action_download): New.
2318 (l_tracepoint_action_download): New.
2319 (add_tracepoint_action): Install `action->ops' according type.
2320 (download_tracepoint_1): Move code `download' function pointer
2321 of various tracepoint_action_ops.
2322
87b0bb13
JK
23232012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
2324
2325 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
2326 linux_ptrace_attach_warnings.
2327
5f572dec
JK
23282012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
2329
2330 * Makefile.in (linux-ptrace.o): New.
2331 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
2332 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
2333 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
2334 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
2335 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
2336 of these targets.
2337 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
2338
f4647387
YQ
23392012-03-08 Yao Qi <yao@codesourcery.com>
2340 Pedro Alves <palves@redhat.com>
2341
2342 Fix PR server/13392.
2343 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
2344 offset of JMP insn.
2345 * tracepoint.c (remove_tracepoint): New.
2346 (cmd_qtdp): Call remove_tracepoint when failed to install.
2347
9b224c5e
PA
23482012-03-07 Pedro Alves <palves@redhat.com>
2349
2350 * linux-low.c (get_detach_signal): New.
2351 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
2352 Pass on pending signals to PTRACE_DETACH. Check the result of the
2353 ptrace call.
2354 * server.c (program_signals, program_signals_p): New.
2355 (handle_general_set): Handle QProgramSignals.
2356 * server.h (program_signals, program_signals_p): Declare.
2357
e237a7e2
JK
23582012-03-05 Pedro Alves <palves@redhat.com>
2359 Jan Kratochvil <jan.kratochvil@redhat.com>
2360
2361 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
2362 New comment why.
2363
5808517f
YQ
23642012-03-03 Yao Qi <yao@codesourcery.com>
2365
2366 * tracepoint.c (tracepoint_look_up_symbols): Update call to
2367 agent_look_up_symbols.
2368
58b4daa5
YQ
23692012-03-03 Yao Qi <yao@codesourcery.com>
2370
2371 * Makefile.in (linux-low.o): Keep dependence on agent.h.
2372 (linux-x86-low.o): Likewise.
2373 * server.h: Remove in_process_agent_loaded.
2374 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
2375 common/agent.c.
2376 Update callers.
2377
8ffcbaaf
YQ
23782012-03-03 Yao Qi <yao@codesourcery.com>
2379
2380 * tracepoint.c (gdb_agent_capability): New global.
2381 (in_process_agent_loaded_ust): Renamed to
2382 `in_process_agent_supports_ust'.
2383 Update callers.
2384 (in_process_agent_supports_ust): Call agent_capability_check.
2385 (clear_installed_tracepoints): Assert that agent supports
2386 agent.
2387
d1feda86
YQ
23882012-03-03 Yao Qi <yao@codesourcery.com>
2389
2390 * linux-low.c (linux_supports_agent): New.
2391 (linux_target_ops): Initialize field `supports_agent' with
2392 linux_supports_agent.
2393 * target.h (struct target_ops) <supports_agent>: New.
2394 (target_supports_agent): New macro.
2395 * server.c (handle_general_set): Handle packet 'QAgent'.
2396 (handle_query): Send `QAgent+'.
2397 * Makefile.in (server.o): Depends on agent.h.
2398
2fa291ac
YQ
23992012-03-03 Yao Qi <yao@codesourcery.com>
2400
2401 * Makefile.in (OBS): Add agent.o.
2402 Add new rule for agent.o.
2403 Track dependence of tracepoint.c on agent.h.
2404 * tracepoint.c (run_inferior_command_1):
2405 (run_inferior_command): Call agent_run_command.
2406 (gdb_ust_connect_sync_socket): Deleted. Move it to
2407 common/agent.c.
2408 (resume_thread, stop_thread): Likewise.
2409 (gdb_ust_socket_init): Renamed to ...
2410 (gdb_agent_socket_init): ... New.
2411 (gdb_ust_thread): Renamed to ...
2412 (gdb_agent_helper_thread): ... New.
2413 (gdb_ust_init): Move some code to ...
2414 (gdb_agent_init): ... here. New.
2415 [HAVE_UST]: Call gdb_ust_init.
2416 (initialize_tracepoint_ftlib): Call gdb_agent_init.
2417 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
2418 * config.in, configure: Regenerated.
2419
05044653
PA
24202012-03-02 Pedro Alves <palves@redhat.com>
2421
2422 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
2423 * linux-low.c (struct simple_pid_list): New.
2424 (stopped_pids): New a struct simple_pid_list pointer.
2425 (add_to_pid_list, pull_pid_from_list): New.
2426 (handle_extended_wait): Don't assume the first signal new children
2427 report is SIGSTOP. Adjust call to pull_pid_from_list.
2428 (linux_wait_for_lwp): Adjust.
2429
8d00225b
YQ
24302012-03-02 Yao Qi <yao@codesourcery.com>
2431
2432 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
2433 debug log.
2434
19560ba5
YQ
24352012-03-02 Yao Qi <yao@codesourcery.com>
2436
2437 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
2438 `stop_pc' and `tpoint'. Update caller.
2439
1faeff08
MR
24402012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
2441
2442 * linux-low.h (linux_target_ops): Add regset_bitmap member.
2443 * linux-low.c (use_linux_regsets): New macro.
2444 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
2445 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
2446 (linux_register_in_regsets): New function.
2447 (usr_fetch_inferior_registers): Skip registers covered by
2448 regsets.
2449 (usr_store_inferior_registers): Likewise.
2450 (usr_fetch_inferior_registers): New macro.
2451 (usr_store_inferior_registers): Likewise.
2452 (linux_fetch_registers): Handle mixed regset/non-regset targets.
2453 (linux_store_registers): Likewise.
2454 * linux-mips-low.c (init_registers_mips_dsp_linux): New
2455 prototype.
2456 (init_registers_mips64_dsp_linux): Likewise.
2457 (init_registers_mips_linux): New macro.
2458 (init_registers_mips_dsp_linux): Likewise.
2459 (mips_dsp_num_regs): Likewise.
2460 (DSP_BASE, DSP_CONTROL): New fallback macros.
2461 (mips_base_regs): New macro.
2462 (mips_regmap): Use it. Fix the size.
2463 (mips_dsp_regmap): New variable.
2464 (mips_dsp_regset_bitmap): Likewise.
2465 (mips_arch_setup): New function.
2466 (mips_cannot_fetch_register): Use the_low_target.regmap rather
2467 than mips_regmap.
2468 (mips_cannot_store_register): Likewise.
2469 (the_low_target): Update .arch_setup, .num_regs and .regmap
2470 initializers. Add .regset_bitmap initializer.
2471 * linux-arm-low.c (the_low_target): Add .regset_bitmap
2472 initializer.
2473 * linux-bfin-low.c (the_low_target): Likewise.
2474 * linux-cris-low.c (the_low_target): Likewise.
2475 * linux-crisv32-low.c (the_low_target): Likewise.
2476 * linux-ia64-low.c (the_low_target): Likewise.
2477 * linux-m32r-low.c (the_low_target): Likewise.
2478 * linux-m68k-low.c (the_low_target): Likewise.
2479 * linux-ppc-low.c (the_low_target): Likewise.
2480 * linux-s390-low.c (the_low_target): Likewise.
2481 * linux-sh-low.c (the_low_target): Likewise.
2482 * linux-sparc-low.c (the_low_target): Likewise.
2483 * linux-tic6x-low.c (the_low_target): Likewise.
2484 * linux-x86-low.c (the_low_target): Likewise.
2485 * linux-xtensa-low.c (the_low_target): Likewise.
2486 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
2487 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
2488 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
2489 srv_xmlfiles.
2490 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
2491 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
2492
c03e6ccc
YQ
24932012-02-29 Yao Qi <yao@codesourcery.com>
2494 Pedro Alves <palves@redhat.com>
2495
2496 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
2497 `step_over_finished' is true.
2498
644cebc9
PA
24992012-02-27 Pedro Alves <palves@redhat.com>
2500
2501 * linux-low.c (pid_is_stopped): Delete, moved to common/.
2502 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
2503
c14d7ab2
PA
25042012-02-27 Pedro Alves <palves@redhat.com>
2505
2506 PR server/9684
2507 * linux-low.c (pid_is_stopped): New.
2508 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
2509
412c89dd
LM
25102012-02-25 Luis Machado <lgustavo@codesourcery.com>
2511
2512 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
2513 of conditions.
2514
b745defe
MR
25152012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
2516
2517 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
2518
9f3a5c85
LM
25192012-02-24 Luis Machado <lgustavo@codesourcery>
2520
2521 * server.c (handle_query): Advertise support for target-side
2522 breakpoint condition evaluation.
2523 (process_point_options): New function.
2524 (process_serial_event): When inserting a breakpoint, check for
2525 a target-side condition that should be evaluated.
2526
2527 * mem-break.c: Include regcache.h and ax.h.
2528 (point_cond_list_t): New data structure.
2529 (breakpoint) <cond_list>: New field.
2530 (find_gdb_breakpoint_at): Make non-static.
2531 (delete_gdb_breakpoint_at): Clear any target-side
2532 conditions.
2533 (clear_gdb_breakpoint_conditions): New function.
2534 (add_condition_to_breakpoint): Likewise.
2535 (add_breakpoint_condition): Likewise.
2536 (gdb_condition_true_at_breakpoint): Likewise.
2537 (gdb_breakpoint_here): Return result directly instead
2538 of going through a local variable.
2539
2540 * mem-break.h (find_gdb_breakpoint_at): New prototype.
2541 (clear_gdb_breakpoint_conditions): Likewise.
2542 (add_breakpoint_condition): Likewise.
2543 (gdb_condition_true_at_breakpoint): Likewise.
2544
2545 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
2546 (need_step_over_p): Take target-side breakpoint condition into
2547 consideration.
2548
5e1dc496
LM
25492012-02-24 Luis Machado <lgustavo@codesourcery>
2550
2551 * server.h: Include tracepoint.h.
2552 (agent_mem_read, agent_get_trace_state_variable_value,
2553 agent_set_trace_state_variable_value,
2554 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
2555 get_set_tsv_func_addr): New prototypes.
2556
2557 * ax.h: New include file.
2558 * ax.c: New source file.
2559
2560 * tracepoint.c: Include ax.h.
2561 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
2562 agent_expr, eval_result_type): Move to ax.h.
2563 (parse_agent_expr): Rename to ...
2564 (gdb_parse_agent_expr): ... this, make it non-static and move
2565 to ax.h.
2566 (unparse_agent_expr) Rename to ...
2567 (gdb_unparse_agent_expr): ... this, make it non-static and move
2568 to ax.h.
2569 (eval_agent_expr): Rename to ...
2570 (eval_tracepoint_agent_expr): ... this.
2571 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
2572 forward declarations.
2573 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
2574 (agent_get_trace_state_variable_value): New function.
2575 (agent_set_trace_state_variable_value): New function.
2576 (cmd_qtdp): Call gdb_parse_agent_expr (...).
2577 (response_tracepoint): Call gdb_unparse_agent_expr (...).
2578 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
2579 (condition_true_at_tracepoint): Likewise.
2580 (parse_agent_expr): Rename to ...
2581 (gdb_parse_agent_expr): ... this and move to ax.c.
2582 (unparse_agent_expr): Rename to ...
2583 (gdb_unparse_agent_expr): ... this and move to ax.c.
2584 (gdb_agent_op_name): Move to ax.c.
2585 (eval_agent_expr): Rename to ...
2586 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
2587 and move to ax.c.
2588 (eval_tracepoint_agent_expr): New function.
2589 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 2590 non-static.
5e1dc496
LM
2591 (current_insn_ptr, emit_error, struct bytecode_address): Move to
2592 ax.c.
2593 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
2594 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
2595 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
2596 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
2597 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
2598 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
2599 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
2600 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
2601 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
2602 (compile_bytecodes): Remove forward declaration.
2603 (is_goto_target): Move to ax.c.
2604 (compile_bytecodes): Move to ax.c and call
2605 agent_get_trace_state_variable_value (...) and
2606 agent_set_trace_state_variable_value (...).
2607
2608 * Makefile.in: Update ax.c and IPA dependencies.
2609
277e4e52
PA
26102012-02-24 Pedro Alves <palves@redhat.com>
2611
2612 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
2613 (cmd_bigqtbuffer_circular): ... this. Only handle
2614 'QTBuffer:circular:'.
2615 (handle_tracepoint_general_set): Adjust.
2616
bf4c19f7
YQ
26172012-02-16 Yao Qi <yao@codesourcery.com>
2618
2619 * inferiors.c: Move code to ...
2620 * dll.c: .... here. New.
2621 * server.h: Declare clear_dlls.
2622 * Makefile.in (SFILES): Add dll.c.
2623 (OBS): Add dll.o
2624 (dll.o): New rule.
2625
d73f2619
YQ
26262012-02-11 Yao Qi <yao@codesourcery.com>
2627
2628 * server.c: (handle_monitor_command): Add a new parameter
2629 `own_buf'.
2630 (handle_query): Update caller.
2631
f8255c2a
JB
26322012-02-09 Joel Brobecker <brobecker@adacore.com>
2633
2634 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
2635 * configure, config.in: Regenerate.
2636 * hostio.c: Provide an alternate implementation if HAVE_READLINK
2637 is not defined.
2638
da84f473
PA
26392012-02-02 Pedro Alves <palves@redhat.com>
2640
2641 Try SIGKILL first, then PTRACE_KILL.
2642 * linux-low.c (linux_kill_one_lwp): New.
2643 (linux_kill_one_lwp): Rename to ...
2644 (kill_one_lwp_callback): ... this. Use the new
2645 linux_kill_one_lwp.
2646
e886a173
PA
26472012-02-02 Pedro Alves <palves@redhat.com>
2648
2649 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
2650 inferior.
2651
be07f1a2
PA
26522012-01-27 Pedro Alves <palves@redhat.com>
2653
2654 * linux-low.c (linux_child_pid_to_exec_file): Delete.
2655 (elf_64_file_p): Make static.
2656 (linux_pid_exe_is_elf_64_file): New.
2657 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
2658 Delete declarations.
2659 (linux_pid_exe_is_elf_64_file): Declare.
2660 * linux-x86-low.c (x86_arch_setup): Use
2661 linux_pid_exe_is_elf_64_file.
2662
d8301ad1
JK
26632012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
2664
2665 * linux-low.c (linux_wait_for_event_1): Rename to ...
2666 (linux_wait_for_event): ... here and merge it with former
2667 linux_wait_for_event - new variable wait_ptid, use it.
2668 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
2669
01b17894
PA
26702012-01-23 Pedro Alves <palves@redhat.com>
2671
2672 * server.c (main): Avoid yet another case of infinite loop while
2673 detaching/killing after a longjmp.
2674
e825046f
JK
26752012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
2676
2677 Code cleanup.
2678 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
2679
b9e7b9c3
UW
26802012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
2681
2682 * hostio.c (handle_readlink): New function.
2683 (handle_vFile): Call it to handle "vFile:readlink" packets.
2684
901f9912
UW
26852012-01-20 Pedro Alves <palves@redhat.com>
2686 Ulrich Weigand <ulrich.weigand@linaro.org>
2687
2688 * server.c (handle_v_requests): Only support vAttach and vRun to
2689 start multiple processes when in extended protocol mode.
2690
fc1ab1a0
PA
26912012-01-17 Pedro Alves <palves@redhat.com>
2692
2693 * tracepoint.c (initialize_tracepoint): Use mmap instead of
2694 memalign plus mprotect to allocate the scratch buffer.
2695
7d5d4e98
PA
26962012-01-13 Pedro Alves <palves@redhat.com>
2697
2698 * server.c (attach_inferior): Clear `cont_thread'.
2699
f128d5e9
PA
27002012-01-13 Pedro Alves <palves@redhat.com>
2701
2702 * server.c (main): Avoid infinite loop while detaching/killing
2703 after a longjmp.
2704
06db92f0
DE
27052012-01-09 Doug Evans <dje@google.com>
2706
2707 * server.c (start_inferior): Set last_ptid in --wrapper case.
2708
32d92999
YQ
27092012-01-06 Yao Qi <yao@codesourcery.com>
2710
2711 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
2712 defined.
2713 [IN_PROCESS_AGENT] (debug_agent): New global variable.
2714
5e0a92a9
YQ
27152012-01-04 Yao Qi <yao@codesourcery.com>
2716
2717 * tracepoint.c (cmd_qtdp): Print debug message
2718 for static tracepoint.
2719
ae639e8c
YQ
27202012-01-04 Yao Qi <yao@codesourcery.com>
2721
2722 * tracepoint.c (trace_vdebug): Differentiate debug message
2723 between gdbserver and IPA.
2724
f72429c5
YQ
27252012-01-03 Yao Qi <yao@codesourcery.com>
2726
2727 * tracepoint.c (tracepoint_was_hit): Don't collect for
2728 static tracepoint.
2729
12c3e59c
JB
27302012-01-02 Joel Brobecker <brobecker@adacore.com>
2731
2732 * terminal.h: Reformat copyright header.
2733
67827812
JB
27342012-01-02 Joel Brobecker <brobecker@adacore.com>
2735
2736 * server.c (gdbserver_version): Update copyright year.
2737 * gdbreplay.c (gdbreplay_version): Likewise.
2738
3e52c33d
JK
27392011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
2740
2741 * linux-low.c (linux_create_inferior): Put empty if clause for write.
2742
2743 Revert:
2744 2011-12-18 Hui Zhu <teawater@gmail.com>
2745 * linux-low.c (linux_create_inferior): Save return value to ret.
2746
66f1260e
HZ
27472011-12-18 Hui Zhu <teawater@gmail.com>
2748
2749 * linux-low.c (linux_create_inferior): Save return value to ret.
2750
e77616d7
DE
27512011-12-16 Doug Evans <dje@google.com>
2752
e7b06c57
DE
2753 * linux-low.c (linux_create_inferior): If stdio connection,
2754 redirect stdin from /dev/null, stdout to stderr.
2755 * remote-utils.c (remote_is_stdio): New static global.
2756 (remote_connection_is_stdio): New function.
2757 (remote_prepare): Handle stdio connection.
2758 (remote_open): Ditto.
2759 (remote_close): Don't close stdin for stdio connections.
2760 (read_prim,write_prim): New functions. Replace all calls to
2761 read/write to these.
2762 * server.c (main): Watch for "-" argument. Move call to
2763 remote_prepare before start_inferior.
2764 * server.h (STDIO_CONNECTION_NAME): New macro.
2765 (remote_connection_is_stdio): Declare.
2766
e77616d7
DE
2767 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
2768 in debugging output.
2769
82067193
YQ
27702011-12-15 Yao Qi <yao@codesourcery.com>
2771
2772 * tracepoint.c: Include sys/syscall.h.
2773 (gdb_ust_thread): Remove preprocessor conditional.
2774
82bfbe7e
PA
27752011-12-14 Pedro Alves <pedro@codesourcery.com>
2776
2777 * linux-low.c (linux_detach_one_lwp): Call
2778 the_low_target.prepare_to_resume before detaching.
2779
712c6575
YQ
27802011-12-14 Yao Qi <yao@codesourcery.com>
2781
2782 * tracepoint.c (gdb_ust_thread): Don't ignore return value
2783 of write.
2784
d54d1edf
YQ
27852011-12-14 Yao Qi <yao@codesourcery.com>
2786
2787 * i386-low.c (i386_low_stopped_data_address): Initialize local
2788 variable `control'.
2789
6210a125
PA
27902011-12-13 Pedro Alves <pedro@codesourcery.com>
2791
2792 PR remote/13492
2793
2794 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
2795 DR_CONTROL unless necessary. Extend comments.
2796 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
2797 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
2798
2ece8244
YQ
27992011-12-13 Yao Qi <yao@codesourcery.com>
2800
2801 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
2802 macros.
2803 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
2804
784867a5
JK
28052011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
2806
2807 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
2808 Print new debug message for such case.
2809
6bf36717
JK
28102011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
2811
2812 Fix overlapping memcpy.
2813 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
2814 the read_inferior_memory transfer.
2815 (delete_fast_tracepoint_jump): New variable buf. Use it for the
2816 write_inferior_memory transfer.
2817 (set_fast_tracepoint_jump): New variable buf. Use it for the
2818 read_inferior_memory and write_inferior_memory transfers.
2819 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
2820 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
2821 Use it for the write_inferior_memory transfer.
2822 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
2823 buffers.
2824
50275556
MR
28252011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
2826
2827 * linux-low.c (fetch_register, store_register): Make code
2828 consistent, fix formatting.
2829
7325beb4
MR
28302011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
2831
2832 * linux-low.c (usr_store_inferior_registers): Factor out code
2833 to handle individual registers into...
2834 (store_register): ... this new function.
2835
c642a434
UW
28362011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
2837
2838 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
2839 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
2840 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
2841 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
2842 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
2843 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
2844 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
2845 (srv_xmlfiles): Add new XML files.
2846
2847 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
2848 and <sys/uio.h>.
2849 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
2850 (init_registers_s390_linux32v1): Add prototype.
2851 (init_registers_s390_linux32v2): Likewise.
2852 (init_registers_s390_linux64v1): Likewise.
2853 (init_registers_s390_linux64v2): Likewise.
2854 (init_registers_s390x_linux64v1): Likewise.
2855 (init_registers_s390x_linux64v2): Likewise.
2856 (s390_num_regs): Increment to 52.
2857 (s390_regmap): Add orig_r2 register.
2858 (s390_num_regs_3264): Increment to 68.
2859 (s390_regmap_3264): Add orig_r2 register.
2860 (s390_collect_ptrace_register): Handle orig_r2 register.
2861 (s390_supply_ptrace_register): Likewise.
2862 (s390_fill_last_break): New function.
2863 (s390_store_last_break): Likewise.
2864 (s390_fill_system_call): New function.
2865 (s390_store_system_call): Likewise.
2866 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
2867 register sets.
2868 (s390_check_regset): New function.
2869 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
2870 NT_S390_SYSTEM_CALL regsets and use appropriate description.
2871 Update target_regsets for available register sets.
2872
2268b414
JK
28732011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
2874 Jan Kratochvil <jan.kratochvil@redhat.com>
2875
2876 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
2877 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
2878 New.
2879 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
2880 * linux-low.h (struct process_info_private): New member r_debug.
2881 * server.c (handle_qxfer_libraries): Call
2882 the_target->qxfer_libraries_svr4.
2883 (handle_qxfer_libraries_svr4): New function.
2884 (qxfer_packets): New entry "libraries-svr4".
2885 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
2886 * target.h (struct target_ops): New member qxfer_libraries_svr4.
2887 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
2888 PACKET_qXfer_libraries_svr4.
2889
d6db1fab
UW
28902011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
2891
2892 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
2893 PSW address/mask between 8-byte and 16-byte formats.
2894 (s390_supply_ptrace_register): Likewise.
2895 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
2896 basic addressing mode bit.
2897
242f5f1c
SS
28982011-11-24 Stan Shebs <stan@codesourcery.com>
2899
2900 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
2901
f196051f
SS
29022011-11-17 Stan Shebs <stan@codesourcery.com>
2903
2904 * tracepoint.c (struct tracepoint): New field traceframe_usage.
2905 (tracing_start_time): New global.
2906 (tracing_stop_time): New global.
2907 (tracing_user_name): New global.
2908 (tracing_notes): New global.
2909 (tracing_stop_note): New global.
2910 (cmd_qtstart): Set traceframe_usage, start_time.
2911 (stop_tracing): Set stop_time.
2912 (cmd_qtstatus): Report additional status.
2913 (cmd_qtp): New function.
2914 (handle_tracepoint_query): Call it.
2915 (cmd_qtnotes): New function.
2916 (handle_tracepoint_general_set): Call it.
2917 (get_timestamp): Rename from tsv_get_timestamp.
2918
405f8e94
SS
29192011-11-14 Stan Shebs <stan@codesourcery.com>
2920 Kwok Cheung Yeung <kcy@codesourcery.com>
2921
2922 * linux-x86-low.c (small_jump_insn): New.
2923 (i386_install_fast_tracepoint_jump_pad): Add arguments for
2924 trampoline and error message, build a trampoline and issue a small
2925 jump instruction to it.
2926 (x86_install_fast_tracepoint_jump_pad): Add arguments for
2927 trampoline and error message.
2928 (x86_get_min_fast_tracepoint_insn_len): New.
2929 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
2930 * linux-low.h (struct linux_target_ops): Add arguments to
2931 install_fast_tracepoint_jump_pad operation, add new operation.
2932 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
2933 arguments.
2934 (linux_get_min_fast_tracepoint_insn_len): New function.
2935 (linux_target_op): Add new operation.
2936 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
2937 (gdb_trampoline_buffer_end): Ditto.
2938 (gdb_trampoline_buffer_error): Ditto.
2939 (struct ipa_sym_addresses): Add fields for new IPA variables.
2940 (symbol_list): Add entries for new IPA variables.
2941 (struct tracepoint): Add fields to hold the address range of the
2942 trampoline used by the tracepoint.
2943 (trampoline_buffer_head): New static variable.
2944 (trampoline_buffer_tail): Ditto.
2945 (claim_trampoline_space): New function.
2946 (have_fast_tracepoint_trampoline_buffer): New function.
2947 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
2948 structure.
2949 (install_fast_tracepoint): Ditto, also add error buffer argument.
2950 (cmd_qtminftpilen): New function.
2951 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
2952 (fast_tracepoint_from_trampoline_address): New function.
2953 (fast_tracepoint_collecting): Handle trampoline as part of jump
2954 pad space.
2955 (set_trampoline_buffer_space): New function.
2956 (initialize_tracepoint): Initialize new IPA variables.
2957 * target.h (struct target_ops): Add arguments to
2958 install_fast_tracepoint_jump_pad operation, add new
2959 get_min_fast_tracepoint_insn_len operation.
2960 (target_get_min_fast_tracepoint_insn_len): New.
2961 (install_fast_tracepoint_jump_pad): Add arguments.
2962 * server.h (IPA_BUFSIZ): Define.
2963 * linux-i386-ipa.c: Include extra header files.
2964 (initialize_fast_tracepoint_trampoline_buffer): New function.
2965 (initialize_low_tracepoint): Call it.
2966 * server.h (set_trampoline_buffer_space): Declare.
2967 (claim_trampoline_space): Ditto.
2968 (have_fast_tracepoint_trampoline_buffer): Ditto.
2969
1e4d1764
YQ
29702011-11-14 Yao Qi <yao@codesourcery.com>
2971
2972 * server.c (handle_query): Handle InstallInTrace for qSupported.
2973 * tracepoint.c (add_tracepoint): Sort list.
2974 (install_tracepoint, download_tracepoint): New.
2975 (cmd_qtdp): Call them to install and download tracepoints.
2976 (sort_tracepoints): Removed.
2977 (cmd_qtstart): Update.
2978
5c73ff4e
YQ
29792011-11-14 Yao Qi <yao@codesourcery.com>
2980
2981 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
2982 * mem-break.h: Declare.
2983 * tracepoint.c (cmd_qtstart): Move some code to ...
2984 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
2985 New.
2986 (download_tracepoints): Move some code to ...
2987 (download_tracepoint_1): ... here. New.
2988
86a30030
YQ
29892011-11-08 Yao Qi <yao@codesourcery.com>
2990
2991 * remote-utils.c (relocate_instruction): A comment fix.
2992
8d26e50c
JB
29932011-11-07 Joel Brobecker <brobecker@adacore.com>
2994
2995 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
2996 (i386_dr_low_get_control, i386_dr_low_get_status): Use
2997 dr_status_mirror and dr_control_mirror from debug_reg_state.
2998 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
2999 (i386_initial_stuff): Remove use of deleted globals.
3000 (i386_get_thread_context, i386_set_thread_context,
3001 i386_thread_added): Use dr_status_mirror and dr_control_mirror
3002 from debug_reg_state.
3003
a59306a3
YQ
30042011-11-05 Yao Qi <yao@codesourcery.com>
3005
3006 * tracepoint.c (gdb_collect): Loop over tracepoints of same
3007 address as TPOINT's.
3008
3065dfb6
SS
30092011-11-02 Stan Shebs <stan@codesourcery.com>
3010
3011 * tracepoint.c (agent_mem_read_string): New function.
3012 (eval_agent_expr): Call it for tracenz.
3013 * server.c (handle_query): Report support for tracenz.
3014
fd0d8c7c
YQ
30152011-11-02 Yao Qi <yao@codesourcery.com>
3016
3017 * tracepoint.c (cmd_qtstart): Remove unused local variables.
3018
609086b1
YQ
30192011-11-02 Yao Qi <yao@codesourcery.com>
3020
3021 * target.h: Fix a typo in comment.
3022
b9fd1791
PA
30232011-10-31 Pedro Alves <pedro@codesourcery.com>
3024
3025 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
3026 clobber the breakpoints' shadows with fast tracepoint jumps.
3027 * mem-break.h (check_mem_write): Add `myaddr' parameter.
3028 * target.c (write_inferior_memory): Also pass MYADDR down to
3029 check_mem_write.
3030
03583c20
UW
30312011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
3032
3033 * configure.ac: Check support for personality routine.
3034 * configure: Regenerate.
3035 * config.in: Likewise.
3036 * linux-low.c: Include <sys/personality.h>.
3037 Define ADDR_NO_RANDOMIZE if necessary.
3038 (linux_create_inferior): Disable address space randomization when
3039 forking inferior, if requested.
3040 (linux_supports_disable_randomization): New function.
3041 (linux_target_ops): Install it.
3042 * server.h (disable_randomization): Declare.
3043 * server.c (disable_randomization): New global variable.
3044 (handle_general_set): Handle QDisableRandomization.
3045 (handle_query): Likewise for qSupported.
3046 (main): Support --disable-randomization and --no-disable-randomization
3047 command line arguments.
3048 * target.h (struct target_ops): Add supports_disable_randomization.
3049 (target_supports_disable_randomization): New macro.
3050
723b724b
MF
30512011-09-29 Mike Frysinger <vapier@gentoo.org>
3052
3053 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
3054 ifdef check.
3055 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
3056 [!PT_GETDSBT] (target_loadmap): New definition.
3057 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
3058 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
3059 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
3060 and PT_GETDSBT to LINUX_LOADMAP.
3061 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
3062 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
3063
55329a5c 30642011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
3065
3066 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
3067 (arm_linux_hwbp_cap): New static variable.
3068 (arm_linux_get_hwbp_cap): Replace by ...
3069 (arm_linux_init_hwbp_cap): ... this new function.
3070 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
3071 (arm_linux_get_hw_watchpoint_count): Likewise.
3072 (arm_linux_get_hw_watchpoint_max_length): Likewise.
3073 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
3074 (arm_prepare_to_resume): Use perror_with_name instead of error.
3075
55329a5c 30762011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
3077
3078 * linux-arm-low.c: Include <signal.h>.
3079 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
3080 (struct arm_linux_hwbp_cap): New data type.
3081 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
3082 (struct arm_linux_hw_breakpoint): New data type.
3083 (MAX_BPTS, MAX_WPTS): Define.
3084 (struct arch_process_info, struct arch_lwp_info): New data types.
3085 (arm_linux_get_hwbp_cap): New function.
3086 (arm_linux_get_hw_breakpoint_count): Likewise.
3087 (arm_linux_get_hw_watchpoint_count): Likewise.
3088 (arm_linux_get_hw_watchpoint_max_length): Likewise.
3089 (arm_hwbp_control_initialize): Likewise.
3090 (arm_hwbp_control_is_enabled): Likewise.
3091 (arm_hwbp_control_is_initialized): Likewise.
3092 (arm_hwbp_control_disable): Likewise.
3093 (arm_linux_hw_breakpoint_equal): Likewise.
3094 (arm_linux_hw_point_initialize): Likewise.
3095 (struct update_registers_data): New data structure.
3096 (update_registers_callback: New function.
3097 (arm_insert_point): Likewise.
3098 (arm_remove_point): Likewise.
3099 (arm_stopped_by_watchpoint): Likewise.
3100 (arm_stopped_data_address): Likewise.
3101 (arm_new_process): Likewise.
3102 (arm_new_thread): Likewise.
3103 (arm_prepare_to_resume): Likewise.
3104 (the_low_target): Register arm_insert_point, arm_remove_point,
3105 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
3106 arm_new_thread, and arm_prepare_to_resume.
3107
6b9801d4
SS
31082011-09-15 Stan Shebs <stan@codesourcery.com>
3109
3110 * server.h (struct emit_ops): Add compare-goto fields.
3111 * tracepoint.c (gdb_agent_op_sizes): New table.
3112 (emit_eq_goto): New function.
3113 (emit_ne_goto): New function.
3114 (emit_lt_goto): New function.
3115 (emit_le_goto): New function.
3116 (emit_gt_goto): New function.
3117 (emit_ge_goto): New function.
3118 (is_goto_target): New function.
3119 (compile_bytecodes): Recognize special cases of compare-goto
3120 combinations and call specialized emitters for them.
3121 * linux-x86-low.c (amd64_emit_eq_goto): New function.
3122 (amd64_emit_ne_goto): New function.
3123 (amd64_emit_lt_goto): New function.
3124 (amd64_emit_le_goto): New function.
3125 (amd64_emit_gt_goto): New function.
3126 (amd64_emit_ge_goto): New function.
3127 (amd64_emit_ops): Add the new functions.
3128 (i386_emit_eq_goto): New function.
3129 (i386_emit_ne_goto): New function.
3130 (i386_emit_lt_goto): New function.
3131 (i386_emit_le_goto): New function.
3132 (i386_emit_gt_goto): New function.
3133 (i386_emit_ge_goto): New function.
3134 (i386_emit_ops): Add the new functions.
3135
bf15cbda
SS
31362011-09-08 Stan Shebs <stan@codesourcery.com>
3137
3138 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
3139 (i386_emit_epilogue): Restore %ebx.
3140
943ca1dd
JZ
31412011-08-31 Jie Zhang <jzhang918@gmail.com>
3142
3143 * server.c (step_thread): Remove definition.
3144 (process_serial_event): Don't handle Hs.
3145 * server.h (step_thread): Remove declaration.
3146 * target.c (set_desired_inferior): Remove use of step_thread.
3147
e3deef73
LM
31482011-08-24 Luis Machado <lgustavo@codesourcery.com>
3149
3150 * linux-low.c: Include linux-procfs.h.
3151 (linux_attach_lwp_1): Update comments.
3152 (linux_attach): Scan for existing threads when attaching to a
3153 process that is the tgid.
3154 * Makefile.in: Update dependencies.
3155
13da1c97
LM
31562011-08-24 Luis Machado <lgustavo@codesourcery.com>
3157
3158 * configure.srv: Add linux-procfs.o dependencies.
3159
881127c9
YQ
31602011-08-14 Yao Qi <yao@codesourcery.com>
3161
3162 * target.h (struct target_ops): Fix indent.
3163 * win32-low.c (win32_target_ops): Fix comment.
3164
58dbd541
YQ
31652011-08-14 Andrew Jenner <andrew@codesourcery.com>
3166 Yao Qi <yao@codesourcery.com>
3167
3168 * Makefile.in (clean): Remove tic6x-*.c files.
3169 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
3170 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
3171 (tic6x-c64xp-linux.c): Likewise.
3172 * configure.srv: Add support for tic6x-*-uclinux.
3173 * linux-tic6x-low.c: New.
3174 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
3175
78d85199
YQ
31762011-08-14 Andrew Stubbs <ams@codesourcery.com>
3177 Yao Qi <yao@codesourcery.com>
3178
3179 * target.h (struct target_ops): Add read_loadmap.
3180 * linux-low.c (struct target_loadseg): New type.
3181 (struct target_loadmap): New type.
3182 (linux_read_loadmap): New function.
3183 (linux_target_ops): Add linux_read_loadmap.
3184 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
3185 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
3186 to NULL.
78d85199 3187
a959a88d
EZ
31882011-08-05 Eli Zaretskii <eliz@gnu.org>
3189
3190 * win32-low.c: Include <stdint.h>.
3191
1ced966e
PA
31922011-07-22 Pedro Alves <pedro@codesourcery.com>
3193
3194 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
3195 to the inferior here.
3196 (i386_remove_aligned_watchpoint): Ditto.
3197 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
3198 fit part of the watchpoint in the debug registers.
3199 (i386_update_inferior_debug_regs): New.
3200 (i386_low_insert_watchpoint): Work on a local mirror of the debug
3201 registers, and only update the inferior on success.
3202 (i386_low_remove_watchpoint): Ditto.
3203
d26e3629
KY
32042011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
3205
3206 * linux-low.c (compare_ints, unique, list_threads, show_process,
3207 linux_core_of_thread): Delete.
3208 (linux_target_ops): Change linux_core_of_thread to
3209 linux_common_core_of_thread.
3210 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
3211 * utils.c (malloc_failure): Change type of argument.
3212 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
3213 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
3214 common/linux-osdata.c, common/ptid.c and common/buffer.c.
3215 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
3216 (IPA_OBJS): Add common-utils-ipa.o.
3217 (ptid_h, linux_osdata_h): New macros.
3218 (server_h): Add common/common-utils.h, common/xml-utils.h,
3219 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
3220 common/ptid.h.
3221 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
3222 ptid.o, buffer.o): New rules.
3223 (linux-low.o): Add common/linux-osdata.h as a dependency.
3224 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
3225 * configure.ac: Add AC_HEADER_DIRENT check.
3226 * config.in: Regenerate.
3227 * configure: Regenerate.
3228 * remote-utils.c (xml_escape_text): Delete.
3229 (buffer_grow, buffer_free, buffer_init, buffer_finish,
3230 buffer_xml_printf): Move to common/buffer.c.
3231 * server.c (main): Remove call to initialize_inferiors.
3232 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
3233 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
3234 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
3235 internal_error, gdb_assert, gdb_assert_fail): Delete.
3236 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
3237 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
3238 common/buffer.h.
3239 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
3240 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
3241 initialize_inferiors): Delete.
3242
2275a1a7
PA
32432011-07-20 Pedro Alves <pedro@codesourcery.com>
3244
3245 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
3246 symbol error.
3247
0a5b1e09
PA
32482011-05-31 Pedro Alves <pedro@codesourcery.com>
3249
3250 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
3251 assertion.
3252 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
3253
6938fd34
YQ
32542011-05-26 Yao Qi <yao@codesourcery.com>
3255
3256 * Makefile.in (thread-db.o): Track dependence to
3257 common/gdb_thread_db.h.
3258 * thread-db.c: include gdb_thread_db.h from right place.
3259
b481f9e0
TT
32602011-05-16 Adrian Cornish <gnu@bluedreamer.com>
3261
3262 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
3263 __FILE__ and __LINE__ to internal_error.
3264
98a5dd13
DE
32652011-05-13 Doug Evans <dje@google.com>
3266
3267 * thread-db.c (try_thread_db_load_from_sdir): New function.
3268 (try_thread_db_load_from_dir): New function.
3269 (thread_db_load_search): Handle $sdir, ignore $pdir.
3270 Remove trying of system directories if search of
3271 libthread-db-search-path fails, that is now done via $sdir.
3272
d248b706
KY
32732011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
3274
3275 * server.c (handle_query): Add EnableDisableTracepoints to the list
3276 of supported features.
43aaf8b6 3277 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 3278 tracepoints.
43aaf8b6
PA
3279 (cmd_qtenable_disable): New.
3280 (cmd_qtstart): Install tracepoints even if disabled.
3281 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
3282 receiving a QTEnable or QTDisable packet.
3283 (gdb_collect): Skip data collection if fast tracepoint is disabled.
3284 (ust_marker_to_static_tracepoint): Do not ignore disabled static
3285 tracepoints.
3286 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 3287
84e578fb
DE
32882011-05-10 Doug Evans <dje@google.com>
3289
3290 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
3291
71f55dd8
DE
32922011-05-04 Doug Evans <dje@google.com>
3293
3294 * linux-low.c (linux_join): Skip process lookup.
3295 * spu-low.c (spu_join): Ditto.
3296 * server.c (join_inferiors_callback): Delete.
3297 (process_serial_event): For 'D' packet (detach) call join_inferior
3298 directly.
3299
4d393d60
JM
33002011-05-04 Joseph Myers <joseph@codesourcery.com>
3301
3302 * README: Don't mention xscale*-*-linux*.
3303 * configure.srv (xscale*-*-linux*): Don't handle target.
3304
b00ad6ff
NF
33052011-04-27 Nathan Froyd <froydnj@codesourcery.com>
3306
3307 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
3308 casting pointers.
3309 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
3310 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
3311 (i386_emit_void_call_2): Likewise.
3312
af96c192
YQ
33132011-04-26 Yao Qi <yao@codesourcery.com>
3314
43aaf8b6
PA
3315 * linux-low.c: Move common macros to linux-ptrace.h.
3316 Include linux-ptrace.h.
af96c192
YQ
3317 * Makefile.in (linux_ptrace_h): New.
3318 (linux-low.o): Depends on linux-ptrace.h.
3319
03f2bd59
JK
33202011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
3321
3322 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
3323 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
3324 (remote_prepare): New function with most of the TCP code from ...
3325 (remote_open): ... here. Detect PORT here unconditionally. Move also
3326 setting transport_is_reliable.
3327 * server.c (run_once): New variable.
3328 (gdbserver_usage): Document it.
3329 (main): Set run_once for `--once'. Call remote_prepare. Exit after
3330 the first run if RUN_ONCE.
3331 * server.h (run_once, remote_prepare): New declarations.
3332
7a9dd1b2
TT
33332011-04-19 Tom Tromey <tromey@redhat.com>
3334
3335 * win32-low.c (handle_load_dll): Remove duplicate "the".
3336
81239425
PM
33372011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
3338
3339 Remove support for old Cygwin 1.5 versions.
3340 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
3341 function to avoid warning.
3342 (win32_add_one_solib): Use cygwin_conv_path function to avoid
3343 warning.
3344
9e0627f1
PM
33452011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
3346
3347 * gdbserver/server.h (Macro _): Define it if not available.
3348
588eebee
MS
33492011-03-14 Michael Snyder <msnyder@vmware.com>
3350
348af9f7 3351 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 3352
43f70d4c
JB
33532011-03-10 Joel Brobecker <brobecker@adacore.com>
3354
3355 * Makefile.in (maintainer-clean realclean distclean): Remove
3356 "make ... subdir_do" command.
3357
348af9f7
MS
33582011-03-10 Michael Snyder <msnyder@vmware.com>
3359
3360 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
3361
3362 * server.c (handle_v_run): Free alloced buffer on early return.
3363
e637a4f5
YQ
33642011-03-09 Yao Qi <yao@codesourcery.com>
3365
3366 Revert:
3367 2011-03-04 Yao Qi <yao@codesourcery.com>
3368
3369 * Makefile.in: Remove GNU make feature --directory.
3370
3371 2011-03-05 Yao Qi <yao@codesourcery.com>
3372
3373 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
3374 (subdir_do): New make target. Copied from gdb/Makefile.
3375 (maintainer-clean, realclean, distclean, clean): Call corresponding
3376 make targets in common/Makefile.
3377
3378 2011-02-11 Yao Qi <yao@codesourcery.com>
3379
3380 * configure.ac: Call AC_PROG_RANLIB.
3381 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
3382 * configure: Regenerate.
3383
e6edda56
JK
33842011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3385
3386 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
3387
e5141119
JB
33882011-03-06 Yao Qi <yao@codesourcery.com>
3389
3390 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
3391
64794aa4
JB
33922011-03-05 Yao Qi <yao@codesourcery.com>
3393
3394 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
3395 (subdir_do): New make target. Copied from gdb/Makefile.
3396 (maintainer-clean, realclean, distclean, clean): Call corresponding
3397 make targets in common/Makefile.
3398
7a762829
YQ
33992011-03-04 Yao Qi <yao@codesourcery.com>
3400
3401 * Makefile.in: Remove GNU make feature --directory.
3402
348af9f7
MS
34032011-03-04 Michael Snyder <msnyder@vmware.com>
3404
3405 * server.c (queue_stop_reply): Call xmalloc not malloc.
3406
34072011-03-02 Michael Snyder <msnyder@vmware.com>
3408
3409 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
3410
9f72fee2
MS
34112011-02-28 Michael Snyder <msnyder@vmware.com>
3412
588eebee
MS
3413 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
3414 (cmd_qtframe): Ditto.
3415 (cmd_qtbuffer): Ditto.
3416 (cmd_bigqtbuffer): Ditto.
3417
9f72fee2
MS
3418 * utils.c (decimal2str): Initialize 'width' to nine, then
3419 don't mess with it.
3420
8040bd49
UW
34212011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
3422
3423 * hostio.c (require_data): Free *data, not data.
3424
7e52cbd0
JK
34252011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3426
3427 * hostio.c (require_data): Use free, not xfree.
3428
9130f83e
MS
34292011-02-27 Michael Snyder <msnyder@vmware.com>
3430
4b812f4e
MS
3431 * server.c (handle_query): Discard unused value.
3432
9130f83e
MS
3433 * hostio.c (require_data): Free malloc memory before returning
3434 error.
3435
69d37113
MS
34362011-02-26 Michael Snyder <msnyder@vmware.com>
3437
3438 * linux-low.c (list_threads): Call closedir for dirent.
3439
35f5825a
MS
34402011-02-27 Michael Snyder <msnyder@vmware.com>
3441
2a589cef
MS
3442 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
3443 a case statement falls through.
3444
0adea5f7
MS
3445 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
3446
35f5825a
MS
3447 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
3448 in comparison.
3449
238f1c74
MS
34502011-02-26 Michael Snyder <msnyder@vmware.com>
3451
3452 * utils.c (decimal2str): Eliminate dead code and dead param.
3453 (pulongest): Drop dead param from call to decimal2str.
3454 (plongest): Ditto.
3455
633ff500
JB
34562011-02-24 Joel Brobecker <brobecker@adacore.com>
3457
3458 Revert the following patch (not approved yet):
3459 2011-02-21 Hui Zhu <teawater@gmail.com>
3460 * tracepoint.c (tp_printf): New function.
3461 (eval_agent_expr): Handle gdb_agent_op_printf.
3462
f9c6ff72
HZ
34632011-02-21 Hui Zhu <teawater@gmail.com>
3464
3465 * tracepoint.c (tp_printf): New function.
3466 (eval_agent_expr): Handle gdb_agent_op_printf.
3467
94d5e490
TT
34682011-02-18 Tom Tromey <tromey@redhat.com>
3469
3470 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
3471 (tracepoint.o): Likewise.
3472 * tracepoint.c (enum gdb_agent_op): Use ax.def.
3473 (gdb_agent_op_names): Likewise.
3474
c7f96d2b
TT
34752011-02-18 Tom Tromey <tromey@redhat.com>
3476
3477 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
3478 gdb_agent_op_rot>: New constants.
3479 (gdb_agent_op_names): Add pick and roll.
3480 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
3481 cases.
3482
0feedb2c
JK
34832011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3484
3485 * aclocal.m4: Regenerated with aclocal-1.11.1.
3486
b3b9301e
PA
34872011-02-14 Pedro Alves <pedro@codesourcery.com>
3488
3489 * server.c (handle_qxfer_traceframe_info): New.
3490 (qxfer_packets): Register "traceframe-info".
3491 (handle_query): Report support for qXfer:traceframe-info:read+.
3492 * tracepoint.c (match_blocktype): New.
3493 (traceframe_find_block_type): Rename to ...
3494 (traceframe_walk_blocks): ... this. Add callback filter argument,
3495 and use it.
3496 (traceframe_find_block_type): New, reimplemented on top of
3497 traceframe_walk_blocks.
3498 (build_traceframe_info_xml): New.
3499 (traceframe_read_info): New.
3500 * server.h (traceframe_read_info): Declare.
3501
4f3e6fb7
YQ
35022011-02-11 Yao Qi <yao@codesourcery.com>
3503
3504 * configure.ac: Call AC_PROG_RANLIB.
3505 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
3506 * configure: Regenerate.
3507
764880b7
PA
35082011-02-07 Pedro Alves <pedro@codesourcery.com>
3509
3510 * server.c (gdb_read_memory): Change return semantics to allow
3511 partial transfers.
3512 (handle_search_memory_1): Adjust.
3513 (process_serial_event) <'m' packet>: Handle partial transfers.
3514 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
3515
1c79eb8a
PA
35162011-01-28 Pedro Alves <pedro@codesourcery.com>
3517
3518 * regcache.c (init_register_cache): Initialize
3519 regcache->register_status.
3520 (free_register_cache): Release regcache->register_status.
3521 (regcache_cpy): Copy register_status.
3522 (registers_to_string): Print 'x's for unavailable registers.
3523 (supply_register): Mark the register's status valid or
3524 unavailable, depending on whether a buffer was passed in or not.
3525 (supply_register_zeroed): New.
3526 (supply_regblock): Mark the registers' status valid or
3527 unavailable, depending on whether a buffer was passed in or not.
3528 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
3529 (struct regcache): New `register_status' field.
3530 (supply_register_zeroed): Declare.
3531 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
3532 supply_register_zeroed, rather than passing a NULL buffer to
3533 supply_register.
3534 * tracepoint.c (fetch_traceframe_registers): Update comment.
3535
85724a0e
PA
35362011-01-28 Pedro Alves <pedro@codesourcery.com>
3537
3538 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
3539 buffer explicit.
3540
d08aafef
PA
35412011-01-25 Pedro Alves <pedro@codesourcery.com>
3542
3543 * server.h (decode_xfer_write): Change prototype.
3544 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
3545 and don't extract the annex here.
3546 * server.c (decode_xfer_read): Remove `annex' parameter,
3547 and don't extract the annex here.
3548 (decode_xfer): New.
3549 (struct qxfer): New.
3550 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
3551 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
3552 (handle_qxfer_statictrace): New functions, abstracted out from
3553 handle_query, and made to use the struct qxfer interface.
3554 (handle_threads_qxfer_proper): Rename to ...
3555 (handle_qxfer_threads_proper): ... this.
3556 (handle_threads_qxfer): Rename to ...
3557 (handle_qxfer_threads): ... this. Adjust.
3558 (qxfer_packets): New array.
3559 (handle_qxfer): New function.
3560 (handle_query): Use handle_qxfer.
3561
493e2a69
MS
35622011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
3563
3564 * gdbreplay.c: Shorten lines of >= 80 columns.
3565 * linux-low.c: Ditto.
3566 * linux-ppc-low.c: Ditto.
3567 * linux-s390-low.c: Ditto.
3568 * linux-sparc-low.c: Ditto.
3569 * linux-x86-low.c: Ditto.
3570 * linux-xtensa-low.c: Ditto.
3571 * mem-break.c: Ditto.
3572 * nto-low.c: Ditto.
3573 * regcache.h: Ditto.
3574 * remote-utils.c: Ditto.
3575 * server.c: Ditto.
3576 * server.h: Ditto.
3577 * thread-db.c: Ditto.
3578 * tracepoint.c: Ditto.
3579 * utils.c: Ditto.
3580 * win32-low.h: Ditto.
3581
44944448
JB
35822011-01-05 Joel Brobecker <brobecker@adacore.com>
3583
3584 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
3585 update.
3586
71ce852c
JB
35872011-01-01 Joel Brobecker <brobecker@adacore.com>
3588
3589 * server.c (gdbserver_version): Update copyright year in version
3590 output.
3591 * gdbreplay.c (gdbreplay_version): Ditto.
3592
eb826dc6
MF
35932010-12-29 Jie Zhang <jie.zhang@analog.com>
3594
3595 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
3596 * linux-bfin-low.c: New file.
3597 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
3598 PT_DATA_ADDR for BFIN targets.
3599 * Makefile.in (SFILES): Add linux-bfin-low.c.
3600 (clean): Remove reg-bfin.c.
3601 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
3602 * README: Mention supported Blackfin targets.
3603
39ab222a
MF
36042010-12-23 Mike Frysinger <vapier@gentoo.org>
3605
3606 * .gitignore: New file.
3607
a1f2ce7d
MF
36082010-11-16 Mike Frysinger <vapier@gentoo.org>
3609
3610 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
3611
f474844c
JZ
36122010-10-22 Jie Zhang <jie@codesourcery.com>
3613
3614 * Makefile.in: Add FLAGS_TO_PASS variable.
3615 (install): Remove dependency of install-only and recursively
3616 invoke make for install-only.
3617
f1048712
DE
36182010-10-04 Doug Evans <dje@google.com>
3619
3620 * Makefile.in (uninstall): Use $(DESTDIR).
3621
b53a1623
PA
36222010-09-24 Pedro Alves <pedro@codesourcery.com>
3623
e6ee044d
PA
3624 PR gdb/11842
3625
b53a1623
PA
3626 * linux-x86-low.c (compat_siginfo_from_siginfo)
3627 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
3628 si_code is < 0. Check for si_code == SI_TIMER before checking for
3629 si_code < 0.
3630
fa1bd1e4
JB
36312010-09-13 Joel Brobecker <brobecker@adacore.com>
3632
3633 * lynx-i386-low.c: New file.
3634 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
3635
47fac8f8
JB
36362010-09-13 Joel Brobecker <brobecker@adacore.com>
3637
3638 * lynx-low.c (ptrace_request_to_str): Remove handling for
3639 request values that have been removed in LynxOS 5.x.
3640
1adfc54d
JB
36412010-09-13 Joel Brobecker <brobecker@adacore.com>
3642
3643 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
3644 <ptrace.h>
3645
c2a66c29
NS
36462010-09-09 Nathan Sidwell <nathan@codesourcery.com>
3647
3648 * configure.ac: Add --enable-inprocess-agent option.
3649 * configure: Rebuilt.
3650
32fcada3
YQ
36512010-09-06 Yao Qi <yao@codesourcery.com>
3652
3653 * linux-low.c (linux_kill): Remove unused variable.
3654 (linux_stabilize_threads): Likewise.
3655 * server.c (start_inferior): Likewise.
3656 (queue_stop_reply_callback): Likewise.
3657 * tracepoint.c (do_action_at_tracepoint): Likewise.
3658
0cccb683
YQ
36592010-09-06 Yao Qi <yao@codesourcery.com>
3660
3661 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
3662 on return.
3663
423ec54c
JK
36642010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
3665
3666 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
3667
12ac6819
PA
36682010-09-06 Pedro Alves <pedro@codesourcery.com>
3669
3670 * Makefile.in (install-only): Replace $IPA_DEPFILES with
3671 "$(IPA_DEPFILES)".
3672
8ed54b31
JB
36732010-09-01 Joel Brobecker <brobecker@adacore.com>
3674
3675 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
3676 gdbserver/lynx-ppc-low.c: New files.
3677 * Makefile.in (lynx_low_h): New variable.
3678 (lynx-low.o, lynx-ppc-low.o): New rules.
3679 * configure.ac: On LynxOS, link with -lnetinet.
3680 * configure.srv: Add handling of powerpc-*-lynxos* targets.
3681 * configure: regenerate.
3682
bb0116a4
JB
36832010-09-01 Joel Brobecker <brobecker@adacore.com>
3684
3685 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
3686 * configure.ac: Add check for vasprintf and vsnprintf.
3687 * configure, config.in: Regenerate.
3688 * server.h (vasprintf, vsnprintf): Add conditional declarations.
3689
a778ab81 36902010-09-01 Joel Brobecker <brobecker@adacore.com>
3691
3692 * gdbreplay.c: Move include of alloca.h up, next to include of
3693 malloc.h.
3694 * server.h: Add include of malloc.h.
3695 * mem-break.c: Remove include of malloc.h.
3696 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
3697
8b034a19 36982010-09-01 Joel Brobecker <brobecker@adacore.com>
3699
3700 * Makefile.in (memmem.o): Build with -Wno-error.
3701
37022010-09-01 Joel Brobecker <brobecker@adacore.com>
3703
3704 * utils.c (xsnprintf): Make non-static.
3705 * server.h: Add xsnprintf declaration.
3706 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
3707 replace calls to snprintf by calls to xsnprintf throughout.
3708
37092010-09-01 Joel Brobecker <brobecker@adacore.com>
3710
3711 * configure.ac: Add configure check for alloca.
3712 * configure, config.in: Regenerate.
3713 * server.h: Include alloca.h if it exists.
3714 * gdbreplay.c: Include alloca.h if it exists.
3715
1a981360
PA
37162010-08-28 Pedro Alves <pedro@codesourcery.com>
3717
3718 * linux-low.c (__SIGRTMIN): Define if not already defined.
3719 (linux_create_inferior): Check for __ANDROID__ rather than
3720 __SIGRTMIN.
3721 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
3722 are already deferred.
3723 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
3724 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
3725 stopped and already has a pending signal to report.
3726 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
3727 a pending signal to report or is moving out of a jump pad.
3728 (linux_init_signals): Check for __ANDROID__ rather than
3729 __SIGRTMIN.
3730
b4d51a55
PA
37312010-08-28 Pedro Alves <pedro@codesourcery.com>
3732
3733 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
3734 debug_threads check. Avoid a linear search when not doing debug
3735 output.
3736
ec48365d
PA
37372010-08-27 Pedro Alves <pedro@codesourcery.com>
3738
3739 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
3740 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
3741 (struct file_handler) <fd>: Change type to gdb_fildes_t.
3742 (process_event): Change local fd's type to gdb_fildes_t.
3743 (create_file_handler): Adjust prototype.
3744 (delete_file_handler): Adjust prototype.
3745 (handle_file_event): Adjust prototype. Use pfildes.
3746 (create_file_event): Adjsut prototype.
3747 * remote-utils.c (remote_desc, listen_desc): Change type to
3748 gdb_fildes_t.
3749 * server.h: New gdb_fildes_t typedef.
3750 [USE_WIN32API]: Include winsock2.h.
3751 (delete_file_handler, add_file_handler): Adjust prototypes.
3752 (pfildes): Declare.
3753 * utils.c (pfildes): New.
3754
854d88f0
PA
37552010-08-27 Pedro Alves <pedro@codesourcery.com>
3756
3757 * configure.ac (build_warnings): Add -Wno-char-subscripts.
3758 * configure: Regenerate.
3759
0146f85b
PA
37602010-08-27 Pedro Alves <pedro@codesourcery.com>
3761
3762 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
3763 (linux_done_accessing_memory): ... this.
3764 (linux_target_ops): Adjust.
3765 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
3766 * nto-low.c (nto_target_ops): Adjust comment.
3767 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
3768 * spu-low.c (spu_target_ops): Adjust comment.
3769 * target.h (target_ops): Rename unprepare_to_access_memory field
3770 to done_accessing_memory.
3771 (unprepare_to_access_memory): Rename to ...
3772 (done_accessing_memory): ... this.
3773
90d74c30
PA
37742010-08-26 Pedro Alves <pedro@codesourcery.com>
3775
3776 * linux-low.c (linux_prepare_to_access_memory): New.
3777 (linux_unprepare_to_access_memory): New.
3778 (linux_target_ops): Install them.
3779 * server.c (read_memory): Rename to ...
3780 (gdb_read_memory): ... this. Use
3781 prepare_to_access_memory/prepare_to_access_memory.
3782 (write_memory): Rename to ...
3783 (gdb_write_memory): ... this. Use
3784 prepare_to_access_memory/prepare_to_access_memory.
3785 (handle_search_memory_1): Adjust.
3786 (process_serial_event): Adjust.
3787 * target.h (struct target_ops): New fields
3788 prepare_to_access_memory and unprepare_to_access_memory.
3789 (prepare_to_access_memory, unprepare_to_access_memory): New.
3790 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
3791 prepare_to_access_memory/prepare_to_access_memory.
3792 * nto-low.c (nto_target_ops): Adjust.
3793 * spu-low.c (spu_target_ops): Adjust.
3794 * win32-low.c (win32_target_ops): Adjust.
3795
fd467969
PA
37962010-08-26 Pedro Alves <pedro@codesourcery.com>
3797
3798 * Makefile.in (WARN_CFLAGS): Get it from configure.
3799 (WERROR_CFLAGS): New.
3800 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
3801 * configure.ac: Introduce --enable-werror, which adds -Werror to
3802 the compiler command line. Enabled by default. Disable with
3803 --disable-werror. Add -Wdeclaration-after-statement
3804 Wpointer-arith and -Wformat-nonliteral to warning flags.
3805 * configure: Regenerate.
3806
331e2f5f
PA
38072010-08-26 Pedro Alves <pedro@codesourcery.com>
3808
3809 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
3810
e581f2b4
PA
38112010-08-26 Pedro Alves <pedro@codesourcery.com>
3812
3813 * gdbreplay.c (remote_error): New.
3814 (gdbchar): New.
3815 (expect): Use gdbchar. Check for error reading from GDB.
3816 Clarify sync error output.
3817 (play): Check for errors writing to GDB.
3818 * linux-low.c (sigchld_handler): Really ignore `write' errors.
3819 * remote-utils.c (getpkt): Check for errors writing to the remote
3820 descriptor.
3821
3c11dd79
PA
38222010-08-25 Pedro Alves <pedro@codesourcery.com>
3823
3824 * linux-low.c (linux_wait_1): Move non-debugging code out of
3825 `debug_threads' control.
3826
d20a8ad9
PA
38272010-08-25 Pedro Alves <pedro@codesourcery.com>
3828
3829 * linux-low.c (linux_wait_1): Don't set last_status here.
3830 * server.c (push_event, queue_stop_reply_callback): Assert we're
3831 not pushing a TARGET_WAITKIND_IGNORE event.
3832 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
3833 (myresume, handle_target_event): Set the thread's last_resume_kind
3834 and last_status from the target returned status.
3835
964e4306
PA
38362010-08-25 Pedro Alves <pedro@codesourcery.com>
3837
3838 PR threads/10729
3839
3840 * linux-x86-low.c (update_debug_registers_callback): New.
3841 (i386_dr_low_set_addr): Use it.
3842 (i386_dr_low_get_addr): New.
3843 (i386_dr_low_set_control): Use update_debug_registers_callback.
3844 (i386_dr_low_get_control): New.
3845 (i386_dr_low_get_status): Adjust.
3846 * linux-low.c (linux_stop_lwp): New.
3847 * linux-low.h (linux_stop_lwp): Declare.
3848
3849 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
3850 argument instead of a i386_debug_reg_state.
3851 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
3852 a i386_debug_reg_state.
3853 (i386_insert_aligned_watchpoint): Adjust.
3854 (i386_remove_aligned_watchpoint): Adjust.
3855 (i386_low_stopped_data_address): Read the debug registers from the
3856 inferior instead of from the mirrors.
3857 * i386-low.h (struct i386_debug_reg_state): Extend comment.
3858 (i386_dr_low_get_addr): Declare.
3859 (i386_dr_low_get_control): Declare.
3860 (i386_dr_low_get_status): Change prototype.
3861
3862 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
3863 (i386_dr_low_get_addr): New.
3864 (i386_dr_low_get_control): New.
3865 (i386_dr_low_get_status): Adjust prototype. Return
3866 dr_status_mirror.
3867 (i386_initial_stuff): Clear dr_status_mirror and
3868 dr_control_mirror.
3869 (i386_get_thread_context): Adjust.
3870 (i386_set_thread_context): Adjust.
3871 (i386_thread_added): Adjust.
3872
5f21a75b
PA
38732010-08-24 Pedro Alves <pedro@codesourcery.com>
3874
3875 * linux-low.h (linux_thread_area): Delete declaration.
3876
3e4c1235
TS
38772010-08-11 Thomas Schwinge <thomas@codesourcery.com>
3878
3879 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
3880 after its termination.
3881
1971b033
PA
38822010-08-09 Pedro Alves <pedro@codesourcery.com>
3883
3884 * linux-low.c (gdb_wants_lwp_stopped): Delete.
3885 (gdb_wants_all_stopped): Delete.
3886 (linux_wait_1): Don't call them.
3887 * server.c (handle_v_cont): Tag all threads as want-stopped.
3888 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
3889 stopped as "client-wants-stopped".
3890
310444ac
PA
38912010-07-31 Pedro Alves <pedro@codesourcery.com>
3892
3893 * Makefile.in (signals_h): New.
3894 (server_h): Depend on it.
3895 (server.o): Don't depend on $(signals_def).
3896 (signals.o): Depend on $(signals_def).
3897
a19cae16
JK
38982010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
3899
3900 * Makefile.in (signals_def): New.
3901 (server_h): Append include/gdb/signals.h and signals_def.
3902 (server.o): Append signals_def.
3903
30d50328
JK
39042010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
3905
3906 * server.c (handle_target_event): Use target_signal_to_host for
3907 resume_info.sig initialization.
3908 * target.h (struct thread_resume) <sig>: New comment.
3909
5c3216e2
OS
39102010-07-20 Ozkan Sezer <sezeroz@gmail.com>
3911
c6f46ca0
OS
3912 * server.c (handle_query): strcpy() the returned string from paddress()
3913 instead of sprintf().
5c3216e2
OS
3914 * utils.c (paddress): Return phex_nz().
3915
6bd31874
JB
39162010-07-07 Joel Brobecker <brobecker@adacore.com>
3917
3918 * server.c (handle_v_cont): Call mourn_inferior if process
3919 just exited.
3920 (myresume): Likewise.
3921
0fb4aa4b
PA
39222010-07-01 Pedro Alves <pedro@codesourcery.com>
3923
3924 Static tracepoints, and integration with UST.
3925
3926 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
3927 * mem-break.c (uninsert_all_breakpoints)
3928 (reinsert_all_breakpoints): New.
3929 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
3930 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
3931 (gdb_agent_ust_loaded, helper_thread_id)
3932 (gdb_agent_helper_thread_id): New macros.
3933 (struct ipa_sym_addresses): Add addr_ust_loaded,
3934 addr_helper_thread_id, addr_cmd_buf.
3935 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
3936 (in_process_agent_loaded_ust): New.
3937 (write_e_ust_not_loaded): New.
3938 (maybe_write_ipa_ust_not_loaded): New.
3939 (struct collect_static_trace_data_action): New.
3940 (enum tracepoint_type) <static_tracepoint>: New.
3941 (struct tracepoint) <handle>: Mention static tracepoints.
3942 (struct static_tracepoint_ctx): New.
3943 (CMD_BUF_SIZE): New.
3944 (add_tracepoint_action): Handle static tracepoint actions.
3945 (unprobe_marker_at): New.
3946 (clear_installed_tracepoints): Handle static tracepoints.
3947 (cmd_qtdp): Handle static tracepoints.
3948 (probe_marker_at): New.
3949 (cmd_qtstart): Handle static tracepoints.
3950 (response_tracepoint): Handle static tracepoints.
3951 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
3952 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
3953 (get_context_regcache): Handle static tracepoints.
3954 (do_action_at_tracepoint): Handle static tracepoint actions.
3955 (traceframe_find_block_type): Handle static trace data blocks.
3956 (traceframe_read_sdata): New.
3957 (download_tracepoints): Download static tracepoint actions.
3958 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
3959 (GDB_PROBE_NAME): New.
3960 (ust_ops): New.
3961 (GET_UST_SYM): New.
3962 (USTF): New.
3963 (dlsym_ust): New.
3964 (ust_marker_to_static_tracepoint): New.
3965 (gdb_probe): New.
3966 (collect_ust_data_at_tracepoint): New.
3967 (gdb_ust_probe): New.
3968 (UNIX_PATH_MAX, SOCK_DIR): New.
3969 (gdb_ust_connect_sync_socket): New.
3970 (resume_thread, stop_thread): New.
3971 (run_inferior_command): New.
3972 (init_named_socket): New.
3973 (gdb_ust_socket_init): New.
3974 (cstr_to_hexstr): New.
3975 (next_st): New.
3976 (first_marker, next_marker): New.
3977 (response_ust_marker): New.
3978 (cmd_qtfstm, cmd_qtsstm): New.
3979 (unprobe_marker_at, probe_marker_at): New.
3980 (cmd_qtstmat, gdb_ust_thread): New.
3981 (gdb_ust_init): New.
3982 (initialize_tracepoint_ftlib): Call gdb_ust_init.
3983 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
3984 (ST_REGENTRY): New.
3985 (x86_64_st_collect_regmap): New.
3986 (X86_64_NUM_ST_COLLECT_GREGS): New.
3987 (AMD64_RIP_REGNUM): New.
3988 (supply_static_tracepoint_registers): New.
3989 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
3990 (ST_REGENTRY): New.
3991 (i386_st_collect_regmap): New.
3992 (i386_NUM_ST_COLLECT_GREGS): New.
3993 (supply_static_tracepoint_registers): New.
3994 * server.c (handle_query): Handle qXfer:statictrace:read.
3995 <qSupported>: Report support for StaticTracepoints, and
3996 qXfer:statictrace:read features.
3997 * server.h (traceframe_read_sdata)
3998 (supply_static_tracepoint_registers): Declare.
3999 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
4000 (unpack_varlen_hex): Include in IPA build.
4001 * Makefile.in (ustlibs, ustinc): New.
4002 (IPA_OBJS): Add remote-utils-ipa.o.
4003 ($(IPA_LIB)): Link -ldl and -lpthread.
4004 (UST_CFLAGS): New.
4005 (IPAGENT_CFLAGS): Add UST_CFLAGS.
4006 * config.in, configure: Regenerate.
4007
9e4344e5
PA
40082010-06-20 Ian Lance Taylor <iant@google.com>
4009 Pedro Alves <pedro@codesourcery.com>
4010
4011 * linux-x86-low.c (always_true): Delete.
4012 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
4013 trying to fool the compiler with always_true.
4014
c6beb2cb
PA
40152010-06-20 Pedro Alves <pedro@codesourcery.com>
4016
4017 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
4018 conditions in gdbserver.
4019
d2ed6730
UW
40202010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
4021
4022 * spu-low.c (spu_read_memory): Wrap around local store limit.
4023 (spu_write_memory): Likewise.
4024
4e29fb54
PA
40252010-06-15 Pedro Alves <pedro@codesourcery.com>
4026
4027 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
4028 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
4029 LONGEST uses.
4030 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
4031 uses.
4032 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
4033 uses with LONGEST uses.
4034
6a271cae
PA
40352010-06-14 Stan Shebs <stan@codesourcery.com>
4036 Pedro Alves <pedro@codesourcery.com>
4037
4038 Bytecode compiler.
4039
4040 * linux-x86-low.c: Include limits.h.
4041 (add_insns): New.
4042 (always_true): New.
4043 (EMIT_ASM): New.
4044 (EMIT_ASM32): New.
4045 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
4046 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
4047 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
4048 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
4049 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
4050 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
4051 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
4052 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
4053 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
4054 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
4055 (amd64_emit_void_call_2): New.
4056 (amd64_emit_ops): New.
4057 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
4058 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
4059 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
4060 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
4061 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
4062 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
4063 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
4064 (i386_emit_call, i386_emit_reg, i386_emit_pop)
4065 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
4066 (i386_emit_stack_adjust, i386_emit_int_call_1)
4067 (i386_emit_void_call_2): New.
4068 (i386_emit_ops): New.
4069 (x86_emit_ops): New.
4070 (the_low_target): Install x86_emit_ops.
4071 * server.h (struct emit_ops): New.
4072 (get_raw_reg_func_addr): Declare.
4073 (current_insn_ptr, emit_error): Declare.
4074 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
4075 (set_trace_state_variable_value): New defines.
4076 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
4077 addr_get_trace_state_variable_value and
4078 addr_set_trace_state_variable_value.
4079 (symbol_list): New fields for get_raw_reg,
4080 get_trace_state_variable_value and set_trace_state_variable_value.
4081 (condfn): New typedef.
4082 (struct tracepoint): New field `compiled_cond'.
4083 (do_action_at_tracepoint): Clear compiled_cond.
4084 (get_trace_state_variable_value, set_trace_state_variable_value):
4085 Export in the IPA.
4086 (condition_true_at_tracepoint): If there's a compiled condition,
4087 run that.
4088 (current_insn_ptr, emit_error): New globals.
4089 (struct bytecode_address): New.
4090 (get_raw_reg_func_addr): New.
4091 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
4092 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
4093 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
4094 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
4095 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
4096 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
4097 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
4098 (compile_tracepoint_condition, compile_bytecodes): New.
4099 * target.h (emit_ops): Forward declare.
4100 (struct target_ops): New field emit_ops.
4101 (target_emit_ops): New.
4102 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
4103 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
4104 * linux-low.c (linux_emit_ops): New.
4105 (linux_target_ops): Install it.
4106 * linux-low.h (struct linux_target_ops): New field emit_ops.
4107
92b72907
UW
41082010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
4109
4110 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
4111 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
4112
fa593d66
PA
41132010-06-01 Pedro Alves <pedro@codesourcery.com>
4114 Stan Shebs <stan@codesourcery.com>
4115
4116 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
4117 (all): Depend on $(extra_libraries).
4118 (install-only): Install the IPA.
4119 (IPA_OBJS, IPA_LIB): New.
4120 (clean): Remove the IPA lib.
4121 (IPAGENT_CFLAGS): New.
4122 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
4123 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
4124 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
4125 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
4126 * configure.ac: Check for atomic builtins support in the compiler.
4127 (IPA_DEPFILES, extra_libraries): Define.
4128 * configure.srv (ipa_obj): Add description.
4129 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
4130 (i[34567]86-*-linux*): Set ipa_obj.
4131 (x86_64-*-linux*): Set ipa_obj.
4132 * linux-low.c (stabilizing_threads): New.
4133 (supports_fast_tracepoints): New.
4134 (linux_detach): Stabilize threads before detaching.
4135 (handle_tracepoints): Handle internal tracing breakpoints. Assert
4136 the lwp is either not stabilizing, or is moving out of a jump pad.
4137 (linux_fast_tracepoint_collecting): New.
4138 (maybe_move_out_of_jump_pad): New.
4139 (enqueue_one_deferred_signal): New.
4140 (dequeue_one_deferred_signal): New.
4141 (linux_wait_for_event_1): If moving out of a jump pad, defer
4142 pending signals to later.
4143 (linux_stabilize_threads): New.
4144 (linux_wait_1): Check if threads need moving out of jump pads, and
4145 do it if so.
4146 (stuck_in_jump_pad_callback): New.
4147 (move_out_of_jump_pad_callback): New.
4148 (lwp_running): New.
4149 (linux_resume_one_lwp): Handle moving out of jump pads.
4150 (linux_set_resume_request): Dequeue deferred signals.
4151 (need_step_over_p): Also step over fast tracepoint jumps.
4152 (start_step_over): Also uninsert fast tracepoint jumps.
4153 (finish_step_over): Also reinsert fast tracepoint jumps.
4154 (linux_install_fast_tracepoint_jump): New.
4155 (linux_target_ops): Install linux_stabilize_threads and
4156 linux_install_fast_tracepoint_jump_pad.
4157 * linux-low.h (linux_target_ops) <get_thread_area,
4158 install_fast_tracepoint_jump_pad>: New fields.
4159 (struct lwp_info) <collecting_fast_tracepoint,
4160 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
4161 (linux_get_thread_area): Declare.
4162 * linux-x86-low.c (jump_insn): New.
4163 (x86_get_thread_area): New.
4164 (append_insns): New.
4165 (push_opcode): New.
4166 (amd64_install_fast_tracepoint_jump_pad): New.
4167 (i386_install_fast_tracepoint_jump_pad): New.
4168 (x86_install_fast_tracepoint_jump_pad): New.
4169 (the_low_target): Install x86_get_thread_area and
4170 x86_install_fast_tracepoint_jump_pad.
4171 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
4172 (struct fast_tracepoint_jump): New.
4173 (fast_tracepoint_jump_insn): New.
4174 (fast_tracepoint_jump_shadow): New.
4175 (find_fast_tracepoint_jump_at): New.
4176 (fast_tracepoint_jump_here): New.
4177 (delete_fast_tracepoint_jump): New.
4178 (set_fast_tracepoint_jump): New.
4179 (uninsert_fast_tracepoint_jumps_at): New.
4180 (reinsert_fast_tracepoint_jumps_at): New.
4181 (set_breakpoint_at): Use write_inferior_memory.
4182 (uninsert_raw_breakpoint): Use write_inferior_memory.
4183 (check_mem_read): Mask out fast tracepoint jumps.
4184 (check_mem_write): Mask out fast tracepoint jumps.
4185 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
4186 (set_fast_tracepoint_jump): Declare.
4187 (delete_fast_tracepoint_jump)
4188 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
4189 (reinsert_fast_tracepoint_jumps_at): Declare.
4190 * regcache.c: Don't compile many functions when building the
4191 in-process agent library.
4192 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
4193 the register buffer in the heap.
4194 (free_register_cache): If the register buffer isn't owned by the
4195 regcache, don't free it.
4196 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
4197 pre-existing register caches.
4198 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
4199 type.
4200 (convert_ascii_to_int): : Constify `from' parameter type.
4201 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
4202 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
4203 the needed buffer in-place.
4204 (relocate_instruction): New.
4205 * server.c (handle_query) <qSymbols>: If the target supports
4206 tracepoints, give it a chance of looking up symbols. Report
4207 support for fast tracepoints.
4208 (handle_status): Stabilize threads.
4209 (process_serial_event): Adjust.
4210 * server.h (struct fast_tracepoint_jump): Forward declare.
4211 (struct process_info) <fast_tracepoint_jumps>: New field.
4212 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
4213 (decode_X_packet, decode_M_packet): Adjust.
4214 (relocate_instruction): Declare.
4215 (in_process_agent_loaded): Declare.
4216 (tracepoint_look_up_symbols): Declare.
4217 (struct fast_tpoint_collect_status): Declare.
4218 (fast_tracepoint_collecting): Declare.
4219 (force_unlock_trace_buffer): Declare.
4220 (handle_tracepoint_bkpts): Declare.
4221 (initialize_low_tracepoint)
4222 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
4223 * target.h (struct target_ops) <stabilize_threads,
4224 install_fast_tracepoint_jump_pad>: New fields.
4225 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
4226 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
4227 [HAVE_STDINT_H]: Include stdint.h.
4228 (trace_debug_1): Rename to ...
4229 (trace_vdebug): ... this.
4230 (trace_debug): Rename to ...
4231 (trace_debug_1): ... this. Add `level' parameter.
4232 (trace_debug): New.
4233 (ATTR_USED, ATTR_NOINLINE): New.
4234 (IP_AGENT_EXPORT): New.
4235 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4236 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
4237 (about_to_request_buffer_space, trace_buffer_is_full)
4238 (stopping_tracepoint, expr_eval_result, error_tracepoint)
4239 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
4240 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
4241 (traceframe_write_count, traceframes_created)
4242 (trace_state_variables)
4243 New renaming defines.
4244 (struct ipa_sym_addresses): New.
4245 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
4246 (symbol_list): New.
4247 (ipa_sym_addrs): New.
4248 (all_tracepoint_symbols_looked_up): New.
4249 (in_process_agent_loaded): New.
4250 (write_e_ipa_not_loaded): New.
4251 (maybe_write_ipa_not_loaded): New.
4252 (tracepoint_look_up_symbols): New.
4253 (debug_threads) [IN_PROCESS_AGENT]: New.
4254 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
4255 (UNKNOWN_SIDE_EFFECTS): New.
4256 (stop_tracing): New.
4257 (flush_trace_buffer): New.
4258 (stop_tracing_bkpt): New.
4259 (flush_trace_buffer_bkpt): New.
4260 (read_inferior_integer): New.
4261 (read_inferior_uinteger): New.
4262 (read_inferior_data_pointer): New.
4263 (write_inferior_data_pointer): New.
4264 (write_inferior_integer): New.
4265 (write_inferior_uinteger): New.
4266 (struct collect_static_trace_data_action): Delete.
4267 (enum tracepoint_type): New.
4268 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
4269 <actions_str, step_actions, step_actions_str>: Only include in
4270 GDBserver.
fa593d66
PA
4271 <orig_size, obj_addr_on_target, adjusted_insn_addr>
4272 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
4273 (tracepoints): Use IP_AGENT_EXPORT.
4274 (last_tracepoint): Don't include in the IPA.
4275 (stopping_tracepoint): Use IP_AGENT_EXPORT.
4276 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
4277 (alloced_trace_state_variables): New.
4278 (trace_state_variables): Use IP_AGENT_EXPORT.
4279 (traceframe_t): Delete unused variable.
4280 (circular_trace_buffer): Don't include in the IPA.
4281 (trace_buffer_start): Delete.
4282 (struct trace_buffer_control): New.
4283 (trace_buffer_free): Delete.
4284 (struct ipa_trace_buffer_control): New.
4285 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
4286 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
4287 New.
4288 (trace_buffer_ctrl): New.
4289 (TRACE_BUFFER_CTRL_CURR): New.
4290 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
4291 Reimplement as macros.
4292 (trace_buffer_wrap): Delete.
4293 (traceframe_write_count, traceframe_read_count)
4294 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
4295 (struct tracepoint_hit_ctx) <type>: New field.
4296 (struct fast_tracepoint_ctx): New.
4297 (memory_barrier): New.
4298 (cmpxchg): New.
4299 (record_tracepoint_error): Update atomically in the IPA.
4300 (clear_inferior_trace_buffer): New.
4301 (about_to_request_buffer_space): New.
4302 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
4303 updating the same buffer.
4304 (add_tracepoint): Default the tracepoint's type to trap
4305 tracepoint, and orig_size to -1.
4306 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
4307 internal variables.
4308 (create_trace_state_variable): New parameter `gdb'. Handle it.
4309 (clear_installed_tracepoints): Clear fast tracepoint jumps.
4310 (cmd_qtdp): Handle fast tracepoints.
4311 (cmd_qtdv): Adjust.
4312 (max_jump_pad_size): New.
4313 (gdb_jump_pad_head): New.
4314 (get_jump_space_head): New.
4315 (claim_jump_space): New.
4316 (sort_tracepoints): New.
4317 (MAX_JUMP_SIZE): New.
4318 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
4319 IPA.
4320 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
4321 support. Upload fast traceframes, and delete internal IPA
4322 breakpoints.
4323 (stop_tracing_handler): New.
4324 (flush_trace_buffer_handler): New.
4325 (cmd_qtstop): Upload fast tracepoints.
4326 (response_tracepoint): Handle fast tracepoints.
4327 (tracepoint_finished_step): Upload fast traceframes. Set the
4328 tracepoint hit context's tracepoint type.
4329 (handle_tracepoint_bkpts): New.
4330 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
4331 type. Add comment about fast tracepoints.
4332 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
4333 non-existing action_str field.
4334 (get_context_regcache): Handle fast tracepoints.
4335 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
4336 to the regcache.
4337 (fast_tracepoint_from_jump_pad_address): New.
4338 (fast_tracepoint_from_ipa_tpoint_address): New.
4339 (collecting_t): New.
4340 (force_unlock_trace_buffer): New.
4341 (fast_tracepoint_collecting): New.
4342 (collecting): New.
4343 (gdb_collect): New.
4344 (write_inferior_data_ptr): New.
4345 (target_tp_heap): New.
4346 (target_malloc): New.
4347 (download_agent_expr): New.
4348 (UALIGN): New.
4349 (download_tracepoints): New.
4350 (download_trace_state_variables): New.
4351 (upload_fast_traceframes): New.
4352 (IPA_FIRST_TRACEFRAME): New.
4353 (IPA_NEXT_TRACEFRAME_1): New.
4354 (IPA_NEXT_TRACEFRAME): New.
4355 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
4356 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
4357 (gdb_jump_pad_buffer_end): New.
4358 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
4359 (initialize_tracepoint): Adjust.
4360 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
4361 buffer. Initialize the low module.
4362 * utils.c (PREFIX, TOOLNAME): New.
4363 (malloc_failure): Use PREFIX.
4364 (error): In the IPA, an error causes an exit.
4365 (fatal, warning): Use PREFIX.
4366 (internal_error): Use TOOLNAME.
4367 (NUMCELLS): Increase to 10.
4368 * configure, config.in: Regenerate.
4369
d149dd1d
PA
43702010-06-01 Pedro Alves <pedro@codesourcery.com>
4371
4372 * server.c (handle_query) <qSupported>: Do two passes over the
4373 qSupported string to avoid nesting strtok.
4374
f6528abd
JK
43752010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4376
4377 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
4378 (CDEPS): New.
4379 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
4380 -Wl,--dynamic-list.
4381 * configure: Regenerate.
4382 * proc-service.list: New.
4383
ca2a87a0
JK
43842010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4385
4386 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
4387 New comment.
4388
363a6e9f
OS
43892010-05-26 Ozkan Sezer <sezeroz@gmail.com>
4390
4391 * gdbreplay.c (remote_open): Check error return from socket() call by
4392 its equality to -1 not by it being negative.
4393 * remote-utils.c (remote_open): Likewise.
4394
d23b6cb1
PA
43952010-05-23 Pedro Alves <pedro@codesourcery.com>
4396
4397 * config.h: Regenerate.
4398
28d3cf85
MK
43992010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
4400
4401 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
4402 doesn't provide PTRACE_GET_THREAD_AREA.
4403
fea36a59
MK
44042010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
4405
4406 * linux-m68k-low.c: Include <asm/ptrace.h>
4407 (ps_get_thread_area): Implement.
4408
24b066ba
DE
44092010-05-03 Doug Evans <dje@google.com>
4410
4411 * event-loop.c (struct callback_event): New struct.
4412 (callback_list): New global.
4413 (append_callback_event, delete_callback_event): New functions.
4414 (process_callback): New function.
4415 (start_event_loop): Call it.
4416 * remote-utils.c (NOT_SCHEDULED): Define.
4417 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
4418 moved out of readchar.
4419 (readchar): Rewrite. Call reschedule before returning.
4420 (reset_readchar): New function.
4421 (remote_close): Call it.
4422 (process_remaining, reschedule): New functions.
4423 * server.h (callback_handler_func): New typedef.
4424 (append_callback_event, delete_callback_event): Declare.
4425
9836d6ea
PA
44262010-05-03 Pedro Alves <pedro@codesourcery.com>
4427
4428 * proc-service.c (ps_pglobal_lookup): Use
4429 thread_db_look_up_one_symbol.
4430 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
4431 parameter. Use it instead of all_symbols_looked_up.
4432 * server.h (struct process_info) <all_symbols_looked_up>: Delete
4433 field.
4434 (all_symbols_looked_up): Don't declare.
4435 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
4436 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
4437 field.
4438 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
4439 Set all_symbols_looked_up here.
4440 (thread_db_look_up_one_symbol): New.
4441 (thread_db_get_tls_address): Adjust.
4442 (thread_db_load_search, try_thread_db_load_1): Always allocate the
4443 thread_db object on the heap, and tentatively set it in the
4444 process structure.
4445 (thread_db_init): Don't set all_symbols_looked_up here.
4446 * linux-low.h (thread_db_look_up_one_symbol): Declare.
4447
7984d532
PA
44482010-05-03 Pedro Alves <pedro@codesourcery.com>
4449
4450 * linux-low.c (linux_kill, linux_detach): Adjust.
4451 (status_pending_p_callback): Remove redundant statement. Check
4452 for !TARGET_WAITIKIND_IGNORE, instead of
4453 TARGET_WAITKIND_STOPPED.
4454 (handle_tracepoints): Make sure LWP is locked. Adjust.
4455 (linux_wait_for_event_1): Adjust.
4456 (linux_cancel_breakpoints): New.
4457 (unsuspend_one_lwp): New.
4458 (unsuspend_all_lwps): New.
4459 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
4460 (send_sigstop_callback): Change return type to int, add new
4461 `except' parameter and handle it.
4462 (suspend_and_send_sigstop_callback): New.
4463 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
4464 pass them down. If SUSPEND, also increment the lwp's suspend
4465 count.
4466 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
4467 (need_step_over_p): Don't consider suspended LWPs.
4468 (start_step_over): Adjust.
4469 (proceed_one_lwp): Change return type to int, add new `except'
4470 parameter and handle it.
4471 (unsuspend_and_proceed_one_lwp): New.
4472 (proceed_all_lwps): Use find_inferior instead of
4473 for_each_inferior.
4474 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
4475 also decrement the suspend count of LWPs. Pass `except' down,
4476 instead of hacking its suspend count.
4477 (linux_pause_all): Add `freeze' parameter. Adjust.
4478 (linux_unpause_all): New.
4479 (linux_target_ops): Install linux_unpause_all.
4480 * server.c (handle_status): Adjust.
4481 * target.h (struct target_ops): New fields `unpause_all' and
4482 `cancel_breakpoints'. Add new parameter to `pause_all'.
4483 (pause_all): Add new `freeze' parameter.
4484 (unpause_all): New.
4485 (cancel_breakpoints): New.
4486 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
4487 cancel breakpoints.
4488 (cmd_qtstart): Pause threads.
4489 (stop_tracing): Pause threads, and cancel breakpoints.
4490 * win32-low.c (win32_target_ops): Adjust.
4491
e471f25b
PA
44922010-05-03 Pedro Alves <pedro@codesourcery.com>
4493
4494 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
4495 the inferior right away from here...
4496 (linux_wait_1): ... to here, and adjust to check the thread's
4497 last_resume_kind instead of the lwp's step or stop_expected flags.
4498
1915ef4f
PA
44992010-05-02 Pedro Alves <pedro@codesourcery.com>
4500
4501 * README: Use consistent `GDB' and `GDBserver' spellings.
4502
f9e39928
PA
45032010-05-02 Pedro Alves <pedro@codesourcery.com>
4504
4505 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
4506 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
4507 (linux_detach_one_lwp): Assume the lwp is stopped.
4508 (any_thread_of): Delete.
4509 (linux_detach): Stop all lwps here. Don't blindly delete all
4510 breakpoints.
4511 (delete_lwp_callback): New.
4512 (linux_mourn): Delete all lwps of the process that is gone.
4513 (linux_wait_1): Don't delete the last lwp of the process here.
4514 * mem-break.h (mark_breakpoints_out): Declare.
4515 * mem-break.c (mark_breakpoints_out): New.
4516 (free_all_breakpoints): Use it.
4517 * server.c (handle_target_event): If the process is gone, mark
4518 breakpoints out.
4519 * thread-db.c (struct thread_db) <create_bp>: New field.
4520 (thread_db_enable_reporting): Fix prototype. Store a thread event
4521 breakpoint reference in the thread_db struct.
4522 (thread_db_load_search): Clear the thread_db object.
4523 (try_thread_db_load_1): Ditto.
4524 (switch_to_process): New.
4525 (disable_thread_event_reporting): Use it.
4526 (remove_thread_event_breakpoints): New.
4527 (thread_db_detach, thread_db_mourn): Use it.
4528
1e7fc18c
PA
45292010-05-01 Pedro Alves <pedro@codesourcery.com>
4530
4531 * linux-low.c (linux_enable_event_reporting): New.
4532 (linux_wait_for_event_1, handle_extended_wait): Use it.
4533
02fc4de7
PA
45342010-04-30 Pedro Alves <pedro@codesourcery.com>
4535
4536 * linux-low.c (linux_kill_one_lwp, linux_kill)
4537 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
4538 (send_sigstop): Take an lwp_info as parameter instead. Queue a
4539 SIGSTOP even if the LWP is stopped.
4540 (send_sigstop_callback): New.
4541 (stop_all_lwps): Use send_sigstop_callback instead.
4542 (linux_resume_one_thread): Adjust.
4543 (proceed_one_lwp): Still proceed an LWP that the client has
4544 requested to stop, if we haven't reported it as stopped yet. Make
4545 sure that LWPs the client want stopped, have a pending SIGSTOP.
4546
bc3b5632
DE
45472010-04-26 Doug Evans <dje@google.com>
4548
ae1ada35
DE
4549 * server.c (handle_general_set): Make static.
4550
bc3b5632
DE
4551 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
4552 Print received char after testing for error/eof instead of before.
4553 (input_interrupt): Tweak comment.
4554
65730243
DE
45552010-04-23 Doug Evans <dje@google.com>
4556
4557 * server.c (start_inferior): Print inferior argv if --debug.
4558
a8ae7dc0
AR
45592010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
4560
4561 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
4562 * nto-x86-low.c: Include server.h
4563
1c07cc19
PM
45642010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
4565
4566 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
4567 be consistent with other sources of this directory.
4568 (init_registers_amd64): Correct name of source file of this function
4569 in the comment.
4570
e0a61e09
PM
45712010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4572
4573 * configure.srv (x86_64-*-mingw*): New configuration for Windows
4574 64-bit executables.
4575
54709339
PM
45762010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4577
4578 * win32-i386-low.c: Add 64-bit support.
4579 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
4580 (init_registers_amd64): Declare.
4581 (mappings): Add 64-bit version of array.
4582 (init_windows_x86): New function.
4583 (the_low_target): Change init_arch field to init_windows_x86.
4584
e8f0053d
PM
45852010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4586
4587 * win32-low.c: Adapt to support also 64-bit architecture.
4588 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
4589 (get_image_name): Use SIZE_T type for local variable `done'.
4590 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
4591 (toolhelp_get_dll_name): Idem.
4592 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
4593 Use uintptr_t typecast to avoid warning.
4594 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
4595 (handle_exception): Use phex_nz to avoid warning.
4596 (win32_wait): Remove unused local variable `process'.
4597
c481e77e
PM
45982010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
4599
4600 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
4601 `amd64-avx.o'.
4602
12ea4b69
PM
46032010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
4604
4605 * configure.ac: Use `ws2_32' library for srv_mingw.
4606 * configure: Regenerate.
4607 * gdbreplay.c: Include winsock2.h instead of winsock.h.
4608 * remote-utils.c: Likewise.
4609
f6d1620c
L
46102010-04-17 H.J. Lu <hongjiu.lu@intel.com>
4611
4612 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
4613 if __x86_64__ is defined.
4614
8e642873
PM
46152010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
4616
4617 * configure: Regenerate.
4618
711e434b
PM
46192010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
4620
4621 * server.c (handle_query): Handle 'qGetTIBAddr' query.
4622 * target.h (target_ops): New get_tib_address field.
4623 * win32-low.h (win32_thread_info): Add thread_local_base field.
4624 * win32-low.c (child_add_thread): Add tlb argument.
4625 Set thread_local_base field to TLB.
4626 (get_child_debug_event): Adapt to child_add_thread change.
4627 (win32_get_tib_address): New function.
4628 (win32_target_ops): Set get_tib_address field to
4629 win32_get_tib_address.
4630 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
4631
505106cd
PA
46322010-04-12 Pedro Alves <pedro@codesourcery.com>
4633
505106cd
PA
4634 * linux-low.c (linux_mourn): Also remove the process.
4635 * server.c (handle_target_event): Don't remove the process here.
4636 * nto-low.c (nto_mourn): New.
4637 (nto_target_ops): Install it.
4638 * spu-low.c (spu_mourn): New.
4639 (spu_target_ops): Install it.
4640 * win32-low.c (win32_mourn): New.
4641 (win32_target_ops): Install it.
4642
e8470a06
PA
46432010-04-12 Pedro Alves <pedro@codesourcery.com>
4644
4645 * server.h (buffer_xml_printf): Remove redundant `;'.
4646
45ba0d02
PA
46472010-04-12 Pedro Alves <pedro@codesourcery.com>
4648
4649 * regcache.c (set_register_cache): Invalidate regcaches before
4650 changing the register cache layout.
4651 (regcache_invalidate_one): Allow a NULL regcache.
4652 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
4653 regcaches before changing the register cache layout or the target
4654 regsets.
4655
59e04013
L
46562010-04-12 H.J. Lu <hongjiu.lu@intel.com>
4657
4658 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
4659 variable warning on Linux/x86-64.
4660
8336d594
PA
46612010-04-11 Pedro Alves <pedro@codesourcery.com>
4662
4663 GDBserver disconnected tracing support.
4664
4665 * linux-low.c (linux_remove_process): Delete.
4666 (add_lwp): Don't set last_resume_kind here.
4667 (linux_kill): Use `mourn'.
4668 (linux_detach): Use `thread_db_detach', and `mourn'.
4669 (linux_mourn): New.
4670 (linux_attach_lwp_1): Adjust comment.
4671 (linux_attach): last_resume_kind moved the thread_info; adjust.
4672 (status_pending_p_callback): Adjust.
4673 (linux_wait_for_event_1): Adjust.
4674 (count_events_callback, select_singlestep_lwp_callback)
4675 (select_event_lwp_callback, cancel_breakpoints_callback)
4676 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
4677 (proceed_one_lwp): Adjust.
4678 (linux_async): Add debug output.
4679 (linux_thread_stopped): New.
4680 (linux_pause_all): New.
4681 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
4682 linux_pause_all.
4683 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
4684 (thread_db_free): Delete declaration.
4685 (thread_db_detach, thread_db_mourn): Declare.
4686 * thread-db.c (thread_db_init): Use thread_db_mourn.
4687 (thread_db_free): Delete, split in two.
4688 (disable_thread_event_reporting): New.
4689 (thread_db_detach): New.
4690 (thread_db_mourn): New.
4691
4692 * server.h (struct thread_info) <last_resume_kind>: New field.
4693 <attached>: Add comment.
4694 <gdb_detached>: New field.
4695 (handler_func): Change return type to int.
4696 (handle_serial_event, handle_target_event): Ditto.
4697 (gdb_connected): Declare.
4698 (tracing): Delete.
4699 (disconnected_tracing): Declare.
4700 (stop_tracing): Declare.
4701
4702 * server.c (handle_query) <qSupported>: Report support for
4703 disconnected tracing.
4704 (queue_stop_reply_callback): Account for running threads.
4705 (gdb_wants_thread_stopped): New.
4706 (gdb_wants_all_threads_stopped): New.
4707 (gdb_reattached_process): New.
4708 (handle_status): Clear the `gdb_detached' flag of all processes.
4709 In all-stop, stop all threads.
4710 (main): Be sure to leave tfind mode. Handle disconnected tracing.
4711 (process_serial_event): If the remote connection breaks, or if an
4712 exit was forced with "monitor exit", force an event loop exit.
4713 Handle disconnected tracing on detach.
4714 (handle_serial_event): Adjust.
4715 (handle_target_event): If GDB isn't connected, forward events back
4716 to the inferior, unless the last process exited, in which case,
4717 exit gdbserver. Adjust interface.
4718
4719 * remote-utils.c (remote_open): Don't block in accept. Instead
4720 register an event loop source on the listen socket file
4721 descriptor. Refactor bits into ...
4722 (listen_desc): ... this new global.
4723 (gdb_connected): ... this new function.
4724 (enable_async_notification): ... this new function.
4725 (handle_accept_event): ... this new function.
4726 (remote_close): Clear remote_desc.
4727
4728 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
4729
4730 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
4731 New fields.
4732 (mourn_inferior): Define.
4733 (target_process_qsupported): Avoid the dangling else problem.
4734 (thread_stopped): Define.
4735 (pause_all): Define.
4736 (target_waitstatus_to_string): Declare.
4737 * target.c (target_waitstatus_to_string): New.
4738
4739 * tracepoint.c (tracing): Make extern.
4740 (disconnected_tracing): New.
4741 (stop_tracing): Make extern. Handle tracing stops due to GDB
4742 disconnecting.
4743 (cmd_qtdisconnected): New.
4744 (cmd_qtstatus): Report disconnected tracing status in trace reply.
4745 (handle_tracepoint_general_set): Handle QTDisconnected.
4746
4747 * event-loop.c (event_handler_func): Change return type to int.
4748 (process_event): Bail out if the event handler wants the event
4749 loop to stop.
4750 (handle_file_event): Ditto.
4751 (start_event_loop): Bail out if the event handler wants the event
4752 loop to stop.
4753
4754 * nto-low.c (nto_target_ops): Adjust.
4755 * spu-low.c (spu_wait): Don't remove the process here.
4756 (spu_target_ops): Adjust.
4757 * win32-low.c (win32_wait): Don't remove the process here.
4758 (win32_target_ops): Adjust.
4759
5d267c4c
PA
47602010-04-11 Pedro Alves <pedro@codesourcery.com>
4761
4762 * regcache.c (realloc_register_cache): Invalidate inferior's
4763 regcache before recreating it.
4764
623ccd72
PA
47652010-04-09 Pedro Alves <pedro@codesourcery.com>
4766
4767 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
4768
219f2f23
PA
47692010-04-09 Stan Shebs <stan@codesourcery.com>
4770 Pedro Alves <pedro@codesourcery.com>
4771
4772 * server.h (LONGEST): New.
4773 (struct thread_info) <while_stepping>: New field.
4774 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
4775 Declare.
4776 (initialize_tracepoint, handle_tracepoint_general_set)
4777 (handle_tracepoint_query, tracepoint_finished_step)
4778 (tracepoint_was_hit, release_while_stepping_state_list):
4779 (current_traceframe): Declare.
4780 * server.c (handle_general_set): Handle tracepoint packets.
4781 (read_memory): New.
4782 (write_memory): New.
4783 (handle_search_memory_1): Use read_memory.
4784 (handle_query): Report support for conditional tracepoints, trace
4785 state variables, and tracepoint sources. Handle tracepoint
4786 queries.
4787 (main): Initialize the tracepoints module.
4788 (process_serial_event): Handle traceframe reads/writes.
4789
4790 * linux-low.c (handle_tracepoints): New.
4791 (linux_wait_1): Call it.
4792 (linux_resume_one_lwp): Handle while-stepping.
4793 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
4794 (linux_target_ops): Install them.
4795 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
4796 New field.
4797 * linux-x86-low.c (x86_supports_tracepoints): New.
4798 (the_low_target). Install it.
4799
4800 * mem-break.h (delete_breakpoint): Declare.
4801 * mem-break.c (delete_breakpoint): Make external.
4802
4803 * target.h (struct target_ops): Add `supports_tracepoints',
4804 `read_pc', and `write_pc' fields.
4805 (target_supports_tracepoints): Define.
4806 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
4807 (phex_nz): New.
4808
4809 * regcache.h (struct regcache) <registers_owned>: New field.
4810 (init_register_cache, regcache_cpy): Declare.
4811 (regcache_read_pc, regcache_write_pc): Declare.
4812 (register_cache_size): Declare.
4813 (supply_regblock): Declare.
4814 * regcache.c (init_register_cache): New.
4815 (new_register_cache): Use it.
4816 (regcache_cpy): New.
4817 (register_cache_size): New.
4818 (supply_regblock): New.
4819 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 4820
219f2f23
PA
4821 * tracepoint.c: New.
4822
4823 * Makefile.in (OBS): Add tracepoint.o.
4824 (tracepoint.o): New rule.
4825
3a13a53b
L
48262010-04-08 H.J. Lu <hongjiu.lu@intel.com>
4827
4828 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
4829 (i386-mmx.o): New.
4830 (i386-mmx.c): Likewise.
4831 (i386-mmx-linux.o): Likewise.
4832 (i386-mmx-linux.c): Likewise.
4833
4834 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
4835 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
4836 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
4837 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
4838
4839 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
4840 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
4841 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
4842
1570b33e
L
48432010-04-07 H.J. Lu <hongjiu.lu@intel.com>
4844
4845 * Makefile.in (clean): Updated.
4846 (i386-avx.o): New.
4847 (i386-avx.c): Likewise.
4848 (i386-avx-linux.o): Likewise.
4849 (i386-avx-linux.c): Likewise.
4850 (amd64-avx.o): Likewise.
4851 (amd64-avx.c): Likewise.
4852 (amd64-avx-linux.o): Likewise.
4853 (amd64-avx-linux.c): Likewise.
4854
4855 * configure.srv (srv_i386_regobj): Add i386-avx.o.
4856 (srv_i386_linux_regobj): Add i386-avx-linux.o.
4857 (srv_amd64_regobj): Add amd64-avx.o.
4858 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
4859 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
4860 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
4861 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
4862 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
4863 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
4864 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
4865
4866 * i387-fp.c: Include "i386-xstate.h".
4867 (i387_xsave): New.
4868 (i387_cache_to_xsave): Likewise.
4869 (i387_xsave_to_cache): Likewise.
4870 (x86_xcr0): Likewise.
4871
4872 * i387-fp.h (i387_cache_to_xsave): Likewise.
4873 (i387_xsave_to_cache): Likewise.
4874 (x86_xcr0): Likewise.
4875
4876 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
4877 * linux-crisv32-low.c (target_regsets): Likewise.
4878 * linux-m68k-low.c (target_regsets): Likewise.
4879 * linux-mips-low.c (target_regsets): Likewise.
4880 * linux-ppc-low.c (target_regsets): Likewise.
4881 * linux-s390-low.c (target_regsets): Likewise.
4882 * linux-sh-low.c (target_regsets): Likewise.
4883 * linux-sparc-low.c (target_regsets): Likewise.
4884 * linux-xtensa-low.c (target_regsets): Likewise.
4885
4886 * linux-low.c: Include <sys/uio.h>.
4887 (regsets_fetch_inferior_registers): Support nt_type.
4888 (regsets_store_inferior_registers): Likewise.
4889 (linux_process_qsupported): New.
4890 (linux_target_ops): Add linux_process_qsupported.
4891
4892 * linux-low.h (regset_info): Add nt_type.
4893 (linux_target_ops): Add process_qsupported.
4894
4895 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
4896 and <sys/uio.h>.
4897 (init_registers_i386_avx_linux): New.
4898 (init_registers_amd64_avx_linux): Likewise.
4899 (xmltarget_i386_linux_no_xml): Likewise.
4900 (xmltarget_amd64_linux_no_xml): Likewise.
4901 (PTRACE_GETREGSET): Likewise.
4902 (PTRACE_SETREGSET): Likewise.
4903 (x86_fill_xstateregset): Likewise.
4904 (x86_store_xstateregset): Likewise.
4905 (use_xml): Likewise.
4906 (x86_linux_update_xmltarget): Likewise.
4907 (x86_linux_process_qsupported): Likewise.
4908 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
4909 (x86_arch_setup): Don't call init_registers_amd64_linux nor
4910 init_registers_i386_linux here. Call
4911 x86_linux_update_xmltarget.
4912 (the_low_target): Add x86_linux_process_qsupported.
4913
4914 * server.c (handle_query): Call target_process_qsupported.
4915
4916 * target.h (target_ops): Add process_qsupported.
4917 (target_process_qsupported): New.
4918
fc7238bb
PA
49192010-04-03 Pedro Alves <pedro@codesourcery.com>
4920
4921 * inferiors.c (add_thread): Set last_status kind to
4922 TARGET_WAITKIND_IGNORE.
4923 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
4924 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
4925 (linux_wait_1): Move `thread' local definition to block that uses
4926 it. Don't NULL initialize `event_child'.
4927 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
4928 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
4929 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
4930
bdabb078
PA
49312010-04-01 Pedro Alves <pedro@codesourcery.com>
4932
4933 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
4934 an extended waitstatus, or by a watchpoint.
4935 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
4936 thread was stepping or has been stopped by a watchpoint.
4937
d3bbe7a0
PA
49382010-04-01 Pedro Alves <pedro@codesourcery.com>
4939
4940 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
4941 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
4942 of another, then delete the previous, and validate all
4943 breakpoints.
4944 (validate_inserted_breakpoint): New.
4945 (delete_disabled_breakpoints): New.
4946 (validate_breakpoints): New.
4947 (check_mem_read): Validate breakpoints before trusting their
4948 shadow. Delete disabled breakpoints.
4949 (check_mem_write): Validate breakpoints before trusting they
4950 should be inserted. Delete disabled breakpoints.
4951 * mem-break.h (validate_breakpoints):
4952 * server.c (handle_query): Validate breakpoints when we see a
4953 qSymbol query.
4954
8b07ae33
PA
49552010-04-01 Pedro Alves <pedro@codesourcery.com>
4956
4957 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
4958 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
4959 if we could tell there's a GDB breakpoint at stop_pc.
4960 (need_step_over_p): Don't do a step over if we find a GDB
4961 breakpoint at the resume PC.
4962
4963 * mem-break.c (struct raw_breakpoint): New.
4964 (enum bkpt_type): New type `gdb_breakpoint'.
4965 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
4966 fields. New field `raw'.
4967 (find_raw_breakpoint_at): New.
4968 (set_raw_breakpoint_at): Handle refcounting. Create a raw
4969 breakpoint instead.
4970 (set_breakpoint_at): Adjust.
4971 (delete_raw_breakpoint): New.
4972 (release_breakpoint): New.
4973 (delete_breakpoint): Rename to...
4974 (delete_breakpoint_1): ... this. Add proc parameter. Use
4975 release_breakpoint. Return ENOENT.
4976 (delete_breakpoint): Reimplement.
4977 (find_breakpoint_at): Delete.
4978 (find_gdb_breakpoint_at): New.
4979 (delete_breakpoint_at): Delete.
4980 (set_gdb_breakpoint_at): New.
4981 (delete_gdb_breakpoint_at): New.
4982 (gdb_breakpoint_here): New.
4983 (set_reinsert_breakpoint): Use release_breakpoint.
4984 (uninsert_breakpoint): Rename to ...
4985 (uninsert_raw_breakpoint): ... this.
4986 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
4987 (reinsert_raw_breakpoint): Change parameter type to
4988 raw_breakpoint.
4989 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
4990 instead.
4991 (check_breakpoints): Adjust. Use release_breakpoint.
4992 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
4993 (breakpoint_inserted_here): Ditto.
4994 (check_mem_read): Adjust to iterate over raw breakpoints instead.
4995 Don't trust the breakpoint's shadow if it is not inserted.
4996 (check_mem_write): Adjust to iterate over raw breakpoints instead.
4997 (delete_all_breakpoints): Adjust.
4998 (free_all_breakpoints): Mark all breakpoints as uninserted, and
4999 use delete_breakpoint_1.
5000
5001 * mem-break.h (breakpoints_supported): Delete declaration.
5002 (set_gdb_breakpoint_at): Declare.
5003 (gdb_breakpoint_here): Declare.
5004 (delete_breakpoint_at): Delete.
5005 (delete_gdb_breakpoint_at): Declare.
5006
5007 * server.h (struct raw_breakpoint): Forward declare.
5008 (struct process_info): New field `raw_breakpoints'.
5009
5010 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
5011 breakpoints.
5012
6bf5e0ba
PA
50132010-03-24 Pedro Alves <pedro@codesourcery.com>
5014
5015 * linux-low.c (status_pending_p_callback): Fix comment.
5016 (linux_wait_for_event_1): Move most of the internal breakpoint
5017 handling from here...
5018 (linux_wait_1): ... to here.
5019 (count_events_callback): New.
5020 (select_singlestep_lwp_callback): New.
5021 (select_event_lwp_callback): New.
5022 (cancel_breakpoints_callback): New.
5023 (select_event_lwp): New.
5024 (linux_wait_1): Simplify internal breakpoint handling. Give equal
5025 priority to all LWPs that have had events that should be reported
5026 to the client. Cancel breakpoints when about to reporting the
5027 event to the client, not while stopping lwps. No longer cancel
5028 finished single-steps here.
5029 (cancel_finished_single_step): Delete.
5030 (cancel_finished_single_steps): Delete.
5031
414a389f
PA
50322010-03-24 Pedro Alves <pedro@codesourcery.com>
5033
5034 * mem-break.c (enum bkpt_type): New.
5035 (struct breakpoint): New field `type'.
5036 (set_breakpoint_at): Change return type to struct breakpoint
5037 pointer. Set type to `other_breakpoint' by default.
5038 (delete_breakpoint): Rewrite, supporting more than one breakpoint
5039 in the breakpoint list.
5040 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
5041 (reinsert_breakpoint): Rename to ...
5042 (reinsert_raw_breakpoint): ... this.
5043 (reinsert_breakpoints_at): Adjust.
5044 * mem-break.h (struct breakpoint): Declare.
5045 (set_breakpoint_at): Change return type to struct breakpoint
5046 pointer.
5047
2280c721
PA
50482010-03-24 Pedro Alves <pedro@codesourcery.com>
5049
5050 * server.c (handle_query): Assign, not compare.
5051
d50171e4
PA
50522010-03-24 Pedro Alves <pedro@codesourcery.com>
5053
5054 Teach linux gdbserver to step-over-breakpoints.
5055
5056 * linux-low.c (can_hardware_single_step): New.
5057 (supports_breakpoints): New.
5058 (handle_extended_wait): If stopping threads, read the stop pc of
5059 the new cloned LWP.
5060 (get_pc): New.
5061 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
5062 low target doesn't support retrieving the PC.
5063 (add_lwp): Set last_resume_kind to resume_continue.
5064 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
5065 (linux_attach): Don't clear stop_expected. Set the lwp's
5066 last_resume_kind to resume_stop.
5067 (linux_detach_one_lwp): Don't check for removed breakpoints.
5068 (check_removed_breakpoint): Delete.
5069 (status_pending_p): Rename to ...
5070 (status_pending_p_callback): ... this. Don't check for removed
5071 breakpoints. Don't consider threads that are stopped from GDB's
5072 perspective.
5073 (linux_wait_for_lwp): Always read the stop_pc here.
5074 (cancel_breakpoint): New.
5075 (step_over_bkpt): New global.
5076 (linux_wait_for_event_1): Implement stepping over breakpoints.
5077 (gdb_wants_lwp_stopped): New.
5078 (gdb_wants_all_stopped): New.
5079 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
5080 single-step traps here. Store the thread's last reported target
5081 wait status.
5082 (send_sigstop): Don't clear stop_expected. Always set it,
5083 instead.
5084 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
5085 (cancel_finished_single_step): New.
5086 (cancel_finished_single_steps): New.
5087 (wait_for_sigstop): Don't cancel finished single-step traps here.
5088 (linux_resume_one_lwp): Don't check for removed breakpoints.
5089 Don't set `step' on non-hardware step archs.
5090 (linux_set_resume_request): Ignore resume_stop requests if already
5091 stopping or stopped. Set the lwp's last_resume_kind.
5092 (resume_status_pending_p): Don't check for removed breakpoints.
5093 (need_step_over_p): New.
5094 (start_step_over): New.
5095 (finish_step_over): New.
5096 (linux_resume_one_thread): Always queue a sigstop for resume_stop
5097 requests. Clear the thread's last reported target waitstatus.
5098 Don't use the `suspended' flag. Don't consider pending breakpoints.
5099 (linux_resume): Start a step-over if necessary.
5100 (proceed_one_lwp): New.
5101 (proceed_all_lwps): New.
5102 (unstop_all_lwps): New.
5103 * linux-low.h (struct lwp_info): Rewrite comment for the
5104 `suspended' flag. Add the `stop_pc' field. Delete the
5105 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
5106 Add `'last_resume_kind' and `need_step_over' fields.
5107 * inferiors.c (struct thread_info): Delete, moved elsewhere.
5108 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
5109 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
5110 (set_raw_breakpoint_at): New.
5111 (set_breakpoint_at): Rewrite to use it.
5112 (reinsert_breakpoint_handler): Delete.
5113 (set_reinsert_breakpoint): New.
5114 (reinsert_breakpoint_by_bp): Delete.
5115 (delete_reinsert_breakpoints): New.
5116 (uninsert_breakpoint): Rewrite.
5117 (uninsert_breakpoints_at): New.
5118 (reinsert_breakpoint): Rewrite.
5119 (reinsert_breakpoints_at): New.
5120 (check_breakpoints): Rewrite.
5121 (breakpoint_here): New.
5122 (breakpoint_inserted_here): New.
5123 (check_mem_read): Adjust.
5124 * mem-break.h (breakpoints_supported, breakpoint_here)
5125 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
5126 (reinsert_breakpoint_by_bp): Delete declaration.
5127 (delete_reinsert_breakpoints): Declare.
5128 (reinsert_breakpoint): Delete declaration.
5129 (reinsert_breakpoints_at): Declare.
5130 (uninsert_breakpoint): Delete declaration.
5131 (uninsert_breakpoints_at): Declare.
5132 (check_breakpoints): Adjust prototype.
5133 * server.h: Adjust include order.
5134 (struct thread_info): Declare here. Add a `last_status' field.
5135
30ba68cb
MS
51362010-03-23 Michael Snyder <msnyder@vmware.com>
5137
5138 * server.c (crc32): New function.
5139 (handle_query): Add handling for 'qCRC:' request.
5140
b9a881c2
PA
51412010-03-23 Pedro Alves <pedro@codesourcery.com>
5142
5143 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
5144 lwp had been stopped by a watchpoint.
5145
e92d13d5
PA
51462010-03-16 Pedro Alves <pedro@codesourcery.com>
5147
5148 * server.h (internal_error): Declare.
5149 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
5150 * utils.c (internal_error): New function.
5151
64daa791
AS
51522010-03-15 Andreas Schwab <schwab@redhat.com>
5153
5154 * configure.srv: Fix typo setting srv_regobj.
5155
f52cd8cd
PA
51562010-03-15 Pedro Alves <pedro@codesourcery.com>
5157
5158 * linux-low.c (fetch_register): Avoid passing a non string literal
5159 format to `error'.
5160 (usr_store_inferior_registers): Ditto.
5161
93ae6fdc
PA
51622010-03-14 Pedro Alves <pedro@codesourcery.com>
5163
5164 * linux-low.c (linux_write_memory): Bail out early if peeking
5165 memory failed.
5166
c3adc08c
PA
51672010-03-14 Pedro Alves <pedro@codesourcery.com>
5168
5169 * linux-low.h (struct lwp_info): New fields
5170 `stopped_by_watchpoint' and `stopped_data_address'.
5171 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
5172 here, and cache them in the lwp object.
5173 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
5174 directly.
5175 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
5176 field.
5177 (linux_stopped_by_watchpoint): Rewrite.
5178 (linux_stopped_data_address): Rewrite.
5179
bce522a2
PA
51802010-03-06 Simo Melenius <simo.melenius@iki.fi>
5181
5182 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
5183 switching the current inferior, not before.
5184
90884b2b
L
51852010-03-01 H.J. Lu <hongjiu.lu@intel.com>
5186
5187 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
5188 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
5189 i386-linux.c and amd64-linux.c.
5190 (reg-i386.o): Removed.
5191 (reg-i386.c): Likewise.
5192 (reg-i386-linux.o): Likewise.
5193 (reg-i386-linux.c): Likewise.
5194 (reg-x86-64.o): Likewise.
5195 (reg-x86-64.c): Likewise.
5196 (reg-x86-64-linux.o): Likewise.
5197 (reg-x86-64-linux.c): Likewise.
5198 (i386.o): New.
5199 (i386.c): Likewise.
5200 (i386-linux.o): Likewise.
5201 (i386-linux.c): Likewise.
5202 (amd64.o): Likewise.
5203 (amd64.c): Likewise.
5204 (amd64-linux.o): Likewise.
5205 (amd64-linux.c): Likewise.
5206
5207 * configure.srv (srv_i386_regobj): New.
5208 (srv_i386_linux_regobj): Likewise.
5209 (srv_amd64_regobj): Likewise.
5210 (srv_amd64_linux_regobj): Likewise.
5211 (srv_i386_32bit_xmlfiles): Likewise.
5212 (srv_i386_64bit_xmlfiles): Likewise.
5213 (srv_i386_xmlfiles): Likewise.
5214 (srv_amd64_xmlfiles): Likewise.
5215 (srv_i386_linux_xmlfiles): Likewise.
5216 (srv_amd64_linux_xmlfiles): Likewise.
5217 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
5218 srv_xmlfiles to $srv_i386_xmlfiles.
5219 (i[34567]86-*-mingw32ce*): Likewise.
5220 (i[34567]86-*-mingw*): Likewise.
5221 (i[34567]86-*-nto*): Likewise.
5222 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
5223 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
5224 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
5225 (x86_64-*-linux*): Likewise.
5226
5227 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
5228 (init_registers_amd64_linux): New.
5229 (x86_arch_setup): Replace init_registers_x86_64_linux with
5230 init_registers_amd64_linux.
5231
193f13e6
MK
52322010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
5233
5234 * configure.ac: Check for libdl. If it is not available link against
5235 static libthread_db.
5236 * configure: Regenerate.
5237
85d721b8
PA
52382010-02-22 Pedro Alves <pedro@codesourcery.com>
5239
5240 PR9605
5241
5242 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
5243 handing a read watchpoint.
5244 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
5245
6076632b
DE
52462010-02-12 Doug Evans <dje@google.com>
5247
5248 * linux-low.c (linux_supports_tracefork_flag): Document.
5249 (linux_look_up_symbols): Add comment.
5250
3327ccf7
L
52512010-02-03 H.J. Lu <hongjiu.lu@intel.com>
5252
5253 * regcache.c (supply_register): Clear regcache if buf is NULL.
5254
0718675c 52552010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 5256 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
5257
5258 * inferiors.c (find_inferior): Add function documentation.
5259 (unloaded_dll): Handle the case where the unloaded dll has not
5260 been previously registered in the dll list.
5261
177321bd
DJ
52622010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
5263
5264 * linux-arm-low.c (thumb_breakpoint_len): Delete.
5265 (thumb2_breakpoint): New.
5266 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
5267
2b009048
DJ
52682010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
5269
5270 * linux-low.c (get_stop_pc): Check for SIGTRAP.
5271 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
5272 breakpoints.
5273
3be029c7
PA
52742010-01-21 Pedro Alves <pedro@codesourcery.com>
5275
5276 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
5277
18f5de3b
JK
52782010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5279
5280 * linux-s390-low.c (s390_collect_ptrace_register)
5281 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
5282
3743bb4f
DE
52832010-01-21 Doug Evans <dje@google.com>
5284
14ce3065
DE
5285 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
5286 (PTRACE_ARG4_TYPE): New macro.
5287 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
5288 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
5289 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
5290 (usr_store_inferior_registers): Ditto.
5291 (linux_read_memory, linux_write_memory): Ditto.
5292 (linux_test_for_tracefork): Ditto.
5293
3743bb4f
DE
5294 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
5295 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
5296
8b315be5
PA
52972010-01-21 Pedro Alves <pedro@codesourcery.com>
5298
5299 * proc-service.c (ps_lgetregs): Don't refetch registers from the
5300 target.
5301
85492558
PA
53022010-01-21 Pedro Alves <pedro@codesourcery.com>
5303
5304 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
5305 prototype to take a regcache. Adjust.
5306
442ea881
PA
53072010-01-20 Pedro Alves <pedro@codesourcery.com>
5308
5309 * regcache.h (struct thread_info): Forward declare.
5310 (struct regcache): New.
5311 (new_register_cache): Adjust prototype.
5312 (get_thread_regcache): Declare.
5313 (free_register_cache): Adjust prototype.
5314 (registers_to_string, registers_from_string): Ditto.
5315 (supply_register, supply_register_by_name, collect_register)
5316 (collect_register_as_string, collect_register_by_name): Ditto.
5317 * regcache.c (struct inferior_regcache_data): Delete.
5318 (get_regcache): Rename to ...
5319 (get_thread_regcache): ... this. Adjust. Switch inferior before
5320 fetching registers.
5321 (regcache_invalidate_one): Adjust.
5322 (regcache_invalidate): Fix prototype.
5323 (new_register_cache): Return the new register cache.
5324 (free_register_cache): Change prototype.
5325 (realloc_register_cache): Adjust.
5326 (registers_to_string): Change prototype to take a regcache. Adjust.
5327 (registers_from_string): Ditto.
5328 (register_data): Ditto.
5329 (supply_register): Ditto.
5330 (supply_register_by_name): Ditto.
5331 (collect_register): Ditto.
5332 (collect_register_as_string): Ditto.
5333 (collect_register_by_name): Ditto.
5334 * server.c (process_serial_event): Adjust.
5335 * linux-low.h (regset_fill_func, regset_store_func): Change
5336 prototype.
5337 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
5338 Change prototype.
5339 * linux-low.c (get_stop_pc): Adjust.
5340 (check_removed_breakpoint): Adjust.
5341 (linux_wait_for_event): Adjust.
5342 (linux_resume_one_lwp): Adjust.
5343 (fetch_register): Add regcache parameter. Adjust.
5344 (usr_store_inferior_registers): Ditto.
5345 (regsets_fetch_inferior_registers): Ditto.
5346 (regsets_store_inferior_registers): Ditto.
5347 (linux_fetch_registers, linux_store_registers): Ditto.
5348 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
5349 regcache. Adjust.
43aaf8b6
PA
5350 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
5351 Ditto.
442ea881
PA
5352 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
5353 prototype to take a regcache.
5354 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
5355 * remote-utils.c (convert_ascii_to_int, outreg)
5356 (prepare_resume_reply): Change prototype to take a regcache.
5357 Adjust.
5358 * target.h (struct target_ops) <fetch_registers, store_registers>:
5359 Change prototype to take a regcache.
5360 (fetch_inferior_registers, store_inferior_registers): Change
5361 prototype to take a regcache. Adjust.
5362 * proc-service.c (ps_lgetregs): Adjust.
5363 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
5364 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
5365 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
5366 take a regcache. Adjust.
5367 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
5368 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
5369 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
5370 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
5371 * linux-cris-low.c (cris_get_pc, cris_set_pc)
5372 (cris_cannot_fetch_register):
5373 (cris_breakpoint_at): Change prototype to take a regcache.
5374 Adjust.
5375 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
5376 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
5377 to take a regcache. Adjust.
5378 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
5379 Adjust.
5380 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
5381 take a regcache. Adjust.
5382 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
5383 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
5384 (m68k_set_pc): Change prototype to take a regcache. Adjust.
5385 * linux-mips-low.c (mips_get_pc):
5386 (mips_set_pc): Change prototype to take a regcache. Adjust.
5387 (mips_reinsert_addr): Adjust.
5388 (mips_collect_register): Change prototype to take a regcache.
5389 Adjust.
5390 (mips_supply_register):
5391 (mips_collect_register_32bit, mips_supply_register_32bit)
5392 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
5393 (mips_store_fpregset): Ditto.
43aaf8b6
PA
5394 * linux-ppc-low.c (ppc_supply_ptrace_register)
5395 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
5396 (parse_spufs_run): Adjust.
5397 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
5398 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
5399 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
5400 take a regcache. Adjust.
5401 * linux-s390-low.c (s390_collect_ptrace_register)
5402 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
5403 (s390_set_pc): Change prototype to take a regcache. Adjust.
5404 (s390_arch_setup): Adjust.
5405 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
5406 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
5407 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
5408 (sparc_fill_gregset, sparc_store_gregset_from_stack)
5409 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
5410 regcache. Adjust.
5411 (sparc_breakpoint_at): Adjust.
5412 * linux-xtensa-low.c (xtensa_fill_gregset):
5413 (xtensa_store_gregset):
5414 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
5415 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
5416 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
5417 prototype to take a regcache. Adjust.
5418 * win32-arm-low.c (arm_fetch_inferior_register)
5419 (arm_store_inferior_register): Change prototype to take a
5420 regcache. Adjust.
5421 * win32-i386-low.c (i386_fetch_inferior_register)
5422 (i386_store_inferior_register): Change prototype to take a
5423 regcache. Adjust.
5424 * win32-low.c (child_fetch_inferior_registers)
5425 (child_store_inferior_registers): Change prototype to take a
5426 regcache. Adjust.
5427 (win32_wait): Adjust.
5428 (win32_fetch_inferior_registers): Change prototype to take a
5429 regcache. Adjust.
5430 (win32_store_inferior_registers): Adjust.
5431 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
5432 store_inferior_register>: Change prototype to take a regcache.
5433
60c3d7b0
DE
54342010-01-20 Doug Evans <dje@google.com>
5435
5436 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
5437 #ifdef.
5438 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 5439 (W_STOPCODE): Provide definition if missing.
60c3d7b0 5440
dc146f7c
VP
54412010-01-13 Vladimir Prus <vladimir@codesourcery.com>
5442
5443 * linux-low.c (linux_core_of_thread): New.
5444 (compare_ints, show_process, list_threads): New.
5445 (linux_qxfer_osdata): Report threads and cores.
5446 (linux_target_op): Register linux_core_of_thread.
5447 * remote-utils.c (prepare_resume_reply): Report the core.
5448 (buffer_xml_printf): Support %d specifier.
5449 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
5450 New.
5451 (handle_query): Handle qXfer:threads. Announce availability
5452 thereof.
5453 * target.h (struct target_ops): New field core_of_thread.
5454
7803799a
UW
54552010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
5456
5457 * Makefile.in (clean): Remove new generated files.
5458 (reg-s390.o, reg-s390.c): Remove rules.
5459 (reg-s390x.o, reg-s390x.c): Likewise.
5460 (s390-linux32.o, s390-linux32.c): Add rules.
5461 (s390-linux64.o, s390-linux64.c): Likewise.
5462 (s390x-linux64.o, s390x-linux64.c): Likewise.
5463 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
5464 * linux-s390-low.c: Include <elf.h>.
5465 (HWCAP_S390_HIGH_GPRS): Define if undefined.
5466 (init_registers_s390): Remove prototype.
5467 (init_registers_s390x): Likewise.
5468 (init_registers_s390_linux32): Add prototype.
5469 (init_registers_s390_linux64): Likewise.
5470 (init_registers_s390x_linux64): Likewise.
5471 (s390_num_regs_3264): New define.
5472 (s390_regmap_3264): New global variable.
5473 (s390_cannot_fetch_register): Remove obsolete check.
5474 (s390_cannot_store_register): Likewise.
5475 (s390_collect_ptrace_register): Handle upper/lower register halves.
5476 (s390_supply_ptrace_register): Likewise.
5477 (s390_fill_gregset): Update to register number changes.
5478 (s390_get_hwcap): New routine.
5479 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
5480 Install appropriate regmap and register set.
5481
6e7ffa39
JB
54822010-01-01 Joel Brobecker <brobecker@adacore.com>
5483
5484 * server.c (gdbserver_version): Update copyright year to 2010.
5485 * gdbreplay.c (gdbreplay_version): Likewise.
5486
957f3f49
DE
54872009-12-28 Doug Evans <dje@google.com>
5488
5489 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
5490 elf/external.h. Include <elf.h> instead but only if necessary.
5491
ca5c370d
PA
54922009-12-28 Pedro Alves <pedro@codesourcery.com>
5493
5494 * linux-low.c (linux_remove_process): Remove `detaching'
5495 parameter. Don't release/detach from thread_db here.
5496 (linux_kill): Release/detach from thread_db here, ...
5497 (linux_detach): ... and here, before actually detaching.
5498 (linux_wait_1): ... and here, when a process exits.
5499 * thread-db.c (any_thread_of): New.
5500 (thread_db_free): Switch the current inferior to a thread of the
5501 passed in process.
5502
4ee62156
DE
55032009-12-21 Doug Evans <dje@google.com>
5504
d90e6a88
DE
5505 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
5506
c5f62d5f
DE
5507 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
5508 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
5509 warning ifndef __NR_tkill. Move setting of errno there too.
5510 Delete unnecessary resetting of errno after syscall.
5511 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
5512
10e86dd7
DE
5513 * configure.ac: Check for dladdr.
5514 * config.in: Regenerate.
5515 * configure: Regenerate.
5516 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
5517 (try_thread_db_load): Update.
5518
4ee62156
DE
5519 * linux-low.c (my_waitpid): Delete unnecessary prototype.
5520
00f515da
DE
55212009-12-18 Doug Evans <dje@google.com>
5522
e9464885
DE
5523 * event-loop.c: Include unistd.h if it exists.
5524
07d4f67e
DE
5525 * linux-low.c (my_waitpid): Move definition away from being in
5526 between linux_tracefork_child/linux_test_for_tracefork.
5527
00f515da
DE
5528 * gdb_proc_service.h (psaddr_t): Fix type.
5529 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
5530 signature to match glibc.
5531
1de1badb
DE
55322009-12-16 Doug Evans <dje@google.com>
5533
5534 * linux-low.c (linux_read_memory): Fix argument to read.
5535
aeeb81d1
PA
55362009-11-26 Pedro Alves <pedro@codesourcery.com>
5537
5538 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
5539 events, don't leave current_inferior pointing at null.
5540
10357975
PA
55412009-11-26 Pedro Alves <pedro@codesourcery.com>
5542
5543 * win32-low.c (LOG): Delete.
5544 (OUTMSG): Output to stderr.
5545 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
5546 on compile time LOG macro.
5547 (win32_wait): Fix debug output.
5548
cf6e3471
PA
55492009-11-26 Pedro Alves <pedro@codesourcery.com>
5550
5551 * win32-low.c (win32_add_one_solib): If the dll name is
5552 "ntdll.dll", prepend the system directory to the dll path.
5553
0c85e18e
MK
55542009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
5555
5556 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
5557
9ac544ce 55582009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 5559 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
5560
5561 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
5562 * configure.ac: Check for __mcoldfire__ and set
5563 gdb_cv_m68k_is_coldfire.
5564 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
5565 reg-cf.o and reg-m68k.o.
5566 * configure: Regenerated.
5567
fd7dd3e6
PA
55682009-11-16 Pedro Alves <pedro@codesourcery.com>
5569
5570 * linux-low.c (linux_remove_process): Add `detaching' parameter.
5571 Pass it to thread_db_free.
5572 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
5573 proper `detaching' argument to linux_remove_process.
5574 * linux-low.h (thread_db_free): Add `detaching' parameter.
5575 * thread-db.c (thread_db_init): Pass false as `detaching' argument
5576 to thread_db_free.
5577 (thread_db_free): Add `detaching' parameter. Only
5578 call td_ta_clear_event if detaching from process.
5579
75aa492e
MK
55802009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
5581
5582 * thread-db.c (thread_db_free): Fix typo.
5583
21e1bee4
PP
55842009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
5585
5586 PR gdb/10838
5587 * thread-db.c (thread_db_free): Call td_ta_clear_event.
5588
8838b45e
NS
55892009-11-03 Nathan Sidwell <nathan@codesourcery.com>
5590
5591 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
5592 with an i686 compiler.
5593 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
5594 needed.
5595 * configure: Rebuilt.
5596
8a35fb51
SL
55972009-10-29 Sandra Loosemore <sandra@codesourcery.com>
5598
5599 PR gdb/10783
5600
5601 * server.c (handle_search_memory_1): Correct read_addr initialization
5602 in loop for searching subsequent chunks.
5603
96f15937
PP
56042009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
5605
5606 * configure.ac: New --with-libthread-db option.
5607 * thread-db.c: Allow direct dependence on libthread_db.
5608 (thread_db_free): Adjust.
5609 * config.in: Regenerate.
5610 * configure: Likewise.
889bf7c5 5611
5f7d1694
PP
56122009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
5613
5614 PR gdb/10757
5615 * thread-db.c (attach_thread): New function.
5616 (maybe_attach_thread): Return success/failure.
5617 (find_new_threads_callback): Adjust.
889bf7c5
PA
5618 (thread_db_find_new_threads): Loop until no new threads.
5619
88e3b899
PA
56202009-10-13 Pedro Alves <pedro@codesourcery.com>
5621
5622 * proc-service.c (ps_lgetregs): Formatting.
5623
cdbfd419
PP
56242009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
5625
5626 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
5627 * configure.ac: Adjust.
5628 * linux-low.h (struct process_info_private): Move members to struct
5629 thread_db.
5630 (thread_db_free, thread_db_handle_monitor_command): New prototype.
5631 * linux-low.c (linux_remove_process): Adjust.
5632 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
5633 * server.c (handle_query): Move code ...
5634 (handle_monitor_command): ... here. New function.
5635 * target.h (struct target_ops): New member.
5636 * thread-db.c (struct thread_db): New.
5637 (libthread_db_search_path): New variable.
5638 (thread_db_create_event, thread_db_enable_reporting)
5639 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
5640 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
5641 (try_thread_db_load_1, dladdr_to_soname): New functions.
5642 (try_thread_db_load, thread_db_load_search): New functions.
5643 (thread_db_init): Search for libthread_db.
5644 (thread_db_free): New function.
5645 (thread_db_handle_monitor_command): Likewise.
5646 * config.in: Regenerate.
5647 * configure: Regenerate.
889bf7c5 5648
4168d2d6
UW
56492009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5650
5651 * spu-low.c (spu_kill): Wait for inferior to terminate.
5652 Call clear_inferiors.
5653 (spu_detach): Call clear_inferiors.
5654
81ecdfbb
RW
56552009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5656
5657 * aclocal.m4: Regenerate.
5658 * config.in: Likewise.
5659 * configure: Likewise.
5660
0b9ff2c0
UW
56612009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
5662
5663 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
5664 (parse_spufs_run): New function.
5665 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
5666 (ppc_breakpoint_at): Handle SPU breakpoints.
5667
efcbbd14
UW
56682009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
5669
5670 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
5671 (SPUFS_MAGIC): Define.
5672 (spu_enumerate_spu_ids): New function.
5673 (linux_qxfer_spu): New function.
5674 (linux_target_ops): Install linux_qxfer_spu.
5675
f4d9bade
UW
56762009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
5677
5678 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
5679 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
5680 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
5681 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
5682 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
5683 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
5684 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
5685 (init_registers_powerpc_cell32l): Add prototype.
5686 (init_registers_powerpc_cell64l): Likewise.
5687 (ppc_arch_setup): Detect Cell/B.E. architecture.
5688
96e946ca
RW
56892009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5690
5691 * Makefile.in (datarootdir): New variable.
5692
58d6951d
DJ
56932009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
5694
5695 * linux-low.c (linux_write_memory): Update debugging output.
5696 * Makefile.in (clean): Add new descriptions.
5697 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
5698 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
5699 * configure.srv: Add new files for arm*-*-linux*.
5700 * linux-arm-low.c: Add new declarations.
5701 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
5702 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
5703 (HWCAP_VFPv3D16): New.
5704 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
5705 instead of __IWMMXT__.
5706 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
5707 (arm_arch_setup): New.
5708 (target_regsets): Remove #ifdef. Add VFP regset.
5709 (the_low_target): Use arm_arch_setup.
5710
12b42a12
DJ
57112009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
5712
5713 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
5714 the main thread again.
5715
ac8c974e
AR
57162009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
5717
5718 Adding Neutrino gdbserver.
5719 * configure: Regenerated.
5720 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
5721 * configure.srv (i[34567]86-*-nto*): New target.
5722 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
5723 * remote-utils.c [__QNX__]: Include sys/iomgr.h
5724 (nto_comctrl) [__QNX__]: New function.
5725 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
5726
4424e0c3 57272009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
5728
5729 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
5730 srv_tgtobj.
5731
912cf4ba
PA
57322009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
5733 Pedro Alves <pedro@codesourcery.com>
5734
5735 * win32-i386-low.c (i386_get_thread_context): Handle systems that
5736 don't support CONTEXT_EXTENDED_REGISTERS.
5737 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
5738 (the_low_target): Install them.
5739 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
5740 failing with ERROR_PIPE_NOT_CONNECTED.
5741
aa5ca48f
DE
57422009-06-30 Doug Evans <dje@google.com>
5743 Pierre Muller <muller@ics.u-strasbg.fr>
5744
5745 Add h/w watchpoint support to x86-linux, win32-i386.
5746 * Makefile.in (SFILES): Add i386-low.c
5747 (i386_low_h): Define.
5748 (i386-low.o): Add dependencies.
5749 (linux-x86-low.o): Add i386-low.h dependency.
5750 (win32-i386-low.o): Ditto.
5751 * i386-low.c: New file.
5752 * i386-low.h: New file.
5753 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
5754 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
5755 * linux-low.c (linux_add_process): Initialize arch_private.
5756 (linux_remove_process): Free arch_private.
5757 (add_lwp): Initialize arch_private.
5758 (delete_lwp): Free arch_private.
5759 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
5760 provided.
5761 * linux-low.h (process_info_private): New member arch_private.
5762 (lwp_info): New member arch_private.
5763 (linux_target_ops): New members new_process, new_thread,
5764 prepare_to_resume.
5765 (ptid_of): New macro.
5766 * linux-x86-low.c: Include stddef.h, i386-low.h.
5767 (arch_process_info): New struct.
5768 (arch_lwp_info): New struct.
5769 (x86_linux_dr_get, x86_linux_dr_set): New functions.
5770 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
5771 (i386_dr_low_get_status): New function.
5772 (x86_insert_point, x86_remove_point): New functions.
5773 (x86_stopped_by_watchpoint): New function.
5774 (x86_stopped_data_address): New function.
5775 (x86_linux_new_process, x86_linux_new_thread): New functions.
5776 (x86_linux_prepare_to_resume): New function.
5777 (the_low_target): Add entries for insert_point, remove_point,
5778 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
5779 prepare_to_resume.
5780 * server.c (debug_hw_points): New global.
5781 (monitor_show_help): Document set debug-hw-points.
5782 (handle_query): Process "set debug-hw-points".
5783 * server.h (debug_hw_points): Declare.
5784 (paddress): Declare.
5785 * utils.c (NUMCELLS, CELLSIZE): New macros.
5786 (get_sell, xsnprintf, paddress): New functions.
5787 * win32-arm-low.c (the_low_target): Add entries for insert_point,
5788 remove_point, stopped_by_watchpoint, stopped_data_address.
5789 * win32-i386-low.c: Include i386-low.h.
5790 (debug_reg_state): Replaces dr.
5791 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
5792 (i386_dr_low_get_status): New function.
5793 (i386_insert_point, i386_remove_point): New functions.
5794 (i386_stopped_by_watchpoint): New function.
5795 (i386_stopped_data_address): New function.
5796 (i386_initial_stuff): Update.
5797 (get_thread_context,set_thread_context,i386_thread_added): Update.
5798 (the_low_target): Add entries for insert_point,
5799 remove_point, stopped_by_watchpoint, stopped_data_address.
5800 * win32-low.c (win32_insert_watchpoint): New function.
5801 (win32_remove_watchpoint): New function.
5802 (win32_stopped_by_watchpoint): New function.
5803 (win32_stopped_data_address): New function.
5804 (win32_target_ops): Add entries for insert_watchpoint,
5805 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
5806 * win32-low.h (win32_target_ops): New members insert_point,
5807 remove_point, stopped_by_watchpoint, stopped_data_address.
5808
d993e290
PA
58092009-06-25 Pedro Alves <pedro@codesourcery.com>
5810
5811 * server.c (process_serial_event): Re-return unsupported, not
5812 error, if the type isn't recognized. Re-allow supporting only
5813 insert or remove packets. Also call require_running for
5814 breakpoints. Add missing break statement to default case. Tidy.
5815 * target.h (struct target_ops): Rename insert_watchpoint to
5816 insert_point, and remove_watchpoint to remove_point.
5817
5818 * linux-low.h (struct linux_target_ops): Likewise.
5819 * linux-low.c (linux_insert_watchpoint): Rename to ...
5820 (linux_insert_point): ... this. Adjust.
5821 (linux_remove_watchpoint): Rename to ...
5822 (linux_remove_point): ... this. Adjust.
5823 (linux_target_ops): Adjust.
5824 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
5825 (cris_insert_point): ... this.
5826 (cris_remove_watchpoint): Rename to ...
5827 (cris_remove_point): ... this.
5828 (the_low_target): Adjust.
5829
0f54c268
PM
58302009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
5831
5832 * server.c (handle_v_kill): Pass signal_pid to
5833 kill_inferior if multi_process is zero.
5834
c6314022
AR
58352009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
5836
5837 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
5838 * target.h (target_ops): Comment for *_watchpoint to make it clear
5839 the functions can get types '0' and '1'.
5840
4463ce24
AR
58412009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
5842
5843 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
5844 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
5845 * regcache.c (get_regcache): Likewise.
5846 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
5847 * win32-low.c (child_fetch_inferior_registers): Remove check for
5848 regno 0.
5849
cf8fd78b
PA
58502009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
5851 Pedro Alves <pedro@codesourcery.com>
5852
5853 * target.h (struct target_ops) <supports_multi_process>: New
5854 callback.
5855 (target_supports_multi_process): New.
5856 * server.c (handle_query): Even if GDB reports support, only
5857 enable multi-process if the target also supports it. Report
5858 multi-process support only if the target backend supports it.
5859 * linux-low.c (linux_supports_multi_process): New function.
5860 (linux_target_ops): Install it as target_supports_multi_process
5861 callback.
5862
47c0c975
DE
58632009-05-24 Doug Evans <dje@google.com>
5864
e09875d4
DE
5865 Global renaming of find_thread_pid to find_thread_ptid.
5866 * server.h (find_thread_ptid): Renamed from find_thread_pid.
5867 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
5868 All callers updated.
5869
e27d73f6
DE
5870 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
5871 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
5872 directly.
5873
47c0c975
DE
5874 * linux-low.c (get_stop_pc): Print pc if debug_threads.
5875 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
5876 (linux_resume_one_lwp): Ditto.
5877
2acc282a
DE
58782009-05-23 Doug Evans <dje@google.com>
5879
5880 * linux-low.c (linux_resume_one_lwp): Change type of first arg
5881 from struct inferior_list_entry * to struct lwp_info *.
5882 All callers updated.
5883
9f1036c1
DE
58842009-05-13 Doug Evans <dje@google.com>
5885
5886 * linux-x86-low.c: Don't include assert.h.
5887 (x86_siginfo_fixup): Use fatal, not assert.
5888 (x86_arch_setup): Fix comment.
5889
d0722149
DE
58902009-05-12 Doug Evans <dje@google.com>
5891
5892 Biarch support for i386/amd64 gdbserver.
5893 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
5894 Add linux-x86-low.c.
5895 (linux-i386-low.o, linux-x86-64-low.o): Delete.
5896 (linux-x86-low.o): Add.
5897 * linux-x86-64-low.c: Delete.
5898 * linux-i386-low.c: Delete.
5899 * linux-x86-low.c: New file.
5900 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
5901 linux-x86-low.o.
5902 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
5903 linux-x86-low.o.
5904 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
5905 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
5906 (linux_child_pid_to_exec_file): New function.
5907 (elf_64_header_p, elf_64_file_p): New functions.
5908 (siginfo_fixup): New function.
5909 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
5910 give target a chance to convert layout.
5911 * linux-low.h (linux_target_ops): New member siginfo_fixup.
5912 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
5913
fdeb2a12
DE
59142009-05-07 Doug Evans <dje@google.com>
5915
5916 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
5917 (regsets_store_inferior_registers): Ditto.
5918
a6dbe5df
PA
59192009-05-06 Pedro Alves <pedro@codesourcery.com>
5920
5921 PR server/10048
5922
5923 * linux-low.c (must_set_ptrace_flags): Delete.
5924 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
5925 of the global.
5926 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
5927 `lwp->must_set_ptrace_flags' instead.
ba42693b 5928 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
5929 (linux_wait_1): ... not here.
5930
5091eb23
DE
59312009-04-30 Doug Evans <dje@google.com>
5932
9f767825
DE
5933 * inferiors.c (started_inferior_callback): New function.
5934 (attached_inferior_callback): New function.
5935 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
5936 * server.c (print_started_pid, print_attached_pid): New functions.
5937 (detach_or_kill_for_exit): New function.
5938 (main): Call it instead of for_each_inferior (kill_inferior_callback).
5939 * server.h (have_started_inferiors_p): Declare.
5940 (have_attached_inferiors_p): Declare.
5941
5091eb23
DE
5942 * inferiors.c (remove_process): Fix memory leak, free process.
5943 * linux-low.c (linux_remove_process): New function.
5944 (linux_kill): Call it instead of remove_process.
5945 (linux_detach, linux_wait_1): Ditto.
5946
155c8968
PA
59472009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
5948
5949 * configure.srv: Add x86 Windows CE target.
5950
7fe519cb
UW
59512009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
5952
5953 * inferiors.c (get_thread_process): Make global.
5954 * server.h (get_thread_process): Add prototype.
5955 * thread-db.c (find_one_thread): Use get_thread_process
5956 instead of current_process.
5957 (thread_db_get_tls_address): Do not crash if called when
5958 thread layer is not yet initialized.
5959
5472f405
UW
59602009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
5961
5962 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
5963 * spu-low.c (current_tid): Rename to ...
5964 (current_ptid): ... this.
5965 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
5966 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
5967 ptid_get_lwp (current_ptid) instead of current_tid.
5968 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
5969 instead of current_tid. Use find_process_pid to verify pid
5970 argument is valid. Pass proper argument to remove_process.
5971 (spu_thread_alive): Compare current_ptid instead of current_tid.
5972 (spu_resume): Likewise.
5973
55ac2b99
PA
59742009-04-02 Pedro Alves <pedro@codesourcery.com>
5975
5976 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
5977 variable.
5978
95954743
PA
59792009-04-01 Pedro Alves <pedro@codesourcery.com>
5980
5981 Implement the multiprocess extensions, and add linux multiprocess
5982 support.
5983
5984 * server.h (ULONGEST): Declare.
5985 (struct ptid, ptid_t): New.
5986 (minus_one_ptid, null_ptid): Declare.
5987 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
5988 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
5989 (struct inferior_list_entry): Change `id' type from unsigned from
5990 to ptid_t.
5991 (struct sym_cache, struct breakpoint, struct
5992 process_info_private): Forward declare.
5993 (struct process_info): Declare.
5994 (current_process): Declare.
5995 (all_processes): Declare.
5996 (initialize_inferiors): Declare.
5997 (add_thread): Adjust to use ptid_t.
5998 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
5999 (add_process, remove_process, find_thread_pid): Declare.
6000 (find_inferior_id): Adjust to use ptid_t.
6001 (cont_thread, general_thread, step_thread): Change type to ptid_t.
6002 (multi_process): Declare.
6003 (push_event): Adjust to use ptid_t.
6004 (read_ptid, write_ptid): Declare.
6005 (prepare_resume_reply): Adjust to use ptid_t.
6006 (clear_symbol_cache): Declare.
6007 * inferiors.c (all_processes): New.
6008 (null_ptid, minus_one_ptid): New.
6009 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
6010 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
6011 (add_thread): Change unsigned long to ptid. Remove gdb_id
6012 parameter. Adjust.
6013 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
6014 (gdb_id_to_thread): Rename to ...
6015 (find_thread_pid): ... this. Change unsigned long to ptid.
6016 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
6017 (loaded_dll, pull_pid_from_list): Adjust.
6018 (add_process, remove_process, find_process_pid)
6019 (get_thread_process, current_process, initialize_inferiors): New.
6020 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
6021 (struct target_waitstatus) <related_pid>: Ditto.
6022 (struct target_ops) <kill, detach>: Add `pid' argument. Change
6023 return type to int.
6024 (struct target_ops) <join>: Add `pid' argument.
6025 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
6026 (struct target_ops) <wait>: Add `ptid' field. Change return type
6027 to ptid.
6028 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
6029 (mywait): Add `ptid' argument. Change return type to ptid_t.
6030 (target_pid_to_str): Declare.
6031 * target.c (set_desired_inferior): Adjust to use ptids.
6032 (mywait): Add new `ptid' argument. Adjust.
6033 (target_pid_to_str): New.
6034 * mem-break.h (free_all_breakpoints): Declare.
6035 * mem-break.c (breakpoints): Delelete.
6036 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
6037 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
6038 to use per-process breakpoint list.
6039 (free_all_breakpoints): New.
6040 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
6041 (symbol_cache, all_symbols_looked_up): Delete.
6042 (hexchars): New.
6043 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
6044 read_ptid): New.
6045 (prepare_resume_reply): Change ptid argument's type from unsigned
6046 long to ptid_t. Adjust. Implement W;process and X;process.
6047 (free_sym_cache, clear_symbol_cache): New.
6048 (look_up_one_symbol): Adjust to per-process symbol cache. *
6049 * server.c (cont_thread, general_thread, step_thread): Change type
6050 to ptid_t.
6051 (attached): Delete.
6052 (multi_process): New.
6053 (last_ptid): Change type to ptid_t.
6054 (struct vstop_notif) <ptid>: Change type to ptid_t.
6055 (queue_stop_reply, push_event): Change `ptid' argument's type to
6056 ptid_t.
6057 (discard_queued_stop_replies): Add `pid' argument.
6058 (start_inferior): Adjust to use ptids. Adjust to mywait interface
6059 changes. Don't reference the `attached' global.
6060 (attach_inferior): Adjust to mywait interface changes.
6061 (handle_query): Adjust to use ptids. Parse GDB's qSupported
6062 features. Handle and report "multiprocess+". Handle
6063 "qAttached:PID".
6064 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
6065 changes.
6066 (handle_v_kill): New.
6067 (handle_v_stopped): Adjust to use target_pid_to_str.
6068 (handle_v_requests): Allow multiple attaches and runs when
6069 multiprocess extensions are in effect. Handle "vKill".
6070 (myresume): Adjust to use ptids.
6071 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
6072 (handle_status): Adjust to discard_queued_stop_replies interface
6073 change.
6074 (first_thread_of, kill_inferior_callback)
6075 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
6076 (main): Call initialize_inferiors. Adjust to use ptids, killing
6077 and detaching from all inferiors. Handle multiprocess packet
6078 variants.
6079 * linux-low.h: Include gdb_proc_service.h.
6080 (struct process_info_private): New.
6081 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
6082 <lwpid_of>: Use ptid_get_lwp.
6083 (get_lwp_thread): Adjust.
6084 (struct lwp_info): Add `dead' member.
6085 (find_lwp_pid): Declare.
6086 * linux-low.c (thread_db_active): Delete.
6087 (new_inferior): Adjust comment.
6088 (inferior_pid): Delete.
6089 (linux_add_process): New.
6090 (handle_extended_wait): Adjust.
6091 (add_lwp): Change unsigned long to ptid.
6092 (linux_create_inferior): Add process to processes table. Adjust
6093 to use ptids. Don't set new_inferior here.
6094 (linux_attach_lwp): Rename to ...
6095 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
6096 it. Adjust to use ptids.
6097 (linux_attach_lwp): New.
6098 (linux_attach): Add process to processes table. Don't set
6099 new_inferior here.
6100 (struct counter): New.
6101 (second_thread_of_pid_p, last_thread_of_process_p): New.
6102 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
6103 multiple processes.
6104 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
6105 processes. Remove process from process table.
6106 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
6107 to multiple processes.
6108 (any_thread_of): New.
6109 (linux_detach): Add `pid' argument, and handle it. Remove process
6110 from processes table.
6111 (linux_join): Add `pid' argument. Handle it.
6112 (linux_thread_alive): Change unsighed long argument to ptid_t.
6113 Consider dead lwps as not being alive.
6114 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
6115 threads we're not interested in.
6116 (same_lwp, find_lwp_pid): New.
6117 (linux_wait_for_lwp): Change `pid' argument's type from int to
6118 ptid_t. Adjust.
6119 (linux_wait_for_event): Rename to ...
6120 (linux_wait_for_event_1): ... this. Change `pid' argument's type
6121 from int to ptid_t. Adjust.
6122 (linux_wait_for_event): New.
6123 (linux_wait_1): Add `ptid' argument. Change return type to
6124 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
6125 that exit from the process table.
6126 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
6127 Adjust.
6128 (mark_lwp_dead): New.
6129 (wait_for_sigstop): Adjust to use ptids. If a process exits while
6130 stopping all threads, mark its main lwp as dead.
6131 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
6132 ptids.
6133 (fetch_register, usr_store_inferior_registers)
6134 (regsets_fetch_inferior_registers)
6135 (regsets_store_inferior_registers, linux_read_memory)
6136 (linux_write_memory): Inline `inferior_pid'.
6137 (linux_look_up_symbols): Adjust to use per-process
6138 `thread_db_active'.
6139 (linux_request_interrupt): Adjust to use ptids.
6140 (linux_read_auxv): Inline `inferior_pid'.
6141 (initialize_low): Don't reference thread_db_active.
6142 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
6143 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
6144 (ps_getpid): Return the pid of the current inferior.
6145 * thread-db.c (proc_handle, thread_agent): Delete.
6146 (thread_db_create_event, thread_db_enable_reporting): Adjust to
6147 per-process data.
6148 (find_one_thread): Change argument type to ptid_t. Adjust to
6149 per-process data.
6150 (maybe_attach_thread): Adjust to per-process data and ptids.
6151 (thread_db_find_new_threads): Ditto.
6152 (thread_db_init): Ditto.
6153 * spu-low.c (spu_create_inferior, spu_attach): Add process to
6154 processes table. Adjust to use ptids.
6155 (spu_kill, spu_detach): Adjust interface. Remove process from
6156 processes table.
6157 (spu_join, spu_thread_alive): Adjust interface.
6158 (spu_wait): Adjust interface. Remove process from processes
6159 table. Adjust to use ptids.
6160 * win32-low.c (current_inferior_tid): Delete.
6161 (current_inferior_ptid): New.
6162 (debug_event_ptid): New.
6163 (thread_rec): Take a ptid. Adjust.
6164 (child_add_thread): Add `pid' argument. Adjust to use ptids.
6165 (child_delete_thread): Ditto.
6166 (do_initial_child_stuff): Add `attached' argument. Add process to
6167 processes table.
6168 (child_fetch_inferior_registers, child_store_inferior_registers):
6169 Adjust.
6170 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
6171 (win32_attach): Pass 1 to do_initial_child_stuff.
6172 (win32_kill): Adjust interface. Remove process from processes
6173 table.
6174 (win32_detach): Ditto.
6175 (win32_join): Adjust interface.
6176 (win32_thread_alive): Take a ptid.
6177 (win32_resume): Adjust to use ptids.
6178 (get_child_debug_event): Ditto.
6179 (win32_wait): Adjust interface. Remove exiting process from
6180 processes table.
6181
bd99dc85
PA
61822009-04-01 Pedro Alves <pedro@codesourcery.com>
6183
6184 Non-stop mode support.
6185
6186 * server.h (non_stop): Declare.
6187 (gdb_client_data, handler_func): Declare.
6188 (delete_file_handler, add_file_handler, start_event_loop):
6189 Declare.
6190 (handle_serial_event, handle_target_event, push_event)
6191 (putpkt_notif): Declare.
6192 * target.h (enum resume_kind): New.
6193 (struct thread_resume): Replace `step' field by `kind' field.
6194 (TARGET_WNOHANG): Define.
6195 (struct target_ops) <wait>: Add `options' argument.
6196 <supports_non_stop, async, start_non_stop>: New fields.
6197 (target_supports_non_stop, target_async): New.
6198 (start_non_stop): Declare.
6199 (mywait): Add `options' argument.
6200 * target.c (mywait): Add `options' argument. Print child exit
6201 notifications here.
6202 (start_non_stop): New.
6203 * server.c (non_stop, own_buf, mem_buf): New globals.
6204 (struct vstop_notif): New.
6205 (notif_queue): New global.
6206 (queue_stop_reply, push_event, discard_queued_stop_replies)
6207 (send_next_stop_reply): New.
6208 (start_inferior): Adjust to use resume_kind. Adjust to mywait
6209 interface changes.
6210 (attach_inferior): In non-stop mode, don't wait for the target
6211 here.
6212 (handle_general_set): Handle QNonStop.
6213 (handle_query): When handling qC, return the current general
6214 thread, instead of the first thread of the list.
6215 (handle_query): If the backend supports non-stop mode, include
6216 QNonStop+ in the qSupported query response.
6217 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
6218 and non-stop mode.
6219 (handle_v_attach, handle_v_run): Handle non-stop mode.
6220 (handle_v_stopped): New.
6221 (handle_v_requests): Report support for vCont;t. Handle vStopped.
6222 (myresume): Adjust to use resume_kind. Handle non-stop.
6223 (queue_stop_reply_callback): New.
6224 (handle_status): Handle non-stop mode.
6225 (main): Clear non_stop flag on reconnection. Use the event-loop.
6226 Refactor serial protocol handling from here ...
6227 (process_serial_event): ... to this new function. When GDB
6228 selects any thread, select one here. In non-stop mode, wait until
6229 GDB acks all pending events before exiting.
6230 (handle_serial_event, handle_target_event): New.
6231 * remote-utils.c (remote_open): Install remote_desc in the event
6232 loop.
6233 (remote_close): Remove remote_desc from the event loop.
6234 (putpkt_binary): Rename to...
6235 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
6236 (putpkt_binary): New as wrapper around putpkt_binary_1.
6237 (putpkt_notif): New.
6238 (prepare_resume_reply): In non-stop mode, don't change the
6239 general_thread.
6240 * event-loop.c: New.
6241 * Makefile.in (OBJ): Add event-loop.o.
6242 (event-loop.o): New rule.
6243
6244 * linux-low.h (pid_of): Moved here.
6245 (lwpid_of): New.
6246 (get_lwp_thread): Use lwpid_of.
6247 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
6248 * linux-low.c (pid_of): Delete.
6249 (inferior_pid): Use lwpid_of.
6250 (linux_event_pipe): New.
6251 (target_is_async_p): New.
6252 (delete_lwp): New.
6253 (handle_extended_wait): Use lwpid_of.
6254 (add_lwp): Don't set lwpid field.
6255 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
6256 (linux_kill_one_lwp): If killing a running lwp, stop it first.
6257 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
6258 (linux_detach_one_lwp): If detaching from a running lwp, stop it
6259 first. Adjust to linux_wait_for_event interface changes. Use
6260 lwpid_of.
6261 (linux_detach): Don't delete the main lwp here.
6262 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
6263 (status_pending_p): Don't consider explicitly suspended lwps.
6264 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
6265 pointer. Add OPTIONS argument. Change return type to int. Use
6266 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
6267 (linux_wait_for_event): Take an integer pid instead of a lwp_info
6268 pointer. Add status pointer argument. Return a pid instead of a
6269 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
6270 changes. In non-stop mode, don't switch to a random thread.
6271 (linux_wait): Rename to...
6272 (linux_wait_1): ... this. Add target_options argument, and handle
6273 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
6274 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
6275 clean exit and signal exit code. Don't stop all threads in
6276 non-stop mode. In all-stop mode, only stop all threads when
6277 reporting a stop to GDB. Handle explicit thread stop requests.
6278 (async_file_flush, async_file_mark): New.
6279 (linux_wait): New.
6280 (send_sigstop): Use lwpid_of.
6281 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
6282 interface changes. In non-stop mode, don't switch to a random
6283 thread.
6284 (linux_resume_one_lwp): Use lwpid_of.
6285 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
6286 (linux_resume_one_thread): ... this. Handle resume_stop. In
6287 non-stop mode, don't look for pending flag in all threads.
6288 (resume_status_pending_p): Don't consider explicitly suspended
6289 threads.
6290 (my_waitpid): Reimplement. Emulate __WALL.
6291 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
6292 Use lwpid_of.
6293 (sigchld_handler, linux_supports_non_stop, linux_async)
6294 (linux_start_non_stop): New.
6295 (linux_target_ops): Register linux_supports_non_stop, linux_async
6296 and linux_start_non_stop.
6297 (initialize_low): Install SIGCHLD handler.
6298 * thread-db.c (thread_db_create_event, find_one_thread)
6299 (thread_db_get_tls_address): Use lwpid_of.
6300 * win32-low.c (win32_detach): Adjust to use resume_kind.
6301 (win32_wait): Add `options' argument.
6302 * spu-low.c (spu_resume): Adjust to use resume_kind.
6303 (spu_wait): Add `options' argument.
6304
5b1c542e
PA
63052009-04-01 Pedro Alves <pedro@codesourcery.com>
6306
6307 Decouple target code from remote protocol.
6308
6309 * target.h (enum target_waitkind): New.
6310 (struct target_waitstatus): New.
6311 (struct target_ops) <wait>: Return an unsigned long. Take a
6312 target_waitstatus pointer instead of a char pointer.
6313 (mywait): Likewise.
6314 * target.c (mywait): Change prototype to return an unsigned long.
6315 Take a target_waitstatus pointer instead of a char pointer. Adjust.
6316 * server.h (thread_from_wait, old_thread_from_wait): Delete
6317 declarations.
6318 (prepare_resume_reply): Change prototype to take a
6319 target_waitstatus.
6320 * server.c (thread_from_wait, old_thread_from_wait): Delete.
6321 (last_status, last_ptid): New.
6322 (start_inferior): Remove "statusptr" argument. Adjust. Return a
6323 pid instead of a signal.
6324 (attach_inferior): Remove "status" and "signal" parameters.
6325 Adjust.
6326 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
6327 not as an address.
6328 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
6329 (handle_v_requests, myresume): Remove "status" and "signal"
6330 parameters. Adjust.
6331 (handle_status): New.
6332 (main): Delete local `status'. Adjust.
6333 * remote-utils.c: Include target.h.
6334 (prepare_resume_reply): Change prototype to take a
6335 target_waitstatus. Adjust.
6336
6337 * linux-low.c (linux_wait): Adjust to new target_ops->wait
6338 interface.
6339 * spu-low.c (spu_wait): Adjust.
6340 * win32-low.c (enum target_waitkind, struct target_waitstatus):
6341 Delete.
6342 (win32_wait): Adjust.
6343
2bd7c093
PA
63442009-04-01 Pedro Alves <pedro@codesourcery.com>
6345
6346 * target.h (struct thread_resume): Delete leave_stopped member.
6347 (struct target_ops): Add a `n' argument to the `resume' callback.
6348 * server.c (start_inferior): Adjust.
6349 (handle_v_cont, myresume): Adjust.
6350 * linux-low.c (check_removed_breakpoint): Adjust to resume
6351 interface change, and to removed leave_stopped field.
6352 (resume_ptr): Delete.
6353 (struct thread_resume_array): New.
6354 (linux_set_resume_request): Add new `arg' parameter. Adjust to
6355 resume interface change.
6356 (linux_continue_one_thread, linux_queue_one_thread)
6357 (resume_status_pending_p): Check if the resume field is NULL
6358 instead of checking the leave_stopped member.
6359 (linux_resume): Adjust to the target resume interface change.
6360 * spu-low.c (spu_resume): Adjust to the target resume interface
6361 change.
6362 * win32-low.c (win32_detach, win32_resume): Ditto.
6363
c35fafde
PA
63642009-04-01 Pedro Alves <pedro@codesourcery.com>
6365
6366 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
6367 flag.
6368 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
6369 pending.
6370 (linux_continue_one_thread): Only preserve the stepping flag if
6371 there's a pending breakpoint.
6372
0a59d50b
PA
63732009-03-31 Pedro Alves <pedro@codesourcery.com>
6374
6375 * server.c (main): After the inferior having exited, call
6376 remote_close before exiting gdbserver.
6377
f04c6d38
TJB
63782009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
6379
6380 Fix size of FPSCR in Power 7 processors.
6381 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
6382 (PPC_FEATURE_HAS_DFP): New #define.
6383 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
6384 size of the FPSCR.
6385
78e5cee6
PA
63862009-03-23 Pedro Alves <pedro@codesourcery.com>
6387
6388 * server.c (handle_query) Whitespace and formatting.
6389
1b3f6016
PA
63902009-03-22 Pedro Alves <pedro@codesourcery.com>
6391
6392 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
6393 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
6394 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
6395 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
6396 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
6397 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
6398 Makefile.in, configure.ac: Fix whitespace throughout.
6399 * configure: Regenerate.
6400
a07b2135
PA
64012009-03-22 Pedro Alves <pedro@codesourcery.com>
6402
6403 * inferiors.c (find_inferior): Make it safe for the callback
6404 function to delete the currently iterated inferior.
6405
67cc2626
PA
64062009-03-22 Pedro Alves <pedro@codesourcery.com>
6407
6408 * Makefile.in (linuw_low_h): Move higher.
6409 (thread-db.o): Depend on $(linux_low_h).
6410
54a0b537
PA
64112009-03-17 Pedro Alves <pedro@codesourcery.com>
6412
6413 Rename "process" to "lwp" throughout.
6414
6415 * linux-low.c (all_processes): Rename to...
6416 (all_lwps): ... this.
6417 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
6418 (add_process): Rename to ...
6419 (add_lwp): ... this. Adjust.
6420 (linux_create_inferior): Adjust.
6421 (linux_attach_lwp): Adjust.
6422 (linux_attach): Adjust.
6423 (linux_kill_one_process): Rename to ...
6424 (linux_kill_one_lwp): ... this. Adjust.
6425 (linux_kill): Adjust.
6426 (linux_detach_one_process): Rename to ...
6427 (linux_detach_one_lwp): ... this. Adjust.
6428 (linux_detach): Adjust.
6429 (check_removed_breakpoint): Adjust.
6430 (status_pending_p): Adjust.
6431 (linux_wait_for_process): Rename to ...
6432 (linux_wait_for_lwp): ... this. Adjust.
6433 (linux_wait_for_event): Adjust.
6434 (send_sigstop): Adjust.
6435 (wait_for_sigstop): Adjust.
6436 (stop_all_processes): Rename to ...
6437 (stop_all_lwps): ... this.
6438 (linux_resume_one_process): Rename to ...
6439 (linux_resume_one_lwp): ... this. Adjust.
6440 (linux_set_resume_request, linux_continue_one_thread)
6441 (linux_queue_one_thread, resume_status_pending_p)
6442 (usr_store_inferior_registers, regsets_store_inferior_registers)
6443 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
6444 Adjust.
6445 * linux-low.h (get_process): Rename to ...
6446 (get_lwp): ... this. Adjust.
6447 (get_thread_process): Rename to ...
6448 (get_thread_lwp): ... this. Adjust.
6449 (get_process_thread): Rename to ...
6450 (get_lwp_thread): ... this. Adjust.
6451 (struct process_info): Rename to ...
6452 (struct lwp_info): ... this.
6453 (all_processes): Rename to ...
6454 (all_lwps): ... this.
6455 * proc-service.c (ps_lgetregs): Adjust.
6456 * thread-db.c (thread_db_create_event, find_one_thread)
6457 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
6458
0b16c5cf
PA
64592009-03-14 Pedro Alves <pedro@codesourcery.com>
6460
6461 * server.c (handle_query): Handle "qAttached".
6462
32de4b9d
NS
64632009-03-13 Nathan Sidwell <nathan@codesourcery.com>
6464
6465 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
6466 GPLv3, update license URL.
6467
2aecd87f
DE
64682009-03-01 Doug Evans <dje@google.com>
6469
93efd302 6470 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
6471 (server_h): Add gdb_signals.h.
6472 (signals.o): Update.
6473 * server.h (target_signal_from_host,target_signal_to_host_p)
6474 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
6475
86b1f9c5
PM
64762009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
6477
6478 * remote-utils.c (getpkt): Also generate remote-debug
6479 information if noack_mode is set.
6480
4aa995e1
PA
64812009-02-06 Pedro Alves <pedro@codesourcery.com>
6482
6483 * server.c (handle_query): Report qXfer:siginfo:read and
6484 qXfer:siginfo:write as supported and handle them.
6485 * target.h (struct target_ops) <qxfer_siginfo>: New field.
6486 * linux-low.c (linux_xfer_siginfo): New.
6487 (linux_target_ops): Set it.
6488
62709adf
PA
64892009-01-26 Pedro Alves <pedro@codesourcery.com>
6490
6491 * server.c (gdbserver_usage): Mention --remote-debug.
6492 (main): Accept '--remote-debug' switch.
6493
aef93bd7
DE
64942009-01-18 Doug Evans <dje@google.com>
6495
6496 * regcache.c (new_register_cache): No need to check result of xcalloc.
6497 * server.c (handle_search_memory): Back out calls to xmalloc,
6498 result is checked and error is returned to user upon failure.
6499 (handle_query): Ditto. Add more checks for result of malloc.
6500 (handle_v_cont): Check result of malloc, report error back to
6501 user upon failure.
6502 (handle_v_run): Ditto. Call freeargv.
6503 * server.h (freeargv): Declare.
6504 * utils.c (freeargv): New fn.
6505
54363045
DE
65062009-01-15 Doug Evans <dje@google.com>
6507
f626972c
DE
6508 * gdbreplay.c (perror_with_name): Make arg const char *.
6509 * server.h (target_signal_to_name): Make return type const char *.
0842e787 6510 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 6511 * utils.c (perror_with_name): Make arg const char *.
54363045 6512
18aae699
PA
65132009-01-14 Pedro Alves <pedro@codesourcery.com>
6514
6515 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
6516 when handling a EXIT_PROCESS_DEBUG_EVENT.
6517
ff703abe
JB
65182009-01-06 Joel Brobecker <brobecker@adacore.com>
6519
6520 * gdbreplay.c (gdbreplay_version): Update copyright year.
6521 * server.c (gdbserver_version): Likewise.
6522
f21cc1a2 65232009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
6524
6525 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 6526 (handle_extended_wait): Improve comment.
0e21c1ec 6527
bca929d3
DE
65282008-12-13 Doug Evans <dje@google.com>
6529
6530 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
6531 * server.h (ATTR_MALLOC): New macro.
6532 (xmalloc,xcalloc,xstrdup): Declare.
6533 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
6534 * inferiors.c: Ditto.
6535 * linux-low.c: Ditto.
6536 * mem-break.c: Ditto.
6537 * regcache.c: Ditto.
6538 * remote-utils.c: Ditto.
6539 * server.c: Ditto.
6540 * target.c: Ditto.
6541 * win32-low.c: Ditto.
6542
97438e3f
DE
65432008-12-12 Doug Evans <dje@google.com>
6544
896c7fbb
DE
6545 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
6546 in debugging printf.
6547
97438e3f
DE
6548 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
6549
e3b886f8
DE
65502008-12-09 Doug Evans <dje@google.com>
6551
6552 * linux-low.h (struct process_info): Delete member tid, unused.
6553 * thread-db.c (find_one_thread): Update.
6554 (maybe_attach_thread): Update.
6555
07e059b5
VP
65562008-12-02 Pedro Alves <pedro@codesourcery.com>
6557
889bf7c5
PA
6558 * target.h (struct target_ops): Add qxfer_osdata member.
6559 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
6560 and dirent.h.
6561 (linux_qxfer_osdata): New functions.
6562 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
6563 callback.
6564 * server.c (handle_query): Handle "qXfer:osdata:read:".
6565 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
6566 (buffer_xml_printf): New functions.
6567 * server.h (struct buffer): New.
6568 (buffer_grow_str, buffer_grow_str0): New macros.
6569 (buffer_grow, buffer_free, buffer_init, buffer_finish)
6570 (buffer_xml_printf): Declare.
07e059b5 6571
4cab47ab
DE
65722008-11-24 Doug Evans <dje@google.com>
6573
6574 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
6575
f142445f
DJ
65762008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
6577
6578 * server.c (handle_v_run): Always use the supplied argument list.
6579
d0107bb6 65802008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 6581
d0107bb6
BW
6582 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
6583 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 6584
2c4ad781
TJB
65852008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
6586
6587 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
6588 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
6589 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
6590 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
6591 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
6592 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
6593 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
6594 XML target descriptions.
6595 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
6596 when inferior is running on an ISA 2.05 or later processor. Add
6597 special case to return offset for full 64-bit slot of FPSCR when
6598 in 32-bits.
6599
dfb64f85
DJ
66002008-11-14 Daniel Gutson <dgutson@codesourcery.com>
6601
6602 * Makefile.in (SFILES, clean): Added sparc64 files.
6603 (reg-sparc64.o, reg-sparc64.c): New.
6604 * configure.srv (sparc*-*-linux*): New configuration.
6605 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
6606 syscall arguments for SPARC.
6607 (regsets_store_inferior_registers): Likewise.
6608 * linux-sparc-low.c: New file.
6609
66b6e1dd
DE
66102008-10-21 Doug Evans <dje@google.com>
6611
6612 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
6613 (READLINE_DIR,READLINE_DEP): Delete.
6614 (INTERNAL_CFLAGS): Update.
6615 (LINTFLAGS): Update.
6616
9b710a42
PA
66172008-10-10 Pedro Alves <pedro@codesourcery.com>
6618
6619 * server.c (handle_v_run): If GDB didn't specify an argv, use the
6620 whole argv from the last run, not just argv[0].
6621
5822d809
PA
66222008-09-08 Pedro Alves <pedro@codesourcery.com>
6623
6624 * regcache.c (new_register_cache): Return NULL if the register
6625 cache size isn't known yet.
6626 (free_register_cache): Avoid dereferencing a NULL regcache.
6627
74aac56f
DJ
66282008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
6629
6630 * configure.srv: Merge MIPS and MIPS64.
6631
400b20f5
MR
66322008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
6633
6634 * Makefile.in (uninstall): Apply $(EXEEXT) too.
6635
677c5bb1
LM
66362008-08-18 Luis Machado <luisgpm@br.ibm.com>
6637
6638 * Makefile.in: Add required vsx dependencies.
6639
6640 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
6641 Declare init_registers_powerpc_vsx32l.
6642 Declare init_registers_powerpc_vsx64l.
6643 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
6644 (ppc_arch_setup): Check for VSX in hwcap.
6645 (ppc_fill_vsxregset): New function.
6646 (ppc_store_vsxregset): New function.
6647 Add new VSX entry in regset_info target_regsets.
6648
6649 * configure.srv: Add new VSX dependencies.
6650
a6f3e723
SL
66512008-08-12 Pedro Alves <pedro@codesourcery.com>
6652
6653 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
6654 (remote_open): Set or clear transport_is_reliable.
6655 (putpkt_binary): Don't expect acks in noack mode.
6656 (getpkt): Don't send ack/nac in noack mode.
6657 * server.c (handle_general_set): Handle QStartNoAckMode.
6658 (handle_query): If connected by tcp pass QStartNoAckMode+ in
6659 qSupported.
6660 (main): Reset noack_mode on every connection.
6661 * server.h (noack_mode): Declare.
6662
a417dc56
RW
66632008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6664
6665 * Makefile.in (GDBREPLAY_OBS): New variable.
6666 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
6667
3221518c
UW
66682008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
6669 Daniel Jacobowitz <dan@codesourcery.com>
6670
6671 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
6672 (usr_store_inferior_registers): Likewise.
6673 (regsets_store_inferior_registers): Likewise.
6674
ec56be1b
PA
66752008-07-31 Rolf Jansen <rj@surtec.com>
6676 Pedro Alves <pedro@codesourcery.com>
6677
6678 * configure.ac: Check for memmem declaration.
6679 * server.c [HAVE_MALLOC_H]: Include malloc.h.
6680 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
6681 (disable_packet_qfThreadInfo): Unconditionally compile.
6682 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
6683 * configure, config.in: Regenerate.
6684
2fe5e3ff
DE
66852008-07-28 Doug Kwan <dougkwan@google.com>
6686
6687 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
6688 (linux_write_memory): Remove declaration of errno.
6689
836acd6d
UW
66902008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
6691
6692 * linux-low.c (handle_extended_wait): Do not use "status"
6693 variable uninitialized.
6694
aeba519e
PA
66952008-07-07 Pedro Alves <pedro@codesourcery.com>
6696
6697 * server.c (handle_v_attach): Inhibit reporting dll changes.
6698
db42f210
PA
66992008-06-27 Pedro Alves <pedro@codesourcery.com>
6700
6701 * remote-utils.c (prepare_resume_reply): If requested, don't
6702 output "thread:TID" in the T stop reply.
6703
6704 * server.c (disable_packet_vCont, disable_packet_Tthread)
6705 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
6706 (handle_query): If requested, disable support for qC, qfThreadInfo
6707 and qsThreadInfo.
6708 (handle_v_requests): If requested, disable support for vCont.
6709 (gdbserver_show_disableable): New.
6710 (main): Handle --disable-packet and --disable-packet=LIST.
6711
6712 * server.h (disable_packet_vCont, disable_packet_Tthread)
6713 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
6714
8e4c5421
CD
67152008-06-20 Carlos O'Donell <carlos@codesourcery.com>
6716
6717 * server.c (gdbserver_usage): Mention --version.
6718
6e23a804
DJ
67192008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
6720
6721 * Makefile.in (gdbreplay.o): New rule.
6722
90aa6a40
JM
67232008-06-06 Joseph Myers <joseph@codesourcery.com>
6724
6725 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
6726 message, not gdbserver.
6727
c16158bc 67282008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
6729 Nathan Sidwell <nathan@codesourcery.com>
6730 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
6731
6732 * acinclude.m4: Include ../../config/acx.m4.
6733 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
6734 * configure, config.in: Regenerate.
6735 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
6736 * server.c (gdbserver_version): Print PKGVERSION.
6737 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
6738 (main): Adjust gdbserver_usage calls.
6739 * gdbreplay.c (version, host_name): Add declarations.
6740 (gdbreplay_version, gdbreplay_usage): New.
6741 (main): Accept --version and --help options.
6742
aeb75bf5
DJ
67432008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
6744
6745 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
6746 (arm_breakpoint_at): Handle Thumb.
6747 (the_low_target): Add comment.
6748
76b233dd
UW
67492008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
6750
6751 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
6752
08388c79
DE
67532008-05-09 Doug Evans <dje@google.com>
6754
a3c83fae
DE
6755 * server.h (decode_search_memory_packet): Declare.
6756 * remote-utils.c (decode_search_memory_packet): New fn.
6757 * server.c (handle_search_memory_1): New fn.
08388c79
DE
6758 (handle_search_memory): New fn.
6759 (handle_query): Process qSearch:memory packets.
6760
bb9c3d36
UW
67612008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
6762
6763 * regcache.c (registers_length): Remove.
6764 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
6765 full register packet.
6766 * regcache.h (registers_length): Remove prototype.
6767 * server.h (PBUFSIZ): Define to 16384.
6768
7284e1be
UW
67692008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
6770
6771 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
6772 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
6773 powerpc-64l.o, and powerpc-altivec64l.o.
6774 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
6775 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
6776 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
6777 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
6778 rs6000/power-linux.xml, and rs6000/power64-linux.xml
6779 to srv_xmlfiles.
6780
6781 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
6782 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
6783 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
6784 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
6785 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
6786 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
6787 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
6788 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
6789 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
6790 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
6791 (clean): Update.
6792
6793 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
6794 (init_registers_powerpc_32l): ... this new prototype.
6795 (init_registers_powerpc_32): Remove, replace by ...
6796 (init_registers_powerpc_altivec32l): ... this new prototype.
6797 (init_registers_powerpc_e500): Remove, replace by ...
6798 (init_registers_powerpc_e500l): ... this new prototype.
6799 (init_registers_ppc64): Remove, replace by ...
6800 (init_registers_powerpc_64l): ... this new prototype.
6801 (init_registers_powerpc_64): Remove, replace by ...
6802 (init_registers_powerpc_altivec64l): ... this new prototype.
6803 (ppc_num_regs): Set to 73.
6804 (PT_ORIG_R3, PT_TRAP): Define if necessary.
6805 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
6806 (ppc_cannot_store_register): Handle orig_r3 and trap.
6807 (ppc_arch_setup): Update init_registers_... calls.
6808 (ppc_fill_gregset): Handle orig_r3 and trap.
6809
6810 * inferiors.c (clear_inferiors): Reset current_inferior.
6811
fdc59709
PB
68122008-04-23 Paolo Bonzini <bonzini@gnu.org>
6813
889bf7c5
PA
6814 * acinclude.m4: Add override.m4.
6815 * configure: Regenerate.
fdc59709 6816
c9b2f845
UW
68172008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
6818
6819 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
6820 initial call to init_register_ppc64.
6821
550512b8
UW
68222008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
6823
43aaf8b6
PA
6824 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
6825 single powerpc*-*-linux* case.
550512b8
UW
6826 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
6827
b6430ec3
UW
68282008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
6829
6830 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 6831 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
6832 from reg_xmlfiles.
6833 * linux-ppc-low.c: Include <elf.h>.
6834 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
6835 (ppc_hwcap): New global variable.
6836 (ppc_regmap): Remove __SPE__ #ifdef sections.
6837 (ppc_regmap_e500): New global variable.
6838 (ppc_cannot_store_register): Update __SPE__ special case.
6839 (ppc_get_hwcap): New function.
6840 (ppc_arch_setup): Use it to determine whether inferior supports
6841 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
6842 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
6843 Do not access registers if target does not support AltiVec.
6844 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
6845 Do not access registers if target does not support SPE.
6846 (target_regsets): Unconditionally include AltiVec and SPE regsets.
6847
52fa2412
UW
68482008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
6849
6850 * linux-low.c (disabled_regsets, num_regsets): New.
6851 (use_regsets_p): Delete.
6852 (linux_wait_for_process): Clear disabled_regsets.
6853 (regsets_fetch_inferior_registers): Check and set it.
6854 (regsets_store_inferior_registers): Likewise.
6855 (linux_fetch_registers, linux_store_registers): Do not use
6856 use_regsets_p.
6857 (initialize_low): Allocate disabled_regsets.
6858
e28b3332
DJ
68592008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
6860
6861 * Makefile.in (LIBOBJS): New.
6862 (OBS): Use LIBOBJS.
6863 (memmem.o): New rule.
6864 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
6865 * configure: Regenerated.
6866
4536995d
UW
68672008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
6868
6869 * server.c (handle_query): Never return "unsupported" for
6870 qXfer:features:read queries.
6871
221c031f
UW
68722008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
6873
6874 * server.c (get_features_xml): Fix inverted condition.
6875 (handle_query): Always support qXfer:feature:read.
6876
ccd213ac
DJ
68772008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
6878
6879 * server.c (wrapper_argv): New.
6880 (start_inferior): Handle wrapper_argv. If set, expect an extra
6881 trap.
6882 (gdbserver_usage): Document --wrapper.
6883 (main): Parse --wrapper.
6884
6fe305f7
UW
68852008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6886
6887 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
6888 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
6889 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
6890 (ppc_set_pc): Likewise.
6891 (ppc_arch_setup): New function.
6892 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
6893 of collect_register.
889bf7c5 6894 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 6895
5b0a002e
UW
68962008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6897
6898 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
6899 instead of linux-ppc64-low.o.
6900 * linux-ppc64-low.c: Remove file.
6901 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
6902 (linux-ppc64-low.o): Remove rule.
6903
6904 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
6905 (init_registers_powerpc_64): Likewise.
6906 (ppc_regmap): Conditionally define depending on __powerpc64__.
6907 (ppc_cannot_store_register): Do not special-case "fpscr" when
6908 compiled on __powerpc64__.
6909 (ppc_collect_ptrace_register): New function.
6910 (ppc_supply_ptrace_register): New function.
6911 (ppc_breakpoint): Change type to "unsigned int".
6912 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
6913 (the_low_target): Conditionally provide initializers for the
889bf7c5 6914 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
6915 collect_ptrace_register and supply_ptrace_register members.
6916
9b4b61c8
UW
69172008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6918
6919 * regcache.h (gdbserver_xmltarget): Add extern declaration.
6920 * server.c (gdbserver_xmltarget): Define.
6921 (get_features_xml): Use it to replace "target.xml" and arch_string.
6922
6923 * configure.srv: Remove srv_xmltarget. Add XML files that were
6924 mentioned there to srv_xmlfiles instead. Remove conditional tests
6925 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
6926 srv_xmlfiles and srv_regobj to include all possible choices.
6927 * configure.ac (srv_xmltarget): Remove.
6928 (srv_xmlfiles): Do not add "target.xml".
6929 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
6930 checks for supplementary target information.
6931 * configure: Regenerate.
6932 * Makefile.in (XML_TARGET): Remove.
6933 (target.xml): Remove rule.
6934 (clean): Do not clean up target.xml.
6935 (.PRECIOUS): Do not mention target.xml.
6936
6937 * target.h (struct target_ops): Remove arch_string member.
6938 * linux-low.c (linux_arch_string): Remove.
6939 (linux_target_ops): Remove arch_string initializer.
6940 * linux-low.h (struct linux_target_ops): Remove arch_string member.
6941 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
6942 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
6943 * spu-low.c (spu_arch_string): Remove.
6944 (spu_target_ops): Remove arch_string initializer.
6945 * win32-low.c (win32_arch_string): Remove.
6946 (win32_target_ops): Remove arch_string initializer.
6947 * win32-low.h (struct win32_target_ops): Remove arch_string member.
6948 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
6949 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
6950
ee1a7ae4
UW
69512008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
6952
6953 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
6954 by collect_ptrace_register and supply_ptrace_register hooks.
6955 * linux-low.c (fetch_register): Use supply_ptrace_register callback
6956 instead of checking for the_low_target.left_pad_xfer.
6957 (usr_store_inferior_registers): Use collect_ptrace_register callback
6958 instead of checking for the_low_target.left_pad_xfer.
6959
6960 * linux-s390-low.c (s390_collect_ptrace_register): New function.
6961 (s390_supply_ptrace_register): Likewise.
6962 (s390_fill_gregset): Call s390_collect_ptrace_register.
6963 (the_low_target): Update.
6964
6965 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
6966 (ppc_supply_ptrace_register): Likewise.
6967 (the_low_target): Update.
6968
6969 * linux-i386-low.c (the_low_target): Update.
6970 * linux-x86-64-low.c (the_low_target): Update.
6971
d61ddec4
UW
69722008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
6973
6974 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
6975 reg-s390.o and reg-s390x.o.
6976
6977 * linux-low.c (new_inferior): New global variable.
6978 (linux_create_inferior, linux_attach): Set it.
6979 (linux_wait_for_process): Call the_low_target.arch_setup after the
6980 target has stopped for the first time.
6981 (initialize_low): Do not call the_low_target.arch_setup.
6982
6983 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
6984 (s390_set_pc): Likewise.
6985 (s390_arch_setup): New function.
6986 (the_low_target): Use s390_arch_setup as arch_setup routine.
6987
6988 * regcache.c (realloc_register_cache): New function.
6989 (set_register_cache): Call it for each existing regcache.
6990
d05b4ac3
UW
69912008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
6992
6993 * server.h (init_registers): Remove prototype.
6994
6995 * linux-low.h (struct linux_target_ops): Add arch_setup field.
6996 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
6997 instead of init_registers ().
6998 * linux-arm-low.c (init_registers_arm): Add prototype.
6999 (init_registers_arm_with_iwmmxt): Likewise.
7000 (the_low_target): Add initializer for arch_setup field.
7001 * linux-cris-low.c (init_registers_cris): Add prototype.
7002 (the_low_target): Add initializer for arch_setup field.
7003 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
7004 (the_low_target): Add initializer for arch_setup field.
7005 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
7006 (the_low_target): Add initializer for arch_setup field.
7007 * linux-ia64-low.c (init_registers_ia64): Add prototype.
7008 (the_low_target): Add initializer for arch_setup field.
7009 * linux-m32r-low.c (init_registers_m32r): Add prototype.
7010 (the_low_target): Add initializer for arch_setup field.
7011 * linux-m68k-low.c (init_registers_m68k): Add prototype.
7012 (the_low_target): Add initializer for arch_setup field.
7013 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
7014 (init_registers_mips64_linux): Likewise.
7015 (the_low_target): Add initializer for arch_setup field.
7016 * linux-ppc-low.c (init_registers_ppc): Add prototype.
7017 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
7018 (the_low_target): Add initializer for arch_setup field.
7019 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
7020 (init_registers_powerpc_64): Likewise.
7021 (the_low_target): Add initializer for arch_setup field.
7022 * linux-s390-low.c (init_registers_s390): Add prototype.
7023 (init_registers_s390x): Likewise.
7024 (the_low_target): Add initializer for arch_setup field.
7025 * linux-sh-low.c (init_registers_sh): Add prototype.
7026 (the_low_target): Add initializer for arch_setup field.
7027 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
7028 (the_low_target): Add initializer for arch_setup field.
7029 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
7030 (the_low_target): Add initializer for arch_setup field.
7031
7032 * win32-low.h (struct win32_target_ops): Add arch_setup field.
7033 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
7034 instead of init_registers ().
7035 * win32-arm-low.c (init_registers_arm): Add prototype.
7036 (the_low_target): Add initializer for arch_setup field.
7037 * win32-i386-low.c (init_registers_i386): Add prototype.
7038 (the_low_target): Add initializer for arch_setup field.
7039
7040 * spu-low.c (init_registers_spu): Add prototype.
7041 (initialize_low): Call initialie_registers_spu () instead of
7042 initialize_registers ().
7043
fd96d250
PA
70442008-02-19 Pedro Alves <pedro@codesourcery.com>
7045
7046 * server.c (handle_v_requests): When handling the vRun and vAttach
7047 packets, if already debugging a process, don't kill it. Return an
7048 error instead.
7049
d41b6bb4
DJ
70502008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
7051
7052 * server.c (handle_query): Correct length check.
7053
5ac588cf
PA
70542008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
7055
7056 * win32-low.c (do_initial_child_stuff): Add process handle
7057 parameter. Set current_process_handle and current_process_id from the
7058 parameters. Clear globals.
7059 (win32_create_inferior): Don't set current_process_handle and
7060 current_process_id here. Instead pass them on the call to
7061 do_initial_child_stuff.
7062 (win32_attach): Likewise.
7063 (win32_clear_inferiors): New.
7064 (win32_kill): Don't close the current process handle or the
7065 current thread handle here. Instead call win32_clear_inferiors.
7066 (win32_detach): Don't open a new handle to the process. Call
7067 win32_clear_inferiors.
7068 (win32_join): Don't rely on current_process_handle; open a new
7069 handle using the process id.
7070 (win32_wait): Call win32_clear_inferiors when the inferior process
7071 has exited.
7072
ecd7ecbc
DJ
70732008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
7074
7075 * server.c (monitor_show_help): Add "exit".
7076
1525d545
MG
70772008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
7078
ecd7ecbc 7079 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
7080 (clean): Add reg-xtensa.c.
7081 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
7082 * configure.srv (xtensa*-*-linux*) New target.
7083 * linux-xtensa-low.c: New.
7084 * xtensa-xtregs.c: New.
1525d545 7085
59a016f0
PA
70862008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
7087
7088 * hostio.c: Don't include errno.h.
7089 (errno_to_fileio_errno): Move to hostio-errno.
7090 * hostio.c: (hostio_error): Remove the error parameter. Defer the
7091 error number outputting to the target->hostio_last_error callback.
7092 (hostio_packet_error): Use FILEIO_EINVAL directly.
7093 (handle_open, handle_pread, hostio_error, handle_unlink): Update
7094 calls to hostio_error.
7095 * hostio-errno.c: New.
7096 * server.h (hostio_last_error_from_errno): Declare.
7097 * target.h (target_ops): Add hostio_last_error member.
7098 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
7099 as hostio_last_error handler.
889bf7c5 7100 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
7101 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
7102 (wince_hostio_last_error): New functions.
7103 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
7104 as hostio_last_error handler.
7105 (win32_target_ops) [!_WIN32_WCE]: Register
7106 hostio_last_error_from_errno as hostio_last_error handler.
7107 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
7108 (hostio-errno.o): New rule.
7109 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
7110 * configure.srv (srv_hostio_err_objs): New variable. Default to
7111 hostio-errno.o.
7112 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
7113 * configure: Regenerate.
7114
2d717e4f
DJ
71152008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7116
7117 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
7118 (linux_kill, linux_detach): Clean up the process list.
7119 * remote-utils.c (remote_open): Improve port number parsing.
7120 (putpkt_binary, input_interrupt): Only send interrupts if the target
7121 is running.
7122 * server.c (extended_protocol): Make static.
7123 (attached): Define earlier.
7124 (exit_requested, response_needed, program_argv): New variables.
7125 (target_running): New.
7126 (start_inferior): Clear attached here.
7127 (attach_inferior): Set attached here.
7128 (require_running): Define.
7129 (handle_query): Use require_running and target_running. Implement
7130 "monitor exit".
7131 (handle_v_attach, handle_v_run): New.
7132 (handle_v_requests): Use require_running. Handle vAttach and vRun.
7133 (gdbserver_usage): Update.
7134 (main): Redo argument parsing. Handle --debug and --multi. Handle
7135 --attach along with other options or after the port. Save
7136 program_argv. Support no initial program. Resynchronize
7137 communication with GDB after an error. Handle "monitor exit".
7138 Use require_running and target_running. Always allow the extended
7139 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
7140 restart in extended mode.
7141 * README: Refer to the GDB manual. Update --attach usage.
7142
7407e2de
AS
71432007-12-20 Andreas Schwab <schwab@suse.de>
7144
7145 * linux-low.c (STACK_SIZE): Define.
7146 (linux_tracefork_child): Use it. Use __clone2 on ia64.
7147 (linux_test_for_tracefork): Likewise.
7148
b65d95c5
DJ
71492007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
7150
7151 * linux-low.c (linux_wait_for_event): Update messages. Do not
7152 reinsert auto-delete breakpoints.
7153 * mem-break.c (struct breakpoint): Change return type of handler to
7154 int.
7155 (set_breakpoint_at): Update handler type.
7156 (reinsert_breakpoint_handler): Return 1 instead of calling
7157 delete_breakpoint.
7158 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
7159 setting a new one.
7160 (check_breakpoints): Delete auto-delete breakpoints and return 2.
7161 * mem-break.h (set_breakpoint_at): Update handler type.
7162 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
7163 * win32-low.c (auto_delete_breakpoint): New.
7164 (get_child_debug_event): Use it.
7165
4e799345
DJ
71662007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
7167
7168 * configure.ac: Check for pread and pwrite.
7169 * hostio.c (handle_pread): Fall back to lseek and read.
7170 (handle_pwrite): Fall back to lseek and write.
7171 * config.in, configure: Regenerated.
7172
27524b67
DJ
71732007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
7174
7175 * server.c (myresume): Add own_buf argument.
7176 (main): Update calls.
7177
a20d5e98
DJ
71782007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
7179
7180 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
7181 * remote-utils.c (remote_open): Do not call disable_async_io.
7182 (block_async_io): Delete.
7183 (unblock_async_io): Make static.
7184 (initialize_async_io): New.
7185 * server.c (handle_v_cont): Handle async I/O here.
7186 (myresume): Likewise. Move other common resume tasks here...
7187 (main): ... from here. Call initialize_async_io. Disable async
7188 I/O before the main loop.
7189 * server.h (initialize_async_io): Declare.
7190 (block_async_io, unblock_async_io): Delete prototypes.
7191 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
7192
b79d787e
DJ
71932007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
7194
7195 * remote-utils.c (readchar): Allow binary data in received messages.
7196
d97903b2
PA
71972007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
7198
7199 * win32-low.c (attaching): New global.
7200 (win32_create_inferior): Clear the `attaching' global.
7201 (win32_attach): Set the `attaching' global.
7202 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
7203 attaching. Only set a breakpoint at the entry point if not
7204 attaching.
7205
311de423
PA
72062007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
7207
7208 * server.c (main): Don't report dll events on the initial
7209 connection on attaches.
7210
6c2d16d2
PA
72112007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
7212
7213 * server.c (main): Relax numerical bases supported for the pid of
7214 the --attach command line argument.
7215
5ca906e6
PA
72162007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
7217
7218 * win32-low.c (win32_attach): Call OpenProcess before
7219 DebugActiveProcess, not after. Add last error output to error
7220 call.
7221
9c6c8194
PA
72222007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
7223
7224 * win32-low.c (win32_get_thread_context)
7225 (win32_set_thread_context): New functions.
7226 (thread_rec): Use win32_get_thread_context.
7227 (continue_one_thread, win32_resume): Use win32_set_thread_context.
7228 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
7229 field.
7230
4d5d1aaa
PA
72312007-12-03 Leo Zayas
7232 Pedro Alves <pedro_alves@portugalmail.pt>
7233
7234 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
7235 global variables.
7236 (child_add_thread): Minor cleanup.
7237 (child_continue): Resume artificially suspended threads before
7238 calling ContinueDebugEvent.
7239 (suspend_one_thread): New.
7240 (fake_breakpoint_event): New.
7241 (get_child_debug_event): Change return type to int. Check here if
7242 gdb sent an interrupt request. If a soft interrupt was requested,
7243 fake a breakpoint event. Return 0 if there is no event to handle,
7244 and 1 otherwise.
7245 (win32_wait): Don't check here if gdb sent an interrupt request.
7246 Ensure there is a valid event to handle.
7247 (win32_request_interrupt): Add soft interruption method as last
7248 resort.
7249
c436e841
PA
72502007-12-03 Leo Zayas
7251 Pedro Alves <pedro_alves@portugalmail.pt>
7252
7253 * win32-low.h (win32_thread_info): Add descriptions to the
7254 structure members. Replace `suspend_count' counter by a
7255 `suspended' flag.
7256 * win32-low.c (thread_rec): Update condition of when to get the
7257 context from the inferior. Rely on ContextFlags being set if it
7258 has already been retrieved. Only suspend the inferior thread if
7259 we haven't already. Warn if that fails.
7260 (continue_one_thread): s/suspend_count/suspended/. Only call
7261 ResumeThread once. Warn if that fails.
7262
e7b5fa67
PA
72632007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
7264
7265 * win32-low.c (win32_wait): Don't read from the inferior when it
7266 has already exited.
7267
a385171d
PA
72682007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
7269
7270 * Makefile.in (win32_low_h): New variable.
7271 (win32-low.o): Add dependency on $(win32_low_h).
7272 (win32-arm-low.o, win32-i386-low.o): New rules.
7273
f80c84b3
DJ
72742007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
7275
7276 * hostio.c: Correct copyright year.
7277
a6b151f1
DJ
72782007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
7279
7280 * Makefile.in (OBS): Add hostio.o.
7281 (hostio.o): New rule.
7282 * server.h (handle_vFile): Declare.
7283 * hostio.c: New file.
7284 * server.c (handle_v_requests): Take packet_len and new_packet_len
7285 for binary packets. Call handle_vFile.
7286 (main): Update call to handle_v_requests.
7287
f9387fc3
DJ
72882007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
7289
7290 * linux-low.c: Include <sched.h>.
7291
51c2684e
DJ
72922007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
7293
7294 * linux-low.c (linux_tracefork_grandchild): New.
7295 (linux_tracefork_child): Use clone.
7296 (linux_test_for_tracefork): Use clone; allocate and free a stack.
7297
75f83163
JB
72982007-10-31 Joel Brobecker <brobecker@adacore.com>
7299
7300 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
7301
da5898ce
DJ
73022007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
7303
7304 * linux-low.c (handle_extended_wait): Handle unexpected signals.
7305
24a09b5f
DJ
73062007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
7307
7308 * inferiors.c (change_inferior_id): Delete.
7309 (add_pid_to_list, pull_pid_from_list): New.
7310 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
7311 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
7312 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
7313 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
7314 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
7315 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
7316 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
7317 (using_threads): Always set to 1.
7318 (handle_extended_wait): New.
7319 (add_process): Do not set TID.
7320 (linux_create_inferior): Set must_set_ptrace_flags.
7321 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
7322 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
7323 (linux_thread_alive): Rename TID argument to LWPID.
7324 (linux_wait_for_process): Handle unknown processes. Do not use TID.
7325 (linux_wait_for_event): Do not use TID or check using_threads. Update
7326 call to dead_thread_notify. Call handle_extended_wait.
7327 (linux_create_inferior): Use PTRACE_SETOPTIONS.
7328 (send_sigstop): Delete sigstop_sent.
7329 (wait_for_sigstop): Avoid TID.
7330 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
7331 (linux_test_for_tracefork): New.
7332 (linux_lookup_signals): Use thread_db_active and
7333 linux_supports_tracefork_flag.
7334 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
7335 * linux-low.h (get_process_thread): Avoid TID.
7336 (struct process_ifo): Move thread_known and tid to the end. Remove
7337 sigstop_sent.
7338 (linux_attach_lwp, thread_db_init): Update prototypes.
7339 * server.h (change_inferior_id): Delete prototype.
7340 (add_pid_to_list, pull_pid_from_list): New prototypes.
7341 * thread-db.c (thread_db_use_events): New.
7342 (find_first_thread): Rename to...
7343 (find_one_thread): ...this. Update callers and messages. Do not
7344 call fatal. Check thread_db_use_events. Do not call
7345 change_inferior_id or new_thread_notify.
7346 (maybe_attach_thread): Update. Do not call new_thread_notify.
7347 (thread_db_init): Set thread_db_use_events. Check use_events.
7348 * utils.c (fatal, warning): Correct message prefix.
7349
30ed0a8f
DJ
73502007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
7351
7352 * Makefile.in (clean): Remove new files.
7353 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
7354 (powerpc-64.o, powerpc-64.c): New rules.
7355 * configure.srv: Use alternate register sets for powerpc64-*-linux*
7356 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
7357 with SPE.
7358 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
7359 SPE targets.
7360 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
7361 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
7362 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
7363 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
7364 (target_regsets): Add AltiVec and SPE register sets.
7365 * configure.ac: Check for AltiVec and SPE.
7366 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
7367 (ppc_fill_vrregset, ppc_store_vrregset): New.
7368 (target_regsets): Add AltiVec register set.
7369 * configure: Regenerated.
7370
fd462a61
DJ
73712007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
7372
7373 * linux-low.c (O_LARGEFILE): Define.
7374 (linux_read_memory): Use /proc/PID/mem.
7375 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
7376 * configure, config.in: Regenerated.
7377
69f223ed
DJ
73782007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
7379
7380 * linux-low.c (linux_wait_for_event): Do not pass signals while
7381 single-stepping.
7382
aec18585
PA
73832007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
7384
7385 * win32-low.c (create_process): New.
7386 (win32_create_inferior): Use create_process instead of
7387 CreateProcess. If create_process failed retry appending an ".exe"
7388 suffix. Store the GetLastError result immediatelly after
7389 create_process calls and use it on the call to error.
7390
34d86ddd
PA
73912007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
7392
7393 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
7394
5a0e3bd0
JB
73952007-08-23 Joel Brobecker <brobecker@adacore.com>
7396
7397 * configure.ac: Switch license to GPLv3.
7398
f88c79e6
MS
73992007-08-01 Michael Snyder <msnyder@access-company.com>
7400
7401 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
7402
6b3d9b83
PA
74032007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
7404
7405 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
7406 typedef.
7407 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
7408 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
7409 CloseToolhelp32Snapshot.
7410 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
7411 CloseToolhelp32Snapshot.
7412
c588c53c
MS
74132007-07-27 Michael Snyder <michael.snyder@access-company.com>
7414
7415 * server.c (main): Check for inferior exit before main loop.
7416
aa0403d9
PA
74172007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
7418
7419 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
7420 instead of on tmp_desc.
7421
255e7678
DJ
74222007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
7423 Daniel Jacobowitz <dan@codesourcery.com>
7424
7425 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
7426 (add_thread): Minor cleanups.
7427 (clear_inferiors): Move lower in the file. Clear the DLL
7428 list.
7429 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
7430 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
7431 (xml_escape_text): New.
7432 * server.c (handle_query): Handle qXfer:libraries:read. Report it
7433 for qSupported.
7434 (handle_v_cont): Report errors.
7435 (gdbserver_version): Update.
7436 (main): Correct size of own_buf. Do not report initial DLL events.
7437 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
7438 (unloaded_dll, xml_escape_text): New.
7439 * win32-low.c (enum target_waitkind): Update comments.
7440 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
7441 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
7442 (win32_EnumProcessModules, win32_GetModuleInformation)
7443 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
7444 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
7445 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
7446 (win32_Module32First, win32_Module32Next, load_toolhelp)
7447 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
7448 (get_child_debug_event): Handle DLL events.
7449 (win32_wait): Likewise.
7450
0d37add9
DJ
74512007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
7452
7453 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
7454 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
7455
45e2715e
PA
74562007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
7457
7458 * win32-low.c (handle_output_debug_string): Ignore event if not
7459 waiting.
7460
c5674cf1
PA
74612007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
7462
7463 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
7464
2bbe3cc1
DJ
74652007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
7466
7467 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
7468
ae13219e
DJ
74692007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
7470
7471 * inferiors.c (change_inferior_id): Add comment.
7472 * linux-low.c (check_removed_breakpoint): Add an early
7473 prototype. Improve debug output.
7474 (linux_attach): Doc update.
7475 (linux_detach_one_process, linux_detach): Clean up before releasing
7476 each process.
7477 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
7478 * linux-low.h (struct process_info): Doc improvement.
7479 * mem-break.c (delete_all_breakpoints): New.
7480 * mem-break.h (delete_all_breakpoints): New prototype.
7481 * thread-db.c (find_first_thread): New.
7482 (thread_db_create_event): Call it instead of
7483 thread_db_find_new_threads. Clean up unused variables.
7484 (maybe_attach_thread): Remove first thread handling.
7485 (thread_db_find_new_threads): Use find_first_thread.
7486 (thread_db_get_tls_address): Likewise.
7487
4105de34
DJ
74882007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
7489
7490 * thread-db.c (thread_db_find_new_threads): Add prototype.
7491 (thread_db_create_event): Check for the main thread before adding
7492 a new thread.
7493 (maybe_attach_thread): Only enable event reporting if TID == 0.
7494 (thread_db_get_tls_address): Check for new threads.
7495
2b876972
DJ
74962007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
7497
7498 * linux-low.c (linux_create_inferior): Try execv before execvp.
7499 * spu-low.c (spu_create_inferior): Likewise.
7500
7a245884
DJ
75012007-06-13 Mike Frysinger <vapier@gentoo.org>
7502
7503 * linux-low.c (linux_create_inferior): Change execv to execvp.
7504 * spu-low.c (spu_create_inferior): Likewies.
7505
117ce543
DJ
75062007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
7507
7508 * Makefile.in (clean): Clean new files instead of deleted ones.
7509 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
7510 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
7511 rules.
7512 * configure.srv: Specify XML files and new regformats for MIPS and
7513 MIPS64 GNU/Linux.
7514 * linux-mips-low.c (mips_num_regs): Set to only used registers.
7515 (mips_regmap): Do not fetch $0. Remove unused registers. Add
7516 an entry for the restart register.
7517 (mips_cannot_fetch_register, mips_cannot_store_register)
7518 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
7519 register names to match the XML descriptions.
7520 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
7521 restart register instead of $0.
7522
0e7f50da
UW
75232007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
7524 Markus Deuling <deuling@de.ibm.com>
7525
7526 * remote-utils.c (decode_xfer_write): New function.
7527 * server.h (decode_xfer_write): Add prototype.
7528 * server.c (handle_query): Add PACKET_LEN argument. Support
7529 qXfer:spu:read and qXfer:spu:write packets.
7530 (main): Pass packet_len to handle_query.
7531 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
7532 * target.h (target_ops): Add qxfer_spu.
7533
374c1d38
UW
75342007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
7535
7536 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
7537 accessing non-seekable spufs files.
7538
bb63802a
UW
75392007-05-16 Markus Deuling <deuling@de.ibm.com>
7540
889bf7c5 7541 * server.c (handle_query): Add reply for qC packet.
bb63802a 7542
7390519e
PA
75432007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7544 Leo Zayas <lerele@champenstudios@com>
7545
7546 * server.h (check_remote_input_interrupt_request): New function.
7547 * remote_utils.c (INVALID_DESCRIPTOR): New define.
7548 (remote_desc): Initialize with INVALID_DESCRIPTOR.
7549 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
7550 (check_remote_input_interrupt_request): New function.
7551 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 7552 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
7553 winapi_GenerateConsoleCtrlEvent): New typedefs.
7554 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
7555 to 250 ms.
7556 (win32_wait): Check for remote interrupt request
7557 with check_remote_input_interrupt_request.
7558 (win32_request_interrupt): New function.
7559 (win32_target_op): Set request_interrupt to win32_request_interrupt.
7560
34b34921
PA
75612007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7562
7563 * win32-low.c (debug_registers_changed,
7564 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
7565 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
7566 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
7567 (thread_rec): Get context using the low target.
7568 (child_add_thread): Call thread_added on the low target,
7569 which does the same thing.
7570 (regptr): Delete.
7571 (do_initial_child_stuff): Remove debug registers references.
7572 Set context using the low target. Resume threads after
7573 setting the contexts.
7574 (child_continue): Remove dead variable. Remove debug
7575 registers references.
7576 (child_fetch_inferior_registers): Go through the low target.
7577 (do_child_store_inferior_registers): Remove.
7578 (child_store_inferior_registers): Go through the low target.
7579 (win32_resume): Remove debug registers references.
7580 Set context using the low target.
7581 (handle_exception): Change return type to void. Don't record
7582 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
7583 first chance exception.
889bf7c5 7584 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
7585 goto loop. Always return after waiting for debug event.
7586 (win32_wait): Convert to switch statement. Handle spurious
7587 events.
7588
7589 * win32-i386-low.c (debug_registers_changed,
7590 debug_registers_used): New.
7591 (initial_stuff): Rename to ...
7592 (i386_initial_stuff): ... this. Clear debug registers
7593 state variables.
7594 (store_debug_registers): Delete.
7595 (i386_get_thread_context): New.
7596 (load_debug_registers): Delete.
7597 (i386_set_thread_context): New.
7598 (i386_thread_added): New.
7599 (single_step): Rename to ...
7600 (i386_single_step): ... this.
7601 (do_fetch_inferior_registers): Rename to ...
7602 (i386_fetch_inferior_register): ... this.
7603 (i386_store_inferior_register): New.
7604 (the_low_target): Adapt to new interface.
7605
7606 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
7607 (arm_get_thread_context): New.
7608 (arm_set_thread_context): New.
7609 (regptr): New.
7610 (do_fetch_inferior_registers): Rename to ...
7611 (arm_fetch_inferior_register): ... this.
7612 (arm_store_inferior_register): New.
7613 (arm_wince_breakpoint): Reimplement as unsigned long.
7614 (arm_wince_breakpoint_len): Define.
7615 (the_low_target): Adapt to new interface.
7616
7617 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
7618 load_debug_registers. Add get_thread_context, set_thread_context,
7619 thread_added and store_inferior_register. Rename
7620 fetch_inferior_registers to fetch_inferior_register.
7621 (regptr): Remove declaration.
7622
dd6953e1
PA
76232007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7624
7625 * linux-low.c (linux_detach): Change return type to int. Return 0.
7626 * spu-low.c (spu_detach): Likewise.
7627
444d6139
PA
76282007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7629
7630 * target.h (target_ops): Change return type of detach to int.
7631 Add join.
7632 (join_inferior): New.
7633 * server.c (main): Don't skip detach support on mingw32.
7634 If the inferior doesn't support detaching return error.
7635 Call join_inferior instead of using waitpid.
7636 * linux-low.c (linux_join): New.
7637 (linux_target_op): Add linux_join.
7638 * spu-low.c (spu_join): New.
7639 (spu_target_ops): Add spu_join.
7640 * win32-low.c (win32_detach): Adapt to new interface.
7641 Reopen current_process_handle before detaching. Issue a child
7642 resume before detaching.
7643 (win32_join): New.
7644 (win32_target_op): Add win32_join.
7645
1d5315fe
PA
76462007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7647
7648 * win32-low.c (win32-attach): Fix return value.
7649 * target.h (target_ops): Describe ATTACH return values.
7650
bf914831
PA
76512007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7652
7653 * win32-low.c (GETPROCADDRESS): Define.
7654 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
7655 (winapi_DebugSetProcessKillOnExit): Likewise.
7656 (win32_create_inferior): Force usage of ansi CreateProcessA.
7657 (win32_attach): Use GETPROCADDRESS.
7658 (win32_detach): Likewise.
7659
f72f3e60
PA
76602007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
7661
7662 * win32-low.c (win32_wait): Don't use WSTOPSIG.
7663
ed50f18f
PA
76642007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
7665
7666 * win32-low.c: Commit leftover changes from 2007-03-29.
7667
0c2ead7e
DJ
76682007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
7669
7670 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
7671 fields short instead of int. Add explicit padding.
7672 (i387_cache_to_fsave): Remove unnecessary casts.
7673 (i387_fsave_to_cache): Doc fix.
7674 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
7675
73725ff3
DJ
76762007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
7677
7678 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
7679 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
7680
d99f33d8
PA
76812007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
7682
7683 * configure.srv (arm*-*-mingw32ce*): Move near the other
7684 arm targets.
7685
68070c10
PA
76862007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
7687
2482afc6 7688 * configure.ac: Add errno checking.
68070c10
PA
7689 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
7690 sys/file.h and malloc.h.
7691 (AC_CHECK_DECLS): Add perror.
7692 (srv_mingwce): Handle.
2482afc6 7693 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
7694 win32-i386-low.o to srv_tgtobj.
7695 (i[34567]86-*-mingw*): Likewise.
7696 (arm*-*-mingw32ce*): Add case.
7697 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
7698 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
7699 [__MINGW32CE__] (strerror): New function.
7700 [__MINGW32CE__] (errno): Define to GetLastError.
7701 [__MINGW32CE__] (COUNTOF): New macro.
7702 (remote_open): Remove extra close call.
7703 * mem-break.c (delete_breakpoint_at): New function.
7704 * mem-break.h (delete_breakpoint_at): Declare.
7705 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
7706 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
7707 [USE_WIN32API] (read, write): Add char* casts.
7708 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
7709 * server.h: Include wincecompat.h on Windows CE.
7710 [HAVE_ERRNO_H]: Check.
7711 (perror): Declare if not declared.
7712 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
7713 (perror_with_name): Remove errno declaration.
7714 * wincecompat.h: New.
7715 * wincecompat.c: New.
7716 * win32-low.h: New.
7717 * win32-arm-low.c: New.
7718 * win32-i386-low.c: New.
7719 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
7720 (OUTMSG2): Make it safe.
7721 (_T): New macro.
7722 (COUNTOF): New macro.
7723 (NUM_REGS): Get it from the low target.
7724 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
7725 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
7726 (thread_rec): Let low target handle debug registers.
7727 (child_add_thread): Likewise.
7728 (child_init_thread_list): Likewise.
7729 (continue_one_thread): Likewise.
7730 (regptr): New.
7731 (do_child_fetch_inferior_registers): Move to ...
7732 * win32-i386-low.c: ... here, and rename to ...
7733 (do_fetch_inferior_registers): ... this.
889bf7c5 7734 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
7735 Go through the low target.
7736 (do_child_store_inferior_registers): Use regptr.
7737 (strwinerror): New function.
7738 (win32_create_inferior): Handle Windows CE.
7739 Use strwinerror instead of strerror on Windows error
7740 codes. Add program to the error output.
7741 Don't close the main thread handle on Windows CE.
7742 (win32_attach): Use coredll.dll on Windows CE.
7743 (win32_kill): Close current process and current
7744 thread handles.
7745 (win32_detach): Use coredll.dll on Windows CE.
7746 (win32_resume): Let low target handle debug registers, and
7747 step request.
7748 (handle_exception): Add/Remove initial breakpoint. Avoid
7749 non-existant WSTOPSIG on Windows CE.
7750 (win32_read_inferior_memory): Cast to remove warning.
7751 (win32_arch_string): Go through the low target.
7752 (initialize_low): Call set_breakpoint_data with the low
7753 target's breakpoint.
7754 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
7755 FOP_REGNUM, mappings): Move to ...
7756 * win32-i386-low.c: ... here.
7757 * win32-low.c (win32_thread_info): Move to ...
7758 * win32-low.h: ... here.
7759 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
7760 win32-arm-low.c and wincecompat.c.
7761 (all:): Add $EXEEXT.
7762 (install-only:): Likewise.
7763 (gdbserver:): Likewise.
7764 (gdbreplay:): Likewise.
7765 * config.in: Regenerate.
7766 * configure: Regenerate.
7767
41093d81
PA
77682007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
7769
7770 * win32-low.c: Rename typedef thread_info to
7771 win32_thread_info throughout.
7772
544afa54
PA
77732007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
7774
7775 * win32-i386-low.c: Rename to ...
7776 * win32-low.c: ... this.
7777 * configure.srv: Replace win32-i386-low.o with win32-low.o.
7778 * Makefile.in: Likewise.
7779
bce7165d
PA
77802007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
7781
7782 * remote-utils.c (monitor_output): Constify msg parameter.
7783 * server.h (monitor_output): Likewise.
7784 * win32-i386-low.c (handle_output_debug_string): New.
7785 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
7786 handle_output_debug_string.
7787 (get_child_debug_event): Likewise.
7788
506c7aa0
DJ
77892007-03-27 Mat Hostetter <mat@lcs.mit.edu>
7790
7791 * server.c (main): Correct strtoul check.
7792
42c81e2a
DJ
77932007-03-27 Jon Ringle <jon@ringle.org>
7794
7795 * linux-low.c: Check __ARCH_HAS_MMU__ also.
7796
9453113a
DJ
77972007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
7798
7799 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
7800
64a69107
DJ
78012007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
7802
7803 * terminal.h: Check HAVE_SGTTY_H.
7804
78052007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
7806
7807 * remote-utils.c (remote_open): Print out the assigned port number.
7808
c74d0ad8
DJ
78092007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
7810
7811 * remote-utils.c (monitor_output): New function.
7812 * server.c (debug_threads): Define here.
7813 (monitor_show_help): New function.
7814 (handle_query): Handle qRcmd.
7815 (main): Do not handle 'd' packet.
7816 * server.h (debug_threads, remote_debug, monitor_output): Declare.
7817 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
7818 of debug_threads.
7819
de7c3b4a
PA
78202007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
7821
7822 * Makefile.in (EXEEXT): New.
7823 (clean): Use $(EXEEXT).
7824
ef57601b
PA
78252007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
7826
7827 * target.h (target_ops): Rename send_signal to request_interrupt,
7828 and remove enum target_signal parameter.
7829 * linux-low.c (linux_request_interrupt): Rename from
7830 linux_send_signal, and always send SIGINT.
7831 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
7832 and always send SIGINT.
7833 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
7834 of send_signal.
7835 (input_interrupt): Likewise.
7836
820f2bda
PA
78372007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
7838
7839 * server.c (get_features_xml): Check if target implemented
7840 arch_string.
7841 * win32-i386-low.c (win32_arch_string): New.
7842 (win32_target_ops): Add win32_arch_string as arch_string member.
7843
ab39bf24
UW
78442007-02-22 Markus Deuling <deuling@de.ibm.com>
7845
7846 * spu-low.c (spu_arch_string): New.
7847 (spu_target_ops): Add spu_arch_string.
7848
61ff6e04
DJ
78492007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
7850
7851 * remote-utils.c: Remove HAVE_TERMINAL_H check.
7852 * configure.ac: Do not check for terminal.h.
7853 * configure, config.in: Regenerated.
7854
fb1e4ffc
DJ
78552007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
7856
7857 * Makefile.in (OBS): Add $(XML_BUILTIN).
7858 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
7859 (clean): Update.
7860 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
7861 (arm-with-iwmmxt.c): New.
7862 * config.in, configure: Regenerate.
7863 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
7864 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
7865 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
7866 (arm*-*-linux*): Add iWMMXt and regset support.
7867 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
7868 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
7869 (arm_store_wmmxregset, target_regsets): New.
7870 * server.c (get_features_xml): Take annex argument. Check builtin
7871 XML documents.
7872 (handle_query): Handle multiple annexes.
7873
0f48aa01
DJ
78742007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7875
7876 * remote-utils.c [USE_WIN32API] (read, write): Define.
7877 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
7878 write.
7879
23181151
DJ
78802007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
7881
7882 * linux-i386-low.c (the_low_target): Set arch_string.
7883 * linux-x86-64-low.c (the_low_target): Likewise.
7884 * linux-low.c (linux_arch_string): New.
7885 (linux_target_ops): Add it.
7886 * linux-low.h (struct linux_target_ops): Add arch_string.
7887 * server.c (write_qxfer_response): Use const void * for DATA.
7888 (get_features_xml): New.
7889 (handle_query): Handle qXfer:features:read. Report it for qSupported.
7890 * target.h (struct target_ops): Add arch_string method.
7891
9d606399
DJ
78922007-01-03 Denis Pilat <denis.pilat@st.com>
7893 Daniel Jacobowitz <dan@codesourcery.com>
7894
7895 * linux-low.c (linux_kill): Handle being called with no threads.
7896 * win32-i386-low.c (win32_kill): Likewise.
7897 (get_child_debug_event): Clear current_process_handle.
7898
78992006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
7900 Daniel Jacobowitz <dan@codesourcery.com>
7901
7902 * remote-utils.c (remote_open): Check the type of specified
7903 serial port devices before opening them.
7904 * server.c (main): Kill the inferior if an error occurs during
7905 the first remote_open.
7906
a5e13d24
DJ
79072006-12-05 Markus Deuling <deuling@de.ibm.com>
7908
7909 * README: Update supported targets.
7910
186947f7
DJ
79112006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
7912
7913 * Makefile.in (clean): Remove reg-mips64.c.
7914 (reg-mips64.c, reg-mips64.o): New rules.
7915 * configure.srv: Handle mips64. Include regset support for mips.
7916 * linux-mips-low.c (union mips_register): New.
7917 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
7918 (mips_breakpoint, mips_breakpoint_at): Use int.
7919 (mips_collect_register, mips_supply_register)
7920 (mips_collect_register_32bit, mips_supply_register_32bit)
7921 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7922 (mips_store_fpregset, target_regsets): New.
7923 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
7924
a13e2c95
UW
79252006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
7926
7927 * configure.srv: Add target "spu*-*-*".
7928 * Makefile.in (clean): Remove reg-spu.c.
7929 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
7930 * spu-low.c: New file.
7931
cb7283db
DJ
79322006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
7933
7934 * configure.ac: Correct td_thr_tls_get_addr test.
7935 * configure: Regenerated.
7936
89be2091
DJ
79372006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
7938
7939 * linux-low.c (linux_wait_for_event): Reformat. Use the
7940 pass_signals array.
7941 * remote-utils.c (decode_address_to_semicolon): New.
7942 * server.c (pass_signals, handle_general_set): New.
7943 (handle_query): Mention QPassSignals for qSupported.
7944 (main): Call handle_general_set.
7945 * server.h (pass_signals, decode_address_to_semicolon): New.
7946
000ef4f0
DJ
79472006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
7948
7949 * server.c (handle_query): Correct error handling for read_auxv.
7950
b7149293
UW
79512005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
7952
7953 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
7954 and srv_linux_thread_db to yes.
7955 * linux-s390-low.c (s390_fill_gregset): New function.
7956 (target_regsets): Define data structure.
7957
dae5f5cf
DJ
79582006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
7959
7960 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
7961 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
7962 * config.in, configure: Regenerated.
7963 * inferiors.c (gdb_id_to_thread): New function.
7964 (gdb_id_to_thread_id): Use it.
7965 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
7966 * linux-low.h (struct process_info): Add th member.
7967 (thread_db_get_tls_address): New prototype.
7968 * remote-utils.c (decode_address): Make non-static.
7969 * server.c (handle_query): Handle qGetTLSAddr.
7970 * server.h (gdb_id_to_thread, decode_address): New prototypes.
7971 * target.h (struct target_ops): Add get_tls_address.
7972 * thread-db.c (maybe_attach_thread): Save the thread handle.
7973 (thread_db_get_tls_address): New.
7974
32ca6d61
DJ
79752006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
7976
7977 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
7978 (linux_resume_one_process): Take a siginfo_t *. Update all
7979 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
7980 (struct pending_signals): Add a siginfo_t.
7981 (linux_wait_for_process): Always set last_status.
7982 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
7983 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
7984 * linux-low.h (struct process_info): Add last_status.
7985
5ffff7c1
DJ
79862006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
7987
7988 * remote-utils.c (try_rle): New function.
7989 (putpkt_binary): Use it.
7990
8695c747
DJ
79912006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
7992
7993 * Makefile.in (clean): Clean reg-x86-64-linux.c.
7994 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
7995 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
7996 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
7997 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
7998 point registers.
7999
290fadea
RS
80002006-08-08 Richard Sandiford <richard@codesourcery.com>
8001
8002 * server.c (terminal_fd): New variable.
8003 (old_foreground_pgrp): Likewise.
8004 (restore_old_foreground_pgrp): New function.
8005 (start_inferior): Record the terminal file descriptor in terminal_fd
8006 and its original foreground group in old_foreground_pgrp. Register
8007 restore_old_foreground_pgrp with atexit().
8008
9f2e1e63
DJ
80092006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
8010
8011 * server.c (handle_query): Correct qPart to qXfer.
8012
b80864fb
DJ
80132006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
8014
8015 * configure.ac: Check for more headers which are missing on
8016 Windows. Automatically supply -lwsock32 and USE_WIN32API.
8017 * configure.srv: Add Cygwin and mingw32.
8018 * remote-utils.c: Don't include headers unconditionally which
8019 are missing on mingw32. Include <winsock.h> for mingw32.
8020 (remote_open): Adjust for mingw32 support. Flush
8021 standard error after writing to it.
8022 (remote_close, putpkt_binary, input_interrupt, block_async_io)
8023 (unblock_async_io, enable_async_io, disable_async_io)
8024 (readchar, getpkt): Update for Winsock support.
8025 (prepare_resume_reply): Expect a protocol signal number.
8026 * server.c: Disable <sys/wait.h> on mingw32.
8027 (start_inferior): Adjust for mingw32 support. Flush
8028 standard error after writing to it.
8029 (attach_inferior): Likewise. Use protocol signal
8030 numbers.
8031 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
8032 and names.
8033 * win32-i386-low.c: New file.
8034 * Makefile.in (XM_CLIBS): Set.
8035 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
8036 (win32-i386-low.o): New dependency rule.
8037 * linux-low.c (linux_wait): Use target signal numbers.
8038 * target.h (struct target_ops): Doc fix.
8039 * server.h (target_signal_to_name): New prototype.
8040 * gdbreplay.c: Don't include headers unconditionally which
8041 are missing on mingw32. Include <winsock.h> for mingw32.
8042 (remote_close, remote_open): Adjust for Winsock support.
8043 * configure, config.in: Regenerated.
8044
0876f84a
DJ
80452006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
8046
8047 * server.c (decode_xfer_read, write_qxfer_response): New.
8048 (handle_query): Take a packet length argument. Handle
8049 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
8050 the qSupported response.
8051 (main): Update call to handle_query.
8052
01f9e8fa
DJ
80532006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
8054
8055 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
8056 (putpkt_binary): Renamed from putpkt and adjusted for binary
8057 data.
8058 (putpkt): New wrapper for putpkt_binary.
8059 (readchar): Don't mask off the high bit.
8060 (decode_X_packet): New function.
8061 * server.c (main): Call putpkt_binary if a handler sets the packet
8062 length. Save the length of the incoming packet. Handle 'X'.
8063 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
8064
be2a5f71
DJ
80652006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
8066
8067 * server.c (handle_query): Handle qSupported.
8068
ea025f5f
DJ
80692006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
8070
8071 * remote-utils.c (all_symbols_looked_up): New variable.
8072 (look_up_one_symbol): Check it.
8073 * server.h (look_up_one_symbol): New declaration.
8074 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
8075
9308fc88
DJ
80762006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
8077
8078 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 8079 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
8080 (PTRACE_GET_THREAD_AREA): Define.
8081 (ps_get_thread_area): New function.
8082
52fb6437
NS
80832006-05-09 Nathan Sidwell <nathan@codesourcery.com>
8084
8085 * configure.srv (m68k*-*-uclinux*): New target.
8086 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
8087 (linux_resume_one_process): Remove extraneous cast.
8088 (linux_read_offsets): New.
8089 (linux_target_op): Add linux_read_offsets on mmuless systems.
8090 * server.c (handle_query): Add qOffsets logic.
8091 * target.h (struct target_ops): Add read_offsets.
8092
21b0f40c
DJ
80932006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
8094
8095 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
8096 (PTRACE_GET_THREAD_AREA): Define.
8097 (ps_get_thread_area): New function.
8098 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
8099 (linux-x86-64-low.o): Update.
8100
0050a760
DJ
81012006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
8102
8103 * configure.ac: Remove checks for prfpregset_t.
8104 * gdb_proc_service.h: New file.
8105 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
8106 new "gdb_proc_service.h".
8107 * proc-service.c: Likewise.
8108 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
8109 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
8110 * Makefile.in (gdb_proc_service_h): Updated.
8111 * configure, config.in: Regenerated.
8112
b92a518e
DJ
81132006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
8114
8115 * remote-utils.c (prepare_resume_reply): Move declaration
8116 of gdb_id_from_wait to the top of the block.
8117
545587ee
DJ
81182006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
8119
8120 * linux-low.c (regsets_store_inferior_registers): Read the regset
8121 from the target before filling it.
8122
9db87ebd
DJ
81232006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
8124
8125 * server.c (attach_inferior): Return SIGTRAP for a successful
8126 attach.
8127
dd24457d
DJ
81282006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
8129
8130 * Makefile.in (OBS): Add version.o.
8131 (STAGESTUFF): Delete.
8132 (version.o): Add dependencies.
8133 (version.c): Replace rule.
8134 (clean): Remove version.c.
8135 * server.c (gdbserver_version): New.
8136 (gdbserver_usage): Use printf.
8137 (main): Handle --version and --help.
8138 * server.h (version, host_name): Add declarations.
8139
6f0f660e
EZ
81402005-12-23 Eli Zaretskii <eliz@gnu.org>
8141
889bf7c5
PA
8142 * linux-arm-low.c:
8143 * linux-arm-low.c:
8144 * inferiors.c:
8145 * i387-fp.h:
8146 * i387-fp.c:
8147 * gdbreplay.c:
8148 * regcache.c:
8149 * proc-service.c:
8150 * mem-break.h:
8151 * mem-break.c:
8152 * linux-x86-64-low.c:
8153 * linux-sh-low.c:
8154 * linux-s390-low.c:
8155 * linux-ppc64-low.c:
8156 * linux-ppc-low.c:
8157 * linux-mips-low.c:
8158 * linux-m68k-low.c:
8159 * linux-m32r-low.c:
8160 * linux-low.h:
8161 * linux-low.c:
8162 * linux-ia64-low.c:
8163 * linux-i386-low.c:
8164 * linux-crisv32-low.c:
8165 * thread-db.c:
8166 * terminal.h:
8167 * target.h:
8168 * target.c:
8169 * server.h:
8170 * server.c:
8171 * remote-utils.c:
8172 * regcache.h:
8173 * utils.c:
8174 * Makefile.in:
8175 * configure.ac:
6f0f660e
EZ
8176 * gdbserver.1: Add (C) after Copyright. Update the FSF
8177 address.
8178
9d1fb177
DJ
81792005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
8180
8181 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
8182 (arm_breakpoint_at): Recognize both breakpoints.
8183 (the_low_target): Use the correct breakpoint instruction.
8184
011a70c2
DJ
81852005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
8186
8187 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
8188 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
8189 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
8190 (the_low_target): Update.
8191
7fb85e41
AS
81922005-10-25 Andreas Schwab <schwab@suse.de>
8193
8194 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
8195
8196 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
8197 (ia64_num_regs): Reduce to 462.
8198
3db0444b
DJ
81992005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
8200
8201 * acinclude.m4: Correct quoting.
8202 * aclocal.m4: Regenerated.
8203
8204 Suggested by SZOKOVACS Robert <szo@ies.hu>:
8205 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
8206 (thread_db_init): Call thread_db_err_str.
8207 * configure.ac: Check for TD_VERSION.
8208 * config.in, configure: Regenerated.
8209
bee0189a
DJ
82102005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8211
8212 * server.h (error, fatal, warning): Add ATTR_FORMAT.
8213
e9d25b98
DJ
82142005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
8215
8216 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
8217 is not available. Define HAVE_PTRACE_GETREGS if it is.
8218 * config.in, configure: Regenerated.
8219 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
8220 * linux-i386-low.c, linux-m68k-low.c: Update to use
8221 HAVE_PTRACE_GETREGS.
8222 * linux-low.c (regsets_fetch_inferior_registers)
8223 (regsets_store_inferior_registers): Only return 0 if we processed
8224 GENERAL_REGS.
8225 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
8226 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
8227
a06660f7
DJ
82282005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
8229
8230 * inferiors.c (struct thread_info): Add gdb_id.
8231 (add_thread): Add gdb_id argument.
8232 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
8233 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
8234 calls to add_thread.
8235 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
8236 * server.c (handle_query): Use thread_to_gdb_id.
8237 (handle_v_cont, main): Use gdb_id_to_thread_id.
8238 * server.h (add_thread): Update prototype.
8239 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
8240 prototypes.
8241
5a1f5858
DJ
82422005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
8243
8244 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
8245 left-padded registers.
8246 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
8247 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
8248
e122f1f5
SE
82492005-07-01 Steve Ellcey <sje@cup.hp.com>
8250
8251 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
8252 * configure: Regenerate.
8253 * config.in: Regenerate.
8254 * server.h (NEED_DECLARATION_STRERROR):
8255 Replace with !HAVE_DECL_STRERROR.
8256
d592fa2f
DJ
82572005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
8258
8259 * linux-low.c (linux_wait, linux_send_signal): Don't test
8260 an unsigned long variable for > 0 if it could be MAX_ULONG.
8261 * server.c (myresume): Likewise.
8262 * target.c (set_desired_inferior): Likewise.
8263
ccbd4912
MK
82642005-06-13 Mark Kettenis <kettenis@gnu.org>
8265
8266 * configure.ac: Simplify and improve check for socklen_t.
8267 * configure, config.in: Regenerate.
8268
f450004a
DJ
82692005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
8270
8271 * acconfig.h: Remove.
8272 * configure.ac: Add a test for socklen_t. Use three-argument
8273 AC_DEFINE throughout.
8274 * config.in: Regenerated using autoheader 2.59.
8275 * configure: Regenerated.
8276
8277 * gdbreplay.c (socklen_t): Provide a default.
8278 (remote_open): Use socklen_t.
8279 * remote-utils.c (socklen_t): Provide a default.
8280 (remote_open): Use socklen_t.
8281 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
8282 unsigned char.
8283
8284 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
8285 char for buffers.
8286 * linux-low.c (linux_read_memory, linux_write_memory)
8287 (linux_read_auxv): Likewise.
8288 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
8289 (check_mem_write): Likewise.
8290 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
8291 Likewise.
8292 * regcache.c (struct inferior_rgcache_data, registers_to_string)
8293 (registers_from_string, register_data): Likewise.
8294 * server.c (handle_query, main): Likewise.
8295 * server.h (convert_ascii_to_int, convert_int_to_ascii)
8296 (decode_M_packet): Likewise.
8297 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
8298 * target.h (struct target_ops): Update read_memory, write_memory,
8299 and read_auxv.
8300 (read_inferior_memory, write_inferior_memory): Update.
8301 * linux-low.h (struct linux_target_ops): Change type of breakpoint
8302 to unsigned char *.
8303 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
8304 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
8305 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
8306 linux-s390-low.c, linux-sh-low.c: Update for changes in
8307 read_inferior_memory and the_low_target->breakpoint.
8308
eee84df1
DJ
83092005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
8310
8311 * Makefile.in (SFILES): Add linux-ppc64-low.c.
8312 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
8313 * configure.srv: Add powerpc64-*-linux*.
8314 * linux-ppc64-low.c: New file.
8315
45b134e5
OF
83162005-05-23 Orjan Friberg <orjanf@axis.com>
8317
8318 * linux-cris-low.c: New file with support for CRIS.
8319 * linux-crisv32-low.c: Ditto for CRISv32.
8320 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
8321 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 8322 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
8323 reg-crisv32.o, and reg-crisv32.c to make rules.
8324 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
8325 recognized targets.
8326
48d93c75
UW
83272005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
8328
8329 * linux-low.c (fetch_register): Ensure buffer size is a multiple
8330 of sizeof (PTRACE_XFER_TYPE).
8331 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
8332
e013ee27
OF
83332005-05-12 Orjan Friberg <orjanf@axis.com>
8334
889bf7c5 8335 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
8336 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
8337 pointers for hardware watchpoint support.
8338 * linux-low.h (struct linux_target_ops): Ditto.
8339 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
8340 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
8341 to linux_target_ops.
8342 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
8343 reply packet.
8344 * server.c (main): Recognize 'Z' and 'z' packets.
8345
b0ded00b
UW
83462005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
8347
8348 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
8349 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
8350 (the_low_target): Add new members.
8351
8643e2ad
DJ
83522005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
8353
8354 * proc-service.c (ps_lgetregs): Search all_processes instead of
8355 all_threads.
8356
fc620387
DJ
83572005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
8358
8359 * server.c (start_inferior): Change return type to int.
8360 (attach_inferior): Change sigptr to int *.
8361 (handle_v_cont, handle_v_requests): Change signal to int *.
8362 (main): Change signal to int.
8363
83642005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
8365
8366 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
8367 * configure.srv: Add m32r*-*-linux*.
8368 * linux-m32r-low.c: New file.
8369
e0e76420
DJ
83702005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
8371
8372 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
8373
a1928bad
DJ
83742005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
8375
8376 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
8377 Take unsigned long arguments for PIDs.
8378 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
8379 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
8380 (wait_for_sigstop, linux_resume_one_process)
8381 (regsets_fetch_inferior_registers, linux_send_signal)
8382 (linux_read_auxv): Likewise. Update the types of variables holding
8383 PIDs. Update format string specifiers.
8384 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
8385 * remote-utils.c (prepare_resume_reply): Likewise.
8386 * server.c (cont_thread, general_thread, step_thread)
8387 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
8388 unsigned long.
8389 (handle_query): Update format specifiers.
8390 (handle_v_cont, main): Use strtoul for thread IDs.
8391 * server.h (struct inferior_list_entry): Use unsigned long for ID.
8392 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
8393 (general_thread, step_thread, thread_from_wait)
8394 (old_thread_from_wait): Update.
8395 * target.h (struct thread_resume): Use unsigned long for THREAD.
8396 (struct target_ops): Use unsigned long for arguments to attach and
8397 thread_alive.
8398
dcdb98d2
DJ
83992005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
8400
8401 * acinclude.m4: Include bfd/bfd.m4 directly.
8402 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
8403 <agriffis@toolchain.org>.
8404 * aclocal.m4, configure: Regenerated.
8405
bec39cab
AC
84062005-01-07 Andrew Cagney <cagney@gnu.org>
8407
8408 * configure.ac: Rename configure.in, require autoconf 2.59.
8409 * configure: Re-generate.
8410
434c4c77
DJ
84112004-12-08 Daniel Jacobowitz <dan@debian.org>
8412
8413 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
8414 LIBS when finished.
8415 * aclocal.m4: Regenerated.
8416 * configure: Regenerated.
8417
db1d3e1b
AS
84182004-11-21 Andreas Schwab <schwab@suse.de>
8419
8420 * linux-m68k-low.c (m68k_num_gregs): Define.
8421 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
8422 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
8423 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
8424 (m68k_breakpoint_at): New. Add to the_low_target.
8425
8426 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
8427 srv_linux_thread_db to yes.
8428
43360365
JB
84292004-10-20 Joel Brobecker <brobecker@gnat.com>
8430
8431 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
8432 (ARCH_SET_FS): Likewise.
8433 (ARCH_GET_FS): Likewise.
8434 (ARCH_GET_GS): Likewise.
8435
fd500816
DJ
84362004-10-16 Daniel Jacobowitz <dan@debian.org>
8437
8438 * linux-i386-low.c (ps_get_thread_area): New.
8439 * linux-x86-64-low.c (ps_get_thread_area): New.
8440 * linux-low.c: Include <sys/syscall.h>.
8441 (linux_kill_one_process): Don't kill the first thread here.
8442 (linux_kill): Kill the first thread here.
8443 (kill_lwp): New function.
8444 (send_sigstop, linux_send_signal): Use it.
8445 * proc-service.c: Clean up #ifdefs.
8446 (fpregset_info): Delete.
8447 (ps_lgetregs): Update and enable implementation.
8448 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
8449 implementations.
8450 * remote-utils.c (struct sym_cache, symbol_cache): New.
8451 (input_interrupt): Print a clearer message.
8452 (async_io_enabled): New variable.
8453 (enable_async_io, disable_async_io): Use it. Update comments.
8454 (look_up_one_symbol): Use the symbol cache.
8455 * thread-db.c (thread_db_look_up_symbols): New function.
8456 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
8457
f6de3c42
DJ
84582004-10-16 Daniel Jacobowitz <dan@debian.org>
8459
8460 * configure.in: Test for -rdynamic.
8461 * configure: Regenerated.
8462 * Makefile (INTERNAL_LDFLAGS): New.
8463 (gdbserver, gdbreplay): Use it.
8464
2c0fc042
AC
84652004-09-02 Andrew Cagney <cagney@gnu.org>
8466
8467 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
8468
075b3282
DJ
84692004-03-23 Daniel Jacobowitz <drow@mvista.com>
8470
8471 * linux-low.c (linux_wait): Clear all_processes list also.
8472
fa6a77dc
DJ
84732004-03-12 Daniel Jacobowitz <drow@mvista.com>
8474
8475 * linux-low.c: Include <errno.h>. Remove extern declaration of
8476 errno.
8477
6d782a97
DJ
84782004-03-12 Daniel Jacobowitz <drow@mvista.com>
8479
8480 * gdbreplay.c, server.h, utils.c: Update copyright years.
8481
3a7fb99b
DJ
84822004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
8483
8484 * server.c (main): Print child status or termination signal from
8485 variable 'signal', not 'sig'.
8486
c3e735a6
DJ
84872004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
8488
8489 * linux-low.c (linux_read_memory): Change return type to
8490 int. Check for and return error from ptrace().
8491 * target.c (read_inferior_memory): Change return type to int. Pass
8492 back return status from the_target->read_memory().
8493 * target.h (struct target_ops): Adapt *read_memory() prototype.
8494 Update comment.
8495 (read_inferior_memory): Adapt prototype.
8496 * server.c (main): Return an error packet if
8497 read_inferior_memory() returns an error.
8498
a59d1c82
DJ
84992004-03-04 Daniel Jacobowitz <drow@mvista.com>
8500
8501 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
8502 Unify with other clean targets.
8503
dc3f8883
DJ
85042004-02-29 Daniel Jacobowitz <drow@mvista.com>
8505
8506 * server.c (handle_v_cont): Call set_desired_inferior.
8507
89a208da
DJ
85082004-02-29 Daniel Jacobowitz <drow@mvista.com>
8509
8510 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
8511
62ea82f5
DJ
85122004-02-29 Daniel Jacobowitz <drow@mvista.com>
8513
8514 * linux-low.c (linux_wait): Unblock async I/O.
8515 (linux_resume): Block and enable async I/O.
8516 * remote-utils.c (block_async_io, unblock_async_io): New functions.
8517 * server.h (block_async_io, unblock_async_io): Add prototypes.
8518
6910d122
DJ
85192004-02-29 Daniel Jacobowitz <drow@mvista.com>
8520
8521 * remote-utils.c (remote_open): Print a status notice after
8522 opening a TCP port.
8523 * server.c (attach_inferior): Print a status notice after
8524 attaching.
8525
85262004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
8527
8528 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
8529
c89dc5d4
DJ
85302004-02-26 Daniel Jacobowitz <drow@mvista.com>
8531
8532 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
8533 error packet.
8534 * server.c, target.h: Update copyright years.
8535
4b8dad4a
RM
85362004-02-25 Roland McGrath <roland@redhat.com>
8537
8538 * target.h (struct target_ops): New member `read_auxv'.
8539 * server.c (handle_query): Handle qPart:auxv:read: query using that.
8540 * linux-low.c (linux_read_auxv): New function.
8541 (linux_target_ops): Initialize `read_auxv' member to that.
8542
d7446758
JB
85432004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
8544
8545 Committed by Jim Blandy <jimb@redhat.com>.
8546
8547 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 8548 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
8549 instead of GPR_SIZE to distiguish s390 and s390x targets.
8550
5544ad89
DJ
85512004-01-31 Daniel Jacobowitz <drow@mvista.com>
8552
8553 * linux-low.c: Update copyright year.
8554 (check_removed_breakpoint): Clear pending_is_breakpoint.
8555 (linux_set_resume_request, linux_queue_one_thread)
8556 (resume_status_pending_p): New functions.
8557 (linux_continue_one_thread): Use process->resume.
8558 (linux_resume): Only resume threads if there are no pending events.
8559 * linux-low.h (struct process_info): Add resume request
8560 pointer.
8561
2a68b70e
DJ
85622004-01-30 Daniel Jacobowitz <drow@mvista.com>
8563
8564 * regcache.c (new_register_cache): Clear the allocated register
8565 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
8566
64386c31
DJ
85672003-10-13 Daniel Jacobowitz <drow@mvista.com>
8568
8569 * linux-low.c (linux_resume): Take a struct thread_resume *
8570 argument.
8571 (linux_wait): Update call.
8572 (resume_ptr): New static variable.
8573 (linux_continue_one_thread): Renamed from
8574 linux_continue_one_process. Use resume_ptr.
8575 (linux_resume): Use linux_continue_one_thread.
8576 * server.c (handle_v_cont, handle_v_requests): New functions.
8577 (myresume): New function.
8578 (main): Handle 'v' case.
8579 * target.h (struct thread_resume): New type.
8580 (struct target_ops): Change argument of "resume" to struct
8581 thread_resume *.
8582 (myresume): Delete macro.
8583
c938e9b0
L
85842003-08-08 H.J. Lu <hongjiu.lu@intel.com>
8585
8586 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
8587 (uninstall): Support DESTDIR.
8588
7f313d07
BC
8589Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
8590
8591 * configure.srv: Add xscale*linux copy of arm*linux entry.
8592
3b2fc2ea
DJ
85932003-07-24 Daniel Jacobowitz <drow@mvista.com>
8594
8595 * linux-arm-low.c (arm_reinsert_addr): New function.
8596 (the_low_target): Add arm_reinsert_addr.
8597
1c0a559e
MK
85982003-07-08 Mark Kettenis <kettenis@gnu.org>
8599
8600 * mem-break.c: Remove whitespace at end of file.
8601
43d5792c
DJ
86022003-06-28 Daniel Jacobowitz <drow@mvista.com>
8603
8604 * configure.in: Check whether we need to prototype strerror.
8605 * server.h: Optionally prototype strerror.
8606 * gdbreplay.c (perror_with_name): Use strerror.
8607 * linux-low.c (linux_attach_lwp): Use strerror.
8608 * utils.c (perror_with_name): Use strerror.
8609 * config.in, configure: Regenerated.
8610
c8a86edf
DJ
86112003-06-28 Daniel Jacobowitz <drow@mvista.com>
8612
8613 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
8614 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
8615
73d37363
DJ
86162003-06-20 Daniel Jacobowitz <drow@mvista.com>
8617
8618 * Makefile.in (SFILES): Update.
8619 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
8620 low-sun3.c: Remove files.
8621
6ad8ae5c
DJ
86222003-06-17 Daniel Jacobowitz <drow@mvista.com>
8623
8624 * linux-low.c: Move comment to linux_thread_alive where it belonged.
8625 (linux_detach_one_process, linux_detach): New functions.
8626 (linux_target_ops): Add linux_detach.
8627 * server.c (main): Handle 'D' packet.
8628 * target.h (struct target_ops): Add "detach" member.
8629 (detach_inferior): Define.
8630
1581182a
MK
86312003-06-13 Mark Kettenis <kettenis@gnu.org>
8632
8633 From Kelley Cook <kelleycook@wideopenwest.com>:
8634 * configure.srv: Accept i[34567]86 variants.
8635
e5379b03
DJ
86362003-06-05 Daniel Jacobowitz <drow@mvista.com>
8637
8638 * linux-low.c (linux_wait_for_event): Correct comment typos.
8639 (linux_resume_one_process): Call check_removed_breakpoint.
8640 (linux_send_signal): New function.
8641 (linux_target_ops): Add linux_send_signal.
8642 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
8643 of kill.
8644 * target.h (struct target_ops): Add send_signal.
8645
2ff29de4
JB
86462003-05-29 Jim Blandy <jimb@redhat.com>
8647
8648 * linux-low.c (usr_store_inferior_registers): Transfer buf in
8649 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
8650 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
8651 away part of the register's value.
8652
254787d4
DJ
86532003-03-26 Daniel Jacobowitz <drow@mvista.com>
8654
8655 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
8656 (linux_wait_for_event, linux_init_signals): Likewise.
8657
94e10508
DJ
86582003-03-17 Daniel Jacobowitz <drow@mvista.com>
8659
8660 * configure.in: Check for stdlib.h.
8661 * configure: Regenerated.
8662 * config.in: Regenerated.
8663
4c0711e0
DJ
86642003-01-04 Andreas Schwab <schwab@suse.de>
8665
8666 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
8667
ef66e766
AC
86682003-01-02 Andrew Cagney <ac131313@redhat.com>
8669
8670 * Makefile.in: Remove obsolete code.
8671
a1358604
DJ
86722002-11-20 Daniel Jacobowitz <drow@mvista.com>
8673
8674 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
8675 defined(PT_FPR0_HI).
8676
23ce3b1c
DJ
86772002-11-17 Stuart Hughes <seh@zee2.com>
8678
8679 * linux-arm-low.c (arm_num_regs): Increase.
8680 (arm_regmap): Include status register.
8681
86822002-11-17 Daniel Jacobowitz <drow@mvista.com>
8683
8684 * linux-low.c (register_addr): Remove incorrect -1 check.
8685
a9fa9f7d
DJ
86862002-08-29 Daniel Jacobowitz <drow@mvista.com>
8687
8688 * linux-low.c (linux_create_inferior): Call setpgid. Return
8689 the new PID.
8690 (unstopped_p, linux_signal_pid): Remove.
8691 (linux_target_ops): Remove linux_signal_pid.
8692 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
8693 global instead of target method.
8694 * target.h (struct target_ops): Remove signal_pid. Update comment
8695 for create_inferior.
8696 * server.c (signal_pid): New variable.
8697 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 8698 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
8699 (attach_inferior): Set signal_pid.
8700
17574093
DJ
87012002-08-23 Daniel Jacobowitz <drow@mvista.com>
8702
8703 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
8704
87052002-08-20 Jim Blandy <jimb@redhat.com>
8706
8707 * Makefile.in (LDFLAGS): Allow the configure script to establish a
8708 default for this.
8709
87102002-08-01 Andrew Cagney <cagney@redhat.com>
8711
8712 * Makefile.in: Make chill references obsolete.
8713
87142002-07-24 Kevin Buettner <kevinb@redhat.com>
8715
8716 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
8717 * configure: Regenerate.
8718 * config.in: Regenerate.
8719
87202002-07-09 David O'Brien <obrien@FreeBSD.org>
8721
8722 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
8723 (perror_with_name, remote_close, remote_open, expect, play): Static.
8724
87252002-07-04 Michal Ludvig <mludvig@suse.cz>
8726
4b8dad4a 8727 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
8728 byte offsets instead of an array of indexes.
8729 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
8730
87312002-06-13 Daniel Jacobowitz <drow@mvista.com>
8732
8733 * regcache.c: Add comment.
8734
87352002-06-11 Daniel Jacobowitz <drow@mvista.com>
8736
8737 * thread-db.c: New file.
8738 * proc-service.c: New file.
8739 * acinclude.m4: New file.
8740 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
8741 proc-service.o, and thread-db.o.
8742 (linux-low.o): Add USE_THREAD_DB.
8743 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
8744 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
8745 * aclocal.m4: Regenerated.
8746 * config.in: Regenerated.
8747 * configure: Regenerated.
8748 * configure.in: Check for proc_service.h, sys/procfs.h,
8749 thread_db.h, and linux/elf.h headrs.
8750 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
8751 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
8752 Check for -lthread_db and thread support.
8753 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
8754 PowerPC, and SuperH.
8755 * i387-fp.c: Constify arguments.
8756 * i387-fp.h: Likewise.
8757 * inferiors.c: (struct thread_info): Renamed from
8758 `struct inferior_info'. Remove PID member. Use generic inferior
8759 list header. All uses updated.
8760 (inferiors, signal_pid): Removed.
8761 (all_threads): New variable.
8762 (get_thread): Define.
8763 (add_inferior_to_list): New function.
8764 (for_each_inferior): New function.
8765 (change_inferior_id): New function.
8766 (add_inferior): Removed.
8767 (remove_inferior): New function.
8768 (add_thread): New function.
8769 (free_one_thread): New function.
8770 (remove_thread): New function.
8771 (clear_inferiors): Use for_each_inferior and free_one_thread.
8772 (find_inferior): New function.
8773 (find_inferior_id): New function.
8774 (inferior_target_data): Update argument type.
8775 (set_inferior_target_data): Likewise.
8776 (inferior_regcache_data): Likewise.
8777 (set_inferior_regcache_data): Likewise.
8778 * linux-low.c (linux_bp_reinsert): Remove.
8779 (all_processes, stopping_threads, using_thrads)
8780 (struct pending_signals, debug_threads, pid_of): New.
8781 (inferior_pid): Replace with macro.
8782 (struct inferior_linux_data): Remove.
8783 (get_stop_pc, add_process): New functions.
8784 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
8785 Use add_process and add_thread.
8786 (linux_attach_lwp): New function, based on old linux_attach. Use
8787 add_process and add_thread. Set stop_expected for new threads.
8788 (linux_attach): New function.
8789 (linux_kill_one_process): New function.
8790 (linux_kill): Kill all LWPs.
8791 (linux_thread_alive): Use find_inferior_id.
8792 (check_removed_breakpoints, status_pending_p): New functions.
8793 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
8794 Update. Use WNOHANG. Wait for cloned processes also. Update process
8795 struct for the found process.
8796 (linux_wait_for_event): New function.
8797 (linux_wait): Use it. Support LWPs.
8798 (send_sigstop, wait_for_sigstop, stop_all_processes)
8799 (linux_resume_one_process, linux_continue_one_process): New functions.
8800 (linux_resume): Support LWPs.
8801 (REGISTER_RAW_SIZE): Remove.
8802 (fetch_register): Use register_size instead. Call supply_register.
8803 (usr_store_inferior_registers): Likewise. Call collect_register.
8804 Fix recursive case.
8805 (regsets_fetch_inferior_registers): Improve error message.
8806 (regsets_store_inferior_registers): Add debugging.
8807 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
8808 (unstopped_p, linux_signal_pid): New functions.
8809 (linux_target_ops): Add linux_signal_pid.
8810 (linux_init_signals): New function.
8811 (initialize_low): Call it. Initialize using_threads.
8812 * regcache.c (inferior_regcache_data): Add valid
8813 flag.
8814 (get_regcache): Fetch registers lazily. Add fetch argument
8815 and update all callers.
8816 (regcache_invalidate_one, regcache_invalidate): New
8817 functions.
8818 (new_register_cache): Renamed from create_register_cache.
8819 Return the new regcache.
8820 (free_register_cache): Change argument to a void *.
8821 (registers_to_string, registers_from_string): Call get_regcache
8822 with fetch flag set.
8823 (register_data): Make static. Pass fetch flag to get_regcache.
8824 (supply_register): Call get_regcache with fetch flag clear.
8825 (collect_register): Call get_regcache with fetch flag set.
8826 (collect_register_as_string): New function.
8827 * regcache.h: Update.
8828 * remote-utils.c (putpkt): Flush after debug output and use
8829 stderr.
8830 Handle input interrupts while waiting for an ACK.
8831 (input_interrupt): Use signal_pid method.
8832 (getpkt): Flush after debug output and use stderr.
8833 (outreg): Use collect_register_as_string.
8834 (new_thread_notify, dead_thread_notify): New functions.
8835 (prepare_resume_reply): Check using_threads. Set thread_from_wait
8836 and general_thread.
8837 (look_up_one_symbol): Flush after debug output.
8838 * server.c (step_thread, server_waiting): New variables.
8839 (start_inferior): Don't use signal_pid. Update call to mywait.
8840 (attach_inferior): Update call to mywait.
8841 (handle_query): Handle qfThreadInfo and qsThreadInfo.
8842 (main): Don't fetch/store registers explicitly. Use
8843 set_desired_inferior. Support proposed ``Hs'' packet. Update
8844 calls to mywait.
8845 * server.h: Update.
8846 (struct inferior_list, struct_inferior_list_entry): New.
8847 * target.c (set_desired_inferior): New.
8848 (write_inferior_memory): Constify.
8849 (mywait): New function.
8850 * target.h: Update.
8851 (struct target_ops): New signal_pid method.
8852 (mywait): Removed macro, added prototype.
8853
8854 * linux-low.h (regset_func): Removed.
8855 (regset_fill_func, regset_store_func): New.
8856 (enum regset_type): New.
8857 (struct regset_info): Add type field. Use new operation types.
8858 (struct linux_target_ops): stop_pc renamed to get_pc.
8859 Add decr_pc_after_break and breakpoint_at.
8860 (get_process, get_thread_proess, get_process_thread)
8861 (strut process_info, all_processes, linux_attach_lwp)
8862 (thread_db_init): New.
8863
8864 * linux-arm-low.c (arm_get_pc, arm_set_pc,
8865 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
8866 (the_low_target): Add new members.
8867 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
8868 (i386_store_fpxregset): Constify.
8869 (target_regsets): Add new kind identifier.
8870 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
8871 (i386_set_pc): Add debugging.
8872 (i386_breakpoint_at): New function.
8873 (the_low_target): Add new members.
8874 * linux-mips-low.c (mips_get_pc, mips_set_pc)
8875 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
8876 (mips_breakpoint_at): New.
8877 (the_low_target): Add new members.
8878 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
8879 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
8880 (the_low_target): Add new members.
8881 * linux-sh-low.c (sh_get_pc, sh_set_pc)
8882 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
8883 (the_low_target): Add new members.
8884 * linux-x86-64-low.c (target_regsets): Add new kind
8885 identifier.
8886
88872002-05-15 Daniel Jacobowitz <drow@mvista.com>
8888
8889 From Martin Pool <mbp@samba.org>:
8890 * server.c (gdbserver_usage): New function.
8891 (main): Call it.
8892
88932002-05-14 Daniel Jacobowitz <drow@mvista.com>
8894
8895 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
8896 stop_at -> stop_pc.
8897
88982002-05-04 Andrew Cagney <ac131313@redhat.com>
8899
8900 * Makefile.in: Remove obsolete code.
8901
89022002-04-24 Michal Ludvig <mludvig@suse.cz>
8903
8904 * linux-low.c (regsets_fetch_inferior_registers),
8905 (regsets_store_inferior_registers): Removed cast to int from
8906 ptrace() calls.
8907 * regcache.h: Added declaration of struct inferior_info.
8908
89092002-04-20 Daniel Jacobowitz <drow@mvista.com>
8910
8911 * inferiors.c (struct inferior_info): Add regcache_data.
8912 (add_inferior): Call create_register_cache.
8913 (clear_inferiors): Call free_register_cache.
8914 (inferior_regcache_data, set_inferior_regcache_data): New functions.
8915 * regcache.c (struct inferior_regcache_data): New.
8916 (registers): Remove.
8917 (get_regcache): New function.
8918 (create_register_cache, free_register_cache): New functions.
8919 (set_register_cache): Don't initialize the register cache here.
8920 (registers_to_string, registers_from_string, register_data): Call
8921 get_regcache.
8922 * regcache.h: Add prototypes.
8923 * server.h: Likewise.
8924
89252002-04-20 Daniel Jacobowitz <drow@mvista.com>
8926
8927 * mem-break.c: New file.
8928 * mem-break.h: New file.
8929 * Makefile.in: Add mem-break.o rule; update server.h
8930 dependencies.
8931 * inferiors.c (struct inferior_info): Add target_data
8932 member.
8933 (clear_inferiors): Free target_data member if set.
8934 (inferior_target_data, set_inferior_target_data): New functions.
8935 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
8936 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
8937 * linux-low.c (linux_bp_reinsert): New variable.
8938 (struct inferior_linux_data): New.
8939 (linux_create_inferior): Use set_inferior_target_data.
8940 (linux_attach): Likewise. Call add_inferior.
8941 (linux_wait_for_one_inferior): New function.
8942 (linux_wait): Call it.
8943 (linux_write_memory): Add const.
8944 (initialize_low): Call set_breakpoint_data.
8945 * linux-low.h (struct linux_target_ops): Add breakpoint
8946 handling members.
8947 * server.c (attach_inferior): Remove extra add_inferior
8948 call.
8949 * server.h: Include mem-break.h. Update inferior.c
8950 prototypes.
8951 * target.c (read_inferior_memory)
8952 (write_inferior_memory): New functions.
8953 * target.h (read_inferior_memory)
8954 (write_inferior_memory): Change macros to prototypes.
8955 (struct target_ops): Update comments. Add const to write_memory
8956 definition.
8957
89582002-04-11 Daniel Jacobowitz <drow@mvista.com>
8959
8960 * linux-low.c (usr_store_inferior_registers): Support
8961 registers which are allowed to fail to store.
8962 * linux-low.h (linux_target_ops): Likewise.
8963 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
8964 (ppc_cannot_store_register): FPSCR may not be storable.
8965
89662002-04-09 Daniel Jacobowitz <drow@mvista.com>
8967
8968 * server.h: Include <string.h> if HAVE_STRING_H.
8969 * ChangeLog: Correct paths in last ChangeLog entry.
8970
89712002-04-09 Daniel Jacobowitz <drow@mvista.com>
8972
8973 * linux-low.h: Remove obsolete prototypes.
8974 (struct linux_target_ops): New.
8975 (extern the_low_target): New.
8976 * linux-low.c (num_regs, regmap): Remove declarations.
8977 (register_addr): Use the_low_target explicitly.
8978 (fetch_register): Likewise.
8979 (usr_fetch_inferior_registers): Likewise.
8980 (usr_store_inferior_registers): Likewise.
8981 * linux-arm-low.c (num_regs): Remove.
8982 (arm_num_regs): Define.
8983 (arm_regmap): Renamed from regmap, made static.
8984 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
8985 made static.
8986 (arm_cannot_store_register): Renamed from cannot_store_register,
8987 made static.
8988 (the_low_target): New.
8989 * linux-i386-low.c (num_regs): Remove.
8990 (i386_num_regs): Define.
8991 (i386_regmap): Renamed from regmap, made static.
8992 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
8993 made static.
8994 (i386_cannot_store_register): Renamed from cannot_store_register,
8995 made static.
8996 (the_low_target): New.
8997 * linux-ia64-low.c (num_regs): Remove.
8998 (ia64_num_regs): Define.
8999 (ia64_regmap): Renamed from regmap, made static.
9000 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
9001 made static.
9002 (ia64_cannot_store_register): Renamed from cannot_store_register,
9003 made static.
9004 (the_low_target): New.
9005 * linux-m68k-low.c (num_regs): Remove.
9006 (m68k_num_regs): Define.
9007 (m68k_regmap): Renamed from regmap, made static.
9008 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
9009 made static.
9010 (m68k_cannot_store_register): Renamed from cannot_store_register,
9011 made static.
9012 (the_low_target): New.
9013 * linux-mips-low.c (num_regs): Remove.
9014 (mips_num_regs): Define.
9015 (mips_regmap): Renamed from regmap, made static.
9016 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
9017 made static.
9018 (mips_cannot_store_register): Renamed from cannot_store_register,
9019 made static.
9020 (the_low_target): New.
9021 * linux-ppc-low.c (num_regs): Remove.
9022 (ppc_num_regs): Define.
9023 (ppc_regmap): Renamed from regmap, made static.
9024 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
9025 made static.
9026 (ppc_cannot_store_register): Renamed from cannot_store_register,
9027 made static.
9028 (the_low_target): New.
9029 * linux-s390-low.c (num_regs): Remove.
9030 (s390_num_regs): Define.
9031 (s390_regmap): Renamed from regmap, made static.
9032 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
9033 made static.
9034 (s390_cannot_store_register): Renamed from cannot_store_register,
9035 made static.
9036 (the_low_target): New.
9037 * linux-sh-low.c (num_regs): Remove.
9038 (sh_num_regs): Define.
9039 (sh_regmap): Renamed from regmap, made static.
9040 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
9041 made static.
9042 (sh_cannot_store_register): Renamed from cannot_store_register,
9043 made static.
9044 (the_low_target): New.
9045 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
9046 (the_low_target): New.
9047
90482002-04-09 Daniel Jacobowitz <drow@mvista.com>
9049
9050 * Makefile.in: Add stamp-h target.
9051 * configure.in: Create stamp-h.
9052 * configure: Regenerated.
9053
90542002-04-09 Daniel Jacobowitz <drow@mvista.com>
9055
9056 * inferiors.c: New file.
9057 * target.c: New file.
9058 * target.h: New file.
9059 * Makefile.in: Add target.o and inferiors.o. Update
9060 dependencies.
9061 * linux-low.c (inferior_pid): New static variable,
9062 moved from server.c.
9063 (linux_create_inferior): Renamed from create_inferior.
9064 Call add_inferior. Return 0 on success instead of a PID.
9065 (linux_attach): Renamed from myattach.
9066 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
9067 (linux_thread_alive): Renamed from mythread_alive.
9068 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
9069 child dies.
9070 (linux_resume): Renamed from myresume. Add missing ``return 0''.
9071 (regsets_store_inferior_registers): Correct error message.
9072 Add missing ``return 0''.
9073 (linux_fetch_registers): Renamed from fetch_inferior_registers.
9074 (linux_store_registers): Renamed from store_inferior_registers.
9075 (linux_read_memory): Renamed from read_inferior_memory.
9076 (linux_write_memory): Renamed from write_inferior_memory.
9077 (linux_target_ops): New structure.
9078 (initialize_low): Call set_target_ops ().
9079 * remote-utils.c (unhexify): New function.
9080 (hexify): New function.
9081 (input_interrupt): Send signals to ``signal_pid''.
9082 * server.c (inferior_pid): Remove.
9083 (start_inferior): Update create_inferior call.
9084 (attach_inferior): Call add_inferior.
9085 (handle_query): New function.
9086 (main): Call handle_query for `q' packets.
9087 * server.h: Include "target.h". Remove obsolete prototypes.
9088 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
9089
90902002-04-09 Daniel Jacobowitz <drow@mvista.com>
9091
9092 * Makefile.in: Add WARN_CFLAGS. Update configury
9093 dependencies.
9094 * configure.in: Check for <string.h>
9095 * configure: Regenerate.
9096 * config.in: Regenerate.
9097 * gdbreplay.c: Include needed system headers.
9098 (remote_open): Remove strchr prototype.
9099 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
9100 * regcache.c (supply_register): Change buf argument to const void *.
9101 (supply_register_by_name): Likewise.
9102 (collect_register): Change buf argument to void *.
9103 (collect_register_by_name): Likewise.
9104 * regcache.h: Add missing prototypes.
9105 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
9106 * server.c (handle_query): New function.
9107 (attached): New static variable, moved out of main.
9108 (main): Quiet longjmp clobber warnings.
9109 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
9110 * utils.c (error): Remove NORETURN.
9111 (fatal): Likewise.