daily update
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
405f8e94
SS
12011-11-14 Stan Shebs <stan@codesourcery.com>
2 Kwok Cheung Yeung <kcy@codesourcery.com>
3
4 * linux-x86-low.c (small_jump_insn): New.
5 (i386_install_fast_tracepoint_jump_pad): Add arguments for
6 trampoline and error message, build a trampoline and issue a small
7 jump instruction to it.
8 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9 trampoline and error message.
10 (x86_get_min_fast_tracepoint_insn_len): New.
11 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
12 * linux-low.h (struct linux_target_ops): Add arguments to
13 install_fast_tracepoint_jump_pad operation, add new operation.
14 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
15 arguments.
16 (linux_get_min_fast_tracepoint_insn_len): New function.
17 (linux_target_op): Add new operation.
18 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
19 (gdb_trampoline_buffer_end): Ditto.
20 (gdb_trampoline_buffer_error): Ditto.
21 (struct ipa_sym_addresses): Add fields for new IPA variables.
22 (symbol_list): Add entries for new IPA variables.
23 (struct tracepoint): Add fields to hold the address range of the
24 trampoline used by the tracepoint.
25 (trampoline_buffer_head): New static variable.
26 (trampoline_buffer_tail): Ditto.
27 (claim_trampoline_space): New function.
28 (have_fast_tracepoint_trampoline_buffer): New function.
29 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
30 structure.
31 (install_fast_tracepoint): Ditto, also add error buffer argument.
32 (cmd_qtminftpilen): New function.
33 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
34 (fast_tracepoint_from_trampoline_address): New function.
35 (fast_tracepoint_collecting): Handle trampoline as part of jump
36 pad space.
37 (set_trampoline_buffer_space): New function.
38 (initialize_tracepoint): Initialize new IPA variables.
39 * target.h (struct target_ops): Add arguments to
40 install_fast_tracepoint_jump_pad operation, add new
41 get_min_fast_tracepoint_insn_len operation.
42 (target_get_min_fast_tracepoint_insn_len): New.
43 (install_fast_tracepoint_jump_pad): Add arguments.
44 * server.h (IPA_BUFSIZ): Define.
45 * linux-i386-ipa.c: Include extra header files.
46 (initialize_fast_tracepoint_trampoline_buffer): New function.
47 (initialize_low_tracepoint): Call it.
48 * server.h (set_trampoline_buffer_space): Declare.
49 (claim_trampoline_space): Ditto.
50 (have_fast_tracepoint_trampoline_buffer): Ditto.
51
1e4d1764
YQ
522011-11-14 Yao Qi <yao@codesourcery.com>
53
54 * server.c (handle_query): Handle InstallInTrace for qSupported.
55 * tracepoint.c (add_tracepoint): Sort list.
56 (install_tracepoint, download_tracepoint): New.
57 (cmd_qtdp): Call them to install and download tracepoints.
58 (sort_tracepoints): Removed.
59 (cmd_qtstart): Update.
60
5c73ff4e
YQ
612011-11-14 Yao Qi <yao@codesourcery.com>
62
63 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
64 * mem-break.h: Declare.
65 * tracepoint.c (cmd_qtstart): Move some code to ...
66 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
67 New.
68 (download_tracepoints): Move some code to ...
69 (download_tracepoint_1): ... here. New.
70
86a30030
YQ
712011-11-08 Yao Qi <yao@codesourcery.com>
72
73 * remote-utils.c (relocate_instruction): A comment fix.
74
8d26e50c
JB
752011-11-07 Joel Brobecker <brobecker@adacore.com>
76
77 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
78 (i386_dr_low_get_control, i386_dr_low_get_status): Use
79 dr_status_mirror and dr_control_mirror from debug_reg_state.
80 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
81 (i386_initial_stuff): Remove use of deleted globals.
82 (i386_get_thread_context, i386_set_thread_context,
83 i386_thread_added): Use dr_status_mirror and dr_control_mirror
84 from debug_reg_state.
85
a59306a3
YQ
862011-11-05 Yao Qi <yao@codesourcery.com>
87
88 * tracepoint.c (gdb_collect): Loop over tracepoints of same
89 address as TPOINT's.
90
3065dfb6
SS
912011-11-02 Stan Shebs <stan@codesourcery.com>
92
93 * tracepoint.c (agent_mem_read_string): New function.
94 (eval_agent_expr): Call it for tracenz.
95 * server.c (handle_query): Report support for tracenz.
96
fd0d8c7c
YQ
972011-11-02 Yao Qi <yao@codesourcery.com>
98
99 * tracepoint.c (cmd_qtstart): Remove unused local variables.
100
609086b1
YQ
1012011-11-02 Yao Qi <yao@codesourcery.com>
102
103 * target.h: Fix a typo in comment.
104
b9fd1791
PA
1052011-10-31 Pedro Alves <pedro@codesourcery.com>
106
107 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
108 clobber the breakpoints' shadows with fast tracepoint jumps.
109 * mem-break.h (check_mem_write): Add `myaddr' parameter.
110 * target.c (write_inferior_memory): Also pass MYADDR down to
111 check_mem_write.
112
03583c20
UW
1132011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
114
115 * configure.ac: Check support for personality routine.
116 * configure: Regenerate.
117 * config.in: Likewise.
118 * linux-low.c: Include <sys/personality.h>.
119 Define ADDR_NO_RANDOMIZE if necessary.
120 (linux_create_inferior): Disable address space randomization when
121 forking inferior, if requested.
122 (linux_supports_disable_randomization): New function.
123 (linux_target_ops): Install it.
124 * server.h (disable_randomization): Declare.
125 * server.c (disable_randomization): New global variable.
126 (handle_general_set): Handle QDisableRandomization.
127 (handle_query): Likewise for qSupported.
128 (main): Support --disable-randomization and --no-disable-randomization
129 command line arguments.
130 * target.h (struct target_ops): Add supports_disable_randomization.
131 (target_supports_disable_randomization): New macro.
132
723b724b
MF
1332011-09-29 Mike Frysinger <vapier@gentoo.org>
134
135 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
136 ifdef check.
137 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
138 [!PT_GETDSBT] (target_loadmap): New definition.
139 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
140 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
141 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
142 and PT_GETDSBT to LINUX_LOADMAP.
143 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
144 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
145
55329a5c 1462011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
147
148 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
149 (arm_linux_hwbp_cap): New static variable.
150 (arm_linux_get_hwbp_cap): Replace by ...
151 (arm_linux_init_hwbp_cap): ... this new function.
152 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
153 (arm_linux_get_hw_watchpoint_count): Likewise.
154 (arm_linux_get_hw_watchpoint_max_length): Likewise.
155 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
156 (arm_prepare_to_resume): Use perror_with_name instead of error.
157
55329a5c 1582011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
159
160 * linux-arm-low.c: Include <signal.h>.
161 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
162 (struct arm_linux_hwbp_cap): New data type.
163 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
164 (struct arm_linux_hw_breakpoint): New data type.
165 (MAX_BPTS, MAX_WPTS): Define.
166 (struct arch_process_info, struct arch_lwp_info): New data types.
167 (arm_linux_get_hwbp_cap): New function.
168 (arm_linux_get_hw_breakpoint_count): Likewise.
169 (arm_linux_get_hw_watchpoint_count): Likewise.
170 (arm_linux_get_hw_watchpoint_max_length): Likewise.
171 (arm_hwbp_control_initialize): Likewise.
172 (arm_hwbp_control_is_enabled): Likewise.
173 (arm_hwbp_control_is_initialized): Likewise.
174 (arm_hwbp_control_disable): Likewise.
175 (arm_linux_hw_breakpoint_equal): Likewise.
176 (arm_linux_hw_point_initialize): Likewise.
177 (struct update_registers_data): New data structure.
178 (update_registers_callback: New function.
179 (arm_insert_point): Likewise.
180 (arm_remove_point): Likewise.
181 (arm_stopped_by_watchpoint): Likewise.
182 (arm_stopped_data_address): Likewise.
183 (arm_new_process): Likewise.
184 (arm_new_thread): Likewise.
185 (arm_prepare_to_resume): Likewise.
186 (the_low_target): Register arm_insert_point, arm_remove_point,
187 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
188 arm_new_thread, and arm_prepare_to_resume.
189
6b9801d4
SS
1902011-09-15 Stan Shebs <stan@codesourcery.com>
191
192 * server.h (struct emit_ops): Add compare-goto fields.
193 * tracepoint.c (gdb_agent_op_sizes): New table.
194 (emit_eq_goto): New function.
195 (emit_ne_goto): New function.
196 (emit_lt_goto): New function.
197 (emit_le_goto): New function.
198 (emit_gt_goto): New function.
199 (emit_ge_goto): New function.
200 (is_goto_target): New function.
201 (compile_bytecodes): Recognize special cases of compare-goto
202 combinations and call specialized emitters for them.
203 * linux-x86-low.c (amd64_emit_eq_goto): New function.
204 (amd64_emit_ne_goto): New function.
205 (amd64_emit_lt_goto): New function.
206 (amd64_emit_le_goto): New function.
207 (amd64_emit_gt_goto): New function.
208 (amd64_emit_ge_goto): New function.
209 (amd64_emit_ops): Add the new functions.
210 (i386_emit_eq_goto): New function.
211 (i386_emit_ne_goto): New function.
212 (i386_emit_lt_goto): New function.
213 (i386_emit_le_goto): New function.
214 (i386_emit_gt_goto): New function.
215 (i386_emit_ge_goto): New function.
216 (i386_emit_ops): Add the new functions.
217
bf15cbda
SS
2182011-09-08 Stan Shebs <stan@codesourcery.com>
219
220 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
221 (i386_emit_epilogue): Restore %ebx.
222
943ca1dd
JZ
2232011-08-31 Jie Zhang <jzhang918@gmail.com>
224
225 * server.c (step_thread): Remove definition.
226 (process_serial_event): Don't handle Hs.
227 * server.h (step_thread): Remove declaration.
228 * target.c (set_desired_inferior): Remove use of step_thread.
229
e3deef73
LM
2302011-08-24 Luis Machado <lgustavo@codesourcery.com>
231
232 * linux-low.c: Include linux-procfs.h.
233 (linux_attach_lwp_1): Update comments.
234 (linux_attach): Scan for existing threads when attaching to a
235 process that is the tgid.
236 * Makefile.in: Update dependencies.
237
13da1c97
LM
2382011-08-24 Luis Machado <lgustavo@codesourcery.com>
239
240 * configure.srv: Add linux-procfs.o dependencies.
241
881127c9
YQ
2422011-08-14 Yao Qi <yao@codesourcery.com>
243
244 * target.h (struct target_ops): Fix indent.
245 * win32-low.c (win32_target_ops): Fix comment.
246
58dbd541
YQ
2472011-08-14 Andrew Jenner <andrew@codesourcery.com>
248 Yao Qi <yao@codesourcery.com>
249
250 * Makefile.in (clean): Remove tic6x-*.c files.
251 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
252 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
253 (tic6x-c64xp-linux.c): Likewise.
254 * configure.srv: Add support for tic6x-*-uclinux.
255 * linux-tic6x-low.c: New.
256 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
257
78d85199
YQ
2582011-08-14 Andrew Stubbs <ams@codesourcery.com>
259 Yao Qi <yao@codesourcery.com>
260
261 * target.h (struct target_ops): Add read_loadmap.
262 * linux-low.c (struct target_loadseg): New type.
263 (struct target_loadmap): New type.
264 (linux_read_loadmap): New function.
265 (linux_target_ops): Add linux_read_loadmap.
266 * server.c (handle_query): Support qXfer:fdpic:read packet.
267 * win32-low.c (win32_target_ops): Initialize field `read_loadmap' to NULL.
268
a959a88d
EZ
2692011-08-05 Eli Zaretskii <eliz@gnu.org>
270
271 * win32-low.c: Include <stdint.h>.
272
1ced966e
PA
2732011-07-22 Pedro Alves <pedro@codesourcery.com>
274
275 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
276 to the inferior here.
277 (i386_remove_aligned_watchpoint): Ditto.
278 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
279 fit part of the watchpoint in the debug registers.
280 (i386_update_inferior_debug_regs): New.
281 (i386_low_insert_watchpoint): Work on a local mirror of the debug
282 registers, and only update the inferior on success.
283 (i386_low_remove_watchpoint): Ditto.
284
d26e3629
KY
2852011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
286
287 * linux-low.c (compare_ints, unique, list_threads, show_process,
288 linux_core_of_thread): Delete.
289 (linux_target_ops): Change linux_core_of_thread to
290 linux_common_core_of_thread.
291 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
292 * utils.c (malloc_failure): Change type of argument.
293 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
294 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
295 common/linux-osdata.c, common/ptid.c and common/buffer.c.
296 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
297 (IPA_OBJS): Add common-utils-ipa.o.
298 (ptid_h, linux_osdata_h): New macros.
299 (server_h): Add common/common-utils.h, common/xml-utils.h,
300 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
301 common/ptid.h.
302 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
303 ptid.o, buffer.o): New rules.
304 (linux-low.o): Add common/linux-osdata.h as a dependency.
305 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
306 * configure.ac: Add AC_HEADER_DIRENT check.
307 * config.in: Regenerate.
308 * configure: Regenerate.
309 * remote-utils.c (xml_escape_text): Delete.
310 (buffer_grow, buffer_free, buffer_init, buffer_finish,
311 buffer_xml_printf): Move to common/buffer.c.
312 * server.c (main): Remove call to initialize_inferiors.
313 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
314 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
315 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
316 internal_error, gdb_assert, gdb_assert_fail): Delete.
317 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
318 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
319 common/buffer.h.
320 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
321 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
322 initialize_inferiors): Delete.
323
2275a1a7
PA
3242011-07-20 Pedro Alves <pedro@codesourcery.com>
325
326 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
327 symbol error.
328
0a5b1e09
PA
3292011-05-31 Pedro Alves <pedro@codesourcery.com>
330
331 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
332 assertion.
333 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
334
6938fd34
YQ
3352011-05-26 Yao Qi <yao@codesourcery.com>
336
337 * Makefile.in (thread-db.o): Track dependence to
338 common/gdb_thread_db.h.
339 * thread-db.c: include gdb_thread_db.h from right place.
340
b481f9e0
TT
3412011-05-16 Adrian Cornish <gnu@bluedreamer.com>
342
343 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
344 __FILE__ and __LINE__ to internal_error.
345
98a5dd13
DE
3462011-05-13 Doug Evans <dje@google.com>
347
348 * thread-db.c (try_thread_db_load_from_sdir): New function.
349 (try_thread_db_load_from_dir): New function.
350 (thread_db_load_search): Handle $sdir, ignore $pdir.
351 Remove trying of system directories if search of
352 libthread-db-search-path fails, that is now done via $sdir.
353
d248b706
KY
3542011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
355
356 * server.c (handle_query): Add EnableDisableTracepoints to the list
357 of supported features.
358 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
359 tracepoints.
360 (cmd_qtenable_disable): New.
361 (cmd_qtstart): Install tracepoints even if disabled.
362 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
363 receiving a QTEnable or QTDisable packet.
364 (gdb_collect): Skip data collection if fast tracepoint is disabled.
365 (ust_marker_to_static_tracepoint): Do not ignore disabled static
366 tracepoints.
367 (gdb_probe): Skip data collection if static tracepoint is disabled.
368
84e578fb
DE
3692011-05-10 Doug Evans <dje@google.com>
370
371 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
372
71f55dd8
DE
3732011-05-04 Doug Evans <dje@google.com>
374
375 * linux-low.c (linux_join): Skip process lookup.
376 * spu-low.c (spu_join): Ditto.
377 * server.c (join_inferiors_callback): Delete.
378 (process_serial_event): For 'D' packet (detach) call join_inferior
379 directly.
380
4d393d60
JM
3812011-05-04 Joseph Myers <joseph@codesourcery.com>
382
383 * README: Don't mention xscale*-*-linux*.
384 * configure.srv (xscale*-*-linux*): Don't handle target.
385
b00ad6ff
NF
3862011-04-27 Nathan Froyd <froydnj@codesourcery.com>
387
388 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
389 casting pointers.
390 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
391 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
392 (i386_emit_void_call_2): Likewise.
393
af96c192
YQ
3942011-04-26 Yao Qi <yao@codesourcery.com>
395
396 * linux-low.c: Move common macros to linux-ptrace.h.
397 Include linux-ptrace.h.
398 * Makefile.in (linux_ptrace_h): New.
399 (linux-low.o): Depends on linux-ptrace.h.
400
03f2bd59
JK
4012011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
402
403 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
404 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
405 (remote_prepare): New function with most of the TCP code from ...
406 (remote_open): ... here. Detect PORT here unconditionally. Move also
407 setting transport_is_reliable.
408 * server.c (run_once): New variable.
409 (gdbserver_usage): Document it.
410 (main): Set run_once for `--once'. Call remote_prepare. Exit after
411 the first run if RUN_ONCE.
412 * server.h (run_once, remote_prepare): New declarations.
413
7a9dd1b2
TT
4142011-04-19 Tom Tromey <tromey@redhat.com>
415
416 * win32-low.c (handle_load_dll): Remove duplicate "the".
417
81239425
PM
4182011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
419
420 Remove support for old Cygwin 1.5 versions.
421 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
422 function to avoid warning.
423 (win32_add_one_solib): Use cygwin_conv_path function to avoid
424 warning.
425
9e0627f1
PM
4262011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
427
428 * gdbserver/server.h (Macro _): Define it if not available.
429
588eebee
MS
4302011-03-14 Michael Snyder <msnyder@vmware.com>
431
348af9f7 432 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 433
43f70d4c
JB
4342011-03-10 Joel Brobecker <brobecker@adacore.com>
435
436 * Makefile.in (maintainer-clean realclean distclean): Remove
437 "make ... subdir_do" command.
438
348af9f7
MS
4392011-03-10 Michael Snyder <msnyder@vmware.com>
440
441 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
442
443 * server.c (handle_v_run): Free alloced buffer on early return.
444
e637a4f5
YQ
4452011-03-09 Yao Qi <yao@codesourcery.com>
446
447 Revert:
448 2011-03-04 Yao Qi <yao@codesourcery.com>
449
450 * Makefile.in: Remove GNU make feature --directory.
451
452 2011-03-05 Yao Qi <yao@codesourcery.com>
453
454 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
455 (subdir_do): New make target. Copied from gdb/Makefile.
456 (maintainer-clean, realclean, distclean, clean): Call corresponding
457 make targets in common/Makefile.
458
459 2011-02-11 Yao Qi <yao@codesourcery.com>
460
461 * configure.ac: Call AC_PROG_RANLIB.
462 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
463 * configure: Regenerate.
464
e6edda56
JK
4652011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
466
467 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
468
e5141119
JB
4692011-03-06 Yao Qi <yao@codesourcery.com>
470
471 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
472
64794aa4
JB
4732011-03-05 Yao Qi <yao@codesourcery.com>
474
475 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
476 (subdir_do): New make target. Copied from gdb/Makefile.
477 (maintainer-clean, realclean, distclean, clean): Call corresponding
478 make targets in common/Makefile.
479
7a762829
YQ
4802011-03-04 Yao Qi <yao@codesourcery.com>
481
482 * Makefile.in: Remove GNU make feature --directory.
483
348af9f7
MS
4842011-03-04 Michael Snyder <msnyder@vmware.com>
485
486 * server.c (queue_stop_reply): Call xmalloc not malloc.
487
4882011-03-02 Michael Snyder <msnyder@vmware.com>
489
490 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
491
9f72fee2
MS
4922011-02-28 Michael Snyder <msnyder@vmware.com>
493
588eebee
MS
494 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
495 (cmd_qtframe): Ditto.
496 (cmd_qtbuffer): Ditto.
497 (cmd_bigqtbuffer): Ditto.
498
9f72fee2
MS
499 * utils.c (decimal2str): Initialize 'width' to nine, then
500 don't mess with it.
501
8040bd49
UW
5022011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
503
504 * hostio.c (require_data): Free *data, not data.
505
7e52cbd0
JK
5062011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
507
508 * hostio.c (require_data): Use free, not xfree.
509
9130f83e
MS
5102011-02-27 Michael Snyder <msnyder@vmware.com>
511
4b812f4e
MS
512 * server.c (handle_query): Discard unused value.
513
9130f83e
MS
514 * hostio.c (require_data): Free malloc memory before returning
515 error.
516
69d37113
MS
5172011-02-26 Michael Snyder <msnyder@vmware.com>
518
519 * linux-low.c (list_threads): Call closedir for dirent.
520
35f5825a
MS
5212011-02-27 Michael Snyder <msnyder@vmware.com>
522
2a589cef
MS
523 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
524 a case statement falls through.
525
0adea5f7
MS
526 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
527
35f5825a
MS
528 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
529 in comparison.
530
238f1c74
MS
5312011-02-26 Michael Snyder <msnyder@vmware.com>
532
533 * utils.c (decimal2str): Eliminate dead code and dead param.
534 (pulongest): Drop dead param from call to decimal2str.
535 (plongest): Ditto.
536
633ff500
JB
5372011-02-24 Joel Brobecker <brobecker@adacore.com>
538
539 Revert the following patch (not approved yet):
540 2011-02-21 Hui Zhu <teawater@gmail.com>
541 * tracepoint.c (tp_printf): New function.
542 (eval_agent_expr): Handle gdb_agent_op_printf.
543
f9c6ff72
HZ
5442011-02-21 Hui Zhu <teawater@gmail.com>
545
546 * tracepoint.c (tp_printf): New function.
547 (eval_agent_expr): Handle gdb_agent_op_printf.
548
94d5e490
TT
5492011-02-18 Tom Tromey <tromey@redhat.com>
550
551 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
552 (tracepoint.o): Likewise.
553 * tracepoint.c (enum gdb_agent_op): Use ax.def.
554 (gdb_agent_op_names): Likewise.
555
c7f96d2b
TT
5562011-02-18 Tom Tromey <tromey@redhat.com>
557
558 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
559 gdb_agent_op_rot>: New constants.
560 (gdb_agent_op_names): Add pick and roll.
561 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
562 cases.
563
0feedb2c
JK
5642011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
565
566 * aclocal.m4: Regenerated with aclocal-1.11.1.
567
b3b9301e
PA
5682011-02-14 Pedro Alves <pedro@codesourcery.com>
569
570 * server.c (handle_qxfer_traceframe_info): New.
571 (qxfer_packets): Register "traceframe-info".
572 (handle_query): Report support for qXfer:traceframe-info:read+.
573 * tracepoint.c (match_blocktype): New.
574 (traceframe_find_block_type): Rename to ...
575 (traceframe_walk_blocks): ... this. Add callback filter argument,
576 and use it.
577 (traceframe_find_block_type): New, reimplemented on top of
578 traceframe_walk_blocks.
579 (build_traceframe_info_xml): New.
580 (traceframe_read_info): New.
581 * server.h (traceframe_read_info): Declare.
582
4f3e6fb7
YQ
5832011-02-11 Yao Qi <yao@codesourcery.com>
584
585 * configure.ac: Call AC_PROG_RANLIB.
586 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
587 * configure: Regenerate.
588
764880b7
PA
5892011-02-07 Pedro Alves <pedro@codesourcery.com>
590
591 * server.c (gdb_read_memory): Change return semantics to allow
592 partial transfers.
593 (handle_search_memory_1): Adjust.
594 (process_serial_event) <'m' packet>: Handle partial transfers.
595 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
596
1c79eb8a
PA
5972011-01-28 Pedro Alves <pedro@codesourcery.com>
598
599 * regcache.c (init_register_cache): Initialize
600 regcache->register_status.
601 (free_register_cache): Release regcache->register_status.
602 (regcache_cpy): Copy register_status.
603 (registers_to_string): Print 'x's for unavailable registers.
604 (supply_register): Mark the register's status valid or
605 unavailable, depending on whether a buffer was passed in or not.
606 (supply_register_zeroed): New.
607 (supply_regblock): Mark the registers' status valid or
608 unavailable, depending on whether a buffer was passed in or not.
609 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
610 (struct regcache): New `register_status' field.
611 (supply_register_zeroed): Declare.
612 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
613 supply_register_zeroed, rather than passing a NULL buffer to
614 supply_register.
615 * tracepoint.c (fetch_traceframe_registers): Update comment.
616
85724a0e
PA
6172011-01-28 Pedro Alves <pedro@codesourcery.com>
618
619 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
620 buffer explicit.
621
d08aafef
PA
6222011-01-25 Pedro Alves <pedro@codesourcery.com>
623
624 * server.h (decode_xfer_write): Change prototype.
625 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
626 and don't extract the annex here.
627 * server.c (decode_xfer_read): Remove `annex' parameter,
628 and don't extract the annex here.
629 (decode_xfer): New.
630 (struct qxfer): New.
631 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
632 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
633 (handle_qxfer_statictrace): New functions, abstracted out from
634 handle_query, and made to use the struct qxfer interface.
635 (handle_threads_qxfer_proper): Rename to ...
636 (handle_qxfer_threads_proper): ... this.
637 (handle_threads_qxfer): Rename to ...
638 (handle_qxfer_threads): ... this. Adjust.
639 (qxfer_packets): New array.
640 (handle_qxfer): New function.
641 (handle_query): Use handle_qxfer.
642
493e2a69
MS
6432011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
644
645 * gdbreplay.c: Shorten lines of >= 80 columns.
646 * linux-low.c: Ditto.
647 * linux-ppc-low.c: Ditto.
648 * linux-s390-low.c: Ditto.
649 * linux-sparc-low.c: Ditto.
650 * linux-x86-low.c: Ditto.
651 * linux-xtensa-low.c: Ditto.
652 * mem-break.c: Ditto.
653 * nto-low.c: Ditto.
654 * regcache.h: Ditto.
655 * remote-utils.c: Ditto.
656 * server.c: Ditto.
657 * server.h: Ditto.
658 * thread-db.c: Ditto.
659 * tracepoint.c: Ditto.
660 * utils.c: Ditto.
661 * win32-low.h: Ditto.
662
44944448
JB
6632011-01-05 Joel Brobecker <brobecker@adacore.com>
664
665 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
666 update.
667
71ce852c
JB
6682011-01-01 Joel Brobecker <brobecker@adacore.com>
669
670 * server.c (gdbserver_version): Update copyright year in version
671 output.
672 * gdbreplay.c (gdbreplay_version): Ditto.
673
eb826dc6
MF
6742010-12-29 Jie Zhang <jie.zhang@analog.com>
675
676 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
677 * linux-bfin-low.c: New file.
678 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
679 PT_DATA_ADDR for BFIN targets.
680 * Makefile.in (SFILES): Add linux-bfin-low.c.
681 (clean): Remove reg-bfin.c.
682 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
683 * README: Mention supported Blackfin targets.
684
39ab222a
MF
6852010-12-23 Mike Frysinger <vapier@gentoo.org>
686
687 * .gitignore: New file.
688
a1f2ce7d
MF
6892010-11-16 Mike Frysinger <vapier@gentoo.org>
690
691 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
692
f474844c
JZ
6932010-10-22 Jie Zhang <jie@codesourcery.com>
694
695 * Makefile.in: Add FLAGS_TO_PASS variable.
696 (install): Remove dependency of install-only and recursively
697 invoke make for install-only.
698
f1048712
DE
6992010-10-04 Doug Evans <dje@google.com>
700
701 * Makefile.in (uninstall): Use $(DESTDIR).
702
b53a1623
PA
7032010-09-24 Pedro Alves <pedro@codesourcery.com>
704
e6ee044d
PA
705 PR gdb/11842
706
b53a1623
PA
707 * linux-x86-low.c (compat_siginfo_from_siginfo)
708 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
709 si_code is < 0. Check for si_code == SI_TIMER before checking for
710 si_code < 0.
711
fa1bd1e4
JB
7122010-09-13 Joel Brobecker <brobecker@adacore.com>
713
714 * lynx-i386-low.c: New file.
715 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
716
47fac8f8
JB
7172010-09-13 Joel Brobecker <brobecker@adacore.com>
718
719 * lynx-low.c (ptrace_request_to_str): Remove handling for
720 request values that have been removed in LynxOS 5.x.
721
1adfc54d
JB
7222010-09-13 Joel Brobecker <brobecker@adacore.com>
723
724 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
725 <ptrace.h>
726
c2a66c29
NS
7272010-09-09 Nathan Sidwell <nathan@codesourcery.com>
728
729 * configure.ac: Add --enable-inprocess-agent option.
730 * configure: Rebuilt.
731
32fcada3
YQ
7322010-09-06 Yao Qi <yao@codesourcery.com>
733
734 * linux-low.c (linux_kill): Remove unused variable.
735 (linux_stabilize_threads): Likewise.
736 * server.c (start_inferior): Likewise.
737 (queue_stop_reply_callback): Likewise.
738 * tracepoint.c (do_action_at_tracepoint): Likewise.
739
0cccb683
YQ
7402010-09-06 Yao Qi <yao@codesourcery.com>
741
742 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
743 on return.
744
423ec54c
JK
7452010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
746
747 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
748
12ac6819
PA
7492010-09-06 Pedro Alves <pedro@codesourcery.com>
750
751 * Makefile.in (install-only): Replace $IPA_DEPFILES with
752 "$(IPA_DEPFILES)".
753
8ed54b31
JB
7542010-09-01 Joel Brobecker <brobecker@adacore.com>
755
756 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
757 gdbserver/lynx-ppc-low.c: New files.
758 * Makefile.in (lynx_low_h): New variable.
759 (lynx-low.o, lynx-ppc-low.o): New rules.
760 * configure.ac: On LynxOS, link with -lnetinet.
761 * configure.srv: Add handling of powerpc-*-lynxos* targets.
762 * configure: regenerate.
763
bb0116a4
JB
7642010-09-01 Joel Brobecker <brobecker@adacore.com>
765
766 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
767 * configure.ac: Add check for vasprintf and vsnprintf.
768 * configure, config.in: Regenerate.
769 * server.h (vasprintf, vsnprintf): Add conditional declarations.
770
a778ab81 7712010-09-01 Joel Brobecker <brobecker@adacore.com>
772
773 * gdbreplay.c: Move include of alloca.h up, next to include of
774 malloc.h.
775 * server.h: Add include of malloc.h.
776 * mem-break.c: Remove include of malloc.h.
777 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
778
8b034a19 7792010-09-01 Joel Brobecker <brobecker@adacore.com>
780
781 * Makefile.in (memmem.o): Build with -Wno-error.
782
7832010-09-01 Joel Brobecker <brobecker@adacore.com>
784
785 * utils.c (xsnprintf): Make non-static.
786 * server.h: Add xsnprintf declaration.
787 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
788 replace calls to snprintf by calls to xsnprintf throughout.
789
7902010-09-01 Joel Brobecker <brobecker@adacore.com>
791
792 * configure.ac: Add configure check for alloca.
793 * configure, config.in: Regenerate.
794 * server.h: Include alloca.h if it exists.
795 * gdbreplay.c: Include alloca.h if it exists.
796
1a981360
PA
7972010-08-28 Pedro Alves <pedro@codesourcery.com>
798
799 * linux-low.c (__SIGRTMIN): Define if not already defined.
800 (linux_create_inferior): Check for __ANDROID__ rather than
801 __SIGRTMIN.
802 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
803 are already deferred.
804 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
805 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
806 stopped and already has a pending signal to report.
807 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
808 a pending signal to report or is moving out of a jump pad.
809 (linux_init_signals): Check for __ANDROID__ rather than
810 __SIGRTMIN.
811
b4d51a55
PA
8122010-08-28 Pedro Alves <pedro@codesourcery.com>
813
814 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
815 debug_threads check. Avoid a linear search when not doing debug
816 output.
817
ec48365d
PA
8182010-08-27 Pedro Alves <pedro@codesourcery.com>
819
820 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
821 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
822 (struct file_handler) <fd>: Change type to gdb_fildes_t.
823 (process_event): Change local fd's type to gdb_fildes_t.
824 (create_file_handler): Adjust prototype.
825 (delete_file_handler): Adjust prototype.
826 (handle_file_event): Adjust prototype. Use pfildes.
827 (create_file_event): Adjsut prototype.
828 * remote-utils.c (remote_desc, listen_desc): Change type to
829 gdb_fildes_t.
830 * server.h: New gdb_fildes_t typedef.
831 [USE_WIN32API]: Include winsock2.h.
832 (delete_file_handler, add_file_handler): Adjust prototypes.
833 (pfildes): Declare.
834 * utils.c (pfildes): New.
835
854d88f0
PA
8362010-08-27 Pedro Alves <pedro@codesourcery.com>
837
838 * configure.ac (build_warnings): Add -Wno-char-subscripts.
839 * configure: Regenerate.
840
0146f85b
PA
8412010-08-27 Pedro Alves <pedro@codesourcery.com>
842
843 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
844 (linux_done_accessing_memory): ... this.
845 (linux_target_ops): Adjust.
846 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
847 * nto-low.c (nto_target_ops): Adjust comment.
848 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
849 * spu-low.c (spu_target_ops): Adjust comment.
850 * target.h (target_ops): Rename unprepare_to_access_memory field
851 to done_accessing_memory.
852 (unprepare_to_access_memory): Rename to ...
853 (done_accessing_memory): ... this.
854
90d74c30
PA
8552010-08-26 Pedro Alves <pedro@codesourcery.com>
856
857 * linux-low.c (linux_prepare_to_access_memory): New.
858 (linux_unprepare_to_access_memory): New.
859 (linux_target_ops): Install them.
860 * server.c (read_memory): Rename to ...
861 (gdb_read_memory): ... this. Use
862 prepare_to_access_memory/prepare_to_access_memory.
863 (write_memory): Rename to ...
864 (gdb_write_memory): ... this. Use
865 prepare_to_access_memory/prepare_to_access_memory.
866 (handle_search_memory_1): Adjust.
867 (process_serial_event): Adjust.
868 * target.h (struct target_ops): New fields
869 prepare_to_access_memory and unprepare_to_access_memory.
870 (prepare_to_access_memory, unprepare_to_access_memory): New.
871 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
872 prepare_to_access_memory/prepare_to_access_memory.
873 * nto-low.c (nto_target_ops): Adjust.
874 * spu-low.c (spu_target_ops): Adjust.
875 * win32-low.c (win32_target_ops): Adjust.
876
fd467969
PA
8772010-08-26 Pedro Alves <pedro@codesourcery.com>
878
879 * Makefile.in (WARN_CFLAGS): Get it from configure.
880 (WERROR_CFLAGS): New.
881 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
882 * configure.ac: Introduce --enable-werror, which adds -Werror to
883 the compiler command line. Enabled by default. Disable with
884 --disable-werror. Add -Wdeclaration-after-statement
885 Wpointer-arith and -Wformat-nonliteral to warning flags.
886 * configure: Regenerate.
887
331e2f5f
PA
8882010-08-26 Pedro Alves <pedro@codesourcery.com>
889
890 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
891
e581f2b4
PA
8922010-08-26 Pedro Alves <pedro@codesourcery.com>
893
894 * gdbreplay.c (remote_error): New.
895 (gdbchar): New.
896 (expect): Use gdbchar. Check for error reading from GDB.
897 Clarify sync error output.
898 (play): Check for errors writing to GDB.
899 * linux-low.c (sigchld_handler): Really ignore `write' errors.
900 * remote-utils.c (getpkt): Check for errors writing to the remote
901 descriptor.
902
3c11dd79
PA
9032010-08-25 Pedro Alves <pedro@codesourcery.com>
904
905 * linux-low.c (linux_wait_1): Move non-debugging code out of
906 `debug_threads' control.
907
d20a8ad9
PA
9082010-08-25 Pedro Alves <pedro@codesourcery.com>
909
910 * linux-low.c (linux_wait_1): Don't set last_status here.
911 * server.c (push_event, queue_stop_reply_callback): Assert we're
912 not pushing a TARGET_WAITKIND_IGNORE event.
913 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
914 (myresume, handle_target_event): Set the thread's last_resume_kind
915 and last_status from the target returned status.
916
964e4306
PA
9172010-08-25 Pedro Alves <pedro@codesourcery.com>
918
919 PR threads/10729
920
921 * linux-x86-low.c (update_debug_registers_callback): New.
922 (i386_dr_low_set_addr): Use it.
923 (i386_dr_low_get_addr): New.
924 (i386_dr_low_set_control): Use update_debug_registers_callback.
925 (i386_dr_low_get_control): New.
926 (i386_dr_low_get_status): Adjust.
927 * linux-low.c (linux_stop_lwp): New.
928 * linux-low.h (linux_stop_lwp): Declare.
929
930 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
931 argument instead of a i386_debug_reg_state.
932 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
933 a i386_debug_reg_state.
934 (i386_insert_aligned_watchpoint): Adjust.
935 (i386_remove_aligned_watchpoint): Adjust.
936 (i386_low_stopped_data_address): Read the debug registers from the
937 inferior instead of from the mirrors.
938 * i386-low.h (struct i386_debug_reg_state): Extend comment.
939 (i386_dr_low_get_addr): Declare.
940 (i386_dr_low_get_control): Declare.
941 (i386_dr_low_get_status): Change prototype.
942
943 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
944 (i386_dr_low_get_addr): New.
945 (i386_dr_low_get_control): New.
946 (i386_dr_low_get_status): Adjust prototype. Return
947 dr_status_mirror.
948 (i386_initial_stuff): Clear dr_status_mirror and
949 dr_control_mirror.
950 (i386_get_thread_context): Adjust.
951 (i386_set_thread_context): Adjust.
952 (i386_thread_added): Adjust.
953
5f21a75b
PA
9542010-08-24 Pedro Alves <pedro@codesourcery.com>
955
956 * linux-low.h (linux_thread_area): Delete declaration.
957
3e4c1235
TS
9582010-08-11 Thomas Schwinge <thomas@codesourcery.com>
959
960 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
961 after its termination.
962
1971b033
PA
9632010-08-09 Pedro Alves <pedro@codesourcery.com>
964
965 * linux-low.c (gdb_wants_lwp_stopped): Delete.
966 (gdb_wants_all_stopped): Delete.
967 (linux_wait_1): Don't call them.
968 * server.c (handle_v_cont): Tag all threads as want-stopped.
969 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
970 stopped as "client-wants-stopped".
971
310444ac
PA
9722010-07-31 Pedro Alves <pedro@codesourcery.com>
973
974 * Makefile.in (signals_h): New.
975 (server_h): Depend on it.
976 (server.o): Don't depend on $(signals_def).
977 (signals.o): Depend on $(signals_def).
978
a19cae16
JK
9792010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
980
981 * Makefile.in (signals_def): New.
982 (server_h): Append include/gdb/signals.h and signals_def.
983 (server.o): Append signals_def.
984
30d50328
JK
9852010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
986
987 * server.c (handle_target_event): Use target_signal_to_host for
988 resume_info.sig initialization.
989 * target.h (struct thread_resume) <sig>: New comment.
990
5c3216e2
OS
9912010-07-20 Ozkan Sezer <sezeroz@gmail.com>
992
c6f46ca0
OS
993 * server.c (handle_query): strcpy() the returned string from paddress()
994 instead of sprintf().
5c3216e2
OS
995 * utils.c (paddress): Return phex_nz().
996
6bd31874
JB
9972010-07-07 Joel Brobecker <brobecker@adacore.com>
998
999 * server.c (handle_v_cont): Call mourn_inferior if process
1000 just exited.
1001 (myresume): Likewise.
1002
0fb4aa4b
PA
10032010-07-01 Pedro Alves <pedro@codesourcery.com>
1004
1005 Static tracepoints, and integration with UST.
1006
1007 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
1008 * mem-break.c (uninsert_all_breakpoints)
1009 (reinsert_all_breakpoints): New.
1010 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
1011 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
1012 (gdb_agent_ust_loaded, helper_thread_id)
1013 (gdb_agent_helper_thread_id): New macros.
1014 (struct ipa_sym_addresses): Add addr_ust_loaded,
1015 addr_helper_thread_id, addr_cmd_buf.
1016 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
1017 (in_process_agent_loaded_ust): New.
1018 (write_e_ust_not_loaded): New.
1019 (maybe_write_ipa_ust_not_loaded): New.
1020 (struct collect_static_trace_data_action): New.
1021 (enum tracepoint_type) <static_tracepoint>: New.
1022 (struct tracepoint) <handle>: Mention static tracepoints.
1023 (struct static_tracepoint_ctx): New.
1024 (CMD_BUF_SIZE): New.
1025 (add_tracepoint_action): Handle static tracepoint actions.
1026 (unprobe_marker_at): New.
1027 (clear_installed_tracepoints): Handle static tracepoints.
1028 (cmd_qtdp): Handle static tracepoints.
1029 (probe_marker_at): New.
1030 (cmd_qtstart): Handle static tracepoints.
1031 (response_tracepoint): Handle static tracepoints.
1032 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
1033 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
1034 (get_context_regcache): Handle static tracepoints.
1035 (do_action_at_tracepoint): Handle static tracepoint actions.
1036 (traceframe_find_block_type): Handle static trace data blocks.
1037 (traceframe_read_sdata): New.
1038 (download_tracepoints): Download static tracepoint actions.
1039 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
1040 (GDB_PROBE_NAME): New.
1041 (ust_ops): New.
1042 (GET_UST_SYM): New.
1043 (USTF): New.
1044 (dlsym_ust): New.
1045 (ust_marker_to_static_tracepoint): New.
1046 (gdb_probe): New.
1047 (collect_ust_data_at_tracepoint): New.
1048 (gdb_ust_probe): New.
1049 (UNIX_PATH_MAX, SOCK_DIR): New.
1050 (gdb_ust_connect_sync_socket): New.
1051 (resume_thread, stop_thread): New.
1052 (run_inferior_command): New.
1053 (init_named_socket): New.
1054 (gdb_ust_socket_init): New.
1055 (cstr_to_hexstr): New.
1056 (next_st): New.
1057 (first_marker, next_marker): New.
1058 (response_ust_marker): New.
1059 (cmd_qtfstm, cmd_qtsstm): New.
1060 (unprobe_marker_at, probe_marker_at): New.
1061 (cmd_qtstmat, gdb_ust_thread): New.
1062 (gdb_ust_init): New.
1063 (initialize_tracepoint_ftlib): Call gdb_ust_init.
1064 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
1065 (ST_REGENTRY): New.
1066 (x86_64_st_collect_regmap): New.
1067 (X86_64_NUM_ST_COLLECT_GREGS): New.
1068 (AMD64_RIP_REGNUM): New.
1069 (supply_static_tracepoint_registers): New.
1070 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
1071 (ST_REGENTRY): New.
1072 (i386_st_collect_regmap): New.
1073 (i386_NUM_ST_COLLECT_GREGS): New.
1074 (supply_static_tracepoint_registers): New.
1075 * server.c (handle_query): Handle qXfer:statictrace:read.
1076 <qSupported>: Report support for StaticTracepoints, and
1077 qXfer:statictrace:read features.
1078 * server.h (traceframe_read_sdata)
1079 (supply_static_tracepoint_registers): Declare.
1080 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
1081 (unpack_varlen_hex): Include in IPA build.
1082 * Makefile.in (ustlibs, ustinc): New.
1083 (IPA_OBJS): Add remote-utils-ipa.o.
1084 ($(IPA_LIB)): Link -ldl and -lpthread.
1085 (UST_CFLAGS): New.
1086 (IPAGENT_CFLAGS): Add UST_CFLAGS.
1087 * config.in, configure: Regenerate.
1088
9e4344e5
PA
10892010-06-20 Ian Lance Taylor <iant@google.com>
1090 Pedro Alves <pedro@codesourcery.com>
1091
1092 * linux-x86-low.c (always_true): Delete.
1093 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
1094 trying to fool the compiler with always_true.
1095
c6beb2cb
PA
10962010-06-20 Pedro Alves <pedro@codesourcery.com>
1097
1098 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
1099 conditions in gdbserver.
1100
d2ed6730
UW
11012010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
1102
1103 * spu-low.c (spu_read_memory): Wrap around local store limit.
1104 (spu_write_memory): Likewise.
1105
4e29fb54
PA
11062010-06-15 Pedro Alves <pedro@codesourcery.com>
1107
1108 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
1109 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
1110 LONGEST uses.
1111 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
1112 uses.
1113 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
1114 uses with LONGEST uses.
1115
6a271cae
PA
11162010-06-14 Stan Shebs <stan@codesourcery.com>
1117 Pedro Alves <pedro@codesourcery.com>
1118
1119 Bytecode compiler.
1120
1121 * linux-x86-low.c: Include limits.h.
1122 (add_insns): New.
1123 (always_true): New.
1124 (EMIT_ASM): New.
1125 (EMIT_ASM32): New.
1126 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
1127 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
1128 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
1129 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
1130 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
1131 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
1132 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
1133 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
1134 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
1135 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
1136 (amd64_emit_void_call_2): New.
1137 (amd64_emit_ops): New.
1138 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
1139 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
1140 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
1141 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
1142 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
1143 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
1144 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
1145 (i386_emit_call, i386_emit_reg, i386_emit_pop)
1146 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
1147 (i386_emit_stack_adjust, i386_emit_int_call_1)
1148 (i386_emit_void_call_2): New.
1149 (i386_emit_ops): New.
1150 (x86_emit_ops): New.
1151 (the_low_target): Install x86_emit_ops.
1152 * server.h (struct emit_ops): New.
1153 (get_raw_reg_func_addr): Declare.
1154 (current_insn_ptr, emit_error): Declare.
1155 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
1156 (set_trace_state_variable_value): New defines.
1157 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
1158 addr_get_trace_state_variable_value and
1159 addr_set_trace_state_variable_value.
1160 (symbol_list): New fields for get_raw_reg,
1161 get_trace_state_variable_value and set_trace_state_variable_value.
1162 (condfn): New typedef.
1163 (struct tracepoint): New field `compiled_cond'.
1164 (do_action_at_tracepoint): Clear compiled_cond.
1165 (get_trace_state_variable_value, set_trace_state_variable_value):
1166 Export in the IPA.
1167 (condition_true_at_tracepoint): If there's a compiled condition,
1168 run that.
1169 (current_insn_ptr, emit_error): New globals.
1170 (struct bytecode_address): New.
1171 (get_raw_reg_func_addr): New.
1172 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
1173 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
1174 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
1175 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
1176 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
1177 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
1178 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
1179 (compile_tracepoint_condition, compile_bytecodes): New.
1180 * target.h (emit_ops): Forward declare.
1181 (struct target_ops): New field emit_ops.
1182 (target_emit_ops): New.
1183 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
1184 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
1185 * linux-low.c (linux_emit_ops): New.
1186 (linux_target_ops): Install it.
1187 * linux-low.h (struct linux_target_ops): New field emit_ops.
1188
92b72907
UW
11892010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
1190
1191 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
1192 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
1193
fa593d66
PA
11942010-06-01 Pedro Alves <pedro@codesourcery.com>
1195 Stan Shebs <stan@codesourcery.com>
1196
1197 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
1198 (all): Depend on $(extra_libraries).
1199 (install-only): Install the IPA.
1200 (IPA_OBJS, IPA_LIB): New.
1201 (clean): Remove the IPA lib.
1202 (IPAGENT_CFLAGS): New.
1203 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
1204 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
1205 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
1206 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
1207 * configure.ac: Check for atomic builtins support in the compiler.
1208 (IPA_DEPFILES, extra_libraries): Define.
1209 * configure.srv (ipa_obj): Add description.
1210 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
1211 (i[34567]86-*-linux*): Set ipa_obj.
1212 (x86_64-*-linux*): Set ipa_obj.
1213 * linux-low.c (stabilizing_threads): New.
1214 (supports_fast_tracepoints): New.
1215 (linux_detach): Stabilize threads before detaching.
1216 (handle_tracepoints): Handle internal tracing breakpoints. Assert
1217 the lwp is either not stabilizing, or is moving out of a jump pad.
1218 (linux_fast_tracepoint_collecting): New.
1219 (maybe_move_out_of_jump_pad): New.
1220 (enqueue_one_deferred_signal): New.
1221 (dequeue_one_deferred_signal): New.
1222 (linux_wait_for_event_1): If moving out of a jump pad, defer
1223 pending signals to later.
1224 (linux_stabilize_threads): New.
1225 (linux_wait_1): Check if threads need moving out of jump pads, and
1226 do it if so.
1227 (stuck_in_jump_pad_callback): New.
1228 (move_out_of_jump_pad_callback): New.
1229 (lwp_running): New.
1230 (linux_resume_one_lwp): Handle moving out of jump pads.
1231 (linux_set_resume_request): Dequeue deferred signals.
1232 (need_step_over_p): Also step over fast tracepoint jumps.
1233 (start_step_over): Also uninsert fast tracepoint jumps.
1234 (finish_step_over): Also reinsert fast tracepoint jumps.
1235 (linux_install_fast_tracepoint_jump): New.
1236 (linux_target_ops): Install linux_stabilize_threads and
1237 linux_install_fast_tracepoint_jump_pad.
1238 * linux-low.h (linux_target_ops) <get_thread_area,
1239 install_fast_tracepoint_jump_pad>: New fields.
1240 (struct lwp_info) <collecting_fast_tracepoint,
1241 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
1242 (linux_get_thread_area): Declare.
1243 * linux-x86-low.c (jump_insn): New.
1244 (x86_get_thread_area): New.
1245 (append_insns): New.
1246 (push_opcode): New.
1247 (amd64_install_fast_tracepoint_jump_pad): New.
1248 (i386_install_fast_tracepoint_jump_pad): New.
1249 (x86_install_fast_tracepoint_jump_pad): New.
1250 (the_low_target): Install x86_get_thread_area and
1251 x86_install_fast_tracepoint_jump_pad.
1252 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
1253 (struct fast_tracepoint_jump): New.
1254 (fast_tracepoint_jump_insn): New.
1255 (fast_tracepoint_jump_shadow): New.
1256 (find_fast_tracepoint_jump_at): New.
1257 (fast_tracepoint_jump_here): New.
1258 (delete_fast_tracepoint_jump): New.
1259 (set_fast_tracepoint_jump): New.
1260 (uninsert_fast_tracepoint_jumps_at): New.
1261 (reinsert_fast_tracepoint_jumps_at): New.
1262 (set_breakpoint_at): Use write_inferior_memory.
1263 (uninsert_raw_breakpoint): Use write_inferior_memory.
1264 (check_mem_read): Mask out fast tracepoint jumps.
1265 (check_mem_write): Mask out fast tracepoint jumps.
1266 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
1267 (set_fast_tracepoint_jump): Declare.
1268 (delete_fast_tracepoint_jump)
1269 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
1270 (reinsert_fast_tracepoint_jumps_at): Declare.
1271 * regcache.c: Don't compile many functions when building the
1272 in-process agent library.
1273 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
1274 the register buffer in the heap.
1275 (free_register_cache): If the register buffer isn't owned by the
1276 regcache, don't free it.
1277 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
1278 pre-existing register caches.
1279 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
1280 type.
1281 (convert_ascii_to_int): : Constify `from' parameter type.
1282 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
1283 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
1284 the needed buffer in-place.
1285 (relocate_instruction): New.
1286 * server.c (handle_query) <qSymbols>: If the target supports
1287 tracepoints, give it a chance of looking up symbols. Report
1288 support for fast tracepoints.
1289 (handle_status): Stabilize threads.
1290 (process_serial_event): Adjust.
1291 * server.h (struct fast_tracepoint_jump): Forward declare.
1292 (struct process_info) <fast_tracepoint_jumps>: New field.
1293 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
1294 (decode_X_packet, decode_M_packet): Adjust.
1295 (relocate_instruction): Declare.
1296 (in_process_agent_loaded): Declare.
1297 (tracepoint_look_up_symbols): Declare.
1298 (struct fast_tpoint_collect_status): Declare.
1299 (fast_tracepoint_collecting): Declare.
1300 (force_unlock_trace_buffer): Declare.
1301 (handle_tracepoint_bkpts): Declare.
1302 (initialize_low_tracepoint)
1303 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
1304 * target.h (struct target_ops) <stabilize_threads,
1305 install_fast_tracepoint_jump_pad>: New fields.
1306 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
1307 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
1308 [HAVE_STDINT_H]: Include stdint.h.
1309 (trace_debug_1): Rename to ...
1310 (trace_vdebug): ... this.
1311 (trace_debug): Rename to ...
1312 (trace_debug_1): ... this. Add `level' parameter.
1313 (trace_debug): New.
1314 (ATTR_USED, ATTR_NOINLINE): New.
1315 (IP_AGENT_EXPORT): New.
1316 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1317 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
1318 (about_to_request_buffer_space, trace_buffer_is_full)
1319 (stopping_tracepoint, expr_eval_result, error_tracepoint)
1320 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
1321 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
1322 (traceframe_write_count, traceframes_created)
1323 (trace_state_variables)
1324 New renaming defines.
1325 (struct ipa_sym_addresses): New.
1326 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
1327 (symbol_list): New.
1328 (ipa_sym_addrs): New.
1329 (all_tracepoint_symbols_looked_up): New.
1330 (in_process_agent_loaded): New.
1331 (write_e_ipa_not_loaded): New.
1332 (maybe_write_ipa_not_loaded): New.
1333 (tracepoint_look_up_symbols): New.
1334 (debug_threads) [IN_PROCESS_AGENT]: New.
1335 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
1336 (UNKNOWN_SIDE_EFFECTS): New.
1337 (stop_tracing): New.
1338 (flush_trace_buffer): New.
1339 (stop_tracing_bkpt): New.
1340 (flush_trace_buffer_bkpt): New.
1341 (read_inferior_integer): New.
1342 (read_inferior_uinteger): New.
1343 (read_inferior_data_pointer): New.
1344 (write_inferior_data_pointer): New.
1345 (write_inferior_integer): New.
1346 (write_inferior_uinteger): New.
1347 (struct collect_static_trace_data_action): Delete.
1348 (enum tracepoint_type): New.
1349 (struct tracepoint) <type>: New field `type'.
1350 <actions_str, step_actions, step_actions_str>: Only include in GDBserver.
1351 <orig_size, obj_addr_on_target, adjusted_insn_addr>
1352 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
1353 (tracepoints): Use IP_AGENT_EXPORT.
1354 (last_tracepoint): Don't include in the IPA.
1355 (stopping_tracepoint): Use IP_AGENT_EXPORT.
1356 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
1357 (alloced_trace_state_variables): New.
1358 (trace_state_variables): Use IP_AGENT_EXPORT.
1359 (traceframe_t): Delete unused variable.
1360 (circular_trace_buffer): Don't include in the IPA.
1361 (trace_buffer_start): Delete.
1362 (struct trace_buffer_control): New.
1363 (trace_buffer_free): Delete.
1364 (struct ipa_trace_buffer_control): New.
1365 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
1366 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
1367 New.
1368 (trace_buffer_ctrl): New.
1369 (TRACE_BUFFER_CTRL_CURR): New.
1370 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
1371 Reimplement as macros.
1372 (trace_buffer_wrap): Delete.
1373 (traceframe_write_count, traceframe_read_count)
1374 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
1375 (struct tracepoint_hit_ctx) <type>: New field.
1376 (struct fast_tracepoint_ctx): New.
1377 (memory_barrier): New.
1378 (cmpxchg): New.
1379 (record_tracepoint_error): Update atomically in the IPA.
1380 (clear_inferior_trace_buffer): New.
1381 (about_to_request_buffer_space): New.
1382 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
1383 updating the same buffer.
1384 (add_tracepoint): Default the tracepoint's type to trap
1385 tracepoint, and orig_size to -1.
1386 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
1387 internal variables.
1388 (create_trace_state_variable): New parameter `gdb'. Handle it.
1389 (clear_installed_tracepoints): Clear fast tracepoint jumps.
1390 (cmd_qtdp): Handle fast tracepoints.
1391 (cmd_qtdv): Adjust.
1392 (max_jump_pad_size): New.
1393 (gdb_jump_pad_head): New.
1394 (get_jump_space_head): New.
1395 (claim_jump_space): New.
1396 (sort_tracepoints): New.
1397 (MAX_JUMP_SIZE): New.
1398 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
1399 IPA.
1400 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
1401 support. Upload fast traceframes, and delete internal IPA
1402 breakpoints.
1403 (stop_tracing_handler): New.
1404 (flush_trace_buffer_handler): New.
1405 (cmd_qtstop): Upload fast tracepoints.
1406 (response_tracepoint): Handle fast tracepoints.
1407 (tracepoint_finished_step): Upload fast traceframes. Set the
1408 tracepoint hit context's tracepoint type.
1409 (handle_tracepoint_bkpts): New.
1410 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
1411 type. Add comment about fast tracepoints.
1412 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
1413 non-existing action_str field.
1414 (get_context_regcache): Handle fast tracepoints.
1415 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
1416 to the regcache.
1417 (fast_tracepoint_from_jump_pad_address): New.
1418 (fast_tracepoint_from_ipa_tpoint_address): New.
1419 (collecting_t): New.
1420 (force_unlock_trace_buffer): New.
1421 (fast_tracepoint_collecting): New.
1422 (collecting): New.
1423 (gdb_collect): New.
1424 (write_inferior_data_ptr): New.
1425 (target_tp_heap): New.
1426 (target_malloc): New.
1427 (download_agent_expr): New.
1428 (UALIGN): New.
1429 (download_tracepoints): New.
1430 (download_trace_state_variables): New.
1431 (upload_fast_traceframes): New.
1432 (IPA_FIRST_TRACEFRAME): New.
1433 (IPA_NEXT_TRACEFRAME_1): New.
1434 (IPA_NEXT_TRACEFRAME): New.
1435 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
1436 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
1437 (gdb_jump_pad_buffer_end): New.
1438 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
1439 (initialize_tracepoint): Adjust.
1440 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
1441 buffer. Initialize the low module.
1442 * utils.c (PREFIX, TOOLNAME): New.
1443 (malloc_failure): Use PREFIX.
1444 (error): In the IPA, an error causes an exit.
1445 (fatal, warning): Use PREFIX.
1446 (internal_error): Use TOOLNAME.
1447 (NUMCELLS): Increase to 10.
1448 * configure, config.in: Regenerate.
1449
d149dd1d
PA
14502010-06-01 Pedro Alves <pedro@codesourcery.com>
1451
1452 * server.c (handle_query) <qSupported>: Do two passes over the
1453 qSupported string to avoid nesting strtok.
1454
f6528abd
JK
14552010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1456
1457 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
1458 (CDEPS): New.
1459 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
1460 -Wl,--dynamic-list.
1461 * configure: Regenerate.
1462 * proc-service.list: New.
1463
ca2a87a0
JK
14642010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1465
1466 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
1467 New comment.
1468
363a6e9f
OS
14692010-05-26 Ozkan Sezer <sezeroz@gmail.com>
1470
1471 * gdbreplay.c (remote_open): Check error return from socket() call by
1472 its equality to -1 not by it being negative.
1473 * remote-utils.c (remote_open): Likewise.
1474
d23b6cb1
PA
14752010-05-23 Pedro Alves <pedro@codesourcery.com>
1476
1477 * config.h: Regenerate.
1478
28d3cf85
MK
14792010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
1480
1481 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
1482 doesn't provide PTRACE_GET_THREAD_AREA.
1483
fea36a59
MK
14842010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
1485
1486 * linux-m68k-low.c: Include <asm/ptrace.h>
1487 (ps_get_thread_area): Implement.
1488
24b066ba
DE
14892010-05-03 Doug Evans <dje@google.com>
1490
1491 * event-loop.c (struct callback_event): New struct.
1492 (callback_list): New global.
1493 (append_callback_event, delete_callback_event): New functions.
1494 (process_callback): New function.
1495 (start_event_loop): Call it.
1496 * remote-utils.c (NOT_SCHEDULED): Define.
1497 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
1498 moved out of readchar.
1499 (readchar): Rewrite. Call reschedule before returning.
1500 (reset_readchar): New function.
1501 (remote_close): Call it.
1502 (process_remaining, reschedule): New functions.
1503 * server.h (callback_handler_func): New typedef.
1504 (append_callback_event, delete_callback_event): Declare.
1505
9836d6ea
PA
15062010-05-03 Pedro Alves <pedro@codesourcery.com>
1507
1508 * proc-service.c (ps_pglobal_lookup): Use
1509 thread_db_look_up_one_symbol.
1510 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
1511 parameter. Use it instead of all_symbols_looked_up.
1512 * server.h (struct process_info) <all_symbols_looked_up>: Delete
1513 field.
1514 (all_symbols_looked_up): Don't declare.
1515 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
1516 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
1517 field.
1518 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
1519 Set all_symbols_looked_up here.
1520 (thread_db_look_up_one_symbol): New.
1521 (thread_db_get_tls_address): Adjust.
1522 (thread_db_load_search, try_thread_db_load_1): Always allocate the
1523 thread_db object on the heap, and tentatively set it in the
1524 process structure.
1525 (thread_db_init): Don't set all_symbols_looked_up here.
1526 * linux-low.h (thread_db_look_up_one_symbol): Declare.
1527
7984d532
PA
15282010-05-03 Pedro Alves <pedro@codesourcery.com>
1529
1530 * linux-low.c (linux_kill, linux_detach): Adjust.
1531 (status_pending_p_callback): Remove redundant statement. Check
1532 for !TARGET_WAITIKIND_IGNORE, instead of
1533 TARGET_WAITKIND_STOPPED.
1534 (handle_tracepoints): Make sure LWP is locked. Adjust.
1535 (linux_wait_for_event_1): Adjust.
1536 (linux_cancel_breakpoints): New.
1537 (unsuspend_one_lwp): New.
1538 (unsuspend_all_lwps): New.
1539 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
1540 (send_sigstop_callback): Change return type to int, add new
1541 `except' parameter and handle it.
1542 (suspend_and_send_sigstop_callback): New.
1543 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
1544 pass them down. If SUSPEND, also increment the lwp's suspend
1545 count.
1546 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
1547 (need_step_over_p): Don't consider suspended LWPs.
1548 (start_step_over): Adjust.
1549 (proceed_one_lwp): Change return type to int, add new `except'
1550 parameter and handle it.
1551 (unsuspend_and_proceed_one_lwp): New.
1552 (proceed_all_lwps): Use find_inferior instead of
1553 for_each_inferior.
1554 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
1555 also decrement the suspend count of LWPs. Pass `except' down,
1556 instead of hacking its suspend count.
1557 (linux_pause_all): Add `freeze' parameter. Adjust.
1558 (linux_unpause_all): New.
1559 (linux_target_ops): Install linux_unpause_all.
1560 * server.c (handle_status): Adjust.
1561 * target.h (struct target_ops): New fields `unpause_all' and
1562 `cancel_breakpoints'. Add new parameter to `pause_all'.
1563 (pause_all): Add new `freeze' parameter.
1564 (unpause_all): New.
1565 (cancel_breakpoints): New.
1566 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
1567 cancel breakpoints.
1568 (cmd_qtstart): Pause threads.
1569 (stop_tracing): Pause threads, and cancel breakpoints.
1570 * win32-low.c (win32_target_ops): Adjust.
1571
e471f25b
PA
15722010-05-03 Pedro Alves <pedro@codesourcery.com>
1573
1574 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
1575 the inferior right away from here...
1576 (linux_wait_1): ... to here, and adjust to check the thread's
1577 last_resume_kind instead of the lwp's step or stop_expected flags.
1578
1915ef4f
PA
15792010-05-02 Pedro Alves <pedro@codesourcery.com>
1580
1581 * README: Use consistent `GDB' and `GDBserver' spellings.
1582
f9e39928
PA
15832010-05-02 Pedro Alves <pedro@codesourcery.com>
1584
1585 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
1586 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
1587 (linux_detach_one_lwp): Assume the lwp is stopped.
1588 (any_thread_of): Delete.
1589 (linux_detach): Stop all lwps here. Don't blindly delete all
1590 breakpoints.
1591 (delete_lwp_callback): New.
1592 (linux_mourn): Delete all lwps of the process that is gone.
1593 (linux_wait_1): Don't delete the last lwp of the process here.
1594 * mem-break.h (mark_breakpoints_out): Declare.
1595 * mem-break.c (mark_breakpoints_out): New.
1596 (free_all_breakpoints): Use it.
1597 * server.c (handle_target_event): If the process is gone, mark
1598 breakpoints out.
1599 * thread-db.c (struct thread_db) <create_bp>: New field.
1600 (thread_db_enable_reporting): Fix prototype. Store a thread event
1601 breakpoint reference in the thread_db struct.
1602 (thread_db_load_search): Clear the thread_db object.
1603 (try_thread_db_load_1): Ditto.
1604 (switch_to_process): New.
1605 (disable_thread_event_reporting): Use it.
1606 (remove_thread_event_breakpoints): New.
1607 (thread_db_detach, thread_db_mourn): Use it.
1608
1e7fc18c
PA
16092010-05-01 Pedro Alves <pedro@codesourcery.com>
1610
1611 * linux-low.c (linux_enable_event_reporting): New.
1612 (linux_wait_for_event_1, handle_extended_wait): Use it.
1613
02fc4de7
PA
16142010-04-30 Pedro Alves <pedro@codesourcery.com>
1615
1616 * linux-low.c (linux_kill_one_lwp, linux_kill)
1617 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
1618 (send_sigstop): Take an lwp_info as parameter instead. Queue a
1619 SIGSTOP even if the LWP is stopped.
1620 (send_sigstop_callback): New.
1621 (stop_all_lwps): Use send_sigstop_callback instead.
1622 (linux_resume_one_thread): Adjust.
1623 (proceed_one_lwp): Still proceed an LWP that the client has
1624 requested to stop, if we haven't reported it as stopped yet. Make
1625 sure that LWPs the client want stopped, have a pending SIGSTOP.
1626
bc3b5632
DE
16272010-04-26 Doug Evans <dje@google.com>
1628
ae1ada35
DE
1629 * server.c (handle_general_set): Make static.
1630
bc3b5632
DE
1631 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
1632 Print received char after testing for error/eof instead of before.
1633 (input_interrupt): Tweak comment.
1634
65730243
DE
16352010-04-23 Doug Evans <dje@google.com>
1636
1637 * server.c (start_inferior): Print inferior argv if --debug.
1638
a8ae7dc0
AR
16392010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
1640
1641 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
1642 * nto-x86-low.c: Include server.h
1643
1c07cc19
PM
16442010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
1645
1646 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
1647 be consistent with other sources of this directory.
1648 (init_registers_amd64): Correct name of source file of this function
1649 in the comment.
1650
e0a61e09
PM
16512010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
1652
1653 * configure.srv (x86_64-*-mingw*): New configuration for Windows
1654 64-bit executables.
1655
54709339
PM
16562010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
1657
1658 * win32-i386-low.c: Add 64-bit support.
1659 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
1660 (init_registers_amd64): Declare.
1661 (mappings): Add 64-bit version of array.
1662 (init_windows_x86): New function.
1663 (the_low_target): Change init_arch field to init_windows_x86.
1664
e8f0053d
PM
16652010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
1666
1667 * win32-low.c: Adapt to support also 64-bit architecture.
1668 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
1669 (get_image_name): Use SIZE_T type for local variable `done'.
1670 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
1671 (toolhelp_get_dll_name): Idem.
1672 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
1673 Use uintptr_t typecast to avoid warning.
1674 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
1675 (handle_exception): Use phex_nz to avoid warning.
1676 (win32_wait): Remove unused local variable `process'.
1677
c481e77e
PM
16782010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
1679
1680 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
1681 `amd64-avx.o'.
1682
12ea4b69
PM
16832010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
1684
1685 * configure.ac: Use `ws2_32' library for srv_mingw.
1686 * configure: Regenerate.
1687 * gdbreplay.c: Include winsock2.h instead of winsock.h.
1688 * remote-utils.c: Likewise.
1689
f6d1620c
L
16902010-04-17 H.J. Lu <hongjiu.lu@intel.com>
1691
1692 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
1693 if __x86_64__ is defined.
1694
8e642873
PM
16952010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
1696
1697 * configure: Regenerate.
1698
711e434b
PM
16992010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
1700
1701 * server.c (handle_query): Handle 'qGetTIBAddr' query.
1702 * target.h (target_ops): New get_tib_address field.
1703 * win32-low.h (win32_thread_info): Add thread_local_base field.
1704 * win32-low.c (child_add_thread): Add tlb argument.
1705 Set thread_local_base field to TLB.
1706 (get_child_debug_event): Adapt to child_add_thread change.
1707 (win32_get_tib_address): New function.
1708 (win32_target_ops): Set get_tib_address field to
1709 win32_get_tib_address.
1710 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
1711
505106cd
PA
17122010-04-12 Pedro Alves <pedro@codesourcery.com>
1713
505106cd
PA
1714 * linux-low.c (linux_mourn): Also remove the process.
1715 * server.c (handle_target_event): Don't remove the process here.
1716 * nto-low.c (nto_mourn): New.
1717 (nto_target_ops): Install it.
1718 * spu-low.c (spu_mourn): New.
1719 (spu_target_ops): Install it.
1720 * win32-low.c (win32_mourn): New.
1721 (win32_target_ops): Install it.
1722
e8470a06
PA
17232010-04-12 Pedro Alves <pedro@codesourcery.com>
1724
1725 * server.h (buffer_xml_printf): Remove redundant `;'.
1726
45ba0d02
PA
17272010-04-12 Pedro Alves <pedro@codesourcery.com>
1728
1729 * regcache.c (set_register_cache): Invalidate regcaches before
1730 changing the register cache layout.
1731 (regcache_invalidate_one): Allow a NULL regcache.
1732 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
1733 regcaches before changing the register cache layout or the target
1734 regsets.
1735
59e04013
L
17362010-04-12 H.J. Lu <hongjiu.lu@intel.com>
1737
1738 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
1739 variable warning on Linux/x86-64.
1740
8336d594
PA
17412010-04-11 Pedro Alves <pedro@codesourcery.com>
1742
1743 GDBserver disconnected tracing support.
1744
1745 * linux-low.c (linux_remove_process): Delete.
1746 (add_lwp): Don't set last_resume_kind here.
1747 (linux_kill): Use `mourn'.
1748 (linux_detach): Use `thread_db_detach', and `mourn'.
1749 (linux_mourn): New.
1750 (linux_attach_lwp_1): Adjust comment.
1751 (linux_attach): last_resume_kind moved the thread_info; adjust.
1752 (status_pending_p_callback): Adjust.
1753 (linux_wait_for_event_1): Adjust.
1754 (count_events_callback, select_singlestep_lwp_callback)
1755 (select_event_lwp_callback, cancel_breakpoints_callback)
1756 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
1757 (proceed_one_lwp): Adjust.
1758 (linux_async): Add debug output.
1759 (linux_thread_stopped): New.
1760 (linux_pause_all): New.
1761 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
1762 linux_pause_all.
1763 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
1764 (thread_db_free): Delete declaration.
1765 (thread_db_detach, thread_db_mourn): Declare.
1766 * thread-db.c (thread_db_init): Use thread_db_mourn.
1767 (thread_db_free): Delete, split in two.
1768 (disable_thread_event_reporting): New.
1769 (thread_db_detach): New.
1770 (thread_db_mourn): New.
1771
1772 * server.h (struct thread_info) <last_resume_kind>: New field.
1773 <attached>: Add comment.
1774 <gdb_detached>: New field.
1775 (handler_func): Change return type to int.
1776 (handle_serial_event, handle_target_event): Ditto.
1777 (gdb_connected): Declare.
1778 (tracing): Delete.
1779 (disconnected_tracing): Declare.
1780 (stop_tracing): Declare.
1781
1782 * server.c (handle_query) <qSupported>: Report support for
1783 disconnected tracing.
1784 (queue_stop_reply_callback): Account for running threads.
1785 (gdb_wants_thread_stopped): New.
1786 (gdb_wants_all_threads_stopped): New.
1787 (gdb_reattached_process): New.
1788 (handle_status): Clear the `gdb_detached' flag of all processes.
1789 In all-stop, stop all threads.
1790 (main): Be sure to leave tfind mode. Handle disconnected tracing.
1791 (process_serial_event): If the remote connection breaks, or if an
1792 exit was forced with "monitor exit", force an event loop exit.
1793 Handle disconnected tracing on detach.
1794 (handle_serial_event): Adjust.
1795 (handle_target_event): If GDB isn't connected, forward events back
1796 to the inferior, unless the last process exited, in which case,
1797 exit gdbserver. Adjust interface.
1798
1799 * remote-utils.c (remote_open): Don't block in accept. Instead
1800 register an event loop source on the listen socket file
1801 descriptor. Refactor bits into ...
1802 (listen_desc): ... this new global.
1803 (gdb_connected): ... this new function.
1804 (enable_async_notification): ... this new function.
1805 (handle_accept_event): ... this new function.
1806 (remote_close): Clear remote_desc.
1807
1808 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
1809
1810 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
1811 New fields.
1812 (mourn_inferior): Define.
1813 (target_process_qsupported): Avoid the dangling else problem.
1814 (thread_stopped): Define.
1815 (pause_all): Define.
1816 (target_waitstatus_to_string): Declare.
1817 * target.c (target_waitstatus_to_string): New.
1818
1819 * tracepoint.c (tracing): Make extern.
1820 (disconnected_tracing): New.
1821 (stop_tracing): Make extern. Handle tracing stops due to GDB
1822 disconnecting.
1823 (cmd_qtdisconnected): New.
1824 (cmd_qtstatus): Report disconnected tracing status in trace reply.
1825 (handle_tracepoint_general_set): Handle QTDisconnected.
1826
1827 * event-loop.c (event_handler_func): Change return type to int.
1828 (process_event): Bail out if the event handler wants the event
1829 loop to stop.
1830 (handle_file_event): Ditto.
1831 (start_event_loop): Bail out if the event handler wants the event
1832 loop to stop.
1833
1834 * nto-low.c (nto_target_ops): Adjust.
1835 * spu-low.c (spu_wait): Don't remove the process here.
1836 (spu_target_ops): Adjust.
1837 * win32-low.c (win32_wait): Don't remove the process here.
1838 (win32_target_ops): Adjust.
1839
5d267c4c
PA
18402010-04-11 Pedro Alves <pedro@codesourcery.com>
1841
1842 * regcache.c (realloc_register_cache): Invalidate inferior's
1843 regcache before recreating it.
1844
623ccd72
PA
18452010-04-09 Pedro Alves <pedro@codesourcery.com>
1846
1847 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
1848
219f2f23
PA
18492010-04-09 Stan Shebs <stan@codesourcery.com>
1850 Pedro Alves <pedro@codesourcery.com>
1851
1852 * server.h (LONGEST): New.
1853 (struct thread_info) <while_stepping>: New field.
1854 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
1855 Declare.
1856 (initialize_tracepoint, handle_tracepoint_general_set)
1857 (handle_tracepoint_query, tracepoint_finished_step)
1858 (tracepoint_was_hit, release_while_stepping_state_list):
1859 (current_traceframe): Declare.
1860 * server.c (handle_general_set): Handle tracepoint packets.
1861 (read_memory): New.
1862 (write_memory): New.
1863 (handle_search_memory_1): Use read_memory.
1864 (handle_query): Report support for conditional tracepoints, trace
1865 state variables, and tracepoint sources. Handle tracepoint
1866 queries.
1867 (main): Initialize the tracepoints module.
1868 (process_serial_event): Handle traceframe reads/writes.
1869
1870 * linux-low.c (handle_tracepoints): New.
1871 (linux_wait_1): Call it.
1872 (linux_resume_one_lwp): Handle while-stepping.
1873 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
1874 (linux_target_ops): Install them.
1875 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
1876 New field.
1877 * linux-x86-low.c (x86_supports_tracepoints): New.
1878 (the_low_target). Install it.
1879
1880 * mem-break.h (delete_breakpoint): Declare.
1881 * mem-break.c (delete_breakpoint): Make external.
1882
1883 * target.h (struct target_ops): Add `supports_tracepoints',
1884 `read_pc', and `write_pc' fields.
1885 (target_supports_tracepoints): Define.
1886 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
1887 (phex_nz): New.
1888
1889 * regcache.h (struct regcache) <registers_owned>: New field.
1890 (init_register_cache, regcache_cpy): Declare.
1891 (regcache_read_pc, regcache_write_pc): Declare.
1892 (register_cache_size): Declare.
1893 (supply_regblock): Declare.
1894 * regcache.c (init_register_cache): New.
1895 (new_register_cache): Use it.
1896 (regcache_cpy): New.
1897 (register_cache_size): New.
1898 (supply_regblock): New.
1899 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 1900
219f2f23
PA
1901 * tracepoint.c: New.
1902
1903 * Makefile.in (OBS): Add tracepoint.o.
1904 (tracepoint.o): New rule.
1905
3a13a53b
L
19062010-04-08 H.J. Lu <hongjiu.lu@intel.com>
1907
1908 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
1909 (i386-mmx.o): New.
1910 (i386-mmx.c): Likewise.
1911 (i386-mmx-linux.o): Likewise.
1912 (i386-mmx-linux.c): Likewise.
1913
1914 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
1915 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
1916 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
1917 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
1918
1919 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
1920 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
1921 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
1922
1570b33e
L
19232010-04-07 H.J. Lu <hongjiu.lu@intel.com>
1924
1925 * Makefile.in (clean): Updated.
1926 (i386-avx.o): New.
1927 (i386-avx.c): Likewise.
1928 (i386-avx-linux.o): Likewise.
1929 (i386-avx-linux.c): Likewise.
1930 (amd64-avx.o): Likewise.
1931 (amd64-avx.c): Likewise.
1932 (amd64-avx-linux.o): Likewise.
1933 (amd64-avx-linux.c): Likewise.
1934
1935 * configure.srv (srv_i386_regobj): Add i386-avx.o.
1936 (srv_i386_linux_regobj): Add i386-avx-linux.o.
1937 (srv_amd64_regobj): Add amd64-avx.o.
1938 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
1939 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
1940 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
1941 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
1942 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
1943 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
1944 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
1945
1946 * i387-fp.c: Include "i386-xstate.h".
1947 (i387_xsave): New.
1948 (i387_cache_to_xsave): Likewise.
1949 (i387_xsave_to_cache): Likewise.
1950 (x86_xcr0): Likewise.
1951
1952 * i387-fp.h (i387_cache_to_xsave): Likewise.
1953 (i387_xsave_to_cache): Likewise.
1954 (x86_xcr0): Likewise.
1955
1956 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
1957 * linux-crisv32-low.c (target_regsets): Likewise.
1958 * linux-m68k-low.c (target_regsets): Likewise.
1959 * linux-mips-low.c (target_regsets): Likewise.
1960 * linux-ppc-low.c (target_regsets): Likewise.
1961 * linux-s390-low.c (target_regsets): Likewise.
1962 * linux-sh-low.c (target_regsets): Likewise.
1963 * linux-sparc-low.c (target_regsets): Likewise.
1964 * linux-xtensa-low.c (target_regsets): Likewise.
1965
1966 * linux-low.c: Include <sys/uio.h>.
1967 (regsets_fetch_inferior_registers): Support nt_type.
1968 (regsets_store_inferior_registers): Likewise.
1969 (linux_process_qsupported): New.
1970 (linux_target_ops): Add linux_process_qsupported.
1971
1972 * linux-low.h (regset_info): Add nt_type.
1973 (linux_target_ops): Add process_qsupported.
1974
1975 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
1976 and <sys/uio.h>.
1977 (init_registers_i386_avx_linux): New.
1978 (init_registers_amd64_avx_linux): Likewise.
1979 (xmltarget_i386_linux_no_xml): Likewise.
1980 (xmltarget_amd64_linux_no_xml): Likewise.
1981 (PTRACE_GETREGSET): Likewise.
1982 (PTRACE_SETREGSET): Likewise.
1983 (x86_fill_xstateregset): Likewise.
1984 (x86_store_xstateregset): Likewise.
1985 (use_xml): Likewise.
1986 (x86_linux_update_xmltarget): Likewise.
1987 (x86_linux_process_qsupported): Likewise.
1988 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
1989 (x86_arch_setup): Don't call init_registers_amd64_linux nor
1990 init_registers_i386_linux here. Call
1991 x86_linux_update_xmltarget.
1992 (the_low_target): Add x86_linux_process_qsupported.
1993
1994 * server.c (handle_query): Call target_process_qsupported.
1995
1996 * target.h (target_ops): Add process_qsupported.
1997 (target_process_qsupported): New.
1998
fc7238bb
PA
19992010-04-03 Pedro Alves <pedro@codesourcery.com>
2000
2001 * inferiors.c (add_thread): Set last_status kind to
2002 TARGET_WAITKIND_IGNORE.
2003 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
2004 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
2005 (linux_wait_1): Move `thread' local definition to block that uses
2006 it. Don't NULL initialize `event_child'.
2007 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
2008 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
2009 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
2010
bdabb078
PA
20112010-04-01 Pedro Alves <pedro@codesourcery.com>
2012
2013 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
2014 an extended waitstatus, or by a watchpoint.
2015 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
2016 thread was stepping or has been stopped by a watchpoint.
2017
d3bbe7a0
PA
20182010-04-01 Pedro Alves <pedro@codesourcery.com>
2019
2020 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
2021 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
2022 of another, then delete the previous, and validate all
2023 breakpoints.
2024 (validate_inserted_breakpoint): New.
2025 (delete_disabled_breakpoints): New.
2026 (validate_breakpoints): New.
2027 (check_mem_read): Validate breakpoints before trusting their
2028 shadow. Delete disabled breakpoints.
2029 (check_mem_write): Validate breakpoints before trusting they
2030 should be inserted. Delete disabled breakpoints.
2031 * mem-break.h (validate_breakpoints):
2032 * server.c (handle_query): Validate breakpoints when we see a
2033 qSymbol query.
2034
8b07ae33
PA
20352010-04-01 Pedro Alves <pedro@codesourcery.com>
2036
2037 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
2038 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
2039 if we could tell there's a GDB breakpoint at stop_pc.
2040 (need_step_over_p): Don't do a step over if we find a GDB
2041 breakpoint at the resume PC.
2042
2043 * mem-break.c (struct raw_breakpoint): New.
2044 (enum bkpt_type): New type `gdb_breakpoint'.
2045 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
2046 fields. New field `raw'.
2047 (find_raw_breakpoint_at): New.
2048 (set_raw_breakpoint_at): Handle refcounting. Create a raw
2049 breakpoint instead.
2050 (set_breakpoint_at): Adjust.
2051 (delete_raw_breakpoint): New.
2052 (release_breakpoint): New.
2053 (delete_breakpoint): Rename to...
2054 (delete_breakpoint_1): ... this. Add proc parameter. Use
2055 release_breakpoint. Return ENOENT.
2056 (delete_breakpoint): Reimplement.
2057 (find_breakpoint_at): Delete.
2058 (find_gdb_breakpoint_at): New.
2059 (delete_breakpoint_at): Delete.
2060 (set_gdb_breakpoint_at): New.
2061 (delete_gdb_breakpoint_at): New.
2062 (gdb_breakpoint_here): New.
2063 (set_reinsert_breakpoint): Use release_breakpoint.
2064 (uninsert_breakpoint): Rename to ...
2065 (uninsert_raw_breakpoint): ... this.
2066 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
2067 (reinsert_raw_breakpoint): Change parameter type to
2068 raw_breakpoint.
2069 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
2070 instead.
2071 (check_breakpoints): Adjust. Use release_breakpoint.
2072 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
2073 (breakpoint_inserted_here): Ditto.
2074 (check_mem_read): Adjust to iterate over raw breakpoints instead.
2075 Don't trust the breakpoint's shadow if it is not inserted.
2076 (check_mem_write): Adjust to iterate over raw breakpoints instead.
2077 (delete_all_breakpoints): Adjust.
2078 (free_all_breakpoints): Mark all breakpoints as uninserted, and
2079 use delete_breakpoint_1.
2080
2081 * mem-break.h (breakpoints_supported): Delete declaration.
2082 (set_gdb_breakpoint_at): Declare.
2083 (gdb_breakpoint_here): Declare.
2084 (delete_breakpoint_at): Delete.
2085 (delete_gdb_breakpoint_at): Declare.
2086
2087 * server.h (struct raw_breakpoint): Forward declare.
2088 (struct process_info): New field `raw_breakpoints'.
2089
2090 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
2091 breakpoints.
2092
6bf5e0ba
PA
20932010-03-24 Pedro Alves <pedro@codesourcery.com>
2094
2095 * linux-low.c (status_pending_p_callback): Fix comment.
2096 (linux_wait_for_event_1): Move most of the internal breakpoint
2097 handling from here...
2098 (linux_wait_1): ... to here.
2099 (count_events_callback): New.
2100 (select_singlestep_lwp_callback): New.
2101 (select_event_lwp_callback): New.
2102 (cancel_breakpoints_callback): New.
2103 (select_event_lwp): New.
2104 (linux_wait_1): Simplify internal breakpoint handling. Give equal
2105 priority to all LWPs that have had events that should be reported
2106 to the client. Cancel breakpoints when about to reporting the
2107 event to the client, not while stopping lwps. No longer cancel
2108 finished single-steps here.
2109 (cancel_finished_single_step): Delete.
2110 (cancel_finished_single_steps): Delete.
2111
414a389f
PA
21122010-03-24 Pedro Alves <pedro@codesourcery.com>
2113
2114 * mem-break.c (enum bkpt_type): New.
2115 (struct breakpoint): New field `type'.
2116 (set_breakpoint_at): Change return type to struct breakpoint
2117 pointer. Set type to `other_breakpoint' by default.
2118 (delete_breakpoint): Rewrite, supporting more than one breakpoint
2119 in the breakpoint list.
2120 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
2121 (reinsert_breakpoint): Rename to ...
2122 (reinsert_raw_breakpoint): ... this.
2123 (reinsert_breakpoints_at): Adjust.
2124 * mem-break.h (struct breakpoint): Declare.
2125 (set_breakpoint_at): Change return type to struct breakpoint
2126 pointer.
2127
2280c721
PA
21282010-03-24 Pedro Alves <pedro@codesourcery.com>
2129
2130 * server.c (handle_query): Assign, not compare.
2131
d50171e4
PA
21322010-03-24 Pedro Alves <pedro@codesourcery.com>
2133
2134 Teach linux gdbserver to step-over-breakpoints.
2135
2136 * linux-low.c (can_hardware_single_step): New.
2137 (supports_breakpoints): New.
2138 (handle_extended_wait): If stopping threads, read the stop pc of
2139 the new cloned LWP.
2140 (get_pc): New.
2141 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
2142 low target doesn't support retrieving the PC.
2143 (add_lwp): Set last_resume_kind to resume_continue.
2144 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
2145 (linux_attach): Don't clear stop_expected. Set the lwp's
2146 last_resume_kind to resume_stop.
2147 (linux_detach_one_lwp): Don't check for removed breakpoints.
2148 (check_removed_breakpoint): Delete.
2149 (status_pending_p): Rename to ...
2150 (status_pending_p_callback): ... this. Don't check for removed
2151 breakpoints. Don't consider threads that are stopped from GDB's
2152 perspective.
2153 (linux_wait_for_lwp): Always read the stop_pc here.
2154 (cancel_breakpoint): New.
2155 (step_over_bkpt): New global.
2156 (linux_wait_for_event_1): Implement stepping over breakpoints.
2157 (gdb_wants_lwp_stopped): New.
2158 (gdb_wants_all_stopped): New.
2159 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
2160 single-step traps here. Store the thread's last reported target
2161 wait status.
2162 (send_sigstop): Don't clear stop_expected. Always set it,
2163 instead.
2164 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
2165 (cancel_finished_single_step): New.
2166 (cancel_finished_single_steps): New.
2167 (wait_for_sigstop): Don't cancel finished single-step traps here.
2168 (linux_resume_one_lwp): Don't check for removed breakpoints.
2169 Don't set `step' on non-hardware step archs.
2170 (linux_set_resume_request): Ignore resume_stop requests if already
2171 stopping or stopped. Set the lwp's last_resume_kind.
2172 (resume_status_pending_p): Don't check for removed breakpoints.
2173 (need_step_over_p): New.
2174 (start_step_over): New.
2175 (finish_step_over): New.
2176 (linux_resume_one_thread): Always queue a sigstop for resume_stop
2177 requests. Clear the thread's last reported target waitstatus.
2178 Don't use the `suspended' flag. Don't consider pending breakpoints.
2179 (linux_resume): Start a step-over if necessary.
2180 (proceed_one_lwp): New.
2181 (proceed_all_lwps): New.
2182 (unstop_all_lwps): New.
2183 * linux-low.h (struct lwp_info): Rewrite comment for the
2184 `suspended' flag. Add the `stop_pc' field. Delete the
2185 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
2186 Add `'last_resume_kind' and `need_step_over' fields.
2187 * inferiors.c (struct thread_info): Delete, moved elsewhere.
2188 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
2189 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
2190 (set_raw_breakpoint_at): New.
2191 (set_breakpoint_at): Rewrite to use it.
2192 (reinsert_breakpoint_handler): Delete.
2193 (set_reinsert_breakpoint): New.
2194 (reinsert_breakpoint_by_bp): Delete.
2195 (delete_reinsert_breakpoints): New.
2196 (uninsert_breakpoint): Rewrite.
2197 (uninsert_breakpoints_at): New.
2198 (reinsert_breakpoint): Rewrite.
2199 (reinsert_breakpoints_at): New.
2200 (check_breakpoints): Rewrite.
2201 (breakpoint_here): New.
2202 (breakpoint_inserted_here): New.
2203 (check_mem_read): Adjust.
2204 * mem-break.h (breakpoints_supported, breakpoint_here)
2205 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
2206 (reinsert_breakpoint_by_bp): Delete declaration.
2207 (delete_reinsert_breakpoints): Declare.
2208 (reinsert_breakpoint): Delete declaration.
2209 (reinsert_breakpoints_at): Declare.
2210 (uninsert_breakpoint): Delete declaration.
2211 (uninsert_breakpoints_at): Declare.
2212 (check_breakpoints): Adjust prototype.
2213 * server.h: Adjust include order.
2214 (struct thread_info): Declare here. Add a `last_status' field.
2215
30ba68cb
MS
22162010-03-23 Michael Snyder <msnyder@vmware.com>
2217
2218 * server.c (crc32): New function.
2219 (handle_query): Add handling for 'qCRC:' request.
2220
b9a881c2
PA
22212010-03-23 Pedro Alves <pedro@codesourcery.com>
2222
2223 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
2224 lwp had been stopped by a watchpoint.
2225
e92d13d5
PA
22262010-03-16 Pedro Alves <pedro@codesourcery.com>
2227
2228 * server.h (internal_error): Declare.
2229 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
2230 * utils.c (internal_error): New function.
2231
64daa791
AS
22322010-03-15 Andreas Schwab <schwab@redhat.com>
2233
2234 * configure.srv: Fix typo setting srv_regobj.
2235
f52cd8cd
PA
22362010-03-15 Pedro Alves <pedro@codesourcery.com>
2237
2238 * linux-low.c (fetch_register): Avoid passing a non string literal
2239 format to `error'.
2240 (usr_store_inferior_registers): Ditto.
2241
93ae6fdc
PA
22422010-03-14 Pedro Alves <pedro@codesourcery.com>
2243
2244 * linux-low.c (linux_write_memory): Bail out early if peeking
2245 memory failed.
2246
c3adc08c
PA
22472010-03-14 Pedro Alves <pedro@codesourcery.com>
2248
2249 * linux-low.h (struct lwp_info): New fields
2250 `stopped_by_watchpoint' and `stopped_data_address'.
2251 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
2252 here, and cache them in the lwp object.
2253 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
2254 directly.
2255 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
2256 field.
2257 (linux_stopped_by_watchpoint): Rewrite.
2258 (linux_stopped_data_address): Rewrite.
2259
bce522a2
PA
22602010-03-06 Simo Melenius <simo.melenius@iki.fi>
2261
2262 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
2263 switching the current inferior, not before.
2264
90884b2b
L
22652010-03-01 H.J. Lu <hongjiu.lu@intel.com>
2266
2267 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
2268 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
2269 i386-linux.c and amd64-linux.c.
2270 (reg-i386.o): Removed.
2271 (reg-i386.c): Likewise.
2272 (reg-i386-linux.o): Likewise.
2273 (reg-i386-linux.c): Likewise.
2274 (reg-x86-64.o): Likewise.
2275 (reg-x86-64.c): Likewise.
2276 (reg-x86-64-linux.o): Likewise.
2277 (reg-x86-64-linux.c): Likewise.
2278 (i386.o): New.
2279 (i386.c): Likewise.
2280 (i386-linux.o): Likewise.
2281 (i386-linux.c): Likewise.
2282 (amd64.o): Likewise.
2283 (amd64.c): Likewise.
2284 (amd64-linux.o): Likewise.
2285 (amd64-linux.c): Likewise.
2286
2287 * configure.srv (srv_i386_regobj): New.
2288 (srv_i386_linux_regobj): Likewise.
2289 (srv_amd64_regobj): Likewise.
2290 (srv_amd64_linux_regobj): Likewise.
2291 (srv_i386_32bit_xmlfiles): Likewise.
2292 (srv_i386_64bit_xmlfiles): Likewise.
2293 (srv_i386_xmlfiles): Likewise.
2294 (srv_amd64_xmlfiles): Likewise.
2295 (srv_i386_linux_xmlfiles): Likewise.
2296 (srv_amd64_linux_xmlfiles): Likewise.
2297 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
2298 srv_xmlfiles to $srv_i386_xmlfiles.
2299 (i[34567]86-*-mingw32ce*): Likewise.
2300 (i[34567]86-*-mingw*): Likewise.
2301 (i[34567]86-*-nto*): Likewise.
2302 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
2303 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
2304 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
2305 (x86_64-*-linux*): Likewise.
2306
2307 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
2308 (init_registers_amd64_linux): New.
2309 (x86_arch_setup): Replace init_registers_x86_64_linux with
2310 init_registers_amd64_linux.
2311
193f13e6
MK
23122010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
2313
2314 * configure.ac: Check for libdl. If it is not available link against
2315 static libthread_db.
2316 * configure: Regenerate.
2317
85d721b8
PA
23182010-02-22 Pedro Alves <pedro@codesourcery.com>
2319
2320 PR9605
2321
2322 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
2323 handing a read watchpoint.
2324 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
2325
6076632b
DE
23262010-02-12 Doug Evans <dje@google.com>
2327
2328 * linux-low.c (linux_supports_tracefork_flag): Document.
2329 (linux_look_up_symbols): Add comment.
2330
3327ccf7
L
23312010-02-03 H.J. Lu <hongjiu.lu@intel.com>
2332
2333 * regcache.c (supply_register): Clear regcache if buf is NULL.
2334
0718675c 23352010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 2336 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
2337
2338 * inferiors.c (find_inferior): Add function documentation.
2339 (unloaded_dll): Handle the case where the unloaded dll has not
2340 been previously registered in the dll list.
2341
177321bd
DJ
23422010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
2343
2344 * linux-arm-low.c (thumb_breakpoint_len): Delete.
2345 (thumb2_breakpoint): New.
2346 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
2347
2b009048
DJ
23482010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
2349
2350 * linux-low.c (get_stop_pc): Check for SIGTRAP.
2351 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
2352 breakpoints.
2353
3be029c7
PA
23542010-01-21 Pedro Alves <pedro@codesourcery.com>
2355
2356 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
2357
18f5de3b
JK
23582010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
2359
2360 * linux-s390-low.c (s390_collect_ptrace_register)
2361 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
2362
3743bb4f
DE
23632010-01-21 Doug Evans <dje@google.com>
2364
14ce3065
DE
2365 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
2366 (PTRACE_ARG4_TYPE): New macro.
2367 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
2368 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
2369 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
2370 (usr_store_inferior_registers): Ditto.
2371 (linux_read_memory, linux_write_memory): Ditto.
2372 (linux_test_for_tracefork): Ditto.
2373
3743bb4f
DE
2374 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
2375 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
2376
8b315be5
PA
23772010-01-21 Pedro Alves <pedro@codesourcery.com>
2378
2379 * proc-service.c (ps_lgetregs): Don't refetch registers from the
2380 target.
2381
85492558
PA
23822010-01-21 Pedro Alves <pedro@codesourcery.com>
2383
2384 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
2385 prototype to take a regcache. Adjust.
2386
442ea881
PA
23872010-01-20 Pedro Alves <pedro@codesourcery.com>
2388
2389 * regcache.h (struct thread_info): Forward declare.
2390 (struct regcache): New.
2391 (new_register_cache): Adjust prototype.
2392 (get_thread_regcache): Declare.
2393 (free_register_cache): Adjust prototype.
2394 (registers_to_string, registers_from_string): Ditto.
2395 (supply_register, supply_register_by_name, collect_register)
2396 (collect_register_as_string, collect_register_by_name): Ditto.
2397 * regcache.c (struct inferior_regcache_data): Delete.
2398 (get_regcache): Rename to ...
2399 (get_thread_regcache): ... this. Adjust. Switch inferior before
2400 fetching registers.
2401 (regcache_invalidate_one): Adjust.
2402 (regcache_invalidate): Fix prototype.
2403 (new_register_cache): Return the new register cache.
2404 (free_register_cache): Change prototype.
2405 (realloc_register_cache): Adjust.
2406 (registers_to_string): Change prototype to take a regcache. Adjust.
2407 (registers_from_string): Ditto.
2408 (register_data): Ditto.
2409 (supply_register): Ditto.
2410 (supply_register_by_name): Ditto.
2411 (collect_register): Ditto.
2412 (collect_register_as_string): Ditto.
2413 (collect_register_by_name): Ditto.
2414 * server.c (process_serial_event): Adjust.
2415 * linux-low.h (regset_fill_func, regset_store_func): Change
2416 prototype.
2417 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
2418 Change prototype.
2419 * linux-low.c (get_stop_pc): Adjust.
2420 (check_removed_breakpoint): Adjust.
2421 (linux_wait_for_event): Adjust.
2422 (linux_resume_one_lwp): Adjust.
2423 (fetch_register): Add regcache parameter. Adjust.
2424 (usr_store_inferior_registers): Ditto.
2425 (regsets_fetch_inferior_registers): Ditto.
2426 (regsets_store_inferior_registers): Ditto.
2427 (linux_fetch_registers, linux_store_registers): Ditto.
2428 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
2429 regcache. Adjust.
2430 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
2431 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
2432 prototype to take a regcache.
2433 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
2434 * remote-utils.c (convert_ascii_to_int, outreg)
2435 (prepare_resume_reply): Change prototype to take a regcache.
2436 Adjust.
2437 * target.h (struct target_ops) <fetch_registers, store_registers>:
2438 Change prototype to take a regcache.
2439 (fetch_inferior_registers, store_inferior_registers): Change
2440 prototype to take a regcache. Adjust.
2441 * proc-service.c (ps_lgetregs): Adjust.
2442 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
2443 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
2444 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
2445 take a regcache. Adjust.
2446 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
2447 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
2448 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
2449 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
2450 * linux-cris-low.c (cris_get_pc, cris_set_pc)
2451 (cris_cannot_fetch_register):
2452 (cris_breakpoint_at): Change prototype to take a regcache.
2453 Adjust.
2454 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
2455 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
2456 to take a regcache. Adjust.
2457 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
2458 Adjust.
2459 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
2460 take a regcache. Adjust.
2461 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
2462 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
2463 (m68k_set_pc): Change prototype to take a regcache. Adjust.
2464 * linux-mips-low.c (mips_get_pc):
2465 (mips_set_pc): Change prototype to take a regcache. Adjust.
2466 (mips_reinsert_addr): Adjust.
2467 (mips_collect_register): Change prototype to take a regcache.
2468 Adjust.
2469 (mips_supply_register):
2470 (mips_collect_register_32bit, mips_supply_register_32bit)
2471 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
2472 (mips_store_fpregset): Ditto.
2473 * linux-ppc-low.c (ppc_supply_ptrace_register, ppc_supply_ptrace_register):
2474 Ditto.
2475 (parse_spufs_run): Adjust.
2476 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
2477 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
2478 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
2479 take a regcache. Adjust.
2480 * linux-s390-low.c (s390_collect_ptrace_register)
2481 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
2482 (s390_set_pc): Change prototype to take a regcache. Adjust.
2483 (s390_arch_setup): Adjust.
2484 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
2485 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
2486 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
2487 (sparc_fill_gregset, sparc_store_gregset_from_stack)
2488 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
2489 regcache. Adjust.
2490 (sparc_breakpoint_at): Adjust.
2491 * linux-xtensa-low.c (xtensa_fill_gregset):
2492 (xtensa_store_gregset):
2493 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
2494 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
2495 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
2496 prototype to take a regcache. Adjust.
2497 * win32-arm-low.c (arm_fetch_inferior_register)
2498 (arm_store_inferior_register): Change prototype to take a
2499 regcache. Adjust.
2500 * win32-i386-low.c (i386_fetch_inferior_register)
2501 (i386_store_inferior_register): Change prototype to take a
2502 regcache. Adjust.
2503 * win32-low.c (child_fetch_inferior_registers)
2504 (child_store_inferior_registers): Change prototype to take a
2505 regcache. Adjust.
2506 (win32_wait): Adjust.
2507 (win32_fetch_inferior_registers): Change prototype to take a
2508 regcache. Adjust.
2509 (win32_store_inferior_registers): Adjust.
2510 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
2511 store_inferior_register>: Change prototype to take a regcache.
2512
60c3d7b0
DE
25132010-01-20 Doug Evans <dje@google.com>
2514
2515 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
2516 #ifdef.
2517 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 2518 (W_STOPCODE): Provide definition if missing.
60c3d7b0 2519
dc146f7c
VP
25202010-01-13 Vladimir Prus <vladimir@codesourcery.com>
2521
2522 * linux-low.c (linux_core_of_thread): New.
2523 (compare_ints, show_process, list_threads): New.
2524 (linux_qxfer_osdata): Report threads and cores.
2525 (linux_target_op): Register linux_core_of_thread.
2526 * remote-utils.c (prepare_resume_reply): Report the core.
2527 (buffer_xml_printf): Support %d specifier.
2528 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
2529 New.
2530 (handle_query): Handle qXfer:threads. Announce availability
2531 thereof.
2532 * target.h (struct target_ops): New field core_of_thread.
2533
7803799a
UW
25342010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
2535
2536 * Makefile.in (clean): Remove new generated files.
2537 (reg-s390.o, reg-s390.c): Remove rules.
2538 (reg-s390x.o, reg-s390x.c): Likewise.
2539 (s390-linux32.o, s390-linux32.c): Add rules.
2540 (s390-linux64.o, s390-linux64.c): Likewise.
2541 (s390x-linux64.o, s390x-linux64.c): Likewise.
2542 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
2543 * linux-s390-low.c: Include <elf.h>.
2544 (HWCAP_S390_HIGH_GPRS): Define if undefined.
2545 (init_registers_s390): Remove prototype.
2546 (init_registers_s390x): Likewise.
2547 (init_registers_s390_linux32): Add prototype.
2548 (init_registers_s390_linux64): Likewise.
2549 (init_registers_s390x_linux64): Likewise.
2550 (s390_num_regs_3264): New define.
2551 (s390_regmap_3264): New global variable.
2552 (s390_cannot_fetch_register): Remove obsolete check.
2553 (s390_cannot_store_register): Likewise.
2554 (s390_collect_ptrace_register): Handle upper/lower register halves.
2555 (s390_supply_ptrace_register): Likewise.
2556 (s390_fill_gregset): Update to register number changes.
2557 (s390_get_hwcap): New routine.
2558 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
2559 Install appropriate regmap and register set.
2560
6e7ffa39
JB
25612010-01-01 Joel Brobecker <brobecker@adacore.com>
2562
2563 * server.c (gdbserver_version): Update copyright year to 2010.
2564 * gdbreplay.c (gdbreplay_version): Likewise.
2565
957f3f49
DE
25662009-12-28 Doug Evans <dje@google.com>
2567
2568 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
2569 elf/external.h. Include <elf.h> instead but only if necessary.
2570
ca5c370d
PA
25712009-12-28 Pedro Alves <pedro@codesourcery.com>
2572
2573 * linux-low.c (linux_remove_process): Remove `detaching'
2574 parameter. Don't release/detach from thread_db here.
2575 (linux_kill): Release/detach from thread_db here, ...
2576 (linux_detach): ... and here, before actually detaching.
2577 (linux_wait_1): ... and here, when a process exits.
2578 * thread-db.c (any_thread_of): New.
2579 (thread_db_free): Switch the current inferior to a thread of the
2580 passed in process.
2581
4ee62156
DE
25822009-12-21 Doug Evans <dje@google.com>
2583
d90e6a88
DE
2584 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
2585
c5f62d5f
DE
2586 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
2587 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
2588 warning ifndef __NR_tkill. Move setting of errno there too.
2589 Delete unnecessary resetting of errno after syscall.
2590 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
2591
10e86dd7
DE
2592 * configure.ac: Check for dladdr.
2593 * config.in: Regenerate.
2594 * configure: Regenerate.
2595 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
2596 (try_thread_db_load): Update.
2597
4ee62156
DE
2598 * linux-low.c (my_waitpid): Delete unnecessary prototype.
2599
00f515da
DE
26002009-12-18 Doug Evans <dje@google.com>
2601
e9464885
DE
2602 * event-loop.c: Include unistd.h if it exists.
2603
07d4f67e
DE
2604 * linux-low.c (my_waitpid): Move definition away from being in
2605 between linux_tracefork_child/linux_test_for_tracefork.
2606
00f515da
DE
2607 * gdb_proc_service.h (psaddr_t): Fix type.
2608 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
2609 signature to match glibc.
2610
1de1badb
DE
26112009-12-16 Doug Evans <dje@google.com>
2612
2613 * linux-low.c (linux_read_memory): Fix argument to read.
2614
aeeb81d1
PA
26152009-11-26 Pedro Alves <pedro@codesourcery.com>
2616
2617 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
2618 events, don't leave current_inferior pointing at null.
2619
10357975
PA
26202009-11-26 Pedro Alves <pedro@codesourcery.com>
2621
2622 * win32-low.c (LOG): Delete.
2623 (OUTMSG): Output to stderr.
2624 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
2625 on compile time LOG macro.
2626 (win32_wait): Fix debug output.
2627
cf6e3471
PA
26282009-11-26 Pedro Alves <pedro@codesourcery.com>
2629
2630 * win32-low.c (win32_add_one_solib): If the dll name is
2631 "ntdll.dll", prepend the system directory to the dll path.
2632
0c85e18e
MK
26332009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
2634
2635 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
2636
9ac544ce 26372009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 2638 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
2639
2640 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
2641 * configure.ac: Check for __mcoldfire__ and set
2642 gdb_cv_m68k_is_coldfire.
2643 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
2644 reg-cf.o and reg-m68k.o.
2645 * configure: Regenerated.
2646
fd7dd3e6
PA
26472009-11-16 Pedro Alves <pedro@codesourcery.com>
2648
2649 * linux-low.c (linux_remove_process): Add `detaching' parameter.
2650 Pass it to thread_db_free.
2651 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
2652 proper `detaching' argument to linux_remove_process.
2653 * linux-low.h (thread_db_free): Add `detaching' parameter.
2654 * thread-db.c (thread_db_init): Pass false as `detaching' argument
2655 to thread_db_free.
2656 (thread_db_free): Add `detaching' parameter. Only
2657 call td_ta_clear_event if detaching from process.
2658
75aa492e
MK
26592009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
2660
2661 * thread-db.c (thread_db_free): Fix typo.
2662
21e1bee4
PP
26632009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
2664
2665 PR gdb/10838
2666 * thread-db.c (thread_db_free): Call td_ta_clear_event.
2667
8838b45e
NS
26682009-11-03 Nathan Sidwell <nathan@codesourcery.com>
2669
2670 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
2671 with an i686 compiler.
2672 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
2673 needed.
2674 * configure: Rebuilt.
2675
8a35fb51
SL
26762009-10-29 Sandra Loosemore <sandra@codesourcery.com>
2677
2678 PR gdb/10783
2679
2680 * server.c (handle_search_memory_1): Correct read_addr initialization
2681 in loop for searching subsequent chunks.
2682
96f15937
PP
26832009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
2684
2685 * configure.ac: New --with-libthread-db option.
2686 * thread-db.c: Allow direct dependence on libthread_db.
2687 (thread_db_free): Adjust.
2688 * config.in: Regenerate.
2689 * configure: Likewise.
889bf7c5 2690
5f7d1694
PP
26912009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
2692
2693 PR gdb/10757
2694 * thread-db.c (attach_thread): New function.
2695 (maybe_attach_thread): Return success/failure.
2696 (find_new_threads_callback): Adjust.
889bf7c5
PA
2697 (thread_db_find_new_threads): Loop until no new threads.
2698
88e3b899
PA
26992009-10-13 Pedro Alves <pedro@codesourcery.com>
2700
2701 * proc-service.c (ps_lgetregs): Formatting.
2702
cdbfd419
PP
27032009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
2704
2705 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
2706 * configure.ac: Adjust.
2707 * linux-low.h (struct process_info_private): Move members to struct
2708 thread_db.
2709 (thread_db_free, thread_db_handle_monitor_command): New prototype.
2710 * linux-low.c (linux_remove_process): Adjust.
2711 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
2712 * server.c (handle_query): Move code ...
2713 (handle_monitor_command): ... here. New function.
2714 * target.h (struct target_ops): New member.
2715 * thread-db.c (struct thread_db): New.
2716 (libthread_db_search_path): New variable.
2717 (thread_db_create_event, thread_db_enable_reporting)
2718 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
2719 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
2720 (try_thread_db_load_1, dladdr_to_soname): New functions.
2721 (try_thread_db_load, thread_db_load_search): New functions.
2722 (thread_db_init): Search for libthread_db.
2723 (thread_db_free): New function.
2724 (thread_db_handle_monitor_command): Likewise.
2725 * config.in: Regenerate.
2726 * configure: Regenerate.
889bf7c5 2727
4168d2d6
UW
27282009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
2729
2730 * spu-low.c (spu_kill): Wait for inferior to terminate.
2731 Call clear_inferiors.
2732 (spu_detach): Call clear_inferiors.
2733
81ecdfbb
RW
27342009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2735
2736 * aclocal.m4: Regenerate.
2737 * config.in: Likewise.
2738 * configure: Likewise.
2739
0b9ff2c0
UW
27402009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
2741
2742 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
2743 (parse_spufs_run): New function.
2744 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
2745 (ppc_breakpoint_at): Handle SPU breakpoints.
2746
efcbbd14
UW
27472009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
2748
2749 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
2750 (SPUFS_MAGIC): Define.
2751 (spu_enumerate_spu_ids): New function.
2752 (linux_qxfer_spu): New function.
2753 (linux_target_ops): Install linux_qxfer_spu.
2754
f4d9bade
UW
27552009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
2756
2757 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
2758 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
2759 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
2760 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
2761 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
2762 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
2763 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
2764 (init_registers_powerpc_cell32l): Add prototype.
2765 (init_registers_powerpc_cell64l): Likewise.
2766 (ppc_arch_setup): Detect Cell/B.E. architecture.
2767
96e946ca
RW
27682009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2769
2770 * Makefile.in (datarootdir): New variable.
2771
58d6951d
DJ
27722009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
2773
2774 * linux-low.c (linux_write_memory): Update debugging output.
2775 * Makefile.in (clean): Add new descriptions.
2776 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
2777 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
2778 * configure.srv: Add new files for arm*-*-linux*.
2779 * linux-arm-low.c: Add new declarations.
2780 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
2781 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
2782 (HWCAP_VFPv3D16): New.
2783 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
2784 instead of __IWMMXT__.
2785 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
2786 (arm_arch_setup): New.
2787 (target_regsets): Remove #ifdef. Add VFP regset.
2788 (the_low_target): Use arm_arch_setup.
2789
12b42a12
DJ
27902009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
2791
2792 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
2793 the main thread again.
2794
ac8c974e
AR
27952009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
2796
2797 Adding Neutrino gdbserver.
2798 * configure: Regenerated.
2799 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
2800 * configure.srv (i[34567]86-*-nto*): New target.
2801 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
2802 * remote-utils.c [__QNX__]: Include sys/iomgr.h
2803 (nto_comctrl) [__QNX__]: New function.
2804 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
2805
4424e0c3 28062009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
2807
2808 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
2809 srv_tgtobj.
2810
912cf4ba
PA
28112009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
2812 Pedro Alves <pedro@codesourcery.com>
2813
2814 * win32-i386-low.c (i386_get_thread_context): Handle systems that
2815 don't support CONTEXT_EXTENDED_REGISTERS.
2816 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
2817 (the_low_target): Install them.
2818 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
2819 failing with ERROR_PIPE_NOT_CONNECTED.
2820
aa5ca48f
DE
28212009-06-30 Doug Evans <dje@google.com>
2822 Pierre Muller <muller@ics.u-strasbg.fr>
2823
2824 Add h/w watchpoint support to x86-linux, win32-i386.
2825 * Makefile.in (SFILES): Add i386-low.c
2826 (i386_low_h): Define.
2827 (i386-low.o): Add dependencies.
2828 (linux-x86-low.o): Add i386-low.h dependency.
2829 (win32-i386-low.o): Ditto.
2830 * i386-low.c: New file.
2831 * i386-low.h: New file.
2832 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
2833 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
2834 * linux-low.c (linux_add_process): Initialize arch_private.
2835 (linux_remove_process): Free arch_private.
2836 (add_lwp): Initialize arch_private.
2837 (delete_lwp): Free arch_private.
2838 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
2839 provided.
2840 * linux-low.h (process_info_private): New member arch_private.
2841 (lwp_info): New member arch_private.
2842 (linux_target_ops): New members new_process, new_thread,
2843 prepare_to_resume.
2844 (ptid_of): New macro.
2845 * linux-x86-low.c: Include stddef.h, i386-low.h.
2846 (arch_process_info): New struct.
2847 (arch_lwp_info): New struct.
2848 (x86_linux_dr_get, x86_linux_dr_set): New functions.
2849 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
2850 (i386_dr_low_get_status): New function.
2851 (x86_insert_point, x86_remove_point): New functions.
2852 (x86_stopped_by_watchpoint): New function.
2853 (x86_stopped_data_address): New function.
2854 (x86_linux_new_process, x86_linux_new_thread): New functions.
2855 (x86_linux_prepare_to_resume): New function.
2856 (the_low_target): Add entries for insert_point, remove_point,
2857 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
2858 prepare_to_resume.
2859 * server.c (debug_hw_points): New global.
2860 (monitor_show_help): Document set debug-hw-points.
2861 (handle_query): Process "set debug-hw-points".
2862 * server.h (debug_hw_points): Declare.
2863 (paddress): Declare.
2864 * utils.c (NUMCELLS, CELLSIZE): New macros.
2865 (get_sell, xsnprintf, paddress): New functions.
2866 * win32-arm-low.c (the_low_target): Add entries for insert_point,
2867 remove_point, stopped_by_watchpoint, stopped_data_address.
2868 * win32-i386-low.c: Include i386-low.h.
2869 (debug_reg_state): Replaces dr.
2870 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
2871 (i386_dr_low_get_status): New function.
2872 (i386_insert_point, i386_remove_point): New functions.
2873 (i386_stopped_by_watchpoint): New function.
2874 (i386_stopped_data_address): New function.
2875 (i386_initial_stuff): Update.
2876 (get_thread_context,set_thread_context,i386_thread_added): Update.
2877 (the_low_target): Add entries for insert_point,
2878 remove_point, stopped_by_watchpoint, stopped_data_address.
2879 * win32-low.c (win32_insert_watchpoint): New function.
2880 (win32_remove_watchpoint): New function.
2881 (win32_stopped_by_watchpoint): New function.
2882 (win32_stopped_data_address): New function.
2883 (win32_target_ops): Add entries for insert_watchpoint,
2884 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
2885 * win32-low.h (win32_target_ops): New members insert_point,
2886 remove_point, stopped_by_watchpoint, stopped_data_address.
2887
d993e290
PA
28882009-06-25 Pedro Alves <pedro@codesourcery.com>
2889
2890 * server.c (process_serial_event): Re-return unsupported, not
2891 error, if the type isn't recognized. Re-allow supporting only
2892 insert or remove packets. Also call require_running for
2893 breakpoints. Add missing break statement to default case. Tidy.
2894 * target.h (struct target_ops): Rename insert_watchpoint to
2895 insert_point, and remove_watchpoint to remove_point.
2896
2897 * linux-low.h (struct linux_target_ops): Likewise.
2898 * linux-low.c (linux_insert_watchpoint): Rename to ...
2899 (linux_insert_point): ... this. Adjust.
2900 (linux_remove_watchpoint): Rename to ...
2901 (linux_remove_point): ... this. Adjust.
2902 (linux_target_ops): Adjust.
2903 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
2904 (cris_insert_point): ... this.
2905 (cris_remove_watchpoint): Rename to ...
2906 (cris_remove_point): ... this.
2907 (the_low_target): Adjust.
2908
0f54c268
PM
29092009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
2910
2911 * server.c (handle_v_kill): Pass signal_pid to
2912 kill_inferior if multi_process is zero.
2913
c6314022
AR
29142009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
2915
2916 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
2917 * target.h (target_ops): Comment for *_watchpoint to make it clear
2918 the functions can get types '0' and '1'.
2919
4463ce24
AR
29202009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
2921
2922 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
2923 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
2924 * regcache.c (get_regcache): Likewise.
2925 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
2926 * win32-low.c (child_fetch_inferior_registers): Remove check for
2927 regno 0.
2928
cf8fd78b
PA
29292009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
2930 Pedro Alves <pedro@codesourcery.com>
2931
2932 * target.h (struct target_ops) <supports_multi_process>: New
2933 callback.
2934 (target_supports_multi_process): New.
2935 * server.c (handle_query): Even if GDB reports support, only
2936 enable multi-process if the target also supports it. Report
2937 multi-process support only if the target backend supports it.
2938 * linux-low.c (linux_supports_multi_process): New function.
2939 (linux_target_ops): Install it as target_supports_multi_process
2940 callback.
2941
47c0c975
DE
29422009-05-24 Doug Evans <dje@google.com>
2943
e09875d4
DE
2944 Global renaming of find_thread_pid to find_thread_ptid.
2945 * server.h (find_thread_ptid): Renamed from find_thread_pid.
2946 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
2947 All callers updated.
2948
e27d73f6
DE
2949 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
2950 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
2951 directly.
2952
47c0c975
DE
2953 * linux-low.c (get_stop_pc): Print pc if debug_threads.
2954 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
2955 (linux_resume_one_lwp): Ditto.
2956
2acc282a
DE
29572009-05-23 Doug Evans <dje@google.com>
2958
2959 * linux-low.c (linux_resume_one_lwp): Change type of first arg
2960 from struct inferior_list_entry * to struct lwp_info *.
2961 All callers updated.
2962
9f1036c1
DE
29632009-05-13 Doug Evans <dje@google.com>
2964
2965 * linux-x86-low.c: Don't include assert.h.
2966 (x86_siginfo_fixup): Use fatal, not assert.
2967 (x86_arch_setup): Fix comment.
2968
d0722149
DE
29692009-05-12 Doug Evans <dje@google.com>
2970
2971 Biarch support for i386/amd64 gdbserver.
2972 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
2973 Add linux-x86-low.c.
2974 (linux-i386-low.o, linux-x86-64-low.o): Delete.
2975 (linux-x86-low.o): Add.
2976 * linux-x86-64-low.c: Delete.
2977 * linux-i386-low.c: Delete.
2978 * linux-x86-low.c: New file.
2979 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
2980 linux-x86-low.o.
2981 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
2982 linux-x86-low.o.
2983 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
2984 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
2985 (linux_child_pid_to_exec_file): New function.
2986 (elf_64_header_p, elf_64_file_p): New functions.
2987 (siginfo_fixup): New function.
2988 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
2989 give target a chance to convert layout.
2990 * linux-low.h (linux_target_ops): New member siginfo_fixup.
2991 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
2992
fdeb2a12
DE
29932009-05-07 Doug Evans <dje@google.com>
2994
2995 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
2996 (regsets_store_inferior_registers): Ditto.
2997
a6dbe5df
PA
29982009-05-06 Pedro Alves <pedro@codesourcery.com>
2999
3000 PR server/10048
3001
3002 * linux-low.c (must_set_ptrace_flags): Delete.
3003 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
3004 of the global.
3005 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
3006 `lwp->must_set_ptrace_flags' instead.
ba42693b 3007 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
3008 (linux_wait_1): ... not here.
3009
5091eb23
DE
30102009-04-30 Doug Evans <dje@google.com>
3011
9f767825
DE
3012 * inferiors.c (started_inferior_callback): New function.
3013 (attached_inferior_callback): New function.
3014 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
3015 * server.c (print_started_pid, print_attached_pid): New functions.
3016 (detach_or_kill_for_exit): New function.
3017 (main): Call it instead of for_each_inferior (kill_inferior_callback).
3018 * server.h (have_started_inferiors_p): Declare.
3019 (have_attached_inferiors_p): Declare.
3020
5091eb23
DE
3021 * inferiors.c (remove_process): Fix memory leak, free process.
3022 * linux-low.c (linux_remove_process): New function.
3023 (linux_kill): Call it instead of remove_process.
3024 (linux_detach, linux_wait_1): Ditto.
3025
155c8968
PA
30262009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
3027
3028 * configure.srv: Add x86 Windows CE target.
3029
7fe519cb
UW
30302009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
3031
3032 * inferiors.c (get_thread_process): Make global.
3033 * server.h (get_thread_process): Add prototype.
3034 * thread-db.c (find_one_thread): Use get_thread_process
3035 instead of current_process.
3036 (thread_db_get_tls_address): Do not crash if called when
3037 thread layer is not yet initialized.
3038
5472f405
UW
30392009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
3040
3041 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
3042 * spu-low.c (current_tid): Rename to ...
3043 (current_ptid): ... this.
3044 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
3045 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
3046 ptid_get_lwp (current_ptid) instead of current_tid.
3047 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
3048 instead of current_tid. Use find_process_pid to verify pid
3049 argument is valid. Pass proper argument to remove_process.
3050 (spu_thread_alive): Compare current_ptid instead of current_tid.
3051 (spu_resume): Likewise.
3052
55ac2b99
PA
30532009-04-02 Pedro Alves <pedro@codesourcery.com>
3054
3055 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
3056 variable.
3057
95954743
PA
30582009-04-01 Pedro Alves <pedro@codesourcery.com>
3059
3060 Implement the multiprocess extensions, and add linux multiprocess
3061 support.
3062
3063 * server.h (ULONGEST): Declare.
3064 (struct ptid, ptid_t): New.
3065 (minus_one_ptid, null_ptid): Declare.
3066 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
3067 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
3068 (struct inferior_list_entry): Change `id' type from unsigned from
3069 to ptid_t.
3070 (struct sym_cache, struct breakpoint, struct
3071 process_info_private): Forward declare.
3072 (struct process_info): Declare.
3073 (current_process): Declare.
3074 (all_processes): Declare.
3075 (initialize_inferiors): Declare.
3076 (add_thread): Adjust to use ptid_t.
3077 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
3078 (add_process, remove_process, find_thread_pid): Declare.
3079 (find_inferior_id): Adjust to use ptid_t.
3080 (cont_thread, general_thread, step_thread): Change type to ptid_t.
3081 (multi_process): Declare.
3082 (push_event): Adjust to use ptid_t.
3083 (read_ptid, write_ptid): Declare.
3084 (prepare_resume_reply): Adjust to use ptid_t.
3085 (clear_symbol_cache): Declare.
3086 * inferiors.c (all_processes): New.
3087 (null_ptid, minus_one_ptid): New.
3088 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
3089 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
3090 (add_thread): Change unsigned long to ptid. Remove gdb_id
3091 parameter. Adjust.
3092 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
3093 (gdb_id_to_thread): Rename to ...
3094 (find_thread_pid): ... this. Change unsigned long to ptid.
3095 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
3096 (loaded_dll, pull_pid_from_list): Adjust.
3097 (add_process, remove_process, find_process_pid)
3098 (get_thread_process, current_process, initialize_inferiors): New.
3099 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
3100 (struct target_waitstatus) <related_pid>: Ditto.
3101 (struct target_ops) <kill, detach>: Add `pid' argument. Change
3102 return type to int.
3103 (struct target_ops) <join>: Add `pid' argument.
3104 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
3105 (struct target_ops) <wait>: Add `ptid' field. Change return type
3106 to ptid.
3107 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
3108 (mywait): Add `ptid' argument. Change return type to ptid_t.
3109 (target_pid_to_str): Declare.
3110 * target.c (set_desired_inferior): Adjust to use ptids.
3111 (mywait): Add new `ptid' argument. Adjust.
3112 (target_pid_to_str): New.
3113 * mem-break.h (free_all_breakpoints): Declare.
3114 * mem-break.c (breakpoints): Delelete.
3115 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
3116 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
3117 to use per-process breakpoint list.
3118 (free_all_breakpoints): New.
3119 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
3120 (symbol_cache, all_symbols_looked_up): Delete.
3121 (hexchars): New.
3122 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
3123 read_ptid): New.
3124 (prepare_resume_reply): Change ptid argument's type from unsigned
3125 long to ptid_t. Adjust. Implement W;process and X;process.
3126 (free_sym_cache, clear_symbol_cache): New.
3127 (look_up_one_symbol): Adjust to per-process symbol cache. *
3128 * server.c (cont_thread, general_thread, step_thread): Change type
3129 to ptid_t.
3130 (attached): Delete.
3131 (multi_process): New.
3132 (last_ptid): Change type to ptid_t.
3133 (struct vstop_notif) <ptid>: Change type to ptid_t.
3134 (queue_stop_reply, push_event): Change `ptid' argument's type to
3135 ptid_t.
3136 (discard_queued_stop_replies): Add `pid' argument.
3137 (start_inferior): Adjust to use ptids. Adjust to mywait interface
3138 changes. Don't reference the `attached' global.
3139 (attach_inferior): Adjust to mywait interface changes.
3140 (handle_query): Adjust to use ptids. Parse GDB's qSupported
3141 features. Handle and report "multiprocess+". Handle
3142 "qAttached:PID".
3143 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
3144 changes.
3145 (handle_v_kill): New.
3146 (handle_v_stopped): Adjust to use target_pid_to_str.
3147 (handle_v_requests): Allow multiple attaches and runs when
3148 multiprocess extensions are in effect. Handle "vKill".
3149 (myresume): Adjust to use ptids.
3150 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
3151 (handle_status): Adjust to discard_queued_stop_replies interface
3152 change.
3153 (first_thread_of, kill_inferior_callback)
3154 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
3155 (main): Call initialize_inferiors. Adjust to use ptids, killing
3156 and detaching from all inferiors. Handle multiprocess packet
3157 variants.
3158 * linux-low.h: Include gdb_proc_service.h.
3159 (struct process_info_private): New.
3160 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
3161 <lwpid_of>: Use ptid_get_lwp.
3162 (get_lwp_thread): Adjust.
3163 (struct lwp_info): Add `dead' member.
3164 (find_lwp_pid): Declare.
3165 * linux-low.c (thread_db_active): Delete.
3166 (new_inferior): Adjust comment.
3167 (inferior_pid): Delete.
3168 (linux_add_process): New.
3169 (handle_extended_wait): Adjust.
3170 (add_lwp): Change unsigned long to ptid.
3171 (linux_create_inferior): Add process to processes table. Adjust
3172 to use ptids. Don't set new_inferior here.
3173 (linux_attach_lwp): Rename to ...
3174 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
3175 it. Adjust to use ptids.
3176 (linux_attach_lwp): New.
3177 (linux_attach): Add process to processes table. Don't set
3178 new_inferior here.
3179 (struct counter): New.
3180 (second_thread_of_pid_p, last_thread_of_process_p): New.
3181 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
3182 multiple processes.
3183 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
3184 processes. Remove process from process table.
3185 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
3186 to multiple processes.
3187 (any_thread_of): New.
3188 (linux_detach): Add `pid' argument, and handle it. Remove process
3189 from processes table.
3190 (linux_join): Add `pid' argument. Handle it.
3191 (linux_thread_alive): Change unsighed long argument to ptid_t.
3192 Consider dead lwps as not being alive.
3193 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
3194 threads we're not interested in.
3195 (same_lwp, find_lwp_pid): New.
3196 (linux_wait_for_lwp): Change `pid' argument's type from int to
3197 ptid_t. Adjust.
3198 (linux_wait_for_event): Rename to ...
3199 (linux_wait_for_event_1): ... this. Change `pid' argument's type
3200 from int to ptid_t. Adjust.
3201 (linux_wait_for_event): New.
3202 (linux_wait_1): Add `ptid' argument. Change return type to
3203 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
3204 that exit from the process table.
3205 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
3206 Adjust.
3207 (mark_lwp_dead): New.
3208 (wait_for_sigstop): Adjust to use ptids. If a process exits while
3209 stopping all threads, mark its main lwp as dead.
3210 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
3211 ptids.
3212 (fetch_register, usr_store_inferior_registers)
3213 (regsets_fetch_inferior_registers)
3214 (regsets_store_inferior_registers, linux_read_memory)
3215 (linux_write_memory): Inline `inferior_pid'.
3216 (linux_look_up_symbols): Adjust to use per-process
3217 `thread_db_active'.
3218 (linux_request_interrupt): Adjust to use ptids.
3219 (linux_read_auxv): Inline `inferior_pid'.
3220 (initialize_low): Don't reference thread_db_active.
3221 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
3222 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
3223 (ps_getpid): Return the pid of the current inferior.
3224 * thread-db.c (proc_handle, thread_agent): Delete.
3225 (thread_db_create_event, thread_db_enable_reporting): Adjust to
3226 per-process data.
3227 (find_one_thread): Change argument type to ptid_t. Adjust to
3228 per-process data.
3229 (maybe_attach_thread): Adjust to per-process data and ptids.
3230 (thread_db_find_new_threads): Ditto.
3231 (thread_db_init): Ditto.
3232 * spu-low.c (spu_create_inferior, spu_attach): Add process to
3233 processes table. Adjust to use ptids.
3234 (spu_kill, spu_detach): Adjust interface. Remove process from
3235 processes table.
3236 (spu_join, spu_thread_alive): Adjust interface.
3237 (spu_wait): Adjust interface. Remove process from processes
3238 table. Adjust to use ptids.
3239 * win32-low.c (current_inferior_tid): Delete.
3240 (current_inferior_ptid): New.
3241 (debug_event_ptid): New.
3242 (thread_rec): Take a ptid. Adjust.
3243 (child_add_thread): Add `pid' argument. Adjust to use ptids.
3244 (child_delete_thread): Ditto.
3245 (do_initial_child_stuff): Add `attached' argument. Add process to
3246 processes table.
3247 (child_fetch_inferior_registers, child_store_inferior_registers):
3248 Adjust.
3249 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
3250 (win32_attach): Pass 1 to do_initial_child_stuff.
3251 (win32_kill): Adjust interface. Remove process from processes
3252 table.
3253 (win32_detach): Ditto.
3254 (win32_join): Adjust interface.
3255 (win32_thread_alive): Take a ptid.
3256 (win32_resume): Adjust to use ptids.
3257 (get_child_debug_event): Ditto.
3258 (win32_wait): Adjust interface. Remove exiting process from
3259 processes table.
3260
bd99dc85
PA
32612009-04-01 Pedro Alves <pedro@codesourcery.com>
3262
3263 Non-stop mode support.
3264
3265 * server.h (non_stop): Declare.
3266 (gdb_client_data, handler_func): Declare.
3267 (delete_file_handler, add_file_handler, start_event_loop):
3268 Declare.
3269 (handle_serial_event, handle_target_event, push_event)
3270 (putpkt_notif): Declare.
3271 * target.h (enum resume_kind): New.
3272 (struct thread_resume): Replace `step' field by `kind' field.
3273 (TARGET_WNOHANG): Define.
3274 (struct target_ops) <wait>: Add `options' argument.
3275 <supports_non_stop, async, start_non_stop>: New fields.
3276 (target_supports_non_stop, target_async): New.
3277 (start_non_stop): Declare.
3278 (mywait): Add `options' argument.
3279 * target.c (mywait): Add `options' argument. Print child exit
3280 notifications here.
3281 (start_non_stop): New.
3282 * server.c (non_stop, own_buf, mem_buf): New globals.
3283 (struct vstop_notif): New.
3284 (notif_queue): New global.
3285 (queue_stop_reply, push_event, discard_queued_stop_replies)
3286 (send_next_stop_reply): New.
3287 (start_inferior): Adjust to use resume_kind. Adjust to mywait
3288 interface changes.
3289 (attach_inferior): In non-stop mode, don't wait for the target
3290 here.
3291 (handle_general_set): Handle QNonStop.
3292 (handle_query): When handling qC, return the current general
3293 thread, instead of the first thread of the list.
3294 (handle_query): If the backend supports non-stop mode, include
3295 QNonStop+ in the qSupported query response.
3296 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
3297 and non-stop mode.
3298 (handle_v_attach, handle_v_run): Handle non-stop mode.
3299 (handle_v_stopped): New.
3300 (handle_v_requests): Report support for vCont;t. Handle vStopped.
3301 (myresume): Adjust to use resume_kind. Handle non-stop.
3302 (queue_stop_reply_callback): New.
3303 (handle_status): Handle non-stop mode.
3304 (main): Clear non_stop flag on reconnection. Use the event-loop.
3305 Refactor serial protocol handling from here ...
3306 (process_serial_event): ... to this new function. When GDB
3307 selects any thread, select one here. In non-stop mode, wait until
3308 GDB acks all pending events before exiting.
3309 (handle_serial_event, handle_target_event): New.
3310 * remote-utils.c (remote_open): Install remote_desc in the event
3311 loop.
3312 (remote_close): Remove remote_desc from the event loop.
3313 (putpkt_binary): Rename to...
3314 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
3315 (putpkt_binary): New as wrapper around putpkt_binary_1.
3316 (putpkt_notif): New.
3317 (prepare_resume_reply): In non-stop mode, don't change the
3318 general_thread.
3319 * event-loop.c: New.
3320 * Makefile.in (OBJ): Add event-loop.o.
3321 (event-loop.o): New rule.
3322
3323 * linux-low.h (pid_of): Moved here.
3324 (lwpid_of): New.
3325 (get_lwp_thread): Use lwpid_of.
3326 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
3327 * linux-low.c (pid_of): Delete.
3328 (inferior_pid): Use lwpid_of.
3329 (linux_event_pipe): New.
3330 (target_is_async_p): New.
3331 (delete_lwp): New.
3332 (handle_extended_wait): Use lwpid_of.
3333 (add_lwp): Don't set lwpid field.
3334 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
3335 (linux_kill_one_lwp): If killing a running lwp, stop it first.
3336 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
3337 (linux_detach_one_lwp): If detaching from a running lwp, stop it
3338 first. Adjust to linux_wait_for_event interface changes. Use
3339 lwpid_of.
3340 (linux_detach): Don't delete the main lwp here.
3341 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
3342 (status_pending_p): Don't consider explicitly suspended lwps.
3343 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
3344 pointer. Add OPTIONS argument. Change return type to int. Use
3345 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
3346 (linux_wait_for_event): Take an integer pid instead of a lwp_info
3347 pointer. Add status pointer argument. Return a pid instead of a
3348 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
3349 changes. In non-stop mode, don't switch to a random thread.
3350 (linux_wait): Rename to...
3351 (linux_wait_1): ... this. Add target_options argument, and handle
3352 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
3353 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
3354 clean exit and signal exit code. Don't stop all threads in
3355 non-stop mode. In all-stop mode, only stop all threads when
3356 reporting a stop to GDB. Handle explicit thread stop requests.
3357 (async_file_flush, async_file_mark): New.
3358 (linux_wait): New.
3359 (send_sigstop): Use lwpid_of.
3360 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
3361 interface changes. In non-stop mode, don't switch to a random
3362 thread.
3363 (linux_resume_one_lwp): Use lwpid_of.
3364 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
3365 (linux_resume_one_thread): ... this. Handle resume_stop. In
3366 non-stop mode, don't look for pending flag in all threads.
3367 (resume_status_pending_p): Don't consider explicitly suspended
3368 threads.
3369 (my_waitpid): Reimplement. Emulate __WALL.
3370 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
3371 Use lwpid_of.
3372 (sigchld_handler, linux_supports_non_stop, linux_async)
3373 (linux_start_non_stop): New.
3374 (linux_target_ops): Register linux_supports_non_stop, linux_async
3375 and linux_start_non_stop.
3376 (initialize_low): Install SIGCHLD handler.
3377 * thread-db.c (thread_db_create_event, find_one_thread)
3378 (thread_db_get_tls_address): Use lwpid_of.
3379 * win32-low.c (win32_detach): Adjust to use resume_kind.
3380 (win32_wait): Add `options' argument.
3381 * spu-low.c (spu_resume): Adjust to use resume_kind.
3382 (spu_wait): Add `options' argument.
3383
5b1c542e
PA
33842009-04-01 Pedro Alves <pedro@codesourcery.com>
3385
3386 Decouple target code from remote protocol.
3387
3388 * target.h (enum target_waitkind): New.
3389 (struct target_waitstatus): New.
3390 (struct target_ops) <wait>: Return an unsigned long. Take a
3391 target_waitstatus pointer instead of a char pointer.
3392 (mywait): Likewise.
3393 * target.c (mywait): Change prototype to return an unsigned long.
3394 Take a target_waitstatus pointer instead of a char pointer. Adjust.
3395 * server.h (thread_from_wait, old_thread_from_wait): Delete
3396 declarations.
3397 (prepare_resume_reply): Change prototype to take a
3398 target_waitstatus.
3399 * server.c (thread_from_wait, old_thread_from_wait): Delete.
3400 (last_status, last_ptid): New.
3401 (start_inferior): Remove "statusptr" argument. Adjust. Return a
3402 pid instead of a signal.
3403 (attach_inferior): Remove "status" and "signal" parameters.
3404 Adjust.
3405 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
3406 not as an address.
3407 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
3408 (handle_v_requests, myresume): Remove "status" and "signal"
3409 parameters. Adjust.
3410 (handle_status): New.
3411 (main): Delete local `status'. Adjust.
3412 * remote-utils.c: Include target.h.
3413 (prepare_resume_reply): Change prototype to take a
3414 target_waitstatus. Adjust.
3415
3416 * linux-low.c (linux_wait): Adjust to new target_ops->wait
3417 interface.
3418 * spu-low.c (spu_wait): Adjust.
3419 * win32-low.c (enum target_waitkind, struct target_waitstatus):
3420 Delete.
3421 (win32_wait): Adjust.
3422
2bd7c093
PA
34232009-04-01 Pedro Alves <pedro@codesourcery.com>
3424
3425 * target.h (struct thread_resume): Delete leave_stopped member.
3426 (struct target_ops): Add a `n' argument to the `resume' callback.
3427 * server.c (start_inferior): Adjust.
3428 (handle_v_cont, myresume): Adjust.
3429 * linux-low.c (check_removed_breakpoint): Adjust to resume
3430 interface change, and to removed leave_stopped field.
3431 (resume_ptr): Delete.
3432 (struct thread_resume_array): New.
3433 (linux_set_resume_request): Add new `arg' parameter. Adjust to
3434 resume interface change.
3435 (linux_continue_one_thread, linux_queue_one_thread)
3436 (resume_status_pending_p): Check if the resume field is NULL
3437 instead of checking the leave_stopped member.
3438 (linux_resume): Adjust to the target resume interface change.
3439 * spu-low.c (spu_resume): Adjust to the target resume interface
3440 change.
3441 * win32-low.c (win32_detach, win32_resume): Ditto.
3442
c35fafde
PA
34432009-04-01 Pedro Alves <pedro@codesourcery.com>
3444
3445 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
3446 flag.
3447 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
3448 pending.
3449 (linux_continue_one_thread): Only preserve the stepping flag if
3450 there's a pending breakpoint.
3451
0a59d50b
PA
34522009-03-31 Pedro Alves <pedro@codesourcery.com>
3453
3454 * server.c (main): After the inferior having exited, call
3455 remote_close before exiting gdbserver.
3456
f04c6d38
TJB
34572009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
3458
3459 Fix size of FPSCR in Power 7 processors.
3460 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
3461 (PPC_FEATURE_HAS_DFP): New #define.
3462 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
3463 size of the FPSCR.
3464
78e5cee6
PA
34652009-03-23 Pedro Alves <pedro@codesourcery.com>
3466
3467 * server.c (handle_query) Whitespace and formatting.
3468
1b3f6016
PA
34692009-03-22 Pedro Alves <pedro@codesourcery.com>
3470
3471 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
3472 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
3473 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
3474 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
3475 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
3476 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
3477 Makefile.in, configure.ac: Fix whitespace throughout.
3478 * configure: Regenerate.
3479
a07b2135
PA
34802009-03-22 Pedro Alves <pedro@codesourcery.com>
3481
3482 * inferiors.c (find_inferior): Make it safe for the callback
3483 function to delete the currently iterated inferior.
3484
67cc2626
PA
34852009-03-22 Pedro Alves <pedro@codesourcery.com>
3486
3487 * Makefile.in (linuw_low_h): Move higher.
3488 (thread-db.o): Depend on $(linux_low_h).
3489
54a0b537
PA
34902009-03-17 Pedro Alves <pedro@codesourcery.com>
3491
3492 Rename "process" to "lwp" throughout.
3493
3494 * linux-low.c (all_processes): Rename to...
3495 (all_lwps): ... this.
3496 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
3497 (add_process): Rename to ...
3498 (add_lwp): ... this. Adjust.
3499 (linux_create_inferior): Adjust.
3500 (linux_attach_lwp): Adjust.
3501 (linux_attach): Adjust.
3502 (linux_kill_one_process): Rename to ...
3503 (linux_kill_one_lwp): ... this. Adjust.
3504 (linux_kill): Adjust.
3505 (linux_detach_one_process): Rename to ...
3506 (linux_detach_one_lwp): ... this. Adjust.
3507 (linux_detach): Adjust.
3508 (check_removed_breakpoint): Adjust.
3509 (status_pending_p): Adjust.
3510 (linux_wait_for_process): Rename to ...
3511 (linux_wait_for_lwp): ... this. Adjust.
3512 (linux_wait_for_event): Adjust.
3513 (send_sigstop): Adjust.
3514 (wait_for_sigstop): Adjust.
3515 (stop_all_processes): Rename to ...
3516 (stop_all_lwps): ... this.
3517 (linux_resume_one_process): Rename to ...
3518 (linux_resume_one_lwp): ... this. Adjust.
3519 (linux_set_resume_request, linux_continue_one_thread)
3520 (linux_queue_one_thread, resume_status_pending_p)
3521 (usr_store_inferior_registers, regsets_store_inferior_registers)
3522 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
3523 Adjust.
3524 * linux-low.h (get_process): Rename to ...
3525 (get_lwp): ... this. Adjust.
3526 (get_thread_process): Rename to ...
3527 (get_thread_lwp): ... this. Adjust.
3528 (get_process_thread): Rename to ...
3529 (get_lwp_thread): ... this. Adjust.
3530 (struct process_info): Rename to ...
3531 (struct lwp_info): ... this.
3532 (all_processes): Rename to ...
3533 (all_lwps): ... this.
3534 * proc-service.c (ps_lgetregs): Adjust.
3535 * thread-db.c (thread_db_create_event, find_one_thread)
3536 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
3537
0b16c5cf
PA
35382009-03-14 Pedro Alves <pedro@codesourcery.com>
3539
3540 * server.c (handle_query): Handle "qAttached".
3541
32de4b9d
NS
35422009-03-13 Nathan Sidwell <nathan@codesourcery.com>
3543
3544 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
3545 GPLv3, update license URL.
3546
2aecd87f
DE
35472009-03-01 Doug Evans <dje@google.com>
3548
93efd302 3549 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
3550 (server_h): Add gdb_signals.h.
3551 (signals.o): Update.
3552 * server.h (target_signal_from_host,target_signal_to_host_p)
3553 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
3554
86b1f9c5
PM
35552009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
3556
3557 * remote-utils.c (getpkt): Also generate remote-debug
3558 information if noack_mode is set.
3559
4aa995e1
PA
35602009-02-06 Pedro Alves <pedro@codesourcery.com>
3561
3562 * server.c (handle_query): Report qXfer:siginfo:read and
3563 qXfer:siginfo:write as supported and handle them.
3564 * target.h (struct target_ops) <qxfer_siginfo>: New field.
3565 * linux-low.c (linux_xfer_siginfo): New.
3566 (linux_target_ops): Set it.
3567
62709adf
PA
35682009-01-26 Pedro Alves <pedro@codesourcery.com>
3569
3570 * server.c (gdbserver_usage): Mention --remote-debug.
3571 (main): Accept '--remote-debug' switch.
3572
aef93bd7
DE
35732009-01-18 Doug Evans <dje@google.com>
3574
3575 * regcache.c (new_register_cache): No need to check result of xcalloc.
3576 * server.c (handle_search_memory): Back out calls to xmalloc,
3577 result is checked and error is returned to user upon failure.
3578 (handle_query): Ditto. Add more checks for result of malloc.
3579 (handle_v_cont): Check result of malloc, report error back to
3580 user upon failure.
3581 (handle_v_run): Ditto. Call freeargv.
3582 * server.h (freeargv): Declare.
3583 * utils.c (freeargv): New fn.
3584
54363045
DE
35852009-01-15 Doug Evans <dje@google.com>
3586
f626972c
DE
3587 * gdbreplay.c (perror_with_name): Make arg const char *.
3588 * server.h (target_signal_to_name): Make return type const char *.
0842e787 3589 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 3590 * utils.c (perror_with_name): Make arg const char *.
54363045 3591
18aae699
PA
35922009-01-14 Pedro Alves <pedro@codesourcery.com>
3593
3594 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
3595 when handling a EXIT_PROCESS_DEBUG_EVENT.
3596
ff703abe
JB
35972009-01-06 Joel Brobecker <brobecker@adacore.com>
3598
3599 * gdbreplay.c (gdbreplay_version): Update copyright year.
3600 * server.c (gdbserver_version): Likewise.
3601
f21cc1a2 36022009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
3603
3604 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 3605 (handle_extended_wait): Improve comment.
0e21c1ec 3606
bca929d3
DE
36072008-12-13 Doug Evans <dje@google.com>
3608
3609 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
3610 * server.h (ATTR_MALLOC): New macro.
3611 (xmalloc,xcalloc,xstrdup): Declare.
3612 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
3613 * inferiors.c: Ditto.
3614 * linux-low.c: Ditto.
3615 * mem-break.c: Ditto.
3616 * regcache.c: Ditto.
3617 * remote-utils.c: Ditto.
3618 * server.c: Ditto.
3619 * target.c: Ditto.
3620 * win32-low.c: Ditto.
3621
97438e3f
DE
36222008-12-12 Doug Evans <dje@google.com>
3623
896c7fbb
DE
3624 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
3625 in debugging printf.
3626
97438e3f
DE
3627 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
3628
e3b886f8
DE
36292008-12-09 Doug Evans <dje@google.com>
3630
3631 * linux-low.h (struct process_info): Delete member tid, unused.
3632 * thread-db.c (find_one_thread): Update.
3633 (maybe_attach_thread): Update.
3634
07e059b5
VP
36352008-12-02 Pedro Alves <pedro@codesourcery.com>
3636
889bf7c5
PA
3637 * target.h (struct target_ops): Add qxfer_osdata member.
3638 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
3639 and dirent.h.
3640 (linux_qxfer_osdata): New functions.
3641 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
3642 callback.
3643 * server.c (handle_query): Handle "qXfer:osdata:read:".
3644 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
3645 (buffer_xml_printf): New functions.
3646 * server.h (struct buffer): New.
3647 (buffer_grow_str, buffer_grow_str0): New macros.
3648 (buffer_grow, buffer_free, buffer_init, buffer_finish)
3649 (buffer_xml_printf): Declare.
07e059b5 3650
4cab47ab
DE
36512008-11-24 Doug Evans <dje@google.com>
3652
3653 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
3654
f142445f
DJ
36552008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
3656
3657 * server.c (handle_v_run): Always use the supplied argument list.
3658
d0107bb6 36592008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 3660
d0107bb6
BW
3661 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
3662 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 3663
2c4ad781
TJB
36642008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
3665
3666 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
3667 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
3668 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
3669 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
3670 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
3671 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
3672 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
3673 XML target descriptions.
3674 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
3675 when inferior is running on an ISA 2.05 or later processor. Add
3676 special case to return offset for full 64-bit slot of FPSCR when
3677 in 32-bits.
3678
dfb64f85
DJ
36792008-11-14 Daniel Gutson <dgutson@codesourcery.com>
3680
3681 * Makefile.in (SFILES, clean): Added sparc64 files.
3682 (reg-sparc64.o, reg-sparc64.c): New.
3683 * configure.srv (sparc*-*-linux*): New configuration.
3684 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
3685 syscall arguments for SPARC.
3686 (regsets_store_inferior_registers): Likewise.
3687 * linux-sparc-low.c: New file.
3688
66b6e1dd
DE
36892008-10-21 Doug Evans <dje@google.com>
3690
3691 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
3692 (READLINE_DIR,READLINE_DEP): Delete.
3693 (INTERNAL_CFLAGS): Update.
3694 (LINTFLAGS): Update.
3695
9b710a42
PA
36962008-10-10 Pedro Alves <pedro@codesourcery.com>
3697
3698 * server.c (handle_v_run): If GDB didn't specify an argv, use the
3699 whole argv from the last run, not just argv[0].
3700
5822d809
PA
37012008-09-08 Pedro Alves <pedro@codesourcery.com>
3702
3703 * regcache.c (new_register_cache): Return NULL if the register
3704 cache size isn't known yet.
3705 (free_register_cache): Avoid dereferencing a NULL regcache.
3706
74aac56f
DJ
37072008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
3708
3709 * configure.srv: Merge MIPS and MIPS64.
3710
400b20f5
MR
37112008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
3712
3713 * Makefile.in (uninstall): Apply $(EXEEXT) too.
3714
677c5bb1
LM
37152008-08-18 Luis Machado <luisgpm@br.ibm.com>
3716
3717 * Makefile.in: Add required vsx dependencies.
3718
3719 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
3720 Declare init_registers_powerpc_vsx32l.
3721 Declare init_registers_powerpc_vsx64l.
3722 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
3723 (ppc_arch_setup): Check for VSX in hwcap.
3724 (ppc_fill_vsxregset): New function.
3725 (ppc_store_vsxregset): New function.
3726 Add new VSX entry in regset_info target_regsets.
3727
3728 * configure.srv: Add new VSX dependencies.
3729
a6f3e723
SL
37302008-08-12 Pedro Alves <pedro@codesourcery.com>
3731
3732 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
3733 (remote_open): Set or clear transport_is_reliable.
3734 (putpkt_binary): Don't expect acks in noack mode.
3735 (getpkt): Don't send ack/nac in noack mode.
3736 * server.c (handle_general_set): Handle QStartNoAckMode.
3737 (handle_query): If connected by tcp pass QStartNoAckMode+ in
3738 qSupported.
3739 (main): Reset noack_mode on every connection.
3740 * server.h (noack_mode): Declare.
3741
a417dc56
RW
37422008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3743
3744 * Makefile.in (GDBREPLAY_OBS): New variable.
3745 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
3746
3221518c
UW
37472008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
3748 Daniel Jacobowitz <dan@codesourcery.com>
3749
3750 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
3751 (usr_store_inferior_registers): Likewise.
3752 (regsets_store_inferior_registers): Likewise.
3753
ec56be1b
PA
37542008-07-31 Rolf Jansen <rj@surtec.com>
3755 Pedro Alves <pedro@codesourcery.com>
3756
3757 * configure.ac: Check for memmem declaration.
3758 * server.c [HAVE_MALLOC_H]: Include malloc.h.
3759 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
3760 (disable_packet_qfThreadInfo): Unconditionally compile.
3761 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
3762 * configure, config.in: Regenerate.
3763
2fe5e3ff
DE
37642008-07-28 Doug Kwan <dougkwan@google.com>
3765
3766 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
3767 (linux_write_memory): Remove declaration of errno.
3768
836acd6d
UW
37692008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
3770
3771 * linux-low.c (handle_extended_wait): Do not use "status"
3772 variable uninitialized.
3773
aeba519e
PA
37742008-07-07 Pedro Alves <pedro@codesourcery.com>
3775
3776 * server.c (handle_v_attach): Inhibit reporting dll changes.
3777
db42f210
PA
37782008-06-27 Pedro Alves <pedro@codesourcery.com>
3779
3780 * remote-utils.c (prepare_resume_reply): If requested, don't
3781 output "thread:TID" in the T stop reply.
3782
3783 * server.c (disable_packet_vCont, disable_packet_Tthread)
3784 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
3785 (handle_query): If requested, disable support for qC, qfThreadInfo
3786 and qsThreadInfo.
3787 (handle_v_requests): If requested, disable support for vCont.
3788 (gdbserver_show_disableable): New.
3789 (main): Handle --disable-packet and --disable-packet=LIST.
3790
3791 * server.h (disable_packet_vCont, disable_packet_Tthread)
3792 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
3793
8e4c5421
CD
37942008-06-20 Carlos O'Donell <carlos@codesourcery.com>
3795
3796 * server.c (gdbserver_usage): Mention --version.
3797
6e23a804
DJ
37982008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
3799
3800 * Makefile.in (gdbreplay.o): New rule.
3801
90aa6a40
JM
38022008-06-06 Joseph Myers <joseph@codesourcery.com>
3803
3804 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
3805 message, not gdbserver.
3806
c16158bc 38072008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
3808 Nathan Sidwell <nathan@codesourcery.com>
3809 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
3810
3811 * acinclude.m4: Include ../../config/acx.m4.
3812 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
3813 * configure, config.in: Regenerate.
3814 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
3815 * server.c (gdbserver_version): Print PKGVERSION.
3816 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
3817 (main): Adjust gdbserver_usage calls.
3818 * gdbreplay.c (version, host_name): Add declarations.
3819 (gdbreplay_version, gdbreplay_usage): New.
3820 (main): Accept --version and --help options.
3821
aeb75bf5
DJ
38222008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
3823
3824 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
3825 (arm_breakpoint_at): Handle Thumb.
3826 (the_low_target): Add comment.
3827
76b233dd
UW
38282008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
3829
3830 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
3831
08388c79
DE
38322008-05-09 Doug Evans <dje@google.com>
3833
a3c83fae
DE
3834 * server.h (decode_search_memory_packet): Declare.
3835 * remote-utils.c (decode_search_memory_packet): New fn.
3836 * server.c (handle_search_memory_1): New fn.
08388c79
DE
3837 (handle_search_memory): New fn.
3838 (handle_query): Process qSearch:memory packets.
3839
bb9c3d36
UW
38402008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
3841
3842 * regcache.c (registers_length): Remove.
3843 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
3844 full register packet.
3845 * regcache.h (registers_length): Remove prototype.
3846 * server.h (PBUFSIZ): Define to 16384.
3847
7284e1be
UW
38482008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
3849
3850 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
3851 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
3852 powerpc-64l.o, and powerpc-altivec64l.o.
3853 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
3854 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
3855 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
3856 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
3857 rs6000/power-linux.xml, and rs6000/power64-linux.xml
3858 to srv_xmlfiles.
3859
3860 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
3861 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
3862 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
3863 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
3864 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
3865 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
3866 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
3867 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
3868 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
3869 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
3870 (clean): Update.
3871
3872 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
3873 (init_registers_powerpc_32l): ... this new prototype.
3874 (init_registers_powerpc_32): Remove, replace by ...
3875 (init_registers_powerpc_altivec32l): ... this new prototype.
3876 (init_registers_powerpc_e500): Remove, replace by ...
3877 (init_registers_powerpc_e500l): ... this new prototype.
3878 (init_registers_ppc64): Remove, replace by ...
3879 (init_registers_powerpc_64l): ... this new prototype.
3880 (init_registers_powerpc_64): Remove, replace by ...
3881 (init_registers_powerpc_altivec64l): ... this new prototype.
3882 (ppc_num_regs): Set to 73.
3883 (PT_ORIG_R3, PT_TRAP): Define if necessary.
3884 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
3885 (ppc_cannot_store_register): Handle orig_r3 and trap.
3886 (ppc_arch_setup): Update init_registers_... calls.
3887 (ppc_fill_gregset): Handle orig_r3 and trap.
3888
3889 * inferiors.c (clear_inferiors): Reset current_inferior.
3890
fdc59709
PB
38912008-04-23 Paolo Bonzini <bonzini@gnu.org>
3892
889bf7c5
PA
3893 * acinclude.m4: Add override.m4.
3894 * configure: Regenerate.
fdc59709 3895
c9b2f845
UW
38962008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
3897
3898 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
3899 initial call to init_register_ppc64.
3900
550512b8
UW
39012008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
3902
3903 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into single
3904 powerpc*-*-linux* case.
3905 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
3906
b6430ec3
UW
39072008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
3908
3909 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 3910 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
3911 from reg_xmlfiles.
3912 * linux-ppc-low.c: Include <elf.h>.
3913 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
3914 (ppc_hwcap): New global variable.
3915 (ppc_regmap): Remove __SPE__ #ifdef sections.
3916 (ppc_regmap_e500): New global variable.
3917 (ppc_cannot_store_register): Update __SPE__ special case.
3918 (ppc_get_hwcap): New function.
3919 (ppc_arch_setup): Use it to determine whether inferior supports
3920 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
3921 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
3922 Do not access registers if target does not support AltiVec.
3923 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
3924 Do not access registers if target does not support SPE.
3925 (target_regsets): Unconditionally include AltiVec and SPE regsets.
3926
52fa2412
UW
39272008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
3928
3929 * linux-low.c (disabled_regsets, num_regsets): New.
3930 (use_regsets_p): Delete.
3931 (linux_wait_for_process): Clear disabled_regsets.
3932 (regsets_fetch_inferior_registers): Check and set it.
3933 (regsets_store_inferior_registers): Likewise.
3934 (linux_fetch_registers, linux_store_registers): Do not use
3935 use_regsets_p.
3936 (initialize_low): Allocate disabled_regsets.
3937
e28b3332
DJ
39382008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
3939
3940 * Makefile.in (LIBOBJS): New.
3941 (OBS): Use LIBOBJS.
3942 (memmem.o): New rule.
3943 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
3944 * configure: Regenerated.
3945
4536995d
UW
39462008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
3947
3948 * server.c (handle_query): Never return "unsupported" for
3949 qXfer:features:read queries.
3950
221c031f
UW
39512008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
3952
3953 * server.c (get_features_xml): Fix inverted condition.
3954 (handle_query): Always support qXfer:feature:read.
3955
ccd213ac
DJ
39562008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
3957
3958 * server.c (wrapper_argv): New.
3959 (start_inferior): Handle wrapper_argv. If set, expect an extra
3960 trap.
3961 (gdbserver_usage): Document --wrapper.
3962 (main): Parse --wrapper.
3963
6fe305f7
UW
39642008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
3965
3966 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
3967 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
3968 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
3969 (ppc_set_pc): Likewise.
3970 (ppc_arch_setup): New function.
3971 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
3972 of collect_register.
889bf7c5 3973 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 3974
5b0a002e
UW
39752008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
3976
3977 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
3978 instead of linux-ppc64-low.o.
3979 * linux-ppc64-low.c: Remove file.
3980 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
3981 (linux-ppc64-low.o): Remove rule.
3982
3983 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
3984 (init_registers_powerpc_64): Likewise.
3985 (ppc_regmap): Conditionally define depending on __powerpc64__.
3986 (ppc_cannot_store_register): Do not special-case "fpscr" when
3987 compiled on __powerpc64__.
3988 (ppc_collect_ptrace_register): New function.
3989 (ppc_supply_ptrace_register): New function.
3990 (ppc_breakpoint): Change type to "unsigned int".
3991 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
3992 (the_low_target): Conditionally provide initializers for the
889bf7c5 3993 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
3994 collect_ptrace_register and supply_ptrace_register members.
3995
9b4b61c8
UW
39962008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
3997
3998 * regcache.h (gdbserver_xmltarget): Add extern declaration.
3999 * server.c (gdbserver_xmltarget): Define.
4000 (get_features_xml): Use it to replace "target.xml" and arch_string.
4001
4002 * configure.srv: Remove srv_xmltarget. Add XML files that were
4003 mentioned there to srv_xmlfiles instead. Remove conditional tests
4004 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
4005 srv_xmlfiles and srv_regobj to include all possible choices.
4006 * configure.ac (srv_xmltarget): Remove.
4007 (srv_xmlfiles): Do not add "target.xml".
4008 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
4009 checks for supplementary target information.
4010 * configure: Regenerate.
4011 * Makefile.in (XML_TARGET): Remove.
4012 (target.xml): Remove rule.
4013 (clean): Do not clean up target.xml.
4014 (.PRECIOUS): Do not mention target.xml.
4015
4016 * target.h (struct target_ops): Remove arch_string member.
4017 * linux-low.c (linux_arch_string): Remove.
4018 (linux_target_ops): Remove arch_string initializer.
4019 * linux-low.h (struct linux_target_ops): Remove arch_string member.
4020 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
4021 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
4022 * spu-low.c (spu_arch_string): Remove.
4023 (spu_target_ops): Remove arch_string initializer.
4024 * win32-low.c (win32_arch_string): Remove.
4025 (win32_target_ops): Remove arch_string initializer.
4026 * win32-low.h (struct win32_target_ops): Remove arch_string member.
4027 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
4028 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
4029
ee1a7ae4
UW
40302008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
4031
4032 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
4033 by collect_ptrace_register and supply_ptrace_register hooks.
4034 * linux-low.c (fetch_register): Use supply_ptrace_register callback
4035 instead of checking for the_low_target.left_pad_xfer.
4036 (usr_store_inferior_registers): Use collect_ptrace_register callback
4037 instead of checking for the_low_target.left_pad_xfer.
4038
4039 * linux-s390-low.c (s390_collect_ptrace_register): New function.
4040 (s390_supply_ptrace_register): Likewise.
4041 (s390_fill_gregset): Call s390_collect_ptrace_register.
4042 (the_low_target): Update.
4043
4044 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
4045 (ppc_supply_ptrace_register): Likewise.
4046 (the_low_target): Update.
4047
4048 * linux-i386-low.c (the_low_target): Update.
4049 * linux-x86-64-low.c (the_low_target): Update.
4050
d61ddec4
UW
40512008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
4052
4053 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
4054 reg-s390.o and reg-s390x.o.
4055
4056 * linux-low.c (new_inferior): New global variable.
4057 (linux_create_inferior, linux_attach): Set it.
4058 (linux_wait_for_process): Call the_low_target.arch_setup after the
4059 target has stopped for the first time.
4060 (initialize_low): Do not call the_low_target.arch_setup.
4061
4062 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
4063 (s390_set_pc): Likewise.
4064 (s390_arch_setup): New function.
4065 (the_low_target): Use s390_arch_setup as arch_setup routine.
4066
4067 * regcache.c (realloc_register_cache): New function.
4068 (set_register_cache): Call it for each existing regcache.
4069
d05b4ac3
UW
40702008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
4071
4072 * server.h (init_registers): Remove prototype.
4073
4074 * linux-low.h (struct linux_target_ops): Add arch_setup field.
4075 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
4076 instead of init_registers ().
4077 * linux-arm-low.c (init_registers_arm): Add prototype.
4078 (init_registers_arm_with_iwmmxt): Likewise.
4079 (the_low_target): Add initializer for arch_setup field.
4080 * linux-cris-low.c (init_registers_cris): Add prototype.
4081 (the_low_target): Add initializer for arch_setup field.
4082 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
4083 (the_low_target): Add initializer for arch_setup field.
4084 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
4085 (the_low_target): Add initializer for arch_setup field.
4086 * linux-ia64-low.c (init_registers_ia64): Add prototype.
4087 (the_low_target): Add initializer for arch_setup field.
4088 * linux-m32r-low.c (init_registers_m32r): Add prototype.
4089 (the_low_target): Add initializer for arch_setup field.
4090 * linux-m68k-low.c (init_registers_m68k): Add prototype.
4091 (the_low_target): Add initializer for arch_setup field.
4092 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
4093 (init_registers_mips64_linux): Likewise.
4094 (the_low_target): Add initializer for arch_setup field.
4095 * linux-ppc-low.c (init_registers_ppc): Add prototype.
4096 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
4097 (the_low_target): Add initializer for arch_setup field.
4098 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
4099 (init_registers_powerpc_64): Likewise.
4100 (the_low_target): Add initializer for arch_setup field.
4101 * linux-s390-low.c (init_registers_s390): Add prototype.
4102 (init_registers_s390x): Likewise.
4103 (the_low_target): Add initializer for arch_setup field.
4104 * linux-sh-low.c (init_registers_sh): Add prototype.
4105 (the_low_target): Add initializer for arch_setup field.
4106 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
4107 (the_low_target): Add initializer for arch_setup field.
4108 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
4109 (the_low_target): Add initializer for arch_setup field.
4110
4111 * win32-low.h (struct win32_target_ops): Add arch_setup field.
4112 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
4113 instead of init_registers ().
4114 * win32-arm-low.c (init_registers_arm): Add prototype.
4115 (the_low_target): Add initializer for arch_setup field.
4116 * win32-i386-low.c (init_registers_i386): Add prototype.
4117 (the_low_target): Add initializer for arch_setup field.
4118
4119 * spu-low.c (init_registers_spu): Add prototype.
4120 (initialize_low): Call initialie_registers_spu () instead of
4121 initialize_registers ().
4122
fd96d250
PA
41232008-02-19 Pedro Alves <pedro@codesourcery.com>
4124
4125 * server.c (handle_v_requests): When handling the vRun and vAttach
4126 packets, if already debugging a process, don't kill it. Return an
4127 error instead.
4128
d41b6bb4
DJ
41292008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
4130
4131 * server.c (handle_query): Correct length check.
4132
5ac588cf
PA
41332008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
4134
4135 * win32-low.c (do_initial_child_stuff): Add process handle
4136 parameter. Set current_process_handle and current_process_id from the
4137 parameters. Clear globals.
4138 (win32_create_inferior): Don't set current_process_handle and
4139 current_process_id here. Instead pass them on the call to
4140 do_initial_child_stuff.
4141 (win32_attach): Likewise.
4142 (win32_clear_inferiors): New.
4143 (win32_kill): Don't close the current process handle or the
4144 current thread handle here. Instead call win32_clear_inferiors.
4145 (win32_detach): Don't open a new handle to the process. Call
4146 win32_clear_inferiors.
4147 (win32_join): Don't rely on current_process_handle; open a new
4148 handle using the process id.
4149 (win32_wait): Call win32_clear_inferiors when the inferior process
4150 has exited.
4151
ecd7ecbc
DJ
41522008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
4153
4154 * server.c (monitor_show_help): Add "exit".
4155
1525d545
MG
41562008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
4157
ecd7ecbc 4158 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
4159 (clean): Add reg-xtensa.c.
4160 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
4161 * configure.srv (xtensa*-*-linux*) New target.
4162 * linux-xtensa-low.c: New.
4163 * xtensa-xtregs.c: New.
1525d545 4164
59a016f0
PA
41652008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
4166
4167 * hostio.c: Don't include errno.h.
4168 (errno_to_fileio_errno): Move to hostio-errno.
4169 * hostio.c: (hostio_error): Remove the error parameter. Defer the
4170 error number outputting to the target->hostio_last_error callback.
4171 (hostio_packet_error): Use FILEIO_EINVAL directly.
4172 (handle_open, handle_pread, hostio_error, handle_unlink): Update
4173 calls to hostio_error.
4174 * hostio-errno.c: New.
4175 * server.h (hostio_last_error_from_errno): Declare.
4176 * target.h (target_ops): Add hostio_last_error member.
4177 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
4178 as hostio_last_error handler.
889bf7c5 4179 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
4180 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
4181 (wince_hostio_last_error): New functions.
4182 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
4183 as hostio_last_error handler.
4184 (win32_target_ops) [!_WIN32_WCE]: Register
4185 hostio_last_error_from_errno as hostio_last_error handler.
4186 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
4187 (hostio-errno.o): New rule.
4188 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
4189 * configure.srv (srv_hostio_err_objs): New variable. Default to
4190 hostio-errno.o.
4191 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
4192 * configure: Regenerate.
4193
2d717e4f
DJ
41942008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
4195
4196 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
4197 (linux_kill, linux_detach): Clean up the process list.
4198 * remote-utils.c (remote_open): Improve port number parsing.
4199 (putpkt_binary, input_interrupt): Only send interrupts if the target
4200 is running.
4201 * server.c (extended_protocol): Make static.
4202 (attached): Define earlier.
4203 (exit_requested, response_needed, program_argv): New variables.
4204 (target_running): New.
4205 (start_inferior): Clear attached here.
4206 (attach_inferior): Set attached here.
4207 (require_running): Define.
4208 (handle_query): Use require_running and target_running. Implement
4209 "monitor exit".
4210 (handle_v_attach, handle_v_run): New.
4211 (handle_v_requests): Use require_running. Handle vAttach and vRun.
4212 (gdbserver_usage): Update.
4213 (main): Redo argument parsing. Handle --debug and --multi. Handle
4214 --attach along with other options or after the port. Save
4215 program_argv. Support no initial program. Resynchronize
4216 communication with GDB after an error. Handle "monitor exit".
4217 Use require_running and target_running. Always allow the extended
4218 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
4219 restart in extended mode.
4220 * README: Refer to the GDB manual. Update --attach usage.
4221
7407e2de
AS
42222007-12-20 Andreas Schwab <schwab@suse.de>
4223
4224 * linux-low.c (STACK_SIZE): Define.
4225 (linux_tracefork_child): Use it. Use __clone2 on ia64.
4226 (linux_test_for_tracefork): Likewise.
4227
b65d95c5
DJ
42282007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
4229
4230 * linux-low.c (linux_wait_for_event): Update messages. Do not
4231 reinsert auto-delete breakpoints.
4232 * mem-break.c (struct breakpoint): Change return type of handler to
4233 int.
4234 (set_breakpoint_at): Update handler type.
4235 (reinsert_breakpoint_handler): Return 1 instead of calling
4236 delete_breakpoint.
4237 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
4238 setting a new one.
4239 (check_breakpoints): Delete auto-delete breakpoints and return 2.
4240 * mem-break.h (set_breakpoint_at): Update handler type.
4241 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
4242 * win32-low.c (auto_delete_breakpoint): New.
4243 (get_child_debug_event): Use it.
4244
4e799345
DJ
42452007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
4246
4247 * configure.ac: Check for pread and pwrite.
4248 * hostio.c (handle_pread): Fall back to lseek and read.
4249 (handle_pwrite): Fall back to lseek and write.
4250 * config.in, configure: Regenerated.
4251
27524b67
DJ
42522007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
4253
4254 * server.c (myresume): Add own_buf argument.
4255 (main): Update calls.
4256
a20d5e98
DJ
42572007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
4258
4259 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
4260 * remote-utils.c (remote_open): Do not call disable_async_io.
4261 (block_async_io): Delete.
4262 (unblock_async_io): Make static.
4263 (initialize_async_io): New.
4264 * server.c (handle_v_cont): Handle async I/O here.
4265 (myresume): Likewise. Move other common resume tasks here...
4266 (main): ... from here. Call initialize_async_io. Disable async
4267 I/O before the main loop.
4268 * server.h (initialize_async_io): Declare.
4269 (block_async_io, unblock_async_io): Delete prototypes.
4270 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
4271
b79d787e
DJ
42722007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
4273
4274 * remote-utils.c (readchar): Allow binary data in received messages.
4275
d97903b2
PA
42762007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
4277
4278 * win32-low.c (attaching): New global.
4279 (win32_create_inferior): Clear the `attaching' global.
4280 (win32_attach): Set the `attaching' global.
4281 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
4282 attaching. Only set a breakpoint at the entry point if not
4283 attaching.
4284
311de423
PA
42852007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
4286
4287 * server.c (main): Don't report dll events on the initial
4288 connection on attaches.
4289
6c2d16d2
PA
42902007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
4291
4292 * server.c (main): Relax numerical bases supported for the pid of
4293 the --attach command line argument.
4294
5ca906e6
PA
42952007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
4296
4297 * win32-low.c (win32_attach): Call OpenProcess before
4298 DebugActiveProcess, not after. Add last error output to error
4299 call.
4300
9c6c8194
PA
43012007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
4302
4303 * win32-low.c (win32_get_thread_context)
4304 (win32_set_thread_context): New functions.
4305 (thread_rec): Use win32_get_thread_context.
4306 (continue_one_thread, win32_resume): Use win32_set_thread_context.
4307 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
4308 field.
4309
4d5d1aaa
PA
43102007-12-03 Leo Zayas
4311 Pedro Alves <pedro_alves@portugalmail.pt>
4312
4313 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
4314 global variables.
4315 (child_add_thread): Minor cleanup.
4316 (child_continue): Resume artificially suspended threads before
4317 calling ContinueDebugEvent.
4318 (suspend_one_thread): New.
4319 (fake_breakpoint_event): New.
4320 (get_child_debug_event): Change return type to int. Check here if
4321 gdb sent an interrupt request. If a soft interrupt was requested,
4322 fake a breakpoint event. Return 0 if there is no event to handle,
4323 and 1 otherwise.
4324 (win32_wait): Don't check here if gdb sent an interrupt request.
4325 Ensure there is a valid event to handle.
4326 (win32_request_interrupt): Add soft interruption method as last
4327 resort.
4328
c436e841
PA
43292007-12-03 Leo Zayas
4330 Pedro Alves <pedro_alves@portugalmail.pt>
4331
4332 * win32-low.h (win32_thread_info): Add descriptions to the
4333 structure members. Replace `suspend_count' counter by a
4334 `suspended' flag.
4335 * win32-low.c (thread_rec): Update condition of when to get the
4336 context from the inferior. Rely on ContextFlags being set if it
4337 has already been retrieved. Only suspend the inferior thread if
4338 we haven't already. Warn if that fails.
4339 (continue_one_thread): s/suspend_count/suspended/. Only call
4340 ResumeThread once. Warn if that fails.
4341
e7b5fa67
PA
43422007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
4343
4344 * win32-low.c (win32_wait): Don't read from the inferior when it
4345 has already exited.
4346
a385171d
PA
43472007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
4348
4349 * Makefile.in (win32_low_h): New variable.
4350 (win32-low.o): Add dependency on $(win32_low_h).
4351 (win32-arm-low.o, win32-i386-low.o): New rules.
4352
f80c84b3
DJ
43532007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
4354
4355 * hostio.c: Correct copyright year.
4356
a6b151f1
DJ
43572007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
4358
4359 * Makefile.in (OBS): Add hostio.o.
4360 (hostio.o): New rule.
4361 * server.h (handle_vFile): Declare.
4362 * hostio.c: New file.
4363 * server.c (handle_v_requests): Take packet_len and new_packet_len
4364 for binary packets. Call handle_vFile.
4365 (main): Update call to handle_v_requests.
4366
f9387fc3
DJ
43672007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
4368
4369 * linux-low.c: Include <sched.h>.
4370
51c2684e
DJ
43712007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
4372
4373 * linux-low.c (linux_tracefork_grandchild): New.
4374 (linux_tracefork_child): Use clone.
4375 (linux_test_for_tracefork): Use clone; allocate and free a stack.
4376
75f83163
JB
43772007-10-31 Joel Brobecker <brobecker@adacore.com>
4378
4379 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
4380
da5898ce
DJ
43812007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
4382
4383 * linux-low.c (handle_extended_wait): Handle unexpected signals.
4384
24a09b5f
DJ
43852007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
4386
4387 * inferiors.c (change_inferior_id): Delete.
4388 (add_pid_to_list, pull_pid_from_list): New.
4389 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
4390 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
4391 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
4392 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
4393 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
4394 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
4395 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
4396 (using_threads): Always set to 1.
4397 (handle_extended_wait): New.
4398 (add_process): Do not set TID.
4399 (linux_create_inferior): Set must_set_ptrace_flags.
4400 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
4401 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
4402 (linux_thread_alive): Rename TID argument to LWPID.
4403 (linux_wait_for_process): Handle unknown processes. Do not use TID.
4404 (linux_wait_for_event): Do not use TID or check using_threads. Update
4405 call to dead_thread_notify. Call handle_extended_wait.
4406 (linux_create_inferior): Use PTRACE_SETOPTIONS.
4407 (send_sigstop): Delete sigstop_sent.
4408 (wait_for_sigstop): Avoid TID.
4409 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
4410 (linux_test_for_tracefork): New.
4411 (linux_lookup_signals): Use thread_db_active and
4412 linux_supports_tracefork_flag.
4413 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
4414 * linux-low.h (get_process_thread): Avoid TID.
4415 (struct process_ifo): Move thread_known and tid to the end. Remove
4416 sigstop_sent.
4417 (linux_attach_lwp, thread_db_init): Update prototypes.
4418 * server.h (change_inferior_id): Delete prototype.
4419 (add_pid_to_list, pull_pid_from_list): New prototypes.
4420 * thread-db.c (thread_db_use_events): New.
4421 (find_first_thread): Rename to...
4422 (find_one_thread): ...this. Update callers and messages. Do not
4423 call fatal. Check thread_db_use_events. Do not call
4424 change_inferior_id or new_thread_notify.
4425 (maybe_attach_thread): Update. Do not call new_thread_notify.
4426 (thread_db_init): Set thread_db_use_events. Check use_events.
4427 * utils.c (fatal, warning): Correct message prefix.
4428
30ed0a8f
DJ
44292007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
4430
4431 * Makefile.in (clean): Remove new files.
4432 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
4433 (powerpc-64.o, powerpc-64.c): New rules.
4434 * configure.srv: Use alternate register sets for powerpc64-*-linux*
4435 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
4436 with SPE.
4437 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
4438 SPE targets.
4439 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
4440 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
4441 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
4442 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
4443 (target_regsets): Add AltiVec and SPE register sets.
4444 * configure.ac: Check for AltiVec and SPE.
4445 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
4446 (ppc_fill_vrregset, ppc_store_vrregset): New.
4447 (target_regsets): Add AltiVec register set.
4448 * configure: Regenerated.
4449
fd462a61
DJ
44502007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
4451
4452 * linux-low.c (O_LARGEFILE): Define.
4453 (linux_read_memory): Use /proc/PID/mem.
4454 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
4455 * configure, config.in: Regenerated.
4456
69f223ed
DJ
44572007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
4458
4459 * linux-low.c (linux_wait_for_event): Do not pass signals while
4460 single-stepping.
4461
aec18585
PA
44622007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
4463
4464 * win32-low.c (create_process): New.
4465 (win32_create_inferior): Use create_process instead of
4466 CreateProcess. If create_process failed retry appending an ".exe"
4467 suffix. Store the GetLastError result immediatelly after
4468 create_process calls and use it on the call to error.
4469
34d86ddd
PA
44702007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
4471
4472 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
4473
5a0e3bd0
JB
44742007-08-23 Joel Brobecker <brobecker@adacore.com>
4475
4476 * configure.ac: Switch license to GPLv3.
4477
f88c79e6
MS
44782007-08-01 Michael Snyder <msnyder@access-company.com>
4479
4480 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
4481
6b3d9b83
PA
44822007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
4483
4484 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
4485 typedef.
4486 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
4487 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
4488 CloseToolhelp32Snapshot.
4489 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
4490 CloseToolhelp32Snapshot.
4491
c588c53c
MS
44922007-07-27 Michael Snyder <michael.snyder@access-company.com>
4493
4494 * server.c (main): Check for inferior exit before main loop.
4495
aa0403d9
PA
44962007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
4497
4498 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
4499 instead of on tmp_desc.
4500
255e7678
DJ
45012007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
4502 Daniel Jacobowitz <dan@codesourcery.com>
4503
4504 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
4505 (add_thread): Minor cleanups.
4506 (clear_inferiors): Move lower in the file. Clear the DLL
4507 list.
4508 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
4509 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
4510 (xml_escape_text): New.
4511 * server.c (handle_query): Handle qXfer:libraries:read. Report it
4512 for qSupported.
4513 (handle_v_cont): Report errors.
4514 (gdbserver_version): Update.
4515 (main): Correct size of own_buf. Do not report initial DLL events.
4516 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
4517 (unloaded_dll, xml_escape_text): New.
4518 * win32-low.c (enum target_waitkind): Update comments.
4519 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
4520 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
4521 (win32_EnumProcessModules, win32_GetModuleInformation)
4522 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
4523 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
4524 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
4525 (win32_Module32First, win32_Module32Next, load_toolhelp)
4526 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
4527 (get_child_debug_event): Handle DLL events.
4528 (win32_wait): Likewise.
4529
0d37add9
DJ
45302007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
4531
4532 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
4533 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
4534
45e2715e
PA
45352007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
4536
4537 * win32-low.c (handle_output_debug_string): Ignore event if not
4538 waiting.
4539
c5674cf1
PA
45402007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
4541
4542 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
4543
2bbe3cc1
DJ
45442007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
4545
4546 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
4547
ae13219e
DJ
45482007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
4549
4550 * inferiors.c (change_inferior_id): Add comment.
4551 * linux-low.c (check_removed_breakpoint): Add an early
4552 prototype. Improve debug output.
4553 (linux_attach): Doc update.
4554 (linux_detach_one_process, linux_detach): Clean up before releasing
4555 each process.
4556 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
4557 * linux-low.h (struct process_info): Doc improvement.
4558 * mem-break.c (delete_all_breakpoints): New.
4559 * mem-break.h (delete_all_breakpoints): New prototype.
4560 * thread-db.c (find_first_thread): New.
4561 (thread_db_create_event): Call it instead of
4562 thread_db_find_new_threads. Clean up unused variables.
4563 (maybe_attach_thread): Remove first thread handling.
4564 (thread_db_find_new_threads): Use find_first_thread.
4565 (thread_db_get_tls_address): Likewise.
4566
4105de34
DJ
45672007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
4568
4569 * thread-db.c (thread_db_find_new_threads): Add prototype.
4570 (thread_db_create_event): Check for the main thread before adding
4571 a new thread.
4572 (maybe_attach_thread): Only enable event reporting if TID == 0.
4573 (thread_db_get_tls_address): Check for new threads.
4574
2b876972
DJ
45752007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
4576
4577 * linux-low.c (linux_create_inferior): Try execv before execvp.
4578 * spu-low.c (spu_create_inferior): Likewise.
4579
7a245884
DJ
45802007-06-13 Mike Frysinger <vapier@gentoo.org>
4581
4582 * linux-low.c (linux_create_inferior): Change execv to execvp.
4583 * spu-low.c (spu_create_inferior): Likewies.
4584
117ce543
DJ
45852007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
4586
4587 * Makefile.in (clean): Clean new files instead of deleted ones.
4588 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
4589 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
4590 rules.
4591 * configure.srv: Specify XML files and new regformats for MIPS and
4592 MIPS64 GNU/Linux.
4593 * linux-mips-low.c (mips_num_regs): Set to only used registers.
4594 (mips_regmap): Do not fetch $0. Remove unused registers. Add
4595 an entry for the restart register.
4596 (mips_cannot_fetch_register, mips_cannot_store_register)
4597 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
4598 register names to match the XML descriptions.
4599 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
4600 restart register instead of $0.
4601
0e7f50da
UW
46022007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
4603 Markus Deuling <deuling@de.ibm.com>
4604
4605 * remote-utils.c (decode_xfer_write): New function.
4606 * server.h (decode_xfer_write): Add prototype.
4607 * server.c (handle_query): Add PACKET_LEN argument. Support
4608 qXfer:spu:read and qXfer:spu:write packets.
4609 (main): Pass packet_len to handle_query.
4610 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
4611 * target.h (target_ops): Add qxfer_spu.
4612
374c1d38
UW
46132007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
4614
4615 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
4616 accessing non-seekable spufs files.
4617
bb63802a
UW
46182007-05-16 Markus Deuling <deuling@de.ibm.com>
4619
889bf7c5 4620 * server.c (handle_query): Add reply for qC packet.
bb63802a 4621
7390519e
PA
46222007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4623 Leo Zayas <lerele@champenstudios@com>
4624
4625 * server.h (check_remote_input_interrupt_request): New function.
4626 * remote_utils.c (INVALID_DESCRIPTOR): New define.
4627 (remote_desc): Initialize with INVALID_DESCRIPTOR.
4628 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
4629 (check_remote_input_interrupt_request): New function.
4630 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 4631 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
4632 winapi_GenerateConsoleCtrlEvent): New typedefs.
4633 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
4634 to 250 ms.
4635 (win32_wait): Check for remote interrupt request
4636 with check_remote_input_interrupt_request.
4637 (win32_request_interrupt): New function.
4638 (win32_target_op): Set request_interrupt to win32_request_interrupt.
4639
34b34921
PA
46402007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4641
4642 * win32-low.c (debug_registers_changed,
4643 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
4644 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
4645 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
4646 (thread_rec): Get context using the low target.
4647 (child_add_thread): Call thread_added on the low target,
4648 which does the same thing.
4649 (regptr): Delete.
4650 (do_initial_child_stuff): Remove debug registers references.
4651 Set context using the low target. Resume threads after
4652 setting the contexts.
4653 (child_continue): Remove dead variable. Remove debug
4654 registers references.
4655 (child_fetch_inferior_registers): Go through the low target.
4656 (do_child_store_inferior_registers): Remove.
4657 (child_store_inferior_registers): Go through the low target.
4658 (win32_resume): Remove debug registers references.
4659 Set context using the low target.
4660 (handle_exception): Change return type to void. Don't record
4661 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
4662 first chance exception.
889bf7c5 4663 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
4664 goto loop. Always return after waiting for debug event.
4665 (win32_wait): Convert to switch statement. Handle spurious
4666 events.
4667
4668 * win32-i386-low.c (debug_registers_changed,
4669 debug_registers_used): New.
4670 (initial_stuff): Rename to ...
4671 (i386_initial_stuff): ... this. Clear debug registers
4672 state variables.
4673 (store_debug_registers): Delete.
4674 (i386_get_thread_context): New.
4675 (load_debug_registers): Delete.
4676 (i386_set_thread_context): New.
4677 (i386_thread_added): New.
4678 (single_step): Rename to ...
4679 (i386_single_step): ... this.
4680 (do_fetch_inferior_registers): Rename to ...
4681 (i386_fetch_inferior_register): ... this.
4682 (i386_store_inferior_register): New.
4683 (the_low_target): Adapt to new interface.
4684
4685 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
4686 (arm_get_thread_context): New.
4687 (arm_set_thread_context): New.
4688 (regptr): New.
4689 (do_fetch_inferior_registers): Rename to ...
4690 (arm_fetch_inferior_register): ... this.
4691 (arm_store_inferior_register): New.
4692 (arm_wince_breakpoint): Reimplement as unsigned long.
4693 (arm_wince_breakpoint_len): Define.
4694 (the_low_target): Adapt to new interface.
4695
4696 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
4697 load_debug_registers. Add get_thread_context, set_thread_context,
4698 thread_added and store_inferior_register. Rename
4699 fetch_inferior_registers to fetch_inferior_register.
4700 (regptr): Remove declaration.
4701
dd6953e1
PA
47022007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4703
4704 * linux-low.c (linux_detach): Change return type to int. Return 0.
4705 * spu-low.c (spu_detach): Likewise.
4706
444d6139
PA
47072007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4708
4709 * target.h (target_ops): Change return type of detach to int.
4710 Add join.
4711 (join_inferior): New.
4712 * server.c (main): Don't skip detach support on mingw32.
4713 If the inferior doesn't support detaching return error.
4714 Call join_inferior instead of using waitpid.
4715 * linux-low.c (linux_join): New.
4716 (linux_target_op): Add linux_join.
4717 * spu-low.c (spu_join): New.
4718 (spu_target_ops): Add spu_join.
4719 * win32-low.c (win32_detach): Adapt to new interface.
4720 Reopen current_process_handle before detaching. Issue a child
4721 resume before detaching.
4722 (win32_join): New.
4723 (win32_target_op): Add win32_join.
4724
1d5315fe
PA
47252007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4726
4727 * win32-low.c (win32-attach): Fix return value.
4728 * target.h (target_ops): Describe ATTACH return values.
4729
bf914831
PA
47302007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4731
4732 * win32-low.c (GETPROCADDRESS): Define.
4733 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
4734 (winapi_DebugSetProcessKillOnExit): Likewise.
4735 (win32_create_inferior): Force usage of ansi CreateProcessA.
4736 (win32_attach): Use GETPROCADDRESS.
4737 (win32_detach): Likewise.
4738
f72f3e60
PA
47392007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4740
4741 * win32-low.c (win32_wait): Don't use WSTOPSIG.
4742
ed50f18f
PA
47432007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
4744
4745 * win32-low.c: Commit leftover changes from 2007-03-29.
4746
0c2ead7e
DJ
47472007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
4748
4749 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
4750 fields short instead of int. Add explicit padding.
4751 (i387_cache_to_fsave): Remove unnecessary casts.
4752 (i387_fsave_to_cache): Doc fix.
4753 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
4754
73725ff3
DJ
47552007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
4756
4757 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
4758 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
4759
d99f33d8
PA
47602007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
4761
4762 * configure.srv (arm*-*-mingw32ce*): Move near the other
4763 arm targets.
4764
68070c10
PA
47652007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
4766
2482afc6 4767 * configure.ac: Add errno checking.
68070c10
PA
4768 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
4769 sys/file.h and malloc.h.
4770 (AC_CHECK_DECLS): Add perror.
4771 (srv_mingwce): Handle.
2482afc6 4772 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
4773 win32-i386-low.o to srv_tgtobj.
4774 (i[34567]86-*-mingw*): Likewise.
4775 (arm*-*-mingw32ce*): Add case.
4776 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
4777 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
4778 [__MINGW32CE__] (strerror): New function.
4779 [__MINGW32CE__] (errno): Define to GetLastError.
4780 [__MINGW32CE__] (COUNTOF): New macro.
4781 (remote_open): Remove extra close call.
4782 * mem-break.c (delete_breakpoint_at): New function.
4783 * mem-break.h (delete_breakpoint_at): Declare.
4784 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
4785 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
4786 [USE_WIN32API] (read, write): Add char* casts.
4787 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
4788 * server.h: Include wincecompat.h on Windows CE.
4789 [HAVE_ERRNO_H]: Check.
4790 (perror): Declare if not declared.
4791 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
4792 (perror_with_name): Remove errno declaration.
4793 * wincecompat.h: New.
4794 * wincecompat.c: New.
4795 * win32-low.h: New.
4796 * win32-arm-low.c: New.
4797 * win32-i386-low.c: New.
4798 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
4799 (OUTMSG2): Make it safe.
4800 (_T): New macro.
4801 (COUNTOF): New macro.
4802 (NUM_REGS): Get it from the low target.
4803 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
4804 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
4805 (thread_rec): Let low target handle debug registers.
4806 (child_add_thread): Likewise.
4807 (child_init_thread_list): Likewise.
4808 (continue_one_thread): Likewise.
4809 (regptr): New.
4810 (do_child_fetch_inferior_registers): Move to ...
4811 * win32-i386-low.c: ... here, and rename to ...
4812 (do_fetch_inferior_registers): ... this.
889bf7c5 4813 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
4814 Go through the low target.
4815 (do_child_store_inferior_registers): Use regptr.
4816 (strwinerror): New function.
4817 (win32_create_inferior): Handle Windows CE.
4818 Use strwinerror instead of strerror on Windows error
4819 codes. Add program to the error output.
4820 Don't close the main thread handle on Windows CE.
4821 (win32_attach): Use coredll.dll on Windows CE.
4822 (win32_kill): Close current process and current
4823 thread handles.
4824 (win32_detach): Use coredll.dll on Windows CE.
4825 (win32_resume): Let low target handle debug registers, and
4826 step request.
4827 (handle_exception): Add/Remove initial breakpoint. Avoid
4828 non-existant WSTOPSIG on Windows CE.
4829 (win32_read_inferior_memory): Cast to remove warning.
4830 (win32_arch_string): Go through the low target.
4831 (initialize_low): Call set_breakpoint_data with the low
4832 target's breakpoint.
4833 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
4834 FOP_REGNUM, mappings): Move to ...
4835 * win32-i386-low.c: ... here.
4836 * win32-low.c (win32_thread_info): Move to ...
4837 * win32-low.h: ... here.
4838 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
4839 win32-arm-low.c and wincecompat.c.
4840 (all:): Add $EXEEXT.
4841 (install-only:): Likewise.
4842 (gdbserver:): Likewise.
4843 (gdbreplay:): Likewise.
4844 * config.in: Regenerate.
4845 * configure: Regenerate.
4846
41093d81
PA
48472007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
4848
4849 * win32-low.c: Rename typedef thread_info to
4850 win32_thread_info throughout.
4851
544afa54
PA
48522007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
4853
4854 * win32-i386-low.c: Rename to ...
4855 * win32-low.c: ... this.
4856 * configure.srv: Replace win32-i386-low.o with win32-low.o.
4857 * Makefile.in: Likewise.
4858
bce7165d
PA
48592007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
4860
4861 * remote-utils.c (monitor_output): Constify msg parameter.
4862 * server.h (monitor_output): Likewise.
4863 * win32-i386-low.c (handle_output_debug_string): New.
4864 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
4865 handle_output_debug_string.
4866 (get_child_debug_event): Likewise.
4867
506c7aa0
DJ
48682007-03-27 Mat Hostetter <mat@lcs.mit.edu>
4869
4870 * server.c (main): Correct strtoul check.
4871
42c81e2a
DJ
48722007-03-27 Jon Ringle <jon@ringle.org>
4873
4874 * linux-low.c: Check __ARCH_HAS_MMU__ also.
4875
9453113a
DJ
48762007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
4877
4878 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
4879
64a69107
DJ
48802007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
4881
4882 * terminal.h: Check HAVE_SGTTY_H.
4883
48842007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
4885
4886 * remote-utils.c (remote_open): Print out the assigned port number.
4887
c74d0ad8
DJ
48882007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
4889
4890 * remote-utils.c (monitor_output): New function.
4891 * server.c (debug_threads): Define here.
4892 (monitor_show_help): New function.
4893 (handle_query): Handle qRcmd.
4894 (main): Do not handle 'd' packet.
4895 * server.h (debug_threads, remote_debug, monitor_output): Declare.
4896 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
4897 of debug_threads.
4898
de7c3b4a
PA
48992007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
4900
4901 * Makefile.in (EXEEXT): New.
4902 (clean): Use $(EXEEXT).
4903
ef57601b
PA
49042007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
4905
4906 * target.h (target_ops): Rename send_signal to request_interrupt,
4907 and remove enum target_signal parameter.
4908 * linux-low.c (linux_request_interrupt): Rename from
4909 linux_send_signal, and always send SIGINT.
4910 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
4911 and always send SIGINT.
4912 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
4913 of send_signal.
4914 (input_interrupt): Likewise.
4915
820f2bda
PA
49162007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
4917
4918 * server.c (get_features_xml): Check if target implemented
4919 arch_string.
4920 * win32-i386-low.c (win32_arch_string): New.
4921 (win32_target_ops): Add win32_arch_string as arch_string member.
4922
ab39bf24
UW
49232007-02-22 Markus Deuling <deuling@de.ibm.com>
4924
4925 * spu-low.c (spu_arch_string): New.
4926 (spu_target_ops): Add spu_arch_string.
4927
61ff6e04
DJ
49282007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
4929
4930 * remote-utils.c: Remove HAVE_TERMINAL_H check.
4931 * configure.ac: Do not check for terminal.h.
4932 * configure, config.in: Regenerated.
4933
fb1e4ffc
DJ
49342007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
4935
4936 * Makefile.in (OBS): Add $(XML_BUILTIN).
4937 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
4938 (clean): Update.
4939 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
4940 (arm-with-iwmmxt.c): New.
4941 * config.in, configure: Regenerate.
4942 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
4943 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
4944 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
4945 (arm*-*-linux*): Add iWMMXt and regset support.
4946 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
4947 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
4948 (arm_store_wmmxregset, target_regsets): New.
4949 * server.c (get_features_xml): Take annex argument. Check builtin
4950 XML documents.
4951 (handle_query): Handle multiple annexes.
4952
0f48aa01
DJ
49532007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
4954
4955 * remote-utils.c [USE_WIN32API] (read, write): Define.
4956 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
4957 write.
4958
23181151
DJ
49592007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
4960
4961 * linux-i386-low.c (the_low_target): Set arch_string.
4962 * linux-x86-64-low.c (the_low_target): Likewise.
4963 * linux-low.c (linux_arch_string): New.
4964 (linux_target_ops): Add it.
4965 * linux-low.h (struct linux_target_ops): Add arch_string.
4966 * server.c (write_qxfer_response): Use const void * for DATA.
4967 (get_features_xml): New.
4968 (handle_query): Handle qXfer:features:read. Report it for qSupported.
4969 * target.h (struct target_ops): Add arch_string method.
4970
9d606399
DJ
49712007-01-03 Denis Pilat <denis.pilat@st.com>
4972 Daniel Jacobowitz <dan@codesourcery.com>
4973
4974 * linux-low.c (linux_kill): Handle being called with no threads.
4975 * win32-i386-low.c (win32_kill): Likewise.
4976 (get_child_debug_event): Clear current_process_handle.
4977
49782006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
4979 Daniel Jacobowitz <dan@codesourcery.com>
4980
4981 * remote-utils.c (remote_open): Check the type of specified
4982 serial port devices before opening them.
4983 * server.c (main): Kill the inferior if an error occurs during
4984 the first remote_open.
4985
a5e13d24
DJ
49862006-12-05 Markus Deuling <deuling@de.ibm.com>
4987
4988 * README: Update supported targets.
4989
186947f7
DJ
49902006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
4991
4992 * Makefile.in (clean): Remove reg-mips64.c.
4993 (reg-mips64.c, reg-mips64.o): New rules.
4994 * configure.srv: Handle mips64. Include regset support for mips.
4995 * linux-mips-low.c (union mips_register): New.
4996 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
4997 (mips_breakpoint, mips_breakpoint_at): Use int.
4998 (mips_collect_register, mips_supply_register)
4999 (mips_collect_register_32bit, mips_supply_register_32bit)
5000 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
5001 (mips_store_fpregset, target_regsets): New.
5002 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
5003
a13e2c95
UW
50042006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
5005
5006 * configure.srv: Add target "spu*-*-*".
5007 * Makefile.in (clean): Remove reg-spu.c.
5008 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
5009 * spu-low.c: New file.
5010
cb7283db
DJ
50112006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
5012
5013 * configure.ac: Correct td_thr_tls_get_addr test.
5014 * configure: Regenerated.
5015
89be2091
DJ
50162006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
5017
5018 * linux-low.c (linux_wait_for_event): Reformat. Use the
5019 pass_signals array.
5020 * remote-utils.c (decode_address_to_semicolon): New.
5021 * server.c (pass_signals, handle_general_set): New.
5022 (handle_query): Mention QPassSignals for qSupported.
5023 (main): Call handle_general_set.
5024 * server.h (pass_signals, decode_address_to_semicolon): New.
5025
000ef4f0
DJ
50262006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
5027
5028 * server.c (handle_query): Correct error handling for read_auxv.
5029
b7149293
UW
50302005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
5031
5032 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
5033 and srv_linux_thread_db to yes.
5034 * linux-s390-low.c (s390_fill_gregset): New function.
5035 (target_regsets): Define data structure.
5036
dae5f5cf
DJ
50372006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
5038
5039 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
5040 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
5041 * config.in, configure: Regenerated.
5042 * inferiors.c (gdb_id_to_thread): New function.
5043 (gdb_id_to_thread_id): Use it.
5044 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
5045 * linux-low.h (struct process_info): Add th member.
5046 (thread_db_get_tls_address): New prototype.
5047 * remote-utils.c (decode_address): Make non-static.
5048 * server.c (handle_query): Handle qGetTLSAddr.
5049 * server.h (gdb_id_to_thread, decode_address): New prototypes.
5050 * target.h (struct target_ops): Add get_tls_address.
5051 * thread-db.c (maybe_attach_thread): Save the thread handle.
5052 (thread_db_get_tls_address): New.
5053
32ca6d61
DJ
50542006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
5055
5056 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
5057 (linux_resume_one_process): Take a siginfo_t *. Update all
5058 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
5059 (struct pending_signals): Add a siginfo_t.
5060 (linux_wait_for_process): Always set last_status.
5061 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
5062 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
5063 * linux-low.h (struct process_info): Add last_status.
5064
5ffff7c1
DJ
50652006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
5066
5067 * remote-utils.c (try_rle): New function.
5068 (putpkt_binary): Use it.
5069
8695c747
DJ
50702006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
5071
5072 * Makefile.in (clean): Clean reg-x86-64-linux.c.
5073 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
5074 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
5075 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
5076 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
5077 point registers.
5078
290fadea
RS
50792006-08-08 Richard Sandiford <richard@codesourcery.com>
5080
5081 * server.c (terminal_fd): New variable.
5082 (old_foreground_pgrp): Likewise.
5083 (restore_old_foreground_pgrp): New function.
5084 (start_inferior): Record the terminal file descriptor in terminal_fd
5085 and its original foreground group in old_foreground_pgrp. Register
5086 restore_old_foreground_pgrp with atexit().
5087
9f2e1e63
DJ
50882006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
5089
5090 * server.c (handle_query): Correct qPart to qXfer.
5091
b80864fb
DJ
50922006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
5093
5094 * configure.ac: Check for more headers which are missing on
5095 Windows. Automatically supply -lwsock32 and USE_WIN32API.
5096 * configure.srv: Add Cygwin and mingw32.
5097 * remote-utils.c: Don't include headers unconditionally which
5098 are missing on mingw32. Include <winsock.h> for mingw32.
5099 (remote_open): Adjust for mingw32 support. Flush
5100 standard error after writing to it.
5101 (remote_close, putpkt_binary, input_interrupt, block_async_io)
5102 (unblock_async_io, enable_async_io, disable_async_io)
5103 (readchar, getpkt): Update for Winsock support.
5104 (prepare_resume_reply): Expect a protocol signal number.
5105 * server.c: Disable <sys/wait.h> on mingw32.
5106 (start_inferior): Adjust for mingw32 support. Flush
5107 standard error after writing to it.
5108 (attach_inferior): Likewise. Use protocol signal
5109 numbers.
5110 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
5111 and names.
5112 * win32-i386-low.c: New file.
5113 * Makefile.in (XM_CLIBS): Set.
5114 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
5115 (win32-i386-low.o): New dependency rule.
5116 * linux-low.c (linux_wait): Use target signal numbers.
5117 * target.h (struct target_ops): Doc fix.
5118 * server.h (target_signal_to_name): New prototype.
5119 * gdbreplay.c: Don't include headers unconditionally which
5120 are missing on mingw32. Include <winsock.h> for mingw32.
5121 (remote_close, remote_open): Adjust for Winsock support.
5122 * configure, config.in: Regenerated.
5123
0876f84a
DJ
51242006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
5125
5126 * server.c (decode_xfer_read, write_qxfer_response): New.
5127 (handle_query): Take a packet length argument. Handle
5128 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
5129 the qSupported response.
5130 (main): Update call to handle_query.
5131
01f9e8fa
DJ
51322006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
5133
5134 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
5135 (putpkt_binary): Renamed from putpkt and adjusted for binary
5136 data.
5137 (putpkt): New wrapper for putpkt_binary.
5138 (readchar): Don't mask off the high bit.
5139 (decode_X_packet): New function.
5140 * server.c (main): Call putpkt_binary if a handler sets the packet
5141 length. Save the length of the incoming packet. Handle 'X'.
5142 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
5143
be2a5f71
DJ
51442006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
5145
5146 * server.c (handle_query): Handle qSupported.
5147
ea025f5f
DJ
51482006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
5149
5150 * remote-utils.c (all_symbols_looked_up): New variable.
5151 (look_up_one_symbol): Check it.
5152 * server.h (look_up_one_symbol): New declaration.
5153 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
5154
9308fc88
DJ
51552006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
5156
5157 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 5158 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
5159 (PTRACE_GET_THREAD_AREA): Define.
5160 (ps_get_thread_area): New function.
5161
52fb6437
NS
51622006-05-09 Nathan Sidwell <nathan@codesourcery.com>
5163
5164 * configure.srv (m68k*-*-uclinux*): New target.
5165 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
5166 (linux_resume_one_process): Remove extraneous cast.
5167 (linux_read_offsets): New.
5168 (linux_target_op): Add linux_read_offsets on mmuless systems.
5169 * server.c (handle_query): Add qOffsets logic.
5170 * target.h (struct target_ops): Add read_offsets.
5171
21b0f40c
DJ
51722006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
5173
5174 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
5175 (PTRACE_GET_THREAD_AREA): Define.
5176 (ps_get_thread_area): New function.
5177 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
5178 (linux-x86-64-low.o): Update.
5179
0050a760
DJ
51802006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
5181
5182 * configure.ac: Remove checks for prfpregset_t.
5183 * gdb_proc_service.h: New file.
5184 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
5185 new "gdb_proc_service.h".
5186 * proc-service.c: Likewise.
5187 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
5188 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
5189 * Makefile.in (gdb_proc_service_h): Updated.
5190 * configure, config.in: Regenerated.
5191
b92a518e
DJ
51922006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
5193
5194 * remote-utils.c (prepare_resume_reply): Move declaration
5195 of gdb_id_from_wait to the top of the block.
5196
545587ee
DJ
51972006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
5198
5199 * linux-low.c (regsets_store_inferior_registers): Read the regset
5200 from the target before filling it.
5201
9db87ebd
DJ
52022006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
5203
5204 * server.c (attach_inferior): Return SIGTRAP for a successful
5205 attach.
5206
dd24457d
DJ
52072006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
5208
5209 * Makefile.in (OBS): Add version.o.
5210 (STAGESTUFF): Delete.
5211 (version.o): Add dependencies.
5212 (version.c): Replace rule.
5213 (clean): Remove version.c.
5214 * server.c (gdbserver_version): New.
5215 (gdbserver_usage): Use printf.
5216 (main): Handle --version and --help.
5217 * server.h (version, host_name): Add declarations.
5218
6f0f660e
EZ
52192005-12-23 Eli Zaretskii <eliz@gnu.org>
5220
889bf7c5
PA
5221 * linux-arm-low.c:
5222 * linux-arm-low.c:
5223 * inferiors.c:
5224 * i387-fp.h:
5225 * i387-fp.c:
5226 * gdbreplay.c:
5227 * regcache.c:
5228 * proc-service.c:
5229 * mem-break.h:
5230 * mem-break.c:
5231 * linux-x86-64-low.c:
5232 * linux-sh-low.c:
5233 * linux-s390-low.c:
5234 * linux-ppc64-low.c:
5235 * linux-ppc-low.c:
5236 * linux-mips-low.c:
5237 * linux-m68k-low.c:
5238 * linux-m32r-low.c:
5239 * linux-low.h:
5240 * linux-low.c:
5241 * linux-ia64-low.c:
5242 * linux-i386-low.c:
5243 * linux-crisv32-low.c:
5244 * thread-db.c:
5245 * terminal.h:
5246 * target.h:
5247 * target.c:
5248 * server.h:
5249 * server.c:
5250 * remote-utils.c:
5251 * regcache.h:
5252 * utils.c:
5253 * Makefile.in:
5254 * configure.ac:
6f0f660e
EZ
5255 * gdbserver.1: Add (C) after Copyright. Update the FSF
5256 address.
5257
9d1fb177
DJ
52582005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
5259
5260 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
5261 (arm_breakpoint_at): Recognize both breakpoints.
5262 (the_low_target): Use the correct breakpoint instruction.
5263
011a70c2
DJ
52642005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
5265
5266 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
5267 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
5268 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
5269 (the_low_target): Update.
5270
7fb85e41
AS
52712005-10-25 Andreas Schwab <schwab@suse.de>
5272
5273 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
5274
5275 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
5276 (ia64_num_regs): Reduce to 462.
5277
3db0444b
DJ
52782005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
5279
5280 * acinclude.m4: Correct quoting.
5281 * aclocal.m4: Regenerated.
5282
5283 Suggested by SZOKOVACS Robert <szo@ies.hu>:
5284 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
5285 (thread_db_init): Call thread_db_err_str.
5286 * configure.ac: Check for TD_VERSION.
5287 * config.in, configure: Regenerated.
5288
bee0189a
DJ
52892005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5290
5291 * server.h (error, fatal, warning): Add ATTR_FORMAT.
5292
e9d25b98
DJ
52932005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
5294
5295 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
5296 is not available. Define HAVE_PTRACE_GETREGS if it is.
5297 * config.in, configure: Regenerated.
5298 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
5299 * linux-i386-low.c, linux-m68k-low.c: Update to use
5300 HAVE_PTRACE_GETREGS.
5301 * linux-low.c (regsets_fetch_inferior_registers)
5302 (regsets_store_inferior_registers): Only return 0 if we processed
5303 GENERAL_REGS.
5304 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
5305 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
5306
a06660f7
DJ
53072005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
5308
5309 * inferiors.c (struct thread_info): Add gdb_id.
5310 (add_thread): Add gdb_id argument.
5311 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
5312 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
5313 calls to add_thread.
5314 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
5315 * server.c (handle_query): Use thread_to_gdb_id.
5316 (handle_v_cont, main): Use gdb_id_to_thread_id.
5317 * server.h (add_thread): Update prototype.
5318 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
5319 prototypes.
5320
5a1f5858
DJ
53212005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
5322
5323 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
5324 left-padded registers.
5325 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
5326 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
5327
e122f1f5
SE
53282005-07-01 Steve Ellcey <sje@cup.hp.com>
5329
5330 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
5331 * configure: Regenerate.
5332 * config.in: Regenerate.
5333 * server.h (NEED_DECLARATION_STRERROR):
5334 Replace with !HAVE_DECL_STRERROR.
5335
d592fa2f
DJ
53362005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
5337
5338 * linux-low.c (linux_wait, linux_send_signal): Don't test
5339 an unsigned long variable for > 0 if it could be MAX_ULONG.
5340 * server.c (myresume): Likewise.
5341 * target.c (set_desired_inferior): Likewise.
5342
ccbd4912
MK
53432005-06-13 Mark Kettenis <kettenis@gnu.org>
5344
5345 * configure.ac: Simplify and improve check for socklen_t.
5346 * configure, config.in: Regenerate.
5347
f450004a
DJ
53482005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
5349
5350 * acconfig.h: Remove.
5351 * configure.ac: Add a test for socklen_t. Use three-argument
5352 AC_DEFINE throughout.
5353 * config.in: Regenerated using autoheader 2.59.
5354 * configure: Regenerated.
5355
5356 * gdbreplay.c (socklen_t): Provide a default.
5357 (remote_open): Use socklen_t.
5358 * remote-utils.c (socklen_t): Provide a default.
5359 (remote_open): Use socklen_t.
5360 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
5361 unsigned char.
5362
5363 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
5364 char for buffers.
5365 * linux-low.c (linux_read_memory, linux_write_memory)
5366 (linux_read_auxv): Likewise.
5367 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
5368 (check_mem_write): Likewise.
5369 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
5370 Likewise.
5371 * regcache.c (struct inferior_rgcache_data, registers_to_string)
5372 (registers_from_string, register_data): Likewise.
5373 * server.c (handle_query, main): Likewise.
5374 * server.h (convert_ascii_to_int, convert_int_to_ascii)
5375 (decode_M_packet): Likewise.
5376 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
5377 * target.h (struct target_ops): Update read_memory, write_memory,
5378 and read_auxv.
5379 (read_inferior_memory, write_inferior_memory): Update.
5380 * linux-low.h (struct linux_target_ops): Change type of breakpoint
5381 to unsigned char *.
5382 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
5383 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
5384 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
5385 linux-s390-low.c, linux-sh-low.c: Update for changes in
5386 read_inferior_memory and the_low_target->breakpoint.
5387
eee84df1
DJ
53882005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
5389
5390 * Makefile.in (SFILES): Add linux-ppc64-low.c.
5391 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
5392 * configure.srv: Add powerpc64-*-linux*.
5393 * linux-ppc64-low.c: New file.
5394
45b134e5
OF
53952005-05-23 Orjan Friberg <orjanf@axis.com>
5396
5397 * linux-cris-low.c: New file with support for CRIS.
5398 * linux-crisv32-low.c: Ditto for CRISv32.
5399 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
5400 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 5401 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
5402 reg-crisv32.o, and reg-crisv32.c to make rules.
5403 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
5404 recognized targets.
5405
48d93c75
UW
54062005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
5407
5408 * linux-low.c (fetch_register): Ensure buffer size is a multiple
5409 of sizeof (PTRACE_XFER_TYPE).
5410 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
5411
e013ee27
OF
54122005-05-12 Orjan Friberg <orjanf@axis.com>
5413
889bf7c5 5414 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
5415 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
5416 pointers for hardware watchpoint support.
5417 * linux-low.h (struct linux_target_ops): Ditto.
5418 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
5419 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
5420 to linux_target_ops.
5421 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
5422 reply packet.
5423 * server.c (main): Recognize 'Z' and 'z' packets.
5424
b0ded00b
UW
54252005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
5426
5427 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
5428 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
5429 (the_low_target): Add new members.
5430
8643e2ad
DJ
54312005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
5432
5433 * proc-service.c (ps_lgetregs): Search all_processes instead of
5434 all_threads.
5435
fc620387
DJ
54362005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
5437
5438 * server.c (start_inferior): Change return type to int.
5439 (attach_inferior): Change sigptr to int *.
5440 (handle_v_cont, handle_v_requests): Change signal to int *.
5441 (main): Change signal to int.
5442
54432005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
5444
5445 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
5446 * configure.srv: Add m32r*-*-linux*.
5447 * linux-m32r-low.c: New file.
5448
e0e76420
DJ
54492005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
5450
5451 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
5452
a1928bad
DJ
54532005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
5454
5455 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
5456 Take unsigned long arguments for PIDs.
5457 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
5458 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
5459 (wait_for_sigstop, linux_resume_one_process)
5460 (regsets_fetch_inferior_registers, linux_send_signal)
5461 (linux_read_auxv): Likewise. Update the types of variables holding
5462 PIDs. Update format string specifiers.
5463 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
5464 * remote-utils.c (prepare_resume_reply): Likewise.
5465 * server.c (cont_thread, general_thread, step_thread)
5466 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
5467 unsigned long.
5468 (handle_query): Update format specifiers.
5469 (handle_v_cont, main): Use strtoul for thread IDs.
5470 * server.h (struct inferior_list_entry): Use unsigned long for ID.
5471 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
5472 (general_thread, step_thread, thread_from_wait)
5473 (old_thread_from_wait): Update.
5474 * target.h (struct thread_resume): Use unsigned long for THREAD.
5475 (struct target_ops): Use unsigned long for arguments to attach and
5476 thread_alive.
5477
dcdb98d2
DJ
54782005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
5479
5480 * acinclude.m4: Include bfd/bfd.m4 directly.
5481 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
5482 <agriffis@toolchain.org>.
5483 * aclocal.m4, configure: Regenerated.
5484
bec39cab
AC
54852005-01-07 Andrew Cagney <cagney@gnu.org>
5486
5487 * configure.ac: Rename configure.in, require autoconf 2.59.
5488 * configure: Re-generate.
5489
434c4c77
DJ
54902004-12-08 Daniel Jacobowitz <dan@debian.org>
5491
5492 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
5493 LIBS when finished.
5494 * aclocal.m4: Regenerated.
5495 * configure: Regenerated.
5496
db1d3e1b
AS
54972004-11-21 Andreas Schwab <schwab@suse.de>
5498
5499 * linux-m68k-low.c (m68k_num_gregs): Define.
5500 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
5501 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
5502 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
5503 (m68k_breakpoint_at): New. Add to the_low_target.
5504
5505 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
5506 srv_linux_thread_db to yes.
5507
43360365
JB
55082004-10-20 Joel Brobecker <brobecker@gnat.com>
5509
5510 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
5511 (ARCH_SET_FS): Likewise.
5512 (ARCH_GET_FS): Likewise.
5513 (ARCH_GET_GS): Likewise.
5514
fd500816
DJ
55152004-10-16 Daniel Jacobowitz <dan@debian.org>
5516
5517 * linux-i386-low.c (ps_get_thread_area): New.
5518 * linux-x86-64-low.c (ps_get_thread_area): New.
5519 * linux-low.c: Include <sys/syscall.h>.
5520 (linux_kill_one_process): Don't kill the first thread here.
5521 (linux_kill): Kill the first thread here.
5522 (kill_lwp): New function.
5523 (send_sigstop, linux_send_signal): Use it.
5524 * proc-service.c: Clean up #ifdefs.
5525 (fpregset_info): Delete.
5526 (ps_lgetregs): Update and enable implementation.
5527 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
5528 implementations.
5529 * remote-utils.c (struct sym_cache, symbol_cache): New.
5530 (input_interrupt): Print a clearer message.
5531 (async_io_enabled): New variable.
5532 (enable_async_io, disable_async_io): Use it. Update comments.
5533 (look_up_one_symbol): Use the symbol cache.
5534 * thread-db.c (thread_db_look_up_symbols): New function.
5535 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
5536
f6de3c42
DJ
55372004-10-16 Daniel Jacobowitz <dan@debian.org>
5538
5539 * configure.in: Test for -rdynamic.
5540 * configure: Regenerated.
5541 * Makefile (INTERNAL_LDFLAGS): New.
5542 (gdbserver, gdbreplay): Use it.
5543
2c0fc042
AC
55442004-09-02 Andrew Cagney <cagney@gnu.org>
5545
5546 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
5547
075b3282
DJ
55482004-03-23 Daniel Jacobowitz <drow@mvista.com>
5549
5550 * linux-low.c (linux_wait): Clear all_processes list also.
5551
fa6a77dc
DJ
55522004-03-12 Daniel Jacobowitz <drow@mvista.com>
5553
5554 * linux-low.c: Include <errno.h>. Remove extern declaration of
5555 errno.
5556
6d782a97
DJ
55572004-03-12 Daniel Jacobowitz <drow@mvista.com>
5558
5559 * gdbreplay.c, server.h, utils.c: Update copyright years.
5560
3a7fb99b
DJ
55612004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
5562
5563 * server.c (main): Print child status or termination signal from
5564 variable 'signal', not 'sig'.
5565
c3e735a6
DJ
55662004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
5567
5568 * linux-low.c (linux_read_memory): Change return type to
5569 int. Check for and return error from ptrace().
5570 * target.c (read_inferior_memory): Change return type to int. Pass
5571 back return status from the_target->read_memory().
5572 * target.h (struct target_ops): Adapt *read_memory() prototype.
5573 Update comment.
5574 (read_inferior_memory): Adapt prototype.
5575 * server.c (main): Return an error packet if
5576 read_inferior_memory() returns an error.
5577
a59d1c82
DJ
55782004-03-04 Daniel Jacobowitz <drow@mvista.com>
5579
5580 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
5581 Unify with other clean targets.
5582
dc3f8883
DJ
55832004-02-29 Daniel Jacobowitz <drow@mvista.com>
5584
5585 * server.c (handle_v_cont): Call set_desired_inferior.
5586
89a208da
DJ
55872004-02-29 Daniel Jacobowitz <drow@mvista.com>
5588
5589 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
5590
62ea82f5
DJ
55912004-02-29 Daniel Jacobowitz <drow@mvista.com>
5592
5593 * linux-low.c (linux_wait): Unblock async I/O.
5594 (linux_resume): Block and enable async I/O.
5595 * remote-utils.c (block_async_io, unblock_async_io): New functions.
5596 * server.h (block_async_io, unblock_async_io): Add prototypes.
5597
6910d122
DJ
55982004-02-29 Daniel Jacobowitz <drow@mvista.com>
5599
5600 * remote-utils.c (remote_open): Print a status notice after
5601 opening a TCP port.
5602 * server.c (attach_inferior): Print a status notice after
5603 attaching.
5604
56052004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
5606
5607 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
5608
c89dc5d4
DJ
56092004-02-26 Daniel Jacobowitz <drow@mvista.com>
5610
5611 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
5612 error packet.
5613 * server.c, target.h: Update copyright years.
5614
4b8dad4a
RM
56152004-02-25 Roland McGrath <roland@redhat.com>
5616
5617 * target.h (struct target_ops): New member `read_auxv'.
5618 * server.c (handle_query): Handle qPart:auxv:read: query using that.
5619 * linux-low.c (linux_read_auxv): New function.
5620 (linux_target_ops): Initialize `read_auxv' member to that.
5621
d7446758
JB
56222004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5623
5624 Committed by Jim Blandy <jimb@redhat.com>.
5625
5626 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 5627 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
5628 instead of GPR_SIZE to distiguish s390 and s390x targets.
5629
5544ad89
DJ
56302004-01-31 Daniel Jacobowitz <drow@mvista.com>
5631
5632 * linux-low.c: Update copyright year.
5633 (check_removed_breakpoint): Clear pending_is_breakpoint.
5634 (linux_set_resume_request, linux_queue_one_thread)
5635 (resume_status_pending_p): New functions.
5636 (linux_continue_one_thread): Use process->resume.
5637 (linux_resume): Only resume threads if there are no pending events.
5638 * linux-low.h (struct process_info): Add resume request
5639 pointer.
5640
2a68b70e
DJ
56412004-01-30 Daniel Jacobowitz <drow@mvista.com>
5642
5643 * regcache.c (new_register_cache): Clear the allocated register
5644 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
5645
64386c31
DJ
56462003-10-13 Daniel Jacobowitz <drow@mvista.com>
5647
5648 * linux-low.c (linux_resume): Take a struct thread_resume *
5649 argument.
5650 (linux_wait): Update call.
5651 (resume_ptr): New static variable.
5652 (linux_continue_one_thread): Renamed from
5653 linux_continue_one_process. Use resume_ptr.
5654 (linux_resume): Use linux_continue_one_thread.
5655 * server.c (handle_v_cont, handle_v_requests): New functions.
5656 (myresume): New function.
5657 (main): Handle 'v' case.
5658 * target.h (struct thread_resume): New type.
5659 (struct target_ops): Change argument of "resume" to struct
5660 thread_resume *.
5661 (myresume): Delete macro.
5662
c938e9b0
L
56632003-08-08 H.J. Lu <hongjiu.lu@intel.com>
5664
5665 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
5666 (uninstall): Support DESTDIR.
5667
7f313d07
BC
5668Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
5669
5670 * configure.srv: Add xscale*linux copy of arm*linux entry.
5671
3b2fc2ea
DJ
56722003-07-24 Daniel Jacobowitz <drow@mvista.com>
5673
5674 * linux-arm-low.c (arm_reinsert_addr): New function.
5675 (the_low_target): Add arm_reinsert_addr.
5676
1c0a559e
MK
56772003-07-08 Mark Kettenis <kettenis@gnu.org>
5678
5679 * mem-break.c: Remove whitespace at end of file.
5680
43d5792c
DJ
56812003-06-28 Daniel Jacobowitz <drow@mvista.com>
5682
5683 * configure.in: Check whether we need to prototype strerror.
5684 * server.h: Optionally prototype strerror.
5685 * gdbreplay.c (perror_with_name): Use strerror.
5686 * linux-low.c (linux_attach_lwp): Use strerror.
5687 * utils.c (perror_with_name): Use strerror.
5688 * config.in, configure: Regenerated.
5689
c8a86edf
DJ
56902003-06-28 Daniel Jacobowitz <drow@mvista.com>
5691
5692 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
5693 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
5694
73d37363
DJ
56952003-06-20 Daniel Jacobowitz <drow@mvista.com>
5696
5697 * Makefile.in (SFILES): Update.
5698 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
5699 low-sun3.c: Remove files.
5700
6ad8ae5c
DJ
57012003-06-17 Daniel Jacobowitz <drow@mvista.com>
5702
5703 * linux-low.c: Move comment to linux_thread_alive where it belonged.
5704 (linux_detach_one_process, linux_detach): New functions.
5705 (linux_target_ops): Add linux_detach.
5706 * server.c (main): Handle 'D' packet.
5707 * target.h (struct target_ops): Add "detach" member.
5708 (detach_inferior): Define.
5709
1581182a
MK
57102003-06-13 Mark Kettenis <kettenis@gnu.org>
5711
5712 From Kelley Cook <kelleycook@wideopenwest.com>:
5713 * configure.srv: Accept i[34567]86 variants.
5714
e5379b03
DJ
57152003-06-05 Daniel Jacobowitz <drow@mvista.com>
5716
5717 * linux-low.c (linux_wait_for_event): Correct comment typos.
5718 (linux_resume_one_process): Call check_removed_breakpoint.
5719 (linux_send_signal): New function.
5720 (linux_target_ops): Add linux_send_signal.
5721 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
5722 of kill.
5723 * target.h (struct target_ops): Add send_signal.
5724
2ff29de4
JB
57252003-05-29 Jim Blandy <jimb@redhat.com>
5726
5727 * linux-low.c (usr_store_inferior_registers): Transfer buf in
5728 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
5729 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
5730 away part of the register's value.
5731
254787d4
DJ
57322003-03-26 Daniel Jacobowitz <drow@mvista.com>
5733
5734 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
5735 (linux_wait_for_event, linux_init_signals): Likewise.
5736
94e10508
DJ
57372003-03-17 Daniel Jacobowitz <drow@mvista.com>
5738
5739 * configure.in: Check for stdlib.h.
5740 * configure: Regenerated.
5741 * config.in: Regenerated.
5742
4c0711e0
DJ
57432003-01-04 Andreas Schwab <schwab@suse.de>
5744
5745 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
5746
ef66e766
AC
57472003-01-02 Andrew Cagney <ac131313@redhat.com>
5748
5749 * Makefile.in: Remove obsolete code.
5750
a1358604
DJ
57512002-11-20 Daniel Jacobowitz <drow@mvista.com>
5752
5753 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
5754 defined(PT_FPR0_HI).
5755
23ce3b1c
DJ
57562002-11-17 Stuart Hughes <seh@zee2.com>
5757
5758 * linux-arm-low.c (arm_num_regs): Increase.
5759 (arm_regmap): Include status register.
5760
57612002-11-17 Daniel Jacobowitz <drow@mvista.com>
5762
5763 * linux-low.c (register_addr): Remove incorrect -1 check.
5764
a9fa9f7d
DJ
57652002-08-29 Daniel Jacobowitz <drow@mvista.com>
5766
5767 * linux-low.c (linux_create_inferior): Call setpgid. Return
5768 the new PID.
5769 (unstopped_p, linux_signal_pid): Remove.
5770 (linux_target_ops): Remove linux_signal_pid.
5771 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
5772 global instead of target method.
5773 * target.h (struct target_ops): Remove signal_pid. Update comment
5774 for create_inferior.
5775 * server.c (signal_pid): New variable.
5776 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 5777 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
5778 (attach_inferior): Set signal_pid.
5779
17574093
DJ
57802002-08-23 Daniel Jacobowitz <drow@mvista.com>
5781
5782 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
5783
57842002-08-20 Jim Blandy <jimb@redhat.com>
5785
5786 * Makefile.in (LDFLAGS): Allow the configure script to establish a
5787 default for this.
5788
57892002-08-01 Andrew Cagney <cagney@redhat.com>
5790
5791 * Makefile.in: Make chill references obsolete.
5792
57932002-07-24 Kevin Buettner <kevinb@redhat.com>
5794
5795 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
5796 * configure: Regenerate.
5797 * config.in: Regenerate.
5798
57992002-07-09 David O'Brien <obrien@FreeBSD.org>
5800
5801 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
5802 (perror_with_name, remote_close, remote_open, expect, play): Static.
5803
58042002-07-04 Michal Ludvig <mludvig@suse.cz>
5805
4b8dad4a 5806 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
5807 byte offsets instead of an array of indexes.
5808 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
5809
58102002-06-13 Daniel Jacobowitz <drow@mvista.com>
5811
5812 * regcache.c: Add comment.
5813
58142002-06-11 Daniel Jacobowitz <drow@mvista.com>
5815
5816 * thread-db.c: New file.
5817 * proc-service.c: New file.
5818 * acinclude.m4: New file.
5819 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
5820 proc-service.o, and thread-db.o.
5821 (linux-low.o): Add USE_THREAD_DB.
5822 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
5823 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
5824 * aclocal.m4: Regenerated.
5825 * config.in: Regenerated.
5826 * configure: Regenerated.
5827 * configure.in: Check for proc_service.h, sys/procfs.h,
5828 thread_db.h, and linux/elf.h headrs.
5829 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
5830 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
5831 Check for -lthread_db and thread support.
5832 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
5833 PowerPC, and SuperH.
5834 * i387-fp.c: Constify arguments.
5835 * i387-fp.h: Likewise.
5836 * inferiors.c: (struct thread_info): Renamed from
5837 `struct inferior_info'. Remove PID member. Use generic inferior
5838 list header. All uses updated.
5839 (inferiors, signal_pid): Removed.
5840 (all_threads): New variable.
5841 (get_thread): Define.
5842 (add_inferior_to_list): New function.
5843 (for_each_inferior): New function.
5844 (change_inferior_id): New function.
5845 (add_inferior): Removed.
5846 (remove_inferior): New function.
5847 (add_thread): New function.
5848 (free_one_thread): New function.
5849 (remove_thread): New function.
5850 (clear_inferiors): Use for_each_inferior and free_one_thread.
5851 (find_inferior): New function.
5852 (find_inferior_id): New function.
5853 (inferior_target_data): Update argument type.
5854 (set_inferior_target_data): Likewise.
5855 (inferior_regcache_data): Likewise.
5856 (set_inferior_regcache_data): Likewise.
5857 * linux-low.c (linux_bp_reinsert): Remove.
5858 (all_processes, stopping_threads, using_thrads)
5859 (struct pending_signals, debug_threads, pid_of): New.
5860 (inferior_pid): Replace with macro.
5861 (struct inferior_linux_data): Remove.
5862 (get_stop_pc, add_process): New functions.
5863 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
5864 Use add_process and add_thread.
5865 (linux_attach_lwp): New function, based on old linux_attach. Use
5866 add_process and add_thread. Set stop_expected for new threads.
5867 (linux_attach): New function.
5868 (linux_kill_one_process): New function.
5869 (linux_kill): Kill all LWPs.
5870 (linux_thread_alive): Use find_inferior_id.
5871 (check_removed_breakpoints, status_pending_p): New functions.
5872 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
5873 Update. Use WNOHANG. Wait for cloned processes also. Update process
5874 struct for the found process.
5875 (linux_wait_for_event): New function.
5876 (linux_wait): Use it. Support LWPs.
5877 (send_sigstop, wait_for_sigstop, stop_all_processes)
5878 (linux_resume_one_process, linux_continue_one_process): New functions.
5879 (linux_resume): Support LWPs.
5880 (REGISTER_RAW_SIZE): Remove.
5881 (fetch_register): Use register_size instead. Call supply_register.
5882 (usr_store_inferior_registers): Likewise. Call collect_register.
5883 Fix recursive case.
5884 (regsets_fetch_inferior_registers): Improve error message.
5885 (regsets_store_inferior_registers): Add debugging.
5886 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
5887 (unstopped_p, linux_signal_pid): New functions.
5888 (linux_target_ops): Add linux_signal_pid.
5889 (linux_init_signals): New function.
5890 (initialize_low): Call it. Initialize using_threads.
5891 * regcache.c (inferior_regcache_data): Add valid
5892 flag.
5893 (get_regcache): Fetch registers lazily. Add fetch argument
5894 and update all callers.
5895 (regcache_invalidate_one, regcache_invalidate): New
5896 functions.
5897 (new_register_cache): Renamed from create_register_cache.
5898 Return the new regcache.
5899 (free_register_cache): Change argument to a void *.
5900 (registers_to_string, registers_from_string): Call get_regcache
5901 with fetch flag set.
5902 (register_data): Make static. Pass fetch flag to get_regcache.
5903 (supply_register): Call get_regcache with fetch flag clear.
5904 (collect_register): Call get_regcache with fetch flag set.
5905 (collect_register_as_string): New function.
5906 * regcache.h: Update.
5907 * remote-utils.c (putpkt): Flush after debug output and use
5908 stderr.
5909 Handle input interrupts while waiting for an ACK.
5910 (input_interrupt): Use signal_pid method.
5911 (getpkt): Flush after debug output and use stderr.
5912 (outreg): Use collect_register_as_string.
5913 (new_thread_notify, dead_thread_notify): New functions.
5914 (prepare_resume_reply): Check using_threads. Set thread_from_wait
5915 and general_thread.
5916 (look_up_one_symbol): Flush after debug output.
5917 * server.c (step_thread, server_waiting): New variables.
5918 (start_inferior): Don't use signal_pid. Update call to mywait.
5919 (attach_inferior): Update call to mywait.
5920 (handle_query): Handle qfThreadInfo and qsThreadInfo.
5921 (main): Don't fetch/store registers explicitly. Use
5922 set_desired_inferior. Support proposed ``Hs'' packet. Update
5923 calls to mywait.
5924 * server.h: Update.
5925 (struct inferior_list, struct_inferior_list_entry): New.
5926 * target.c (set_desired_inferior): New.
5927 (write_inferior_memory): Constify.
5928 (mywait): New function.
5929 * target.h: Update.
5930 (struct target_ops): New signal_pid method.
5931 (mywait): Removed macro, added prototype.
5932
5933 * linux-low.h (regset_func): Removed.
5934 (regset_fill_func, regset_store_func): New.
5935 (enum regset_type): New.
5936 (struct regset_info): Add type field. Use new operation types.
5937 (struct linux_target_ops): stop_pc renamed to get_pc.
5938 Add decr_pc_after_break and breakpoint_at.
5939 (get_process, get_thread_proess, get_process_thread)
5940 (strut process_info, all_processes, linux_attach_lwp)
5941 (thread_db_init): New.
5942
5943 * linux-arm-low.c (arm_get_pc, arm_set_pc,
5944 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
5945 (the_low_target): Add new members.
5946 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
5947 (i386_store_fpxregset): Constify.
5948 (target_regsets): Add new kind identifier.
5949 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
5950 (i386_set_pc): Add debugging.
5951 (i386_breakpoint_at): New function.
5952 (the_low_target): Add new members.
5953 * linux-mips-low.c (mips_get_pc, mips_set_pc)
5954 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
5955 (mips_breakpoint_at): New.
5956 (the_low_target): Add new members.
5957 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
5958 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
5959 (the_low_target): Add new members.
5960 * linux-sh-low.c (sh_get_pc, sh_set_pc)
5961 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
5962 (the_low_target): Add new members.
5963 * linux-x86-64-low.c (target_regsets): Add new kind
5964 identifier.
5965
59662002-05-15 Daniel Jacobowitz <drow@mvista.com>
5967
5968 From Martin Pool <mbp@samba.org>:
5969 * server.c (gdbserver_usage): New function.
5970 (main): Call it.
5971
59722002-05-14 Daniel Jacobowitz <drow@mvista.com>
5973
5974 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
5975 stop_at -> stop_pc.
5976
59772002-05-04 Andrew Cagney <ac131313@redhat.com>
5978
5979 * Makefile.in: Remove obsolete code.
5980
59812002-04-24 Michal Ludvig <mludvig@suse.cz>
5982
5983 * linux-low.c (regsets_fetch_inferior_registers),
5984 (regsets_store_inferior_registers): Removed cast to int from
5985 ptrace() calls.
5986 * regcache.h: Added declaration of struct inferior_info.
5987
59882002-04-20 Daniel Jacobowitz <drow@mvista.com>
5989
5990 * inferiors.c (struct inferior_info): Add regcache_data.
5991 (add_inferior): Call create_register_cache.
5992 (clear_inferiors): Call free_register_cache.
5993 (inferior_regcache_data, set_inferior_regcache_data): New functions.
5994 * regcache.c (struct inferior_regcache_data): New.
5995 (registers): Remove.
5996 (get_regcache): New function.
5997 (create_register_cache, free_register_cache): New functions.
5998 (set_register_cache): Don't initialize the register cache here.
5999 (registers_to_string, registers_from_string, register_data): Call
6000 get_regcache.
6001 * regcache.h: Add prototypes.
6002 * server.h: Likewise.
6003
60042002-04-20 Daniel Jacobowitz <drow@mvista.com>
6005
6006 * mem-break.c: New file.
6007 * mem-break.h: New file.
6008 * Makefile.in: Add mem-break.o rule; update server.h
6009 dependencies.
6010 * inferiors.c (struct inferior_info): Add target_data
6011 member.
6012 (clear_inferiors): Free target_data member if set.
6013 (inferior_target_data, set_inferior_target_data): New functions.
6014 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
6015 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
6016 * linux-low.c (linux_bp_reinsert): New variable.
6017 (struct inferior_linux_data): New.
6018 (linux_create_inferior): Use set_inferior_target_data.
6019 (linux_attach): Likewise. Call add_inferior.
6020 (linux_wait_for_one_inferior): New function.
6021 (linux_wait): Call it.
6022 (linux_write_memory): Add const.
6023 (initialize_low): Call set_breakpoint_data.
6024 * linux-low.h (struct linux_target_ops): Add breakpoint
6025 handling members.
6026 * server.c (attach_inferior): Remove extra add_inferior
6027 call.
6028 * server.h: Include mem-break.h. Update inferior.c
6029 prototypes.
6030 * target.c (read_inferior_memory)
6031 (write_inferior_memory): New functions.
6032 * target.h (read_inferior_memory)
6033 (write_inferior_memory): Change macros to prototypes.
6034 (struct target_ops): Update comments. Add const to write_memory
6035 definition.
6036
60372002-04-11 Daniel Jacobowitz <drow@mvista.com>
6038
6039 * linux-low.c (usr_store_inferior_registers): Support
6040 registers which are allowed to fail to store.
6041 * linux-low.h (linux_target_ops): Likewise.
6042 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
6043 (ppc_cannot_store_register): FPSCR may not be storable.
6044
60452002-04-09 Daniel Jacobowitz <drow@mvista.com>
6046
6047 * server.h: Include <string.h> if HAVE_STRING_H.
6048 * ChangeLog: Correct paths in last ChangeLog entry.
6049
60502002-04-09 Daniel Jacobowitz <drow@mvista.com>
6051
6052 * linux-low.h: Remove obsolete prototypes.
6053 (struct linux_target_ops): New.
6054 (extern the_low_target): New.
6055 * linux-low.c (num_regs, regmap): Remove declarations.
6056 (register_addr): Use the_low_target explicitly.
6057 (fetch_register): Likewise.
6058 (usr_fetch_inferior_registers): Likewise.
6059 (usr_store_inferior_registers): Likewise.
6060 * linux-arm-low.c (num_regs): Remove.
6061 (arm_num_regs): Define.
6062 (arm_regmap): Renamed from regmap, made static.
6063 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
6064 made static.
6065 (arm_cannot_store_register): Renamed from cannot_store_register,
6066 made static.
6067 (the_low_target): New.
6068 * linux-i386-low.c (num_regs): Remove.
6069 (i386_num_regs): Define.
6070 (i386_regmap): Renamed from regmap, made static.
6071 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
6072 made static.
6073 (i386_cannot_store_register): Renamed from cannot_store_register,
6074 made static.
6075 (the_low_target): New.
6076 * linux-ia64-low.c (num_regs): Remove.
6077 (ia64_num_regs): Define.
6078 (ia64_regmap): Renamed from regmap, made static.
6079 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
6080 made static.
6081 (ia64_cannot_store_register): Renamed from cannot_store_register,
6082 made static.
6083 (the_low_target): New.
6084 * linux-m68k-low.c (num_regs): Remove.
6085 (m68k_num_regs): Define.
6086 (m68k_regmap): Renamed from regmap, made static.
6087 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
6088 made static.
6089 (m68k_cannot_store_register): Renamed from cannot_store_register,
6090 made static.
6091 (the_low_target): New.
6092 * linux-mips-low.c (num_regs): Remove.
6093 (mips_num_regs): Define.
6094 (mips_regmap): Renamed from regmap, made static.
6095 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
6096 made static.
6097 (mips_cannot_store_register): Renamed from cannot_store_register,
6098 made static.
6099 (the_low_target): New.
6100 * linux-ppc-low.c (num_regs): Remove.
6101 (ppc_num_regs): Define.
6102 (ppc_regmap): Renamed from regmap, made static.
6103 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
6104 made static.
6105 (ppc_cannot_store_register): Renamed from cannot_store_register,
6106 made static.
6107 (the_low_target): New.
6108 * linux-s390-low.c (num_regs): Remove.
6109 (s390_num_regs): Define.
6110 (s390_regmap): Renamed from regmap, made static.
6111 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
6112 made static.
6113 (s390_cannot_store_register): Renamed from cannot_store_register,
6114 made static.
6115 (the_low_target): New.
6116 * linux-sh-low.c (num_regs): Remove.
6117 (sh_num_regs): Define.
6118 (sh_regmap): Renamed from regmap, made static.
6119 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
6120 made static.
6121 (sh_cannot_store_register): Renamed from cannot_store_register,
6122 made static.
6123 (the_low_target): New.
6124 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
6125 (the_low_target): New.
6126
61272002-04-09 Daniel Jacobowitz <drow@mvista.com>
6128
6129 * Makefile.in: Add stamp-h target.
6130 * configure.in: Create stamp-h.
6131 * configure: Regenerated.
6132
61332002-04-09 Daniel Jacobowitz <drow@mvista.com>
6134
6135 * inferiors.c: New file.
6136 * target.c: New file.
6137 * target.h: New file.
6138 * Makefile.in: Add target.o and inferiors.o. Update
6139 dependencies.
6140 * linux-low.c (inferior_pid): New static variable,
6141 moved from server.c.
6142 (linux_create_inferior): Renamed from create_inferior.
6143 Call add_inferior. Return 0 on success instead of a PID.
6144 (linux_attach): Renamed from myattach.
6145 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
6146 (linux_thread_alive): Renamed from mythread_alive.
6147 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
6148 child dies.
6149 (linux_resume): Renamed from myresume. Add missing ``return 0''.
6150 (regsets_store_inferior_registers): Correct error message.
6151 Add missing ``return 0''.
6152 (linux_fetch_registers): Renamed from fetch_inferior_registers.
6153 (linux_store_registers): Renamed from store_inferior_registers.
6154 (linux_read_memory): Renamed from read_inferior_memory.
6155 (linux_write_memory): Renamed from write_inferior_memory.
6156 (linux_target_ops): New structure.
6157 (initialize_low): Call set_target_ops ().
6158 * remote-utils.c (unhexify): New function.
6159 (hexify): New function.
6160 (input_interrupt): Send signals to ``signal_pid''.
6161 * server.c (inferior_pid): Remove.
6162 (start_inferior): Update create_inferior call.
6163 (attach_inferior): Call add_inferior.
6164 (handle_query): New function.
6165 (main): Call handle_query for `q' packets.
6166 * server.h: Include "target.h". Remove obsolete prototypes.
6167 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
6168
61692002-04-09 Daniel Jacobowitz <drow@mvista.com>
6170
6171 * Makefile.in: Add WARN_CFLAGS. Update configury
6172 dependencies.
6173 * configure.in: Check for <string.h>
6174 * configure: Regenerate.
6175 * config.in: Regenerate.
6176 * gdbreplay.c: Include needed system headers.
6177 (remote_open): Remove strchr prototype.
6178 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
6179 * regcache.c (supply_register): Change buf argument to const void *.
6180 (supply_register_by_name): Likewise.
6181 (collect_register): Change buf argument to void *.
6182 (collect_register_by_name): Likewise.
6183 * regcache.h: Add missing prototypes.
6184 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
6185 * server.c (handle_query): New function.
6186 (attached): New static variable, moved out of main.
6187 (main): Quiet longjmp clobber warnings.
6188 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
6189 * utils.c (error): Remove NORETURN.
6190 (fatal): Likewise.
This page took 1.269201 seconds and 4 git commands to generate.