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