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