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