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