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