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