Introduce "gdb/configure.nat" (and delete "gdb/config/*/*.mh" files)
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2
3 * Makefile: Remove "@host_makefile_frag@".
4
5 2017-05-05 Pedro Alves <palves@redhat.com>
6
7 * configure: Regenerate.
8
9 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
10
11 * configure: Regenerate.
12
13 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
14
15 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
16 software_single_step change of return type to
17 std::vector<CORE_ADDR>.
18 * linux-low.c (install_software_single_step_breakpoints):
19 Likewise.
20 * linux-low.h (install_software_single_step_breakpoints):
21 Likewise.
22
23 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
24
25 * remote-utils.c: Include "gdb_termios.h" instead of
26 "terminal.h".
27 * terminal.h: Delete file.
28
29 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
30
31 * server.c: Include <vector>.
32 <program_argv, wrapper_argv>: Convert to std::vector.
33 (start_inferior): Rewrite function to use C++.
34 (handle_v_run): Likewise. Update code that calculates the argv
35 based on the vRun packet; use C++.
36 (captured_main): Likewise.
37
38 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
39
40 * server.c (handle_v_cont): Initialize thread_resume::thread
41 with null_ptid.
42
43 2017-04-05 Pedro Alves <palves@redhat.com>
44
45 * configure: Regenerate.
46
47 2017-04-05 Pedro Alves <palves@redhat.com>
48
49 * gdbreplay.c (sync_error): Constify.
50 * linux-x86-low.c (push_opcode): Constify.
51
52 2017-04-05 Pedro Alves <palves@redhat.com>
53
54 * win32-low.c (get_child_debug_event)
55 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
56 Report TARGET_WAITKIND_SPURIOUS instead.
57
58 2017-04-05 Pedro Alves <palves@redhat.com>
59
60 * remote-utils.c (remote_prepare, remote_open): Constify.
61 * remote-utils.h (remote_prepare, remote_open): Constify.
62 * server.c (captured_main): Constify 'port' handling.
63
64 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
65
66 * Makefile.in (clean): Clear .deps.
67
68 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
69
70 * .gitignore: Remove generated files, replace with wildcard.
71 * (clean): Replace removal of generated files with wildcard.
72 (version.c): Replace with...
73 (version-generated.c): ...this.
74 (xml-builtin.c): Replace with...
75 (xml-builtin-generated.c): ...this.
76 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
77 (%.c: *regformats*): Replace with...
78 (%-generated.c: *regformats*): ...this.
79
80 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
81
82 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
83 (xtensa_fill_gregset): Call collect_register_by_name for
84 threadptr register.
85 (xtensa_store_gregset): Call supply_register_by_name for
86 threadptr register.
87
88 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
89
90 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
91 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
92 (xtensa_store_gregset): Call supply_register for all registers in
93 a0_regnum..a0_regnum + C0_NREGS range.
94
95 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
96
97 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
98 (ax-ipa.o: ax.c): Remove.
99 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
100 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
101 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
102 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
103 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
104
105 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
106
107 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
108 (print-utils-ipa.o: ../common/print-utils.c): Remove.
109 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
110 (errors-ipa.o: ../common/errors.c): Remove.
111 (format-ipa.o: ../common/format.c): Remove.
112 (common-utils-ipa.o: ../common/common-utils.c): Remove.
113
114 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
115
116 * Makefile.in (%-ipa.o: %.c): New rule.
117 (tracepoint-ipa.o: tracepoint.c): Remove.
118 (utils-ipa.o: utils.c): Remove.
119 (remote-utils-ipa.o: remote-utils.c): Remove.
120 (regcache-ipa.o: regcache.c): Remove.
121 (i386-linux-ipa.o: i386-linux.c): Remove.
122 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
123 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
124 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
125 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
126 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
127 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
128 (amd64-linux-ipa.o: amd64-linux.c): Remove.
129 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
130 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
131 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
132 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
133 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
134 (aarch64-ipa.o: aarch64.c): Remove.
135 (s390-linux32-ipa.o: s390-linux32.c): Remove.
136 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
137 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
138 (s390-linux64-ipa.o: s390-linux64.c): Remove.
139 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
140 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
141 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
142 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
143 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
144 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
145 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
146 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
147 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
148 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
149 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
150 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
151 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
152 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
153 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
154 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
155 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
156 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
157 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
158 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
159 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
160 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
161 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
162 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
163 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
164 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
165 (tdesc-ipa.o: tdesc.c): Remove.
166 (x32-linux-ipa.o: x32-linux.c): Remove.
167 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
168 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
169
170 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
171
172 * Makefile.in (%.o: ../arch/%.c): New rule.
173 (arm.o: ../arch/arm.c): Remove.
174 (arm-linux.o: ../arch/arm-linux.c): Remove.
175 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
176 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
177
178 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
179
180 * Makefile.in (%.o: ../nat/%.c): New rule.
181 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
182 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
183 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
184 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
185 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
186 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
187 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
188 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
189 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
190 (linux-personality.o: ../nat/linux-personality.c): Remove.
191 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
192 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
193 (x86-linux.o: ../nat/x86-linux.c): Remove.
194 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
195 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
196
197 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
198
199 * Makefile.in (%.o: ../common/%.c): New rule.
200 (signals.o: ../common/signals.c): Remove.
201 (print-utils.o: ../common/print-utils.c): Remove.
202 (rsp-low.o: ../common/rsp-low.c): Remove.
203 (common-utils.o: ../common/common-utils.c): Remove.
204 (posix-strerror.o: ../common/posix-strerror.c): Remove.
205 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
206 (vec.o: ../common/vec.c): Remove.
207 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
208 (xml-utils.o: ../common/xml-utils.c): Remove.
209 (ptid.o: ../common/ptid.c): Remove.
210 (buffer.o: ../common/buffer.c): Remove.
211 (format.o: ../common/format.c): Remove.
212 (filestuff.o: ../common/filestuff.c): Remove.
213 (agent.o: ../common/agent.c): Remove.
214 (errors.o: ../common/errors.c): Remove.
215 (environ.o: ../common/environ.c): Remove.
216 (common-debug.o: ../common/common-debug.c): Remove.
217 (cleanups.o: ../common/cleanups.c): Remove.
218 (common-exceptions.o: ../common/common-exceptions.c): Remove.
219 (fileio.o: ../common/fileio.c): Remove.
220 (common-regcache.o: ../common/common-regcache.c): Remove.
221 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
222 (new-op.o: ../common/new-op.c): Remove.
223 (btrace-common.o: ../common/btrace-common.c): Remove.
224
225 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
226
227 * Makefile.in (%.o: ../target/%.c): New rule.
228 (waitstatus.o: ../target/waitstatus.c): Remove.
229
230 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
231
232 * Makefile.in
233 (%.c: ../regformats/%.dat,
234 (%.c: ../regformats/arm/%.dat,
235 (%.c: ../regformats/i386/%.dat,
236 (%.c: ../regformats/rs6000/%.dat): New rules.
237 (aarch64.c): Remove.
238 (reg-arm.c): Remove.
239 (arm-with-iwmmxt.c): Remove.
240 (arm-with-vfpv2.c): Remove.
241 (arm-with-vfpv3.c): Remove.
242 (arm-with-neon.c): Remove.
243 (reg-bfin.c): Remove.
244 (reg-cris.c): Remove.
245 (reg-crisv32.c): Remove.
246 (i386.c): Remove.
247 (i386-linux.c): Remove.
248 (i386-avx.c): Remove.
249 (i386-avx-linux.c): Remove.
250 (i386-avx-avx512.c): Remove.
251 (i386-avx-avx512-linux.c): Remove.
252 (i386-mpx.c): Remove.
253 (i386-mpx-linux.c): Remove.
254 (i386-avx-mpx-avx512-pku.c): Remove.
255 (i386-avx-mpx-avx512-pku-linux.c): Remove.
256 (i386-avx-mpx.c): Remove.
257 (i386-avx-mpx-linux.c): Remove.
258 (i386-mmx.c): Remove.
259 (i386-mmx-linux.c): Remove.
260 (reg-ia64.c): Remove.
261 (reg-m32r.c): Remove.
262 (reg-m68k.c): Remove.
263 (reg-cf.c): Remove.
264 (mips-linux.c): Remove.
265 (mips-dsp-linux.c): Remove.
266 (mips64-linux.c): Remove.
267 (mips64-dsp-linux.c): Remove.
268 (nios2-linux.c): Remove.
269 (powerpc-32.c): Remove.
270 (powerpc-32l.c): Remove.
271 (powerpc-altivec32l.c): Remove.
272 (powerpc-cell32l.c): Remove.
273 (powerpc-vsx32l.c): Remove.
274 (powerpc-isa205-32l.c): Remove.
275 (powerpc-isa205-altivec32l.c): Remove.
276 (powerpc-isa205-vsx32l.c): Remove.
277 (powerpc-e500l.c): Remove.
278 (powerpc-64l.c): Remove.
279 (powerpc-altivec64l.c): Remove.
280 (powerpc-cell64l.c): Remove.
281 (powerpc-vsx64l.c): Remove.
282 (powerpc-isa205-64l.c): Remove.
283 (powerpc-isa205-altivec64l.c): Remove.
284 (powerpc-isa205-vsx64l.c): Remove.
285 (s390-linux32.c): Remove.
286 (s390-linux32v1.c): Remove.
287 (s390-linux32v2.c): Remove.
288 (s390-linux64.c): Remove.
289 (s390-linux64v1.c): Remove.
290 (s390-linux64v2.c): Remove.
291 (s390-te-linux64.c): Remove.
292 (s390-vx-linux64.c): Remove.
293 (s390-tevx-linux64.c): Remove.
294 (s390x-linux64.c): Remove.
295 (s390x-linux64v1.c): Remove.
296 (s390x-linux64v2.c): Remove.
297 (s390x-te-linux64.c): Remove.
298 (s390x-vx-linux64.c): Remove.
299 (s390x-tevx-linux64.c): Remove.
300 (tic6x-c64xp-linux.c): Remove.
301 (tic6x-c64x-linux.c): Remove.
302 (tic6x-c62x-linux.c): Remove.
303 (reg-sh.c): Remove.
304 (reg-sparc64.c): Remove.
305 (reg-spu.c): Remove.
306 (amd64.c): Remove.
307 (amd64-linux.c): Remove.
308 (amd64-avx.c): Remove.
309 (amd64-avx-linux.c): Remove.
310 (amd64-avx-avx512.c): Remove.
311 (amd64-avx-avx512-linux.c): Remove.
312 (amd64-mpx.c): Remove.
313 (amd64-mpx-linux.c): Remove.
314 (amd64-avx-mpx-avx512-pku.c): Remove.
315 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
316 (amd64-avx-mpx.c): Remove.
317 (amd64-avx-mpx-linux.c): Remove.
318 (x32.c): Remove.
319 (x32-linux.c): Remove.
320 (x32-avx.c): Remove.
321 (x32-avx-linux.c): Remove.
322 (x32-avx-avx512.c): Remove.
323 (x32-avx-avx512-linux.c): Remove.
324 (reg-xtensa.c): Remove.
325 (reg-tilegx.c): Remove.
326 (reg-tilegx32.c): Remove.
327
328 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
329
330 * Makefile.in (SFILES): Add "common/environ.c".
331 (OBJS): Add "common/environ.h".
332
333 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
334
335 * configure.ac: Check if the fs_base and gs_base members of
336 `struct user_regs_struct' exist.
337 * config.in: Regenerated.
338 * configure: Likewise.
339
340 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
341
342 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
343 target_read_memory.
344 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
345 (get_next_pcs_syscall_next_pc): Likewise.
346
347 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
348
349 * win32-i386-low.c: Fix incorrect reference to a couple source files.
350 * nto-x86-low.c: Likewise.
351
352 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
353
354 * Makefile.in: Include disable-implicit-rules.mk.
355
356 2016-11-23 Pedro Alves <palves@redhat.com>
357
358 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
359 (debug_vprintf): Use std::chrono::steady_clock instead of
360 gettimeofday. Use '.' instead of ':'.
361 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
362 (get_timestamp): Use std::chrono::steady_clock instead of
363 gettimeofday.
364
365 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
366
367 * Makefile.in: Fix whitespace formatting.
368
369 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
370
371 * Makefile.in (SFILES, OBS): Flatten list and order
372 alphabetically.
373
374 2016-11-23 Pedro Alves <palves@redhat.com>
375
376 * event-loop.c (handle_file_event): Use warning.
377 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
378 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
379 Use warning.
380
381 2016-11-23 Pedro Alves <palves@redhat.com>
382
383 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
384 output.
385 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
386 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
387 debug_printf and debug_flush for debug output.
388 * server.c (handle_general_set): Likewise.
389 * thread-db.c (try_thread_db_load): Use debug_printf for debug
390 output.
391
392 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
393
394 * Makefile.in (.c.o): Replace rule with ...
395 (%.o: %.c): ... this one.
396
397 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
398
399 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
400 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
401 make.
402 * configure.ac: Remove checks for the make program.
403 * configure: Re-generate.
404
405 2016-10-28 Pedro Alves <palves@redhat.com>
406
407 * Makefile.in (CXX_DIALECT): Get from configure.
408 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
409 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
410 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
411 * config.in: Regenerate.
412 * configure: Regenerate.
413
414 2016-10-27 Yao Qi <yao.qi@linaro.org>
415
416 * linux-low.c (linux_supports_range_stepping): Return true if
417 can_software_single_step return true.
418
419 2016-10-27 Yao Qi <yao.qi@linaro.org>
420
421 * inferiors.c (find_inferior_in_random): New function.
422 * inferiors.h (find_inferior_in_random): Declare.
423 * linux-low.c (linux_wait_for_event_filtered): Call
424 find_inferior_in_random instead of find_inferior.
425
426 2016-10-27 Yao Qi <yao.qi@linaro.org>
427
428 * linux-low.c (linux_wait_1): If single-step breakpoints are
429 inserted, remove them.
430
431 2016-10-26 Pedro Alves <palves@redhat.com>
432
433 * linux-low.c (handle_extended_wait): Link parent/child fork
434 threads.
435 (linux_wait_1): Unlink them.
436 (linux_set_resume_request): Ignore resume requests for
437 already-resumed and unhandled fork child threads.
438 * linux-low.h (struct lwp_info) <fork_relative>: New field.
439 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
440 New functions.
441 (handle_v_requests) <vCont>: Don't call require_running.
442 * server.h (in_queued_stop_replies): New declaration.
443
444 2016-10-24 Yao Qi <yao.qi@linaro.org>
445
446 PR server/20733
447 * linux-aarch64-low.c (append_insns): Cast the return value to
448 'uint32_t *'.
449
450 2016-10-10 Yao Qi <yao.qi@linaro.org>
451
452 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
453
454 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
455
456 * target.c (target_supports_multi_process): New function, moved
457 from...
458 * target.h (target_supports_multi_process): ... here. Remove
459 macro.
460
461 2016-10-05 Tom Tromey <tom@tromey.com>
462
463 PR remote/20655:
464 * tracepoint.c (handle_tracepoint_bkpts): Check
465 ipa_error_tracepoint, not ipa_stopping_tracepoint.
466
467 2016-10-05 Yao Qi <yao.qi@linaro.org>
468
469 * configure.srv: Update the path of arm-*.xml files.
470
471 2016-10-05 Terry Guo <terry.guo@arm.com>
472 Yao Qi <yao.qi@linaro.org>
473
474 * Makefile.in: Adjust the path of rules.
475 * configure.srv: Update the path of xml files.
476 * regformats/arm-with-iwmmxt.dat: Regenerated.
477 * regformats/arm-with-neon.dat: Likewise.
478 * regformats/arm-with-vfpv2.dat: Likewise.
479 * regformats/arm-with-vfpv3.dat Likewise.
480
481 2016-09-30 Yao Qi <yao.qi@linaro.org>
482
483 PR gdbserver/20627
484 * target.c (target_stop_and_wait): Don't call
485 target_continue_no_signal, use resume_stop instead.
486
487 2016-09-26 Yao Qi <yao.qi@linaro.org>
488
489 * linux-low.c (linux_wait_1): Call debug_exit.
490
491 2016-09-23 Pedro Alves <palves@redhat.com>
492
493 * Makefile.in (SFILES): Add common/new-op.c.
494 (OBS): Add common/new-op.o.
495 (new-op.o): New rule.
496
497 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
498
499 * .gitinore: Ignore more files.
500
501 2016-09-21 Yao Qi <yao.qi@linaro.org>
502
503 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
504 23.
505
506 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
507
508 * server.c (start_inferior): Call target_mourn_inferior instead of
509 mourn_inferior; pass ptid_t argument to it.
510 (resume): Likewise.
511 (handle_target_event): Likewise.
512 * target.c (target_mourn_inferior): New function.
513 * target.h (mourn_inferior): Delete macro.
514
515 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
516
517 * linux-low.c (lwp_is_stepping): New function.
518
519 2016-09-06 Carl Love <cel@us.ibm.com>
520
521 * server.c (start_inferior): Fixed comment, requested comment change
522 didn't get updated correctly. Removed reference to ptrace () call as
523 it is only true on Linux systems.
524
525 2016-09-06 Carl Love <cel@us.ibm.com>
526
527 * server.c (start_inferior): Do not call
528 function target_post_create_inferior () if the
529 inferior process has already exited.
530
531 2016-09-05 Pedro Alves <palves@redhat.com>
532
533 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
534 (COMPILE.pre, CC_LD): Use CXX directly.
535 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
536 * acinclude.m4: Don't include build-with-cxx.m4.
537 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
538 * configure: Regenerate.
539
540 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
541
542 PR gdb/19495
543 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
544 call writing data to own_buf.
545
546 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
547
548 * target.c (mywait): Call target_wait instead of
549 the_target->wait.
550 (target_wait): New function.
551
552 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
553
554 * server.c (start_inferior): New variable 'ptid'. Replace calls
555 to the_target->resume by target_continue{,_no_signal}, depending
556 on the case.
557 * target.c (target_stop_and_wait): Call target_continue_no_signal
558 instead of the_target->resume.
559 (target_continue): New function.
560
561 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
562
563 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
564
565 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
566
567 PR server/20491
568 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
569 ps_prochandle.
570 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
571 * linux-arm-low.c (ps_get_thread_area): Likewise.
572 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
573 * linux-m68k-low.c (ps_get_thread_area): Likewise.
574 * linux-mips-low.c (ps_get_thread_area): Likewise.
575 * linux-nios2-low.c (ps_get_thread_area): Likewise.
576 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
577 * linux-x86-low.c (ps_get_thread_area): Likewise.
578 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
579
580 2016-08-19 Pedro Alves <palves@redhat.com>
581
582 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
583
584 2016-08-19 Pedro Alves <palves@redhat.com>
585
586 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
587 comment. Use memcpy instead of casting through unsigned long.
588
589 2016-08-19 Pedro Alves <palves@redhat.com>
590
591 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
592 allocating around 0x80000000.
593
594 2016-08-19 Pedro Alves <palves@redhat.com>
595
596 PR gdb/20415
597 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
598 (x32-avx512-linux-ipa.o): New rules.
599 * configure.ac (x86_64-*-linux*): New x32 check.
600 * configure.srv (ipa_x32_linux_regobj): New.
601 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
602 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
603 descriptions.
604 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
605 descriptions.
606 * configure: Regenerate.
607
608 2016-08-09 Pedro Alves <palves@redhat.com>
609
610 PR gdb/18653
611 * Makefile.in (OBS): Add signals-state-save-restore.o.
612 (signals-state-save-restore.o): New rule.
613 * config.in: Regenerate.
614 * configure: Regenerate.
615 * linux-low.c: Include "signals-state-save-restore.h".
616 (linux_create_inferior): Call
617 restore_original_signals_state.
618 * server.c: Include "dispositions-save-restore.h".
619 (captured_main): Call save_original_signals_state.
620
621 2016-08-05 Pedro Alves <palves@redhat.com>
622
623 * configure: Regenerate.
624
625 2016-08-04 Yao Qi <yao.qi@linaro.org>
626
627 * linux-low.c (regsets_fetch_inferior_registers): Check
628 errno is ESRCH or not.
629
630 2016-08-02 Yao Qi <yao.qi@linaro.org>
631
632 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
633 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
634 (thread_db_load_search): Update.
635 (try_thread_db_load_1): Don't look for td_ta_event_addr,
636 td_ta_set_event and td_ta_event_getmsg.
637
638 2016-07-26 Pedro Alves <palves@redhat.com>
639
640 PR server/20414
641 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
642 of unsigned long for 64-bit registers and use uint32_t instead of
643 unsigned int for 32-bit registers.
644
645 2016-07-26 Pedro Alves <palves@redhat.com>
646
647 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
648 to 'ptrace'.
649
650 2016-07-21 Tom Tromey <tom@tromey.com>
651
652 * configure: Rebuild.
653
654 2016-07-21 Yao Qi <yao.qi@linaro.org>
655
656 * mem-break.c (find_gdb_breakpoint): Cast bp to
657 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
658
659 2016-07-21 Yao Qi <yao.qi@linaro.org>
660
661 * server.c (handle_v_requests): Support s and S actions
662 if target_supports_software_single_step return true.
663
664 2016-07-21 Yao Qi <yao.qi@linaro.org>
665
666 * linux-low.c (resume_stopped_resumed_lwps): If resume request
667 is resume_step, call maybe_hw_step.
668 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
669 and unstop them.
670 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
671 breakpoints or not.
672 (proceed_one_lwp): If resume request is resume_step, install
673 reinsert breakpoints and call maybe_hw_step.
674
675 2016-07-21 Yao Qi <yao.qi@linaro.org>
676
677 * linux-low.c (proceed_one_lwp): Declare.
678 (linux_resume_one_thread): Remove local variable 'step'.
679 Lift code enqueue signal. Call proceed_one_lwp instead of
680 linux_resume_one_lwp.
681
682 2016-07-21 Yao Qi <yao.qi@linaro.org>
683
684 * linux-low.c (linux_resume_one_thread): Call
685 enqueue_pending_signal.
686
687 2016-07-21 Yao Qi <yao.qi@linaro.org>
688
689 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
690 * inferiors.c (do_restore_current_thread_cleanup): New function.
691 (make_cleanup_restore_current_thread): Likewise.
692 * linux-low.c (install_software_single_step_breakpoints): Call
693 make_cleanup_restore_current_thread. Switch current_thread to
694 thread.
695
696 2016-07-21 Yao Qi <yao.qi@linaro.org>
697
698 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
699 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
700 (clone_one_breakpoint): Likewise.
701 (delete_reinsert_breakpoints): Change parameter to thread.
702 Callers updated.
703 (has_reinsert_breakpoints): Likewise.
704 (uninsert_reinsert_breakpoints): Likewise.
705 (reinsert_reinsert_breakpoints): Likewise.
706 * mem-break.h (set_reinsert_breakpoint): Update declaration.
707 (delete_reinsert_breakpoints): Likewise.
708 (reinsert_reinsert_breakpoints): Likewise.
709 (uninsert_reinsert_breakpoints): Likewise.
710 (has_reinsert_breakpoints): Likewise.
711
712 2016-07-21 Yao Qi <yao.qi@linaro.org>
713
714 * inferiors.c (get_thread_process): Make parameter const.
715 * inferiors.h (get_thread_process): Update declaration.
716 * mem-break.c (clone_all_breakpoints): Remove all parameters.
717 Add new parameters child_thread and parent_thread. Callers
718 updated.
719 * mem-break.h (clone_all_breakpoints): Update declaration.
720
721 2016-07-21 Yao Qi <yao.qi@linaro.org>
722
723 * mem-break.c (struct breakpoint) <cond_list>: Remove.
724 <command_list, handler>: Remove.
725 (struct gdb_breakpoint): New.
726 (struct other_breakpoint): New.
727 (struct reinsert_breakpoint): New.
728 (is_gdb_breakpoint): New function.
729 (any_persistent_commands): Update command_list if
730 is_gdb_breakpoint returns true.
731 (set_breakpoint): Create breakpoints according to their types.
732 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
733 (set_gdb_breakpoint_1): Likewise.
734 (set_gdb_breakpoint): Likewise.
735 (clear_breakpoint_conditions): Change parameter type to
736 'struct gdb_breakpoint *'.
737 (clear_breakpoint_commands): Likewise.
738 (clear_breakpoint_conditions_and_commands): Likewise.
739 (add_condition_to_breakpoint): Likewise.
740 (add_breakpoint_condition): Likewise.
741 (add_commands_to_breakpoint): Likewise.
742 (check_breakpoints): Check other_breakpoint.
743 (clone_one_breakpoint): Clone breakpopint according to its type.
744 * mem-break.h (struct gdb_breakpoint): Declare.
745 (set_gdb_breakpoint): Update declaration.
746 (clear_breakpoint_conditions_and_commands): Likewise.
747 (add_breakpoint_condition): Likewise.
748 (add_breakpoint_commands): Likewise.
749 * server.c (process_point_options): Change parameter type to
750 'struct gdb_breakpoint *'.
751
752 2016-07-21 Yao Qi <yao.qi@linaro.org>
753
754 * mem-break.c (set_breakpoint_at): Rename it to ...
755 (set_breakpoint_type_at): ... it.
756 (set_breakpoint_at): Call set_breakpoint_type_at.
757 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
758 * mem-break.h (set_breakpoint_at): Update comments.
759
760 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
761
762 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
763 to buf parameter.
764 (nios2_store_gregset): Likewise.
765
766 2016-07-01 Pedro Alves <palves@redhat.com>
767 Antoine Tremblay <antoine.tremblay@ericsson.com>
768
769 * linux-low.c: Change interface to take the target lwp_info
770 pointer directly and return void. Handle detaching from a zombie
771 thread.
772 (linux_detach_lwp_callback): New function.
773 (linux_detach): Detach from the leader thread after detaching from
774 the clone threads.
775
776 2016-06-28 Yao Qi <yao.qi@linaro.org>
777
778 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
779 for variable new_offset.
780 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
781 (aarch64_ftrace_insn_reloc_cb): Likewise.
782 (aarch64_ftrace_insn_reloc_tb): Likewise.
783 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
784 PRIx64 instead of PRIx32.
785
786 2016-06-28 Yao Qi <yao.qi@linaro.org>
787
788 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
789 (the_low_target): Install arm_get_syscall_trapinfo.
790
791 2016-06-28 Yao Qi <yao.qi@linaro.org>
792
793 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
794 function.
795 (the_low_target): Install aarch64_get_syscall_trapinfo.
796
797 2016-06-28 Yao Qi <yao.qi@linaro.org>
798
799 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
800 Callers updated.
801 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
802 Remove parameter sysno.
803 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
804 sysret.
805
806 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
807
808 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
809 (s390_emit_ne_goto): Likewise.
810 (s390_emit_lt_goto): Likewise.
811 (s390_emit_le_goto): Likewise.
812 (s390_emit_gt_goto): Likewise.
813 (s390_emit_ge_goto): Likewise.
814 (s390x_emit_eq_goto): Likewise.
815 (s390x_emit_ne_goto): Likewise.
816 (s390x_emit_lt_goto): Likewise.
817 (s390x_emit_le_goto): Likewise.
818 (s390x_emit_gt_goto): Likewise.
819 (s390x_emit_ge_goto): Likewise.
820 (s390_emit_ops_impl): Mark variable static.
821 (s390x_emit_ops): Likewise.
822
823 2016-06-17 Yao Qi <yao.qi@linaro.org>
824
825 * linux-low.c (handle_extended_wait): Call
826 uninsert_reinsert_breakpoints for the parent process. Remove
827 reinsert breakpoints from the child process. Reinsert them to
828 the parent process when vfork is done.
829 * mem-break.c (uninsert_reinsert_breakpoints): New function.
830 (reinsert_reinsert_breakpoints): New function.
831 * mem-break.h (uninsert_reinsert_breakpoints): Declare
832 (reinsert_reinsert_breakpoints): Declare.
833
834 2016-06-17 Yao Qi <yao.qi@linaro.org>
835
836 * linux-low.c (handle_extended_wait): If the parent is doing
837 step-over, remove the reinsert breakpoints from the forked child.
838
839 2016-06-17 Yao Qi <yao.qi@linaro.org>
840
841 * linux-low.c (unsuspend_all_lwps): Declare.
842 (linux_low_filter_event): If thread exited, call finish_step_over.
843 If step-over is finished, unsuspend other threads.
844
845 2016-06-17 Yao Qi <yao.qi@linaro.org>
846
847 * linux-low.c (linux_resume_one_lwp_throw): Assert
848 has_reinsert_breakpoints returns false.
849 * mem-break.c (delete_disabled_breakpoints): Assert
850 bp type isn't reinsert_breakpoint.
851
852 2016-06-17 Yao Qi <yao.qi@linaro.org>
853
854 * linux-low.c (maybe_hw_step): New function.
855 (linux_resume_one_lwp_throw): Call maybe_hw_step.
856 (finish_step_over): Switch current_thread to lwp temporarily,
857 and assert has_reinsert_breakpoints returns true.
858 (proceed_one_lwp): Call maybe_hw_step.
859 * mem-break.c (has_reinsert_breakpoints): New function.
860 * mem-break.h (has_reinsert_breakpoints): Declare.
861
862 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
863
864 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
865
866 2016-05-17 Yao Qi <yao.qi@linaro.org>
867
868 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
869 instead of find_inferior.
870
871 2016-05-05 Yao Qi <yao.qi@linaro.org>
872
873 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
874 Initialize res to zero.
875
876 2016-05-05 Yao Qi <yao.qi@linaro.org>
877
878 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
879 to uint32_t.
880
881 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
882
883 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
884 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
885 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
886
887 2016-04-28 Par Olsson <par.olsson@windriver.com>
888 Simon Marchi <simon.marchi@ericsson.com>
889
890 * tracepoint.c (write_inferior_int8): New function.
891 (cmd_qtenable_disable): Write enable flag using
892 write_inferior_int8.
893
894 2016-04-25 Yao Qi <yao.qi@linaro.org>
895
896 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
897 (need_step_over_p): Return zero if the LWP has pending signals
898 can be delivered on software single step target.
899
900 2016-04-25 Yao Qi <yao.qi@linaro.org>
901
902 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
903 return instead of error.
904
905 2016-04-22 Yao Qi <yao.qi@linaro.org>
906
907 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
908 to 23.
909
910 2016-04-22 Yao Qi <yao.qi@linaro.org>
911
912 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
913 signal when stepping over breakpoint with software single
914 step.
915
916 2016-04-21 Pedro Alves <palves@redhat.com>
917
918 * linux-s390-low.c (s390_collect_ptrace_register)
919 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
920 add casts.
921 (s390_check_regset): Use void * instead of gdb_byte *.
922
923 2016-04-20 Pedro Alves <palves@redhat.com>
924
925 * configure: Renegerate.
926
927 2016-04-20 Yao Qi <yao.qi@linaro.org>
928
929 * linux-aarch32-low.c: Include "arch/arm-linux.h".
930 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
931 number 16.
932 (arm_store_gregset): Likewise.
933
934 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
935
936 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
937 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
938 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
939 (amd64-avx-mpx-linux.c): New rules.
940 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
941 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
942 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
943 (srv_amd64_regobj): Add amd64-avx-mpx.o.
944 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
945 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
946 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
947 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
948 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
949 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
950 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
951 * linux-x86-low.c (x86_linux_read_description): Add case for
952 X86_XSTATE_AVX_MPX_MASK.
953 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
954 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
955 init_registers_i386_avx_mpx_linux.
956 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
957 (initialize_low_tracepoint): Call
958 init_registers_i386_avx_mpx_linux.
959 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
960 (initialize_low_tracepoint): Call
961 init_registers_amd64_avx_mpx_linux.
962 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
963 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
964 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
965 declarations.
966
967 2016-04-18 Pedro Alves <palves@redhat.com>
968
969 * configure: Regenerate.
970
971 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
972
973 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
974 (aarch64_emit_sub): Likewise.
975
976 2016-04-12 Pedro Alves <palves@redhat.com>
977
978 * utils.c (prepare_to_throw_exception): Delete.
979
980 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
981
982 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
983
984 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
985
986 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
987
988 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
989
990 * linux-aarch64-ipa.c: Add <elf.h> include.
991 * linux-ppc-ipa.c: Add <elf.h> include.
992 * linux-s390-ipa.c: Add <elf.h> include.
993
994 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
995
996 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
997 (get_raw_reg_ptr): Likewise.
998 (get_trace_state_variable_value_ptr): Likewise.
999 (set_trace_state_variable_value_ptr): Likewise.
1000 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1001 char *.
1002
1003 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1004 Marcin Kościelnicki <koriakin@0x04.net>
1005
1006 PR/17221
1007 * linux-ppc-low.c (emit_insns): New function.
1008 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1009 (ppc_emit_prologue): New function.
1010 (ppc_emit_epilogue): New function.
1011 (ppc_emit_add): New function.
1012 (ppc_emit_sub): New function.
1013 (ppc_emit_mul): New function.
1014 (ppc_emit_lsh): New function.
1015 (ppc_emit_rsh_signed): New function.
1016 (ppc_emit_rsh_unsigned): New function.
1017 (ppc_emit_ext): New function.
1018 (ppc_emit_zero_ext): New function.
1019 (ppc_emit_log_not): New function.
1020 (ppc_emit_bit_and): New function.
1021 (ppc_emit_bit_or): New function.
1022 (ppc_emit_bit_xor): New function.
1023 (ppc_emit_bit_not): New function.
1024 (ppc_emit_equal): New function.
1025 (ppc_emit_less_signed): New function.
1026 (ppc_emit_less_unsigned): New function.
1027 (ppc_emit_ref): New function.
1028 (ppc_emit_const): New function.
1029 (ppc_emit_reg): New function.
1030 (ppc_emit_pop): New function.
1031 (ppc_emit_stack_flush): New function.
1032 (ppc_emit_swap): New function.
1033 (ppc_emit_stack_adjust): New function.
1034 (ppc_emit_call): New function.
1035 (ppc_emit_int_call_1): New function.
1036 (ppc_emit_void_call_2): New function.
1037 (ppc_emit_if_goto): New function.
1038 (ppc_emit_goto): New function.
1039 (ppc_emit_eq_goto): New function.
1040 (ppc_emit_ne_goto): New function.
1041 (ppc_emit_lt_goto): New function.
1042 (ppc_emit_le_goto): New function.
1043 (ppc_emit_gt_goto): New function.
1044 (ppc_emit_ge_goto): New function.
1045 (ppc_write_goto_address): New function.
1046 (ppc_emit_ops_impl): New static variable.
1047 (ppc64v1_emit_prologue): New function.
1048 (ppc64v2_emit_prologue): New function.
1049 (ppc64_emit_epilogue): New function.
1050 (ppc64_emit_add): New function.
1051 (ppc64_emit_sub): New function.
1052 (ppc64_emit_mul): New function.
1053 (ppc64_emit_lsh): New function.
1054 (ppc64_emit_rsh_signed): New function.
1055 (ppc64_emit_rsh_unsigned): New function.
1056 (ppc64_emit_ext): New function.
1057 (ppc64_emit_zero_ext): New function.
1058 (ppc64_emit_log_not): New function.
1059 (ppc64_emit_bit_and): New function.
1060 (ppc64_emit_bit_or): New function.
1061 (ppc64_emit_bit_xor): New function.
1062 (ppc64_emit_bit_not): New function.
1063 (ppc64_emit_equal): New function.
1064 (ppc64_emit_less_signed): New function.
1065 (ppc64_emit_less_unsigned): New function.
1066 (ppc64_emit_ref): New function.
1067 (ppc64_emit_const): New function.
1068 (ppc64v1_emit_reg): New function.
1069 (ppc64v2_emit_reg): New function.
1070 (ppc64_emit_pop): New function.
1071 (ppc64_emit_stack_flush): New function.
1072 (ppc64_emit_swap): New function.
1073 (ppc64v1_emit_call): New function.
1074 (ppc64v2_emit_call): New function.
1075 (ppc64v1_emit_int_call_1): New function.
1076 (ppc64v2_emit_int_call_1): New function.
1077 (ppc64v1_emit_void_call_2): New function.
1078 (ppc64v2_emit_void_call_2): New function.
1079 (ppc64_emit_if_goto): New function.
1080 (ppc64_emit_eq_goto): New function.
1081 (ppc64_emit_ne_goto): New function.
1082 (ppc64_emit_lt_goto): New function.
1083 (ppc64_emit_le_goto): New function.
1084 (ppc64_emit_gt_goto): New function.
1085 (ppc64_emit_ge_goto): New function.
1086 (ppc64v1_emit_ops_impl): New static variable.
1087 (ppc64v2_emit_ops_impl): New static variable.
1088 (ppc_emit_ops): New function.
1089 (linux_low_target): Wire in ppc_emit_ops.
1090
1091 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1092 Marcin Kościelnicki <koriakin@0x04.net>
1093
1094 PR/17221
1095 * Makefile.in: Add powerpc-*-ipa.o
1096 * configure.srv: Add ipa_obj for powerpc*-linux.
1097 * linux-ppc-ipa.c: New file.
1098 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1099 includes.
1100 (PPC_FIELD): New macro.
1101 (PPC_SEXT): New macro.
1102 (PPC_OP6): New macro.
1103 (PPC_BO): New macro.
1104 (PPC_LI): New macro.
1105 (PPC_BD): New macro.
1106 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1107 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1108 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1109 (ppc_get_thread_area): New function.
1110 (is_elfv2_inferior): New function.
1111 (gen_ds_form): New function.
1112 (GEN_STD): New macro.
1113 (GEN_STDU): New macro.
1114 (GEN_LD): New macro.
1115 (GEN_LDU): New macro.
1116 (gen_d_form): New function.
1117 (GEN_ADDI): New macro.
1118 (GEN_ADDIS): New macro.
1119 (GEN_LI): New macro.
1120 (GEN_LIS): New macro.
1121 (GEN_ORI): New macro.
1122 (GEN_ORIS): New macro.
1123 (GEN_LWZ): New macro.
1124 (GEN_STW): New macro.
1125 (GEN_STWU): New macro.
1126 (gen_xfx_form): New function.
1127 (GEN_MFSPR): New macro.
1128 (GEN_MTSPR): New macro.
1129 (GEN_MFCR): New macro.
1130 (GEN_MTCR): New macro.
1131 (GEN_SYNC): New macro.
1132 (GEN_LWSYNC): New macro.
1133 (gen_x_form): New function.
1134 (GEN_OR): New macro.
1135 (GEN_MR): New macro.
1136 (GEN_LWARX): New macro.
1137 (GEN_STWCX): New macro.
1138 (GEN_CMPW): New macro.
1139 (gen_md_form): New function.
1140 (GEN_RLDICL): New macro.
1141 (GEN_RLDICR): New macro.
1142 (gen_i_form): New function.
1143 (GEN_B): New macro.
1144 (GEN_BL): New macro.
1145 (gen_b_form): New function.
1146 (GEN_BNE): New macro.
1147 (GEN_LOAD): New macro.
1148 (GEN_STORE): New macro.
1149 (gen_limm): New function.
1150 (gen_atomic_xchg): New function.
1151 (gen_call): New function.
1152 (ppc_relocate_instruction): New function.
1153 (ppc_install_fast_tracepoint_jump_pad): New function.
1154 (ppc_get_min_fast_tracepoint_insn_len): New function.
1155 (ppc_get_ipa_tdesc_idx): New function.
1156 (the_low_target): Wire in the new functions.
1157 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1158 tdescs.
1159 * linux-ppc-tdesc.h: New file.
1160
1161 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1162
1163 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1164 (alloc_jump_pad_buffer): New function.
1165 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1166 (alloc_jump_pad_buffer): New function.
1167 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1168 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1169 (alloc_jump_pad_buffer): New function.
1170 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1171 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1172 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1173 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1174
1175 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1176
1177 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1178 * linux-amd64-ipa.c: Likewise.
1179 * linux-i386-ipa.c: Likewise.
1180 * linux-s390-ipa.c: Likewise.
1181 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1182 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1183 set_trace_state_variable_value_ptr.
1184 (struct ipa_sym_addresses): Likewise.
1185 (symbol_list): Likewise.
1186 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1187 accessing gdb_collect directly.
1188 (gdb_collect_ptr_type): New typedef.
1189 (get_raw_reg_ptr_type): New typedef.
1190 (get_trace_state_variable_value_ptr_type): New typedef.
1191 (set_trace_state_variable_value_ptr_type): New typedef.
1192 (gdb_collect_ptr): New global.
1193 (get_raw_reg_ptr): New global.
1194 (get_trace_state_variable_value_ptr): New global.
1195 (set_trace_state_variable_value_ptr): New global.
1196 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1197 accessing get_raw_reg directly.
1198 (get_get_tsv_func_addr): Likewise for
1199 get_trace_state_variable_value_ptr.
1200 (get_set_tsv_func_addr): Likewise for
1201 set_trace_state_variable_value_ptr.
1202 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1203
1204 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1205
1206 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1207
1208 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1209
1210 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1211 packets.
1212 (relocate_instruction): Remove own_buf.
1213 * server.c (own_buf): Make global.
1214 (handle_v_requests): Make global.
1215 * server.h (own_buf): New declaration.
1216 (handle_v_requests): New prototype.
1217
1218 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1219
1220 PR 18377
1221 * linux-s390-low.c (add_insns): New function.
1222 (s390_emit_prologue): New function.
1223 (s390_emit_epilogue): New function.
1224 (s390_emit_add): New function.
1225 (s390_emit_sub): New function.
1226 (s390_emit_mul): New function.
1227 (s390_emit_lsh): New function.
1228 (s390_emit_rsh_signed): New function.
1229 (s390_emit_rsh_unsigned): New function.
1230 (s390_emit_ext): New function.
1231 (s390_emit_log_not): New function.
1232 (s390_emit_bit_and): New function.
1233 (s390_emit_bit_or): New function.
1234 (s390_emit_bit_xor): New function.
1235 (s390_emit_bit_not): New function.
1236 (s390_emit_equal): New function.
1237 (s390_emit_less_signed): New function.
1238 (s390_emit_less_unsigned): New function.
1239 (s390_emit_ref): New function.
1240 (s390_emit_if_goto): New function.
1241 (s390_emit_goto): New function.
1242 (s390_write_goto_address): New function.
1243 (s390_emit_litpool): New function.
1244 (s390_emit_const): New function.
1245 (s390_emit_call): New function.
1246 (s390_emit_reg): New function.
1247 (s390_emit_pop): New function.
1248 (s390_emit_stack_flush): New function.
1249 (s390_emit_zero_ext): New function.
1250 (s390_emit_swap): New function.
1251 (s390_emit_stack_adjust): New function.
1252 (s390_emit_set_r2): New function.
1253 (s390_emit_int_call_1): New function.
1254 (s390_emit_void_call_2): New function.
1255 (s390_emit_eq_goto): New function.
1256 (s390_emit_ne_goto): New function.
1257 (s390_emit_lt_goto): New function.
1258 (s390_emit_le_goto): New function.
1259 (s390_emit_gt_goto): New function.
1260 (s390_emit_ge_goto): New function.
1261 (s390x_emit_prologue): New function.
1262 (s390x_emit_epilogue): New function.
1263 (s390x_emit_add): New function.
1264 (s390x_emit_sub): New function.
1265 (s390x_emit_mul): New function.
1266 (s390x_emit_lsh): New function.
1267 (s390x_emit_rsh_signed): New function.
1268 (s390x_emit_rsh_unsigned): New function.
1269 (s390x_emit_ext): New function.
1270 (s390x_emit_log_not): New function.
1271 (s390x_emit_bit_and): New function.
1272 (s390x_emit_bit_or): New function.
1273 (s390x_emit_bit_xor): New function.
1274 (s390x_emit_bit_not): New function.
1275 (s390x_emit_equal): New function.
1276 (s390x_emit_less_signed): New function.
1277 (s390x_emit_less_unsigned): New function.
1278 (s390x_emit_ref): New function.
1279 (s390x_emit_if_goto): New function.
1280 (s390x_emit_const): New function.
1281 (s390x_emit_call): New function.
1282 (s390x_emit_reg): New function.
1283 (s390x_emit_pop): New function.
1284 (s390x_emit_stack_flush): New function.
1285 (s390x_emit_zero_ext): New function.
1286 (s390x_emit_swap): New function.
1287 (s390x_emit_stack_adjust): New function.
1288 (s390x_emit_int_call_1): New function.
1289 (s390x_emit_void_call_2): New function.
1290 (s390x_emit_eq_goto): New function.
1291 (s390x_emit_ne_goto): New function.
1292 (s390x_emit_lt_goto): New function.
1293 (s390x_emit_le_goto): New function.
1294 (s390x_emit_gt_goto): New function.
1295 (s390x_emit_ge_goto): New function.
1296 (s390_emit_ops): New function.
1297 (struct linux_target_ops): Fill in emit_ops hook.
1298
1299 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1300
1301 PR 18377
1302 * Makefile.in: Add s390 IPA files.
1303 * configure.srv: Build IPA for s390.
1304 * linux-s390-ipa.c: New file.
1305 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1306 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1307 (tdesc_s390_linux32): Likewise.
1308 (init_registers_s390_linux32v1): Likewise.
1309 (tdesc_s390_linux32v1): Likewise.
1310 (init_registers_s390_linux32v2): Likewise.
1311 (tdesc_s390_linux32v2): Likewise.
1312 (init_registers_s390_linux64): Likewise.
1313 (tdesc_s390_linux64): Likewise.
1314 (init_registers_s390_linux64v1): Likewise.
1315 (tdesc_s390_linux64v1): Likewise.
1316 (init_registers_s390_linux64v2): Likewise.
1317 (tdesc_s390_linux64v2): Likewise.
1318 (init_registers_s390_te_linux64): Likewise.
1319 (tdesc_s390_te_linux64): Likewise.
1320 (init_registers_s390_vx_linux64): Likewise.
1321 (tdesc_s390_vx_linux64): Likewise.
1322 (init_registers_s390_tevx_linux64): Likewise.
1323 (tdesc_s390_tevx_linux64): Likewise.
1324 (init_registers_s390x_linux64): Likewise.
1325 (tdesc_s390x_linux64): Likewise.
1326 (init_registers_s390x_linux64v1): Likewise.
1327 (tdesc_s390x_linux64v1): Likewise.
1328 (init_registers_s390x_linux64v2): Likewise.
1329 (tdesc_s390x_linux64v2): Likewise.
1330 (init_registers_s390x_te_linux64): Likewise.
1331 (tdesc_s390x_te_linux64): Likewise.
1332 (init_registers_s390x_vx_linux64): Likewise.
1333 (tdesc_s390x_vx_linux64): Likewise.
1334 (init_registers_s390x_tevx_linux64): Likewise.
1335 (tdesc_s390x_tevx_linux64): Likewise.
1336 (have_hwcap_s390_vx): New static variable.
1337 (s390_arch_setup): Fill have_hwcap_s390_vx.
1338 (s390_get_thread_area): New function.
1339 (s390_ft_entry_gpr_esa): New const.
1340 (s390_ft_entry_gpr_zarch): New const.
1341 (s390_ft_entry_misc): New const.
1342 (s390_ft_entry_fr): New const.
1343 (s390_ft_entry_vr): New const.
1344 (s390_ft_main_31): New const.
1345 (s390_ft_main_64): New const.
1346 (s390_ft_exit_fr): New const.
1347 (s390_ft_exit_vr): New const.
1348 (s390_ft_exit_misc): New const.
1349 (s390_ft_exit_gpr_esa): New const.
1350 (s390_ft_exit_gpr_zarch): New const.
1351 (append_insns): New function.
1352 (s390_relocate_instruction): New function.
1353 (s390_install_fast_tracepoint_jump_pad): New function.
1354 (s390_get_min_fast_tracepoint_insn_len): New function.
1355 (s390_get_ipa_tdesc_idx): New function.
1356 (struct linux_target_ops): Wire in the above functions.
1357 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1358 * linux-s390-tdesc.h: New file.
1359
1360 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1361
1362 * linux-s390-low.c (s390_supports_tracepoints): New function.
1363 (struct linux_target_ops): Fill supports_tracepoints hook.
1364
1365 2016-03-18 Yao Qi <yao.qi@linaro.org>
1366
1367 * linux-low.c (lwp_signal_can_be_delivered): New function.
1368 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1369
1370 2016-03-18 Yao Qi <yao.qi@linaro.org>
1371
1372 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1373 0 if signal is enqueued. Remove 'signal' from one debugging
1374 message. Move one debugging message to some lines below.
1375 Remove code setting 'signal' to 0.
1376
1377 2016-03-18 Yao Qi <yao.qi@linaro.org>
1378
1379 * linux-low.c (linux_low_filter_event): Remove redundant
1380 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1381
1382 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1383
1384 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1385 (struct linux_target_ops): Wire in the above.
1386
1387 2016-03-03 Yao Qi <yao.qi@linaro.org>
1388
1389 * linux-low.c: Update comments to start_step_over.
1390
1391 2016-03-03 Yao Qi <yao.qi@linaro.org>
1392
1393 PR server/19736
1394 * linux-low.c (handle_extended_wait): Set child suspended
1395 if event_lwp->bp_reinsert isn't zero.
1396
1397 2016-03-02 Yao Qi <yao.qi@linaro.org>
1398
1399 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1400 enqueue_pending_signal.
1401
1402 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1403
1404 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1405 is actually loaded.
1406
1407 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1408
1409 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1410 (s390_regmap_3264) [!__s390x__]: New global.
1411 (s390_collect_ptrace_register): Skip map entries containing -1.
1412 (s390_supply_ptrace_register): Ditto.
1413 (s390_fill_gprs_high): New function.
1414 (s390_store_gprs_high): New function.
1415 (s390_regsets): Add NT_S390_HIGH_GPRS.
1416 (s390_get_hwcap): Enable on 31-bit.
1417 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1418 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1419 Detect NT_S390_HIGH_GPRS.
1420 (s390_usrregs_info_3264): Enable on 31-bit.
1421 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1422 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1423
1424 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1425
1426 PR gdb/13808
1427 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1428 * configure.srv: Ditto.
1429 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1430 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1431 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1432 (init_registers_amd64_linux): Remove prototype.
1433 (tdesc_amd64_linux): Remove declaration.
1434 (get_ipa_tdesc): New function.
1435 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1436 initialize remaining tdescs.
1437 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1438 (init_registers_i386_linux): Remove prototype.
1439 (tdesc_i386_linux): Remove declaration.
1440 (get_ipa_tdesc): New function.
1441 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1442 initialize remaining tdescs.
1443 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1444 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1445 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1446 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1447 (x86_get_ipa_tdesc_idx): New function.
1448 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1449 * linux-x86-tdesc.h: New file.
1450 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1451 (target_get_ipa_tdesc_idx): New macro.
1452 * tracepoint.c (ipa_tdesc_idx): New macro.
1453 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1454 (symbol_list): Add ipa_tdesc_idx.
1455 (cmd_qtstart): Write ipa_tdesc_idx in the target.
1456 (ipa_tdesc): Remove.
1457 (ipa_tdesc_idx): New variable.
1458 (get_context_regcache): Use get_ipa_tdesc.
1459 (gdb_collect): Ditto.
1460 (gdb_probe): Ditto.
1461 * tracepoint.h (get_ipa_tdesc): New prototype.
1462 (ipa_tdesc): Remove.
1463
1464 2016-02-24 Pedro Alves <palves@redhat.com>
1465
1466 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
1467 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
1468 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
1469 Factor out common code between the USE_SIGTRAP_SIGINFO and
1470 !USE_SIGTRAP_SIGINFO blocks.
1471 (linux_low_filter_event): Call save_stop_reason instead of
1472 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
1473 Update comments.
1474 (linux_wait_1): Update comments.
1475
1476 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
1477
1478 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
1479 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
1480 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
1481 ppc_insert_point, ppc_remove_point.
1482
1483 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
1484
1485 * linux-s390-low.c (s390_supports_z_point_type): New function.
1486 (struct linux_target_ops): Wire s390_supports_z_point_type in.
1487
1488 2016-02-16 Yao Qi <yao.qi@linaro.org>
1489
1490 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
1491 PC. Get pc from regcache_read_pc.
1492
1493 2016-02-12 Yao Qi <yao.qi@linaro.org>
1494
1495 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
1496 or linux_get_pc_32bit.
1497 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
1498
1499 2016-02-12 Yao Qi <yao.qi@linaro.org>
1500
1501 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
1502 arm_linux_get_next_pcs_fixup.
1503
1504 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
1505
1506 * tracepoint.c (x_tracepoint_action_download): Change
1507 write_inferior_data_ptr to write_inferior_data_pointer.
1508 (cmd_qtstart): Likewise.
1509 (write_inferior_data_ptr): Remove.
1510 (download_agent_expr): Change write_inferior_data_ptr to
1511 write_inferior_data_pointer.
1512 (download_tracepoint_1): Likewise.
1513 (download_tracepoint): Likewise.
1514 (download_trace_state_variables): Likewise.
1515
1516 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
1517 Marcin Kościelnicki <koriakin@0x04.net>
1518
1519 * tracepoint.c (struct tracepoint_action_ops): Remove.
1520 (struct tracepoint_action): Remove ops.
1521 (m_tracepoint_action_download, r_tracepoint_action_download)
1522 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
1523 size and offset accordingly.
1524 (m_tracepoint_action_ops, r_tracepoint_action_ops)
1525 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
1526 (tracepoint_action_send, tracepoint_action_download): New functions.
1527 Helpers for trace action handlers.
1528 (add_tracepoint_action): Remove setup actions ops.
1529 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
1530
1531 2016-02-10 Yao Qi <yao.qi@linaro.org>
1532
1533 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
1534
1535 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1536
1537 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
1538 to AC_OUTPUT.
1539 * configure: Regenerate.
1540
1541 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1542
1543 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
1544 void * to gdb_byte *.
1545 * linux-low.c (siginfo_fixup): Likewise.
1546 (linux_xfer_siginfo): Likewise.
1547 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
1548 Likewise.
1549 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1550
1551 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
1552
1553 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
1554 to srv_tgtobj.
1555 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
1556 to srv_tgtobj.
1557 * linux-x86-low.c [__x86_64__]: Include
1558 "nat/amd64-linux-siginfo.h".
1559 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
1560 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
1561 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
1562 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
1563 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
1564 (cpt_si_fd, si_timerid, si_overrun): Move from
1565 nat/amd64-linux-siginfo.c.
1566 * Makefile.in (amd64-linux-siginfo.o:): New rule.
1567
1568 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
1569
1570 * server.c (skip_to_semicolon): Remove.
1571 (process_point_options): Use strchrnul instead of
1572 skip_to_semicolon.
1573
1574 2016-01-26 Yao Qi <yao.qi@linaro.org>
1575
1576 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
1577 * linux-low.c (install_software_single_step_breakpoints): Don't
1578 call regcache_read_pc.
1579 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
1580 argument pc.
1581
1582 2016-01-26 Yao Qi <yao.qi@linaro.org>
1583
1584 * linux-low.c (install_software_single_step_breakpoints): Call
1585 regcache_read_pc instead of get_pc.
1586
1587 2016-01-26 Yao Qi <yao.qi@linaro.org>
1588
1589 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
1590 (unblock_async_io): Rename to ...
1591 (block_unblock_async_io): ... it. New function.
1592 (enable_async_io): Don't install SIGIO handler. Unblock it
1593 instead.
1594 (disable_async_io): Don't ignore SIGIO. Block it instead.
1595 (initialize_async_io): Install SIGIO handler. Don't call
1596 unblock_async_io.
1597
1598 2016-01-26 Yao Qi <yao.qi@linaro.org>
1599
1600 * remote-utils.c (getpkt): If the buffer isn't empty, and the
1601 first character is '\003', call *the_target->request_interrupt.
1602
1603 2016-01-25 Yao Qi <yao.qi@linaro.org>
1604
1605 * remote-utils.c (new_thread_notify): Remove.
1606 (dead_thread_notify): Likewise.
1607 * remote-utils.h (new_thread_notify): Remove declaration.
1608 (dead_thread_notify): Likewise.
1609
1610 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
1611
1612 * gdb.trace/pending.exp: Fix expected message on continue.
1613
1614 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
1615
1616 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
1617 it works properly on big-endian machines where sizeof (CORE_ADDR)
1618 != sizeof (void *).
1619
1620 2016-01-21 Pedro Alves <palves@redhat.com>
1621
1622 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
1623 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
1624 * configure: Regenerate.
1625
1626 2016-01-21 Yao Qi <yao.qi@linaro.org>
1627
1628 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
1629 is_thumb and set it according to CPSR saved on the stack.
1630 (get_next_pcs_syscall_next_pc): Pass is_thumb to
1631 arm_sigreturn_next_pc.
1632
1633 2016-01-18 Yao Qi <yao.qi@linaro.org>
1634
1635 * linux-low.c (linux_set_pc_64bit): New function.
1636 (linux_get_pc_64bit): New function.
1637 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
1638 Declare.
1639 * linux-sparc-low.c (debug_threads): Remove declaration.
1640 (sparc_get_pc): Remove.
1641 (the_low_target): Use linux_get_pc_64bit instead of
1642 sparc_get_pc.
1643 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
1644 (the_low_target): Use linux_get_pc_64bit and
1645 linux_set_pc_64bit.
1646
1647 2016-01-18 Yao Qi <yao.qi@linaro.org>
1648
1649 * linux-arm-low.c (debug_threads): Remove declaration.
1650 (arm_get_pc, arm_set_pc): Remove.
1651 (the_low_target): Use linux_get_pc_32bit and
1652 linux_set_pc_32bit.
1653 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
1654 (the_low_target): Use linux_get_pc_32bit and
1655 linux_set_pc_32bit.
1656 * linux-cris-low.c (debug_threads): Remove declaration.
1657 (cris_get_pc, cris_set_pc,): Remove.
1658 (the_low_target): Use linux_get_pc_32bit and
1659 linux_set_pc_32bit.
1660 * linux-crisv32-low.c (debug_threads): Remove declaration.
1661 (cris_get_pc, cris_set_pc): Remove.
1662 (the_low_target): Use linux_get_pc_32bit and
1663 linux_set_pc_32bit.
1664 * linux-low.c: Include inttypes.h.
1665 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
1666 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
1667 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
1668 (the_low_target): Use linux_get_pc_32bit and
1669 linux_set_pc_32bit.
1670 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
1671 (the_low_target): Use linux_get_pc_32bit and
1672 linux_set_pc_32bit.
1673 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
1674 (the_low_target): Use linux_get_pc_32bit and
1675 linux_set_pc_32bit.
1676 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
1677 (the_low_target): Use linux_get_pc_32bit and
1678 linux_set_pc_32bit.
1679 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
1680 (the_low_target): Use linux_get_pc_32bit and
1681 linux_set_pc_32bit.
1682
1683 2016-01-18 Gary Benson <gbenson@redhat.com>
1684
1685 * configure.ac (AC_FUNC_FORK): New check.
1686 * config.in: Regenerate.
1687 * configure: Likewise.
1688
1689 2016-01-14 Yao Qi <yao.qi@linaro.org>
1690
1691 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
1692 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
1693 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
1694 arm_get_next_pcs_ctor.
1695
1696 2016-01-12 Josh Stone <jistone@redhat.com>
1697 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1698
1699 * inferiors.h: Include "gdb_vecs.h".
1700 (struct process_info): Add syscalls_to_catch.
1701 * inferiors.c (remove_process): Free syscalls_to_catch.
1702 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
1703 syscall_return stops.
1704 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
1705 * server.c (handle_general_set): Handle QCatchSyscalls.
1706 (handle_query): Report support for QCatchSyscalls.
1707 * target.h (struct target_ops): Add supports_catch_syscall.
1708 (target_supports_catch_syscall): New macro.
1709 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
1710 (struct lwp_info): Add syscall_state.
1711 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
1712 Maintain syscall_state and syscalls_to_catch across exec.
1713 (get_syscall_trapinfo): New function, proxy to the_low_target.
1714 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
1715 (linux_low_filter_event): Toggle syscall_state entry/return for
1716 syscall traps, and set it ignored for all others.
1717 (gdb_catching_syscalls_p): New function.
1718 (gdb_catch_this_syscall_p): New function.
1719 (linux_wait_1): Handle SYSCALL_SIGTRAP.
1720 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
1721 (linux_supports_catch_syscall): New function.
1722 (linux_target_ops): Install it.
1723 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
1724 (the_low_target): Install it.
1725
1726 2016-01-12 Mike Frysinger <vapier@gentoo.org>
1727
1728 * acinclude.m4: Include new ../warning.m4 file.
1729 * configure: Regenerated.
1730 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
1731
1732 2016-01-12 Mike Frysinger <vapier@gentoo.org>
1733
1734 * ax.c (is_goto_target): Mark static.
1735 * linux-low.c (register_addr): Likewise.
1736 (linux_fetch_registers, linux_store_registers): Likewise.
1737 * mem-break.c (any_persistent_commands): Fix old prototype.
1738 (add_commands_to_breakpoint): Mark static.
1739 * regcache.c (find_register_by_name): Delete unused func.
1740 * remote-utils.c (hex_or_minus_one): Mark static.
1741 * server.c (monitor_show_help): Mark static.
1742 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
1743 handle_v_requests): Likewise.
1744
1745 2016-01-12 Pedro Alves <palves@redhat.com>
1746
1747 Remove use of the registered trademark symbol throughout.
1748
1749 2016-01-08 Yao Qi <yao.qi@linaro.org>
1750
1751 * remote-utils.c (getpkt): If c is '\003', call target hook
1752 request_interrupt.
1753
1754 2016-01-06 Yao Qi <yao.qi@linaro.org>
1755
1756 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
1757 linux-aarch32-low.c.
1758 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1759 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1760 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1761 (thumb2_breakpoint): Declare.
1762 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
1763 linux-aarch32-low.h.
1764 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1765 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1766 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1767
1768 2016-01-01 Joel Brobecker <brobecker@adacore.com>
1769
1770 * gdbreplay.c (gdbreplay_version): Change copyright year in
1771 version message.
1772 * server.c (gdbserver_version): Likewise.
1773
1774 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
1775
1776 * server.c (crc32_table): Delete.
1777 (crc32): Use libiberty's xcrc32 function.
1778
1779 2015-12-22 Joel Brobecker <brobecker@adacore.com>
1780
1781 * lynx-low.c (lynx_delete_thread_callback): New function.
1782 (lynx_mourn): Properly delete our process and all of its
1783 threads. Remove call to clear_inferiors.
1784
1785 2015-12-22 Joel Brobecker <brobecker@adacore.com>
1786
1787 * target.c (thread_search_callback): Add check that
1788 the thread_stopped target callback is not NULL before
1789 calling it.
1790
1791 2015-12-21 Yao Qi <yao.qi@linaro.org>
1792
1793 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
1794 arm breakpoint.
1795
1796 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1797
1798 * server.c (handle_query): Call target_supports_software_single_step.
1799
1800 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1801
1802 * linux-low.c (single_step): New function.
1803 (linux_resume_one_lwp_throw): Call single_step.
1804 (start_step_over): Likewise.
1805
1806 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1807
1808 * Makefile.in (SFILES): Append arch/arm-linux.c,
1809 arch/arm-get-next-pcs.c.
1810 (arm-linux.o): New rule.
1811 (arm-get-next-pcs.o): New rule.
1812 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
1813 arm-linux.o.
1814 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
1815 to linux-aarch32-low.c.
1816 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1817 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1818 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1819 (thumb2_breakpoint_len): Likewise.
1820 (arm_is_thumb_mode): Make non-static.
1821 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
1822 from linux-aarch32-low.c.
1823 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1824 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1825 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1826 (thumb2_breakpoint_len): Likewise.
1827 (arm_is_thumb_mode): New declaration.
1828 * linux-arm-low.c: Include arch/arm-linux.h
1829 aarch/arm-get-next-pcs.h, sys/syscall.h.
1830 (get_next_pcs_ops): New struct.
1831 (get_next_pcs_addr_bits_remove): New function.
1832 (get_next_pcs_is_thumb): New function.
1833 (get_next_pcs_read_memory_unsigned_integer): Likewise.
1834 (arm_sigreturn_next_pc): Likewise.
1835 (get_next_pcs_syscall_next_pc): Likewise.
1836 (arm_gdbserver_get_next_pcs): Likewise.
1837 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
1838 Initialize.
1839 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
1840 * server.h: Include gdb_vecs.h.
1841
1842 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1843
1844 * Makefile.in (SFILES): Append common/common-regcache.c.
1845 (OBS): Append common-regcache.o.
1846 (common-regcache.o): New rule.
1847 * regcache.c (init_register_cache): Initialize cache to
1848 REG_UNAVAILABLE.
1849 (regcache_raw_read_unsigned): New function.
1850 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
1851 register_status enum.
1852
1853 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1854
1855 * linux-aarch64-low.c (the_low_targets): Rename
1856 breakpoint_reinsert_addr to get_next_pcs.
1857 * linux-arm-low.c (the_low_targets): Likewise.
1858 * linux-bfin-low.c (the_low_targets): Likewise.
1859 * linux-cris-low.c (the_low_targets): Likewise.
1860 * linux-crisv32-low.c (the_low_targets): Likewise.
1861 * linux-low.c (can_software_single_step): Likewise.
1862 (install_software_single_step_breakpoints): New function.
1863 (start_step_over): Use install_software_single_step_breakpoints.
1864 * linux-low.h: New CORE_ADDR vector.
1865 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
1866 get_next_pcs.
1867 * linux-mips-low.c (the_low_targets): Likewise.
1868 * linux-nios2-low.c (the_low_targets): Likewise.
1869 * linux-sparc-low.c (the_low_targets): Likewise.
1870
1871 2015-12-17 Pedro Alves <palves@redhat.com>
1872
1873 * linux-low.c (linux_kill_one_lwp): Remove references to
1874 LinuxThreads.
1875 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
1876 to 'kill'.
1877 (linux_init_signals): Delete.
1878 (initialize_low): Adjust.
1879 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
1880
1881 2015-12-16 Pedro Alves <palves@redhat.com>
1882
1883 * configure.ac (compiler warning flags): When testing a
1884 -Wno-foo option, check whether -Wfoo works instead.
1885 * configure: Regenerate.
1886
1887 2015-12-11 Don Breazeal <donb@codesourcery.com>
1888
1889 * server.c (process_serial_event): Don't exit from gdbserver
1890 in remote mode if there are still active inferiors.
1891
1892 2015-12-11 Yao Qi <yao.qi@linaro.org>
1893
1894 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
1895 arm_breakpoint_at if the process is 32-bit.
1896
1897 2015-12-11 Yao Qi <yao.qi@linaro.org>
1898
1899 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
1900 arm breakpoint.
1901
1902 2015-12-07 Yao Qi <yao.qi@linaro.org>
1903
1904 * configure.srv: Append arm.o to srv_tgtobj for
1905 aarch64*-*-linux* target.
1906 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
1907 from linux-arm-low.c.
1908 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1909 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1910 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1911 (thumb2_breakpoint_len): Likewise.
1912 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
1913 (arm_breakpoint_kinds): Likewise.
1914 (arm_breakpoint_kind_from_pc): Likewise.
1915 (arm_sw_breakpoint_from_kind): Likewise.
1916 (arm_breakpoint_kind_from_current_state): Likewise.
1917 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
1918 (arm_sw_breakpoint_from_kind): Declare.
1919 (arm_breakpoint_kind_from_current_state): Declare.
1920 (arm_breakpoint_at): Declare.
1921 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
1922 arm_sw_breakpoint_from_kind if process is 32-bit.
1923 (aarch64_breakpoint_kind_from_pc): New function.
1924 (aarch64_breakpoint_kind_from_current_state): New function.
1925 (the_low_target): Initialize fields breakpoint_kind_from_pc
1926 and breakpoint_kind_from_current_state.
1927 * linux-arm-low.c (arm_breakpoint_kinds): Move to
1928 linux-aarch32-low.c.
1929 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
1930 (arm_breakpoint, arm_breakpoint_len): Likewise.
1931 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
1932 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1933 (arm_is_thumb_mode): Likewise.
1934 (arm_breakpoint_at): Likewise.
1935 (arm_breakpoint_kind_from_pc): Likewise.
1936 (arm_sw_breakpoint_from_kind): Likewise.
1937 (arm_breakpoint_kind_from_current_state): Likewise.
1938
1939 Revert:
1940 2015-08-04 Yao Qi <yao.qi@linaro.org>
1941
1942 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1943 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1944 * server.c (extended_protocol): Remove "static".
1945 * server.h (extended_protocol): Declare it.
1946
1947 2015-12-04 Josh Stone <jistone@redhat.com>
1948
1949 * target.h (struct target_ops) <arch_setup>: Rename to ...
1950 (struct target_ops) <post_create_inferior>: ... this.
1951 (target_arch_setup): Rename to ...
1952 (target_post_create_inferior): ... this, calling post_create_inferior.
1953 * server.c (start_inferior): Update target_arch_setup calls to
1954 target_post_create_inferior.
1955 * linux-low.c (linux_low_ptrace_options): Forward declare.
1956 (linux_arch_setup): Update its comment for general use.
1957 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
1958 (struct linux_target_ops): Use linux_post_create_inferior.
1959 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
1960 to post_create_inferior.
1961 * nto-low.c (struct nto_target_ops): Likewise.
1962 * spu-low.c (struct spu_target_ops): Likewise.
1963 * win32-low.c (struct win32_target_ops): Likewise.
1964
1965 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
1966
1967 * linux-arm-low.c: Remove duplicate arch/arm.h include.
1968
1969 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1970
1971 * linux-arm-low.c (arm_reinsert_addr): Remove function.
1972 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
1973 * linux-cris-low.c (cris_reinsert_addr> Remove function.
1974 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1975 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
1976 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1977 * linux-mips-low.c (mips_reinsert_addr): Remove function.
1978 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1979 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
1980 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1981 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
1982 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1983
1984 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1985
1986 * linux-low.c (linux_look_up_symbols): Don't call
1987 linux_supports_traceclone.
1988 * linux-low.h (thread_db_init): Remove use_events argument.
1989 * thread-db.c (thread_db_use_event): Remove global variable.
1990 (struct thread_db) <td_thr_event_enable_p>: Remove field.
1991 (struct thread_db) <td_create_bp>: Remove field.
1992 (thread_db_create_event): Remove function.
1993 (thread_db_enable_reporting): Likewise.
1994 (find_one_thread): Don't check for thread_db_use_events.
1995 (attach_thread): Likewise.
1996 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
1997 (try_thread_db_load_1): Don't check for thread_db_use_events.
1998 (thread_db_init): Remove use_events argument and thread events
1999 handling.
2000 (remove_thread_event_breakpoints): Remove function.
2001 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2002
2003 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2004
2005 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2006 New function.
2007 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2008 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2009 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2010 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2011 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2012 Initialize.
2013 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2014 New function.
2015 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2016 * linux-low.c (can_hardware_single_step): Use
2017 supports_hardware_single_step.
2018 (can_software_single_step): New function.
2019 (start_step_over): Call can_software_single_step.
2020 (linux_supports_hardware_single_step): New function.
2021 (struct target_ops) <supports_software_single_step>: Initialize.
2022 * linux-low.h (struct linux_target_ops)
2023 <supports_hardware_single_step>: Initialize.
2024 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2025 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2026 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2027 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2028 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2029 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2030 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2031 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2032 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2033 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2034 Initialize.
2035 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2036 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2037 Initialize.
2038 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2039 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2040 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2041 New function.
2042 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2043 * target.h (struct target_ops): <supports_software_single_step>:
2044 New field.
2045 (target_supports_software_single_step): New macro.
2046
2047 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2048
2049 * linux-low.c (linux_wait_1): Fix pc advance condition.
2050 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2051 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2052
2053 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2054
2055 * linux-arm-low.c (arm_is_thumb_mode): New function.
2056 (arm_breakpoint_at): Use arm_is_thumb_mode.
2057 (arm_breakpoint_kind_from_current_state): New function.
2058 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2059 Initialize.
2060 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2061 (linux_breakpoint_kind_from_current_state): New function.
2062 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2063 * linux-low.h (struct linux_target_ops)
2064 <breakpoint_kind_from_current_state>: New field.
2065 * target.h (struct target_ops): Likewise.
2066 (target_breakpoint_kind_from_current_state): New macro.
2067
2068 2015-11-30 Pedro Alves <palves@redhat.com>
2069
2070 * linux-low.c (linux_resume): Wake up the event loop before
2071 returning.
2072
2073 2015-11-30 Pedro Alves <palves@redhat.com>
2074
2075 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2076 check.
2077 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2078 to -1.
2079 * target.c (struct thread_search): New structure.
2080 (thread_search_callback): New function.
2081 (prev_general_thread): New global.
2082 (prepare_to_access_memory, done_accessing_memory): New functions.
2083 * target.h (prepare_to_access_memory, done_accessing_memory):
2084 Replace macros with function declarations.
2085
2086 2015-11-30 Pedro Alves <palves@redhat.com>
2087
2088 PR 14618
2089 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2090 report TARGET_WAITKIND_NO_RESUMED.
2091 * remote-utils.c (prepare_resume_reply): Handle
2092 TARGET_WAITKIND_NO_RESUMED.
2093 * server.c (report_no_resumed): New global.
2094 (handle_query) <qSupported>: Handle "no-resumed+". Report
2095 "no-resumed+" support.
2096 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2097 return error if the client doesn't support no-resumed events.
2098 (push_stop_notification): New function.
2099 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2100 events if the client supports them.
2101
2102 2015-11-30 Pedro Alves <palves@redhat.com>
2103
2104 * linux-low.c (thread_still_has_status_pending_p): Don't check
2105 vCont;t here.
2106 (lwp_resumed): New function.
2107 (status_pending_p_callback): Return early if the LWP is not
2108 supposed to be resumed.
2109
2110 2015-11-30 Pedro Alves <palves@redhat.com>
2111
2112 * linux-low.c (handle_extended_wait): Assert that the LWP's
2113 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2114 thread create events, leave the new child's status pending.
2115 (linux_low_filter_event): If GDB wants to hear about thread exit
2116 events, leave the LWP marked dead and don't delete it.
2117 (linux_wait_for_event_filtered): Don't check for thread exit.
2118 (filter_exit_event): New function.
2119 (linux_wait_1): Use it, when returning an exit event.
2120 (linux_resume_one_lwp_throw): Assert that the LWP's
2121 waitstatus is TARGET_WAITKIND_IGNORE.
2122 * remote-utils.c (prepare_resume_reply): Handle
2123 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2124 * server.c (report_thread_events): New global.
2125 (handle_general_set): Handle QThreadEvents.
2126 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2127 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2128 TARGET_WAITKIND_THREAD_EXITED.
2129 * server.h (report_thread_events): Declare.
2130
2131 2015-11-30 Pedro Alves <palves@redhat.com>
2132
2133 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2134 the thread's last_resume_kind was resume_stop.
2135
2136 2015-11-30 Pedro Alves <palves@redhat.com>
2137
2138 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2139 before returning.
2140
2141 2015-11-30 Pedro Alves <palves@redhat.com>
2142
2143 * server.c (handle_v_requests): Handle vCtrlC.
2144
2145 2015-11-30 Pedro Alves <palves@redhat.com>
2146
2147 * gdbthread.h (find_any_thread_of_pid): Declare.
2148 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2149 functions.
2150 * server.c (handle_query): If current_thread is NULL, look for
2151 another thread of the selected process.
2152
2153 2015-11-26 Daniel Colascione <dancol@dancol.org>
2154 Simon Marchi <simon.marchi@ericsson.com>
2155
2156 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2157 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2158 name in reply.
2159 * target.h (struct target_ops) <thread_name>: New field.
2160 (target_thread_name): New macro.
2161
2162 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2163
2164 * regcache.h (regcache_invalidate_pid): Add declaration.
2165 * regcache.c (regcache_invalidate_pid): New function, extracted
2166 from regcache_invalidate.
2167 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2168 Add trivial documentation comment.
2169 * lynx-low.c: Use regcache_invalidate_pid instead of
2170 regcache_invalidate.
2171
2172 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2173
2174 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2175 and Elf64_auxv_t if the target is Android.
2176
2177 2015-11-22 Doug Evans <xdje42@gmail.com>
2178
2179 * target.h: #include <sys/types.h>.
2180
2181 2015-11-19 Pedro Alves <palves@redhat.com>
2182
2183 * linux-low.c (linux_process_qsupported): Change prototype.
2184 Adjust.
2185 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2186 Change prototype.
2187 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2188 and adjust to loop over all features.
2189 * server.c (handle_query) <qSupported>: Adjust to call
2190 target_process_qsupported once, passing it a vector of unprocessed
2191 features.
2192 * target.h (struct target_ops) <process_qsupported>: Change
2193 prototype.
2194 (target_process_qsupported): Adjust.
2195
2196 2015-11-19 Pedro Alves <palves@redhat.com>
2197
2198 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2199 mode.
2200 * configure: Regenerate.
2201
2202 2015-11-19 Pedro Alves <palves@redhat.com>
2203
2204 * configure: Regenerate.
2205
2206 2015-11-19 Yao Qi <yao.qi@linaro.org>
2207
2208 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2209 type to uint32_t.
2210
2211 2015-11-19 Yao Qi <yao.qi@linaro.org>
2212
2213 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2214 (struct aarch64_operand): Move enum out.
2215
2216 2015-11-19 Yao Qi <yao.qi@linaro.org>
2217
2218 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2219 struct user_fpsimd_state *.
2220 (aarch64_store_fpregset): Likewise.
2221
2222 2015-11-19 Yao Qi <yao.qi@linaro.org>
2223
2224 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2225 struct user_pt_regs *.
2226 (aarch64_store_gregset): Likewise.
2227
2228 2015-11-18 Pedro Alves <palves@redhat.com>
2229
2230 * Makefile.in (all_object_files): Add $IPA_OBJS.
2231
2232 2015-11-17 Pedro Alves <palves@redhat.com>
2233
2234 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2235 GDB_SIGNAL_0 and gdb_signal_to_string.
2236
2237 2015-11-17 Pedro Alves <palves@redhat.com>
2238
2239 * win32-low.c (handle_output_debug_string): Remove parameter.
2240 (win32_kill): Remove our_status local and adjust call to
2241 handle_output_debug_string.
2242 (get_child_debug_event): Adjust call to
2243 handle_output_debug_string.
2244
2245 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2246
2247 * linux-mips-low.c (mips_fill_gregset): Add cast.
2248 (mips_store_gregset): Likewise.
2249 (mips_fill_fpregset): Likewise.
2250 (mips_store_fpregset): Likewise.
2251
2252 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2253
2254 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2255 priv.
2256
2257 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2258
2259 * linux-mips-low.c (mips_linux_new_thread): Change type of
2260 watch_type to enum target_hw_bp_type.
2261
2262 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2263
2264 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2265 Change return type to arm_hwbp_type.
2266
2267 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2268
2269 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2270 (arm_store_gregset): Likewise.
2271 * linux-arm-low.c (arm_get_hwcap): Likewise.
2272 (arm_read_description): Likewise.
2273
2274 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2275
2276 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2277
2278 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2279
2280 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2281 (ppc_fill_vsxregset): Likewise.
2282 (ppc_store_vsxregset): Likewise.
2283 (ppc_fill_vrregset): Likewise.
2284 (ppc_store_vrregset): Likewise.
2285 (ppc_fill_evrregset): Likewise.
2286 (ppc_store_evrregset): Likewise.
2287
2288 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2289
2290 * linux-ppc-low.c (ppc_usrregs_info): Remove
2291 forward-declaration.
2292 (ppc_arch_setup): Move lower in file.
2293
2294 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2295
2296 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2297 (ps_pdwrite): Likewise.
2298
2299 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2300
2301 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2302 to after assert checks.
2303
2304 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2305
2306 * proc-service.c (ps_pdread): Add/adjust casts.
2307 (ps_pdwrite): Add/adjust casts.
2308
2309 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2310
2311 * server.c (handle_search_memory_1): Cast return value of
2312 memmem.
2313
2314 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2315
2316 * server.c (write_qxfer_response): Change type of data to
2317 gdb_byte *.
2318
2319 2015-10-29 Pedro Alves <palves@redhat.com>
2320
2321 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2322
2323 2015-10-29 Pedro Alves <palves@redhat.com>
2324
2325 * tracepoint.c (clear_installed_tracepoints): Add casts.
2326
2327 2015-10-29 Pedro Alves <palves@redhat.com>
2328
2329 * server.c (handle_v_cont, process_serial_event): Add enum
2330 gdb_signal casts to signal parsing code.
2331
2332 2015-10-29 Pedro Alves <palves@redhat.com>
2333
2334 * linux-low.h (NULL_REGSET): Define.
2335 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2336 * linux-arm-low.c (arm_regsets): Likewise.
2337 * linux-crisv32-low.c (cris_regsets): Likewise.
2338 * linux-m68k-low.c (m68k_regsets): Likewise.
2339 * linux-mips-low.c (mips_regsets): Likewise.
2340 * linux-nios2-low.c (nios2_regsets): Likewise.
2341 * linux-ppc-low.c (ppc_regsets): Likewise.
2342 * linux-s390-low.c (s390_regsets): Likewise.
2343 * linux-sh-low.c (sh_regsets): Likewise.
2344 * linux-sparc-low.c (sparc_regsets): Likewise.
2345 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2346 * linux-tile-low.c (tile_regsets): Likewise.
2347 * linux-x86-low.c (x86_regsets): Likewise.
2348 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2349
2350 2015-10-29 Pedro Alves <palves@redhat.com>
2351
2352 * linux-low.h (NULL_REGSET): Define.
2353 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2354 * linux-arm-low.c (arm_regsets): Likewise.
2355 * linux-crisv32-low.c (cris_regsets): Likewise.
2356 * linux-m68k-low.c (m68k_regsets): Likewise.
2357 * linux-mips-low.c (mips_regsets): Likewise.
2358 * linux-nios2-low.c (nios2_regsets): Likewise.
2359 * linux-ppc-low.c (ppc_regsets): Likewise.
2360 * linux-s390-low.c (s390_regsets): Likewise.
2361 * linux-sh-low.c (sh_regsets): Likewise.
2362 * linux-sparc-low.c (sparc_regsets): Likewise.
2363 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2364 * linux-tile-low.c (tile_regsets): Likewise.
2365 * linux-x86-low.c (x86_regsets): Likewise.
2366 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2367
2368 2015-10-26 Doug Evans <dje@google.com>
2369
2370 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2371
2372 2015-10-26 Doug Evans <dje@google.com>
2373
2374 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2375
2376 2015-10-26 Doug Evans <dje@google.com>
2377
2378 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2379 for debug_printf.
2380 (attach_thread, find_new_threads_callback): Ditto.
2381
2382 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2383
2384 * mem-break.h (set_breakpoint_data): Remove.
2385
2386 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2387
2388 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2389 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2390 (initialize_low): Remove set_breakpoint_data call.
2391 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2392 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2393 (initialize_low): Remove set_breakpoint_data call.
2394 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2395 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2396 (initialize_low): Remove set_breakpoint_data call.
2397
2398 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2399
2400 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2401 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2402 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2403 * target.h (target_breakpoint_kind_from_pc): New macro.
2404
2405 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2406
2407 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2408 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2409 the default breakpoint kind.
2410
2411 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2412
2413 * linux-arm-low.c (arm_supports_z_point_type): Add software
2414 breakpoint support.
2415
2416 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2417
2418 * linux-arm-low.c: Refactor breakpoint definitions.
2419 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2420 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2421
2422 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2423
2424 * Makefile.in: Add arm.c/o.
2425 * configure.srv: Likewise.
2426 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2427 (arm_breakpoint_kind_from_pc): New function.
2428 (arm_sw_breakpoint_from_kind): Return proper kind.
2429 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2430
2431 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2432
2433 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2434 removal.
2435 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2436 (struct raw_breakpoint) <size>: Remove.
2437 (struct raw_breakpoint) <kind>: Add.
2438 (bp_size): New function.
2439 (bp_opcode): Likewise.
2440 (find_raw_breakpoint_at): Adjust for kind.
2441 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2442 (remove_memory_breakpoint): Adjust for kind call bp_size.
2443 (set_raw_breakpoint_at): Adjust for kind.
2444 (set_breakpoint): Likewise.
2445 (set_breakpoint_at): Call breakpoint_kind_from_pc.
2446 (delete_raw_breakpoint): Adjust for kind.
2447 (delete_breakpoint): Likewise.
2448 (find_gdb_breakpoint): Likewise.
2449 (set_gdb_breakpoint_1): Likewise.
2450 (set_gdb_breakpoint): Likewise.
2451 (delete_gdb_breakpoint_1): Likewise.
2452 (delete_gdb_breakpoint): Likewise.
2453 (uninsert_raw_breakpoint): Likewise.
2454 (reinsert_raw_breakpoint): Likewise.
2455 (set_breakpoint_data): Remove.
2456 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
2457 (check_mem_read): Adjust for kind call bp_size.
2458 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
2459 (clone_one_breakpoint): Adjust for kind.
2460 * mem-break.h (set_gdb_breakpoint): Likewise.
2461 (delete_gdb_breakpoint): Likewise.
2462 * server.c (process_serial_event): Likewise.
2463
2464 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2465
2466 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
2467 (struct linux_target_ops) <breakpoint>: Remove.
2468 (struct linux_target_ops) <breakpoint_len>: Remove.
2469 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2470 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2471 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
2472 (arm_sw_breakpoint_from_kind): New function.
2473 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
2474 (struct linux_target_ops) <breakpoint>: Remove.
2475 (struct linux_target_ops) <breakpoint_len>: Remove.
2476 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2477 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2478 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
2479 (struct linux_target_ops) <breakpoint>: Remove.
2480 (struct linux_target_ops) <breakpoint_len>: Remove.
2481 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2482 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2483 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
2484 (struct linux_target_ops) <breakpoint>: Remove.
2485 (struct linux_target_ops) <breakpoint_len>: Remove.
2486 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2487 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2488 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
2489 and sw_breakpoint_from_kind to increment the pc.
2490 (linux_breakpoint_kind_from_pc): New function.
2491 (linux_sw_breakpoint_from_kind): New function.
2492 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
2493 (initialize_low): Call breakpoint_kind_from_pc and
2494 sw_breakpoint_from_kind to replace breakpoint_data/len.
2495 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
2496 New field.
2497 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
2498 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
2499 (struct linux_target_ops) <breakpoint>: Remove.
2500 (struct linux_target_ops) <breakpoint_len>: Remove.
2501 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2502 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2503 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
2504 (struct linux_target_ops) <breakpoint>: Remove.
2505 (struct linux_target_ops) <breakpoint_len>: Remove.
2506 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2507 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2508 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
2509 (struct linux_target_ops) <breakpoint>: Remove.
2510 (struct linux_target_ops) <breakpoint_len>: Remove.
2511 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2512 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2513 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
2514 (struct linux_target_ops) <breakpoint>: Remove.
2515 (struct linux_target_ops) <breakpoint_len>: Remove.
2516 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2517 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2518 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
2519 (struct linux_target_ops) <breakpoint>: Remove.
2520 (struct linux_target_ops) <breakpoint_len>: Remove.
2521 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2522 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2523 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
2524 (struct linux_target_ops) <breakpoint>: Remove.
2525 (struct linux_target_ops) <breakpoint_len>: Remove.
2526 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2527 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2528 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
2529 (struct linux_target_ops) <breakpoint>: Remove.
2530 (struct linux_target_ops) <breakpoint_len>: Remove.
2531 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2532 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2533 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
2534 (struct linux_target_ops) <breakpoint>: Remove.
2535 (struct linux_target_ops) <breakpoint_len>: Remove.
2536 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2537 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2538 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
2539 (struct linux_target_ops) <breakpoint>: Remove.
2540 (struct linux_target_ops) <breakpoint_len>: Remove.
2541 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2542 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2543 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
2544 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
2545 (struct linux_target_ops) <breakpoint>: Remove.
2546 (struct linux_target_ops) <breakpoint_len>: Remove.
2547 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2548 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2549 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
2550 (struct linux_target_ops) <breakpoint>: Remove.
2551 (struct linux_target_ops) <breakpoint_len>: Remove.
2552 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2553 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2554
2555 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2556
2557 * linux-cris-low.c (cris_get_pc): Remove void arg.
2558
2559 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2560
2561 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
2562 variable name.
2563
2564 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2565
2566 * inferiors.c (thread_pid_matches_callback): New function.
2567 (find_thread_process): New function.
2568 (remove_thread): Reset current_thread.
2569 (remove_process): Assert threads have been removed first.
2570
2571 2015-10-15 Yao Qi <yao.qi@linaro.org>
2572
2573 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
2574 if it is 3.
2575 (aarch64_remove_point): Likewise.
2576 * regcache.c (regcache_register_size): New function.
2577
2578 2015-10-12 Yao Qi <yao.qi@linaro.org>
2579
2580 * linux-aarch64-low.c: Update all callers as emit_load_store
2581 is renamed to aarch64_emit_load_store.
2582
2583 2015-10-12 Yao Qi <yao.qi@linaro.org>
2584
2585 * linux-aarch64-low.c: Update all callers of function renaming
2586 from emit_insn to aarch64_emit_insn.
2587
2588 2015-10-12 Yao Qi <yao.qi@linaro.org>
2589
2590 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
2591 arch/aarch64-insn.h.
2592 (struct aarch64_memory_operand): Likewise.
2593 (ENCODE): Likewise.
2594 (emit_insn): Move to arch/aarch64-insn.c.
2595 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
2596 (emit_load_store): Move to arch/aarch64-insn.c.
2597 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
2598 (can_encode_int32): Remove.
2599
2600 2015-10-12 Yao Qi <yao.qi@linaro.org>
2601
2602 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
2603 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
2604 (aarch64_relocate_instruction): Likewise.
2605 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
2606 (struct aarch64_insn_visitor): Likewise.
2607
2608 2015-10-12 Yao Qi <yao.qi@linaro.org>
2609
2610 * linux-aarch64-low.c (struct aarch64_insn_data): New.
2611 (struct aarch64_insn_visitor): New.
2612 (struct aarch64_insn_relocation_data): New.
2613 (aarch64_ftrace_insn_reloc_b): New function.
2614 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2615 (aarch64_ftrace_insn_reloc_cb): Likewise.
2616 (aarch64_ftrace_insn_reloc_tb): Likewise.
2617 (aarch64_ftrace_insn_reloc_adr): Likewise.
2618 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
2619 (aarch64_ftrace_insn_reloc_others): Likewise.
2620 (visitor): New.
2621 (aarch64_relocate_instruction): Use visitor.
2622
2623 2015-10-12 Yao Qi <yao.qi@linaro.org>
2624
2625 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
2626 int. Add argument buf.
2627 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
2628 aarch64_relocate_instruction.
2629
2630 2015-10-12 Yao Qi <yao.qi@linaro.org>
2631
2632 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
2633 argument insn. Remove local variable insn. Don't call
2634 target_read_uint32.
2635 (aarch64_install_fast_tracepoint_jump_pad): Call
2636 target_read_uint32.
2637
2638 2015-09-30 Yao Qi <yao.qi@linaro.org>
2639
2640 * linux-aarch64-low.c (emit_movk): Shorten a long line.
2641 (emit_load_store_pair): Likewise.
2642
2643 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2644
2645 * dll.c (match_dll): Add cast(s).
2646 (unloaded_dll): Likewise.
2647 * linux-low.c (second_thread_of_pid_p): Likewise.
2648 (delete_lwp_callback): Likewise.
2649 (count_events_callback): Likewise.
2650 (select_event_lwp_callback): Likewise.
2651 (linux_set_resume_request): Likewise.
2652 * server.c (accumulate_file_name_length): Likewise.
2653 (emit_dll_description): Likewise.
2654 (handle_qxfer_threads_worker): Likewise.
2655 (visit_actioned_threads): Likewise.
2656 * thread-db.c (any_thread_of): Likewise.
2657 * tracepoint.c (same_process_p): Likewise.
2658 (match_blocktype): Likewise.
2659 (build_traceframe_info_xml): Likewise.
2660
2661 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2662
2663 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
2664 assignment.
2665 (gdb_unparse_agent_expr): Likewise.
2666 * hostio.c (require_data): Likewise.
2667 (handle_pread): Likewise.
2668 * linux-low.c (disable_regset): Likewise.
2669 (fetch_register): Likewise.
2670 (store_register): Likewise.
2671 (get_dynamic): Likewise.
2672 (linux_qxfer_libraries_svr4): Likewise.
2673 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
2674 (set_fast_tracepoint_jump): Likewise.
2675 (uninsert_fast_tracepoint_jumps_at): Likewise.
2676 (reinsert_fast_tracepoint_jumps_at): Likewise.
2677 (validate_inserted_breakpoint): Likewise.
2678 (clone_agent_expr): Likewise.
2679 * regcache.c (init_register_cache): Likewise.
2680 * remote-utils.c (putpkt_binary_1): Likewise.
2681 (decode_M_packet): Likewise.
2682 (decode_X_packet): Likewise.
2683 (look_up_one_symbol): Likewise.
2684 (relocate_instruction): Likewise.
2685 (monitor_output): Likewise.
2686 * server.c (handle_search_memory): Likewise.
2687 (handle_qxfer_exec_file): Likewise.
2688 (handle_qxfer_libraries): Likewise.
2689 (handle_qxfer): Likewise.
2690 (handle_query): Likewise.
2691 (handle_v_cont): Likewise.
2692 (handle_v_run): Likewise.
2693 (captured_main): Likewise.
2694 * target.c (write_inferior_memory): Likewise.
2695 * thread-db.c (try_thread_db_load_from_dir): Likewise.
2696 * tracepoint.c (init_trace_buffer): Likewise.
2697 (add_tracepoint_action): Likewise.
2698 (add_traceframe): Likewise.
2699 (add_traceframe_block): Likewise.
2700 (cmd_qtdpsrc): Likewise.
2701 (cmd_qtdv): Likewise.
2702 (cmd_qtstatus): Likewise.
2703 (response_source): Likewise.
2704 (response_tsv): Likewise.
2705 (cmd_qtnotes): Likewise.
2706 (gdb_collect): Likewise.
2707 (initialize_tracepoint): Likewise.
2708
2709 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2710
2711 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
2712 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
2713 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
2714 <NOP>: New.
2715 (enum aarch64_condition_codes): New enum.
2716 (w0): New static global.
2717 (fp): Likewise.
2718 (lr): Likewise.
2719 (struct aarch64_memory_operand) <type>: New
2720 MEMORY_OPERAND_POSTINDEX type.
2721 (postindex_memory_operand): New helper function.
2722 (emit_ret): New function.
2723 (emit_load_store_pair): New function, factored out of emit_stp
2724 with support for MEMORY_OPERAND_POSTINDEX.
2725 (emit_stp): Rewrite using emit_load_store_pair.
2726 (emit_ldp): New function.
2727 (emit_load_store): Likewise.
2728 (emit_ldr): Mention post-index instruction in comment.
2729 (emit_ldrh): New function.
2730 (emit_ldrb): New function.
2731 (emit_ldrsw): Mention post-index instruction in comment.
2732 (emit_str): Likewise.
2733 (emit_subs): New function.
2734 (emit_cmp): Likewise.
2735 (emit_and): Likewise.
2736 (emit_orr): Likewise.
2737 (emit_orn): Likewise.
2738 (emit_eor): Likewise.
2739 (emit_mvn): Likewise.
2740 (emit_lslv): Likewise.
2741 (emit_lsrv): Likewise.
2742 (emit_asrv): Likewise.
2743 (emit_mul): Likewise.
2744 (emit_sbfm): Likewise.
2745 (emit_sbfx): Likewise.
2746 (emit_ubfm): Likewise.
2747 (emit_ubfx): Likewise.
2748 (emit_csinc): Likewise.
2749 (emit_cset): Likewise.
2750 (emit_nop): Likewise.
2751 (emit_ops_insns): New helper function.
2752 (emit_pop): Likewise.
2753 (emit_push): Likewise.
2754 (aarch64_emit_prologue): New function.
2755 (aarch64_emit_epilogue): Likewise.
2756 (aarch64_emit_add): Likewise.
2757 (aarch64_emit_sub): Likewise.
2758 (aarch64_emit_mul): Likewise.
2759 (aarch64_emit_lsh): Likewise.
2760 (aarch64_emit_rsh_signed): Likewise.
2761 (aarch64_emit_rsh_unsigned): Likewise.
2762 (aarch64_emit_ext): Likewise.
2763 (aarch64_emit_log_not): Likewise.
2764 (aarch64_emit_bit_and): Likewise.
2765 (aarch64_emit_bit_or): Likewise.
2766 (aarch64_emit_bit_xor): Likewise.
2767 (aarch64_emit_bit_not): Likewise.
2768 (aarch64_emit_equal): Likewise.
2769 (aarch64_emit_less_signed): Likewise.
2770 (aarch64_emit_less_unsigned): Likewise.
2771 (aarch64_emit_ref): Likewise.
2772 (aarch64_emit_if_goto): Likewise.
2773 (aarch64_emit_goto): Likewise.
2774 (aarch64_write_goto_address): Likewise.
2775 (aarch64_emit_const): Likewise.
2776 (aarch64_emit_call): Likewise.
2777 (aarch64_emit_reg): Likewise.
2778 (aarch64_emit_pop): Likewise.
2779 (aarch64_emit_stack_flush): Likewise.
2780 (aarch64_emit_zero_ext): Likewise.
2781 (aarch64_emit_swap): Likewise.
2782 (aarch64_emit_stack_adjust): Likewise.
2783 (aarch64_emit_int_call_1): Likewise.
2784 (aarch64_emit_void_call_2): Likewise.
2785 (aarch64_emit_eq_goto): Likewise.
2786 (aarch64_emit_ne_goto): Likewise.
2787 (aarch64_emit_lt_goto): Likewise.
2788 (aarch64_emit_le_goto): Likewise.
2789 (aarch64_emit_gt_goto): Likewise.
2790 (aarch64_emit_ge_got): Likewise.
2791 (aarch64_emit_ops_impl): New static global variable.
2792 (aarch64_emit_ops): New target function, return
2793 &aarch64_emit_ops_impl.
2794 (struct linux_target_ops): Install it.
2795
2796 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2797
2798 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
2799 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
2800 aarch64-ipa.o.
2801 * linux-aarch64-ipa.c: New file.
2802 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
2803 and endian.h.
2804 (aarch64_get_thread_area): New target method.
2805 (extract_signed_bitfield): New helper function.
2806 (aarch64_decode_ldr_literal): New function.
2807 (enum aarch64_opcodes): New enum.
2808 (struct aarch64_register): New struct.
2809 (struct aarch64_operand): New struct.
2810 (x0): New static global.
2811 (x1): Likewise.
2812 (x2): Likewise.
2813 (x3): Likewise.
2814 (x4): Likewise.
2815 (w2): Likewise.
2816 (ip0): Likewise.
2817 (sp): Likewise.
2818 (xzr): Likewise.
2819 (aarch64_register): New helper function.
2820 (register_operand): Likewise.
2821 (immediate_operand): Likewise.
2822 (struct aarch64_memory_operand): New struct.
2823 (offset_memory_operand): New helper function.
2824 (preindex_memory_operand): Likewise.
2825 (enum aarch64_system_control_registers): New enum.
2826 (ENCODE): New macro.
2827 (emit_insn): New helper function.
2828 (emit_b): New function.
2829 (emit_bcond): Likewise.
2830 (emit_cb): Likewise.
2831 (emit_tb): Likewise.
2832 (emit_blr): Likewise.
2833 (emit_stp): Likewise.
2834 (emit_ldp_q_offset): Likewise.
2835 (emit_stp_q_offset): Likewise.
2836 (emit_load_store): Likewise.
2837 (emit_ldr): Likewise.
2838 (emit_ldrsw): Likewise.
2839 (emit_str): Likewise.
2840 (emit_ldaxr): Likewise.
2841 (emit_stxr): Likewise.
2842 (emit_stlr): Likewise.
2843 (emit_data_processing_reg): Likewise.
2844 (emit_data_processing): Likewise.
2845 (emit_add): Likewise.
2846 (emit_sub): Likewise.
2847 (emit_mov): Likewise.
2848 (emit_movk): Likewise.
2849 (emit_mov_addr): Likewise.
2850 (emit_mrs): Likewise.
2851 (emit_msr): Likewise.
2852 (emit_sevl): Likewise.
2853 (emit_wfe): Likewise.
2854 (append_insns): Likewise.
2855 (can_encode_int32_in): New helper function.
2856 (aarch64_relocate_instruction): New function.
2857 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
2858 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
2859 (struct linux_target_ops): Install aarch64_get_thread_area,
2860 aarch64_install_fast_tracepoint_jump_pad and
2861 aarch64_get_min_fast_tracepoint_insn_len.
2862
2863 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2864
2865 * Makefile.in (aarch64-insn.o): New rule.
2866 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
2867
2868 2015-09-21 Yao Qi <yao.qi@linaro.org>
2869
2870 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
2871
2872 2015-09-21 Yao Qi <yao.qi@linaro.org>
2873
2874 * tracepoint.c (max_jump_pad_size): Remove.
2875
2876 2015-09-18 Yao Qi <yao.qi@linaro.org>
2877
2878 * linux-aarch64-low.c: Don't include sys/uio.h.
2879 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
2880
2881 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
2882
2883 * tracepoint.c (eval_result_type): Change prototype.
2884 (condition_true_at_tracepoint): Fix argument to compiled_cond.
2885
2886 2015-09-15 Pedro Alves <palves@redhat.com>
2887
2888 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
2889 Check whether to report exec events instead of checking whether
2890 multiprocess is enabled.
2891
2892 2015-09-15 Pedro Alves <palves@redhat.com>
2893
2894 PR remote/18965
2895 * remote-utils.c (prepare_resume_reply): Merge
2896 TARGET_WAITKIND_VFORK_DONE switch case with the
2897 TARGET_WAITKIND_FORKED case.
2898
2899 2015-09-15 Yao Qi <yao.qi@linaro.org>
2900
2901 * server.c (handle_query): Check string comparison using
2902 "else if" instead of "if".
2903
2904 2015-09-15 Yao Qi <yao.qi@linaro.org>
2905
2906 * server.c (vCont_supported): New global variable.
2907 (handle_query): Set vCont_supported to 1 if "vContSupported+"
2908 matches. Append ";vContSupported+" to own_buf.
2909 (handle_v_requests): Append ";s;S" to own_buf if target supports
2910 hardware single step or vCont_supported is false.
2911 (capture_main): Set vCont_supported to zero.
2912
2913 2015-09-15 Yao Qi <yao.qi@linaro.org>
2914
2915 * linux-low.c (linux_supports_conditional_breakpoints): Rename
2916 it to ...
2917 (linux_supports_hardware_single_step): ... New function.
2918 (linux_target_ops): Update.
2919 * lynx-low.c (lynx_target_ops): Set field
2920 supports_hardware_single_step to target_can_do_hardware_single_step.
2921 * nto-low.c (nto_target_ops): Likewise.
2922 * spu-low.c (spu_target_ops): Likewise.
2923 * win32-low.c (win32_target_ops): Likewise.
2924 * target.c (target_can_do_hardware_single_step): New function.
2925 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2926 Remove. <supports_hardware_single_step>: New field.
2927 (target_supports_conditional_breakpoints): Remove.
2928 (target_supports_hardware_single_step): New macro.
2929 (target_can_do_hardware_single_step): Declare.
2930 * server.c (handle_query): Use target_supports_hardware_single_step
2931 instead of target_supports_conditional_breakpoints.
2932
2933 2015-09-15 Yao Qi <yao.qi@linaro.org>
2934
2935 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
2936 function.
2937 (struct linux_target_ops the_low_target): Install
2938 aarch64_linux_siginfo_fixup.
2939
2940 2015-09-11 Don Breazeal <donb@codesourcery.com>
2941 Luis Machado <lgustavo@codesourcery.com>
2942
2943 * linux-low.c (linux_mourn): Static declaration.
2944 (linux_arch_setup): Move in front of
2945 handle_extended_wait.
2946 (linux_arch_setup_thread): New function.
2947 (handle_extended_wait): Handle exec events. Call
2948 linux_arch_setup_thread. Make event_lwp argument a
2949 pointer-to-a-pointer.
2950 (check_zombie_leaders): Do not check stopped threads.
2951 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
2952 (linux_low_filter_event): Add lwp and thread for exec'ing
2953 non-leader thread if leader thread has been deleted.
2954 Refactor code into linux_arch_setup_thread and call it.
2955 Pass child lwp pointer by reference to handle_extended_wait.
2956 (linux_wait_for_event_filtered): Update comment.
2957 (linux_wait_1): Prevent clobbering exec event status.
2958 (linux_supports_exec_events): New function.
2959 (linux_target_ops) <supports_exec_events>: Initialize new member.
2960 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
2961 new member.
2962 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
2963 * server.c (report_exec_events): New global variable.
2964 (handle_query): Handle qSupported query for exec-events feature.
2965 (captured_main): Initialize report_exec_events.
2966 * server.h (report_exec_events): Declare new global variable.
2967 * target.h (struct target_ops) <supports_exec_events>: New
2968 member.
2969 (target_supports_exec_events): New macro.
2970 * win32-low.c (win32_target_ops) <supports_exec_events>:
2971 Initialize new member.
2972
2973 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
2974
2975 * linux-low.c (linux_low_enable_btrace): Remove.
2976 (linux_target_ops): Replace linux_low_enable_btrace with
2977 linux_enable_btrace.
2978
2979 2015-09-03 Yao Qi <yao.qi@linaro.org>
2980
2981 * linux-aarch64-low.c (aarch64_insert_point): Call
2982 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
2983 returns true.
2984
2985 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2986
2987 * linux-low.c (check_stopped_by_breakpoint): Use
2988 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
2989
2990 2015-08-27 Pedro Alves <palves@redhat.com>
2991
2992 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
2993
2994 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
2995
2996 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
2997 the XNEW-family equivalent.
2998 (compile_bytecodes): Likewise.
2999 * dll.c (loaded_dll): Likewise.
3000 * event-loop.c (append_callback_event): Likewise.
3001 (create_file_handler): Likewise.
3002 (create_file_event): Likewise.
3003 * hostio.c (handle_open): Likewise.
3004 * inferiors.c (add_thread): Likewise.
3005 (add_process): Likewise.
3006 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3007 * linux-arm-low.c (arm_new_process): Likewise.
3008 (arm_new_thread): Likewise.
3009 * linux-low.c (add_to_pid_list): Likewise.
3010 (linux_add_process): Likewise.
3011 (handle_extended_wait): Likewise.
3012 (add_lwp): Likewise.
3013 (enqueue_one_deferred_signal): Likewise.
3014 (enqueue_pending_signal): Likewise.
3015 (linux_resume_one_lwp_throw): Likewise.
3016 (linux_resume_one_thread): Likewise.
3017 (linux_read_memory): Likewise.
3018 (linux_write_memory): Likewise.
3019 * linux-mips-low.c (mips_linux_new_process): Likewise.
3020 (mips_linux_new_thread): Likewise.
3021 (mips_add_watchpoint): Likewise.
3022 * linux-x86-low.c (initialize_low_arch): Likewise.
3023 * lynx-low.c (lynx_add_process): Likewise.
3024 * mem-break.c (set_raw_breakpoint_at): Likewise.
3025 (set_breakpoint): Likewise.
3026 (add_condition_to_breakpoint): Likewise.
3027 (add_commands_to_breakpoint): Likewise.
3028 (clone_agent_expr): Likewise.
3029 (clone_one_breakpoint): Likewise.
3030 * regcache.c (new_register_cache): Likewise.
3031 * remote-utils.c (look_up_one_symbol): Likewise.
3032 * server.c (queue_stop_reply): Likewise.
3033 (start_inferior): Likewise.
3034 (queue_stop_reply_callback): Likewise.
3035 (handle_target_event): Likewise.
3036 * spu-low.c (fetch_ppc_memory): Likewise.
3037 (store_ppc_memory): Likewise.
3038 * target.c (set_target_ops): Likewise.
3039 * thread-db.c (thread_db_load_search): Likewise.
3040 (try_thread_db_load_1): Likewise.
3041 * tracepoint.c (add_tracepoint): Likewise.
3042 (add_tracepoint_action): Likewise.
3043 (create_trace_state_variable): Likewise.
3044 (cmd_qtdpsrc): Likewise.
3045 (cmd_qtro): Likewise.
3046 (add_while_stepping_state): Likewise.
3047 * win32-low.c (child_add_thread): Likewise.
3048 (get_image_name): Likewise.
3049
3050 2015-08-25 Yao Qi <yao.qi@linaro.org>
3051
3052 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3053
3054 2015-08-25 Yao Qi <yao.qi@linaro.org>
3055
3056 * Makefile.in (aarch64-linux.o): New rule.
3057 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3058 srv_tgtobj.
3059 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3060 (aarch64_init_debug_reg_state): Make it extern.
3061 (aarch64_linux_prepare_to_resume): Remove.
3062
3063 2015-08-25 Yao Qi <yao.qi@linaro.org>
3064
3065 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3066 lwp_arch_private_info and ptid_of_lwp.
3067
3068 2015-08-25 Yao Qi <yao.qi@linaro.org>
3069
3070 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3071 Find proc_info by find_process_pid. All callers updated.
3072
3073 2015-08-25 Yao Qi <yao.qi@linaro.org>
3074
3075 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3076 Remove.
3077 (debug_reg_change_callback): Remove.
3078 (aarch64_notify_debug_reg_change): Remove.
3079
3080 2015-08-25 Yao Qi <yao.qi@linaro.org>
3081
3082 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3083 Call current_lwp_ptid.
3084
3085 2015-08-25 Yao Qi <yao.qi@linaro.org>
3086
3087 * linux-aarch64-low.c (debug_reg_change_callback): Use
3088 debug_printf.
3089
3090 2015-08-25 Yao Qi <yao.qi@linaro.org>
3091
3092 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3093
3094 2015-08-25 Yao Qi <yao.qi@linaro.org>
3095
3096 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3097
3098 2015-08-25 Yao Qi <yao.qi@linaro.org>
3099
3100 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3101 the code.
3102
3103 2015-08-25 Yao Qi <yao.qi@linaro.org>
3104
3105 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3106 Remove.
3107 (debug_reg_change_callback): Remove argument entry and add argument
3108 lwp. Remove local variable thread. Don't print thread id in the
3109 debugging output. Don't check whether pid of thread equals to pid.
3110 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3111 iterate_over_lwps instead find_inferior.
3112
3113 2015-08-24 Pedro Alves <palves@redhat.com>
3114
3115 * inferiors.c (get_first_process): New function.
3116 * inferiors.h (get_first_process): New declaration.
3117 * remote-utils.c (read_ptid): Default to the first process in the
3118 list, instead of to the current thread's process.
3119
3120 2015-08-24 Pedro Alves <palves@redhat.com>
3121
3122 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3123 * event-loop.c: Likewise.
3124 * remote-utils.c: Likewise.
3125 * tracepoint.c: Likewise.
3126
3127 2015-08-24 Pedro Alves <palves@redhat.com>
3128
3129 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3130 ptid_get_lwp.
3131
3132 2015-08-21 Pedro Alves <palves@redhat.com>
3133
3134 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3135 instead of literal 1.
3136
3137 2015-08-21 Pedro Alves <palves@redhat.com>
3138
3139 * tdesc.c (default_description): Explicitly zero-initialize.
3140
3141 2015-08-21 Pedro Alves <palves@redhat.com>
3142
3143 PR gdb/18749
3144 * inferiors.c (remove_thread): Discard any pending stop reply for
3145 this thread.
3146 * server.c (remove_all_on_match_pid): Rename to ...
3147 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3148 instead of a pid.
3149 (discard_queued_stop_replies): Change parameter to a ptid. Now
3150 extern.
3151 (handle_v_kill, kill_inferior_callback, captured_main)
3152 (process_serial_event): Adjust.
3153 * server.h (discard_queued_stop_replies): Declare.
3154
3155 2015-08-21 Pedro Alves <palves@redhat.com>
3156
3157 * linux-low.c (wait_for_sigstop): Always switch to no thread
3158 selected if the previously current thread dies.
3159 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3160 process instead of the current thread's.
3161 * remote-utils.c (input_interrupt): Don't check if there's no
3162 current thread.
3163 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3164 current thread to the general thread fails, error out.
3165 (handle_qxfer_auxv, handle_qxfer_libraries)
3166 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3167 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3168 (handle_query): Check if there's a thread selected instead of
3169 checking whether there's any thread in the thread list.
3170 (handle_qxfer_threads, handle_qxfer_btrace)
3171 (handle_qxfer_btrace_conf): Don't error out early if there's no
3172 thread in the thread list.
3173 (handle_v_cont, myresume): Don't set the current thread to the
3174 continue thread.
3175 (process_serial_event) <Hg handling>: Also set thread_id if the
3176 previous general thread is still alive.
3177 (process_serial_event) <g/G handling>: If setting the current
3178 thread to the general thread fails, error out.
3179 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3180 thread's lwp instead of the current thread's.
3181 * target.c (set_desired_thread): If the desired thread was not
3182 found, leave the current thread pointing to NULL. Return an int
3183 (boolean) indicating success.
3184 * target.h (set_desired_thread): Change return type to int.
3185
3186 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3187
3188 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3189 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3190 #includes.
3191 (ps_get_thread_area): New function.
3192
3193 2015-08-19 Gary Benson <gbenson@redhat.com>
3194
3195 * hostio.c (handle_pread): Do not attempt to read more data
3196 than hostio_reply_with_data can fit in a packet.
3197
3198 2015-08-18 Joel Brobecker <brobecker@adacore.com>
3199
3200 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3201
3202 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3203
3204 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3205
3206 2015-08-06 Pedro Alves <palves@redhat.com>
3207
3208 * tracepoint.c (expr_eval_result): Now an int.
3209
3210 2015-08-06 Pedro Alves <palves@redhat.com>
3211
3212 * gdbthread.h (struct regcache): Forward declare.
3213 (struct thread_info) <regcache_data>: Now a struct regcache
3214 pointer.
3215 * inferiors.c (inferior_regcache_data)
3216 (set_inferior_regcache_data): Now work with struct regcache
3217 pointers.
3218 * inferiors.h (struct regcache): Forward declare.
3219 (inferior_regcache_data, set_inferior_regcache_data): Now work
3220 with struct regcache pointers.
3221 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3222 (free_register_cache_thread): Remove struct regcache pointer
3223 casts.
3224
3225 2015-08-06 Pedro Alves <palves@redhat.com>
3226
3227 * server.c (captured_main): On error, print the exception message
3228 to stderr, and if run_once is set, throw a quit.
3229
3230 2015-08-06 Pedro Alves <palves@redhat.com>
3231
3232 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3233 the current thread.
3234
3235 2015-08-06 Pedro Alves <palves@redhat.com>
3236
3237 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3238 reading beyond the passed in buffer length.
3239
3240 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3241
3242 * tracepoint.c (symbol_list) <required>: Remove.
3243
3244 2015-08-06 Pedro Alves <palves@redhat.com>
3245
3246 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3247 count if stopping and suspending threads.
3248 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3249 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3250 (linux_detach): Complete an ongoing step-over.
3251 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3252 throughout.
3253 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3254 (linux_wait_1): If passing a signal to the inferior after
3255 finishing a step-over, unsuspend and re-resume all lwps. If we
3256 see a single-step event but the thread should be continuing, don't
3257 pass the trap to gdb.
3258 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3259 internal_error instead of gdb_assert.
3260 (enqueue_pending_signal): New function.
3261 (check_ptrace_stopped_lwp_gone): Add debug output.
3262 (start_step_over): Use internal_error instead of gdb_assert.
3263 (complete_ongoing_step_over): New function.
3264 (linux_resume_one_thread): Don't resume a suspended thread.
3265 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3266 it stepping.
3267
3268 2015-08-06 Pedro Alves <palves@redhat.com>
3269
3270 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3271 (linux_thread_alive): Use lwp_is_marked_dead.
3272 (extended_event_reported): Delete.
3273 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3274 instead of extended_event_reported.
3275 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3276 as well.
3277 (lwp_is_marked_dead): New function.
3278 (lwp_running): Use lwp_is_marked_dead.
3279 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3280 comment.
3281
3282 2015-08-06 Pedro Alves <palves@redhat.com>
3283
3284 * linux-low.c (linux_wait_1): Move fork event output out of the
3285 !report_to_gdb check. Pass event_child->waitstatus to
3286 target_waitstatus_to_string instead of ourstatus.
3287
3288 2015-08-04 Yao Qi <yao.qi@linaro.org>
3289
3290 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3291 if current_thread is 32 bit.
3292
3293 2015-08-04 Yao Qi <yao.qi@linaro.org>
3294
3295 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3296 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3297 * server.c (extended_protocol): Remove "static".
3298 * server.h (extended_protocol): Declare it.
3299
3300 2015-08-04 Yao Qi <yao.qi@linaro.org>
3301
3302 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3303 both aarch64 and aarch32.
3304 (aarch64_set_pc): Likewise.
3305
3306 2015-08-04 Yao Qi <yao.qi@linaro.org>
3307
3308 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3309 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3310 arm-with-neon.xml to srv_xmlfiles.
3311 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3312 (is_64bit_tdesc): New function.
3313 (aarch64_linux_read_description): New function.
3314 (aarch64_arch_setup): Call aarch64_linux_read_description.
3315 (regs_info): Rename to regs_info_aarch64.
3316 (aarch64_regs_info): Return right regs_info.
3317 (initialize_low_arch): Call initialize_low_arch_aarch32.
3318
3319 2015-08-04 Yao Qi <yao.qi@linaro.org>
3320
3321 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3322 * linux-aarch32-low.c: New file.
3323 * linux-aarch32-low.h: New file.
3324 * linux-arm-low.c (arm_fill_gregset): Move it to
3325 linux-aarch32-low.c.
3326 (arm_store_gregset): Likewise.
3327 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3328 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3329 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3330 (regs_info): Rename to regs_info_arm.
3331 (arm_regs_info): Return regs_info_aarch32 if
3332 have_ptrace_getregset is 1 and target description is
3333 arm_with_neon or arm_with_vfpv3.
3334 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3335 Call initialize_low_arch_aarch32 instead.
3336
3337 2015-08-04 Yao Qi <yao.qi@linaro.org>
3338
3339 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3340 * linux-low.c: ... here.
3341 * linux-low.h (have_ptrace_getregset): Declare it.
3342
3343 2015-08-04 Pedro Alves <palves@redhat.com>
3344
3345 * thread-db.c (struct thread_db): Use new typedefs.
3346 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3347 CHK calls.
3348 (disable_thread_event_reporting): Cast result of dlsym to
3349 destination function pointer type.
3350 (thread_db_mourn): Use td_ta_delete_ftype.
3351
3352 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3353
3354 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3355 arch variant.
3356 (CDX_BREAKPOINT): Define for R2.
3357 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3358 (the_low_target): Add comments.
3359
3360 2015-07-30 Yao Qi <yao.qi@linaro.org>
3361
3362 * linux-arm-low.c (arm_hwcap): Remove it.
3363 (arm_read_description): New local variable arm_hwcap. Don't
3364 set arm_hwcap to zero.
3365
3366 2015-07-30 Yao Qi <yao.qi@linaro.org>
3367
3368 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3369 Use regcache->tdesc instead.
3370 (arm_store_wmmxregset): Likewise.
3371 (arm_fill_vfpregset): Likewise.
3372 (arm_store_vfpregset): Likewise.
3373
3374 2015-07-30 Yao Qi <yao.qi@linaro.org>
3375
3376 * linux-arm-low.c: Include arch/arm.h.
3377 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3378 (arm_store_gregset): Likewise.
3379
3380 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3381
3382 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3383 ptrace's 4th parameter.
3384
3385 2015-07-27 Yao Qi <yao.qi@linaro.org>
3386
3387 * configure.srv (case aarch64*-*-linux*): Don't set
3388 srv_linux_usrregs.
3389
3390 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3391
3392 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3393 sys/ptrace.h.
3394 * linux-arm-low.c: Likewise.
3395 * linux-cris-low.c: Likewise.
3396 * linux-crisv32-low.c: Likewise.
3397 * linux-low.c: Likewise.
3398 * linux-m68k-low.c: Likewise.
3399 * linux-mips-low.c: Likewise.
3400 * linux-nios2-low.c: Likewise.
3401 * linux-s390-low.c: Likewise.
3402 * linux-sparc-low.c: Likewise.
3403 * linux-tic6x-low.c: Likewise.
3404 * linux-tile-low.c: Likewise.
3405 * linux-x86-low.c: Likewise.
3406
3407 2015-07-24 Pedro Alves <palves@redhat.com>
3408
3409 * config.in: Regenerate.
3410 * configure: Regenerate.
3411
3412 2015-07-24 Pedro Alves <palves@redhat.com>
3413
3414 * acinclude.m4: Include ../ptrace.m4.
3415 * configure.ac: Call GDB_AC_PTRACE.
3416 * config.in, configure: Regenerate.
3417
3418 2015-07-24 Yao Qi <yao.qi@linaro.org>
3419
3420 * linux-low.c (linux_create_inferior): Remove setting to
3421 proc->priv->new_inferior.
3422 (linux_attach): Likewise.
3423 (linux_low_filter_event): Likewise.
3424 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3425
3426 2015-07-24 Yao Qi <yao.qi@linaro.org>
3427
3428 * linux-low.c (linux_arch_setup): New function.
3429 (linux_low_filter_event): If proc->tdesc is NULL and
3430 proc->attached is true, call the_low_target.arch_setup.
3431 Otherwise, keep status pending, and return.
3432 (linux_resume_one_lwp_throw): Don't call get_pc if
3433 thread->while_stepping isn't NULL. Don't call
3434 get_thread_regcache if proc->tdesc is NULL.
3435 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3436 (linux_target_ops): Install arch_setup.
3437 * server.c (start_inferior): Call the_target->arch_setup.
3438 * target.h (struct target_ops) <arch_setup>: New field.
3439 (target_arch_setup): New marco.
3440 * lynx-low.c (lynx_target_ops): Update.
3441 * nto-low.c (nto_target_ops): Update.
3442 * spu-low.c (spu_target_ops): Update.
3443 * win32-low.c (win32_target_ops): Update.
3444
3445 2015-07-24 Yao Qi <yao.qi@linaro.org>
3446
3447 * linux-low.c (linux_add_process): Don't set
3448 proc->priv->new_inferior.
3449 (linux_create_inferior): Set proc->priv->new_inferior to 1.
3450 (linux_attach): Likewise.
3451
3452 2015-07-24 Yao Qi <yao.qi@linaro.org>
3453
3454 * server.c (start_inferior): Code refactor.
3455
3456 2015-07-24 Yao Qi <yao.qi@linaro.org>
3457
3458 * server.c (process_serial_event): Set general_thread.
3459
3460 2015-07-21 Yao Qi <yao.qi@linaro.org>
3461
3462 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
3463 aarch64_linux_get_debug_reg_capacity.
3464
3465 2015-07-17 Yao Qi <yao.qi@linaro.org>
3466
3467 * Makefile.in (aarch64-linux-hw-point.o): New rule.
3468 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
3469 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
3470 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
3471 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
3472 (AARCH64_HWP_ALIGNMENT): Likewise.
3473 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
3474 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
3475 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
3476 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
3477 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
3478 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
3479 (struct aarch64_debug_reg_state): Likewise.
3480 (struct arch_lwp_info): Likewise.
3481 (aarch64_align_watchpoint): Likewise.
3482 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
3483 (aarch64_watchpoint_length): Likewise.
3484 (aarch64_point_encode_ctrl_reg): Likewise
3485 (aarch64_point_is_aligned): Likewise.
3486 (aarch64_align_watchpoint): Likewise.
3487 (aarch64_linux_set_debug_regs):
3488 (aarch64_dr_state_insert_one_point): Likewise.
3489 (aarch64_dr_state_remove_one_point): Likewise.
3490 (aarch64_handle_breakpoint): Likewise.
3491 (aarch64_handle_aligned_watchpoint): Likewise.
3492 (aarch64_handle_unaligned_watchpoint): Likewise.
3493 (aarch64_handle_watchpoint): Likewise.
3494
3495 2015-07-17 Yao Qi <yao.qi@linaro.org>
3496
3497 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
3498 and don't aarch64_get_debug_reg_state. All callers update.
3499 (aarch64_handle_aligned_watchpoint): Likewise.
3500 (aarch64_handle_unaligned_watchpoint): Likewise.
3501 (aarch64_handle_watchpoint): Likewise.
3502 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
3503 (aarch64_remove_point): Likewise.
3504
3505 2015-07-17 Yao Qi <yao.qi@linaro.org>
3506
3507 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
3508 debug_printf.
3509 (aarch64_handle_unaligned_watchpoint): Likewise.
3510
3511 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3512
3513 Revert the previous 3 commits:
3514 Move gdb_regex* to common/
3515 Move linux_find_memory_regions_full & co.
3516 gdbserver build-id attribute generator
3517
3518 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3519 Jan Kratochvil <jan.kratochvil@redhat.com>
3520
3521 gdbserver build-id attribute generator.
3522 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
3523 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
3524 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
3525 (find_phdr): New.
3526 (get_dynamic): Use find_pdhr to traverse program headers.
3527 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
3528 (compare_mapping_entry_range, struct find_memory_region_callback_data)
3529 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
3530 (get_hex_build_id): New.
3531 (linux_qxfer_libraries_svr4): Add optional build-id attribute
3532 to reply XML document.
3533
3534 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3535 Jan Kratochvil <jan.kratochvil@redhat.com>
3536
3537 * target.c: Include target/target-utils.h and fcntl.h.
3538 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
3539 (target_fileio_read_stralloc): New functions.
3540
3541 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3542
3543 * Makefile.in (OBS): Add gdb_regex.o.
3544 (gdb_regex.o): New.
3545 * config.in: Rebuilt.
3546 * configure: Rebuilt.
3547
3548 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3549 Jan Kratochvil <jan.kratochvil@redhat.com>
3550
3551 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
3552 * Makefile.in (OBS): Add target-utils.o.
3553 (linux-maps.o, target-utils.o): New.
3554 * configure.srv (srv_linux_obj): Add linux-maps.o.
3555
3556 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
3557
3558 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
3559 function, return 1.
3560 (the_low_target): Install it.
3561
3562 2015-07-14 Pedro Alves <palves@redhat.com>
3563
3564 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
3565 Instead, ignore ECHILD, and throw an error for other errnos.
3566
3567 2015-07-10 Pedro Alves <palves@redhat.com>
3568
3569 * event-loop.c (struct callback_event) <data>: Change type to
3570 gdb_client_data instance instead of gdb_client_data pointer.
3571 (append_callback_event): Adjust.
3572
3573 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
3574
3575 * linux-aarch64-low.c: Add comments for each linux_target_ops
3576 method. Remove comments already covered in target_ops and
3577 linux_target_ops definitions.
3578 (the_low_target): Add comments for each unimplemented method.
3579
3580 2015-07-09 Yao Qi <yao.qi@linaro.org>
3581
3582 * linux-aarch64-low.c (aarch64_regmap): Remove.
3583 (aarch64_usrregs_info): Remove.
3584 (regs_info): Set field usrregs to NULL.
3585
3586 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
3587
3588 * linux-low.c: Include "rsp-low.h"
3589 (linux_low_encode_pt_config, linux_low_encode_raw): New.
3590 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
3591 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
3592 (handle_btrace_enable_pt): New.
3593 (handle_btrace_general_set): Support "pt".
3594 (handle_btrace_conf_general_set): Support "pt:size".
3595
3596 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3597
3598 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
3599 Z_PACKET_SW_BP.
3600
3601 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3602
3603 * linux-aarch64-low.c: Remove comment about endianness.
3604 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
3605 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
3606 memcmp.
3607
3608 2015-06-24 Gary Benson <gbenson@redhat.com>
3609
3610 * linux-i386-ipa.c (stdint.h): Do not include.
3611 * lynx-i386-low.c (stdint.h): Likewise.
3612 * lynx-ppc-low.c (stdint.h): Likewise.
3613 * mem-break.c (stdint.h): Likewise.
3614 * thread-db.c (stdint.h): Likewise.
3615 * tracepoint.c (stdint.h): Likewise.
3616 * win32-low.c (stdint.h): Likewise.
3617
3618 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
3619
3620 * server.c (write_qxfer_response): Update call to
3621 remote_escape_output.
3622
3623 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
3624 Jan Kratochvil <jan.kratochvil@redhat.com>
3625
3626 Merge multiple hex conversions.
3627 * gdbreplay.c (tohex): Rename to 'fromhex'.
3628 (logchar): Use fromhex.
3629
3630 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
3631
3632 * server.c (handle_qxfer_libraries): Set `version' attribute for
3633 <library-list>.
3634
3635 2015-06-10 Gary Benson <gbenson@redhat.com>
3636
3637 * target.h (struct target_ops) <multifs_open>: New field.
3638 <multifs_unlink>: Likewise.
3639 <multifs_readlink>: Likewise.
3640 * linux-low.c (nat/linux-namespaces.h): New include.
3641 (linux_target_ops): Initialize the_target->multifs_open,
3642 the_target->multifs_unlink and the_target->multifs_readlink.
3643 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
3644 * hostio.c (hostio_fs_pid): New static variable.
3645 (hostio_handle_new_gdb_connection): New function.
3646 (handle_setfs): Likewise.
3647 (handle_open): Use the_target->multifs_open as appropriate.
3648 (handle_unlink): Use the_target->multifs_unlink as appropriate.
3649 (handle_readlink): Use the_target->multifs_readlink as
3650 appropriate.
3651 (handle_vFile): Handle vFile:setfs packets.
3652 * server.c (handle_query): Call hostio_handle_new_gdb_connection
3653 after target_handle_new_gdb_connection.
3654
3655 2015-06-10 Gary Benson <gbenson@redhat.com>
3656
3657 * configure.ac (AC_CHECK_FUNCS): Add setns.
3658 * config.in: Regenerate.
3659 * configure: Likewise.
3660 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
3661 (linux-namespaces.o): New rule.
3662 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
3663
3664 2015-06-09 Gary Benson <gbenson@redhat.com>
3665
3666 * hostio.c (handle_open): Process mode argument with
3667 fileio_to_host_mode.
3668
3669 2015-06-01 Yao Qi <yao.qi@linaro.org>
3670
3671 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
3672 * linux-x86-low.c: Likewise.
3673
3674 2015-05-28 Don Breazeal <donb@codesourcery.com>
3675
3676 * linux-low.c (handle_extended_wait): Initialize
3677 thread_info.last_resume_kind for new fork children.
3678
3679 2015-05-15 Pedro Alves <palves@redhat.com>
3680
3681 * target.h (target_handle_new_gdb_connection): Rewrite using if
3682 wrapped in do/while.
3683
3684 2015-05-14 Joel Brobecker <brobecker@adacore.com>
3685
3686 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
3687 * configure, config.in: Regenerate.
3688 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
3689 Declare typedef.
3690
3691 2015-05-12 Don Breazeal <donb@codesourcery.com>
3692
3693 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
3694 PTRACE_EVENT_VFORK_DONE.
3695 (linux_low_ptrace_options, extended_event_reported): Add vfork
3696 events.
3697 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
3698 and "vforkdone" for RSP 'T' Stop Reply Packet.
3699 * server.h (report_vfork_events): Declare
3700 global variable.
3701
3702 2015-05-12 Don Breazeal <donb@codesourcery.com>
3703
3704 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
3705 (the_low_target) <new_fork>: Initialize new member.
3706 * linux-arm-low.c (arm_new_fork): New function.
3707 (the_low_target) <new_fork>: Initialize new member.
3708 * linux-low.c (handle_extended_wait): Call new target function
3709 new_fork.
3710 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
3711 * linux-mips-low.c (mips_add_watchpoint): New function
3712 extracted from mips_insert_point.
3713 (the_low_target) <new_fork>: Initialize new member.
3714 (mips_linux_new_fork): New function.
3715 (mips_insert_point): Call mips_add_watchpoint.
3716 * linux-x86-low.c (x86_linux_new_fork): New function.
3717 (the_low_target) <new_fork>: Initialize new member.
3718
3719 2015-05-12 Don Breazeal <donb@codesourcery.com>
3720
3721 * linux-low.c (handle_extended_wait): Implement return value,
3722 rename argument 'event_child' to 'event_lwp', handle
3723 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
3724 (linux_low_ptrace_options): New function.
3725 (linux_low_filter_event): Call linux_low_ptrace_options,
3726 use different argument fo linux_enable_event_reporting,
3727 use return value from handle_extended_wait.
3728 (extended_event_reported): New function.
3729 (linux_wait_1): Call extended_event_reported and set
3730 status to report fork events.
3731 (linux_write_memory): Add pid to debug message.
3732 (reset_lwp_ptrace_options_callback): New function.
3733 (linux_handle_new_gdb_connection): New function.
3734 (linux_target_ops): Initialize new structure member.
3735 * linux-low.h (struct lwp_info) <waitstatus>: New member.
3736 * lynx-low.c: Initialize new structure member.
3737 * remote-utils.c (prepare_resume_reply): Implement stop reason
3738 "fork" for "T" stop message.
3739 * server.c (handle_query): Call handle_new_gdb_connection.
3740 * server.h (report_fork_events): Declare global flag.
3741 * target.h (struct target_ops) <handle_new_gdb_connection>:
3742 New member.
3743 (target_handle_new_gdb_connection): New macro.
3744 * win32-low.c: Initialize new structure member.
3745
3746 2015-05-12 Don Breazeal <donb@codesourcery.com>
3747
3748 * mem-break.c (APPEND_TO_LIST): Define macro.
3749 (clone_agent_expr): New function.
3750 (clone_one_breakpoint): New function.
3751 (clone_all_breakpoints): New function.
3752 * mem-break.h: Declare new functions.
3753
3754 2015-05-12 Don Breazeal <donb@codesourcery.com>
3755
3756 * linux-low.c (linux_supports_fork_events): New function.
3757 (linux_supports_vfork_events): New function.
3758 (linux_target_ops): Initialize new structure members.
3759 (initialize_low): Call linux_check_ptrace_features.
3760 * lynx-low.c (lynx_target_ops): Initialize new structure
3761 members.
3762 * server.c (report_fork_events, report_vfork_events):
3763 New global flags.
3764 (handle_query): Add new features to qSupported packet and
3765 response.
3766 (captured_main): Initialize new global variables.
3767 * target.h (struct target_ops) <supports_fork_events>:
3768 New member.
3769 <supports_vfork_events>: New member.
3770 (target_supports_fork_events): New macro.
3771 (target_supports_vfork_events): New macro.
3772 * win32-low.c (win32_target_ops): Initialize new structure
3773 members.
3774
3775 2015-05-12 Gary Benson <gbenson@redhat.com>
3776
3777 * server.c (handle_qxfer_exec_file): Use current process
3778 if annex is empty.
3779
3780 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
3781
3782 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
3783 Remove HAVE_PTRACE_GETREGS conditionals.
3784 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
3785 instead of PTRACE_GETREGS and PTRACE_SETREGS.
3786
3787 2015-05-08 Yao Qi <yao.qi@linaro.org>
3788
3789 * linux-low.c (linux_supports_conditional_breakpoints): New
3790 function.
3791 (linux_target_ops): Install new target method.
3792 * lynx-low.c (lynx_target_ops): Install NULL hook for
3793 supports_conditional_breakpoints.
3794 * nto-low.c (nto_target_ops): Likewise.
3795 * spu-low.c (spu_target_ops): Likewise.
3796 * win32-low.c (win32_target_ops): Likewise.
3797 * server.c (handle_query): Check
3798 target_supports_conditional_breakpoints.
3799 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3800 New field.
3801 (target_supports_conditional_breakpoints): New macro.
3802
3803 2015-05-06 Pedro Alves <palves@redhat.com>
3804
3805 PR server/18081
3806 * server.c (start_inferior): If the process exits, mourn it.
3807
3808 2015-04-21 Gary Benson <gbenson@redhat.com>
3809
3810 * hostio.c (fileio_open_flags_to_host): Factored out to
3811 fileio_to_host_openflags in common/fileio.c. Single use
3812 updated.
3813
3814 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3815
3816 * linux-xtensa-low.c (xtensa_fill_gregset)
3817 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
3818 XCHAL_HAVE_LOOP.
3819
3820 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3821
3822 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
3823 (regs_info): Replace usrregs pointer with NULL.
3824
3825 2015-04-17 Gary Benson <gbenson@redhat.com>
3826
3827 * target.h (struct target_ops) <pid_to_exec_file>: New field.
3828 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
3829 * server.c (handle_qxfer_exec_file): New function.
3830 (qxfer_packets): Add exec-file entry.
3831 (handle_query): Report qXfer:exec-file:read as supported packet.
3832
3833 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
3834
3835 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
3836
3837 2015-04-09 Gary Benson <gbenson@redhat.com>
3838
3839 * hostio-errno.c (errno_to_fileio_error): Remove function.
3840 Update caller to use remote_fileio_to_fio_error.
3841
3842 2015-04-09 Yao Qi <yao.qi@linaro.org>
3843
3844 * linux-low.c (linux_insert_point): Call
3845 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
3846 (linux_remove_point): Call remove_memory_breakpoint if type is
3847 raw_bkpt_type_sw.
3848 * linux-x86-low.c (x86_insert_point): Don't call
3849 insert_memory_breakpoint.
3850 (x86_remove_point): Don't call remove_memory_breakpoint.
3851
3852 2015-04-01 Pedro Alves <palves@redhat.com>
3853 Cleber Rosa <crosa@redhat.com>
3854
3855 * server.c (gdbserver_usage): Reorganize and extend the usage
3856 message.
3857
3858 2015-03-24 Pedro Alves <palves@redhat.com>
3859
3860 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
3861 output. Also dump TRAP_TRACE.
3862 (linux_low_filter_event): In debug output, distinguish a
3863 resume_stop SIGSTOP from a delayed SIGSTOP.
3864
3865 2015-03-24 Gary Benson <gbenson@redhat.com>
3866
3867 * linux-x86-low.c (x86_linux_new_thread): Moved to
3868 nat/x86-linux.c.
3869 (x86_linux_prepare_to_resume): Likewise.
3870
3871 2015-03-24 Gary Benson <gbenson@redhat.com>
3872
3873 * Makefile.in (x86-linux-dregs.o): New rule.
3874 * configure.srv: Add x86-linux-dregs.o to relevant targets.
3875 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
3876 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
3877 (x86_linux_dr_get): Likewise.
3878 (x86_linux_dr_set): Likewise.
3879 (update_debug_registers_callback): Likewise.
3880 (x86_linux_dr_set_addr): Likewise.
3881 (x86_linux_dr_get_addr): Likewise.
3882 (x86_linux_dr_set_control): Likewise.
3883 (x86_linux_dr_get_control): Likewise.
3884 (x86_linux_dr_get_status): Likewise.
3885 (x86_linux_update_debug_registers): Likewise.
3886
3887 2015-03-24 Gary Benson <gbenson@redhat.com>
3888
3889 * linux-x86-low.c (x86_linux_update_debug_registers):
3890 New function, factored out from...
3891 (x86_linux_prepare_to_resume): ...this.
3892
3893 2015-03-24 Gary Benson <gbenson@redhat.com>
3894
3895 * linux-x86-low.c (x86_linux_dr_get): Update comments.
3896 (x86_linux_dr_set): Likewise.
3897 (update_debug_registers_callback): Likewise.
3898 (x86_linux_dr_set_addr): Likewise.
3899 (x86_linux_dr_get_addr): Likewise.
3900 (x86_linux_dr_set_control): Likewise.
3901 (x86_linux_dr_get_control): Likewise.
3902 (x86_linux_dr_get_status): Likewise.
3903 (x86_linux_prepare_to_resume): Likewise.
3904
3905 2015-03-24 Gary Benson <gbenson@redhat.com>
3906
3907 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
3908 Use perror_with_name. Pass string through gettext.
3909 (x86_linux_dr_set): Likewise.
3910
3911 2015-03-24 Gary Benson <gbenson@redhat.com>
3912
3913 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
3914 (x86_linux_dr_set_addr): ...this.
3915 (x86_dr_low_get_addr): Rename to...
3916 (x86_linux_dr_get_addr): ...this.
3917 (x86_dr_low_set_control): Rename to...
3918 (x86_linux_dr_set_control): ...this.
3919 (x86_dr_low_get_control): Rename to...
3920 (x86_linux_dr_get_control): ...this.
3921 (x86_dr_low_get_status): Rename to...
3922 (x86_linux_dr_get_status): ...this.
3923 (x86_dr_low): Update with new function names.
3924
3925 2015-03-24 Gary Benson <gbenson@redhat.com>
3926
3927 * Makefile.in (x86-linux.o): New rule.
3928 * configure.srv: Add x86-linux.o to relevant targets.
3929 * linux-low.c (lwp_set_arch_private_info): New function.
3930 (lwp_arch_private_info): Likewise.
3931 * linux-x86-low.c: Include nat/x86-linux.h.
3932 (arch_lwp_info): Removed structure.
3933 (update_debug_registers_callback):
3934 Use lwp_set_debug_registers_changed.
3935 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
3936 and lwp_set_debug_registers_changed.
3937 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
3938
3939 2015-03-24 Gary Benson <gbenson@redhat.com>
3940
3941 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
3942 * linux-arm-low.c (arm_new_thread): Likewise.
3943 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
3944 * linux-mips-low.c (mips_linux_new_thread): Likewise.
3945 * linux-x86-low.c (x86_linux_new_thread): Likewise.
3946 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
3947
3948 2015-03-24 Gary Benson <gbenson@redhat.com>
3949
3950 * linux-low.c (ptid_of_lwp): New function.
3951 (lwp_is_stopped): Likewise.
3952 (lwp_stop_reason): Likewise.
3953 * linux-x86-low.c (update_debug_registers_callback):
3954 Use lwp_is_stopped.
3955 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
3956 lwp_stop_reason.
3957
3958 2015-03-24 Gary Benson <gbenson@redhat.com>
3959
3960 * linux-low.h (linux_stop_lwp): Remove declaration.
3961
3962 2015-03-24 Gary Benson <gbenson@redhat.com>
3963
3964 * linux-low.h: Include nat/linux-nat.h.
3965 * linux-low.c (iterate_over_lwps_args): New structure.
3966 (iterate_over_lwps_filter): New function.
3967 (iterate_over_lwps): Likewise.
3968 * linux-x86-low.c (update_debug_registers_callback):
3969 Update signature to what iterate_over_lwps expects.
3970 Remove PID check that iterate_over_lwps now performs.
3971 (x86_dr_low_set_addr): Use iterate_over_lwps.
3972 (x86_dr_low_set_control): Likewise.
3973
3974 2015-03-24 Gary Benson <gbenson@redhat.com>
3975
3976 * linux-x86-low.c (x86_debug_reg_state): New function.
3977 (x86_linux_prepare_to_resume): Use the above.
3978
3979 2015-03-24 Gary Benson <gbenson@redhat.com>
3980
3981 * linux-low.c (current_lwp_ptid): New function.
3982 * linux-x86-low.c: Include nat/linux-nat.h.
3983 (x86_dr_low_get_addr): Use current_lwp_ptid.
3984 (x86_dr_low_get_control): Likewise.
3985 (x86_dr_low_get_status): Likewise.
3986
3987 2015-03-20 Pedro Alves <palves@redhat.com>
3988
3989 * tracepoint.c (cmd_qtstatus): Make "str" const.
3990
3991 2015-03-20 Pedro Alves <palves@redhat.com>
3992
3993 * server.c (handle_general_set): Make "req_str" const.
3994
3995 2015-03-19 Pedro Alves <palves@redhat.com>
3996
3997 * linux-low.c (linux_resume_one_lwp): Rename to ...
3998 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
3999 instead call perror_with_name.
4000 (check_ptrace_stopped_lwp_gone): New function.
4001 (linux_resume_one_lwp): Reimplement as wrapper around
4002 linux_resume_one_lwp_throw that swallows errors if the LWP is
4003 gone.
4004
4005 2015-03-19 Pedro Alves <palves@redhat.com>
4006
4007 * linux-low.c (count_events_callback, select_event_lwp_callback):
4008 No longer check whether the thread has resume_stop as last resume
4009 kind.
4010
4011 2015-03-19 Pedro Alves <palves@redhat.com>
4012
4013 * linux-low.c (count_events_callback, select_event_lwp_callback):
4014 Use the lwp's status_pending_p field, not the thread's.
4015
4016 2015-03-19 Pedro Alves <palves@redhat.com>
4017
4018 * linux-low.c (select_event_lwp_callback): Update comments to
4019 no longer mention SIGTRAP.
4020
4021 2015-03-18 Gary Benson <gbenson@redhat.com>
4022
4023 * server.c (handle_query): Do not report vFile:fstat as supported.
4024
4025 2015-03-11 Gary Benson <gbenson@redhat.com>
4026
4027 * hostio.c (sys/types.h): New include.
4028 (sys/stat.h): Likewise.
4029 (common-remote-fileio.h): Likewise.
4030 (handle_fstat): New function.
4031 (handle_vFile): Handle vFile:fstat packets.
4032
4033 2015-03-11 Gary Benson <gbenson@redhat.com>
4034
4035 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4036 struct stat.st_blocks and struct stat.st_blksize.
4037 * configure: Regenerate.
4038 * config.in: Likewise.
4039 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4040 (OBS): Add common-remote-fileio.o.
4041 (common-remote-fileio.o): New rule.
4042
4043 2015-03-09 Pedro Alves <palves@redhat.com>
4044
4045 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4046 'struct sockaddr' pointer in 'accept' call.
4047
4048 2015-03-09 Pedro Alves <palves@redhat.com>
4049
4050 Revert:
4051 2015-03-07 Pedro Alves <palves@redhat.com>
4052 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4053 or <winsock2.h> here. Instead include "gdb_socket.h".
4054 (remote_open): Use union gdb_sockaddr_u.
4055 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4056 or <winsock2.h> here. Instead include "gdb_socket.h".
4057 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4058 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4059 or <sys/un.h>.
4060 (init_named_socket, gdb_agent_helper_thread): Use union
4061 gdb_sockaddr_u.
4062
4063 2015-03-07 Pedro Alves <palves@redhat.com>
4064
4065 * configure.ac (build_warnings): Move
4066 -Wdeclaration-after-statement to the C-specific set.
4067 * configure: Regenerate.
4068
4069 2015-03-07 Pedro Alves <palves@redhat.com>
4070
4071 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4072 or <winsock2.h> here. Instead include "gdb_socket.h".
4073 (remote_open): Use union gdb_sockaddr_u.
4074 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4075 or <winsock2.h> here. Instead include "gdb_socket.h".
4076 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4077 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4078 or <sys/un.h>.
4079 (init_named_socket, gdb_agent_helper_thread): Use union
4080 gdb_sockaddr_u.
4081
4082 2015-03-07 Pedro Alves <palves@redhat.com>
4083
4084 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4085 instead.
4086
4087 2015-03-06 Yao Qi <yao.qi@linaro.org>
4088
4089 * linux-aarch64-low.c (aarch64_insert_point): Use
4090 show_debug_regs as a boolean.
4091 (aarch64_remove_point): Likewise.
4092
4093 2015-03-05 Pedro Alves <palves@redhat.com>
4094
4095 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4096 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4097 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4098 * nto-low.c (nto_target_ops): Likewise.
4099 * spu-low.c (spu_target_ops): Likewise.
4100 * win32-low.c (win32_target_ops): Likewise.
4101
4102 2015-03-04 Pedro Alves <palves@redhat.com>
4103
4104 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
4105 Decide whether a breakpoint triggered based on the SIGTRAP's
4106 siginfo.si_code.
4107 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4108 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
4109 (linux_low_filter_event): Check for breakpoints before checking
4110 watchpoints.
4111 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4112 siginfo.si_code.
4113 (linux_stopped_by_sw_breakpoint)
4114 (linux_supports_stopped_by_sw_breakpoint)
4115 (linux_stopped_by_hw_breakpoint)
4116 (linux_supports_stopped_by_hw_breakpoint): New functions.
4117 (linux_target_ops): Install new target methods.
4118
4119 2015-03-04 Pedro Alves <palves@redhat.com>
4120
4121 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4122 * server.c (swbreak_feature, hwbreak_feature): New globals.
4123 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4124 (captured_main): Clear swbreak_feature and hwbreak_feature.
4125 * server.h (swbreak_feature, hwbreak_feature): Declare.
4126 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4127 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4128 supports_stopped_by_hw_breakpoint>: New fields.
4129 (target_supports_stopped_by_sw_breakpoint)
4130 (target_stopped_by_sw_breakpoint)
4131 (target_supports_stopped_by_hw_breakpoint)
4132 (target_stopped_by_hw_breakpoint): Declare.
4133
4134 2015-03-04 Pedro Alves <palves@redhat.com>
4135
4136 enum lwp_stop_reason -> enum target_stop_reason
4137 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4138 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4139 (linux_wait_1, stuck_in_jump_pad_callback)
4140 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4141 (linux_stopped_by_watchpoint):
4142 * linux-low.h (enum lwp_stop_reason): Delete.
4143 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4144 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4145
4146 2015-03-04 Yao Qi <yao.qi@linaro.org>
4147
4148 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4149
4150 2015-03-03 Gary Benson <gbenson@redhat.com>
4151
4152 * hostio.c (handle_vFile): Fix prefix lengths.
4153
4154 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4155
4156 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4157 ptr_bits.
4158
4159 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4160
4161 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4162 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4163 (clean): Add "rm -f" for above C files.
4164 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4165 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4166 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4167 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4168 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4169 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4170 (init_registers_s390x_vx_linux64)
4171 (init_registers_s390x_tevx_linux64)
4172 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4173 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4174 declarations.
4175 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4176 (s390_store_vxrs_high): New functions.
4177 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4178 NT_S390_VXRS_HIGH.
4179 (s390_arch_setup): Add logic for selecting one of the new target
4180 descriptions. Activate the new vector regsets if applicable.
4181 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4182 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4183 and init_registers_s390x_tevx_linux64.
4184
4185 2015-03-01 Pedro Alves <palves@redhat.com>
4186
4187 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4188 parameter.
4189
4190 2015-02-27 Pedro Alves <palves@redhat.com>
4191
4192 * linux-x86-low.c (u_debugreg_offset): New function.
4193 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4194
4195 2015-02-27 Pedro Alves <palves@redhat.com>
4196
4197 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4198 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4199 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4200 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4201 (ps_lsetfpregs, ps_getpid)
4202 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4203 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4204 (ps_lsetxregs, ps_plog): Declare.
4205
4206 2015-02-27 Pedro Alves <palves@redhat.com>
4207
4208 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4209 IP_AGENT_EXPORT_FUNC.
4210 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4211 IP_AGENT_EXPORT_FUNC.
4212 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4213 (IP_AGENT_EXPORT): Delete.
4214 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4215 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4216 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4217 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4218 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4219 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4220 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4221 (traceframe_read_count, traceframe_write_count)
4222 (traceframes_created, trace_state_variables, get_raw_reg)
4223 (get_trace_state_variable_value, set_trace_state_variable_value)
4224 (ust_loaded, helper_thread_id, cmd_buf): Use
4225 IPA_SYM_EXPORTED_NAME.
4226 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4227 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4228 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4229 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4230 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4231 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4232 EXTERN_C_PUSH/EXTERN_C_POP.
4233 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4234 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4235 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4236 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4237 (traceframe_write_count, traceframe_read_count)
4238 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4239 (about_to_request_buffer_space, get_trace_state_variable_value)
4240 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4241 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4242 EXTERN_C_PUSH/EXTERN_C_POP.
4243 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4244 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4245 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4246 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4247 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4248 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4249 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4250 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4251 Define.
4252 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4253 (IP_AGENT_EXPORT_VAR_DECL): Define.
4254 (tracing): Declare.
4255 (gdb_agent_get_raw_reg): Declare.
4256
4257 2015-02-27 Tom Tromey <tromey@redhat.com>
4258 Pedro Alves <palves@redhat.com>
4259
4260 Rename symbols whose names are reserved C++ keywords throughout.
4261
4262 2015-02-27 Pedro Alves <palves@redhat.com>
4263
4264 * Makefile.in (COMPILER): New, get it from autoconf.
4265 (CXX): Get from autoconf instead.
4266 (COMPILE.pre): Use COMPILER.
4267 (CC-LD): Rename to ...
4268 (CC_LD): ... this. Use COMPILER.
4269 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4270 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4271 * acinclude.m4: Include build-with-cxx.m4.
4272 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4273 Disable -Werror by default if building in C++ mode.
4274 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4275 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4276 the C++ compiler. Save/restore CXXFLAGS too.
4277 * configure: Regenerate.
4278
4279 2015-02-27 Pedro Alves <palves@redhat.com>
4280
4281 * acinclude.m4: Include libiberty.m4.
4282 * configure.ac: Call libiberty_INIT.
4283 * config.in, configure: Regenerate.
4284
4285 2015-02-26 Pedro Alves <palves@redhat.com>
4286
4287 * linux-low.c (linux_wait_1): When incrementing the PC past a
4288 program breakpoint always use the_low_target.breakpoint_len as
4289 increment, rather than the maximum between that and
4290 the_low_target.decr_pc_after_break.
4291
4292 2015-02-23 Pedro Alves <palves@redhat.com>
4293
4294 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4295 thread was doing a step-over; always adjust the PC if
4296 we stepped over a permanent breakpoint.
4297 (linux_wait_1): If we stepped over breakpoint that was on top of a
4298 permanent breakpoint, manually advance the PC past it.
4299
4300 2015-02-23 Pedro Alves <palves@redhat.com>
4301
4302 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4303 modes.
4304 (x86_fill_gregset, x86_store_gregset): Use it when handling
4305 $orig_eax.
4306
4307 2015-02-20 Pedro Alves <palves@redhat.com>
4308
4309 * thread-db.c: Include "nat/linux-procfs.h".
4310 (thread_db_init): Skip listing new threads if the kernel supports
4311 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4312
4313 2015-02-20 Pedro Alves <palves@redhat.com>
4314
4315 * linux-low.c (status_pending_p_callback): Use ptid_match.
4316
4317 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4318
4319 PR breakpoints/16812
4320 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4321 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4322 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4323
4324 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
4325
4326 PR breakpoints/15956
4327 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4328
4329 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4330
4331 * linux-low.c (linux_low_btrace_conf): Print size.
4332 * server.c (handle_btrace_conf_general_set): New.
4333 (hanle_general_set): Call handle_btrace_conf_general_set.
4334 (handle_query): Report Qbtrace-conf:bts:size as supported.
4335
4336 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4337
4338 * linux-low.c (linux_low_enable_btrace): Update parameters.
4339 (linux_low_btrace_conf): New.
4340 (linux_target_ops)<to_btrace_conf>: Initialize.
4341 * server.c (current_btrace_conf): New.
4342 (handle_btrace_enable): Rename to ...
4343 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
4344 to target_enable_btrace. Update comment. Update users.
4345 (handle_qxfer_btrace_conf): New.
4346 (qxfer_packets): Add btrace-conf entry.
4347 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4348 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4349 (target_ops)<read_btrace_conf>: New.
4350 (target_enable_btrace): Update parameters.
4351 (target_read_btrace_conf): New.
4352
4353 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4354
4355 * server.c (handle_btrace_general_set): Remove call to
4356 target_supports_btrace.
4357 (supported_btrace_packets): New.
4358 (handle_query): Call supported_btrace_packets.
4359 * target.h: include btrace-common.h.
4360 (btrace_target_info): Removed.
4361 (supports_btrace, target_supports_btrace): Update parameters.
4362
4363 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4364
4365 * Makefile.in (SFILES): Add common/btrace-common.c.
4366 (OBS): Add common/btrace-common.o.
4367 (btrace-common.o): Add build rules.
4368 * linux-low: Include btrace-common.h.
4369 (linux_low_read_btrace): Use struct btrace_data. Call
4370 btrace_data_init and btrace_data_fini.
4371
4372 2015-02-06 Pedro Alves <palves@redhat.com>
4373
4374 * thread-db.c (find_new_threads_callback): Add debug output.
4375
4376 2015-02-04 Pedro Alves <palves@redhat.com>
4377
4378 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4379 (resume_stopped_resumed_lwps): New function.
4380 (linux_wait_for_event_filtered): Use it.
4381
4382 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4383
4384 * Makefile.in (SFILES): Add linux-personality.c.
4385 (linux-personality.o): New rule.
4386 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4387 list of objects to be built.
4388 * linux-low.c: Include nat/linux-personality.h.
4389 (linux_create_inferior): Remove code to disable address space
4390 randomization (moved to ../nat/linux-personality.c). Create
4391 cleanup to disable address space randomization.
4392
4393 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4394
4395 * Makefile.in (posix-strerror.o): New rule.
4396 (mingw-strerror.o): Likewise.
4397 * configure: Regenerated.
4398 * configure.ac: Source file ../common/common.host. Initialize new
4399 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4400
4401 2015-01-14 Yao Qi <yao@codesourcery.com>
4402
4403 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4404 (ppc-linux.o): New rule.
4405 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4406 * configure.ac: AC_CHECK_FUNCS(getauxval).
4407 * config.in: Re-generated.
4408 * configure: Re-generated.
4409 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4410 ppc64_64bit_inferior_p
4411
4412 2015-01-14 Yao Qi <yao@codesourcery.com>
4413
4414 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4415 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4416 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4417 (PT_ORIG_R3, PT_TRAP): Likewise.
4418 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4419 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4420 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4421
4422 2015-01-10 Joel Brobecker <brobecker@adacore.com>
4423
4424 * i387-fp.c (i387_cache_to_xsave): In look over
4425 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4426 zmmh_low_space field by use of zmmh_high_space.
4427
4428 2015-01-09 Pedro Alves <palves@redhat.com>
4429
4430 * linux-low.c (step_over_bkpt): Move higher up in the file.
4431 (handle_extended_wait): Don't store the stop_pc here.
4432 (get_stop_pc): Adjust comments and rename to ...
4433 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4434 stopped for a software breakpoint or hardware breakpoint.
4435 (thread_still_has_status_pending_p): New function.
4436 (status_pending_p_callback): Use
4437 thread_still_has_status_pending_p. If the event is no longer
4438 interesting, resume the LWP.
4439 (handle_tracepoints): Add assert.
4440 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4441 (wstatus_maybe_breakpoint): New function.
4442 (cancel_breakpoint): Delete function.
4443 (check_stopped_by_watchpoint): New function, factored out from
4444 linux_low_filter_event.
4445 (lp_status_maybe_breakpoint): Delete function.
4446 (linux_low_filter_event): Remove filter_ptid argument.
4447 Leave thread group exits pending here. Store the LWP's stop PC.
4448 Always leave events pending.
4449 (linux_wait_for_event_filtered): Pull all events out of the
4450 kernel, and leave them all pending.
4451 (count_events_callback, select_event_lwp_callback): Consider all
4452 events.
4453 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4454 (select_event_lwp): Only give preference to the stepping LWP in
4455 all-stop mode. Adjust comments.
4456 (ignore_event): New function.
4457 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
4458 references to cancel_breakpoints. Adjust to renames. Also give
4459 equal priority to all LWPs that have had events in non-stop mode.
4460 If reporting a software breakpoint event, unadjust the LWP's PC.
4461 (linux_wait): If linux_wait_1 returned an ignored event, retry.
4462 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
4463 Adjust.
4464 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
4465 (resume_status_pending_p): Use thread_still_has_status_pending_p.
4466 (linux_stopped_by_watchpoint): Adjust.
4467 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
4468 * linux-low.h (enum lwp_stop_reason): New.
4469 (struct lwp_info) <stop_pc>: Adjust comment.
4470 <stopped_by_watchpoint>: Delete field.
4471 <stop_reason>: New field.
4472 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4473 * mem-break.c (software_breakpoint_inserted_here)
4474 (hardware_breakpoint_inserted_here): New function.
4475 * mem-break.h (software_breakpoint_inserted_here)
4476 (hardware_breakpoint_inserted_here): Declare.
4477 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
4478 (cancel_breakpoints): Delete.
4479 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
4480 (upload_fast_traceframes): Remove references to
4481 cancel_breakpoints.
4482
4483 2015-01-09 Pedro Alves <palves@redhat.com>
4484
4485 * thread-db.c (find_new_threads_callback): Ignore thread if the
4486 kernel thread ID is -1.
4487
4488 2015-01-09 Pedro Alves <palves@redhat.com>
4489
4490 * linux-low.c (linux_attach_fail_reason_string): Move to
4491 nat/linux-ptrace.c, and rename.
4492 (linux_attach_lwp): Update comment.
4493 (attach_proc_task_lwp_callback): New function.
4494 (linux_attach): Adjust to rename and use
4495 linux_proc_attach_tgid_threads.
4496 (linux_attach_fail_reason_string): Delete declaration.
4497
4498 2015-01-01 Joel Brobecker <brobecker@adacore.com>
4499
4500 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
4501 * server.c (gdbserver_version): Likewise.
4502
4503 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
4504
4505 * remote-utils.c: Include ctype.h.
4506 (input_interrupt): Explicitly handle the case when the char
4507 received is the NUL byte. Improve the printing of non-ASCII
4508 characters.
4509
4510 2014-12-16 Joel Brobecker <brobecker@adacore.com>
4511
4512 * linux-low.c (linux_low_filter_event): Update call to
4513 linux_enable_event_reporting following the addition of
4514 a new parameter to that function.
4515
4516 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
4517
4518 PR server/17457
4519 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
4520 (AARCH64_FPCR_REGNO): Likewise.
4521 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
4522 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
4523 (aarch64_store_fpregset): Likewise.
4524
4525 2014-12-15 Joel Brobecker <brobecker@adacore.com>
4526
4527 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
4528 Remove FIXME comment about assumption about N.
4529
4530 2014-12-13 Joel Brobecker <brobecker@adacore.com>
4531
4532 * configure.ac: If large-file support is disabled in GDBserver,
4533 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
4534 * configure: Regenerate.
4535
4536 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4537
4538 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
4539 warning upon ENODATA from ptrace.
4540 * linux-s390-low.c (s390_store_tdb): New.
4541 (s390_regsets): Add regset for NT_S390_TDB.
4542
4543 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4544
4545 * linux-low.c (regsets_store_inferior_registers): Skip regsets
4546 without a fill_function.
4547 * linux-s390-low.c (s390_fill_last_break): Remove.
4548 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
4549 (s390_arch_setup): Use regset's size instead of fill_function for
4550 loop end condition.
4551
4552 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4553
4554 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
4555 the regset's store function when ptrace returned an error.
4556 * regcache.c (get_thread_regcache): Invalidate register cache
4557 before fetching inferior's registers.
4558
4559 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4560
4561 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
4562 while-loop as for-loop.
4563 (regsets_store_inferior_registers): Likewise.
4564
4565 2014-11-28 Yao Qi <yao@codesourcery.com>
4566
4567 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
4568 * config.in, configure: Re-generate.
4569 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
4570 is defined.
4571
4572 2014-11-21 Yao Qi <yao@codesourcery.com>
4573
4574 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
4575 (AC_CHECK_HEADERS): Remove malloc.h.
4576 * configure: Re-generated.
4577 * config.in: Re-generated.
4578 * server.h: Don't include alloca.h and malloc.h.
4579 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
4580 Don't include malloc.h.
4581
4582 2014-11-17 Joel Brobecker <brobecker@adacore.com>
4583
4584 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
4585 corresponding ERRNO check in same block.
4586
4587 2014-11-12 Pedro Alves <palves@redhat.com>
4588
4589 * server.c (cont_thread): Update comment.
4590 (start_inferior, attach_inferior): No longer clear cont_thread.
4591 (handle_v_cont): No longer set cont_thread.
4592 (captured_main): Clear cont_thread each time a GDB connects.
4593
4594 2014-11-12 Pedro Alves <palves@redhat.com>
4595
4596 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
4597 thread, and don't resume all threads if the Hc thread has exited.
4598
4599 2014-11-12 Pedro Alves <palves@redhat.com>
4600
4601 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
4602 the process group instead of to a specific LWP.
4603
4604 2014-10-15 Pedro Alves <palves@redhat.com>
4605
4606 PR server/17487
4607 * win32-arm-low.c (arm_set_thread_context): Remove current_event
4608 parameter.
4609 (arm_set_thread_context): Delete.
4610 (the_low_target): Adjust.
4611 * win32-i386-low.c (debug_registers_changed)
4612 (debug_registers_used): Delete.
4613 (update_debug_registers_callback): New function.
4614 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
4615 needing to update their debug registers.
4616 (win32_get_current_dr): New function.
4617 (x86_dr_low_get_addr, x86_dr_low_get_control)
4618 (x86_dr_low_get_status): Fetch the debug register from the thread
4619 record's context.
4620 (i386_initial_stuff): Adjust.
4621 (i386_get_thread_context): Remove current_event parameter. Don't
4622 clear debug_registers_changed nor copy DR values to
4623 debug_reg_state.
4624 (i386_set_thread_context): Delete.
4625 (i386_prepare_to_resume): New function.
4626 (i386_thread_added): Mark the thread as needing to update irs
4627 debug registers.
4628 (the_low_target): Remove i386_set_thread_context and install
4629 i386_prepare_to_resume.
4630 * win32-low.c (win32_get_thread_context): Adjust.
4631 (win32_set_thread_context): Use SetThreadContext
4632 directly.
4633 (win32_prepare_to_resume): New function.
4634 (win32_require_context): New function, factored out from ...
4635 (thread_rec): ... this.
4636 (continue_one_thread): Call win32_prepare_to_resume on each thread
4637 we're about to continue.
4638 (win32_resume): Call win32_prepare_to_resume on the event thread.
4639 * win32-low.h (struct win32_thread_info)
4640 <debug_registers_changed>: New field.
4641 (struct win32_target_ops): Change prototype of set_thread_context,
4642 delete set_thread_context and add prepare_to_resume.
4643 (win32_require_context): New declaration.
4644
4645 2014-10-08 Gary Benson <gbenson@redhat.com>
4646
4647 * server.h: Do not include common-exceptions.h.
4648
4649 2014-10-08 Gary Benson <gbenson@redhat.com>
4650
4651 * server.h: Do not include cleanups.h.
4652
4653 2014-09-30 James Hogan <james.hogan@imgtec.com>
4654
4655 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
4656 mips64-dsp-linux.c.
4657
4658 2014-09-23 Yao Qi <yao@codesourcery.com>
4659
4660 * linux-low.c (lp_status_maybe_breakpoint): New function.
4661 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
4662 (count_events_callback): Likewise.
4663 (select_event_lwp_callback): Likewise.
4664 (cancel_breakpoints_callback): Likewise.
4665
4666 2014-09-19 Don Breazeal <donb@codesourcery.com>
4667
4668 * linux-low.c (handle_extended_wait): Call
4669 linux_ptrace_get_extended_event.
4670 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
4671 linux_is_extended_waitstatus.
4672
4673 2014-09-16 Joel Brobecker <brobecker@adacore.com>
4674
4675 * Makefile.in (CPPFLAGS): Define.
4676 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
4677 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
4678
4679 2014-09-16 Gary Benson <gbenson@redhat.com>
4680
4681 * inferiors.h (current_inferior): Renamed as...
4682 (current_thread): New variable. All uses updated.
4683 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
4684 (maybe_move_out_of_jump_pad): Likewise.
4685 (cancel_breakpoint): Likewise.
4686 (linux_low_filter_event): Likewise.
4687 (wait_for_sigstop): Likewise.
4688 (linux_resume_one_lwp): Likewise.
4689 (need_step_over_p): Likewise.
4690 (start_step_over): Likewise.
4691 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
4692 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
4693 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
4694 and save_inferior as saved_thread.
4695 * regcache.c (get_thread_regcache): Renamed saved_inferior as
4696 saved_thread.
4697 (regcache_invalidate_thread): Likewise.
4698 * remote-utils.c (prepare_resume_reply): Likewise.
4699 * thread-db.c (thread_db_get_tls_address): Likewise.
4700 (disable_thread_event_reporting): Likewise.
4701 (remove_thread_event_breakpoints): Likewise.
4702 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
4703 as saved_thread.
4704 * target.h (set_desired_inferior): Renamed as...
4705 (set_desired_thread): New declaration. All uses updated.
4706 * server.c (myresume): Updated comment to reference thread instead
4707 of inferior.
4708 (handle_serial_event): Likewise.
4709 (handle_target_event): Likewise.
4710
4711 2014-09-12 Tom Tromey <tromey@redhat.com>
4712 Gary Benson <gbenson@redhat.com>
4713
4714 * regcache.h: Include common-regcache.h.
4715 (regcache_read_pc): Don't declare.
4716 * regcache.c (get_thread_regcache_for_ptid): New function.
4717
4718 2014-09-11 Tom Tromey <tromey@redhat.com>
4719 Gary Benson <gbenson@redhat.com>
4720
4721 * symbol.c: New file.
4722 * Makefile.in (SFILES): Add symbol.c.
4723 (OBS): Add symbol.o.
4724
4725 2014-09-11 Gary Benson <gbenson@redhat.com>
4726
4727 * target.c (target_stop_ptid, target_continue_ptid): New
4728 functions.
4729
4730 2014-09-11 Tom Tromey <tromey@redhat.com>
4731 Gary Benson <gbenson@redhat.com>
4732
4733 * target.h: Include target/target.h.
4734 * target.c (target_read_memory, target_read_uint32)
4735 (target_write_memory): New functions.
4736
4737 2014-09-11 Gary Benson <gbenson@redhat.com>
4738
4739 * server.h (debug_hw_points): Don't declare.
4740 * server.c (debug_hw_points): Don't define. Replace all uses
4741 with show_debug_regs.
4742 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
4743 all uses with show_debug_regs.
4744
4745 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
4746
4747 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
4748 endianness into account.
4749 (ppc_supply_ptrace_register): Likewise.
4750
4751 2014-09-03 James Hogan <james.hogan@imgtec.com>
4752
4753 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
4754 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
4755
4756 2014-09-03 Gary Benson <gbenson@redhat.com>
4757
4758 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
4759 ALL_DEBUG_ADDRESS_REGISTERS.
4760
4761 2014-09-02 Gary Benson <gbenson@redhat.com>
4762
4763 * i386-low.h: Renamed as...
4764 * x86-low.h: New file. All type, function and variable name
4765 prefixes changed from "i386_" to "x86_". All references updated.
4766 * i386-low.c: Renamed as...
4767 * x86-low.c: New file. All type, function and variable name
4768 prefixes changed from "i386_" to "x86_". All references updated.
4769
4770 2014-09-02 Gary Benson <gbenson@redhat.com>
4771
4772 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
4773 (x86_linux_new_thread): Likewise.
4774
4775 2014-08-29 Gary Benson <gbenson@redhat.com>
4776
4777 * server.h (setjmp.h): Do not include.
4778 (toplevel): Do not declare.
4779 (common-exceptions.h): Include.
4780 (cleanups.h): Likewise.
4781 * server.c (toplevel): Do not define.
4782 (exit_code): New static global.
4783 (detach_or_kill_for_exit_cleanup): New function.
4784 (main): New function. Original main renamed to...
4785 (captured_main): New function.
4786 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
4787
4788 2014-08-29 Gary Benson <gbenson@redhat.com>
4789
4790 * Makefile.in (SFILES): Add common/common-exceptions.c.
4791 (OBS): Add common-exceptions.o.
4792 (common-exceptions.o): New rule.
4793 * utils.c (prepare_to_throw_exception): New function.
4794
4795 2014-08-29 Gary Benson <gbenson@redhat.com>
4796
4797 * config.in: Regenerate.
4798 * configure: Likewise.
4799
4800 2014-08-29 Gary Benson <gbenson@redhat.com>
4801
4802 * Makefile.in (SFILES): Add common/cleanups.c.
4803 (OBS): cleanups.o.
4804 (cleanups.o): New rule.
4805
4806 2014-08-29 Gary Benson <gbenson@redhat.com>
4807
4808 * utils.c (internal_vwarning): New function.
4809
4810 2014-08-28 Gary Benson <gbenson@redhat.com>
4811
4812 * utils.h (fatal): Remove declaration.
4813 * utils.c (fatal): Remove function.
4814
4815 2014-08-28 Gary Benson <gbenson@redhat.com>
4816
4817 * tracepoint.c (gdb_agent_init): Replace fatal with
4818 perror_with_name.
4819 (initialize_tracepoint): Likewise.
4820
4821 2014-08-28 Gary Benson <gbenson@redhat.com>
4822
4823 * remote-utils.c (remote_prepare): Replace fatal with error.
4824
4825 2014-08-28 Gary Benson <gbenson@redhat.com>
4826
4827 * linux-low.c (linux_async): Replace fatal with warning.
4828 Tidy up and return.
4829 (linux_start_non_stop): Return -1 if linux_async failed.
4830
4831 2014-08-28 Gary Benson <gbenson@redhat.com>
4832
4833 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
4834 gdb_assert.
4835 (i386_dr_low_get_addr): Remove vague comment.
4836 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
4837 gdb_assert.
4838
4839 2014-08-28 Gary Benson <gbenson@redhat.com>
4840
4841 * inferiors.c (get_thread_process): Replace check with gdb_assert.
4842 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
4843 internal_error.
4844 (linux_resume_one_lwp): Likewise.
4845 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
4846 gdb_assert.
4847 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
4848 with internal_error.
4849 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
4850 (init_register_cache): Replace fatal with gdb_assert_not_reached.
4851 (find_register_by_name): Replace fatal with internal_error.
4852 (find_regno): Likewise.
4853 * tdesc.c (init_target_desc): Replace check with gdb_assert.
4854 * thread-db.c (thread_db_create_event): Likewise.
4855 (thread_db_load_search): Likewise.
4856 (try_thread_db_load_1): Likewise.
4857 * tracepoint.c (get_jump_space_head): Replace fatal with
4858 internal_error.
4859 (claim_trampoline_space): Likewise.
4860 (have_fast_tracepoint_trampoline_buffer): Likewise.
4861 (cmd_qtstart): Likewise.
4862 (stop_tracing): Likewise.
4863 (fast_tracepoint_collecting): Likewise.
4864 (target_malloc): Likewise.
4865 (download_tracepoint): Likewise.
4866 (download_trace_state_variables): Replace check with gdb_assert.
4867 (upload_fast_traceframes): Replace fatal with internal_error.
4868
4869 2014-08-19 Tom Tromey <tromey@redhat.com>
4870 Gary Benson <gbenson@redhat.com>
4871
4872 * Makefile.in (SFILES): Add common/common-debug.c.
4873 (OBS): Add common-debug.o.
4874 (common-debug.o): New rule.
4875 * debug.h (debug_printf): Don't declare.
4876 * debug.c (debug_printf): Renamed and rewritten as...
4877 (debug_vprintf): New function.
4878
4879 2014-08-19 Gary Benson <gbenson@redhat.com>
4880
4881 * utils.h: Do not include print-utils.h.
4882
4883 2014-08-19 Tom Tromey <tromey@redhat.com>
4884 Gary Benson <gbenson@redhat.com>
4885
4886 * server.h: Add static assertion.
4887 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
4888
4889 2014-08-19 Tom Tromey <tromey@redhat.com>
4890 Gary Benson <gbenson@redhat.com>
4891
4892 * Makefile.in (SFILES): Add common/errors.c.
4893 (OBS): Add errors.o.
4894 (IPA_OBS): Add errors-ipa.o.
4895 (errors.o): New rule.
4896 (errors-ipa.o): Likewise.
4897 * utils.h (perror_with_name, error, warning): Don't declare.
4898 * utils.c (warning): Renamed and rewritten as...
4899 (vwarning): New function.
4900 (error): Renamed and rewritten as...
4901 (verror): New function.
4902 (internal_error): Renamed and rewritten as...
4903 (internal_verror): New function.
4904
4905 2014-08-07 Gary Benson <gbenson@redhat.com>
4906
4907 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
4908 * configure: Regenerate.
4909 * config.in: Likewise.
4910 * server.h: Do not include errno.h.
4911 * event-loop.c: Likewise.
4912 * hostio-errno.c: Likewise.
4913 * linux-low.c: Likewise.
4914 * remote-utils.c: Likewise.
4915 * spu-low.c: Likewise.
4916 * utils.c: Likewise.
4917 * gdbreplay.c: Unconditionally include errno.h.
4918
4919 2014-08-07 Gary Benson <gbenson@redhat.com>
4920
4921 * server.h: Do not include string.h.
4922 * event-loop.c: Likewise.
4923 * linux-low.c: Likewise.
4924 * regcache.c: Likewise.
4925 * remote-utils.c: Likewise.
4926 * spu-low.c: Likewise.
4927 * utils.c: Likewise.
4928
4929 2014-08-07 Gary Benson <gbenson@redhat.com>
4930
4931 * server.h: Do not include gdb_assert.h.
4932
4933 2014-08-07 Gary Benson <gbenson@redhat.com>
4934
4935 * server.h: Do not include common-utils.h.
4936
4937 2014-08-07 Gary Benson <gbenson@redhat.com>
4938
4939 * server.h: Do not include ptid.h.
4940 * notif.h: Likewise.
4941
4942 2014-08-07 Gary Benson <gbenson@redhat.com>
4943
4944 * server.h: Do not include gdb_locale.h.
4945
4946 2014-08-07 Gary Benson <gbenson@redhat.com>
4947
4948 * server.h: Do not include gdb/signals.h.
4949 * win32-low.c: Likewise.
4950
4951 2014-08-07 Gary Benson <gbenson@redhat.com>
4952
4953 * server.h: Do not include pathmax.h.
4954
4955 2014-08-07 Gary Benson <gbenson@redhat.com>
4956
4957 * server.h: Do not include libiberty.h.
4958 * linux-bfin-low.c: Likewise.
4959
4960 2014-08-07 Gary Benson <gbenson@redhat.com>
4961
4962 * server.h: Do not include ansidecl.h.
4963
4964 2014-08-07 Gary Benson <gbenson@redhat.com>
4965
4966 * linux-x86-low.c: Do not include stddef.h.
4967 * lynx-ppc-low.c: Likewise.
4968 * tracepoint.c: Likewise.
4969
4970 2014-08-07 Gary Benson <gbenson@redhat.com>
4971
4972 * server.h: Do not include stdarg.h.
4973 * nto-low.c: Likewise.
4974
4975 2014-08-07 Gary Benson <gbenson@redhat.com>
4976
4977 * server.h: Do not include stdlib.h.
4978 * inferiors.c: Likewise.
4979 * linux-low.c: Likewise.
4980 * regcache.c: Likewise.
4981 * spu-low.c: Likewise.
4982 * tracepoint.c: Likewise.
4983 * utils.c: Likewise.
4984
4985 2014-08-07 Gary Benson <gbenson@redhat.com>
4986
4987 * server.h: Do not include stdio.h.
4988 * linux-low.c: Likewise.
4989 * remote-utils.c: Likewise.
4990 * spu-low.c: Likewise.
4991 * utils.c: Likewise.
4992 * wincecompat.c: Likewise.
4993
4994 2014-08-06 Gary Benson <gbenson@redhat.com>
4995
4996 * regcache.c (init_register_cache): Move conditionals inside if.
4997
4998 2014-08-06 Gary Benson <gbenson@redhat.com>
4999
5000 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5001
5002 2014-07-31 Gary Benson <gbenson@redhat.com>
5003
5004 * ax.h: Do not include server.h.
5005 * gdbthread.h: Likewise.
5006 * lynx-low.h: Likewise.
5007 * notif.h: Likewise.
5008
5009 2014-07-30 Gary Benson <gbenson@redhat.com>
5010
5011 * server.h: Include common-defs.h.
5012 Do not include config.h or build-gnulib-gdbserver/config.h.
5013
5014 2014-07-30 Gary Benson <gbenson@redhat.com>
5015
5016 * hostio-errno.c: Move server.h to top of includes list.
5017 * inferiors.c: Likewise.
5018 * linux-x86-low.c: Likewise.
5019 * notif.c: Include server.h.
5020
5021 2014-07-24 Tom Tromey <tromey@redhat.com>
5022 Gary Benson <gbenson@redhat.com>
5023
5024 * server.h (CORE_ADDR): Now unsigned.
5025
5026 2014-07-16 Pedro Alves <palves@redhat.com>
5027
5028 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5029
5030 2014-07-15 Pedro Alves <palves@redhat.com>
5031
5032 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5033 copy.
5034
5035 2014-07-11 Pedro Alves <palves@redhat.com>
5036
5037 * linux-low.c (kill_wait_lwp): New function, based on
5038 kill_one_lwp_callback, but use my_waitpid directly.
5039 (kill_one_lwp_callback, linux_kill): Use it.
5040
5041 2014-06-23 Pedro Alves <palves@redhat.com>
5042
5043 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5044 before setting DR0..DR3.
5045
5046 2014-06-20 Gary Benson <gbenson@redhat.com>
5047
5048 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5049 * configure: Regenerated.
5050 * config.in: Likewise.
5051
5052 2014-06-20 Gary Benson <gbenson@redhat.com>
5053
5054 * Makefile.in (SFILES): Update locations for files moved
5055 from common to nat.
5056 (object file files): Reordered.
5057
5058 2014-06-20 Gary Benson <gbenson@redhat.com>
5059
5060 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5061 (i386_dr_low_set_addr): Likewise.
5062 (i386_dr_low_get_addr): Likewise.
5063 (i386_dr_low_can_set_control): Likewise.
5064 (i386_dr_low_set_control): Likewise.
5065 (i386_dr_low_get_control): Likewise.
5066 (i386_dr_low_get_status): Likewise.
5067 (i386_get_debug_register_length): Likewise.
5068 * linux-x86-low.c (i386_dr_low_set_addr):
5069 Changed signature. Made static.
5070 (i386_dr_low_get_addr): Likewise.
5071 (i386_dr_low_set_control): Likewise.
5072 (i386_dr_low_get_control): Likewise.
5073 (i386_dr_low_get_status): Likewise.
5074 (i386_dr_low): New global variable.
5075 * win32-i386-low.c (i386_dr_low_set_addr):
5076 Changed signature. Made static.
5077 (i386_dr_low_get_addr): Likewise.
5078 (i386_dr_low_set_control): Likewise.
5079 (i386_dr_low_get_control): Likewise.
5080 (i386_dr_low_get_status): Likewise.
5081 (i386_dr_low): New global variable.
5082
5083 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5084
5085 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5086 * Makefile.in (AR, AR_FLAGS): Define.
5087 * configure: Regenerate.
5088
5089 2014-06-19 Gary Benson <gbenson@redhat.com>
5090
5091 * Makefile.in (i386-dregs.o): New rule.
5092 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5093 * i386-low.c (target.h): Remove include.
5094 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5095 (DR_CONTROL_SHIFT): Likewise.
5096 (DR_CONTROL_SIZE): Likewise.
5097 (DR_RW_EXECUTE): Likewise.
5098 (DR_RW_WRITE): Likewise.
5099 (DR_RW_READ): Likewise.
5100 (DR_RW_IORW): Likewise.
5101 (DR_LEN_1): Likewise.
5102 (DR_LEN_2): Likewise.
5103 (DR_LEN_4): Likewise.
5104 (DR_LEN_8): Likewise.
5105 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5106 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5107 (DR_ENABLE_SIZE): Likewise.
5108 (DR_LOCAL_SLOWDOWN): Likewise.
5109 (DR_GLOBAL_SLOWDOWN): Likewise.
5110 (DR_CONTROL_RESERVED): Likewise.
5111 (I386_DR_CONTROL_MASK): Likewise.
5112 (I386_DR_VACANT): Likewise.
5113 (I386_DR_LOCAL_ENABLE): Likewise.
5114 (I386_DR_GLOBAL_ENABLE): Likewise.
5115 (I386_DR_DISABLE): Likewise.
5116 (I386_DR_SET_RW_LEN): Likewise.
5117 (I386_DR_GET_RW_LEN): Likewise.
5118 (I386_DR_WATCH_HIT): Likewise.
5119 (i386_wp_op_t): Likewise.
5120 (i386_show_dr): Likewise.
5121 (i386_length_and_rw_bits): Likewise.
5122 (i386_insert_aligned_watchpoint): Likewise.
5123 (i386_remove_aligned_watchpoint): Likewise.
5124 (i386_handle_nonaligned_watchpoint): Likewise.
5125 i386_update_inferior_debug_regs(): Likewise.
5126 (i386_dr_insert_watchpoint): Likewise.
5127 (i386_dr_remove_watchpoint): Likewise.
5128 (i386_dr_region_ok_for_watchpoint): Likewise.
5129 (i386_dr_stopped_data_address): Likewise.
5130 (i386_dr_stopped_by_watchpoint): Likewise.
5131
5132 2014-06-19 Gary Benson <gbenson@redhat.com>
5133
5134 * i386-low.c (i386_dr_show): Renamed to
5135 i386_show_dr and made static. All uses updated.
5136 (i386_dr_length_and_rw_bits): Renamed to
5137 i386_length_and_rw_bits and made static.
5138 All uses updated.
5139 (i386_dr_insert_aligned_watchpoint): Renamed to
5140 i386_insert_aligned_watchpoint and made static.
5141 All uses updated.
5142 (i386_dr_remove_aligned_watchpoint): Renamed to
5143 i386_remove_aligned_watchpoint and made static.
5144 All uses updated.
5145 (i386_dr_update_inferior_debug_regs): Renamed to
5146 i386_update_inferior_debug_regs and made static.
5147 All uses updated.
5148
5149 2014-06-18 Gary Benson <gbenson@redhat.com>
5150
5151 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5152 (i386_dr_low_can_set_control): Likewise.
5153 (i386_get_debug_register_length): Likewise.
5154 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5155 (i386_dr_low_can_set_control): Likewise.
5156 (i386_get_debug_register_length): Likewise.
5157
5158 2014-06-17 Gary Benson <gbenson@redhat.com>
5159
5160 * i386-low.h (i386-dregs.h): New include.
5161 (DR_FIRSTADDR): Now in i386-dregs.h.
5162 (DR_LASTADDR): Likewise.
5163 (DR_NADDR): Likewise.
5164 (DR_STATUS): Likewise.
5165 (DR_CONTROL): Likewise.
5166 (i386_debug_reg_state): Likewise.
5167 (i386_dr_insert_watchpoint): Likewise.
5168 (i386_dr_remove_watchpoint): Likewise.
5169 (i386_dr_region_ok_for_watchpoint): Likewise.
5170 (i386_dr_stopped_data_address): Likewise.
5171 (i386_dr_stopped_by_watchpoint): Likewise.
5172 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5173
5174 2014-06-18 Gary Benson <gbenson@redhat.com>
5175
5176 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5177 i386_dr_insert_watchpoint.
5178 (i386_low_remove_watchpoint): Renamed to
5179 i386_dr_remove_watchpoint.
5180 (i386_low_region_ok_for_watchpoint): Renamed to
5181 i386_dr_region_ok_for_watchpoint.
5182 (i386_low_stopped_data_address): Renamed to
5183 i386_dr_stopped_data_address.
5184 (i386_low_stopped_by_watchpoint): Renamed to
5185 i386_dr_stopped_by_watchpoint.
5186 * i386-low.c (i386_show_dr): Renamed to
5187 i386_dr_show and made nonstatic. All uses updated.
5188 (i386_length_and_rw_bits): Renamed to
5189 i386_dr_length_and_rw_bits and made nonstatic.
5190 All uses updated.
5191 (i386_insert_aligned_watchpoint): Renamed to
5192 i386_dr_insert_aligned_watchpoint and made nonstatic.
5193 All uses updated.
5194 (i386_remove_aligned_watchpoint): Renamed to
5195 i386_dr_remove_aligned_watchpoint and made nonstatic.
5196 All uses updated.
5197 (i386_update_inferior_debug_regs): Renamed to
5198 i386_dr_update_inferior_debug_regs and made nonstatic.
5199 All uses updated.
5200 (i386_low_insert_watchpoint): Renamed to
5201 i386_dr_insert_watchpoint. All uses updated.
5202 (i386_low_remove_watchpoint): Renamed to
5203 i386_dr_remove_watchpoint. All uses updated.
5204 (i386_low_region_ok_for_watchpoint): Renamed to
5205 i386_dr_region_ok_for_watchpoint. All uses updated.
5206 (i386_low_stopped_data_address): Renamed to
5207 i386_dr_stopped_data_address. All uses updated.
5208 (i386_low_stopped_by_watchpoint): Renamed to
5209 i386_dr_stopped_by_watchpoint. All uses updated.
5210
5211 2014-06-18 Gary Benson <gbenson@redhat.com>
5212
5213 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5214 (i386_dr_low_can_set_control): Likewise.
5215 (i386_insert_aligned_watchpoint): New check.
5216
5217 2014-06-18 Gary Benson <gbenson@redhat.com>
5218
5219 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5220 Renamed to state.
5221
5222 2014-06-18 Gary Benson <gbenson@redhat.com>
5223
5224 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5225 instead of fatal and error.
5226 (i386_handle_nonaligned_watchpoint): Likewise.
5227
5228 2014-06-18 Gary Benson <gbenson@redhat.com>
5229
5230 * i386-low.c (i386_get_debug_register_length): New macro.
5231 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5232 (i386_show_dr): Use debug_printf instead of fprintf. Use
5233 phex to format values.
5234
5235 2014-06-18 Gary Benson <gbenson@redhat.com>
5236
5237 * i386-low.h: Comment changes.
5238 * i386-low.c: Likewise.
5239
5240 2014-06-18 Gary Benson <gbenson@redhat.com>
5241
5242 * i386-low.c: Whitespace changes.
5243
5244 2014-06-12 Tom Tromey <tromey@redhat.com>
5245
5246 * utils.c (freeargv): Remove.
5247
5248 2014-06-12 Tom Tromey <tromey@redhat.com>
5249
5250 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5251 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5252 (parse_debug_format_options): Likewise.
5253 (gdbserver_usage): Likewise.
5254 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5255 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5256 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5257 against libiberty.
5258 ($(LIBGNU)): Depend on libiberty.
5259 (all-lib): Recurse into all subdirs.
5260 (install-only): Invoke "install" target in subdirs.
5261 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5262 targets.
5263 * configure: Rebuild.
5264 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5265 for vasprintf, vsnprintf, or gettimeofday.
5266 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5267 srv_tgtobj.
5268
5269 2014-06-05 Joel Brobecker <brobecker@adacore.com>
5270
5271 * development.sh: Delete.
5272 * Makefile.in (config.status): Adjust dependency on development.sh.
5273 * configure.ac: Adjust development.sh source call.
5274 * configure: Regenerate.
5275
5276 2014-06-02 Pedro Alves <palves@redhat.com>
5277
5278 * ax.c (gdb_free_agent_expr): New function.
5279 * ax.h (gdb_free_agent_expr): New declaration.
5280 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5281 list.
5282 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5283 static.
5284 (clear_breakpoint_conditions_and_commands): New function.
5285 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5286 (clear_breakpoint_conditions_and_commands): New declaration.
5287
5288 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5289
5290 * linux-aarch64-low.c (asm/ptrace.h): Include.
5291
5292 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5293
5294 Fix TLS access for -static -pthread.
5295 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5296 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5297 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5298
5299 2014-05-20 Pedro Alves <palves@redhat.com>
5300
5301 * linux-aarch64-low.c (aarch64_insert_point)
5302 (aarch64_remove_point): No longer check whether the type is
5303 supported here. Adjust to new interface.
5304 (the_low_target): Install aarch64_supports_z_point_type as
5305 supports_z_point_type method.
5306 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5307 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5308 instead of a Z packet char. Adjust.
5309 (arm_supports_z_point_type): New function.
5310 (arm_insert_point, arm_remove_point): Adjust to new interface.
5311 (the_low_target): Install arm_supports_z_point_type.
5312 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5313 (cris_insert_point, cris_remove_point): Adjust to new interface.
5314 Don't check whether the type is supported here.
5315 (the_low_target): Install cris_supports_z_point_type.
5316 * linux-low.c (linux_supports_z_point_type): New function.
5317 (linux_insert_point, linux_remove_point): Adjust to new interface.
5318 * linux-low.h (struct linux_target_ops) <insert_point,
5319 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5320 raw_breakpoint pointer parameter.
5321 <supports_z_point_type>: New method.
5322 * linux-mips-low.c (mips_supports_z_point_type): New function.
5323 (mips_insert_point, mips_remove_point): Adjust to new interface.
5324 Use mips_supports_z_point_type.
5325 (the_low_target): Install mips_supports_z_point_type.
5326 * linux-ppc-low.c (the_low_target): Install NULL as
5327 supports_z_point_type method.
5328 * linux-s390-low.c (the_low_target): Install NULL as
5329 supports_z_point_type method.
5330 * linux-sparc-low.c (the_low_target): Install NULL as
5331 supports_z_point_type method.
5332 * linux-x86-low.c (x86_supports_z_point_type): New function.
5333 (x86_insert_point): Adjust to new insert_point interface. Use
5334 insert_memory_breakpoint. Adjust to new
5335 i386_low_insert_watchpoint interface.
5336 (x86_remove_point): Adjust to remove_point interface. Use
5337 remove_memory_breakpoint. Adjust to new
5338 i386_low_remove_watchpoint interface.
5339 (the_low_target): Install x86_supports_z_point_type.
5340 * lynx-low.c (lynx_target_ops): Install NULL as
5341 supports_z_point_type callback.
5342 * nto-low.c (nto_supports_z_point_type): New.
5343 (nto_insert_point, nto_remove_point): Adjust to new interface.
5344 (nto_target_ops): Install nto_supports_z_point_type.
5345 * mem-break.c: Adjust intro comment.
5346 (struct raw_breakpoint) <raw_type, size>: New fields.
5347 <inserted>: Update comment.
5348 <shlib_disabled>: Delete field.
5349 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5350 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5351 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5352 (raw_bkpt_type_to_target_hw_bp_type): New function.
5353 (find_enabled_raw_code_breakpoint_at): New function.
5354 (find_raw_breakpoint_at): New type and size parameters. Use them.
5355 (insert_memory_breakpoint): New function, based off
5356 set_raw_breakpoint_at.
5357 (remove_memory_breakpoint): New function.
5358 (set_raw_breakpoint_at): Reimplement.
5359 (set_breakpoint): New, based on set_breakpoint_at.
5360 (set_breakpoint_at): Reimplement.
5361 (delete_raw_breakpoint): Go through the_target->remove_point
5362 instead of assuming memory breakpoints.
5363 (find_gdb_breakpoint_at): Delete.
5364 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5365 (find_gdb_breakpoint): New function.
5366 (set_gdb_breakpoint_at): Delete.
5367 (z_type_supported): New function.
5368 (set_gdb_breakpoint_1): New function, loosely based off
5369 set_gdb_breakpoint_at.
5370 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5371 (delete_gdb_breakpoint_at): Delete.
5372 (delete_gdb_breakpoint_1): New function, loosely based off
5373 delete_gdb_breakpoint_at.
5374 (delete_gdb_breakpoint): New function.
5375 (clear_gdb_breakpoint_conditions): Rename to ...
5376 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5377 breakpoint.
5378 (add_condition_to_breakpoint): Make static.
5379 (add_breakpoint_condition): Take a struct breakpoint pointer
5380 instead of an address. Adjust.
5381 (gdb_condition_true_at_breakpoint): Rename to ...
5382 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5383 z_type parameter.
5384 (gdb_condition_true_at_breakpoint): Reimplement.
5385 (add_breakpoint_commands): Take a struct breakpoint pointer
5386 instead of an address. Adjust.
5387 (gdb_no_commands_at_breakpoint): Rename to ...
5388 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5389 parameter. Return true if no breakpoint was found. Change debug
5390 output.
5391 (gdb_no_commands_at_breakpoint): Reimplement.
5392 (run_breakpoint_commands): Rename to ...
5393 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5394 and change return type to boolean.
5395 (run_breakpoint_commands): New function.
5396 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5397 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5398 breakpoint. Go through the_target->remove_point instead of
5399 assuming memory breakpoint.
5400 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5401 software and hardware breakpoints.
5402 (reinsert_raw_breakpoint): Go through the_target->insert_point
5403 instead of assuming memory breakpoint.
5404 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5405 software and hardware breakpoints.
5406 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5407 Check both software and hardware breakpoints.
5408 (validate_inserted_breakpoint): Assert the breakpoint is a
5409 software breakpoint. Set the inserted flag to -1 instead of
5410 setting shlib_disabled.
5411 (delete_disabled_breakpoints): Adjust.
5412 (validate_breakpoints): Only validate software breakpoints.
5413 Adjust to inserted flag change.
5414 (check_mem_read, check_mem_write): Skip breakpoint types other
5415 than software breakpoints. Adjust to inserted flag change.
5416 * mem-break.h (enum raw_bkpt_type): New enum.
5417 (raw_breakpoint, struct process_info): Forward declare.
5418 (Z_packet_to_target_hw_bp_type): Delete declaration.
5419 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5420 (set_gdb_breakpoint, delete_gdb_breakpoint)
5421 (clear_breakpoint_conditions): New declarations.
5422 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5423 (breakpoint_inserted_here): Update comment.
5424 (add_breakpoint_condition, add_breakpoint_commands): Replace
5425 address parameter with a breakpoint pointer parameter.
5426 (gdb_breakpoint_here): Update comment.
5427 (delete_gdb_breakpoint_at): Delete.
5428 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5429 * server.c (process_point_options): Take a struct breakpoint
5430 pointer instead of an address. Adjust.
5431 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5432 delete_gdb_breakpoint.
5433 * spu-low.c (spu_target_ops): Install NULL as
5434 supports_z_point_type method.
5435 * target.h: Include mem-break.h.
5436 (struct target_ops) <prepare_to_access_memory>: Update comment.
5437 <supports_z_point_type>: New field.
5438 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5439 instead of a char. Also take a raw breakpoint pointer.
5440 * win32-arm-low.c (the_low_target): Install NULL as
5441 supports_z_point_type.
5442 * win32-i386-low.c (i386_supports_z_point_type): New function.
5443 (i386_insert_point, i386_remove_point): Adjust to new interface.
5444 (the_low_target): Install i386_supports_z_point_type.
5445 * win32-low.c (win32_supports_z_point_type): New function.
5446 (win32_insert_point, win32_remove_point): Adjust to new interface.
5447 (win32_target_ops): Install win32_supports_z_point_type.
5448 * win32-low.h (struct win32_target_ops):
5449 <supports_z_point_type>: New method.
5450 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5451 instead of a char. Also take a raw breakpoint pointer.
5452
5453 2014-05-20 Pedro Alves <palves@redhat.com>
5454
5455 * mem-break.h: Include break-common.h.
5456 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5457 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
5458 (Z_packet_to_target_hw_bp_type): New declaration.
5459 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
5460 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
5461 (Z_PACKET_ACCESS_WP): Delete macros.
5462 (Z_packet_to_hw_type): Delete function.
5463 * i386-low.h: Don't include break-common.h here.
5464 (Z_packet_to_hw_type): Delete declaration.
5465 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
5466 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5467 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
5468 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5469 * linux-aarch64-low.c: Don't include break-common.h here.
5470 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5471 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
5472 (Z_packet_to_target_hw_bp_type): Delete function.
5473 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
5474 function.
5475 (mips_insert_point, mips_remove_point): Use
5476 Z_packet_to_target_hw_bp_type.
5477
5478 2014-05-20 Pedro Alves <palves@redhat.com>
5479
5480 * linux-aarch64-low.c: Include break-common.h.
5481 (enum target_point_type): Delete.
5482 (Z_packet_to_point_type): Rename to ...
5483 (Z_packet_to_target_hw_bp_type): ... this, and return a
5484 target_hw_bp_type instead.
5485 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
5486 instead of an enum target_point_type.
5487 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
5488 breakpoint type.
5489 (aarch64_dr_state_insert_one_point)
5490 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
5491 (aarch64_handle_aligned_watchpoint)
5492 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
5493 Take an enum target_hw_bp_type instead of an enum
5494 target_point_type.
5495 (aarch64_supports_z_point_type): New function.
5496 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
5497 use Z_packet_to_target_hw_bp_type.
5498
5499 2014-05-20 Joel Brobecker <brobecker@adacore.com>
5500
5501 * configure.ac: Only use -Werror by default when DEVELOPMENT
5502 is true.
5503 * configure: Regenerate.
5504
5505 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
5506
5507 Fix gdbserver qGetTLSAddr for x86_64 -m32.
5508 * linux-x86-low.c (X86_64_USER_REGS): New.
5509 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
5510
5511 2014-04-28 Yao Qi <yao@codesourcery.com>
5512
5513 * Makefile.in (i386-avx512.c): Fix the typo of generated file
5514 name.
5515
5516 2014-04-25 Pedro Alves <palves@redhat.com>
5517
5518 PR server/16255
5519 * linux-low.c (linux_attach_fail_reason_string): New function.
5520 (linux_attach_lwp): Delete.
5521 (linux_attach_lwp_1): Rename to ...
5522 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
5523 argument. Remove "initial" parameter. Return int instead of
5524 void. Don't error or warn here.
5525 (linux_attach): Adjust to call linux_attach_lwp. Call error on
5526 failure to attach to the tgid. Call warning when failing to
5527 attach to an lwp.
5528 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
5529 argument. Remove "initial" parameter. Return int instead of
5530 void. Don't error or warn here.
5531 (linux_attach_fail_reason_string): New declaration.
5532 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
5533 interface change. Use linux_attach_fail_reason_string.
5534
5535 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
5536 Walfred Tedeschi <walfred.tedeschi@intel.com>
5537
5538 * Makefile.in: Added rules to handle new files
5539 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
5540 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
5541 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
5542 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
5543 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
5544 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
5545 x32-avx512-linux.o.
5546 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
5547 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
5548 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
5549 i386/x32-avx512.xml.
5550 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
5551 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
5552 i386/x32-avx512-linux.xml.
5553 * i387-fp.c (num_avx512_k_registers): New constant for number
5554 of K registers.
5555 (num_avx512_zmmh_low_registers): New constant for number of
5556 lower ZMM registers (0-15).
5557 (num_avx512_zmmh_high_registers): New constant for number of
5558 higher ZMM registers (16-31).
5559 (num_avx512_ymmh_registers): New contant for number of higher
5560 YMM registers (ymm16-31 added by avx521 on x86_64).
5561 (num_avx512_xmm_registers): New constant for number of higher
5562 XMM registers (xmm16-31 added by AVX512 on x86_64).
5563 (struct i387_xsave): Add space for AVX512 registers.
5564 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
5565 Add code to handle AVX512 registers.
5566 (i387_xsave_to_cache): Add code to handle AVX512 registers.
5567 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
5568 prototypei from generated file.
5569 (tdesc_amd64_avx512_linux): Likewise.
5570 (init_registers_x32_avx512_linux): Likewise.
5571 (tdesc_x32_avx512_linux): Likewise.
5572 (init_registers_i386_avx512_linux): Likewise.
5573 (tdesc_i386_avx512_linux): Likewise.
5574 (x86_64_regmap): Add AVX512 registers.
5575 (x86_linux_read_description): Add code to handle AVX512 XSTATE
5576 mask.
5577 (initialize_low_arch): Add code to initialize AVX512 registers.
5578
5579 2014-04-23 Pedro Alves <palves@redhat.com>
5580
5581 * mem-break.c (find_gdb_breakpoint_at): Make static.
5582 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
5583
5584 2014-04-23 Pedro Alves <palves@redhat.com>
5585
5586 * i386-low.c: Don't include break-common.h here.
5587 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5588 prototype to take target_hw_bp_type as argument instead of a Z
5589 packet char.
5590 * i386-low.h: Include break-common.h here.
5591 (Z_packet_to_hw_type): Declare.
5592 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5593 prototypes.
5594 * linux-x86-low.c (x86_insert_point): Convert the packet number to
5595 a target_hw_bp_type before calling i386_low_insert_watchpoint.
5596 (x86_remove_point): Convert the packet number to a
5597 target_hw_bp_type before calling i386_low_remove_watchpoint.
5598 * win32-i386-low.c (i386_insert_point): Convert the packet number
5599 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
5600 (i386_remove_point): Convert the packet number to a
5601 target_hw_bp_type before calling i386_low_remove_watchpoint.
5602
5603 2014-04-23 Pedro Alves <palves@redhat.com>
5604
5605 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
5606
5607 2014-04-10 Pedro Alves <palves@redhat.com>
5608
5609 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5610 Check if the condition or command is NULL before checking if the
5611 breakpoint is known. On success, return true.
5612 * mem-break.h (add_breakpoint_condition): Document return.
5613 (add_breakpoint_commands): Add describing comment.
5614 * server.c (skip_to_semicolon): New function.
5615 (process_point_options): Use it.
5616
5617 2014-04-09 Pedro Alves <palves@redhat.com>
5618
5619 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
5620 to lwpid_of.
5621
5622 2014-02-27 Pedro Alves <palves@redhat.com>
5623
5624 PR 12702
5625 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
5626 macros.
5627 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
5628 output.
5629 (last_thread_of_process_p): Take a PID argument instead of a
5630 thread pointer.
5631 (linux_wait_for_lwp): Delete.
5632 (num_lwps, check_zombie_leaders, not_stopped_callback): New
5633 functions.
5634 (linux_low_filter_event): New function, party factored out from
5635 linux_wait_for_event.
5636 (linux_wait_for_event): Rename to ...
5637 (linux_wait_for_event_filtered): ... this. Add new filter ptid
5638 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
5639 sigsuspend. Check for zombie leaders.
5640 (linux_wait_for_event): Reimplement as wrapper around
5641 linux_wait_for_event_filtered.
5642 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
5643 a normal or signal exit is seen, it's the whole process exiting.
5644 (wait_for_sigstop): No longer a for_each_inferior callback.
5645 Rewrite on top of linux_wait_for_event_filtered.
5646 (stop_all_lwps): Call wait_for_sigstop directly.
5647 * server.c (resume, handle_target_event): Handle
5648 TARGET_WAITKIND_NO_RESUMED.
5649
5650 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5651
5652 * win32-low.c (psapi_get_dll_name,
5653 * win32_CreateToolhelp32Snapshot): Delete.
5654 (win32_CreateToolhelp32Snapshot, win32_Module32First)
5655 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
5656 Delete.
5657 (handle_load_dll): Add function description.
5658 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
5659
5660 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5661
5662 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
5663 Add comment.
5664 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
5665 base address when calling win32_add_one_solib.
5666 (handle_load_dll): Delete local variable load_addr.
5667 Remove 0x1000 offset applied to DLL base address when calling
5668 win32_add_one_solib.
5669 (handle_unload_dll): Add comment.
5670
5671 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5672
5673 * win32-low.c (win32_add_all_dlls): Renames
5674 win32_ensure_ntdll_loaded. Rewrite function documentation.
5675 Adjust implementation to always load all DLLs.
5676 Add 0x1000 offset to DLL base address when calling
5677 win32_add_one_solib.
5678 (child_initialization_done): New static global.
5679 (do_initial_child_stuff): Set child_initialization_done to
5680 zero during child initialization, and 1 after. Replace call
5681 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
5682 Add comment.
5683 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
5684 (handle_unload_dll): Add function documentation.
5685 (get_child_debug_event): Ignore load and unload DLL events
5686 during child initialization.
5687
5688 2014-02-20 Doug Evans <dje@google.com>
5689
5690 Remove global all_lwps.
5691 * inferiors.h (ptid_of): Move here from linux-low.h.
5692 (pid_of, lwpid_of): Ditto.
5693 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
5694 parameter is a struct thread_info * now.
5695 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
5696 directly. Pass &all_threads to find_inferior instead of &all_lwps.
5697 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
5698 directly.
5699 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
5700 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
5701 * linux-arm-low.c (update_registers_callback): Update, "entry"
5702 parameter is a struct thread_info * now.
5703 Fetch lwpid from current_inferior directly.
5704 (arm_insert_point): Pass &all_threads to find_inferior instead of
5705 &all_lwps.
5706 (arm_remove_point): Ditto.
5707 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
5708 (arm_prepare_to_resume): Fetch pid from thread.
5709 (arm_read_description): Fetch lwpid from current_inferior directly.
5710 * linux-low.c (all_lwps): Delete.
5711 (delete_lwp): Delete call to remove_inferior.
5712 (handle_extended_wait): Fetch lwpid from thread.
5713 (add_lwp): Don't set lwp->entry.id. Remove call to
5714 add_inferior_to_list.
5715 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
5716 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
5717 (kill_one_lwp_callback): Ditto.
5718 (linux_kill): Don't dereference NULL pointer.
5719 Fetch ptid,lwpid from thread.
5720 (get_detach_signal): Fetch ptid from thread.
5721 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
5722 Simplify call to regcache_invalidate_thread.
5723 (delete_lwp_callback): Update, "entry" parameter is a
5724 struct thread_info * now. Fetch pid from thread.
5725 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
5726 (status_pending_p_callback): Update, "entry" parameter is a
5727 struct thread_info * now. Fetch ptid from thread.
5728 (find_lwp_pid): Update, "entry" parameter is a
5729 struct thread_info * now.
5730 (linux_wait_for_lwp): Fetch pid from thread.
5731 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
5732 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
5733 (enqueue_one_deferred_signal): Fetch lwpid from thread.
5734 (dequeue_one_deferred_signal): Ditto.
5735 (cancel_breakpoint): Fetch ptid from current_inferior.
5736 (linux_wait_for_event): Pass &all_threads to find_inferior,
5737 not &all_lwps. Fetch ptid, lwpid from thread.
5738 (count_events_callback): Update, "entry" parameter is a
5739 struct thread_info * now.
5740 (select_singlestep_lwp_callback): Ditto.
5741 (select_event_lwp_callback): Ditto.
5742 (cancel_breakpoints_callback): Ditto.
5743 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
5744 not &all_lwps.
5745 (select_event_lwp): Ditto. Fetch ptid from event_thread.
5746 (unsuspend_one_lwp): Update, "entry" parameter is a
5747 struct thread_info * now.
5748 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
5749 not &all_lwps.
5750 (linux_stabilize_threads): Ditto. And for for_each_inferior.
5751 Fetch lwpid from thread, not lwp.
5752 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
5753 Pass &all_threads to find_inferior, not &all_lwps.
5754 (send_sigstop): Fetch lwpid from thread, not lwp.
5755 (send_sigstop_callback): Update, "entry" parameter is a
5756 struct thread_info * now.
5757 (suspend_and_send_sigstop_callback): Ditto.
5758 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
5759 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
5760 struct thread_info * now.
5761 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
5762 from thread, lwp.
5763 (lwp_running): Update, "entry" parameter is a
5764 struct thread_info * now.
5765 (stop_all_lwps): Fetch ptid from thread.
5766 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
5767 (linux_resume_one_lwp): Fetch lwpid from thread.
5768 (linux_set_resume_request): Update, "entry" parameter is a
5769 struct thread_info * now. Fetch pid, lwpid from thread.
5770 (resume_status_pending_p): Update, "entry" parameter is a
5771 struct thread_info * now.
5772 (need_step_over_p): Ditto. Fetch lwpid from thread.
5773 (start_step_over): Fetch lwpid from thread.
5774 (linux_resume_one_thread): Update, "entry" parameter is a
5775 struct thread_info * now. Fetch lwpid from thread.
5776 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
5777 (proceed_one_lwp): Update, "entry" parameter is a
5778 struct thread_info * now. Fetch lwpid from thread.
5779 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
5780 struct thread_info * now.
5781 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
5782 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
5783 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
5784 directly.
5785 (regsets_store_inferior_registers): Ditto.
5786 (fetch_register, store_register): Ditto.
5787 (linux_read_memory, linux_write_memory): Ditto.
5788 (linux_request_interrupt): Ditto.
5789 (linux_read_auxv): Ditto.
5790 (linux_xfer_siginfo): Ditto.
5791 (linux_qxfer_spu): Ditto.
5792 (linux_qxfer_libraries_svr4): Ditto.
5793 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
5794 moved to inferiors.h.
5795 (get_lwp): Delete.
5796 (get_thread_lwp): Update.
5797 (struct lwp_info): Delete member "entry". Simplify comment for
5798 member "thread".
5799 (all_lwps): Delete.
5800 * linux-mips-low.c (mips_read_description): Fetch lwpid from
5801 current_inferior directly.
5802 (update_watch_registers_callback): Update, "entry" parameter is a
5803 struct thread_info * now. Fetch pid from thread.
5804 (mips_linux_prepare_to_resume): Fetch ptid from thread.
5805 (mips_insert_point): Fetch lwpid from current_inferior.
5806 Pass &all_threads to find_inferior, not &all_lwps.
5807 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
5808 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
5809 directly.
5810 (mips_stopped_data_address): Ditto.
5811 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
5812 directly.
5813 * linux-tile-low.c (tile_arch_setup): Ditto.
5814 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
5815 (update_debug_registers_callback): Update, "entry" parameter is a
5816 struct thread_info * now. Fetch pid from thread.
5817 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
5818 Pass &all_threads to find_inferior, not &all_lwps.
5819 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
5820 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
5821 Pass &all_threads to find_inferior, not &all_lwps.
5822 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
5823 (i386_dr_low_get_status): Ditto.
5824 (x86_linux_prepare_to_resume): Fetch ptid from thread.
5825 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
5826 (x86_linux_read_description): Ditto.
5827 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
5828
5829 2014-02-20 Doug Evans <dje@google.com>
5830
5831 * inferiors.c (get_first_inferior): Fix buglet.
5832
5833 2014-02-19 Doug Evans <dje@google.com>
5834
5835 * gdbthread.h (add_thread): Change result type to struct thread_info *.
5836 * inferiors.c (add_thread): Change result type to struct thread_info *.
5837 All callers updated.
5838 (add_lwp): Call add_thread here instead of in callers.
5839 All callers updated.
5840 * linux-low.h (get_lwp_thread): Rewrite.
5841 (struct lwp_info): New member "thread".
5842
5843 2014-02-19 Doug Evans <dje@google.com>
5844
5845 * linux-low.c (add_lwp): Change result to struct lwp_info *.
5846 All callers updated.
5847
5848 2014-02-19 Doug Evans <dje@google.com>
5849
5850 * inferiors.c (add_thread): Fix whitespace.
5851
5852 2014-02-19 Doug Evans <dje@google.com>
5853
5854 * dll.c (clear_dlls): Replace accessing list implemention details
5855 with API function.
5856 * gdbthread.h (get_first_thread): Declare.
5857 * inferiors.c (for_each_inferior_with_data): New function.
5858 (get_first_thread): New function.
5859 (find_thread_ptid): Simplify.
5860 (get_first_inferior): New function.
5861 (clear_list): Delete.
5862 (one_inferior_p): New function.
5863 (clear_inferior_list): New function.
5864 (clear_inferiors): Update.
5865 * inferiors.h (for_each_inferior_with_data): Declare.
5866 (clear_inferior_list): Declare.
5867 (one_inferior_p): Declare.
5868 (get_first_inferior): Declare.
5869 * linux-low.c (linux_wait_for_event): Replace accessing list
5870 implemention details with API function.
5871 * server.c (target_running): Ditto.
5872 (accumulate_file_name_length): New function.
5873 (emit_dll_description): New function.
5874 (handle_qxfer_libraries): Replace accessing list implemention
5875 details with API function.
5876 (handle_qxfer_threads_worker): New function.
5877 (handle_qxfer_threads_proper): Replace accessing list implemention
5878 details with API function.
5879 (handle_query): Ditto.
5880 (visit_actioned_threads_callback_ftype): New typedef.
5881 (visit_actioned_threads_data): New struct.
5882 (visit_actioned_threads): Rewrite to be find_inferior callback.
5883 (resume): Call find_inferior.
5884 (handle_status): Replace accessing list implemention
5885 details with API function.
5886 (process_serial_event): Replace accessing list implemention details
5887 with API function.
5888 * target.c (set_desired_inferior): Replace accessing list implemention
5889 details with API function.
5890 * tracepoint.c (same_process_p): New function.
5891 (gdb_agent_about_to_close): Replace accessing list implemention
5892 details with API function.
5893 * win32-low.c (child_delete_thread): Replace accessing list
5894 implemention details with API function.
5895 (match_dll_by_basename): New function.
5896 (dll_is_loaded_by_basename): New function.
5897 (win32_ensure_ntdll_loaded): Replace accessing list implemention
5898 details call to dll_is_loaded_by_basename.
5899
5900 2014-02-19 Doug Evans <dje@google.com>
5901
5902 * dll.h (struct dll_info): Add comment.
5903 * gdbthread.h (struct thread_info): Add comment.
5904 (current_ptid): Simplify.
5905 * inferiors.c (add_process): Update.
5906 (remove_process): Update.
5907 * inferiors.h (struct process_info): Rename member "head" to "entry".
5908 * linux-low.c (delete_lwp): Update.
5909 (add_lwp): Update.
5910 (last_thread_of_process_p): Update.
5911 (kill_one_lwp_callback, linux_kill): Update.
5912 (status_pending_p_callback): Update.
5913 (wait_for_sigstop): Update. Simplify read of ptid.
5914 (start_step_over): Update.
5915 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
5916 (get_lwp_thread): Update.
5917 (struct lwp_info): Rename member "head" to "entry".
5918 * regcache.h (inferior_list_entry): Delete.
5919 * server.c (kill_inferior_callback): Update.
5920 (detach_or_kill_inferior_callback): Update.
5921 (print_started_pid): Update.
5922 (print_attached_pid): Update.
5923 (process_serial_event): Simplify read of ptid.
5924 * thread-db.c (thread_db_create_event): Update.
5925 (thread_db_get_tls_address): Update.
5926 * win32-low.c (current_inferior_ptid): Simplify.
5927
5928 2014-02-19 Tom Tromey <tromey@redhat.com>
5929
5930 * target.h (struct target_ops) <supports_btrace>: Add target_ops
5931 argument.
5932 (target_supports_btrace): Update.
5933
5934 2014-02-14 Yao Qi <yao@codesourcery.com>
5935
5936 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
5937 (rsp-low-ipa.o): New target.
5938
5939 2014-02-12 Tom Tromey <tromey@redhat.com>
5940
5941 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
5942 convert_ascii_to_int.
5943 * regcache.c (registers_to_string): Likewise.
5944 * remote-utils.c (decode_M_packet): Likewise.
5945 * server.c (process_serial_event): Likewise.
5946
5947 2014-02-12 Tom Tromey <tromey@redhat.com>
5948
5949 * server.c (handle_query, handle_v_run): Use hex2bin, not
5950 unhexify.
5951 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
5952
5953 2014-02-12 Tom Tromey <tromey@redhat.com>
5954
5955 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
5956 convert_int_to_ascii.
5957 * regcache.c (registers_to_string, collect_register_as_string):
5958 Likewise.
5959 * remote-utils.c (look_up_one_symbol, relocate_instruction):
5960 Likewise.
5961 * server.c (process_serial_event): Likewise.
5962 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
5963 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
5964
5965 2014-02-12 Tom Tromey <tromey@redhat.com>
5966
5967 * remote-utils.c (look_up_one_symbol, monitor_output): Use
5968 bin2hex, not hexify.
5969 * tracepoint.c (cmd_qtstatus): Likewise.
5970
5971 2014-02-12 Tom Tromey <tromey@redhat.com>
5972
5973 * remote-utils.c (monitor_output): Pass explicit length to
5974 hexify.
5975
5976 2014-02-12 Tom Tromey <tromey@redhat.com>
5977
5978 * tracepoint.c: Include rsp-low.h.
5979 * server.c: Include rsp-low.h.
5980 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
5981 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
5982 declare.
5983 * remote-utils.c: Include rsp-low.h.
5984 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
5985 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
5986 (convert_int_to_ascii, convert_ascii_to_int): Move to
5987 common/rsp-low.c.
5988 * regcache.c: Include rsp-low.h.
5989 * ax.c: Include rsp-low.h.
5990 * Makefile.in (SFILES): Add common/rsp-low.c.
5991 (OBS): Add rsp-low.o.
5992 (rsp-low.o): New target.
5993
5994 2014-02-12 Tom Tromey <tromey@redhat.com>
5995
5996 * utils.h (pulongest, plongest, phex_nz): Don't declare.
5997 Include print-utils.h.
5998 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
5999 (plongest, thirty_two, phex_nz): Remove.
6000 * Makefile.in (SFILES): Add common/print-utils.c.
6001 (OBS): Add print-utils.o.
6002 (print-utils-ipa.o): New target.
6003 (print-utils.o): New target.
6004 (IPA_OBJS): Add print-utils-ipa.o.
6005
6006 2014-02-06 Tom Tromey <tromey@redhat.com>
6007
6008 * Makefile.in (SFILES): Fix indentation.
6009
6010 2014-02-05 Doug Evans <dje@google.com>
6011
6012 * linux-low.c (linux_wait_for_event): Improve comment.
6013 (linux_wait_1): Keep current_inferior in sync with event_child.
6014
6015 2014-01-22 Doug Evans <dje@google.com>
6016
6017 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6018
6019 2014-01-22 Doug Evans <dje@google.com>
6020
6021 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6022 * configure: Regenerate.
6023 * config.in: Regenerate.
6024 * Makefile.in (SFILES): Add debug.c.
6025 (OBS): Add debug.o.
6026 * debug.c: New file.
6027 * debug.h: New file.
6028 * linux-aarch64-low.c (*): Update all debugging printfs to use
6029 debug_printf instead of fprintf.
6030 * linux-arm-low.c (*): Ditto.
6031 * linux-cris-low.c (*): Ditto.
6032 * linux-crisv32-low.c (*): Ditto.
6033 * linux-m32r-low.c (*): Ditto.
6034 * linux-sparc-low.c (*): Ditto.
6035 * linux-x86.c (*): Ditto.
6036 * linux-low.c (*): Ditto.
6037 (linux_wait_1): Add calls to debug_enter, debug_exit.
6038 (linux_wait): Remove redundant debugging printf.
6039 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6040 (linux_resume, unstop_all_lwps): Ditto.
6041 * mem-break.c (*): Update all debugging printfs to use
6042 debug_printf instead of fprintf.
6043 * remote-utils.c (*): Ditto.
6044 * thread-db.c (*): Ditto.
6045 * server.c #include <ctype.h>, "gdb_vecs.h".
6046 (debug_threads): Moved to debug.c.
6047 (*): Update all debugging printfs to use debug_printf instead of
6048 fprintf.
6049 (start_inferior): Replace call to fflush with call to debug_flush.
6050 (monitor_show_help): Mention set debug-format.
6051 (parse_debug_format_options): New function.
6052 (handle_monitor_command): Handle "monitor set debug-format".
6053 (gdbserver_usage): Mention --debug-format.
6054 (main): Parse --debug-format.
6055 * server.h (debug_threads): Declaration moved to debug.h.
6056 #include "debug.h".
6057 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6058 trace_debug_1 that uses debug_printf.
6059 (tracepoint_look_up_symbols): Update all debugging printfs to use
6060 debug_printf instead of fprintf.
6061
6062 2014-01-20 Baruch Siach <baruch@tkos.co.il>
6063
6064 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6065 sys/ptrace.h.
6066
6067 2014-01-17 Pedro Alves <palves@redhat.com>
6068
6069 PR build/16445
6070 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6071 defined after including gdb_proc_service.h.
6072
6073 2014-01-16 Doug Evans <dje@google.com>
6074
6075 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6076 (match_dll): Use it.
6077
6078 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6079
6080 * target.h (target_ops) <read_btrace>: Change parameters and
6081 return type to allow error reporting.
6082 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6083 trace reading errors on.
6084 * linux-low.c (linux_low_read_btrace): Pass trace reading
6085 errors on.
6086 (linux_low_disable_btrace): New.
6087
6088 2014-01-15 Doug Evans <dje@google.com>
6089
6090 * inferiors.c (thread_id_to_gdb_id): Delete.
6091 * inferiors.h (thread_id_to_gdb_id): Delete.
6092
6093 2014-01-13 Eli Zaretskii <eliz@gnu.org>
6094
6095 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6096 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6097 versions.
6098
6099 2014-01-08 Pedro Alves <palves@redhat.com>
6100
6101 * server.c (handle_status): Don't discard previous queued stop
6102 replies or thread's pending status here.
6103 (main) <disconnection>: Do it here instead.
6104
6105 2014-01-08 Pedro Alves <palves@redhat.com>
6106
6107 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6108 * server.c (visit_actioned_threads, handle_pending_status): New
6109 function.
6110 (handle_v_cont): Factor out parts to ...
6111 (resume): ... this new function. If in all-stop, and a thread
6112 being resumed has a pending status, report it without actually
6113 resuming.
6114 (myresume): Adjust to use the new 'resume' function.
6115 (clear_pending_status_callback, set_pending_status_callback)
6116 (find_status_pending_thread_callback): New functions.
6117 (handle_status): Handle the case of multiple threads having
6118 interesting statuses to report. Report threads' real last signal
6119 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6120 with an interesting thread to report the status for, instead of
6121 always reporting the status of the first thread.
6122
6123 2014-01-01 Joel Brobecker <brobecker@adacore.com>
6124
6125 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6126 * gdbreplay.c (gdbreplay_version): Likewise.
6127
6128 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6129
6130 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6131 iov.iov_len with the real length in use.
6132
6133 2013-12-13 Joel Brobecker <brobecker@adacore.com>
6134
6135 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6136 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6137 for all targets that use win32-low.c.
6138 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6139 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6140
6141 2013-12-13 Pedro Alves <palves@redhat.com>
6142
6143 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6144 if equal to TARGET_WAITKIND_LOADED.
6145 * win32-low.c (cached_status): New static global.
6146 (win32_wait): Add declaration.
6147 (do_initial_child_stuff): Flush all initial pending debug events
6148 up to the initial breakpoint.
6149 (win32_wait): If CACHED_STATUS was set, return that instead
6150 of doing a real wait. Remove the code resuming the execution
6151 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6152 during the initial phase. Also remove the code changing
6153 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6154 TARGET_WAITKIND_STOPPED.
6155
6156 2013-12-11 Yao Qi <yao@codesourcery.com>
6157
6158 * notif.c (handle_notif_ack): Return 0 if no notification
6159 matches.
6160
6161 2013-11-20 Doug Evans <dje@google.com>
6162
6163 * linux-low.c (linux_set_resume_request): Fix comment.
6164
6165 2013-11-20 Doug Evans <dje@google.com>
6166
6167 * linux-low.c (resume_status_pending_p): Tweak comment.
6168
6169 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6170
6171 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6172 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6173 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6174 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6175 (srv_amd64_regobj): Add amd64-mpx.o.
6176 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6177 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6178 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6179 * i387-fp.c (num_pl_bnd_register) Added constant.
6180 (num_pl_bnd_cfg_registers) Added constant.
6181 (struct i387_xsave) Added reserved area and MPX fields.
6182 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6183 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6184 function.
6185 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6186 (init_registers_amd64_mpx_linux): Declare new function.
6187 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6188 (x86_64_regmap): Add MPX registers.
6189 (x86_linux_read_description): Add MPX case.
6190 (initialize_low_arch): Initialize MPX targets.
6191
6192 2013-11-18 Tom Tromey <tromey@redhat.com>
6193
6194 * configure: Rebuild.
6195 * configure.ac: Don't check for stdlib.h.
6196 * gdbreplay.c: Unconditionally include stdlib.h.
6197
6198 2013-11-18 Tom Tromey <tromey@redhat.com>
6199
6200 * config.in: Rebuild.
6201 * configure: Rebuild.
6202 * configure.ac: Don't use AC_HEADER_DIRENT.
6203
6204 2013-11-18 Tom Tromey <tromey@redhat.com>
6205
6206 * server.h: Don't check HAVE_STRING_H.
6207 * gdbreplay.c: Don't check HAVE_STRING_H.
6208 * configure: Rebuild.
6209
6210 2013-11-18 Tom Tromey <tromey@redhat.com>
6211
6212 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6213 LIBGNU.
6214
6215 2013-11-08 Tom Tromey <tromey@redhat.com>
6216
6217 * configure, config.in: Rebuild.
6218 * configure.ac: Remove unused configury.
6219
6220 2013-11-08 Tom Tromey <tromey@redhat.com>
6221
6222 * acinclude.m4: Include common.m4, codeset.m4.
6223 * configure, config.in: Rebuild.
6224 * configure.ac: Use GDB_AC_COMMON.
6225
6226 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6227
6228 * linux-s390-low.c (HWCAP_S390_TE): New define.
6229 (s390_arch_setup): Consider the TE field in the HWCAP for
6230 determining 'have_regset_tdb'.
6231
6232 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6233
6234 PR gdb/16014
6235 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6236 call to sizeof.
6237
6238 2013-10-02 Pedro Alves <palves@redhat.com>
6239
6240 * server.c (process_serial_event): Don't output "GDBserver
6241 exiting" if GDB is connected through stdio.
6242 * target.c (mywait): Likewise, be silent if GDB is connected
6243 through stdio.
6244
6245 2013-10-01 Joel Brobecker <brobecker@adacore.com>
6246
6247 * lynx-low.c (lynx_add_threads_after_attach): New function.
6248 (lynx_attach): Remove call to add_thread. Add call to
6249 lynx_add_threads_after_attach instead.
6250
6251 2013-09-28 Mike Frysinger <vapier@gentoo.org>
6252
6253 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6254 * config.in, configure: Regenerated.
6255
6256 2013-09-18 Yao Qi <yao@codesourcery.com>
6257
6258 PR server/15959
6259 * server.c (start_inferior): Clear 'resume_info'.
6260
6261 2013-09-16 Jiong Wang <jiwang@tilera.com>
6262
6263 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6264 for each register.
6265
6266 2013-09-16 Jiong Wang <jiwang@tilera.com>
6267
6268 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6269 linux-tile-low.o to srv_tgtobj.
6270
6271 2013-09-16 Will Newton <will.newton@linaro.org>
6272
6273 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6274 out regs.
6275
6276 2013-09-06 Pedro Alves <palves@redhat.com>
6277
6278 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6279 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6280 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6281 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6282 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6283 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6284
6285 2013-09-06 Pedro Alves <palves@redhat.com>
6286
6287 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6288 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6289
6290 2013-09-06 Pedro Alves <palves@redhat.com>
6291
6292 * linux-amd64-ipa.c: Include tracepoint.h.
6293 * linux-i386-ipa.c: Include tracepoint.h.
6294
6295 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
6296
6297 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6298 (ps_get_thread_area): New function.
6299
6300 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
6301
6302 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6303 (initialize_low_arch): Call init_registers_crisv32 rather than
6304 init_register_crisv32.
6305
6306 2013-09-05 Pedro Alves <palves@redhat.com>
6307
6308 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6309 to ...
6310 * hostio.h: ... this new file.
6311 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6312 win32-low.c: Include hostio.h.
6313
6314 2013-09-05 Pedro Alves <palves@redhat.com>
6315
6316 * server.h (gdb_client_data, handler_func, callback_handler_func)
6317 (delete_file_handler, add_file_handler, append_callback_event)
6318 (delete_callback_event, start_event_loop, initialize_event_loop):
6319 Move to event-loop.h and include it.
6320 * event-loop.h: New file.
6321
6322 2013-09-05 Pedro Alves <palves@redhat.com>
6323
6324 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6325 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6326 (loaded_dll, unloaded_dll): Move to ...
6327 * dll.h: ... this new file.
6328 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6329
6330 2013-09-05 Pedro Alves <palves@redhat.com>
6331
6332 * server.h (current_process, get_thread_process, all_processes)
6333 (add_inferior_to_list, for_each_inferior, current_inferior)
6334 (remove_inferior, add_process, remove_process, find_process_pid)
6335 (have_started_inferiors_p, have_attached_inferiors_p)
6336 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6337 (clear_inferiors, find_inferior, find_inferior_id)
6338 (inferior_target_data, set_inferior_target_data)
6339 (inferior_regcache_data, set_inferior_regcache_data): Move to
6340 inferiors.h, and include it.
6341 * inferiors.h: New file.
6342
6343 2013-09-05 Pedro Alves <palves@redhat.com>
6344
6345 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6346 Move ...
6347 * ax.h: ... here.
6348
6349 2013-09-05 Pedro Alves <palves@redhat.com>
6350
6351 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6352 tracepoint.h.
6353 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6354 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6355 (handle_tracepoint_general_set, handle_tracepoint_query)
6356 (tracepoint_finished_step, tracepoint_was_hit)
6357 (release_while_stepping_state_list, current_traceframe)
6358 (in_readonly_region, traceframe_read_mem)
6359 (fetch_traceframe_registers, traceframe_read_sdata)
6360 (traceframe_read_info, struct fast_tpoint_collect_status)
6361 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6362 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6363 (supply_fast_tracepoint_registers)
6364 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6365 (ipa_tdesc, claim_trampoline_space)
6366 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6367 (agent_mem_read, agent_get_trace_state_variable_value)
6368 (agent_set_trace_state_variable_value, agent_tsv_read)
6369 (agent_mem_read_string, get_raw_reg_func_addr)
6370 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6371 * tracepoint.h: ... this new file.
6372
6373 2013-09-05 Pedro Alves <palves@redhat.com>
6374
6375 * server.h (perror_with_name, error, fatal, warning, paddress)
6376 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6377 include it.
6378 * utils.h: New file.
6379
6380 2013-09-05 Pedro Alves <palves@redhat.com>
6381
6382 * server.h (remote_debug, noack_mode, transport_is_reliable)
6383 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6384 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6385 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6386 (write_enn, initialize_async_io, enable_async_io)
6387 (disable_async_io, check_remote_input_interrupt_request)
6388 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6389 (dead_thread_notify, prepare_resume_reply)
6390 (decode_address_to_semicolon, decode_address, decode_m_packet)
6391 (decode_M_packet, decode_X_packet, decode_xfer_write)
6392 (decode_search_memory_packet, unhexify, hexify)
6393 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6394 (look_up_one_symbol, relocate_instruction)
6395 (monitor_output): Move to remote-utils.h, and include it.
6396 * remote-utils.h: New file.
6397
6398 2013-09-05 Pedro Alves <palves@redhat.com>
6399
6400 * server.h (_): Delete.
6401
6402 2013-09-02 Pedro Alves <palves@redhat.com>
6403
6404 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6405 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6406 allocated.
6407 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6408
6409 2013-09-02 Pierre Muller <muller@sourceware.org>
6410
6411 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6412 or WriteProcessMemory complete successfully and handle
6413 ERROR_PARTIAL_COPY error.
6414
6415 2013-09-02 Pedro Alves <palves@redhat.com>
6416
6417 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6418 error instead of EIO.
6419
6420 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6421
6422 PR server/15604
6423 * linux-low.c: Include filestuff.h.
6424 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6425 * lynx-low.c: Include filestuff.h.
6426 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6427 * server.c: Include filestuff.h.
6428 (main): Call notice_open_fds.
6429 * spu-low.c: Include filestuff.h.
6430 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6431
6432 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
6433
6434 * Makefile.in: Explain why ../target and ../nat are not
6435 listed as include file search paths.
6436 (linux-waitpid.o): New object file rule.
6437 * configure.srv (srv_native_linux_obj): New variable.
6438 Replace all occurrences of linux native object files with
6439 $srv_native_linux_obj.
6440 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6441 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6442 (linux_enable_event_reporting): Remove declaration.
6443 (my_waitpid): Moved to common/linux-waitpid.c.
6444 (linux_wait_for_event): Pass ptid when calling
6445 linux_enable_event_reporting.
6446 (linux_supports_tracefork_flag): Remove.
6447 (linux_enable_event_reporting): Likewise.
6448 (linux_tracefork_grandchild): Remove.
6449 (STACK_SIZE): Moved to common/linux-ptrace.c.
6450 (linux_tracefork_child): Remove.
6451 (linux_test_for_tracefork): Remove.
6452 (linux_look_up_symbols): Call linux_supports_traceclone.
6453 (initialize_low): Remove call to linux_test_for_tracefork.
6454 * linux-low.h (PTRACE_TYPE_ARG3): Move to
6455 common/linux-ptrace.h.
6456 (PTRACE_TYPE_ARG4): Likewise.
6457 Include linux-ptrace.h.
6458
6459 2013-08-21 Pedro Alves <palves@redhat.com>
6460
6461 * config.in: Renegerate.
6462
6463 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
6464
6465 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
6466 (SFILES): Remove $(srcdir)/common/target-common.c and
6467 add $(srcdir)/target/waitstatus.c.
6468 (OBS): Remove target-common.o and add waitstatus.o.
6469 (server_h): Remove $(srcdir)/../common/target-common.h and
6470 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
6471 and $(srcdir)/../target/waitstatus.h.
6472 (target-common.o): Remove.
6473 (waitstatus.o): New target object file.
6474 * target.h: Do not include target-common.h and
6475 include target/resume.h, target/wait.h and
6476 target/waitstatus.h.
6477
6478 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
6479
6480 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6481 to PTRACE_TYPE_ARG3.
6482 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6483 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
6484 PTRACE_TYPE_ARG4.
6485 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
6486 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
6487
6488 2013-07-27 Jie Zhang <jie@codesourcery.com>
6489 Daniel Jacobowitz <dan@codesourcery.com>
6490 Yao Qi <yao@codesourcery.com>
6491
6492 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
6493 (mips-linux-watch.o): New rule.
6494 (mips_linux_watch_h): New variable.
6495 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
6496 srv_tgtobj.
6497 * linux-mips-low.c: Include mips-linux-watch.h.
6498 (struct arch_process_info, struct arch_lwp_info): New.
6499 (update_watch_registers_callback): New function.
6500 (mips_linux_new_process, mips_linux_new_thread) New functions.
6501 (mips_linux_prepare_to_resume, mips_insert_point): New
6502 functions.
6503 (mips_remove_point, mips_stopped_by_watchpoint): New
6504 functions.
6505 (rsp_bp_type_to_target_hw_bp_type): New function.
6506 (mips_stopped_data_address): New function.
6507 (the_low_target): Add watchpoint support functions.
6508
6509 2013-07-27 Yao Qi <yao@codesourcery.com>
6510
6511 * i386-low.c: Include break-common.h.
6512 (enum target_hw_bp_type): Remove.
6513
6514 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
6515
6516 * Makefile.in (SFILES): /common/target-common.c.
6517 (OBS): Add target-common.o.
6518 (server_h): Add $(srcdir)/../common/target-common.h.
6519 (target-common.o): New target.
6520 * server.c (queue_stop_reply_callback): Free
6521 status string after use.
6522 * target.c (target_waitstatus_to_string): Remove.
6523 * target.h: Include target-common.h.
6524 (resume_kind): Likewise.
6525 (target_waitkind): Likewise.
6526 (target_waitstatus): Likewise.
6527 (TARGET_WNOHANG): Likewise.
6528
6529 2013-07-04 Yao Qi <yao@codesourcery.com>
6530
6531 * Makefile.in (host_alias): Use @host_noncanonical@.
6532 (target_alias): Use @target_noncanonical@.
6533 * configure.ac: Use ACX_NONCANONICAL_TARGET and
6534 ACX_NONCANONICAL_HOST.
6535 * configure: Regenerated.
6536
6537 Revert:
6538 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6539
6540 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6541 * configure: Rebuild.
6542 * Makefile.in (version_host, version_target): Get from configure.
6543 (version.c): Use $(version_host) and $(version_target).
6544
6545 2013-07-03 Pedro Alves <palves@redhat.com>
6546
6547 * Makefile.in (config.status): Depend on development.sh.
6548 * acinclude.m4: Include libmcheck.m4.
6549 * configure: Regenerate.
6550
6551 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6552
6553 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
6554 attribute inside the parentheses.
6555 (winapi_DebugSetProcessKillOnExit): Ditto.
6556 (winapi_DebugBreakProcess): Ditto.
6557 (winapi_GenerateConsoleCtrlEvent): Ditto.
6558
6559 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6560
6561 * notif.h (notif_event): Add a dummy member to avoid compiler
6562 errors.
6563
6564 2013-07-01 Pedro Alves <palves@redhat.com>
6565
6566 * hostio.c (HOSTIO_PATH_MAX): Define.
6567 (require_filename, handle_open, handle_unlink, handle_readlink):
6568 Use it.
6569
6570 2013-07-01 Pedro Alves <palves@redhat.com>
6571
6572 * server.h: Include "pathmax.h".
6573 * linux-low.c: Don't include sys/param.h.
6574 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
6575 MAXPATHLEN.
6576 * win32-low.c: Don't include sys/param.h.
6577 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
6578
6579 2013-07-01 Pedro Alves <palves@redhat.com>
6580
6581 * event-loop.c: Don't check HAVE_UNISTD_H before including
6582 <unistd.h>.
6583 * gdbreplay.c: Likewise.
6584 * remote-utils.c: Likewise.
6585 * server.c: Likewise.
6586 * configure.ac: Don't check for unistd.h.
6587 * configure: Regenerate.
6588
6589 2013-06-28 Tom Tromey <tromey@redhat.com>
6590
6591 * Makefile.in (version.c): Use version.in, not
6592 common/version.in.
6593
6594 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6595
6596 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6597 * configure: Rebuild.
6598 * Makefile.in (version_host, version_target): Get from configure.
6599 (version.c): Use $(version_host) and $(version_target).
6600
6601 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6602
6603 Fix trace-status to output user name without trailing colon.
6604 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
6605
6606 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6607
6608 Fix trace-status to output proper start-time and stop-time.
6609 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
6610 output start time and stop time in hex as gdb expects.
6611
6612 2013-06-26 Pedro Alves <pedro@codesourcery.com>
6613
6614 * tracepoint.c (build_traceframe_info_xml): Output trace state
6615 variables present in the trace buffer.
6616
6617 2013-06-24 Tom Tromey <tromey@redhat.com>
6618
6619 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
6620 create-version.sh.
6621 (version.o): Remove.
6622 * gdbreplay.c: Include version.h.
6623 (version, host_name): Don't declare.
6624 * server.h: Include version.h.
6625 (version, host_name): Don't declare.
6626
6627 2013-06-12 Pedro Alves <palves@redhat.com>
6628
6629 * linux-x86-low.c (linux_is_elf64): Delete global.
6630 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
6631 with local linux_pid_exe_is_elf_64_file use.
6632
6633 2013-06-11 Pedro Alves <palves@redhat.com>
6634
6635 * linux-low.c (regset_disabled, disable_regset): New functions.
6636 (regsets_fetch_inferior_registers)
6637 (regsets_store_inferior_registers): Use them.
6638 (initialize_regsets_info); Don't allocate the disabled_regsets
6639 array here.
6640 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
6641 comment.
6642
6643 2013-06-11 Pedro Alves <palves@redhat.com>
6644
6645 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
6646 xmalloc.
6647
6648 2013-06-11 Pedro Alves <palves@redhat.com>
6649
6650 * linux-x86-low.c (initialize_low_arch): Call
6651 init_registers_x32_avx_linux.
6652
6653 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
6654
6655 Fix compatibility with Android Bionic.
6656 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
6657 it is not empty.
6658
6659 2013-06-07 Pedro Alves <palves@redhat.com>
6660
6661 PR server/14823
6662 * Makefile.in (OBS): Add tdesc.o.
6663 (IPA_OBJS): Add tdesc-ipa.o.
6664 (tdesc-ipa.o): New rule.
6665 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
6666 interface.
6667 * linux-low.c (new_inferior): Delete.
6668 (disabled_regsets, num_regsets): Delete.
6669 (linux_add_process): Adjust to set the new per-process
6670 new_inferior flag.
6671 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
6672 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
6673 was a stop. When calling arch_setup, switch the current inferior
6674 to the thread that got an event.
6675 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
6676 (regsets_fetch_inferior_registers)
6677 (regsets_store_inferior_registers): New regsets_info parameter.
6678 Adjust to use it.
6679 (linux_register_in_regsets): New regs_info parameter. Adjust to
6680 use it.
6681 (register_addr, fetch_register, store_register): New usrregs_info
6682 parameter. Adjust to use it.
6683 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
6684 parameter regs_info. Adjust to use it.
6685 (linux_fetch_registers): Get the current inferior's regs_info, and
6686 adjust to use it.
6687 (linux_store_registers): Ditto.
6688 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
6689 (initialize_low): Don't initialize the target_regsets here. Call
6690 initialize_low_arch.
6691 * linux-low.h (target_regsets): Delete declaration.
6692 (struct regsets_info): New.
6693 (struct usrregs_info): New.
6694 (struct regs_info): New.
6695 (struct process_info_private) <new_inferior>: New field.
6696 (struct linux_target_ops): Delete the num_regs, regmap, and
6697 regset_bitmap fields. New field regs_info.
6698 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
6699 * i387-fp.c (num_xmm_registers): Delete.
6700 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
6701 calls to new interface.
6702 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
6703 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
6704 Infer the number of xmm registers from the regcache's target
6705 description.
6706 * i387-fp.h (num_xmm_registers): Delete.
6707 * inferiors.c (add_thread): Don't install the thread's regcache
6708 here.
6709 * proc-service.c (gregset_info): Fetch the current inferior's
6710 regs_info. Adjust to use it.
6711 * regcache.c: Include tdesc.h.
6712 (register_bytes, reg_defs, num_registers)
6713 (gdbserver_expedite_regs): Delete.
6714 (get_thread_regcache): If the thread doesn't have a regcache yet,
6715 create one, instead of aborting gdbserver.
6716 (regcache_invalidate_one): Rename to ...
6717 (regcache_invalidate_thread): ... this.
6718 (regcache_invalidate_one): New.
6719 (regcache_invalidate): Only invalidate registers of the current
6720 process.
6721 (init_register_cache): Add target_desc parameter, and use it.
6722 (new_register_cache): Ditto. Assert the target description has a
6723 non zero registers_size.
6724 (regcache_cpy): Add assertions. Adjust.
6725 (realloc_register_cache, set_register_cache): Delete.
6726 (registers_to_string, registers_from_string): Adjust.
6727 (find_register_by_name, find_regno, find_register_by_number)
6728 (register_cache_size): Add target_desc parameter, and use it.
6729 (free_register_cache_thread, free_register_cache_thread_one)
6730 (regcache_release, register_cache_size): New.
6731 (register_size): Add target_desc parameter, and use it.
6732 (register_data, supply_register, supply_register_zeroed)
6733 (supply_regblock, supply_register_by_name, collect_register)
6734 (collect_register_as_string, collect_register_by_name): Adjust.
6735 * regcache.h (struct target_desc): Forward declare.
6736 (struct regcache) <tdesc>: New field.
6737 (init_register_cache, new_register_cache): Add target_desc
6738 parameter.
6739 (regcache_invalidate_thread): Declare.
6740 (regcache_invalidate_one): Delete declaration.
6741 (regcache_release): Declare.
6742 (find_register_by_number, register_cache_size, register_size)
6743 (find_regno): Add target_desc parameter.
6744 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
6745 declarations.
6746 * remote-utils.c: Include tdesc.h.
6747 (outreg, prepare_resume_reply): Adjust.
6748 * server.c: Include tdesc.h.
6749 (gdbserver_xmltarget): Delete declaration.
6750 (get_features_xml, process_serial_event): Adjust.
6751 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
6752 declare.
6753 (struct process_info) <tdesc>: New field.
6754 (ipa_tdesc): Declare.
6755 * tdesc.c: New file.
6756 * tdesc.h: New file.
6757 * tracepoint.c: Include tdesc.h.
6758 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
6759 (get_context_regcache): Adjust to pass ipa_tdesc down.
6760 (do_action_at_tracepoint): Adjust to get the register cache size
6761 from the context regcache's description.
6762 (traceframe_walk_blocks): Adjust to get the register cache size
6763 from the current trace frame's description.
6764 (traceframe_get_pc): Adjust to get current trace frame's
6765 description and pass it down.
6766 (gdb_collect): Adjust to get the register cache size from the
6767 IPA's description.
6768 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
6769 (gdbserver_xmltarget): Delete.
6770 (initialize_low_tracepoint): Set the ipa's target description.
6771 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
6772 (initialize_low_tracepoint): Set the ipa's target description.
6773 * linux-x86-low.c: Include tdesc.h.
6774 [__x86_64__] (is_64bit_tdesc): New.
6775 (ps_get_thread_area, x86_get_thread_area): Use it.
6776 (i386_cannot_store_register): Rename to ...
6777 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
6778 (i386_cannot_fetch_register): Rename to ...
6779 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
6780 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
6781 to new interface.
6782 (target_regsets): Rename to ...
6783 (x86_regsets): ... this.
6784 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
6785 interface.
6786 (x86_siginfo_fixup): Use is_64bit_tdesc.
6787 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
6788 (tdesc_x32_avx_linux, tdesc_x32_linux)
6789 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
6790 Declare.
6791 (x86_linux_update_xmltarget): Delete.
6792 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
6793 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
6794 (AMD64_LINUX_USER64_CS): New.
6795 (x86_linux_read_description): New, based on
6796 x86_linux_update_xmltarget.
6797 (same_process_callback): New.
6798 (x86_arch_setup_process_callback): New.
6799 (x86_linux_update_xmltarget): New.
6800 (x86_regsets_info): New.
6801 (amd64_linux_regs_info): New.
6802 (i386_linux_usrregs_info): New.
6803 (i386_linux_regs_info): New.
6804 (x86_linux_regs_info): New.
6805 (x86_arch_setup): Reimplement.
6806 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
6807 (x86_emit_ops): Ditto.
6808 (the_low_target): Adjust. Install x86_linux_regs_info,
6809 x86_cannot_fetch_register, and x86_cannot_store_register.
6810 (initialize_low_arch): New.
6811 * linux-ia64-low.c (tdesc_ia64): Declare.
6812 (ia64_fetch_register): Adjust.
6813 (ia64_usrregs_info, regs_info): New globals.
6814 (ia64_regs_info): New function.
6815 (the_low_target): Adjust.
6816 (initialize_low_arch): New function.
6817 * linux-sparc-low.c (tdesc_sparc64): Declare.
6818 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
6819 Adjust.
6820 (sparc_arch_setup): New function.
6821 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
6822 (the_low_target): Adjust.
6823 (initialize_low_arch): New function.
6824 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
6825 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
6826 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
6827 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
6828 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
6829 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
6830 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
6831 (tdesc_powerpc_isa205_vsx64l): Declare.
6832 (ppc_cannot_store_register, ppc_collect_ptrace_register)
6833 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
6834 (ppc_set_pc, ppc_get_hwcap): Adjust.
6835 (ppc_usrregs_info): Forward declare.
6836 (!__powerpc64__) ppc_regmap_adjusted: New global.
6837 (ppc_arch_setup): Adjust to the current process'es target
6838 description.
6839 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
6840 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
6841 (ppc_store_evrregset): Adjust.
6842 (target_regsets): Rename to ...
6843 (ppc_regsets): ... this, and make static.
6844 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
6845 (ppc_regs_info): New function.
6846 (the_low_target): Adjust.
6847 (initialize_low_arch): New function.
6848 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
6849 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
6850 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
6851 (tdesc_s390x_linux64v2): Declare.
6852 (s390_collect_ptrace_register, s390_supply_ptrace_register)
6853 (s390_fill_gregset, s390_store_last_break): Adjust.
6854 (target_regsets): Rename to ...
6855 (s390_regsets): ... this, and make static.
6856 (s390_get_pc, s390_set_pc): Adjust.
6857 (s390_get_hwcap): New target_desc parameter, and use it.
6858 [__s390x__] (have_hwcap_s390_high_gprs): New global.
6859 (s390_arch_setup): Adjust to set the current process'es target
6860 description. Don't adjust the regmap.
6861 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
6862 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
6863 (regs_info_3264): New globals.
6864 (s390_regs_info): New function.
6865 (the_low_target): Adjust.
6866 (initialize_low_arch): New function.
6867 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
6868 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
6869 [__mips64] (init_registers_mips_linux)
6870 (init_registers_mips_dsp_linux): Delete defines.
6871 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
6872 (have_dsp): New global.
6873 (mips_read_description): New, based on mips_arch_setup.
6874 (mips_arch_setup): Reimplement.
6875 (get_usrregs_info): New function.
6876 (mips_cannot_fetch_register, mips_cannot_store_register)
6877 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
6878 (mips_fill_fpregset, mips_store_fpregset): Adjust.
6879 (target_regsets): Rename to ...
6880 (mips_regsets): ... this, and make static.
6881 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
6882 (dsp_regs_info, regs_info): New globals.
6883 (mips_regs_info): New function.
6884 (the_low_target): Adjust.
6885 (initialize_low_arch): New function.
6886 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
6887 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
6888 Declare.
6889 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
6890 (arm_read_description): New, with bits factored from
6891 arm_arch_setup.
6892 (arm_arch_setup): Reimplement.
6893 (target_regsets): Rename to ...
6894 (arm_regsets): ... this, and make static.
6895 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
6896 (arm_regs_info): New function.
6897 (the_low_target): Adjust.
6898 (initialize_low_arch): New function.
6899 * linux-m68k-low.c (tdesc_m68k): Declare.
6900 (target_regsets): Rename to ...
6901 (m68k_regsets): ... this, and make static.
6902 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
6903 (m68k_regs_info): New function.
6904 (m68k_arch_setup): New function.
6905 (the_low_target): Adjust.
6906 (initialize_low_arch): New function.
6907 * linux-sh-low.c (tdesc_sharch): Declare.
6908 (target_regsets): Rename to ...
6909 (sh_regsets): ... this, and make static.
6910 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
6911 (sh_regs_info, sh_arch_setup): New functions.
6912 (the_low_target): Adjust.
6913 (initialize_low_arch): New function.
6914 * linux-bfin-low.c (tdesc_bfin): Declare.
6915 (bfin_arch_setup): New function.
6916 (bfin_usrregs_info, regs_info): New globals.
6917 (bfin_regs_info): New function.
6918 (the_low_target): Adjust.
6919 (initialize_low_arch): New function.
6920 * linux-cris-low.c (tdesc_cris): Declare.
6921 (cris_arch_setup): New function.
6922 (cris_usrregs_info, regs_info): New globals.
6923 (cris_regs_info): New function.
6924 (the_low_target): Adjust.
6925 (initialize_low_arch): New function.
6926 * linux-cris-low.c (tdesc_crisv32): Declare.
6927 (cris_arch_setup): New function.
6928 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
6929 (cris_regs_info): New function.
6930 (the_low_target): Adjust.
6931 (initialize_low_arch): New function.
6932 * linux-m32r-low.c (tdesc_m32r): Declare.
6933 (m32r_arch_setup): New function.
6934 (m32r_usrregs_info, regs_info): New globals.
6935 (m32r_regs_info): Adjust.
6936 (initialize_low_arch): New function.
6937 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
6938 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
6939 (tic6x_usrregs_info): Forward declare.
6940 (tic6x_read_description): New function, based on ...
6941 (tic6x_arch_setup): ... this. Reimplement.
6942 (target_regsets): Rename to ...
6943 (tic6x_regsets): ... this, and make static.
6944 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
6945 (tic6x_regs_info): New function.
6946 (the_low_target): Adjust.
6947 (initialize_low_arch): New function.
6948 * linux-xtensa-low.c (tdesc_xtensa): Declare.
6949 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
6950 (target_regsets): Rename to ...
6951 (xtensa_regsets): ... this, and make static.
6952 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
6953 globals.
6954 (xtensa_arch_setup, xtensa_regs_info): New functions.
6955 (the_low_target): Adjust.
6956 (initialize_low_arch): New function.
6957 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
6958 (nios2_arch_setup): Set the current process'es tdesc.
6959 (target_regsets): Rename to ...
6960 (nios2_regsets): ... this.
6961 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
6962 (nios2_regs_info): New function.
6963 (the_low_target): Adjust.
6964 (initialize_low_arch): New function.
6965 * linux-aarch64-low.c (tdesc_aarch64): Declare.
6966 (aarch64_arch_setup): Set the current process'es tdesc.
6967 (target_regsets): Rename to ...
6968 (aarch64_regsets): ... this.
6969 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
6970 (aarch64_regs_info): New function.
6971 (the_low_target): Adjust.
6972 (initialize_low_arch): New function.
6973 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
6974 globals.
6975 (target_regsets): Rename to ...
6976 (tile_regsets): ... this.
6977 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
6978 (tile_regs_info): New function.
6979 (tile_arch_setup): Set the current process'es tdesc.
6980 (the_low_target): Adjust.
6981 (initialize_low_arch): New function.
6982 * spu-low.c (tdesc_spu): Declare.
6983 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
6984 * win32-arm-low.c (tdesc_arm): Declare.
6985 (arm_arch_setup): New function.
6986 (the_low_target): Install arm_arch_setup instead of
6987 init_registers_arm.
6988 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
6989 (init_windows_x86): Rename to ...
6990 (i386_arch_setup): ... this. Set `win32_tdesc'.
6991 (the_low_target): Adjust.
6992 * win32-low.c (win32_tdesc): New global.
6993 (child_add_thread): Don't create the thread cache here.
6994 (do_initial_child_stuff): Set the new process'es tdesc.
6995 * win32-low.h (struct target_desc): Forward declare.
6996 (win32_tdesc): Declare.
6997 * lynx-i386-low.c (tdesc_i386): Declare global.
6998 (lynx_i386_arch_setup): Set `lynx_tdesc'.
6999 * lynx-low.c (lynx_tdesc): New global.
7000 (lynx_add_process): Set the new process'es tdesc.
7001 * lynx-low.h (struct target_desc): Forward declare.
7002 (lynx_tdesc): Declare global.
7003 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7004 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7005 * nto-low.c (nto_tdesc): New global.
7006 (do_attach): Set the new process'es tdesc.
7007 * nto-low.h (struct target_desc): Forward declare.
7008 (nto_tdesc): Declare.
7009 * nto-x86-low.c (tdesc_i386): Declare.
7010 (nto_x86_arch_setup): Set `nto_tdesc'.
7011
7012 2013-06-04 Gary Benson <gbenson@redhat.com>
7013
7014 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7015 to qSupported response when appropriate.
7016 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7017 with nonzero-length annex.
7018 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7019 arguments supplied in annex.
7020
7021 2013-05-31 Doug Evans <dje@google.com>
7022
7023 PR server/15594
7024 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7025 64 bits in 64-cross-32 environment.
7026
7027 2013-05-28 Pedro Alves <palves@redhat.com>
7028
7029 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7030 (aarch64-without-fpu.c): Delete rule.
7031 * configure.srv (aarch64*-*-linux*): Remove references to
7032 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7033 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7034 declaration.
7035
7036 2013-05-24 Pedro Alves <palves@redhat.com>
7037
7038 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7039 instead of strchr/decode_address. Error if the range isn't split
7040 with a ','. Don't assume there's be a ':' in the action.
7041
7042 2013-05-23 Yao Qi <yao@codesourcery.com>
7043 Pedro Alves <palves@redhat.com>
7044
7045 * linux-low.c (lwp_in_step_range): New function.
7046 (linux_wait_1): If the thread was range stepping and stopped
7047 outside the stepping range, report the stop to GDB. Otherwise,
7048 continue stepping. Add range stepping debug output.
7049 (linux_set_resume_request): Copy the step range from the resume
7050 request to the lwp.
7051 (linux_supports_range_stepping): New.
7052 (linux_target_ops) <supports_range_stepping>: Set to
7053 linux_supports_range_stepping.
7054 * linux-low.h (struct linux_target_ops)
7055 <supports_range_stepping>: New field.
7056 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7057 * linux-x86-low.c (x86_supports_range_stepping): New.
7058 (the_low_target) <supports_range_stepping>: Set to
7059 x86_supports_range_stepping.
7060 * server.c (handle_v_cont): Handle 'r' action.
7061 (handle_v_requests): Append ";r" if the target supports range
7062 stepping.
7063 * target.h (struct thread_resume) <step_range_start,
7064 step_range_end>: New fields.
7065 (struct target_ops) <supports_range_stepping>:
7066 New field.
7067 (target_supports_range_stepping): New macro.
7068
7069 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7070
7071 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7072 confusion in comment.
7073
7074 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7075
7076 * lynx-low.c (struct process_info_private): New type.
7077 (lynx_add_process): New function.
7078 (lynx_create_inferior, lynx_attach): Replace calls to
7079 add_process by calls to lynx_add_process.
7080 (lynx_resume): If PTID is null, then try using
7081 current_process()->private->last_wait_event_ptid.
7082 Add comments.
7083 (lynx_clear_inferiors): Delete. The contents of that function
7084 has been inlined in lynx_mourn;
7085 (lynx_wait_1): Save the ptid in the process's private data.
7086 (lynx_mourn): Free the process' private data. Replace call
7087 to lynx_clear_inferiors by call to clear_inferiors.
7088
7089 2013-05-17 Yao Qi <yao@codesourcery.com>
7090
7091 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7092 the right place.
7093
7094 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
7095
7096 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7097 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7098 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7099 PT_TEXT_END_ADDR guards. Update comments.
7100 (linux_target_op) <read_offsets>: Conditionally define to
7101 linux_read_offsets if the target is UCLIBC and if it defines
7102 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7103
7104 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7105 Andrew Jenner <andrew@codesourcery.com>
7106
7107 * Makefile.in (SFILES): Add linux-nios2-low.c.
7108 (clean): Add action to delete nios2-linux.c.
7109 (nios2-linux.c): New rule.
7110 * configure.srv: Add nios2*-*-linux*.
7111 * linux-nios2-low.c: New.
7112
7113 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7114
7115 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7116
7117 2013-04-25 Hui Zhu <hui@codesourcery.com>
7118
7119 PR gdb/15186
7120 * ax.c (ax_printf): Add fflush.
7121
7122 2013-04-22 Tom Tromey <tromey@redhat.com>
7123
7124 * Makefile.in (SFILES): Add filestuff.c.
7125 (OBS): Add filestuff.o.
7126 (filestuff.o): New target.
7127 * config.in, configure: Rebuild.
7128 * configure.ac: Check for fdwalk, pipe2.
7129
7130 2013-04-17 Pedro Alves <palves@redhat.com>
7131
7132 * configure.ac (USE_THREAD_DB): Delete variable.
7133 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7134 Don't AC_SUBST USE_THREAD_DB.
7135 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7136 * config.in, configure: Regenerate.
7137
7138 2013-04-16 Pedro Alves <palves@redhat.com>
7139
7140 * linux-low.h (struct lwp_info) <thread_known>: Move under
7141 the USE_THREAD_DB #ifdef.
7142
7143 2013-04-16 Pedro Alves <palves@redhat.com>
7144
7145 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7146 (linux-low.o): Delete rule.
7147 * linux-low.h: Always include "gdb_thread_db.h" instead of
7148 conditionally including thread_db.h.
7149 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7150 HAVE_THREAD_DB_H.
7151
7152 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7153
7154 * Makefile.in (install-only): Fix make install regression.
7155
7156 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7157
7158 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7159 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7160 installation.
7161 * gdbserver.1: Remove.
7162
7163 2013-03-22 Pedro Alves <palves@redhat.com>
7164
7165 * linux-low.c (handle_extended_wait): Don't call
7166 linux_enable_event_reporting.
7167
7168 2013-03-15 Tony Theodore <tonyt@logyst.com>
7169
7170 PR build/9098:
7171 * Makefile.in (SHELL): Use @SHELL@.
7172
7173 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7174
7175 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7176 compiler warning.
7177
7178 2013-03-13 Joel Brobecker <brobecker@adacore.com>
7179
7180 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7181 Remove extraneous NULL element.
7182
7183 2013-03-13 Yao Qi <yao@codesourcery.com>
7184
7185 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7186 'V' block in trace frame.
7187
7188 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7189
7190 * target.h (struct target_ops): Add btrace ops.
7191 (target_supports_btrace): New macro.
7192 (target_enable_btrace): New macro.
7193 (target_disable_btrace): New macro.
7194 (target_read_btrace): New macro.
7195 * gdbthread.h (struct thread_info): Add btrace field.
7196 * server.c: Include btrace-common.h.
7197 (handle_btrace_general_set): New function.
7198 (handle_btrace_enable): New function.
7199 (handle_btrace_disable): New function.
7200 (handle_general_set): Call handle_btrace_general_set.
7201 (handle_qxfer_btrace): New function.
7202 (struct qxfer qxfer_packets[]): Add btrace entry.
7203 * inferiors.c (remove_thread): Disable btrace.
7204 * linux-low: Include linux-btrace.h.
7205 (linux_low_enable_btrace): New function.
7206 (linux_low_read_btrace): New function.
7207 (linux_target_ops): Add btrace ops.
7208 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7209 Add srv_linux_btrace=yes.
7210 (x86_64-*-linux*): Add linux-btrace.o.
7211 Add srv_linux_btrace=yes.
7212 * configure.ac: Define HAVE_LINUX_BTRACE.
7213 * config.in: Regenerated.
7214 * configure: Regenerated.
7215
7216 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7217
7218 * server.c (handle_qxfer): Preserve error message if -3 is
7219 returned.
7220 (qxfer): Document the -3 return value.
7221
7222 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7223
7224 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7225 (linux_btrace_h): New variable.
7226 (linux-btrace.o): New rule.
7227
7228 2013-03-08 Stan Shebs <stan@codesourcery.com>
7229 Hafiz Abid Qadeer <abidh@codesourcery.com>
7230
7231 * tracepoint.c (trace_buffer_size): New global.
7232 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7233 (init_trace_buffer): Change to one-argument function. Allocate
7234 trace buffer memory.
7235 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7236 handle QTBuffer:size packet.
7237 (cmd_bigqtbuffer_size): New function.
7238 (initialize_tracepoint): Call init_trace_buffer with
7239 DEFAULT_TRACE_BUFFER_SIZE.
7240 * server.c (handle_query): Add QTBuffer:size in the
7241 supported packets.
7242
7243 2013-03-07 Yao Qi <yao@codesourcery.com>
7244
7245 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7246 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7247 of -1.
7248 (cmd_qtsp): Adjust condition. Do post increment.
7249 Set cur_action and cur_step_action back to 0.
7250
7251 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7252
7253 PR server/15236
7254 * linux-low.c (linux_write_memory): Return early success if LEN is
7255 zero.
7256
7257 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
7258
7259 * configure.srv: Add x86_64-*-cygwin* as target.
7260
7261 2013-02-28 Tom Tromey <tromey@redhat.com>
7262
7263 * configure.ac: Invoke AC_SYS_LARGEFILE.
7264 * configure, config.in: Rebuild.
7265
7266 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
7267
7268 * win32-low.c: Throughout, fix format strings and casts of
7269 printf-like functions to avoid type related warnings on all
7270 platforms.
7271 (get_child_debug_event): Print dwDebugEventCode as hex since
7272 that's how it's usually documented.
7273
7274 2013-02-28 Yao Qi <yao@codesourcery.com>
7275
7276 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7277 pulongest.
7278
7279 2013-02-27 Jiong Wang <jiwang@tilera.com>
7280
7281 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7282 (reg-tilegx32.c): New rule.
7283 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7284 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7285 different register info initializer according to elf class.
7286 (init_registers_tilgx32): New function. The tilegx32 register info
7287 initializer.
7288 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7289 (tile_store_gregset): Likewise.
7290
7291 2013-02-27 Yao Qi <yao@codesourcery.com>
7292
7293 * server.c (process_point_options): Print debug message when
7294 debug_threads is true.
7295
7296 2013-02-26 Yao Qi <yao@codesourcery.com>
7297
7298 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7299
7300 2013-02-19 Pedro Alves <palves@redhat.com>
7301 Kai Tietz <ktietz@redhat.com>
7302
7303 PR gdb/15161
7304
7305 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7306 instead of strtoul to extract address from packet.
7307 (process_serial_event) <'z'>: Likewise.
7308
7309 2013-02-18 Yao Qi <yao@codesourcery.com>
7310
7311 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7312
7313 2013-02-14 Pedro Alves <palves@redhat.com>
7314
7315 Plug memory leak.
7316
7317 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7318 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7319
7320 2013-02-14 Pedro Alves <palves@redhat.com>
7321
7322 * tracepoint.c (cmd_qtdpsrc): Use savestring.
7323
7324 2013-02-14 Pedro Alves <palves@redhat.com>
7325
7326 * tracepoint.c (save_string): Delete.
7327 (add_tracepoint_action): Use savestring instead of save_string.
7328
7329 2013-02-12 Pedro Alves <palves@redhat.com>
7330
7331 * linux-xtensa-low.c: Ditto.
7332 * xtensa-xtregs.c: Ditto.
7333
7334 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7335
7336 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7337 thread_db.
7338
7339 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7340
7341 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7342 aarch64_num_wp_regs and aarch64_num_bp_regs to
7343 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7344
7345 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7346
7347 * linux-aarch64-low.c (ps_get_thread_area): Replace
7348 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7349
7350 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7351 Marcus Shawcroft <marcus.shawcroft@arm.com>
7352 Nigel Stephens <nigel.stephens@arm.com>
7353 Yufeng Zhang <yufeng.zhang@arm.com>
7354
7355 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7356 (aarch64.c, aarch64-without-fpu.c): New targets.
7357 * configure.srv (aarch64*-*-linux*): New.
7358 * linux-aarch64-low.c: New file.
7359
7360 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7361
7362 * linux-low.c (handle_extended_wait, linux_create_inferior)
7363 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7364 (dequeue_one_deferred_signal, linux_resume_one_thread)
7365 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7366 (linux_tracefork_grandchild, linux_test_for_tracefork)
7367 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7368 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7369 where the argument is 0.
7370
7371 2013-01-25 Yao Qi <yao@codesourcery.com>
7372
7373 * event-loop.c: Include "queue.h".
7374 (gdb_event_p): New typedef.
7375 (struct gdb_event) <next_event>: Remove.
7376 (event_queue): Change to QUEUE(gdb_event_p).
7377 (async_queue_event): Remove.
7378 (gdb_event_xfree): New.
7379 (initialize_event_loop): New.
7380 (process_event): Use API from QUEUE.
7381 (wait_for_event): Likewise.
7382 * server.c (main): Call initialize_event_loop.
7383 * server.h (initialize_event_loop): Declare.
7384
7385 2013-01-18 Yao Qi <yao@codesourcery.com>
7386
7387 * ax.h (struct eval_agent_expr_context): New.
7388 (gdb_eval_agent_expr): Update declaration.
7389 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7390 TFRAME. Add new argument CTX.
7391 * server.h (struct eval_agent_expr_context): Declare.
7392 (agent_mem_read, agent_tsv_read): Update declaration.
7393 (agent_mem_read_string): Likewise.
7394 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7395 (add_traceframe_block): Add new argument TPOINT.
7396 Increase TPOINT->traceframe_usage.
7397 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7398 eval_tracepoint_agent_expr.
7399 (condition_true_at_tracepoint): Likewise.
7400 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7401 (agent_mem_read_string, agent_tsv_read): Likewise.
7402
7403 2013-01-16 Yao Qi <yao@codesourcery.com>
7404
7405 * linux-low.c (linux_resume_one_lwp): Don't check
7406 'lwp->bp_reinsert != 0'.
7407
7408 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7409 Pedro Alves <palves@redhat.com>
7410
7411 * lynx-low.c (ptrace_request_to_str): Define a temporary
7412 macro and use it to simplify this function's implementation.
7413
7414 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7415
7416 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7417 sets errno.
7418
7419 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7420
7421 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7422
7423 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7424
7425 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7426
7427 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7428
7429 * lynx-low.c (lynx_resume): Use the resume_info parameter
7430 to determine the ptid for the lynx_ptrace call, unless
7431 it is equal to minus_one_ptid, in which case we use the
7432 ptid of the current_inferior.
7433 (lynx_wait_1): After having received a thread create/exit
7434 event, resume the inferior's execution using the signaling
7435 thread's ptid, rather than the old ptid.
7436
7437 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7438
7439 * lynx-low.c (lynx_resume): Delete variable ret.
7440
7441 2013-01-01 Joel Brobecker <brobecker@adacore.com>
7442
7443 * gdbreplay.c (gdbreplay_version): Update copyright year.
7444 * server.c (gdbserver_version): Likewise.
7445
7446 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7447
7448 * lynx-low.c (lynx_wait_1): Add debug trace before adding
7449 new thread.
7450
7451 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7452
7453 * lynx-low.c (ptrace_request_to_str): Add handling for
7454 PTRACE_GETTRACESIG.
7455
7456 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7457
7458 * lynx-low.c (lynx_attach): Delete variable new_process.
7459
7460 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7461
7462 * lynx-low.c (lynx_create_inferior): Delete variable
7463 new_process.
7464
7465 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7466
7467 * lynx-low.c (ptrace_request_to_str): Do not handle
7468 PTRACE_GETTHREADLIST if this macro does not exist.
7469
7470 2012-12-15 Yao Qi <yao@codesourcery.com>
7471
7472 * Makefile.in (OBS): Add notif.o.
7473 * notif.c, notif.h: New.
7474 * server.c: Include "notif.h".
7475 (struct vstop_notif) <next>: Remove.
7476 <base>: New field.
7477 (queue_stop_reply): Update.
7478 (push_event, send_next_stop_reply): Remove.
7479 (discard_queued_stop_replies): Update.
7480 (notif_stop): New variable.
7481 (handle_v_stopped): Remove.
7482 (handle_v_requests): Don't call handle_v_stopped. Call
7483 handle_ack_notif instead.
7484 (queue_stop_reply_callback): Call notif_event_enque instead
7485 of queue_stop_reply.
7486 (handle_status): Don't call send_next_stop_reply, call
7487 notif_write_event instead.
7488 (kill_inferior_callback): Likewise.
7489 (detach_or_kill_inferior_callback): Likewise.
7490 (main): Call initialize_notif.
7491 (process_serial_event): Call QUEUE_is_empty.
7492 (handle_target_event): Call notif_push instead of push event.
7493 * server.h (push_event): Remove declaration.
7494
7495 2012-12-10 Tom Tromey <tromey@redhat.com>
7496
7497 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
7498 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
7499 macros.
7500 (.c.o): Rewrite.
7501 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
7502 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
7503 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
7504 (amd64-linux-ipa.o, ax.o): Rewrite.
7505 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
7506 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
7507 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
7508 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
7509 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
7510 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
7511 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
7512 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
7513 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
7514 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
7515 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
7516 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
7517 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
7518 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
7519 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
7520 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
7521 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
7522 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
7523 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
7524 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
7525 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
7526 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
7527 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
7528 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
7529 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
7530 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
7531 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
7532 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
7533 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
7534 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
7535 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
7536 (reg-tilegx.o): Remove.
7537 (all_object_files): New macro.
7538 Include .deps files.
7539 * aclocal.m4, configure: Rebuild.
7540 * acinclude.m4: Include depstand.m4, lead-dot.m4.
7541 * configure.ac: Invoke ZW_CREATE_DEPDIR,
7542 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
7543
7544 2012-12-05 Tom Tromey <tromey@redhat.com>
7545
7546 PR gdb/14917:
7547 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
7548
7549 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
7550
7551 * configure.ac: Check for linux/perf_event.h.
7552 * config.in: Regenerated.
7553 * configure: Regenerated.
7554
7555 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
7556
7557 * hostio.c (handle_readlink): Decrease buffer size
7558 parameter passed to readlink by one byte.
7559
7560 2012-11-26 Yao Qi <yao@codesourcery.com>
7561
7562 * configure.ac (build_warnings): Append '-Wempty-body'.
7563 * configure: Regenerated.
7564 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
7565 body.
7566
7567 2012-11-15 Pierre Muller <muller@sourceware.org>
7568
7569 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
7570 * config.in: Regenerate.
7571 * configure: Regenerate.
7572 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
7573 Use "gdb_wait.h" header instead of <sys/wait.h> header.
7574 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7575 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
7576 header.
7577 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
7578 instead of <sys/wait.h> header.
7579 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7580
7581 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
7582
7583 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
7584 (various make rules): Remove -DGDBSERVER
7585
7586 2012-11-09 Yao Qi <yao@codesourcery.com>
7587
7588 * spu-low.c (current_ptid): Move it to ..
7589 * gdbthread.h: ... here. New.
7590 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
7591 * server.c (myresume, process_serial_event): Likewise.
7592 * thread-db.c (thread_db_find_new_threads): Likewise.
7593 * tracepoint.c (run_inferior_command): Likewise.
7594
7595 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
7596
7597 * server.c (handle_search_memory_1): Include access length in
7598 warning message.
7599
7600 2012-09-05 Michael Brandt <michael.brandt@axis.com>
7601
7602 * linux-crisv32-low.c: Fix compile errors.
7603
7604 2012-09-04 Yao Qi <yao@codesourcery.com>
7605
7606 * tracepoint.c (cmd_qtsv): Adjust debug message.
7607 Don't check CUR_TPOINT.
7608
7609 2012-08-28 Yao Qi <yao@codesourcery.com>
7610
7611 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
7612 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
7613 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
7614 Remove declarations of xmalloc, xreallloc, xstrdup and
7615 freeargv.
7616 * Makefile.in (libiberty_h): New.
7617 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
7618 (linux-bfin-low.o): Append dependency 'libiberty.h'.
7619
7620 2012-08-23 Yao Qi <yao@codesourcery.com>
7621
7622 * server.h: Remove declaration of 'xsnprintf'.
7623
7624 2012-08-22 Keith Seitz <keiths@redhat.com>
7625
7626 * server.h: Include build-gnulib-gbserver/config.h.
7627 * gdbreplay.c: Likewise.
7628
7629 2012-08-08 Doug Evans <dje@google.com>
7630
7631 * Makefile.in (SFILES): Add gdb_vecs.c.
7632 (OBS): Add gdb_vecs.o.
7633 (gdb_vecs_h, host_defs_h): New variables.
7634 (thread-db.o): Add $(gdb_vecs_h) dependency.
7635 (gdb_vecs.o): New rule.
7636 * thread-db.c: #include "gdb_vecs.h".
7637 (thread_db_load_search): Use a vector to iterate over path elements.
7638 Handle text appearing after "$pdir".
7639
7640 * configure.ac: Add check for strstr.
7641 * config.in: Regenerate.
7642 * configure: Regenerate.
7643
7644 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
7645
7646 * hostio.c (handle_pread): If pread fails, fall back to attempting
7647 lseek/read.
7648 (handle_pwrite): Likewise for pwrite.
7649
7650 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
7651
7652 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
7653 between unsupported TYPE and unimplementable ADDR/LEN combination.
7654 (arm_insert_point): Act on new return value.
7655
7656 2012-07-31 Pedro Alves <palves@redhat.com>
7657
7658 * server.c (process_point_options): Only skip tokens if we find
7659 one that is unrecognized. Don't treat 'X' specially while
7660 skipping unrecognized tokens.
7661
7662 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
7663
7664 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
7665 to 4-byte-align HW breakpoint addresses for Thumb.
7666
7667 2012-07-27 Yao Qi <yao@codesourcery.com>
7668
7669 PR remote/14161.
7670
7671 * server.h: Declare gdb_agent_about_to_close.
7672 * target.c (kill_inferior): Include "agent.h".
7673 New. Send command 'kill'.
7674 * target.h (kill_inferior): Removed macro.
7675 * tracepoint.c (gdb_agent_about_to_close): New.
7676 (gdb_agent_helper_thread): Handle command 'close'.
7677 Wait endlessly until the inferior stops.
7678 Install gdb_agent_remove_socket to atexit hook.
7679 (agent_socket_name): New static variable.
7680 (gdb_agent_socket_init): Replace local variable 'name' with
7681 'agent_socket_name'.
7682 (gdb_agent_remove_socket): New.
7683
7684 2012-07-27 Yao Qi <yao@codesourcery.com>
7685
7686 * server.c (process_point_options): Stop at 'X' when parsing.
7687
7688 2012-07-19 Michael Eager <eager@eagercon.com>
7689
7690 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
7691 to hw_execute.
7692 * linux-x86-low.c (x86_insert_point, x86_remove_point):
7693 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
7694 hardware breakpoint.
7695
7696 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7697
7698 * gdbserver/linux-low.c (initialize_low): Call
7699 linux_ptrace_init_warnings.
7700
7701 2012-07-02 Doug Evans <dje@google.com>
7702
7703 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
7704 pointer to int.
7705
7706 2012-07-02 Stan Shebs <stan@codesourcery.com>
7707
7708 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
7709 (ax.o): Add it to build rule.
7710 (ax-ipa.o): Ditto.
7711 (OBS): Add format.o.
7712 (IPA_OBS): Add format.o.
7713 * server.c (handle_query): Claim support for breakpoint commands.
7714 (process_point_options): Add command case.
7715 (process_serial_event): Leave running if there are printfs in
7716 effect.
7717 * mem-break.h (any_persistent_commands): Declare.
7718 (add_breakpoint_commands): Declare.
7719 (gdb_no_commands_at_breakpoint): Declare.
7720 (run_breakpoint_commands): Declare.
7721 * mem-break.c (struct point_command_list): New struct.
7722 (struct breakpoint): New field command_list.
7723 (any_persistent_commands): New function.
7724 (add_commands_to_breakpoint): New function.
7725 (add_breakpoint_commands): New function.
7726 (gdb_no_commands_at_breakpoint): New function.
7727 (run_breakpoint_commands): New function.
7728 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
7729 locally.
7730 * ax.c: Include format.h.
7731 (ax_printf): New function.
7732 (gdb_eval_agent_expr): Add printf opcode.
7733
7734 2012-06-13 Yao Qi <yao@codesourcery.com>
7735
7736 * server.c (start_inferior): Remove duplicated writes to fields
7737 'last_resume_kind' and 'last_status' of 'current_inferior'.
7738
7739 2012-06-12 Yao Qi <yao@codesourcery.com>
7740 Pedro Alves <palves@redhat.com>
7741
7742 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
7743 comment.
7744 * server.c (handle_v_cont): Extend comment.
7745
7746 2012-06-11 Yao Qi <yao@codesourcery.com>
7747
7748 * linux-low.c (linux_attach): Add 'static'.
7749
7750 2012-06-06 Yao Qi <yao@codesourcery.com>
7751
7752 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
7753
7754 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7755
7756 Fix gcc -flto compilation warning.
7757 * server.c (main): Make variable multi_mode and attach volatile.
7758
7759 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7760
7761 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
7762 if the platform doesn't know about it.
7763
7764 2012-05-30 Jeff Kenton <jkenton@tilera.com>
7765
7766 * Makefile.in (SFILES): Add linux-tile-low.c.
7767 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
7768 * configure.srv: Handle tilegx-*-linux*.
7769 * linux-tile-low.c: New file.
7770
7771 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7772
7773 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
7774
7775 2012-05-24 Pedro Alves <palves@redhat.com>
7776
7777 PR gdb/7205
7778
7779 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
7780
7781 2012-05-24 Pedro Alves <palves@redhat.com>
7782
7783 PR gdb/7205
7784
7785 Replace target_signal with gdb_signal throughout.
7786
7787 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
7788
7789 * linux-low.c (linux_store_registers): Avoid the copying sequence
7790 when no data has been retrieved by ptrace.
7791
7792 2012-05-22 Will Deacon <will.deacon@arm.com>
7793
7794 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
7795 Include asm/ptrace.h.
7796 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
7797 already defined.
7798
7799 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
7800
7801 * linux-low.c (linux_store_registers): Don't re-retrieve data
7802 with ptrace that has already been obtained from /proc. Always
7803 copy any data retrieved with ptrace to the buffer supplied.
7804
7805 2012-05-11 Yao Qi <yao@codesourcery.com>
7806 Pedro Alves <palves@redhat.com>
7807
7808 * linux-low.c (enum stopping_threads_kind): New.
7809 (stopping_threads): Change type to `enum stopping_threads_kind'.
7810 (handle_extended_wait): If stopping and suspending threads, leave
7811 the new_lwp suspended too.
7812 (linux_wait_for_event): Adjust.
7813 (stop_all_lwps): Set `stopping_threads' to
7814 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
7815 whether we're suspending threads or just stopping them. Assert no
7816 recursion happens.
7817
7818 2012-04-29 Yao Qi <yao@codesourcery.com>
7819
7820 * server.h: Move some code to ...
7821 * gdbthread.h: ... here. New.
7822 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
7823 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
7824 (nto-low.o, win32-low.o): Likewise.
7825 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
7826 * regcache.c, remote-utils.c, server.c: Likewise.
7827 * target.c, tracepoint.c, win32-low.c: Likewise.
7828
7829 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7830
7831 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
7832 (PTRACE_ARG4_TYPE): Likewise.
7833 (PTRACE_XFER_TYPE): Likewise.
7834 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
7835 ptrace to PTRACE_ARG3_TYPE.
7836 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
7837 (PTRACE_ARG4_TYPE): Likewise.
7838 (PTRACE_XFER_TYPE): Likewise.
7839 (linux_detach_one_lwp): Cast fourth argument of
7840 ptrace to long then PTRACE_ARG4_TYPE.
7841 (regsets_fetch_inferior_registers): Cast third argument of
7842 ptrace to long then PTRACE_ARG3_TYPE.
7843 (regsets_store_inferior_registers): Likewise.
7844
7845 2012-04-20 Pedro Alves <palves@redhat.com>
7846
7847 * configure: Regenerate.
7848
7849 2012-04-19 Pedro Alves <palves@redhat.com>
7850
7851 * Makefile.in (GNULIB_BUILDDIR): New.
7852 (LIBGNU, INCGNU, GNULIB_H): Adjust.
7853 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
7854 (all, install-only, uninstall, clean-info, all-lib, clean): No
7855 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
7856 (maintainer-clean realclean distclean): Use subdir_do.
7857 (subdir_do): New.
7858 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
7859 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
7860 * acinclude.m4: Include acx_configure_dir.m4.
7861 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
7862 calls. Call AC_PROG_RANLIB. Configure gnulib using
7863 ACX_CONFIGURE_DIR.
7864 (GNULIB): New.
7865 (GNULIB_STDINT_H): Adjust.
7866 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
7867 * gdbreplay.c: Include build-gnulib/config.h.
7868 * server.h: Likewise.
7869 * aclocal.m4: Regenerate.
7870 * config.in: Regenerate.
7871 * configure: Regenerate.
7872
7873 2012-04-19 Pedro Alves <palves@redhat.com>
7874
7875 * Makefile.in (LIBGNU, INCGNU): Adjust.
7876 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
7877 (all, install-only, uninstall, clean-info, all-lib, clean)
7878 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
7879 * configure.ac: Adjust AC_OUTPUT output.
7880 * aclocal.m4: Regenerate.
7881 * configure: Regenerate.
7882
7883 2012-04-19 Pedro Alves <palves@redhat.com>
7884
7885 * Makefile.in (generated_files): New.
7886 (server_h): Remove the explicit dependency on config.h, and depend
7887 on $generated_files.
7888
7889 2012-04-19 Pedro Alves <palves@redhat.com>
7890
7891 * Makefile.in (INCGNU): Add -Ignulib.
7892
7893 2012-04-19 Pedro Alves <palves@redhat.com>
7894
7895 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
7896 (INCGNU): ... this, and spell out -I here.
7897 (GNULIB_LIB): Rename to ...
7898 (LIBGNU): ... this.
7899 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
7900
7901 2012-04-19 Pedro Alves <palves@redhat.com>
7902
7903 * config.in: Regenerate.
7904
7905 2012-04-19 Pedro Alves <palves@redhat.com>
7906
7907 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
7908 * server.h (memmem): Remove declaration.
7909 * config.in: Regenerate.
7910 * configure: Regenerate.
7911
7912 2012-04-19 Yao Qi <yao@codesourcery.com>
7913
7914 * Makefile.in (SFILES): Add common/vec.c.
7915 (OBS): Add vec.o.
7916 (vec.o): New rule.
7917
7918 2012-04-19 Yao Qi <yao@codesourcery.com>
7919
7920 * remote-utils.c (prepare_resume_reply): Replace with macro
7921 target_core_of_thread.
7922 * server.c (handle_qxfer_threads_proper): Likewise.
7923 * target.h (traget_core_of_thread): New macro.
7924
7925 2012-04-18 Pedro Alves <palves@redhat.com>
7926
7927 * aclocal.m4: Regenerate.
7928 * configure: Regenerate.
7929
7930 2012-04-16 Yao Qi <yao@codesourcery.com>
7931
7932 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
7933 duplicated on address.
7934
7935 2012-04-16 Yao Qi <yao@codesourcery.com>
7936
7937 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
7938 (struct tracepoint_action_ops) <send>: New field.
7939 (m_tracepoint_action_send, r_tracepoint_action_send): New.
7940 (agent_expr_send, x_tracepoint_action_send): New.
7941 (l_tracepoint_action_send): New.
7942 (cmd_qtdp): Download and install tracepoint
7943 according to `use_agent'.
7944 (run_inferior_command): Add one more parameter `len'.
7945 Update callers.
7946 (tracepoint_send_agent): New.
7947 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
7948
7949 2012-04-16 Yao Qi <yao@codesourcery.com>
7950
7951 * tracepoint.c (download_tracepoints): Moved to ...
7952 (cmd_qtstart): ... here.
7953
7954 2012-04-14 Yao Qi <yao@codesourcery.com>
7955
7956 * tracepoint.c: Include inttypes.h.
7957 (struct collect_memory_action): Use sized types.
7958 (struct tracepoint): Likewise.
7959 (cmd_qtdp, stop_tracing): Update print specifiers.
7960 (cmd_qtp, response_tracepoint): Likewise.
7961 (collect_data_at_tracepoint): Likewise.
7962 (collect_data_at_step): Likewise.
7963
7964 2012-04-14 Yao Qi <yao@codesourcery.com>
7965
7966 Import gnulib module inttypes.
7967 * aclocal.m4, config.in, configure: Regenerated.
7968
7969 2012-04-14 Yao Qi <yao@codesourcery.com>
7970
7971 * Makefile.in (maintainer-clean, realclean, distclean): Remove
7972 Makefile and config.status at last.
7973
7974 2012-04-13 Yao Qi <yao@codesourcery.com>
7975
7976 * tracepoint.c: Include stdint.h unconditionally.
7977
7978 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7979
7980 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
7981 on BFD_HAVE_SYS_PROCFS_TYPE.
7982 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
7983 * configure: Regenerate.
7984 * config.in: Likewise.
7985
7986 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
7987
7988 * Makefile.in (clean): Also remove x32.c x32-linux.c
7989 x32-avx.c x32-avx-linux.c.
7990 (x32.o): New target.
7991 (x32.c): Likewise.
7992 (x32-linux.o): Likewise.
7993 (x32-linux.c): Likewise.
7994 (x32-avx.o): Likewise.
7995 (x32-avx.c): Likewise.
7996 (x32-avx-linux.o): Likewise.
7997 (x32-avx-linux.c): Likewise.
7998
7999 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8000 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8001 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8002 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8003 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8004 i386/x32-avx-linux.xml.
8005
8006 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8007 (init_registers_x32_avx_linux): Likwise.
8008 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8009 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8010
8011 2012-04-13 Pedro Alves <palves@redhat.com>
8012
8013 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8014 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8015 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8016 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8017 the sub-make.
8018
8019 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8020
8021 * linux-x86-low.c (compat_x32_clock_t): New.
8022 (compat_x32_siginfo_t): Likewise.
8023 (compat_x32_siginfo_from_siginfo): Likewise.
8024 (siginfo_from_compat_x32_siginfo): Likewise.
8025 (linux_is_elf64): Likewise.
8026 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8027 and siginfo_from_compat_x32_siginfo for x32.
8028 (x86_arch_setup): Set linux_is_elf64.
8029
8030 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8031
8032 PR gdb/13969
8033 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8034 e_machine field.
8035 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8036 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8037 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8038 compatible with process.
8039
8040 2012-04-12 Yao Qi <yao@codesourcery.com>
8041
8042 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8043 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8044 (install-only, install-info, clean): Handle sub dir gnulib.
8045 (all-lib, am--refresh): New targets.
8046 (memmem.o): Remove target.
8047 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8048 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8049 (AC_REPLACE_FUNCS): Remove memmem.
8050 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8051 (AC_OUTPUT): Generate Makefile in gnulib/.
8052 * aclocal.m4, config.in, configure: Regenerated.
8053
8054 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8055
8056 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8057
8058 2012-04-05 Pedro Alves <palves@redhat.com>
8059
8060 -Werror=strict-aliasing
8061
8062 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8063 pointer.
8064
8065 2012-04-04 Pedro Alves <palves@redhat.com>
8066
8067 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8068 (sparc_store_gregset_from_stack, sparc_store_gregset)
8069 (sparc_breakpoint_at): Fix formatting.
8070
8071 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8072
8073 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8074 are available.
8075 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8076 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8077 * config.in: Regenerate.
8078 * configure: Likewise.
8079
8080 2012-03-29 Pedro Alves <palves@redhat.com>
8081
8082 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8083 Correct ptrace arguments.
8084
8085 2012-03-28 Pedro Alves <palves@redhat.com>
8086
8087 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8088 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8089 (IA64_FR1_REGNUM): New defines.
8090 (ia64_fetch_register): New.
8091 (the_low_target): Install it.
8092 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8093 field.
8094 * linux-low.c (linux_fetch_registers): Try the
8095 the_low_target.fetch_register hook first.
8096
8097 * linux-arm-low.c (the_low_target): Adjust.
8098 * linux-bfin-low.c (the_low_target): Adjust.
8099 * linux-cris-low.c (the_low_target): Adjust.
8100 * linux-crisv32-low.c (the_low_target): Adjust.
8101 * linux-m32r-low.c (the_low_target): Adjust.
8102 * linux-m68k-low.c (the_low_target): Adjust.
8103 * linux-mips-low.c (the_low_target): Adjust.
8104 * linux-ppc-low.c (the_low_target): Adjust.
8105 * linux-s390-low.c (the_low_target): Adjust.
8106 * linux-sh-low.c (the_low_target): Adjust.
8107 * linux-sparc-low.c (the_low_target): Adjust.
8108 * linux-tic6x-low.c (the_low_target): Adjust.
8109 * linux-x86-low.c (the_low_target): Adjust.
8110 * linux-xtensa-low.c (the_low_target): Adjust.
8111
8112 2012-03-26 Pedro Alves <palves@redhat.com>
8113
8114 * server.c (handle_qxfer_libraries): Don't bail early if
8115 the_target->qxfer_libraries_svr4 is not NULL.
8116
8117 2012-03-26 Pedro Alves <palves@redhat.com>
8118
8119 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8120
8121 2012-03-23 Pedro Alves <palves@redhat.com>
8122
8123 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8124 "library-list-svr4" element's start tag when the the DSO list is
8125 empty.
8126
8127 2012-03-23 Pedro Alves <palves@redhat.com>
8128
8129 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8130 a variable whose type size is the same as the inferior's pointer
8131 size.
8132
8133 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8134
8135 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8136 struct siginfo.
8137 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8138 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8139 * linux-low.h: Include <signal.h>.
8140 (struct siginfo): Remove forward declaration.
8141 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8142 struct siginfo.
8143
8144 2012-03-21 Mike Frysinger <vapier@gentoo.org>
8145
8146 * .gitignore: Ignore more files.
8147
8148 2012-03-19 Pedro Alves <palves@redhat.com>
8149 Jan Kratochvil <jan.kratochvil@redhat.com>
8150
8151 * server.c (cont_thread, general_thread): Add describing comments.
8152 (start_inferior): Clear `cont_thread'.
8153 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8154 of a process.
8155
8156 2012-03-15 Yao Qi <yao@codesourcery.com>
8157
8158 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8159 handling to ...
8160 (cmd_qtdp): ... here.
8161
8162 2012-03-15 Yao Qi <yao@codesourcery.com>
8163
8164 * tracepoint.c (struct tracepoint_action_ops): New.
8165 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8166 (m_tracepoint_action_download): New.
8167 (r_tracepoint_action_download): New.
8168 (x_tracepoint_action_download): New.
8169 (l_tracepoint_action_download): New.
8170 (add_tracepoint_action): Install `action->ops' according type.
8171 (download_tracepoint_1): Move code `download' function pointer
8172 of various tracepoint_action_ops.
8173
8174 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8175
8176 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8177 linux_ptrace_attach_warnings.
8178
8179 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8180
8181 * Makefile.in (linux-ptrace.o): New.
8182 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8183 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8184 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8185 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8186 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8187 of these targets.
8188 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8189
8190 2012-03-08 Yao Qi <yao@codesourcery.com>
8191 Pedro Alves <palves@redhat.com>
8192
8193 Fix PR server/13392.
8194 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8195 offset of JMP insn.
8196 * tracepoint.c (remove_tracepoint): New.
8197 (cmd_qtdp): Call remove_tracepoint when failed to install.
8198
8199 2012-03-07 Pedro Alves <palves@redhat.com>
8200
8201 * linux-low.c (get_detach_signal): New.
8202 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8203 Pass on pending signals to PTRACE_DETACH. Check the result of the
8204 ptrace call.
8205 * server.c (program_signals, program_signals_p): New.
8206 (handle_general_set): Handle QProgramSignals.
8207 * server.h (program_signals, program_signals_p): Declare.
8208
8209 2012-03-05 Pedro Alves <palves@redhat.com>
8210 Jan Kratochvil <jan.kratochvil@redhat.com>
8211
8212 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8213 New comment why.
8214
8215 2012-03-03 Yao Qi <yao@codesourcery.com>
8216
8217 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8218 agent_look_up_symbols.
8219
8220 2012-03-03 Yao Qi <yao@codesourcery.com>
8221
8222 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8223 (linux-x86-low.o): Likewise.
8224 * server.h: Remove in_process_agent_loaded.
8225 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8226 common/agent.c.
8227 Update callers.
8228
8229 2012-03-03 Yao Qi <yao@codesourcery.com>
8230
8231 * tracepoint.c (gdb_agent_capability): New global.
8232 (in_process_agent_loaded_ust): Renamed to
8233 `in_process_agent_supports_ust'.
8234 Update callers.
8235 (in_process_agent_supports_ust): Call agent_capability_check.
8236 (clear_installed_tracepoints): Assert that agent supports
8237 agent.
8238
8239 2012-03-03 Yao Qi <yao@codesourcery.com>
8240
8241 * linux-low.c (linux_supports_agent): New.
8242 (linux_target_ops): Initialize field `supports_agent' with
8243 linux_supports_agent.
8244 * target.h (struct target_ops) <supports_agent>: New.
8245 (target_supports_agent): New macro.
8246 * server.c (handle_general_set): Handle packet 'QAgent'.
8247 (handle_query): Send `QAgent+'.
8248 * Makefile.in (server.o): Depends on agent.h.
8249
8250 2012-03-03 Yao Qi <yao@codesourcery.com>
8251
8252 * Makefile.in (OBS): Add agent.o.
8253 Add new rule for agent.o.
8254 Track dependence of tracepoint.c on agent.h.
8255 * tracepoint.c (run_inferior_command_1):
8256 (run_inferior_command): Call agent_run_command.
8257 (gdb_ust_connect_sync_socket): Deleted. Move it to
8258 common/agent.c.
8259 (resume_thread, stop_thread): Likewise.
8260 (gdb_ust_socket_init): Renamed to ...
8261 (gdb_agent_socket_init): ... New.
8262 (gdb_ust_thread): Renamed to ...
8263 (gdb_agent_helper_thread): ... New.
8264 (gdb_ust_init): Move some code to ...
8265 (gdb_agent_init): ... here. New.
8266 [HAVE_UST]: Call gdb_ust_init.
8267 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8268 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8269 * config.in, configure: Regenerated.
8270
8271 2012-03-02 Pedro Alves <palves@redhat.com>
8272
8273 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8274 * linux-low.c (struct simple_pid_list): New.
8275 (stopped_pids): New a struct simple_pid_list pointer.
8276 (add_to_pid_list, pull_pid_from_list): New.
8277 (handle_extended_wait): Don't assume the first signal new children
8278 report is SIGSTOP. Adjust call to pull_pid_from_list.
8279 (linux_wait_for_lwp): Adjust.
8280
8281 2012-03-02 Yao Qi <yao@codesourcery.com>
8282
8283 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8284 debug log.
8285
8286 2012-03-02 Yao Qi <yao@codesourcery.com>
8287
8288 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8289 `stop_pc' and `tpoint'. Update caller.
8290
8291 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8292
8293 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8294 * linux-low.c (use_linux_regsets): New macro.
8295 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8296 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8297 (linux_register_in_regsets): New function.
8298 (usr_fetch_inferior_registers): Skip registers covered by
8299 regsets.
8300 (usr_store_inferior_registers): Likewise.
8301 (usr_fetch_inferior_registers): New macro.
8302 (usr_store_inferior_registers): Likewise.
8303 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8304 (linux_store_registers): Likewise.
8305 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8306 prototype.
8307 (init_registers_mips64_dsp_linux): Likewise.
8308 (init_registers_mips_linux): New macro.
8309 (init_registers_mips_dsp_linux): Likewise.
8310 (mips_dsp_num_regs): Likewise.
8311 (DSP_BASE, DSP_CONTROL): New fallback macros.
8312 (mips_base_regs): New macro.
8313 (mips_regmap): Use it. Fix the size.
8314 (mips_dsp_regmap): New variable.
8315 (mips_dsp_regset_bitmap): Likewise.
8316 (mips_arch_setup): New function.
8317 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8318 than mips_regmap.
8319 (mips_cannot_store_register): Likewise.
8320 (the_low_target): Update .arch_setup, .num_regs and .regmap
8321 initializers. Add .regset_bitmap initializer.
8322 * linux-arm-low.c (the_low_target): Add .regset_bitmap
8323 initializer.
8324 * linux-bfin-low.c (the_low_target): Likewise.
8325 * linux-cris-low.c (the_low_target): Likewise.
8326 * linux-crisv32-low.c (the_low_target): Likewise.
8327 * linux-ia64-low.c (the_low_target): Likewise.
8328 * linux-m32r-low.c (the_low_target): Likewise.
8329 * linux-m68k-low.c (the_low_target): Likewise.
8330 * linux-ppc-low.c (the_low_target): Likewise.
8331 * linux-s390-low.c (the_low_target): Likewise.
8332 * linux-sh-low.c (the_low_target): Likewise.
8333 * linux-sparc-low.c (the_low_target): Likewise.
8334 * linux-tic6x-low.c (the_low_target): Likewise.
8335 * linux-x86-low.c (the_low_target): Likewise.
8336 * linux-xtensa-low.c (the_low_target): Likewise.
8337 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8338 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8339 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8340 srv_xmlfiles.
8341 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8342 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8343
8344 2012-02-29 Yao Qi <yao@codesourcery.com>
8345 Pedro Alves <palves@redhat.com>
8346
8347 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8348 `step_over_finished' is true.
8349
8350 2012-02-27 Pedro Alves <palves@redhat.com>
8351
8352 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8353 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8354
8355 2012-02-27 Pedro Alves <palves@redhat.com>
8356
8357 PR server/9684
8358 * linux-low.c (pid_is_stopped): New.
8359 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8360
8361 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
8362
8363 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8364 of conditions.
8365
8366 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8367
8368 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8369
8370 2012-02-24 Luis Machado <lgustavo@codesourcery>
8371
8372 * server.c (handle_query): Advertise support for target-side
8373 breakpoint condition evaluation.
8374 (process_point_options): New function.
8375 (process_serial_event): When inserting a breakpoint, check for
8376 a target-side condition that should be evaluated.
8377
8378 * mem-break.c: Include regcache.h and ax.h.
8379 (point_cond_list_t): New data structure.
8380 (breakpoint) <cond_list>: New field.
8381 (find_gdb_breakpoint_at): Make non-static.
8382 (delete_gdb_breakpoint_at): Clear any target-side
8383 conditions.
8384 (clear_gdb_breakpoint_conditions): New function.
8385 (add_condition_to_breakpoint): Likewise.
8386 (add_breakpoint_condition): Likewise.
8387 (gdb_condition_true_at_breakpoint): Likewise.
8388 (gdb_breakpoint_here): Return result directly instead
8389 of going through a local variable.
8390
8391 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8392 (clear_gdb_breakpoint_conditions): Likewise.
8393 (add_breakpoint_condition): Likewise.
8394 (gdb_condition_true_at_breakpoint): Likewise.
8395
8396 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8397 (need_step_over_p): Take target-side breakpoint condition into
8398 consideration.
8399
8400 2012-02-24 Luis Machado <lgustavo@codesourcery>
8401
8402 * server.h: Include tracepoint.h.
8403 (agent_mem_read, agent_get_trace_state_variable_value,
8404 agent_set_trace_state_variable_value,
8405 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8406 get_set_tsv_func_addr): New prototypes.
8407
8408 * ax.h: New include file.
8409 * ax.c: New source file.
8410
8411 * tracepoint.c: Include ax.h.
8412 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8413 agent_expr, eval_result_type): Move to ax.h.
8414 (parse_agent_expr): Rename to ...
8415 (gdb_parse_agent_expr): ... this, make it non-static and move
8416 to ax.h.
8417 (unparse_agent_expr) Rename to ...
8418 (gdb_unparse_agent_expr): ... this, make it non-static and move
8419 to ax.h.
8420 (eval_agent_expr): Rename to ...
8421 (eval_tracepoint_agent_expr): ... this.
8422 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8423 forward declarations.
8424 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8425 (agent_get_trace_state_variable_value): New function.
8426 (agent_set_trace_state_variable_value): New function.
8427 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8428 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8429 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8430 (condition_true_at_tracepoint): Likewise.
8431 (parse_agent_expr): Rename to ...
8432 (gdb_parse_agent_expr): ... this and move to ax.c.
8433 (unparse_agent_expr): Rename to ...
8434 (gdb_unparse_agent_expr): ... this and move to ax.c.
8435 (gdb_agent_op_name): Move to ax.c.
8436 (eval_agent_expr): Rename to ...
8437 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8438 and move to ax.c.
8439 (eval_tracepoint_agent_expr): New function.
8440 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
8441 non-static.
8442 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8443 ax.c.
8444 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8445 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8446 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8447 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8448 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8449 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8450 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8451 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8452 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8453 (compile_bytecodes): Remove forward declaration.
8454 (is_goto_target): Move to ax.c.
8455 (compile_bytecodes): Move to ax.c and call
8456 agent_get_trace_state_variable_value (...) and
8457 agent_set_trace_state_variable_value (...).
8458
8459 * Makefile.in: Update ax.c and IPA dependencies.
8460
8461 2012-02-24 Pedro Alves <palves@redhat.com>
8462
8463 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
8464 (cmd_bigqtbuffer_circular): ... this. Only handle
8465 'QTBuffer:circular:'.
8466 (handle_tracepoint_general_set): Adjust.
8467
8468 2012-02-16 Yao Qi <yao@codesourcery.com>
8469
8470 * inferiors.c: Move code to ...
8471 * dll.c: .... here. New.
8472 * server.h: Declare clear_dlls.
8473 * Makefile.in (SFILES): Add dll.c.
8474 (OBS): Add dll.o
8475 (dll.o): New rule.
8476
8477 2012-02-11 Yao Qi <yao@codesourcery.com>
8478
8479 * server.c: (handle_monitor_command): Add a new parameter
8480 `own_buf'.
8481 (handle_query): Update caller.
8482
8483 2012-02-09 Joel Brobecker <brobecker@adacore.com>
8484
8485 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
8486 * configure, config.in: Regenerate.
8487 * hostio.c: Provide an alternate implementation if HAVE_READLINK
8488 is not defined.
8489
8490 2012-02-02 Pedro Alves <palves@redhat.com>
8491
8492 Try SIGKILL first, then PTRACE_KILL.
8493 * linux-low.c (linux_kill_one_lwp): New.
8494 (linux_kill_one_lwp): Rename to ...
8495 (kill_one_lwp_callback): ... this. Use the new
8496 linux_kill_one_lwp.
8497
8498 2012-02-02 Pedro Alves <palves@redhat.com>
8499
8500 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
8501 inferior.
8502
8503 2012-01-27 Pedro Alves <palves@redhat.com>
8504
8505 * linux-low.c (linux_child_pid_to_exec_file): Delete.
8506 (elf_64_file_p): Make static.
8507 (linux_pid_exe_is_elf_64_file): New.
8508 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
8509 Delete declarations.
8510 (linux_pid_exe_is_elf_64_file): Declare.
8511 * linux-x86-low.c (x86_arch_setup): Use
8512 linux_pid_exe_is_elf_64_file.
8513
8514 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8515
8516 * linux-low.c (linux_wait_for_event_1): Rename to ...
8517 (linux_wait_for_event): ... here and merge it with former
8518 linux_wait_for_event - new variable wait_ptid, use it.
8519 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
8520
8521 2012-01-23 Pedro Alves <palves@redhat.com>
8522
8523 * server.c (main): Avoid yet another case of infinite loop while
8524 detaching/killing after a longjmp.
8525
8526 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8527
8528 Code cleanup.
8529 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
8530
8531 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
8532
8533 * hostio.c (handle_readlink): New function.
8534 (handle_vFile): Call it to handle "vFile:readlink" packets.
8535
8536 2012-01-20 Pedro Alves <palves@redhat.com>
8537 Ulrich Weigand <ulrich.weigand@linaro.org>
8538
8539 * server.c (handle_v_requests): Only support vAttach and vRun to
8540 start multiple processes when in extended protocol mode.
8541
8542 2012-01-17 Pedro Alves <palves@redhat.com>
8543
8544 * tracepoint.c (initialize_tracepoint): Use mmap instead of
8545 memalign plus mprotect to allocate the scratch buffer.
8546
8547 2012-01-13 Pedro Alves <palves@redhat.com>
8548
8549 * server.c (attach_inferior): Clear `cont_thread'.
8550
8551 2012-01-13 Pedro Alves <palves@redhat.com>
8552
8553 * server.c (main): Avoid infinite loop while detaching/killing
8554 after a longjmp.
8555
8556 2012-01-09 Doug Evans <dje@google.com>
8557
8558 * server.c (start_inferior): Set last_ptid in --wrapper case.
8559
8560 2012-01-06 Yao Qi <yao@codesourcery.com>
8561
8562 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
8563 defined.
8564 [IN_PROCESS_AGENT] (debug_agent): New global variable.
8565
8566 2012-01-04 Yao Qi <yao@codesourcery.com>
8567
8568 * tracepoint.c (cmd_qtdp): Print debug message
8569 for static tracepoint.
8570
8571 2012-01-04 Yao Qi <yao@codesourcery.com>
8572
8573 * tracepoint.c (trace_vdebug): Differentiate debug message
8574 between gdbserver and IPA.
8575
8576 2012-01-03 Yao Qi <yao@codesourcery.com>
8577
8578 * tracepoint.c (tracepoint_was_hit): Don't collect for
8579 static tracepoint.
8580
8581 2012-01-02 Joel Brobecker <brobecker@adacore.com>
8582
8583 * terminal.h: Reformat copyright header.
8584
8585 2012-01-02 Joel Brobecker <brobecker@adacore.com>
8586
8587 * server.c (gdbserver_version): Update copyright year.
8588 * gdbreplay.c (gdbreplay_version): Likewise.
8589
8590 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
8591
8592 * linux-low.c (linux_create_inferior): Put empty if clause for write.
8593
8594 Revert:
8595 2011-12-18 Hui Zhu <teawater@gmail.com>
8596 * linux-low.c (linux_create_inferior): Save return value to ret.
8597
8598 2011-12-18 Hui Zhu <teawater@gmail.com>
8599
8600 * linux-low.c (linux_create_inferior): Save return value to ret.
8601
8602 2011-12-16 Doug Evans <dje@google.com>
8603
8604 * linux-low.c (linux_create_inferior): If stdio connection,
8605 redirect stdin from /dev/null, stdout to stderr.
8606 * remote-utils.c (remote_is_stdio): New static global.
8607 (remote_connection_is_stdio): New function.
8608 (remote_prepare): Handle stdio connection.
8609 (remote_open): Ditto.
8610 (remote_close): Don't close stdin for stdio connections.
8611 (read_prim,write_prim): New functions. Replace all calls to
8612 read/write to these.
8613 * server.c (main): Watch for "-" argument. Move call to
8614 remote_prepare before start_inferior.
8615 * server.h (STDIO_CONNECTION_NAME): New macro.
8616 (remote_connection_is_stdio): Declare.
8617
8618 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
8619 in debugging output.
8620
8621 2011-12-15 Yao Qi <yao@codesourcery.com>
8622
8623 * tracepoint.c: Include sys/syscall.h.
8624 (gdb_ust_thread): Remove preprocessor conditional.
8625
8626 2011-12-14 Pedro Alves <pedro@codesourcery.com>
8627
8628 * linux-low.c (linux_detach_one_lwp): Call
8629 the_low_target.prepare_to_resume before detaching.
8630
8631 2011-12-14 Yao Qi <yao@codesourcery.com>
8632
8633 * tracepoint.c (gdb_ust_thread): Don't ignore return value
8634 of write.
8635
8636 2011-12-14 Yao Qi <yao@codesourcery.com>
8637
8638 * i386-low.c (i386_low_stopped_data_address): Initialize local
8639 variable `control'.
8640
8641 2011-12-13 Pedro Alves <pedro@codesourcery.com>
8642
8643 PR remote/13492
8644
8645 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
8646 DR_CONTROL unless necessary. Extend comments.
8647 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
8648 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
8649
8650 2011-12-13 Yao Qi <yao@codesourcery.com>
8651
8652 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
8653 macros.
8654 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
8655
8656 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
8657
8658 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
8659 Print new debug message for such case.
8660
8661 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8662
8663 Fix overlapping memcpy.
8664 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
8665 the read_inferior_memory transfer.
8666 (delete_fast_tracepoint_jump): New variable buf. Use it for the
8667 write_inferior_memory transfer.
8668 (set_fast_tracepoint_jump): New variable buf. Use it for the
8669 read_inferior_memory and write_inferior_memory transfers.
8670 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
8671 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
8672 Use it for the write_inferior_memory transfer.
8673 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
8674 buffers.
8675
8676 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8677
8678 * linux-low.c (fetch_register, store_register): Make code
8679 consistent, fix formatting.
8680
8681 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8682
8683 * linux-low.c (usr_store_inferior_registers): Factor out code
8684 to handle individual registers into...
8685 (store_register): ... this new function.
8686
8687 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
8688
8689 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
8690 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
8691 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
8692 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
8693 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
8694 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
8695 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
8696 (srv_xmlfiles): Add new XML files.
8697
8698 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
8699 and <sys/uio.h>.
8700 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
8701 (init_registers_s390_linux32v1): Add prototype.
8702 (init_registers_s390_linux32v2): Likewise.
8703 (init_registers_s390_linux64v1): Likewise.
8704 (init_registers_s390_linux64v2): Likewise.
8705 (init_registers_s390x_linux64v1): Likewise.
8706 (init_registers_s390x_linux64v2): Likewise.
8707 (s390_num_regs): Increment to 52.
8708 (s390_regmap): Add orig_r2 register.
8709 (s390_num_regs_3264): Increment to 68.
8710 (s390_regmap_3264): Add orig_r2 register.
8711 (s390_collect_ptrace_register): Handle orig_r2 register.
8712 (s390_supply_ptrace_register): Likewise.
8713 (s390_fill_last_break): New function.
8714 (s390_store_last_break): Likewise.
8715 (s390_fill_system_call): New function.
8716 (s390_store_system_call): Likewise.
8717 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
8718 register sets.
8719 (s390_check_regset): New function.
8720 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
8721 NT_S390_SYSTEM_CALL regsets and use appropriate description.
8722 Update target_regsets for available register sets.
8723
8724 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
8725 Jan Kratochvil <jan.kratochvil@redhat.com>
8726
8727 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
8728 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
8729 New.
8730 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
8731 * linux-low.h (struct process_info_private): New member r_debug.
8732 * server.c (handle_qxfer_libraries): Call
8733 the_target->qxfer_libraries_svr4.
8734 (handle_qxfer_libraries_svr4): New function.
8735 (qxfer_packets): New entry "libraries-svr4".
8736 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
8737 * target.h (struct target_ops): New member qxfer_libraries_svr4.
8738 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
8739 PACKET_qXfer_libraries_svr4.
8740
8741 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
8742
8743 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
8744 PSW address/mask between 8-byte and 16-byte formats.
8745 (s390_supply_ptrace_register): Likewise.
8746 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
8747 basic addressing mode bit.
8748
8749 2011-11-24 Stan Shebs <stan@codesourcery.com>
8750
8751 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
8752
8753 2011-11-17 Stan Shebs <stan@codesourcery.com>
8754
8755 * tracepoint.c (struct tracepoint): New field traceframe_usage.
8756 (tracing_start_time): New global.
8757 (tracing_stop_time): New global.
8758 (tracing_user_name): New global.
8759 (tracing_notes): New global.
8760 (tracing_stop_note): New global.
8761 (cmd_qtstart): Set traceframe_usage, start_time.
8762 (stop_tracing): Set stop_time.
8763 (cmd_qtstatus): Report additional status.
8764 (cmd_qtp): New function.
8765 (handle_tracepoint_query): Call it.
8766 (cmd_qtnotes): New function.
8767 (handle_tracepoint_general_set): Call it.
8768 (get_timestamp): Rename from tsv_get_timestamp.
8769
8770 2011-11-14 Stan Shebs <stan@codesourcery.com>
8771 Kwok Cheung Yeung <kcy@codesourcery.com>
8772
8773 * linux-x86-low.c (small_jump_insn): New.
8774 (i386_install_fast_tracepoint_jump_pad): Add arguments for
8775 trampoline and error message, build a trampoline and issue a small
8776 jump instruction to it.
8777 (x86_install_fast_tracepoint_jump_pad): Add arguments for
8778 trampoline and error message.
8779 (x86_get_min_fast_tracepoint_insn_len): New.
8780 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
8781 * linux-low.h (struct linux_target_ops): Add arguments to
8782 install_fast_tracepoint_jump_pad operation, add new operation.
8783 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
8784 arguments.
8785 (linux_get_min_fast_tracepoint_insn_len): New function.
8786 (linux_target_op): Add new operation.
8787 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
8788 (gdb_trampoline_buffer_end): Ditto.
8789 (gdb_trampoline_buffer_error): Ditto.
8790 (struct ipa_sym_addresses): Add fields for new IPA variables.
8791 (symbol_list): Add entries for new IPA variables.
8792 (struct tracepoint): Add fields to hold the address range of the
8793 trampoline used by the tracepoint.
8794 (trampoline_buffer_head): New static variable.
8795 (trampoline_buffer_tail): Ditto.
8796 (claim_trampoline_space): New function.
8797 (have_fast_tracepoint_trampoline_buffer): New function.
8798 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
8799 structure.
8800 (install_fast_tracepoint): Ditto, also add error buffer argument.
8801 (cmd_qtminftpilen): New function.
8802 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
8803 (fast_tracepoint_from_trampoline_address): New function.
8804 (fast_tracepoint_collecting): Handle trampoline as part of jump
8805 pad space.
8806 (set_trampoline_buffer_space): New function.
8807 (initialize_tracepoint): Initialize new IPA variables.
8808 * target.h (struct target_ops): Add arguments to
8809 install_fast_tracepoint_jump_pad operation, add new
8810 get_min_fast_tracepoint_insn_len operation.
8811 (target_get_min_fast_tracepoint_insn_len): New.
8812 (install_fast_tracepoint_jump_pad): Add arguments.
8813 * server.h (IPA_BUFSIZ): Define.
8814 * linux-i386-ipa.c: Include extra header files.
8815 (initialize_fast_tracepoint_trampoline_buffer): New function.
8816 (initialize_low_tracepoint): Call it.
8817 * server.h (set_trampoline_buffer_space): Declare.
8818 (claim_trampoline_space): Ditto.
8819 (have_fast_tracepoint_trampoline_buffer): Ditto.
8820
8821 2011-11-14 Yao Qi <yao@codesourcery.com>
8822
8823 * server.c (handle_query): Handle InstallInTrace for qSupported.
8824 * tracepoint.c (add_tracepoint): Sort list.
8825 (install_tracepoint, download_tracepoint): New.
8826 (cmd_qtdp): Call them to install and download tracepoints.
8827 (sort_tracepoints): Removed.
8828 (cmd_qtstart): Update.
8829
8830 2011-11-14 Yao Qi <yao@codesourcery.com>
8831
8832 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
8833 * mem-break.h: Declare.
8834 * tracepoint.c (cmd_qtstart): Move some code to ...
8835 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
8836 New.
8837 (download_tracepoints): Move some code to ...
8838 (download_tracepoint_1): ... here. New.
8839
8840 2011-11-08 Yao Qi <yao@codesourcery.com>
8841
8842 * remote-utils.c (relocate_instruction): A comment fix.
8843
8844 2011-11-07 Joel Brobecker <brobecker@adacore.com>
8845
8846 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
8847 (i386_dr_low_get_control, i386_dr_low_get_status): Use
8848 dr_status_mirror and dr_control_mirror from debug_reg_state.
8849 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
8850 (i386_initial_stuff): Remove use of deleted globals.
8851 (i386_get_thread_context, i386_set_thread_context,
8852 i386_thread_added): Use dr_status_mirror and dr_control_mirror
8853 from debug_reg_state.
8854
8855 2011-11-05 Yao Qi <yao@codesourcery.com>
8856
8857 * tracepoint.c (gdb_collect): Loop over tracepoints of same
8858 address as TPOINT's.
8859
8860 2011-11-02 Stan Shebs <stan@codesourcery.com>
8861
8862 * tracepoint.c (agent_mem_read_string): New function.
8863 (eval_agent_expr): Call it for tracenz.
8864 * server.c (handle_query): Report support for tracenz.
8865
8866 2011-11-02 Yao Qi <yao@codesourcery.com>
8867
8868 * tracepoint.c (cmd_qtstart): Remove unused local variables.
8869
8870 2011-11-02 Yao Qi <yao@codesourcery.com>
8871
8872 * target.h: Fix a typo in comment.
8873
8874 2011-10-31 Pedro Alves <pedro@codesourcery.com>
8875
8876 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
8877 clobber the breakpoints' shadows with fast tracepoint jumps.
8878 * mem-break.h (check_mem_write): Add `myaddr' parameter.
8879 * target.c (write_inferior_memory): Also pass MYADDR down to
8880 check_mem_write.
8881
8882 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
8883
8884 * configure.ac: Check support for personality routine.
8885 * configure: Regenerate.
8886 * config.in: Likewise.
8887 * linux-low.c: Include <sys/personality.h>.
8888 Define ADDR_NO_RANDOMIZE if necessary.
8889 (linux_create_inferior): Disable address space randomization when
8890 forking inferior, if requested.
8891 (linux_supports_disable_randomization): New function.
8892 (linux_target_ops): Install it.
8893 * server.h (disable_randomization): Declare.
8894 * server.c (disable_randomization): New global variable.
8895 (handle_general_set): Handle QDisableRandomization.
8896 (handle_query): Likewise for qSupported.
8897 (main): Support --disable-randomization and --no-disable-randomization
8898 command line arguments.
8899 * target.h (struct target_ops): Add supports_disable_randomization.
8900 (target_supports_disable_randomization): New macro.
8901
8902 2011-09-29 Mike Frysinger <vapier@gentoo.org>
8903
8904 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
8905 ifdef check.
8906 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
8907 [!PT_GETDSBT] (target_loadmap): New definition.
8908 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
8909 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
8910 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
8911 and PT_GETDSBT to LINUX_LOADMAP.
8912 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
8913 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
8914
8915 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
8916
8917 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
8918 (arm_linux_hwbp_cap): New static variable.
8919 (arm_linux_get_hwbp_cap): Replace by ...
8920 (arm_linux_init_hwbp_cap): ... this new function.
8921 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
8922 (arm_linux_get_hw_watchpoint_count): Likewise.
8923 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8924 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
8925 (arm_prepare_to_resume): Use perror_with_name instead of error.
8926
8927 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
8928
8929 * linux-arm-low.c: Include <signal.h>.
8930 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
8931 (struct arm_linux_hwbp_cap): New data type.
8932 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
8933 (struct arm_linux_hw_breakpoint): New data type.
8934 (MAX_BPTS, MAX_WPTS): Define.
8935 (struct arch_process_info, struct arch_lwp_info): New data types.
8936 (arm_linux_get_hwbp_cap): New function.
8937 (arm_linux_get_hw_breakpoint_count): Likewise.
8938 (arm_linux_get_hw_watchpoint_count): Likewise.
8939 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8940 (arm_hwbp_control_initialize): Likewise.
8941 (arm_hwbp_control_is_enabled): Likewise.
8942 (arm_hwbp_control_is_initialized): Likewise.
8943 (arm_hwbp_control_disable): Likewise.
8944 (arm_linux_hw_breakpoint_equal): Likewise.
8945 (arm_linux_hw_point_initialize): Likewise.
8946 (struct update_registers_data): New data structure.
8947 (update_registers_callback: New function.
8948 (arm_insert_point): Likewise.
8949 (arm_remove_point): Likewise.
8950 (arm_stopped_by_watchpoint): Likewise.
8951 (arm_stopped_data_address): Likewise.
8952 (arm_new_process): Likewise.
8953 (arm_new_thread): Likewise.
8954 (arm_prepare_to_resume): Likewise.
8955 (the_low_target): Register arm_insert_point, arm_remove_point,
8956 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
8957 arm_new_thread, and arm_prepare_to_resume.
8958
8959 2011-09-15 Stan Shebs <stan@codesourcery.com>
8960
8961 * server.h (struct emit_ops): Add compare-goto fields.
8962 * tracepoint.c (gdb_agent_op_sizes): New table.
8963 (emit_eq_goto): New function.
8964 (emit_ne_goto): New function.
8965 (emit_lt_goto): New function.
8966 (emit_le_goto): New function.
8967 (emit_gt_goto): New function.
8968 (emit_ge_goto): New function.
8969 (is_goto_target): New function.
8970 (compile_bytecodes): Recognize special cases of compare-goto
8971 combinations and call specialized emitters for them.
8972 * linux-x86-low.c (amd64_emit_eq_goto): New function.
8973 (amd64_emit_ne_goto): New function.
8974 (amd64_emit_lt_goto): New function.
8975 (amd64_emit_le_goto): New function.
8976 (amd64_emit_gt_goto): New function.
8977 (amd64_emit_ge_goto): New function.
8978 (amd64_emit_ops): Add the new functions.
8979 (i386_emit_eq_goto): New function.
8980 (i386_emit_ne_goto): New function.
8981 (i386_emit_lt_goto): New function.
8982 (i386_emit_le_goto): New function.
8983 (i386_emit_gt_goto): New function.
8984 (i386_emit_ge_goto): New function.
8985 (i386_emit_ops): Add the new functions.
8986
8987 2011-09-08 Stan Shebs <stan@codesourcery.com>
8988
8989 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
8990 (i386_emit_epilogue): Restore %ebx.
8991
8992 2011-08-31 Jie Zhang <jzhang918@gmail.com>
8993
8994 * server.c (step_thread): Remove definition.
8995 (process_serial_event): Don't handle Hs.
8996 * server.h (step_thread): Remove declaration.
8997 * target.c (set_desired_inferior): Remove use of step_thread.
8998
8999 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9000
9001 * linux-low.c: Include linux-procfs.h.
9002 (linux_attach_lwp_1): Update comments.
9003 (linux_attach): Scan for existing threads when attaching to a
9004 process that is the tgid.
9005 * Makefile.in: Update dependencies.
9006
9007 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9008
9009 * configure.srv: Add linux-procfs.o dependencies.
9010
9011 2011-08-14 Yao Qi <yao@codesourcery.com>
9012
9013 * target.h (struct target_ops): Fix indent.
9014 * win32-low.c (win32_target_ops): Fix comment.
9015
9016 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
9017 Yao Qi <yao@codesourcery.com>
9018
9019 * Makefile.in (clean): Remove tic6x-*.c files.
9020 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9021 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9022 (tic6x-c64xp-linux.c): Likewise.
9023 * configure.srv: Add support for tic6x-*-uclinux.
9024 * linux-tic6x-low.c: New.
9025 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9026
9027 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
9028 Yao Qi <yao@codesourcery.com>
9029
9030 * target.h (struct target_ops): Add read_loadmap.
9031 * linux-low.c (struct target_loadseg): New type.
9032 (struct target_loadmap): New type.
9033 (linux_read_loadmap): New function.
9034 (linux_target_ops): Add linux_read_loadmap.
9035 * server.c (handle_query): Support qXfer:fdpic:read packet.
9036 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9037 to NULL.
9038
9039 2011-08-05 Eli Zaretskii <eliz@gnu.org>
9040
9041 * win32-low.c: Include <stdint.h>.
9042
9043 2011-07-22 Pedro Alves <pedro@codesourcery.com>
9044
9045 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9046 to the inferior here.
9047 (i386_remove_aligned_watchpoint): Ditto.
9048 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9049 fit part of the watchpoint in the debug registers.
9050 (i386_update_inferior_debug_regs): New.
9051 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9052 registers, and only update the inferior on success.
9053 (i386_low_remove_watchpoint): Ditto.
9054
9055 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9056
9057 * linux-low.c (compare_ints, unique, list_threads, show_process,
9058 linux_core_of_thread): Delete.
9059 (linux_target_ops): Change linux_core_of_thread to
9060 linux_common_core_of_thread.
9061 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9062 * utils.c (malloc_failure): Change type of argument.
9063 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9064 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9065 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9066 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9067 (IPA_OBJS): Add common-utils-ipa.o.
9068 (ptid_h, linux_osdata_h): New macros.
9069 (server_h): Add common/common-utils.h, common/xml-utils.h,
9070 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9071 common/ptid.h.
9072 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9073 ptid.o, buffer.o): New rules.
9074 (linux-low.o): Add common/linux-osdata.h as a dependency.
9075 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9076 * configure.ac: Add AC_HEADER_DIRENT check.
9077 * config.in: Regenerate.
9078 * configure: Regenerate.
9079 * remote-utils.c (xml_escape_text): Delete.
9080 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9081 buffer_xml_printf): Move to common/buffer.c.
9082 * server.c (main): Remove call to initialize_inferiors.
9083 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9084 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9085 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9086 internal_error, gdb_assert, gdb_assert_fail): Delete.
9087 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9088 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9089 common/buffer.h.
9090 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9091 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9092 initialize_inferiors): Delete.
9093
9094 2011-07-20 Pedro Alves <pedro@codesourcery.com>
9095
9096 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9097 symbol error.
9098
9099 2011-05-31 Pedro Alves <pedro@codesourcery.com>
9100
9101 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9102 assertion.
9103 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9104
9105 2011-05-26 Yao Qi <yao@codesourcery.com>
9106
9107 * Makefile.in (thread-db.o): Track dependence to
9108 common/gdb_thread_db.h.
9109 * thread-db.c: include gdb_thread_db.h from right place.
9110
9111 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9112
9113 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9114 __FILE__ and __LINE__ to internal_error.
9115
9116 2011-05-13 Doug Evans <dje@google.com>
9117
9118 * thread-db.c (try_thread_db_load_from_sdir): New function.
9119 (try_thread_db_load_from_dir): New function.
9120 (thread_db_load_search): Handle $sdir, ignore $pdir.
9121 Remove trying of system directories if search of
9122 libthread-db-search-path fails, that is now done via $sdir.
9123
9124 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9125
9126 * server.c (handle_query): Add EnableDisableTracepoints to the list
9127 of supported features.
9128 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
9129 tracepoints.
9130 (cmd_qtenable_disable): New.
9131 (cmd_qtstart): Install tracepoints even if disabled.
9132 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9133 receiving a QTEnable or QTDisable packet.
9134 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9135 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9136 tracepoints.
9137 (gdb_probe): Skip data collection if static tracepoint is disabled.
9138
9139 2011-05-10 Doug Evans <dje@google.com>
9140
9141 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9142
9143 2011-05-04 Doug Evans <dje@google.com>
9144
9145 * linux-low.c (linux_join): Skip process lookup.
9146 * spu-low.c (spu_join): Ditto.
9147 * server.c (join_inferiors_callback): Delete.
9148 (process_serial_event): For 'D' packet (detach) call join_inferior
9149 directly.
9150
9151 2011-05-04 Joseph Myers <joseph@codesourcery.com>
9152
9153 * README: Don't mention xscale*-*-linux*.
9154 * configure.srv (xscale*-*-linux*): Don't handle target.
9155
9156 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9157
9158 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9159 casting pointers.
9160 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9161 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9162 (i386_emit_void_call_2): Likewise.
9163
9164 2011-04-26 Yao Qi <yao@codesourcery.com>
9165
9166 * linux-low.c: Move common macros to linux-ptrace.h.
9167 Include linux-ptrace.h.
9168 * Makefile.in (linux_ptrace_h): New.
9169 (linux-low.o): Depends on linux-ptrace.h.
9170
9171 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9172
9173 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9174 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9175 (remote_prepare): New function with most of the TCP code from ...
9176 (remote_open): ... here. Detect PORT here unconditionally. Move also
9177 setting transport_is_reliable.
9178 * server.c (run_once): New variable.
9179 (gdbserver_usage): Document it.
9180 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9181 the first run if RUN_ONCE.
9182 * server.h (run_once, remote_prepare): New declarations.
9183
9184 2011-04-19 Tom Tromey <tromey@redhat.com>
9185
9186 * win32-low.c (handle_load_dll): Remove duplicate "the".
9187
9188 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9189
9190 Remove support for old Cygwin 1.5 versions.
9191 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9192 function to avoid warning.
9193 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9194 warning.
9195
9196 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9197
9198 * gdbserver/server.h (Macro _): Define it if not available.
9199
9200 2011-03-14 Michael Snyder <msnyder@vmware.com>
9201
9202 * hostio.c (handle_close): Remove unnecessary null test.
9203
9204 2011-03-10 Joel Brobecker <brobecker@adacore.com>
9205
9206 * Makefile.in (maintainer-clean realclean distclean): Remove
9207 "make ... subdir_do" command.
9208
9209 2011-03-10 Michael Snyder <msnyder@vmware.com>
9210
9211 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9212
9213 * server.c (handle_v_run): Free alloced buffer on early return.
9214
9215 2011-03-09 Yao Qi <yao@codesourcery.com>
9216
9217 Revert:
9218 2011-03-04 Yao Qi <yao@codesourcery.com>
9219
9220 * Makefile.in: Remove GNU make feature --directory.
9221
9222 2011-03-05 Yao Qi <yao@codesourcery.com>
9223
9224 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9225 (subdir_do): New make target. Copied from gdb/Makefile.
9226 (maintainer-clean, realclean, distclean, clean): Call corresponding
9227 make targets in common/Makefile.
9228
9229 2011-02-11 Yao Qi <yao@codesourcery.com>
9230
9231 * configure.ac: Call AC_PROG_RANLIB.
9232 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9233 * configure: Regenerate.
9234
9235 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9236
9237 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9238
9239 2011-03-06 Yao Qi <yao@codesourcery.com>
9240
9241 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9242
9243 2011-03-05 Yao Qi <yao@codesourcery.com>
9244
9245 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9246 (subdir_do): New make target. Copied from gdb/Makefile.
9247 (maintainer-clean, realclean, distclean, clean): Call corresponding
9248 make targets in common/Makefile.
9249
9250 2011-03-04 Yao Qi <yao@codesourcery.com>
9251
9252 * Makefile.in: Remove GNU make feature --directory.
9253
9254 2011-03-04 Michael Snyder <msnyder@vmware.com>
9255
9256 * server.c (queue_stop_reply): Call xmalloc not malloc.
9257
9258 2011-03-02 Michael Snyder <msnyder@vmware.com>
9259
9260 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9261
9262 2011-02-28 Michael Snyder <msnyder@vmware.com>
9263
9264 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9265 (cmd_qtframe): Ditto.
9266 (cmd_qtbuffer): Ditto.
9267 (cmd_bigqtbuffer): Ditto.
9268
9269 * utils.c (decimal2str): Initialize 'width' to nine, then
9270 don't mess with it.
9271
9272 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9273
9274 * hostio.c (require_data): Free *data, not data.
9275
9276 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9277
9278 * hostio.c (require_data): Use free, not xfree.
9279
9280 2011-02-27 Michael Snyder <msnyder@vmware.com>
9281
9282 * server.c (handle_query): Discard unused value.
9283
9284 * hostio.c (require_data): Free malloc memory before returning
9285 error.
9286
9287 2011-02-26 Michael Snyder <msnyder@vmware.com>
9288
9289 * linux-low.c (list_threads): Call closedir for dirent.
9290
9291 2011-02-27 Michael Snyder <msnyder@vmware.com>
9292
9293 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9294 a case statement falls through.
9295
9296 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9297
9298 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9299 in comparison.
9300
9301 2011-02-26 Michael Snyder <msnyder@vmware.com>
9302
9303 * utils.c (decimal2str): Eliminate dead code and dead param.
9304 (pulongest): Drop dead param from call to decimal2str.
9305 (plongest): Ditto.
9306
9307 2011-02-24 Joel Brobecker <brobecker@adacore.com>
9308
9309 Revert the following patch (not approved yet):
9310 2011-02-21 Hui Zhu <teawater@gmail.com>
9311 * tracepoint.c (tp_printf): New function.
9312 (eval_agent_expr): Handle gdb_agent_op_printf.
9313
9314 2011-02-21 Hui Zhu <teawater@gmail.com>
9315
9316 * tracepoint.c (tp_printf): New function.
9317 (eval_agent_expr): Handle gdb_agent_op_printf.
9318
9319 2011-02-18 Tom Tromey <tromey@redhat.com>
9320
9321 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9322 (tracepoint.o): Likewise.
9323 * tracepoint.c (enum gdb_agent_op): Use ax.def.
9324 (gdb_agent_op_names): Likewise.
9325
9326 2011-02-18 Tom Tromey <tromey@redhat.com>
9327
9328 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9329 gdb_agent_op_rot>: New constants.
9330 (gdb_agent_op_names): Add pick and roll.
9331 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9332 cases.
9333
9334 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9335
9336 * aclocal.m4: Regenerated with aclocal-1.11.1.
9337
9338 2011-02-14 Pedro Alves <pedro@codesourcery.com>
9339
9340 * server.c (handle_qxfer_traceframe_info): New.
9341 (qxfer_packets): Register "traceframe-info".
9342 (handle_query): Report support for qXfer:traceframe-info:read+.
9343 * tracepoint.c (match_blocktype): New.
9344 (traceframe_find_block_type): Rename to ...
9345 (traceframe_walk_blocks): ... this. Add callback filter argument,
9346 and use it.
9347 (traceframe_find_block_type): New, reimplemented on top of
9348 traceframe_walk_blocks.
9349 (build_traceframe_info_xml): New.
9350 (traceframe_read_info): New.
9351 * server.h (traceframe_read_info): Declare.
9352
9353 2011-02-11 Yao Qi <yao@codesourcery.com>
9354
9355 * configure.ac: Call AC_PROG_RANLIB.
9356 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9357 * configure: Regenerate.
9358
9359 2011-02-07 Pedro Alves <pedro@codesourcery.com>
9360
9361 * server.c (gdb_read_memory): Change return semantics to allow
9362 partial transfers.
9363 (handle_search_memory_1): Adjust.
9364 (process_serial_event) <'m' packet>: Handle partial transfers.
9365 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9366
9367 2011-01-28 Pedro Alves <pedro@codesourcery.com>
9368
9369 * regcache.c (init_register_cache): Initialize
9370 regcache->register_status.
9371 (free_register_cache): Release regcache->register_status.
9372 (regcache_cpy): Copy register_status.
9373 (registers_to_string): Print 'x's for unavailable registers.
9374 (supply_register): Mark the register's status valid or
9375 unavailable, depending on whether a buffer was passed in or not.
9376 (supply_register_zeroed): New.
9377 (supply_regblock): Mark the registers' status valid or
9378 unavailable, depending on whether a buffer was passed in or not.
9379 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9380 (struct regcache): New `register_status' field.
9381 (supply_register_zeroed): Declare.
9382 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9383 supply_register_zeroed, rather than passing a NULL buffer to
9384 supply_register.
9385 * tracepoint.c (fetch_traceframe_registers): Update comment.
9386
9387 2011-01-28 Pedro Alves <pedro@codesourcery.com>
9388
9389 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9390 buffer explicit.
9391
9392 2011-01-25 Pedro Alves <pedro@codesourcery.com>
9393
9394 * server.h (decode_xfer_write): Change prototype.
9395 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9396 and don't extract the annex here.
9397 * server.c (decode_xfer_read): Remove `annex' parameter,
9398 and don't extract the annex here.
9399 (decode_xfer): New.
9400 (struct qxfer): New.
9401 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9402 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9403 (handle_qxfer_statictrace): New functions, abstracted out from
9404 handle_query, and made to use the struct qxfer interface.
9405 (handle_threads_qxfer_proper): Rename to ...
9406 (handle_qxfer_threads_proper): ... this.
9407 (handle_threads_qxfer): Rename to ...
9408 (handle_qxfer_threads): ... this. Adjust.
9409 (qxfer_packets): New array.
9410 (handle_qxfer): New function.
9411 (handle_query): Use handle_qxfer.
9412
9413 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9414
9415 * gdbreplay.c: Shorten lines of >= 80 columns.
9416 * linux-low.c: Ditto.
9417 * linux-ppc-low.c: Ditto.
9418 * linux-s390-low.c: Ditto.
9419 * linux-sparc-low.c: Ditto.
9420 * linux-x86-low.c: Ditto.
9421 * linux-xtensa-low.c: Ditto.
9422 * mem-break.c: Ditto.
9423 * nto-low.c: Ditto.
9424 * regcache.h: Ditto.
9425 * remote-utils.c: Ditto.
9426 * server.c: Ditto.
9427 * server.h: Ditto.
9428 * thread-db.c: Ditto.
9429 * tracepoint.c: Ditto.
9430 * utils.c: Ditto.
9431 * win32-low.h: Ditto.
9432
9433 2011-01-05 Joel Brobecker <brobecker@adacore.com>
9434
9435 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9436 update.
9437
9438 2011-01-01 Joel Brobecker <brobecker@adacore.com>
9439
9440 * server.c (gdbserver_version): Update copyright year in version
9441 output.
9442 * gdbreplay.c (gdbreplay_version): Ditto.
9443
9444 2010-12-29 Jie Zhang <jie.zhang@analog.com>
9445
9446 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9447 * linux-bfin-low.c: New file.
9448 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9449 PT_DATA_ADDR for BFIN targets.
9450 * Makefile.in (SFILES): Add linux-bfin-low.c.
9451 (clean): Remove reg-bfin.c.
9452 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9453 * README: Mention supported Blackfin targets.
9454
9455 2010-12-23 Mike Frysinger <vapier@gentoo.org>
9456
9457 * .gitignore: New file.
9458
9459 2010-11-16 Mike Frysinger <vapier@gentoo.org>
9460
9461 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
9462
9463 2010-10-22 Jie Zhang <jie@codesourcery.com>
9464
9465 * Makefile.in: Add FLAGS_TO_PASS variable.
9466 (install): Remove dependency of install-only and recursively
9467 invoke make for install-only.
9468
9469 2010-10-04 Doug Evans <dje@google.com>
9470
9471 * Makefile.in (uninstall): Use $(DESTDIR).
9472
9473 2010-09-24 Pedro Alves <pedro@codesourcery.com>
9474
9475 PR gdb/11842
9476
9477 * linux-x86-low.c (compat_siginfo_from_siginfo)
9478 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
9479 si_code is < 0. Check for si_code == SI_TIMER before checking for
9480 si_code < 0.
9481
9482 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9483
9484 * lynx-i386-low.c: New file.
9485 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
9486
9487 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9488
9489 * lynx-low.c (ptrace_request_to_str): Remove handling for
9490 request values that have been removed in LynxOS 5.x.
9491
9492 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9493
9494 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
9495 <ptrace.h>
9496
9497 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9498
9499 * configure.ac: Add --enable-inprocess-agent option.
9500 * configure: Rebuilt.
9501
9502 2010-09-06 Yao Qi <yao@codesourcery.com>
9503
9504 * linux-low.c (linux_kill): Remove unused variable.
9505 (linux_stabilize_threads): Likewise.
9506 * server.c (start_inferior): Likewise.
9507 (queue_stop_reply_callback): Likewise.
9508 * tracepoint.c (do_action_at_tracepoint): Likewise.
9509
9510 2010-09-06 Yao Qi <yao@codesourcery.com>
9511
9512 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
9513 on return.
9514
9515 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9516
9517 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
9518
9519 2010-09-06 Pedro Alves <pedro@codesourcery.com>
9520
9521 * Makefile.in (install-only): Replace $IPA_DEPFILES with
9522 "$(IPA_DEPFILES)".
9523
9524 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9525
9526 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
9527 gdbserver/lynx-ppc-low.c: New files.
9528 * Makefile.in (lynx_low_h): New variable.
9529 (lynx-low.o, lynx-ppc-low.o): New rules.
9530 * configure.ac: On LynxOS, link with -lnetinet.
9531 * configure.srv: Add handling of powerpc-*-lynxos* targets.
9532 * configure: regenerate.
9533
9534 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9535
9536 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
9537 * configure.ac: Add check for vasprintf and vsnprintf.
9538 * configure, config.in: Regenerate.
9539 * server.h (vasprintf, vsnprintf): Add conditional declarations.
9540
9541 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9542
9543 * gdbreplay.c: Move include of alloca.h up, next to include of
9544 malloc.h.
9545 * server.h: Add include of malloc.h.
9546 * mem-break.c: Remove include of malloc.h.
9547 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
9548
9549 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9550
9551 * Makefile.in (memmem.o): Build with -Wno-error.
9552
9553 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9554
9555 * utils.c (xsnprintf): Make non-static.
9556 * server.h: Add xsnprintf declaration.
9557 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
9558 replace calls to snprintf by calls to xsnprintf throughout.
9559
9560 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9561
9562 * configure.ac: Add configure check for alloca.
9563 * configure, config.in: Regenerate.
9564 * server.h: Include alloca.h if it exists.
9565 * gdbreplay.c: Include alloca.h if it exists.
9566
9567 2010-08-28 Pedro Alves <pedro@codesourcery.com>
9568
9569 * linux-low.c (__SIGRTMIN): Define if not already defined.
9570 (linux_create_inferior): Check for __ANDROID__ rather than
9571 __SIGRTMIN.
9572 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
9573 are already deferred.
9574 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
9575 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
9576 stopped and already has a pending signal to report.
9577 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
9578 a pending signal to report or is moving out of a jump pad.
9579 (linux_init_signals): Check for __ANDROID__ rather than
9580 __SIGRTMIN.
9581
9582 2010-08-28 Pedro Alves <pedro@codesourcery.com>
9583
9584 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
9585 debug_threads check. Avoid a linear search when not doing debug
9586 output.
9587
9588 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9589
9590 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
9591 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
9592 (struct file_handler) <fd>: Change type to gdb_fildes_t.
9593 (process_event): Change local fd's type to gdb_fildes_t.
9594 (create_file_handler): Adjust prototype.
9595 (delete_file_handler): Adjust prototype.
9596 (handle_file_event): Adjust prototype. Use pfildes.
9597 (create_file_event): Adjsut prototype.
9598 * remote-utils.c (remote_desc, listen_desc): Change type to
9599 gdb_fildes_t.
9600 * server.h: New gdb_fildes_t typedef.
9601 [USE_WIN32API]: Include winsock2.h.
9602 (delete_file_handler, add_file_handler): Adjust prototypes.
9603 (pfildes): Declare.
9604 * utils.c (pfildes): New.
9605
9606 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9607
9608 * configure.ac (build_warnings): Add -Wno-char-subscripts.
9609 * configure: Regenerate.
9610
9611 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9612
9613 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
9614 (linux_done_accessing_memory): ... this.
9615 (linux_target_ops): Adjust.
9616 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
9617 * nto-low.c (nto_target_ops): Adjust comment.
9618 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
9619 * spu-low.c (spu_target_ops): Adjust comment.
9620 * target.h (target_ops): Rename unprepare_to_access_memory field
9621 to done_accessing_memory.
9622 (unprepare_to_access_memory): Rename to ...
9623 (done_accessing_memory): ... this.
9624
9625 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9626
9627 * linux-low.c (linux_prepare_to_access_memory): New.
9628 (linux_unprepare_to_access_memory): New.
9629 (linux_target_ops): Install them.
9630 * server.c (read_memory): Rename to ...
9631 (gdb_read_memory): ... this. Use
9632 prepare_to_access_memory/prepare_to_access_memory.
9633 (write_memory): Rename to ...
9634 (gdb_write_memory): ... this. Use
9635 prepare_to_access_memory/prepare_to_access_memory.
9636 (handle_search_memory_1): Adjust.
9637 (process_serial_event): Adjust.
9638 * target.h (struct target_ops): New fields
9639 prepare_to_access_memory and unprepare_to_access_memory.
9640 (prepare_to_access_memory, unprepare_to_access_memory): New.
9641 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
9642 prepare_to_access_memory/prepare_to_access_memory.
9643 * nto-low.c (nto_target_ops): Adjust.
9644 * spu-low.c (spu_target_ops): Adjust.
9645 * win32-low.c (win32_target_ops): Adjust.
9646
9647 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9648
9649 * Makefile.in (WARN_CFLAGS): Get it from configure.
9650 (WERROR_CFLAGS): New.
9651 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
9652 * configure.ac: Introduce --enable-werror, which adds -Werror to
9653 the compiler command line. Enabled by default. Disable with
9654 --disable-werror. Add -Wdeclaration-after-statement
9655 Wpointer-arith and -Wformat-nonliteral to warning flags.
9656 * configure: Regenerate.
9657
9658 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9659
9660 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
9661
9662 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9663
9664 * gdbreplay.c (remote_error): New.
9665 (gdbchar): New.
9666 (expect): Use gdbchar. Check for error reading from GDB.
9667 Clarify sync error output.
9668 (play): Check for errors writing to GDB.
9669 * linux-low.c (sigchld_handler): Really ignore `write' errors.
9670 * remote-utils.c (getpkt): Check for errors writing to the remote
9671 descriptor.
9672
9673 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9674
9675 * linux-low.c (linux_wait_1): Move non-debugging code out of
9676 `debug_threads' control.
9677
9678 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9679
9680 * linux-low.c (linux_wait_1): Don't set last_status here.
9681 * server.c (push_event, queue_stop_reply_callback): Assert we're
9682 not pushing a TARGET_WAITKIND_IGNORE event.
9683 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
9684 (myresume, handle_target_event): Set the thread's last_resume_kind
9685 and last_status from the target returned status.
9686
9687 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9688
9689 PR threads/10729
9690
9691 * linux-x86-low.c (update_debug_registers_callback): New.
9692 (i386_dr_low_set_addr): Use it.
9693 (i386_dr_low_get_addr): New.
9694 (i386_dr_low_set_control): Use update_debug_registers_callback.
9695 (i386_dr_low_get_control): New.
9696 (i386_dr_low_get_status): Adjust.
9697 * linux-low.c (linux_stop_lwp): New.
9698 * linux-low.h (linux_stop_lwp): Declare.
9699
9700 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
9701 argument instead of a i386_debug_reg_state.
9702 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
9703 a i386_debug_reg_state.
9704 (i386_insert_aligned_watchpoint): Adjust.
9705 (i386_remove_aligned_watchpoint): Adjust.
9706 (i386_low_stopped_data_address): Read the debug registers from the
9707 inferior instead of from the mirrors.
9708 * i386-low.h (struct i386_debug_reg_state): Extend comment.
9709 (i386_dr_low_get_addr): Declare.
9710 (i386_dr_low_get_control): Declare.
9711 (i386_dr_low_get_status): Change prototype.
9712
9713 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
9714 (i386_dr_low_get_addr): New.
9715 (i386_dr_low_get_control): New.
9716 (i386_dr_low_get_status): Adjust prototype. Return
9717 dr_status_mirror.
9718 (i386_initial_stuff): Clear dr_status_mirror and
9719 dr_control_mirror.
9720 (i386_get_thread_context): Adjust.
9721 (i386_set_thread_context): Adjust.
9722 (i386_thread_added): Adjust.
9723
9724 2010-08-24 Pedro Alves <pedro@codesourcery.com>
9725
9726 * linux-low.h (linux_thread_area): Delete declaration.
9727
9728 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
9729
9730 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
9731 after its termination.
9732
9733 2010-08-09 Pedro Alves <pedro@codesourcery.com>
9734
9735 * linux-low.c (gdb_wants_lwp_stopped): Delete.
9736 (gdb_wants_all_stopped): Delete.
9737 (linux_wait_1): Don't call them.
9738 * server.c (handle_v_cont): Tag all threads as want-stopped.
9739 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
9740 stopped as "client-wants-stopped".
9741
9742 2010-07-31 Pedro Alves <pedro@codesourcery.com>
9743
9744 * Makefile.in (signals_h): New.
9745 (server_h): Depend on it.
9746 (server.o): Don't depend on $(signals_def).
9747 (signals.o): Depend on $(signals_def).
9748
9749 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
9750
9751 * Makefile.in (signals_def): New.
9752 (server_h): Append include/gdb/signals.h and signals_def.
9753 (server.o): Append signals_def.
9754
9755 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9756
9757 * server.c (handle_target_event): Use target_signal_to_host for
9758 resume_info.sig initialization.
9759 * target.h (struct thread_resume) <sig>: New comment.
9760
9761 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
9762
9763 * server.c (handle_query): strcpy() the returned string from paddress()
9764 instead of sprintf().
9765 * utils.c (paddress): Return phex_nz().
9766
9767 2010-07-07 Joel Brobecker <brobecker@adacore.com>
9768
9769 * server.c (handle_v_cont): Call mourn_inferior if process
9770 just exited.
9771 (myresume): Likewise.
9772
9773 2010-07-01 Pedro Alves <pedro@codesourcery.com>
9774
9775 Static tracepoints, and integration with UST.
9776
9777 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
9778 * mem-break.c (uninsert_all_breakpoints)
9779 (reinsert_all_breakpoints): New.
9780 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
9781 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
9782 (gdb_agent_ust_loaded, helper_thread_id)
9783 (gdb_agent_helper_thread_id): New macros.
9784 (struct ipa_sym_addresses): Add addr_ust_loaded,
9785 addr_helper_thread_id, addr_cmd_buf.
9786 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
9787 (in_process_agent_loaded_ust): New.
9788 (write_e_ust_not_loaded): New.
9789 (maybe_write_ipa_ust_not_loaded): New.
9790 (struct collect_static_trace_data_action): New.
9791 (enum tracepoint_type) <static_tracepoint>: New.
9792 (struct tracepoint) <handle>: Mention static tracepoints.
9793 (struct static_tracepoint_ctx): New.
9794 (CMD_BUF_SIZE): New.
9795 (add_tracepoint_action): Handle static tracepoint actions.
9796 (unprobe_marker_at): New.
9797 (clear_installed_tracepoints): Handle static tracepoints.
9798 (cmd_qtdp): Handle static tracepoints.
9799 (probe_marker_at): New.
9800 (cmd_qtstart): Handle static tracepoints.
9801 (response_tracepoint): Handle static tracepoints.
9802 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
9803 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
9804 (get_context_regcache): Handle static tracepoints.
9805 (do_action_at_tracepoint): Handle static tracepoint actions.
9806 (traceframe_find_block_type): Handle static trace data blocks.
9807 (traceframe_read_sdata): New.
9808 (download_tracepoints): Download static tracepoint actions.
9809 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
9810 (GDB_PROBE_NAME): New.
9811 (ust_ops): New.
9812 (GET_UST_SYM): New.
9813 (USTF): New.
9814 (dlsym_ust): New.
9815 (ust_marker_to_static_tracepoint): New.
9816 (gdb_probe): New.
9817 (collect_ust_data_at_tracepoint): New.
9818 (gdb_ust_probe): New.
9819 (UNIX_PATH_MAX, SOCK_DIR): New.
9820 (gdb_ust_connect_sync_socket): New.
9821 (resume_thread, stop_thread): New.
9822 (run_inferior_command): New.
9823 (init_named_socket): New.
9824 (gdb_ust_socket_init): New.
9825 (cstr_to_hexstr): New.
9826 (next_st): New.
9827 (first_marker, next_marker): New.
9828 (response_ust_marker): New.
9829 (cmd_qtfstm, cmd_qtsstm): New.
9830 (unprobe_marker_at, probe_marker_at): New.
9831 (cmd_qtstmat, gdb_ust_thread): New.
9832 (gdb_ust_init): New.
9833 (initialize_tracepoint_ftlib): Call gdb_ust_init.
9834 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
9835 (ST_REGENTRY): New.
9836 (x86_64_st_collect_regmap): New.
9837 (X86_64_NUM_ST_COLLECT_GREGS): New.
9838 (AMD64_RIP_REGNUM): New.
9839 (supply_static_tracepoint_registers): New.
9840 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
9841 (ST_REGENTRY): New.
9842 (i386_st_collect_regmap): New.
9843 (i386_NUM_ST_COLLECT_GREGS): New.
9844 (supply_static_tracepoint_registers): New.
9845 * server.c (handle_query): Handle qXfer:statictrace:read.
9846 <qSupported>: Report support for StaticTracepoints, and
9847 qXfer:statictrace:read features.
9848 * server.h (traceframe_read_sdata)
9849 (supply_static_tracepoint_registers): Declare.
9850 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
9851 (unpack_varlen_hex): Include in IPA build.
9852 * Makefile.in (ustlibs, ustinc): New.
9853 (IPA_OBJS): Add remote-utils-ipa.o.
9854 ($(IPA_LIB)): Link -ldl and -lpthread.
9855 (UST_CFLAGS): New.
9856 (IPAGENT_CFLAGS): Add UST_CFLAGS.
9857 * config.in, configure: Regenerate.
9858
9859 2010-06-20 Ian Lance Taylor <iant@google.com>
9860 Pedro Alves <pedro@codesourcery.com>
9861
9862 * linux-x86-low.c (always_true): Delete.
9863 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
9864 trying to fool the compiler with always_true.
9865
9866 2010-06-20 Pedro Alves <pedro@codesourcery.com>
9867
9868 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
9869 conditions in gdbserver.
9870
9871 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
9872
9873 * spu-low.c (spu_read_memory): Wrap around local store limit.
9874 (spu_write_memory): Likewise.
9875
9876 2010-06-15 Pedro Alves <pedro@codesourcery.com>
9877
9878 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
9879 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
9880 LONGEST uses.
9881 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
9882 uses.
9883 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
9884 uses with LONGEST uses.
9885
9886 2010-06-14 Stan Shebs <stan@codesourcery.com>
9887 Pedro Alves <pedro@codesourcery.com>
9888
9889 Bytecode compiler.
9890
9891 * linux-x86-low.c: Include limits.h.
9892 (add_insns): New.
9893 (always_true): New.
9894 (EMIT_ASM): New.
9895 (EMIT_ASM32): New.
9896 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
9897 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
9898 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
9899 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
9900 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
9901 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
9902 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
9903 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
9904 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
9905 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
9906 (amd64_emit_void_call_2): New.
9907 (amd64_emit_ops): New.
9908 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
9909 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
9910 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
9911 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
9912 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
9913 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
9914 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
9915 (i386_emit_call, i386_emit_reg, i386_emit_pop)
9916 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
9917 (i386_emit_stack_adjust, i386_emit_int_call_1)
9918 (i386_emit_void_call_2): New.
9919 (i386_emit_ops): New.
9920 (x86_emit_ops): New.
9921 (the_low_target): Install x86_emit_ops.
9922 * server.h (struct emit_ops): New.
9923 (get_raw_reg_func_addr): Declare.
9924 (current_insn_ptr, emit_error): Declare.
9925 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
9926 (set_trace_state_variable_value): New defines.
9927 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
9928 addr_get_trace_state_variable_value and
9929 addr_set_trace_state_variable_value.
9930 (symbol_list): New fields for get_raw_reg,
9931 get_trace_state_variable_value and set_trace_state_variable_value.
9932 (condfn): New typedef.
9933 (struct tracepoint): New field `compiled_cond'.
9934 (do_action_at_tracepoint): Clear compiled_cond.
9935 (get_trace_state_variable_value, set_trace_state_variable_value):
9936 Export in the IPA.
9937 (condition_true_at_tracepoint): If there's a compiled condition,
9938 run that.
9939 (current_insn_ptr, emit_error): New globals.
9940 (struct bytecode_address): New.
9941 (get_raw_reg_func_addr): New.
9942 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
9943 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
9944 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
9945 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
9946 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
9947 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
9948 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
9949 (compile_tracepoint_condition, compile_bytecodes): New.
9950 * target.h (emit_ops): Forward declare.
9951 (struct target_ops): New field emit_ops.
9952 (target_emit_ops): New.
9953 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
9954 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
9955 * linux-low.c (linux_emit_ops): New.
9956 (linux_target_ops): Install it.
9957 * linux-low.h (struct linux_target_ops): New field emit_ops.
9958
9959 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
9960
9961 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
9962 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
9963
9964 2010-06-01 Pedro Alves <pedro@codesourcery.com>
9965 Stan Shebs <stan@codesourcery.com>
9966
9967 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
9968 (all): Depend on $(extra_libraries).
9969 (install-only): Install the IPA.
9970 (IPA_OBJS, IPA_LIB): New.
9971 (clean): Remove the IPA lib.
9972 (IPAGENT_CFLAGS): New.
9973 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
9974 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
9975 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
9976 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
9977 * configure.ac: Check for atomic builtins support in the compiler.
9978 (IPA_DEPFILES, extra_libraries): Define.
9979 * configure.srv (ipa_obj): Add description.
9980 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
9981 (i[34567]86-*-linux*): Set ipa_obj.
9982 (x86_64-*-linux*): Set ipa_obj.
9983 * linux-low.c (stabilizing_threads): New.
9984 (supports_fast_tracepoints): New.
9985 (linux_detach): Stabilize threads before detaching.
9986 (handle_tracepoints): Handle internal tracing breakpoints. Assert
9987 the lwp is either not stabilizing, or is moving out of a jump pad.
9988 (linux_fast_tracepoint_collecting): New.
9989 (maybe_move_out_of_jump_pad): New.
9990 (enqueue_one_deferred_signal): New.
9991 (dequeue_one_deferred_signal): New.
9992 (linux_wait_for_event_1): If moving out of a jump pad, defer
9993 pending signals to later.
9994 (linux_stabilize_threads): New.
9995 (linux_wait_1): Check if threads need moving out of jump pads, and
9996 do it if so.
9997 (stuck_in_jump_pad_callback): New.
9998 (move_out_of_jump_pad_callback): New.
9999 (lwp_running): New.
10000 (linux_resume_one_lwp): Handle moving out of jump pads.
10001 (linux_set_resume_request): Dequeue deferred signals.
10002 (need_step_over_p): Also step over fast tracepoint jumps.
10003 (start_step_over): Also uninsert fast tracepoint jumps.
10004 (finish_step_over): Also reinsert fast tracepoint jumps.
10005 (linux_install_fast_tracepoint_jump): New.
10006 (linux_target_ops): Install linux_stabilize_threads and
10007 linux_install_fast_tracepoint_jump_pad.
10008 * linux-low.h (linux_target_ops) <get_thread_area,
10009 install_fast_tracepoint_jump_pad>: New fields.
10010 (struct lwp_info) <collecting_fast_tracepoint,
10011 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10012 (linux_get_thread_area): Declare.
10013 * linux-x86-low.c (jump_insn): New.
10014 (x86_get_thread_area): New.
10015 (append_insns): New.
10016 (push_opcode): New.
10017 (amd64_install_fast_tracepoint_jump_pad): New.
10018 (i386_install_fast_tracepoint_jump_pad): New.
10019 (x86_install_fast_tracepoint_jump_pad): New.
10020 (the_low_target): Install x86_get_thread_area and
10021 x86_install_fast_tracepoint_jump_pad.
10022 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10023 (struct fast_tracepoint_jump): New.
10024 (fast_tracepoint_jump_insn): New.
10025 (fast_tracepoint_jump_shadow): New.
10026 (find_fast_tracepoint_jump_at): New.
10027 (fast_tracepoint_jump_here): New.
10028 (delete_fast_tracepoint_jump): New.
10029 (set_fast_tracepoint_jump): New.
10030 (uninsert_fast_tracepoint_jumps_at): New.
10031 (reinsert_fast_tracepoint_jumps_at): New.
10032 (set_breakpoint_at): Use write_inferior_memory.
10033 (uninsert_raw_breakpoint): Use write_inferior_memory.
10034 (check_mem_read): Mask out fast tracepoint jumps.
10035 (check_mem_write): Mask out fast tracepoint jumps.
10036 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10037 (set_fast_tracepoint_jump): Declare.
10038 (delete_fast_tracepoint_jump)
10039 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10040 (reinsert_fast_tracepoint_jumps_at): Declare.
10041 * regcache.c: Don't compile many functions when building the
10042 in-process agent library.
10043 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10044 the register buffer in the heap.
10045 (free_register_cache): If the register buffer isn't owned by the
10046 regcache, don't free it.
10047 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10048 pre-existing register caches.
10049 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10050 type.
10051 (convert_ascii_to_int): : Constify `from' parameter type.
10052 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10053 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10054 the needed buffer in-place.
10055 (relocate_instruction): New.
10056 * server.c (handle_query) <qSymbols>: If the target supports
10057 tracepoints, give it a chance of looking up symbols. Report
10058 support for fast tracepoints.
10059 (handle_status): Stabilize threads.
10060 (process_serial_event): Adjust.
10061 * server.h (struct fast_tracepoint_jump): Forward declare.
10062 (struct process_info) <fast_tracepoint_jumps>: New field.
10063 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10064 (decode_X_packet, decode_M_packet): Adjust.
10065 (relocate_instruction): Declare.
10066 (in_process_agent_loaded): Declare.
10067 (tracepoint_look_up_symbols): Declare.
10068 (struct fast_tpoint_collect_status): Declare.
10069 (fast_tracepoint_collecting): Declare.
10070 (force_unlock_trace_buffer): Declare.
10071 (handle_tracepoint_bkpts): Declare.
10072 (initialize_low_tracepoint)
10073 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10074 * target.h (struct target_ops) <stabilize_threads,
10075 install_fast_tracepoint_jump_pad>: New fields.
10076 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10077 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10078 [HAVE_STDINT_H]: Include stdint.h.
10079 (trace_debug_1): Rename to ...
10080 (trace_vdebug): ... this.
10081 (trace_debug): Rename to ...
10082 (trace_debug_1): ... this. Add `level' parameter.
10083 (trace_debug): New.
10084 (ATTR_USED, ATTR_NOINLINE): New.
10085 (IP_AGENT_EXPORT): New.
10086 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10087 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10088 (about_to_request_buffer_space, trace_buffer_is_full)
10089 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10090 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10091 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10092 (traceframe_write_count, traceframes_created)
10093 (trace_state_variables)
10094 New renaming defines.
10095 (struct ipa_sym_addresses): New.
10096 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10097 (symbol_list): New.
10098 (ipa_sym_addrs): New.
10099 (all_tracepoint_symbols_looked_up): New.
10100 (in_process_agent_loaded): New.
10101 (write_e_ipa_not_loaded): New.
10102 (maybe_write_ipa_not_loaded): New.
10103 (tracepoint_look_up_symbols): New.
10104 (debug_threads) [IN_PROCESS_AGENT]: New.
10105 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10106 (UNKNOWN_SIDE_EFFECTS): New.
10107 (stop_tracing): New.
10108 (flush_trace_buffer): New.
10109 (stop_tracing_bkpt): New.
10110 (flush_trace_buffer_bkpt): New.
10111 (read_inferior_integer): New.
10112 (read_inferior_uinteger): New.
10113 (read_inferior_data_pointer): New.
10114 (write_inferior_data_pointer): New.
10115 (write_inferior_integer): New.
10116 (write_inferior_uinteger): New.
10117 (struct collect_static_trace_data_action): Delete.
10118 (enum tracepoint_type): New.
10119 (struct tracepoint) <type>: New field `type'.
10120 <actions_str, step_actions, step_actions_str>: Only include in
10121 GDBserver.
10122 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10123 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10124 (tracepoints): Use IP_AGENT_EXPORT.
10125 (last_tracepoint): Don't include in the IPA.
10126 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10127 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10128 (alloced_trace_state_variables): New.
10129 (trace_state_variables): Use IP_AGENT_EXPORT.
10130 (traceframe_t): Delete unused variable.
10131 (circular_trace_buffer): Don't include in the IPA.
10132 (trace_buffer_start): Delete.
10133 (struct trace_buffer_control): New.
10134 (trace_buffer_free): Delete.
10135 (struct ipa_trace_buffer_control): New.
10136 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10137 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10138 New.
10139 (trace_buffer_ctrl): New.
10140 (TRACE_BUFFER_CTRL_CURR): New.
10141 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10142 Reimplement as macros.
10143 (trace_buffer_wrap): Delete.
10144 (traceframe_write_count, traceframe_read_count)
10145 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10146 (struct tracepoint_hit_ctx) <type>: New field.
10147 (struct fast_tracepoint_ctx): New.
10148 (memory_barrier): New.
10149 (cmpxchg): New.
10150 (record_tracepoint_error): Update atomically in the IPA.
10151 (clear_inferior_trace_buffer): New.
10152 (about_to_request_buffer_space): New.
10153 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10154 updating the same buffer.
10155 (add_tracepoint): Default the tracepoint's type to trap
10156 tracepoint, and orig_size to -1.
10157 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10158 internal variables.
10159 (create_trace_state_variable): New parameter `gdb'. Handle it.
10160 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10161 (cmd_qtdp): Handle fast tracepoints.
10162 (cmd_qtdv): Adjust.
10163 (max_jump_pad_size): New.
10164 (gdb_jump_pad_head): New.
10165 (get_jump_space_head): New.
10166 (claim_jump_space): New.
10167 (sort_tracepoints): New.
10168 (MAX_JUMP_SIZE): New.
10169 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10170 IPA.
10171 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10172 support. Upload fast traceframes, and delete internal IPA
10173 breakpoints.
10174 (stop_tracing_handler): New.
10175 (flush_trace_buffer_handler): New.
10176 (cmd_qtstop): Upload fast tracepoints.
10177 (response_tracepoint): Handle fast tracepoints.
10178 (tracepoint_finished_step): Upload fast traceframes. Set the
10179 tracepoint hit context's tracepoint type.
10180 (handle_tracepoint_bkpts): New.
10181 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10182 type. Add comment about fast tracepoints.
10183 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10184 non-existing action_str field.
10185 (get_context_regcache): Handle fast tracepoints.
10186 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10187 to the regcache.
10188 (fast_tracepoint_from_jump_pad_address): New.
10189 (fast_tracepoint_from_ipa_tpoint_address): New.
10190 (collecting_t): New.
10191 (force_unlock_trace_buffer): New.
10192 (fast_tracepoint_collecting): New.
10193 (collecting): New.
10194 (gdb_collect): New.
10195 (write_inferior_data_ptr): New.
10196 (target_tp_heap): New.
10197 (target_malloc): New.
10198 (download_agent_expr): New.
10199 (UALIGN): New.
10200 (download_tracepoints): New.
10201 (download_trace_state_variables): New.
10202 (upload_fast_traceframes): New.
10203 (IPA_FIRST_TRACEFRAME): New.
10204 (IPA_NEXT_TRACEFRAME_1): New.
10205 (IPA_NEXT_TRACEFRAME): New.
10206 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10207 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10208 (gdb_jump_pad_buffer_end): New.
10209 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10210 (initialize_tracepoint): Adjust.
10211 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10212 buffer. Initialize the low module.
10213 * utils.c (PREFIX, TOOLNAME): New.
10214 (malloc_failure): Use PREFIX.
10215 (error): In the IPA, an error causes an exit.
10216 (fatal, warning): Use PREFIX.
10217 (internal_error): Use TOOLNAME.
10218 (NUMCELLS): Increase to 10.
10219 * configure, config.in: Regenerate.
10220
10221 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10222
10223 * server.c (handle_query) <qSupported>: Do two passes over the
10224 qSupported string to avoid nesting strtok.
10225
10226 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10227
10228 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10229 (CDEPS): New.
10230 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10231 -Wl,--dynamic-list.
10232 * configure: Regenerate.
10233 * proc-service.list: New.
10234
10235 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10236
10237 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10238 New comment.
10239
10240 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10241
10242 * gdbreplay.c (remote_open): Check error return from socket() call by
10243 its equality to -1 not by it being negative.
10244 * remote-utils.c (remote_open): Likewise.
10245
10246 2010-05-23 Pedro Alves <pedro@codesourcery.com>
10247
10248 * config.h: Regenerate.
10249
10250 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10251
10252 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10253 doesn't provide PTRACE_GET_THREAD_AREA.
10254
10255 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10256
10257 * linux-m68k-low.c: Include <asm/ptrace.h>
10258 (ps_get_thread_area): Implement.
10259
10260 2010-05-03 Doug Evans <dje@google.com>
10261
10262 * event-loop.c (struct callback_event): New struct.
10263 (callback_list): New global.
10264 (append_callback_event, delete_callback_event): New functions.
10265 (process_callback): New function.
10266 (start_event_loop): Call it.
10267 * remote-utils.c (NOT_SCHEDULED): Define.
10268 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10269 moved out of readchar.
10270 (readchar): Rewrite. Call reschedule before returning.
10271 (reset_readchar): New function.
10272 (remote_close): Call it.
10273 (process_remaining, reschedule): New functions.
10274 * server.h (callback_handler_func): New typedef.
10275 (append_callback_event, delete_callback_event): Declare.
10276
10277 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10278
10279 * proc-service.c (ps_pglobal_lookup): Use
10280 thread_db_look_up_one_symbol.
10281 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10282 parameter. Use it instead of all_symbols_looked_up.
10283 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10284 field.
10285 (all_symbols_looked_up): Don't declare.
10286 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10287 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10288 field.
10289 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10290 Set all_symbols_looked_up here.
10291 (thread_db_look_up_one_symbol): New.
10292 (thread_db_get_tls_address): Adjust.
10293 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10294 thread_db object on the heap, and tentatively set it in the
10295 process structure.
10296 (thread_db_init): Don't set all_symbols_looked_up here.
10297 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10298
10299 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10300
10301 * linux-low.c (linux_kill, linux_detach): Adjust.
10302 (status_pending_p_callback): Remove redundant statement. Check
10303 for !TARGET_WAITIKIND_IGNORE, instead of
10304 TARGET_WAITKIND_STOPPED.
10305 (handle_tracepoints): Make sure LWP is locked. Adjust.
10306 (linux_wait_for_event_1): Adjust.
10307 (linux_cancel_breakpoints): New.
10308 (unsuspend_one_lwp): New.
10309 (unsuspend_all_lwps): New.
10310 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10311 (send_sigstop_callback): Change return type to int, add new
10312 `except' parameter and handle it.
10313 (suspend_and_send_sigstop_callback): New.
10314 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10315 pass them down. If SUSPEND, also increment the lwp's suspend
10316 count.
10317 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10318 (need_step_over_p): Don't consider suspended LWPs.
10319 (start_step_over): Adjust.
10320 (proceed_one_lwp): Change return type to int, add new `except'
10321 parameter and handle it.
10322 (unsuspend_and_proceed_one_lwp): New.
10323 (proceed_all_lwps): Use find_inferior instead of
10324 for_each_inferior.
10325 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
10326 also decrement the suspend count of LWPs. Pass `except' down,
10327 instead of hacking its suspend count.
10328 (linux_pause_all): Add `freeze' parameter. Adjust.
10329 (linux_unpause_all): New.
10330 (linux_target_ops): Install linux_unpause_all.
10331 * server.c (handle_status): Adjust.
10332 * target.h (struct target_ops): New fields `unpause_all' and
10333 `cancel_breakpoints'. Add new parameter to `pause_all'.
10334 (pause_all): Add new `freeze' parameter.
10335 (unpause_all): New.
10336 (cancel_breakpoints): New.
10337 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10338 cancel breakpoints.
10339 (cmd_qtstart): Pause threads.
10340 (stop_tracing): Pause threads, and cancel breakpoints.
10341 * win32-low.c (win32_target_ops): Adjust.
10342
10343 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10344
10345 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10346 the inferior right away from here...
10347 (linux_wait_1): ... to here, and adjust to check the thread's
10348 last_resume_kind instead of the lwp's step or stop_expected flags.
10349
10350 2010-05-02 Pedro Alves <pedro@codesourcery.com>
10351
10352 * README: Use consistent `GDB' and `GDBserver' spellings.
10353
10354 2010-05-02 Pedro Alves <pedro@codesourcery.com>
10355
10356 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10357 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10358 (linux_detach_one_lwp): Assume the lwp is stopped.
10359 (any_thread_of): Delete.
10360 (linux_detach): Stop all lwps here. Don't blindly delete all
10361 breakpoints.
10362 (delete_lwp_callback): New.
10363 (linux_mourn): Delete all lwps of the process that is gone.
10364 (linux_wait_1): Don't delete the last lwp of the process here.
10365 * mem-break.h (mark_breakpoints_out): Declare.
10366 * mem-break.c (mark_breakpoints_out): New.
10367 (free_all_breakpoints): Use it.
10368 * server.c (handle_target_event): If the process is gone, mark
10369 breakpoints out.
10370 * thread-db.c (struct thread_db) <create_bp>: New field.
10371 (thread_db_enable_reporting): Fix prototype. Store a thread event
10372 breakpoint reference in the thread_db struct.
10373 (thread_db_load_search): Clear the thread_db object.
10374 (try_thread_db_load_1): Ditto.
10375 (switch_to_process): New.
10376 (disable_thread_event_reporting): Use it.
10377 (remove_thread_event_breakpoints): New.
10378 (thread_db_detach, thread_db_mourn): Use it.
10379
10380 2010-05-01 Pedro Alves <pedro@codesourcery.com>
10381
10382 * linux-low.c (linux_enable_event_reporting): New.
10383 (linux_wait_for_event_1, handle_extended_wait): Use it.
10384
10385 2010-04-30 Pedro Alves <pedro@codesourcery.com>
10386
10387 * linux-low.c (linux_kill_one_lwp, linux_kill)
10388 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10389 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10390 SIGSTOP even if the LWP is stopped.
10391 (send_sigstop_callback): New.
10392 (stop_all_lwps): Use send_sigstop_callback instead.
10393 (linux_resume_one_thread): Adjust.
10394 (proceed_one_lwp): Still proceed an LWP that the client has
10395 requested to stop, if we haven't reported it as stopped yet. Make
10396 sure that LWPs the client want stopped, have a pending SIGSTOP.
10397
10398 2010-04-26 Doug Evans <dje@google.com>
10399
10400 * server.c (handle_general_set): Make static.
10401
10402 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10403 Print received char after testing for error/eof instead of before.
10404 (input_interrupt): Tweak comment.
10405
10406 2010-04-23 Doug Evans <dje@google.com>
10407
10408 * server.c (start_inferior): Print inferior argv if --debug.
10409
10410 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10411
10412 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10413 * nto-x86-low.c: Include server.h
10414
10415 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10416
10417 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10418 be consistent with other sources of this directory.
10419 (init_registers_amd64): Correct name of source file of this function
10420 in the comment.
10421
10422 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10423
10424 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10425 64-bit executables.
10426
10427 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10428
10429 * win32-i386-low.c: Add 64-bit support.
10430 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10431 (init_registers_amd64): Declare.
10432 (mappings): Add 64-bit version of array.
10433 (init_windows_x86): New function.
10434 (the_low_target): Change init_arch field to init_windows_x86.
10435
10436 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10437
10438 * win32-low.c: Adapt to support also 64-bit architecture.
10439 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10440 (get_image_name): Use SIZE_T type for local variable `done'.
10441 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10442 (toolhelp_get_dll_name): Idem.
10443 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10444 Use uintptr_t typecast to avoid warning.
10445 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10446 (handle_exception): Use phex_nz to avoid warning.
10447 (win32_wait): Remove unused local variable `process'.
10448
10449 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10450
10451 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10452 `amd64-avx.o'.
10453
10454 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
10455
10456 * configure.ac: Use `ws2_32' library for srv_mingw.
10457 * configure: Regenerate.
10458 * gdbreplay.c: Include winsock2.h instead of winsock.h.
10459 * remote-utils.c: Likewise.
10460
10461 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
10462
10463 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
10464 if __x86_64__ is defined.
10465
10466 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10467
10468 * configure: Regenerate.
10469
10470 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10471
10472 * server.c (handle_query): Handle 'qGetTIBAddr' query.
10473 * target.h (target_ops): New get_tib_address field.
10474 * win32-low.h (win32_thread_info): Add thread_local_base field.
10475 * win32-low.c (child_add_thread): Add tlb argument.
10476 Set thread_local_base field to TLB.
10477 (get_child_debug_event): Adapt to child_add_thread change.
10478 (win32_get_tib_address): New function.
10479 (win32_target_ops): Set get_tib_address field to
10480 win32_get_tib_address.
10481 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
10482
10483 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10484
10485 * linux-low.c (linux_mourn): Also remove the process.
10486 * server.c (handle_target_event): Don't remove the process here.
10487 * nto-low.c (nto_mourn): New.
10488 (nto_target_ops): Install it.
10489 * spu-low.c (spu_mourn): New.
10490 (spu_target_ops): Install it.
10491 * win32-low.c (win32_mourn): New.
10492 (win32_target_ops): Install it.
10493
10494 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10495
10496 * server.h (buffer_xml_printf): Remove redundant `;'.
10497
10498 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10499
10500 * regcache.c (set_register_cache): Invalidate regcaches before
10501 changing the register cache layout.
10502 (regcache_invalidate_one): Allow a NULL regcache.
10503 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
10504 regcaches before changing the register cache layout or the target
10505 regsets.
10506
10507 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
10508
10509 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
10510 variable warning on Linux/x86-64.
10511
10512 2010-04-11 Pedro Alves <pedro@codesourcery.com>
10513
10514 GDBserver disconnected tracing support.
10515
10516 * linux-low.c (linux_remove_process): Delete.
10517 (add_lwp): Don't set last_resume_kind here.
10518 (linux_kill): Use `mourn'.
10519 (linux_detach): Use `thread_db_detach', and `mourn'.
10520 (linux_mourn): New.
10521 (linux_attach_lwp_1): Adjust comment.
10522 (linux_attach): last_resume_kind moved the thread_info; adjust.
10523 (status_pending_p_callback): Adjust.
10524 (linux_wait_for_event_1): Adjust.
10525 (count_events_callback, select_singlestep_lwp_callback)
10526 (select_event_lwp_callback, cancel_breakpoints_callback)
10527 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
10528 (proceed_one_lwp): Adjust.
10529 (linux_async): Add debug output.
10530 (linux_thread_stopped): New.
10531 (linux_pause_all): New.
10532 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
10533 linux_pause_all.
10534 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
10535 (thread_db_free): Delete declaration.
10536 (thread_db_detach, thread_db_mourn): Declare.
10537 * thread-db.c (thread_db_init): Use thread_db_mourn.
10538 (thread_db_free): Delete, split in two.
10539 (disable_thread_event_reporting): New.
10540 (thread_db_detach): New.
10541 (thread_db_mourn): New.
10542
10543 * server.h (struct thread_info) <last_resume_kind>: New field.
10544 <attached>: Add comment.
10545 <gdb_detached>: New field.
10546 (handler_func): Change return type to int.
10547 (handle_serial_event, handle_target_event): Ditto.
10548 (gdb_connected): Declare.
10549 (tracing): Delete.
10550 (disconnected_tracing): Declare.
10551 (stop_tracing): Declare.
10552
10553 * server.c (handle_query) <qSupported>: Report support for
10554 disconnected tracing.
10555 (queue_stop_reply_callback): Account for running threads.
10556 (gdb_wants_thread_stopped): New.
10557 (gdb_wants_all_threads_stopped): New.
10558 (gdb_reattached_process): New.
10559 (handle_status): Clear the `gdb_detached' flag of all processes.
10560 In all-stop, stop all threads.
10561 (main): Be sure to leave tfind mode. Handle disconnected tracing.
10562 (process_serial_event): If the remote connection breaks, or if an
10563 exit was forced with "monitor exit", force an event loop exit.
10564 Handle disconnected tracing on detach.
10565 (handle_serial_event): Adjust.
10566 (handle_target_event): If GDB isn't connected, forward events back
10567 to the inferior, unless the last process exited, in which case,
10568 exit gdbserver. Adjust interface.
10569
10570 * remote-utils.c (remote_open): Don't block in accept. Instead
10571 register an event loop source on the listen socket file
10572 descriptor. Refactor bits into ...
10573 (listen_desc): ... this new global.
10574 (gdb_connected): ... this new function.
10575 (enable_async_notification): ... this new function.
10576 (handle_accept_event): ... this new function.
10577 (remote_close): Clear remote_desc.
10578
10579 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
10580
10581 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
10582 New fields.
10583 (mourn_inferior): Define.
10584 (target_process_qsupported): Avoid the dangling else problem.
10585 (thread_stopped): Define.
10586 (pause_all): Define.
10587 (target_waitstatus_to_string): Declare.
10588 * target.c (target_waitstatus_to_string): New.
10589
10590 * tracepoint.c (tracing): Make extern.
10591 (disconnected_tracing): New.
10592 (stop_tracing): Make extern. Handle tracing stops due to GDB
10593 disconnecting.
10594 (cmd_qtdisconnected): New.
10595 (cmd_qtstatus): Report disconnected tracing status in trace reply.
10596 (handle_tracepoint_general_set): Handle QTDisconnected.
10597
10598 * event-loop.c (event_handler_func): Change return type to int.
10599 (process_event): Bail out if the event handler wants the event
10600 loop to stop.
10601 (handle_file_event): Ditto.
10602 (start_event_loop): Bail out if the event handler wants the event
10603 loop to stop.
10604
10605 * nto-low.c (nto_target_ops): Adjust.
10606 * spu-low.c (spu_wait): Don't remove the process here.
10607 (spu_target_ops): Adjust.
10608 * win32-low.c (win32_wait): Don't remove the process here.
10609 (win32_target_ops): Adjust.
10610
10611 2010-04-11 Pedro Alves <pedro@codesourcery.com>
10612
10613 * regcache.c (realloc_register_cache): Invalidate inferior's
10614 regcache before recreating it.
10615
10616 2010-04-09 Pedro Alves <pedro@codesourcery.com>
10617
10618 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
10619
10620 2010-04-09 Stan Shebs <stan@codesourcery.com>
10621 Pedro Alves <pedro@codesourcery.com>
10622
10623 * server.h (LONGEST): New.
10624 (struct thread_info) <while_stepping>: New field.
10625 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
10626 Declare.
10627 (initialize_tracepoint, handle_tracepoint_general_set)
10628 (handle_tracepoint_query, tracepoint_finished_step)
10629 (tracepoint_was_hit, release_while_stepping_state_list):
10630 (current_traceframe): Declare.
10631 * server.c (handle_general_set): Handle tracepoint packets.
10632 (read_memory): New.
10633 (write_memory): New.
10634 (handle_search_memory_1): Use read_memory.
10635 (handle_query): Report support for conditional tracepoints, trace
10636 state variables, and tracepoint sources. Handle tracepoint
10637 queries.
10638 (main): Initialize the tracepoints module.
10639 (process_serial_event): Handle traceframe reads/writes.
10640
10641 * linux-low.c (handle_tracepoints): New.
10642 (linux_wait_1): Call it.
10643 (linux_resume_one_lwp): Handle while-stepping.
10644 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
10645 (linux_target_ops): Install them.
10646 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
10647 New field.
10648 * linux-x86-low.c (x86_supports_tracepoints): New.
10649 (the_low_target). Install it.
10650
10651 * mem-break.h (delete_breakpoint): Declare.
10652 * mem-break.c (delete_breakpoint): Make external.
10653
10654 * target.h (struct target_ops): Add `supports_tracepoints',
10655 `read_pc', and `write_pc' fields.
10656 (target_supports_tracepoints): Define.
10657 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
10658 (phex_nz): New.
10659
10660 * regcache.h (struct regcache) <registers_owned>: New field.
10661 (init_register_cache, regcache_cpy): Declare.
10662 (regcache_read_pc, regcache_write_pc): Declare.
10663 (register_cache_size): Declare.
10664 (supply_regblock): Declare.
10665 * regcache.c (init_register_cache): New.
10666 (new_register_cache): Use it.
10667 (regcache_cpy): New.
10668 (register_cache_size): New.
10669 (supply_regblock): New.
10670 (regcache_read_pc, regcache_write_pc): New.
10671
10672 * tracepoint.c: New.
10673
10674 * Makefile.in (OBS): Add tracepoint.o.
10675 (tracepoint.o): New rule.
10676
10677 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
10678
10679 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
10680 (i386-mmx.o): New.
10681 (i386-mmx.c): Likewise.
10682 (i386-mmx-linux.o): Likewise.
10683 (i386-mmx-linux.c): Likewise.
10684
10685 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
10686 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
10687 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
10688 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
10689
10690 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
10691 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
10692 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
10693
10694 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
10695
10696 * Makefile.in (clean): Updated.
10697 (i386-avx.o): New.
10698 (i386-avx.c): Likewise.
10699 (i386-avx-linux.o): Likewise.
10700 (i386-avx-linux.c): Likewise.
10701 (amd64-avx.o): Likewise.
10702 (amd64-avx.c): Likewise.
10703 (amd64-avx-linux.o): Likewise.
10704 (amd64-avx-linux.c): Likewise.
10705
10706 * configure.srv (srv_i386_regobj): Add i386-avx.o.
10707 (srv_i386_linux_regobj): Add i386-avx-linux.o.
10708 (srv_amd64_regobj): Add amd64-avx.o.
10709 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
10710 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
10711 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
10712 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
10713 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
10714 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
10715 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
10716
10717 * i387-fp.c: Include "i386-xstate.h".
10718 (i387_xsave): New.
10719 (i387_cache_to_xsave): Likewise.
10720 (i387_xsave_to_cache): Likewise.
10721 (x86_xcr0): Likewise.
10722
10723 * i387-fp.h (i387_cache_to_xsave): Likewise.
10724 (i387_xsave_to_cache): Likewise.
10725 (x86_xcr0): Likewise.
10726
10727 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
10728 * linux-crisv32-low.c (target_regsets): Likewise.
10729 * linux-m68k-low.c (target_regsets): Likewise.
10730 * linux-mips-low.c (target_regsets): Likewise.
10731 * linux-ppc-low.c (target_regsets): Likewise.
10732 * linux-s390-low.c (target_regsets): Likewise.
10733 * linux-sh-low.c (target_regsets): Likewise.
10734 * linux-sparc-low.c (target_regsets): Likewise.
10735 * linux-xtensa-low.c (target_regsets): Likewise.
10736
10737 * linux-low.c: Include <sys/uio.h>.
10738 (regsets_fetch_inferior_registers): Support nt_type.
10739 (regsets_store_inferior_registers): Likewise.
10740 (linux_process_qsupported): New.
10741 (linux_target_ops): Add linux_process_qsupported.
10742
10743 * linux-low.h (regset_info): Add nt_type.
10744 (linux_target_ops): Add process_qsupported.
10745
10746 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
10747 and <sys/uio.h>.
10748 (init_registers_i386_avx_linux): New.
10749 (init_registers_amd64_avx_linux): Likewise.
10750 (xmltarget_i386_linux_no_xml): Likewise.
10751 (xmltarget_amd64_linux_no_xml): Likewise.
10752 (PTRACE_GETREGSET): Likewise.
10753 (PTRACE_SETREGSET): Likewise.
10754 (x86_fill_xstateregset): Likewise.
10755 (x86_store_xstateregset): Likewise.
10756 (use_xml): Likewise.
10757 (x86_linux_update_xmltarget): Likewise.
10758 (x86_linux_process_qsupported): Likewise.
10759 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
10760 (x86_arch_setup): Don't call init_registers_amd64_linux nor
10761 init_registers_i386_linux here. Call
10762 x86_linux_update_xmltarget.
10763 (the_low_target): Add x86_linux_process_qsupported.
10764
10765 * server.c (handle_query): Call target_process_qsupported.
10766
10767 * target.h (target_ops): Add process_qsupported.
10768 (target_process_qsupported): New.
10769
10770 2010-04-03 Pedro Alves <pedro@codesourcery.com>
10771
10772 * inferiors.c (add_thread): Set last_status kind to
10773 TARGET_WAITKIND_IGNORE.
10774 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
10775 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
10776 (linux_wait_1): Move `thread' local definition to block that uses
10777 it. Don't NULL initialize `event_child'.
10778 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
10779 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
10780 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
10781
10782 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10783
10784 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
10785 an extended waitstatus, or by a watchpoint.
10786 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
10787 thread was stepping or has been stopped by a watchpoint.
10788
10789 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10790
10791 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
10792 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
10793 of another, then delete the previous, and validate all
10794 breakpoints.
10795 (validate_inserted_breakpoint): New.
10796 (delete_disabled_breakpoints): New.
10797 (validate_breakpoints): New.
10798 (check_mem_read): Validate breakpoints before trusting their
10799 shadow. Delete disabled breakpoints.
10800 (check_mem_write): Validate breakpoints before trusting they
10801 should be inserted. Delete disabled breakpoints.
10802 * mem-break.h (validate_breakpoints):
10803 * server.c (handle_query): Validate breakpoints when we see a
10804 qSymbol query.
10805
10806 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10807
10808 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
10809 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
10810 if we could tell there's a GDB breakpoint at stop_pc.
10811 (need_step_over_p): Don't do a step over if we find a GDB
10812 breakpoint at the resume PC.
10813
10814 * mem-break.c (struct raw_breakpoint): New.
10815 (enum bkpt_type): New type `gdb_breakpoint'.
10816 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
10817 fields. New field `raw'.
10818 (find_raw_breakpoint_at): New.
10819 (set_raw_breakpoint_at): Handle refcounting. Create a raw
10820 breakpoint instead.
10821 (set_breakpoint_at): Adjust.
10822 (delete_raw_breakpoint): New.
10823 (release_breakpoint): New.
10824 (delete_breakpoint): Rename to...
10825 (delete_breakpoint_1): ... this. Add proc parameter. Use
10826 release_breakpoint. Return ENOENT.
10827 (delete_breakpoint): Reimplement.
10828 (find_breakpoint_at): Delete.
10829 (find_gdb_breakpoint_at): New.
10830 (delete_breakpoint_at): Delete.
10831 (set_gdb_breakpoint_at): New.
10832 (delete_gdb_breakpoint_at): New.
10833 (gdb_breakpoint_here): New.
10834 (set_reinsert_breakpoint): Use release_breakpoint.
10835 (uninsert_breakpoint): Rename to ...
10836 (uninsert_raw_breakpoint): ... this.
10837 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
10838 (reinsert_raw_breakpoint): Change parameter type to
10839 raw_breakpoint.
10840 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
10841 instead.
10842 (check_breakpoints): Adjust. Use release_breakpoint.
10843 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
10844 (breakpoint_inserted_here): Ditto.
10845 (check_mem_read): Adjust to iterate over raw breakpoints instead.
10846 Don't trust the breakpoint's shadow if it is not inserted.
10847 (check_mem_write): Adjust to iterate over raw breakpoints instead.
10848 (delete_all_breakpoints): Adjust.
10849 (free_all_breakpoints): Mark all breakpoints as uninserted, and
10850 use delete_breakpoint_1.
10851
10852 * mem-break.h (breakpoints_supported): Delete declaration.
10853 (set_gdb_breakpoint_at): Declare.
10854 (gdb_breakpoint_here): Declare.
10855 (delete_breakpoint_at): Delete.
10856 (delete_gdb_breakpoint_at): Declare.
10857
10858 * server.h (struct raw_breakpoint): Forward declare.
10859 (struct process_info): New field `raw_breakpoints'.
10860
10861 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
10862 breakpoints.
10863
10864 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10865
10866 * linux-low.c (status_pending_p_callback): Fix comment.
10867 (linux_wait_for_event_1): Move most of the internal breakpoint
10868 handling from here...
10869 (linux_wait_1): ... to here.
10870 (count_events_callback): New.
10871 (select_singlestep_lwp_callback): New.
10872 (select_event_lwp_callback): New.
10873 (cancel_breakpoints_callback): New.
10874 (select_event_lwp): New.
10875 (linux_wait_1): Simplify internal breakpoint handling. Give equal
10876 priority to all LWPs that have had events that should be reported
10877 to the client. Cancel breakpoints when about to reporting the
10878 event to the client, not while stopping lwps. No longer cancel
10879 finished single-steps here.
10880 (cancel_finished_single_step): Delete.
10881 (cancel_finished_single_steps): Delete.
10882
10883 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10884
10885 * mem-break.c (enum bkpt_type): New.
10886 (struct breakpoint): New field `type'.
10887 (set_breakpoint_at): Change return type to struct breakpoint
10888 pointer. Set type to `other_breakpoint' by default.
10889 (delete_breakpoint): Rewrite, supporting more than one breakpoint
10890 in the breakpoint list.
10891 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
10892 (reinsert_breakpoint): Rename to ...
10893 (reinsert_raw_breakpoint): ... this.
10894 (reinsert_breakpoints_at): Adjust.
10895 * mem-break.h (struct breakpoint): Declare.
10896 (set_breakpoint_at): Change return type to struct breakpoint
10897 pointer.
10898
10899 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10900
10901 * server.c (handle_query): Assign, not compare.
10902
10903 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10904
10905 Teach linux gdbserver to step-over-breakpoints.
10906
10907 * linux-low.c (can_hardware_single_step): New.
10908 (supports_breakpoints): New.
10909 (handle_extended_wait): If stopping threads, read the stop pc of
10910 the new cloned LWP.
10911 (get_pc): New.
10912 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
10913 low target doesn't support retrieving the PC.
10914 (add_lwp): Set last_resume_kind to resume_continue.
10915 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
10916 (linux_attach): Don't clear stop_expected. Set the lwp's
10917 last_resume_kind to resume_stop.
10918 (linux_detach_one_lwp): Don't check for removed breakpoints.
10919 (check_removed_breakpoint): Delete.
10920 (status_pending_p): Rename to ...
10921 (status_pending_p_callback): ... this. Don't check for removed
10922 breakpoints. Don't consider threads that are stopped from GDB's
10923 perspective.
10924 (linux_wait_for_lwp): Always read the stop_pc here.
10925 (cancel_breakpoint): New.
10926 (step_over_bkpt): New global.
10927 (linux_wait_for_event_1): Implement stepping over breakpoints.
10928 (gdb_wants_lwp_stopped): New.
10929 (gdb_wants_all_stopped): New.
10930 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
10931 single-step traps here. Store the thread's last reported target
10932 wait status.
10933 (send_sigstop): Don't clear stop_expected. Always set it,
10934 instead.
10935 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
10936 (cancel_finished_single_step): New.
10937 (cancel_finished_single_steps): New.
10938 (wait_for_sigstop): Don't cancel finished single-step traps here.
10939 (linux_resume_one_lwp): Don't check for removed breakpoints.
10940 Don't set `step' on non-hardware step archs.
10941 (linux_set_resume_request): Ignore resume_stop requests if already
10942 stopping or stopped. Set the lwp's last_resume_kind.
10943 (resume_status_pending_p): Don't check for removed breakpoints.
10944 (need_step_over_p): New.
10945 (start_step_over): New.
10946 (finish_step_over): New.
10947 (linux_resume_one_thread): Always queue a sigstop for resume_stop
10948 requests. Clear the thread's last reported target waitstatus.
10949 Don't use the `suspended' flag. Don't consider pending breakpoints.
10950 (linux_resume): Start a step-over if necessary.
10951 (proceed_one_lwp): New.
10952 (proceed_all_lwps): New.
10953 (unstop_all_lwps): New.
10954 * linux-low.h (struct lwp_info): Rewrite comment for the
10955 `suspended' flag. Add the `stop_pc' field. Delete the
10956 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
10957 Add `'last_resume_kind' and `need_step_over' fields.
10958 * inferiors.c (struct thread_info): Delete, moved elsewhere.
10959 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
10960 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
10961 (set_raw_breakpoint_at): New.
10962 (set_breakpoint_at): Rewrite to use it.
10963 (reinsert_breakpoint_handler): Delete.
10964 (set_reinsert_breakpoint): New.
10965 (reinsert_breakpoint_by_bp): Delete.
10966 (delete_reinsert_breakpoints): New.
10967 (uninsert_breakpoint): Rewrite.
10968 (uninsert_breakpoints_at): New.
10969 (reinsert_breakpoint): Rewrite.
10970 (reinsert_breakpoints_at): New.
10971 (check_breakpoints): Rewrite.
10972 (breakpoint_here): New.
10973 (breakpoint_inserted_here): New.
10974 (check_mem_read): Adjust.
10975 * mem-break.h (breakpoints_supported, breakpoint_here)
10976 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
10977 (reinsert_breakpoint_by_bp): Delete declaration.
10978 (delete_reinsert_breakpoints): Declare.
10979 (reinsert_breakpoint): Delete declaration.
10980 (reinsert_breakpoints_at): Declare.
10981 (uninsert_breakpoint): Delete declaration.
10982 (uninsert_breakpoints_at): Declare.
10983 (check_breakpoints): Adjust prototype.
10984 * server.h: Adjust include order.
10985 (struct thread_info): Declare here. Add a `last_status' field.
10986
10987 2010-03-23 Michael Snyder <msnyder@vmware.com>
10988
10989 * server.c (crc32): New function.
10990 (handle_query): Add handling for 'qCRC:' request.
10991
10992 2010-03-23 Pedro Alves <pedro@codesourcery.com>
10993
10994 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
10995 lwp had been stopped by a watchpoint.
10996
10997 2010-03-16 Pedro Alves <pedro@codesourcery.com>
10998
10999 * server.h (internal_error): Declare.
11000 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11001 * utils.c (internal_error): New function.
11002
11003 2010-03-15 Andreas Schwab <schwab@redhat.com>
11004
11005 * configure.srv: Fix typo setting srv_regobj.
11006
11007 2010-03-15 Pedro Alves <pedro@codesourcery.com>
11008
11009 * linux-low.c (fetch_register): Avoid passing a non string literal
11010 format to `error'.
11011 (usr_store_inferior_registers): Ditto.
11012
11013 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11014
11015 * linux-low.c (linux_write_memory): Bail out early if peeking
11016 memory failed.
11017
11018 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11019
11020 * linux-low.h (struct lwp_info): New fields
11021 `stopped_by_watchpoint' and `stopped_data_address'.
11022 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11023 here, and cache them in the lwp object.
11024 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11025 directly.
11026 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11027 field.
11028 (linux_stopped_by_watchpoint): Rewrite.
11029 (linux_stopped_data_address): Rewrite.
11030
11031 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
11032
11033 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11034 switching the current inferior, not before.
11035
11036 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11037
11038 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11039 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11040 i386-linux.c and amd64-linux.c.
11041 (reg-i386.o): Removed.
11042 (reg-i386.c): Likewise.
11043 (reg-i386-linux.o): Likewise.
11044 (reg-i386-linux.c): Likewise.
11045 (reg-x86-64.o): Likewise.
11046 (reg-x86-64.c): Likewise.
11047 (reg-x86-64-linux.o): Likewise.
11048 (reg-x86-64-linux.c): Likewise.
11049 (i386.o): New.
11050 (i386.c): Likewise.
11051 (i386-linux.o): Likewise.
11052 (i386-linux.c): Likewise.
11053 (amd64.o): Likewise.
11054 (amd64.c): Likewise.
11055 (amd64-linux.o): Likewise.
11056 (amd64-linux.c): Likewise.
11057
11058 * configure.srv (srv_i386_regobj): New.
11059 (srv_i386_linux_regobj): Likewise.
11060 (srv_amd64_regobj): Likewise.
11061 (srv_amd64_linux_regobj): Likewise.
11062 (srv_i386_32bit_xmlfiles): Likewise.
11063 (srv_i386_64bit_xmlfiles): Likewise.
11064 (srv_i386_xmlfiles): Likewise.
11065 (srv_amd64_xmlfiles): Likewise.
11066 (srv_i386_linux_xmlfiles): Likewise.
11067 (srv_amd64_linux_xmlfiles): Likewise.
11068 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11069 srv_xmlfiles to $srv_i386_xmlfiles.
11070 (i[34567]86-*-mingw32ce*): Likewise.
11071 (i[34567]86-*-mingw*): Likewise.
11072 (i[34567]86-*-nto*): Likewise.
11073 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11074 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11075 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11076 (x86_64-*-linux*): Likewise.
11077
11078 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11079 (init_registers_amd64_linux): New.
11080 (x86_arch_setup): Replace init_registers_x86_64_linux with
11081 init_registers_amd64_linux.
11082
11083 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11084
11085 * configure.ac: Check for libdl. If it is not available link against
11086 static libthread_db.
11087 * configure: Regenerate.
11088
11089 2010-02-22 Pedro Alves <pedro@codesourcery.com>
11090
11091 PR9605
11092
11093 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11094 handing a read watchpoint.
11095 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11096
11097 2010-02-12 Doug Evans <dje@google.com>
11098
11099 * linux-low.c (linux_supports_tracefork_flag): Document.
11100 (linux_look_up_symbols): Add comment.
11101
11102 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11103
11104 * regcache.c (supply_register): Clear regcache if buf is NULL.
11105
11106 2010-02-02 Nicolas Roche <roche@sourceware.org>
11107 Joel Brobecker <brobecker@adacore.com>
11108
11109 * inferiors.c (find_inferior): Add function documentation.
11110 (unloaded_dll): Handle the case where the unloaded dll has not
11111 been previously registered in the dll list.
11112
11113 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11114
11115 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11116 (thumb2_breakpoint): New.
11117 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11118
11119 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11120
11121 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11122 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11123 breakpoints.
11124
11125 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11126
11127 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11128
11129 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11130
11131 * linux-s390-low.c (s390_collect_ptrace_register)
11132 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11133
11134 2010-01-21 Doug Evans <dje@google.com>
11135
11136 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11137 (PTRACE_ARG4_TYPE): New macro.
11138 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11139 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11140 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11141 (usr_store_inferior_registers): Ditto.
11142 (linux_read_memory, linux_write_memory): Ditto.
11143 (linux_test_for_tracefork): Ditto.
11144
11145 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11146 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11147
11148 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11149
11150 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11151 target.
11152
11153 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11154
11155 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11156 prototype to take a regcache. Adjust.
11157
11158 2010-01-20 Pedro Alves <pedro@codesourcery.com>
11159
11160 * regcache.h (struct thread_info): Forward declare.
11161 (struct regcache): New.
11162 (new_register_cache): Adjust prototype.
11163 (get_thread_regcache): Declare.
11164 (free_register_cache): Adjust prototype.
11165 (registers_to_string, registers_from_string): Ditto.
11166 (supply_register, supply_register_by_name, collect_register)
11167 (collect_register_as_string, collect_register_by_name): Ditto.
11168 * regcache.c (struct inferior_regcache_data): Delete.
11169 (get_regcache): Rename to ...
11170 (get_thread_regcache): ... this. Adjust. Switch inferior before
11171 fetching registers.
11172 (regcache_invalidate_one): Adjust.
11173 (regcache_invalidate): Fix prototype.
11174 (new_register_cache): Return the new register cache.
11175 (free_register_cache): Change prototype.
11176 (realloc_register_cache): Adjust.
11177 (registers_to_string): Change prototype to take a regcache. Adjust.
11178 (registers_from_string): Ditto.
11179 (register_data): Ditto.
11180 (supply_register): Ditto.
11181 (supply_register_by_name): Ditto.
11182 (collect_register): Ditto.
11183 (collect_register_as_string): Ditto.
11184 (collect_register_by_name): Ditto.
11185 * server.c (process_serial_event): Adjust.
11186 * linux-low.h (regset_fill_func, regset_store_func): Change
11187 prototype.
11188 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11189 Change prototype.
11190 * linux-low.c (get_stop_pc): Adjust.
11191 (check_removed_breakpoint): Adjust.
11192 (linux_wait_for_event): Adjust.
11193 (linux_resume_one_lwp): Adjust.
11194 (fetch_register): Add regcache parameter. Adjust.
11195 (usr_store_inferior_registers): Ditto.
11196 (regsets_fetch_inferior_registers): Ditto.
11197 (regsets_store_inferior_registers): Ditto.
11198 (linux_fetch_registers, linux_store_registers): Ditto.
11199 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11200 regcache. Adjust.
11201 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11202 Ditto.
11203 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11204 prototype to take a regcache.
11205 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11206 * remote-utils.c (convert_ascii_to_int, outreg)
11207 (prepare_resume_reply): Change prototype to take a regcache.
11208 Adjust.
11209 * target.h (struct target_ops) <fetch_registers, store_registers>:
11210 Change prototype to take a regcache.
11211 (fetch_inferior_registers, store_inferior_registers): Change
11212 prototype to take a regcache. Adjust.
11213 * proc-service.c (ps_lgetregs): Adjust.
11214 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11215 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11216 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11217 take a regcache. Adjust.
11218 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11219 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11220 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11221 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11222 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11223 (cris_cannot_fetch_register):
11224 (cris_breakpoint_at): Change prototype to take a regcache.
11225 Adjust.
11226 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11227 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11228 to take a regcache. Adjust.
11229 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11230 Adjust.
11231 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11232 take a regcache. Adjust.
11233 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11234 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11235 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11236 * linux-mips-low.c (mips_get_pc):
11237 (mips_set_pc): Change prototype to take a regcache. Adjust.
11238 (mips_reinsert_addr): Adjust.
11239 (mips_collect_register): Change prototype to take a regcache.
11240 Adjust.
11241 (mips_supply_register):
11242 (mips_collect_register_32bit, mips_supply_register_32bit)
11243 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11244 (mips_store_fpregset): Ditto.
11245 * linux-ppc-low.c (ppc_supply_ptrace_register)
11246 (ppc_supply_ptrace_register): Ditto.
11247 (parse_spufs_run): Adjust.
11248 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11249 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11250 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11251 take a regcache. Adjust.
11252 * linux-s390-low.c (s390_collect_ptrace_register)
11253 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11254 (s390_set_pc): Change prototype to take a regcache. Adjust.
11255 (s390_arch_setup): Adjust.
11256 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11257 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11258 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11259 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11260 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11261 regcache. Adjust.
11262 (sparc_breakpoint_at): Adjust.
11263 * linux-xtensa-low.c (xtensa_fill_gregset):
11264 (xtensa_store_gregset):
11265 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11266 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11267 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11268 prototype to take a regcache. Adjust.
11269 * win32-arm-low.c (arm_fetch_inferior_register)
11270 (arm_store_inferior_register): Change prototype to take a
11271 regcache. Adjust.
11272 * win32-i386-low.c (i386_fetch_inferior_register)
11273 (i386_store_inferior_register): Change prototype to take a
11274 regcache. Adjust.
11275 * win32-low.c (child_fetch_inferior_registers)
11276 (child_store_inferior_registers): Change prototype to take a
11277 regcache. Adjust.
11278 (win32_wait): Adjust.
11279 (win32_fetch_inferior_registers): Change prototype to take a
11280 regcache. Adjust.
11281 (win32_store_inferior_registers): Adjust.
11282 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11283 store_inferior_register>: Change prototype to take a regcache.
11284
11285 2010-01-20 Doug Evans <dje@google.com>
11286
11287 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11288 #ifdef.
11289 (linux_wait_for_event1, linux_init_signals): Ditto.
11290 (W_STOPCODE): Provide definition if missing.
11291
11292 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11293
11294 * linux-low.c (linux_core_of_thread): New.
11295 (compare_ints, show_process, list_threads): New.
11296 (linux_qxfer_osdata): Report threads and cores.
11297 (linux_target_op): Register linux_core_of_thread.
11298 * remote-utils.c (prepare_resume_reply): Report the core.
11299 (buffer_xml_printf): Support %d specifier.
11300 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11301 New.
11302 (handle_query): Handle qXfer:threads. Announce availability
11303 thereof.
11304 * target.h (struct target_ops): New field core_of_thread.
11305
11306 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11307
11308 * Makefile.in (clean): Remove new generated files.
11309 (reg-s390.o, reg-s390.c): Remove rules.
11310 (reg-s390x.o, reg-s390x.c): Likewise.
11311 (s390-linux32.o, s390-linux32.c): Add rules.
11312 (s390-linux64.o, s390-linux64.c): Likewise.
11313 (s390x-linux64.o, s390x-linux64.c): Likewise.
11314 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11315 * linux-s390-low.c: Include <elf.h>.
11316 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11317 (init_registers_s390): Remove prototype.
11318 (init_registers_s390x): Likewise.
11319 (init_registers_s390_linux32): Add prototype.
11320 (init_registers_s390_linux64): Likewise.
11321 (init_registers_s390x_linux64): Likewise.
11322 (s390_num_regs_3264): New define.
11323 (s390_regmap_3264): New global variable.
11324 (s390_cannot_fetch_register): Remove obsolete check.
11325 (s390_cannot_store_register): Likewise.
11326 (s390_collect_ptrace_register): Handle upper/lower register halves.
11327 (s390_supply_ptrace_register): Likewise.
11328 (s390_fill_gregset): Update to register number changes.
11329 (s390_get_hwcap): New routine.
11330 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11331 Install appropriate regmap and register set.
11332
11333 2010-01-01 Joel Brobecker <brobecker@adacore.com>
11334
11335 * server.c (gdbserver_version): Update copyright year to 2010.
11336 * gdbreplay.c (gdbreplay_version): Likewise.
11337
11338 2009-12-28 Doug Evans <dje@google.com>
11339
11340 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11341 elf/external.h. Include <elf.h> instead but only if necessary.
11342
11343 2009-12-28 Pedro Alves <pedro@codesourcery.com>
11344
11345 * linux-low.c (linux_remove_process): Remove `detaching'
11346 parameter. Don't release/detach from thread_db here.
11347 (linux_kill): Release/detach from thread_db here, ...
11348 (linux_detach): ... and here, before actually detaching.
11349 (linux_wait_1): ... and here, when a process exits.
11350 * thread-db.c (any_thread_of): New.
11351 (thread_db_free): Switch the current inferior to a thread of the
11352 passed in process.
11353
11354 2009-12-21 Doug Evans <dje@google.com>
11355
11356 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11357
11358 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11359 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11360 warning ifndef __NR_tkill. Move setting of errno there too.
11361 Delete unnecessary resetting of errno after syscall.
11362 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11363
11364 * configure.ac: Check for dladdr.
11365 * config.in: Regenerate.
11366 * configure: Regenerate.
11367 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11368 (try_thread_db_load): Update.
11369
11370 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11371
11372 2009-12-18 Doug Evans <dje@google.com>
11373
11374 * event-loop.c: Include unistd.h if it exists.
11375
11376 * linux-low.c (my_waitpid): Move definition away from being in
11377 between linux_tracefork_child/linux_test_for_tracefork.
11378
11379 * gdb_proc_service.h (psaddr_t): Fix type.
11380 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11381 signature to match glibc.
11382
11383 2009-12-16 Doug Evans <dje@google.com>
11384
11385 * linux-low.c (linux_read_memory): Fix argument to read.
11386
11387 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11388
11389 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11390 events, don't leave current_inferior pointing at null.
11391
11392 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11393
11394 * win32-low.c (LOG): Delete.
11395 (OUTMSG): Output to stderr.
11396 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11397 on compile time LOG macro.
11398 (win32_wait): Fix debug output.
11399
11400 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11401
11402 * win32-low.c (win32_add_one_solib): If the dll name is
11403 "ntdll.dll", prepend the system directory to the dll path.
11404
11405 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11406
11407 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11408
11409 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
11410 Vladimir Prus <vladimir@codesourcery.com>
11411
11412 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11413 * configure.ac: Check for __mcoldfire__ and set
11414 gdb_cv_m68k_is_coldfire.
11415 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11416 reg-cf.o and reg-m68k.o.
11417 * configure: Regenerated.
11418
11419 2009-11-16 Pedro Alves <pedro@codesourcery.com>
11420
11421 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11422 Pass it to thread_db_free.
11423 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11424 proper `detaching' argument to linux_remove_process.
11425 * linux-low.h (thread_db_free): Add `detaching' parameter.
11426 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11427 to thread_db_free.
11428 (thread_db_free): Add `detaching' parameter. Only
11429 call td_ta_clear_event if detaching from process.
11430
11431 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11432
11433 * thread-db.c (thread_db_free): Fix typo.
11434
11435 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11436
11437 PR gdb/10838
11438 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11439
11440 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11441
11442 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11443 with an i686 compiler.
11444 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11445 needed.
11446 * configure: Rebuilt.
11447
11448 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
11449
11450 PR gdb/10783
11451
11452 * server.c (handle_search_memory_1): Correct read_addr initialization
11453 in loop for searching subsequent chunks.
11454
11455 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
11456
11457 * configure.ac: New --with-libthread-db option.
11458 * thread-db.c: Allow direct dependence on libthread_db.
11459 (thread_db_free): Adjust.
11460 * config.in: Regenerate.
11461 * configure: Likewise.
11462
11463 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
11464
11465 PR gdb/10757
11466 * thread-db.c (attach_thread): New function.
11467 (maybe_attach_thread): Return success/failure.
11468 (find_new_threads_callback): Adjust.
11469 (thread_db_find_new_threads): Loop until no new threads.
11470
11471 2009-10-13 Pedro Alves <pedro@codesourcery.com>
11472
11473 * proc-service.c (ps_lgetregs): Formatting.
11474
11475 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
11476
11477 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
11478 * configure.ac: Adjust.
11479 * linux-low.h (struct process_info_private): Move members to struct
11480 thread_db.
11481 (thread_db_free, thread_db_handle_monitor_command): New prototype.
11482 * linux-low.c (linux_remove_process): Adjust.
11483 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
11484 * server.c (handle_query): Move code ...
11485 (handle_monitor_command): ... here. New function.
11486 * target.h (struct target_ops): New member.
11487 * thread-db.c (struct thread_db): New.
11488 (libthread_db_search_path): New variable.
11489 (thread_db_create_event, thread_db_enable_reporting)
11490 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
11491 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
11492 (try_thread_db_load_1, dladdr_to_soname): New functions.
11493 (try_thread_db_load, thread_db_load_search): New functions.
11494 (thread_db_init): Search for libthread_db.
11495 (thread_db_free): New function.
11496 (thread_db_handle_monitor_command): Likewise.
11497 * config.in: Regenerate.
11498 * configure: Regenerate.
11499
11500 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
11501
11502 * spu-low.c (spu_kill): Wait for inferior to terminate.
11503 Call clear_inferiors.
11504 (spu_detach): Call clear_inferiors.
11505
11506 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11507
11508 * aclocal.m4: Regenerate.
11509 * config.in: Likewise.
11510 * configure: Likewise.
11511
11512 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11513
11514 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
11515 (parse_spufs_run): New function.
11516 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
11517 (ppc_breakpoint_at): Handle SPU breakpoints.
11518
11519 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11520
11521 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
11522 (SPUFS_MAGIC): Define.
11523 (spu_enumerate_spu_ids): New function.
11524 (linux_qxfer_spu): New function.
11525 (linux_target_ops): Install linux_qxfer_spu.
11526
11527 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11528
11529 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
11530 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
11531 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
11532 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
11533 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
11534 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
11535 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
11536 (init_registers_powerpc_cell32l): Add prototype.
11537 (init_registers_powerpc_cell64l): Likewise.
11538 (ppc_arch_setup): Detect Cell/B.E. architecture.
11539
11540 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11541
11542 * Makefile.in (datarootdir): New variable.
11543
11544 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11545
11546 * linux-low.c (linux_write_memory): Update debugging output.
11547 * Makefile.in (clean): Add new descriptions.
11548 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
11549 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
11550 * configure.srv: Add new files for arm*-*-linux*.
11551 * linux-arm-low.c: Add new declarations.
11552 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
11553 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
11554 (HWCAP_VFPv3D16): New.
11555 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
11556 instead of __IWMMXT__.
11557 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
11558 (arm_arch_setup): New.
11559 (target_regsets): Remove #ifdef. Add VFP regset.
11560 (the_low_target): Use arm_arch_setup.
11561
11562 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11563
11564 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
11565 the main thread again.
11566
11567 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
11568
11569 Adding Neutrino gdbserver.
11570 * configure: Regenerated.
11571 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
11572 * configure.srv (i[34567]86-*-nto*): New target.
11573 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
11574 * remote-utils.c [__QNX__]: Include sys/iomgr.h
11575 (nto_comctrl) [__QNX__]: New function.
11576 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
11577
11578 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
11579
11580 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
11581 srv_tgtobj.
11582
11583 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
11584 Pedro Alves <pedro@codesourcery.com>
11585
11586 * win32-i386-low.c (i386_get_thread_context): Handle systems that
11587 don't support CONTEXT_EXTENDED_REGISTERS.
11588 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
11589 (the_low_target): Install them.
11590 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
11591 failing with ERROR_PIPE_NOT_CONNECTED.
11592
11593 2009-06-30 Doug Evans <dje@google.com>
11594 Pierre Muller <muller@ics.u-strasbg.fr>
11595
11596 Add h/w watchpoint support to x86-linux, win32-i386.
11597 * Makefile.in (SFILES): Add i386-low.c
11598 (i386_low_h): Define.
11599 (i386-low.o): Add dependencies.
11600 (linux-x86-low.o): Add i386-low.h dependency.
11601 (win32-i386-low.o): Ditto.
11602 * i386-low.c: New file.
11603 * i386-low.h: New file.
11604 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
11605 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
11606 * linux-low.c (linux_add_process): Initialize arch_private.
11607 (linux_remove_process): Free arch_private.
11608 (add_lwp): Initialize arch_private.
11609 (delete_lwp): Free arch_private.
11610 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
11611 provided.
11612 * linux-low.h (process_info_private): New member arch_private.
11613 (lwp_info): New member arch_private.
11614 (linux_target_ops): New members new_process, new_thread,
11615 prepare_to_resume.
11616 (ptid_of): New macro.
11617 * linux-x86-low.c: Include stddef.h, i386-low.h.
11618 (arch_process_info): New struct.
11619 (arch_lwp_info): New struct.
11620 (x86_linux_dr_get, x86_linux_dr_set): New functions.
11621 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11622 (i386_dr_low_get_status): New function.
11623 (x86_insert_point, x86_remove_point): New functions.
11624 (x86_stopped_by_watchpoint): New function.
11625 (x86_stopped_data_address): New function.
11626 (x86_linux_new_process, x86_linux_new_thread): New functions.
11627 (x86_linux_prepare_to_resume): New function.
11628 (the_low_target): Add entries for insert_point, remove_point,
11629 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
11630 prepare_to_resume.
11631 * server.c (debug_hw_points): New global.
11632 (monitor_show_help): Document set debug-hw-points.
11633 (handle_query): Process "set debug-hw-points".
11634 * server.h (debug_hw_points): Declare.
11635 (paddress): Declare.
11636 * utils.c (NUMCELLS, CELLSIZE): New macros.
11637 (get_sell, xsnprintf, paddress): New functions.
11638 * win32-arm-low.c (the_low_target): Add entries for insert_point,
11639 remove_point, stopped_by_watchpoint, stopped_data_address.
11640 * win32-i386-low.c: Include i386-low.h.
11641 (debug_reg_state): Replaces dr.
11642 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11643 (i386_dr_low_get_status): New function.
11644 (i386_insert_point, i386_remove_point): New functions.
11645 (i386_stopped_by_watchpoint): New function.
11646 (i386_stopped_data_address): New function.
11647 (i386_initial_stuff): Update.
11648 (get_thread_context,set_thread_context,i386_thread_added): Update.
11649 (the_low_target): Add entries for insert_point,
11650 remove_point, stopped_by_watchpoint, stopped_data_address.
11651 * win32-low.c (win32_insert_watchpoint): New function.
11652 (win32_remove_watchpoint): New function.
11653 (win32_stopped_by_watchpoint): New function.
11654 (win32_stopped_data_address): New function.
11655 (win32_target_ops): Add entries for insert_watchpoint,
11656 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
11657 * win32-low.h (win32_target_ops): New members insert_point,
11658 remove_point, stopped_by_watchpoint, stopped_data_address.
11659
11660 2009-06-25 Pedro Alves <pedro@codesourcery.com>
11661
11662 * server.c (process_serial_event): Re-return unsupported, not
11663 error, if the type isn't recognized. Re-allow supporting only
11664 insert or remove packets. Also call require_running for
11665 breakpoints. Add missing break statement to default case. Tidy.
11666 * target.h (struct target_ops): Rename insert_watchpoint to
11667 insert_point, and remove_watchpoint to remove_point.
11668
11669 * linux-low.h (struct linux_target_ops): Likewise.
11670 * linux-low.c (linux_insert_watchpoint): Rename to ...
11671 (linux_insert_point): ... this. Adjust.
11672 (linux_remove_watchpoint): Rename to ...
11673 (linux_remove_point): ... this. Adjust.
11674 (linux_target_ops): Adjust.
11675 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
11676 (cris_insert_point): ... this.
11677 (cris_remove_watchpoint): Rename to ...
11678 (cris_remove_point): ... this.
11679 (the_low_target): Adjust.
11680
11681 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
11682
11683 * server.c (handle_v_kill): Pass signal_pid to
11684 kill_inferior if multi_process is zero.
11685
11686 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
11687
11688 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
11689 * target.h (target_ops): Comment for *_watchpoint to make it clear
11690 the functions can get types '0' and '1'.
11691
11692 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
11693
11694 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
11695 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
11696 * regcache.c (get_regcache): Likewise.
11697 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
11698 * win32-low.c (child_fetch_inferior_registers): Remove check for
11699 regno 0.
11700
11701 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
11702 Pedro Alves <pedro@codesourcery.com>
11703
11704 * target.h (struct target_ops) <supports_multi_process>: New
11705 callback.
11706 (target_supports_multi_process): New.
11707 * server.c (handle_query): Even if GDB reports support, only
11708 enable multi-process if the target also supports it. Report
11709 multi-process support only if the target backend supports it.
11710 * linux-low.c (linux_supports_multi_process): New function.
11711 (linux_target_ops): Install it as target_supports_multi_process
11712 callback.
11713
11714 2009-05-24 Doug Evans <dje@google.com>
11715
11716 Global renaming of find_thread_pid to find_thread_ptid.
11717 * server.h (find_thread_ptid): Renamed from find_thread_pid.
11718 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
11719 All callers updated.
11720
11721 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
11722 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
11723 directly.
11724
11725 * linux-low.c (get_stop_pc): Print pc if debug_threads.
11726 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
11727 (linux_resume_one_lwp): Ditto.
11728
11729 2009-05-23 Doug Evans <dje@google.com>
11730
11731 * linux-low.c (linux_resume_one_lwp): Change type of first arg
11732 from struct inferior_list_entry * to struct lwp_info *.
11733 All callers updated.
11734
11735 2009-05-13 Doug Evans <dje@google.com>
11736
11737 * linux-x86-low.c: Don't include assert.h.
11738 (x86_siginfo_fixup): Use fatal, not assert.
11739 (x86_arch_setup): Fix comment.
11740
11741 2009-05-12 Doug Evans <dje@google.com>
11742
11743 Biarch support for i386/amd64 gdbserver.
11744 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
11745 Add linux-x86-low.c.
11746 (linux-i386-low.o, linux-x86-64-low.o): Delete.
11747 (linux-x86-low.o): Add.
11748 * linux-x86-64-low.c: Delete.
11749 * linux-i386-low.c: Delete.
11750 * linux-x86-low.c: New file.
11751 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
11752 linux-x86-low.o.
11753 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
11754 linux-x86-low.o.
11755 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
11756 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
11757 (linux_child_pid_to_exec_file): New function.
11758 (elf_64_header_p, elf_64_file_p): New functions.
11759 (siginfo_fixup): New function.
11760 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
11761 give target a chance to convert layout.
11762 * linux-low.h (linux_target_ops): New member siginfo_fixup.
11763 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
11764
11765 2009-05-07 Doug Evans <dje@google.com>
11766
11767 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
11768 (regsets_store_inferior_registers): Ditto.
11769
11770 2009-05-06 Pedro Alves <pedro@codesourcery.com>
11771
11772 PR server/10048
11773
11774 * linux-low.c (must_set_ptrace_flags): Delete.
11775 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
11776 of the global.
11777 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
11778 `lwp->must_set_ptrace_flags' instead.
11779 (linux_wait_for_event_1): Set ptrace options here.
11780 (linux_wait_1): ... not here.
11781
11782 2009-04-30 Doug Evans <dje@google.com>
11783
11784 * inferiors.c (started_inferior_callback): New function.
11785 (attached_inferior_callback): New function.
11786 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
11787 * server.c (print_started_pid, print_attached_pid): New functions.
11788 (detach_or_kill_for_exit): New function.
11789 (main): Call it instead of for_each_inferior (kill_inferior_callback).
11790 * server.h (have_started_inferiors_p): Declare.
11791 (have_attached_inferiors_p): Declare.
11792
11793 * inferiors.c (remove_process): Fix memory leak, free process.
11794 * linux-low.c (linux_remove_process): New function.
11795 (linux_kill): Call it instead of remove_process.
11796 (linux_detach, linux_wait_1): Ditto.
11797
11798 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
11799
11800 * configure.srv: Add x86 Windows CE target.
11801
11802 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11803
11804 * inferiors.c (get_thread_process): Make global.
11805 * server.h (get_thread_process): Add prototype.
11806 * thread-db.c (find_one_thread): Use get_thread_process
11807 instead of current_process.
11808 (thread_db_get_tls_address): Do not crash if called when
11809 thread layer is not yet initialized.
11810
11811 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11812
11813 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
11814 * spu-low.c (current_tid): Rename to ...
11815 (current_ptid): ... this.
11816 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
11817 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
11818 ptid_get_lwp (current_ptid) instead of current_tid.
11819 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
11820 instead of current_tid. Use find_process_pid to verify pid
11821 argument is valid. Pass proper argument to remove_process.
11822 (spu_thread_alive): Compare current_ptid instead of current_tid.
11823 (spu_resume): Likewise.
11824
11825 2009-04-02 Pedro Alves <pedro@codesourcery.com>
11826
11827 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
11828 variable.
11829
11830 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11831
11832 Implement the multiprocess extensions, and add linux multiprocess
11833 support.
11834
11835 * server.h (ULONGEST): Declare.
11836 (struct ptid, ptid_t): New.
11837 (minus_one_ptid, null_ptid): Declare.
11838 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11839 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
11840 (struct inferior_list_entry): Change `id' type from unsigned from
11841 to ptid_t.
11842 (struct sym_cache, struct breakpoint, struct
11843 process_info_private): Forward declare.
11844 (struct process_info): Declare.
11845 (current_process): Declare.
11846 (all_processes): Declare.
11847 (initialize_inferiors): Declare.
11848 (add_thread): Adjust to use ptid_t.
11849 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
11850 (add_process, remove_process, find_thread_pid): Declare.
11851 (find_inferior_id): Adjust to use ptid_t.
11852 (cont_thread, general_thread, step_thread): Change type to ptid_t.
11853 (multi_process): Declare.
11854 (push_event): Adjust to use ptid_t.
11855 (read_ptid, write_ptid): Declare.
11856 (prepare_resume_reply): Adjust to use ptid_t.
11857 (clear_symbol_cache): Declare.
11858 * inferiors.c (all_processes): New.
11859 (null_ptid, minus_one_ptid): New.
11860 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11861 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
11862 (add_thread): Change unsigned long to ptid. Remove gdb_id
11863 parameter. Adjust.
11864 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
11865 (gdb_id_to_thread): Rename to ...
11866 (find_thread_pid): ... this. Change unsigned long to ptid.
11867 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
11868 (loaded_dll, pull_pid_from_list): Adjust.
11869 (add_process, remove_process, find_process_pid)
11870 (get_thread_process, current_process, initialize_inferiors): New.
11871 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
11872 (struct target_waitstatus) <related_pid>: Ditto.
11873 (struct target_ops) <kill, detach>: Add `pid' argument. Change
11874 return type to int.
11875 (struct target_ops) <join>: Add `pid' argument.
11876 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
11877 (struct target_ops) <wait>: Add `ptid' field. Change return type
11878 to ptid.
11879 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
11880 (mywait): Add `ptid' argument. Change return type to ptid_t.
11881 (target_pid_to_str): Declare.
11882 * target.c (set_desired_inferior): Adjust to use ptids.
11883 (mywait): Add new `ptid' argument. Adjust.
11884 (target_pid_to_str): New.
11885 * mem-break.h (free_all_breakpoints): Declare.
11886 * mem-break.c (breakpoints): Delelete.
11887 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
11888 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
11889 to use per-process breakpoint list.
11890 (free_all_breakpoints): New.
11891 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
11892 (symbol_cache, all_symbols_looked_up): Delete.
11893 (hexchars): New.
11894 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
11895 read_ptid): New.
11896 (prepare_resume_reply): Change ptid argument's type from unsigned
11897 long to ptid_t. Adjust. Implement W;process and X;process.
11898 (free_sym_cache, clear_symbol_cache): New.
11899 (look_up_one_symbol): Adjust to per-process symbol cache. *
11900 * server.c (cont_thread, general_thread, step_thread): Change type
11901 to ptid_t.
11902 (attached): Delete.
11903 (multi_process): New.
11904 (last_ptid): Change type to ptid_t.
11905 (struct vstop_notif) <ptid>: Change type to ptid_t.
11906 (queue_stop_reply, push_event): Change `ptid' argument's type to
11907 ptid_t.
11908 (discard_queued_stop_replies): Add `pid' argument.
11909 (start_inferior): Adjust to use ptids. Adjust to mywait interface
11910 changes. Don't reference the `attached' global.
11911 (attach_inferior): Adjust to mywait interface changes.
11912 (handle_query): Adjust to use ptids. Parse GDB's qSupported
11913 features. Handle and report "multiprocess+". Handle
11914 "qAttached:PID".
11915 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
11916 changes.
11917 (handle_v_kill): New.
11918 (handle_v_stopped): Adjust to use target_pid_to_str.
11919 (handle_v_requests): Allow multiple attaches and runs when
11920 multiprocess extensions are in effect. Handle "vKill".
11921 (myresume): Adjust to use ptids.
11922 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
11923 (handle_status): Adjust to discard_queued_stop_replies interface
11924 change.
11925 (first_thread_of, kill_inferior_callback)
11926 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
11927 (main): Call initialize_inferiors. Adjust to use ptids, killing
11928 and detaching from all inferiors. Handle multiprocess packet
11929 variants.
11930 * linux-low.h: Include gdb_proc_service.h.
11931 (struct process_info_private): New.
11932 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
11933 <lwpid_of>: Use ptid_get_lwp.
11934 (get_lwp_thread): Adjust.
11935 (struct lwp_info): Add `dead' member.
11936 (find_lwp_pid): Declare.
11937 * linux-low.c (thread_db_active): Delete.
11938 (new_inferior): Adjust comment.
11939 (inferior_pid): Delete.
11940 (linux_add_process): New.
11941 (handle_extended_wait): Adjust.
11942 (add_lwp): Change unsigned long to ptid.
11943 (linux_create_inferior): Add process to processes table. Adjust
11944 to use ptids. Don't set new_inferior here.
11945 (linux_attach_lwp): Rename to ...
11946 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
11947 it. Adjust to use ptids.
11948 (linux_attach_lwp): New.
11949 (linux_attach): Add process to processes table. Don't set
11950 new_inferior here.
11951 (struct counter): New.
11952 (second_thread_of_pid_p, last_thread_of_process_p): New.
11953 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
11954 multiple processes.
11955 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
11956 processes. Remove process from process table.
11957 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
11958 to multiple processes.
11959 (any_thread_of): New.
11960 (linux_detach): Add `pid' argument, and handle it. Remove process
11961 from processes table.
11962 (linux_join): Add `pid' argument. Handle it.
11963 (linux_thread_alive): Change unsighed long argument to ptid_t.
11964 Consider dead lwps as not being alive.
11965 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
11966 threads we're not interested in.
11967 (same_lwp, find_lwp_pid): New.
11968 (linux_wait_for_lwp): Change `pid' argument's type from int to
11969 ptid_t. Adjust.
11970 (linux_wait_for_event): Rename to ...
11971 (linux_wait_for_event_1): ... this. Change `pid' argument's type
11972 from int to ptid_t. Adjust.
11973 (linux_wait_for_event): New.
11974 (linux_wait_1): Add `ptid' argument. Change return type to
11975 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
11976 that exit from the process table.
11977 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
11978 Adjust.
11979 (mark_lwp_dead): New.
11980 (wait_for_sigstop): Adjust to use ptids. If a process exits while
11981 stopping all threads, mark its main lwp as dead.
11982 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
11983 ptids.
11984 (fetch_register, usr_store_inferior_registers)
11985 (regsets_fetch_inferior_registers)
11986 (regsets_store_inferior_registers, linux_read_memory)
11987 (linux_write_memory): Inline `inferior_pid'.
11988 (linux_look_up_symbols): Adjust to use per-process
11989 `thread_db_active'.
11990 (linux_request_interrupt): Adjust to use ptids.
11991 (linux_read_auxv): Inline `inferior_pid'.
11992 (initialize_low): Don't reference thread_db_active.
11993 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
11994 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
11995 (ps_getpid): Return the pid of the current inferior.
11996 * thread-db.c (proc_handle, thread_agent): Delete.
11997 (thread_db_create_event, thread_db_enable_reporting): Adjust to
11998 per-process data.
11999 (find_one_thread): Change argument type to ptid_t. Adjust to
12000 per-process data.
12001 (maybe_attach_thread): Adjust to per-process data and ptids.
12002 (thread_db_find_new_threads): Ditto.
12003 (thread_db_init): Ditto.
12004 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12005 processes table. Adjust to use ptids.
12006 (spu_kill, spu_detach): Adjust interface. Remove process from
12007 processes table.
12008 (spu_join, spu_thread_alive): Adjust interface.
12009 (spu_wait): Adjust interface. Remove process from processes
12010 table. Adjust to use ptids.
12011 * win32-low.c (current_inferior_tid): Delete.
12012 (current_inferior_ptid): New.
12013 (debug_event_ptid): New.
12014 (thread_rec): Take a ptid. Adjust.
12015 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12016 (child_delete_thread): Ditto.
12017 (do_initial_child_stuff): Add `attached' argument. Add process to
12018 processes table.
12019 (child_fetch_inferior_registers, child_store_inferior_registers):
12020 Adjust.
12021 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12022 (win32_attach): Pass 1 to do_initial_child_stuff.
12023 (win32_kill): Adjust interface. Remove process from processes
12024 table.
12025 (win32_detach): Ditto.
12026 (win32_join): Adjust interface.
12027 (win32_thread_alive): Take a ptid.
12028 (win32_resume): Adjust to use ptids.
12029 (get_child_debug_event): Ditto.
12030 (win32_wait): Adjust interface. Remove exiting process from
12031 processes table.
12032
12033 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12034
12035 Non-stop mode support.
12036
12037 * server.h (non_stop): Declare.
12038 (gdb_client_data, handler_func): Declare.
12039 (delete_file_handler, add_file_handler, start_event_loop):
12040 Declare.
12041 (handle_serial_event, handle_target_event, push_event)
12042 (putpkt_notif): Declare.
12043 * target.h (enum resume_kind): New.
12044 (struct thread_resume): Replace `step' field by `kind' field.
12045 (TARGET_WNOHANG): Define.
12046 (struct target_ops) <wait>: Add `options' argument.
12047 <supports_non_stop, async, start_non_stop>: New fields.
12048 (target_supports_non_stop, target_async): New.
12049 (start_non_stop): Declare.
12050 (mywait): Add `options' argument.
12051 * target.c (mywait): Add `options' argument. Print child exit
12052 notifications here.
12053 (start_non_stop): New.
12054 * server.c (non_stop, own_buf, mem_buf): New globals.
12055 (struct vstop_notif): New.
12056 (notif_queue): New global.
12057 (queue_stop_reply, push_event, discard_queued_stop_replies)
12058 (send_next_stop_reply): New.
12059 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12060 interface changes.
12061 (attach_inferior): In non-stop mode, don't wait for the target
12062 here.
12063 (handle_general_set): Handle QNonStop.
12064 (handle_query): When handling qC, return the current general
12065 thread, instead of the first thread of the list.
12066 (handle_query): If the backend supports non-stop mode, include
12067 QNonStop+ in the qSupported query response.
12068 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12069 and non-stop mode.
12070 (handle_v_attach, handle_v_run): Handle non-stop mode.
12071 (handle_v_stopped): New.
12072 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12073 (myresume): Adjust to use resume_kind. Handle non-stop.
12074 (queue_stop_reply_callback): New.
12075 (handle_status): Handle non-stop mode.
12076 (main): Clear non_stop flag on reconnection. Use the event-loop.
12077 Refactor serial protocol handling from here ...
12078 (process_serial_event): ... to this new function. When GDB
12079 selects any thread, select one here. In non-stop mode, wait until
12080 GDB acks all pending events before exiting.
12081 (handle_serial_event, handle_target_event): New.
12082 * remote-utils.c (remote_open): Install remote_desc in the event
12083 loop.
12084 (remote_close): Remove remote_desc from the event loop.
12085 (putpkt_binary): Rename to...
12086 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12087 (putpkt_binary): New as wrapper around putpkt_binary_1.
12088 (putpkt_notif): New.
12089 (prepare_resume_reply): In non-stop mode, don't change the
12090 general_thread.
12091 * event-loop.c: New.
12092 * Makefile.in (OBJ): Add event-loop.o.
12093 (event-loop.o): New rule.
12094
12095 * linux-low.h (pid_of): Moved here.
12096 (lwpid_of): New.
12097 (get_lwp_thread): Use lwpid_of.
12098 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12099 * linux-low.c (pid_of): Delete.
12100 (inferior_pid): Use lwpid_of.
12101 (linux_event_pipe): New.
12102 (target_is_async_p): New.
12103 (delete_lwp): New.
12104 (handle_extended_wait): Use lwpid_of.
12105 (add_lwp): Don't set lwpid field.
12106 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12107 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12108 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12109 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12110 first. Adjust to linux_wait_for_event interface changes. Use
12111 lwpid_of.
12112 (linux_detach): Don't delete the main lwp here.
12113 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12114 (status_pending_p): Don't consider explicitly suspended lwps.
12115 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12116 pointer. Add OPTIONS argument. Change return type to int. Use
12117 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12118 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12119 pointer. Add status pointer argument. Return a pid instead of a
12120 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12121 changes. In non-stop mode, don't switch to a random thread.
12122 (linux_wait): Rename to...
12123 (linux_wait_1): ... this. Add target_options argument, and handle
12124 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12125 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12126 clean exit and signal exit code. Don't stop all threads in
12127 non-stop mode. In all-stop mode, only stop all threads when
12128 reporting a stop to GDB. Handle explicit thread stop requests.
12129 (async_file_flush, async_file_mark): New.
12130 (linux_wait): New.
12131 (send_sigstop): Use lwpid_of.
12132 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12133 interface changes. In non-stop mode, don't switch to a random
12134 thread.
12135 (linux_resume_one_lwp): Use lwpid_of.
12136 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12137 (linux_resume_one_thread): ... this. Handle resume_stop. In
12138 non-stop mode, don't look for pending flag in all threads.
12139 (resume_status_pending_p): Don't consider explicitly suspended
12140 threads.
12141 (my_waitpid): Reimplement. Emulate __WALL.
12142 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12143 Use lwpid_of.
12144 (sigchld_handler, linux_supports_non_stop, linux_async)
12145 (linux_start_non_stop): New.
12146 (linux_target_ops): Register linux_supports_non_stop, linux_async
12147 and linux_start_non_stop.
12148 (initialize_low): Install SIGCHLD handler.
12149 * thread-db.c (thread_db_create_event, find_one_thread)
12150 (thread_db_get_tls_address): Use lwpid_of.
12151 * win32-low.c (win32_detach): Adjust to use resume_kind.
12152 (win32_wait): Add `options' argument.
12153 * spu-low.c (spu_resume): Adjust to use resume_kind.
12154 (spu_wait): Add `options' argument.
12155
12156 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12157
12158 Decouple target code from remote protocol.
12159
12160 * target.h (enum target_waitkind): New.
12161 (struct target_waitstatus): New.
12162 (struct target_ops) <wait>: Return an unsigned long. Take a
12163 target_waitstatus pointer instead of a char pointer.
12164 (mywait): Likewise.
12165 * target.c (mywait): Change prototype to return an unsigned long.
12166 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12167 * server.h (thread_from_wait, old_thread_from_wait): Delete
12168 declarations.
12169 (prepare_resume_reply): Change prototype to take a
12170 target_waitstatus.
12171 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12172 (last_status, last_ptid): New.
12173 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12174 pid instead of a signal.
12175 (attach_inferior): Remove "status" and "signal" parameters.
12176 Adjust.
12177 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12178 not as an address.
12179 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12180 (handle_v_requests, myresume): Remove "status" and "signal"
12181 parameters. Adjust.
12182 (handle_status): New.
12183 (main): Delete local `status'. Adjust.
12184 * remote-utils.c: Include target.h.
12185 (prepare_resume_reply): Change prototype to take a
12186 target_waitstatus. Adjust.
12187
12188 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12189 interface.
12190 * spu-low.c (spu_wait): Adjust.
12191 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12192 Delete.
12193 (win32_wait): Adjust.
12194
12195 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12196
12197 * target.h (struct thread_resume): Delete leave_stopped member.
12198 (struct target_ops): Add a `n' argument to the `resume' callback.
12199 * server.c (start_inferior): Adjust.
12200 (handle_v_cont, myresume): Adjust.
12201 * linux-low.c (check_removed_breakpoint): Adjust to resume
12202 interface change, and to removed leave_stopped field.
12203 (resume_ptr): Delete.
12204 (struct thread_resume_array): New.
12205 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12206 resume interface change.
12207 (linux_continue_one_thread, linux_queue_one_thread)
12208 (resume_status_pending_p): Check if the resume field is NULL
12209 instead of checking the leave_stopped member.
12210 (linux_resume): Adjust to the target resume interface change.
12211 * spu-low.c (spu_resume): Adjust to the target resume interface
12212 change.
12213 * win32-low.c (win32_detach, win32_resume): Ditto.
12214
12215 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12216
12217 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12218 flag.
12219 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12220 pending.
12221 (linux_continue_one_thread): Only preserve the stepping flag if
12222 there's a pending breakpoint.
12223
12224 2009-03-31 Pedro Alves <pedro@codesourcery.com>
12225
12226 * server.c (main): After the inferior having exited, call
12227 remote_close before exiting gdbserver.
12228
12229 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12230
12231 Fix size of FPSCR in Power 7 processors.
12232 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12233 (PPC_FEATURE_HAS_DFP): New #define.
12234 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12235 size of the FPSCR.
12236
12237 2009-03-23 Pedro Alves <pedro@codesourcery.com>
12238
12239 * server.c (handle_query) Whitespace and formatting.
12240
12241 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12242
12243 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12244 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12245 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12246 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12247 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12248 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12249 Makefile.in, configure.ac: Fix whitespace throughout.
12250 * configure: Regenerate.
12251
12252 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12253
12254 * inferiors.c (find_inferior): Make it safe for the callback
12255 function to delete the currently iterated inferior.
12256
12257 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12258
12259 * Makefile.in (linuw_low_h): Move higher.
12260 (thread-db.o): Depend on $(linux_low_h).
12261
12262 2009-03-17 Pedro Alves <pedro@codesourcery.com>
12263
12264 Rename "process" to "lwp" throughout.
12265
12266 * linux-low.c (all_processes): Rename to...
12267 (all_lwps): ... this.
12268 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12269 (add_process): Rename to ...
12270 (add_lwp): ... this. Adjust.
12271 (linux_create_inferior): Adjust.
12272 (linux_attach_lwp): Adjust.
12273 (linux_attach): Adjust.
12274 (linux_kill_one_process): Rename to ...
12275 (linux_kill_one_lwp): ... this. Adjust.
12276 (linux_kill): Adjust.
12277 (linux_detach_one_process): Rename to ...
12278 (linux_detach_one_lwp): ... this. Adjust.
12279 (linux_detach): Adjust.
12280 (check_removed_breakpoint): Adjust.
12281 (status_pending_p): Adjust.
12282 (linux_wait_for_process): Rename to ...
12283 (linux_wait_for_lwp): ... this. Adjust.
12284 (linux_wait_for_event): Adjust.
12285 (send_sigstop): Adjust.
12286 (wait_for_sigstop): Adjust.
12287 (stop_all_processes): Rename to ...
12288 (stop_all_lwps): ... this.
12289 (linux_resume_one_process): Rename to ...
12290 (linux_resume_one_lwp): ... this. Adjust.
12291 (linux_set_resume_request, linux_continue_one_thread)
12292 (linux_queue_one_thread, resume_status_pending_p)
12293 (usr_store_inferior_registers, regsets_store_inferior_registers)
12294 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12295 Adjust.
12296 * linux-low.h (get_process): Rename to ...
12297 (get_lwp): ... this. Adjust.
12298 (get_thread_process): Rename to ...
12299 (get_thread_lwp): ... this. Adjust.
12300 (get_process_thread): Rename to ...
12301 (get_lwp_thread): ... this. Adjust.
12302 (struct process_info): Rename to ...
12303 (struct lwp_info): ... this.
12304 (all_processes): Rename to ...
12305 (all_lwps): ... this.
12306 * proc-service.c (ps_lgetregs): Adjust.
12307 * thread-db.c (thread_db_create_event, find_one_thread)
12308 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12309
12310 2009-03-14 Pedro Alves <pedro@codesourcery.com>
12311
12312 * server.c (handle_query): Handle "qAttached".
12313
12314 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12315
12316 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12317 GPLv3, update license URL.
12318
12319 2009-03-01 Doug Evans <dje@google.com>
12320
12321 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
12322 (server_h): Add gdb_signals.h.
12323 (signals.o): Update.
12324 * server.h (target_signal_from_host,target_signal_to_host_p)
12325 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12326
12327 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12328
12329 * remote-utils.c (getpkt): Also generate remote-debug
12330 information if noack_mode is set.
12331
12332 2009-02-06 Pedro Alves <pedro@codesourcery.com>
12333
12334 * server.c (handle_query): Report qXfer:siginfo:read and
12335 qXfer:siginfo:write as supported and handle them.
12336 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12337 * linux-low.c (linux_xfer_siginfo): New.
12338 (linux_target_ops): Set it.
12339
12340 2009-01-26 Pedro Alves <pedro@codesourcery.com>
12341
12342 * server.c (gdbserver_usage): Mention --remote-debug.
12343 (main): Accept '--remote-debug' switch.
12344
12345 2009-01-18 Doug Evans <dje@google.com>
12346
12347 * regcache.c (new_register_cache): No need to check result of xcalloc.
12348 * server.c (handle_search_memory): Back out calls to xmalloc,
12349 result is checked and error is returned to user upon failure.
12350 (handle_query): Ditto. Add more checks for result of malloc.
12351 (handle_v_cont): Check result of malloc, report error back to
12352 user upon failure.
12353 (handle_v_run): Ditto. Call freeargv.
12354 * server.h (freeargv): Declare.
12355 * utils.c (freeargv): New fn.
12356
12357 2009-01-15 Doug Evans <dje@google.com>
12358
12359 * gdbreplay.c (perror_with_name): Make arg const char *.
12360 * server.h (target_signal_to_name): Make return type const char *.
12361 * thread-db.c (thread_db_err_str): Make return type const char *.
12362 * utils.c (perror_with_name): Make arg const char *.
12363
12364 2009-01-14 Pedro Alves <pedro@codesourcery.com>
12365
12366 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12367 when handling a EXIT_PROCESS_DEBUG_EVENT.
12368
12369 2009-01-06 Joel Brobecker <brobecker@adacore.com>
12370
12371 * gdbreplay.c (gdbreplay_version): Update copyright year.
12372 * server.c (gdbserver_version): Likewise.
12373
12374 2009-01-05 Doug Evans <dje@google.com>
12375
12376 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
12377 (handle_extended_wait): Improve comment.
12378
12379 2008-12-13 Doug Evans <dje@google.com>
12380
12381 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12382 * server.h (ATTR_MALLOC): New macro.
12383 (xmalloc,xcalloc,xstrdup): Declare.
12384 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12385 * inferiors.c: Ditto.
12386 * linux-low.c: Ditto.
12387 * mem-break.c: Ditto.
12388 * regcache.c: Ditto.
12389 * remote-utils.c: Ditto.
12390 * server.c: Ditto.
12391 * target.c: Ditto.
12392 * win32-low.c: Ditto.
12393
12394 2008-12-12 Doug Evans <dje@google.com>
12395
12396 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12397 in debugging printf.
12398
12399 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12400
12401 2008-12-09 Doug Evans <dje@google.com>
12402
12403 * linux-low.h (struct process_info): Delete member tid, unused.
12404 * thread-db.c (find_one_thread): Update.
12405 (maybe_attach_thread): Update.
12406
12407 2008-12-02 Pedro Alves <pedro@codesourcery.com>
12408
12409 * target.h (struct target_ops): Add qxfer_osdata member.
12410 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12411 and dirent.h.
12412 (linux_qxfer_osdata): New functions.
12413 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12414 callback.
12415 * server.c (handle_query): Handle "qXfer:osdata:read:".
12416 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12417 (buffer_xml_printf): New functions.
12418 * server.h (struct buffer): New.
12419 (buffer_grow_str, buffer_grow_str0): New macros.
12420 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12421 (buffer_xml_printf): Declare.
12422
12423 2008-11-24 Doug Evans <dje@google.com>
12424
12425 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12426
12427 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12428
12429 * server.c (handle_v_run): Always use the supplied argument list.
12430
12431 2008-11-19 Bob Wilson <bob.wilson@acm.org>
12432
12433 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12434 (xtensa_regmap_table): Add entry for scompare1.
12435
12436 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12437
12438 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12439 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12440 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12441 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12442 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12443 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12444 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12445 XML target descriptions.
12446 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12447 when inferior is running on an ISA 2.05 or later processor. Add
12448 special case to return offset for full 64-bit slot of FPSCR when
12449 in 32-bits.
12450
12451 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
12452
12453 * Makefile.in (SFILES, clean): Added sparc64 files.
12454 (reg-sparc64.o, reg-sparc64.c): New.
12455 * configure.srv (sparc*-*-linux*): New configuration.
12456 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
12457 syscall arguments for SPARC.
12458 (regsets_store_inferior_registers): Likewise.
12459 * linux-sparc-low.c: New file.
12460
12461 2008-10-21 Doug Evans <dje@google.com>
12462
12463 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
12464 (READLINE_DIR,READLINE_DEP): Delete.
12465 (INTERNAL_CFLAGS): Update.
12466 (LINTFLAGS): Update.
12467
12468 2008-10-10 Pedro Alves <pedro@codesourcery.com>
12469
12470 * server.c (handle_v_run): If GDB didn't specify an argv, use the
12471 whole argv from the last run, not just argv[0].
12472
12473 2008-09-08 Pedro Alves <pedro@codesourcery.com>
12474
12475 * regcache.c (new_register_cache): Return NULL if the register
12476 cache size isn't known yet.
12477 (free_register_cache): Avoid dereferencing a NULL regcache.
12478
12479 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12480
12481 * configure.srv: Merge MIPS and MIPS64.
12482
12483 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
12484
12485 * Makefile.in (uninstall): Apply $(EXEEXT) too.
12486
12487 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
12488
12489 * Makefile.in: Add required vsx dependencies.
12490
12491 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
12492 Declare init_registers_powerpc_vsx32l.
12493 Declare init_registers_powerpc_vsx64l.
12494 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
12495 (ppc_arch_setup): Check for VSX in hwcap.
12496 (ppc_fill_vsxregset): New function.
12497 (ppc_store_vsxregset): New function.
12498 Add new VSX entry in regset_info target_regsets.
12499
12500 * configure.srv: Add new VSX dependencies.
12501
12502 2008-08-12 Pedro Alves <pedro@codesourcery.com>
12503
12504 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
12505 (remote_open): Set or clear transport_is_reliable.
12506 (putpkt_binary): Don't expect acks in noack mode.
12507 (getpkt): Don't send ack/nac in noack mode.
12508 * server.c (handle_general_set): Handle QStartNoAckMode.
12509 (handle_query): If connected by tcp pass QStartNoAckMode+ in
12510 qSupported.
12511 (main): Reset noack_mode on every connection.
12512 * server.h (noack_mode): Declare.
12513
12514 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12515
12516 * Makefile.in (GDBREPLAY_OBS): New variable.
12517 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
12518
12519 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
12520 Daniel Jacobowitz <dan@codesourcery.com>
12521
12522 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
12523 (usr_store_inferior_registers): Likewise.
12524 (regsets_store_inferior_registers): Likewise.
12525
12526 2008-07-31 Rolf Jansen <rj@surtec.com>
12527 Pedro Alves <pedro@codesourcery.com>
12528
12529 * configure.ac: Check for memmem declaration.
12530 * server.c [HAVE_MALLOC_H]: Include malloc.h.
12531 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
12532 (disable_packet_qfThreadInfo): Unconditionally compile.
12533 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
12534 * configure, config.in: Regenerate.
12535
12536 2008-07-28 Doug Kwan <dougkwan@google.com>
12537
12538 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
12539 (linux_write_memory): Remove declaration of errno.
12540
12541 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
12542
12543 * linux-low.c (handle_extended_wait): Do not use "status"
12544 variable uninitialized.
12545
12546 2008-07-07 Pedro Alves <pedro@codesourcery.com>
12547
12548 * server.c (handle_v_attach): Inhibit reporting dll changes.
12549
12550 2008-06-27 Pedro Alves <pedro@codesourcery.com>
12551
12552 * remote-utils.c (prepare_resume_reply): If requested, don't
12553 output "thread:TID" in the T stop reply.
12554
12555 * server.c (disable_packet_vCont, disable_packet_Tthread)
12556 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
12557 (handle_query): If requested, disable support for qC, qfThreadInfo
12558 and qsThreadInfo.
12559 (handle_v_requests): If requested, disable support for vCont.
12560 (gdbserver_show_disableable): New.
12561 (main): Handle --disable-packet and --disable-packet=LIST.
12562
12563 * server.h (disable_packet_vCont, disable_packet_Tthread)
12564 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
12565
12566 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
12567
12568 * server.c (gdbserver_usage): Mention --version.
12569
12570 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
12571
12572 * Makefile.in (gdbreplay.o): New rule.
12573
12574 2008-06-06 Joseph Myers <joseph@codesourcery.com>
12575
12576 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
12577 message, not gdbserver.
12578
12579 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
12580 Nathan Sidwell <nathan@codesourcery.com>
12581 Joseph Myers <joseph@codesourcery.com>
12582
12583 * acinclude.m4: Include ../../config/acx.m4.
12584 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
12585 * configure, config.in: Regenerate.
12586 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
12587 * server.c (gdbserver_version): Print PKGVERSION.
12588 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
12589 (main): Adjust gdbserver_usage calls.
12590 * gdbreplay.c (version, host_name): Add declarations.
12591 (gdbreplay_version, gdbreplay_usage): New.
12592 (main): Accept --version and --help options.
12593
12594 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
12595
12596 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
12597 (arm_breakpoint_at): Handle Thumb.
12598 (the_low_target): Add comment.
12599
12600 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
12601
12602 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
12603
12604 2008-05-09 Doug Evans <dje@google.com>
12605
12606 * server.h (decode_search_memory_packet): Declare.
12607 * remote-utils.c (decode_search_memory_packet): New fn.
12608 * server.c (handle_search_memory_1): New fn.
12609 (handle_search_memory): New fn.
12610 (handle_query): Process qSearch:memory packets.
12611
12612 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
12613
12614 * regcache.c (registers_length): Remove.
12615 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
12616 full register packet.
12617 * regcache.h (registers_length): Remove prototype.
12618 * server.h (PBUFSIZ): Define to 16384.
12619
12620 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
12621
12622 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
12623 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
12624 powerpc-64l.o, and powerpc-altivec64l.o.
12625 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
12626 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
12627 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
12628 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
12629 rs6000/power-linux.xml, and rs6000/power64-linux.xml
12630 to srv_xmlfiles.
12631
12632 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
12633 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
12634 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
12635 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
12636 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
12637 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
12638 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
12639 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
12640 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
12641 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
12642 (clean): Update.
12643
12644 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
12645 (init_registers_powerpc_32l): ... this new prototype.
12646 (init_registers_powerpc_32): Remove, replace by ...
12647 (init_registers_powerpc_altivec32l): ... this new prototype.
12648 (init_registers_powerpc_e500): Remove, replace by ...
12649 (init_registers_powerpc_e500l): ... this new prototype.
12650 (init_registers_ppc64): Remove, replace by ...
12651 (init_registers_powerpc_64l): ... this new prototype.
12652 (init_registers_powerpc_64): Remove, replace by ...
12653 (init_registers_powerpc_altivec64l): ... this new prototype.
12654 (ppc_num_regs): Set to 73.
12655 (PT_ORIG_R3, PT_TRAP): Define if necessary.
12656 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
12657 (ppc_cannot_store_register): Handle orig_r3 and trap.
12658 (ppc_arch_setup): Update init_registers_... calls.
12659 (ppc_fill_gregset): Handle orig_r3 and trap.
12660
12661 * inferiors.c (clear_inferiors): Reset current_inferior.
12662
12663 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
12664
12665 * acinclude.m4: Add override.m4.
12666 * configure: Regenerate.
12667
12668 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12669
12670 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
12671 initial call to init_register_ppc64.
12672
12673 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12674
12675 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
12676 single powerpc*-*-linux* case.
12677 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
12678
12679 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
12680
12681 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
12682 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
12683 from reg_xmlfiles.
12684 * linux-ppc-low.c: Include <elf.h>.
12685 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
12686 (ppc_hwcap): New global variable.
12687 (ppc_regmap): Remove __SPE__ #ifdef sections.
12688 (ppc_regmap_e500): New global variable.
12689 (ppc_cannot_store_register): Update __SPE__ special case.
12690 (ppc_get_hwcap): New function.
12691 (ppc_arch_setup): Use it to determine whether inferior supports
12692 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
12693 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
12694 Do not access registers if target does not support AltiVec.
12695 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
12696 Do not access registers if target does not support SPE.
12697 (target_regsets): Unconditionally include AltiVec and SPE regsets.
12698
12699 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
12700
12701 * linux-low.c (disabled_regsets, num_regsets): New.
12702 (use_regsets_p): Delete.
12703 (linux_wait_for_process): Clear disabled_regsets.
12704 (regsets_fetch_inferior_registers): Check and set it.
12705 (regsets_store_inferior_registers): Likewise.
12706 (linux_fetch_registers, linux_store_registers): Do not use
12707 use_regsets_p.
12708 (initialize_low): Allocate disabled_regsets.
12709
12710 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
12711
12712 * Makefile.in (LIBOBJS): New.
12713 (OBS): Use LIBOBJS.
12714 (memmem.o): New rule.
12715 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
12716 * configure: Regenerated.
12717
12718 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
12719
12720 * server.c (handle_query): Never return "unsupported" for
12721 qXfer:features:read queries.
12722
12723 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
12724
12725 * server.c (get_features_xml): Fix inverted condition.
12726 (handle_query): Always support qXfer:feature:read.
12727
12728 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
12729
12730 * server.c (wrapper_argv): New.
12731 (start_inferior): Handle wrapper_argv. If set, expect an extra
12732 trap.
12733 (gdbserver_usage): Document --wrapper.
12734 (main): Parse --wrapper.
12735
12736 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12737
12738 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
12739 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
12740 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
12741 (ppc_set_pc): Likewise.
12742 (ppc_arch_setup): New function.
12743 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
12744 of collect_register.
12745 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
12746
12747 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12748
12749 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
12750 instead of linux-ppc64-low.o.
12751 * linux-ppc64-low.c: Remove file.
12752 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
12753 (linux-ppc64-low.o): Remove rule.
12754
12755 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
12756 (init_registers_powerpc_64): Likewise.
12757 (ppc_regmap): Conditionally define depending on __powerpc64__.
12758 (ppc_cannot_store_register): Do not special-case "fpscr" when
12759 compiled on __powerpc64__.
12760 (ppc_collect_ptrace_register): New function.
12761 (ppc_supply_ptrace_register): New function.
12762 (ppc_breakpoint): Change type to "unsigned int".
12763 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
12764 (the_low_target): Conditionally provide initializers for the
12765 arch_setup member depending on __powerpc64__. Install
12766 collect_ptrace_register and supply_ptrace_register members.
12767
12768 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12769
12770 * regcache.h (gdbserver_xmltarget): Add extern declaration.
12771 * server.c (gdbserver_xmltarget): Define.
12772 (get_features_xml): Use it to replace "target.xml" and arch_string.
12773
12774 * configure.srv: Remove srv_xmltarget. Add XML files that were
12775 mentioned there to srv_xmlfiles instead. Remove conditional tests
12776 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
12777 srv_xmlfiles and srv_regobj to include all possible choices.
12778 * configure.ac (srv_xmltarget): Remove.
12779 (srv_xmlfiles): Do not add "target.xml".
12780 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
12781 checks for supplementary target information.
12782 * configure: Regenerate.
12783 * Makefile.in (XML_TARGET): Remove.
12784 (target.xml): Remove rule.
12785 (clean): Do not clean up target.xml.
12786 (.PRECIOUS): Do not mention target.xml.
12787
12788 * target.h (struct target_ops): Remove arch_string member.
12789 * linux-low.c (linux_arch_string): Remove.
12790 (linux_target_ops): Remove arch_string initializer.
12791 * linux-low.h (struct linux_target_ops): Remove arch_string member.
12792 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
12793 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
12794 * spu-low.c (spu_arch_string): Remove.
12795 (spu_target_ops): Remove arch_string initializer.
12796 * win32-low.c (win32_arch_string): Remove.
12797 (win32_target_ops): Remove arch_string initializer.
12798 * win32-low.h (struct win32_target_ops): Remove arch_string member.
12799 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
12800 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
12801
12802 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12803
12804 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
12805 by collect_ptrace_register and supply_ptrace_register hooks.
12806 * linux-low.c (fetch_register): Use supply_ptrace_register callback
12807 instead of checking for the_low_target.left_pad_xfer.
12808 (usr_store_inferior_registers): Use collect_ptrace_register callback
12809 instead of checking for the_low_target.left_pad_xfer.
12810
12811 * linux-s390-low.c (s390_collect_ptrace_register): New function.
12812 (s390_supply_ptrace_register): Likewise.
12813 (s390_fill_gregset): Call s390_collect_ptrace_register.
12814 (the_low_target): Update.
12815
12816 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
12817 (ppc_supply_ptrace_register): Likewise.
12818 (the_low_target): Update.
12819
12820 * linux-i386-low.c (the_low_target): Update.
12821 * linux-x86-64-low.c (the_low_target): Update.
12822
12823 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12824
12825 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
12826 reg-s390.o and reg-s390x.o.
12827
12828 * linux-low.c (new_inferior): New global variable.
12829 (linux_create_inferior, linux_attach): Set it.
12830 (linux_wait_for_process): Call the_low_target.arch_setup after the
12831 target has stopped for the first time.
12832 (initialize_low): Do not call the_low_target.arch_setup.
12833
12834 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
12835 (s390_set_pc): Likewise.
12836 (s390_arch_setup): New function.
12837 (the_low_target): Use s390_arch_setup as arch_setup routine.
12838
12839 * regcache.c (realloc_register_cache): New function.
12840 (set_register_cache): Call it for each existing regcache.
12841
12842 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12843
12844 * server.h (init_registers): Remove prototype.
12845
12846 * linux-low.h (struct linux_target_ops): Add arch_setup field.
12847 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
12848 instead of init_registers ().
12849 * linux-arm-low.c (init_registers_arm): Add prototype.
12850 (init_registers_arm_with_iwmmxt): Likewise.
12851 (the_low_target): Add initializer for arch_setup field.
12852 * linux-cris-low.c (init_registers_cris): Add prototype.
12853 (the_low_target): Add initializer for arch_setup field.
12854 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
12855 (the_low_target): Add initializer for arch_setup field.
12856 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
12857 (the_low_target): Add initializer for arch_setup field.
12858 * linux-ia64-low.c (init_registers_ia64): Add prototype.
12859 (the_low_target): Add initializer for arch_setup field.
12860 * linux-m32r-low.c (init_registers_m32r): Add prototype.
12861 (the_low_target): Add initializer for arch_setup field.
12862 * linux-m68k-low.c (init_registers_m68k): Add prototype.
12863 (the_low_target): Add initializer for arch_setup field.
12864 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
12865 (init_registers_mips64_linux): Likewise.
12866 (the_low_target): Add initializer for arch_setup field.
12867 * linux-ppc-low.c (init_registers_ppc): Add prototype.
12868 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
12869 (the_low_target): Add initializer for arch_setup field.
12870 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
12871 (init_registers_powerpc_64): Likewise.
12872 (the_low_target): Add initializer for arch_setup field.
12873 * linux-s390-low.c (init_registers_s390): Add prototype.
12874 (init_registers_s390x): Likewise.
12875 (the_low_target): Add initializer for arch_setup field.
12876 * linux-sh-low.c (init_registers_sh): Add prototype.
12877 (the_low_target): Add initializer for arch_setup field.
12878 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
12879 (the_low_target): Add initializer for arch_setup field.
12880 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
12881 (the_low_target): Add initializer for arch_setup field.
12882
12883 * win32-low.h (struct win32_target_ops): Add arch_setup field.
12884 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
12885 instead of init_registers ().
12886 * win32-arm-low.c (init_registers_arm): Add prototype.
12887 (the_low_target): Add initializer for arch_setup field.
12888 * win32-i386-low.c (init_registers_i386): Add prototype.
12889 (the_low_target): Add initializer for arch_setup field.
12890
12891 * spu-low.c (init_registers_spu): Add prototype.
12892 (initialize_low): Call initialie_registers_spu () instead of
12893 initialize_registers ().
12894
12895 2008-02-19 Pedro Alves <pedro@codesourcery.com>
12896
12897 * server.c (handle_v_requests): When handling the vRun and vAttach
12898 packets, if already debugging a process, don't kill it. Return an
12899 error instead.
12900
12901 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
12902
12903 * server.c (handle_query): Correct length check.
12904
12905 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
12906
12907 * win32-low.c (do_initial_child_stuff): Add process handle
12908 parameter. Set current_process_handle and current_process_id from the
12909 parameters. Clear globals.
12910 (win32_create_inferior): Don't set current_process_handle and
12911 current_process_id here. Instead pass them on the call to
12912 do_initial_child_stuff.
12913 (win32_attach): Likewise.
12914 (win32_clear_inferiors): New.
12915 (win32_kill): Don't close the current process handle or the
12916 current thread handle here. Instead call win32_clear_inferiors.
12917 (win32_detach): Don't open a new handle to the process. Call
12918 win32_clear_inferiors.
12919 (win32_join): Don't rely on current_process_handle; open a new
12920 handle using the process id.
12921 (win32_wait): Call win32_clear_inferiors when the inferior process
12922 has exited.
12923
12924 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
12925
12926 * server.c (monitor_show_help): Add "exit".
12927
12928 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
12929
12930 * Makefile.in (SFILES): Add linux-xtensa-low.c.
12931 (clean): Add reg-xtensa.c.
12932 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
12933 * configure.srv (xtensa*-*-linux*) New target.
12934 * linux-xtensa-low.c: New.
12935 * xtensa-xtregs.c: New.
12936
12937 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
12938
12939 * hostio.c: Don't include errno.h.
12940 (errno_to_fileio_errno): Move to hostio-errno.
12941 * hostio.c: (hostio_error): Remove the error parameter. Defer the
12942 error number outputting to the target->hostio_last_error callback.
12943 (hostio_packet_error): Use FILEIO_EINVAL directly.
12944 (handle_open, handle_pread, hostio_error, handle_unlink): Update
12945 calls to hostio_error.
12946 * hostio-errno.c: New.
12947 * server.h (hostio_last_error_from_errno): Declare.
12948 * target.h (target_ops): Add hostio_last_error member.
12949 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
12950 as hostio_last_error handler.
12951 * spu-low.c (spu_target_ops): Likewise.
12952 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
12953 (wince_hostio_last_error): New functions.
12954 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
12955 as hostio_last_error handler.
12956 (win32_target_ops) [!_WIN32_WCE]: Register
12957 hostio_last_error_from_errno as hostio_last_error handler.
12958 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
12959 (hostio-errno.o): New rule.
12960 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
12961 * configure.srv (srv_hostio_err_objs): New variable. Default to
12962 hostio-errno.o.
12963 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
12964 * configure: Regenerate.
12965
12966 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12967
12968 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
12969 (linux_kill, linux_detach): Clean up the process list.
12970 * remote-utils.c (remote_open): Improve port number parsing.
12971 (putpkt_binary, input_interrupt): Only send interrupts if the target
12972 is running.
12973 * server.c (extended_protocol): Make static.
12974 (attached): Define earlier.
12975 (exit_requested, response_needed, program_argv): New variables.
12976 (target_running): New.
12977 (start_inferior): Clear attached here.
12978 (attach_inferior): Set attached here.
12979 (require_running): Define.
12980 (handle_query): Use require_running and target_running. Implement
12981 "monitor exit".
12982 (handle_v_attach, handle_v_run): New.
12983 (handle_v_requests): Use require_running. Handle vAttach and vRun.
12984 (gdbserver_usage): Update.
12985 (main): Redo argument parsing. Handle --debug and --multi. Handle
12986 --attach along with other options or after the port. Save
12987 program_argv. Support no initial program. Resynchronize
12988 communication with GDB after an error. Handle "monitor exit".
12989 Use require_running and target_running. Always allow the extended
12990 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
12991 restart in extended mode.
12992 * README: Refer to the GDB manual. Update --attach usage.
12993
12994 2007-12-20 Andreas Schwab <schwab@suse.de>
12995
12996 * linux-low.c (STACK_SIZE): Define.
12997 (linux_tracefork_child): Use it. Use __clone2 on ia64.
12998 (linux_test_for_tracefork): Likewise.
12999
13000 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13001
13002 * linux-low.c (linux_wait_for_event): Update messages. Do not
13003 reinsert auto-delete breakpoints.
13004 * mem-break.c (struct breakpoint): Change return type of handler to
13005 int.
13006 (set_breakpoint_at): Update handler type.
13007 (reinsert_breakpoint_handler): Return 1 instead of calling
13008 delete_breakpoint.
13009 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13010 setting a new one.
13011 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13012 * mem-break.h (set_breakpoint_at): Update handler type.
13013 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13014 * win32-low.c (auto_delete_breakpoint): New.
13015 (get_child_debug_event): Use it.
13016
13017 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13018
13019 * configure.ac: Check for pread and pwrite.
13020 * hostio.c (handle_pread): Fall back to lseek and read.
13021 (handle_pwrite): Fall back to lseek and write.
13022 * config.in, configure: Regenerated.
13023
13024 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13025
13026 * server.c (myresume): Add own_buf argument.
13027 (main): Update calls.
13028
13029 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13030
13031 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13032 * remote-utils.c (remote_open): Do not call disable_async_io.
13033 (block_async_io): Delete.
13034 (unblock_async_io): Make static.
13035 (initialize_async_io): New.
13036 * server.c (handle_v_cont): Handle async I/O here.
13037 (myresume): Likewise. Move other common resume tasks here...
13038 (main): ... from here. Call initialize_async_io. Disable async
13039 I/O before the main loop.
13040 * server.h (initialize_async_io): Declare.
13041 (block_async_io, unblock_async_io): Delete prototypes.
13042 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13043
13044 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13045
13046 * remote-utils.c (readchar): Allow binary data in received messages.
13047
13048 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13049
13050 * win32-low.c (attaching): New global.
13051 (win32_create_inferior): Clear the `attaching' global.
13052 (win32_attach): Set the `attaching' global.
13053 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13054 attaching. Only set a breakpoint at the entry point if not
13055 attaching.
13056
13057 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13058
13059 * server.c (main): Don't report dll events on the initial
13060 connection on attaches.
13061
13062 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13063
13064 * server.c (main): Relax numerical bases supported for the pid of
13065 the --attach command line argument.
13066
13067 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13068
13069 * win32-low.c (win32_attach): Call OpenProcess before
13070 DebugActiveProcess, not after. Add last error output to error
13071 call.
13072
13073 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13074
13075 * win32-low.c (win32_get_thread_context)
13076 (win32_set_thread_context): New functions.
13077 (thread_rec): Use win32_get_thread_context.
13078 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13079 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13080 field.
13081
13082 2007-12-03 Leo Zayas
13083 Pedro Alves <pedro_alves@portugalmail.pt>
13084
13085 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13086 global variables.
13087 (child_add_thread): Minor cleanup.
13088 (child_continue): Resume artificially suspended threads before
13089 calling ContinueDebugEvent.
13090 (suspend_one_thread): New.
13091 (fake_breakpoint_event): New.
13092 (get_child_debug_event): Change return type to int. Check here if
13093 gdb sent an interrupt request. If a soft interrupt was requested,
13094 fake a breakpoint event. Return 0 if there is no event to handle,
13095 and 1 otherwise.
13096 (win32_wait): Don't check here if gdb sent an interrupt request.
13097 Ensure there is a valid event to handle.
13098 (win32_request_interrupt): Add soft interruption method as last
13099 resort.
13100
13101 2007-12-03 Leo Zayas
13102 Pedro Alves <pedro_alves@portugalmail.pt>
13103
13104 * win32-low.h (win32_thread_info): Add descriptions to the
13105 structure members. Replace `suspend_count' counter by a
13106 `suspended' flag.
13107 * win32-low.c (thread_rec): Update condition of when to get the
13108 context from the inferior. Rely on ContextFlags being set if it
13109 has already been retrieved. Only suspend the inferior thread if
13110 we haven't already. Warn if that fails.
13111 (continue_one_thread): s/suspend_count/suspended/. Only call
13112 ResumeThread once. Warn if that fails.
13113
13114 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13115
13116 * win32-low.c (win32_wait): Don't read from the inferior when it
13117 has already exited.
13118
13119 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13120
13121 * Makefile.in (win32_low_h): New variable.
13122 (win32-low.o): Add dependency on $(win32_low_h).
13123 (win32-arm-low.o, win32-i386-low.o): New rules.
13124
13125 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13126
13127 * hostio.c: Correct copyright year.
13128
13129 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13130
13131 * Makefile.in (OBS): Add hostio.o.
13132 (hostio.o): New rule.
13133 * server.h (handle_vFile): Declare.
13134 * hostio.c: New file.
13135 * server.c (handle_v_requests): Take packet_len and new_packet_len
13136 for binary packets. Call handle_vFile.
13137 (main): Update call to handle_v_requests.
13138
13139 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13140
13141 * linux-low.c: Include <sched.h>.
13142
13143 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13144
13145 * linux-low.c (linux_tracefork_grandchild): New.
13146 (linux_tracefork_child): Use clone.
13147 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13148
13149 2007-10-31 Joel Brobecker <brobecker@adacore.com>
13150
13151 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13152
13153 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13154
13155 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13156
13157 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13158
13159 * inferiors.c (change_inferior_id): Delete.
13160 (add_pid_to_list, pull_pid_from_list): New.
13161 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13162 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13163 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13164 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13165 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13166 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13167 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13168 (using_threads): Always set to 1.
13169 (handle_extended_wait): New.
13170 (add_process): Do not set TID.
13171 (linux_create_inferior): Set must_set_ptrace_flags.
13172 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13173 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13174 (linux_thread_alive): Rename TID argument to LWPID.
13175 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13176 (linux_wait_for_event): Do not use TID or check using_threads. Update
13177 call to dead_thread_notify. Call handle_extended_wait.
13178 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13179 (send_sigstop): Delete sigstop_sent.
13180 (wait_for_sigstop): Avoid TID.
13181 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13182 (linux_test_for_tracefork): New.
13183 (linux_lookup_signals): Use thread_db_active and
13184 linux_supports_tracefork_flag.
13185 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13186 * linux-low.h (get_process_thread): Avoid TID.
13187 (struct process_ifo): Move thread_known and tid to the end. Remove
13188 sigstop_sent.
13189 (linux_attach_lwp, thread_db_init): Update prototypes.
13190 * server.h (change_inferior_id): Delete prototype.
13191 (add_pid_to_list, pull_pid_from_list): New prototypes.
13192 * thread-db.c (thread_db_use_events): New.
13193 (find_first_thread): Rename to...
13194 (find_one_thread): ...this. Update callers and messages. Do not
13195 call fatal. Check thread_db_use_events. Do not call
13196 change_inferior_id or new_thread_notify.
13197 (maybe_attach_thread): Update. Do not call new_thread_notify.
13198 (thread_db_init): Set thread_db_use_events. Check use_events.
13199 * utils.c (fatal, warning): Correct message prefix.
13200
13201 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13202
13203 * Makefile.in (clean): Remove new files.
13204 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13205 (powerpc-64.o, powerpc-64.c): New rules.
13206 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13207 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13208 with SPE.
13209 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13210 SPE targets.
13211 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13212 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13213 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13214 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13215 (target_regsets): Add AltiVec and SPE register sets.
13216 * configure.ac: Check for AltiVec and SPE.
13217 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13218 (ppc_fill_vrregset, ppc_store_vrregset): New.
13219 (target_regsets): Add AltiVec register set.
13220 * configure: Regenerated.
13221
13222 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13223
13224 * linux-low.c (O_LARGEFILE): Define.
13225 (linux_read_memory): Use /proc/PID/mem.
13226 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13227 * configure, config.in: Regenerated.
13228
13229 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13230
13231 * linux-low.c (linux_wait_for_event): Do not pass signals while
13232 single-stepping.
13233
13234 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13235
13236 * win32-low.c (create_process): New.
13237 (win32_create_inferior): Use create_process instead of
13238 CreateProcess. If create_process failed retry appending an ".exe"
13239 suffix. Store the GetLastError result immediatelly after
13240 create_process calls and use it on the call to error.
13241
13242 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13243
13244 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13245
13246 2007-08-23 Joel Brobecker <brobecker@adacore.com>
13247
13248 * configure.ac: Switch license to GPLv3.
13249
13250 2007-08-01 Michael Snyder <msnyder@access-company.com>
13251
13252 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13253
13254 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13255
13256 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13257 typedef.
13258 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13259 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13260 CloseToolhelp32Snapshot.
13261 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13262 CloseToolhelp32Snapshot.
13263
13264 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
13265
13266 * server.c (main): Check for inferior exit before main loop.
13267
13268 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13269
13270 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13271 instead of on tmp_desc.
13272
13273 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13274 Daniel Jacobowitz <dan@codesourcery.com>
13275
13276 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13277 (add_thread): Minor cleanups.
13278 (clear_inferiors): Move lower in the file. Clear the DLL
13279 list.
13280 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13281 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13282 (xml_escape_text): New.
13283 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13284 for qSupported.
13285 (handle_v_cont): Report errors.
13286 (gdbserver_version): Update.
13287 (main): Correct size of own_buf. Do not report initial DLL events.
13288 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13289 (unloaded_dll, xml_escape_text): New.
13290 * win32-low.c (enum target_waitkind): Update comments.
13291 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13292 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13293 (win32_EnumProcessModules, win32_GetModuleInformation)
13294 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13295 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13296 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13297 (win32_Module32First, win32_Module32Next, load_toolhelp)
13298 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13299 (get_child_debug_event): Handle DLL events.
13300 (win32_wait): Likewise.
13301
13302 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13303
13304 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13305 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13306
13307 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13308
13309 * win32-low.c (handle_output_debug_string): Ignore event if not
13310 waiting.
13311
13312 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13313
13314 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13315
13316 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13317
13318 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13319
13320 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13321
13322 * inferiors.c (change_inferior_id): Add comment.
13323 * linux-low.c (check_removed_breakpoint): Add an early
13324 prototype. Improve debug output.
13325 (linux_attach): Doc update.
13326 (linux_detach_one_process, linux_detach): Clean up before releasing
13327 each process.
13328 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13329 * linux-low.h (struct process_info): Doc improvement.
13330 * mem-break.c (delete_all_breakpoints): New.
13331 * mem-break.h (delete_all_breakpoints): New prototype.
13332 * thread-db.c (find_first_thread): New.
13333 (thread_db_create_event): Call it instead of
13334 thread_db_find_new_threads. Clean up unused variables.
13335 (maybe_attach_thread): Remove first thread handling.
13336 (thread_db_find_new_threads): Use find_first_thread.
13337 (thread_db_get_tls_address): Likewise.
13338
13339 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13340
13341 * thread-db.c (thread_db_find_new_threads): Add prototype.
13342 (thread_db_create_event): Check for the main thread before adding
13343 a new thread.
13344 (maybe_attach_thread): Only enable event reporting if TID == 0.
13345 (thread_db_get_tls_address): Check for new threads.
13346
13347 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13348
13349 * linux-low.c (linux_create_inferior): Try execv before execvp.
13350 * spu-low.c (spu_create_inferior): Likewise.
13351
13352 2007-06-13 Mike Frysinger <vapier@gentoo.org>
13353
13354 * linux-low.c (linux_create_inferior): Change execv to execvp.
13355 * spu-low.c (spu_create_inferior): Likewies.
13356
13357 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13358
13359 * Makefile.in (clean): Clean new files instead of deleted ones.
13360 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13361 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13362 rules.
13363 * configure.srv: Specify XML files and new regformats for MIPS and
13364 MIPS64 GNU/Linux.
13365 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13366 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13367 an entry for the restart register.
13368 (mips_cannot_fetch_register, mips_cannot_store_register)
13369 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13370 register names to match the XML descriptions.
13371 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13372 restart register instead of $0.
13373
13374 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13375 Markus Deuling <deuling@de.ibm.com>
13376
13377 * remote-utils.c (decode_xfer_write): New function.
13378 * server.h (decode_xfer_write): Add prototype.
13379 * server.c (handle_query): Add PACKET_LEN argument. Support
13380 qXfer:spu:read and qXfer:spu:write packets.
13381 (main): Pass packet_len to handle_query.
13382 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13383 * target.h (target_ops): Add qxfer_spu.
13384
13385 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13386
13387 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13388 accessing non-seekable spufs files.
13389
13390 2007-05-16 Markus Deuling <deuling@de.ibm.com>
13391
13392 * server.c (handle_query): Add reply for qC packet.
13393
13394 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13395 Leo Zayas <lerele@champenstudios@com>
13396
13397 * server.h (check_remote_input_interrupt_request): New function.
13398 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13399 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13400 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13401 (check_remote_input_interrupt_request): New function.
13402 * server.h (check_remote_input_interrupt_request): Declare.
13403 * win32-low.c (winapi_DebugBreakProcess,
13404 winapi_GenerateConsoleCtrlEvent): New typedefs.
13405 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13406 to 250 ms.
13407 (win32_wait): Check for remote interrupt request
13408 with check_remote_input_interrupt_request.
13409 (win32_request_interrupt): New function.
13410 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13411
13412 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13413
13414 * win32-low.c (debug_registers_changed,
13415 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13416 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13417 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13418 (thread_rec): Get context using the low target.
13419 (child_add_thread): Call thread_added on the low target,
13420 which does the same thing.
13421 (regptr): Delete.
13422 (do_initial_child_stuff): Remove debug registers references.
13423 Set context using the low target. Resume threads after
13424 setting the contexts.
13425 (child_continue): Remove dead variable. Remove debug
13426 registers references.
13427 (child_fetch_inferior_registers): Go through the low target.
13428 (do_child_store_inferior_registers): Remove.
13429 (child_store_inferior_registers): Go through the low target.
13430 (win32_resume): Remove debug registers references.
13431 Set context using the low target.
13432 (handle_exception): Change return type to void. Don't record
13433 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13434 first chance exception.
13435 (get_child_debug_event): Change return type to void. Remove
13436 goto loop. Always return after waiting for debug event.
13437 (win32_wait): Convert to switch statement. Handle spurious
13438 events.
13439
13440 * win32-i386-low.c (debug_registers_changed,
13441 debug_registers_used): New.
13442 (initial_stuff): Rename to ...
13443 (i386_initial_stuff): ... this. Clear debug registers
13444 state variables.
13445 (store_debug_registers): Delete.
13446 (i386_get_thread_context): New.
13447 (load_debug_registers): Delete.
13448 (i386_set_thread_context): New.
13449 (i386_thread_added): New.
13450 (single_step): Rename to ...
13451 (i386_single_step): ... this.
13452 (do_fetch_inferior_registers): Rename to ...
13453 (i386_fetch_inferior_register): ... this.
13454 (i386_store_inferior_register): New.
13455 (the_low_target): Adapt to new interface.
13456
13457 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
13458 (arm_get_thread_context): New.
13459 (arm_set_thread_context): New.
13460 (regptr): New.
13461 (do_fetch_inferior_registers): Rename to ...
13462 (arm_fetch_inferior_register): ... this.
13463 (arm_store_inferior_register): New.
13464 (arm_wince_breakpoint): Reimplement as unsigned long.
13465 (arm_wince_breakpoint_len): Define.
13466 (the_low_target): Adapt to new interface.
13467
13468 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
13469 load_debug_registers. Add get_thread_context, set_thread_context,
13470 thread_added and store_inferior_register. Rename
13471 fetch_inferior_registers to fetch_inferior_register.
13472 (regptr): Remove declaration.
13473
13474 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13475
13476 * linux-low.c (linux_detach): Change return type to int. Return 0.
13477 * spu-low.c (spu_detach): Likewise.
13478
13479 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13480
13481 * target.h (target_ops): Change return type of detach to int.
13482 Add join.
13483 (join_inferior): New.
13484 * server.c (main): Don't skip detach support on mingw32.
13485 If the inferior doesn't support detaching return error.
13486 Call join_inferior instead of using waitpid.
13487 * linux-low.c (linux_join): New.
13488 (linux_target_op): Add linux_join.
13489 * spu-low.c (spu_join): New.
13490 (spu_target_ops): Add spu_join.
13491 * win32-low.c (win32_detach): Adapt to new interface.
13492 Reopen current_process_handle before detaching. Issue a child
13493 resume before detaching.
13494 (win32_join): New.
13495 (win32_target_op): Add win32_join.
13496
13497 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13498
13499 * win32-low.c (win32-attach): Fix return value.
13500 * target.h (target_ops): Describe ATTACH return values.
13501
13502 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13503
13504 * win32-low.c (GETPROCADDRESS): Define.
13505 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
13506 (winapi_DebugSetProcessKillOnExit): Likewise.
13507 (win32_create_inferior): Force usage of ansi CreateProcessA.
13508 (win32_attach): Use GETPROCADDRESS.
13509 (win32_detach): Likewise.
13510
13511 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13512
13513 * win32-low.c (win32_wait): Don't use WSTOPSIG.
13514
13515 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
13516
13517 * win32-low.c: Commit leftover changes from 2007-03-29.
13518
13519 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13520
13521 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
13522 fields short instead of int. Add explicit padding.
13523 (i387_cache_to_fsave): Remove unnecessary casts.
13524 (i387_fsave_to_cache): Doc fix.
13525 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
13526
13527 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13528
13529 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
13530 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
13531
13532 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13533
13534 * configure.srv (arm*-*-mingw32ce*): Move near the other
13535 arm targets.
13536
13537 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13538
13539 * configure.ac: Add errno checking.
13540 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
13541 sys/file.h and malloc.h.
13542 (AC_CHECK_DECLS): Add perror.
13543 (srv_mingwce): Handle.
13544 * configure.srv (i[34567]86-*-cygwin*): Add
13545 win32-i386-low.o to srv_tgtobj.
13546 (i[34567]86-*-mingw*): Likewise.
13547 (arm*-*-mingw32ce*): Add case.
13548 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13549 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
13550 [__MINGW32CE__] (strerror): New function.
13551 [__MINGW32CE__] (errno): Define to GetLastError.
13552 [__MINGW32CE__] (COUNTOF): New macro.
13553 (remote_open): Remove extra close call.
13554 * mem-break.c (delete_breakpoint_at): New function.
13555 * mem-break.h (delete_breakpoint_at): Declare.
13556 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13557 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
13558 [USE_WIN32API] (read, write): Add char* casts.
13559 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
13560 * server.h: Include wincecompat.h on Windows CE.
13561 [HAVE_ERRNO_H]: Check.
13562 (perror): Declare if not declared.
13563 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
13564 (perror_with_name): Remove errno declaration.
13565 * wincecompat.h: New.
13566 * wincecompat.c: New.
13567 * win32-low.h: New.
13568 * win32-arm-low.c: New.
13569 * win32-i386-low.c: New.
13570 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
13571 (OUTMSG2): Make it safe.
13572 (_T): New macro.
13573 (COUNTOF): New macro.
13574 (NUM_REGS): Get it from the low target.
13575 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
13576 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
13577 (thread_rec): Let low target handle debug registers.
13578 (child_add_thread): Likewise.
13579 (child_init_thread_list): Likewise.
13580 (continue_one_thread): Likewise.
13581 (regptr): New.
13582 (do_child_fetch_inferior_registers): Move to ...
13583 * win32-i386-low.c: ... here, and rename to ...
13584 (do_fetch_inferior_registers): ... this.
13585 * win32-low.c (child_fetch_inferior_registers):
13586 Go through the low target.
13587 (do_child_store_inferior_registers): Use regptr.
13588 (strwinerror): New function.
13589 (win32_create_inferior): Handle Windows CE.
13590 Use strwinerror instead of strerror on Windows error
13591 codes. Add program to the error output.
13592 Don't close the main thread handle on Windows CE.
13593 (win32_attach): Use coredll.dll on Windows CE.
13594 (win32_kill): Close current process and current
13595 thread handles.
13596 (win32_detach): Use coredll.dll on Windows CE.
13597 (win32_resume): Let low target handle debug registers, and
13598 step request.
13599 (handle_exception): Add/Remove initial breakpoint. Avoid
13600 non-existant WSTOPSIG on Windows CE.
13601 (win32_read_inferior_memory): Cast to remove warning.
13602 (win32_arch_string): Go through the low target.
13603 (initialize_low): Call set_breakpoint_data with the low
13604 target's breakpoint.
13605 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
13606 FOP_REGNUM, mappings): Move to ...
13607 * win32-i386-low.c: ... here.
13608 * win32-low.c (win32_thread_info): Move to ...
13609 * win32-low.h: ... here.
13610 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
13611 win32-arm-low.c and wincecompat.c.
13612 (all:): Add $EXEEXT.
13613 (install-only:): Likewise.
13614 (gdbserver:): Likewise.
13615 (gdbreplay:): Likewise.
13616 * config.in: Regenerate.
13617 * configure: Regenerate.
13618
13619 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13620
13621 * win32-low.c: Rename typedef thread_info to
13622 win32_thread_info throughout.
13623
13624 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13625
13626 * win32-i386-low.c: Rename to ...
13627 * win32-low.c: ... this.
13628 * configure.srv: Replace win32-i386-low.o with win32-low.o.
13629 * Makefile.in: Likewise.
13630
13631 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
13632
13633 * remote-utils.c (monitor_output): Constify msg parameter.
13634 * server.h (monitor_output): Likewise.
13635 * win32-i386-low.c (handle_output_debug_string): New.
13636 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
13637 handle_output_debug_string.
13638 (get_child_debug_event): Likewise.
13639
13640 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
13641
13642 * server.c (main): Correct strtoul check.
13643
13644 2007-03-27 Jon Ringle <jon@ringle.org>
13645
13646 * linux-low.c: Check __ARCH_HAS_MMU__ also.
13647
13648 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
13649
13650 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
13651
13652 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
13653
13654 * terminal.h: Check HAVE_SGTTY_H.
13655
13656 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
13657
13658 * remote-utils.c (remote_open): Print out the assigned port number.
13659
13660 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
13661
13662 * remote-utils.c (monitor_output): New function.
13663 * server.c (debug_threads): Define here.
13664 (monitor_show_help): New function.
13665 (handle_query): Handle qRcmd.
13666 (main): Do not handle 'd' packet.
13667 * server.h (debug_threads, remote_debug, monitor_output): Declare.
13668 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
13669 of debug_threads.
13670
13671 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13672
13673 * Makefile.in (EXEEXT): New.
13674 (clean): Use $(EXEEXT).
13675
13676 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13677
13678 * target.h (target_ops): Rename send_signal to request_interrupt,
13679 and remove enum target_signal parameter.
13680 * linux-low.c (linux_request_interrupt): Rename from
13681 linux_send_signal, and always send SIGINT.
13682 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
13683 and always send SIGINT.
13684 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
13685 of send_signal.
13686 (input_interrupt): Likewise.
13687
13688 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13689
13690 * server.c (get_features_xml): Check if target implemented
13691 arch_string.
13692 * win32-i386-low.c (win32_arch_string): New.
13693 (win32_target_ops): Add win32_arch_string as arch_string member.
13694
13695 2007-02-22 Markus Deuling <deuling@de.ibm.com>
13696
13697 * spu-low.c (spu_arch_string): New.
13698 (spu_target_ops): Add spu_arch_string.
13699
13700 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
13701
13702 * remote-utils.c: Remove HAVE_TERMINAL_H check.
13703 * configure.ac: Do not check for terminal.h.
13704 * configure, config.in: Regenerated.
13705
13706 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13707
13708 * Makefile.in (OBS): Add $(XML_BUILTIN).
13709 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
13710 (clean): Update.
13711 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
13712 (arm-with-iwmmxt.c): New.
13713 * config.in, configure: Regenerate.
13714 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
13715 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
13716 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
13717 (arm*-*-linux*): Add iWMMXt and regset support.
13718 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
13719 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
13720 (arm_store_wmmxregset, target_regsets): New.
13721 * server.c (get_features_xml): Take annex argument. Check builtin
13722 XML documents.
13723 (handle_query): Handle multiple annexes.
13724
13725 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13726
13727 * remote-utils.c [USE_WIN32API] (read, write): Define.
13728 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
13729 write.
13730
13731 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
13732
13733 * linux-i386-low.c (the_low_target): Set arch_string.
13734 * linux-x86-64-low.c (the_low_target): Likewise.
13735 * linux-low.c (linux_arch_string): New.
13736 (linux_target_ops): Add it.
13737 * linux-low.h (struct linux_target_ops): Add arch_string.
13738 * server.c (write_qxfer_response): Use const void * for DATA.
13739 (get_features_xml): New.
13740 (handle_query): Handle qXfer:features:read. Report it for qSupported.
13741 * target.h (struct target_ops): Add arch_string method.
13742
13743 2007-01-03 Denis Pilat <denis.pilat@st.com>
13744 Daniel Jacobowitz <dan@codesourcery.com>
13745
13746 * linux-low.c (linux_kill): Handle being called with no threads.
13747 * win32-i386-low.c (win32_kill): Likewise.
13748 (get_child_debug_event): Clear current_process_handle.
13749
13750 2006-12-30 Denis PILAT <denis.pilat@st.com>
13751 Daniel Jacobowitz <dan@codesourcery.com>
13752
13753 * remote-utils.c (remote_open): Check the type of specified
13754 serial port devices before opening them.
13755 * server.c (main): Kill the inferior if an error occurs during
13756 the first remote_open.
13757
13758 2006-12-05 Markus Deuling <deuling@de.ibm.com>
13759
13760 * README: Update supported targets.
13761
13762 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
13763
13764 * Makefile.in (clean): Remove reg-mips64.c.
13765 (reg-mips64.c, reg-mips64.o): New rules.
13766 * configure.srv: Handle mips64. Include regset support for mips.
13767 * linux-mips-low.c (union mips_register): New.
13768 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
13769 (mips_breakpoint, mips_breakpoint_at): Use int.
13770 (mips_collect_register, mips_supply_register)
13771 (mips_collect_register_32bit, mips_supply_register_32bit)
13772 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13773 (mips_store_fpregset, target_regsets): New.
13774 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
13775
13776 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
13777
13778 * configure.srv: Add target "spu*-*-*".
13779 * Makefile.in (clean): Remove reg-spu.c.
13780 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
13781 * spu-low.c: New file.
13782
13783 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13784
13785 * configure.ac: Correct td_thr_tls_get_addr test.
13786 * configure: Regenerated.
13787
13788 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13789
13790 * linux-low.c (linux_wait_for_event): Reformat. Use the
13791 pass_signals array.
13792 * remote-utils.c (decode_address_to_semicolon): New.
13793 * server.c (pass_signals, handle_general_set): New.
13794 (handle_query): Mention QPassSignals for qSupported.
13795 (main): Call handle_general_set.
13796 * server.h (pass_signals, decode_address_to_semicolon): New.
13797
13798 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
13799
13800 * server.c (handle_query): Correct error handling for read_auxv.
13801
13802 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
13803
13804 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
13805 and srv_linux_thread_db to yes.
13806 * linux-s390-low.c (s390_fill_gregset): New function.
13807 (target_regsets): Define data structure.
13808
13809 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
13810
13811 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
13812 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
13813 * config.in, configure: Regenerated.
13814 * inferiors.c (gdb_id_to_thread): New function.
13815 (gdb_id_to_thread_id): Use it.
13816 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
13817 * linux-low.h (struct process_info): Add th member.
13818 (thread_db_get_tls_address): New prototype.
13819 * remote-utils.c (decode_address): Make non-static.
13820 * server.c (handle_query): Handle qGetTLSAddr.
13821 * server.h (gdb_id_to_thread, decode_address): New prototypes.
13822 * target.h (struct target_ops): Add get_tls_address.
13823 * thread-db.c (maybe_attach_thread): Save the thread handle.
13824 (thread_db_get_tls_address): New.
13825
13826 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
13827
13828 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
13829 (linux_resume_one_process): Take a siginfo_t *. Update all
13830 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
13831 (struct pending_signals): Add a siginfo_t.
13832 (linux_wait_for_process): Always set last_status.
13833 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
13834 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
13835 * linux-low.h (struct process_info): Add last_status.
13836
13837 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
13838
13839 * remote-utils.c (try_rle): New function.
13840 (putpkt_binary): Use it.
13841
13842 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
13843
13844 * Makefile.in (clean): Clean reg-x86-64-linux.c.
13845 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
13846 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
13847 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
13848 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
13849 point registers.
13850
13851 2006-08-08 Richard Sandiford <richard@codesourcery.com>
13852
13853 * server.c (terminal_fd): New variable.
13854 (old_foreground_pgrp): Likewise.
13855 (restore_old_foreground_pgrp): New function.
13856 (start_inferior): Record the terminal file descriptor in terminal_fd
13857 and its original foreground group in old_foreground_pgrp. Register
13858 restore_old_foreground_pgrp with atexit().
13859
13860 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
13861
13862 * server.c (handle_query): Correct qPart to qXfer.
13863
13864 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
13865
13866 * configure.ac: Check for more headers which are missing on
13867 Windows. Automatically supply -lwsock32 and USE_WIN32API.
13868 * configure.srv: Add Cygwin and mingw32.
13869 * remote-utils.c: Don't include headers unconditionally which
13870 are missing on mingw32. Include <winsock.h> for mingw32.
13871 (remote_open): Adjust for mingw32 support. Flush
13872 standard error after writing to it.
13873 (remote_close, putpkt_binary, input_interrupt, block_async_io)
13874 (unblock_async_io, enable_async_io, disable_async_io)
13875 (readchar, getpkt): Update for Winsock support.
13876 (prepare_resume_reply): Expect a protocol signal number.
13877 * server.c: Disable <sys/wait.h> on mingw32.
13878 (start_inferior): Adjust for mingw32 support. Flush
13879 standard error after writing to it.
13880 (attach_inferior): Likewise. Use protocol signal
13881 numbers.
13882 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
13883 and names.
13884 * win32-i386-low.c: New file.
13885 * Makefile.in (XM_CLIBS): Set.
13886 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
13887 (win32-i386-low.o): New dependency rule.
13888 * linux-low.c (linux_wait): Use target signal numbers.
13889 * target.h (struct target_ops): Doc fix.
13890 * server.h (target_signal_to_name): New prototype.
13891 * gdbreplay.c: Don't include headers unconditionally which
13892 are missing on mingw32. Include <winsock.h> for mingw32.
13893 (remote_close, remote_open): Adjust for Winsock support.
13894 * configure, config.in: Regenerated.
13895
13896 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13897
13898 * server.c (decode_xfer_read, write_qxfer_response): New.
13899 (handle_query): Take a packet length argument. Handle
13900 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
13901 the qSupported response.
13902 (main): Update call to handle_query.
13903
13904 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
13905
13906 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
13907 (putpkt_binary): Renamed from putpkt and adjusted for binary
13908 data.
13909 (putpkt): New wrapper for putpkt_binary.
13910 (readchar): Don't mask off the high bit.
13911 (decode_X_packet): New function.
13912 * server.c (main): Call putpkt_binary if a handler sets the packet
13913 length. Save the length of the incoming packet. Handle 'X'.
13914 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
13915
13916 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
13917
13918 * server.c (handle_query): Handle qSupported.
13919
13920 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13921
13922 * remote-utils.c (all_symbols_looked_up): New variable.
13923 (look_up_one_symbol): Check it.
13924 * server.h (look_up_one_symbol): New declaration.
13925 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
13926
13927 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13928
13929 * Makefile.in (linux-arm-low.o): Update dependencies.
13930 * linux-arm-low.c: Include "gdb_proc_service.h".
13931 (PTRACE_GET_THREAD_AREA): Define.
13932 (ps_get_thread_area): New function.
13933
13934 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
13935
13936 * configure.srv (m68k*-*-uclinux*): New target.
13937 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
13938 (linux_resume_one_process): Remove extraneous cast.
13939 (linux_read_offsets): New.
13940 (linux_target_op): Add linux_read_offsets on mmuless systems.
13941 * server.c (handle_query): Add qOffsets logic.
13942 * target.h (struct target_ops): Add read_offsets.
13943
13944 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13945
13946 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
13947 (PTRACE_GET_THREAD_AREA): Define.
13948 (ps_get_thread_area): New function.
13949 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
13950 (linux-x86-64-low.o): Update.
13951
13952 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13953
13954 * configure.ac: Remove checks for prfpregset_t.
13955 * gdb_proc_service.h: New file.
13956 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
13957 new "gdb_proc_service.h".
13958 * proc-service.c: Likewise.
13959 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
13960 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
13961 * Makefile.in (gdb_proc_service_h): Updated.
13962 * configure, config.in: Regenerated.
13963
13964 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13965
13966 * remote-utils.c (prepare_resume_reply): Move declaration
13967 of gdb_id_from_wait to the top of the block.
13968
13969 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
13970
13971 * linux-low.c (regsets_store_inferior_registers): Read the regset
13972 from the target before filling it.
13973
13974 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13975
13976 * server.c (attach_inferior): Return SIGTRAP for a successful
13977 attach.
13978
13979 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13980
13981 * Makefile.in (OBS): Add version.o.
13982 (STAGESTUFF): Delete.
13983 (version.o): Add dependencies.
13984 (version.c): Replace rule.
13985 (clean): Remove version.c.
13986 * server.c (gdbserver_version): New.
13987 (gdbserver_usage): Use printf.
13988 (main): Handle --version and --help.
13989 * server.h (version, host_name): Add declarations.
13990
13991 2005-12-23 Eli Zaretskii <eliz@gnu.org>
13992
13993 * linux-arm-low.c:
13994 * linux-arm-low.c:
13995 * inferiors.c:
13996 * i387-fp.h:
13997 * i387-fp.c:
13998 * gdbreplay.c:
13999 * regcache.c:
14000 * proc-service.c:
14001 * mem-break.h:
14002 * mem-break.c:
14003 * linux-x86-64-low.c:
14004 * linux-sh-low.c:
14005 * linux-s390-low.c:
14006 * linux-ppc64-low.c:
14007 * linux-ppc-low.c:
14008 * linux-mips-low.c:
14009 * linux-m68k-low.c:
14010 * linux-m32r-low.c:
14011 * linux-low.h:
14012 * linux-low.c:
14013 * linux-ia64-low.c:
14014 * linux-i386-low.c:
14015 * linux-crisv32-low.c:
14016 * thread-db.c:
14017 * terminal.h:
14018 * target.h:
14019 * target.c:
14020 * server.h:
14021 * server.c:
14022 * remote-utils.c:
14023 * regcache.h:
14024 * utils.c:
14025 * Makefile.in:
14026 * configure.ac:
14027 * gdbserver.1: Add (C) after Copyright. Update the FSF
14028 address.
14029
14030 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14031
14032 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14033 (arm_breakpoint_at): Recognize both breakpoints.
14034 (the_low_target): Use the correct breakpoint instruction.
14035
14036 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14037
14038 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14039 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14040 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14041 (the_low_target): Update.
14042
14043 2005-10-25 Andreas Schwab <schwab@suse.de>
14044
14045 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14046
14047 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14048 (ia64_num_regs): Reduce to 462.
14049
14050 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14051
14052 * acinclude.m4: Correct quoting.
14053 * aclocal.m4: Regenerated.
14054
14055 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14056 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14057 (thread_db_init): Call thread_db_err_str.
14058 * configure.ac: Check for TD_VERSION.
14059 * config.in, configure: Regenerated.
14060
14061 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14062
14063 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14064
14065 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14066
14067 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14068 is not available. Define HAVE_PTRACE_GETREGS if it is.
14069 * config.in, configure: Regenerated.
14070 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14071 * linux-i386-low.c, linux-m68k-low.c: Update to use
14072 HAVE_PTRACE_GETREGS.
14073 * linux-low.c (regsets_fetch_inferior_registers)
14074 (regsets_store_inferior_registers): Only return 0 if we processed
14075 GENERAL_REGS.
14076 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14077 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14078
14079 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14080
14081 * inferiors.c (struct thread_info): Add gdb_id.
14082 (add_thread): Add gdb_id argument.
14083 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14084 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14085 calls to add_thread.
14086 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14087 * server.c (handle_query): Use thread_to_gdb_id.
14088 (handle_v_cont, main): Use gdb_id_to_thread_id.
14089 * server.h (add_thread): Update prototype.
14090 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14091 prototypes.
14092
14093 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14094
14095 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14096 left-padded registers.
14097 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14098 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14099
14100 2005-07-01 Steve Ellcey <sje@cup.hp.com>
14101
14102 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14103 * configure: Regenerate.
14104 * config.in: Regenerate.
14105 * server.h (NEED_DECLARATION_STRERROR):
14106 Replace with !HAVE_DECL_STRERROR.
14107
14108 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14109
14110 * linux-low.c (linux_wait, linux_send_signal): Don't test
14111 an unsigned long variable for > 0 if it could be MAX_ULONG.
14112 * server.c (myresume): Likewise.
14113 * target.c (set_desired_inferior): Likewise.
14114
14115 2005-06-13 Mark Kettenis <kettenis@gnu.org>
14116
14117 * configure.ac: Simplify and improve check for socklen_t.
14118 * configure, config.in: Regenerate.
14119
14120 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14121
14122 * acconfig.h: Remove.
14123 * configure.ac: Add a test for socklen_t. Use three-argument
14124 AC_DEFINE throughout.
14125 * config.in: Regenerated using autoheader 2.59.
14126 * configure: Regenerated.
14127
14128 * gdbreplay.c (socklen_t): Provide a default.
14129 (remote_open): Use socklen_t.
14130 * remote-utils.c (socklen_t): Provide a default.
14131 (remote_open): Use socklen_t.
14132 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14133 unsigned char.
14134
14135 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14136 char for buffers.
14137 * linux-low.c (linux_read_memory, linux_write_memory)
14138 (linux_read_auxv): Likewise.
14139 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14140 (check_mem_write): Likewise.
14141 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14142 Likewise.
14143 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14144 (registers_from_string, register_data): Likewise.
14145 * server.c (handle_query, main): Likewise.
14146 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14147 (decode_M_packet): Likewise.
14148 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14149 * target.h (struct target_ops): Update read_memory, write_memory,
14150 and read_auxv.
14151 (read_inferior_memory, write_inferior_memory): Update.
14152 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14153 to unsigned char *.
14154 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14155 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14156 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14157 linux-s390-low.c, linux-sh-low.c: Update for changes in
14158 read_inferior_memory and the_low_target->breakpoint.
14159
14160 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14161
14162 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14163 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14164 * configure.srv: Add powerpc64-*-linux*.
14165 * linux-ppc64-low.c: New file.
14166
14167 2005-05-23 Orjan Friberg <orjanf@axis.com>
14168
14169 * linux-cris-low.c: New file with support for CRIS.
14170 * linux-crisv32-low.c: Ditto for CRISv32.
14171 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14172 (clean): Add reg-cris.c and reg-crisv32.c.
14173 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
14174 reg-crisv32.o, and reg-crisv32.c to make rules.
14175 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14176 recognized targets.
14177
14178 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14179
14180 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14181 of sizeof (PTRACE_XFER_TYPE).
14182 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14183
14184 2005-05-12 Orjan Friberg <orjanf@axis.com>
14185
14186 * target.h (struct target_ops): Add insert_watchpoint,
14187 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14188 pointers for hardware watchpoint support.
14189 * linux-low.h (struct linux_target_ops): Ditto.
14190 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14191 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14192 to linux_target_ops.
14193 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14194 reply packet.
14195 * server.c (main): Recognize 'Z' and 'z' packets.
14196
14197 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14198
14199 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14200 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14201 (the_low_target): Add new members.
14202
14203 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14204
14205 * proc-service.c (ps_lgetregs): Search all_processes instead of
14206 all_threads.
14207
14208 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14209
14210 * server.c (start_inferior): Change return type to int.
14211 (attach_inferior): Change sigptr to int *.
14212 (handle_v_cont, handle_v_requests): Change signal to int *.
14213 (main): Change signal to int.
14214
14215 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
14216
14217 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14218 * configure.srv: Add m32r*-*-linux*.
14219 * linux-m32r-low.c: New file.
14220
14221 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14222
14223 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14224
14225 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14226
14227 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14228 Take unsigned long arguments for PIDs.
14229 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14230 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14231 (wait_for_sigstop, linux_resume_one_process)
14232 (regsets_fetch_inferior_registers, linux_send_signal)
14233 (linux_read_auxv): Likewise. Update the types of variables holding
14234 PIDs. Update format string specifiers.
14235 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14236 * remote-utils.c (prepare_resume_reply): Likewise.
14237 * server.c (cont_thread, general_thread, step_thread)
14238 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14239 unsigned long.
14240 (handle_query): Update format specifiers.
14241 (handle_v_cont, main): Use strtoul for thread IDs.
14242 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14243 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14244 (general_thread, step_thread, thread_from_wait)
14245 (old_thread_from_wait): Update.
14246 * target.h (struct thread_resume): Use unsigned long for THREAD.
14247 (struct target_ops): Use unsigned long for arguments to attach and
14248 thread_alive.
14249
14250 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14251
14252 * acinclude.m4: Include bfd/bfd.m4 directly.
14253 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14254 <agriffis@toolchain.org>.
14255 * aclocal.m4, configure: Regenerated.
14256
14257 2005-01-07 Andrew Cagney <cagney@gnu.org>
14258
14259 * configure.ac: Rename configure.in, require autoconf 2.59.
14260 * configure: Re-generate.
14261
14262 2004-12-08 Daniel Jacobowitz <dan@debian.org>
14263
14264 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14265 LIBS when finished.
14266 * aclocal.m4: Regenerated.
14267 * configure: Regenerated.
14268
14269 2004-11-21 Andreas Schwab <schwab@suse.de>
14270
14271 * linux-m68k-low.c (m68k_num_gregs): Define.
14272 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14273 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14274 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14275 (m68k_breakpoint_at): New. Add to the_low_target.
14276
14277 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14278 srv_linux_thread_db to yes.
14279
14280 2004-10-20 Joel Brobecker <brobecker@gnat.com>
14281
14282 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14283 (ARCH_SET_FS): Likewise.
14284 (ARCH_GET_FS): Likewise.
14285 (ARCH_GET_GS): Likewise.
14286
14287 2004-10-16 Daniel Jacobowitz <dan@debian.org>
14288
14289 * linux-i386-low.c (ps_get_thread_area): New.
14290 * linux-x86-64-low.c (ps_get_thread_area): New.
14291 * linux-low.c: Include <sys/syscall.h>.
14292 (linux_kill_one_process): Don't kill the first thread here.
14293 (linux_kill): Kill the first thread here.
14294 (kill_lwp): New function.
14295 (send_sigstop, linux_send_signal): Use it.
14296 * proc-service.c: Clean up #ifdefs.
14297 (fpregset_info): Delete.
14298 (ps_lgetregs): Update and enable implementation.
14299 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14300 implementations.
14301 * remote-utils.c (struct sym_cache, symbol_cache): New.
14302 (input_interrupt): Print a clearer message.
14303 (async_io_enabled): New variable.
14304 (enable_async_io, disable_async_io): Use it. Update comments.
14305 (look_up_one_symbol): Use the symbol cache.
14306 * thread-db.c (thread_db_look_up_symbols): New function.
14307 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14308
14309 2004-10-16 Daniel Jacobowitz <dan@debian.org>
14310
14311 * configure.in: Test for -rdynamic.
14312 * configure: Regenerated.
14313 * Makefile (INTERNAL_LDFLAGS): New.
14314 (gdbserver, gdbreplay): Use it.
14315
14316 2004-09-02 Andrew Cagney <cagney@gnu.org>
14317
14318 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14319
14320 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
14321
14322 * linux-low.c (linux_wait): Clear all_processes list also.
14323
14324 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
14325
14326 * linux-low.c: Include <errno.h>. Remove extern declaration of
14327 errno.
14328
14329 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
14330
14331 * gdbreplay.c, server.h, utils.c: Update copyright years.
14332
14333 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14334
14335 * server.c (main): Print child status or termination signal from
14336 variable 'signal', not 'sig'.
14337
14338 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14339
14340 * linux-low.c (linux_read_memory): Change return type to
14341 int. Check for and return error from ptrace().
14342 * target.c (read_inferior_memory): Change return type to int. Pass
14343 back return status from the_target->read_memory().
14344 * target.h (struct target_ops): Adapt *read_memory() prototype.
14345 Update comment.
14346 (read_inferior_memory): Adapt prototype.
14347 * server.c (main): Return an error packet if
14348 read_inferior_memory() returns an error.
14349
14350 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
14351
14352 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14353 Unify with other clean targets.
14354
14355 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14356
14357 * server.c (handle_v_cont): Call set_desired_inferior.
14358
14359 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14360
14361 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14362
14363 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14364
14365 * linux-low.c (linux_wait): Unblock async I/O.
14366 (linux_resume): Block and enable async I/O.
14367 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14368 * server.h (block_async_io, unblock_async_io): Add prototypes.
14369
14370 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14371
14372 * remote-utils.c (remote_open): Print a status notice after
14373 opening a TCP port.
14374 * server.c (attach_inferior): Print a status notice after
14375 attaching.
14376
14377 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14378
14379 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14380
14381 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
14382
14383 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14384 error packet.
14385 * server.c, target.h: Update copyright years.
14386
14387 2004-02-25 Roland McGrath <roland@redhat.com>
14388
14389 * target.h (struct target_ops): New member `read_auxv'.
14390 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14391 * linux-low.c (linux_read_auxv): New function.
14392 (linux_target_ops): Initialize `read_auxv' member to that.
14393
14394 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14395
14396 Committed by Jim Blandy <jimb@redhat.com>.
14397
14398 * linux-s390-low.c (s390_num_regs): Update.
14399 (s390_regmap): Remove control registers. Use __s390x__ predefine
14400 instead of GPR_SIZE to distiguish s390 and s390x targets.
14401
14402 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
14403
14404 * linux-low.c: Update copyright year.
14405 (check_removed_breakpoint): Clear pending_is_breakpoint.
14406 (linux_set_resume_request, linux_queue_one_thread)
14407 (resume_status_pending_p): New functions.
14408 (linux_continue_one_thread): Use process->resume.
14409 (linux_resume): Only resume threads if there are no pending events.
14410 * linux-low.h (struct process_info): Add resume request
14411 pointer.
14412
14413 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
14414
14415 * regcache.c (new_register_cache): Clear the allocated register
14416 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14417
14418 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
14419
14420 * linux-low.c (linux_resume): Take a struct thread_resume *
14421 argument.
14422 (linux_wait): Update call.
14423 (resume_ptr): New static variable.
14424 (linux_continue_one_thread): Renamed from
14425 linux_continue_one_process. Use resume_ptr.
14426 (linux_resume): Use linux_continue_one_thread.
14427 * server.c (handle_v_cont, handle_v_requests): New functions.
14428 (myresume): New function.
14429 (main): Handle 'v' case.
14430 * target.h (struct thread_resume): New type.
14431 (struct target_ops): Change argument of "resume" to struct
14432 thread_resume *.
14433 (myresume): Delete macro.
14434
14435 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14436
14437 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14438 (uninstall): Support DESTDIR.
14439
14440 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14441
14442 * configure.srv: Add xscale*linux copy of arm*linux entry.
14443
14444 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
14445
14446 * linux-arm-low.c (arm_reinsert_addr): New function.
14447 (the_low_target): Add arm_reinsert_addr.
14448
14449 2003-07-08 Mark Kettenis <kettenis@gnu.org>
14450
14451 * mem-break.c: Remove whitespace at end of file.
14452
14453 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
14454
14455 * configure.in: Check whether we need to prototype strerror.
14456 * server.h: Optionally prototype strerror.
14457 * gdbreplay.c (perror_with_name): Use strerror.
14458 * linux-low.c (linux_attach_lwp): Use strerror.
14459 * utils.c (perror_with_name): Use strerror.
14460 * config.in, configure: Regenerated.
14461
14462 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
14463
14464 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
14465 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
14466
14467 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
14468
14469 * Makefile.in (SFILES): Update.
14470 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
14471 low-sun3.c: Remove files.
14472
14473 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
14474
14475 * linux-low.c: Move comment to linux_thread_alive where it belonged.
14476 (linux_detach_one_process, linux_detach): New functions.
14477 (linux_target_ops): Add linux_detach.
14478 * server.c (main): Handle 'D' packet.
14479 * target.h (struct target_ops): Add "detach" member.
14480 (detach_inferior): Define.
14481
14482 2003-06-13 Mark Kettenis <kettenis@gnu.org>
14483
14484 From Kelley Cook <kelleycook@wideopenwest.com>:
14485 * configure.srv: Accept i[34567]86 variants.
14486
14487 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
14488
14489 * linux-low.c (linux_wait_for_event): Correct comment typos.
14490 (linux_resume_one_process): Call check_removed_breakpoint.
14491 (linux_send_signal): New function.
14492 (linux_target_ops): Add linux_send_signal.
14493 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
14494 of kill.
14495 * target.h (struct target_ops): Add send_signal.
14496
14497 2003-05-29 Jim Blandy <jimb@redhat.com>
14498
14499 * linux-low.c (usr_store_inferior_registers): Transfer buf in
14500 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
14501 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
14502 away part of the register's value.
14503
14504 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
14505
14506 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
14507 (linux_wait_for_event, linux_init_signals): Likewise.
14508
14509 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
14510
14511 * configure.in: Check for stdlib.h.
14512 * configure: Regenerated.
14513 * config.in: Regenerated.
14514
14515 2003-01-04 Andreas Schwab <schwab@suse.de>
14516
14517 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
14518
14519 2003-01-02 Andrew Cagney <ac131313@redhat.com>
14520
14521 * Makefile.in: Remove obsolete code.
14522
14523 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
14524
14525 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
14526 defined(PT_FPR0_HI).
14527
14528 2002-11-17 Stuart Hughes <seh@zee2.com>
14529
14530 * linux-arm-low.c (arm_num_regs): Increase.
14531 (arm_regmap): Include status register.
14532
14533 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
14534
14535 * linux-low.c (register_addr): Remove incorrect -1 check.
14536
14537 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
14538
14539 * linux-low.c (linux_create_inferior): Call setpgid. Return
14540 the new PID.
14541 (unstopped_p, linux_signal_pid): Remove.
14542 (linux_target_ops): Remove linux_signal_pid.
14543 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
14544 global instead of target method.
14545 * target.h (struct target_ops): Remove signal_pid. Update comment
14546 for create_inferior.
14547 * server.c (signal_pid): New variable.
14548 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
14549 gdbserver. Set the child to be the foreground process group.
14550 (attach_inferior): Set signal_pid.
14551
14552 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
14553
14554 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
14555
14556 2002-08-20 Jim Blandy <jimb@redhat.com>
14557
14558 * Makefile.in (LDFLAGS): Allow the configure script to establish a
14559 default for this.
14560
14561 2002-08-01 Andrew Cagney <cagney@redhat.com>
14562
14563 * Makefile.in: Make chill references obsolete.
14564
14565 2002-07-24 Kevin Buettner <kevinb@redhat.com>
14566
14567 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
14568 * configure: Regenerate.
14569 * config.in: Regenerate.
14570
14571 2002-07-09 David O'Brien <obrien@FreeBSD.org>
14572
14573 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
14574 (perror_with_name, remote_close, remote_open, expect, play): Static.
14575
14576 2002-07-04 Michal Ludvig <mludvig@suse.cz>
14577
14578 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
14579 byte offsets instead of an array of indexes.
14580 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
14581
14582 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
14583
14584 * regcache.c: Add comment.
14585
14586 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
14587
14588 * thread-db.c: New file.
14589 * proc-service.c: New file.
14590 * acinclude.m4: New file.
14591 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
14592 proc-service.o, and thread-db.o.
14593 (linux-low.o): Add USE_THREAD_DB.
14594 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
14595 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
14596 * aclocal.m4: Regenerated.
14597 * config.in: Regenerated.
14598 * configure: Regenerated.
14599 * configure.in: Check for proc_service.h, sys/procfs.h,
14600 thread_db.h, and linux/elf.h headrs.
14601 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
14602 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
14603 Check for -lthread_db and thread support.
14604 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
14605 PowerPC, and SuperH.
14606 * i387-fp.c: Constify arguments.
14607 * i387-fp.h: Likewise.
14608 * inferiors.c: (struct thread_info): Renamed from
14609 `struct inferior_info'. Remove PID member. Use generic inferior
14610 list header. All uses updated.
14611 (inferiors, signal_pid): Removed.
14612 (all_threads): New variable.
14613 (get_thread): Define.
14614 (add_inferior_to_list): New function.
14615 (for_each_inferior): New function.
14616 (change_inferior_id): New function.
14617 (add_inferior): Removed.
14618 (remove_inferior): New function.
14619 (add_thread): New function.
14620 (free_one_thread): New function.
14621 (remove_thread): New function.
14622 (clear_inferiors): Use for_each_inferior and free_one_thread.
14623 (find_inferior): New function.
14624 (find_inferior_id): New function.
14625 (inferior_target_data): Update argument type.
14626 (set_inferior_target_data): Likewise.
14627 (inferior_regcache_data): Likewise.
14628 (set_inferior_regcache_data): Likewise.
14629 * linux-low.c (linux_bp_reinsert): Remove.
14630 (all_processes, stopping_threads, using_thrads)
14631 (struct pending_signals, debug_threads, pid_of): New.
14632 (inferior_pid): Replace with macro.
14633 (struct inferior_linux_data): Remove.
14634 (get_stop_pc, add_process): New functions.
14635 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
14636 Use add_process and add_thread.
14637 (linux_attach_lwp): New function, based on old linux_attach. Use
14638 add_process and add_thread. Set stop_expected for new threads.
14639 (linux_attach): New function.
14640 (linux_kill_one_process): New function.
14641 (linux_kill): Kill all LWPs.
14642 (linux_thread_alive): Use find_inferior_id.
14643 (check_removed_breakpoints, status_pending_p): New functions.
14644 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
14645 Update. Use WNOHANG. Wait for cloned processes also. Update process
14646 struct for the found process.
14647 (linux_wait_for_event): New function.
14648 (linux_wait): Use it. Support LWPs.
14649 (send_sigstop, wait_for_sigstop, stop_all_processes)
14650 (linux_resume_one_process, linux_continue_one_process): New functions.
14651 (linux_resume): Support LWPs.
14652 (REGISTER_RAW_SIZE): Remove.
14653 (fetch_register): Use register_size instead. Call supply_register.
14654 (usr_store_inferior_registers): Likewise. Call collect_register.
14655 Fix recursive case.
14656 (regsets_fetch_inferior_registers): Improve error message.
14657 (regsets_store_inferior_registers): Add debugging.
14658 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
14659 (unstopped_p, linux_signal_pid): New functions.
14660 (linux_target_ops): Add linux_signal_pid.
14661 (linux_init_signals): New function.
14662 (initialize_low): Call it. Initialize using_threads.
14663 * regcache.c (inferior_regcache_data): Add valid
14664 flag.
14665 (get_regcache): Fetch registers lazily. Add fetch argument
14666 and update all callers.
14667 (regcache_invalidate_one, regcache_invalidate): New
14668 functions.
14669 (new_register_cache): Renamed from create_register_cache.
14670 Return the new regcache.
14671 (free_register_cache): Change argument to a void *.
14672 (registers_to_string, registers_from_string): Call get_regcache
14673 with fetch flag set.
14674 (register_data): Make static. Pass fetch flag to get_regcache.
14675 (supply_register): Call get_regcache with fetch flag clear.
14676 (collect_register): Call get_regcache with fetch flag set.
14677 (collect_register_as_string): New function.
14678 * regcache.h: Update.
14679 * remote-utils.c (putpkt): Flush after debug output and use
14680 stderr.
14681 Handle input interrupts while waiting for an ACK.
14682 (input_interrupt): Use signal_pid method.
14683 (getpkt): Flush after debug output and use stderr.
14684 (outreg): Use collect_register_as_string.
14685 (new_thread_notify, dead_thread_notify): New functions.
14686 (prepare_resume_reply): Check using_threads. Set thread_from_wait
14687 and general_thread.
14688 (look_up_one_symbol): Flush after debug output.
14689 * server.c (step_thread, server_waiting): New variables.
14690 (start_inferior): Don't use signal_pid. Update call to mywait.
14691 (attach_inferior): Update call to mywait.
14692 (handle_query): Handle qfThreadInfo and qsThreadInfo.
14693 (main): Don't fetch/store registers explicitly. Use
14694 set_desired_inferior. Support proposed ``Hs'' packet. Update
14695 calls to mywait.
14696 * server.h: Update.
14697 (struct inferior_list, struct_inferior_list_entry): New.
14698 * target.c (set_desired_inferior): New.
14699 (write_inferior_memory): Constify.
14700 (mywait): New function.
14701 * target.h: Update.
14702 (struct target_ops): New signal_pid method.
14703 (mywait): Removed macro, added prototype.
14704
14705 * linux-low.h (regset_func): Removed.
14706 (regset_fill_func, regset_store_func): New.
14707 (enum regset_type): New.
14708 (struct regset_info): Add type field. Use new operation types.
14709 (struct linux_target_ops): stop_pc renamed to get_pc.
14710 Add decr_pc_after_break and breakpoint_at.
14711 (get_process, get_thread_proess, get_process_thread)
14712 (strut process_info, all_processes, linux_attach_lwp)
14713 (thread_db_init): New.
14714
14715 * linux-arm-low.c (arm_get_pc, arm_set_pc,
14716 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
14717 (the_low_target): Add new members.
14718 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
14719 (i386_store_fpxregset): Constify.
14720 (target_regsets): Add new kind identifier.
14721 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
14722 (i386_set_pc): Add debugging.
14723 (i386_breakpoint_at): New function.
14724 (the_low_target): Add new members.
14725 * linux-mips-low.c (mips_get_pc, mips_set_pc)
14726 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
14727 (mips_breakpoint_at): New.
14728 (the_low_target): Add new members.
14729 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
14730 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
14731 (the_low_target): Add new members.
14732 * linux-sh-low.c (sh_get_pc, sh_set_pc)
14733 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
14734 (the_low_target): Add new members.
14735 * linux-x86-64-low.c (target_regsets): Add new kind
14736 identifier.
14737
14738 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
14739
14740 From Martin Pool <mbp@samba.org>:
14741 * server.c (gdbserver_usage): New function.
14742 (main): Call it.
14743
14744 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
14745
14746 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
14747 stop_at -> stop_pc.
14748
14749 2002-05-04 Andrew Cagney <ac131313@redhat.com>
14750
14751 * Makefile.in: Remove obsolete code.
14752
14753 2002-04-24 Michal Ludvig <mludvig@suse.cz>
14754
14755 * linux-low.c (regsets_fetch_inferior_registers),
14756 (regsets_store_inferior_registers): Removed cast to int from
14757 ptrace() calls.
14758 * regcache.h: Added declaration of struct inferior_info.
14759
14760 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
14761
14762 * inferiors.c (struct inferior_info): Add regcache_data.
14763 (add_inferior): Call create_register_cache.
14764 (clear_inferiors): Call free_register_cache.
14765 (inferior_regcache_data, set_inferior_regcache_data): New functions.
14766 * regcache.c (struct inferior_regcache_data): New.
14767 (registers): Remove.
14768 (get_regcache): New function.
14769 (create_register_cache, free_register_cache): New functions.
14770 (set_register_cache): Don't initialize the register cache here.
14771 (registers_to_string, registers_from_string, register_data): Call
14772 get_regcache.
14773 * regcache.h: Add prototypes.
14774 * server.h: Likewise.
14775
14776 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
14777
14778 * mem-break.c: New file.
14779 * mem-break.h: New file.
14780 * Makefile.in: Add mem-break.o rule; update server.h
14781 dependencies.
14782 * inferiors.c (struct inferior_info): Add target_data
14783 member.
14784 (clear_inferiors): Free target_data member if set.
14785 (inferior_target_data, set_inferior_target_data): New functions.
14786 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
14787 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
14788 * linux-low.c (linux_bp_reinsert): New variable.
14789 (struct inferior_linux_data): New.
14790 (linux_create_inferior): Use set_inferior_target_data.
14791 (linux_attach): Likewise. Call add_inferior.
14792 (linux_wait_for_one_inferior): New function.
14793 (linux_wait): Call it.
14794 (linux_write_memory): Add const.
14795 (initialize_low): Call set_breakpoint_data.
14796 * linux-low.h (struct linux_target_ops): Add breakpoint
14797 handling members.
14798 * server.c (attach_inferior): Remove extra add_inferior
14799 call.
14800 * server.h: Include mem-break.h. Update inferior.c
14801 prototypes.
14802 * target.c (read_inferior_memory)
14803 (write_inferior_memory): New functions.
14804 * target.h (read_inferior_memory)
14805 (write_inferior_memory): Change macros to prototypes.
14806 (struct target_ops): Update comments. Add const to write_memory
14807 definition.
14808
14809 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
14810
14811 * linux-low.c (usr_store_inferior_registers): Support
14812 registers which are allowed to fail to store.
14813 * linux-low.h (linux_target_ops): Likewise.
14814 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
14815 (ppc_cannot_store_register): FPSCR may not be storable.
14816
14817 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14818
14819 * server.h: Include <string.h> if HAVE_STRING_H.
14820 * ChangeLog: Correct paths in last ChangeLog entry.
14821
14822 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14823
14824 * linux-low.h: Remove obsolete prototypes.
14825 (struct linux_target_ops): New.
14826 (extern the_low_target): New.
14827 * linux-low.c (num_regs, regmap): Remove declarations.
14828 (register_addr): Use the_low_target explicitly.
14829 (fetch_register): Likewise.
14830 (usr_fetch_inferior_registers): Likewise.
14831 (usr_store_inferior_registers): Likewise.
14832 * linux-arm-low.c (num_regs): Remove.
14833 (arm_num_regs): Define.
14834 (arm_regmap): Renamed from regmap, made static.
14835 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
14836 made static.
14837 (arm_cannot_store_register): Renamed from cannot_store_register,
14838 made static.
14839 (the_low_target): New.
14840 * linux-i386-low.c (num_regs): Remove.
14841 (i386_num_regs): Define.
14842 (i386_regmap): Renamed from regmap, made static.
14843 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
14844 made static.
14845 (i386_cannot_store_register): Renamed from cannot_store_register,
14846 made static.
14847 (the_low_target): New.
14848 * linux-ia64-low.c (num_regs): Remove.
14849 (ia64_num_regs): Define.
14850 (ia64_regmap): Renamed from regmap, made static.
14851 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
14852 made static.
14853 (ia64_cannot_store_register): Renamed from cannot_store_register,
14854 made static.
14855 (the_low_target): New.
14856 * linux-m68k-low.c (num_regs): Remove.
14857 (m68k_num_regs): Define.
14858 (m68k_regmap): Renamed from regmap, made static.
14859 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
14860 made static.
14861 (m68k_cannot_store_register): Renamed from cannot_store_register,
14862 made static.
14863 (the_low_target): New.
14864 * linux-mips-low.c (num_regs): Remove.
14865 (mips_num_regs): Define.
14866 (mips_regmap): Renamed from regmap, made static.
14867 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
14868 made static.
14869 (mips_cannot_store_register): Renamed from cannot_store_register,
14870 made static.
14871 (the_low_target): New.
14872 * linux-ppc-low.c (num_regs): Remove.
14873 (ppc_num_regs): Define.
14874 (ppc_regmap): Renamed from regmap, made static.
14875 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
14876 made static.
14877 (ppc_cannot_store_register): Renamed from cannot_store_register,
14878 made static.
14879 (the_low_target): New.
14880 * linux-s390-low.c (num_regs): Remove.
14881 (s390_num_regs): Define.
14882 (s390_regmap): Renamed from regmap, made static.
14883 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
14884 made static.
14885 (s390_cannot_store_register): Renamed from cannot_store_register,
14886 made static.
14887 (the_low_target): New.
14888 * linux-sh-low.c (num_regs): Remove.
14889 (sh_num_regs): Define.
14890 (sh_regmap): Renamed from regmap, made static.
14891 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
14892 made static.
14893 (sh_cannot_store_register): Renamed from cannot_store_register,
14894 made static.
14895 (the_low_target): New.
14896 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
14897 (the_low_target): New.
14898
14899 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14900
14901 * Makefile.in: Add stamp-h target.
14902 * configure.in: Create stamp-h.
14903 * configure: Regenerated.
14904
14905 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14906
14907 * inferiors.c: New file.
14908 * target.c: New file.
14909 * target.h: New file.
14910 * Makefile.in: Add target.o and inferiors.o. Update
14911 dependencies.
14912 * linux-low.c (inferior_pid): New static variable,
14913 moved from server.c.
14914 (linux_create_inferior): Renamed from create_inferior.
14915 Call add_inferior. Return 0 on success instead of a PID.
14916 (linux_attach): Renamed from myattach.
14917 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
14918 (linux_thread_alive): Renamed from mythread_alive.
14919 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
14920 child dies.
14921 (linux_resume): Renamed from myresume. Add missing ``return 0''.
14922 (regsets_store_inferior_registers): Correct error message.
14923 Add missing ``return 0''.
14924 (linux_fetch_registers): Renamed from fetch_inferior_registers.
14925 (linux_store_registers): Renamed from store_inferior_registers.
14926 (linux_read_memory): Renamed from read_inferior_memory.
14927 (linux_write_memory): Renamed from write_inferior_memory.
14928 (linux_target_ops): New structure.
14929 (initialize_low): Call set_target_ops ().
14930 * remote-utils.c (unhexify): New function.
14931 (hexify): New function.
14932 (input_interrupt): Send signals to ``signal_pid''.
14933 * server.c (inferior_pid): Remove.
14934 (start_inferior): Update create_inferior call.
14935 (attach_inferior): Call add_inferior.
14936 (handle_query): New function.
14937 (main): Call handle_query for `q' packets.
14938 * server.h: Include "target.h". Remove obsolete prototypes.
14939 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
14940
14941 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14942
14943 * Makefile.in: Add WARN_CFLAGS. Update configury
14944 dependencies.
14945 * configure.in: Check for <string.h>
14946 * configure: Regenerate.
14947 * config.in: Regenerate.
14948 * gdbreplay.c: Include needed system headers.
14949 (remote_open): Remove strchr prototype.
14950 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
14951 * regcache.c (supply_register): Change buf argument to const void *.
14952 (supply_register_by_name): Likewise.
14953 (collect_register): Change buf argument to void *.
14954 (collect_register_by_name): Likewise.
14955 * regcache.h: Add missing prototypes.
14956 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
14957 * server.c (handle_query): New function.
14958 (attached): New static variable, moved out of main.
14959 (main): Quiet longjmp clobber warnings.
14960 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
14961 * utils.c (error): Remove NORETURN.
14962 (fatal): Likewise.
This page took 0.333754 seconds and 5 git commands to generate.