]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
2012-02-27 Pedro Alves <palves@redhat.com>
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
c14d7ab2
PA
12012-02-27 Pedro Alves <palves@redhat.com>
2
3 PR server/9684
4 * linux-low.c (pid_is_stopped): New.
5 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
6
412c89dd
LM
72012-02-25 Luis Machado <lgustavo@codesourcery.com>
8
9 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10 of conditions.
11
b745defe
MR
122012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
13
14 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
15
9f3a5c85
LM
162012-02-24 Luis Machado <lgustavo@codesourcery>
17
18 * server.c (handle_query): Advertise support for target-side
19 breakpoint condition evaluation.
20 (process_point_options): New function.
21 (process_serial_event): When inserting a breakpoint, check for
22 a target-side condition that should be evaluated.
23
24 * mem-break.c: Include regcache.h and ax.h.
25 (point_cond_list_t): New data structure.
26 (breakpoint) <cond_list>: New field.
27 (find_gdb_breakpoint_at): Make non-static.
28 (delete_gdb_breakpoint_at): Clear any target-side
29 conditions.
30 (clear_gdb_breakpoint_conditions): New function.
31 (add_condition_to_breakpoint): Likewise.
32 (add_breakpoint_condition): Likewise.
33 (gdb_condition_true_at_breakpoint): Likewise.
34 (gdb_breakpoint_here): Return result directly instead
35 of going through a local variable.
36
37 * mem-break.h (find_gdb_breakpoint_at): New prototype.
38 (clear_gdb_breakpoint_conditions): Likewise.
39 (add_breakpoint_condition): Likewise.
40 (gdb_condition_true_at_breakpoint): Likewise.
41
42 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
43 (need_step_over_p): Take target-side breakpoint condition into
44 consideration.
45
5e1dc496
LM
462012-02-24 Luis Machado <lgustavo@codesourcery>
47
48 * server.h: Include tracepoint.h.
49 (agent_mem_read, agent_get_trace_state_variable_value,
50 agent_set_trace_state_variable_value,
51 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
52 get_set_tsv_func_addr): New prototypes.
53
54 * ax.h: New include file.
55 * ax.c: New source file.
56
57 * tracepoint.c: Include ax.h.
58 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
59 agent_expr, eval_result_type): Move to ax.h.
60 (parse_agent_expr): Rename to ...
61 (gdb_parse_agent_expr): ... this, make it non-static and move
62 to ax.h.
63 (unparse_agent_expr) Rename to ...
64 (gdb_unparse_agent_expr): ... this, make it non-static and move
65 to ax.h.
66 (eval_agent_expr): Rename to ...
67 (eval_tracepoint_agent_expr): ... this.
68 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
69 forward declarations.
70 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
71 (agent_get_trace_state_variable_value): New function.
72 (agent_set_trace_state_variable_value): New function.
73 (cmd_qtdp): Call gdb_parse_agent_expr (...).
74 (response_tracepoint): Call gdb_unparse_agent_expr (...).
75 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
76 (condition_true_at_tracepoint): Likewise.
77 (parse_agent_expr): Rename to ...
78 (gdb_parse_agent_expr): ... this and move to ax.c.
79 (unparse_agent_expr): Rename to ...
80 (gdb_unparse_agent_expr): ... this and move to ax.c.
81 (gdb_agent_op_name): Move to ax.c.
82 (eval_agent_expr): Rename to ...
83 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
84 and move to ax.c.
85 (eval_tracepoint_agent_expr): New function.
86 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
87 non-static.
88 (current_insn_ptr, emit_error, struct bytecode_address): Move to
89 ax.c.
90 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
91 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
92 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
93 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
94 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
95 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
96 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
97 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
98 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
99 (compile_bytecodes): Remove forward declaration.
100 (is_goto_target): Move to ax.c.
101 (compile_bytecodes): Move to ax.c and call
102 agent_get_trace_state_variable_value (...) and
103 agent_set_trace_state_variable_value (...).
104
105 * Makefile.in: Update ax.c and IPA dependencies.
106
277e4e52
PA
1072012-02-24 Pedro Alves <palves@redhat.com>
108
109 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
110 (cmd_bigqtbuffer_circular): ... this. Only handle
111 'QTBuffer:circular:'.
112 (handle_tracepoint_general_set): Adjust.
113
bf4c19f7
YQ
1142012-02-16 Yao Qi <yao@codesourcery.com>
115
116 * inferiors.c: Move code to ...
117 * dll.c: .... here. New.
118 * server.h: Declare clear_dlls.
119 * Makefile.in (SFILES): Add dll.c.
120 (OBS): Add dll.o
121 (dll.o): New rule.
122
d73f2619
YQ
1232012-02-11 Yao Qi <yao@codesourcery.com>
124
125 * server.c: (handle_monitor_command): Add a new parameter
126 `own_buf'.
127 (handle_query): Update caller.
128
f8255c2a
JB
1292012-02-09 Joel Brobecker <brobecker@adacore.com>
130
131 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
132 * configure, config.in: Regenerate.
133 * hostio.c: Provide an alternate implementation if HAVE_READLINK
134 is not defined.
135
da84f473
PA
1362012-02-02 Pedro Alves <palves@redhat.com>
137
138 Try SIGKILL first, then PTRACE_KILL.
139 * linux-low.c (linux_kill_one_lwp): New.
140 (linux_kill_one_lwp): Rename to ...
141 (kill_one_lwp_callback): ... this. Use the new
142 linux_kill_one_lwp.
143
e886a173
PA
1442012-02-02 Pedro Alves <palves@redhat.com>
145
146 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
147 inferior.
148
be07f1a2
PA
1492012-01-27 Pedro Alves <palves@redhat.com>
150
151 * linux-low.c (linux_child_pid_to_exec_file): Delete.
152 (elf_64_file_p): Make static.
153 (linux_pid_exe_is_elf_64_file): New.
154 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
155 Delete declarations.
156 (linux_pid_exe_is_elf_64_file): Declare.
157 * linux-x86-low.c (x86_arch_setup): Use
158 linux_pid_exe_is_elf_64_file.
159
d8301ad1
JK
1602012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
161
162 * linux-low.c (linux_wait_for_event_1): Rename to ...
163 (linux_wait_for_event): ... here and merge it with former
164 linux_wait_for_event - new variable wait_ptid, use it.
165 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
166
01b17894
PA
1672012-01-23 Pedro Alves <palves@redhat.com>
168
169 * server.c (main): Avoid yet another case of infinite loop while
170 detaching/killing after a longjmp.
171
e825046f
JK
1722012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
173
174 Code cleanup.
175 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
176
b9e7b9c3
UW
1772012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
178
179 * hostio.c (handle_readlink): New function.
180 (handle_vFile): Call it to handle "vFile:readlink" packets.
181
901f9912
UW
1822012-01-20 Pedro Alves <palves@redhat.com>
183 Ulrich Weigand <ulrich.weigand@linaro.org>
184
185 * server.c (handle_v_requests): Only support vAttach and vRun to
186 start multiple processes when in extended protocol mode.
187
fc1ab1a0
PA
1882012-01-17 Pedro Alves <palves@redhat.com>
189
190 * tracepoint.c (initialize_tracepoint): Use mmap instead of
191 memalign plus mprotect to allocate the scratch buffer.
192
7d5d4e98
PA
1932012-01-13 Pedro Alves <palves@redhat.com>
194
195 * server.c (attach_inferior): Clear `cont_thread'.
196
f128d5e9
PA
1972012-01-13 Pedro Alves <palves@redhat.com>
198
199 * server.c (main): Avoid infinite loop while detaching/killing
200 after a longjmp.
201
06db92f0
DE
2022012-01-09 Doug Evans <dje@google.com>
203
204 * server.c (start_inferior): Set last_ptid in --wrapper case.
205
32d92999
YQ
2062012-01-06 Yao Qi <yao@codesourcery.com>
207
208 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
209 defined.
210 [IN_PROCESS_AGENT] (debug_agent): New global variable.
211
5e0a92a9
YQ
2122012-01-04 Yao Qi <yao@codesourcery.com>
213
214 * tracepoint.c (cmd_qtdp): Print debug message
215 for static tracepoint.
216
ae639e8c
YQ
2172012-01-04 Yao Qi <yao@codesourcery.com>
218
219 * tracepoint.c (trace_vdebug): Differentiate debug message
220 between gdbserver and IPA.
221
f72429c5
YQ
2222012-01-03 Yao Qi <yao@codesourcery.com>
223
224 * tracepoint.c (tracepoint_was_hit): Don't collect for
225 static tracepoint.
226
12c3e59c
JB
2272012-01-02 Joel Brobecker <brobecker@adacore.com>
228
229 * terminal.h: Reformat copyright header.
230
67827812
JB
2312012-01-02 Joel Brobecker <brobecker@adacore.com>
232
233 * server.c (gdbserver_version): Update copyright year.
234 * gdbreplay.c (gdbreplay_version): Likewise.
235
3e52c33d
JK
2362011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
237
238 * linux-low.c (linux_create_inferior): Put empty if clause for write.
239
240 Revert:
241 2011-12-18 Hui Zhu <teawater@gmail.com>
242 * linux-low.c (linux_create_inferior): Save return value to ret.
243
66f1260e
HZ
2442011-12-18 Hui Zhu <teawater@gmail.com>
245
246 * linux-low.c (linux_create_inferior): Save return value to ret.
247
e77616d7
DE
2482011-12-16 Doug Evans <dje@google.com>
249
e7b06c57
DE
250 * linux-low.c (linux_create_inferior): If stdio connection,
251 redirect stdin from /dev/null, stdout to stderr.
252 * remote-utils.c (remote_is_stdio): New static global.
253 (remote_connection_is_stdio): New function.
254 (remote_prepare): Handle stdio connection.
255 (remote_open): Ditto.
256 (remote_close): Don't close stdin for stdio connections.
257 (read_prim,write_prim): New functions. Replace all calls to
258 read/write to these.
259 * server.c (main): Watch for "-" argument. Move call to
260 remote_prepare before start_inferior.
261 * server.h (STDIO_CONNECTION_NAME): New macro.
262 (remote_connection_is_stdio): Declare.
263
e77616d7
DE
264 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
265 in debugging output.
266
82067193
YQ
2672011-12-15 Yao Qi <yao@codesourcery.com>
268
269 * tracepoint.c: Include sys/syscall.h.
270 (gdb_ust_thread): Remove preprocessor conditional.
271
82bfbe7e
PA
2722011-12-14 Pedro Alves <pedro@codesourcery.com>
273
274 * linux-low.c (linux_detach_one_lwp): Call
275 the_low_target.prepare_to_resume before detaching.
276
712c6575
YQ
2772011-12-14 Yao Qi <yao@codesourcery.com>
278
279 * tracepoint.c (gdb_ust_thread): Don't ignore return value
280 of write.
281
d54d1edf
YQ
2822011-12-14 Yao Qi <yao@codesourcery.com>
283
284 * i386-low.c (i386_low_stopped_data_address): Initialize local
285 variable `control'.
286
6210a125
PA
2872011-12-13 Pedro Alves <pedro@codesourcery.com>
288
289 PR remote/13492
290
291 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
292 DR_CONTROL unless necessary. Extend comments.
293 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
294 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
295
2ece8244
YQ
2962011-12-13 Yao Qi <yao@codesourcery.com>
297
298 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
299 macros.
300 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
301
784867a5
JK
3022011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
303
304 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
305 Print new debug message for such case.
306
6bf36717
JK
3072011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
308
309 Fix overlapping memcpy.
310 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
311 the read_inferior_memory transfer.
312 (delete_fast_tracepoint_jump): New variable buf. Use it for the
313 write_inferior_memory transfer.
314 (set_fast_tracepoint_jump): New variable buf. Use it for the
315 read_inferior_memory and write_inferior_memory transfers.
316 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
317 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
318 Use it for the write_inferior_memory transfer.
319 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
320 buffers.
321
50275556
MR
3222011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
323
324 * linux-low.c (fetch_register, store_register): Make code
325 consistent, fix formatting.
326
7325beb4
MR
3272011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
328
329 * linux-low.c (usr_store_inferior_registers): Factor out code
330 to handle individual registers into...
331 (store_register): ... this new function.
332
c642a434
UW
3332011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
334
335 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
336 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
337 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
338 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
339 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
340 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
341 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
342 (srv_xmlfiles): Add new XML files.
343
344 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
345 and <sys/uio.h>.
346 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
347 (init_registers_s390_linux32v1): Add prototype.
348 (init_registers_s390_linux32v2): Likewise.
349 (init_registers_s390_linux64v1): Likewise.
350 (init_registers_s390_linux64v2): Likewise.
351 (init_registers_s390x_linux64v1): Likewise.
352 (init_registers_s390x_linux64v2): Likewise.
353 (s390_num_regs): Increment to 52.
354 (s390_regmap): Add orig_r2 register.
355 (s390_num_regs_3264): Increment to 68.
356 (s390_regmap_3264): Add orig_r2 register.
357 (s390_collect_ptrace_register): Handle orig_r2 register.
358 (s390_supply_ptrace_register): Likewise.
359 (s390_fill_last_break): New function.
360 (s390_store_last_break): Likewise.
361 (s390_fill_system_call): New function.
362 (s390_store_system_call): Likewise.
363 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
364 register sets.
365 (s390_check_regset): New function.
366 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
367 NT_S390_SYSTEM_CALL regsets and use appropriate description.
368 Update target_regsets for available register sets.
369
2268b414
JK
3702011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
371 Jan Kratochvil <jan.kratochvil@redhat.com>
372
373 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
374 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
375 New.
376 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
377 * linux-low.h (struct process_info_private): New member r_debug.
378 * server.c (handle_qxfer_libraries): Call
379 the_target->qxfer_libraries_svr4.
380 (handle_qxfer_libraries_svr4): New function.
381 (qxfer_packets): New entry "libraries-svr4".
382 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
383 * target.h (struct target_ops): New member qxfer_libraries_svr4.
384 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
385 PACKET_qXfer_libraries_svr4.
386
d6db1fab
UW
3872011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
388
389 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
390 PSW address/mask between 8-byte and 16-byte formats.
391 (s390_supply_ptrace_register): Likewise.
392 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
393 basic addressing mode bit.
394
242f5f1c
SS
3952011-11-24 Stan Shebs <stan@codesourcery.com>
396
397 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
398
f196051f
SS
3992011-11-17 Stan Shebs <stan@codesourcery.com>
400
401 * tracepoint.c (struct tracepoint): New field traceframe_usage.
402 (tracing_start_time): New global.
403 (tracing_stop_time): New global.
404 (tracing_user_name): New global.
405 (tracing_notes): New global.
406 (tracing_stop_note): New global.
407 (cmd_qtstart): Set traceframe_usage, start_time.
408 (stop_tracing): Set stop_time.
409 (cmd_qtstatus): Report additional status.
410 (cmd_qtp): New function.
411 (handle_tracepoint_query): Call it.
412 (cmd_qtnotes): New function.
413 (handle_tracepoint_general_set): Call it.
414 (get_timestamp): Rename from tsv_get_timestamp.
415
405f8e94
SS
4162011-11-14 Stan Shebs <stan@codesourcery.com>
417 Kwok Cheung Yeung <kcy@codesourcery.com>
418
419 * linux-x86-low.c (small_jump_insn): New.
420 (i386_install_fast_tracepoint_jump_pad): Add arguments for
421 trampoline and error message, build a trampoline and issue a small
422 jump instruction to it.
423 (x86_install_fast_tracepoint_jump_pad): Add arguments for
424 trampoline and error message.
425 (x86_get_min_fast_tracepoint_insn_len): New.
426 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
427 * linux-low.h (struct linux_target_ops): Add arguments to
428 install_fast_tracepoint_jump_pad operation, add new operation.
429 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
430 arguments.
431 (linux_get_min_fast_tracepoint_insn_len): New function.
432 (linux_target_op): Add new operation.
433 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
434 (gdb_trampoline_buffer_end): Ditto.
435 (gdb_trampoline_buffer_error): Ditto.
436 (struct ipa_sym_addresses): Add fields for new IPA variables.
437 (symbol_list): Add entries for new IPA variables.
438 (struct tracepoint): Add fields to hold the address range of the
439 trampoline used by the tracepoint.
440 (trampoline_buffer_head): New static variable.
441 (trampoline_buffer_tail): Ditto.
442 (claim_trampoline_space): New function.
443 (have_fast_tracepoint_trampoline_buffer): New function.
444 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
445 structure.
446 (install_fast_tracepoint): Ditto, also add error buffer argument.
447 (cmd_qtminftpilen): New function.
448 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
449 (fast_tracepoint_from_trampoline_address): New function.
450 (fast_tracepoint_collecting): Handle trampoline as part of jump
451 pad space.
452 (set_trampoline_buffer_space): New function.
453 (initialize_tracepoint): Initialize new IPA variables.
454 * target.h (struct target_ops): Add arguments to
455 install_fast_tracepoint_jump_pad operation, add new
456 get_min_fast_tracepoint_insn_len operation.
457 (target_get_min_fast_tracepoint_insn_len): New.
458 (install_fast_tracepoint_jump_pad): Add arguments.
459 * server.h (IPA_BUFSIZ): Define.
460 * linux-i386-ipa.c: Include extra header files.
461 (initialize_fast_tracepoint_trampoline_buffer): New function.
462 (initialize_low_tracepoint): Call it.
463 * server.h (set_trampoline_buffer_space): Declare.
464 (claim_trampoline_space): Ditto.
465 (have_fast_tracepoint_trampoline_buffer): Ditto.
466
1e4d1764
YQ
4672011-11-14 Yao Qi <yao@codesourcery.com>
468
469 * server.c (handle_query): Handle InstallInTrace for qSupported.
470 * tracepoint.c (add_tracepoint): Sort list.
471 (install_tracepoint, download_tracepoint): New.
472 (cmd_qtdp): Call them to install and download tracepoints.
473 (sort_tracepoints): Removed.
474 (cmd_qtstart): Update.
475
5c73ff4e
YQ
4762011-11-14 Yao Qi <yao@codesourcery.com>
477
478 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
479 * mem-break.h: Declare.
480 * tracepoint.c (cmd_qtstart): Move some code to ...
481 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
482 New.
483 (download_tracepoints): Move some code to ...
484 (download_tracepoint_1): ... here. New.
485
86a30030
YQ
4862011-11-08 Yao Qi <yao@codesourcery.com>
487
488 * remote-utils.c (relocate_instruction): A comment fix.
489
8d26e50c
JB
4902011-11-07 Joel Brobecker <brobecker@adacore.com>
491
492 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
493 (i386_dr_low_get_control, i386_dr_low_get_status): Use
494 dr_status_mirror and dr_control_mirror from debug_reg_state.
495 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
496 (i386_initial_stuff): Remove use of deleted globals.
497 (i386_get_thread_context, i386_set_thread_context,
498 i386_thread_added): Use dr_status_mirror and dr_control_mirror
499 from debug_reg_state.
500
a59306a3
YQ
5012011-11-05 Yao Qi <yao@codesourcery.com>
502
503 * tracepoint.c (gdb_collect): Loop over tracepoints of same
504 address as TPOINT's.
505
3065dfb6
SS
5062011-11-02 Stan Shebs <stan@codesourcery.com>
507
508 * tracepoint.c (agent_mem_read_string): New function.
509 (eval_agent_expr): Call it for tracenz.
510 * server.c (handle_query): Report support for tracenz.
511
fd0d8c7c
YQ
5122011-11-02 Yao Qi <yao@codesourcery.com>
513
514 * tracepoint.c (cmd_qtstart): Remove unused local variables.
515
609086b1
YQ
5162011-11-02 Yao Qi <yao@codesourcery.com>
517
518 * target.h: Fix a typo in comment.
519
b9fd1791
PA
5202011-10-31 Pedro Alves <pedro@codesourcery.com>
521
522 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
523 clobber the breakpoints' shadows with fast tracepoint jumps.
524 * mem-break.h (check_mem_write): Add `myaddr' parameter.
525 * target.c (write_inferior_memory): Also pass MYADDR down to
526 check_mem_write.
527
03583c20
UW
5282011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
529
530 * configure.ac: Check support for personality routine.
531 * configure: Regenerate.
532 * config.in: Likewise.
533 * linux-low.c: Include <sys/personality.h>.
534 Define ADDR_NO_RANDOMIZE if necessary.
535 (linux_create_inferior): Disable address space randomization when
536 forking inferior, if requested.
537 (linux_supports_disable_randomization): New function.
538 (linux_target_ops): Install it.
539 * server.h (disable_randomization): Declare.
540 * server.c (disable_randomization): New global variable.
541 (handle_general_set): Handle QDisableRandomization.
542 (handle_query): Likewise for qSupported.
543 (main): Support --disable-randomization and --no-disable-randomization
544 command line arguments.
545 * target.h (struct target_ops): Add supports_disable_randomization.
546 (target_supports_disable_randomization): New macro.
547
723b724b
MF
5482011-09-29 Mike Frysinger <vapier@gentoo.org>
549
550 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
551 ifdef check.
552 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
553 [!PT_GETDSBT] (target_loadmap): New definition.
554 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
555 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
556 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
557 and PT_GETDSBT to LINUX_LOADMAP.
558 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
559 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
560
55329a5c 5612011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
562
563 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
564 (arm_linux_hwbp_cap): New static variable.
565 (arm_linux_get_hwbp_cap): Replace by ...
566 (arm_linux_init_hwbp_cap): ... this new function.
567 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
568 (arm_linux_get_hw_watchpoint_count): Likewise.
569 (arm_linux_get_hw_watchpoint_max_length): Likewise.
570 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
571 (arm_prepare_to_resume): Use perror_with_name instead of error.
572
55329a5c 5732011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
574
575 * linux-arm-low.c: Include <signal.h>.
576 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
577 (struct arm_linux_hwbp_cap): New data type.
578 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
579 (struct arm_linux_hw_breakpoint): New data type.
580 (MAX_BPTS, MAX_WPTS): Define.
581 (struct arch_process_info, struct arch_lwp_info): New data types.
582 (arm_linux_get_hwbp_cap): New function.
583 (arm_linux_get_hw_breakpoint_count): Likewise.
584 (arm_linux_get_hw_watchpoint_count): Likewise.
585 (arm_linux_get_hw_watchpoint_max_length): Likewise.
586 (arm_hwbp_control_initialize): Likewise.
587 (arm_hwbp_control_is_enabled): Likewise.
588 (arm_hwbp_control_is_initialized): Likewise.
589 (arm_hwbp_control_disable): Likewise.
590 (arm_linux_hw_breakpoint_equal): Likewise.
591 (arm_linux_hw_point_initialize): Likewise.
592 (struct update_registers_data): New data structure.
593 (update_registers_callback: New function.
594 (arm_insert_point): Likewise.
595 (arm_remove_point): Likewise.
596 (arm_stopped_by_watchpoint): Likewise.
597 (arm_stopped_data_address): Likewise.
598 (arm_new_process): Likewise.
599 (arm_new_thread): Likewise.
600 (arm_prepare_to_resume): Likewise.
601 (the_low_target): Register arm_insert_point, arm_remove_point,
602 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
603 arm_new_thread, and arm_prepare_to_resume.
604
6b9801d4
SS
6052011-09-15 Stan Shebs <stan@codesourcery.com>
606
607 * server.h (struct emit_ops): Add compare-goto fields.
608 * tracepoint.c (gdb_agent_op_sizes): New table.
609 (emit_eq_goto): New function.
610 (emit_ne_goto): New function.
611 (emit_lt_goto): New function.
612 (emit_le_goto): New function.
613 (emit_gt_goto): New function.
614 (emit_ge_goto): New function.
615 (is_goto_target): New function.
616 (compile_bytecodes): Recognize special cases of compare-goto
617 combinations and call specialized emitters for them.
618 * linux-x86-low.c (amd64_emit_eq_goto): New function.
619 (amd64_emit_ne_goto): New function.
620 (amd64_emit_lt_goto): New function.
621 (amd64_emit_le_goto): New function.
622 (amd64_emit_gt_goto): New function.
623 (amd64_emit_ge_goto): New function.
624 (amd64_emit_ops): Add the new functions.
625 (i386_emit_eq_goto): New function.
626 (i386_emit_ne_goto): New function.
627 (i386_emit_lt_goto): New function.
628 (i386_emit_le_goto): New function.
629 (i386_emit_gt_goto): New function.
630 (i386_emit_ge_goto): New function.
631 (i386_emit_ops): Add the new functions.
632
bf15cbda
SS
6332011-09-08 Stan Shebs <stan@codesourcery.com>
634
635 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
636 (i386_emit_epilogue): Restore %ebx.
637
943ca1dd
JZ
6382011-08-31 Jie Zhang <jzhang918@gmail.com>
639
640 * server.c (step_thread): Remove definition.
641 (process_serial_event): Don't handle Hs.
642 * server.h (step_thread): Remove declaration.
643 * target.c (set_desired_inferior): Remove use of step_thread.
644
e3deef73
LM
6452011-08-24 Luis Machado <lgustavo@codesourcery.com>
646
647 * linux-low.c: Include linux-procfs.h.
648 (linux_attach_lwp_1): Update comments.
649 (linux_attach): Scan for existing threads when attaching to a
650 process that is the tgid.
651 * Makefile.in: Update dependencies.
652
13da1c97
LM
6532011-08-24 Luis Machado <lgustavo@codesourcery.com>
654
655 * configure.srv: Add linux-procfs.o dependencies.
656
881127c9
YQ
6572011-08-14 Yao Qi <yao@codesourcery.com>
658
659 * target.h (struct target_ops): Fix indent.
660 * win32-low.c (win32_target_ops): Fix comment.
661
58dbd541
YQ
6622011-08-14 Andrew Jenner <andrew@codesourcery.com>
663 Yao Qi <yao@codesourcery.com>
664
665 * Makefile.in (clean): Remove tic6x-*.c files.
666 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
667 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
668 (tic6x-c64xp-linux.c): Likewise.
669 * configure.srv: Add support for tic6x-*-uclinux.
670 * linux-tic6x-low.c: New.
671 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
672
78d85199
YQ
6732011-08-14 Andrew Stubbs <ams@codesourcery.com>
674 Yao Qi <yao@codesourcery.com>
675
676 * target.h (struct target_ops): Add read_loadmap.
677 * linux-low.c (struct target_loadseg): New type.
678 (struct target_loadmap): New type.
679 (linux_read_loadmap): New function.
680 (linux_target_ops): Add linux_read_loadmap.
681 * server.c (handle_query): Support qXfer:fdpic:read packet.
682 * win32-low.c (win32_target_ops): Initialize field `read_loadmap' to NULL.
683
a959a88d
EZ
6842011-08-05 Eli Zaretskii <eliz@gnu.org>
685
686 * win32-low.c: Include <stdint.h>.
687
1ced966e
PA
6882011-07-22 Pedro Alves <pedro@codesourcery.com>
689
690 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
691 to the inferior here.
692 (i386_remove_aligned_watchpoint): Ditto.
693 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
694 fit part of the watchpoint in the debug registers.
695 (i386_update_inferior_debug_regs): New.
696 (i386_low_insert_watchpoint): Work on a local mirror of the debug
697 registers, and only update the inferior on success.
698 (i386_low_remove_watchpoint): Ditto.
699
d26e3629
KY
7002011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
701
702 * linux-low.c (compare_ints, unique, list_threads, show_process,
703 linux_core_of_thread): Delete.
704 (linux_target_ops): Change linux_core_of_thread to
705 linux_common_core_of_thread.
706 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
707 * utils.c (malloc_failure): Change type of argument.
708 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
709 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
710 common/linux-osdata.c, common/ptid.c and common/buffer.c.
711 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
712 (IPA_OBJS): Add common-utils-ipa.o.
713 (ptid_h, linux_osdata_h): New macros.
714 (server_h): Add common/common-utils.h, common/xml-utils.h,
715 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
716 common/ptid.h.
717 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
718 ptid.o, buffer.o): New rules.
719 (linux-low.o): Add common/linux-osdata.h as a dependency.
720 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
721 * configure.ac: Add AC_HEADER_DIRENT check.
722 * config.in: Regenerate.
723 * configure: Regenerate.
724 * remote-utils.c (xml_escape_text): Delete.
725 (buffer_grow, buffer_free, buffer_init, buffer_finish,
726 buffer_xml_printf): Move to common/buffer.c.
727 * server.c (main): Remove call to initialize_inferiors.
728 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
729 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
730 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
731 internal_error, gdb_assert, gdb_assert_fail): Delete.
732 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
733 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
734 common/buffer.h.
735 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
736 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
737 initialize_inferiors): Delete.
738
2275a1a7
PA
7392011-07-20 Pedro Alves <pedro@codesourcery.com>
740
741 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
742 symbol error.
743
0a5b1e09
PA
7442011-05-31 Pedro Alves <pedro@codesourcery.com>
745
746 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
747 assertion.
748 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
749
6938fd34
YQ
7502011-05-26 Yao Qi <yao@codesourcery.com>
751
752 * Makefile.in (thread-db.o): Track dependence to
753 common/gdb_thread_db.h.
754 * thread-db.c: include gdb_thread_db.h from right place.
755
b481f9e0
TT
7562011-05-16 Adrian Cornish <gnu@bluedreamer.com>
757
758 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
759 __FILE__ and __LINE__ to internal_error.
760
98a5dd13
DE
7612011-05-13 Doug Evans <dje@google.com>
762
763 * thread-db.c (try_thread_db_load_from_sdir): New function.
764 (try_thread_db_load_from_dir): New function.
765 (thread_db_load_search): Handle $sdir, ignore $pdir.
766 Remove trying of system directories if search of
767 libthread-db-search-path fails, that is now done via $sdir.
768
d248b706
KY
7692011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
770
771 * server.c (handle_query): Add EnableDisableTracepoints to the list
772 of supported features.
773 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
774 tracepoints.
775 (cmd_qtenable_disable): New.
776 (cmd_qtstart): Install tracepoints even if disabled.
777 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
778 receiving a QTEnable or QTDisable packet.
779 (gdb_collect): Skip data collection if fast tracepoint is disabled.
780 (ust_marker_to_static_tracepoint): Do not ignore disabled static
781 tracepoints.
782 (gdb_probe): Skip data collection if static tracepoint is disabled.
783
84e578fb
DE
7842011-05-10 Doug Evans <dje@google.com>
785
786 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
787
71f55dd8
DE
7882011-05-04 Doug Evans <dje@google.com>
789
790 * linux-low.c (linux_join): Skip process lookup.
791 * spu-low.c (spu_join): Ditto.
792 * server.c (join_inferiors_callback): Delete.
793 (process_serial_event): For 'D' packet (detach) call join_inferior
794 directly.
795
4d393d60
JM
7962011-05-04 Joseph Myers <joseph@codesourcery.com>
797
798 * README: Don't mention xscale*-*-linux*.
799 * configure.srv (xscale*-*-linux*): Don't handle target.
800
b00ad6ff
NF
8012011-04-27 Nathan Froyd <froydnj@codesourcery.com>
802
803 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
804 casting pointers.
805 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
806 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
807 (i386_emit_void_call_2): Likewise.
808
af96c192
YQ
8092011-04-26 Yao Qi <yao@codesourcery.com>
810
811 * linux-low.c: Move common macros to linux-ptrace.h.
812 Include linux-ptrace.h.
813 * Makefile.in (linux_ptrace_h): New.
814 (linux-low.o): Depends on linux-ptrace.h.
815
03f2bd59
JK
8162011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
817
818 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
819 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
820 (remote_prepare): New function with most of the TCP code from ...
821 (remote_open): ... here. Detect PORT here unconditionally. Move also
822 setting transport_is_reliable.
823 * server.c (run_once): New variable.
824 (gdbserver_usage): Document it.
825 (main): Set run_once for `--once'. Call remote_prepare. Exit after
826 the first run if RUN_ONCE.
827 * server.h (run_once, remote_prepare): New declarations.
828
7a9dd1b2
TT
8292011-04-19 Tom Tromey <tromey@redhat.com>
830
831 * win32-low.c (handle_load_dll): Remove duplicate "the".
832
81239425
PM
8332011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
834
835 Remove support for old Cygwin 1.5 versions.
836 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
837 function to avoid warning.
838 (win32_add_one_solib): Use cygwin_conv_path function to avoid
839 warning.
840
9e0627f1
PM
8412011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
842
843 * gdbserver/server.h (Macro _): Define it if not available.
844
588eebee
MS
8452011-03-14 Michael Snyder <msnyder@vmware.com>
846
348af9f7 847 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 848
43f70d4c
JB
8492011-03-10 Joel Brobecker <brobecker@adacore.com>
850
851 * Makefile.in (maintainer-clean realclean distclean): Remove
852 "make ... subdir_do" command.
853
348af9f7
MS
8542011-03-10 Michael Snyder <msnyder@vmware.com>
855
856 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
857
858 * server.c (handle_v_run): Free alloced buffer on early return.
859
e637a4f5
YQ
8602011-03-09 Yao Qi <yao@codesourcery.com>
861
862 Revert:
863 2011-03-04 Yao Qi <yao@codesourcery.com>
864
865 * Makefile.in: Remove GNU make feature --directory.
866
867 2011-03-05 Yao Qi <yao@codesourcery.com>
868
869 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
870 (subdir_do): New make target. Copied from gdb/Makefile.
871 (maintainer-clean, realclean, distclean, clean): Call corresponding
872 make targets in common/Makefile.
873
874 2011-02-11 Yao Qi <yao@codesourcery.com>
875
876 * configure.ac: Call AC_PROG_RANLIB.
877 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
878 * configure: Regenerate.
879
e6edda56
JK
8802011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
881
882 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
883
e5141119
JB
8842011-03-06 Yao Qi <yao@codesourcery.com>
885
886 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
887
64794aa4
JB
8882011-03-05 Yao Qi <yao@codesourcery.com>
889
890 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
891 (subdir_do): New make target. Copied from gdb/Makefile.
892 (maintainer-clean, realclean, distclean, clean): Call corresponding
893 make targets in common/Makefile.
894
7a762829
YQ
8952011-03-04 Yao Qi <yao@codesourcery.com>
896
897 * Makefile.in: Remove GNU make feature --directory.
898
348af9f7
MS
8992011-03-04 Michael Snyder <msnyder@vmware.com>
900
901 * server.c (queue_stop_reply): Call xmalloc not malloc.
902
9032011-03-02 Michael Snyder <msnyder@vmware.com>
904
905 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
906
9f72fee2
MS
9072011-02-28 Michael Snyder <msnyder@vmware.com>
908
588eebee
MS
909 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
910 (cmd_qtframe): Ditto.
911 (cmd_qtbuffer): Ditto.
912 (cmd_bigqtbuffer): Ditto.
913
9f72fee2
MS
914 * utils.c (decimal2str): Initialize 'width' to nine, then
915 don't mess with it.
916
8040bd49
UW
9172011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
918
919 * hostio.c (require_data): Free *data, not data.
920
7e52cbd0
JK
9212011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
922
923 * hostio.c (require_data): Use free, not xfree.
924
9130f83e
MS
9252011-02-27 Michael Snyder <msnyder@vmware.com>
926
4b812f4e
MS
927 * server.c (handle_query): Discard unused value.
928
9130f83e
MS
929 * hostio.c (require_data): Free malloc memory before returning
930 error.
931
69d37113
MS
9322011-02-26 Michael Snyder <msnyder@vmware.com>
933
934 * linux-low.c (list_threads): Call closedir for dirent.
935
35f5825a
MS
9362011-02-27 Michael Snyder <msnyder@vmware.com>
937
2a589cef
MS
938 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
939 a case statement falls through.
940
0adea5f7
MS
941 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
942
35f5825a
MS
943 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
944 in comparison.
945
238f1c74
MS
9462011-02-26 Michael Snyder <msnyder@vmware.com>
947
948 * utils.c (decimal2str): Eliminate dead code and dead param.
949 (pulongest): Drop dead param from call to decimal2str.
950 (plongest): Ditto.
951
633ff500
JB
9522011-02-24 Joel Brobecker <brobecker@adacore.com>
953
954 Revert the following patch (not approved yet):
955 2011-02-21 Hui Zhu <teawater@gmail.com>
956 * tracepoint.c (tp_printf): New function.
957 (eval_agent_expr): Handle gdb_agent_op_printf.
958
f9c6ff72
HZ
9592011-02-21 Hui Zhu <teawater@gmail.com>
960
961 * tracepoint.c (tp_printf): New function.
962 (eval_agent_expr): Handle gdb_agent_op_printf.
963
94d5e490
TT
9642011-02-18 Tom Tromey <tromey@redhat.com>
965
966 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
967 (tracepoint.o): Likewise.
968 * tracepoint.c (enum gdb_agent_op): Use ax.def.
969 (gdb_agent_op_names): Likewise.
970
c7f96d2b
TT
9712011-02-18 Tom Tromey <tromey@redhat.com>
972
973 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
974 gdb_agent_op_rot>: New constants.
975 (gdb_agent_op_names): Add pick and roll.
976 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
977 cases.
978
0feedb2c
JK
9792011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
980
981 * aclocal.m4: Regenerated with aclocal-1.11.1.
982
b3b9301e
PA
9832011-02-14 Pedro Alves <pedro@codesourcery.com>
984
985 * server.c (handle_qxfer_traceframe_info): New.
986 (qxfer_packets): Register "traceframe-info".
987 (handle_query): Report support for qXfer:traceframe-info:read+.
988 * tracepoint.c (match_blocktype): New.
989 (traceframe_find_block_type): Rename to ...
990 (traceframe_walk_blocks): ... this. Add callback filter argument,
991 and use it.
992 (traceframe_find_block_type): New, reimplemented on top of
993 traceframe_walk_blocks.
994 (build_traceframe_info_xml): New.
995 (traceframe_read_info): New.
996 * server.h (traceframe_read_info): Declare.
997
4f3e6fb7
YQ
9982011-02-11 Yao Qi <yao@codesourcery.com>
999
1000 * configure.ac: Call AC_PROG_RANLIB.
1001 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
1002 * configure: Regenerate.
1003
764880b7
PA
10042011-02-07 Pedro Alves <pedro@codesourcery.com>
1005
1006 * server.c (gdb_read_memory): Change return semantics to allow
1007 partial transfers.
1008 (handle_search_memory_1): Adjust.
1009 (process_serial_event) <'m' packet>: Handle partial transfers.
1010 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
1011
1c79eb8a
PA
10122011-01-28 Pedro Alves <pedro@codesourcery.com>
1013
1014 * regcache.c (init_register_cache): Initialize
1015 regcache->register_status.
1016 (free_register_cache): Release regcache->register_status.
1017 (regcache_cpy): Copy register_status.
1018 (registers_to_string): Print 'x's for unavailable registers.
1019 (supply_register): Mark the register's status valid or
1020 unavailable, depending on whether a buffer was passed in or not.
1021 (supply_register_zeroed): New.
1022 (supply_regblock): Mark the registers' status valid or
1023 unavailable, depending on whether a buffer was passed in or not.
1024 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
1025 (struct regcache): New `register_status' field.
1026 (supply_register_zeroed): Declare.
1027 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
1028 supply_register_zeroed, rather than passing a NULL buffer to
1029 supply_register.
1030 * tracepoint.c (fetch_traceframe_registers): Update comment.
1031
85724a0e
PA
10322011-01-28 Pedro Alves <pedro@codesourcery.com>
1033
1034 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
1035 buffer explicit.
1036
d08aafef
PA
10372011-01-25 Pedro Alves <pedro@codesourcery.com>
1038
1039 * server.h (decode_xfer_write): Change prototype.
1040 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
1041 and don't extract the annex here.
1042 * server.c (decode_xfer_read): Remove `annex' parameter,
1043 and don't extract the annex here.
1044 (decode_xfer): New.
1045 (struct qxfer): New.
1046 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
1047 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
1048 (handle_qxfer_statictrace): New functions, abstracted out from
1049 handle_query, and made to use the struct qxfer interface.
1050 (handle_threads_qxfer_proper): Rename to ...
1051 (handle_qxfer_threads_proper): ... this.
1052 (handle_threads_qxfer): Rename to ...
1053 (handle_qxfer_threads): ... this. Adjust.
1054 (qxfer_packets): New array.
1055 (handle_qxfer): New function.
1056 (handle_query): Use handle_qxfer.
1057
493e2a69
MS
10582011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
1059
1060 * gdbreplay.c: Shorten lines of >= 80 columns.
1061 * linux-low.c: Ditto.
1062 * linux-ppc-low.c: Ditto.
1063 * linux-s390-low.c: Ditto.
1064 * linux-sparc-low.c: Ditto.
1065 * linux-x86-low.c: Ditto.
1066 * linux-xtensa-low.c: Ditto.
1067 * mem-break.c: Ditto.
1068 * nto-low.c: Ditto.
1069 * regcache.h: Ditto.
1070 * remote-utils.c: Ditto.
1071 * server.c: Ditto.
1072 * server.h: Ditto.
1073 * thread-db.c: Ditto.
1074 * tracepoint.c: Ditto.
1075 * utils.c: Ditto.
1076 * win32-low.h: Ditto.
1077
44944448
JB
10782011-01-05 Joel Brobecker <brobecker@adacore.com>
1079
1080 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
1081 update.
1082
71ce852c
JB
10832011-01-01 Joel Brobecker <brobecker@adacore.com>
1084
1085 * server.c (gdbserver_version): Update copyright year in version
1086 output.
1087 * gdbreplay.c (gdbreplay_version): Ditto.
1088
eb826dc6
MF
10892010-12-29 Jie Zhang <jie.zhang@analog.com>
1090
1091 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
1092 * linux-bfin-low.c: New file.
1093 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
1094 PT_DATA_ADDR for BFIN targets.
1095 * Makefile.in (SFILES): Add linux-bfin-low.c.
1096 (clean): Remove reg-bfin.c.
1097 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
1098 * README: Mention supported Blackfin targets.
1099
39ab222a
MF
11002010-12-23 Mike Frysinger <vapier@gentoo.org>
1101
1102 * .gitignore: New file.
1103
a1f2ce7d
MF
11042010-11-16 Mike Frysinger <vapier@gentoo.org>
1105
1106 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
1107
f474844c
JZ
11082010-10-22 Jie Zhang <jie@codesourcery.com>
1109
1110 * Makefile.in: Add FLAGS_TO_PASS variable.
1111 (install): Remove dependency of install-only and recursively
1112 invoke make for install-only.
1113
f1048712
DE
11142010-10-04 Doug Evans <dje@google.com>
1115
1116 * Makefile.in (uninstall): Use $(DESTDIR).
1117
b53a1623
PA
11182010-09-24 Pedro Alves <pedro@codesourcery.com>
1119
e6ee044d
PA
1120 PR gdb/11842
1121
b53a1623
PA
1122 * linux-x86-low.c (compat_siginfo_from_siginfo)
1123 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
1124 si_code is < 0. Check for si_code == SI_TIMER before checking for
1125 si_code < 0.
1126
fa1bd1e4
JB
11272010-09-13 Joel Brobecker <brobecker@adacore.com>
1128
1129 * lynx-i386-low.c: New file.
1130 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
1131
47fac8f8
JB
11322010-09-13 Joel Brobecker <brobecker@adacore.com>
1133
1134 * lynx-low.c (ptrace_request_to_str): Remove handling for
1135 request values that have been removed in LynxOS 5.x.
1136
1adfc54d
JB
11372010-09-13 Joel Brobecker <brobecker@adacore.com>
1138
1139 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
1140 <ptrace.h>
1141
c2a66c29
NS
11422010-09-09 Nathan Sidwell <nathan@codesourcery.com>
1143
1144 * configure.ac: Add --enable-inprocess-agent option.
1145 * configure: Rebuilt.
1146
32fcada3
YQ
11472010-09-06 Yao Qi <yao@codesourcery.com>
1148
1149 * linux-low.c (linux_kill): Remove unused variable.
1150 (linux_stabilize_threads): Likewise.
1151 * server.c (start_inferior): Likewise.
1152 (queue_stop_reply_callback): Likewise.
1153 * tracepoint.c (do_action_at_tracepoint): Likewise.
1154
0cccb683
YQ
11552010-09-06 Yao Qi <yao@codesourcery.com>
1156
1157 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
1158 on return.
1159
423ec54c
JK
11602010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
1161
1162 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
1163
12ac6819
PA
11642010-09-06 Pedro Alves <pedro@codesourcery.com>
1165
1166 * Makefile.in (install-only): Replace $IPA_DEPFILES with
1167 "$(IPA_DEPFILES)".
1168
8ed54b31
JB
11692010-09-01 Joel Brobecker <brobecker@adacore.com>
1170
1171 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
1172 gdbserver/lynx-ppc-low.c: New files.
1173 * Makefile.in (lynx_low_h): New variable.
1174 (lynx-low.o, lynx-ppc-low.o): New rules.
1175 * configure.ac: On LynxOS, link with -lnetinet.
1176 * configure.srv: Add handling of powerpc-*-lynxos* targets.
1177 * configure: regenerate.
1178
bb0116a4
JB
11792010-09-01 Joel Brobecker <brobecker@adacore.com>
1180
1181 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
1182 * configure.ac: Add check for vasprintf and vsnprintf.
1183 * configure, config.in: Regenerate.
1184 * server.h (vasprintf, vsnprintf): Add conditional declarations.
1185
a778ab81 11862010-09-01 Joel Brobecker <brobecker@adacore.com>
1187
1188 * gdbreplay.c: Move include of alloca.h up, next to include of
1189 malloc.h.
1190 * server.h: Add include of malloc.h.
1191 * mem-break.c: Remove include of malloc.h.
1192 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
1193
8b034a19 11942010-09-01 Joel Brobecker <brobecker@adacore.com>
1195
1196 * Makefile.in (memmem.o): Build with -Wno-error.
1197
11982010-09-01 Joel Brobecker <brobecker@adacore.com>
1199
1200 * utils.c (xsnprintf): Make non-static.
1201 * server.h: Add xsnprintf declaration.
1202 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
1203 replace calls to snprintf by calls to xsnprintf throughout.
1204
12052010-09-01 Joel Brobecker <brobecker@adacore.com>
1206
1207 * configure.ac: Add configure check for alloca.
1208 * configure, config.in: Regenerate.
1209 * server.h: Include alloca.h if it exists.
1210 * gdbreplay.c: Include alloca.h if it exists.
1211
1a981360
PA
12122010-08-28 Pedro Alves <pedro@codesourcery.com>
1213
1214 * linux-low.c (__SIGRTMIN): Define if not already defined.
1215 (linux_create_inferior): Check for __ANDROID__ rather than
1216 __SIGRTMIN.
1217 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
1218 are already deferred.
1219 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
1220 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
1221 stopped and already has a pending signal to report.
1222 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
1223 a pending signal to report or is moving out of a jump pad.
1224 (linux_init_signals): Check for __ANDROID__ rather than
1225 __SIGRTMIN.
1226
b4d51a55
PA
12272010-08-28 Pedro Alves <pedro@codesourcery.com>
1228
1229 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
1230 debug_threads check. Avoid a linear search when not doing debug
1231 output.
1232
ec48365d
PA
12332010-08-27 Pedro Alves <pedro@codesourcery.com>
1234
1235 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
1236 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
1237 (struct file_handler) <fd>: Change type to gdb_fildes_t.
1238 (process_event): Change local fd's type to gdb_fildes_t.
1239 (create_file_handler): Adjust prototype.
1240 (delete_file_handler): Adjust prototype.
1241 (handle_file_event): Adjust prototype. Use pfildes.
1242 (create_file_event): Adjsut prototype.
1243 * remote-utils.c (remote_desc, listen_desc): Change type to
1244 gdb_fildes_t.
1245 * server.h: New gdb_fildes_t typedef.
1246 [USE_WIN32API]: Include winsock2.h.
1247 (delete_file_handler, add_file_handler): Adjust prototypes.
1248 (pfildes): Declare.
1249 * utils.c (pfildes): New.
1250
854d88f0
PA
12512010-08-27 Pedro Alves <pedro@codesourcery.com>
1252
1253 * configure.ac (build_warnings): Add -Wno-char-subscripts.
1254 * configure: Regenerate.
1255
0146f85b
PA
12562010-08-27 Pedro Alves <pedro@codesourcery.com>
1257
1258 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
1259 (linux_done_accessing_memory): ... this.
1260 (linux_target_ops): Adjust.
1261 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
1262 * nto-low.c (nto_target_ops): Adjust comment.
1263 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
1264 * spu-low.c (spu_target_ops): Adjust comment.
1265 * target.h (target_ops): Rename unprepare_to_access_memory field
1266 to done_accessing_memory.
1267 (unprepare_to_access_memory): Rename to ...
1268 (done_accessing_memory): ... this.
1269
90d74c30
PA
12702010-08-26 Pedro Alves <pedro@codesourcery.com>
1271
1272 * linux-low.c (linux_prepare_to_access_memory): New.
1273 (linux_unprepare_to_access_memory): New.
1274 (linux_target_ops): Install them.
1275 * server.c (read_memory): Rename to ...
1276 (gdb_read_memory): ... this. Use
1277 prepare_to_access_memory/prepare_to_access_memory.
1278 (write_memory): Rename to ...
1279 (gdb_write_memory): ... this. Use
1280 prepare_to_access_memory/prepare_to_access_memory.
1281 (handle_search_memory_1): Adjust.
1282 (process_serial_event): Adjust.
1283 * target.h (struct target_ops): New fields
1284 prepare_to_access_memory and unprepare_to_access_memory.
1285 (prepare_to_access_memory, unprepare_to_access_memory): New.
1286 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
1287 prepare_to_access_memory/prepare_to_access_memory.
1288 * nto-low.c (nto_target_ops): Adjust.
1289 * spu-low.c (spu_target_ops): Adjust.
1290 * win32-low.c (win32_target_ops): Adjust.
1291
fd467969
PA
12922010-08-26 Pedro Alves <pedro@codesourcery.com>
1293
1294 * Makefile.in (WARN_CFLAGS): Get it from configure.
1295 (WERROR_CFLAGS): New.
1296 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
1297 * configure.ac: Introduce --enable-werror, which adds -Werror to
1298 the compiler command line. Enabled by default. Disable with
1299 --disable-werror. Add -Wdeclaration-after-statement
1300 Wpointer-arith and -Wformat-nonliteral to warning flags.
1301 * configure: Regenerate.
1302
331e2f5f
PA
13032010-08-26 Pedro Alves <pedro@codesourcery.com>
1304
1305 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
1306
e581f2b4
PA
13072010-08-26 Pedro Alves <pedro@codesourcery.com>
1308
1309 * gdbreplay.c (remote_error): New.
1310 (gdbchar): New.
1311 (expect): Use gdbchar. Check for error reading from GDB.
1312 Clarify sync error output.
1313 (play): Check for errors writing to GDB.
1314 * linux-low.c (sigchld_handler): Really ignore `write' errors.
1315 * remote-utils.c (getpkt): Check for errors writing to the remote
1316 descriptor.
1317
3c11dd79
PA
13182010-08-25 Pedro Alves <pedro@codesourcery.com>
1319
1320 * linux-low.c (linux_wait_1): Move non-debugging code out of
1321 `debug_threads' control.
1322
d20a8ad9
PA
13232010-08-25 Pedro Alves <pedro@codesourcery.com>
1324
1325 * linux-low.c (linux_wait_1): Don't set last_status here.
1326 * server.c (push_event, queue_stop_reply_callback): Assert we're
1327 not pushing a TARGET_WAITKIND_IGNORE event.
1328 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
1329 (myresume, handle_target_event): Set the thread's last_resume_kind
1330 and last_status from the target returned status.
1331
964e4306
PA
13322010-08-25 Pedro Alves <pedro@codesourcery.com>
1333
1334 PR threads/10729
1335
1336 * linux-x86-low.c (update_debug_registers_callback): New.
1337 (i386_dr_low_set_addr): Use it.
1338 (i386_dr_low_get_addr): New.
1339 (i386_dr_low_set_control): Use update_debug_registers_callback.
1340 (i386_dr_low_get_control): New.
1341 (i386_dr_low_get_status): Adjust.
1342 * linux-low.c (linux_stop_lwp): New.
1343 * linux-low.h (linux_stop_lwp): Declare.
1344
1345 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
1346 argument instead of a i386_debug_reg_state.
1347 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
1348 a i386_debug_reg_state.
1349 (i386_insert_aligned_watchpoint): Adjust.
1350 (i386_remove_aligned_watchpoint): Adjust.
1351 (i386_low_stopped_data_address): Read the debug registers from the
1352 inferior instead of from the mirrors.
1353 * i386-low.h (struct i386_debug_reg_state): Extend comment.
1354 (i386_dr_low_get_addr): Declare.
1355 (i386_dr_low_get_control): Declare.
1356 (i386_dr_low_get_status): Change prototype.
1357
1358 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
1359 (i386_dr_low_get_addr): New.
1360 (i386_dr_low_get_control): New.
1361 (i386_dr_low_get_status): Adjust prototype. Return
1362 dr_status_mirror.
1363 (i386_initial_stuff): Clear dr_status_mirror and
1364 dr_control_mirror.
1365 (i386_get_thread_context): Adjust.
1366 (i386_set_thread_context): Adjust.
1367 (i386_thread_added): Adjust.
1368
5f21a75b
PA
13692010-08-24 Pedro Alves <pedro@codesourcery.com>
1370
1371 * linux-low.h (linux_thread_area): Delete declaration.
1372
3e4c1235
TS
13732010-08-11 Thomas Schwinge <thomas@codesourcery.com>
1374
1375 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
1376 after its termination.
1377
1971b033
PA
13782010-08-09 Pedro Alves <pedro@codesourcery.com>
1379
1380 * linux-low.c (gdb_wants_lwp_stopped): Delete.
1381 (gdb_wants_all_stopped): Delete.
1382 (linux_wait_1): Don't call them.
1383 * server.c (handle_v_cont): Tag all threads as want-stopped.
1384 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
1385 stopped as "client-wants-stopped".
1386
310444ac
PA
13872010-07-31 Pedro Alves <pedro@codesourcery.com>
1388
1389 * Makefile.in (signals_h): New.
1390 (server_h): Depend on it.
1391 (server.o): Don't depend on $(signals_def).
1392 (signals.o): Depend on $(signals_def).
1393
a19cae16
JK
13942010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
1395
1396 * Makefile.in (signals_def): New.
1397 (server_h): Append include/gdb/signals.h and signals_def.
1398 (server.o): Append signals_def.
1399
30d50328
JK
14002010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
1401
1402 * server.c (handle_target_event): Use target_signal_to_host for
1403 resume_info.sig initialization.
1404 * target.h (struct thread_resume) <sig>: New comment.
1405
5c3216e2
OS
14062010-07-20 Ozkan Sezer <sezeroz@gmail.com>
1407
c6f46ca0
OS
1408 * server.c (handle_query): strcpy() the returned string from paddress()
1409 instead of sprintf().
5c3216e2
OS
1410 * utils.c (paddress): Return phex_nz().
1411
6bd31874
JB
14122010-07-07 Joel Brobecker <brobecker@adacore.com>
1413
1414 * server.c (handle_v_cont): Call mourn_inferior if process
1415 just exited.
1416 (myresume): Likewise.
1417
0fb4aa4b
PA
14182010-07-01 Pedro Alves <pedro@codesourcery.com>
1419
1420 Static tracepoints, and integration with UST.
1421
1422 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
1423 * mem-break.c (uninsert_all_breakpoints)
1424 (reinsert_all_breakpoints): New.
1425 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
1426 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
1427 (gdb_agent_ust_loaded, helper_thread_id)
1428 (gdb_agent_helper_thread_id): New macros.
1429 (struct ipa_sym_addresses): Add addr_ust_loaded,
1430 addr_helper_thread_id, addr_cmd_buf.
1431 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
1432 (in_process_agent_loaded_ust): New.
1433 (write_e_ust_not_loaded): New.
1434 (maybe_write_ipa_ust_not_loaded): New.
1435 (struct collect_static_trace_data_action): New.
1436 (enum tracepoint_type) <static_tracepoint>: New.
1437 (struct tracepoint) <handle>: Mention static tracepoints.
1438 (struct static_tracepoint_ctx): New.
1439 (CMD_BUF_SIZE): New.
1440 (add_tracepoint_action): Handle static tracepoint actions.
1441 (unprobe_marker_at): New.
1442 (clear_installed_tracepoints): Handle static tracepoints.
1443 (cmd_qtdp): Handle static tracepoints.
1444 (probe_marker_at): New.
1445 (cmd_qtstart): Handle static tracepoints.
1446 (response_tracepoint): Handle static tracepoints.
1447 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
1448 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
1449 (get_context_regcache): Handle static tracepoints.
1450 (do_action_at_tracepoint): Handle static tracepoint actions.
1451 (traceframe_find_block_type): Handle static trace data blocks.
1452 (traceframe_read_sdata): New.
1453 (download_tracepoints): Download static tracepoint actions.
1454 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
1455 (GDB_PROBE_NAME): New.
1456 (ust_ops): New.
1457 (GET_UST_SYM): New.
1458 (USTF): New.
1459 (dlsym_ust): New.
1460 (ust_marker_to_static_tracepoint): New.
1461 (gdb_probe): New.
1462 (collect_ust_data_at_tracepoint): New.
1463 (gdb_ust_probe): New.
1464 (UNIX_PATH_MAX, SOCK_DIR): New.
1465 (gdb_ust_connect_sync_socket): New.
1466 (resume_thread, stop_thread): New.
1467 (run_inferior_command): New.
1468 (init_named_socket): New.
1469 (gdb_ust_socket_init): New.
1470 (cstr_to_hexstr): New.
1471 (next_st): New.
1472 (first_marker, next_marker): New.
1473 (response_ust_marker): New.
1474 (cmd_qtfstm, cmd_qtsstm): New.
1475 (unprobe_marker_at, probe_marker_at): New.
1476 (cmd_qtstmat, gdb_ust_thread): New.
1477 (gdb_ust_init): New.
1478 (initialize_tracepoint_ftlib): Call gdb_ust_init.
1479 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
1480 (ST_REGENTRY): New.
1481 (x86_64_st_collect_regmap): New.
1482 (X86_64_NUM_ST_COLLECT_GREGS): New.
1483 (AMD64_RIP_REGNUM): New.
1484 (supply_static_tracepoint_registers): New.
1485 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
1486 (ST_REGENTRY): New.
1487 (i386_st_collect_regmap): New.
1488 (i386_NUM_ST_COLLECT_GREGS): New.
1489 (supply_static_tracepoint_registers): New.
1490 * server.c (handle_query): Handle qXfer:statictrace:read.
1491 <qSupported>: Report support for StaticTracepoints, and
1492 qXfer:statictrace:read features.
1493 * server.h (traceframe_read_sdata)
1494 (supply_static_tracepoint_registers): Declare.
1495 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
1496 (unpack_varlen_hex): Include in IPA build.
1497 * Makefile.in (ustlibs, ustinc): New.
1498 (IPA_OBJS): Add remote-utils-ipa.o.
1499 ($(IPA_LIB)): Link -ldl and -lpthread.
1500 (UST_CFLAGS): New.
1501 (IPAGENT_CFLAGS): Add UST_CFLAGS.
1502 * config.in, configure: Regenerate.
1503
9e4344e5
PA
15042010-06-20 Ian Lance Taylor <iant@google.com>
1505 Pedro Alves <pedro@codesourcery.com>
1506
1507 * linux-x86-low.c (always_true): Delete.
1508 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
1509 trying to fool the compiler with always_true.
1510
c6beb2cb
PA
15112010-06-20 Pedro Alves <pedro@codesourcery.com>
1512
1513 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
1514 conditions in gdbserver.
1515
d2ed6730
UW
15162010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
1517
1518 * spu-low.c (spu_read_memory): Wrap around local store limit.
1519 (spu_write_memory): Likewise.
1520
4e29fb54
PA
15212010-06-15 Pedro Alves <pedro@codesourcery.com>
1522
1523 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
1524 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
1525 LONGEST uses.
1526 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
1527 uses.
1528 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
1529 uses with LONGEST uses.
1530
6a271cae
PA
15312010-06-14 Stan Shebs <stan@codesourcery.com>
1532 Pedro Alves <pedro@codesourcery.com>
1533
1534 Bytecode compiler.
1535
1536 * linux-x86-low.c: Include limits.h.
1537 (add_insns): New.
1538 (always_true): New.
1539 (EMIT_ASM): New.
1540 (EMIT_ASM32): New.
1541 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
1542 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
1543 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
1544 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
1545 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
1546 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
1547 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
1548 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
1549 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
1550 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
1551 (amd64_emit_void_call_2): New.
1552 (amd64_emit_ops): New.
1553 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
1554 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
1555 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
1556 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
1557 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
1558 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
1559 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
1560 (i386_emit_call, i386_emit_reg, i386_emit_pop)
1561 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
1562 (i386_emit_stack_adjust, i386_emit_int_call_1)
1563 (i386_emit_void_call_2): New.
1564 (i386_emit_ops): New.
1565 (x86_emit_ops): New.
1566 (the_low_target): Install x86_emit_ops.
1567 * server.h (struct emit_ops): New.
1568 (get_raw_reg_func_addr): Declare.
1569 (current_insn_ptr, emit_error): Declare.
1570 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
1571 (set_trace_state_variable_value): New defines.
1572 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
1573 addr_get_trace_state_variable_value and
1574 addr_set_trace_state_variable_value.
1575 (symbol_list): New fields for get_raw_reg,
1576 get_trace_state_variable_value and set_trace_state_variable_value.
1577 (condfn): New typedef.
1578 (struct tracepoint): New field `compiled_cond'.
1579 (do_action_at_tracepoint): Clear compiled_cond.
1580 (get_trace_state_variable_value, set_trace_state_variable_value):
1581 Export in the IPA.
1582 (condition_true_at_tracepoint): If there's a compiled condition,
1583 run that.
1584 (current_insn_ptr, emit_error): New globals.
1585 (struct bytecode_address): New.
1586 (get_raw_reg_func_addr): New.
1587 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
1588 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
1589 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
1590 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
1591 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
1592 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
1593 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
1594 (compile_tracepoint_condition, compile_bytecodes): New.
1595 * target.h (emit_ops): Forward declare.
1596 (struct target_ops): New field emit_ops.
1597 (target_emit_ops): New.
1598 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
1599 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
1600 * linux-low.c (linux_emit_ops): New.
1601 (linux_target_ops): Install it.
1602 * linux-low.h (struct linux_target_ops): New field emit_ops.
1603
92b72907
UW
16042010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
1605
1606 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
1607 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
1608
fa593d66
PA
16092010-06-01 Pedro Alves <pedro@codesourcery.com>
1610 Stan Shebs <stan@codesourcery.com>
1611
1612 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
1613 (all): Depend on $(extra_libraries).
1614 (install-only): Install the IPA.
1615 (IPA_OBJS, IPA_LIB): New.
1616 (clean): Remove the IPA lib.
1617 (IPAGENT_CFLAGS): New.
1618 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
1619 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
1620 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
1621 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
1622 * configure.ac: Check for atomic builtins support in the compiler.
1623 (IPA_DEPFILES, extra_libraries): Define.
1624 * configure.srv (ipa_obj): Add description.
1625 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
1626 (i[34567]86-*-linux*): Set ipa_obj.
1627 (x86_64-*-linux*): Set ipa_obj.
1628 * linux-low.c (stabilizing_threads): New.
1629 (supports_fast_tracepoints): New.
1630 (linux_detach): Stabilize threads before detaching.
1631 (handle_tracepoints): Handle internal tracing breakpoints. Assert
1632 the lwp is either not stabilizing, or is moving out of a jump pad.
1633 (linux_fast_tracepoint_collecting): New.
1634 (maybe_move_out_of_jump_pad): New.
1635 (enqueue_one_deferred_signal): New.
1636 (dequeue_one_deferred_signal): New.
1637 (linux_wait_for_event_1): If moving out of a jump pad, defer
1638 pending signals to later.
1639 (linux_stabilize_threads): New.
1640 (linux_wait_1): Check if threads need moving out of jump pads, and
1641 do it if so.
1642 (stuck_in_jump_pad_callback): New.
1643 (move_out_of_jump_pad_callback): New.
1644 (lwp_running): New.
1645 (linux_resume_one_lwp): Handle moving out of jump pads.
1646 (linux_set_resume_request): Dequeue deferred signals.
1647 (need_step_over_p): Also step over fast tracepoint jumps.
1648 (start_step_over): Also uninsert fast tracepoint jumps.
1649 (finish_step_over): Also reinsert fast tracepoint jumps.
1650 (linux_install_fast_tracepoint_jump): New.
1651 (linux_target_ops): Install linux_stabilize_threads and
1652 linux_install_fast_tracepoint_jump_pad.
1653 * linux-low.h (linux_target_ops) <get_thread_area,
1654 install_fast_tracepoint_jump_pad>: New fields.
1655 (struct lwp_info) <collecting_fast_tracepoint,
1656 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
1657 (linux_get_thread_area): Declare.
1658 * linux-x86-low.c (jump_insn): New.
1659 (x86_get_thread_area): New.
1660 (append_insns): New.
1661 (push_opcode): New.
1662 (amd64_install_fast_tracepoint_jump_pad): New.
1663 (i386_install_fast_tracepoint_jump_pad): New.
1664 (x86_install_fast_tracepoint_jump_pad): New.
1665 (the_low_target): Install x86_get_thread_area and
1666 x86_install_fast_tracepoint_jump_pad.
1667 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
1668 (struct fast_tracepoint_jump): New.
1669 (fast_tracepoint_jump_insn): New.
1670 (fast_tracepoint_jump_shadow): New.
1671 (find_fast_tracepoint_jump_at): New.
1672 (fast_tracepoint_jump_here): New.
1673 (delete_fast_tracepoint_jump): New.
1674 (set_fast_tracepoint_jump): New.
1675 (uninsert_fast_tracepoint_jumps_at): New.
1676 (reinsert_fast_tracepoint_jumps_at): New.
1677 (set_breakpoint_at): Use write_inferior_memory.
1678 (uninsert_raw_breakpoint): Use write_inferior_memory.
1679 (check_mem_read): Mask out fast tracepoint jumps.
1680 (check_mem_write): Mask out fast tracepoint jumps.
1681 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
1682 (set_fast_tracepoint_jump): Declare.
1683 (delete_fast_tracepoint_jump)
1684 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
1685 (reinsert_fast_tracepoint_jumps_at): Declare.
1686 * regcache.c: Don't compile many functions when building the
1687 in-process agent library.
1688 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
1689 the register buffer in the heap.
1690 (free_register_cache): If the register buffer isn't owned by the
1691 regcache, don't free it.
1692 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
1693 pre-existing register caches.
1694 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
1695 type.
1696 (convert_ascii_to_int): : Constify `from' parameter type.
1697 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
1698 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
1699 the needed buffer in-place.
1700 (relocate_instruction): New.
1701 * server.c (handle_query) <qSymbols>: If the target supports
1702 tracepoints, give it a chance of looking up symbols. Report
1703 support for fast tracepoints.
1704 (handle_status): Stabilize threads.
1705 (process_serial_event): Adjust.
1706 * server.h (struct fast_tracepoint_jump): Forward declare.
1707 (struct process_info) <fast_tracepoint_jumps>: New field.
1708 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
1709 (decode_X_packet, decode_M_packet): Adjust.
1710 (relocate_instruction): Declare.
1711 (in_process_agent_loaded): Declare.
1712 (tracepoint_look_up_symbols): Declare.
1713 (struct fast_tpoint_collect_status): Declare.
1714 (fast_tracepoint_collecting): Declare.
1715 (force_unlock_trace_buffer): Declare.
1716 (handle_tracepoint_bkpts): Declare.
1717 (initialize_low_tracepoint)
1718 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
1719 * target.h (struct target_ops) <stabilize_threads,
1720 install_fast_tracepoint_jump_pad>: New fields.
1721 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
1722 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
1723 [HAVE_STDINT_H]: Include stdint.h.
1724 (trace_debug_1): Rename to ...
1725 (trace_vdebug): ... this.
1726 (trace_debug): Rename to ...
1727 (trace_debug_1): ... this. Add `level' parameter.
1728 (trace_debug): New.
1729 (ATTR_USED, ATTR_NOINLINE): New.
1730 (IP_AGENT_EXPORT): New.
1731 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1732 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
1733 (about_to_request_buffer_space, trace_buffer_is_full)
1734 (stopping_tracepoint, expr_eval_result, error_tracepoint)
1735 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
1736 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
1737 (traceframe_write_count, traceframes_created)
1738 (trace_state_variables)
1739 New renaming defines.
1740 (struct ipa_sym_addresses): New.
1741 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
1742 (symbol_list): New.
1743 (ipa_sym_addrs): New.
1744 (all_tracepoint_symbols_looked_up): New.
1745 (in_process_agent_loaded): New.
1746 (write_e_ipa_not_loaded): New.
1747 (maybe_write_ipa_not_loaded): New.
1748 (tracepoint_look_up_symbols): New.
1749 (debug_threads) [IN_PROCESS_AGENT]: New.
1750 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
1751 (UNKNOWN_SIDE_EFFECTS): New.
1752 (stop_tracing): New.
1753 (flush_trace_buffer): New.
1754 (stop_tracing_bkpt): New.
1755 (flush_trace_buffer_bkpt): New.
1756 (read_inferior_integer): New.
1757 (read_inferior_uinteger): New.
1758 (read_inferior_data_pointer): New.
1759 (write_inferior_data_pointer): New.
1760 (write_inferior_integer): New.
1761 (write_inferior_uinteger): New.
1762 (struct collect_static_trace_data_action): Delete.
1763 (enum tracepoint_type): New.
1764 (struct tracepoint) <type>: New field `type'.
1765 <actions_str, step_actions, step_actions_str>: Only include in GDBserver.
1766 <orig_size, obj_addr_on_target, adjusted_insn_addr>
1767 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
1768 (tracepoints): Use IP_AGENT_EXPORT.
1769 (last_tracepoint): Don't include in the IPA.
1770 (stopping_tracepoint): Use IP_AGENT_EXPORT.
1771 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
1772 (alloced_trace_state_variables): New.
1773 (trace_state_variables): Use IP_AGENT_EXPORT.
1774 (traceframe_t): Delete unused variable.
1775 (circular_trace_buffer): Don't include in the IPA.
1776 (trace_buffer_start): Delete.
1777 (struct trace_buffer_control): New.
1778 (trace_buffer_free): Delete.
1779 (struct ipa_trace_buffer_control): New.
1780 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
1781 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
1782 New.
1783 (trace_buffer_ctrl): New.
1784 (TRACE_BUFFER_CTRL_CURR): New.
1785 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
1786 Reimplement as macros.
1787 (trace_buffer_wrap): Delete.
1788 (traceframe_write_count, traceframe_read_count)
1789 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
1790 (struct tracepoint_hit_ctx) <type>: New field.
1791 (struct fast_tracepoint_ctx): New.
1792 (memory_barrier): New.
1793 (cmpxchg): New.
1794 (record_tracepoint_error): Update atomically in the IPA.
1795 (clear_inferior_trace_buffer): New.
1796 (about_to_request_buffer_space): New.
1797 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
1798 updating the same buffer.
1799 (add_tracepoint): Default the tracepoint's type to trap
1800 tracepoint, and orig_size to -1.
1801 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
1802 internal variables.
1803 (create_trace_state_variable): New parameter `gdb'. Handle it.
1804 (clear_installed_tracepoints): Clear fast tracepoint jumps.
1805 (cmd_qtdp): Handle fast tracepoints.
1806 (cmd_qtdv): Adjust.
1807 (max_jump_pad_size): New.
1808 (gdb_jump_pad_head): New.
1809 (get_jump_space_head): New.
1810 (claim_jump_space): New.
1811 (sort_tracepoints): New.
1812 (MAX_JUMP_SIZE): New.
1813 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
1814 IPA.
1815 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
1816 support. Upload fast traceframes, and delete internal IPA
1817 breakpoints.
1818 (stop_tracing_handler): New.
1819 (flush_trace_buffer_handler): New.
1820 (cmd_qtstop): Upload fast tracepoints.
1821 (response_tracepoint): Handle fast tracepoints.
1822 (tracepoint_finished_step): Upload fast traceframes. Set the
1823 tracepoint hit context's tracepoint type.
1824 (handle_tracepoint_bkpts): New.
1825 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
1826 type. Add comment about fast tracepoints.
1827 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
1828 non-existing action_str field.
1829 (get_context_regcache): Handle fast tracepoints.
1830 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
1831 to the regcache.
1832 (fast_tracepoint_from_jump_pad_address): New.
1833 (fast_tracepoint_from_ipa_tpoint_address): New.
1834 (collecting_t): New.
1835 (force_unlock_trace_buffer): New.
1836 (fast_tracepoint_collecting): New.
1837 (collecting): New.
1838 (gdb_collect): New.
1839 (write_inferior_data_ptr): New.
1840 (target_tp_heap): New.
1841 (target_malloc): New.
1842 (download_agent_expr): New.
1843 (UALIGN): New.
1844 (download_tracepoints): New.
1845 (download_trace_state_variables): New.
1846 (upload_fast_traceframes): New.
1847 (IPA_FIRST_TRACEFRAME): New.
1848 (IPA_NEXT_TRACEFRAME_1): New.
1849 (IPA_NEXT_TRACEFRAME): New.
1850 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
1851 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
1852 (gdb_jump_pad_buffer_end): New.
1853 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
1854 (initialize_tracepoint): Adjust.
1855 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
1856 buffer. Initialize the low module.
1857 * utils.c (PREFIX, TOOLNAME): New.
1858 (malloc_failure): Use PREFIX.
1859 (error): In the IPA, an error causes an exit.
1860 (fatal, warning): Use PREFIX.
1861 (internal_error): Use TOOLNAME.
1862 (NUMCELLS): Increase to 10.
1863 * configure, config.in: Regenerate.
1864
d149dd1d
PA
18652010-06-01 Pedro Alves <pedro@codesourcery.com>
1866
1867 * server.c (handle_query) <qSupported>: Do two passes over the
1868 qSupported string to avoid nesting strtok.
1869
f6528abd
JK
18702010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1871
1872 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
1873 (CDEPS): New.
1874 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
1875 -Wl,--dynamic-list.
1876 * configure: Regenerate.
1877 * proc-service.list: New.
1878
ca2a87a0
JK
18792010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1880
1881 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
1882 New comment.
1883
363a6e9f
OS
18842010-05-26 Ozkan Sezer <sezeroz@gmail.com>
1885
1886 * gdbreplay.c (remote_open): Check error return from socket() call by
1887 its equality to -1 not by it being negative.
1888 * remote-utils.c (remote_open): Likewise.
1889
d23b6cb1
PA
18902010-05-23 Pedro Alves <pedro@codesourcery.com>
1891
1892 * config.h: Regenerate.
1893
28d3cf85
MK
18942010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
1895
1896 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
1897 doesn't provide PTRACE_GET_THREAD_AREA.
1898
fea36a59
MK
18992010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
1900
1901 * linux-m68k-low.c: Include <asm/ptrace.h>
1902 (ps_get_thread_area): Implement.
1903
24b066ba
DE
19042010-05-03 Doug Evans <dje@google.com>
1905
1906 * event-loop.c (struct callback_event): New struct.
1907 (callback_list): New global.
1908 (append_callback_event, delete_callback_event): New functions.
1909 (process_callback): New function.
1910 (start_event_loop): Call it.
1911 * remote-utils.c (NOT_SCHEDULED): Define.
1912 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
1913 moved out of readchar.
1914 (readchar): Rewrite. Call reschedule before returning.
1915 (reset_readchar): New function.
1916 (remote_close): Call it.
1917 (process_remaining, reschedule): New functions.
1918 * server.h (callback_handler_func): New typedef.
1919 (append_callback_event, delete_callback_event): Declare.
1920
9836d6ea
PA
19212010-05-03 Pedro Alves <pedro@codesourcery.com>
1922
1923 * proc-service.c (ps_pglobal_lookup): Use
1924 thread_db_look_up_one_symbol.
1925 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
1926 parameter. Use it instead of all_symbols_looked_up.
1927 * server.h (struct process_info) <all_symbols_looked_up>: Delete
1928 field.
1929 (all_symbols_looked_up): Don't declare.
1930 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
1931 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
1932 field.
1933 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
1934 Set all_symbols_looked_up here.
1935 (thread_db_look_up_one_symbol): New.
1936 (thread_db_get_tls_address): Adjust.
1937 (thread_db_load_search, try_thread_db_load_1): Always allocate the
1938 thread_db object on the heap, and tentatively set it in the
1939 process structure.
1940 (thread_db_init): Don't set all_symbols_looked_up here.
1941 * linux-low.h (thread_db_look_up_one_symbol): Declare.
1942
7984d532
PA
19432010-05-03 Pedro Alves <pedro@codesourcery.com>
1944
1945 * linux-low.c (linux_kill, linux_detach): Adjust.
1946 (status_pending_p_callback): Remove redundant statement. Check
1947 for !TARGET_WAITIKIND_IGNORE, instead of
1948 TARGET_WAITKIND_STOPPED.
1949 (handle_tracepoints): Make sure LWP is locked. Adjust.
1950 (linux_wait_for_event_1): Adjust.
1951 (linux_cancel_breakpoints): New.
1952 (unsuspend_one_lwp): New.
1953 (unsuspend_all_lwps): New.
1954 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
1955 (send_sigstop_callback): Change return type to int, add new
1956 `except' parameter and handle it.
1957 (suspend_and_send_sigstop_callback): New.
1958 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
1959 pass them down. If SUSPEND, also increment the lwp's suspend
1960 count.
1961 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
1962 (need_step_over_p): Don't consider suspended LWPs.
1963 (start_step_over): Adjust.
1964 (proceed_one_lwp): Change return type to int, add new `except'
1965 parameter and handle it.
1966 (unsuspend_and_proceed_one_lwp): New.
1967 (proceed_all_lwps): Use find_inferior instead of
1968 for_each_inferior.
1969 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
1970 also decrement the suspend count of LWPs. Pass `except' down,
1971 instead of hacking its suspend count.
1972 (linux_pause_all): Add `freeze' parameter. Adjust.
1973 (linux_unpause_all): New.
1974 (linux_target_ops): Install linux_unpause_all.
1975 * server.c (handle_status): Adjust.
1976 * target.h (struct target_ops): New fields `unpause_all' and
1977 `cancel_breakpoints'. Add new parameter to `pause_all'.
1978 (pause_all): Add new `freeze' parameter.
1979 (unpause_all): New.
1980 (cancel_breakpoints): New.
1981 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
1982 cancel breakpoints.
1983 (cmd_qtstart): Pause threads.
1984 (stop_tracing): Pause threads, and cancel breakpoints.
1985 * win32-low.c (win32_target_ops): Adjust.
1986
e471f25b
PA
19872010-05-03 Pedro Alves <pedro@codesourcery.com>
1988
1989 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
1990 the inferior right away from here...
1991 (linux_wait_1): ... to here, and adjust to check the thread's
1992 last_resume_kind instead of the lwp's step or stop_expected flags.
1993
1915ef4f
PA
19942010-05-02 Pedro Alves <pedro@codesourcery.com>
1995
1996 * README: Use consistent `GDB' and `GDBserver' spellings.
1997
f9e39928
PA
19982010-05-02 Pedro Alves <pedro@codesourcery.com>
1999
2000 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
2001 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
2002 (linux_detach_one_lwp): Assume the lwp is stopped.
2003 (any_thread_of): Delete.
2004 (linux_detach): Stop all lwps here. Don't blindly delete all
2005 breakpoints.
2006 (delete_lwp_callback): New.
2007 (linux_mourn): Delete all lwps of the process that is gone.
2008 (linux_wait_1): Don't delete the last lwp of the process here.
2009 * mem-break.h (mark_breakpoints_out): Declare.
2010 * mem-break.c (mark_breakpoints_out): New.
2011 (free_all_breakpoints): Use it.
2012 * server.c (handle_target_event): If the process is gone, mark
2013 breakpoints out.
2014 * thread-db.c (struct thread_db) <create_bp>: New field.
2015 (thread_db_enable_reporting): Fix prototype. Store a thread event
2016 breakpoint reference in the thread_db struct.
2017 (thread_db_load_search): Clear the thread_db object.
2018 (try_thread_db_load_1): Ditto.
2019 (switch_to_process): New.
2020 (disable_thread_event_reporting): Use it.
2021 (remove_thread_event_breakpoints): New.
2022 (thread_db_detach, thread_db_mourn): Use it.
2023
1e7fc18c
PA
20242010-05-01 Pedro Alves <pedro@codesourcery.com>
2025
2026 * linux-low.c (linux_enable_event_reporting): New.
2027 (linux_wait_for_event_1, handle_extended_wait): Use it.
2028
02fc4de7
PA
20292010-04-30 Pedro Alves <pedro@codesourcery.com>
2030
2031 * linux-low.c (linux_kill_one_lwp, linux_kill)
2032 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
2033 (send_sigstop): Take an lwp_info as parameter instead. Queue a
2034 SIGSTOP even if the LWP is stopped.
2035 (send_sigstop_callback): New.
2036 (stop_all_lwps): Use send_sigstop_callback instead.
2037 (linux_resume_one_thread): Adjust.
2038 (proceed_one_lwp): Still proceed an LWP that the client has
2039 requested to stop, if we haven't reported it as stopped yet. Make
2040 sure that LWPs the client want stopped, have a pending SIGSTOP.
2041
bc3b5632
DE
20422010-04-26 Doug Evans <dje@google.com>
2043
ae1ada35
DE
2044 * server.c (handle_general_set): Make static.
2045
bc3b5632
DE
2046 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
2047 Print received char after testing for error/eof instead of before.
2048 (input_interrupt): Tweak comment.
2049
65730243
DE
20502010-04-23 Doug Evans <dje@google.com>
2051
2052 * server.c (start_inferior): Print inferior argv if --debug.
2053
a8ae7dc0
AR
20542010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
2055
2056 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
2057 * nto-x86-low.c: Include server.h
2058
1c07cc19
PM
20592010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
2060
2061 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
2062 be consistent with other sources of this directory.
2063 (init_registers_amd64): Correct name of source file of this function
2064 in the comment.
2065
e0a61e09
PM
20662010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
2067
2068 * configure.srv (x86_64-*-mingw*): New configuration for Windows
2069 64-bit executables.
2070
54709339
PM
20712010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
2072
2073 * win32-i386-low.c: Add 64-bit support.
2074 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
2075 (init_registers_amd64): Declare.
2076 (mappings): Add 64-bit version of array.
2077 (init_windows_x86): New function.
2078 (the_low_target): Change init_arch field to init_windows_x86.
2079
e8f0053d
PM
20802010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
2081
2082 * win32-low.c: Adapt to support also 64-bit architecture.
2083 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
2084 (get_image_name): Use SIZE_T type for local variable `done'.
2085 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
2086 (toolhelp_get_dll_name): Idem.
2087 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
2088 Use uintptr_t typecast to avoid warning.
2089 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
2090 (handle_exception): Use phex_nz to avoid warning.
2091 (win32_wait): Remove unused local variable `process'.
2092
c481e77e
PM
20932010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
2094
2095 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
2096 `amd64-avx.o'.
2097
12ea4b69
PM
20982010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
2099
2100 * configure.ac: Use `ws2_32' library for srv_mingw.
2101 * configure: Regenerate.
2102 * gdbreplay.c: Include winsock2.h instead of winsock.h.
2103 * remote-utils.c: Likewise.
2104
f6d1620c
L
21052010-04-17 H.J. Lu <hongjiu.lu@intel.com>
2106
2107 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
2108 if __x86_64__ is defined.
2109
8e642873
PM
21102010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
2111
2112 * configure: Regenerate.
2113
711e434b
PM
21142010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
2115
2116 * server.c (handle_query): Handle 'qGetTIBAddr' query.
2117 * target.h (target_ops): New get_tib_address field.
2118 * win32-low.h (win32_thread_info): Add thread_local_base field.
2119 * win32-low.c (child_add_thread): Add tlb argument.
2120 Set thread_local_base field to TLB.
2121 (get_child_debug_event): Adapt to child_add_thread change.
2122 (win32_get_tib_address): New function.
2123 (win32_target_ops): Set get_tib_address field to
2124 win32_get_tib_address.
2125 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
2126
505106cd
PA
21272010-04-12 Pedro Alves <pedro@codesourcery.com>
2128
505106cd
PA
2129 * linux-low.c (linux_mourn): Also remove the process.
2130 * server.c (handle_target_event): Don't remove the process here.
2131 * nto-low.c (nto_mourn): New.
2132 (nto_target_ops): Install it.
2133 * spu-low.c (spu_mourn): New.
2134 (spu_target_ops): Install it.
2135 * win32-low.c (win32_mourn): New.
2136 (win32_target_ops): Install it.
2137
e8470a06
PA
21382010-04-12 Pedro Alves <pedro@codesourcery.com>
2139
2140 * server.h (buffer_xml_printf): Remove redundant `;'.
2141
45ba0d02
PA
21422010-04-12 Pedro Alves <pedro@codesourcery.com>
2143
2144 * regcache.c (set_register_cache): Invalidate regcaches before
2145 changing the register cache layout.
2146 (regcache_invalidate_one): Allow a NULL regcache.
2147 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
2148 regcaches before changing the register cache layout or the target
2149 regsets.
2150
59e04013
L
21512010-04-12 H.J. Lu <hongjiu.lu@intel.com>
2152
2153 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
2154 variable warning on Linux/x86-64.
2155
8336d594
PA
21562010-04-11 Pedro Alves <pedro@codesourcery.com>
2157
2158 GDBserver disconnected tracing support.
2159
2160 * linux-low.c (linux_remove_process): Delete.
2161 (add_lwp): Don't set last_resume_kind here.
2162 (linux_kill): Use `mourn'.
2163 (linux_detach): Use `thread_db_detach', and `mourn'.
2164 (linux_mourn): New.
2165 (linux_attach_lwp_1): Adjust comment.
2166 (linux_attach): last_resume_kind moved the thread_info; adjust.
2167 (status_pending_p_callback): Adjust.
2168 (linux_wait_for_event_1): Adjust.
2169 (count_events_callback, select_singlestep_lwp_callback)
2170 (select_event_lwp_callback, cancel_breakpoints_callback)
2171 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
2172 (proceed_one_lwp): Adjust.
2173 (linux_async): Add debug output.
2174 (linux_thread_stopped): New.
2175 (linux_pause_all): New.
2176 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
2177 linux_pause_all.
2178 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
2179 (thread_db_free): Delete declaration.
2180 (thread_db_detach, thread_db_mourn): Declare.
2181 * thread-db.c (thread_db_init): Use thread_db_mourn.
2182 (thread_db_free): Delete, split in two.
2183 (disable_thread_event_reporting): New.
2184 (thread_db_detach): New.
2185 (thread_db_mourn): New.
2186
2187 * server.h (struct thread_info) <last_resume_kind>: New field.
2188 <attached>: Add comment.
2189 <gdb_detached>: New field.
2190 (handler_func): Change return type to int.
2191 (handle_serial_event, handle_target_event): Ditto.
2192 (gdb_connected): Declare.
2193 (tracing): Delete.
2194 (disconnected_tracing): Declare.
2195 (stop_tracing): Declare.
2196
2197 * server.c (handle_query) <qSupported>: Report support for
2198 disconnected tracing.
2199 (queue_stop_reply_callback): Account for running threads.
2200 (gdb_wants_thread_stopped): New.
2201 (gdb_wants_all_threads_stopped): New.
2202 (gdb_reattached_process): New.
2203 (handle_status): Clear the `gdb_detached' flag of all processes.
2204 In all-stop, stop all threads.
2205 (main): Be sure to leave tfind mode. Handle disconnected tracing.
2206 (process_serial_event): If the remote connection breaks, or if an
2207 exit was forced with "monitor exit", force an event loop exit.
2208 Handle disconnected tracing on detach.
2209 (handle_serial_event): Adjust.
2210 (handle_target_event): If GDB isn't connected, forward events back
2211 to the inferior, unless the last process exited, in which case,
2212 exit gdbserver. Adjust interface.
2213
2214 * remote-utils.c (remote_open): Don't block in accept. Instead
2215 register an event loop source on the listen socket file
2216 descriptor. Refactor bits into ...
2217 (listen_desc): ... this new global.
2218 (gdb_connected): ... this new function.
2219 (enable_async_notification): ... this new function.
2220 (handle_accept_event): ... this new function.
2221 (remote_close): Clear remote_desc.
2222
2223 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
2224
2225 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
2226 New fields.
2227 (mourn_inferior): Define.
2228 (target_process_qsupported): Avoid the dangling else problem.
2229 (thread_stopped): Define.
2230 (pause_all): Define.
2231 (target_waitstatus_to_string): Declare.
2232 * target.c (target_waitstatus_to_string): New.
2233
2234 * tracepoint.c (tracing): Make extern.
2235 (disconnected_tracing): New.
2236 (stop_tracing): Make extern. Handle tracing stops due to GDB
2237 disconnecting.
2238 (cmd_qtdisconnected): New.
2239 (cmd_qtstatus): Report disconnected tracing status in trace reply.
2240 (handle_tracepoint_general_set): Handle QTDisconnected.
2241
2242 * event-loop.c (event_handler_func): Change return type to int.
2243 (process_event): Bail out if the event handler wants the event
2244 loop to stop.
2245 (handle_file_event): Ditto.
2246 (start_event_loop): Bail out if the event handler wants the event
2247 loop to stop.
2248
2249 * nto-low.c (nto_target_ops): Adjust.
2250 * spu-low.c (spu_wait): Don't remove the process here.
2251 (spu_target_ops): Adjust.
2252 * win32-low.c (win32_wait): Don't remove the process here.
2253 (win32_target_ops): Adjust.
2254
5d267c4c
PA
22552010-04-11 Pedro Alves <pedro@codesourcery.com>
2256
2257 * regcache.c (realloc_register_cache): Invalidate inferior's
2258 regcache before recreating it.
2259
623ccd72
PA
22602010-04-09 Pedro Alves <pedro@codesourcery.com>
2261
2262 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
2263
219f2f23
PA
22642010-04-09 Stan Shebs <stan@codesourcery.com>
2265 Pedro Alves <pedro@codesourcery.com>
2266
2267 * server.h (LONGEST): New.
2268 (struct thread_info) <while_stepping>: New field.
2269 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
2270 Declare.
2271 (initialize_tracepoint, handle_tracepoint_general_set)
2272 (handle_tracepoint_query, tracepoint_finished_step)
2273 (tracepoint_was_hit, release_while_stepping_state_list):
2274 (current_traceframe): Declare.
2275 * server.c (handle_general_set): Handle tracepoint packets.
2276 (read_memory): New.
2277 (write_memory): New.
2278 (handle_search_memory_1): Use read_memory.
2279 (handle_query): Report support for conditional tracepoints, trace
2280 state variables, and tracepoint sources. Handle tracepoint
2281 queries.
2282 (main): Initialize the tracepoints module.
2283 (process_serial_event): Handle traceframe reads/writes.
2284
2285 * linux-low.c (handle_tracepoints): New.
2286 (linux_wait_1): Call it.
2287 (linux_resume_one_lwp): Handle while-stepping.
2288 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
2289 (linux_target_ops): Install them.
2290 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
2291 New field.
2292 * linux-x86-low.c (x86_supports_tracepoints): New.
2293 (the_low_target). Install it.
2294
2295 * mem-break.h (delete_breakpoint): Declare.
2296 * mem-break.c (delete_breakpoint): Make external.
2297
2298 * target.h (struct target_ops): Add `supports_tracepoints',
2299 `read_pc', and `write_pc' fields.
2300 (target_supports_tracepoints): Define.
2301 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
2302 (phex_nz): New.
2303
2304 * regcache.h (struct regcache) <registers_owned>: New field.
2305 (init_register_cache, regcache_cpy): Declare.
2306 (regcache_read_pc, regcache_write_pc): Declare.
2307 (register_cache_size): Declare.
2308 (supply_regblock): Declare.
2309 * regcache.c (init_register_cache): New.
2310 (new_register_cache): Use it.
2311 (regcache_cpy): New.
2312 (register_cache_size): New.
2313 (supply_regblock): New.
2314 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 2315
219f2f23
PA
2316 * tracepoint.c: New.
2317
2318 * Makefile.in (OBS): Add tracepoint.o.
2319 (tracepoint.o): New rule.
2320
3a13a53b
L
23212010-04-08 H.J. Lu <hongjiu.lu@intel.com>
2322
2323 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
2324 (i386-mmx.o): New.
2325 (i386-mmx.c): Likewise.
2326 (i386-mmx-linux.o): Likewise.
2327 (i386-mmx-linux.c): Likewise.
2328
2329 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
2330 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
2331 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
2332 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
2333
2334 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
2335 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
2336 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
2337
1570b33e
L
23382010-04-07 H.J. Lu <hongjiu.lu@intel.com>
2339
2340 * Makefile.in (clean): Updated.
2341 (i386-avx.o): New.
2342 (i386-avx.c): Likewise.
2343 (i386-avx-linux.o): Likewise.
2344 (i386-avx-linux.c): Likewise.
2345 (amd64-avx.o): Likewise.
2346 (amd64-avx.c): Likewise.
2347 (amd64-avx-linux.o): Likewise.
2348 (amd64-avx-linux.c): Likewise.
2349
2350 * configure.srv (srv_i386_regobj): Add i386-avx.o.
2351 (srv_i386_linux_regobj): Add i386-avx-linux.o.
2352 (srv_amd64_regobj): Add amd64-avx.o.
2353 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
2354 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
2355 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
2356 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
2357 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
2358 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
2359 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
2360
2361 * i387-fp.c: Include "i386-xstate.h".
2362 (i387_xsave): New.
2363 (i387_cache_to_xsave): Likewise.
2364 (i387_xsave_to_cache): Likewise.
2365 (x86_xcr0): Likewise.
2366
2367 * i387-fp.h (i387_cache_to_xsave): Likewise.
2368 (i387_xsave_to_cache): Likewise.
2369 (x86_xcr0): Likewise.
2370
2371 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
2372 * linux-crisv32-low.c (target_regsets): Likewise.
2373 * linux-m68k-low.c (target_regsets): Likewise.
2374 * linux-mips-low.c (target_regsets): Likewise.
2375 * linux-ppc-low.c (target_regsets): Likewise.
2376 * linux-s390-low.c (target_regsets): Likewise.
2377 * linux-sh-low.c (target_regsets): Likewise.
2378 * linux-sparc-low.c (target_regsets): Likewise.
2379 * linux-xtensa-low.c (target_regsets): Likewise.
2380
2381 * linux-low.c: Include <sys/uio.h>.
2382 (regsets_fetch_inferior_registers): Support nt_type.
2383 (regsets_store_inferior_registers): Likewise.
2384 (linux_process_qsupported): New.
2385 (linux_target_ops): Add linux_process_qsupported.
2386
2387 * linux-low.h (regset_info): Add nt_type.
2388 (linux_target_ops): Add process_qsupported.
2389
2390 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
2391 and <sys/uio.h>.
2392 (init_registers_i386_avx_linux): New.
2393 (init_registers_amd64_avx_linux): Likewise.
2394 (xmltarget_i386_linux_no_xml): Likewise.
2395 (xmltarget_amd64_linux_no_xml): Likewise.
2396 (PTRACE_GETREGSET): Likewise.
2397 (PTRACE_SETREGSET): Likewise.
2398 (x86_fill_xstateregset): Likewise.
2399 (x86_store_xstateregset): Likewise.
2400 (use_xml): Likewise.
2401 (x86_linux_update_xmltarget): Likewise.
2402 (x86_linux_process_qsupported): Likewise.
2403 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
2404 (x86_arch_setup): Don't call init_registers_amd64_linux nor
2405 init_registers_i386_linux here. Call
2406 x86_linux_update_xmltarget.
2407 (the_low_target): Add x86_linux_process_qsupported.
2408
2409 * server.c (handle_query): Call target_process_qsupported.
2410
2411 * target.h (target_ops): Add process_qsupported.
2412 (target_process_qsupported): New.
2413
fc7238bb
PA
24142010-04-03 Pedro Alves <pedro@codesourcery.com>
2415
2416 * inferiors.c (add_thread): Set last_status kind to
2417 TARGET_WAITKIND_IGNORE.
2418 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
2419 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
2420 (linux_wait_1): Move `thread' local definition to block that uses
2421 it. Don't NULL initialize `event_child'.
2422 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
2423 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
2424 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
2425
bdabb078
PA
24262010-04-01 Pedro Alves <pedro@codesourcery.com>
2427
2428 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
2429 an extended waitstatus, or by a watchpoint.
2430 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
2431 thread was stepping or has been stopped by a watchpoint.
2432
d3bbe7a0
PA
24332010-04-01 Pedro Alves <pedro@codesourcery.com>
2434
2435 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
2436 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
2437 of another, then delete the previous, and validate all
2438 breakpoints.
2439 (validate_inserted_breakpoint): New.
2440 (delete_disabled_breakpoints): New.
2441 (validate_breakpoints): New.
2442 (check_mem_read): Validate breakpoints before trusting their
2443 shadow. Delete disabled breakpoints.
2444 (check_mem_write): Validate breakpoints before trusting they
2445 should be inserted. Delete disabled breakpoints.
2446 * mem-break.h (validate_breakpoints):
2447 * server.c (handle_query): Validate breakpoints when we see a
2448 qSymbol query.
2449
8b07ae33
PA
24502010-04-01 Pedro Alves <pedro@codesourcery.com>
2451
2452 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
2453 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
2454 if we could tell there's a GDB breakpoint at stop_pc.
2455 (need_step_over_p): Don't do a step over if we find a GDB
2456 breakpoint at the resume PC.
2457
2458 * mem-break.c (struct raw_breakpoint): New.
2459 (enum bkpt_type): New type `gdb_breakpoint'.
2460 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
2461 fields. New field `raw'.
2462 (find_raw_breakpoint_at): New.
2463 (set_raw_breakpoint_at): Handle refcounting. Create a raw
2464 breakpoint instead.
2465 (set_breakpoint_at): Adjust.
2466 (delete_raw_breakpoint): New.
2467 (release_breakpoint): New.
2468 (delete_breakpoint): Rename to...
2469 (delete_breakpoint_1): ... this. Add proc parameter. Use
2470 release_breakpoint. Return ENOENT.
2471 (delete_breakpoint): Reimplement.
2472 (find_breakpoint_at): Delete.
2473 (find_gdb_breakpoint_at): New.
2474 (delete_breakpoint_at): Delete.
2475 (set_gdb_breakpoint_at): New.
2476 (delete_gdb_breakpoint_at): New.
2477 (gdb_breakpoint_here): New.
2478 (set_reinsert_breakpoint): Use release_breakpoint.
2479 (uninsert_breakpoint): Rename to ...
2480 (uninsert_raw_breakpoint): ... this.
2481 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
2482 (reinsert_raw_breakpoint): Change parameter type to
2483 raw_breakpoint.
2484 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
2485 instead.
2486 (check_breakpoints): Adjust. Use release_breakpoint.
2487 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
2488 (breakpoint_inserted_here): Ditto.
2489 (check_mem_read): Adjust to iterate over raw breakpoints instead.
2490 Don't trust the breakpoint's shadow if it is not inserted.
2491 (check_mem_write): Adjust to iterate over raw breakpoints instead.
2492 (delete_all_breakpoints): Adjust.
2493 (free_all_breakpoints): Mark all breakpoints as uninserted, and
2494 use delete_breakpoint_1.
2495
2496 * mem-break.h (breakpoints_supported): Delete declaration.
2497 (set_gdb_breakpoint_at): Declare.
2498 (gdb_breakpoint_here): Declare.
2499 (delete_breakpoint_at): Delete.
2500 (delete_gdb_breakpoint_at): Declare.
2501
2502 * server.h (struct raw_breakpoint): Forward declare.
2503 (struct process_info): New field `raw_breakpoints'.
2504
2505 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
2506 breakpoints.
2507
6bf5e0ba
PA
25082010-03-24 Pedro Alves <pedro@codesourcery.com>
2509
2510 * linux-low.c (status_pending_p_callback): Fix comment.
2511 (linux_wait_for_event_1): Move most of the internal breakpoint
2512 handling from here...
2513 (linux_wait_1): ... to here.
2514 (count_events_callback): New.
2515 (select_singlestep_lwp_callback): New.
2516 (select_event_lwp_callback): New.
2517 (cancel_breakpoints_callback): New.
2518 (select_event_lwp): New.
2519 (linux_wait_1): Simplify internal breakpoint handling. Give equal
2520 priority to all LWPs that have had events that should be reported
2521 to the client. Cancel breakpoints when about to reporting the
2522 event to the client, not while stopping lwps. No longer cancel
2523 finished single-steps here.
2524 (cancel_finished_single_step): Delete.
2525 (cancel_finished_single_steps): Delete.
2526
414a389f
PA
25272010-03-24 Pedro Alves <pedro@codesourcery.com>
2528
2529 * mem-break.c (enum bkpt_type): New.
2530 (struct breakpoint): New field `type'.
2531 (set_breakpoint_at): Change return type to struct breakpoint
2532 pointer. Set type to `other_breakpoint' by default.
2533 (delete_breakpoint): Rewrite, supporting more than one breakpoint
2534 in the breakpoint list.
2535 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
2536 (reinsert_breakpoint): Rename to ...
2537 (reinsert_raw_breakpoint): ... this.
2538 (reinsert_breakpoints_at): Adjust.
2539 * mem-break.h (struct breakpoint): Declare.
2540 (set_breakpoint_at): Change return type to struct breakpoint
2541 pointer.
2542
2280c721
PA
25432010-03-24 Pedro Alves <pedro@codesourcery.com>
2544
2545 * server.c (handle_query): Assign, not compare.
2546
d50171e4
PA
25472010-03-24 Pedro Alves <pedro@codesourcery.com>
2548
2549 Teach linux gdbserver to step-over-breakpoints.
2550
2551 * linux-low.c (can_hardware_single_step): New.
2552 (supports_breakpoints): New.
2553 (handle_extended_wait): If stopping threads, read the stop pc of
2554 the new cloned LWP.
2555 (get_pc): New.
2556 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
2557 low target doesn't support retrieving the PC.
2558 (add_lwp): Set last_resume_kind to resume_continue.
2559 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
2560 (linux_attach): Don't clear stop_expected. Set the lwp's
2561 last_resume_kind to resume_stop.
2562 (linux_detach_one_lwp): Don't check for removed breakpoints.
2563 (check_removed_breakpoint): Delete.
2564 (status_pending_p): Rename to ...
2565 (status_pending_p_callback): ... this. Don't check for removed
2566 breakpoints. Don't consider threads that are stopped from GDB's
2567 perspective.
2568 (linux_wait_for_lwp): Always read the stop_pc here.
2569 (cancel_breakpoint): New.
2570 (step_over_bkpt): New global.
2571 (linux_wait_for_event_1): Implement stepping over breakpoints.
2572 (gdb_wants_lwp_stopped): New.
2573 (gdb_wants_all_stopped): New.
2574 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
2575 single-step traps here. Store the thread's last reported target
2576 wait status.
2577 (send_sigstop): Don't clear stop_expected. Always set it,
2578 instead.
2579 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
2580 (cancel_finished_single_step): New.
2581 (cancel_finished_single_steps): New.
2582 (wait_for_sigstop): Don't cancel finished single-step traps here.
2583 (linux_resume_one_lwp): Don't check for removed breakpoints.
2584 Don't set `step' on non-hardware step archs.
2585 (linux_set_resume_request): Ignore resume_stop requests if already
2586 stopping or stopped. Set the lwp's last_resume_kind.
2587 (resume_status_pending_p): Don't check for removed breakpoints.
2588 (need_step_over_p): New.
2589 (start_step_over): New.
2590 (finish_step_over): New.
2591 (linux_resume_one_thread): Always queue a sigstop for resume_stop
2592 requests. Clear the thread's last reported target waitstatus.
2593 Don't use the `suspended' flag. Don't consider pending breakpoints.
2594 (linux_resume): Start a step-over if necessary.
2595 (proceed_one_lwp): New.
2596 (proceed_all_lwps): New.
2597 (unstop_all_lwps): New.
2598 * linux-low.h (struct lwp_info): Rewrite comment for the
2599 `suspended' flag. Add the `stop_pc' field. Delete the
2600 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
2601 Add `'last_resume_kind' and `need_step_over' fields.
2602 * inferiors.c (struct thread_info): Delete, moved elsewhere.
2603 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
2604 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
2605 (set_raw_breakpoint_at): New.
2606 (set_breakpoint_at): Rewrite to use it.
2607 (reinsert_breakpoint_handler): Delete.
2608 (set_reinsert_breakpoint): New.
2609 (reinsert_breakpoint_by_bp): Delete.
2610 (delete_reinsert_breakpoints): New.
2611 (uninsert_breakpoint): Rewrite.
2612 (uninsert_breakpoints_at): New.
2613 (reinsert_breakpoint): Rewrite.
2614 (reinsert_breakpoints_at): New.
2615 (check_breakpoints): Rewrite.
2616 (breakpoint_here): New.
2617 (breakpoint_inserted_here): New.
2618 (check_mem_read): Adjust.
2619 * mem-break.h (breakpoints_supported, breakpoint_here)
2620 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
2621 (reinsert_breakpoint_by_bp): Delete declaration.
2622 (delete_reinsert_breakpoints): Declare.
2623 (reinsert_breakpoint): Delete declaration.
2624 (reinsert_breakpoints_at): Declare.
2625 (uninsert_breakpoint): Delete declaration.
2626 (uninsert_breakpoints_at): Declare.
2627 (check_breakpoints): Adjust prototype.
2628 * server.h: Adjust include order.
2629 (struct thread_info): Declare here. Add a `last_status' field.
2630
30ba68cb
MS
26312010-03-23 Michael Snyder <msnyder@vmware.com>
2632
2633 * server.c (crc32): New function.
2634 (handle_query): Add handling for 'qCRC:' request.
2635
b9a881c2
PA
26362010-03-23 Pedro Alves <pedro@codesourcery.com>
2637
2638 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
2639 lwp had been stopped by a watchpoint.
2640
e92d13d5
PA
26412010-03-16 Pedro Alves <pedro@codesourcery.com>
2642
2643 * server.h (internal_error): Declare.
2644 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
2645 * utils.c (internal_error): New function.
2646
64daa791
AS
26472010-03-15 Andreas Schwab <schwab@redhat.com>
2648
2649 * configure.srv: Fix typo setting srv_regobj.
2650
f52cd8cd
PA
26512010-03-15 Pedro Alves <pedro@codesourcery.com>
2652
2653 * linux-low.c (fetch_register): Avoid passing a non string literal
2654 format to `error'.
2655 (usr_store_inferior_registers): Ditto.
2656
93ae6fdc
PA
26572010-03-14 Pedro Alves <pedro@codesourcery.com>
2658
2659 * linux-low.c (linux_write_memory): Bail out early if peeking
2660 memory failed.
2661
c3adc08c
PA
26622010-03-14 Pedro Alves <pedro@codesourcery.com>
2663
2664 * linux-low.h (struct lwp_info): New fields
2665 `stopped_by_watchpoint' and `stopped_data_address'.
2666 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
2667 here, and cache them in the lwp object.
2668 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
2669 directly.
2670 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
2671 field.
2672 (linux_stopped_by_watchpoint): Rewrite.
2673 (linux_stopped_data_address): Rewrite.
2674
bce522a2
PA
26752010-03-06 Simo Melenius <simo.melenius@iki.fi>
2676
2677 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
2678 switching the current inferior, not before.
2679
90884b2b
L
26802010-03-01 H.J. Lu <hongjiu.lu@intel.com>
2681
2682 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
2683 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
2684 i386-linux.c and amd64-linux.c.
2685 (reg-i386.o): Removed.
2686 (reg-i386.c): Likewise.
2687 (reg-i386-linux.o): Likewise.
2688 (reg-i386-linux.c): Likewise.
2689 (reg-x86-64.o): Likewise.
2690 (reg-x86-64.c): Likewise.
2691 (reg-x86-64-linux.o): Likewise.
2692 (reg-x86-64-linux.c): Likewise.
2693 (i386.o): New.
2694 (i386.c): Likewise.
2695 (i386-linux.o): Likewise.
2696 (i386-linux.c): Likewise.
2697 (amd64.o): Likewise.
2698 (amd64.c): Likewise.
2699 (amd64-linux.o): Likewise.
2700 (amd64-linux.c): Likewise.
2701
2702 * configure.srv (srv_i386_regobj): New.
2703 (srv_i386_linux_regobj): Likewise.
2704 (srv_amd64_regobj): Likewise.
2705 (srv_amd64_linux_regobj): Likewise.
2706 (srv_i386_32bit_xmlfiles): Likewise.
2707 (srv_i386_64bit_xmlfiles): Likewise.
2708 (srv_i386_xmlfiles): Likewise.
2709 (srv_amd64_xmlfiles): Likewise.
2710 (srv_i386_linux_xmlfiles): Likewise.
2711 (srv_amd64_linux_xmlfiles): Likewise.
2712 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
2713 srv_xmlfiles to $srv_i386_xmlfiles.
2714 (i[34567]86-*-mingw32ce*): Likewise.
2715 (i[34567]86-*-mingw*): Likewise.
2716 (i[34567]86-*-nto*): Likewise.
2717 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
2718 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
2719 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
2720 (x86_64-*-linux*): Likewise.
2721
2722 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
2723 (init_registers_amd64_linux): New.
2724 (x86_arch_setup): Replace init_registers_x86_64_linux with
2725 init_registers_amd64_linux.
2726
193f13e6
MK
27272010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
2728
2729 * configure.ac: Check for libdl. If it is not available link against
2730 static libthread_db.
2731 * configure: Regenerate.
2732
85d721b8
PA
27332010-02-22 Pedro Alves <pedro@codesourcery.com>
2734
2735 PR9605
2736
2737 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
2738 handing a read watchpoint.
2739 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
2740
6076632b
DE
27412010-02-12 Doug Evans <dje@google.com>
2742
2743 * linux-low.c (linux_supports_tracefork_flag): Document.
2744 (linux_look_up_symbols): Add comment.
2745
3327ccf7
L
27462010-02-03 H.J. Lu <hongjiu.lu@intel.com>
2747
2748 * regcache.c (supply_register): Clear regcache if buf is NULL.
2749
0718675c 27502010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 2751 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
2752
2753 * inferiors.c (find_inferior): Add function documentation.
2754 (unloaded_dll): Handle the case where the unloaded dll has not
2755 been previously registered in the dll list.
2756
177321bd
DJ
27572010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
2758
2759 * linux-arm-low.c (thumb_breakpoint_len): Delete.
2760 (thumb2_breakpoint): New.
2761 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
2762
2b009048
DJ
27632010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
2764
2765 * linux-low.c (get_stop_pc): Check for SIGTRAP.
2766 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
2767 breakpoints.
2768
3be029c7
PA
27692010-01-21 Pedro Alves <pedro@codesourcery.com>
2770
2771 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
2772
18f5de3b
JK
27732010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
2774
2775 * linux-s390-low.c (s390_collect_ptrace_register)
2776 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
2777
3743bb4f
DE
27782010-01-21 Doug Evans <dje@google.com>
2779
14ce3065
DE
2780 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
2781 (PTRACE_ARG4_TYPE): New macro.
2782 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
2783 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
2784 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
2785 (usr_store_inferior_registers): Ditto.
2786 (linux_read_memory, linux_write_memory): Ditto.
2787 (linux_test_for_tracefork): Ditto.
2788
3743bb4f
DE
2789 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
2790 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
2791
8b315be5
PA
27922010-01-21 Pedro Alves <pedro@codesourcery.com>
2793
2794 * proc-service.c (ps_lgetregs): Don't refetch registers from the
2795 target.
2796
85492558
PA
27972010-01-21 Pedro Alves <pedro@codesourcery.com>
2798
2799 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
2800 prototype to take a regcache. Adjust.
2801
442ea881
PA
28022010-01-20 Pedro Alves <pedro@codesourcery.com>
2803
2804 * regcache.h (struct thread_info): Forward declare.
2805 (struct regcache): New.
2806 (new_register_cache): Adjust prototype.
2807 (get_thread_regcache): Declare.
2808 (free_register_cache): Adjust prototype.
2809 (registers_to_string, registers_from_string): Ditto.
2810 (supply_register, supply_register_by_name, collect_register)
2811 (collect_register_as_string, collect_register_by_name): Ditto.
2812 * regcache.c (struct inferior_regcache_data): Delete.
2813 (get_regcache): Rename to ...
2814 (get_thread_regcache): ... this. Adjust. Switch inferior before
2815 fetching registers.
2816 (regcache_invalidate_one): Adjust.
2817 (regcache_invalidate): Fix prototype.
2818 (new_register_cache): Return the new register cache.
2819 (free_register_cache): Change prototype.
2820 (realloc_register_cache): Adjust.
2821 (registers_to_string): Change prototype to take a regcache. Adjust.
2822 (registers_from_string): Ditto.
2823 (register_data): Ditto.
2824 (supply_register): Ditto.
2825 (supply_register_by_name): Ditto.
2826 (collect_register): Ditto.
2827 (collect_register_as_string): Ditto.
2828 (collect_register_by_name): Ditto.
2829 * server.c (process_serial_event): Adjust.
2830 * linux-low.h (regset_fill_func, regset_store_func): Change
2831 prototype.
2832 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
2833 Change prototype.
2834 * linux-low.c (get_stop_pc): Adjust.
2835 (check_removed_breakpoint): Adjust.
2836 (linux_wait_for_event): Adjust.
2837 (linux_resume_one_lwp): Adjust.
2838 (fetch_register): Add regcache parameter. Adjust.
2839 (usr_store_inferior_registers): Ditto.
2840 (regsets_fetch_inferior_registers): Ditto.
2841 (regsets_store_inferior_registers): Ditto.
2842 (linux_fetch_registers, linux_store_registers): Ditto.
2843 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
2844 regcache. Adjust.
2845 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
2846 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
2847 prototype to take a regcache.
2848 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
2849 * remote-utils.c (convert_ascii_to_int, outreg)
2850 (prepare_resume_reply): Change prototype to take a regcache.
2851 Adjust.
2852 * target.h (struct target_ops) <fetch_registers, store_registers>:
2853 Change prototype to take a regcache.
2854 (fetch_inferior_registers, store_inferior_registers): Change
2855 prototype to take a regcache. Adjust.
2856 * proc-service.c (ps_lgetregs): Adjust.
2857 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
2858 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
2859 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
2860 take a regcache. Adjust.
2861 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
2862 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
2863 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
2864 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
2865 * linux-cris-low.c (cris_get_pc, cris_set_pc)
2866 (cris_cannot_fetch_register):
2867 (cris_breakpoint_at): Change prototype to take a regcache.
2868 Adjust.
2869 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
2870 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
2871 to take a regcache. Adjust.
2872 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
2873 Adjust.
2874 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
2875 take a regcache. Adjust.
2876 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
2877 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
2878 (m68k_set_pc): Change prototype to take a regcache. Adjust.
2879 * linux-mips-low.c (mips_get_pc):
2880 (mips_set_pc): Change prototype to take a regcache. Adjust.
2881 (mips_reinsert_addr): Adjust.
2882 (mips_collect_register): Change prototype to take a regcache.
2883 Adjust.
2884 (mips_supply_register):
2885 (mips_collect_register_32bit, mips_supply_register_32bit)
2886 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
2887 (mips_store_fpregset): Ditto.
2888 * linux-ppc-low.c (ppc_supply_ptrace_register, ppc_supply_ptrace_register):
2889 Ditto.
2890 (parse_spufs_run): Adjust.
2891 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
2892 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
2893 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
2894 take a regcache. Adjust.
2895 * linux-s390-low.c (s390_collect_ptrace_register)
2896 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
2897 (s390_set_pc): Change prototype to take a regcache. Adjust.
2898 (s390_arch_setup): Adjust.
2899 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
2900 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
2901 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
2902 (sparc_fill_gregset, sparc_store_gregset_from_stack)
2903 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
2904 regcache. Adjust.
2905 (sparc_breakpoint_at): Adjust.
2906 * linux-xtensa-low.c (xtensa_fill_gregset):
2907 (xtensa_store_gregset):
2908 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
2909 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
2910 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
2911 prototype to take a regcache. Adjust.
2912 * win32-arm-low.c (arm_fetch_inferior_register)
2913 (arm_store_inferior_register): Change prototype to take a
2914 regcache. Adjust.
2915 * win32-i386-low.c (i386_fetch_inferior_register)
2916 (i386_store_inferior_register): Change prototype to take a
2917 regcache. Adjust.
2918 * win32-low.c (child_fetch_inferior_registers)
2919 (child_store_inferior_registers): Change prototype to take a
2920 regcache. Adjust.
2921 (win32_wait): Adjust.
2922 (win32_fetch_inferior_registers): Change prototype to take a
2923 regcache. Adjust.
2924 (win32_store_inferior_registers): Adjust.
2925 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
2926 store_inferior_register>: Change prototype to take a regcache.
2927
60c3d7b0
DE
29282010-01-20 Doug Evans <dje@google.com>
2929
2930 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
2931 #ifdef.
2932 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 2933 (W_STOPCODE): Provide definition if missing.
60c3d7b0 2934
dc146f7c
VP
29352010-01-13 Vladimir Prus <vladimir@codesourcery.com>
2936
2937 * linux-low.c (linux_core_of_thread): New.
2938 (compare_ints, show_process, list_threads): New.
2939 (linux_qxfer_osdata): Report threads and cores.
2940 (linux_target_op): Register linux_core_of_thread.
2941 * remote-utils.c (prepare_resume_reply): Report the core.
2942 (buffer_xml_printf): Support %d specifier.
2943 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
2944 New.
2945 (handle_query): Handle qXfer:threads. Announce availability
2946 thereof.
2947 * target.h (struct target_ops): New field core_of_thread.
2948
7803799a
UW
29492010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
2950
2951 * Makefile.in (clean): Remove new generated files.
2952 (reg-s390.o, reg-s390.c): Remove rules.
2953 (reg-s390x.o, reg-s390x.c): Likewise.
2954 (s390-linux32.o, s390-linux32.c): Add rules.
2955 (s390-linux64.o, s390-linux64.c): Likewise.
2956 (s390x-linux64.o, s390x-linux64.c): Likewise.
2957 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
2958 * linux-s390-low.c: Include <elf.h>.
2959 (HWCAP_S390_HIGH_GPRS): Define if undefined.
2960 (init_registers_s390): Remove prototype.
2961 (init_registers_s390x): Likewise.
2962 (init_registers_s390_linux32): Add prototype.
2963 (init_registers_s390_linux64): Likewise.
2964 (init_registers_s390x_linux64): Likewise.
2965 (s390_num_regs_3264): New define.
2966 (s390_regmap_3264): New global variable.
2967 (s390_cannot_fetch_register): Remove obsolete check.
2968 (s390_cannot_store_register): Likewise.
2969 (s390_collect_ptrace_register): Handle upper/lower register halves.
2970 (s390_supply_ptrace_register): Likewise.
2971 (s390_fill_gregset): Update to register number changes.
2972 (s390_get_hwcap): New routine.
2973 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
2974 Install appropriate regmap and register set.
2975
6e7ffa39
JB
29762010-01-01 Joel Brobecker <brobecker@adacore.com>
2977
2978 * server.c (gdbserver_version): Update copyright year to 2010.
2979 * gdbreplay.c (gdbreplay_version): Likewise.
2980
957f3f49
DE
29812009-12-28 Doug Evans <dje@google.com>
2982
2983 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
2984 elf/external.h. Include <elf.h> instead but only if necessary.
2985
ca5c370d
PA
29862009-12-28 Pedro Alves <pedro@codesourcery.com>
2987
2988 * linux-low.c (linux_remove_process): Remove `detaching'
2989 parameter. Don't release/detach from thread_db here.
2990 (linux_kill): Release/detach from thread_db here, ...
2991 (linux_detach): ... and here, before actually detaching.
2992 (linux_wait_1): ... and here, when a process exits.
2993 * thread-db.c (any_thread_of): New.
2994 (thread_db_free): Switch the current inferior to a thread of the
2995 passed in process.
2996
4ee62156
DE
29972009-12-21 Doug Evans <dje@google.com>
2998
d90e6a88
DE
2999 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
3000
c5f62d5f
DE
3001 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
3002 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
3003 warning ifndef __NR_tkill. Move setting of errno there too.
3004 Delete unnecessary resetting of errno after syscall.
3005 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
3006
10e86dd7
DE
3007 * configure.ac: Check for dladdr.
3008 * config.in: Regenerate.
3009 * configure: Regenerate.
3010 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
3011 (try_thread_db_load): Update.
3012
4ee62156
DE
3013 * linux-low.c (my_waitpid): Delete unnecessary prototype.
3014
00f515da
DE
30152009-12-18 Doug Evans <dje@google.com>
3016
e9464885
DE
3017 * event-loop.c: Include unistd.h if it exists.
3018
07d4f67e
DE
3019 * linux-low.c (my_waitpid): Move definition away from being in
3020 between linux_tracefork_child/linux_test_for_tracefork.
3021
00f515da
DE
3022 * gdb_proc_service.h (psaddr_t): Fix type.
3023 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
3024 signature to match glibc.
3025
1de1badb
DE
30262009-12-16 Doug Evans <dje@google.com>
3027
3028 * linux-low.c (linux_read_memory): Fix argument to read.
3029
aeeb81d1
PA
30302009-11-26 Pedro Alves <pedro@codesourcery.com>
3031
3032 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
3033 events, don't leave current_inferior pointing at null.
3034
10357975
PA
30352009-11-26 Pedro Alves <pedro@codesourcery.com>
3036
3037 * win32-low.c (LOG): Delete.
3038 (OUTMSG): Output to stderr.
3039 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
3040 on compile time LOG macro.
3041 (win32_wait): Fix debug output.
3042
cf6e3471
PA
30432009-11-26 Pedro Alves <pedro@codesourcery.com>
3044
3045 * win32-low.c (win32_add_one_solib): If the dll name is
3046 "ntdll.dll", prepend the system directory to the dll path.
3047
0c85e18e
MK
30482009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
3049
3050 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
3051
9ac544ce 30522009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 3053 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
3054
3055 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
3056 * configure.ac: Check for __mcoldfire__ and set
3057 gdb_cv_m68k_is_coldfire.
3058 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
3059 reg-cf.o and reg-m68k.o.
3060 * configure: Regenerated.
3061
fd7dd3e6
PA
30622009-11-16 Pedro Alves <pedro@codesourcery.com>
3063
3064 * linux-low.c (linux_remove_process): Add `detaching' parameter.
3065 Pass it to thread_db_free.
3066 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
3067 proper `detaching' argument to linux_remove_process.
3068 * linux-low.h (thread_db_free): Add `detaching' parameter.
3069 * thread-db.c (thread_db_init): Pass false as `detaching' argument
3070 to thread_db_free.
3071 (thread_db_free): Add `detaching' parameter. Only
3072 call td_ta_clear_event if detaching from process.
3073
75aa492e
MK
30742009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
3075
3076 * thread-db.c (thread_db_free): Fix typo.
3077
21e1bee4
PP
30782009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
3079
3080 PR gdb/10838
3081 * thread-db.c (thread_db_free): Call td_ta_clear_event.
3082
8838b45e
NS
30832009-11-03 Nathan Sidwell <nathan@codesourcery.com>
3084
3085 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
3086 with an i686 compiler.
3087 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
3088 needed.
3089 * configure: Rebuilt.
3090
8a35fb51
SL
30912009-10-29 Sandra Loosemore <sandra@codesourcery.com>
3092
3093 PR gdb/10783
3094
3095 * server.c (handle_search_memory_1): Correct read_addr initialization
3096 in loop for searching subsequent chunks.
3097
96f15937
PP
30982009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
3099
3100 * configure.ac: New --with-libthread-db option.
3101 * thread-db.c: Allow direct dependence on libthread_db.
3102 (thread_db_free): Adjust.
3103 * config.in: Regenerate.
3104 * configure: Likewise.
889bf7c5 3105
5f7d1694
PP
31062009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
3107
3108 PR gdb/10757
3109 * thread-db.c (attach_thread): New function.
3110 (maybe_attach_thread): Return success/failure.
3111 (find_new_threads_callback): Adjust.
889bf7c5
PA
3112 (thread_db_find_new_threads): Loop until no new threads.
3113
88e3b899
PA
31142009-10-13 Pedro Alves <pedro@codesourcery.com>
3115
3116 * proc-service.c (ps_lgetregs): Formatting.
3117
cdbfd419
PP
31182009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
3119
3120 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
3121 * configure.ac: Adjust.
3122 * linux-low.h (struct process_info_private): Move members to struct
3123 thread_db.
3124 (thread_db_free, thread_db_handle_monitor_command): New prototype.
3125 * linux-low.c (linux_remove_process): Adjust.
3126 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
3127 * server.c (handle_query): Move code ...
3128 (handle_monitor_command): ... here. New function.
3129 * target.h (struct target_ops): New member.
3130 * thread-db.c (struct thread_db): New.
3131 (libthread_db_search_path): New variable.
3132 (thread_db_create_event, thread_db_enable_reporting)
3133 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
3134 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
3135 (try_thread_db_load_1, dladdr_to_soname): New functions.
3136 (try_thread_db_load, thread_db_load_search): New functions.
3137 (thread_db_init): Search for libthread_db.
3138 (thread_db_free): New function.
3139 (thread_db_handle_monitor_command): Likewise.
3140 * config.in: Regenerate.
3141 * configure: Regenerate.
889bf7c5 3142
4168d2d6
UW
31432009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
3144
3145 * spu-low.c (spu_kill): Wait for inferior to terminate.
3146 Call clear_inferiors.
3147 (spu_detach): Call clear_inferiors.
3148
81ecdfbb
RW
31492009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3150
3151 * aclocal.m4: Regenerate.
3152 * config.in: Likewise.
3153 * configure: Likewise.
3154
0b9ff2c0
UW
31552009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
3156
3157 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
3158 (parse_spufs_run): New function.
3159 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
3160 (ppc_breakpoint_at): Handle SPU breakpoints.
3161
efcbbd14
UW
31622009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
3163
3164 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
3165 (SPUFS_MAGIC): Define.
3166 (spu_enumerate_spu_ids): New function.
3167 (linux_qxfer_spu): New function.
3168 (linux_target_ops): Install linux_qxfer_spu.
3169
f4d9bade
UW
31702009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
3171
3172 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
3173 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
3174 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
3175 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
3176 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
3177 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
3178 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
3179 (init_registers_powerpc_cell32l): Add prototype.
3180 (init_registers_powerpc_cell64l): Likewise.
3181 (ppc_arch_setup): Detect Cell/B.E. architecture.
3182
96e946ca
RW
31832009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3184
3185 * Makefile.in (datarootdir): New variable.
3186
58d6951d
DJ
31872009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
3188
3189 * linux-low.c (linux_write_memory): Update debugging output.
3190 * Makefile.in (clean): Add new descriptions.
3191 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
3192 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
3193 * configure.srv: Add new files for arm*-*-linux*.
3194 * linux-arm-low.c: Add new declarations.
3195 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
3196 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
3197 (HWCAP_VFPv3D16): New.
3198 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
3199 instead of __IWMMXT__.
3200 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
3201 (arm_arch_setup): New.
3202 (target_regsets): Remove #ifdef. Add VFP regset.
3203 (the_low_target): Use arm_arch_setup.
3204
12b42a12
DJ
32052009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
3206
3207 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
3208 the main thread again.
3209
ac8c974e
AR
32102009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
3211
3212 Adding Neutrino gdbserver.
3213 * configure: Regenerated.
3214 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
3215 * configure.srv (i[34567]86-*-nto*): New target.
3216 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
3217 * remote-utils.c [__QNX__]: Include sys/iomgr.h
3218 (nto_comctrl) [__QNX__]: New function.
3219 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
3220
4424e0c3 32212009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
3222
3223 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
3224 srv_tgtobj.
3225
912cf4ba
PA
32262009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
3227 Pedro Alves <pedro@codesourcery.com>
3228
3229 * win32-i386-low.c (i386_get_thread_context): Handle systems that
3230 don't support CONTEXT_EXTENDED_REGISTERS.
3231 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
3232 (the_low_target): Install them.
3233 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
3234 failing with ERROR_PIPE_NOT_CONNECTED.
3235
aa5ca48f
DE
32362009-06-30 Doug Evans <dje@google.com>
3237 Pierre Muller <muller@ics.u-strasbg.fr>
3238
3239 Add h/w watchpoint support to x86-linux, win32-i386.
3240 * Makefile.in (SFILES): Add i386-low.c
3241 (i386_low_h): Define.
3242 (i386-low.o): Add dependencies.
3243 (linux-x86-low.o): Add i386-low.h dependency.
3244 (win32-i386-low.o): Ditto.
3245 * i386-low.c: New file.
3246 * i386-low.h: New file.
3247 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
3248 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
3249 * linux-low.c (linux_add_process): Initialize arch_private.
3250 (linux_remove_process): Free arch_private.
3251 (add_lwp): Initialize arch_private.
3252 (delete_lwp): Free arch_private.
3253 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
3254 provided.
3255 * linux-low.h (process_info_private): New member arch_private.
3256 (lwp_info): New member arch_private.
3257 (linux_target_ops): New members new_process, new_thread,
3258 prepare_to_resume.
3259 (ptid_of): New macro.
3260 * linux-x86-low.c: Include stddef.h, i386-low.h.
3261 (arch_process_info): New struct.
3262 (arch_lwp_info): New struct.
3263 (x86_linux_dr_get, x86_linux_dr_set): New functions.
3264 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
3265 (i386_dr_low_get_status): New function.
3266 (x86_insert_point, x86_remove_point): New functions.
3267 (x86_stopped_by_watchpoint): New function.
3268 (x86_stopped_data_address): New function.
3269 (x86_linux_new_process, x86_linux_new_thread): New functions.
3270 (x86_linux_prepare_to_resume): New function.
3271 (the_low_target): Add entries for insert_point, remove_point,
3272 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
3273 prepare_to_resume.
3274 * server.c (debug_hw_points): New global.
3275 (monitor_show_help): Document set debug-hw-points.
3276 (handle_query): Process "set debug-hw-points".
3277 * server.h (debug_hw_points): Declare.
3278 (paddress): Declare.
3279 * utils.c (NUMCELLS, CELLSIZE): New macros.
3280 (get_sell, xsnprintf, paddress): New functions.
3281 * win32-arm-low.c (the_low_target): Add entries for insert_point,
3282 remove_point, stopped_by_watchpoint, stopped_data_address.
3283 * win32-i386-low.c: Include i386-low.h.
3284 (debug_reg_state): Replaces dr.
3285 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
3286 (i386_dr_low_get_status): New function.
3287 (i386_insert_point, i386_remove_point): New functions.
3288 (i386_stopped_by_watchpoint): New function.
3289 (i386_stopped_data_address): New function.
3290 (i386_initial_stuff): Update.
3291 (get_thread_context,set_thread_context,i386_thread_added): Update.
3292 (the_low_target): Add entries for insert_point,
3293 remove_point, stopped_by_watchpoint, stopped_data_address.
3294 * win32-low.c (win32_insert_watchpoint): New function.
3295 (win32_remove_watchpoint): New function.
3296 (win32_stopped_by_watchpoint): New function.
3297 (win32_stopped_data_address): New function.
3298 (win32_target_ops): Add entries for insert_watchpoint,
3299 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
3300 * win32-low.h (win32_target_ops): New members insert_point,
3301 remove_point, stopped_by_watchpoint, stopped_data_address.
3302
d993e290
PA
33032009-06-25 Pedro Alves <pedro@codesourcery.com>
3304
3305 * server.c (process_serial_event): Re-return unsupported, not
3306 error, if the type isn't recognized. Re-allow supporting only
3307 insert or remove packets. Also call require_running for
3308 breakpoints. Add missing break statement to default case. Tidy.
3309 * target.h (struct target_ops): Rename insert_watchpoint to
3310 insert_point, and remove_watchpoint to remove_point.
3311
3312 * linux-low.h (struct linux_target_ops): Likewise.
3313 * linux-low.c (linux_insert_watchpoint): Rename to ...
3314 (linux_insert_point): ... this. Adjust.
3315 (linux_remove_watchpoint): Rename to ...
3316 (linux_remove_point): ... this. Adjust.
3317 (linux_target_ops): Adjust.
3318 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
3319 (cris_insert_point): ... this.
3320 (cris_remove_watchpoint): Rename to ...
3321 (cris_remove_point): ... this.
3322 (the_low_target): Adjust.
3323
0f54c268
PM
33242009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
3325
3326 * server.c (handle_v_kill): Pass signal_pid to
3327 kill_inferior if multi_process is zero.
3328
c6314022
AR
33292009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
3330
3331 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
3332 * target.h (target_ops): Comment for *_watchpoint to make it clear
3333 the functions can get types '0' and '1'.
3334
4463ce24
AR
33352009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
3336
3337 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
3338 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
3339 * regcache.c (get_regcache): Likewise.
3340 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
3341 * win32-low.c (child_fetch_inferior_registers): Remove check for
3342 regno 0.
3343
cf8fd78b
PA
33442009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
3345 Pedro Alves <pedro@codesourcery.com>
3346
3347 * target.h (struct target_ops) <supports_multi_process>: New
3348 callback.
3349 (target_supports_multi_process): New.
3350 * server.c (handle_query): Even if GDB reports support, only
3351 enable multi-process if the target also supports it. Report
3352 multi-process support only if the target backend supports it.
3353 * linux-low.c (linux_supports_multi_process): New function.
3354 (linux_target_ops): Install it as target_supports_multi_process
3355 callback.
3356
47c0c975
DE
33572009-05-24 Doug Evans <dje@google.com>
3358
e09875d4
DE
3359 Global renaming of find_thread_pid to find_thread_ptid.
3360 * server.h (find_thread_ptid): Renamed from find_thread_pid.
3361 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
3362 All callers updated.
3363
e27d73f6
DE
3364 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
3365 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
3366 directly.
3367
47c0c975
DE
3368 * linux-low.c (get_stop_pc): Print pc if debug_threads.
3369 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
3370 (linux_resume_one_lwp): Ditto.
3371
2acc282a
DE
33722009-05-23 Doug Evans <dje@google.com>
3373
3374 * linux-low.c (linux_resume_one_lwp): Change type of first arg
3375 from struct inferior_list_entry * to struct lwp_info *.
3376 All callers updated.
3377
9f1036c1
DE
33782009-05-13 Doug Evans <dje@google.com>
3379
3380 * linux-x86-low.c: Don't include assert.h.
3381 (x86_siginfo_fixup): Use fatal, not assert.
3382 (x86_arch_setup): Fix comment.
3383
d0722149
DE
33842009-05-12 Doug Evans <dje@google.com>
3385
3386 Biarch support for i386/amd64 gdbserver.
3387 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
3388 Add linux-x86-low.c.
3389 (linux-i386-low.o, linux-x86-64-low.o): Delete.
3390 (linux-x86-low.o): Add.
3391 * linux-x86-64-low.c: Delete.
3392 * linux-i386-low.c: Delete.
3393 * linux-x86-low.c: New file.
3394 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
3395 linux-x86-low.o.
3396 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
3397 linux-x86-low.o.
3398 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
3399 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
3400 (linux_child_pid_to_exec_file): New function.
3401 (elf_64_header_p, elf_64_file_p): New functions.
3402 (siginfo_fixup): New function.
3403 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
3404 give target a chance to convert layout.
3405 * linux-low.h (linux_target_ops): New member siginfo_fixup.
3406 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
3407
fdeb2a12
DE
34082009-05-07 Doug Evans <dje@google.com>
3409
3410 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
3411 (regsets_store_inferior_registers): Ditto.
3412
a6dbe5df
PA
34132009-05-06 Pedro Alves <pedro@codesourcery.com>
3414
3415 PR server/10048
3416
3417 * linux-low.c (must_set_ptrace_flags): Delete.
3418 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
3419 of the global.
3420 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
3421 `lwp->must_set_ptrace_flags' instead.
ba42693b 3422 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
3423 (linux_wait_1): ... not here.
3424
5091eb23
DE
34252009-04-30 Doug Evans <dje@google.com>
3426
9f767825
DE
3427 * inferiors.c (started_inferior_callback): New function.
3428 (attached_inferior_callback): New function.
3429 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
3430 * server.c (print_started_pid, print_attached_pid): New functions.
3431 (detach_or_kill_for_exit): New function.
3432 (main): Call it instead of for_each_inferior (kill_inferior_callback).
3433 * server.h (have_started_inferiors_p): Declare.
3434 (have_attached_inferiors_p): Declare.
3435
5091eb23
DE
3436 * inferiors.c (remove_process): Fix memory leak, free process.
3437 * linux-low.c (linux_remove_process): New function.
3438 (linux_kill): Call it instead of remove_process.
3439 (linux_detach, linux_wait_1): Ditto.
3440
155c8968
PA
34412009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
3442
3443 * configure.srv: Add x86 Windows CE target.
3444
7fe519cb
UW
34452009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
3446
3447 * inferiors.c (get_thread_process): Make global.
3448 * server.h (get_thread_process): Add prototype.
3449 * thread-db.c (find_one_thread): Use get_thread_process
3450 instead of current_process.
3451 (thread_db_get_tls_address): Do not crash if called when
3452 thread layer is not yet initialized.
3453
5472f405
UW
34542009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
3455
3456 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
3457 * spu-low.c (current_tid): Rename to ...
3458 (current_ptid): ... this.
3459 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
3460 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
3461 ptid_get_lwp (current_ptid) instead of current_tid.
3462 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
3463 instead of current_tid. Use find_process_pid to verify pid
3464 argument is valid. Pass proper argument to remove_process.
3465 (spu_thread_alive): Compare current_ptid instead of current_tid.
3466 (spu_resume): Likewise.
3467
55ac2b99
PA
34682009-04-02 Pedro Alves <pedro@codesourcery.com>
3469
3470 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
3471 variable.
3472
95954743
PA
34732009-04-01 Pedro Alves <pedro@codesourcery.com>
3474
3475 Implement the multiprocess extensions, and add linux multiprocess
3476 support.
3477
3478 * server.h (ULONGEST): Declare.
3479 (struct ptid, ptid_t): New.
3480 (minus_one_ptid, null_ptid): Declare.
3481 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
3482 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
3483 (struct inferior_list_entry): Change `id' type from unsigned from
3484 to ptid_t.
3485 (struct sym_cache, struct breakpoint, struct
3486 process_info_private): Forward declare.
3487 (struct process_info): Declare.
3488 (current_process): Declare.
3489 (all_processes): Declare.
3490 (initialize_inferiors): Declare.
3491 (add_thread): Adjust to use ptid_t.
3492 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
3493 (add_process, remove_process, find_thread_pid): Declare.
3494 (find_inferior_id): Adjust to use ptid_t.
3495 (cont_thread, general_thread, step_thread): Change type to ptid_t.
3496 (multi_process): Declare.
3497 (push_event): Adjust to use ptid_t.
3498 (read_ptid, write_ptid): Declare.
3499 (prepare_resume_reply): Adjust to use ptid_t.
3500 (clear_symbol_cache): Declare.
3501 * inferiors.c (all_processes): New.
3502 (null_ptid, minus_one_ptid): New.
3503 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
3504 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
3505 (add_thread): Change unsigned long to ptid. Remove gdb_id
3506 parameter. Adjust.
3507 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
3508 (gdb_id_to_thread): Rename to ...
3509 (find_thread_pid): ... this. Change unsigned long to ptid.
3510 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
3511 (loaded_dll, pull_pid_from_list): Adjust.
3512 (add_process, remove_process, find_process_pid)
3513 (get_thread_process, current_process, initialize_inferiors): New.
3514 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
3515 (struct target_waitstatus) <related_pid>: Ditto.
3516 (struct target_ops) <kill, detach>: Add `pid' argument. Change
3517 return type to int.
3518 (struct target_ops) <join>: Add `pid' argument.
3519 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
3520 (struct target_ops) <wait>: Add `ptid' field. Change return type
3521 to ptid.
3522 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
3523 (mywait): Add `ptid' argument. Change return type to ptid_t.
3524 (target_pid_to_str): Declare.
3525 * target.c (set_desired_inferior): Adjust to use ptids.
3526 (mywait): Add new `ptid' argument. Adjust.
3527 (target_pid_to_str): New.
3528 * mem-break.h (free_all_breakpoints): Declare.
3529 * mem-break.c (breakpoints): Delelete.
3530 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
3531 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
3532 to use per-process breakpoint list.
3533 (free_all_breakpoints): New.
3534 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
3535 (symbol_cache, all_symbols_looked_up): Delete.
3536 (hexchars): New.
3537 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
3538 read_ptid): New.
3539 (prepare_resume_reply): Change ptid argument's type from unsigned
3540 long to ptid_t. Adjust. Implement W;process and X;process.
3541 (free_sym_cache, clear_symbol_cache): New.
3542 (look_up_one_symbol): Adjust to per-process symbol cache. *
3543 * server.c (cont_thread, general_thread, step_thread): Change type
3544 to ptid_t.
3545 (attached): Delete.
3546 (multi_process): New.
3547 (last_ptid): Change type to ptid_t.
3548 (struct vstop_notif) <ptid>: Change type to ptid_t.
3549 (queue_stop_reply, push_event): Change `ptid' argument's type to
3550 ptid_t.
3551 (discard_queued_stop_replies): Add `pid' argument.
3552 (start_inferior): Adjust to use ptids. Adjust to mywait interface
3553 changes. Don't reference the `attached' global.
3554 (attach_inferior): Adjust to mywait interface changes.
3555 (handle_query): Adjust to use ptids. Parse GDB's qSupported
3556 features. Handle and report "multiprocess+". Handle
3557 "qAttached:PID".
3558 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
3559 changes.
3560 (handle_v_kill): New.
3561 (handle_v_stopped): Adjust to use target_pid_to_str.
3562 (handle_v_requests): Allow multiple attaches and runs when
3563 multiprocess extensions are in effect. Handle "vKill".
3564 (myresume): Adjust to use ptids.
3565 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
3566 (handle_status): Adjust to discard_queued_stop_replies interface
3567 change.
3568 (first_thread_of, kill_inferior_callback)
3569 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
3570 (main): Call initialize_inferiors. Adjust to use ptids, killing
3571 and detaching from all inferiors. Handle multiprocess packet
3572 variants.
3573 * linux-low.h: Include gdb_proc_service.h.
3574 (struct process_info_private): New.
3575 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
3576 <lwpid_of>: Use ptid_get_lwp.
3577 (get_lwp_thread): Adjust.
3578 (struct lwp_info): Add `dead' member.
3579 (find_lwp_pid): Declare.
3580 * linux-low.c (thread_db_active): Delete.
3581 (new_inferior): Adjust comment.
3582 (inferior_pid): Delete.
3583 (linux_add_process): New.
3584 (handle_extended_wait): Adjust.
3585 (add_lwp): Change unsigned long to ptid.
3586 (linux_create_inferior): Add process to processes table. Adjust
3587 to use ptids. Don't set new_inferior here.
3588 (linux_attach_lwp): Rename to ...
3589 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
3590 it. Adjust to use ptids.
3591 (linux_attach_lwp): New.
3592 (linux_attach): Add process to processes table. Don't set
3593 new_inferior here.
3594 (struct counter): New.
3595 (second_thread_of_pid_p, last_thread_of_process_p): New.
3596 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
3597 multiple processes.
3598 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
3599 processes. Remove process from process table.
3600 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
3601 to multiple processes.
3602 (any_thread_of): New.
3603 (linux_detach): Add `pid' argument, and handle it. Remove process
3604 from processes table.
3605 (linux_join): Add `pid' argument. Handle it.
3606 (linux_thread_alive): Change unsighed long argument to ptid_t.
3607 Consider dead lwps as not being alive.
3608 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
3609 threads we're not interested in.
3610 (same_lwp, find_lwp_pid): New.
3611 (linux_wait_for_lwp): Change `pid' argument's type from int to
3612 ptid_t. Adjust.
3613 (linux_wait_for_event): Rename to ...
3614 (linux_wait_for_event_1): ... this. Change `pid' argument's type
3615 from int to ptid_t. Adjust.
3616 (linux_wait_for_event): New.
3617 (linux_wait_1): Add `ptid' argument. Change return type to
3618 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
3619 that exit from the process table.
3620 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
3621 Adjust.
3622 (mark_lwp_dead): New.
3623 (wait_for_sigstop): Adjust to use ptids. If a process exits while
3624 stopping all threads, mark its main lwp as dead.
3625 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
3626 ptids.
3627 (fetch_register, usr_store_inferior_registers)
3628 (regsets_fetch_inferior_registers)
3629 (regsets_store_inferior_registers, linux_read_memory)
3630 (linux_write_memory): Inline `inferior_pid'.
3631 (linux_look_up_symbols): Adjust to use per-process
3632 `thread_db_active'.
3633 (linux_request_interrupt): Adjust to use ptids.
3634 (linux_read_auxv): Inline `inferior_pid'.
3635 (initialize_low): Don't reference thread_db_active.
3636 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
3637 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
3638 (ps_getpid): Return the pid of the current inferior.
3639 * thread-db.c (proc_handle, thread_agent): Delete.
3640 (thread_db_create_event, thread_db_enable_reporting): Adjust to
3641 per-process data.
3642 (find_one_thread): Change argument type to ptid_t. Adjust to
3643 per-process data.
3644 (maybe_attach_thread): Adjust to per-process data and ptids.
3645 (thread_db_find_new_threads): Ditto.
3646 (thread_db_init): Ditto.
3647 * spu-low.c (spu_create_inferior, spu_attach): Add process to
3648 processes table. Adjust to use ptids.
3649 (spu_kill, spu_detach): Adjust interface. Remove process from
3650 processes table.
3651 (spu_join, spu_thread_alive): Adjust interface.
3652 (spu_wait): Adjust interface. Remove process from processes
3653 table. Adjust to use ptids.
3654 * win32-low.c (current_inferior_tid): Delete.
3655 (current_inferior_ptid): New.
3656 (debug_event_ptid): New.
3657 (thread_rec): Take a ptid. Adjust.
3658 (child_add_thread): Add `pid' argument. Adjust to use ptids.
3659 (child_delete_thread): Ditto.
3660 (do_initial_child_stuff): Add `attached' argument. Add process to
3661 processes table.
3662 (child_fetch_inferior_registers, child_store_inferior_registers):
3663 Adjust.
3664 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
3665 (win32_attach): Pass 1 to do_initial_child_stuff.
3666 (win32_kill): Adjust interface. Remove process from processes
3667 table.
3668 (win32_detach): Ditto.
3669 (win32_join): Adjust interface.
3670 (win32_thread_alive): Take a ptid.
3671 (win32_resume): Adjust to use ptids.
3672 (get_child_debug_event): Ditto.
3673 (win32_wait): Adjust interface. Remove exiting process from
3674 processes table.
3675
bd99dc85
PA
36762009-04-01 Pedro Alves <pedro@codesourcery.com>
3677
3678 Non-stop mode support.
3679
3680 * server.h (non_stop): Declare.
3681 (gdb_client_data, handler_func): Declare.
3682 (delete_file_handler, add_file_handler, start_event_loop):
3683 Declare.
3684 (handle_serial_event, handle_target_event, push_event)
3685 (putpkt_notif): Declare.
3686 * target.h (enum resume_kind): New.
3687 (struct thread_resume): Replace `step' field by `kind' field.
3688 (TARGET_WNOHANG): Define.
3689 (struct target_ops) <wait>: Add `options' argument.
3690 <supports_non_stop, async, start_non_stop>: New fields.
3691 (target_supports_non_stop, target_async): New.
3692 (start_non_stop): Declare.
3693 (mywait): Add `options' argument.
3694 * target.c (mywait): Add `options' argument. Print child exit
3695 notifications here.
3696 (start_non_stop): New.
3697 * server.c (non_stop, own_buf, mem_buf): New globals.
3698 (struct vstop_notif): New.
3699 (notif_queue): New global.
3700 (queue_stop_reply, push_event, discard_queued_stop_replies)
3701 (send_next_stop_reply): New.
3702 (start_inferior): Adjust to use resume_kind. Adjust to mywait
3703 interface changes.
3704 (attach_inferior): In non-stop mode, don't wait for the target
3705 here.
3706 (handle_general_set): Handle QNonStop.
3707 (handle_query): When handling qC, return the current general
3708 thread, instead of the first thread of the list.
3709 (handle_query): If the backend supports non-stop mode, include
3710 QNonStop+ in the qSupported query response.
3711 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
3712 and non-stop mode.
3713 (handle_v_attach, handle_v_run): Handle non-stop mode.
3714 (handle_v_stopped): New.
3715 (handle_v_requests): Report support for vCont;t. Handle vStopped.
3716 (myresume): Adjust to use resume_kind. Handle non-stop.
3717 (queue_stop_reply_callback): New.
3718 (handle_status): Handle non-stop mode.
3719 (main): Clear non_stop flag on reconnection. Use the event-loop.
3720 Refactor serial protocol handling from here ...
3721 (process_serial_event): ... to this new function. When GDB
3722 selects any thread, select one here. In non-stop mode, wait until
3723 GDB acks all pending events before exiting.
3724 (handle_serial_event, handle_target_event): New.
3725 * remote-utils.c (remote_open): Install remote_desc in the event
3726 loop.
3727 (remote_close): Remove remote_desc from the event loop.
3728 (putpkt_binary): Rename to...
3729 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
3730 (putpkt_binary): New as wrapper around putpkt_binary_1.
3731 (putpkt_notif): New.
3732 (prepare_resume_reply): In non-stop mode, don't change the
3733 general_thread.
3734 * event-loop.c: New.
3735 * Makefile.in (OBJ): Add event-loop.o.
3736 (event-loop.o): New rule.
3737
3738 * linux-low.h (pid_of): Moved here.
3739 (lwpid_of): New.
3740 (get_lwp_thread): Use lwpid_of.
3741 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
3742 * linux-low.c (pid_of): Delete.
3743 (inferior_pid): Use lwpid_of.
3744 (linux_event_pipe): New.
3745 (target_is_async_p): New.
3746 (delete_lwp): New.
3747 (handle_extended_wait): Use lwpid_of.
3748 (add_lwp): Don't set lwpid field.
3749 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
3750 (linux_kill_one_lwp): If killing a running lwp, stop it first.
3751 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
3752 (linux_detach_one_lwp): If detaching from a running lwp, stop it
3753 first. Adjust to linux_wait_for_event interface changes. Use
3754 lwpid_of.
3755 (linux_detach): Don't delete the main lwp here.
3756 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
3757 (status_pending_p): Don't consider explicitly suspended lwps.
3758 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
3759 pointer. Add OPTIONS argument. Change return type to int. Use
3760 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
3761 (linux_wait_for_event): Take an integer pid instead of a lwp_info
3762 pointer. Add status pointer argument. Return a pid instead of a
3763 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
3764 changes. In non-stop mode, don't switch to a random thread.
3765 (linux_wait): Rename to...
3766 (linux_wait_1): ... this. Add target_options argument, and handle
3767 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
3768 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
3769 clean exit and signal exit code. Don't stop all threads in
3770 non-stop mode. In all-stop mode, only stop all threads when
3771 reporting a stop to GDB. Handle explicit thread stop requests.
3772 (async_file_flush, async_file_mark): New.
3773 (linux_wait): New.
3774 (send_sigstop): Use lwpid_of.
3775 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
3776 interface changes. In non-stop mode, don't switch to a random
3777 thread.
3778 (linux_resume_one_lwp): Use lwpid_of.
3779 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
3780 (linux_resume_one_thread): ... this. Handle resume_stop. In
3781 non-stop mode, don't look for pending flag in all threads.
3782 (resume_status_pending_p): Don't consider explicitly suspended
3783 threads.
3784 (my_waitpid): Reimplement. Emulate __WALL.
3785 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
3786 Use lwpid_of.
3787 (sigchld_handler, linux_supports_non_stop, linux_async)
3788 (linux_start_non_stop): New.
3789 (linux_target_ops): Register linux_supports_non_stop, linux_async
3790 and linux_start_non_stop.
3791 (initialize_low): Install SIGCHLD handler.
3792 * thread-db.c (thread_db_create_event, find_one_thread)
3793 (thread_db_get_tls_address): Use lwpid_of.
3794 * win32-low.c (win32_detach): Adjust to use resume_kind.
3795 (win32_wait): Add `options' argument.
3796 * spu-low.c (spu_resume): Adjust to use resume_kind.
3797 (spu_wait): Add `options' argument.
3798
5b1c542e
PA
37992009-04-01 Pedro Alves <pedro@codesourcery.com>
3800
3801 Decouple target code from remote protocol.
3802
3803 * target.h (enum target_waitkind): New.
3804 (struct target_waitstatus): New.
3805 (struct target_ops) <wait>: Return an unsigned long. Take a
3806 target_waitstatus pointer instead of a char pointer.
3807 (mywait): Likewise.
3808 * target.c (mywait): Change prototype to return an unsigned long.
3809 Take a target_waitstatus pointer instead of a char pointer. Adjust.
3810 * server.h (thread_from_wait, old_thread_from_wait): Delete
3811 declarations.
3812 (prepare_resume_reply): Change prototype to take a
3813 target_waitstatus.
3814 * server.c (thread_from_wait, old_thread_from_wait): Delete.
3815 (last_status, last_ptid): New.
3816 (start_inferior): Remove "statusptr" argument. Adjust. Return a
3817 pid instead of a signal.
3818 (attach_inferior): Remove "status" and "signal" parameters.
3819 Adjust.
3820 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
3821 not as an address.
3822 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
3823 (handle_v_requests, myresume): Remove "status" and "signal"
3824 parameters. Adjust.
3825 (handle_status): New.
3826 (main): Delete local `status'. Adjust.
3827 * remote-utils.c: Include target.h.
3828 (prepare_resume_reply): Change prototype to take a
3829 target_waitstatus. Adjust.
3830
3831 * linux-low.c (linux_wait): Adjust to new target_ops->wait
3832 interface.
3833 * spu-low.c (spu_wait): Adjust.
3834 * win32-low.c (enum target_waitkind, struct target_waitstatus):
3835 Delete.
3836 (win32_wait): Adjust.
3837
2bd7c093
PA
38382009-04-01 Pedro Alves <pedro@codesourcery.com>
3839
3840 * target.h (struct thread_resume): Delete leave_stopped member.
3841 (struct target_ops): Add a `n' argument to the `resume' callback.
3842 * server.c (start_inferior): Adjust.
3843 (handle_v_cont, myresume): Adjust.
3844 * linux-low.c (check_removed_breakpoint): Adjust to resume
3845 interface change, and to removed leave_stopped field.
3846 (resume_ptr): Delete.
3847 (struct thread_resume_array): New.
3848 (linux_set_resume_request): Add new `arg' parameter. Adjust to
3849 resume interface change.
3850 (linux_continue_one_thread, linux_queue_one_thread)
3851 (resume_status_pending_p): Check if the resume field is NULL
3852 instead of checking the leave_stopped member.
3853 (linux_resume): Adjust to the target resume interface change.
3854 * spu-low.c (spu_resume): Adjust to the target resume interface
3855 change.
3856 * win32-low.c (win32_detach, win32_resume): Ditto.
3857
c35fafde
PA
38582009-04-01 Pedro Alves <pedro@codesourcery.com>
3859
3860 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
3861 flag.
3862 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
3863 pending.
3864 (linux_continue_one_thread): Only preserve the stepping flag if
3865 there's a pending breakpoint.
3866
0a59d50b
PA
38672009-03-31 Pedro Alves <pedro@codesourcery.com>
3868
3869 * server.c (main): After the inferior having exited, call
3870 remote_close before exiting gdbserver.
3871
f04c6d38
TJB
38722009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
3873
3874 Fix size of FPSCR in Power 7 processors.
3875 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
3876 (PPC_FEATURE_HAS_DFP): New #define.
3877 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
3878 size of the FPSCR.
3879
78e5cee6
PA
38802009-03-23 Pedro Alves <pedro@codesourcery.com>
3881
3882 * server.c (handle_query) Whitespace and formatting.
3883
1b3f6016
PA
38842009-03-22 Pedro Alves <pedro@codesourcery.com>
3885
3886 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
3887 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
3888 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
3889 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
3890 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
3891 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
3892 Makefile.in, configure.ac: Fix whitespace throughout.
3893 * configure: Regenerate.
3894
a07b2135
PA
38952009-03-22 Pedro Alves <pedro@codesourcery.com>
3896
3897 * inferiors.c (find_inferior): Make it safe for the callback
3898 function to delete the currently iterated inferior.
3899
67cc2626
PA
39002009-03-22 Pedro Alves <pedro@codesourcery.com>
3901
3902 * Makefile.in (linuw_low_h): Move higher.
3903 (thread-db.o): Depend on $(linux_low_h).
3904
54a0b537
PA
39052009-03-17 Pedro Alves <pedro@codesourcery.com>
3906
3907 Rename "process" to "lwp" throughout.
3908
3909 * linux-low.c (all_processes): Rename to...
3910 (all_lwps): ... this.
3911 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
3912 (add_process): Rename to ...
3913 (add_lwp): ... this. Adjust.
3914 (linux_create_inferior): Adjust.
3915 (linux_attach_lwp): Adjust.
3916 (linux_attach): Adjust.
3917 (linux_kill_one_process): Rename to ...
3918 (linux_kill_one_lwp): ... this. Adjust.
3919 (linux_kill): Adjust.
3920 (linux_detach_one_process): Rename to ...
3921 (linux_detach_one_lwp): ... this. Adjust.
3922 (linux_detach): Adjust.
3923 (check_removed_breakpoint): Adjust.
3924 (status_pending_p): Adjust.
3925 (linux_wait_for_process): Rename to ...
3926 (linux_wait_for_lwp): ... this. Adjust.
3927 (linux_wait_for_event): Adjust.
3928 (send_sigstop): Adjust.
3929 (wait_for_sigstop): Adjust.
3930 (stop_all_processes): Rename to ...
3931 (stop_all_lwps): ... this.
3932 (linux_resume_one_process): Rename to ...
3933 (linux_resume_one_lwp): ... this. Adjust.
3934 (linux_set_resume_request, linux_continue_one_thread)
3935 (linux_queue_one_thread, resume_status_pending_p)
3936 (usr_store_inferior_registers, regsets_store_inferior_registers)
3937 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
3938 Adjust.
3939 * linux-low.h (get_process): Rename to ...
3940 (get_lwp): ... this. Adjust.
3941 (get_thread_process): Rename to ...
3942 (get_thread_lwp): ... this. Adjust.
3943 (get_process_thread): Rename to ...
3944 (get_lwp_thread): ... this. Adjust.
3945 (struct process_info): Rename to ...
3946 (struct lwp_info): ... this.
3947 (all_processes): Rename to ...
3948 (all_lwps): ... this.
3949 * proc-service.c (ps_lgetregs): Adjust.
3950 * thread-db.c (thread_db_create_event, find_one_thread)
3951 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
3952
0b16c5cf
PA
39532009-03-14 Pedro Alves <pedro@codesourcery.com>
3954
3955 * server.c (handle_query): Handle "qAttached".
3956
32de4b9d
NS
39572009-03-13 Nathan Sidwell <nathan@codesourcery.com>
3958
3959 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
3960 GPLv3, update license URL.
3961
2aecd87f
DE
39622009-03-01 Doug Evans <dje@google.com>
3963
93efd302 3964 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
3965 (server_h): Add gdb_signals.h.
3966 (signals.o): Update.
3967 * server.h (target_signal_from_host,target_signal_to_host_p)
3968 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
3969
86b1f9c5
PM
39702009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
3971
3972 * remote-utils.c (getpkt): Also generate remote-debug
3973 information if noack_mode is set.
3974
4aa995e1
PA
39752009-02-06 Pedro Alves <pedro@codesourcery.com>
3976
3977 * server.c (handle_query): Report qXfer:siginfo:read and
3978 qXfer:siginfo:write as supported and handle them.
3979 * target.h (struct target_ops) <qxfer_siginfo>: New field.
3980 * linux-low.c (linux_xfer_siginfo): New.
3981 (linux_target_ops): Set it.
3982
62709adf
PA
39832009-01-26 Pedro Alves <pedro@codesourcery.com>
3984
3985 * server.c (gdbserver_usage): Mention --remote-debug.
3986 (main): Accept '--remote-debug' switch.
3987
aef93bd7
DE
39882009-01-18 Doug Evans <dje@google.com>
3989
3990 * regcache.c (new_register_cache): No need to check result of xcalloc.
3991 * server.c (handle_search_memory): Back out calls to xmalloc,
3992 result is checked and error is returned to user upon failure.
3993 (handle_query): Ditto. Add more checks for result of malloc.
3994 (handle_v_cont): Check result of malloc, report error back to
3995 user upon failure.
3996 (handle_v_run): Ditto. Call freeargv.
3997 * server.h (freeargv): Declare.
3998 * utils.c (freeargv): New fn.
3999
54363045
DE
40002009-01-15 Doug Evans <dje@google.com>
4001
f626972c
DE
4002 * gdbreplay.c (perror_with_name): Make arg const char *.
4003 * server.h (target_signal_to_name): Make return type const char *.
0842e787 4004 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 4005 * utils.c (perror_with_name): Make arg const char *.
54363045 4006
18aae699
PA
40072009-01-14 Pedro Alves <pedro@codesourcery.com>
4008
4009 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
4010 when handling a EXIT_PROCESS_DEBUG_EVENT.
4011
ff703abe
JB
40122009-01-06 Joel Brobecker <brobecker@adacore.com>
4013
4014 * gdbreplay.c (gdbreplay_version): Update copyright year.
4015 * server.c (gdbserver_version): Likewise.
4016
f21cc1a2 40172009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
4018
4019 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 4020 (handle_extended_wait): Improve comment.
0e21c1ec 4021
bca929d3
DE
40222008-12-13 Doug Evans <dje@google.com>
4023
4024 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
4025 * server.h (ATTR_MALLOC): New macro.
4026 (xmalloc,xcalloc,xstrdup): Declare.
4027 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
4028 * inferiors.c: Ditto.
4029 * linux-low.c: Ditto.
4030 * mem-break.c: Ditto.
4031 * regcache.c: Ditto.
4032 * remote-utils.c: Ditto.
4033 * server.c: Ditto.
4034 * target.c: Ditto.
4035 * win32-low.c: Ditto.
4036
97438e3f
DE
40372008-12-12 Doug Evans <dje@google.com>
4038
896c7fbb
DE
4039 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
4040 in debugging printf.
4041
97438e3f
DE
4042 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
4043
e3b886f8
DE
40442008-12-09 Doug Evans <dje@google.com>
4045
4046 * linux-low.h (struct process_info): Delete member tid, unused.
4047 * thread-db.c (find_one_thread): Update.
4048 (maybe_attach_thread): Update.
4049
07e059b5
VP
40502008-12-02 Pedro Alves <pedro@codesourcery.com>
4051
889bf7c5
PA
4052 * target.h (struct target_ops): Add qxfer_osdata member.
4053 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
4054 and dirent.h.
4055 (linux_qxfer_osdata): New functions.
4056 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
4057 callback.
4058 * server.c (handle_query): Handle "qXfer:osdata:read:".
4059 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
4060 (buffer_xml_printf): New functions.
4061 * server.h (struct buffer): New.
4062 (buffer_grow_str, buffer_grow_str0): New macros.
4063 (buffer_grow, buffer_free, buffer_init, buffer_finish)
4064 (buffer_xml_printf): Declare.
07e059b5 4065
4cab47ab
DE
40662008-11-24 Doug Evans <dje@google.com>
4067
4068 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
4069
f142445f
DJ
40702008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
4071
4072 * server.c (handle_v_run): Always use the supplied argument list.
4073
d0107bb6 40742008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 4075
d0107bb6
BW
4076 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
4077 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 4078
2c4ad781
TJB
40792008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
4080
4081 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
4082 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
4083 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
4084 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
4085 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
4086 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
4087 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
4088 XML target descriptions.
4089 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
4090 when inferior is running on an ISA 2.05 or later processor. Add
4091 special case to return offset for full 64-bit slot of FPSCR when
4092 in 32-bits.
4093
dfb64f85
DJ
40942008-11-14 Daniel Gutson <dgutson@codesourcery.com>
4095
4096 * Makefile.in (SFILES, clean): Added sparc64 files.
4097 (reg-sparc64.o, reg-sparc64.c): New.
4098 * configure.srv (sparc*-*-linux*): New configuration.
4099 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
4100 syscall arguments for SPARC.
4101 (regsets_store_inferior_registers): Likewise.
4102 * linux-sparc-low.c: New file.
4103
66b6e1dd
DE
41042008-10-21 Doug Evans <dje@google.com>
4105
4106 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
4107 (READLINE_DIR,READLINE_DEP): Delete.
4108 (INTERNAL_CFLAGS): Update.
4109 (LINTFLAGS): Update.
4110
9b710a42
PA
41112008-10-10 Pedro Alves <pedro@codesourcery.com>
4112
4113 * server.c (handle_v_run): If GDB didn't specify an argv, use the
4114 whole argv from the last run, not just argv[0].
4115
5822d809
PA
41162008-09-08 Pedro Alves <pedro@codesourcery.com>
4117
4118 * regcache.c (new_register_cache): Return NULL if the register
4119 cache size isn't known yet.
4120 (free_register_cache): Avoid dereferencing a NULL regcache.
4121
74aac56f
DJ
41222008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
4123
4124 * configure.srv: Merge MIPS and MIPS64.
4125
400b20f5
MR
41262008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
4127
4128 * Makefile.in (uninstall): Apply $(EXEEXT) too.
4129
677c5bb1
LM
41302008-08-18 Luis Machado <luisgpm@br.ibm.com>
4131
4132 * Makefile.in: Add required vsx dependencies.
4133
4134 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
4135 Declare init_registers_powerpc_vsx32l.
4136 Declare init_registers_powerpc_vsx64l.
4137 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
4138 (ppc_arch_setup): Check for VSX in hwcap.
4139 (ppc_fill_vsxregset): New function.
4140 (ppc_store_vsxregset): New function.
4141 Add new VSX entry in regset_info target_regsets.
4142
4143 * configure.srv: Add new VSX dependencies.
4144
a6f3e723
SL
41452008-08-12 Pedro Alves <pedro@codesourcery.com>
4146
4147 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
4148 (remote_open): Set or clear transport_is_reliable.
4149 (putpkt_binary): Don't expect acks in noack mode.
4150 (getpkt): Don't send ack/nac in noack mode.
4151 * server.c (handle_general_set): Handle QStartNoAckMode.
4152 (handle_query): If connected by tcp pass QStartNoAckMode+ in
4153 qSupported.
4154 (main): Reset noack_mode on every connection.
4155 * server.h (noack_mode): Declare.
4156
a417dc56
RW
41572008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4158
4159 * Makefile.in (GDBREPLAY_OBS): New variable.
4160 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
4161
3221518c
UW
41622008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
4163 Daniel Jacobowitz <dan@codesourcery.com>
4164
4165 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
4166 (usr_store_inferior_registers): Likewise.
4167 (regsets_store_inferior_registers): Likewise.
4168
ec56be1b
PA
41692008-07-31 Rolf Jansen <rj@surtec.com>
4170 Pedro Alves <pedro@codesourcery.com>
4171
4172 * configure.ac: Check for memmem declaration.
4173 * server.c [HAVE_MALLOC_H]: Include malloc.h.
4174 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
4175 (disable_packet_qfThreadInfo): Unconditionally compile.
4176 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
4177 * configure, config.in: Regenerate.
4178
2fe5e3ff
DE
41792008-07-28 Doug Kwan <dougkwan@google.com>
4180
4181 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
4182 (linux_write_memory): Remove declaration of errno.
4183
836acd6d
UW
41842008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
4185
4186 * linux-low.c (handle_extended_wait): Do not use "status"
4187 variable uninitialized.
4188
aeba519e
PA
41892008-07-07 Pedro Alves <pedro@codesourcery.com>
4190
4191 * server.c (handle_v_attach): Inhibit reporting dll changes.
4192
db42f210
PA
41932008-06-27 Pedro Alves <pedro@codesourcery.com>
4194
4195 * remote-utils.c (prepare_resume_reply): If requested, don't
4196 output "thread:TID" in the T stop reply.
4197
4198 * server.c (disable_packet_vCont, disable_packet_Tthread)
4199 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
4200 (handle_query): If requested, disable support for qC, qfThreadInfo
4201 and qsThreadInfo.
4202 (handle_v_requests): If requested, disable support for vCont.
4203 (gdbserver_show_disableable): New.
4204 (main): Handle --disable-packet and --disable-packet=LIST.
4205
4206 * server.h (disable_packet_vCont, disable_packet_Tthread)
4207 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
4208
8e4c5421
CD
42092008-06-20 Carlos O'Donell <carlos@codesourcery.com>
4210
4211 * server.c (gdbserver_usage): Mention --version.
4212
6e23a804
DJ
42132008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
4214
4215 * Makefile.in (gdbreplay.o): New rule.
4216
90aa6a40
JM
42172008-06-06 Joseph Myers <joseph@codesourcery.com>
4218
4219 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
4220 message, not gdbserver.
4221
c16158bc 42222008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
4223 Nathan Sidwell <nathan@codesourcery.com>
4224 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
4225
4226 * acinclude.m4: Include ../../config/acx.m4.
4227 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
4228 * configure, config.in: Regenerate.
4229 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
4230 * server.c (gdbserver_version): Print PKGVERSION.
4231 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
4232 (main): Adjust gdbserver_usage calls.
4233 * gdbreplay.c (version, host_name): Add declarations.
4234 (gdbreplay_version, gdbreplay_usage): New.
4235 (main): Accept --version and --help options.
4236
aeb75bf5
DJ
42372008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
4238
4239 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
4240 (arm_breakpoint_at): Handle Thumb.
4241 (the_low_target): Add comment.
4242
76b233dd
UW
42432008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
4244
4245 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
4246
08388c79
DE
42472008-05-09 Doug Evans <dje@google.com>
4248
a3c83fae
DE
4249 * server.h (decode_search_memory_packet): Declare.
4250 * remote-utils.c (decode_search_memory_packet): New fn.
4251 * server.c (handle_search_memory_1): New fn.
08388c79
DE
4252 (handle_search_memory): New fn.
4253 (handle_query): Process qSearch:memory packets.
4254
bb9c3d36
UW
42552008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
4256
4257 * regcache.c (registers_length): Remove.
4258 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
4259 full register packet.
4260 * regcache.h (registers_length): Remove prototype.
4261 * server.h (PBUFSIZ): Define to 16384.
4262
7284e1be
UW
42632008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
4264
4265 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
4266 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
4267 powerpc-64l.o, and powerpc-altivec64l.o.
4268 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
4269 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
4270 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
4271 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
4272 rs6000/power-linux.xml, and rs6000/power64-linux.xml
4273 to srv_xmlfiles.
4274
4275 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
4276 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
4277 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
4278 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
4279 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
4280 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
4281 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
4282 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
4283 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
4284 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
4285 (clean): Update.
4286
4287 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
4288 (init_registers_powerpc_32l): ... this new prototype.
4289 (init_registers_powerpc_32): Remove, replace by ...
4290 (init_registers_powerpc_altivec32l): ... this new prototype.
4291 (init_registers_powerpc_e500): Remove, replace by ...
4292 (init_registers_powerpc_e500l): ... this new prototype.
4293 (init_registers_ppc64): Remove, replace by ...
4294 (init_registers_powerpc_64l): ... this new prototype.
4295 (init_registers_powerpc_64): Remove, replace by ...
4296 (init_registers_powerpc_altivec64l): ... this new prototype.
4297 (ppc_num_regs): Set to 73.
4298 (PT_ORIG_R3, PT_TRAP): Define if necessary.
4299 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
4300 (ppc_cannot_store_register): Handle orig_r3 and trap.
4301 (ppc_arch_setup): Update init_registers_... calls.
4302 (ppc_fill_gregset): Handle orig_r3 and trap.
4303
4304 * inferiors.c (clear_inferiors): Reset current_inferior.
4305
fdc59709
PB
43062008-04-23 Paolo Bonzini <bonzini@gnu.org>
4307
889bf7c5
PA
4308 * acinclude.m4: Add override.m4.
4309 * configure: Regenerate.
fdc59709 4310
c9b2f845
UW
43112008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
4312
4313 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
4314 initial call to init_register_ppc64.
4315
550512b8
UW
43162008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
4317
4318 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into single
4319 powerpc*-*-linux* case.
4320 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
4321
b6430ec3
UW
43222008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
4323
4324 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 4325 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
4326 from reg_xmlfiles.
4327 * linux-ppc-low.c: Include <elf.h>.
4328 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
4329 (ppc_hwcap): New global variable.
4330 (ppc_regmap): Remove __SPE__ #ifdef sections.
4331 (ppc_regmap_e500): New global variable.
4332 (ppc_cannot_store_register): Update __SPE__ special case.
4333 (ppc_get_hwcap): New function.
4334 (ppc_arch_setup): Use it to determine whether inferior supports
4335 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
4336 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
4337 Do not access registers if target does not support AltiVec.
4338 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
4339 Do not access registers if target does not support SPE.
4340 (target_regsets): Unconditionally include AltiVec and SPE regsets.
4341
52fa2412
UW
43422008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
4343
4344 * linux-low.c (disabled_regsets, num_regsets): New.
4345 (use_regsets_p): Delete.
4346 (linux_wait_for_process): Clear disabled_regsets.
4347 (regsets_fetch_inferior_registers): Check and set it.
4348 (regsets_store_inferior_registers): Likewise.
4349 (linux_fetch_registers, linux_store_registers): Do not use
4350 use_regsets_p.
4351 (initialize_low): Allocate disabled_regsets.
4352
e28b3332
DJ
43532008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
4354
4355 * Makefile.in (LIBOBJS): New.
4356 (OBS): Use LIBOBJS.
4357 (memmem.o): New rule.
4358 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
4359 * configure: Regenerated.
4360
4536995d
UW
43612008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
4362
4363 * server.c (handle_query): Never return "unsupported" for
4364 qXfer:features:read queries.
4365
221c031f
UW
43662008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
4367
4368 * server.c (get_features_xml): Fix inverted condition.
4369 (handle_query): Always support qXfer:feature:read.
4370
ccd213ac
DJ
43712008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
4372
4373 * server.c (wrapper_argv): New.
4374 (start_inferior): Handle wrapper_argv. If set, expect an extra
4375 trap.
4376 (gdbserver_usage): Document --wrapper.
4377 (main): Parse --wrapper.
4378
6fe305f7
UW
43792008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
4380
4381 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
4382 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
4383 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
4384 (ppc_set_pc): Likewise.
4385 (ppc_arch_setup): New function.
4386 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
4387 of collect_register.
889bf7c5 4388 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 4389
5b0a002e
UW
43902008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
4391
4392 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
4393 instead of linux-ppc64-low.o.
4394 * linux-ppc64-low.c: Remove file.
4395 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
4396 (linux-ppc64-low.o): Remove rule.
4397
4398 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
4399 (init_registers_powerpc_64): Likewise.
4400 (ppc_regmap): Conditionally define depending on __powerpc64__.
4401 (ppc_cannot_store_register): Do not special-case "fpscr" when
4402 compiled on __powerpc64__.
4403 (ppc_collect_ptrace_register): New function.
4404 (ppc_supply_ptrace_register): New function.
4405 (ppc_breakpoint): Change type to "unsigned int".
4406 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
4407 (the_low_target): Conditionally provide initializers for the
889bf7c5 4408 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
4409 collect_ptrace_register and supply_ptrace_register members.
4410
9b4b61c8
UW
44112008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
4412
4413 * regcache.h (gdbserver_xmltarget): Add extern declaration.
4414 * server.c (gdbserver_xmltarget): Define.
4415 (get_features_xml): Use it to replace "target.xml" and arch_string.
4416
4417 * configure.srv: Remove srv_xmltarget. Add XML files that were
4418 mentioned there to srv_xmlfiles instead. Remove conditional tests
4419 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
4420 srv_xmlfiles and srv_regobj to include all possible choices.
4421 * configure.ac (srv_xmltarget): Remove.
4422 (srv_xmlfiles): Do not add "target.xml".
4423 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
4424 checks for supplementary target information.
4425 * configure: Regenerate.
4426 * Makefile.in (XML_TARGET): Remove.
4427 (target.xml): Remove rule.
4428 (clean): Do not clean up target.xml.
4429 (.PRECIOUS): Do not mention target.xml.
4430
4431 * target.h (struct target_ops): Remove arch_string member.
4432 * linux-low.c (linux_arch_string): Remove.
4433 (linux_target_ops): Remove arch_string initializer.
4434 * linux-low.h (struct linux_target_ops): Remove arch_string member.
4435 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
4436 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
4437 * spu-low.c (spu_arch_string): Remove.
4438 (spu_target_ops): Remove arch_string initializer.
4439 * win32-low.c (win32_arch_string): Remove.
4440 (win32_target_ops): Remove arch_string initializer.
4441 * win32-low.h (struct win32_target_ops): Remove arch_string member.
4442 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
4443 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
4444
ee1a7ae4
UW
44452008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
4446
4447 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
4448 by collect_ptrace_register and supply_ptrace_register hooks.
4449 * linux-low.c (fetch_register): Use supply_ptrace_register callback
4450 instead of checking for the_low_target.left_pad_xfer.
4451 (usr_store_inferior_registers): Use collect_ptrace_register callback
4452 instead of checking for the_low_target.left_pad_xfer.
4453
4454 * linux-s390-low.c (s390_collect_ptrace_register): New function.
4455 (s390_supply_ptrace_register): Likewise.
4456 (s390_fill_gregset): Call s390_collect_ptrace_register.
4457 (the_low_target): Update.
4458
4459 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
4460 (ppc_supply_ptrace_register): Likewise.
4461 (the_low_target): Update.
4462
4463 * linux-i386-low.c (the_low_target): Update.
4464 * linux-x86-64-low.c (the_low_target): Update.
4465
d61ddec4
UW
44662008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
4467
4468 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
4469 reg-s390.o and reg-s390x.o.
4470
4471 * linux-low.c (new_inferior): New global variable.
4472 (linux_create_inferior, linux_attach): Set it.
4473 (linux_wait_for_process): Call the_low_target.arch_setup after the
4474 target has stopped for the first time.
4475 (initialize_low): Do not call the_low_target.arch_setup.
4476
4477 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
4478 (s390_set_pc): Likewise.
4479 (s390_arch_setup): New function.
4480 (the_low_target): Use s390_arch_setup as arch_setup routine.
4481
4482 * regcache.c (realloc_register_cache): New function.
4483 (set_register_cache): Call it for each existing regcache.
4484
d05b4ac3
UW
44852008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
4486
4487 * server.h (init_registers): Remove prototype.
4488
4489 * linux-low.h (struct linux_target_ops): Add arch_setup field.
4490 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
4491 instead of init_registers ().
4492 * linux-arm-low.c (init_registers_arm): Add prototype.
4493 (init_registers_arm_with_iwmmxt): Likewise.
4494 (the_low_target): Add initializer for arch_setup field.
4495 * linux-cris-low.c (init_registers_cris): Add prototype.
4496 (the_low_target): Add initializer for arch_setup field.
4497 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
4498 (the_low_target): Add initializer for arch_setup field.
4499 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
4500 (the_low_target): Add initializer for arch_setup field.
4501 * linux-ia64-low.c (init_registers_ia64): Add prototype.
4502 (the_low_target): Add initializer for arch_setup field.
4503 * linux-m32r-low.c (init_registers_m32r): Add prototype.
4504 (the_low_target): Add initializer for arch_setup field.
4505 * linux-m68k-low.c (init_registers_m68k): Add prototype.
4506 (the_low_target): Add initializer for arch_setup field.
4507 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
4508 (init_registers_mips64_linux): Likewise.
4509 (the_low_target): Add initializer for arch_setup field.
4510 * linux-ppc-low.c (init_registers_ppc): Add prototype.
4511 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
4512 (the_low_target): Add initializer for arch_setup field.
4513 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
4514 (init_registers_powerpc_64): Likewise.
4515 (the_low_target): Add initializer for arch_setup field.
4516 * linux-s390-low.c (init_registers_s390): Add prototype.
4517 (init_registers_s390x): Likewise.
4518 (the_low_target): Add initializer for arch_setup field.
4519 * linux-sh-low.c (init_registers_sh): Add prototype.
4520 (the_low_target): Add initializer for arch_setup field.
4521 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
4522 (the_low_target): Add initializer for arch_setup field.
4523 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
4524 (the_low_target): Add initializer for arch_setup field.
4525
4526 * win32-low.h (struct win32_target_ops): Add arch_setup field.
4527 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
4528 instead of init_registers ().
4529 * win32-arm-low.c (init_registers_arm): Add prototype.
4530 (the_low_target): Add initializer for arch_setup field.
4531 * win32-i386-low.c (init_registers_i386): Add prototype.
4532 (the_low_target): Add initializer for arch_setup field.
4533
4534 * spu-low.c (init_registers_spu): Add prototype.
4535 (initialize_low): Call initialie_registers_spu () instead of
4536 initialize_registers ().
4537
fd96d250
PA
45382008-02-19 Pedro Alves <pedro@codesourcery.com>
4539
4540 * server.c (handle_v_requests): When handling the vRun and vAttach
4541 packets, if already debugging a process, don't kill it. Return an
4542 error instead.
4543
d41b6bb4
DJ
45442008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
4545
4546 * server.c (handle_query): Correct length check.
4547
5ac588cf
PA
45482008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
4549
4550 * win32-low.c (do_initial_child_stuff): Add process handle
4551 parameter. Set current_process_handle and current_process_id from the
4552 parameters. Clear globals.
4553 (win32_create_inferior): Don't set current_process_handle and
4554 current_process_id here. Instead pass them on the call to
4555 do_initial_child_stuff.
4556 (win32_attach): Likewise.
4557 (win32_clear_inferiors): New.
4558 (win32_kill): Don't close the current process handle or the
4559 current thread handle here. Instead call win32_clear_inferiors.
4560 (win32_detach): Don't open a new handle to the process. Call
4561 win32_clear_inferiors.
4562 (win32_join): Don't rely on current_process_handle; open a new
4563 handle using the process id.
4564 (win32_wait): Call win32_clear_inferiors when the inferior process
4565 has exited.
4566
ecd7ecbc
DJ
45672008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
4568
4569 * server.c (monitor_show_help): Add "exit".
4570
1525d545
MG
45712008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
4572
ecd7ecbc 4573 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
4574 (clean): Add reg-xtensa.c.
4575 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
4576 * configure.srv (xtensa*-*-linux*) New target.
4577 * linux-xtensa-low.c: New.
4578 * xtensa-xtregs.c: New.
1525d545 4579
59a016f0
PA
45802008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
4581
4582 * hostio.c: Don't include errno.h.
4583 (errno_to_fileio_errno): Move to hostio-errno.
4584 * hostio.c: (hostio_error): Remove the error parameter. Defer the
4585 error number outputting to the target->hostio_last_error callback.
4586 (hostio_packet_error): Use FILEIO_EINVAL directly.
4587 (handle_open, handle_pread, hostio_error, handle_unlink): Update
4588 calls to hostio_error.
4589 * hostio-errno.c: New.
4590 * server.h (hostio_last_error_from_errno): Declare.
4591 * target.h (target_ops): Add hostio_last_error member.
4592 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
4593 as hostio_last_error handler.
889bf7c5 4594 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
4595 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
4596 (wince_hostio_last_error): New functions.
4597 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
4598 as hostio_last_error handler.
4599 (win32_target_ops) [!_WIN32_WCE]: Register
4600 hostio_last_error_from_errno as hostio_last_error handler.
4601 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
4602 (hostio-errno.o): New rule.
4603 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
4604 * configure.srv (srv_hostio_err_objs): New variable. Default to
4605 hostio-errno.o.
4606 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
4607 * configure: Regenerate.
4608
2d717e4f
DJ
46092008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
4610
4611 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
4612 (linux_kill, linux_detach): Clean up the process list.
4613 * remote-utils.c (remote_open): Improve port number parsing.
4614 (putpkt_binary, input_interrupt): Only send interrupts if the target
4615 is running.
4616 * server.c (extended_protocol): Make static.
4617 (attached): Define earlier.
4618 (exit_requested, response_needed, program_argv): New variables.
4619 (target_running): New.
4620 (start_inferior): Clear attached here.
4621 (attach_inferior): Set attached here.
4622 (require_running): Define.
4623 (handle_query): Use require_running and target_running. Implement
4624 "monitor exit".
4625 (handle_v_attach, handle_v_run): New.
4626 (handle_v_requests): Use require_running. Handle vAttach and vRun.
4627 (gdbserver_usage): Update.
4628 (main): Redo argument parsing. Handle --debug and --multi. Handle
4629 --attach along with other options or after the port. Save
4630 program_argv. Support no initial program. Resynchronize
4631 communication with GDB after an error. Handle "monitor exit".
4632 Use require_running and target_running. Always allow the extended
4633 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
4634 restart in extended mode.
4635 * README: Refer to the GDB manual. Update --attach usage.
4636
7407e2de
AS
46372007-12-20 Andreas Schwab <schwab@suse.de>
4638
4639 * linux-low.c (STACK_SIZE): Define.
4640 (linux_tracefork_child): Use it. Use __clone2 on ia64.
4641 (linux_test_for_tracefork): Likewise.
4642
b65d95c5
DJ
46432007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
4644
4645 * linux-low.c (linux_wait_for_event): Update messages. Do not
4646 reinsert auto-delete breakpoints.
4647 * mem-break.c (struct breakpoint): Change return type of handler to
4648 int.
4649 (set_breakpoint_at): Update handler type.
4650 (reinsert_breakpoint_handler): Return 1 instead of calling
4651 delete_breakpoint.
4652 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
4653 setting a new one.
4654 (check_breakpoints): Delete auto-delete breakpoints and return 2.
4655 * mem-break.h (set_breakpoint_at): Update handler type.
4656 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
4657 * win32-low.c (auto_delete_breakpoint): New.
4658 (get_child_debug_event): Use it.
4659
4e799345
DJ
46602007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
4661
4662 * configure.ac: Check for pread and pwrite.
4663 * hostio.c (handle_pread): Fall back to lseek and read.
4664 (handle_pwrite): Fall back to lseek and write.
4665 * config.in, configure: Regenerated.
4666
27524b67
DJ
46672007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
4668
4669 * server.c (myresume): Add own_buf argument.
4670 (main): Update calls.
4671
a20d5e98
DJ
46722007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
4673
4674 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
4675 * remote-utils.c (remote_open): Do not call disable_async_io.
4676 (block_async_io): Delete.
4677 (unblock_async_io): Make static.
4678 (initialize_async_io): New.
4679 * server.c (handle_v_cont): Handle async I/O here.
4680 (myresume): Likewise. Move other common resume tasks here...
4681 (main): ... from here. Call initialize_async_io. Disable async
4682 I/O before the main loop.
4683 * server.h (initialize_async_io): Declare.
4684 (block_async_io, unblock_async_io): Delete prototypes.
4685 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
4686
b79d787e
DJ
46872007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
4688
4689 * remote-utils.c (readchar): Allow binary data in received messages.
4690
d97903b2
PA
46912007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
4692
4693 * win32-low.c (attaching): New global.
4694 (win32_create_inferior): Clear the `attaching' global.
4695 (win32_attach): Set the `attaching' global.
4696 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
4697 attaching. Only set a breakpoint at the entry point if not
4698 attaching.
4699
311de423
PA
47002007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
4701
4702 * server.c (main): Don't report dll events on the initial
4703 connection on attaches.
4704
6c2d16d2
PA
47052007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
4706
4707 * server.c (main): Relax numerical bases supported for the pid of
4708 the --attach command line argument.
4709
5ca906e6
PA
47102007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
4711
4712 * win32-low.c (win32_attach): Call OpenProcess before
4713 DebugActiveProcess, not after. Add last error output to error
4714 call.
4715
9c6c8194
PA
47162007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
4717
4718 * win32-low.c (win32_get_thread_context)
4719 (win32_set_thread_context): New functions.
4720 (thread_rec): Use win32_get_thread_context.
4721 (continue_one_thread, win32_resume): Use win32_set_thread_context.
4722 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
4723 field.
4724
4d5d1aaa
PA
47252007-12-03 Leo Zayas
4726 Pedro Alves <pedro_alves@portugalmail.pt>
4727
4728 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
4729 global variables.
4730 (child_add_thread): Minor cleanup.
4731 (child_continue): Resume artificially suspended threads before
4732 calling ContinueDebugEvent.
4733 (suspend_one_thread): New.
4734 (fake_breakpoint_event): New.
4735 (get_child_debug_event): Change return type to int. Check here if
4736 gdb sent an interrupt request. If a soft interrupt was requested,
4737 fake a breakpoint event. Return 0 if there is no event to handle,
4738 and 1 otherwise.
4739 (win32_wait): Don't check here if gdb sent an interrupt request.
4740 Ensure there is a valid event to handle.
4741 (win32_request_interrupt): Add soft interruption method as last
4742 resort.
4743
c436e841
PA
47442007-12-03 Leo Zayas
4745 Pedro Alves <pedro_alves@portugalmail.pt>
4746
4747 * win32-low.h (win32_thread_info): Add descriptions to the
4748 structure members. Replace `suspend_count' counter by a
4749 `suspended' flag.
4750 * win32-low.c (thread_rec): Update condition of when to get the
4751 context from the inferior. Rely on ContextFlags being set if it
4752 has already been retrieved. Only suspend the inferior thread if
4753 we haven't already. Warn if that fails.
4754 (continue_one_thread): s/suspend_count/suspended/. Only call
4755 ResumeThread once. Warn if that fails.
4756
e7b5fa67
PA
47572007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
4758
4759 * win32-low.c (win32_wait): Don't read from the inferior when it
4760 has already exited.
4761
a385171d
PA
47622007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
4763
4764 * Makefile.in (win32_low_h): New variable.
4765 (win32-low.o): Add dependency on $(win32_low_h).
4766 (win32-arm-low.o, win32-i386-low.o): New rules.
4767
f80c84b3
DJ
47682007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
4769
4770 * hostio.c: Correct copyright year.
4771
a6b151f1
DJ
47722007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
4773
4774 * Makefile.in (OBS): Add hostio.o.
4775 (hostio.o): New rule.
4776 * server.h (handle_vFile): Declare.
4777 * hostio.c: New file.
4778 * server.c (handle_v_requests): Take packet_len and new_packet_len
4779 for binary packets. Call handle_vFile.
4780 (main): Update call to handle_v_requests.
4781
f9387fc3
DJ
47822007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
4783
4784 * linux-low.c: Include <sched.h>.
4785
51c2684e
DJ
47862007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
4787
4788 * linux-low.c (linux_tracefork_grandchild): New.
4789 (linux_tracefork_child): Use clone.
4790 (linux_test_for_tracefork): Use clone; allocate and free a stack.
4791
75f83163
JB
47922007-10-31 Joel Brobecker <brobecker@adacore.com>
4793
4794 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
4795
da5898ce
DJ
47962007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
4797
4798 * linux-low.c (handle_extended_wait): Handle unexpected signals.
4799
24a09b5f
DJ
48002007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
4801
4802 * inferiors.c (change_inferior_id): Delete.
4803 (add_pid_to_list, pull_pid_from_list): New.
4804 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
4805 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
4806 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
4807 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
4808 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
4809 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
4810 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
4811 (using_threads): Always set to 1.
4812 (handle_extended_wait): New.
4813 (add_process): Do not set TID.
4814 (linux_create_inferior): Set must_set_ptrace_flags.
4815 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
4816 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
4817 (linux_thread_alive): Rename TID argument to LWPID.
4818 (linux_wait_for_process): Handle unknown processes. Do not use TID.
4819 (linux_wait_for_event): Do not use TID or check using_threads. Update
4820 call to dead_thread_notify. Call handle_extended_wait.
4821 (linux_create_inferior): Use PTRACE_SETOPTIONS.
4822 (send_sigstop): Delete sigstop_sent.
4823 (wait_for_sigstop): Avoid TID.
4824 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
4825 (linux_test_for_tracefork): New.
4826 (linux_lookup_signals): Use thread_db_active and
4827 linux_supports_tracefork_flag.
4828 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
4829 * linux-low.h (get_process_thread): Avoid TID.
4830 (struct process_ifo): Move thread_known and tid to the end. Remove
4831 sigstop_sent.
4832 (linux_attach_lwp, thread_db_init): Update prototypes.
4833 * server.h (change_inferior_id): Delete prototype.
4834 (add_pid_to_list, pull_pid_from_list): New prototypes.
4835 * thread-db.c (thread_db_use_events): New.
4836 (find_first_thread): Rename to...
4837 (find_one_thread): ...this. Update callers and messages. Do not
4838 call fatal. Check thread_db_use_events. Do not call
4839 change_inferior_id or new_thread_notify.
4840 (maybe_attach_thread): Update. Do not call new_thread_notify.
4841 (thread_db_init): Set thread_db_use_events. Check use_events.
4842 * utils.c (fatal, warning): Correct message prefix.
4843
30ed0a8f
DJ
48442007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
4845
4846 * Makefile.in (clean): Remove new files.
4847 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
4848 (powerpc-64.o, powerpc-64.c): New rules.
4849 * configure.srv: Use alternate register sets for powerpc64-*-linux*
4850 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
4851 with SPE.
4852 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
4853 SPE targets.
4854 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
4855 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
4856 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
4857 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
4858 (target_regsets): Add AltiVec and SPE register sets.
4859 * configure.ac: Check for AltiVec and SPE.
4860 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
4861 (ppc_fill_vrregset, ppc_store_vrregset): New.
4862 (target_regsets): Add AltiVec register set.
4863 * configure: Regenerated.
4864
fd462a61
DJ
48652007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
4866
4867 * linux-low.c (O_LARGEFILE): Define.
4868 (linux_read_memory): Use /proc/PID/mem.
4869 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
4870 * configure, config.in: Regenerated.
4871
69f223ed
DJ
48722007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
4873
4874 * linux-low.c (linux_wait_for_event): Do not pass signals while
4875 single-stepping.
4876
aec18585
PA
48772007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
4878
4879 * win32-low.c (create_process): New.
4880 (win32_create_inferior): Use create_process instead of
4881 CreateProcess. If create_process failed retry appending an ".exe"
4882 suffix. Store the GetLastError result immediatelly after
4883 create_process calls and use it on the call to error.
4884
34d86ddd
PA
48852007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
4886
4887 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
4888
5a0e3bd0
JB
48892007-08-23 Joel Brobecker <brobecker@adacore.com>
4890
4891 * configure.ac: Switch license to GPLv3.
4892
f88c79e6
MS
48932007-08-01 Michael Snyder <msnyder@access-company.com>
4894
4895 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
4896
6b3d9b83
PA
48972007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
4898
4899 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
4900 typedef.
4901 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
4902 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
4903 CloseToolhelp32Snapshot.
4904 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
4905 CloseToolhelp32Snapshot.
4906
c588c53c
MS
49072007-07-27 Michael Snyder <michael.snyder@access-company.com>
4908
4909 * server.c (main): Check for inferior exit before main loop.
4910
aa0403d9
PA
49112007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
4912
4913 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
4914 instead of on tmp_desc.
4915
255e7678
DJ
49162007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
4917 Daniel Jacobowitz <dan@codesourcery.com>
4918
4919 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
4920 (add_thread): Minor cleanups.
4921 (clear_inferiors): Move lower in the file. Clear the DLL
4922 list.
4923 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
4924 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
4925 (xml_escape_text): New.
4926 * server.c (handle_query): Handle qXfer:libraries:read. Report it
4927 for qSupported.
4928 (handle_v_cont): Report errors.
4929 (gdbserver_version): Update.
4930 (main): Correct size of own_buf. Do not report initial DLL events.
4931 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
4932 (unloaded_dll, xml_escape_text): New.
4933 * win32-low.c (enum target_waitkind): Update comments.
4934 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
4935 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
4936 (win32_EnumProcessModules, win32_GetModuleInformation)
4937 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
4938 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
4939 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
4940 (win32_Module32First, win32_Module32Next, load_toolhelp)
4941 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
4942 (get_child_debug_event): Handle DLL events.
4943 (win32_wait): Likewise.
4944
0d37add9
DJ
49452007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
4946
4947 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
4948 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
4949
45e2715e
PA
49502007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
4951
4952 * win32-low.c (handle_output_debug_string): Ignore event if not
4953 waiting.
4954
c5674cf1
PA
49552007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
4956
4957 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
4958
2bbe3cc1
DJ
49592007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
4960
4961 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
4962
ae13219e
DJ
49632007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
4964
4965 * inferiors.c (change_inferior_id): Add comment.
4966 * linux-low.c (check_removed_breakpoint): Add an early
4967 prototype. Improve debug output.
4968 (linux_attach): Doc update.
4969 (linux_detach_one_process, linux_detach): Clean up before releasing
4970 each process.
4971 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
4972 * linux-low.h (struct process_info): Doc improvement.
4973 * mem-break.c (delete_all_breakpoints): New.
4974 * mem-break.h (delete_all_breakpoints): New prototype.
4975 * thread-db.c (find_first_thread): New.
4976 (thread_db_create_event): Call it instead of
4977 thread_db_find_new_threads. Clean up unused variables.
4978 (maybe_attach_thread): Remove first thread handling.
4979 (thread_db_find_new_threads): Use find_first_thread.
4980 (thread_db_get_tls_address): Likewise.
4981
4105de34
DJ
49822007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
4983
4984 * thread-db.c (thread_db_find_new_threads): Add prototype.
4985 (thread_db_create_event): Check for the main thread before adding
4986 a new thread.
4987 (maybe_attach_thread): Only enable event reporting if TID == 0.
4988 (thread_db_get_tls_address): Check for new threads.
4989
2b876972
DJ
49902007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
4991
4992 * linux-low.c (linux_create_inferior): Try execv before execvp.
4993 * spu-low.c (spu_create_inferior): Likewise.
4994
7a245884
DJ
49952007-06-13 Mike Frysinger <vapier@gentoo.org>
4996
4997 * linux-low.c (linux_create_inferior): Change execv to execvp.
4998 * spu-low.c (spu_create_inferior): Likewies.
4999
117ce543
DJ
50002007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
5001
5002 * Makefile.in (clean): Clean new files instead of deleted ones.
5003 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
5004 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
5005 rules.
5006 * configure.srv: Specify XML files and new regformats for MIPS and
5007 MIPS64 GNU/Linux.
5008 * linux-mips-low.c (mips_num_regs): Set to only used registers.
5009 (mips_regmap): Do not fetch $0. Remove unused registers. Add
5010 an entry for the restart register.
5011 (mips_cannot_fetch_register, mips_cannot_store_register)
5012 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
5013 register names to match the XML descriptions.
5014 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
5015 restart register instead of $0.
5016
0e7f50da
UW
50172007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
5018 Markus Deuling <deuling@de.ibm.com>
5019
5020 * remote-utils.c (decode_xfer_write): New function.
5021 * server.h (decode_xfer_write): Add prototype.
5022 * server.c (handle_query): Add PACKET_LEN argument. Support
5023 qXfer:spu:read and qXfer:spu:write packets.
5024 (main): Pass packet_len to handle_query.
5025 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
5026 * target.h (target_ops): Add qxfer_spu.
5027
374c1d38
UW
50282007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
5029
5030 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
5031 accessing non-seekable spufs files.
5032
bb63802a
UW
50332007-05-16 Markus Deuling <deuling@de.ibm.com>
5034
889bf7c5 5035 * server.c (handle_query): Add reply for qC packet.
bb63802a 5036
7390519e
PA
50372007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
5038 Leo Zayas <lerele@champenstudios@com>
5039
5040 * server.h (check_remote_input_interrupt_request): New function.
5041 * remote_utils.c (INVALID_DESCRIPTOR): New define.
5042 (remote_desc): Initialize with INVALID_DESCRIPTOR.
5043 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
5044 (check_remote_input_interrupt_request): New function.
5045 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 5046 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
5047 winapi_GenerateConsoleCtrlEvent): New typedefs.
5048 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
5049 to 250 ms.
5050 (win32_wait): Check for remote interrupt request
5051 with check_remote_input_interrupt_request.
5052 (win32_request_interrupt): New function.
5053 (win32_target_op): Set request_interrupt to win32_request_interrupt.
5054
34b34921
PA
50552007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
5056
5057 * win32-low.c (debug_registers_changed,
5058 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
5059 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
5060 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
5061 (thread_rec): Get context using the low target.
5062 (child_add_thread): Call thread_added on the low target,
5063 which does the same thing.
5064 (regptr): Delete.
5065 (do_initial_child_stuff): Remove debug registers references.
5066 Set context using the low target. Resume threads after
5067 setting the contexts.
5068 (child_continue): Remove dead variable. Remove debug
5069 registers references.
5070 (child_fetch_inferior_registers): Go through the low target.
5071 (do_child_store_inferior_registers): Remove.
5072 (child_store_inferior_registers): Go through the low target.
5073 (win32_resume): Remove debug registers references.
5074 Set context using the low target.
5075 (handle_exception): Change return type to void. Don't record
5076 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
5077 first chance exception.
889bf7c5 5078 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
5079 goto loop. Always return after waiting for debug event.
5080 (win32_wait): Convert to switch statement. Handle spurious
5081 events.
5082
5083 * win32-i386-low.c (debug_registers_changed,
5084 debug_registers_used): New.
5085 (initial_stuff): Rename to ...
5086 (i386_initial_stuff): ... this. Clear debug registers
5087 state variables.
5088 (store_debug_registers): Delete.
5089 (i386_get_thread_context): New.
5090 (load_debug_registers): Delete.
5091 (i386_set_thread_context): New.
5092 (i386_thread_added): New.
5093 (single_step): Rename to ...
5094 (i386_single_step): ... this.
5095 (do_fetch_inferior_registers): Rename to ...
5096 (i386_fetch_inferior_register): ... this.
5097 (i386_store_inferior_register): New.
5098 (the_low_target): Adapt to new interface.
5099
5100 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
5101 (arm_get_thread_context): New.
5102 (arm_set_thread_context): New.
5103 (regptr): New.
5104 (do_fetch_inferior_registers): Rename to ...
5105 (arm_fetch_inferior_register): ... this.
5106 (arm_store_inferior_register): New.
5107 (arm_wince_breakpoint): Reimplement as unsigned long.
5108 (arm_wince_breakpoint_len): Define.
5109 (the_low_target): Adapt to new interface.
5110
5111 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
5112 load_debug_registers. Add get_thread_context, set_thread_context,
5113 thread_added and store_inferior_register. Rename
5114 fetch_inferior_registers to fetch_inferior_register.
5115 (regptr): Remove declaration.
5116
dd6953e1
PA
51172007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
5118
5119 * linux-low.c (linux_detach): Change return type to int. Return 0.
5120 * spu-low.c (spu_detach): Likewise.
5121
444d6139
PA
51222007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
5123
5124 * target.h (target_ops): Change return type of detach to int.
5125 Add join.
5126 (join_inferior): New.
5127 * server.c (main): Don't skip detach support on mingw32.
5128 If the inferior doesn't support detaching return error.
5129 Call join_inferior instead of using waitpid.
5130 * linux-low.c (linux_join): New.
5131 (linux_target_op): Add linux_join.
5132 * spu-low.c (spu_join): New.
5133 (spu_target_ops): Add spu_join.
5134 * win32-low.c (win32_detach): Adapt to new interface.
5135 Reopen current_process_handle before detaching. Issue a child
5136 resume before detaching.
5137 (win32_join): New.
5138 (win32_target_op): Add win32_join.
5139
1d5315fe
PA
51402007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
5141
5142 * win32-low.c (win32-attach): Fix return value.
5143 * target.h (target_ops): Describe ATTACH return values.
5144
bf914831
PA
51452007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
5146
5147 * win32-low.c (GETPROCADDRESS): Define.
5148 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
5149 (winapi_DebugSetProcessKillOnExit): Likewise.
5150 (win32_create_inferior): Force usage of ansi CreateProcessA.
5151 (win32_attach): Use GETPROCADDRESS.
5152 (win32_detach): Likewise.
5153
f72f3e60
PA
51542007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
5155
5156 * win32-low.c (win32_wait): Don't use WSTOPSIG.
5157
ed50f18f
PA
51582007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
5159
5160 * win32-low.c: Commit leftover changes from 2007-03-29.
5161
0c2ead7e
DJ
51622007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
5163
5164 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
5165 fields short instead of int. Add explicit padding.
5166 (i387_cache_to_fsave): Remove unnecessary casts.
5167 (i387_fsave_to_cache): Doc fix.
5168 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
5169
73725ff3
DJ
51702007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
5171
5172 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
5173 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
5174
d99f33d8
PA
51752007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
5176
5177 * configure.srv (arm*-*-mingw32ce*): Move near the other
5178 arm targets.
5179
68070c10
PA
51802007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
5181
2482afc6 5182 * configure.ac: Add errno checking.
68070c10
PA
5183 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
5184 sys/file.h and malloc.h.
5185 (AC_CHECK_DECLS): Add perror.
5186 (srv_mingwce): Handle.
2482afc6 5187 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
5188 win32-i386-low.o to srv_tgtobj.
5189 (i[34567]86-*-mingw*): Likewise.
5190 (arm*-*-mingw32ce*): Add case.
5191 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
5192 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
5193 [__MINGW32CE__] (strerror): New function.
5194 [__MINGW32CE__] (errno): Define to GetLastError.
5195 [__MINGW32CE__] (COUNTOF): New macro.
5196 (remote_open): Remove extra close call.
5197 * mem-break.c (delete_breakpoint_at): New function.
5198 * mem-break.h (delete_breakpoint_at): Declare.
5199 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
5200 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
5201 [USE_WIN32API] (read, write): Add char* casts.
5202 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
5203 * server.h: Include wincecompat.h on Windows CE.
5204 [HAVE_ERRNO_H]: Check.
5205 (perror): Declare if not declared.
5206 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
5207 (perror_with_name): Remove errno declaration.
5208 * wincecompat.h: New.
5209 * wincecompat.c: New.
5210 * win32-low.h: New.
5211 * win32-arm-low.c: New.
5212 * win32-i386-low.c: New.
5213 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
5214 (OUTMSG2): Make it safe.
5215 (_T): New macro.
5216 (COUNTOF): New macro.
5217 (NUM_REGS): Get it from the low target.
5218 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
5219 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
5220 (thread_rec): Let low target handle debug registers.
5221 (child_add_thread): Likewise.
5222 (child_init_thread_list): Likewise.
5223 (continue_one_thread): Likewise.
5224 (regptr): New.
5225 (do_child_fetch_inferior_registers): Move to ...
5226 * win32-i386-low.c: ... here, and rename to ...
5227 (do_fetch_inferior_registers): ... this.
889bf7c5 5228 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
5229 Go through the low target.
5230 (do_child_store_inferior_registers): Use regptr.
5231 (strwinerror): New function.
5232 (win32_create_inferior): Handle Windows CE.
5233 Use strwinerror instead of strerror on Windows error
5234 codes. Add program to the error output.
5235 Don't close the main thread handle on Windows CE.
5236 (win32_attach): Use coredll.dll on Windows CE.
5237 (win32_kill): Close current process and current
5238 thread handles.
5239 (win32_detach): Use coredll.dll on Windows CE.
5240 (win32_resume): Let low target handle debug registers, and
5241 step request.
5242 (handle_exception): Add/Remove initial breakpoint. Avoid
5243 non-existant WSTOPSIG on Windows CE.
5244 (win32_read_inferior_memory): Cast to remove warning.
5245 (win32_arch_string): Go through the low target.
5246 (initialize_low): Call set_breakpoint_data with the low
5247 target's breakpoint.
5248 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
5249 FOP_REGNUM, mappings): Move to ...
5250 * win32-i386-low.c: ... here.
5251 * win32-low.c (win32_thread_info): Move to ...
5252 * win32-low.h: ... here.
5253 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
5254 win32-arm-low.c and wincecompat.c.
5255 (all:): Add $EXEEXT.
5256 (install-only:): Likewise.
5257 (gdbserver:): Likewise.
5258 (gdbreplay:): Likewise.
5259 * config.in: Regenerate.
5260 * configure: Regenerate.
5261
41093d81
PA
52622007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
5263
5264 * win32-low.c: Rename typedef thread_info to
5265 win32_thread_info throughout.
5266
544afa54
PA
52672007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
5268
5269 * win32-i386-low.c: Rename to ...
5270 * win32-low.c: ... this.
5271 * configure.srv: Replace win32-i386-low.o with win32-low.o.
5272 * Makefile.in: Likewise.
5273
bce7165d
PA
52742007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
5275
5276 * remote-utils.c (monitor_output): Constify msg parameter.
5277 * server.h (monitor_output): Likewise.
5278 * win32-i386-low.c (handle_output_debug_string): New.
5279 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
5280 handle_output_debug_string.
5281 (get_child_debug_event): Likewise.
5282
506c7aa0
DJ
52832007-03-27 Mat Hostetter <mat@lcs.mit.edu>
5284
5285 * server.c (main): Correct strtoul check.
5286
42c81e2a
DJ
52872007-03-27 Jon Ringle <jon@ringle.org>
5288
5289 * linux-low.c: Check __ARCH_HAS_MMU__ also.
5290
9453113a
DJ
52912007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
5292
5293 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
5294
64a69107
DJ
52952007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
5296
5297 * terminal.h: Check HAVE_SGTTY_H.
5298
52992007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
5300
5301 * remote-utils.c (remote_open): Print out the assigned port number.
5302
c74d0ad8
DJ
53032007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
5304
5305 * remote-utils.c (monitor_output): New function.
5306 * server.c (debug_threads): Define here.
5307 (monitor_show_help): New function.
5308 (handle_query): Handle qRcmd.
5309 (main): Do not handle 'd' packet.
5310 * server.h (debug_threads, remote_debug, monitor_output): Declare.
5311 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
5312 of debug_threads.
5313
de7c3b4a
PA
53142007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
5315
5316 * Makefile.in (EXEEXT): New.
5317 (clean): Use $(EXEEXT).
5318
ef57601b
PA
53192007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
5320
5321 * target.h (target_ops): Rename send_signal to request_interrupt,
5322 and remove enum target_signal parameter.
5323 * linux-low.c (linux_request_interrupt): Rename from
5324 linux_send_signal, and always send SIGINT.
5325 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
5326 and always send SIGINT.
5327 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
5328 of send_signal.
5329 (input_interrupt): Likewise.
5330
820f2bda
PA
53312007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
5332
5333 * server.c (get_features_xml): Check if target implemented
5334 arch_string.
5335 * win32-i386-low.c (win32_arch_string): New.
5336 (win32_target_ops): Add win32_arch_string as arch_string member.
5337
ab39bf24
UW
53382007-02-22 Markus Deuling <deuling@de.ibm.com>
5339
5340 * spu-low.c (spu_arch_string): New.
5341 (spu_target_ops): Add spu_arch_string.
5342
61ff6e04
DJ
53432007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
5344
5345 * remote-utils.c: Remove HAVE_TERMINAL_H check.
5346 * configure.ac: Do not check for terminal.h.
5347 * configure, config.in: Regenerated.
5348
fb1e4ffc
DJ
53492007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
5350
5351 * Makefile.in (OBS): Add $(XML_BUILTIN).
5352 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
5353 (clean): Update.
5354 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
5355 (arm-with-iwmmxt.c): New.
5356 * config.in, configure: Regenerate.
5357 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
5358 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
5359 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
5360 (arm*-*-linux*): Add iWMMXt and regset support.
5361 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
5362 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
5363 (arm_store_wmmxregset, target_regsets): New.
5364 * server.c (get_features_xml): Take annex argument. Check builtin
5365 XML documents.
5366 (handle_query): Handle multiple annexes.
5367
0f48aa01
DJ
53682007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
5369
5370 * remote-utils.c [USE_WIN32API] (read, write): Define.
5371 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
5372 write.
5373
23181151
DJ
53742007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
5375
5376 * linux-i386-low.c (the_low_target): Set arch_string.
5377 * linux-x86-64-low.c (the_low_target): Likewise.
5378 * linux-low.c (linux_arch_string): New.
5379 (linux_target_ops): Add it.
5380 * linux-low.h (struct linux_target_ops): Add arch_string.
5381 * server.c (write_qxfer_response): Use const void * for DATA.
5382 (get_features_xml): New.
5383 (handle_query): Handle qXfer:features:read. Report it for qSupported.
5384 * target.h (struct target_ops): Add arch_string method.
5385
9d606399
DJ
53862007-01-03 Denis Pilat <denis.pilat@st.com>
5387 Daniel Jacobowitz <dan@codesourcery.com>
5388
5389 * linux-low.c (linux_kill): Handle being called with no threads.
5390 * win32-i386-low.c (win32_kill): Likewise.
5391 (get_child_debug_event): Clear current_process_handle.
5392
53932006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
5394 Daniel Jacobowitz <dan@codesourcery.com>
5395
5396 * remote-utils.c (remote_open): Check the type of specified
5397 serial port devices before opening them.
5398 * server.c (main): Kill the inferior if an error occurs during
5399 the first remote_open.
5400
a5e13d24
DJ
54012006-12-05 Markus Deuling <deuling@de.ibm.com>
5402
5403 * README: Update supported targets.
5404
186947f7
DJ
54052006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
5406
5407 * Makefile.in (clean): Remove reg-mips64.c.
5408 (reg-mips64.c, reg-mips64.o): New rules.
5409 * configure.srv: Handle mips64. Include regset support for mips.
5410 * linux-mips-low.c (union mips_register): New.
5411 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
5412 (mips_breakpoint, mips_breakpoint_at): Use int.
5413 (mips_collect_register, mips_supply_register)
5414 (mips_collect_register_32bit, mips_supply_register_32bit)
5415 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
5416 (mips_store_fpregset, target_regsets): New.
5417 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
5418
a13e2c95
UW
54192006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
5420
5421 * configure.srv: Add target "spu*-*-*".
5422 * Makefile.in (clean): Remove reg-spu.c.
5423 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
5424 * spu-low.c: New file.
5425
cb7283db
DJ
54262006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
5427
5428 * configure.ac: Correct td_thr_tls_get_addr test.
5429 * configure: Regenerated.
5430
89be2091
DJ
54312006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
5432
5433 * linux-low.c (linux_wait_for_event): Reformat. Use the
5434 pass_signals array.
5435 * remote-utils.c (decode_address_to_semicolon): New.
5436 * server.c (pass_signals, handle_general_set): New.
5437 (handle_query): Mention QPassSignals for qSupported.
5438 (main): Call handle_general_set.
5439 * server.h (pass_signals, decode_address_to_semicolon): New.
5440
000ef4f0
DJ
54412006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
5442
5443 * server.c (handle_query): Correct error handling for read_auxv.
5444
b7149293
UW
54452005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
5446
5447 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
5448 and srv_linux_thread_db to yes.
5449 * linux-s390-low.c (s390_fill_gregset): New function.
5450 (target_regsets): Define data structure.
5451
dae5f5cf
DJ
54522006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
5453
5454 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
5455 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
5456 * config.in, configure: Regenerated.
5457 * inferiors.c (gdb_id_to_thread): New function.
5458 (gdb_id_to_thread_id): Use it.
5459 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
5460 * linux-low.h (struct process_info): Add th member.
5461 (thread_db_get_tls_address): New prototype.
5462 * remote-utils.c (decode_address): Make non-static.
5463 * server.c (handle_query): Handle qGetTLSAddr.
5464 * server.h (gdb_id_to_thread, decode_address): New prototypes.
5465 * target.h (struct target_ops): Add get_tls_address.
5466 * thread-db.c (maybe_attach_thread): Save the thread handle.
5467 (thread_db_get_tls_address): New.
5468
32ca6d61
DJ
54692006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
5470
5471 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
5472 (linux_resume_one_process): Take a siginfo_t *. Update all
5473 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
5474 (struct pending_signals): Add a siginfo_t.
5475 (linux_wait_for_process): Always set last_status.
5476 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
5477 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
5478 * linux-low.h (struct process_info): Add last_status.
5479
5ffff7c1
DJ
54802006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
5481
5482 * remote-utils.c (try_rle): New function.
5483 (putpkt_binary): Use it.
5484
8695c747
DJ
54852006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
5486
5487 * Makefile.in (clean): Clean reg-x86-64-linux.c.
5488 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
5489 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
5490 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
5491 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
5492 point registers.
5493
290fadea
RS
54942006-08-08 Richard Sandiford <richard@codesourcery.com>
5495
5496 * server.c (terminal_fd): New variable.
5497 (old_foreground_pgrp): Likewise.
5498 (restore_old_foreground_pgrp): New function.
5499 (start_inferior): Record the terminal file descriptor in terminal_fd
5500 and its original foreground group in old_foreground_pgrp. Register
5501 restore_old_foreground_pgrp with atexit().
5502
9f2e1e63
DJ
55032006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
5504
5505 * server.c (handle_query): Correct qPart to qXfer.
5506
b80864fb
DJ
55072006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
5508
5509 * configure.ac: Check for more headers which are missing on
5510 Windows. Automatically supply -lwsock32 and USE_WIN32API.
5511 * configure.srv: Add Cygwin and mingw32.
5512 * remote-utils.c: Don't include headers unconditionally which
5513 are missing on mingw32. Include <winsock.h> for mingw32.
5514 (remote_open): Adjust for mingw32 support. Flush
5515 standard error after writing to it.
5516 (remote_close, putpkt_binary, input_interrupt, block_async_io)
5517 (unblock_async_io, enable_async_io, disable_async_io)
5518 (readchar, getpkt): Update for Winsock support.
5519 (prepare_resume_reply): Expect a protocol signal number.
5520 * server.c: Disable <sys/wait.h> on mingw32.
5521 (start_inferior): Adjust for mingw32 support. Flush
5522 standard error after writing to it.
5523 (attach_inferior): Likewise. Use protocol signal
5524 numbers.
5525 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
5526 and names.
5527 * win32-i386-low.c: New file.
5528 * Makefile.in (XM_CLIBS): Set.
5529 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
5530 (win32-i386-low.o): New dependency rule.
5531 * linux-low.c (linux_wait): Use target signal numbers.
5532 * target.h (struct target_ops): Doc fix.
5533 * server.h (target_signal_to_name): New prototype.
5534 * gdbreplay.c: Don't include headers unconditionally which
5535 are missing on mingw32. Include <winsock.h> for mingw32.
5536 (remote_close, remote_open): Adjust for Winsock support.
5537 * configure, config.in: Regenerated.
5538
0876f84a
DJ
55392006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
5540
5541 * server.c (decode_xfer_read, write_qxfer_response): New.
5542 (handle_query): Take a packet length argument. Handle
5543 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
5544 the qSupported response.
5545 (main): Update call to handle_query.
5546
01f9e8fa
DJ
55472006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
5548
5549 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
5550 (putpkt_binary): Renamed from putpkt and adjusted for binary
5551 data.
5552 (putpkt): New wrapper for putpkt_binary.
5553 (readchar): Don't mask off the high bit.
5554 (decode_X_packet): New function.
5555 * server.c (main): Call putpkt_binary if a handler sets the packet
5556 length. Save the length of the incoming packet. Handle 'X'.
5557 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
5558
be2a5f71
DJ
55592006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
5560
5561 * server.c (handle_query): Handle qSupported.
5562
ea025f5f
DJ
55632006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
5564
5565 * remote-utils.c (all_symbols_looked_up): New variable.
5566 (look_up_one_symbol): Check it.
5567 * server.h (look_up_one_symbol): New declaration.
5568 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
5569
9308fc88
DJ
55702006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
5571
5572 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 5573 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
5574 (PTRACE_GET_THREAD_AREA): Define.
5575 (ps_get_thread_area): New function.
5576
52fb6437
NS
55772006-05-09 Nathan Sidwell <nathan@codesourcery.com>
5578
5579 * configure.srv (m68k*-*-uclinux*): New target.
5580 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
5581 (linux_resume_one_process): Remove extraneous cast.
5582 (linux_read_offsets): New.
5583 (linux_target_op): Add linux_read_offsets on mmuless systems.
5584 * server.c (handle_query): Add qOffsets logic.
5585 * target.h (struct target_ops): Add read_offsets.
5586
21b0f40c
DJ
55872006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
5588
5589 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
5590 (PTRACE_GET_THREAD_AREA): Define.
5591 (ps_get_thread_area): New function.
5592 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
5593 (linux-x86-64-low.o): Update.
5594
0050a760
DJ
55952006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
5596
5597 * configure.ac: Remove checks for prfpregset_t.
5598 * gdb_proc_service.h: New file.
5599 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
5600 new "gdb_proc_service.h".
5601 * proc-service.c: Likewise.
5602 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
5603 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
5604 * Makefile.in (gdb_proc_service_h): Updated.
5605 * configure, config.in: Regenerated.
5606
b92a518e
DJ
56072006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
5608
5609 * remote-utils.c (prepare_resume_reply): Move declaration
5610 of gdb_id_from_wait to the top of the block.
5611
545587ee
DJ
56122006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
5613
5614 * linux-low.c (regsets_store_inferior_registers): Read the regset
5615 from the target before filling it.
5616
9db87ebd
DJ
56172006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
5618
5619 * server.c (attach_inferior): Return SIGTRAP for a successful
5620 attach.
5621
dd24457d
DJ
56222006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
5623
5624 * Makefile.in (OBS): Add version.o.
5625 (STAGESTUFF): Delete.
5626 (version.o): Add dependencies.
5627 (version.c): Replace rule.
5628 (clean): Remove version.c.
5629 * server.c (gdbserver_version): New.
5630 (gdbserver_usage): Use printf.
5631 (main): Handle --version and --help.
5632 * server.h (version, host_name): Add declarations.
5633
6f0f660e
EZ
56342005-12-23 Eli Zaretskii <eliz@gnu.org>
5635
889bf7c5
PA
5636 * linux-arm-low.c:
5637 * linux-arm-low.c:
5638 * inferiors.c:
5639 * i387-fp.h:
5640 * i387-fp.c:
5641 * gdbreplay.c:
5642 * regcache.c:
5643 * proc-service.c:
5644 * mem-break.h:
5645 * mem-break.c:
5646 * linux-x86-64-low.c:
5647 * linux-sh-low.c:
5648 * linux-s390-low.c:
5649 * linux-ppc64-low.c:
5650 * linux-ppc-low.c:
5651 * linux-mips-low.c:
5652 * linux-m68k-low.c:
5653 * linux-m32r-low.c:
5654 * linux-low.h:
5655 * linux-low.c:
5656 * linux-ia64-low.c:
5657 * linux-i386-low.c:
5658 * linux-crisv32-low.c:
5659 * thread-db.c:
5660 * terminal.h:
5661 * target.h:
5662 * target.c:
5663 * server.h:
5664 * server.c:
5665 * remote-utils.c:
5666 * regcache.h:
5667 * utils.c:
5668 * Makefile.in:
5669 * configure.ac:
6f0f660e
EZ
5670 * gdbserver.1: Add (C) after Copyright. Update the FSF
5671 address.
5672
9d1fb177
DJ
56732005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
5674
5675 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
5676 (arm_breakpoint_at): Recognize both breakpoints.
5677 (the_low_target): Use the correct breakpoint instruction.
5678
011a70c2
DJ
56792005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
5680
5681 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
5682 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
5683 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
5684 (the_low_target): Update.
5685
7fb85e41
AS
56862005-10-25 Andreas Schwab <schwab@suse.de>
5687
5688 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
5689
5690 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
5691 (ia64_num_regs): Reduce to 462.
5692
3db0444b
DJ
56932005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
5694
5695 * acinclude.m4: Correct quoting.
5696 * aclocal.m4: Regenerated.
5697
5698 Suggested by SZOKOVACS Robert <szo@ies.hu>:
5699 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
5700 (thread_db_init): Call thread_db_err_str.
5701 * configure.ac: Check for TD_VERSION.
5702 * config.in, configure: Regenerated.
5703
bee0189a
DJ
57042005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5705
5706 * server.h (error, fatal, warning): Add ATTR_FORMAT.
5707
e9d25b98
DJ
57082005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
5709
5710 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
5711 is not available. Define HAVE_PTRACE_GETREGS if it is.
5712 * config.in, configure: Regenerated.
5713 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
5714 * linux-i386-low.c, linux-m68k-low.c: Update to use
5715 HAVE_PTRACE_GETREGS.
5716 * linux-low.c (regsets_fetch_inferior_registers)
5717 (regsets_store_inferior_registers): Only return 0 if we processed
5718 GENERAL_REGS.
5719 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
5720 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
5721
a06660f7
DJ
57222005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
5723
5724 * inferiors.c (struct thread_info): Add gdb_id.
5725 (add_thread): Add gdb_id argument.
5726 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
5727 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
5728 calls to add_thread.
5729 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
5730 * server.c (handle_query): Use thread_to_gdb_id.
5731 (handle_v_cont, main): Use gdb_id_to_thread_id.
5732 * server.h (add_thread): Update prototype.
5733 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
5734 prototypes.
5735
5a1f5858
DJ
57362005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
5737
5738 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
5739 left-padded registers.
5740 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
5741 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
5742
e122f1f5
SE
57432005-07-01 Steve Ellcey <sje@cup.hp.com>
5744
5745 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
5746 * configure: Regenerate.
5747 * config.in: Regenerate.
5748 * server.h (NEED_DECLARATION_STRERROR):
5749 Replace with !HAVE_DECL_STRERROR.
5750
d592fa2f
DJ
57512005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
5752
5753 * linux-low.c (linux_wait, linux_send_signal): Don't test
5754 an unsigned long variable for > 0 if it could be MAX_ULONG.
5755 * server.c (myresume): Likewise.
5756 * target.c (set_desired_inferior): Likewise.
5757
ccbd4912
MK
57582005-06-13 Mark Kettenis <kettenis@gnu.org>
5759
5760 * configure.ac: Simplify and improve check for socklen_t.
5761 * configure, config.in: Regenerate.
5762
f450004a
DJ
57632005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
5764
5765 * acconfig.h: Remove.
5766 * configure.ac: Add a test for socklen_t. Use three-argument
5767 AC_DEFINE throughout.
5768 * config.in: Regenerated using autoheader 2.59.
5769 * configure: Regenerated.
5770
5771 * gdbreplay.c (socklen_t): Provide a default.
5772 (remote_open): Use socklen_t.
5773 * remote-utils.c (socklen_t): Provide a default.
5774 (remote_open): Use socklen_t.
5775 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
5776 unsigned char.
5777
5778 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
5779 char for buffers.
5780 * linux-low.c (linux_read_memory, linux_write_memory)
5781 (linux_read_auxv): Likewise.
5782 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
5783 (check_mem_write): Likewise.
5784 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
5785 Likewise.
5786 * regcache.c (struct inferior_rgcache_data, registers_to_string)
5787 (registers_from_string, register_data): Likewise.
5788 * server.c (handle_query, main): Likewise.
5789 * server.h (convert_ascii_to_int, convert_int_to_ascii)
5790 (decode_M_packet): Likewise.
5791 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
5792 * target.h (struct target_ops): Update read_memory, write_memory,
5793 and read_auxv.
5794 (read_inferior_memory, write_inferior_memory): Update.
5795 * linux-low.h (struct linux_target_ops): Change type of breakpoint
5796 to unsigned char *.
5797 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
5798 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
5799 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
5800 linux-s390-low.c, linux-sh-low.c: Update for changes in
5801 read_inferior_memory and the_low_target->breakpoint.
5802
eee84df1
DJ
58032005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
5804
5805 * Makefile.in (SFILES): Add linux-ppc64-low.c.
5806 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
5807 * configure.srv: Add powerpc64-*-linux*.
5808 * linux-ppc64-low.c: New file.
5809
45b134e5
OF
58102005-05-23 Orjan Friberg <orjanf@axis.com>
5811
5812 * linux-cris-low.c: New file with support for CRIS.
5813 * linux-crisv32-low.c: Ditto for CRISv32.
5814 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
5815 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 5816 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
5817 reg-crisv32.o, and reg-crisv32.c to make rules.
5818 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
5819 recognized targets.
5820
48d93c75
UW
58212005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
5822
5823 * linux-low.c (fetch_register): Ensure buffer size is a multiple
5824 of sizeof (PTRACE_XFER_TYPE).
5825 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
5826
e013ee27
OF
58272005-05-12 Orjan Friberg <orjanf@axis.com>
5828
889bf7c5 5829 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
5830 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
5831 pointers for hardware watchpoint support.
5832 * linux-low.h (struct linux_target_ops): Ditto.
5833 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
5834 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
5835 to linux_target_ops.
5836 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
5837 reply packet.
5838 * server.c (main): Recognize 'Z' and 'z' packets.
5839
b0ded00b
UW
58402005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
5841
5842 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
5843 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
5844 (the_low_target): Add new members.
5845
8643e2ad
DJ
58462005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
5847
5848 * proc-service.c (ps_lgetregs): Search all_processes instead of
5849 all_threads.
5850
fc620387
DJ
58512005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
5852
5853 * server.c (start_inferior): Change return type to int.
5854 (attach_inferior): Change sigptr to int *.
5855 (handle_v_cont, handle_v_requests): Change signal to int *.
5856 (main): Change signal to int.
5857
58582005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
5859
5860 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
5861 * configure.srv: Add m32r*-*-linux*.
5862 * linux-m32r-low.c: New file.
5863
e0e76420
DJ
58642005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
5865
5866 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
5867
a1928bad
DJ
58682005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
5869
5870 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
5871 Take unsigned long arguments for PIDs.
5872 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
5873 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
5874 (wait_for_sigstop, linux_resume_one_process)
5875 (regsets_fetch_inferior_registers, linux_send_signal)
5876 (linux_read_auxv): Likewise. Update the types of variables holding
5877 PIDs. Update format string specifiers.
5878 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
5879 * remote-utils.c (prepare_resume_reply): Likewise.
5880 * server.c (cont_thread, general_thread, step_thread)
5881 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
5882 unsigned long.
5883 (handle_query): Update format specifiers.
5884 (handle_v_cont, main): Use strtoul for thread IDs.
5885 * server.h (struct inferior_list_entry): Use unsigned long for ID.
5886 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
5887 (general_thread, step_thread, thread_from_wait)
5888 (old_thread_from_wait): Update.
5889 * target.h (struct thread_resume): Use unsigned long for THREAD.
5890 (struct target_ops): Use unsigned long for arguments to attach and
5891 thread_alive.
5892
dcdb98d2
DJ
58932005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
5894
5895 * acinclude.m4: Include bfd/bfd.m4 directly.
5896 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
5897 <agriffis@toolchain.org>.
5898 * aclocal.m4, configure: Regenerated.
5899
bec39cab
AC
59002005-01-07 Andrew Cagney <cagney@gnu.org>
5901
5902 * configure.ac: Rename configure.in, require autoconf 2.59.
5903 * configure: Re-generate.
5904
434c4c77
DJ
59052004-12-08 Daniel Jacobowitz <dan@debian.org>
5906
5907 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
5908 LIBS when finished.
5909 * aclocal.m4: Regenerated.
5910 * configure: Regenerated.
5911
db1d3e1b
AS
59122004-11-21 Andreas Schwab <schwab@suse.de>
5913
5914 * linux-m68k-low.c (m68k_num_gregs): Define.
5915 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
5916 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
5917 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
5918 (m68k_breakpoint_at): New. Add to the_low_target.
5919
5920 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
5921 srv_linux_thread_db to yes.
5922
43360365
JB
59232004-10-20 Joel Brobecker <brobecker@gnat.com>
5924
5925 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
5926 (ARCH_SET_FS): Likewise.
5927 (ARCH_GET_FS): Likewise.
5928 (ARCH_GET_GS): Likewise.
5929
fd500816
DJ
59302004-10-16 Daniel Jacobowitz <dan@debian.org>
5931
5932 * linux-i386-low.c (ps_get_thread_area): New.
5933 * linux-x86-64-low.c (ps_get_thread_area): New.
5934 * linux-low.c: Include <sys/syscall.h>.
5935 (linux_kill_one_process): Don't kill the first thread here.
5936 (linux_kill): Kill the first thread here.
5937 (kill_lwp): New function.
5938 (send_sigstop, linux_send_signal): Use it.
5939 * proc-service.c: Clean up #ifdefs.
5940 (fpregset_info): Delete.
5941 (ps_lgetregs): Update and enable implementation.
5942 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
5943 implementations.
5944 * remote-utils.c (struct sym_cache, symbol_cache): New.
5945 (input_interrupt): Print a clearer message.
5946 (async_io_enabled): New variable.
5947 (enable_async_io, disable_async_io): Use it. Update comments.
5948 (look_up_one_symbol): Use the symbol cache.
5949 * thread-db.c (thread_db_look_up_symbols): New function.
5950 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
5951
f6de3c42
DJ
59522004-10-16 Daniel Jacobowitz <dan@debian.org>
5953
5954 * configure.in: Test for -rdynamic.
5955 * configure: Regenerated.
5956 * Makefile (INTERNAL_LDFLAGS): New.
5957 (gdbserver, gdbreplay): Use it.
5958
2c0fc042
AC
59592004-09-02 Andrew Cagney <cagney@gnu.org>
5960
5961 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
5962
075b3282
DJ
59632004-03-23 Daniel Jacobowitz <drow@mvista.com>
5964
5965 * linux-low.c (linux_wait): Clear all_processes list also.
5966
fa6a77dc
DJ
59672004-03-12 Daniel Jacobowitz <drow@mvista.com>
5968
5969 * linux-low.c: Include <errno.h>. Remove extern declaration of
5970 errno.
5971
6d782a97
DJ
59722004-03-12 Daniel Jacobowitz <drow@mvista.com>
5973
5974 * gdbreplay.c, server.h, utils.c: Update copyright years.
5975
3a7fb99b
DJ
59762004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
5977
5978 * server.c (main): Print child status or termination signal from
5979 variable 'signal', not 'sig'.
5980
c3e735a6
DJ
59812004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
5982
5983 * linux-low.c (linux_read_memory): Change return type to
5984 int. Check for and return error from ptrace().
5985 * target.c (read_inferior_memory): Change return type to int. Pass
5986 back return status from the_target->read_memory().
5987 * target.h (struct target_ops): Adapt *read_memory() prototype.
5988 Update comment.
5989 (read_inferior_memory): Adapt prototype.
5990 * server.c (main): Return an error packet if
5991 read_inferior_memory() returns an error.
5992
a59d1c82
DJ
59932004-03-04 Daniel Jacobowitz <drow@mvista.com>
5994
5995 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
5996 Unify with other clean targets.
5997
dc3f8883
DJ
59982004-02-29 Daniel Jacobowitz <drow@mvista.com>
5999
6000 * server.c (handle_v_cont): Call set_desired_inferior.
6001
89a208da
DJ
60022004-02-29 Daniel Jacobowitz <drow@mvista.com>
6003
6004 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
6005
62ea82f5
DJ
60062004-02-29 Daniel Jacobowitz <drow@mvista.com>
6007
6008 * linux-low.c (linux_wait): Unblock async I/O.
6009 (linux_resume): Block and enable async I/O.
6010 * remote-utils.c (block_async_io, unblock_async_io): New functions.
6011 * server.h (block_async_io, unblock_async_io): Add prototypes.
6012
6910d122
DJ
60132004-02-29 Daniel Jacobowitz <drow@mvista.com>
6014
6015 * remote-utils.c (remote_open): Print a status notice after
6016 opening a TCP port.
6017 * server.c (attach_inferior): Print a status notice after
6018 attaching.
6019
60202004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
6021
6022 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
6023
c89dc5d4
DJ
60242004-02-26 Daniel Jacobowitz <drow@mvista.com>
6025
6026 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
6027 error packet.
6028 * server.c, target.h: Update copyright years.
6029
4b8dad4a
RM
60302004-02-25 Roland McGrath <roland@redhat.com>
6031
6032 * target.h (struct target_ops): New member `read_auxv'.
6033 * server.c (handle_query): Handle qPart:auxv:read: query using that.
6034 * linux-low.c (linux_read_auxv): New function.
6035 (linux_target_ops): Initialize `read_auxv' member to that.
6036
d7446758
JB
60372004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6038
6039 Committed by Jim Blandy <jimb@redhat.com>.
6040
6041 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 6042 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
6043 instead of GPR_SIZE to distiguish s390 and s390x targets.
6044
5544ad89
DJ
60452004-01-31 Daniel Jacobowitz <drow@mvista.com>
6046
6047 * linux-low.c: Update copyright year.
6048 (check_removed_breakpoint): Clear pending_is_breakpoint.
6049 (linux_set_resume_request, linux_queue_one_thread)
6050 (resume_status_pending_p): New functions.
6051 (linux_continue_one_thread): Use process->resume.
6052 (linux_resume): Only resume threads if there are no pending events.
6053 * linux-low.h (struct process_info): Add resume request
6054 pointer.
6055
2a68b70e
DJ
60562004-01-30 Daniel Jacobowitz <drow@mvista.com>
6057
6058 * regcache.c (new_register_cache): Clear the allocated register
6059 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
6060
64386c31
DJ
60612003-10-13 Daniel Jacobowitz <drow@mvista.com>
6062
6063 * linux-low.c (linux_resume): Take a struct thread_resume *
6064 argument.
6065 (linux_wait): Update call.
6066 (resume_ptr): New static variable.
6067 (linux_continue_one_thread): Renamed from
6068 linux_continue_one_process. Use resume_ptr.
6069 (linux_resume): Use linux_continue_one_thread.
6070 * server.c (handle_v_cont, handle_v_requests): New functions.
6071 (myresume): New function.
6072 (main): Handle 'v' case.
6073 * target.h (struct thread_resume): New type.
6074 (struct target_ops): Change argument of "resume" to struct
6075 thread_resume *.
6076 (myresume): Delete macro.
6077
c938e9b0
L
60782003-08-08 H.J. Lu <hongjiu.lu@intel.com>
6079
6080 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
6081 (uninstall): Support DESTDIR.
6082
7f313d07
BC
6083Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
6084
6085 * configure.srv: Add xscale*linux copy of arm*linux entry.
6086
3b2fc2ea
DJ
60872003-07-24 Daniel Jacobowitz <drow@mvista.com>
6088
6089 * linux-arm-low.c (arm_reinsert_addr): New function.
6090 (the_low_target): Add arm_reinsert_addr.
6091
1c0a559e
MK
60922003-07-08 Mark Kettenis <kettenis@gnu.org>
6093
6094 * mem-break.c: Remove whitespace at end of file.
6095
43d5792c
DJ
60962003-06-28 Daniel Jacobowitz <drow@mvista.com>
6097
6098 * configure.in: Check whether we need to prototype strerror.
6099 * server.h: Optionally prototype strerror.
6100 * gdbreplay.c (perror_with_name): Use strerror.
6101 * linux-low.c (linux_attach_lwp): Use strerror.
6102 * utils.c (perror_with_name): Use strerror.
6103 * config.in, configure: Regenerated.
6104
c8a86edf
DJ
61052003-06-28 Daniel Jacobowitz <drow@mvista.com>
6106
6107 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
6108 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
6109
73d37363
DJ
61102003-06-20 Daniel Jacobowitz <drow@mvista.com>
6111
6112 * Makefile.in (SFILES): Update.
6113 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
6114 low-sun3.c: Remove files.
6115
6ad8ae5c
DJ
61162003-06-17 Daniel Jacobowitz <drow@mvista.com>
6117
6118 * linux-low.c: Move comment to linux_thread_alive where it belonged.
6119 (linux_detach_one_process, linux_detach): New functions.
6120 (linux_target_ops): Add linux_detach.
6121 * server.c (main): Handle 'D' packet.
6122 * target.h (struct target_ops): Add "detach" member.
6123 (detach_inferior): Define.
6124
1581182a
MK
61252003-06-13 Mark Kettenis <kettenis@gnu.org>
6126
6127 From Kelley Cook <kelleycook@wideopenwest.com>:
6128 * configure.srv: Accept i[34567]86 variants.
6129
e5379b03
DJ
61302003-06-05 Daniel Jacobowitz <drow@mvista.com>
6131
6132 * linux-low.c (linux_wait_for_event): Correct comment typos.
6133 (linux_resume_one_process): Call check_removed_breakpoint.
6134 (linux_send_signal): New function.
6135 (linux_target_ops): Add linux_send_signal.
6136 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
6137 of kill.
6138 * target.h (struct target_ops): Add send_signal.
6139
2ff29de4
JB
61402003-05-29 Jim Blandy <jimb@redhat.com>
6141
6142 * linux-low.c (usr_store_inferior_registers): Transfer buf in
6143 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
6144 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
6145 away part of the register's value.
6146
254787d4
DJ
61472003-03-26 Daniel Jacobowitz <drow@mvista.com>
6148
6149 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
6150 (linux_wait_for_event, linux_init_signals): Likewise.
6151
94e10508
DJ
61522003-03-17 Daniel Jacobowitz <drow@mvista.com>
6153
6154 * configure.in: Check for stdlib.h.
6155 * configure: Regenerated.
6156 * config.in: Regenerated.
6157
4c0711e0
DJ
61582003-01-04 Andreas Schwab <schwab@suse.de>
6159
6160 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
6161
ef66e766
AC
61622003-01-02 Andrew Cagney <ac131313@redhat.com>
6163
6164 * Makefile.in: Remove obsolete code.
6165
a1358604
DJ
61662002-11-20 Daniel Jacobowitz <drow@mvista.com>
6167
6168 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
6169 defined(PT_FPR0_HI).
6170
23ce3b1c
DJ
61712002-11-17 Stuart Hughes <seh@zee2.com>
6172
6173 * linux-arm-low.c (arm_num_regs): Increase.
6174 (arm_regmap): Include status register.
6175
61762002-11-17 Daniel Jacobowitz <drow@mvista.com>
6177
6178 * linux-low.c (register_addr): Remove incorrect -1 check.
6179
a9fa9f7d
DJ
61802002-08-29 Daniel Jacobowitz <drow@mvista.com>
6181
6182 * linux-low.c (linux_create_inferior): Call setpgid. Return
6183 the new PID.
6184 (unstopped_p, linux_signal_pid): Remove.
6185 (linux_target_ops): Remove linux_signal_pid.
6186 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
6187 global instead of target method.
6188 * target.h (struct target_ops): Remove signal_pid. Update comment
6189 for create_inferior.
6190 * server.c (signal_pid): New variable.
6191 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 6192 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
6193 (attach_inferior): Set signal_pid.
6194
17574093
DJ
61952002-08-23 Daniel Jacobowitz <drow@mvista.com>
6196
6197 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
6198
61992002-08-20 Jim Blandy <jimb@redhat.com>
6200
6201 * Makefile.in (LDFLAGS): Allow the configure script to establish a
6202 default for this.
6203
62042002-08-01 Andrew Cagney <cagney@redhat.com>
6205
6206 * Makefile.in: Make chill references obsolete.
6207
62082002-07-24 Kevin Buettner <kevinb@redhat.com>
6209
6210 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
6211 * configure: Regenerate.
6212 * config.in: Regenerate.
6213
62142002-07-09 David O'Brien <obrien@FreeBSD.org>
6215
6216 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
6217 (perror_with_name, remote_close, remote_open, expect, play): Static.
6218
62192002-07-04 Michal Ludvig <mludvig@suse.cz>
6220
4b8dad4a 6221 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
6222 byte offsets instead of an array of indexes.
6223 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
6224
62252002-06-13 Daniel Jacobowitz <drow@mvista.com>
6226
6227 * regcache.c: Add comment.
6228
62292002-06-11 Daniel Jacobowitz <drow@mvista.com>
6230
6231 * thread-db.c: New file.
6232 * proc-service.c: New file.
6233 * acinclude.m4: New file.
6234 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
6235 proc-service.o, and thread-db.o.
6236 (linux-low.o): Add USE_THREAD_DB.
6237 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
6238 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
6239 * aclocal.m4: Regenerated.
6240 * config.in: Regenerated.
6241 * configure: Regenerated.
6242 * configure.in: Check for proc_service.h, sys/procfs.h,
6243 thread_db.h, and linux/elf.h headrs.
6244 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
6245 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
6246 Check for -lthread_db and thread support.
6247 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
6248 PowerPC, and SuperH.
6249 * i387-fp.c: Constify arguments.
6250 * i387-fp.h: Likewise.
6251 * inferiors.c: (struct thread_info): Renamed from
6252 `struct inferior_info'. Remove PID member. Use generic inferior
6253 list header. All uses updated.
6254 (inferiors, signal_pid): Removed.
6255 (all_threads): New variable.
6256 (get_thread): Define.
6257 (add_inferior_to_list): New function.
6258 (for_each_inferior): New function.
6259 (change_inferior_id): New function.
6260 (add_inferior): Removed.
6261 (remove_inferior): New function.
6262 (add_thread): New function.
6263 (free_one_thread): New function.
6264 (remove_thread): New function.
6265 (clear_inferiors): Use for_each_inferior and free_one_thread.
6266 (find_inferior): New function.
6267 (find_inferior_id): New function.
6268 (inferior_target_data): Update argument type.
6269 (set_inferior_target_data): Likewise.
6270 (inferior_regcache_data): Likewise.
6271 (set_inferior_regcache_data): Likewise.
6272 * linux-low.c (linux_bp_reinsert): Remove.
6273 (all_processes, stopping_threads, using_thrads)
6274 (struct pending_signals, debug_threads, pid_of): New.
6275 (inferior_pid): Replace with macro.
6276 (struct inferior_linux_data): Remove.
6277 (get_stop_pc, add_process): New functions.
6278 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
6279 Use add_process and add_thread.
6280 (linux_attach_lwp): New function, based on old linux_attach. Use
6281 add_process and add_thread. Set stop_expected for new threads.
6282 (linux_attach): New function.
6283 (linux_kill_one_process): New function.
6284 (linux_kill): Kill all LWPs.
6285 (linux_thread_alive): Use find_inferior_id.
6286 (check_removed_breakpoints, status_pending_p): New functions.
6287 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
6288 Update. Use WNOHANG. Wait for cloned processes also. Update process
6289 struct for the found process.
6290 (linux_wait_for_event): New function.
6291 (linux_wait): Use it. Support LWPs.
6292 (send_sigstop, wait_for_sigstop, stop_all_processes)
6293 (linux_resume_one_process, linux_continue_one_process): New functions.
6294 (linux_resume): Support LWPs.
6295 (REGISTER_RAW_SIZE): Remove.
6296 (fetch_register): Use register_size instead. Call supply_register.
6297 (usr_store_inferior_registers): Likewise. Call collect_register.
6298 Fix recursive case.
6299 (regsets_fetch_inferior_registers): Improve error message.
6300 (regsets_store_inferior_registers): Add debugging.
6301 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
6302 (unstopped_p, linux_signal_pid): New functions.
6303 (linux_target_ops): Add linux_signal_pid.
6304 (linux_init_signals): New function.
6305 (initialize_low): Call it. Initialize using_threads.
6306 * regcache.c (inferior_regcache_data): Add valid
6307 flag.
6308 (get_regcache): Fetch registers lazily. Add fetch argument
6309 and update all callers.
6310 (regcache_invalidate_one, regcache_invalidate): New
6311 functions.
6312 (new_register_cache): Renamed from create_register_cache.
6313 Return the new regcache.
6314 (free_register_cache): Change argument to a void *.
6315 (registers_to_string, registers_from_string): Call get_regcache
6316 with fetch flag set.
6317 (register_data): Make static. Pass fetch flag to get_regcache.
6318 (supply_register): Call get_regcache with fetch flag clear.
6319 (collect_register): Call get_regcache with fetch flag set.
6320 (collect_register_as_string): New function.
6321 * regcache.h: Update.
6322 * remote-utils.c (putpkt): Flush after debug output and use
6323 stderr.
6324 Handle input interrupts while waiting for an ACK.
6325 (input_interrupt): Use signal_pid method.
6326 (getpkt): Flush after debug output and use stderr.
6327 (outreg): Use collect_register_as_string.
6328 (new_thread_notify, dead_thread_notify): New functions.
6329 (prepare_resume_reply): Check using_threads. Set thread_from_wait
6330 and general_thread.
6331 (look_up_one_symbol): Flush after debug output.
6332 * server.c (step_thread, server_waiting): New variables.
6333 (start_inferior): Don't use signal_pid. Update call to mywait.
6334 (attach_inferior): Update call to mywait.
6335 (handle_query): Handle qfThreadInfo and qsThreadInfo.
6336 (main): Don't fetch/store registers explicitly. Use
6337 set_desired_inferior. Support proposed ``Hs'' packet. Update
6338 calls to mywait.
6339 * server.h: Update.
6340 (struct inferior_list, struct_inferior_list_entry): New.
6341 * target.c (set_desired_inferior): New.
6342 (write_inferior_memory): Constify.
6343 (mywait): New function.
6344 * target.h: Update.
6345 (struct target_ops): New signal_pid method.
6346 (mywait): Removed macro, added prototype.
6347
6348 * linux-low.h (regset_func): Removed.
6349 (regset_fill_func, regset_store_func): New.
6350 (enum regset_type): New.
6351 (struct regset_info): Add type field. Use new operation types.
6352 (struct linux_target_ops): stop_pc renamed to get_pc.
6353 Add decr_pc_after_break and breakpoint_at.
6354 (get_process, get_thread_proess, get_process_thread)
6355 (strut process_info, all_processes, linux_attach_lwp)
6356 (thread_db_init): New.
6357
6358 * linux-arm-low.c (arm_get_pc, arm_set_pc,
6359 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
6360 (the_low_target): Add new members.
6361 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
6362 (i386_store_fpxregset): Constify.
6363 (target_regsets): Add new kind identifier.
6364 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
6365 (i386_set_pc): Add debugging.
6366 (i386_breakpoint_at): New function.
6367 (the_low_target): Add new members.
6368 * linux-mips-low.c (mips_get_pc, mips_set_pc)
6369 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
6370 (mips_breakpoint_at): New.
6371 (the_low_target): Add new members.
6372 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
6373 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
6374 (the_low_target): Add new members.
6375 * linux-sh-low.c (sh_get_pc, sh_set_pc)
6376 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
6377 (the_low_target): Add new members.
6378 * linux-x86-64-low.c (target_regsets): Add new kind
6379 identifier.
6380
63812002-05-15 Daniel Jacobowitz <drow@mvista.com>
6382
6383 From Martin Pool <mbp@samba.org>:
6384 * server.c (gdbserver_usage): New function.
6385 (main): Call it.
6386
63872002-05-14 Daniel Jacobowitz <drow@mvista.com>
6388
6389 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
6390 stop_at -> stop_pc.
6391
63922002-05-04 Andrew Cagney <ac131313@redhat.com>
6393
6394 * Makefile.in: Remove obsolete code.
6395
63962002-04-24 Michal Ludvig <mludvig@suse.cz>
6397
6398 * linux-low.c (regsets_fetch_inferior_registers),
6399 (regsets_store_inferior_registers): Removed cast to int from
6400 ptrace() calls.
6401 * regcache.h: Added declaration of struct inferior_info.
6402
64032002-04-20 Daniel Jacobowitz <drow@mvista.com>
6404
6405 * inferiors.c (struct inferior_info): Add regcache_data.
6406 (add_inferior): Call create_register_cache.
6407 (clear_inferiors): Call free_register_cache.
6408 (inferior_regcache_data, set_inferior_regcache_data): New functions.
6409 * regcache.c (struct inferior_regcache_data): New.
6410 (registers): Remove.
6411 (get_regcache): New function.
6412 (create_register_cache, free_register_cache): New functions.
6413 (set_register_cache): Don't initialize the register cache here.
6414 (registers_to_string, registers_from_string, register_data): Call
6415 get_regcache.
6416 * regcache.h: Add prototypes.
6417 * server.h: Likewise.
6418
64192002-04-20 Daniel Jacobowitz <drow@mvista.com>
6420
6421 * mem-break.c: New file.
6422 * mem-break.h: New file.
6423 * Makefile.in: Add mem-break.o rule; update server.h
6424 dependencies.
6425 * inferiors.c (struct inferior_info): Add target_data
6426 member.
6427 (clear_inferiors): Free target_data member if set.
6428 (inferior_target_data, set_inferior_target_data): New functions.
6429 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
6430 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
6431 * linux-low.c (linux_bp_reinsert): New variable.
6432 (struct inferior_linux_data): New.
6433 (linux_create_inferior): Use set_inferior_target_data.
6434 (linux_attach): Likewise. Call add_inferior.
6435 (linux_wait_for_one_inferior): New function.
6436 (linux_wait): Call it.
6437 (linux_write_memory): Add const.
6438 (initialize_low): Call set_breakpoint_data.
6439 * linux-low.h (struct linux_target_ops): Add breakpoint
6440 handling members.
6441 * server.c (attach_inferior): Remove extra add_inferior
6442 call.
6443 * server.h: Include mem-break.h. Update inferior.c
6444 prototypes.
6445 * target.c (read_inferior_memory)
6446 (write_inferior_memory): New functions.
6447 * target.h (read_inferior_memory)
6448 (write_inferior_memory): Change macros to prototypes.
6449 (struct target_ops): Update comments. Add const to write_memory
6450 definition.
6451
64522002-04-11 Daniel Jacobowitz <drow@mvista.com>
6453
6454 * linux-low.c (usr_store_inferior_registers): Support
6455 registers which are allowed to fail to store.
6456 * linux-low.h (linux_target_ops): Likewise.
6457 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
6458 (ppc_cannot_store_register): FPSCR may not be storable.
6459
64602002-04-09 Daniel Jacobowitz <drow@mvista.com>
6461
6462 * server.h: Include <string.h> if HAVE_STRING_H.
6463 * ChangeLog: Correct paths in last ChangeLog entry.
6464
64652002-04-09 Daniel Jacobowitz <drow@mvista.com>
6466
6467 * linux-low.h: Remove obsolete prototypes.
6468 (struct linux_target_ops): New.
6469 (extern the_low_target): New.
6470 * linux-low.c (num_regs, regmap): Remove declarations.
6471 (register_addr): Use the_low_target explicitly.
6472 (fetch_register): Likewise.
6473 (usr_fetch_inferior_registers): Likewise.
6474 (usr_store_inferior_registers): Likewise.
6475 * linux-arm-low.c (num_regs): Remove.
6476 (arm_num_regs): Define.
6477 (arm_regmap): Renamed from regmap, made static.
6478 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
6479 made static.
6480 (arm_cannot_store_register): Renamed from cannot_store_register,
6481 made static.
6482 (the_low_target): New.
6483 * linux-i386-low.c (num_regs): Remove.
6484 (i386_num_regs): Define.
6485 (i386_regmap): Renamed from regmap, made static.
6486 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
6487 made static.
6488 (i386_cannot_store_register): Renamed from cannot_store_register,
6489 made static.
6490 (the_low_target): New.
6491 * linux-ia64-low.c (num_regs): Remove.
6492 (ia64_num_regs): Define.
6493 (ia64_regmap): Renamed from regmap, made static.
6494 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
6495 made static.
6496 (ia64_cannot_store_register): Renamed from cannot_store_register,
6497 made static.
6498 (the_low_target): New.
6499 * linux-m68k-low.c (num_regs): Remove.
6500 (m68k_num_regs): Define.
6501 (m68k_regmap): Renamed from regmap, made static.
6502 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
6503 made static.
6504 (m68k_cannot_store_register): Renamed from cannot_store_register,
6505 made static.
6506 (the_low_target): New.
6507 * linux-mips-low.c (num_regs): Remove.
6508 (mips_num_regs): Define.
6509 (mips_regmap): Renamed from regmap, made static.
6510 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
6511 made static.
6512 (mips_cannot_store_register): Renamed from cannot_store_register,
6513 made static.
6514 (the_low_target): New.
6515 * linux-ppc-low.c (num_regs): Remove.
6516 (ppc_num_regs): Define.
6517 (ppc_regmap): Renamed from regmap, made static.
6518 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
6519 made static.
6520 (ppc_cannot_store_register): Renamed from cannot_store_register,
6521 made static.
6522 (the_low_target): New.
6523 * linux-s390-low.c (num_regs): Remove.
6524 (s390_num_regs): Define.
6525 (s390_regmap): Renamed from regmap, made static.
6526 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
6527 made static.
6528 (s390_cannot_store_register): Renamed from cannot_store_register,
6529 made static.
6530 (the_low_target): New.
6531 * linux-sh-low.c (num_regs): Remove.
6532 (sh_num_regs): Define.
6533 (sh_regmap): Renamed from regmap, made static.
6534 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
6535 made static.
6536 (sh_cannot_store_register): Renamed from cannot_store_register,
6537 made static.
6538 (the_low_target): New.
6539 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
6540 (the_low_target): New.
6541
65422002-04-09 Daniel Jacobowitz <drow@mvista.com>
6543
6544 * Makefile.in: Add stamp-h target.
6545 * configure.in: Create stamp-h.
6546 * configure: Regenerated.
6547
65482002-04-09 Daniel Jacobowitz <drow@mvista.com>
6549
6550 * inferiors.c: New file.
6551 * target.c: New file.
6552 * target.h: New file.
6553 * Makefile.in: Add target.o and inferiors.o. Update
6554 dependencies.
6555 * linux-low.c (inferior_pid): New static variable,
6556 moved from server.c.
6557 (linux_create_inferior): Renamed from create_inferior.
6558 Call add_inferior. Return 0 on success instead of a PID.
6559 (linux_attach): Renamed from myattach.
6560 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
6561 (linux_thread_alive): Renamed from mythread_alive.
6562 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
6563 child dies.
6564 (linux_resume): Renamed from myresume. Add missing ``return 0''.
6565 (regsets_store_inferior_registers): Correct error message.
6566 Add missing ``return 0''.
6567 (linux_fetch_registers): Renamed from fetch_inferior_registers.
6568 (linux_store_registers): Renamed from store_inferior_registers.
6569 (linux_read_memory): Renamed from read_inferior_memory.
6570 (linux_write_memory): Renamed from write_inferior_memory.
6571 (linux_target_ops): New structure.
6572 (initialize_low): Call set_target_ops ().
6573 * remote-utils.c (unhexify): New function.
6574 (hexify): New function.
6575 (input_interrupt): Send signals to ``signal_pid''.
6576 * server.c (inferior_pid): Remove.
6577 (start_inferior): Update create_inferior call.
6578 (attach_inferior): Call add_inferior.
6579 (handle_query): New function.
6580 (main): Call handle_query for `q' packets.
6581 * server.h: Include "target.h". Remove obsolete prototypes.
6582 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
6583
65842002-04-09 Daniel Jacobowitz <drow@mvista.com>
6585
6586 * Makefile.in: Add WARN_CFLAGS. Update configury
6587 dependencies.
6588 * configure.in: Check for <string.h>
6589 * configure: Regenerate.
6590 * config.in: Regenerate.
6591 * gdbreplay.c: Include needed system headers.
6592 (remote_open): Remove strchr prototype.
6593 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
6594 * regcache.c (supply_register): Change buf argument to const void *.
6595 (supply_register_by_name): Likewise.
6596 (collect_register): Change buf argument to void *.
6597 (collect_register_by_name): Likewise.
6598 * regcache.h: Add missing prototypes.
6599 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
6600 * server.c (handle_query): New function.
6601 (attached): New static variable, moved out of main.
6602 (main): Quiet longjmp clobber warnings.
6603 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
6604 * utils.c (error): Remove NORETURN.
6605 (fatal): Likewise.