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