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