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