gdb, gdbserver: make status_to_str return std::string
[deliverable/binutils-gdb.git] / gdbserver / ChangeLog
1 2021-05-08 Simon Marchi <simon.marchi@polymtl.ca>
2
3 * linux-low.cc (linux_process_target::wait_for_event_filtered):
4 Adjust to status_to_str returning std::string.
5
6 2021-05-08 Pedro Alves <pedro@palves.net>
7
8 * linux-low.cc:
9 (linux_process_target::supports_disable_randomization): Remove
10 reference to HAVE_PERSONALITY.
11 * config.in, configure: Regenerate.
12
13 2021-05-08 Pedro Alves <pedro@palves.net>
14
15 * linux-low.cc: Don't include sys/personality.h or define
16 ADDR_NO_RANDOMIZE.
17
18 2021-05-06 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
19
20 * server.cc (handle_v_attach)
21 (handle_v_run)
22 (handle_v_kill): Make void.
23
24 2021-05-03 Tom Tromey <tromey@adacore.com>
25
26 PR build/27807:
27 * win32-i386-low.cc (i386_get_thread_context): Call
28 Wow64GetThreadContext, not win32_Wow64GetThreadContext.
29
30 2021-04-30 Tom Tromey <tromey@adacore.com>
31
32 * win32-low.cc (do_initial_child_stuff): Update.
33 (windows_nat::handle_load_dll): Rename from win32_add_one_solib.
34 Change parameter type.
35 (win32_add_dll, win32_add_all_dlls)
36 (windows_nat::handle_load_dll): Remove.
37 (get_child_debug_event): Call dll_loaded_event.
38
39 2021-04-30 Tom Tromey <tromey@adacore.com>
40
41 * win32-low.cc (GETPROCADDRESS): Remove.
42 (winapi_DebugActiveProcessStop, winapi_DebugSetProcessKillOnExit)
43 (winapi_DebugBreakProcess, winapi_GenerateConsoleCtrlEvent)
44 (winapi_Wow64SetThreadContext, win32_Wow64GetThreadContext)
45 (win32_Wow64SetThreadContext): Remove.
46 (win32_set_thread_context, do_initial_child_stuff)
47 (win32_process_target::attach, win32_process_target::detach):
48 Update.
49 (winapi_EnumProcessModules, winapi_EnumProcessModulesEx)
50 (winapi_GetModuleInformation, winapi_GetModuleInformationA):
51 Remove.
52 (win32_EnumProcessModules, win32_EnumProcessModulesEx)
53 (win32_GetModuleInformation, win32_GetModuleInformationA):
54 Remove.
55 (load_psapi): Remove.
56 (win32_add_dll, win32_process_target::request_interrupt): Update.
57 (initialize_low): Call initialize_loadable.
58
59 2021-04-14 Tom Tromey <tromey@adacore.com>
60
61 * win32-low.cc (windows_nat::handle_load_dll): Don't check
62 _WIN32_WCE.
63
64 2021-04-13 Pedro Alves <pedro@palves.net>
65
66 * gdbreplay.c [__MINGW32CE__] (COUNTOF, errno, strerror): Remove.
67
68 2021-04-13 Tom Tromey <tromey@adacore.com>
69
70 * win32-low.cc (winapi_CreateToolhelp32Snapshot)
71 (winapi_Module32First, winapi_Module32Next): Remove typedefs.
72
73 2021-04-13 Pedro Alves <pedro@palves.net>
74
75 * Makefile.in (SFILES): Remove hostio-errno.cc.
76 * configure: Regenerate.
77 * configure.ac (GDBSERVER_DEPFILES): No longer add
78 $srv_hostio_err_objs.
79 * configure.srv (srv_hostio_err_objs): Delete.
80 * hostio-errno.cc: Delete.
81 * hostio.cc (hostio_error): Inline hostio_last_error_from_errno
82 here.
83 * hostio.h (hostio_last_error_from_errno): Delete.
84 * target.cc (process_stratum_target::hostio_last_error): Delete.
85 * target.h (class process_stratum_target) <hostio_last_error>:
86 Delete.
87
88 2021-04-12 Simon Marchi <simon.marchi@polymtl.ca>
89
90 * win32-low.cc: Remove all code guarded by _WIN32_WCE.
91 * win32-low.h: Likewise.
92
93 2021-04-12 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
94
95 * target.h (class process_stratum_target) <pid_to_exec_file>:
96 Constify the return type. Update the definition/references below.
97 * target.cc (process_stratum_target::pid_to_exec_file)
98 * linux-low.h (class linux_process_target) <pid_to_exec_file>
99 * linux-low.cc (linux_process_target::pid_to_exec_file)
100 * netbsd-low.h (class netbsd_process_target) <pid_to_exec_file>
101 * netbsd-low.cc (netbsd_process_target::pid_to_exec_file)
102 * server.cc (handle_qxfer_exec_file)
103
104 2021-04-11 Eli Zaretskii <eliz@gnu.org>
105
106 * win32-low.cc (win32_add_dll): New function, with body almost
107 identical to what win32_add_all_dlls did. Accepts one argument;
108 if that is non-NULL, returns the file name of the DLL that is
109 loaded at the base address equal to that argument, or NULL if not
110 found. If the argument is NULL, add all the DLLs loaded by the
111 inferior to the list of solibs and return NULL.
112 (win32_add_all_dlls): Now a thin wrapper around win32_add_dll.
113 (windows_nat::handle_load_dll) [!_WIN32_WCE]: If get_image_name
114 failed to glean the file name of the DLL, call win32_add_dll to
115 try harder using the lpBaseOfDll member of the load-DLL event.
116
117 2021-03-30 Luis Machado <luis.machado@linaro.org>
118
119 * server.cc (handle_general_set, handle_query): Update variable
120 to bool and fix verification logic.
121
122 2021-03-24 Luis Machado <luis.machado@linaro.org>
123
124 * Makefile.in (SFILES): Add /../gdb/nat/aarch64-mte-linux-ptrace.c.
125 * configure.srv (aarch64*-*-linux*): Add arch/aarch64-mte-linux.o and
126 nat/aarch64-mte-linux-ptrace.o.
127 * linux-aarch64-low.cc: Include nat/aarch64-mte-linux-ptrace.h.
128 (class aarch64_target) <supports_memory_tagging>
129 <fetch_memtags, store_memtags>: New method overrides.
130 (aarch64_target::supports_memory_tagging)
131 (aarch64_target::fetch_memtags)
132 (aarch64_target::store_memtags): New methods.
133
134 2021-03-24 Luis Machado <luis.machado@linaro.org>
135
136 * linux-aarch64-low.cc (aarch64_fill_mteregset): New function.
137 (aarch64_store_mteregset): New function.
138 (aarch64_regsets): Add MTE register set entry.
139 (aarch64_sve_regsets): Add MTE register set entry.
140
141 2021-03-24 Luis Machado <luis.machado@linaro.org>
142
143 * linux-aarch64-ipa.cc (get_ipa_tdesc): Update call to
144 aarch64_linux_read_description.
145 (initialize_low_tracepoint): Likewise.
146 * linux-aarch64-low.cc (aarch64_target::low_arch_setup): Take MTE flag
147 into account.
148 * linux-aarch64-tdesc.cc (tdesc_aarch64_list): Add one more dimension
149 for MTE.
150 (aarch64_linux_read_description): Add mte_p parameter and update to
151 use it.
152 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add mte_p
153 parameter.
154
155 2021-03-24 Luis Machado <luis.machado@linaro.org>
156
157 * linux-aarch64-low.cc: Include arch/aarch64-mte-linux.h.
158
159 2021-03-24 Luis Machado <luis.machado@linaro.org>
160
161 * server.cc (test_memory_tagging_functions): New function.
162 (captured_main): Register test_memory_tagging_functions.
163
164 2021-03-24 Luis Machado <luis.machado@linaro.org>
165
166 * remote-utils.cc (decode_m_packet_params): Renamed from ...
167 (decode_m_packet): ... this, which now calls decode_m_packet_params.
168 Make char * param/return const char *.
169 (decode_M_packet): Use decode_m_packet_params and make char * param
170 const char *.
171 * remote-utils.h (decode_m_packet_params): New prototype.
172 (decode_m_packet): Constify char pointers.
173 (decode_M_packet): Likewise.
174 * server.cc (create_fetch_memtags_reply)
175 (parse_store_memtags_request): New
176 functions.
177 (handle_general_set): Handle the QMemTags packet.
178 (parse_fetch_memtags_request): New function.
179 (handle_query): Handle the qMemTags packet and advertise memory
180 tagging support.
181 (captured_main): Initialize memory tagging flag.
182 * server.h (struct client_state): Initialize memory tagging flag.
183 * target.cc (process_stratum_target::supports_memory_tagging)
184 (process_stratum_target::fetch_memtags)
185 (process_stratum_target::store_memtags): New methods.
186 * target.h: Include gdbsupport/byte-vector.h.
187 (class process_stratum_target) <supports_memory_tagging>
188 <fetch_memtags, store_memtags>: New class virtual methods.
189 (target_supports_memory_tagging): Define.
190
191 2021-03-22 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
192
193 * inferiors.h (struct process_info) <all_dlls, dlls_changed>: New
194 fields.
195 * dll.h (loaded_dll)
196 (unloaded_dll): Declare an overloaded version that takes a proc
197 parameter.
198 * dll.cc (loaded_dll)
199 (unloaded_dll): Implement the overloaded versions.
200 (clear_dlls): Clear all process' dll lists.
201 (all_dlls, dlls_changed): Remove the global variables.
202 * remote-utils.cc (prepare_resume_reply): Update to consider a dll
203 list per proc.
204 * server.cc (handle_qxfer_libraries): Ditto.
205 (handle_v_attach): Ditto.
206 (captured_main): Ditto.
207
208 2021-02-23 Simon Marchi <simon.marchi@polymtl.ca>
209
210 * linux-low.cc (linux_process_target::filter_event): Return
211 void.
212 * linux-low.h (class linux_process_target) <filter_event>:
213 Return void.
214
215 2021-02-12 Tom Tromey <tromey@adacore.com>
216
217 * gdbreplay.cc (remote_desc): Remove.
218 (remote_desc_in, remote_desc_out): New globals.
219 (remote_close): Update.
220 (remote_open): Handle "-".
221 (remote_open): Update.
222 (logchar): Log to stderr.
223 (expect, play): Update.
224
225 2021-02-12 Tom Tromey <tromey@adacore.com>
226
227 * gdbreplay.cc (remote_open): Constify.
228
229 2021-02-05 Paul E. Murphy <murphyp@linux.ibm.com>
230
231 * Makefile.in (UNDO_GNULIB_CFLAGS): Disable
232 gnulib free replacement too.
233 * common-defs.h [USE_WIN32API](read, write): Undefine
234 gnulib versions before defining these macros.
235
236 2021-02-03 Pedro Alves <pedro@palves.net>
237
238 * linux-low.cc (linux_process_target::complete_ongoing_step_over):
239 Discard step SIGTRAP, unless GDB wanted the thread to step.
240
241 2021-02-03 Pedro Alves <pedro@palves.net>
242
243 * server.cc (discard_queued_stop_replies): Don't ever discard the
244 notification at the head of the list.
245
246 2021-01-20 Simon Marchi <simon.marchi@polymtl.ca>
247
248 * ax.cc (bytecode_address_table): Make static.
249 * debug.cc (debug_file): Make static.
250 * linux-low.cc (stopping_threads): Make static.
251 (step_over_bkpt): Make static.
252 * linux-x86-low.cc (amd64_emit_ops, i386_emit_ops): Make static.
253 * tracepoint.cc (stop_tracing_bkpt, flush_trace_buffer_bkpt,
254 alloced_trace_state_variables, trace_buffer_ctrl,
255 tracing_start_time, tracing_stop_time, tracing_user_name,
256 tracing_notes, tracing_stop_note): Make static.
257
258 2021-01-20 Tom de Vries <tdevries@suse.de>
259
260 * linux-x86-low.cc (collect_register_i386): New function.
261 (x86_fill_gregset): Remove memset. Use collect_register_i386.
262
263 2021-01-07 Tom de Vries <tdevries@suse.de>
264
265 * Makefile.in (LIBIBERTY_NORMAL, LIBIBERTY_NOASAN, LIBIBERTY_PIC):
266 (LIBIBERTY_FOR_SHLIB): New var.
267 (LIBIBERTY): Set using $(LIBIBERTY_NORMAL).
268 (IPA_LIB): Use LIBIBERTY_FOR_SHLIB instead of LIBIBERTY in target rule.
269
270 2021-01-04 Simon Marchi <simon.marchi@efficios.com>
271
272 * debug.cc (debug_print_depth): New.
273
274 2021-01-01 Joel Brobecker <brobecker@adacore.com>
275
276 * server.cc (gdbserver_version): Update copyright year.
277 * gdbreplay.cc (gdbreplay_version): Likewise.
278
279 2020-12-16 Luis Machado <luis.machado@linaro.org>
280
281 * linux-aarch64-low.cc (address_significant): New function.
282 (aarch64_target::low_stopped_data_address): Handle the TBI.
283
284 2020-12-11 Andrew Burgess <andrew.burgess@embecosm.com>
285
286 * Makefile.in (IPA_LIB): Include libiberty library.
287
288 2020-11-11 Andrew Burgess <andrew.burgess@embecosm.com>
289
290 * server.cc (gdbserver_usage): Add missing option to usage text.
291 (gdbserver_show_disableable): Likewise.
292
293 2020-11-02 Simon Marchi <simon.marchi@efficios.com>
294
295 * ax.cc: Fix indentation.
296 * dll.cc: Fix indentation.
297 * inferiors.h: Fix indentation.
298 * linux-low.cc: Fix indentation.
299 * linux-nios2-low.cc: Fix indentation.
300 * linux-ppc-ipa.cc: Fix indentation.
301 * linux-ppc-low.cc: Fix indentation.
302 * linux-x86-low.cc: Fix indentation.
303 * linux-xtensa-low.cc: Fix indentation.
304 * regcache.cc: Fix indentation.
305 * server.cc: Fix indentation.
306 * tracepoint.cc: Fix indentation.
307
308 2020-10-31 Simon Marchi <simon.marchi@polymtl.ca>
309
310 * acinclude.m4: Replace AC_TRY_COMPILE with AC_COMPILE_IFELSE +
311 AC_LANG_PROGRAM.
312 * configure: Re-generate.
313
314 2020-10-31 Simon Marchi <simon.marchi@polymtl.ca>
315
316 * configure: Re-generate.
317
318 2020-10-31 Simon Marchi <simon.marchi@polymtl.ca>
319
320 * configure: Re-generate.
321
322 2020-10-31 Simon Marchi <simon.marchi@polymtl.ca>
323
324 * configure: Re-generate.
325
326 2020-10-31 Simon Marchi <simon.marchi@polymtl.ca>
327
328 * configure: Re-generate.
329
330 2020-10-31 Simon Marchi <simon.marchi@polymtl.ca>
331
332 * configure.ac: Modernize.
333 * configure: Re-generate.
334
335 2020-10-31 Simon Marchi <simon.marchi@polymtl.ca>
336
337 * configure.ac: Use AC_CANONICAL_{BUILD,HOST,TARGET} instead of
338 AC_CANONICAL_SYSTEM.
339 * configure: Re-generate.
340
341 2020-10-26 Pedro Alves <pedro@palves.net>
342
343 * netbsd-low.cc (netbsd_waitpid, netbsd_process_target::kill)
344 (netbsd_qxfer_libraries_svr4): Use gdb::handle_eintr without
345 explicit type.
346
347 2020-10-25 Simon Marchi <simon.marchi@polymtl.ca>
348
349 * acinclude.m4: Update ptrace.m4 path.
350
351 2020-10-24 Simon Marchi <simon.marchi@polymtl.ca>
352
353 * config.in: Re-generate.
354 * configure: Re-generate.
355
356 2020-10-21 Simon Marchi <simon.marchi@polymtl.ca>
357
358 * server.cc (handle_general_set): Don't use sprintf with
359 argument overlapping buffer.
360
361 2020-10-20 Tom Tromey <tromey@adacore.com>
362
363 PR gdb/26742:
364 * inferiors.cc (remove_thread): Clear current_thread before
365 freeing the thread.
366
367 2020-10-13 Kamil Rytarowski <n54@gmx.com>x
368
369 * netbsd-low.cc (netbsd_tdesc): Remove.
370 (netbsd_add_process): Likewise.
371 (netbsd_process_target::create_inferior): Update.
372
373 2020-10-09 Andrew Burgess <andrew.burgess@embecosm.com>
374
375 * linux-arc-low.cc (arc_linux_read_description): Release the
376 unique_ptr returned from arc_create_target_description.
377
378 2020-10-09 Andrew Burgess <andrew.burgess@embecosm.com>
379
380 * Makefile.in: Include Makefile.gnulib.inc. Don't define LIBGNU
381 or INCGNU. Make use of LIBGNU_EXTRA_LIBS when linking.
382
383 2020-10-08 Andrew Burgess <andrew.burgess@embecosm.com>
384
385 * linux-low.cc (linux_process_target::handle_extended_wait):
386 Release the unique_ptr returned from allocate_target_description.
387 * linux-riscv-low.cc (riscv_target::low_arch_setup): Likewise.
388 * linux-x86-low.cc (tdesc_amd64_linux_no_xml): Change type.
389 (tdesc_i386_linux_no_xml): Change type.
390 (x86_linux_read_description): Borrow pointer from unique_ptr
391 object.
392 (x86_target::get_ipa_tdesc_idx): Likewise.
393 (initialize_low_arch): Likewise.
394 * tdesc.cc (allocate_target_description): Update return type.
395
396 2020-10-07 Tom Tromey <tromey@adacore.com>
397
398 * server.cc (handle_search_memory): Remove dead code.
399
400 2020-10-07 Tom Tromey <tromey@adacore.com>
401
402 * server.cc (handle_search_memory_1): Remove.
403 (handle_search_memory): Use simple_search_memory.
404
405 2020-10-07 Simon Marchi <simon.marchi@efficios.com>
406
407 * Makefile.in (COMPILE): Add CXXFLAGS.
408 (INTERNAL_CFLAGS_BASE): Remove CXXFLAGS.
409 (gdbserver$(EXEEXT)): Add CXXFLAGS.
410 (gdbreplay$(EXEEXT)): Add CXXFLAGS.
411 ($(IPA_LIB)): Add CXXFLAGS.
412 (IPAGENT_COMPILE): Add CXXFLAGS.
413
414 2020-10-07 Anton Kolesov <anton.kolesov@synopsys.com>
415
416 * configure.srv: Support ARC architecture.
417 * Makefile.in: Add linux-arc-low.cc and arch/arc.o.
418 * linux-arc-low.cc: New file.
419
420 2020-10-07 Kamil Rytarowski <n54@gmx.com>
421
422 * netbsd-low.cc (get_dynamic, get_r_debug, read_one_ptr)
423 (netbsd_qxfer_libraries_svr4): Remove "target" argument and update.
424 (netbsd_process_target::qxfer_libraries_svr4): Update.
425
426 2020-10-07 Kamil Rytarowski <n54@gmx.com>
427
428 * netbsd-low.cc: Fix whitespace formatting.
429 * netbsd-amd64-low.cc: Likewise.
430
431 2020-10-07 Kamil Rytarowski <n54@gmx.com>
432
433 * netbsd-low.cc (netbsd_process_target::read_memory)
434 (netbsd_process_target::write_memory): Update.
435
436 2020-10-07 Kamil Rytarowski <n54@gmx.com>
437
438 * netbsd-aarch64-low.cc: Add.
439 * Makefile.in (SFILES): Register "netbsd-aarch64-low.c".
440 * configure.srv: Add aarch64*-*-netbsd*.
441
442 2020-10-06 Shahab Vahedi <shahab@synopsys.com>
443
444 * regcache.cc (register_data): Remove unused "fetch" argument.
445
446 2020-10-02 Simon Marchi <simon.marchi@polymtl.ca>
447
448 * server.cc (handle_monitor_command): Handle "set
449 debug-event-loop".
450 (captured_main): Handle "--debug-event-loop".
451 (monitor_show_help): Mention new setting.
452 (gdbserver_usage): Mention new flag.
453
454 2020-10-02 Simon Marchi <simon.marchi@polymtl.ca>
455
456 * linux-low.cc (linux_process_target::async): Pass name to
457 add_file_handler.
458 * remote-utils.cc (handle_accept_event): Likewise.
459 (remote_open): Likewise.
460
461 2020-10-01 Kamil Rytarowski <n54@gmx.com>
462
463 * netbsd-i386-low.cc: Add.
464 * Makefile.in (SFILES): Register "netbsd-i386-low.c".
465 * configure.srv: Add i[34567]86-*-netbsd*.
466
467 2020-10-01 Kamil Rytarowski <n54@gmx.com>
468
469 * netbsd-amd64-low.cc (netbsd_x86_64_arch_setup): Remove.
470 (netbsd_target_regsets): Now const.
471 (the_low_target): Remove.
472 (class netbsd_amd64_target, the_netbsd_amd64_target)
473 (the_netbsd_target): Add.
474 * netbsd-low.cc (netbsd_process_target::post_create_inferior): Call
475 low_arch_setup ().
476 (netbsd_process_target::fetch_registers)
477 (netbsd_process_target::store_registers, initialize_low): Update.
478 (the_netbsd_target): Remove.
479 * netbsd-low.h (netbsd_target_regsets, netbsd_target_ops)
480 (the_low_target, netbsd_tdesc): Remove.
481 (netbsd_process_target::get_regs_info)
482 (netbsd_process_target::low_arch_setup): Add.
483
484 2020-09-23 Hannes Domani <ssbssa@yahoo.de>
485
486 * win32-low.cc: Remove local wow64_process variable.
487 * win32-low.h: Remove local wow64_process variable.
488
489 2020-09-18 Tom Tromey <tromey@adacore.com>
490
491 * netbsd-low.h (class netbsd_process_target) <wait>: Update.
492 * netbsd-low.cc (netbsd_waitpid, netbsd_wait)
493 (netbsd_process_target::wait): Change type of target_options.
494 * win32-low.h (class win32_process_target) <wait>: Update.
495 * win32-low.cc (win32_process_target::wait): Update.
496 * target.h (class process_stratum_target) <wait>: Update.
497 (mywait): Update.
498 * target.cc (mywait, target_wait): Change type of "options".
499 * linux-low.h (class linux_process_target) <wait, wait_1>:
500 Update.
501 * linux-low.cc (linux_process_target::wait)
502 (linux_process_target::wait_1): Update.
503
504 2020-09-15 Tom Tromey <tromey@adacore.com>
505
506 * linux-x86-low.cc (xmltarget_i386_linux_no_xml)
507 (xmltarget_amd64_linux_no_xml): Now arrays.
508
509 2020-09-14 Tom Tromey <tromey@adacore.com>
510
511 * tracepoint.cc (eval_result_names): Now const.
512 * ax.cc (gdb_agent_op_names): Now const.
513
514 2020-09-10 Kamil Rytarowski <n54@gmx.com>
515
516 * netbsd-low.cc: Add.
517 * netbsd-low.h: Likewise.
518 * netbsd-amd64-low.cc: Likewise.
519 * Makefile.in (SFILES): Register "netbsd-low.cc", "netbsd-low.h",
520 "netbsd-amd64-low.cc".
521 * configure.srv: Add x86_64-*-netbsd*.
522
523 2020-08-13 Simon Marchi <simon.marchi@polymtl.ca>
524
525 * server.cc (captured_main): Accept multiple `--selftest=`
526 options. Pass all `--selftest=` arguments to run_tests.
527
528 2020-07-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
529
530 * configure, config.in: Regenerate.
531
532 2020-07-26 Eli Zaretskii <eliz@gnu.org>
533
534 * configure.ac (AC_CHECK_HEADERS): Add ws2tcpip.h.
535 When checking whether socklen_t type is defined, use ws2tcpip.h if
536 it is available and sys/socket.h isn't.
537 * configure: Regenerate.
538 * config.in: Regenerate.
539
540 2020-07-22 Pedro Alves <pedro@palves.net>
541
542 * inferiors.cc (switch_to_process): New, moved here from
543 thread-db.cc, and made extern.
544 * inferiors.h (switch_to_process): Declare.
545 * server.cc: Include "gdbsupport/scoped_restore.h".
546 (handle_qxfer_threads_proper): Now returns bool. Prepare to
547 access memory around target calls.
548 (handle_qxfer_threads): Handle errors.
549 * thread-db.cc (switch_to_process): Moved to inferiors.cc.
550
551 2020-07-21 Simon Marchi <simon.marchi@efficios.com>
552
553 * linux-low.cc (stopped_pids): Make static.
554
555 2020-07-17 Andrew Burgess <andrew.burgess@embecosm.com>
556
557 * tdesc.cc (allocate_target_description): Add header comment.
558 (target_desc_deleter::operator()): New function.
559 * tdesc.h (struct target_desc): Declare as final.
560
561 2020-07-13 Simon Marchi <simon.marchi@polymtl.ca>
562
563 * server.cc (handle_query): Use std::vector of
564 std::string for `qsupported` vector. Use separate
565 vector for unknowns.
566 * target.h (class process_stratum_target) <process_qsupported>:
567 Change parameters to array_view of const char *.
568 (target_process_qsupported): Remove `count` parameter.
569 * target.cc (process_stratum_target::process_qsupported): Change
570 parameters to array_view of const char *.
571 * linux-x86-low.cc (class x86_target) <process_qsupported>:
572 Likewise.
573
574 2020-06-29 Tom de Vries <tdevries@suse.de>
575
576 * ax.h: Include gdbsupport/debug_agent.h.
577
578 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
579
580 * tdesc.cc (struct tdesc_compatible_info): New struct.
581 (tdesc_compatible_info_list): New function.
582 (tdesc_compatible_info_arch_name): New function.
583
584 2020-06-22 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
585
586 Use std::list to stop pending signal instead of manually-created
587 linked list.
588 * linux-low.h: Include <list>.
589 (struct pending_signal): Move here from linux-low.cc.
590 (struct lwp_info) <pending_signals>
591 <pending_signals_to_report>: Update the type.
592 * linux-low.cc (struct pending_signals): Remove.
593 (linux_process_target::delete_lwp)
594 (linux_process_target::add_lwp)
595 (enqueue_one_deferred_signal)
596 (dequeue_one_deferred_signal)
597 (enqueue_pending_signal)
598 (linux_process_target::resume_one_lwp_throw)
599 (linux_process_target::thread_needs_step_over)
600 (linux_process_target::resume_one_thread)
601 (linux_process_target::proceed_one_lwp): Update the use of pending
602 signal list.
603
604 2020-06-17 Simon Marchi <simon.marchi@efficios.com>
605
606 * Makefile.in (%-generated.cc: ../gdb/regformats/arm/%.dat):
607 Remove.
608
609 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
610
611 * Makefile.in (SFILES): Remove win32-arm-low.cc, wincecompat.cc.
612 * configure.srv: Remove mingw32ce cases.
613 * server.h, win32-low.cc: Remove __MINGW32CE__-guarded code.
614 * win32-low.h (to_back_slashes): Remove.
615 * win32-arm-low.cc, wincecompat.cc, wincecompat.h: Remove.
616
617 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
618
619 * Makefile.in (SFILES): linux-tile-low.cc.
620 * configure.srv: Remove tilegx case.
621 * linux-tile-low.cc: Remove.
622
623 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
624
625 * Makefile.in (SFILES): Remove linux-m32r-low.cc.
626 * configure.srv: Remove m32r case.
627 * linux-m32r-low.cc: Remove.
628
629 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
630
631 * Makefile.in (SFILES): Remove linux-cris-low.c.
632 * configure.srv: Remove cris cases.
633 * linux-cris-low.cc, linux-crisv32-low.cc: Remove.
634
635 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
636
637 * Makefile.in (SFILES): Remove linux-bfin-low.c.
638 * configure.srv: Remove bfin case.
639 * linux-bfin-low.cc: Remove.
640 * linux-low.cc: Remove BFIN-conditional code.
641
642 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
643
644 * configure: Re-generate.
645 * configure.ac: Remove srv_qnx test.
646 * configure.srv: Remove nto case.
647 * nto-low.cc, nto-low.h, nto-x86-low.cc: Remove.
648 * remote-utils.c: Remove __QNX__-guarded code.
649
650 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
651
652 * configure: Re-generate.
653 * configure.ac: Remove srv_lynxos test.
654 * configure.srv: Remove lynxos cases.
655 * lynx-i386-low.cc, lynx-low.cc, lynx-low.h, lynx-ppc-low.c:
656 Remove.
657
658 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
659
660 * README: Fix a few outdated or incoherent things.
661
662 2020-05-27 Hannes Domani <ssbssa@yahoo.de>
663
664 * win32-low.cc (do_initial_child_stuff): Set open_process_used.
665 (win32_clear_inferiors): Use open_process_used.
666 (get_child_debug_event): Likewise.
667
668 2020-05-25 Michael Weghorn <m.weghorn@posteo.de>
669
670 PR gdbserver/25893
671 * linux-low.cc (linux_process_target::create_inferior),
672 lynx-low.cc (lynx_process_target::create_inferior),
673 win32-low.cc (win32_process_target::create_inferior): Use
674 construct_inferior_arguments instead of stringify_argv
675 to get string representation which properly escapes
676 special characters.
677 * server.cc (handle_v_run): Just pass empty program arg
678 as such, since any further processing is now handled via
679 construct_inferior_arguments.
680
681 2020-05-25 Michael Weghorn <m.weghorn@posteo.de>
682
683 * nto-low.cc (nto_process_target::create_inferior): Pass
684 argv to spawnp function as char **.
685
686 2020-05-25 Michael Weghorn <m.weghorn@posteo.de>
687
688 * server.cc (captured_main), (handle_v_run): No longer
689 insert extra NULL element to args vector.
690
691 2020-05-23 Pedro Alves <palves@redhat.com>
692
693 * gdb-safe-ctype.h: New.
694
695 2020-05-16 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
696
697 * linux-ia64-low.cc (ia64_target::sw_breakpoint_from_kind):
698 Fix incorrect 'gdb_assert_no_reached' to 'gdb_assert_not_reached'.
699 (ia64_target::low_breakpoint_at): Ditto.
700
701 2020-05-15 Hannes Domani <ssbssa@yahoo.de>
702
703 * win32-i386-low.cc (i386_supports_z_point_type): Handle
704 Z_PACKET_HW_BP z_type.
705 (i386_insert_point): Handle raw_bkpt_type type.
706 (i386_remove_point): Likewise.
707
708 2020-04-30 Hannes Domani <ssbssa@yahoo.de>
709
710 * configure.srv <x86_64-*-mingw*, x86_64-*-cygwin*> (srv_tgtobj):
711 Add arch/i386.o.
712 * win32-arm-low.cc (arm_num_regs): New function.
713 (struct win32_target_ops): Use arm_num_regs.
714 * win32-i386-low.cc (win32_get_current_dr): Adapt for WOW64
715 processes.
716 (i386_get_thread_context): Likewise.
717 (i386_prepare_to_resume): Likewise.
718 (i386_thread_added): Likewise.
719 (i386_single_step): Likewise.
720 (i386_fetch_inferior_register): Likewise.
721 (i386_store_inferior_register): Likewise.
722 (i386_arch_setup): Likewise.
723 (i386_win32_num_regs): New function.
724 (struct win32_target_ops): Use i386_win32_num_regs.
725 * win32-low.cc (win32_get_thread_context): Adapt for WOW64
726 processes.
727 (win32_require_context): Likewise.
728 (child_add_thread): Likewise.
729 (do_initial_child_stuff): Likewise.
730 (continue_one_thread): Likewise.
731 (win32_process_target::resume): Likewise.
732 (load_psapi): Likewise.
733 (win32_add_all_dlls): Likewise.
734 (maybe_adjust_pc): Likewise.
735 (win32_process_target::qxfer_siginfo): Likewise.
736 (initialize_low): Likewise.
737 * win32-low.h (struct win32_target_ops): Change num_regs to
738 callback function.
739
740 2020-04-27 Simon Marchi <simon.marchi@efficios.com>
741
742 * configure.ac: Remove check for fs_base/gs_base in
743 user_regs_struct.
744 * configure: Re-generate.
745 * config.in: Re-generate.
746 * linux-x86-low.cc (x86_64_regmap, x86_fill_gregset,
747 x86_store_gregset): Adjust.
748
749 2020-04-22 Hannes Domani <ssbssa@yahoo.de>
750
751 * server.cc (handle_search_memory_1): Fix gdb_read_memory return value
752 comparison.
753
754 2020-04-16 Tom Tromey <tromey@adacore.com>
755
756 * win32-low.cc (windows_nat::handle_access_violation): New
757 function.
758
759 2020-04-15 Simon Marchi <simon.marchi@polymtl.ca>
760
761 * win32-low.cc (get_child_debug_event): Fix format string warning.
762
763 2020-04-13 Tom Tromey <tom@tromey.com>
764
765 * server.h (gdb_fildes_t): Remove typedef.
766 * remote-utils.c (remote_desc, list_desc): Now int.
767 (INVALID_DESCRIPTOR): Remove.
768 (gdb_connected, remote_close)
769 (check_remote_input_interrupt_request): Update.
770 * utils.h (pfildes): Don't declare.
771 * utils.c (pfildes): Remove.
772
773 2020-04-13 Tom Tromey <tom@tromey.com>
774
775 * server.h (handle_serial_event, handle_target_event): Update.
776 * server.c: Don't call initialize_event_loop.
777 (keep_processing_events): New global.
778 (handle_serial_event): Return void. Set keep_processing_events.
779 (handle_target_event): Return void.
780 (start_event_loop): Move from event-loop.c. Rewrite.
781 * remote-utils.c (handle_accept_event): Return void.
782 (reset_readchar): Use delete_timer.
783 (process_remaining): Return void.
784 (reschedule): Use create_timer.
785 * event-loop.h: Remove.
786 * event-loop.cc: Remove.
787 * Makefile.in (OBS): Use gdbsupport/event-loop.o, not event-loop.o.
788
789 2020-04-13 Tom Tromey <tom@tromey.com>
790
791 * server.c (invoke_async_signal_handlers)
792 (check_async_event_handlers, flush_streams, gdb_select): New
793 functions.
794
795 2020-04-13 Tom Tromey <tom@tromey.com>
796
797 * configure: Rebuild.
798 * config.in: Rebuild.
799
800 2020-04-08 Tom Tromey <tromey@adacore.com>
801
802 PR gdb/22992
803 * win32-low.c (child_continue): Call matching_pending_stop.
804 (get_child_debug_event): Call fetch_pending_stop. Push pending
805 stop when needed.
806
807 2020-04-08 Tom Tromey <tromey@adacore.com>
808
809 * win32-low.h (win32_process_target::stopped_by_sw_breakpoint)
810 (win32_process_target::supports_stopped_by_sw_breakpoint):
811 Declare.
812 * win32-low.c (win32_supports_z_point_type): Always handle
813 Z_PACKET_SW_BP.
814 (win32_insert_point): Call insert_memory_breakpoint when needed.
815 (win32_remove_point): Call remove_memory_breakpoint when needed.
816 (win32_process_target::stopped_by_sw_breakpoint)
817 (win32_process_target::supports_stopped_by_sw_breakpoint): New
818 methods.
819 (win32_target_ops): Update.
820 (maybe_adjust_pc): New function.
821 (win32_wait): Call maybe_adjust_pc.
822
823 2020-04-08 Tom Tromey <tromey@adacore.com>
824
825 * win32-low.h (struct win32_target_ops) <decr_pc_after_break>: New
826 field.
827 * win32-i386-low.c (the_low_target): Update.
828 * win32-arm-low.c (the_low_target): Update.
829
830 2020-04-08 Tom Tromey <tromey@adacore.com>
831
832 * win32-low.h (win32_process_target::read_pc)
833 (win32_process_target::write_pc): Declare.
834 * win32-low.c (win32_process_target::read_pc)
835 (win32_process_target::write_pc): New methods.
836 * win32-i386-low.c (i386_win32_get_pc, i386_win32_set_pc): New
837 functions.
838 (the_low_target): Update.
839 * win32-arm-low.c (arm_win32_get_pc, arm_win32_set_pc): New
840 functions.
841 (the_low_target): Update.
842
843 2020-04-08 Tom Tromey <tromey@adacore.com>
844
845 * win32-low.c (win32_kill, get_child_debug_event): Use
846 wait_for_debug_event.
847
848 2020-04-08 Tom Tromey <tromey@adacore.com>
849
850 * win32-low.c (child_continue): Call continue_last_debug_event.
851
852 2020-04-08 Tom Tromey <tromey@adacore.com>
853
854 * win32-low.c (handle_exception): Remove.
855 (windows_nat::handle_ms_vc_exception): New function.
856 (get_child_debug_event): Add "continue_status" parameter.
857 Update.
858 (win32_wait): Update.
859
860 2020-04-08 Tom Tromey <tromey@adacore.com>
861
862 * win32-low.c (windows_nat::handle_load_dll): Rename from
863 handle_load_dll. No longer static.
864 (windows_nat::handle_unload_dll): Rename from handle_unload_dll.
865 No longer static.
866
867 2020-04-08 Tom Tromey <tromey@adacore.com>
868
869 * win32-low.c (handle_output_debug_string): Add parameter. Change
870 return type.
871 (win32_kill, get_child_debug_event): Update.
872
873 2020-04-08 Tom Tromey <tromey@adacore.com>
874
875 * win32-low.c (current_process_handle, current_process_id)
876 (main_thread_id, last_sig, current_event, siginfo_er): Move to
877 nat/windows-nat.c.
878
879 2020-04-08 Tom Tromey <tromey@adacore.com>
880
881 * win32-low.c (get_image_name): Remove.
882 (handle_load_dll): Update.
883
884 2020-04-08 Tom Tromey <tromey@adacore.com>
885
886 * win32-low.c (windows_nat::thread_rec): Rename from thread_rec.
887 No longer static. Change parameters.
888 (child_add_thread, child_fetch_inferior_registers)
889 (child_store_inferior_registers, win32_resume)
890 (win32_get_tib_address): Update.
891
892 2020-04-08 Tom Tromey <tromey@adacore.com>
893
894 * win32-low.h (struct win32_target_ops): Use qualified names where
895 needed.
896 * win32-i386-low.c: Add "using namespace".
897 * win32-low.c: Add "using namespace".
898 * win32-arm-low.c: Add "using namespace".
899
900 2020-04-08 Tom Tromey <tromey@adacore.com>
901
902 * win32-low.c (delete_thread_info): Don't call CloseHandle.
903
904 2020-04-08 Tom Tromey <tromey@adacore.com>
905
906 * win32-low.c (win32_require_context, suspend_one_thread): Use
907 windows_thread_info::suspend.
908 (continue_one_thread): Use windows_thread_info::resume.
909 * configure.srv (srv_tgtobj): Add windows-nat.o when needed.
910
911 2020-04-08 Tom Tromey <tromey@adacore.com>
912
913 * win32-i386-low.c (update_debug_registers)
914 (i386_prepare_to_resume, i386_thread_added): Update.
915
916 2020-04-08 Tom Tromey <tromey@adacore.com>
917
918 * win32-low.c (child_add_thread): Use new.
919 (delete_thread_info): Use delete.
920
921 2020-04-08 Tom Tromey <tromey@adacore.com>
922
923 * win32-low.h (struct windows_thread_info): Remove.
924
925 2020-04-08 Tom Tromey <tromey@adacore.com>
926
927 * win32-low.h (struct windows_thread_info): Rename from
928 win32_thread_info. Remove typedef.
929 (struct win32_target_ops, win32_require_context): Update.
930 * win32-low.c (win32_get_thread_context)
931 (win32_set_thread_context, win32_prepare_to_resume)
932 (win32_require_context, thread_rec, child_add_thread)
933 (delete_thread_info, continue_one_thread)
934 (child_fetch_inferior_registers, child_store_inferior_registers)
935 (win32_resume, suspend_one_thread, win32_get_tib_address):
936 Update.
937 * win32-i386-low.c (update_debug_registers)
938 (win32_get_current_dr, i386_get_thread_context)
939 (i386_prepare_to_resume, i386_thread_added, i386_single_step)
940 (i386_fetch_inferior_register, i386_store_inferior_register):
941 Update.
942 * win32-arm-low.c (arm_get_thread_context)
943 (arm_fetch_inferior_register, arm_store_inferior_register):
944 Update.
945
946 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
947
948 * linux-low.h (struct linux_target_ops): Remove.
949 (the_low_target): Remove.
950 * linux-x86-low.cc (the_low_target): Remove.
951 * linux-aarch64-low.cc (the_low_target): Ditto.
952 * linux-arm-low.cc (the_low_target): Ditto.
953 * linux-bfin-low.cc (the_low_target): Ditto.
954 * linux-cris-low.cc (the_low_target): Ditto.
955 * linux-crisv32-low.cc (the_low_target): Ditto.
956 * linux-ia64-low.cc (the_low_target): Ditto.
957 * linux-m32r-low.cc (the_low_target): Ditto.
958 * linux-m68k-low.cc (the_low_target): Ditto.
959 * linux-mips-low.cc (the_low_target): Ditto.
960 * linux-nios2-low.cc (the_low_target): Ditto.
961 * linux-ppc-low.cc (the_low_target): Ditto.
962 * linux-riscv-low.cc (the_low_target): Ditto.
963 * linux-s390-low.cc (the_low_target): Ditto.
964 * linux-sh-low.cc (the_low_target): Ditto.
965 * linux-sparc-low.cc (the_low_target): Ditto.
966 * linux-tic6x-low.cc (the_low_target): Ditto.
967 * linux-tile-low.cc (the_low_target): Ditto.
968 * linux-xtensa-low.cc (the_low_target): Ditto.
969
970 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
971
972 Remove the 'get_ipa_tdesc_idx' linux target op and let a concrete
973 linux target define the op by overriding the declaration in
974 process_stratum_target.
975
976 * linux-low.h (struct linux_target_ops): Remove the op.
977 (class linux_process_target) <get_ipa_tdesc_idx>: Remove.
978 * linux-low.cc (linux_process_target::get_ipa_tdesc_idx): Remove.
979 * linux-x86-low.cc (class x86_target) <get_ipa_tdesc_idx>: Declare.
980 (x86_get_ipa_tdesc_idx): Turn into...
981 (x86_target::get_ipa_tdesc_idx): ...this.
982 (the_low_target): Remove the op field.
983 * linux-ppc-low.cc (class ppc_target) <get_ipa_tdesc_idx>: Declare.
984 (ppc_get_ipa_tdesc_idx): Turn into...
985 (ppc_target::get_ipa_tdesc_idx): ...this.
986 (the_low_target): Remove the op field.
987 * linux-s390-low.cc (class s390_target) <get_ipa_tdesc_idx>: Declare.
988 (s390_get_ipa_tdesc_idx): Turn into...
989 (s390_target::get_ipa_tdesc_idx): ...this.
990 (the_low_target): Remove the op field.
991
992 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
993
994 Turn the 'get_syscall_trapinfo' linux target op into a method
995 of process_stratum_target.
996
997 * linux-low.h (struct linux_target_ops): Remove the op.
998 (class linux_process_target) <get_syscall_trapinfo>
999 <gdb_catch_this_syscall>
1000 <low_supports_catch_syscall>
1001 <low_get_syscall_trapinfo>: Declare.
1002 * linux-low.cc (get_syscall_trapinfo): Turn into...
1003 (linux_process_target::get_syscall_trapinfo): ...this.
1004 (linux_process_target::low_get_syscall_trapinfo): Define.
1005 (gdb_catch_this_syscall_p): Turn into...
1006 (linux_process_target::gdb_catch_this_syscall): ...this.
1007 (linux_process_target::low_supports_catch_syscall): Define.
1008
1009 Update the callers below.
1010
1011 (linux_process_target::wait_1)
1012 (linux_process_target::supports_catch_syscall)
1013
1014 * linux-x86-low.cc (class x86_target) <low_supports_catch_syscall>
1015 <low_get_syscall_trapinfo>: Declare.
1016 (x86_target::low_supports_catch_syscall): Define.
1017 (x86_get_syscall_trapinfo): Turn into...
1018 (x86_target::low_get_syscall_trapinfo): ...this.
1019 (the_low_target): Remove the op field.
1020 * linux-aarch64-low.cc (class aarch64_target)
1021 <low_supports_catch_syscall>
1022 <low_get_syscall_trapinfo>: Declare.
1023 (aarch64_target::low_supports_catch_syscall): Define.
1024 (aarch64_get_syscall_trapinfo): Turn into...
1025 (aarch64_target::low_get_syscall_trapinfo): ...this.
1026 (the_low_target): Remove the op field.
1027 * linux-arm-low.cc (class arm_target) <low_supports_catch_syscall>
1028 <low_get_syscall_trapinfo>: Declare.
1029 (arm_target::low_supports_catch_syscall): Define.
1030 (arm_get_syscall_trapinfo): Turn into...
1031 (arm_target::low_get_syscall_trapinfo): ...this.
1032 (the_low_target): Remove the op field.
1033 * linux-ppc-low.cc (the_low_target): Remove the op field.
1034 * linux-s390-low.cc (the_low_target): Remove the op field.
1035
1036 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1037
1038 Remove the 'supports_hardware_single_step' linux target op and
1039 override the process_stratum_target's op definition in
1040 linux_process_target to return true.
1041
1042 * linux-low.h (struct linux_target_ops): Remove the op.
1043 (class linux_process_target) <finish_step_over>
1044 <maybe_hw_step>: Declare.
1045 * linux-low.cc (can_hardware_single_step): Remove.
1046 (maybe_hw_step): Turn into...
1047 (linux_process_target::maybe_hw_step): ...this.
1048 (finish_step_over): Turn into...
1049 (linux_process_target::finish_step_over): ...this.
1050 (linux_process_target::supports_hardware_single_step): Update
1051 to return true.
1052
1053 Update the callers below.
1054
1055 (linux_process_target::single_step)
1056 (linux_process_target::resume_one_lwp_throw)
1057
1058 * linux-arm-low.cc (class arm_target)
1059 <supports_hardware_single_step>: Declare.
1060 (arm_supports_hardware_single_step): Turn into...
1061 (arm_target::supports_hardware_single_step): ...this.
1062 (the_low_target): Remove the op field.
1063 * linux-x86-low.cc (x86_supports_hardware_single_step): Remove.
1064 (the_low_target): Remove the op field.
1065 * linux-aarch64-low.cc (aarch64_supports_hardware_single_step):
1066 Remove.
1067 (the_low_target): Remove the op field.
1068 * linux-bfin-low.cc (bfin_supports_hardware_single_step): Remove.
1069 (the_low_target): Remove the op field.
1070 * linux-crisv32-low.cc (cris_supports_hardware_single_step): Remove.
1071 (the_low_target): Remove the op field.
1072 * linux-m32r-low.cc (m32r_supports_hardware_single_step): Remove.
1073 (the_low_target): Remove the op field.
1074 * linux-m68k-low.cc (m68k_supports_hardware_single_step): Remove.
1075 (the_low_target): Remove the op field.
1076 * linux-ppc-low.cc (ppc_supports_hardware_single_step): Remove.
1077 (the_low_target): Remove the op field.
1078 * linux-s390-low.cc (s390_supports_hardware_single_step): Remove.
1079 (the_low_target): Remove the op field.
1080 * linux-sh-low.cc (sh_supports_hardware_single_step): Remove.
1081 (the_low_target): Remove the op field.
1082 * linux-tic6x-low.cc (tic6x_supports_hardware_single_step): Remove.
1083 (the_low_target): Remove the op field.
1084 * linux-tile-low.cc (tile_supports_hardware_single_step): Remove.
1085 (the_low_target): Remove the op field.
1086 * linux-xtensa-low.cc (xtensa_supports_hardware_single_step):
1087 Remove.
1088 (the_low_target): Remove the op field.
1089
1090 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1091
1092 Turn the 'supports_range_stepping' linux target op into a method
1093 of linux_process_target.
1094
1095 * linux-low.h (struct linux_target_ops): Remove the op.
1096 (class linux_process_target) <low_supports_range_stepping>: Declare.
1097 * linux-low.cc (linux_process_target::low_supports_range_stepping):
1098 Define.
1099 (linux_process_target::supports_range_stepping): Update the call
1100 site.
1101 * linux-x86-low.cc (class x86_target)
1102 <low_supports_range_stepping>: Declare.
1103 (x86_supports_range_stepping): Turn into...
1104 (x86_target::low_supports_range_stepping): ...this.
1105 (the_low_target): Remove the op field.
1106 * linux-aarch64-low.cc (class aarch64_target)
1107 <low_supports_range_stepping>: Declare.
1108 (aarch64_supports_range_stepping): Turn into...
1109 (aarch64_target::low_supports_range_stepping): ...this.
1110 (the_low_target): Remove the op field.
1111 * linux-arm-low.cc (the_low_target): Remove the op field.
1112 * linux-bfin-low.cc (the_low_target): Ditto.
1113 * linux-crisv32-low.cc (the_low_target): Ditto.
1114 * linux-m32r-low.cc (the_low_target): Ditto.
1115 * linux-m68k-low.cc (the_low_target): Ditto.
1116 * linux-ppc-low.cc (the_low_target): Ditto.
1117 * linux-s390-low.cc (the_low_target): Ditto.
1118 * linux-sh-low.cc (the_low_target): Ditto.
1119 * linux-tic6x-low.cc (the_low_target): Ditto.
1120 * linux-tile-low.cc (the_low_target): Ditto.
1121 * linux-xtensa-low.cc (the_low_target): Ditto.
1122
1123 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1124
1125 Remove the 'emit_ops' linux target ops and let the concrete
1126 linux target define the op by overriding the declaration of
1127 process_stratum_target.
1128
1129 * linux-low.h (struct linux_target_ops): Remove the op.
1130 (class linux_process_target) <emit_ops>: Remove.
1131 * linux-low.cc (linux_process_target::emit_ops): Remove.
1132 * linux-x86-low.cc (class x86_target) <emit_ops>: Declare.
1133 (x86_emit_ops): Turn into...
1134 (x86_target::emit_ops): ...this.
1135 (the_low_target): Remove the op field.
1136 * linux-aarch64-low.cc (class aarch64_target) <emit_ops>: Declare.
1137 (aarch64_emit_ops): Turn into...
1138 (aarch64_target::emit_ops): ...this.
1139 (the_low_target): Remove the op field.
1140 * linux-ppc-low.cc (class ppc_target) <emit_ops>: Declare.
1141 (ppc_emit_ops): Turn into...
1142 (ppc_target::emit_ops): ...this.
1143 (the_low_target): Remove the op field.
1144 * linux-s390-low.cc (class s390_target) <emit_ops>: Declare.
1145 (s390_emit_ops): Turn into...
1146 (s390_target::emit_ops): ...this.
1147 (the_low_target): Remove the op field.
1148 * linux-arm-low.cc (the_low_target): Remove the op field.
1149 * linux-bfin-low.cc (the_low_target): Ditto.
1150 * linux-crisv32-low.cc (the_low_target): Ditto.
1151 * linux-m32r-low.cc (the_low_target): Ditto.
1152 * linux-m68k-low.cc (the_low_target): Ditto.
1153 * linux-sh-low.cc (the_low_target): Ditto.
1154 * linux-tic6x-low.cc (the_low_target): Ditto.
1155 * linux-tile-low.cc (the_low_target): Ditto.
1156 * linux-xtensa-low.cc (the_low_target): Ditto.
1157
1158 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1159
1160 Remove the 'install_fast_tracepoint_jump_pad' and
1161 'get_min_fast_tracepoint_insn_len' linux target ops to let the
1162 concrete linux target define the ops by overriding the declarations
1163 of process_stratum_target.
1164
1165 * linux-low.h (struct linux_target_ops): Remove the ops.
1166 (class linux_process_target) <supports_fast_tracepoints>
1167 <install_fast_tracepoint_jump_pad>
1168 <get_min_fast_tracepoint_insn_len>: Remove.
1169 * linux-low.cc (linux_process_target::supports_fast_tracepoints)
1170 (linux_process_target::install_fast_tracepoint_jump_pad)
1171 (linux_process_target::get_min_fast_tracepoint_insn_len): Remove.
1172 * linux-x86-low.cc (class x86_target) <supports_fast_tracepoints>
1173 <install_fast_tracepoint_jump_pad>
1174 <get_min_fast_tracepoint_insn_len>: Declare.
1175 (x86_target::supports_fast_tracepoints): Define.
1176 (x86_install_fast_tracepoint_jump_pad): Turn into...
1177 (x86_target::install_fast_tracepoint_jump_pad): ...this.
1178 (x86_get_min_fast_tracepoint_insn_len): Turn into...
1179 (x86_target::get_min_fast_tracepoint_insn_len): ...this.
1180 (the_low_target): Remove the op fields.
1181 * linux-aarch64-low.cc (class aarch64_target)
1182 <supports_fast_tracepoints>
1183 <install_fast_tracepoint_jump_pad>
1184 <get_min_fast_tracepoint_insn_len>: Declare.
1185 (aarch64_target::supports_fast_tracepoints): Define.
1186 (aarch64_install_fast_tracepoint_jump_pad): Turn into...
1187 (aarch64_target::install_fast_tracepoint_jump_pad): ...this.
1188 (aarch64_get_min_fast_tracepoint_insn_len): Turn into...
1189 (aarch64_target::get_min_fast_tracepoint_insn_len): ...this.
1190 (the_low_target): Remove the op fields.
1191 * linux-ppc-low.cc (class ppc_target) <supports_fast_tracepoints>
1192 <install_fast_tracepoint_jump_pad>
1193 <get_min_fast_tracepoint_insn_len>: Declare.
1194 (ppc_target::supports_fast_tracepoints): Define.
1195 (ppc_install_fast_tracepoint_jump_pad): Turn into...
1196 (ppc_target::install_fast_tracepoint_jump_pad): ...this.
1197 (ppc_get_min_fast_tracepoint_insn_len): Turn into...
1198 (ppc_target::get_min_fast_tracepoint_insn_len): ...this.
1199 (the_low_target): Remove the op fields.
1200 * linux-s390-low.cc (class s390_target) <supports_fast_tracepoints>
1201 <install_fast_tracepoint_jump_pad>
1202 <get_min_fast_tracepoint_insn_len>: Declare.
1203 (s390_target::supports_fast_tracepoints): Define.
1204 (s390_install_fast_tracepoint_jump_pad): Turn into...
1205 (s390_target::install_fast_tracepoint_jump_pad): ...this.
1206 (s390_get_min_fast_tracepoint_insn_len): Turn into...
1207 (s390_target::get_min_fast_tracepoint_insn_len): ...this.
1208 (the_low_target): Remove the op fields.
1209 * linux-arm-low.cc (the_low_target): Remove the op fields.
1210 * linux-bfin-low.cc (the_low_target): Ditto.
1211 * linux-crisv32-low.cc (the_low_target): Ditto.
1212 * linux-m32r-low.cc (the_low_target): Ditto.
1213 * linux-m68k-low.cc (the_low_target): Ditto.
1214 * linux-sh-low.cc (the_low_target): Ditto.
1215 * linux-tic6x-low.cc (the_low_target): Ditto.
1216 * linux-tile-low.cc (the_low_target): Ditto.
1217 * linux-xtensa-low.cc (the_low_target): Ditto.
1218
1219 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1220
1221 Turn the 'get_thread_area' linux target op into a method of
1222 process_stratum_target.
1223
1224 * linux-low.h (struct linux_target_ops): Remove the op.
1225 (class linux_process_target) <stuck_in_jump_pad>
1226 <linux_fast_tracepoint_collecting>
1227 <low_get_thread_area>: Declare.
1228 * linux-low.cc (supports_fast_tracepoints): Remove.
1229 (linux_fast_tracepoint_collecting): Turn into...
1230 (linux_process_target::linux_fast_tracepoint_collecting): ...this.
1231 (linux_process_target::low_get_thread_area): Define.
1232 (stuck_in_jump_pad_callback): Turn into...
1233 (linux_process_target::stuck_in_jump_pad): ...this.
1234
1235 Update the caller below.
1236
1237 (linux_process_target::stabilize_threads)
1238
1239 * linux-x86-low.cc (class x86_target) <low_get_thread_area>:
1240 Declare.
1241 (x86_get_thread_area): Turn into...
1242 (x86_target::low_get_thread_area): ...this.
1243 (the_low_target): Remove the op field.
1244 * linux-aarch64-low.cc (class aarch64_target) <low_get_thread_area>:
1245 Declare.
1246 (aarch64_get_thread_area): Turn into...
1247 (aarch64_target::low_get_thread_area): ...this.
1248 (the_low_target): Remove the op field.
1249 * linux-ppc-low.cc (class ppc_target) <low_get_thread_area>:
1250 Declare.
1251 (ppc_get_thread_area): Turn into...
1252 (ppc_target::low_get_thread_area): ...this.
1253 (the_low_target): Remove the op field.
1254 * linux-s390-low.cc (class s390_target) <low_get_thread_area>:
1255 Declare.
1256 (s390_get_thread_area): Turn into...
1257 (s390_target::low_get_thread_area): ...this.
1258 (the_low_target): Remove the op field.
1259 * linux-arm-low.cc (the_low_target): Remove the op field.
1260 * linux-bfin-low.cc (the_low_target): Ditto.
1261 * linux-crisv32-low.cc (the_low_target): Ditto.
1262 * linux-m32r-low.cc (the_low_target): Ditto.
1263 * linux-m68k-low.cc (the_low_target): Ditto.
1264 * linux-sh-low.cc (the_low_target): Ditto.
1265 * linux-tic6x-low.cc (the_low_target): Ditto.
1266 * linux-tile-low.cc (the_low_target): Ditto.
1267 * linux-xtensa-low.cc (the_low_target): Ditto.
1268
1269 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1270
1271 Remote the 'supports_tracepoints' linux target op and let the
1272 concrete linux target define it by overriding the op declared in
1273 process_stratum_target.
1274
1275 * linux-low.h (struct linux_target_ops): Remove the op.
1276 (class linux_process_target) <supports_tracepoints>: Remove.
1277 * linux-low.cc (linux_process_target::supports_tracepoints): Remove.
1278 * linux-x86-low.cc (class x86_target) <supports_tracepoints>:
1279 Declare.
1280 (x86_supports_tracepoints): Turn into...
1281 (x86_target::supports_tracepoints): ...this.
1282 (the_low_target): Remove the op field.
1283 * linux-aarch64-low.cc (class aarch64_target)
1284 <supports_tracepoints>: Declare.
1285 (aarch64_supports_tracepoints): Turn into...
1286 (aarch64_target::supports_tracepoints): ...this.
1287 (the_low_target): Remove the op field.
1288 * linux-ppc-low.cc (class ppc_target) <supports_tracepoints>:
1289 Declare.
1290 (ppc_supports_tracepoints): Turn into...
1291 (ppc_target::supports_tracepoints): ...this.
1292 (the_low_target): Remove the op field.
1293 * linux-s390-low.cc (class s390_target) <supports_tracepoints>:
1294 Declare.
1295 (s390_supports_tracepoints): Turn into...
1296 (s390_target::supports_tracepoints): ...this.
1297 (the_low_target): Remove the op field.
1298 * linux-arm-low.cc (the_low_target): Remove the op field.
1299 * linux-bfin-low.cc (the_low_target): Ditto.
1300 * linux-crisv32-low.cc (the_low_target): Ditto.
1301 * linux-m32r-low.cc (the_low_target): Ditto.
1302 * linux-m68k-low.cc (the_low_target): Ditto.
1303 * linux-sh-low.cc (the_low_target): Ditto.
1304 * linux-tic6x-low.cc (the_low_target): Ditto.
1305 * linux-tile-low.cc (the_low_target): Ditto.
1306 * linux-xtensa-low.cc (the_low_target): Ditto.
1307
1308 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1309
1310 Remove the 'process_qsupported' linux target op and let a concrete
1311 linux target define the op by overriding the op declaration in
1312 process_stratum_target.
1313
1314 * linux-low.h (struct linux_target_ops): Remove the op.
1315 (class linux_process_target) <process_qsupported>: Remove.
1316 * linux-low.cc (linux_process_target::process_qsupported): Remove.
1317 * linux-x86-low.cc (class x86_target) <process_qsupported>: Declare.
1318 (x86_linux_process_qsupported): Turn into...
1319 (x86_target::process_qsupported): ...this.
1320 (the_low_target): Remove the op field.
1321 * linux-aarch64-low.cc (the_low_target): Remove the op
1322 field.
1323 * linux-arm-low.cc (the_low_target): Ditto.
1324 * linux-bfin-low.cc (the_low_target): Ditto.
1325 * linux-crisv32-low.cc (the_low_target): Ditto.
1326 * linux-m32r-low.cc (the_low_target): Ditto.
1327 * linux-m68k-low.cc (the_low_target): Ditto.
1328 * linux-ppc-low.cc (the_low_target): Ditto.
1329 * linux-s390-low.cc (the_low_target): Ditto.
1330 * linux-sh-low.cc (the_low_target): Ditto.
1331 * linux-tic6x-low.cc (the_low_target): Ditto.
1332 * linux-tile-low.cc (the_low_target): Ditto.
1333 * linux-xtensa-low.cc (the_low_target): Ditto.
1334
1335 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1336
1337 Turn the 'prepare_to_resume' linux target op into a method of
1338 linux_process_target.
1339
1340 * linux-low.h (struct linux_target_ops): Remove the op.
1341 (class linux_process_target) <low_prepare_to_resume>: Declare.
1342 * linux-low.cc (linux_process_target::low_prepare_to_resume):
1343 Define.
1344
1345 Update the callers below:
1346
1347 (linux_process_target::resume_one_lwp_throw)
1348 (linux_process_target::low_prepare_to_resume)
1349
1350 * linux-x86-low.cc (class x86_target) <low_prepare_to_resume>:
1351 Declare.
1352 (x86_target::low_prepare_to_resume): Define.
1353 (the_low_target): Remove the op field.
1354 * linux-aarch64-low.cc (class aarch64_target)
1355 <low_prepare_to_resume>: Declare.
1356 (aarch64_target::low_prepare_to_resume): Define.
1357 (the_low_target): Remove the op field.
1358 * linux-arm-low.cc (class arm_target) <low_prepare_to_resume>:
1359 Declare.
1360 (arm_prepare_to_resume): Turn into...
1361 (arm_target::low_prepare_to_resume): ...this.
1362 (the_low_target): Remove the op field.
1363 * linux-mips-low.cc (class mips_target) <low_prepare_to_resume>:
1364 Declare.
1365 (mips_linux_prepare_to_resume): Turn into...
1366 (mips_target::low_prepare_to_resume): ...this.
1367 (the_low_target): Remove the op field.
1368 * linux-bfin-low.cc (the_low_target): Remove the op field.
1369 * linux-crisv32-low.cc (the_low_target): Ditto.
1370 * linux-m32r-low.cc (the_low_target): Ditto.
1371 * linux-m68k-low.cc (the_low_target): Ditto.
1372 * linux-ppc-low.cc (the_low_target): Ditto.
1373 * linux-s390-low.cc (the_low_target): Ditto.
1374 * linux-sh-low.cc (the_low_target): Ditto.
1375 * linux-tic6x-low.cc (the_low_target): Ditto.
1376 * linux-tile-low.cc (the_low_target): Ditto.
1377 * linux-xtensa-low.cc (the_low_target): Ditto.
1378
1379 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1380
1381 Turn the 'new_process', 'delete_process', 'new_thread',
1382 'delete_thread', and 'new_fork' linux target ops into methods
1383 of linux_process_target.
1384
1385 * linux-low.h (struct linux_target_ops): Remove the ops.
1386 (class linux_process_target) <add_linux_process>
1387 <add_lwp>
1388 <delete_lwp>
1389 <attach_lwp>
1390 <detach_one_lwp>
1391 <check_zombie_leaders>
1392 <filter_exit_event>
1393 <low_new_process>
1394 <low_delete_process>
1395 <low_new_thread>
1396 <low_delete_thread>
1397 <low_new_fork>: Declare.
1398 * linux-low.cc (delete_lwp): Turn into...
1399 (linux_process_target::delete_lwp): ...this.
1400 (linux_process_target::low_delete_thread): Define.
1401 (linux_add_process): Turn into...
1402 (linux_process_target::add_linux_process): ...this.
1403 (linux_process_target::low_new_process): Define.
1404 (linux_process_target::low_delete_process): Define.
1405 (linux_process_target::low_new_fork): Define.
1406 (add_lwp): Turn into...
1407 (linux_process_target::add_lwp): ...this.
1408 (linux_process_target::low_new_thread): Define.
1409 (linux_attach_lwp): Turn into...
1410 (linux_process_target::attach_lwp): ...this.
1411 (linux_detach_one_lwp): Turn into...
1412 (linux_process_target::detach_one_lwp): ...this.
1413 (linux_detach_lwp_callback): Remove and inline...
1414 (linux_process_target::detach): ...here.
1415 (check_zombie_leaders): Turn into...
1416 (linux_process_target::check_zombie_leaders): ...this.
1417 (filter_exit_event): Turn into...
1418 (linux_process_target::filter_exit_event): ...this.
1419
1420 Update the callers below.
1421
1422 (linux_process_target::handle_extended_wait)
1423 (linux_process_target::create_inferior)
1424 (attach_proc_task_lwp_callback)
1425 (linux_process_target::attach)
1426 (linux_process_target::detach)
1427 (linux_process_target::mourn)
1428 * thread-db.cc (attach_thread)
1429
1430 * linux-x86-low.cc (class x86_target) <low_new_process>
1431 <low_delete_process>
1432 <low_new_thread>
1433 <low_delete_thread>
1434 <low_new_fork>: Declare.
1435 (x86_linux_new_process): Turn into...
1436 (x86_target::low_new_process): ...this.
1437 (x86_linux_delete_process): Turn into...
1438 (x86_target::low_delete_process): ...this.
1439 (x86_target::low_new_thread): Define.
1440 (x86_target::low_delete_thread): Define.
1441 (x86_linux_new_fork): Turn into...
1442 (x86_target::low_new_fork): ...this.
1443 (the_low_target): Remove the op fields.
1444 * linux-aarch64-low.cc (class aarch64_target) <low_new_process>
1445 <low_delete_process>
1446 <low_new_thread>
1447 <low_delete_thread>
1448 <low_new_fork>: Declare.
1449 (aarch64_linux_new_process): Turn into...
1450 (aarch64_target::low_new_process): ...this.
1451 (aarch64_linux_delete_process): Turn into...
1452 (aarch64_target::low_delete_process): ...this.
1453 (aarch64_target::low_new_thread): Define.
1454 (aarch64_target::low_delete_thread): Define.
1455 (aarch64_linux_new_fork): Turn into...
1456 (aarch64_target::low_new_fork): ...this.
1457 (the_low_target): Remove the op fields.
1458 * linux-arm-low.cc (class arm_target) <low_new_process>
1459 <low_delete_process>
1460 <low_new_thread>
1461 <low_delete_thread>
1462 <low_new_fork>: Declare.
1463 (arm_new_process): Turn into...
1464 (arm_target::low_new_process): ...this.
1465 (arm_delete_process): Turn into...
1466 (arm_target::low_delete_process): ...this.
1467 (arm_new_thread): Turn into...
1468 (arm_target::low_new_thread): ...this.
1469 (arm_delete_thread): Turn into...
1470 (arm_target::low_delete_thread): ...this.
1471 (arm_new_fork): Turn into...
1472 (arm_target::low_new_fork): ...this.
1473 (the_low_target): Remove the op fields.
1474 * linux-mips-low.cc (class mips_target) <low_new_process>
1475 <low_delete_process>
1476 <low_new_thread>
1477 <low_delete_thread>
1478 <low_new_fork>: Declare.
1479 (mips_linux_new_process): Turn into...
1480 (mips_target::low_new_process): ...this.
1481 (mips_linux_delete_process): Turn into...
1482 (mips_target::low_delete_process): ...this.
1483 (mips_linux_new_thread): Turn into...
1484 (mips_target::low_new_thread): ...this.
1485 (mips_linux_delete_thread): Turn into...
1486 (mips_target::low_delete_thread): ...this.
1487 (mips_linux_new_fork): Turn into...
1488 (mips_target::low_new_fork): ...this.
1489 (the_low_target): Remove the op fields.
1490 * linux-bfin-low.cc (the_low_target): Remove the op fields.
1491 * linux-crisv32-low.cc (the_low_target): Ditto.
1492 * linux-m32r-low.cc (the_low_target): Ditto.
1493 * linux-m68k-low.cc (the_low_target): Ditto.
1494 * linux-ppc-low.cc (the_low_target): Ditto.
1495 * linux-s390-low.cc (the_low_target): Ditto.
1496 * linux-sh-low.cc (the_low_target): Ditto.
1497 * linux-tic6x-low.cc (the_low_target): Ditto.
1498 * linux-tile-low.cc (the_low_target): Ditto.
1499 * linux-xtensa-low.cc (the_low_target): Ditto.
1500
1501 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1502
1503 Turn the 'siginfo_fixup' linux target op into a method of
1504 linux_process_target.
1505
1506 * linux-low.h (struct linux_target_ops): Remove the op.
1507 (class linux_process_target) <siginfo_fixup>
1508 <low_siginfo_fixup>: Declare.
1509 * linux-low.cc (siginfo_fixup): Turn into...
1510 (linux_process_target::siginfo_fixup): ...this.
1511 (linux_process_target::low_siginfo_fixup): Define.
1512 * linux-x86-low.cc (class x86_target) <low_siginfo_fixup>: Declare.
1513 (x86_siginfo_fixup): Turn into...
1514 (x86_target::low_siginfo_fixup): ...this.
1515 (the_low_target): Remove the op field.
1516 * linux-aarch64-low.cc (class aarch64_target):
1517 <low_siginfo_fixup>: Declare.
1518 (aarch64_linux_siginfo_fixup): Turn into...
1519 (aarch64_target::low_siginfo_fixup): ...this.
1520 (the_low_target): Remove the op field.
1521 * linux-arm-low.cc (the_low_target): Remove the op field.
1522 * linux-bfin-low.cc (the_low_target): Ditto.
1523 * linux-crisv32-low.cc (the_low_target): Ditto.
1524 * linux-m32r-low.cc (the_low_target): Ditto.
1525 * linux-m68k-low.cc (the_low_target): Ditto.
1526 * linux-mips-low.cc (the_low_target): Ditto.
1527 * linux-ppc-low.cc (the_low_target): Ditto.
1528 * linux-s390-low.cc (the_low_target): Ditto.
1529 * linux-sh-low.cc (the_low_target): Ditto.
1530 * linux-tic6x-low.cc (the_low_target): Ditto.
1531 * linux-tile-low.cc (the_low_target): Ditto.
1532 * linux-xtensa-low.cc (the_low_target): Ditto.
1533
1534 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1535
1536 Turn the 'collect_ptrace_register' and 'supply_ptrace_register'
1537 linux target ops into methods of linux_process_target.
1538
1539 * linux-low.h (struct linux_target_ops): Remove the ops.
1540 (class linux_process_target) <low_collect_ptrace_register>
1541 <low_store_ptrace_register>: Declare.
1542 * linux-low.cc (linux_process_target::low_collect_ptrace_register)
1543 (linux_process_target::low_supply_ptrace_register): Define.
1544
1545 Update the callers below.
1546
1547 (linux_process_target::fetch_register)
1548 (linux_process_target::store_register)
1549
1550 * linux-x86-low.cc (the_low_target): Remove the op fields.
1551 * linux-aarch64-low.cc (the_low_target): Ditto.
1552 * linux-arm-low.cc (the_low_target): Ditto.
1553 * linux-bfin-low.cc (the_low_target): Ditto.
1554 * linux-crisv32-low.cc (the_low_target): Ditto.
1555 * linux-m32r-low.cc (the_low_target): Ditto.
1556 * linux-m68k-low.cc (the_low_target): Ditto.
1557 * linux-sh-low.cc (the_low_target): Ditto.
1558 * linux-sparc-low.cc (the_low_target): Ditto.
1559 * linux-tic6x-low.cc (the_low_target): Ditto.
1560 * linux-tile-low.cc (the_low_target): Ditto.
1561 * linux-xtensa-low.cc (the_low_target): Ditto.
1562 * linux-mips-low.cc (class mips_target)
1563 <low_collect_ptrace_register>
1564 <low_supply_ptrace_register>: Declare.
1565 (mips_collect_ptrace_register): Turn into ...
1566 (mips_target::low_collect_ptrace_register): ...this.
1567 (mips_supply_ptrace_register): Turn into...
1568 (mips_target::low_supply_ptrace_register): ...this.
1569 (the_low_target): Remove the op fields.
1570 * linux-ppc-low.cc (class ppc_target)
1571 <low_collect_ptrace_register>
1572 <low_supply_ptrace_register>: Declare.
1573 (ppc_collect_ptrace_register): Turn into ...
1574 (ppc_target::low_collect_ptrace_register): ...this.
1575 (ppc_supply_ptrace_register): Turn into ...
1576 (ppc_target::low_supply_ptrace_register): ...this.
1577 (ppc_fill_gregset): Update for the calls to
1578 low_collect_ptrace_register.
1579 (the_low_target): Remove the op fields.
1580 * linux-s390-low.cc (class s390_target)
1581 <low_collect_ptrace_register>
1582 <low_supply_ptrace_register>: Declare.
1583 (s390_collect_ptrace_register): Turn into ...
1584 (s390_target::low_collect_ptrace_register): ...this.
1585 (s390_supply_ptrace_register): Turn into ...
1586 (s390_target::low_supply_ptrace_register): ...this.
1587 (s390_fill_gregset): Update for the calls to
1588 low_collect_ptrace_register.
1589 (the_low_target): Remove the op fields.
1590
1591 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1592
1593 Turn the 'stopped_by_watchpoint' and 'stopped_data_address' linux
1594 target ops into methods of linux_process_target.
1595
1596 * linux-low.h (struct linux_target_ops): Remove the ops.
1597 (class linux_process_target) <check_stopped_by_watchpoint>
1598 <low_stopped_by_watchpoint>
1599 <low_stopped_data_address>: Declare.
1600 * linux-low.cc (check_stopped_by_watchpoint): Turn into...
1601 (linux_process_target::check_stopped_by_watchpoint): ...this.
1602 (linux_process_target::low_stopped_by_watchpoint): Define.
1603 (linux_process_target::low_stopped_data_address): Define.
1604 * linux-x86-low.cc (class x86_target) <low_stopped_by_watchpoint>
1605 <low_stopped_data_address>: Declare.
1606 (x86_stopped_by_watchpoint): Turn into...
1607 (x86_target::low_stopped_by_watchpoint): ...this.
1608 (x86_stopped_data_address): Turn into...
1609 (x86_target::low_stopped_data_address): ...this.
1610 (the_low_target): Remove the op fields.
1611 * linux-aarch64-low.cc (class aarch64_target)
1612 <low_stopped_by_watchpoint>
1613 <low_stopped_data_address>: Declare.
1614 (aarch64_stopped_by_watchpoint): Turn into...
1615 (aarch64_target::low_stopped_by_watchpoint): ...this.
1616 (aarch64_stopped_data_address): Turn into...
1617 (aarch64_target::low_stopped_data_address): ...this.
1618 (the_low_target): Remove the op fields.
1619 * linux-arm-low.cc (class arm_target) <low_stopped_by_watchpoint>
1620 <low_stopped_data_address>: Declare.
1621 (arm_stopped_by_watchpoint): Turn into...
1622 (arm_target::low_stopped_by_watchpoint): ...this.
1623 (arm_stopped_data_address): Turn into...
1624 (arm_target::low_stopped_data_address): ...this.
1625 (the_low_target): Remove the op fields.
1626 * linux-crisv32-low.cc (class crisv32_target)
1627 <low_stopped_by_watchpoint>
1628 <low_stopped_data_address>: Declare.
1629 (cris_stopped_by_watchpoint): Turn into...
1630 (crisv32_target::low_stopped_by_watchpoint): ...this.
1631 (cris_stopped_data_address): Turn into...
1632 (crisv32_target::low_stopped_data_address): ...this.
1633 (the_low_target): Remove the op fields.
1634 * linux-mips-low.cc (class mips_target) <low_stopped_by_watchpoint>
1635 <low_stopped_data_address>: Declare.
1636 (mips_stopped_by_watchpoint): Turn into...
1637 (mips_target::low_stopped_by_watchpoint): ...this.
1638 (mips_stopped_data_address): Turn into...
1639 (mips_target::low_stopped_data_address): ...this.
1640 (the_low_target): Remove the op fields.
1641 * linux-bfin-low.cc (the_low_target): Remove the op fields.
1642 * linux-m32r-low.cc (the_low_target): Ditto.
1643 * linux-m68k-low.cc (the_low_target): Ditto.
1644 * linux-ppc-low.cc (the_low_target): Ditto.
1645 * linux-s390-low.cc (the_low_target): Ditto.
1646 * linux-sh-low.cc (the_low_target): Ditto.
1647 * linux-sparc-low.cc (the_low_target): Ditto.
1648 * linux-tic6x-low.cc (the_low_target): Ditto.
1649 * linux-tile-low.cc (the_low_target): Ditto.
1650 * linux-xtensa-low.cc (the_low_target): Ditto.
1651
1652 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1653
1654 Turn the 'insert_point' and 'remove_point' linux target ops into
1655 methods of linux_process_target.
1656
1657 * linux-low.h (struct linux_target_ops): Remove the ops.
1658 (class linux_process_target) <low_insert_point>
1659 <low_remove_point>: Declare.
1660 * linux-low.cc (linux_process_target::low_insert_point)
1661 (linux_process_target::low_remove_point): Define.
1662 (linux_process_target::insert_point)
1663 (linux_process_target::remove_point): Update for calls to
1664 low_insert_point and low_remove_point.
1665 * linux-x86-low.cc (class x86_target) <low_insert_point>
1666 <low_remove_point>: Declare.
1667 (x86_insert_point): Turn into...
1668 (x86_target::low_insert_point): ...this.
1669 (x86_remove_point): Turn into...
1670 (x86_target::low_remove_point): ...this.
1671 (the_low_target): Remove the op fields.
1672 * linux-aarch64-low.cc (class aarch64_target) <low_insert_point>
1673 <low_remove_point>: Declare.
1674 (aarch64_insert_point): Turn into...
1675 (aarch64_target::low_insert_point): ...this.
1676 (aarch64_remove_point): Turn into...
1677 (aarch64_target::low_remove_point): ...this.
1678 (the_low_target): Remove the op fields.
1679 * linux-arm-low.cc (class arm_target) <low_insert_point>
1680 <low_remove_point>: Declare.
1681 (arm_insert_point): Turn into...
1682 (arm_target::low_insert_point): ...this.
1683 (arm_remove_point): Turn into...
1684 (arm_target::low_remove_point): ...this.
1685 (the_low_target): Remove the op fields.
1686 * linux-crisv32-low.cc (class crisv32_target) <low_insert_point>
1687 <low_remove_point>: Declare.
1688 (crisv32_insert_point): Turn into...
1689 (crisv32_target::low_insert_point): ...this.
1690 (crisv32_remove_point): Turn into...
1691 (crisv32_target::low_remove_point): ...this.
1692 (the_low_target): Remove the op fields.
1693 * linux-mips-low.cc (class mips_target) <low_insert_point>
1694 <low_remove_point>: Declare.
1695 (mips_insert_point): Turn into...
1696 (mips_target::low_insert_point): ...this.
1697 (mips_remove_point): Turn into...
1698 (mips_target::low_remove_point): ...this.
1699 (the_low_target): Remove the op fields.
1700 * linux-ppc-low.cc (class ppc_target) <low_insert_point>
1701 <low_remove_point>: Declare.
1702 (ppc_insert_point): Turn into...
1703 (ppc_target::low_insert_point): ...this.
1704 (ppc_remove_point): Turn into...
1705 (ppc_target::low_remove_point): ...this.
1706 (the_low_target): Remove the op fields.
1707 * linux-bfin-low.cc (the_low_target): Remove the op fields.
1708 * linux-m32r-low.cc (the_low_target): Ditto.
1709 * linux-m68k-low.cc (the_low_target): Ditto.
1710 * linux-s390-low.cc (the_low_target): Ditto.
1711 * linux-sh-low.cc (the_low_target): Ditto.
1712 * linux-sparc-low.cc (the_low_target): Ditto.
1713 * linux-tic6x-low.cc (the_low_target): Ditto.
1714 * linux-tile-low.cc (the_low_target): Ditto.
1715 * linux-xtensa-low.cc (the_low_target): Ditto.
1716
1717 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1718
1719 Remove the 'supports_z_point_type' linux target op and let the
1720 concrete linux target define it by overriding the op declared in
1721 process_stratum_target.
1722
1723 * linux-low.cc (linux_process_target::supports_z_point_type):
1724 Remove.
1725 * linux-low.h (struct linux_target_ops): Remove the op.
1726 (class linux_process_target) <supports_z_point_type>: Remove.
1727 * linux-x86-low.cc (class x86_target) <supports_z_point_type>:
1728 Declare.
1729 (x86_supports_z_point_type): Turn into...
1730 (x86_target::supports_z_point_type): ...this.
1731 (the_low_target): Remove the op field.
1732 * linux-aarch64-low.cc (class aarch64_target)
1733 <supports_z_point_type>: Declare.
1734 (aarch64_supports_z_point_type): Turn into...
1735 (aarch64_target::supports_z_point_type): ...this.
1736 (the_low_target): Remove the op field.
1737 * linux-arm-low.cc (class arm_target) <supports_z_point_type>:
1738 Declare.
1739 (arm_supports_z_point_type): Turn into...
1740 (arm_target::supports_z_point_type): ...this.
1741 (the_low_target): Remove the op field.
1742 * linux-crisv32-low.cc (class crisv32_target)
1743 <supports_z_point_type>: Declare.
1744 (cris_supports_z_point_type): Turn into...
1745 (crisv32_target::supports_z_point_type): ...this.
1746 (the_low_target): Remove the op field.
1747 * linux-mips-low.cc (class mips_target) <supports_z_point_type>:
1748 Declare.
1749 (mips_supports_z_point_type): Turn into...
1750 (mips_target::supports_z_point_type): ...this.
1751 (the_low_target): Remove the op field.
1752 * linux-ppc-low.cc (class ppc_target) <supports_z_point_type>:
1753 Declare.
1754 (ppc_supports_z_point_type): Turn into...
1755 (ppc_target::supports_z_point_type): ...this.
1756 (the_low_target): Remove the op field.
1757 * linux-s390-low.cc (class s390_target) <supports_z_point_type>:
1758 Declare.
1759 (s390_supports_z_point_type): Turn into...
1760 (s390_target::supports_z_point_type): ...this.
1761 (the_low_target): Remove the op field.
1762 * linux-bfin-low.cc (the_low_target): Remove the op field.
1763 * linux-m32r-low.cc (the_low_target): Ditto.
1764 * linux-m68k-low.cc (the_low_target): Ditto.
1765 * linux-sh-low.cc (the_low_target): Ditto.
1766 * linux-sparc-low.cc (the_low_target): Ditto.
1767 * linux-tic6x-low.cc (the_low_target): Ditto.
1768 * linux-tile-low.cc (the_low_target): Ditto.
1769 * linux-xtensa-low.cc (the_low_target): Ditto.
1770
1771 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1772
1773 Turn the 'breakpoint_at' linux target op into a method of
1774 linux_process_target.
1775
1776 * linux-low.h (struct linux_target_ops): Remove the op.
1777 (class linux_process_target) <low_breakpoint_at>: Declare.
1778
1779 Update the callers below:
1780
1781 * linux-low.cc (linux_process_target::save_stop_reason)
1782 (linux_process_target::thread_still_has_status_pending)
1783 (linux_process_target::wait_1)
1784
1785 * linux-x86-low.cc (class x86_target)
1786 <low_breakpoint_at>: Declare.
1787 (x86_breakpoint_at): Turn into...
1788 (x86_target::low_breakpoint_at): ...this.
1789 (the_low_target): Remove the op field.
1790 * linux-aarch64-low.cc (class aarch64_target)
1791 <low_breakpoint_at>: Declare.
1792 (aarch64_breakpoint_at): Turn into...
1793 (aarch64_target::low_breakpoint_at): ...this.
1794 (the_low_target): Remove the op field.
1795 * linux-arm-low.cc (class arm_target)
1796 <low_breakpoint_at>: Declare.
1797 (arm_target::low_breakpoint_at): Define.
1798 (the_low_target): Remove the op field.
1799 * linux-bfin-low.cc (class bfin_target)
1800 <low_breakpoint_at>: Declare.
1801 (bfin_breakpoint_at): Turn into...
1802 (bfin_target::low_breakpoint_at): ...this.
1803 (the_low_target): Remove the op field.
1804 * linux-cris-low.cc (class cris_target)
1805 <low_breakpoint_at>: Declare.
1806 (cris_breakpoint_at): Turn into...
1807 (cris_target::low_breakpoint_at): ...this.
1808 (the_low_target): Remove the op field.
1809 * linux-crisv32-low.cc (class crisv32_target)
1810 <low_breakpoint_at>: Declare.
1811 (crisv32_breakpoint_at): Turn into...
1812 (crisv32_target::low_breakpoint_at): ...this.
1813 (the_low_target): Remove the op field.
1814 * linux-ia64-low.cc (class ia64_target)
1815 <low_breakpoint_at>: Declare.
1816 (ia64_target::low_breakpoint_at): Define.
1817 * linux-m32r-low.cc (class m32r_target)
1818 <low_breakpoint_at>: Declare.
1819 (m32r_breakpoint_at): Turn into...
1820 (m32r_target::low_breakpoint_at): ...this.
1821 (the_low_target): Remove the op field.
1822 * linux-m68k-low.cc (class m68k_target)
1823 <low_breakpoint_at>: Declare.
1824 (m68k_breakpoint_at): Turn into...
1825 (m68k_target::low_breakpoint_at): ...this.
1826 (the_low_target): Remove the op field.
1827 * linux-mips-low.cc (class mips_target)
1828 <low_breakpoint_at>: Declare.
1829 (mips_breakpoint_at): Turn into...
1830 (mips_target::low_breakpoint_at): ...this.
1831 (the_low_target): Remove the op field.
1832 * linux-nios2-low.cc (class nios2_target)
1833 <low_breakpoint_at>: Declare.
1834 (nios2_breakpoint_at): Turn into...
1835 (nios2_target::low_breakpoint_at): ...this.
1836 (the_low_target): Remove the op field.
1837 * linux-ppc-low.cc (class ppc_target)
1838 <low_breakpoint_at>: Declare.
1839 (ppc_breakpoint_at): Turn into...
1840 (ppc_target::low_breakpoint_at): ...this.
1841 (the_low_target): Remove the op field.
1842 * linux-riscv-low.cc (class riscv_target)
1843 <low_breakpoint_at>: Declare.
1844 (riscv_breakpoint_at): Turn into...
1845 (riscv_target::low_breakpoint_at): ...this.
1846 (the_low_target): Remove the op field.
1847 * linux-s390-low.cc (class s390_target)
1848 <low_breakpoint_at>: Declare.
1849 (s390_breakpoint_at): Turn into...
1850 (s390_target::low_breakpoint_at): ...this.
1851 (the_low_target): Remove the op field.
1852 * linux-sh-low.cc (class sh_target)
1853 <low_breakpoint_at>: Declare.
1854 (sh_breakpoint_at): Turn into...
1855 (sh_target::low_breakpoint_at): ...this.
1856 (the_low_target): Remove the op field.
1857 * linux-sparc-low.cc (class sparc_target)
1858 <low_breakpoint_at>: Declare.
1859 (sparc_breakpoint_at): Turn into...
1860 (sparc_target::low_breakpoint_at): ...this.
1861 (the_low_target): Remove the op field.
1862 * linux-tic6x-low.cc (class tic6x_target)
1863 <low_breakpoint_at>: Declare.
1864 (tic6x_breakpoint_at): Turn into...
1865 (tic6x_target::low_breakpoint_at): ...this.
1866 (the_low_target): Remove the op field.
1867 * linux-tile-low.cc (class tile_target)
1868 <low_breakpoint_at>: Declare.
1869 (tile_breakpoint_at): Turn into...
1870 (tile_target::low_breakpoint_at): ...this.
1871 (the_low_target): Remove the op field.
1872 * linux-xtensa-low.cc (class xtensa_target)
1873 <low_breakpoint_at>: Declare.
1874 (xtensa_breakpoint_at): Turn into...
1875 (xtensa_target::low_breakpoint_at): ...this.
1876 (the_low_target): Remove the op field.
1877
1878 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1879
1880 Turn the 'decr_pc_after_break' linux_target_ops field into
1881 a method of linux_process_target.
1882
1883 * linux-low.h (struct linux_target_ops)
1884 <decr_pc_after_break>: Remove.
1885 (class linux_process_target) <low_decr_pc_after_break>: New method
1886 declaration.
1887 * linux-low.cc (linux_process_target::low_decr_pc_after_break):
1888 New method implementation.
1889
1890 Update the users below.
1891
1892 (linux_process_target::save_stop_reason)
1893 (linux_process_target::wait_1)
1894 * linux-x86-low.cc (class x86_target) <low_decr_pc_after_break>:
1895 New declaration.
1896 (x86_target::low_decr_pc_after_break): New method implementation.
1897 (the_low_target): Remove the field.
1898 * linux-bfin-low.cc (class bfin_target) <low_decr_pc_after_break>:
1899 New declaration.
1900 (bfin_target::low_decr_pc_after_break): New method implementation.
1901 (the_low_target): Remove the field.
1902 * linux-m68k-low.cc (class m68k_target) <low_decr_pc_after_break>:
1903 New declaration.
1904 (m68k_target::low_decr_pc_after_break): New method implementation.
1905 (the_low_target): Remove the field.
1906 * linux-s390-low.cc (class s390_target) <low_decr_pc_after_break>:
1907 New declaration.
1908 (s390_target::low_decr_pc_after_break): New method implementation.
1909 (the_low_target): Remove the field.
1910 * linux-aarch64-low.cc (the_low_target): Remove the field.
1911 * linux-arm-low.cc (the_low_target): Remove the field.
1912 * linux-cris-low.cc (the_low_target): Remove the field.
1913 * linux-crisv32-low.cc (the_low_target): Remove the field.
1914 * linux-m32r-low.cc (the_low_target): Remove the field.
1915 * linux-mips-low.cc (the_low_target): Remove the field.
1916 * linux-nios2-low.cc (the_low_target): Remove the field.
1917 * linux-ppc-low.cc (the_low_target): Remove the field.
1918 * linux-riscv-low.cc (the_low_target): Remove the field.
1919 * linux-sh-low.cc (the_low_target): Remove the field.
1920 * linux-sparc-low.cc (the_low_target): Remove the field.
1921 * linux-tic6x-low.cc (the_low_target): Remove the field.
1922 * linux-tile-low.cc (the_low_target): Remove the field.
1923 * linux-xtensa-low.cc (the_low_target): Remove the field.
1924
1925 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1926
1927 Remove the 'supports_software_single_step' linux target op and let
1928 the concrete linux target define it by overriding the op in
1929 process_stratum_target.
1930 Turn the 'get_next_pcs' linux target op into a method of
1931 linux_process_target.
1932
1933 * linux-low.h (struct linux_target_ops): Remove the ops.
1934 (class linux_process_target) <supports_software_single_step>:
1935 Remove.
1936 <low_get_next_pcs>: Declare.
1937 * linux-low.cc (can_software_single_step): Remove.
1938 (linux_process_target::low_get_next_pcs): Define.
1939 (linux_process_target::supports_software_single_step): Remove.
1940
1941 Update the callers below.
1942
1943 (linux_process_target::handle_extended_wait)
1944 (linux_process_target::wait_1)
1945 (linux_process_target::install_software_single_step_breakpoints)
1946 (linux_process_target::single_step)
1947 (linux_process_target::thread_needs_step_over)
1948 (linux_process_target::proceed_one_lwp)
1949 (linux_process_target::supports_range_stepping)
1950
1951 * linux-x86-low.cc (the_low_target): Remove the op field.
1952 * linux-aarch64-low.cc (the_low_target): Ditto.
1953 * linux-bfin-low.cc (the_low_target): Ditto.
1954 * linux-cris-low.cc (the_low_target): Ditto.
1955 * linux-crisv32-low.cc (the_low_target): Ditto.
1956 * linux-m32r-low.cc (the_low_target): Ditto.
1957 * linux-m68k-low.cc (the_low_target): Ditto.
1958 * linux-mips-low.cc (the_low_target): Ditto.
1959 * linux-nios2-low.cc (the_low_target): Ditto.
1960 * linux-ppc-low.cc (the_low_target): Ditto.
1961 * linux-riscv-low.cc (the_low_target): Ditto.
1962 * linux-s390-low.cc (the_low_target): Ditto.
1963 * linux-sh-low.cc (the_low_target): Ditto.
1964 * linux-sparc-low.cc (the_low_target): Ditto.
1965 * linux-tic6x-low.cc (the_low_target): Ditto.
1966 * linux-tile-low.cc (the_low_target): Ditto.
1967 * linux-xtensa-low.cc (the_low_target): Ditto.
1968 * linux-arm-low.cc (class arm_target) <low_get_next_pcs>
1969 <supports_software_single_step>: Declare.
1970 (arm_target::supports_software_single_step): Define.
1971 (arm_gdbserver_get_next_pcs): Turn into...
1972 (arm_target::low_get_next_pcs): ...this.
1973 (the_low_target): Remove the op field.
1974
1975 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1976
1977 Remove the 'sw_breakpoint_from_kind' linux target op, and let
1978 the concrete linux target define it by overriding the op
1979 in process_stratum_target.
1980
1981 * linux-low.cc (linux_process_target::sw_breakpoint_from_kind):
1982 Remove.
1983 * linux-low.h (struct linux_target_ops): Remove the op.
1984 (class linux_process_target) <sw_breakpoint_from_kind>: Remove.
1985 * linux-x86-low.cc (class x86_target) <sw_breakpoint_from_kind>:
1986 Declare.
1987 (x86_sw_breakpoint_from_kind): Turn into...
1988 (x86_target::sw_breakpoint_from_kind): ...this.
1989 (the_low_target): Remove the op field.
1990 * linux-aarch64-low.cc (class aarch64_target)
1991 <sw_breakpoint_from_kind>: Declare.
1992 (aarch64_sw_breakpoint_from_kind): Turn into...
1993 (aarch64_target::sw_breakpoint_from_kind): ...this.
1994 (the_low_target): Remove the op field.
1995 * linux-arm-low.cc (class arm_target) <sw_breakpoint_from_kind>:
1996 Declare.
1997 (arm_target::sw_breakpoint_from_kind): Define.
1998 (the_low_target): Remove the op field.
1999 * linux-bfin-low.cc (class bfin_target) <sw_breakpoint_from_kind>:
2000 Declare.
2001 (bfin_sw_breakpoint_from_kind): Turn into...
2002 (bfin_target::sw_breakpoint_from_kind): ...this.
2003 (the_low_target): Remove the op field.
2004 * linux-cris-low.cc (class cris_target) <sw_breakpoint_from_kind>:
2005 Declare.
2006 (cris_sw_breakpoint_from_kind): Turn into...
2007 (cris_target::sw_breakpoint_from_kind): ...this.
2008 (the_low_target): Remove the op field.
2009 * linux-crisv32-low.cc (class crisv32_target)
2010 <sw_breakpoint_from_kind>: Declare.
2011 (cris_sw_breakpoint_from_kind): Turn into...
2012 (crisv32_target::sw_breakpoint_from_kind): ...this.
2013 (the_low_target): Remove the op field.
2014 * linux-ia64-low.cc (class ia64_target) <sw_breakpoint_from_kind>:
2015 Declare.
2016 (ia64_target::sw_breakpoint_from_kind): Define.
2017 * linux-m32r-low.cc (class m32r_target) <sw_breakpoint_from_kind>:
2018 Declare.
2019 (m32r_sw_breakpoint_from_kind): Turn into...
2020 (m32r_target::sw_breakpoint_from_kind): ...this.
2021 (the_low_target): Remove the op field.
2022 * linux-m68k-low.cc (class m68k_target) <sw_breakpoint_from_kind>:
2023 Declare.
2024 (m68k_sw_breakpoint_from_kind): Turn into...
2025 (m68k_target::sw_breakpoint_from_kind): ...this.
2026 (the_low_target): Remove the op field.
2027 * linux-mips-low.cc (class mips_target) <sw_breakpoint_from_kind>:
2028 Declare.
2029 (mips_sw_breakpoint_from_kind): Turn into...
2030 (mips_target::sw_breakpoint_from_kind): ...this.
2031 (the_low_target): Remove the op field.
2032 * linux-nios2-low.cc (class nios2_target) <sw_breakpoint_from_kind>:
2033 Declare.
2034 (nios2_sw_breakpoint_from_kind): Turn into...
2035 (nios2_target::sw_breakpoint_from_kind): ...this.
2036 (the_low_target): Remove the op field.
2037 * linux-ppc-low.cc (class ppc_target) <sw_breakpoint_from_kind>:
2038 Declare.
2039 (ppc_sw_breakpoint_from_kind): Turn into...
2040 (ppc_target::sw_breakpoint_from_kind): ...this.
2041 (the_low_target): Remove the op field.
2042 * linux-riscv-low.cc (class riscv_target) <sw_breakpoint_from_kind>:
2043 Declare.
2044 (riscv_sw_breakpoint_from_kind): Turn into...
2045 (riscv_target::sw_breakpoint_from_kind): ...this.
2046 (the_low_target): Remove the op field.
2047 * linux-s390-low.cc (class s390_target) <sw_breakpoint_from_kind>:
2048 Declare.
2049 (s390_sw_breakpoint_from_kind): Turn into...
2050 (s390_target::sw_breakpoint_from_kind): ...this.
2051 (the_low_target): Remove the op field.
2052 * linux-sh-low.cc (class sh_target) <sw_breakpoint_from_kind>:
2053 Declare.
2054 (sh_sw_breakpoint_from_kind): Turn into...
2055 (sh_target::sw_breakpoint_from_kind): ...this.
2056 (the_low_target): Remove the op field.
2057 * linux-sparc-low.cc (class sparc_target) <sw_breakpoint_from_kind>:
2058 Declare.
2059 (sparc_sw_breakpoint_from_kind): Turn into...
2060 (sparc_target::sw_breakpoint_from_kind): ...this.
2061 (the_low_target): Remove the op field.
2062 * linux-tic6x-low.cc (class tic6x_target) <sw_breakpoint_from_kind>:
2063 Declare.
2064 (tic6x_sw_breakpoint_from_kind): Turn into...
2065 (tic6x_target::sw_breakpoint_from_kind): ...this.
2066 (the_low_target): Remove the op field.
2067 * linux-tile-low.cc (class tile_target) <sw_breakpoint_from_kind>:
2068 Declare.
2069 (tile_sw_breakpoint_from_kind): Turn into...
2070 (tile_target::sw_breakpoint_from_kind): ...this.
2071 (the_low_target): Remove the op field.
2072 * linux-xtensa-low.cc (class xtensa_target)
2073 <sw_breakpoint_from_kind>: Declare.
2074 (xtensa_sw_breakpoint_from_kind): Turn into...
2075 (xtensa_target::sw_breakpoint_from_kind): ...this.
2076 (the_low_target): Remove the op field.
2077
2078 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2079
2080 Remove the 'breakpoint_kind_from_pc' and
2081 'breakpoint_kind_from_current_state' linux target ops, and let the
2082 concrete linux target define them by overriding the ops of
2083 process_stratum_target.
2084
2085 * linux-low.cc (linux_process_target::breakpoint_kind_from_pc):
2086 Remove.
2087 (linux_process_target::breakpoint_kind_from_current_state): Remove.
2088 * linux-low.h (struct linux_target_ops): Remove ops.
2089 (class linux_process_target) <breakpoint_kind_from_pc>: Remove.
2090 <breakpoint_kind_from_current_state>: Remove.
2091 * linux-x86-low.cc (the_low_target): Remove the op fields.
2092 * linux-bfin-low.cc (the_low_target): Ditto.
2093 * linux-cris-low.cc (the_low_target): Ditto.
2094 * linux-crisv32-low.cc (the_low_target): Ditto.
2095 * linux-m32r-low.cc (the_low_target): Ditto.
2096 * linux-m68k-low.cc (the_low_target): Ditto.
2097 * linux-mips-low.cc (the_low_target): Ditto.
2098 * linux-nios2-low.cc (the_low_target): Ditto.
2099 * linux-ppc-low.cc (the_low_target): Ditto.
2100 * linux-s390-low.cc (the_low_target): Ditto.
2101 * linux-sh-low.cc (the_low_target): Ditto.
2102 * linux-sparc-low.cc (the_low_target): Ditto.
2103 * linux-tic6x-low.cc (the_low_target): Ditto.
2104 * linux-tile-low.cc (the_low_target): Ditto.
2105 * linux-xtensa-low.cc (the_low_target): Ditto.
2106 * linux-aarch64-low.cc (class aarch64_target)
2107 <breakpoint_kind_from_pc>
2108 <breakpoint_kind_from_current_state>: Declare.
2109 (aarch64_breakpoint_kind_from_pc): Turn into...
2110 (aarch64_target::breakpoint_kind_from_pc): ...this.
2111 (aarch64_breakpoint_kind_from_current_state): Turn into...
2112 (aarch64_target::breakpoint_kind_from_current_state): ...this.
2113 (the_low_target): Remove the op fields.
2114 * linux-arm-low.cc (class arm_target):
2115 <breakpoint_kind_from_pc>
2116 <breakpoint_kind_from_current_state>: Declare.
2117 (arm_target::breakpoint_kind_from_pc): Define.
2118 (arm_target::breakpoint_kind_from_current_state): Define.
2119 (the_low_target): Remove the op fields.
2120 * linux-riscv-low.cc (class riscv_target):
2121 <breakpoint_kind_from_pc>: Declare.
2122 (riscv_breakpoint_kind_from_pc): Turn into...
2123 (riscv_target::breakpoint_kind_from_pc): ...this.
2124 (the_low_target): Remove the op fields.
2125
2126 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2127
2128 Turn the 'get_pc' and 'set_pc' linux target ops into methods
2129 of linux_process_target.
2130
2131 * linux-low.h (struct linux_target_ops): Remove the ops.
2132 (class linux_process_target) <low_supports_breakpoints>
2133 <low_get_pc>
2134 <low_set_pc>: Declare.
2135 * linux-low.cc (supports_breakpoints): Turn into...
2136 (linux_process_target::low_supports_breakpoints): ...this.
2137 (linux_process_target::low_get_pc): Define.
2138 (linux_process_target::low_set_pc): Define.
2139
2140 Update the callers below.
2141
2142 (linux_process_target::get_pc)
2143 (linux_process_target::save_stop_reason)
2144 (linux_process_target::maybe_move_out_of_jump_pad)
2145 (linux_process_target::wait_1)
2146 (linux_process_target::resume_one_lwp_throw)
2147 (linux_process_target::resume)
2148 (linux_process_target::proceed_all_lwps)
2149 (linux_process_target::read_pc)
2150 (linux_process_target::write_pc)
2151
2152 * linux-x86-low.cc (class linux_process_target)
2153 <low_supports_breakpoints>
2154 <low_get_pc>
2155 <low_set_pc>: Declare.
2156 (x86_target::low_supports_breakpoints): Define.
2157 (x86_get_pc): Turn into...
2158 (x86_target::low_get_pc): ...this.
2159 (x86_set_pc): Turn into...
2160 (x86_target::low_set_pc): ...this.
2161 (the_low_target): Remove the op fields.
2162 * linux-arm-low.cc (class arm_target)
2163 <low_supports_breakpoints>
2164 <low_get_pc>
2165 <low_set_pc>: Declare.
2166 (arm_target::low_supports_breakpoints)
2167 (arm_target::low_get_pc)
2168 (arm_target::low_set_pc): Define.
2169 (the_low_target): Remove the op fields.
2170 * linux-bfin-low.cc (class bfin_target)
2171 <low_supports_breakpoints>
2172 <low_get_pc>
2173 <low_set_pc>: Declare.
2174 (bfin_target::low_supports_breakpoints)
2175 (bfin_target::low_get_pc)
2176 (bfin_target::low_set_pc): Define.
2177 (the_low_target): Remove the op fields.
2178 * linux-cris-low.cc (class cris_target)
2179 <low_supports_breakpoints>
2180 <low_get_pc>
2181 <low_set_pc>: Declare.
2182 (cris_target::low_supports_breakpoints)
2183 (cris_target::low_get_pc)
2184 (cris_target::low_set_pc): Define.
2185 (the_low_target): Remove the op fields.
2186 * linux-crisv32-low.cc (class crisv32_target)
2187 <low_supports_breakpoints>
2188 <low_get_pc>
2189 <low_set_pc>: Declare.
2190 (crisv32_target::low_supports_breakpoints)
2191 (crisv32_target::low_get_pc)
2192 (crisv32_target::low_set_pc): Define.
2193 (the_low_target): Remove the op fields.
2194 * linux-m32r-low.cc (class m32r_target)
2195 <low_supports_breakpoints>
2196 <low_get_pc>
2197 <low_set_pc>: Declare.
2198 (m32r_target::low_supports_breakpoints)
2199 (m32r_target::low_get_pc)
2200 (m32r_target::low_set_pc): Define.
2201 (the_low_target): Remove the op fields.
2202 * linux-m68k-low.cc (class m68k_target)
2203 <low_supports_breakpoints>
2204 <low_get_pc>
2205 <low_set_pc>: Declare.
2206 (m68k_target::low_supports_breakpoints)
2207 (m68k_target::low_get_pc)
2208 (m68k_target::low_set_pc): Define.
2209 (the_low_target): Remove the op fields.
2210 * linux-nios2-low.cc (class nios2_target)
2211 <low_supports_breakpoints>
2212 <low_get_pc>
2213 <low_set_pc>: Declare.
2214 (nios2_target::low_supports_breakpoints)
2215 (nios2_target::low_get_pc)
2216 (nios2_target::low_set_pc): Define.
2217 (the_low_target): Remove the op fields.
2218 * linux-sh-low.cc (class sh_target)
2219 <low_supports_breakpoints>
2220 <low_get_pc>
2221 <low_set_pc>: Declare.
2222 (sh_target::low_supports_breakpoints)
2223 (sh_target::low_get_pc)
2224 (sh_target::low_set_pc): Define.
2225 (the_low_target): Remove the op fields.
2226 * linux-xtensa-low.cc (class xtensa_target)
2227 <low_supports_breakpoints>
2228 <low_get_pc>
2229 <low_set_pc>: Declare.
2230 (xtensa_target::low_supports_breakpoints)
2231 (xtensa_target::low_get_pc)
2232 (xtensa_target::low_set_pc): Define.
2233 (the_low_target): Remove the op fields.
2234 * linux-sparc-low.cc (class sparc_target)
2235 <low_supports_breakpoints>
2236 <low_get_pc>: Declare.
2237 (sparc_target::low_supports_breakpoints)
2238 (sparc_target::low_get_pc): Define.
2239 (the_low_target): Remove the op fields.
2240 * linux-tile-low.cc (class tile_target)
2241 <low_supports_breakpoints>
2242 <low_get_pc>
2243 <low_set_pc>: Declare.
2244 (tile_target::low_supports_breakpoints)
2245 (tile_target::low_get_pc)
2246 (tile_target::low_set_pc): Define.
2247 (the_low_target): Remove the op fields.
2248 * linux-aarch64-low.cc (class aarch64_target)
2249 <low_supports_breakpoints>
2250 <low_get_pc>
2251 <low_set_pc>: Declare.
2252 (aarch64_target::low_supports_breakpoints): Define.
2253 (aarch64_get_pc): Turn into...
2254 (aarch64_target::low_get_pc): ...this.
2255 (aarch64_set_pc): Turn into...
2256 (aarch64_target::low_set_pc): ...this.
2257 (the_low_target): Remove the op fields.
2258 * linux-mips-low.cc (class mips_target)
2259 <low_supports_breakpoints>
2260 <low_get_pc>
2261 <low_set_pc>: Declare.
2262 (mips_target::low_supports_breakpoints): Define.
2263 (mips_get_pc): Turn into...
2264 (mips_target::low_get_pc): ...this.
2265 (mips_set_pc): Turn into...
2266 (mips_target::low_set_pc): ...this.
2267 (the_low_target): Remove the op fields.
2268 * linux-ppc-low.cc (class ppc_target)
2269 <low_supports_breakpoints>
2270 <low_get_pc>
2271 <low_set_pc>: Declare.
2272 (ppc_target::low_supports_breakpoints): Define.
2273 (ppc_get_pc): Turn into...
2274 (ppc_target::low_get_pc): ...this.
2275 (ppc_set_pc): Turn into...
2276 (ppc_target::low_set_pc): ...this.
2277 (the_low_target): Remove the op fields.
2278 * linux-riscv-low.cc (class riscv_target)
2279 <low_supports_breakpoints>
2280 <low_get_pc>
2281 <low_set_pc>: Declare.
2282 (riscv_target::low_supports_breakpoints): Define.
2283 (riscv_get_pc): Turn into...
2284 (riscv_target::low_get_pc): ...this.
2285 (riscv_set_pc): Turn into...
2286 (riscv_target::low_set_pc): ...this.
2287 (the_low_target): Remove the op fields.
2288 * linux-s390-low.cc (class s390_target)
2289 <low_supports_breakpoints>
2290 <low_get_pc>
2291 <low_set_pc>: Declare.
2292 (s390_target::low_supports_breakpoints): Define.
2293 (s390_get_pc): Turn into...
2294 (s390_target::low_get_pc): ...this.
2295 (s390_set_pc): Turn into...
2296 (s390_target::low_set_pc): ...this.
2297 (the_low_target): Remove the op fields.
2298 * linux-tic6x-low.cc (class tic6x_target)
2299 <low_supports_breakpoints>
2300 <low_get_pc>
2301 <low_set_pc>: Declare.
2302 (tic6x_target::low_supports_breakpoints): Define.
2303 (tic6x_get_pc): Turn into...
2304 (tic6x_target::low_get_pc): ...this.
2305 (tic6x_set_pc): Turn into...
2306 (tic6x_target::low_set_pc): ...this.
2307 (the_low_target): Remove the op fields.
2308
2309 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2310
2311 Turn some more static methods in linux-low into private methods
2312 of linux_process_target.
2313
2314 * linux-low.cc (get_pc): Turn into...
2315 (linux_process_target::get_pc): ...this.
2316 (save_stop_reason): Turn into...
2317 (linux_process_target::save_stop_reason): ...this.
2318 (thread_still_has_status_pending_p): Turn into...
2319 (linux_process_target::thread_still_has_status_pending): ...this.
2320 (status_pending_p_callback): Turn into...
2321 (linux_process_target::status_pending_p_callback): ...this.
2322 (resume_stopped_resumed_lwps): Turn into...
2323 (linux_process_target::resume_stopped_resumed_lwps): ...this.
2324 (install_software_single_step_breakpoints): Turn into...
2325 (linux_process_target::install_software_single_step_breakpoints):
2326 ...this.
2327 (single_step): Turn into...
2328 (linux_process_target::single_step): ...this.
2329 (linux_resume_one_lwp_throw): Turn into...
2330 (linux_process_target::resume_one_lwp_throw): ...this.
2331 (linux_resume_one_lwp): Turn into...
2332 (linux_process_target::resume_one_lwp): ...this.
2333 (resume_status_pending_p): Turn into...
2334 (linux_process_target::resume_status_pending): ...this.
2335 (need_step_over_p): Turn into...
2336 (linux_process_target::thread_needs_step_over): ...this.
2337 (linux_resume_one_thread): Turn into...
2338 (linux_process_target::resume_one_thread): ...this.
2339 (proceed_one_lwp): Turn into...
2340 (linux_process_target::proceed_one_lwp): ...this.
2341 (unsuspend_and_proceed_one_lwp): Turn into...
2342 (linux_process_target::unsuspend_and_proceed_one_lwp): ...this.
2343
2344 Update the calls/references to the above functions below.
2345
2346 (linux_process_target::handle_extended_wait)
2347 (linux_process_target::filter_event)
2348 (linux_process_target::wait_for_event_filtered)
2349 (linux_process_target::wait_1)
2350 (linux_process_target::move_out_of_jump_pad)
2351 (linux_process_target::start_step_over)
2352 (linux_process_target::resume)
2353 (linux_process_target::proceed_all_lwps)
2354 (regsets_store_inferior_registers)
2355 (linux_process_target::store_register)
2356
2357 * linux-low.h (class linux_process_target)
2358 <get_pc>
2359 <save_stop_reason>
2360 <thread_still_has_status_pending>
2361 <status_pending_p_callback>
2362 <resume_stopped_resumed_lwps>
2363 <install_software_single_step_breakpoints>
2364 <single_step>
2365 <resume_one_lwp_throw>
2366 <resume_one_lwp>
2367 <resume_status_pending>
2368 <thread_needs_step_over>
2369 <resume_one_thread>
2370 <proceed_one_lwp>
2371 <unsuspend_and_proceed_one_lwp>: Declare.
2372
2373 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2374
2375 Turn the 'fetch_register' linux target op into a method of
2376 linux_process_target.
2377
2378 * linux-low.h (struct linux_target_ops) <fetch_register>: Remove.
2379 (class linux_process_target) <low_fetch_register>: Declare.
2380 * linux-x86-low.cc (the_low_target)
2381 * linux-aarch64-low.cc (the_low_target)
2382 * linux-arm-low.cc (the_low_target)
2383 * linux-bfin-low.cc (the_low_target)
2384 * linux-cris-low.cc (the_low_target)
2385 * linux-crisv32-low.cc (the_low_target)
2386 * linux-m32r-low.cc (the_low_target)
2387 * linux-m68k-low.cc (the_low_target)
2388 * linux-nios2-low.cc (the_low_target)
2389 * linux-ppc-low.cc (the_low_target)
2390 * linux-s390-low.cc (the_low_target)
2391 * linux-sh-low.cc (the_low_target)
2392 * linux-sparc-low.cc (the_low_target)
2393 * linux-tic6x-low.cc (the_low_target)
2394 * linux-tile-low.cc (the_low_target)
2395 * linux-xtensa-low.cc (the_low_target): Remove the op field.
2396 * linux-ia64-low.cc (class ia64_target) <low_fetch_register>:
2397 Declare.
2398 (ia64_fetch_register): Turn into...
2399 (ia64_target::low_fetch_register): ...this.
2400 (the_low_target): Remove the op field.
2401 * linux-mips-low.cc (class mips_target) <low_fetch_register>:
2402 Declare.
2403 (mips_fetch_register): Turn into...
2404 (mips_target::low_fetch_register): ...this.
2405 (the_low_target): Remove the op field.
2406 * linux-riscv-low.cc (class riscv_target) <low_fetch_register>:
2407 Declare.
2408 (riscv_fetch_register): Turn into...
2409 (riscv_target::low_fetch_register): ...this.
2410 (the_low_target): Remove the op field.
2411
2412 Update the callers below.
2413
2414 * linux-low.cc (linux_process_target::fetch_registers)
2415 (linux_process_target::low_fetch_register)
2416
2417 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2418
2419 Turn the 'cannot_fetch_register' and 'cannot_store_register'
2420 linux target ops into methods of linux_process_target.
2421
2422 * linux-low.h (struct linux_target_ops): Remove the low target ops.
2423 (class linux_process_target) <fetch_register>
2424 <store_register>
2425 <usr_fetch_inferior_registers>
2426 <usr_store_inferior_registers>
2427 <low_cannot_fetch_register>
2428 <low_cannot_fetch_register> Declare.
2429 * linux-low.cc (fetch_register): Turn into...
2430 (linux_process_target::fetch_register): ...this.
2431 (store_register): Turn into ...
2432 (linux_process_target::store_register): ...this.
2433 (usr_fetch_inferior_registers): Turn into...
2434 (linux_process_target::usr_fetch_inferior_registers): ...this.
2435 (usr_store_inferior_registers): Turn into...
2436 (linux_process_target::usr_store_inferior_registers): ...this.
2437 * linux-x86-low.cc (class x86_target)
2438 <low_cannot_fetch_register>
2439 <low_cannot_store_register>: Declare.
2440 (x86_cannot_store_register): Turn into...
2441 (x86_target::low_cannot_store_register): ...this.
2442 (x86_cannot_fetch_register): Turn into...
2443 (x86_target::low_cannot_fetch_register): ...this.
2444 (the_low_target): Remove the target op fields.
2445 * linux-aarch64-low.cc (class aarch64_target)
2446 <low_cannot_fetch_register>
2447 <low_cannot_store_register>: Declare.
2448 (aarch64_target::low_cannot_fetch_register)
2449 (aarch64_target::low_cannot_store_register): Define.
2450 (the_low_target): Remove the op fields.
2451 * linux-arm-low.cc (class arm_target)
2452 <low_cannot_fetch_register>
2453 <low_cannot_store_register>: Declare.
2454 (arm_cannot_fetch_register): Turn into...
2455 (arm_target::low_cannot_fetch_register): ...this.
2456 (arm_cannot_store_register): Turn into...
2457 (arm_target::low_cannot_store_register): ...this.
2458 (the_low_target): Remove the op fields.
2459 * linux-bfin-low.cc (class bfin_target)
2460 <low_cannot_fetch_register>
2461 <low_cannot_store_register>: Declare.
2462 (bfin_cannot_fetch_register): Turn into...
2463 (bfin_target::low_cannot_fetch_register): ...this.
2464 (bfin_cannot_store_register): Turn into...
2465 (bfin_target::low_cannot_store_register): ...this.
2466 (the_low_target): Remove the op fields.
2467 * linux-cris-low.cc (class cris_target)
2468 <low_cannot_fetch_register>
2469 <low_cannot_store_register>: Declare.
2470 (cris_cannot_fetch_register): Turn into...
2471 (cris_target::low_cannot_fetch_register): ...this.
2472 (cris_cannot_store_register): Turn into...
2473 (cris_target::low_cannot_store_register): ...this.
2474 (the_low_target): Remove the op fields.
2475 * linux-crisv32-low.cc (class crisv32_target)
2476 <low_cannot_fetch_register>
2477 <low_cannot_store_register>: Declare.
2478 (crisv32_target::low_cannot_fetch_register)
2479 (crisv32_target::low_cannot_store_register): Define.
2480 (the_low_target): Remove the op fields.
2481 * linux-ia64-low.cc (class ia64_target)
2482 <low_cannot_fetch_register>
2483 <low_cannot_store_register>: Declare.
2484 (ia64_cannot_fetch_register): Turn into...
2485 (ia64_target::low_cannot_fetch_register): ...this.
2486 (ia64_cannot_store_register): Turn into...
2487 (ia64_target::low_cannot_store_register): ...this.
2488 (the_low_target): Remove the op fields.
2489 * linux-m32r-low.cc (class m32r_target)
2490 <low_cannot_fetch_register>
2491 <low_cannot_store_register>: Declare.
2492 (m32r_cannot_fetch_register): Turn into...
2493 (m32r_target::low_cannot_fetch_register): ...this.
2494 (m32r_cannot_store_register): Turn into...
2495 (m32r_target::low_cannot_store_register): ...this.
2496 (the_low_target): Remove the op fields.
2497 * linux-m68k-low.cc (class m68k_target)
2498 <low_cannot_fetch_register>
2499 <low_cannot_store_register>: Declare.
2500 (m68k_cannot_fetch_register): Turn into...
2501 (m68k_target::low_cannot_fetch_register): ...this.
2502 (m68k_cannot_store_register): Turn into...
2503 (m68k_target::low_cannot_store_register): ...this.
2504 (the_low_target): Remove the op fields.
2505 * linux-mips-low.cc (class mips_target)
2506 <low_cannot_fetch_register>
2507 <low_cannot_store_register>: Declare.
2508 (mips_cannot_fetch_register): Turn into...
2509 (mips_target::low_cannot_fetch_register): ...this.
2510 (mips_cannot_store_register): Turn into...
2511 (mips_target::low_cannot_store_register): ...this.
2512 (get_usrregs_info): Inline at the call sites in
2513 low_cannot_fetch_register and low_cannot_store_register,
2514 and remove.
2515 (the_low_target): Remove the op fields.
2516 * linux-nios2-low.cc (class nios2_target)
2517 <low_cannot_fetch_register>
2518 <low_cannot_store_register>: Declare.
2519 (nios2_cannot_fetch_register): Turn into...
2520 (nios2_target::low_cannot_fetch_register): ...this.
2521 (nios2_cannot_store_register): Turn into...
2522 (nios2_target::low_cannot_store_register): ...this.
2523 (the_low_target): Remove the op fields.
2524 * linux-ppc-low.cc (class ppc_target)
2525 <low_cannot_fetch_register>
2526 <low_cannot_store_register>: Declare.
2527 (ppc_cannot_fetch_register): Turn into...
2528 (ppc_target::low_cannot_fetch_register): ...this.
2529 (ppc_cannot_store_register): Turn into...
2530 (ppc_target::low_cannot_store_register): ...this.
2531 (the_low_target): Remove the op fields.
2532 * linux-riscv-low.cc (class riscv_target)
2533 <low_cannot_fetch_register>
2534 <low_cannot_store_register>: Declare.
2535 (riscv_target::low_cannot_fetch_register)
2536 (riscv_target::low_cannot_store_register): Define.
2537 (the_low_target): Remove the op fields.
2538 * linux-s390-low.cc (class s390_target)
2539 <low_cannot_fetch_register>
2540 <low_cannot_store_register>: Declare.
2541 (s390_cannot_fetch_register): Turn into...
2542 (s390_target::low_cannot_fetch_register): ...this.
2543 (s390_cannot_store_register): Turn into...
2544 (s390_target::low_cannot_store_register): ...this.
2545 (the_low_target): Remove the op fields.
2546 * linux-sh-low.cc (class sh_target)
2547 <low_cannot_fetch_register>
2548 <low_cannot_store_register>: Declare.
2549 (sh_cannot_fetch_register): Turn into...
2550 (sh_target::low_cannot_fetch_register): ...this.
2551 (sh_cannot_store_register): Turn into...
2552 (sh_target::low_cannot_store_register): ...this.
2553 (the_low_target): Remove the op fields.
2554 * linux-sparc-low.cc (class sparc_target)
2555 <low_cannot_fetch_register>
2556 <low_cannot_store_register>: Declare.
2557 (sparc_cannot_fetch_register): Turn into...
2558 (sparc_target::low_cannot_fetch_register): ...this.
2559 (sparc_cannot_store_register): Turn into...
2560 (sparc_target::low_cannot_store_register): ...this.
2561 (the_low_target): Remove the op fields.
2562 * linux-tic6x-low.cc (class tic6x_target)
2563 <low_cannot_fetch_register>
2564 <low_cannot_store_register>: Declare.
2565 (tic6x_cannot_fetch_register): Turn into...
2566 (tic6x_target::low_cannot_fetch_register): ...this.
2567 (tic6x_cannot_store_register): Turn into...
2568 (tic6x_target::low_cannot_store_register): ...this.
2569 (the_low_target): Remove the op fields.
2570 * linux-tile-low.cc (class tile_target)
2571 <low_cannot_fetch_register>
2572 <low_cannot_store_register>: Declare.
2573 (tile_cannot_fetch_register): Turn into...
2574 (tile_target::low_cannot_fetch_register): ...this.
2575 (tile_cannot_store_register): Turn into...
2576 (tile_target::low_cannot_store_register): ...this.
2577 (the_low_target): Remove the op fields.
2578 * linux-xtensa-low.cc (class xtensa_target)
2579 <low_cannot_fetch_register>
2580 <low_cannot_store_register>: Declare.
2581 (xtensa_target::low_cannot_fetch_register)
2582 (xtensa_target::low_cannot_store_register): Define.
2583 (the_low_target): Remove the op fields.
2584
2585 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2586
2587 Turn the 'regs_info' linux target op into a method of
2588 linux_process_target.
2589
2590 * linux-low.h (struct linux_target_ops) <regs_info>: Remove.
2591 (class linux_process_target) <get_regs_info>: Define.
2592
2593 Update the callers below.
2594
2595 * linux-low.cc (linux_process_target::fetch_registers)
2596 (linux_process_target::store_registers)
2597 * proc-service.cc (gregset_info)
2598
2599 * linux-x86-low.cc (class x86_target) <get_regs_info>: Declare.
2600 (x86_linux_regs_info): Turn into ...
2601 (x86_target::get_regs_info): ...this.
2602 (the_low_target): Remove the op field.
2603 * linux-aarch64-low.cc (class aarch64_target) <get_regs_info>:
2604 Declare.
2605 (aarch64_regs_info): Turn into ...
2606 (aarch64_target::get_regs_info): ...this.
2607 (the_low_target): Remove the op field.
2608 * linux-arm-low.cc (class arm_target) <get_regs_info>: Declare.
2609 (arm_regs_info): Turn into ...
2610 (arm_target::get_regs_info): ...this.
2611 (the_low_target): Remove the op field.
2612 * linux-bfin-low.cc (class bfin_target) <get_regs_info>: Declare.
2613 (bfin_regs_info): Turn into ...
2614 (bfin_target::get_regs_info): ...this.
2615 (the_low_target): Remove the op field.
2616 * linux-cris-low.cc (class cris_target) <get_regs_info>: Declare.
2617 (cris_regs_info): Turn into ...
2618 (cris_target::get_regs_info): ...this.
2619 (the_low_target): Remove the op field.
2620 * linux-crisv32-low.cc (class crisv32_target) <get_regs_info>:
2621 Declare.
2622 (crisv32_regs_info): Turn into ...
2623 (crisv32_target::get_regs_info): ...this.
2624 (the_low_target): Remove the op field.
2625 * linux-ia64-low.cc (class ia64_target) <get_regs_info>: Declare.
2626 (ia64_regs_info): Turn into ...
2627 (ia64_target::get_regs_info): ...this.
2628 (the_low_target): Remove the op field.
2629 * linux-m32r-low.cc (class m32r_target) <get_regs_info>: Declare.
2630 (m32r_regs_info): Turn into ...
2631 (m32r_target::get_regs_info): ...this.
2632 (the_low_target): Remove the op field.
2633 * linux-m68k-low.cc (class m68k_target) <get_regs_info>: Declare.
2634 (m68k_regs_info): Turn into ...
2635 (m68k_target::get_regs_info): ...this.
2636 (the_low_target): Remove the op field.
2637 * linux-mips-low.cc (class mips_target) <get_regs_info>: Declare.
2638 (mips_regs_info): Turn into ...
2639 (mips_target::get_regs_info): ...this.
2640 (the_low_target): Remove the op field.
2641 (get_usrregs_info): Update the call to the op.
2642 * linux-nios2-low.cc (class nios2_target) <get_regs_info>: Declare.
2643 (nios2_regs_info): Turn into ...
2644 (nios2_target::get_regs_info): ...this.
2645 (the_low_target): Remove the op field.
2646 * linux-ppc-low.cc (class ppc_target) <get_regs_info>: Declare.
2647 (ppc_regs_info): Turn into ...
2648 (ppc_target::get_regs_info): ...this.
2649 (the_low_target): Remove the op field.
2650 * linux-riscv-low.cc (class riscv_target) <get_regs_info>: Declare.
2651 (riscv_regs_info): Turn into ...
2652 (riscv_target::get_regs_info): ...this.
2653 (the_low_target): Remove the op field.
2654 * linux-s390-low.cc (class s390_target) <get_regs_info>: Declare.
2655 (s390_regs_info): Turn into ...
2656 (s390_target::get_regs_info): ...this.
2657 (the_low_target): Remove the op field.
2658 (s390_collect_ptrace_register)
2659 (s390_supply_ptrace_register)
2660 (s390_fill_gregset): Update the call to the op.
2661 * linux-sh-low.cc (class sh_target) <get_regs_info>: Declare.
2662 (sh_regs_info): Turn into ...
2663 (sh_target::get_regs_info): ...this.
2664 (the_low_target): Remove the op field.
2665 * linux-sparc-low.cc (class sparc_target) <get_regs_info>: Declare.
2666 (sparc_regs_info): Turn into ...
2667 (sparc_target::get_regs_info): ...this.
2668 (the_low_target): Remove the op field.
2669 * linux-tic6x-low.cc (class tic6x_target) <get_regs_info>: Declare.
2670 (tic6x_regs_info): Turn into ...
2671 (tic6x_target::get_regs_info): ...this.
2672 (the_low_target): Remove the op field.
2673 * linux-tile-low.cc (class tile_target) <get_regs_info>: Declare.
2674 (tile_regs_info): Turn into ...
2675 (tile_target::get_regs_info): ...this.
2676 (the_low_target): Remove the op field.
2677 * linux-xtensa-low.cc (class xtensa_target) <get_regs_info>:
2678 Declare.
2679 (xtensa_regs_info): Turn into ...
2680 (xtensa_target::get_regs_info): ...this.
2681 (the_low_target): Remove the op field.
2682
2683 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2684
2685 Turn the 'arch_setup' linux target op into a method of
2686 linux_process_target.
2687
2688 * linux-low.h (struct linux_target_ops) <arch_setup>: Delete.
2689 (class linux_process_target) <arch_setup_thread>
2690 <low_arch_setup>: New declarations.
2691 * linux-low.cc (linux_arch_setup): Delete.
2692 (linux_arch_setup_thread): Turn into...
2693 (linux_process_target::arch_setup_thread): ... this.
2694
2695 Update the callers below.
2696
2697 (linux_process_target::handle_extended_wait)
2698 (linux_process_target::post_create_inferior)
2699 (linux_process_target::filter_event)
2700
2701 * linux-x86-low.cc (class x86_target) <low_arch_setup>: New
2702 declaration.
2703 (x86_linux_update_xmltarget): Turn into...
2704 (x86_target::update_xmltarget): ...this.
2705 (x86_linux_process_qsupported): Update the call to
2706 x86_linux_update_xmltarget.
2707 (x86_arch_setup): Turn into ...
2708 (x86_target::low_arch_setup): ...this.
2709 (the_low_target): Remove the op field.
2710 * linux-aarch64-low.cc (class aarch64_target) <low_arch_setup>: New
2711 declaration.
2712 (aarch64_arch_setup): Turn into ...
2713 (aarch64_target::low_arch_setup): ...this.
2714 (the_low_target): Remove the op field.
2715 * linux-arm-low.cc (class arm_target) <low_arch_setup>: New
2716 declaration.
2717 (arm_arch_setup): Turn into ...
2718 (arm_target::low_arch_setup): ...this.
2719 (the_low_target): Remove the op field.
2720 * linux-bfin-low.cc (class bfin_target) <low_arch_setup>: New
2721 declaration.
2722 (bfin_arch_setup): Turn into ...
2723 (bfin_target::low_arch_setup): ...this.
2724 (the_low_target): Remove the op field.
2725 * linux-cris-low.cc (class cris_target) <low_arch_setup>: New
2726 declaration.
2727 (cris_arch_setup): Turn into ...
2728 (cris_target::low_arch_setup): ...this.
2729 (the_low_target): Remove the op field.
2730 * linux-crisv32-low.cc (class crisv32_target) <low_arch_setup>: New
2731 declaration.
2732 (crisv32_arch_setup): Turn into ...
2733 (crisv32_target::low_arch_setup): ...this.
2734 (the_low_target): Remove the op field.
2735 * linux-ia64-low.cc (class ia64_target) <low_arch_setup>: New
2736 declaration.
2737 (ia64_arch_setup): Turn into ...
2738 (ia64_target::low_arch_setup): ...this.
2739 (the_low_target): Remove the op field.
2740 * linux-m32r-low.cc (class m32r_target) <low_arch_setup>: New
2741 declaration.
2742 (m32r_arch_setup): Turn into ...
2743 (m32r_target::low_arch_setup): ...this.
2744 (the_low_target): Remove the op field.
2745 * linux-m68k-low.cc (class m68k_target) <low_arch_setup>: New
2746 declaration.
2747 (m68k_arch_setup): Turn into ...
2748 (m68k_target::low_arch_setup): ...this.
2749 (the_low_target): Remove the op field.
2750 * linux-mips-low.cc (class mips_target) <low_arch_setup>: New
2751 declaration.
2752 (mips_arch_setup): Turn into ...
2753 (mips_target::low_arch_setup): ...this.
2754 (the_low_target): Remove the op field.
2755 * linux-nios2-low.cc (class nios2_target) <low_arch_setup>: New
2756 declaration.
2757 (nios2_arch_setup): Turn into ...
2758 (nios2_target::low_arch_setup): ...this.
2759 (the_low_target): Remove the op field.
2760 * linux-ppc-low.cc (class ppc_target) <low_arch_setup>: New
2761 declaration.
2762 (ppc_arch_setup): Turn into ...
2763 (ppc_target::low_arch_setup): ...this.
2764 (the_low_target): Remove the op field.
2765 * linux-riscv-low.cc (class riscv_target) <low_arch_setup>: New
2766 declaration.
2767 (riscv_arch_setup): Turn into ...
2768 (riscv_target::low_arch_setup): ...this.
2769 (the_low_target): Remove the op field.
2770 * linux-s390-low.cc (class s390_target) <low_arch_setup>: New
2771 declaration.
2772 (s390_arch_setup): Turn into ...
2773 (s390_target::low_arch_setup): ...this.
2774 (the_low_target): Remove the op field.
2775 * linux-sh-low.cc (class sh_target) <low_arch_setup>: New
2776 declaration.
2777 (sh_arch_setup): Turn into ...
2778 (sh_target::low_arch_setup): ...this.
2779 (the_low_target): Remove the op field.
2780 * linux-sparc-low.cc (class sparc_target) <low_arch_setup>: New
2781 declaration.
2782 (sparc_arch_setup): Turn into ...
2783 (sparc_target::low_arch_setup): ...this.
2784 (the_low_target): Remove the op field.
2785 * linux-tic6x-low.cc (class tic6x_target) <low_arch_setup>: New
2786 declaration.
2787 (tic6x_arch_setup): Turn into ...
2788 (tic6x_target::low_arch_setup): ...this.
2789 (the_low_target): Remove the op field.
2790 * linux-tile-low.cc (class tile_target) <low_arch_setup>: New
2791 declaration.
2792 (tile_arch_setup): Turn into ...
2793 (tile_target::low_arch_setup): ...this.
2794 (the_low_target): Remove the op field.
2795 * linux-xtensa-low.cc (class xtensa_target) <low_arch_setup>: New
2796 declaration.
2797 (xtensa_arch_setup): Turn into ...
2798 (xtensa_target::low_arch_setup): ...this.
2799 (the_low_target): Remove the op field.
2800
2801 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2802
2803 * linux-low.h (the_linux_target): New extern declaration.
2804 * linux-low.cc (initialize_low): Use 'the_linux_target' to set
2805 'the_target'.
2806 (the_linux_target): Remove.
2807 * linux-x86-low.cc (class x86_target): New class.
2808 (the_x86_target): New static object.
2809 (the_linux_target): Define as pointer to the_x86_target.
2810 * linux-aarch64-low.cc (class aarch64_target): New class.
2811 (the_aarch64_target): New static object.
2812 (the_linux_target): Define as pointer to the_aarch64_target.
2813 * linux-arm-low.cc (class arm_target): New class.
2814 (the_arm_target): New static object.
2815 (the_linux_target): Define as pointer to the_arm_target.
2816 * linux-bfin-low.cc (class bfin_target): New class.
2817 (the_bfin_target): New static object.
2818 (the_linux_target): Define as pointer to the_bfin_target.
2819 * linux-cris-low.cc (class cris_target): New class.
2820 (the_cris_target): New static object.
2821 (the_linux_target): Define as pointer to the_cris_target.
2822 * linux-crisv32-low.cc (class crisv32_target): New class.
2823 (the_crisv32_target): New static object.
2824 (the_linux_target): Define as pointer to the_crisv32_target.
2825 * linux-ia64-low.cc (class ia64_target): New class.
2826 (the_ia64_target): New static object.
2827 (the_linux_target): Define as pointer to the_ia64_target.
2828 * linux-m32r-low.cc (class m32r_target): New class.
2829 (the_m32r_target): New static object.
2830 (the_linux_target): Define as pointer to the_m32r_target.
2831 * linux-m68k-low.cc (class m68k_target): New class.
2832 (the_m68k_target): New static object.
2833 (the_linux_target): Define as pointer to the_m68k_target.
2834 * linux-mips-low.cc (class mips_target): New class.
2835 (the_mips_target): New static object.
2836 (the_linux_target): Define as pointer to the_mips_target.
2837 * linux-nios2-low.cc (class nios2_target): New class.
2838 (the_nios2_target): New static object.
2839 (the_linux_target): Define as pointer to the_nios2_target.
2840 * linux-ppc-low.cc (class ppc_target): New class.
2841 (the_ppc_target): New static object.
2842 (the_linux_target): Define as pointer to the_ppc_target.
2843 * linux-riscv-low.cc (class riscv_target): New class.
2844 (the_riscv_target): New static object.
2845 (the_linux_target): Define as pointer to the_riscv_target.
2846 * linux-s390-low.cc (class s390_target): New class.
2847 (the_s390_target): New static object.
2848 (the_linux_target): Define as pointer to the_s390_target.
2849 * linux-sh-low.cc (class sh_target): New class.
2850 (the_sh_target): New static object.
2851 (the_linux_target): Define as pointer to the_sh_target.
2852 * linux-sparc-low.cc (class sparc_target): New class.
2853 (the_sparc_target): New static object.
2854 (the_linux_target): Define as pointer to the_sparc_target.
2855 * linux-tic6x-low.cc (class tic6x_target): New class.
2856 (the_tic6x_target): New static object.
2857 (the_linux_target): Define as pointer to the_tic6x_target.
2858 * linux-tile-low.cc (class tile_target): New class.
2859 (the_tile_target): New static object.
2860 (the_linux_target): Define as pointer to the_tile_target.
2861 * linux-xtensa-low.cc (class xtensa_target): New class.
2862 (the_xtensa_target): New static object.
2863 (the_linux_target): Define as pointer to the_xtensa_target.
2864
2865 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2866
2867 Turn some static functions in linux-low.cc into private methods of
2868 linux_process_target.
2869
2870 * linux-low.cc (handle_extended_wait): Turn into ...
2871 (linux_process_target::handle_extended_wait): ...this. Call
2872 'mourn' on 'this' object instead of 'the_target'.
2873 (maybe_move_out_of_jump_pad): Turn into...
2874 (linux_process_target::maybe_move_out_of_jump_pad): ...this.
2875 (linux_low_filter_event): Turn into...
2876 (linux_process_target::filter_event): ...this.
2877 (linux_wait_for_event_filtered): Turn into...
2878 (linux_process_target::wait_for_event_filtered): ...this.
2879 (linux_wait_for_event): Turn into...
2880 (linux_process_target::wait_for_event): ...this.
2881 (linux_wait_1): Turn into...
2882 (linux_process_target::wait_1): ...this.
2883 (wait_for_sigstop): Turn into...
2884 (linux_process_target::wait_for_sigstop): ...this.
2885 (move_out_of_jump_pad_callback): Turn into...
2886 (linux_process_target::move_out_of_jump_pad): ...this.
2887 (stop_all_lwps): Turn into...
2888 (linux_process_target::stop_all_lwps): ...this.
2889 (start_step_over): Turn into...
2890 (linux_process_target::start_step_over): ...this.
2891 (complete_ongoing_step_over): Turn into...
2892 (linux_process_target::complete_ongoing_step_over): ...this.
2893 (proceed_all_lwps): Turn into...
2894 (linux_process_target::proceed_all_lwps): ...this.
2895 (unstop_all_lwps): Turn into...
2896 (linux_process_target::unstop_all_lwps): ...this.
2897
2898 * linux-low.h (class linux_process_target)
2899 <handle_extended_wait>
2900 <maybe_move_out_of_jump_pad>
2901 filter_event>
2902 <wait_for_event_filtered>
2903 <wait_for_event>
2904 <wait_1>
2905 <wait_for_sigstop>
2906 <move_out_of_jump_pad>
2907 <stop_all_lwps>
2908 <start_step_over>
2909 <complete_ongoing_step_over>
2910 <proceed_all_lwps>
2911 <unstop_all_lwps>: Declare.
2912
2913 Update the callers below.
2914
2915 * linux-low.cc (linux_process_target::attach): Update.
2916 (linux_process_target::stabilize_threads): Ditto.
2917 (linux_process_target::wait): Ditto.
2918
2919 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2920
2921 * linux-low.h (struct linux_target_ops): Update the comment for
2922 'cannot_store_register' to return 0 or 1.
2923 * linux-ppc-low.cc (ppc_cannot_store_register): Return 1 instead
2924 of 2.
2925
2926 2020-03-20 Simon Marchi <simon.marchi@efficios.com>
2927
2928 * config.in: Re-generate.
2929 * configure: Re-generate.
2930
2931 2020-03-17 Kamil Rytarowski <n54@gmx.com>
2932
2933 * regcache.cc (find_register_by_number): Update.
2934 * tdesc.cc (init_target_desc): Likewise.
2935 * tdesc.h (target_desc::reg_defs): Likewise.
2936
2937 2020-03-12 Tom Tromey <tom@tromey.com>
2938
2939 * configure: Rebuild.
2940 * configure.ac (GDBSERVER_DEPFILES): Remove srv_selftest_objs.
2941 (WIN32APILIBS): New subst.
2942 * Makefile.in (SFILES, OBS, TAGS, GDBREPLAY_OBS): Remove
2943 gdbsupport files.
2944 (gdbsupport/%.o): Remove target.
2945 (GDBSUPPORT_BUILDDIR, GDBSUPPORT): New variables.
2946 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Add GDBSUPPORT.
2947 (WIN32APILIBS): New variable.
2948 (gdbserver$(EXEEXT)): Add WIN32APILIBS.
2949 (gdbreplay$(EXEEXT)): Likewise.
2950
2951 2020-03-12 Tom Tromey <tom@tromey.com>
2952
2953 * config.in, configure: Rebuild.
2954 * configure.ac: Call ZW_GNU_GETTEXT_SISTER_DIR.
2955 * acinclude.m4: Include gettext-sister.m4.
2956 * Makefile.in (top_builddir, INTL, INTL_DEPS, INTL_CFLAGS): New
2957 variables.
2958 (INCLUDE_CFLAGS): Add INTL_CFLAGS.
2959 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Use INTL_DEPS, INTL.
2960
2961 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2962
2963 * acinclude.m4: Update path to selftest.m4.
2964
2965 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2966
2967 * configure.ac: Don't source bfd/development.sh, move
2968 GDB_AC_COMMON higher.
2969 * configure: Re-generate.
2970
2971 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2972
2973 * configure: Re-generate.
2974
2975 2020-03-11 Simon Marchi <simon.marchi@efficios.com>
2976
2977 * configure: Re-generate.
2978
2979 2020-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
2980
2981 * .dir-locals.el: New file.
2982
2983 2020-03-05 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2984
2985 * .gitattributes: New file.
2986
2987 2020-03-02 Andrew Burgess <andrew.burgess@embecosm.com>
2988
2989 * remote-utils.cc (prepare_resume_reply): Add ability to convert T
2990 reply into an S reply.
2991 * server.cc (disable_packet_T): New global.
2992 (captured_main): Set new global when appropriate.
2993 * server.h (disable_packet_T): Declare.
2994
2995 2020-02-21 Tom Tromey <tom@tromey.com>
2996
2997 * Makefile.in (mostlyclean): New target.
2998
2999 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3000
3001 * target.h (struct process_stratum_target): Remove.
3002 (class process_target): Rename to ...
3003 (class process_stratum_target): ... this.
3004 * linux-low.h (class linux_process_target): Derive from
3005 'process_stratum_target'.
3006 * linux-low.cc (linux_target_ops): Remove.
3007 (initialize_low): Set the_target to the singleton instance of
3008 linux_process_target.
3009 * lynx-low.h (class lynx_process_target): Derive from
3010 'process_stratum_target'.
3011 * lynx-low.cc (lynx_target_ops): Remove.
3012 (initialize_low): Set the_target to the singleton instance of
3013 lynx_process_target.
3014 * nto-low.h (class nto_process_target): Derive from
3015 'process_stratum_target'.
3016 * nto-low.cc (nto_target_ops): Remove.
3017 (initialize_low): Set the_target to the singleton instance of
3018 nto_process_target.
3019 * win32-low.h (class win32_process_target): Derive from
3020 'process_stratum_target'.
3021 * win32-low.cc (win32_target_ops): Remove.
3022 (initialize_low): Set the_target to the singleton instance of
3023 win32_process_target.
3024
3025 Replace 'the_target->pt' with 'the_target' in the uses below.
3026
3027 * hostio.cc (hostio_error)
3028 (handle_setfs)
3029 (handle_open)
3030 (handle_unlink)
3031 (handle_readlink)
3032 * linux-aarch32-low.cc (arm_breakpoint_at)
3033 * linux-aarch64-low.cc (aarch64_breakpoint_at)
3034 * linux-arm-low.cc (arm_sigreturn_next_pc)
3035 (arm_get_hwcap)
3036 (arm_get_syscall_trapinfo)
3037 * linux-cris-low.cc (cris_breakpoint_at)
3038 * linux-crisv32-low.cc (cris_breakpoint_at)
3039 * linux-low.cc (handle_extended_wait)
3040 (linux_wait_1)
3041 (linux_read_memory)
3042 (linux_process_target::breakpoint_kind_from_pc)
3043 (linux_get_auxv)
3044 * linux-m32r-low.cc (m32r_breakpoint_at)
3045 * linux-mips-low.cc (mips_breakpoint_at)
3046 * linux-nios2-low.cc (nios2_breakpoint_at)
3047 * linux-ppc-low.cc (ppc_breakpoint_at)
3048 * linux-s390-low.cc (s390_get_hwcap)
3049 * linux-sh-low.cc (sh_breakpoint_at)
3050 * linux-sparc-low.cc (sparc_fill_gregset_to_stack)
3051 (sparc_store_gregset_from_stack)
3052 (sparc_breakpoint_at)
3053 * linux-tic6x-low.cc (tic6x_breakpoint_at)
3054 * linux-tile-low.cc (tile_breakpoint_at)
3055 * linux-x86-low.cc (x86_breakpoint_at)
3056 * linux-xtensa-low.cc (xtensa_breakpoint_at)
3057 * mem-break.cc (bp_size)
3058 (bp_opcode)
3059 (insert_memory_breakpoint)
3060 (set_raw_breakpoint_at)
3061 (delete_raw_breakpoint)
3062 (z_type_supported)
3063 (uninsert_raw_breakpoint)
3064 (reinsert_raw_breakpoint)
3065 (validate_inserted_breakpoint)
3066 * regcache.cc (regcache_read_pc)
3067 (regcache_write_pc)
3068 * remote-utils.cc (putpkt_binary_1)
3069 (input_interrupt)
3070 (getpkt)
3071 (prepare_resume_reply)
3072 * server.cc (handle_general_set)
3073 (handle_detach)
3074 (handle_qxfer_auxv)
3075 (handle_qxfer_exec_file)
3076 (handle_qxfer_libraries_svr4)
3077 (handle_qxfer_osdata)
3078 (handle_qxfer_siginfo)
3079 (handle_qxfer_fdpic)
3080 (handle_query)
3081 (resume)
3082 (handle_v_requests)
3083 (queue_stop_reply_callback)
3084 (captured_main)
3085 * target.cc (prepare_to_access_memory)
3086 (done_accessing_memory)
3087 (read_inferior_memory)
3088 (target_write_memory)
3089 (target_stop_and_wait)
3090 (target_wait)
3091 (target_mourn_inferior)
3092 (target_continue_no_signal)
3093 (target_continue)
3094 (target_supports_multi_process)
3095 (kill_inferior)
3096 * target.h
3097 (target_create_inferior)
3098 (target_post_create_inferior)
3099 (myattach)
3100 (target_supports_fork_events)
3101 (target_supports_vfork_events)
3102 (target_supports_exec_events)
3103 (target_handle_new_gdb_connection)
3104 (detach_inferior)
3105 (mythread_alive)
3106 (fetch_inferior_registers)
3107 (store_inferior_registers)
3108 (join_inferior)
3109 (target_supports_non_stop)
3110 (target_async)
3111 (target_process_qsupported)
3112 (target_supports_catch_syscall)
3113 (target_get_ipa_tdesc_idx)
3114 (target_supports_tracepoints)
3115 (target_supports_fast_tracepoints)
3116 (target_get_min_fast_tracepoint_insn_len)
3117 (target_thread_stopped)
3118 (target_pause_all)
3119 (target_unpause_all)
3120 (target_stabilize_threads)
3121 (target_install_fast_tracepoint_jump_pad)
3122 (target_emit_ops)
3123 (target_supports_disable_randomization)
3124 (target_supports_agent)
3125 (target_enable_btrace)
3126 (target_disable_btrace)
3127 (target_read_btrace)
3128 (target_read_btrace_conf)
3129 (target_supports_range_stepping)
3130 (target_supports_stopped_by_sw_breakpoint)
3131 (target_stopped_by_sw_breakpoint)
3132 (target_supports_stopped_by_hw_breakpoint)
3133 (target_supports_hardware_single_step)
3134 (target_stopped_by_hw_breakpoint)
3135 (target_breakpoint_kind_from_pc)
3136 (target_breakpoint_kind_from_current_state)
3137 (target_supports_software_single_step)
3138 (target_core_of_thread)
3139 (target_thread_name)
3140 (target_thread_handle)
3141 * win32-low.cc (do_initial_child_stuff)
3142
3143 Rename target op default definitions listed below.
3144
3145 * target.cc (process_target::post_create_inferior): Rename as ...
3146 (process_stratum_target::post_create_inferior): ... this.
3147 (process_target::prepare_to_access_memory): Rename as ...
3148 (process_stratum_target::prepare_to_access_memory): ... this.
3149 (process_target::done_accessing_memory): Rename as ...
3150 (process_stratum_target::done_accessing_memory): ... this.
3151 (process_target::look_up_symbols): Rename as ...
3152 (process_stratum_target::look_up_symbols): ... this.
3153 (process_target::supports_read_auxv): Rename as ...
3154 (process_stratum_target::supports_read_auxv): ... this.
3155 (process_target::read_auxv): Rename as ...
3156 (process_stratum_target::read_auxv): ... this.
3157 (process_target::supports_z_point_type): Rename as ...
3158 (process_stratum_target::supports_z_point_type): ... this.
3159 (process_target::insert_point): Rename as ...
3160 (process_stratum_target::insert_point): ... this.
3161 (process_target::remove_point): Rename as ...
3162 (process_stratum_target::remove_point): ... this.
3163 (process_target::stopped_by_sw_breakpoint): Rename as ...
3164 (process_stratum_target::stopped_by_sw_breakpoint): ... this.
3165 (process_target::supports_stopped_by_sw_breakpoint): Rename as ...
3166 (process_stratum_target::supports_stopped_by_sw_breakpoint): ... this.
3167 (process_target::stopped_by_hw_breakpoint): Rename as ...
3168 (process_stratum_target::stopped_by_hw_breakpoint): ... this.
3169 (process_target::supports_stopped_by_hw_breakpoint): Rename as ...
3170 (process_stratum_target::supports_stopped_by_hw_breakpoint): ... this.
3171 (process_target::supports_hardware_single_step): Rename as ...
3172 (process_stratum_target::supports_hardware_single_step): ... this.
3173 (process_target::stopped_by_watchpoint): Rename as ...
3174 (process_stratum_target::stopped_by_watchpoint): ... this.
3175 (process_target::stopped_data_address): Rename as ...
3176 (process_stratum_target::stopped_data_address): ... this.
3177 (process_target::supports_read_offsets): Rename as ...
3178 (process_stratum_target::supports_read_offsets): ... this.
3179 (process_target::read_offsets): Rename as ...
3180 (process_stratum_target::read_offsets): ... this.
3181 (process_target::supports_get_tls_address): Rename as ...
3182 (process_stratum_target::supports_get_tls_address): ... this.
3183 (process_target::get_tls_address): Rename as ...
3184 (process_stratum_target::get_tls_address): ... this.
3185 (process_target::hostio_last_error): Rename as ...
3186 (process_stratum_target::hostio_last_error): ... this.
3187 (process_target::supports_qxfer_osdata): Rename as ...
3188 (process_stratum_target::supports_qxfer_osdata): ... this.
3189 (process_target::qxfer_osdata): Rename as ...
3190 (process_stratum_target::qxfer_osdata): ... this.
3191 (process_target::supports_qxfer_siginfo): Rename as ...
3192 (process_stratum_target::supports_qxfer_siginfo): ... this.
3193 (process_target::qxfer_siginfo): Rename as ...
3194 (process_stratum_target::qxfer_siginfo): ... this.
3195 (process_target::supports_non_stop): Rename as ...
3196 (process_stratum_target::supports_non_stop): ... this.
3197 (process_target::async): Rename as ...
3198 (process_stratum_target::async): ... this.
3199 (process_target::start_non_stop): Rename as ...
3200 (process_stratum_target::start_non_stop): ... this.
3201 (process_target::supports_multi_process): Rename as ...
3202 (process_stratum_target::supports_multi_process): ... this.
3203 (process_target::supports_fork_events): Rename as ...
3204 (process_stratum_target::supports_fork_events): ... this.
3205 (process_target::supports_vfork_events): Rename as ...
3206 (process_stratum_target::supports_vfork_events): ... this.
3207 (process_target::supports_exec_events): Rename as ...
3208 (process_stratum_target::supports_exec_events): ... this.
3209 (process_target::handle_new_gdb_connection): Rename as ...
3210 (process_stratum_target::handle_new_gdb_connection): ... this.
3211 (process_target::handle_monitor_command): Rename as ...
3212 (process_stratum_target::handle_monitor_command): ... this.
3213 (process_target::core_of_thread): Rename as ...
3214 (process_stratum_target::core_of_thread): ... this.
3215 (process_target::supports_read_loadmap): Rename as ...
3216 (process_stratum_target::supports_read_loadmap): ... this.
3217 (process_target::read_loadmap): Rename as ...
3218 (process_stratum_target::read_loadmap): ... this.
3219 (process_target::process_qsupported): Rename as ...
3220 (process_stratum_target::process_qsupported): ... this.
3221 (process_target::supports_tracepoints): Rename as ...
3222 (process_stratum_target::supports_tracepoints): ... this.
3223 (process_target::read_pc): Rename as ...
3224 (process_stratum_target::read_pc): ... this.
3225 (process_target::write_pc): Rename as ...
3226 (process_stratum_target::write_pc): ... this.
3227 (process_target::supports_thread_stopped): Rename as ...
3228 (process_stratum_target::supports_thread_stopped): ... this.
3229 (process_target::thread_stopped): Rename as ...
3230 (process_stratum_target::thread_stopped): ... this.
3231 (process_target::supports_get_tib_address): Rename as ...
3232 (process_stratum_target::supports_get_tib_address): ... this.
3233 (process_target::get_tib_address): Rename as ...
3234 (process_stratum_target::get_tib_address): ... this.
3235 (process_target::pause_all): Rename as ...
3236 (process_stratum_target::pause_all): ... this.
3237 (process_target::unpause_all): Rename as ...
3238 (process_stratum_target::unpause_all): ... this.
3239 (process_target::stabilize_threads): Rename as ...
3240 (process_stratum_target::stabilize_threads): ... this.
3241 (process_target::supports_fast_tracepoints): Rename as ...
3242 (process_stratum_target::supports_fast_tracepoints): ... this.
3243 (process_target::get_min_fast_tracepoint_insn_len): Rename as ...
3244 (process_stratum_target::get_min_fast_tracepoint_insn_len): ... this.
3245 (process_target::emit_ops): Rename as ...
3246 (process_stratum_target::emit_ops): ... this.
3247 (process_target::supports_disable_randomization): Rename as ...
3248 (process_stratum_target::supports_disable_randomization): ... this.
3249 (process_target::supports_qxfer_libraries_svr4): Rename as ...
3250 (process_stratum_target::supports_qxfer_libraries_svr4): ... this.
3251 (process_target::qxfer_libraries_svr4): Rename as ...
3252 (process_stratum_target::qxfer_libraries_svr4): ... this.
3253 (process_target::supports_agent): Rename as ...
3254 (process_stratum_target::supports_agent): ... this.
3255 (process_target::enable_btrace): Rename as ...
3256 (process_stratum_target::enable_btrace): ... this.
3257 (process_target::disable_btrace): Rename as ...
3258 (process_stratum_target::disable_btrace): ... this.
3259 (process_target::read_btrace): Rename as ...
3260 (process_stratum_target::read_btrace): ... this.
3261 (process_target::read_btrace_conf): Rename as ...
3262 (process_stratum_target::read_btrace_conf): ... this.
3263 (process_target::supports_range_stepping): Rename as ...
3264 (process_stratum_target::supports_range_stepping): ... this.
3265 (process_target::supports_pid_to_exec_file): Rename as ...
3266 (process_stratum_target::supports_pid_to_exec_file): ... this.
3267 (process_target::pid_to_exec_file): Rename as ...
3268 (process_stratum_target::pid_to_exec_file): ... this.
3269 (process_target::supports_multifs): Rename as ...
3270 (process_stratum_target::supports_multifs): ... this.
3271 (process_target::multifs_open): Rename as ...
3272 (process_stratum_target::multifs_open): ... this.
3273 (process_target::multifs_unlink): Rename as ...
3274 (process_stratum_target::multifs_unlink): ... this.
3275 (process_target::multifs_readlink): Rename as ...
3276 (process_stratum_target::multifs_readlink): ... this.
3277 (process_target::breakpoint_kind_from_pc): Rename as ...
3278 (process_stratum_target::breakpoint_kind_from_pc): ... this.
3279 (process_target::breakpoint_kind_from_current_state): Rename as ...
3280 (process_stratum_target::breakpoint_kind_from_current_state): ... this.
3281 (process_target::thread_name): Rename as ...
3282 (process_stratum_target::thread_name): ... this.
3283 (process_target::thread_handle): Rename as ...
3284 (process_stratum_target::thread_handle): ... this.
3285 (process_target::supports_software_single_step): Rename as ...
3286 (process_stratum_target::supports_software_single_step): ... this.
3287 (process_target::supports_catch_syscall): Rename as ...
3288 (process_stratum_target::supports_catch_syscall): ... this.
3289 (process_target::get_ipa_tdesc_idx): Rename as ...
3290 (process_stratum_target::get_ipa_tdesc_idx): ... this.
3291
3292 2020-02-20 Pedro Alves <palves@redhat.com>
3293
3294 * target.cc (set_target_ops): Simply copy the given target pointer
3295 instead of creating a copy of the pointed object.
3296
3297 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3298
3299 Turn process_stratum_target's get_ipa_tdesc_idx op into a method
3300 of process_target.
3301
3302 * target.h (struct process_stratum_target): Remove the target op.
3303 (class process_target): Add the target op.
3304 (target_get_ipa_tdesc_idx): Update the macro.
3305 * target.cc (process_target::get_ipa_tdesc_idx): Define.
3306
3307 Update the derived classes and callers below.
3308
3309 * linux-low.cc (linux_target_ops): Update.
3310 (linux_get_ipa_tdesc_idx): Turn into ...
3311 (linux_process_target::get_ipa_tdesc_idx): ... this.
3312 * linux-low.h (class linux_process_target): Update.
3313 * lynx-low.cc (lynx_target_ops): Update.
3314 * nto-low.cc (nto_target_ops): Update.
3315 * win32-low.cc (win32_target_ops): Update.
3316
3317 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3318
3319 Turn process_stratum_target's supports_catch_syscall op into a
3320 method of process_target.
3321
3322 * target.h (struct process_stratum_target): Remove the target op.
3323 (class process_target): Add the target op.
3324 (target_supports_catch_syscall): Update the macro.
3325 * target.cc (process_target::supports_catch_syscall): Define.
3326
3327 Update the derived classes and callers below.
3328
3329 * linux-low.cc (linux_target_ops): Update.
3330 (linux_supports_catch_syscall): Turn into ...
3331 (linux_process_target::supports_catch_syscall): ... this.
3332 * linux-low.h (class linux_process_target): Update.
3333 * lynx-low.cc (lynx_target_ops): Update.
3334 * nto-low.cc (nto_target_ops): Update.
3335 * win32-low.cc (win32_target_ops): Update.
3336
3337 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3338
3339 Turn process_stratum_target's supports_software_single_step op
3340 into a method of process_target.
3341
3342 * target.h (struct process_stratum_target): Remove the target op.
3343 (class process_target): Add the target op.
3344 (target_supports_software_single_step): Update the macro.
3345 * target.cc (process_target::supports_software_single_step): Define.
3346
3347 Update the derived classes and callers below.
3348
3349 * linux-low.cc (linux_target_ops): Update.
3350 (linux_supports_software_single_step): Turn into ...
3351 (linux_process_target::supports_software_single_step): ... this.
3352 * linux-low.h (class linux_process_target): Update.
3353 * lynx-low.cc (lynx_target_ops): Update.
3354 * nto-low.cc (nto_target_ops): Update.
3355 * win32-low.cc (win32_target_ops): Update.
3356
3357 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3358
3359 Turn process_stratum_target's thread_name and thread_handle ops
3360 into methods of process_target.
3361
3362 * target.h (struct process_stratum_target): Remove the target ops.
3363 (class process_target): Add the target ops.
3364 (target_thread_name): Update the macro.
3365 (target_thread_handle): Update the macro.
3366 * target.cc (process_target::thread_name): Define.
3367 (process_target::thread_handle): Define.
3368
3369 Update the derived classes and callers below.
3370
3371 * linux-low.cc (linux_target_ops): Update.
3372 (linux_process_target::thread_name): Define.
3373 (linux_process_target::thread_handle): Define.
3374 * linux-low.h (class linux_process_target): Update.
3375 * lynx-low.cc (lynx_target_ops): Update.
3376 * nto-low.cc (nto_target_ops): Update.
3377 * win32-low.cc (win32_target_ops): Update.
3378
3379 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3380
3381 Turn process_stratum_target's breakpoint_kind_from_pc,
3382 sw_breakpoint_from_kind, and breakpoint_kind_from_current_state
3383 ops into methods of process_target.
3384
3385 * target.h (struct process_stratum_target): Remove the target op.
3386 (class process_target): Add the target op.
3387 (target_breakpoint_kind_from_pc): Update the macro.
3388 (target_breakpoint_kind_from_current_state): Update the macro.
3389 (default_breakpoint_kind_from_pc): Remove declaration.
3390 * target.cc (default_breakpoint_kind_from_pc): Turn into ...
3391 (process_target::breakpoint_kind_from_pc): ... this.
3392 (process_target::breakpoint_kind_from_current_state): Define.
3393
3394 Update the derived classes and callers below.
3395
3396 * mem-break.cc (bp_size): Update.
3397 (bp_opcode): Update.
3398 * linux-low.cc (linux_target_ops): Update.
3399 (linux_wait_1): Update.
3400 (linux_breakpoint_kind_from_pc): Turn into ...
3401 (linux_process_target::breakpoint_kind_from_pc): ... this.
3402 (linux_sw_breakpoint_from_kind): Turn into ...
3403 (linux_process_target::sw_breakpoint_from_kind): ... this.
3404 (linux_breakpoint_kind_from_current_state): Turn into ...
3405 (linux_process_target::breakpoint_kind_from_current_state): ... this.
3406 * linux-low.h (class linux_process_target): Update.
3407 * lynx-low.cc (lynx_target_ops): Update.
3408 (lynx_process_target::sw_breakpoint_from_kind): Define.
3409 * lynx-low.h (class lynx_process_target): Update.
3410 * nto-low.cc (nto_target_ops): Update.
3411 (nto_sw_breakpoint_from_kind): Turn into ...
3412 (nto_process_target::sw_breakpoint_from_kind): ... this.
3413 * nto-low.h (class nto_process_target): Update.
3414 * win32-low.cc (win32_target_ops): Update.
3415 (win32_sw_breakpoint_from_kind): Turn into ...
3416 (win32_process_target::sw_breakpoint_from_kind): ... this.
3417 * win32-low.h (class win32_process_target): Update.
3418
3419 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3420
3421 Turn process_stratum_target's multifs_open, multifs_readlink,
3422 multifs_unlink ops into methods of process_target.
3423
3424 * target.h (struct process_stratum_target): Remove the target ops.
3425 (class process_target): Add the target ops. Also add
3426 'supports_multifs'.
3427 * target.cc: Include "fcntl.h", "unistd.h", "sys/types.h", and
3428 "sys/stat.h".
3429 (process_target::supports_multifs): Define.
3430 (process_target::multifs_open): Define.
3431 (process_target::multifs_readlink): Define.
3432 (process_target::multifs_unlink): Define.
3433
3434 Update the derived classes and callers below.
3435
3436 * hostio.cc (handle_setfs): Update.
3437 (handle_open): Update.
3438 (handle_unlink): Update.
3439 (handle_readlink): Update.
3440 * linux-low.cc (linux_target_ops): Update.
3441 (linux_process_target::supports_multifs): Define.
3442 (linux_process_target::multifs_open): Define.
3443 (linux_process_target::multifs_readlink): Define.
3444 (linux_process_target::multifs_unlink): Define.
3445 * linux-low.h (class linux_process_target): Update.
3446 * lynx-low.cc (lynx_target_ops): Update.
3447 * nto-low.cc (nto_target_ops): Update.
3448 * win32-low.cc (win32_target_ops): Update.
3449
3450 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3451
3452 Turn process_stratum_target's pid_to_exec_file op into a method
3453 of process_target.
3454
3455 * target.h (struct process_stratum_target): Remove the target op.
3456 (class process_target): Add the target op. Also add
3457 'supports_pid_to_exec_file'.
3458 * target.cc (process_target::pid_to_exec_file): Define.
3459 (process_target::supports_pid_to_exec_file): Define.
3460
3461 Update the derived classes and callers below.
3462
3463 * server.cc (handle_qxfer_exec_file): Update.
3464 (handle_query): Update.
3465 * linux-low.cc (linux_target_ops): Update.
3466 (linux_process_target::supports_pid_to_exec_file): Define.
3467 (linux_process_target::pid_to_exec_file): Define.
3468 * linux-low.h (class linux_process_target): Update.
3469 * lynx-low.cc (lynx_target_ops): Update.
3470 * nto-low.cc (nto_target_ops): Update.
3471 * win32-low.cc (win32_target_ops): Update.
3472
3473 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3474
3475 Turn process_stratum_target's supports_range_stepping op into a
3476 method of process_target.
3477
3478 * target.h (struct process_stratum_target): Remove the target op.
3479 (class process_target): Add the target op.
3480 (target_supports_range_stepping): Update the macro.
3481 * target.cc (process_target::supports_range_stepping): Define.
3482
3483 Update the derived classes and callers below.
3484
3485 * linux-low.cc (linux_target_ops): Update.
3486 (linux_supports_range_stepping): Turn into ...
3487 (linux_process_target::supports_range_stepping): ... this.
3488 * linux-low.h (class linux_process_target): Update.
3489 * lynx-low.cc (lynx_target_ops): Update.
3490 * nto-low.cc (nto_target_ops): Update.
3491 * win32-low.cc (win32_target_ops): Update.
3492
3493 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3494
3495 Turn process_stratum_target's btrace-related ops (enable_btrace,
3496 disable_btrace, read_btrace, read_btrace_conf) into methods of
3497 process_target.
3498
3499 * target.h (struct process_stratum_target): Remove the target ops.
3500 (class process_target): Add the target ops.
3501 (target_enable_btrace): Update.
3502 (target_disable_btrace): Update.
3503 (target_read_btrace): Update.
3504 (target_read_btrace_conf): Update.
3505 * target.cc (process_target::enable_btrace): Define.
3506 (process_target::disable_btrace): Define.
3507 (process_target::read_btrace): Define.
3508 (process_target::read_btrace_conf): Define.
3509
3510 Update the derived classes and callers below.
3511
3512 * linux-low.cc (linux_target_ops): Update.
3513 (linux_process_target:enable_btrace): Define as a wrapper around
3514 linux_enable_btrace.
3515 (linux_low_disable_btrace): Turn into ...
3516 (linux_process_target::disable_btrace): ... this.
3517 (linux_low_read_btrace): Turn into ...
3518 (linux_process_target::read_btrace): ... this.
3519 (linux_low_btrace_conf): Turn into ...
3520 (linux_process_target::read_btrace_conf): ... this.
3521 * linux-low.h (class linux_process_target): Update.
3522 * lynx-low.cc (lynx_target_ops): Update.
3523 * nto-low.cc (nto_target_ops): Update.
3524 * win32-low.cc (win32_target_ops): Update.
3525
3526 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3527
3528 Turn process_stratum_target's supports_agent op into a method of
3529 process_target.
3530
3531 * target.h (struct process_stratum_target): Remove the target op.
3532 (class process_target): Add the target op.
3533 (target_supports_agent): Update the macro.
3534 * target.cc (process_target::supports_agent): Define.
3535
3536 Update the derived classes and callers below.
3537
3538 * linux-low.cc (linux_target_ops): Update.
3539 (linux_supports_agent): Turn into ...
3540 (linux_process_target::supports_agent): ... this.
3541 * linux-low.h (class linux_process_target): Update.
3542 * lynx-low.cc (lynx_target_ops): Update.
3543 * nto-low.cc (nto_target_ops): Update.
3544 * win32-low.cc (win32_target_ops): Update.
3545
3546 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3547
3548 Turn process_stratum_target's qxfer_libraries_svr4 op into a
3549 method of process_target.
3550
3551 * target.h (struct process_stratum_target): Remove the target op.
3552 (class process_target): Add the target op. Also add
3553 'supports_qxfer_libraries_svr4'.
3554 * target.cc (process_target::qxfer_libraries_svr4): Define.
3555 (process_target::supports_qxfer_libraries_svr4): Define.
3556
3557 Update the derived classes and callers below.
3558
3559 * server.cc (handle_qxfer_libraries_svr4): Update.
3560 (handle_query): Update.
3561 * linux-low.cc (linux_target_ops): Update.
3562 (linux_process_target::supports_qxfer_libraries_svr4): Define.
3563 (linux_qxfer_libraries_svr4): Turn into ...
3564 (linux_process_target::qxfer_libraries_svr4): ... this.
3565 * linux-low.h (class linux_process_target): Update.
3566 * lynx-low.cc (lynx_target_ops): Update.
3567 * nto-low.cc (nto_target_ops): Update.
3568 * win32-low.cc (win32_target_ops): Update.
3569
3570 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3571
3572 Turn process_stratum_target's supports_disable_randomization op
3573 into a method of process_target.
3574
3575 * target.h (struct process_stratum_target): Remove the target op.
3576 (class process_target): Add the target op.
3577 (target_supports_disable_randomization): Update the macro.
3578 * target.cc (process_target::supports_disable_randomization): Define.
3579
3580 Update the derived classes and callers below.
3581
3582 * linux-low.cc (linux_target_ops): Update.
3583 (linux_supports_disable_randomization): Turn into ...
3584 (linux_process_target::supports_disable_randomization): ... this.
3585 * linux-low.h (class linux_process_target): Update.
3586 * lynx-low.cc (lynx_target_ops): Update.
3587 * nto-low.cc (nto_target_ops): Update.
3588 * win32-low.cc (win32_target_ops): Update.
3589
3590 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3591
3592 Turn process_stratum_target's emit_ops op into a method of
3593 process_target.
3594
3595 * target.h (struct process_stratum_target): Remove the target op.
3596 (class process_target): Add the target op.
3597 (target_emit_ops): Update the macro.
3598 * target.cc (process_target::emit_ops): Define.
3599
3600 Update the derived classes and callers below.
3601
3602 * linux-low.cc (linux_target_ops): Update.
3603 (linux_emit_ops): Turn into ...
3604 (linux_process_target::emit_ops): ... this.
3605 * linux-low.h (class linux_process_target): Update.
3606 * lynx-low.cc (lynx_target_ops): Update.
3607 * nto-low.cc (nto_target_ops): Update.
3608 * win32-low.cc (win32_target_ops): Update.
3609
3610 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3611
3612 Turn process_stratum_target's install_fast_tracepoint_jump_pad
3613 and get_min_fast_tracepoint_insn_len ops into methods of
3614 process_target.
3615
3616 * target.h (struct process_stratum_target): Remove the target ops.
3617 (class process_target): Add the target ops. Also add
3618 'supports_fast_tracepoints'.
3619 (target_supports_fast_tracepoints): Update the macro.
3620 (target_get_min_fast_tracepoint_insn_len): Update the macro.
3621 (install_fast_tracepoint_jump_pad): Update and rename the macro
3622 to ...
3623 (target_install_fast_tracepoint_jump_pad): ... this.
3624 * target.cc (process_target::supports_fast_tracepoints): Define.
3625 (process_target::install_fast_tracepoint_jump_pad): Define.
3626 (process_target::get_min_fast_tracepoint_insn_len): Define.
3627
3628 Update the derived classes and callers below.
3629
3630 * tracepoint.cc (install_fast_tracepoint): Update.
3631 * linux-low.cc (linux_target_ops): Update.
3632 (linux_process_target::supports_fast_tracepoints): Define.
3633 (linux_install_fast_tracepoint_jump_pad): Turn into ...
3634 (linux_process_target::install_fast_tracepoint_jump_pad): ... this.
3635 (linux_get_min_fast_tracepoint_insn_len): Turn into ...
3636 (linux_process_target::get_min_fast_tracepoint_insn_len): ... this.
3637 * linux-low.h (class linux_process_target): Update.
3638 * lynx-low.cc (lynx_target_ops): Update.
3639 * nto-low.cc (nto_target_ops): Update.
3640 * win32-low.cc (win32_target_ops): Update.
3641
3642 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3643
3644 Turn process_stratum_target's stabilize_threads op into a
3645 method of process_target.
3646
3647 * target.h (struct process_stratum_target): Remove the target op.
3648 (class process_target): Add the target op.
3649 (target_stabilize_threads): Update the macro.
3650 * target.cc (process_target::stabilize_threads): Define.
3651
3652 Update the derived classes and callers below.
3653
3654 * server.cc (handle_status): Update.
3655 * tracepoint.cc (cmd_qtdp): Update.
3656 (cmd_qtstart): Update.
3657 * linux-low.cc (linux_target_ops): Update.
3658 (linux_stabilize_threads): Turn into ...
3659 (linux_process_target::stabilize_threads): ... this.
3660 (linux_wait_1): Update.
3661 * linux-low.h (class linux_process_target): Update.
3662 * lynx-low.cc (lynx_target_ops): Update.
3663 * nto-low.cc (nto_target_ops): Update.
3664 * win32-low.cc (win32_target_ops): Update.
3665
3666 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3667
3668 Turn process_stratum_target's pause_all and unpause_all ops
3669 into methods of process_target.
3670
3671 * target.h (struct process_stratum_target): Remove the target ops.
3672 (class process_target): Add the target ops.
3673 (pause_all): Update the macro and rename to...
3674 (target_pause_all): ... this.
3675 (unpause_all): Update the macro and rename to...
3676 (target_unpause_all): ... this.
3677 * target.cc (process_target::pause_all): Define.
3678 (process_target::unpause_all): Define.
3679
3680 Update the derived classes and callers below.
3681
3682 * server.cc (handle_status): Update.
3683 * tracepoint.cc (clear_installed_tracepoints): Update.
3684 (cmd_qtdp): Update.
3685 (cmd_qtstart): Update.
3686 (stop_tracing): Update.
3687 (cmd_qtstatus): Update.
3688 (upload_fast_traceframes): Update.
3689 (run_inferior_command): Update.
3690 * linux-low.cc (linux_target_ops): Update.
3691 (linux_pause_all): Turn into ...
3692 (linux_process_target::pause_all): ... this.
3693 (linux_unpause_all): Turn into ...
3694 (linux_process_target::unpause_all): ... this.
3695 (linux_process_target::prepare_to_access_memory): Update.
3696 (linux_process_target::done_accessing_memory): Update.
3697 * linux-low.h (class linux_process_target): Update.
3698 * lynx-low.cc (lynx_target_ops): Update.
3699 * nto-low.cc (nto_target_ops): Update.
3700 * win32-low.cc (win32_target_ops): Update.
3701
3702 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3703
3704 Turn process_stratum_target's get_tib_address op into a method of
3705 process_target.
3706
3707 * target.h (struct process_stratum_target): Remove the target op.
3708 (class process_target): Add the target op. Also add
3709 'supports_get_tib_address'.
3710 * target.cc (process_target::get_tib_address): Define.
3711 (process_target::supports_get_tib_address): Define.
3712
3713 Update the derived classes and callers below.
3714
3715 * server.cc (handle_query): Update.
3716 * linux-low.cc (win32_target_ops): Update.
3717 * lynx-low.cc (lynx_target_ops): Update.
3718 * nto-low.cc (nto_target_ops): Update.
3719 * win32-low.cc (win32_target_ops): Update.
3720 (win32_process_target::supports_get_tib_address): Define.
3721 (win32_get_tib_address): Turn into ...
3722 (win32_process_target::get_tib_address): ... this.
3723 * win32-low.h (class win32_process_target): Update.
3724
3725 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3726
3727 Turn process_stratum_target's thread_stopped op into a method of
3728 process_target.
3729
3730 * target.h (struct process_stratum_target): Remove the target op.
3731 (class process_target): Add the target op. Also add
3732 'supports_thread_stopped'.
3733 (target_thread_stopped): Update the macro.
3734 * target.cc (process_target::thread_stopped): Define.
3735 (process_target::supports_thread_stopped): Define.
3736 (prepare_to_access_memory): Update.
3737
3738 Update the derived classes and callers below.
3739
3740 * server.cc (queue_stop_reply_callback): Update.
3741 * linux-low.cc (linux_target_ops): Update.
3742 (linux_process_target::supports_thread_stopped): Define.
3743 (linux_thread_stopped): Turn into ...
3744 (linux_process_target::thread_stopped): ... this.
3745 * linux-low.h (class linux_process_target): Update.
3746 * lynx-low.cc (lynx_target_ops): Update.
3747 * nto-low.cc (nto_target_ops): Update.
3748 * win32-low.cc (win32_target_ops): Update.
3749
3750 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3751
3752 Turn process_stratum_target's read_pc and write_pc ops into
3753 methods of process_target.
3754
3755 * target.h (struct process_stratum_target): Remove the target ops.
3756 (class process_target): Add the target ops.
3757 * target.cc (process_target::read_pc): Define.
3758 (process_target::write_pc): Define.
3759
3760 Update the derived classes and callers below.
3761
3762 * regcache.cc (regcache_read_pc): Update.
3763 (regcache_write_pc): Update.
3764 * linux-low.cc (linux_target_ops): Update.
3765 (linux_read_pc): Turn into ...
3766 (linux_process_target::read_pc): ... this.
3767 (linux_write_pc): Turn into ...
3768 (linux_process_target::write_pc): ... this.
3769 * linux-low.h (class linux_process_target): Update.
3770 * lynx-low.cc (lynx_target_ops): Update.
3771 * nto-low.cc (nto_target_ops): Update.
3772 * win32-low.cc (win32_target_ops): Update.
3773
3774 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3775
3776 Turn process_stratum_target's supports_tracepoints op into a
3777 method of process_target.
3778
3779 * target.h (struct process_stratum_target): Remove the target op.
3780 (class process_target): Add the target op.
3781 (target_supports_tracepoints): Update the macro.
3782 * target.cc (process_target::supports_tracepoints): Define.
3783
3784 Update the derived classes and callers below.
3785
3786 * linux-low.cc (linux_target_ops): Update.
3787 (linux_supports_tracepoints): Turn into ...
3788 (linux_process_target::supports_tracepoints): ... this.
3789 * linux-low.h (class linux_process_target): Update.
3790 * lynx-low.cc (lynx_target_ops): Update.
3791 * nto-low.cc (nto_target_ops): Update.
3792 * win32-low.cc (win32_target_ops): Update.
3793
3794 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3795
3796 Turn process_stratum_target's process_qsupported op into a method
3797 of process_target.
3798
3799 * target.h (struct process_stratum_target): Remove the target op.
3800 (class process_target): Add the target op.
3801 (target_process_qsupported): Update the macro.
3802 * target.cc (process_target::process_qsupported): Define.
3803
3804 Update the derived classes and callers below.
3805
3806 * linux-low.cc (linux_target_ops): Update.
3807 (linux_process_qsupported): Turn into ...
3808 (linux_process_target::process_qsupported): ... this.
3809 * linux-low.h (class linux_process_target): Update.
3810 * lynx-low.cc (lynx_target_ops): Update.
3811 * nto-low.cc (nto_target_ops): Update.
3812 * win32-low.cc (win32_target_ops): Update.
3813
3814 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3815
3816 Turn process_stratum_target's read_loadmap op into a method of
3817 process_target.
3818
3819 * target.h (struct process_stratum_target): Remove the target op.
3820 (class process_target): Add the target op. Also add
3821 'supports_read_loadmap'.
3822 * target.cc (process_target::read_loadmap): Define.
3823 (process_target::supports_read_loadmap): Define.
3824
3825 Update the derived classes and callers below.
3826
3827 * server.cc (handle_qxfer_fdpic): Update.
3828 (handle_query): Update.
3829 * linux-low.cc (linux_target_ops): Update.
3830 (linux_process_target::supports_read_loadmap): Define.
3831 (linux_read_loadmap): Turn into ...
3832 (linux_process_target::read_loadmap): ... this.
3833 * linux-low.h (class linux_process_target): Update.
3834 * lynx-low.cc (lynx_target_ops): Update.
3835 * nto-low.cc (nto_target_ops): Update.
3836 * win32-low.cc (win32_target_ops): Update.
3837
3838 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3839
3840 Turn process_stratum_target's core_of_thread op into a method of
3841 process_target.
3842
3843 * target.h (struct process_stratum_target): Remove the target op.
3844 (class process_target): Add the target op.
3845 (target_core_of_thread): Update the macro.
3846 * target.cc (process_target::core_of_thread): Define.
3847
3848 Update the derived classes and callers below.
3849
3850 * linux-low.cc (linux_target_ops): Update.
3851 (linux_process_target::core_of_thread): Define.
3852 * linux-low.h (class linux_process_target): Update.
3853 * lynx-low.cc (lynx_target_ops): Update.
3854 * nto-low.cc (nto_target_ops): Update.
3855 * win32-low.cc (win32_target_ops): Update.
3856
3857 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3858
3859 Turn process_stratum_target's handle_monitor_command op into a
3860 method of process_target.
3861
3862 * target.h (struct process_stratum_target): Remove the target op.
3863 (class process_target): Add the target op.
3864 (target_handle_monitor_command): Update the macro.
3865 * target.cc (process_target::handle_monitor_command): Define.
3866
3867 Update the derived classes and callers below.
3868
3869 * server.cc (handle_query): Update.
3870 * linux-low.cc (linux_target_ops): Update.
3871 (linux_process_target::handle_monitor_command): Define.
3872 * linux-low.h (class linux_process_target): Update.
3873 * lynx-low.cc (lynx_target_ops): Update.
3874 * nto-low.cc (nto_target_ops): Update.
3875 * win32-low.cc (win32_target_ops): Update.
3876
3877 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3878
3879 Turn process_stratum_target's handle_new_gdb_connection op into a
3880 method of process_target.
3881
3882 * target.h (struct process_stratum_target): Remove the target op.
3883 (class process_target): Add the target op.
3884 (target_handle_new_gdb_connection): Update the macro.
3885 * target.cc (process_target::handle_new_gdb_connection): Define.
3886
3887 Update the derived classes and callers below.
3888
3889 * linux-low.cc (linux_target_ops): Update.
3890 (linux_handle_new_gdb_connection): Turn into ...
3891 (linux_process_target::handle_new_gdb_connection): ... this.
3892 * linux-low.h (class linux_process_target): Update.
3893 * lynx-low.cc (lynx_target_ops): Update.
3894 * nto-low.cc (nto_target_ops): Update.
3895 * win32-low.cc (win32_target_ops): Update.
3896
3897 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3898
3899 Turn process_stratum_target's supports_fork_events,
3900 supports_vfork_events, and supports_exec_events ops into methods
3901 of process_target.
3902
3903 * target.h (struct process_stratum_target): Remove the target ops.
3904 (class process_target): Add the target ops.
3905 (target_supports_fork_events): Update the macro.
3906 (target_supports_vfork_events): Update the macro.
3907 (target_supports_exec_events): Update the macro.
3908 * target.cc (process_target::supports_fork_events): Define.
3909 (process_target::supports_vfork_events): Define.
3910 (process_target::supports_exec_events): Define.
3911
3912 Update the derived classes and callers below.
3913
3914 * linux-low.cc (linux_target_ops): Update.
3915 (linux_supports_fork_events): Turn into ...
3916 (linux_process_target::supports_fork_events): ... this.
3917 (linux_supports_vfork_events): Turn into ...
3918 (linux_process_target::supports_vfork_events): ... this.
3919 (linux_supports_exec_events): Turn into ...
3920 (linux_process_target::supports_exec_events): ... this.
3921 * linux-low.h (class linux_process_target): Update.
3922 * lynx-low.cc (lynx_target_ops): Update.
3923 * nto-low.cc (nto_target_ops): Update.
3924 * win32-low.cc (win32_target_ops): Update.
3925
3926 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3927
3928 Turn process_stratum_target's supports_multi_process op into a
3929 method of process_target.
3930
3931 * target.h (struct process_stratum_target): Remove the target op.
3932 (class process_target): Add the target op.
3933 * target.cc (process_target::supports_multi_process): Define.
3934 (target_supports_multi_process): Update.
3935
3936 Update the derived classes and callers below.
3937
3938 * linux-low.cc (linux_target_ops): Update.
3939 (linux_supports_multi_process): Turn into ...
3940 (linux_process_target::supports_multi_process): ... this.
3941 * linux-low.h (class linux_process_target): Update.
3942 * lynx-low.cc (lynx_target_ops): Update.
3943 * nto-low.cc (nto_target_ops): Update.
3944 * win32-low.cc (win32_target_ops): Update.
3945
3946 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3947
3948 Turn process_stratum_target's supports_non_stop, async, and
3949 start_non_stop ops into methods of process_target.
3950
3951 * target.h (struct process_stratum_target): Remove the target ops.
3952 (class process_target): Add the target ops.
3953 (target_supports_non_stop): Update the macro.
3954 (target_async): Update the macro.
3955 (start_non_stop): Remove declaration.
3956 * target.cc (process_target::supports_non_stop): Define.
3957 (process_target::async): Define.
3958 (process_target::start_non_stop): Define.
3959 (start_non_stop): Remove.
3960
3961 Update the derived classes and callers below.
3962
3963 * server.cc (handle_qxfer_siginfo): Update.
3964 (handle_query): Update.
3965 * linux-low.cc (linux_target_ops): Update.
3966 (linux_supports_non_stop): Turn into ...
3967 (linux_process_target::supports_non_stop): ... this.
3968 (linux_async): Turn into ...
3969 (linux_process_target::async): ... this.
3970 (linux_start_non_stop): Turn into ...
3971 (linux_process_target::start_non_stop): ... this.
3972 * linux-low.h (class linux_process_target): Update.
3973 * lynx-low.cc (lynx_target_ops): Update.
3974 * nto-low.cc (nto_target_ops): Update.
3975 (nto_supports_non_stop): Remove; rely on the default behavior
3976 instead.
3977 * win32-low.cc (win32_target_ops): Update.
3978
3979 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3980
3981 Turn process_stratum_target's qxfer_siginfo op into a method of
3982 process_target.
3983
3984 * target.h (struct process_stratum_target): Remove the target op.
3985 (class process_target): Add the target op. Also add
3986 'supports_qxfer_siginfo'.
3987 * target.cc (process_target::qxfer_siginfo): Define.
3988 (process_target::supports_qxfer_siginfo): Define.
3989
3990 Update the derived classes and callers below.
3991
3992 * server.cc (handle_qxfer_siginfo): Update.
3993 (handle_query): Update.
3994 * linux-low.cc (linux_target_ops): Update.
3995 (linux_process_target::supports_qxfer_siginfo): Define.
3996 (linux_xfer_siginfo): Turn into ...
3997 (linux_process_target::qxfer_siginfo): ... this.
3998 * linux-low.h (class linux_process_target): Update.
3999 * lynx-low.cc (lynx_target_ops): Update.
4000 * nto-low.cc (nto_target_ops): Update.
4001 * win32-low.cc (win32_target_ops): Update.
4002
4003 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4004
4005 Turn process_stratum_target's qxfer_osdata op into a method of
4006 process_target.
4007
4008 * target.h (struct process_stratum_target): Remove the target op.
4009 (class process_target): Add the target op. Also add
4010 'supports_qxfer_osdata'.
4011 * target.cc (process_target::qxfer_osdata): Define.
4012 (process_target::supports_qxfer_osdata): Define.
4013
4014 Update the derived classes and callers below.
4015
4016 * server.cc (handle_qxfer_osdata): Update.
4017 (handle_query): Update.
4018 * linux-low.cc (linux_target_ops): Update.
4019 (linux_process_target::supports_qxfer_osdata): Define.
4020 (linux_qxfer_osdata): Turn into ...
4021 (linux_process_target::qxfer_osdata): ... this.
4022 * linux-low.h (class linux_process_target): Update.
4023 * lynx-low.cc (lynx_target_ops): Update.
4024 * nto-low.cc (nto_target_ops): Update.
4025 * win32-low.cc (win32_target_ops): Update.
4026
4027 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4028
4029 Turn process_stratum_target's hostio_last_error op into a
4030 method of process_target.
4031
4032 * target.h (struct process_stratum_target): Remove the target op.
4033 (class process_target): Add the target op.
4034 * target.cc: Add "hostio.h" to includes.
4035 (process_target::hostio_last_error): Define.
4036
4037 Update the derived classes and callers below.
4038
4039 * hostio.cc (hostio_error): Update.
4040 * linux-low.cc: Remove "hostio.h" from includes.
4041 (linux_target_ops): Update.
4042 * lynx-low.cc (lynx_target_ops): Update.
4043 * nto-low.cc (nto_target_ops): Update.
4044 * win32-low.h (class win32_process_target): Update.
4045 * win32-low.cc (win32_target_ops): Update.
4046 (wince_hostio_last_error): Turn into ...
4047 (win32_process_target::hostio_last_error): ... this.
4048
4049 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4050
4051 Turn process_stratum_target's get_tls_address op into a method of
4052 process_target.
4053
4054 * target.h (struct process_stratum_target): Remove the target op.
4055 (class process_target): Add the target op. Also add
4056 'supports_get_tls_address'.
4057 * target.cc (process_target::get_tls_address): Define.
4058 (process_target::supports_get_tls_address): Define.
4059
4060 Update the derived classes and callers below.
4061
4062 * server.cc (handle_query): Update.
4063 * linux-low.cc (linux_target_ops): Update.
4064 (linux_process_target::supports_get_tls_address): Define.
4065 (linux_process_target::get_tls_address): Define.
4066 * linux-low.h (class linux_process_target): Update.
4067 * lynx-low.cc (lynx_target_ops): Update.
4068 * nto-low.cc (nto_target_ops): Update.
4069 * win32-low.cc (win32_target_ops): Update.
4070
4071 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4072
4073 Turn process_stratum_target's read_offsets op into a method of
4074 process_target.
4075
4076 * target.h (struct process_stratum_target): Remove the target op.
4077 (class process_target): Add the target op. Also add
4078 'supports_read_offsets'.
4079 * target.cc (process_target::read_offsets): Define.
4080 (process_target::supports_read_offsets): Define.
4081
4082 Update the derived classes and callers below.
4083
4084 * server.cc (handle_query): Update.
4085 * linux-low.cc (SUPPORTS_READ_OFFSETS): New #define directive.
4086 (linux_target_ops): Update.
4087 (linux_process_target::supports_read_offsets): Define.
4088 (linux_read_offsets): Turn into ...
4089 (linux_process_target::read_offsets): ... this.
4090 * linux-low.h (class linux_process_target): Update.
4091 * lynx-low.cc (lynx_target_ops): Update.
4092 * nto-low.cc (nto_target_ops): Update.
4093 * win32-low.cc (win32_target_ops): Update.
4094
4095 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4096
4097 Turn process_stratum_target's stopped_by_watchpoint and
4098 stopped_data_address ops into methods of process_target.
4099
4100 * target.h (struct process_stratum_target): Remove the target ops.
4101 (class process_target): Add the target ops.
4102 * target.cc (process_target::stopped_by_watchpoint): Define.
4103 (process_target::stopped_data_address): Define.
4104
4105 Update the derived classes and callers below.
4106
4107 * remote-utils.cc (prepare_resume_reply): Update.
4108 * linux-low.cc (linux_target_ops): Update.
4109 (linux_stopped_by_watchpoint): Turn into ...
4110 (linux_process_target::stopped_by_watchpoint): ... this.
4111 (linux_stopped_data_address): Turn into ...
4112 (linux_process_target::stopped_data_address): ... this.
4113 * linux-low.h (class linux_process_target): Update.
4114 * lynx-low.cc (lynx_target_ops): Update.
4115 * nto-low.cc (nto_target_ops): Update.
4116 (nto_stopped_by_watchpoint): Turn into ...
4117 (nto_process_target::stopped_by_watchpoint): ... this.
4118 (nto_stopped_data_address): Turn into ...
4119 (nto_process_target::stopped_data_address): ... this.
4120 * nto-low.h (class nto_process_target): Update.
4121 * win32-low.cc (win32_target_ops): Update.
4122 (win32_stopped_by_watchpoint): Turn into ...
4123 (win32_process_target::stopped_by_watchpoint): ... this.
4124 (win32_stopped_data_address): Turn into ...
4125 (win32_process_target::stopped_data_address): ... this.
4126 * win32-low.h (class win32_process_target): Update.
4127
4128 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4129
4130 Turn process_stratum_target's supports_hardware_single_step op into
4131 a method of process_target.
4132
4133 * target.h (struct process_stratum_target): Remove the target op.
4134 (class process_target): Add the target op.
4135 (target_supports_hardware_single_step): Update the macro.
4136 (target_can_do_hardware_single_step): Remove declaration.
4137 * target.cc (process_target::supports_hardware_single_step): Define.
4138 (target_can_do_hardware_single_step): Remove.
4139
4140 Update the derived classes and callers below.
4141
4142 * linux-low.h (class linux_process_target): Update.
4143 * linux-low.cc (linux_target_ops): Update.
4144 (linux_supports_hardware_single_step): Turn into ...
4145 (linux_process_target::supports_hardware_single_step): ... this.
4146 * lynx-low.h (class lynx_process_target): Update.
4147 * lynx-low.cc (lynx_target_ops): Update.
4148 (lynx_process_target::supports_hardware_single_step): Define.
4149 * nto-low.h (class nto_process_target): Update.
4150 * nto-low.cc (nto_target_ops): Update.
4151 (nto_process_target::supports_hardware_single_step): Define.
4152 * win32-low.h (class win32_process_target): Update.
4153 * win32-low.cc (win32_target_ops): Update.
4154 (win32_process_target::supports_hardware_single_step): Define.
4155
4156 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4157
4158 Turn process_stratum_target's {supports_}stopped_by_hw_breakpoint
4159 ops into methods of process_target.
4160
4161 * target.h (struct process_stratum_target): Remove the target ops.
4162 (class process_target): Add the target ops.
4163 (target_stopped_by_hw_breakpoint): Update the macro.
4164 (target_supports_stopped_by_hw_breakpoint): Update the macro.
4165 * target.cc (process_target::stopped_by_hw_breakpoint): Define.
4166 (process_target::supports_stopped_by_hw_breakpoint): Define.
4167
4168 Update the derived classes and callers below.
4169
4170 * linux-low.cc (linux_target_ops): Update.
4171 (linux_stopped_by_hw_breakpoint): Turn into ...
4172 (linux_process_target::stopped_by_hw_breakpoint): ... this.
4173 (linux_supports_stopped_by_hw_breakpoint): Turn into ...
4174 (linux_process_target::supports_stopped_by_hw_breakpoint): ... this.
4175 * linux-low.h (class linux_process_target): Update.
4176 * lynx-low.cc (lynx_target_ops): Update.
4177 * nto-low.cc (nto_target_ops): Update.
4178 * win32-low.cc (win32_target_ops): Update.
4179
4180 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4181
4182 Turn process_stratum_target's {supports_}stopped_by_sw_breakpoint
4183 ops into methods of process_target.
4184
4185 * target.h (struct process_stratum_target): Remove the target ops.
4186 (class process_target): Add the target ops.
4187 (target_stopped_by_sw_breakpoint): Update the macro.
4188 (target_supports_stopped_by_sw_breakpoint): Update the macro.
4189 * target.cc (process_target::stopped_by_sw_breakpoint): Define.
4190 (process_target::supports_stopped_by_sw_breakpoint): Define.
4191
4192 Update the derived classes and callers below.
4193
4194 * linux-low.cc (linux_target_ops): Update.
4195 (linux_stopped_by_sw_breakpoint): Turn into ...
4196 (linux_process_target::stopped_by_sw_breakpoint): ... this.
4197 (linux_supports_stopped_by_sw_breakpoint): Turn into ...
4198 (linux_process_target::supports_stopped_by_sw_breakpoint): ... this.
4199 * linux-low.h (class linux_process_target): Update.
4200 * lynx-low.cc (lynx_target_ops): Update.
4201 * nto-low.cc (nto_target_ops): Update.
4202 * win32-low.cc (win32_target_ops): Update.
4203
4204 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4205
4206 Turn process_stratum_target's insert_point and remove_point ops
4207 into methods of process_target.
4208
4209 * target.h (struct process_stratum_target): Remove the target ops.
4210 (class process_target): Add the target ops.
4211 * target.cc (process_target::insert_point): Define.
4212 (process_target::remove_point): Define.
4213
4214 Update the derived classes and callers below.
4215
4216 * mem-break.cc (set_raw_breakpoint_at): Update.
4217 (delete_raw_breakpoint): Update.
4218 (uninsert_raw_breakpoint): Update.
4219 (reinsert_raw_breakpoint): Update.
4220 * linux-low.cc (linux_target_ops): Update.
4221 (linux_insert_point): Turn into ...
4222 (linux_process_target::insert_point): ... this.
4223 (linux_remove_point): Turn into ...
4224 (linux_process_target::remove_point): ... this.
4225 * linux-low.h (class linux_process_target): Update.
4226 * lynx-low.cc (lynx_target_ops): Update.
4227 * nto-low.cc (nto_target_ops): Update.
4228 (nto_insert_point): Turn into ...
4229 (nto_process_target::insert_point): ... this.
4230 (nto_remove_point): Turn into ...
4231 (nto_process_target::remove_point): ... this.
4232 * nto-low.h (class nto_process_target): Update.
4233 * win32-low.cc (win32_target_ops): Update.
4234 (win32_insert_point): Turn into ...
4235 (win32_process_target::insert_point): ... this.
4236 (win32_remove_point): Turn into ...
4237 (win32_process_target::remove_point): ... this.
4238 * win32-low.h (class win32_process_target): Update.
4239
4240 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4241
4242 Turn process_stratum_target's supports_z_point_type op into a
4243 method of process_target.
4244
4245 * target.h (struct process_stratum_target): Remove the target op.
4246 (class process_target): Add the target op.
4247 * target.cc (process_target::supports_z_point_type): Define.
4248
4249 Update the derived classes and callers below.
4250
4251 * mem-break.cc (z_type_supported): Update.
4252 * linux-low.cc (linux_target_ops): Update.
4253 (linux_supports_z_point_type): Turn into ...
4254 (linux_process_target::supports_z_point_type): ... this.
4255 * linux-low.h (class linux_process_target): Update.
4256 * lynx-low.cc (lynx_target_ops): Update.
4257 * nto-low.cc (nto_target_ops): Update.
4258 (nto_supports_z_point_type): Turn into ...
4259 (nto_process_target::supports_z_point_type): ... this.
4260 * nto-low.h (class nto_process_target): Update.
4261 * win32-low.cc (win32_target_ops): Update.
4262 (win32_supports_z_point_type): Turn into ...
4263 (win32_process_target::supports_z_point_type): ... this.
4264 * win32-low.h (class win32_process_target): Update.
4265
4266 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4267
4268 Turn process_stratum_target's read_auxv op into a method of
4269 process_target.
4270
4271 * target.h (class process_stratum_target): Remove the target op.
4272 (struct process_target): Add the target op. Also add
4273 'supports_read_auxv'.
4274 * target.cc (process_target::read_auxv): Define.
4275 (process_target::supports_read_auxv): Define.
4276
4277 Update the derived classes and callers below.
4278
4279 * server.cc (handle_qxfer_auxv): Update.
4280 (handle_query): Update.
4281 * linux-low.cc (linux_target_ops): Update.
4282 (linux_process_target::supports_read_auxv): Define.
4283 (linux_read_auxv): Turn into ...
4284 (linux_process_target::read_auxv): ... this.
4285 * linux-low.h (class linux_process_target): Update.
4286 * lynx-low.cc (lynx_target_ops): Update.
4287 * nto-low.cc (nto_target_ops): Update.
4288 (nto_process_target::supports_read_auxv): Define.
4289 (nto_read_auxv): Turn into ...
4290 (nto_process_target::read_auxv): ... this.
4291 * nto-low.h (class nto_process_target): Update.
4292 * win32-low.cc (win32_target_ops): Update.
4293
4294 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4295
4296 Turn process_stratum_target's request_interrupt op into a method of
4297 process_target.
4298
4299 * target.h (struct process_stratum_target): Remove the target op.
4300 (class process_target): Add the target op.
4301
4302 Update the derived classes and callers below.
4303
4304 * remote-utils.cc (putpkt_binary_1): Update.
4305 (input_interrupt): Update.
4306 (getpkt): Update.
4307 * server.cc (handle_v_requests): Update.
4308 * linux-low.cc (linux_target_ops): Update.
4309 (linux_request_interrupt): Turn into ...
4310 (linux_process_target::request_interrupt): ... this.
4311 * linux-low.h (class linux_process_target): Update.
4312 * lynx-low.cc (lynx_target_ops): Update.
4313 (lynx_request_interrupt): Turn into ...
4314 (lynx_process_target::request_interrupt): ... this.
4315 * lynx-low.h (class lynx_process_target): Update.
4316 * nto-low.cc (nto_target_ops): Update.
4317 (nto_request_interrupt): Turn into ...
4318 (nto_process_target::request_interrupt): ... this.
4319 * nto-low.h (class nto_process_target): Update.
4320 * win32-low.cc (win32_target_ops): Update.
4321 (win32_request_interrupt): Turn into ...
4322 (win32_process_target::request_interrupt): ... this.
4323 * win32-low.h (class win32_process_target): Update.
4324
4325 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4326
4327 Turn process_stratum_target's look_up_symbols op into a method of
4328 process_target.
4329
4330 * target.h (struct process_stratum_target): Remove the target op.
4331 (class process_target): Add the target op.
4332 * target.cc (process_target::look_up_symbols): Define.
4333
4334 Update the derived classes and callers below.
4335
4336 * server.cc (handle_query): Update.
4337 * linux-low.cc (linux_target_ops): Update.
4338 (linux_look_up_symbols): Turn into ...
4339 (linux_process_target::look_up_symbols): ... this.
4340 * linux-low.h (class linux_process_target): Update.
4341 * lynx-low.cc (lynx_target_ops): Update.
4342 * nto-low.cc (nto_target_ops): Update.
4343 * win32-low.cc (win32_target_ops): Update.
4344
4345 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4346
4347 Turn process_stratum_target's read_memory and write_memory
4348 ops into methods of process_target.
4349
4350 * target.h (struct process_stratum_target): Remove the target ops.
4351 (class process_target): Add the target ops.
4352
4353 Update the derived classes and callers below.
4354
4355 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
4356 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
4357 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
4358 (arm_get_syscall_trapinfo): Update.
4359 * linux-cris-low.cc (cris_breakpoint_at): Update.
4360 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
4361 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
4362 * linux-mips-low.cc (mips_breakpoint_at): Update.
4363 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
4364 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
4365 * linux-sh-low.cc (sh_breakpoint_at): Update.
4366 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
4367 (sparc_store_gregset_from_stack): Update.
4368 (sparc_breakpoint_at): Update.
4369 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
4370 * linux-tile-low.cc (tile_breakpoint_at): Update.
4371 * linux-x86-low.cc (x86_breakpoint_at): Update.
4372 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
4373 * mem-brea.cc (insert_memory_breakpoint): Update.
4374 (validate_inserted_breakpoint): Update.
4375 * target.cc (read_inferior_memory): Update.
4376 (target_write_memory): Update.
4377 * linux-low.cc (linux_target_ops): Update.
4378 (linux_read_memory): Make a wrapper around the read_memory target
4379 op call.
4380 (linux_process_target::read_memory): Rename from linux_read_memory.
4381 (linux_write_memory): Turn into ...
4382 (linux_process_target::write_memory): ... this.
4383 * linux-low.h (class linux_process_target): Update.
4384 * lynx-low.cc (lynx_target_ops): Update.
4385 (lynx_read_memory): Turn into ...
4386 (lynx_process_target::read_memory): ... this.
4387 (lynx_write_memory): Turn into ...
4388 (lynx_process_target::write_memory): ... this.
4389 * lynx-low.h (class lynx_process_target): Update.
4390 * nto-low.cc (nto_target_ops): Update.
4391 (nto_read_memory): Turn into ...
4392 (nto_process_target::read_memory): ... this.
4393 (nto_write_memory): Turn into ...
4394 (nto_process_target::write_memory): ... this.
4395 * nto-low.h (class nto_process_target): Update.
4396 * win32-low.cc (win32_target_ops): Update.
4397 (win32_read_inferior_memory): Turn into ...
4398 (win32_process_target::read_memory): ... this.
4399 (win32_write_inferior_memory): Turn into ...
4400 (win32_process_target::write_memory): ... this.
4401 * win32-low.h (class win32_process_target): Update.
4402
4403 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4404
4405 Turn process_stratum_target's prepare_to_access_memory and
4406 done_accessing_memory ops into methods of process_target.
4407
4408 * target.h (struct process_stratum_target): Remove the target ops.
4409 (class process_target): Add the target ops.
4410 * target.cc (process_target::prepare_to_access_memory): Define.
4411 (process_target::done_accessing_memory): Define.
4412 (prepare_to_access_memory): Update.
4413 (done_accessing_memory): Update.
4414
4415 Update the derived classes and callers below.
4416
4417 * linux-low.cc (linux_target_ops): Update.
4418 (linux_prepare_to_access_memory): Turn into ...
4419 (linux_process_target::prepare_to_access_memory): ... this.
4420 (linux_done_accessing_memory): Turn into ...
4421 (linux_process_target::done_accessing_memory): ... this.
4422 * linux-low.h (class linux_process_target): Update.
4423 * lynx-low.cc (lynx_target_ops): Update.
4424 * nto-low.cc (nto_target_ops): Update.
4425 * win32-low.cc (win32_target_ops): Update.
4426
4427 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4428
4429 Turn process_stratum_target's fetch_registers and store_registers
4430 ops into methods of process_target.
4431
4432 * target.h (struct process_stratum_target): Remove the target ops.
4433 (class process_target): Add the target ops.
4434 (fetch_inferior_registers): Update the macro.
4435 (store_inferior_registers): Update the macro.
4436
4437 Update the derived classes and callers below.
4438
4439 * linux-low.cc (linux_target_ops): Update.
4440 (linux_fetch_registers): Turn into ...
4441 (linux_process_target::fetch_registers): ... this.
4442 (linux_store_registers): Turn into ...
4443 (linux_process_target::store_registers): ... this.
4444 * linux-low.h (class linux_process_target): Update.
4445 * lynx-low.cc (lynx_target_ops): Update.
4446 (lynx_fetch_registers): Turn into ...
4447 (lynx_process_target::fetch_registers): ... this.
4448 (lynx_store_registers): Turn into ...
4449 (lynx_process_target::store_registers): ... this.
4450 * lynx-low.h (class lynx_process_target): Update.
4451 * nto-low.cc (nto_target_ops): Update.
4452 (nto_fetch_registers): Turn into ...
4453 (nto_process_target::fetch_registers): ... this.
4454 (nto_store_registers): Turn into ...
4455 (nto_process_target::store_registers): ... this.
4456 * nto-low.h (class nto_process_target): Update.
4457 * win32-low.cc (win32_target_ops): Update.
4458 (win32_fetch_inferior_registers): Turn into ...
4459 (win32_process_target::fetch_registers): ... this.
4460 (win32_store_inferior_registers): Turn into ...
4461 (win32_process_target::store_registers): ... this.
4462 * win32-low.h (class win32_process_target): Update.
4463
4464 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4465
4466 Turn process_stratum_target's wait op into a method of
4467 process_target.
4468
4469 * target.h (struct process_stratum_target): Remove the target op.
4470 (class process_target): Add the target op.
4471
4472 Update the derived classes and callers below.
4473
4474 * target.cc (target_wait): Update.
4475 * linux-low.cc (linux_target_ops): Update.
4476 (linux_wait): Turn into ...
4477 (linux_process_target::wait): ... this.
4478 * linux-low.h (class linux_process_target): Update.
4479 * lynx-low.cc (lynx_target_ops): Update.
4480 (lynx_wait): Turn into ...
4481 (lynx_process_target::wait): ... this.
4482 * lynx-low.h (class lynx_process_target): Update.
4483 * nto-low.cc (nto_target_ops): Update.
4484 (nto_wait): Turn into ...
4485 (nto_process_target::wait): ... this.
4486 * nto-low.h (class nto_process_target): Update.
4487 * win32-low.cc (win32_target_ops): Update.
4488 (win32_wait): Turn into ...
4489 (win32_process_target::wait): ... this.
4490 (do_initial_child_stuff): Update.
4491 * win32-low.h (class win32_process_target): Update.
4492
4493 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4494
4495 Turn process_stratum_target's resume op into a method of
4496 process_target.
4497
4498 * target.h (struct process_stratum_target): Remove the target op.
4499 (class process_target): Add the target op.
4500
4501 Update the derived classes and callers below.
4502
4503 * server.cc (resume): Update.
4504 * target.cc (target_stop_and_wait): Update.
4505 (target_continue_no_signal): Update.
4506 (target_continue): Update.
4507 * linux-low.cc (linux_target_ops): Update.
4508 (linux_resume): Turn into ...
4509 (linux_process_target::resume): ... this.
4510 * linux-low.h (class linux_process_target): Update.
4511 * lynx-low.cc (lynx_target_ops): Update.
4512 (lynx_resume): Turn into ...
4513 (lynx_process_target::resume): ... this.
4514 * lynx-low.h (class lynx_process_target): Update.
4515 * nto-low.cc (nto_target_ops): Update.
4516 (nto_resume): Turn into ...
4517 (nto_process_target::resume): ... this.
4518 * nto-low.h (class nto_process_target): Update.
4519 * win32-low.cc (win32_target_ops): Update.
4520 (win32_resume): Turn into ...
4521 (win32_process_target::resume): ... this.
4522 (win32_process_target::detach): Update.
4523 (do_initial_child_stuff): Update.
4524 * win32-low.h (class win32_process_target): Update.
4525
4526 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4527
4528 Turn process_stratum_target's thread_alive op into a method of
4529 process_target.
4530
4531 * target.h (struct process_stratum_target): Remove the target op.
4532 (class process_target): Add the target op.
4533 (mythread_alive): Update the macro.
4534
4535 Update the derived classes and callers below.
4536
4537 * linux-low.cc (linux_target_ops): Update.
4538 (linux_thread_alive): Turn into ...
4539 (linux_process_target::thread_alive): ... this.
4540 (wait_for_sigstop): Update.
4541 * linux-low.h (class linux_process_target): Update.
4542 * lynx-low.cc (lynx_target_ops): Update.
4543 (lynx_thread_alive): Turn into ...
4544 (lynx_process_target::thread_alive): ... this.
4545 * lynx-low.h (class lynx_process_target): Update.
4546 * nto-low.cc (nto_target_ops): Update.
4547 (nto_thread_alive): Turn into ...
4548 (nto_process_target::thread_alive): ... this.
4549 * nto-low.h (class nto_process_target): Update.
4550 * win32-low.cc (win32_target_ops): Update.
4551 (win32_thread_alive): Turn into ...
4552 (win32_process_target::thread_alive): ... this.
4553 * win32-low.h (class win32_process_target): Update.
4554
4555 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4556
4557 Turn process_stratum_target's join op into a method of
4558 process_target.
4559
4560 * target.h (struct process_stratum_target): Remove the target op.
4561 (class process_target): Add the target op.
4562 (join_inferior): Update the macro.
4563
4564 Update the derived classes and callers below.
4565
4566 * linux-low.cc (linux_target_ops): Update.
4567 (linux_join): Turn into ...
4568 (linux_process_target::join): ... this.
4569 * linux-low.h (class linux_process_target): Update.
4570 * lynx-low.cc (lynx_target_ops): Update.
4571 (lynx_join): Turn into ...
4572 (lynx_process_target::join): ... this.
4573 * lynx-low.h (class lynx_process_target): Update.
4574 * nto-low.cc (nto_target_ops): Update.
4575 (nto_process_target::join): Define.
4576 * nto-low.h (class nto_process_target): Update.
4577 * win32-low.cc (win32_target_ops): Update.
4578 (win32_join): Turn into ...
4579 (win32_process_target::join): ... this.
4580 * win32-low.h (class win32_process_target): Update.
4581
4582 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4583
4584 Turn process_stratum_target's mourn op into a method of
4585 process_target.
4586
4587 * target.h (struct process_stratum_target): Remove the target op.
4588 (class process_target): Add the target op.
4589
4590 Update the derived classes and callers below.
4591
4592 * target.cc (target_mourn_inferior): Update.
4593 * linux-low.cc (linux_target_ops): Update.
4594 (linux_mourn): Turn into ...
4595 (linux_process_target::mourn): ... this.
4596 (handle_extended_wait): Update.
4597 (linux_process_target::kill): Update.
4598 (linux_process_target::detach): Update.
4599 * linux-low.h (class linux_process_target): Update.
4600 * lynx-low.cc (lynx_target_ops): Update.
4601 (lynx_mourn): Turn into ...
4602 (lynx_process_target::mourn): ... this.
4603 * lynx-low.h (class lynx_process_target): Update.
4604 * nto-low.cc (nto_target_ops): Update.
4605 (nto_mourn): Turn into ...
4606 (nto_process_target::mourn): ... this.
4607 * nto-low.h (class nto_process_target): Update.
4608 * win32-low.cc (win32_target_ops): Update.
4609 (win32_mourn): Turn into ...
4610 (win32_process_target::mourn): ... this.
4611 * win32-low.h (class win32_process_target): Update.
4612
4613 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4614
4615 Turn process_stratum_target's detach op into a method of
4616 process_target.
4617
4618 * target.h (struct process_stratum_target): Remove the target op.
4619 (class process_target): Add the target op.
4620 (detach_inferior): Update the macro.
4621
4622 Update the derived classes and callers below.
4623
4624 * linux-low.cc (linux_target_ops): Update.
4625 (linux_detach): Turn into ...
4626 (linux_process_target::detach): ... this.
4627 * linux-low.h (class linux_process_target): Update.
4628 * lynx-low.cc (lynx_target_ops): Update.
4629 (lynx_detach): Turn into ...
4630 (lynx_process_target::detach): ... this.
4631 * lynx-low.h (class lynx_process_target): Update.
4632 * nto-low.cc (nto_target_ops): Update.
4633 (nto_detach): Turn into ...
4634 (nto_process_target::detach): ... this.
4635 * nto-low.h (class nto_process_target): Update.
4636 * win32-low.cc (win32_target_ops): Update.
4637 (win32_detach): Turn into ...
4638 (win32_process_target::detach): ... this.
4639 * win32-low.h (class win32_process_target): Update.
4640
4641 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4642
4643 Turn process_stratum_target's kill op into a method of
4644 process_target.
4645
4646 * target.h (struct process_stratum_target): Remove the target op.
4647 (class process_target): Add the target op.
4648
4649 Update the derived classes and callers below.
4650
4651 * target.cc (kill_inferior): Update.
4652 * linux-low.cc (linux_target_ops): Update.
4653 (linux_kill): Turn into ...
4654 (linux_process_target::kill): ... this.
4655 * linux-low.h (class linux_process_target): Update.
4656 * lynx-low.cc (lynx_target_ops): Update.
4657 (lynx_kill): Turn into ...
4658 (lynx_process_target::kill): ... this.
4659 * lynx-low.h (class lynx_process_target): Update.
4660 * nto-low.cc (nto_target_ops): Update.
4661 (nto_kill): Turn into ...
4662 (nto_process_target::kill): ... this.
4663 * nto-low.h (class nto_process_target): Update.
4664 * win32-low.cc (win32_target_ops): Update.
4665 (win32_kill): Turn into ...
4666 (win32_process_target::kill): ... this.
4667 * win32-low.h (class win32_process_target): Update.
4668
4669 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4670
4671 Turn process_stratum_target's attach op into a method of
4672 process_target.
4673
4674 * target.h (struct process_stratum_target): Remove the target op.
4675 (class process_target): Add the target op.
4676 (myattach): Update the macro.
4677
4678 Update the derived classes and callers below.
4679
4680 * linux-low.cc (linux_target_ops): Update.
4681 (linux_attach): Turn into ...
4682 (linux_process_target::attach): ... this.
4683 * linux-low.h (class linux_process_target): Update.
4684 * lynx-low.cc (lynx_target_ops): Update.
4685 (lynx_attach): Turn into ...
4686 (lynx_process_target::attach): ... this.
4687 * lynx-low.h (class lynx_process_target): Update.
4688 * nto-low.cc (nto_target_ops): Update.
4689 (nto_attach): Turn into ...
4690 (nto_process_target::attach): ... this.
4691 * nto-low.h (class nto_process_target): Update.
4692 * win32-low.cc (win32_target_ops): Update.
4693 (win32_attach): Turn into ...
4694 (win32_process_target::attach): ... this.
4695 * win32-low.h (class win32_process_target): Update.
4696
4697 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4698
4699 Turn process_stratum_target's post_create_inferior op into a method
4700 of process_target.
4701
4702 * target.h (struct process_stratum_target): Remove the target op.
4703 (class process_target): Add the target op.
4704 (target_post_create_inferior): Update the macro.
4705 * target.cc (process_target::post_create_inferior): Define.
4706
4707 Update the derived classes and callers below.
4708
4709 * linux-low.cc (linux_target_ops): Update.
4710 (linux_post_create_inferior): Turn into ...
4711 (linux_process_target::post_create_inferior): ... this.
4712 * linux-low.h (class linux_process_target): Update.
4713 * lynx-low.cc (lynx_target_ops): Update.
4714 * nto-low.cc (nto_target_ops): Update.
4715 * win32-low.cc (win32_target_ops): Update.
4716
4717 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4718
4719 Turn process_stratum_target's create_inferior op into a method of
4720 process_target.
4721
4722 * target.h (struct process_stratum_target): Remove the target op.
4723 (class process_target): Add the target op.
4724 (create_inferior): Rename the macro to ...
4725 (target_create_inferior): ... this.
4726
4727 Update the derived classes and callers below.
4728
4729 * server.cc (handle_v_run): Update.
4730 (captured_main): Update.
4731 (process_serial_event): Update.
4732 * linux-low.cc (linux_target_ops): Update.
4733 (linux_create_inferior): Turn into ...
4734 (linux_process_target::create_inferior): ... this.
4735 * linux-low.h (class linux_process_target): Update.
4736 * lynx-low.cc (lynx_target_ops): Update.
4737 (lynx_create_inferior): Turn into ...
4738 (lynx_process_target::create_inferior): ... this.
4739 * lynx-low.h (class lynx_process_target): Update.
4740 * nto-low.cc (nto_target_ops): Update.
4741 (nto_create_inferior): Turn into ...
4742 (nto_process_target::create_inferior): ... this.
4743 * nto-low.h (class nto_process_target): Update.
4744 * win32-low.cc (win32_target_ops): Update.
4745 (win32_create_inferior): Turn into ...
4746 (win32_process_target::create_inferior): ... this.
4747 * win32-low.h (class win32_process_target): Update.
4748
4749 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4750
4751 * target.h (class process_target): New class definition.
4752 (struct process_stratum_target) <pt>: New field with type
4753 'process_target*'.
4754 * linux-low.h (class linux_process_target): Define as a derived
4755 class of 'process_target'.
4756 * linux-low.cc (linux_target_ops): Add a linux_process_target*
4757 as the 'pt' field.
4758 * lynx-low.h (class lynx_process_target): Define as a derived
4759 class of 'process_target'.
4760 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
4761 as the 'pt' field.
4762 * nto-low.h (class nto_process_target): Define as a derived
4763 class of 'process_target'.
4764 * nto-low.cc (nto_target_ops): Add an nto_process_target*
4765 as the 'pt' field.
4766 * win32-low.h (class win32_process_target): Define as a derived
4767 class of 'process_target'.
4768 * win32-low.cc (win32_target_ops): Add a win32_process_target*
4769 as the 'pt' field.
4770
4771 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
4772
4773 * configure: Regenerate.
4774
4775 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
4776 Andrew Burgess <andrew.burgess@embecosm.com>
4777
4778 * linux-riscv-low.cc: New file.
4779 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
4780 and nat/riscv-linux-tdesc.c.
4781 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
4782 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
4783 Define.
4784
4785 2020-02-14 Tom Tromey <tom@tromey.com>
4786
4787 * acinclude.m4: Don't include acx_configure_dir.m4.
4788 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
4789 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
4790 (all, install-only, uninstall, clean-info, clean)
4791 (maintainer-clean): Don't recurse.
4792 (subdir_do, all-lib): Remove.
4793 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
4794 (GNULIB_H): Remove.
4795 (generated_files): Update.
4796 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
4797 * configure: Rebuild.
4798 * configure.ac: Don't configure gnulib or libiberty.
4799 (GNULIB): Update.
4800
4801 2020-02-14 Eli Zaretskii <eliz@gnu.org>
4802
4803 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
4804 preparing the command line for CreateProcess.
4805 (win32_create_inferior): Reflect the program name in debugging
4806 output that shows the process and its command line.
4807
4808 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
4809
4810 * Makefile.in: Rename source files from .c to .cc.
4811 * %.c: Rename to %.cc.
4812 * configure.ac: Rename server.c to server.cc.
4813 * configure: Re-generate.
4814
4815 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
4816
4817 * Makefile.in: Rename gdbsupport source files from .c to .cc.
4818
4819 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
4820
4821 * win32-low.c (win32_create_inferior): Set signal_pid.
4822
4823 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
4824 Pedro Alves <palves@redhat.com>
4825
4826 Skip building gdbserver in a cross-configuration.
4827 * configure.srv: Set $gdbserver_host depending on whether $target
4828 is $host. Use $gdbserver_host instead of $host.
4829
4830 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
4831
4832 * configure: Re-generate.
4833
4834 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
4835
4836 * configure: Re-generate.
4837
4838 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
4839
4840 * acinclude.m4: Update warning.m4 path.
4841
4842 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
4843
4844 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
4845 (handle_exception): Set siginfo_er.
4846 (win32_xfer_siginfo): New function.
4847
4848 2020-02-07 Tom Tromey <tom@tromey.com>
4849 Pedro Alves <palves@redhat.com>
4850
4851 * README: Update build documentation.
4852 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
4853 host, not target.
4854 * configure.ac: Update paths.
4855 * configure: Rebuild.
4856 * acinclude.m4: Update paths.
4857 * Makefile.in: Update include paths.
4858 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
4859 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
4860 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
4861 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
4862 (%-generated.c): Update paths.
4863 * Move entire directory from ../gdb/gdbserver.
4864
4865 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
4866
4867 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
4868
4869 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4870
4871 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
4872 assignment instead of srv_linux_obj.
4873
4874 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
4875
4876 * server.c (handle_qxfer_libraries): Write segment-address with
4877 paddress.
4878
4879 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
4880
4881 * Makefile.in (install-strip): New target.
4882 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
4883 * aclocal.m4: Regenerate.
4884 * configure: Regenerate.
4885 * configure.ac: Add AM_PROG_INSTALL_STRIP.
4886
4887 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
4888
4889 * Makefile.in (SFILES): Adjust paths to point to real files.
4890 (OBS): Move waitstatus.o to target/waitstatus.o.
4891 (TAGS): Transform paths appropriately.
4892 (%.o): Rename to...
4893 (nat/%.o): ... this pattern rule.
4894 (%.o): Rename to...
4895 (target/%.o): ... this pattern rule.
4896 * configure.srv: Adjust paths throughout to include nat/ prefix
4897 with the revant files.
4898 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
4899 * configure: Regenerate.
4900
4901 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
4902
4903 * Makefile.in (TAGS): Remove config files from the recipe.
4904
4905 2020-01-14 Tom Tromey <tom@tromey.com>
4906
4907 * configure: Rebuild.
4908 * configure.ac: Remove any checks that were added to common.m4.
4909 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
4910 lib-link.m4.
4911
4912 2020-01-14 Tom Tromey <tom@tromey.com>
4913
4914 * server.h: Include config.h.
4915 * gdbreplay.c: Include config.h.
4916 * configure: Rebuild.
4917 * configure.ac: Don't source common.host.
4918 * acinclude.m4: Update path.
4919 * Makefile.in (INCSUPPORT): New variable.
4920 (INCLUDE_CFLAGS): Add INCSUPPORT.
4921 (SFILES): Update paths.
4922 (version-generated.c): Update path to create-version.sh.
4923 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
4924
4925 2020-01-14 Tom Tromey <tom@tromey.com>
4926
4927 * configure.ac (LIBS): Use WIN32APILIBS.
4928 (USE_WIN32API): Don't define.
4929 * configure: Rebuild.
4930
4931 2020-01-14 Tom Tromey <tom@tromey.com>
4932
4933 * configure: Rebuild.
4934
4935 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4936
4937 * Makefile.in (%-generated.c): Remove rule for files from
4938 regformats/i386.
4939
4940 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4941
4942 * configure: Re-generate.
4943
4944 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4945
4946 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
4947 Define to static.
4948 * tracepoint.c (stop_tracing, flush_trace_buffer,
4949 about_to_request_buffer_space, get_trace_state_variable_value,
4950 set_trace_state_variable_value, gdb_collect): Add declaration.
4951
4952 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4953
4954 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
4955 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
4956 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
4957 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
4958 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
4959 static.
4960
4961 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4962
4963 * inferiors.c: Include gdbsupport/common-inferior.h.
4964
4965 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4966
4967 * hostio-errno.c: Include hostio.h.
4968
4969 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4970
4971 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
4972 prerequisite.
4973
4974 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4975
4976 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
4977 * linux-arm-tdesc.h: Include arch/arm.h.
4978
4979 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4980
4981 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
4982
4983 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4984
4985 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
4986 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
4987
4988 2020-01-10 Pedro Alves <palves@redhat.com>
4989
4990 * fork-child.c (post_fork_inferior): Pass target down to
4991 startup_inferior.
4992 * inferiors.c (switch_to_thread): Add process_stratum_target
4993 parameter.
4994 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
4995 * nto-low.c (nto_target_ops): Now a process_stratum_target.
4996 * linux-low.c (linux_target_ops): Now a process_stratum_target.
4997 * remote-utils.c (prepare_resume_reply): Pass the target to
4998 switch_to_thread.
4999 * target.c (the_target): Now a process_stratum_target.
5000 (done_accessing_memory): Pass the target to switch_to_thread.
5001 (set_target_ops): Ajust to use process_stratum_target.
5002 * target.h (struct target_ops): Rename to ...
5003 (struct process_stratum_target): ... this.
5004 (the_target, set_target_ops): Adjust.
5005 (prepare_to_access_memory): Adjust comment.
5006 * win32-low.c (child_xfer_memory): Adjust to use
5007 process_stratum_target.
5008 (win32_target_ops): Now a process_stratum_target.
5009
5010 2020-01-06 Eli Zaretskii <eliz@gnu.org>
5011 Pedro Alves <palves@redhat.com>
5012
5013 * win32-low.c (get_child_debug_event): Extract the fatal exception
5014 from the exit status and convert to the equivalent Posix signal
5015 number.
5016 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
5017 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
5018
5019 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
5020
5021 * Makefile.in: Use INSTALL_PROGRAM_ENV.
5022
5023 2020-01-01 Joel Brobecker <brobecker@adacore.com>
5024
5025 * server.c (gdbserver_version): Change copyright year to 2020.
5026 * gdbreplay.c (gdbreplay_version): Likewise.
5027
5028 2019-12-19 Christian Biesinger <cbiesinger@google.com>
5029
5030 * configure: Regenerate.
5031 * configure.ac: Quote variable arguments of test.
5032
5033 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
5034
5035 * Makefile.in: Fix build with GNU Make 3.81
5036
5037 2019-12-16 Tom Tromey <tromey@adacore.com>
5038
5039 * server.c (get_exec_file): Constify result.
5040
5041 2019-12-10 Christian Biesinger <cbiesinger@google.com>
5042
5043 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
5044 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
5045 * config.in: Regenerate.
5046 * configure: Regenerate.
5047 * configure.ac: Don't check for strerror.
5048 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
5049 Call safe_strerror instead of strerror.
5050 * server.h (strerror): Remove this now-unnecessary declaration.
5051 * tracepoint.c (init_named_socket): Call safe_strerror instead of
5052 strerror.
5053 (gdb_agent_helper_thread): Likewise.
5054 * utils.c (perror_with_name): Likewise.
5055
5056 2019-11-26 Tom Tromey <tom@tromey.com>
5057
5058 * configure, config.in: Rebuild.
5059
5060 2019-11-26 Tom Tromey <tom@tromey.com>
5061
5062 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
5063 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
5064 gdb_sigmask.
5065 * configure, config.in: Rebuild.
5066
5067 2019-11-26 Tom Tromey <tom@tromey.com>
5068
5069 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
5070 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
5071 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
5072 * acinclude.m4: Include ax_pthread.m4.
5073 * config.in, configure: Rebuild.
5074
5075 2019-11-26 Christian Biesinger <cbiesinger@google.com>
5076
5077 * debug.c (debug_set_output): Call safe_strerror instead of
5078 strerror.
5079 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
5080 (linux_kill_one_lwp): Likewise.
5081 (linux_detach_one_lwp): Likewise.
5082 (linux_wait_for_event_filtered): Likewise.
5083 (store_register): Likewise.
5084 * lynx-low.c (lynx_attach): Likewise.
5085 * mem-break.c (insert_memory_breakpoint): Likewise.
5086 (remove_memory_breakpoint): Likewise.
5087 (delete_fast_tracepoint_jump): Likewise.
5088 (set_fast_tracepoint_jump): Likewise.
5089 (uninsert_fast_tracepoint_jumps_at): Likewise.
5090 (reinsert_fast_tracepoint_jumps_at): Likewise.
5091 * nto-low.c (nto_xfer_memory): Likewise.
5092 (nto_resume): Likewise.
5093
5094 2019-11-20 Luis Machado <luis.machado@linaro.org>
5095
5096 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
5097 instead of register count.
5098 * tdesc.c (tdesc_contains_feature): New function.
5099 * tdesc.h (tdesc_contains_feature): New prototype.
5100
5101 2019-11-15 Christian Biesinger <cbiesinger@google.com>
5102
5103 * Makefile.in: Add safe-strerror.c.
5104 * configure: Regenerate.
5105 * configure.ac: Don't source common.host.
5106
5107 2019-11-15 Christian Biesinger <cbiesinger@google.com>
5108
5109 * config.in: Regenerate.
5110 * configure: Regenerate.
5111
5112 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
5113
5114 * ax.c (ax_printf): Handle size_t_arg.
5115
5116 2019-11-06 Christian Biesinger <cbiesinger@google.com>
5117
5118 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
5119 * mi/mi-main.c (output_cores): Likewise.
5120 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
5121 (linux_xfer_osdata_modules): Likewise.
5122 * remote.c (register_remote_support_xml): Likewise.
5123 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
5124 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
5125
5126 2019-11-01 Christian Biesinger <cbiesinger@google.com>
5127
5128 * configure: Regenerate.
5129 * configure.ac: Remove check for strerror_r.
5130
5131 2019-10-31 Christian Biesinger <cbiesinger@google.com>
5132
5133 * config.in: Regenerate.
5134 * configure: Regenerate.
5135 * configure.ac: Also check for strerror_r.
5136
5137 2019-10-31 Christian Biesinger <cbiesinger@google.com>
5138
5139 * ax.h (debug_agent): Remove duplicate declaration.
5140
5141 2019-10-26 Tom de Vries <tdevries@suse.de>
5142
5143 * linux-aarch64-low.c: Fix typos in comments.
5144 * linux-arm-low.c: Same.
5145 * linux-low.c: Same.
5146 * linux-ppc-low.c: Same.
5147 * proc-service.c: Same.
5148 * regcache.h: Same.
5149 * server.c: Same.
5150 * tracepoint.c: Same.
5151 * win32-low.c: Same.
5152
5153 2019-10-25 Tom Tromey <tromey@adacore.com>
5154
5155 * utils.c (xstrdup): Remove.
5156
5157 2019-10-23 Tom Tromey <tom@tromey.com>
5158
5159 * configure, config.in: Rebuild.
5160
5161 2019-10-23 Tom Tromey <tom@tromey.com>
5162
5163 * configure: Rebuild.
5164 * acinclude.m4: Use m4_include, not sinclude.
5165
5166 2019-10-17 Tom Tromey <tromey@adacore.com>
5167
5168 * configure: Rebuild.
5169 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
5170 in AC_CONFIG_FILES invocation.
5171 * Makefile.in (stamp-h, Makefile): Use new-style config.status
5172 invocation.
5173
5174 2019-10-16 Christian Biesinger <cbiesinger@google.com>
5175
5176 * server.c: Include xml-builtin.h.
5177 (get_xml_features): Don't declare xml_builtins here.
5178
5179 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
5180
5181 * Makefile.in: Remove references to vec-ipa.o.
5182
5183 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
5184
5185 * Makefile.in: Remove references to vec.c.
5186
5187 2019-10-02 Christian Biesinger <cbiesinger@google.com>
5188
5189 * server.c (server_waiting): Change to bool.
5190 (extended_protocol): Likewise.
5191 (response_needed): Likewise.
5192 (exit_requested): Likewise.
5193 (run_once): Likewise.
5194 (report_no_resumed): Likewise.
5195 (non_stop): Likewise.
5196 (disable_packet_vCont): Likewise.
5197 (disable_packet_Tthread): Likewise.
5198 (disable_packet_qC): Likewise.
5199 (disable_packet_qfThreadInfo): Likewise.
5200 (handle_general_set): Update.
5201 (handle_detach): Update.
5202 (handle_monitor_command): Update.
5203 (handle_query): Update.
5204 (captured_main): Update.
5205 (process_serial_event): Update.
5206 * server.h (server_waiting): Change to bool.
5207 (disable_packet_vCont): Likewise.
5208 (disable_packet_Tthread): Likewise.
5209 (disable_packet_qC): Likewise.
5210 (disable_packet_qfThreadInfo): Likewise.
5211 (run_once): Likewise.
5212 (non_stop): Likewise.
5213 * target.c (target_stop_and_wait): Update.
5214
5215 2019-10-02 Tom Tromey <tromey@adacore.com>
5216
5217 * Makefile.in (SFILES): Add common-inferior.c.
5218 (OBS): Add common-inferior.o.
5219 * server.c (startup_with_shell): Don't define.
5220
5221 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
5222
5223 * linux-low.c (linux_low_read_btrace): Update for change to
5224 std::vector.
5225
5226 2019-09-20 Christian Biesinger <cbiesinger@google.com>
5227
5228 * debug.c (debug_threads): Remove comment in favor of the header.
5229 * debug.h (using_threads): Add declaration.
5230 (debug_threads): Add comment.
5231 * linux-aarch64-low.c: Include debug.h and remove declaration of
5232 debug_threads.
5233 * nto-low.c: Likewise.
5234 * remote-utils.c: Likewise.
5235 * thread-db.c: Likewise.
5236
5237 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
5238
5239 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
5240 and powerpc-cell64l-ipa.o.
5241 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
5242 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
5243 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
5244 (spu*-*-*): Remove.
5245
5246 * spu-low.c: Remove file.
5247
5248 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
5249 (parse_spufs_run): Remove.
5250 (ppc_get_pc): Remove Cell/B.E. support.
5251 (ppc_set_pc): Likewise.
5252 (ppc_breakpoint_at): Likewise.
5253 (ppc_arch_setup): Likewise.
5254 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
5255 tdesc_powerpc_cell32l.
5256 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
5257 or init_registers_powerpc_cell32l.
5258 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
5259 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
5260 or init_registers_powerpc_cell32l.
5261 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
5262 (init_registers_powerpc_cell32l): Remove prototype.
5263 (init_registers_powerpc_cell64l): Likewise.
5264
5265 * target.h (struct target_ops): Remove qxfer_spu member.
5266 * server.c (handle_qxfer_spu): Remove.
5267 (qxfer_packets): Remove entry for "spu".
5268 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
5269 * linux-low.c (SPUFS_MAGIC): Remove.
5270 (spu_enumerate_spu_ids): Remove.
5271 (linux_qxfer_spu): Remove.
5272 (linux_target_ops): Remove qxfer_spu member.
5273 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
5274 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
5275 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
5276
5277 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
5278
5279 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
5280 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
5281 * config.in: Regenerate.
5282 * configure: Regenerate.
5283
5284 2019-08-15 Tom Tromey <tromey@adacore.com>
5285
5286 * target.c (target_write_memory): Use gdb::byte_vector.
5287
5288 2019-08-15 Tom Tromey <tromey@adacore.com>
5289
5290 * tracepoint.c (write_inferior_data_pointer)
5291 (write_inferior_integer, write_inferior_int8)
5292 (write_inferior_uinteger, m_tracepoint_action_download)
5293 (r_tracepoint_action_download, x_tracepoint_action_download)
5294 (l_tracepoint_action_download, clear_inferior_trace_buffer)
5295 (download_agent_expr, download_tracepoint_1)
5296 (download_trace_state_variables, upload_fast_traceframes): Update.
5297 * server.c (gdb_write_memory): Update.
5298 * remote-utils.c (relocate_instruction): Update.
5299 * proc-service.c (ps_pdwrite): Update.
5300 * mem-break.c (remove_memory_breakpoint)
5301 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
5302 (uninsert_fast_tracepoint_jumps_at)
5303 (reinsert_fast_tracepoint_jumps_at): Update.
5304 * linux-x86-low.c (append_insns)
5305 (i386_install_fast_tracepoint_jump_pad)
5306 (amd64_write_goto_address, i386_write_goto_address): Update.
5307 * linux-s390-low.c (append_insns, s390_write_goto_address):
5308 Update.
5309 * linux-ppc-low.c (ppc_relocate_instruction)
5310 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
5311 (ppc_write_goto_address): Update.
5312 * linux-aarch64-low.c (append_insns): Update.
5313 * target.h (struct target_ops): Update.
5314 (write_inferior_memory): Don't declare.
5315 * target.c (target_write_memory): Rename from
5316 write_inferior_memory. Remove old target_write_memory.
5317
5318 2019-08-15 Tom Tromey <tromey@adacore.com>
5319
5320 * target.c (write_inferior_memory): Use std::vector.
5321
5322 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
5323
5324 PR build/24886
5325 * configure.ac: Drop enable-libmcheck support.
5326 * configure, config.in: Rebuild.
5327 * acinclude.m4: Don't include it.
5328
5329 2019-07-19 Alan Hayward <alan.hayward@arm.com>
5330
5331 * configure.srv: Remove Arm xml files.
5332
5333 2019-07-19 Alan Hayward <alan.hayward@arm.com>
5334
5335 * configure.srv: Add new files. Remove xml generated files.
5336 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
5337 registers.
5338 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
5339 * linux-aarch32-tdesc.c: New file.
5340 * linux-aarch32-tdesc.h: New file.
5341 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
5342 * linux-arm-low.c (init_registers_arm, tdesc_arm)
5343 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
5344 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
5345 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
5346 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
5347 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
5348 (arm_read_description): Call arm_linux_read_description.
5349 (initialize_low_arch): Don't init registers.
5350 * linux-arm-tdesc.c: New file.
5351 * linux-arm-tdesc.h: New file.
5352
5353 2019-07-10 Alan Hayward <alan.hayward@arm.com>
5354
5355 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
5356 Move counter inside for.
5357 (arm_read_description): Check ptrace earlier.
5358 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
5359
5360 2019-07-09 Tom Tromey <tom@tromey.com>
5361
5362 * configure: Rebuild.
5363 * configure.ac: Change common to gdbsupport.
5364 * acinclude.m4: Change common to gdbsupport.
5365 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
5366 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
5367 common to gdbsupport.
5368 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
5369 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
5370 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
5371 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
5372 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
5373 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
5374 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
5375 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
5376 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
5377 common to gdbsupport.
5378
5379 2019-07-04 Alan Hayward <alan.hayward@arm.com>
5380
5381 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
5382 defines.
5383 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
5384
5385 2019-07-04 Alan Hayward <alan.hayward@arm.com>
5386
5387 * configure.srv: Remove legacy xml.
5388 * linux-aarch64-low.c (initialize_low_arch): Remove
5389 initialize_low_tdesc call.
5390 * linux-aarch64-tdesc-selftest.c: Remove file.
5391 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
5392 * linux-x86-low.c (initialize_low_arch): Remove
5393 initialize_low_tdesc call.
5394 * linux-x86-tdesc-selftest.c: Remove file.
5395 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
5396
5397 2019-06-20 Tom de Vries <tdevries@suse.de>
5398
5399 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
5400 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
5401
5402 2019-06-19 Tom de Vries <tdevries@suse.de>
5403
5404 * debug.h (debug_write): Change return type to ssize_t.
5405 * debug.c (debug_write): Same.
5406
5407 2019-06-14 Tom Tromey <tom@tromey.com>
5408
5409 * configure.ac: Use new path to gnulib.
5410 * configure: Rebuild.
5411 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
5412 to gnulib.
5413
5414 2019-06-11 Tom Tromey <tom@tromey.com>
5415
5416 * Makefile.in (SFILES): Add alloc.c.
5417 (OBS): Add alloc.o.
5418 (IPA_OBJS): Add alloc-ipa.o.
5419 (alloc-ipa.o): New target.
5420 (%.o: ../%.c): New pattern rule.
5421
5422 2019-06-10 Tom Tromey <tromey@adacore.com>
5423
5424 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
5425 end warning with a newline.
5426 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
5427 newline.
5428 * thread-db.c (attach_thread): Don't end warning with a newline.
5429 (thread_db_notice_clone): Likewise.
5430 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
5431 newline.
5432 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
5433 end warning with a newline.
5434
5435 2019-06-04 Pedro Alves <palves@redhat.com>
5436
5437 * server.c (captured_main): Use make_unique_xstrdup.
5438
5439 2019-06-02 Tom Tromey <tom@tromey.com>
5440
5441 * gdbreplay.c (fromhex): Remove.
5442 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
5443
5444 2019-05-29 Tom Tromey <tromey@adacore.com>
5445
5446 * configure: Rebuild.
5447
5448 2019-05-06 Kevin Buettner <kevinb@redhat.com>
5449
5450 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
5451 sign extension code on 32-bit builds.
5452
5453 2019-05-03 Eli Zaretskii <eliz@gnu.org>
5454
5455 * remote-utils.c:
5456 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
5457
5458 2019-04-19 Tom Tromey <tom@tromey.com>
5459
5460 * server.c (struct vstop_notif): Derive from notif_event.
5461 <base>: Remove.
5462 (queue_stop_reply): Update.
5463 (remove_all_on_match_ptid): Change type. Rewrite.
5464 (discard_queued_stop_replies): Rewrite.
5465 (in_queued_stop_replies_ptid): Change type.
5466 (in_queued_stop_replies): Rewrite.
5467 (notif_stop): Update.
5468 (queue_stop_reply_callback): Update.
5469 (captured_main): Don't call initialize_notif.
5470 (push_stop_notification): Update.
5471 * notif.c (notif_write_event, handle_notif_ack)
5472 (notif_event_enque, notif_push): Update.
5473 (notif_event_xfree, initialize_notif): Remove.
5474 * notif.h (struct notif_event): Include <list>, not
5475 "common/queue.h".
5476 (struct notif_server) <queue>: Now a std::list.
5477 (notif_event_p): Remove typedef.
5478 (initialize_notif): Don't declare.
5479 (struct notif_event): Add virtual destructor.
5480
5481 2019-04-17 Alan Hayward <alan.hayward@arm.com>
5482
5483 * ax.c (ax_vdebug): Call debug_printf.
5484 * debug.c (debug_write): New function.
5485 * debug.h (debug_write): New declaration.
5486 * linux-low.c (sigchld_handler): Call debug_write.
5487
5488 2019-04-17 Alan Hayward <alan.hayward@arm.com>
5489
5490 * debug.c (debug_set_output): New function.
5491 (debug_vprintf): Send output to debug_file.
5492 (debug_flush): Likewise.
5493 * debug.h (debug_set_output): New declaration.
5494 * server.c (handle_monitor_command): Add debug-file option.
5495 (captured_main): Likewise.
5496
5497 2019-04-17 Alan Hayward <alan.hayward@arm.com>
5498
5499 * debug.c (remote_debug): Add definition.
5500 * debug.h (remote_debug): Add declaration.
5501 * hostio.c (remote_debug): Remove declaration.
5502 * remote-utils.c (struct ui_file): Likewise.
5503 (remote_debug): Likewise.
5504 * remote-utils.h (remote_debug): Likewise,
5505 * server.c (remote_debug): Remove definition.
5506
5507 2019-04-10 Kevin Buettner <kevinb@redhat.com>
5508
5509 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
5510 when using a 64-bit gdbserver.
5511
5512 2019-04-09 Tom Tromey <tromey@adacore.com>
5513
5514 * linux-low.c (select_event_lwp): Use find_thread_in_random.
5515
5516 2019-04-08 Tom Tromey <tom@tromey.com>
5517
5518 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
5519 throw.
5520 (linux_resume_one_lwp): Likewise.
5521
5522 2019-04-08 Tom Tromey <tom@tromey.com>
5523
5524 * gdbreplay.c: Update.
5525 * linux-low.c: Update.
5526 * server.c: Update.
5527
5528 2019-04-08 Tom Tromey <tom@tromey.com>
5529
5530 * server.c: Use C++ exception handling.
5531 * linux-low.c: Use C++ exception handling.
5532 * gdbreplay.c: Use C++ exception handling.
5533
5534 2019-04-08 Tom Tromey <tom@tromey.com>
5535
5536 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
5537 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
5538 (captured_main, main): Update.
5539 * gdbreplay.c (main): Update.
5540
5541 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5542
5543 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
5544 value in argument pointer, return 1 if the entry is found and 0
5545 otherwise. Move comment.
5546 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
5547 * linux-low.h (linux_get_auxv): Declare.
5548 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
5549
5550 2019-04-05 Tom Tromey <tromey@adacore.com>
5551
5552 * server.c (gdbserver_usage): Use upper-case for metasyntactic
5553 variables.
5554
5555 2019-03-28 Alan Hayward <alan.hayward@arm.com>
5556
5557 * linux-low.c (AT_HWCAP2): Add define if not already included.
5558
5559 2019-03-26 Alan Hayward <alan.hayward@arm.com>
5560
5561 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
5562 (aarch64_arch_setup): Call linux_get_hwcap.
5563 * linux-arm-low.c (arm_get_hwcap): Remove function.
5564 (arm_read_description): Call linux_get_hwcap.
5565 * linux-low.c (linux_get_auxv): New function.
5566 (linux_get_hwcap): Likewise.
5567 (linux_get_hwcap2): Likewise.
5568 * linux-low.h (linux_get_hwcap): New declaration.
5569 (linux_get_hwcap2): Likewise.
5570 * linux-ppc-low.c (ppc_get_auxv): Remove function.
5571 (ppc_arch_setup): Call linux_get_hwcap.
5572 * linux-s390-low.c (s390_get_hwcap): Remove function.
5573 (s390_arch_setup): Call linux_get_hwcap.
5574
5575 2019-03-22 Alan Hayward <alan.hayward@arm.com>
5576 Jiong Wang <jiong.wang@arm.com>
5577
5578 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
5579 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
5580 to fail.
5581 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
5582
5583 2019-03-22 Alan Hayward <alan.hayward@arm.com>
5584 Jiong Wang <jiong.wang@arm.com>
5585
5586 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
5587 (aarch64_get_hwcap): New function.
5588 (aarch64_arch_setup): Read APIA hwcap.
5589
5590 2019-03-22 Alan Hayward <alan.hayward@arm.com>
5591 Jiong Wang <jiong.wang@arm.com>
5592
5593 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
5594 (initialize_low_tracepoint): Likewise.
5595 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
5596 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
5597 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
5598 (aarch64_linux_read_description): Likewise.
5599 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
5600
5601 2019-03-12 John Baldwin <jhb@FreeBSD.org>
5602
5603 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
5604 i386_create_target_description for 'segments' parameter.
5605 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
5606 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
5607 * win32-i386-low.c (i386_arch_setup): Likewise.
5608
5609 2019-03-12 Tom Tromey <tromey@adacore.com>
5610
5611 * linux-low.c (iterate_over_lwps): Update.
5612
5613 2019-03-06 Tom Tromey <tom@tromey.com>
5614
5615 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
5616 (captured_main): Use SCOPE_EXIT.
5617
5618 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
5619
5620 * configure.srv: Use '$enable_unittest' instead of '$development'
5621 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
5622 case.
5623
5624 2019-02-27 Tom Tromey <tromey@adacore.com>
5625
5626 * gdbreplay.c (logchar): Handle \r\n.
5627
5628 2019-02-07 Alan Hayward <alan.hayward@arm.com>
5629
5630 * linux-low.c (linux_attach): Add process before lwp.
5631 * server.c (attach_inferior): Check if already attached.
5632
5633 2019-02-07 Tom Tromey <tom@tromey.com>
5634
5635 * x86-tdesc.h: Rename include guard.
5636 * x86-low.h: Add include guard.
5637 * wincecompat.h: Rename include guard.
5638 * win32-low.h: Add include guard.
5639 * utils.h: Rename include guard.
5640 * tracepoint.h: Rename include guard.
5641 * tdesc.h: Rename include guard.
5642 * target.h: Rename include guard.
5643 * server.h: Rename include guard.
5644 * remote-utils.h: Rename include guard.
5645 * regcache.h: Rename include guard.
5646 * nto-low.h: Rename include guard.
5647 * notif.h: Add include guard.
5648 * mem-break.h: Rename include guard.
5649 * lynx-low.h: Add include guard.
5650 * linux-x86-tdesc.h: Add include guard.
5651 * linux-s390-tdesc.h: Add include guard.
5652 * linux-ppc-tdesc-init.h: Add include guard.
5653 * linux-low.h: Add include guard.
5654 * linux-aarch64-tdesc.h: Add include guard.
5655 * linux-aarch32-low.h: Add include guard.
5656 * inferiors.h: Rename include guard.
5657 * i387-fp.h: Rename include guard.
5658 * hostio.h: Rename include guard.
5659 * gdbthread.h: Rename include guard.
5660 * gdb_proc_service.h: Rename include guard.
5661 * event-loop.h: Rename include guard.
5662 * dll.h: Rename include guard.
5663 * debug.h: Rename include guard.
5664 * ax.h: Rename include guard.
5665
5666 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
5667
5668 PR gdb/23985
5669 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
5670 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
5671
5672 2019-01-25 Tom Tromey <tom@tromey.com>
5673
5674 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
5675
5676 2019-01-25 Tom Tromey <tom@tromey.com>
5677
5678 * win32-low.c: Fix common/ includes.
5679 * win32-i386-low.c: Fix common/ includes.
5680 * tracepoint.c: Fix common/ includes.
5681 * thread-db.c: Fix common/ includes.
5682 * target.h: Fix common/ includes.
5683 * symbol.c: Fix common/ includes.
5684 * spu-low.c: Fix common/ includes.
5685 * server.h: Fix common/ includes.
5686 * server.c: Fix common/ includes.
5687 * remote-utils.c: Fix common/ includes.
5688 * regcache.h: Fix common/ includes.
5689 * regcache.c: Fix common/ includes.
5690 * nto-x86-low.c: Fix common/ includes.
5691 * notif.h: Fix common/ includes.
5692 * mem-break.h: Fix common/ includes.
5693 * lynx-low.c: Fix common/ includes.
5694 * lynx-i386-low.c: Fix common/ includes.
5695 * linux-x86-tdesc-selftest.c: Fix common/ includes.
5696 * linux-x86-low.c: Fix common/ includes.
5697 * linux-low.c: Fix common/ includes.
5698 * inferiors.h: Fix common/ includes.
5699 * i387-fp.c: Fix common/ includes.
5700 * hostio.c: Fix common/ includes.
5701 * hostio-errno.c: Fix common/ includes.
5702 * gdbthread.h: Fix common/ includes.
5703 * gdbreplay.c: Fix common/ includes.
5704 * fork-child.c: Fix common/ includes.
5705 * event-loop.c: Fix common/ includes.
5706 * ax.c:
5707 (enum gdb_agent_op): Fix common/ includes.
5708
5709 2019-01-21 Tom Tromey <tom@tromey.com>
5710
5711 * tracepoint.c: Fix includes.
5712 * remote-utils.c: Fix includes.
5713 * linux-x86-low.c: Fix includes.
5714
5715 2019-01-01 Joel Brobecker <brobecker@adacore.com>
5716
5717 * gdbreplay.c (gdbreplay_version): Update copyright year in
5718 version message.
5719 * server.c (gdbserver_version): Likewise.
5720
5721 2018-12-05 Alan Hayward <alan.hayward@arm.com>
5722
5723 * linux-low.c (add_lwp): Switch ordering.
5724
5725 2018-11-29 Tom Tromey <tom@tromey.com>
5726
5727 * win32-low.c (win32_join): Take pid, not process.
5728 * target.h (struct target_ops) <join>: Change argument type.
5729 (join_inferior): Change argument name.
5730 * spu-low.c (spu_join): Take pid, not process.
5731 * server.c (handle_detach): Preserve pid before destroying
5732 process.
5733 * lynx-low.c (lynx_join): Take pid, not process.
5734 * linux-low.c (linux_join): Take pid, not process.
5735
5736 2018-11-23 Alan Hayward <alan.hayward@arm.com>
5737
5738 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
5739 (aarch64_cannot_fetch_register): Likewise.
5740 (struct linux_target_ops): Update references.
5741
5742 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5743
5744 * linux-ppc-low.c: Include nat/linux-ptrace.h.
5745
5746 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5747
5748 * configure.srv (ipa_ppc_linux_regobj): Add
5749 powerpc-isa207-htm-vsx32l-ipa.o and
5750 powerpc-isa207-htm-vsx64l-ipa.o.
5751 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
5752 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
5753 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
5754 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
5755 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
5756 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
5757 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
5758 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
5759 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
5760 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
5761 (init_registers_powerpc_isa207_htm_vsx32l)
5762 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
5763 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
5764 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
5765 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
5766 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
5767 (ppc_store_tm_ctarregset): New functions.
5768 (ppc_regsets): Add entries for HTM regsets.
5769 (ppc_arch_setup): Set htm in features struct when needed. Set
5770 sizes for the HTM regsets.
5771 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
5772 (initialize_low_arch): Call
5773 init_registers_powerpc_isa207_htm_vsx32l and
5774 init_registers_powerpc_isa207_htm_vsx64l.
5775 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
5776 PPC_TDESC_ISA207_HTM_VSX.
5777 (initialize_low_tracepoint): Call
5778 init_registers_powerpc_isa207_htm_vsx32l and
5779 init_registers_powerpc_isa207_htm_vsx64l.
5780
5781 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5782
5783 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
5784 rs6000/power-linux-pmu.xml to srv_xmlfiles.
5785 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
5786 (ppc_store_pmuregset): New functions.
5787 (ppc_regsets): Add entries for ebb and pmu regsets.
5788 (ppc_arch_setup): Set isa207 in features struct if the ebb and
5789 pmu regsets are available. Set sizes for these regsets.
5790
5791 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5792
5793 * configure.srv (ipa_ppc_linux_regobj): Add
5794 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
5795 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
5796 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
5797 rs6000/powerpc-isa207-vsx32l.xml, and
5798 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
5799 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
5800 <PPC_TDESC_ISA207_VSX>: New enum value.
5801 (init_registers_powerpc_isa207_vsx32l): Declare.
5802 (init_registers_powerpc_isa207_vsx64l): Declare.
5803 * linux-ppc-low.c (ppc_fill_tarregset): New function.
5804 (ppc_store_tarregset): New function.
5805 (ppc_regsets): Add entry for the TAR regset.
5806 (ppc_arch_setup): Set isa207 in features struct when needed. Set
5807 size for the TAR regsets.
5808 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
5809 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
5810 and init_registers_powerpc_isa207_vsx64l.
5811 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
5812 (initialize_low_tracepoint): Call
5813 init_registers_powerpc_isa207_vsx32l and
5814 init_registers_powerpc_isa207_vsx64l.
5815
5816 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5817 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5818
5819 * configure.srv (ipa_ppc_linux_regobj): Add
5820 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
5821 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
5822 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
5823 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
5824 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
5825 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
5826 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
5827 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
5828 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
5829 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
5830 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
5831 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
5832 (ppc_hwcap): Add comment.
5833 (ppc_hwcap2): New global.
5834 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
5835 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
5836 (ppc_regsets): Add entries for the DSCR and PPR regsets.
5837 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
5838 when needed. Set sizes for the the DSCR and PPR regsets.
5839 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
5840 (initialize_low_arch): Call
5841 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
5842 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
5843 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
5844 PPC_TDESC_ISA205_PPR_DSCR_VSX.
5845 (initialize_low_tracepoint): Call
5846 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
5847 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
5848
5849 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5850
5851 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
5852
5853 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
5854 Simon Marchi <simark@simark.ca>
5855
5856 * acinclude.m4: Include "../selftest.m4".
5857 * configure: Regenerate.
5858 * configure.ac: Use "GDB_AC_SELFTEST".
5859 * configure.srv: Use "$enable_unittests" instead of
5860 "$development" when checking whether unit tests have been
5861 enabled.
5862 * server.c (captured_main): Update message informing that
5863 selftests have been disabled.
5864
5865 2018-10-04 Tom Tromey <tom@tromey.com>
5866
5867 * configure: Rebuild.
5868
5869 2018-10-04 Tom Tromey <tom@tromey.com>
5870
5871 * server.c (handle_status): Rename inner "thread".
5872 (process_serial_event): Declare "res" in 'm' case.
5873 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
5874 (iterate_over_lwps): Rename inner "thread".
5875 (linux_qxfer_libraries_svr4): Rename inner "len".
5876 * gdbthread.h (find_thread_in_random): Rename inner "thread".
5877
5878 2018-10-01 Gary Benson <gbenson@redhat.com>
5879
5880 * gdb_proc_service.h: Moved common code to
5881 common/gdb_proc_service.h.
5882
5883 2018-10-01 Gary Benson <gbenson@redhat.com>
5884
5885 * gdb_proc_service.h: Synchronize comments and whitespace with
5886 GDB's version of this file.
5887
5888 2018-09-25 Tom Tromey <tom@tromey.com>
5889
5890 * configure: Rebuild.
5891 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
5892
5893 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
5894
5895 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
5896 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
5897 ($(IPA_LIB)): Sort IPA_OBJS.
5898
5899 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
5900
5901 * Makefile.in: Remove references to $(ADD_DEPS).
5902
5903 2018-09-16 Tom Tromey <tom@tromey.com>
5904
5905 * remote-utils.c (remote_open): Use GNU style for metasyntactic
5906 variables.
5907 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
5908 variables.
5909
5910 2018-09-05 Tom Tromey <tom@tromey.com>
5911
5912 * configure: Rebuild.
5913
5914 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
5915
5916 PR build/23399
5917 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
5918
5919 2018-08-27 Tom Tromey <tom@tromey.com>
5920
5921 PR build/23087:
5922 * configure: Rebuild.
5923
5924 2018-08-27 Tom Tromey <tom@tromey.com>
5925
5926 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
5927 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
5928 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
5929 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
5930 (s390x_emit_stack_adjust): Add casts to unsigned char.
5931
5932 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
5933
5934 PR gdb/23374
5935 PR gdb/23375
5936 * server.h (struct client_state) <disable_randomization>:
5937 Initialize to 1.
5938
5939 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
5940
5941 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
5942 variable.
5943 (mips_supply_ptrace_register): Likewise.
5944
5945 2018-07-22 Tom Tromey <tom@tromey.com>
5946
5947 * configure: Rebuild.
5948
5949 2018-07-22 Tom Tromey <tom@tromey.com>
5950
5951 * win32-low.c (win32_create_inferior): Remove unused variables.
5952 * gdbreplay.c (remote_open): Remove unused variable.
5953 * remote-utils.c (remote_prepare): Remove unused variable.
5954 * x86-tdesc.h (X86_TDESC_H): Define.
5955 (amd64_expedite_regs): Define conditionally.
5956 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
5957 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
5958 * remote-utils.c (readchar): Remove unused variable.
5959
5960 2018-07-13 Pedro Alves <palves@redhat.com>
5961
5962 * linux-low.c (linux_kill): Change parameter to process_info
5963 pointer instead of pid. Adjust.
5964 * lynx-low.c (lynx_kill): Likewise.
5965 * nto-low.c (nto_kill): Likewise.
5966 * spu-low.c (spu_kill): Likewise.
5967 * win32-low.c (win32_kill): Likewise.
5968 * server.c (handle_v_kill, kill_inferior_callback)
5969 (detach_or_kill_for_exit): Adjust.
5970 * target.c (kill_inferior): Change parameter to process_info
5971 pointer instead of pid. Adjust.
5972 * target.h (struct target_ops) <kill>: Change parameter to
5973 process_info pointer instead of pid. Adjust all implementations
5974 and callers.
5975 (kill_inferior): Likewise.
5976
5977 2018-07-13 Pedro Alves <palves@redhat.com>
5978
5979 * linux-low.c (linux_detach, linux_join): Change parameter to
5980 process_info pointer instead of pid. Adjust.
5981 * lynx-low.c (lynx_detach, lynx_join): Likewise.
5982 * nto-low.c (nto_detach): Likewise.
5983 * spu-low.c (spu_detach, spu_join): Likewise.
5984 * win32-low.c (win32_detach, win32_join): Likewise.
5985 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
5986 * target.h (struct target_ops) <detach, join>: Change parameter to
5987 process_info pointer instead of pid. Adjust all implementations
5988 and callers.
5989 (detach_inferior, join_inferior): Rename 'pid' parameter to
5990 'proc'.
5991
5992 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
5993 Jan Kratochvil <jan.kratochvil@redhat.com>
5994 Paul Fertser <fercerpav@gmail.com>
5995 Tsutomu Seki <sekiriki@gmail.com>
5996
5997 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
5998 (OBS): Add 'common/netstuff.o'.
5999 (GDBREPLAY_OBS): Likewise.
6000 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
6001 (remote_open): Implement support for IPv6
6002 connections.
6003 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
6004 and 'wspiapi.h'.
6005 (handle_accept_event): Accept connections from IPv6 sources.
6006 (remote_prepare): Handle IPv6-style hostnames; implement
6007 support for IPv6 connections.
6008 (remote_open): Implement support for printing connections from
6009 IPv6 sources.
6010
6011 2018-07-11 Pedro Alves <palves@redhat.com>
6012
6013 PR gdb/23377
6014 * mem-break.c (any_persistent_commands): Add process_info
6015 parameter and use it instead of relying on the current process.
6016 Change return type to bool.
6017 * mem-break.h (any_persistent_commands): Add process_info
6018 parameter and change return type to bool.
6019 * server.c (handle_detach): Remove require_running_or_return call.
6020 Look up the process_info for the process we're about to detach.
6021 If not found, return back error to GDB. Adjust
6022 any_persistent_commands call to pass down a process pointer.
6023
6024 2018-07-11 Pedro Alves <palves@redhat.com>
6025
6026 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
6027 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
6028 instead of collect_register_by_name.
6029 * regcache.c (regcache_raw_get_unsigned_by_name): New.
6030 * regcache.h (regcache_raw_get_unsigned_by_name): New.
6031
6032 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
6033 Pedro Alves <palves@redhat.com>
6034
6035 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
6036
6037 2018-07-03 Tom Tromey <tom@tromey.com>
6038
6039 * linux-low.c: Update.
6040 * lynx-low.c: Update.
6041 * mem-break.c: Update.
6042 * nto-low.c: Update.
6043 * remote-utils.c: Update.
6044 * server.c: Update.
6045 * spu-low.c: Update.
6046 * target.c: Update.
6047 * win32-low.c: Update.
6048
6049 2018-07-03 Tom Tromey <tom@tromey.com>
6050
6051 * server.c: Update.
6052
6053 2018-07-03 Tom Tromey <tom@tromey.com>
6054
6055 * linux-low.c: Update.
6056
6057 2018-07-03 Tom Tromey <tom@tromey.com>
6058
6059 * target.c: Update.
6060
6061 2018-07-03 Tom Tromey <tom@tromey.com>
6062
6063 * linux-low.c: Update.
6064 * linux-mips-low.c: Update.
6065 * lynx-low.c: Update.
6066 * nto-low.c: Update.
6067 * remote-utils.c: Update.
6068 * server.c: Update.
6069 * spu-low.c: Update.
6070 * target.c: Update.
6071 * thread-db.c: Update.
6072
6073 2018-07-03 Tom Tromey <tom@tromey.com>
6074
6075 * linux-low.c: Update.
6076 * linux-mips-low.c: Update.
6077 * lynx-low.c: Update.
6078 * mem-break.c: Update.
6079 * nto-low.c: Update.
6080 * remote-utils.c: Update.
6081 * server.c: Update.
6082 * spu-low.c: Update.
6083 * target.c: Update.
6084 * tracepoint.c: Update.
6085
6086 2018-07-03 Tom Tromey <tom@tromey.com>
6087
6088 * linux-low.c: Update.
6089 * linux-ppc-low.c: Update.
6090 * linux-x86-low.c: Update.
6091 * proc-service.c: Update.
6092 * server.c: Update.
6093 * spu-low.c: Update.
6094 * thread-db.c: Update.
6095 * win32-low.c: Update.
6096
6097 2018-07-03 Tom Tromey <tom@tromey.com>
6098
6099 * linux-low.c: Update.
6100 * lynx-low.c: Update.
6101 * nto-low.c: Update.
6102 * remote-utils.c: Update.
6103 * spu-low.c: Update.
6104 * thread-db.c: Update.
6105 * win32-low.c: Update.
6106
6107 2018-06-29 Joel Brobecker <brobecker@adacore.com>
6108
6109 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
6110 parameter in call to 'amd64_create_target_description'.
6111
6112 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6113
6114 * x86-tdesc.h: Remove executable permission flag.
6115
6116 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
6117
6118 * configure.ac: Remove AC_PREREQ, add missing quoting.
6119 * configure: Re-generate.
6120 * config.in: Re-generate.
6121 * aclocal.m4: Re-generate.
6122
6123 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
6124
6125 * tracepoint.h (current_traceframe): Remove declaration.
6126
6127 2018-06-18 Alan Hayward <alan.hayward@arm.com>
6128
6129 * linux-aarch64-low.c (is_sve_tdesc): New function.
6130 (aarch64_sve_regs_copy_to_regcache): Likewise.
6131 (aarch64_sve_regs_copy_from_regcache): Likewise.
6132 (aarch64_regs_info): Add SVE checks.
6133 (initialize_low_arch): Initialize SVE.
6134
6135 2018-06-18 Alan Hayward <alan.hayward@arm.com>
6136
6137 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
6138
6139 2018-06-11 Alan Hayward <alan.hayward@arm.com>
6140
6141 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
6142 (initialize_low_tracepoint): Likewise
6143 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
6144 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
6145 param.
6146 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
6147 checks.
6148 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
6149
6150 2018-06-11 Alan Hayward <alan.hayward@arm.com>
6151
6152 * server.h (PBUFSIZ): Increase size
6153
6154 2018-06-11 Alan Hayward <alan.hayward@arm.com>
6155
6156 * regcache.c (regcache::raw_compare): New function.
6157 * regcache.h (regcache::raw_compare): New declaration.
6158
6159 2018-06-11 Alan Hayward <alan.hayward@arm.com>
6160
6161 * regcache.c (new_register_cache): Use new.
6162 (free_register_cache): Use delete.
6163 (register_data): Use const.
6164 (supply_register): Move body inside regcache.
6165 (regcache::raw_supply): New override function.
6166 (collect_register): Move body inside regcache.
6167 (regcache::raw_collect): New override function.
6168 (regcache::get_register_status): New override function.
6169 * regcache.h (struct regcache): Inherit from reg_buffer_common.
6170
6171 2018-06-09 Tom Tromey <tom@tromey.com>
6172
6173 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
6174 declare queue.
6175 (event_queue): Use std::queue.
6176 (gdb_event_xfree): Remove.
6177 (initialize_event_loop, process_event, wait_for_event): Update.
6178
6179 2018-06-08 Stan Cox <scox@redhat.com>
6180
6181 * win32-low.c (win32_create_inferior): last_ptid and last_status
6182 moved to client_state.
6183
6184 2018-06-08 Pedro Alves <palves@redhat.com>
6185
6186 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
6187 common/common-exceptions.o, common/common-utils.o,
6188 common/errors.o, common/print-utils.o and utils.o.
6189 * gdbreplay.c: Include "common-defs.h" instead of the two
6190 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
6191 string.h or alloca.h.
6192 (perror_with_name): Delete.
6193 (remote_open): Use xstrdup instead of strdup.
6194 (main): Rename to ...
6195 (captured_main): ... this.
6196 (main): New.
6197
6198 2018-06-08 Tom Tromey <tom@tromey.com>
6199
6200 * linux-low.c (linux_low_read_btrace): Update.
6201
6202 2018-06-04 Stan Cox <scox@redhat.com>
6203
6204 * server.h (struct client_state): New.
6205 * server.c (cont_thread, general_thread, multi_process)
6206 (report_fork_events, report_vfork_events, report_exec_events)
6207 (report_thread_events, swbreak_feature, hwbreak_feature)
6208 (vCont_supported, disable_randomization, pass_signals)
6209 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
6210 Moved to client_state.
6211 * remote-utils.c (remote_debug, noack_mode)
6212 (transport_is_reliable): Moved to client_state.
6213 * tracepoint.c (current_traceframe): Moved to client_state.
6214
6215 Update all callers.
6216 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
6217 linux-low.c, remote-utils.h, target.c: Use client_state.
6218
6219 2018-05-31 Alan Hayward <alan.hayward@arm.com>
6220
6221 * configure.srv: Add new c/h file.
6222
6223 2018-05-31 Alan Hayward <alan.hayward@arm.com>
6224
6225 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
6226 null VQ.
6227
6228 2018-05-25 Maciej W. Rozycki <macro@mips.com>
6229
6230 * gdb.arch/mips-fpregset-core.exp: New test.
6231 * gdb.arch/mips-fpregset-core.c: New test source.
6232
6233 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
6234
6235 PR server/23198
6236 * hostio.c (require_int): Do not report overflow for integers
6237 between 0xfffffff and 0x7fffffff.
6238
6239 2018-05-22 Maciej W. Rozycki <macro@mips.com>
6240
6241 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
6242 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
6243 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
6244 functions.
6245 (the_low_target): Wire them.
6246
6247 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6248
6249 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
6250 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
6251 mode. Call collect_register_by_name with vscr using
6252 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
6253 (ppc_store_vrregset): Add and set vscr_offset variable as in
6254 ppc_fill_vrregset. Call supply_register_by_name with vscr using
6255 vscr_offset.
6256
6257 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6258
6259 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
6260 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
6261 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
6262
6263 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6264
6265 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
6266 (ppc_store_vsxregset): Likewise.
6267 (ppc_fill_vrregset): Likewise.
6268 (ppc_store_vrregset): Likewise.
6269 (ppc_fill_evrregset): Likewise.
6270 (ppc_store_evrregset): Likewise.
6271 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
6272 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
6273 needed.
6274
6275 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6276
6277 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
6278 wordsize of the inferior. Call ppc_linux_target_wordsize.
6279
6280 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6281
6282 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
6283 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
6284 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
6285 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
6286 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
6287 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
6288 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
6289 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
6290 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
6291 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
6292 (tdesc_powerpc_e500l): Remove.
6293 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
6294 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
6295 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
6296 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
6297 linux-ppc-tdesc.h.
6298 (ppc_arch_setup): Remove target description matching code. Fill a
6299 ppc_linux_features struct and call ppc_linux_match_description
6300 with it.
6301
6302 2018-05-22 Maciej W. Rozycki <macro@mips.com>
6303
6304 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
6305 width of the requested register exceeds the width of the
6306 `ptrace' data type.
6307 (mips_cannot_store_register): Likewise.
6308
6309 2018-05-21 Maciej W. Rozycki <macro@mips.com>
6310
6311 * linux-mips-low.c (mips_fetch_register): New function. Update
6312 preceding comment.
6313 (mips_store_gregset): Supply 0 rather than $restart for $zero.
6314 (the_low_target): Wire `mips_fetch_register'.
6315
6316 2018-05-10 Joel Brobecker <brobecker@adacore.com>
6317
6318 * lynx-i386-low.c (LYNXOS_178): New macro.
6319 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
6320 the layout on LynxOS-178.
6321 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
6322 handle floating point registers that are not supported by
6323 LynxOS-178.
6324
6325 2018-05-10 Tom Tromey <tom@tromey.com>
6326
6327 * configure: Rebuild.
6328
6329 2018-05-10 Joel Brobecker <brobecker@adacore.com>
6330
6331 PR server/23158:
6332 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
6333 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
6334 Use it to set the expedite_regs field in the given tdesc.
6335 * x86-tdesc.h: New file.
6336 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
6337 Adjust following the addition of the new expedite_regs parameter
6338 to init_target_desc.
6339 * linux-tic6x-low.c (tic6x_read_description): Likewise.
6340 * linux-x86-tdesc.c: #include "x86-tdesc.h".
6341 (i386_linux_read_description, amd64_linux_read_description):
6342 Adjust following the addition of the new expedite_regs parameter
6343 to init_target_desc.
6344 * lynx-i386-low.c: #include "x86-tdesc.h".
6345 (lynx_i386_arch_setup): Adjust following the addition of the new
6346 expedite_regs parameter to init_target_desc.
6347 * nto-x86-low.c: #include "x86-tdesc.h".
6348 (nto_x86_arch_setup): Adjust following the addition of the new
6349 expedite_regs parameter to init_target_desc.
6350 * win32-i386-low.c: #include "x86-tdesc.h".
6351 (i386_arch_setup): Adjust following the addition of the new
6352 expedite_regs parameter to init_target_desc.
6353
6354 2018-05-10 Joel Brobecker <brobecker@adacore.com>
6355
6356 PR server/23158:
6357 * win32-low.c (win32_create_inferior): Add call to my_wait
6358 setting last_status global.
6359
6360 2018-05-10 Joel Brobecker <brobecker@adacore.com>
6361
6362 PR server/23158:
6363 * win32-low.c (create_process): Only call gdb_tilde_expand if
6364 inferior_cwd is not NULL.
6365
6366 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
6367
6368 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
6369 registers to the cache if their values have changed.
6370 (i387_xsave_to_cache): Provide default values for x87 control
6371 registers when these features are available, but disabled.
6372 * regcache.c (supply_register_by_name_zeroed): New function.
6373 * regcache.h (supply_register_by_name_zeroed): Declare new
6374 function.
6375
6376 2018-05-07 Tom Tromey <tom@tromey.com>
6377
6378 * configure: Rebuild.
6379
6380 2018-05-04 Tom Tromey <tom@tromey.com>
6381
6382 * configure: Rebuild.
6383
6384 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
6385 Pedro Alves <palves@redhat.com>
6386
6387 * linux-aarch64-low.c (aarch64_stopped_data_address):
6388 Likewise.
6389
6390 2018-04-27 Tom Tromey <tom@tromey.com>
6391
6392 * configure: Rebuild.
6393
6394 2018-04-23 Tom Tromey <tom@tromey.com>
6395
6396 * configure: Rebuild.
6397
6398 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
6399
6400 * Makefile.in (depcomp): Add "..".
6401 (all_deps_files): New and use it.
6402
6403 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6404
6405 * configure.srv (aarch64*-*-linux*): Don't include xml.
6406 (i[34567]86-*-cygwin*): Likewise.
6407 (i[34567]86-*-linux*): Likewise.
6408 (i[34567]86-*-lynxos*): Likewise.
6409 (i[34567]86-*-mingw32ce*): Likewise.
6410 (i[34567]86-*-mingw*): Likewise.
6411 (i[34567]86-*-nto*): Likewise.
6412 (tic6x-*-uclinux): Likewise.
6413 (x86_64-*-linux*): Likewise.
6414 (x86_64-*-mingw*): Likewise.
6415 (x86_64-*-cygwin*): Likewise.
6416
6417 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6418
6419 * tdesc.c: Remove xml parameter.
6420
6421 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6422
6423 * server.c (get_features_xml): Remove cast.
6424 * tdesc.c (void target_desc::accept): Fill in function.
6425 (tdesc_get_features_xml): Remove old xml creation.
6426 (print_xml_feature::visit_pre): Add xml vistor.
6427 * tdesc.h (struct target_desc): Make xmltarget mutable.
6428 (tdesc_get_features_xml): Remove declaration.
6429
6430 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6431
6432 * tdesc.c (tdesc_architecture_name): Add new function.
6433 (tdesc_osabi_name): Likewise.
6434 (tdesc_get_features_xml): Use new functions.
6435
6436 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6437
6438 * tdesc.c (tdesc_create_flags): Remove.
6439 (tdesc_add_flag): Likewise.
6440 (tdesc_named_type): Likewise.
6441 (tdesc_create_union): Likewise.
6442 (tdesc_create_struct): Likewise.
6443 (tdesc_create_vector): Likewise.
6444 (tdesc_add_bitfield): Likewise.
6445 (tdesc_add_field): Likewise.
6446 (tdesc_set_struct_size): Likewise.
6447
6448 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6449
6450 * tdesc.c (~target_desc): Remove implictly deleted items.
6451 (init_target_desc): Iterate all features.
6452 (tdesc_get_features_xml): Use vector.
6453 (tdesc_create_feature): Create feature.
6454 * tdesc.h (tdesc_feature) Remove
6455 (target_desc): Add features.
6456
6457 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6458
6459 * Makefile.in: Add common/tdesc.c
6460 * tdesc.c (init_target_desc): init all reg_defs from register
6461 vector.
6462 (tdesc_create_reg): Create tdesc_reg.
6463 * tdesc.h (tdesc_feature): Add register vector.
6464
6465 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
6466
6467 * tdesc.h (struct target_desc) <features>: Change type to
6468 std::vector<std::string>.
6469 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
6470 changes.
6471 (tdesc_get_features_xml): Likewise.
6472 (tdesc_create_feature): Likewise.
6473
6474 2018-03-26 Alan Hayward <alan.hayward@arm.com>
6475
6476 * regcache.c (find_register_by_number): Return a ref.
6477 (find_regno): Use references.
6478 (register_size): Likewise.
6479 (register_data): Likewise.
6480 * tdesc.c (target_desc::~target_desc): Remove free calls.
6481 (target_desc::operator==): Use std::vector compare.
6482 (init_target_desc): Use reference.
6483 (tdesc_create_reg): Use reg constructors.
6484 * tdesc.h (struct target_desc): Replace pointer with object.
6485
6486 2018-03-23 Alan Hayward <alan.hayward@arm.com>
6487
6488 * regcache.c (find_register_by_number): Make static.
6489 (find_regno): Use find_register_by_number
6490 * regcache.h (struct reg): Remove declaration.
6491
6492 2018-03-23 Alan Hayward <alan.hayward@arm.com>
6493
6494 * tdesc.c (target_desc::~target_desc): Move to here.
6495 (target_desc::operator==): Likewise.
6496 * tdesc.h (target_desc::~target_desc): Move from here.
6497 (target_desc::operator==): Likewise.
6498
6499 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
6500
6501 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
6502
6503 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
6504
6505 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
6506 S390_TDESC_GS.
6507 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
6508 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
6509 and init_registers_s390_gs_linux64.
6510
6511 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
6512
6513 * linux-s390-low.c (s390_fill_gs): Remove function.
6514 (s390_fill_gsbc): Remove function.
6515 (s390_regsets): Set fill functions for the guarded storage regsets
6516 to NULL.
6517
6518 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
6519
6520 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
6521 the word size. Add comment.
6522 (s390_get_wordsize): New function.
6523 (s390_arch_setup): No longer select a temporary tdesc to fetch the
6524 pswm with it. Instead, use s390_get_wordsize to determine the
6525 word size first and derive the correct tdesc from that directly.
6526
6527 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
6528
6529 * Makefile.in: Include silent-rules.mk.
6530 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
6531 (COMPILE): Add ECHO_CXX.
6532 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
6533 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
6534 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
6535 (version-generated.c): Add ECHO_GEN.
6536 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
6537 (IPAGENT_COMPILE): Add ECHO_CXX.
6538 (%-generated.c): Add ECHO_REGDAT.
6539
6540 2018-03-14 Tom Tromey <tom@tromey.com>
6541
6542 PR cli/14977:
6543 * ax.c (ax_printf): Special case for NULL.
6544
6545 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
6546
6547 * linux-low.c (linux_qxfer_libraries_svr4): Use
6548 xml_escape_text_append.
6549
6550 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
6551
6552 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
6553
6554 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
6555
6556 * server.c (handle_general_set): Remove unnecessary xstrdup.
6557
6558 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
6559
6560 * server.c (parse_debug_format_options): Adjust to
6561 delim_string_to_char_ptr_vec changes.
6562 * thread-db.c (thread_db_load_search): Adjust to
6563 dirnames_to_char_ptr_vec changes.
6564
6565 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
6566
6567 * target.h (target_enable_btrace, target_disable_btrace)
6568 (target_read_btrace, target_read_btrace_conf): Turn macro into
6569 inline function. Throw error if target method is not defined.
6570 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
6571 check for btrace target method. Be prepared to handle exceptions
6572 from btrace target methods.
6573
6574 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
6575
6576 * server.c (captured_main): Change order of error message printed
6577 when the current working directory cannot be found.
6578
6579 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
6580
6581 * server.c: Include "filenames.h" and "pathstuff.h".
6582 (program_name): Delete variable.
6583 (program_path): New anonymous class.
6584 (get_exec_wrapper): Use "program_path" instead of
6585 "program_name".
6586 (handle_v_run): Likewise.
6587 (captured_main): Likewise.
6588 (process_serial_event): Likewise.
6589
6590 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
6591
6592 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
6593 (OBJS): Add "pathstuff.o".
6594 * server.c (current_directory): New global variable.
6595 (captured_main): Initialize "current_directory".
6596
6597 2018-02-26 Alan Hayward <alan.hayward@arm.com>
6598
6599 * tdesc.c: Use common/tdesc.h.
6600 * tdesc.h: Likewise.
6601
6602 2018-02-20 Alan Hayward <alan.hayward@arm.com>
6603 Simon Marchi <simon.marchi@ericsson.com>
6604
6605 * Makefile.in: Switch order of make rules.
6606
6607 2018-02-19 Alan Hayward <alan.hayward@arm.com>
6608
6609 * Makefile.in: Add common directory in build.
6610 * configure.ac: Add common reference.
6611 * configure: Regenerate.
6612
6613 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6614
6615 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
6616 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
6617 * spu-low.c (spu_target_ops): Likewise.
6618 * win32-low.c (win32_target_ops): Likewise.
6619 * server.c (supported_btrace_packets): Report packets unconditionally.
6620 * target.h (target_ops) <supports_btrace>: Remove.
6621 (target_supports_btrace): Remove.
6622
6623 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6624
6625 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
6626 (handle_btrace_disable): Change return type to void. Use exceptions
6627 to report errors.
6628 (handle_btrace_general_set): Catch exception and copy message to
6629 return message.
6630
6631 2018-02-08 Tom Tromey <tom@tromey.com>
6632
6633 * linux-low.c (install_software_single_step_breakpoints): Use
6634 make_scoped_restore.
6635 * inferiors.c (make_cleanup_restore_current_thread): Remove.
6636 (do_restore_current_thread_cleanup): Remove.
6637 * gdbthread.h (make_cleanup_restore_current_thread): Don't
6638 declare.
6639
6640 2018-02-08 Tom Tromey <tom@tromey.com>
6641
6642 * mem-break.c (set_raw_breakpoint_at): Use
6643 gdb::unique_xmalloc_ptr.
6644
6645 2018-01-30 Pedro Alves <palves@redhat.com>
6646
6647 PR gdb/13211
6648 * target.c (target_terminal::terminal_state): Rename to ...
6649 (target_terminal::m_terminal_state): ... this.
6650
6651 2018-01-19 James Clarke <jrtc27@jrtc27.com>
6652
6653 * linux-low.c (handle_extended_wait): Surround call to
6654 thread_db_notice_clone with #ifdef USE_THREAD_DB.
6655
6656 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
6657
6658 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
6659 linux_ptrace_attach_fail_reason_string now returning an
6660 std::string.
6661 (linux_attach): Likewise.
6662 * thread-db.c (attach_thread): Likewise.
6663
6664 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
6665
6666 PR gdb/21559
6667 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
6668 checking for fs_base/gs_base fields in struct user_regs_struct.
6669 * configure: Regenerate.
6670
6671 2018-01-16 Yao Qi <yao.qi@linaro.org>
6672
6673 PR gdb/18749
6674 * linux-low.c (fetch_register): Call supply_register instead of
6675 error.
6676
6677 2018-01-08 Yao Qi <yao.qi@linaro.org>
6678 Simon Marchi <simon.marchi@ericsson.com>
6679
6680 * Makefile.in (OBS): Remove selftest.o.
6681 * configure.ac: Set srv_selftest_objs if $development is true.
6682 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
6683 * configure: Re-generated.
6684 * server.c (captured_main): Wrap variable selftest_filter with
6685 GDB_SELF_TEST.
6686
6687 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
6688
6689 * server.c (parse_debug_format_options): Return std::string.
6690 (handle_monitor_command, captured_main): Adjust.
6691
6692 2018-01-05 Pedro Alves <palves@redhat.com>
6693
6694 PR gdb/18653
6695 * server.c (captured_main): Pass quiet=false to
6696 save_original_signals_state.
6697
6698 2018-01-01 Joel Brobecker <brobecker@adacore.com>
6699
6700 * gdbreplay.c (gdbreplay_version): Update copyright year in
6701 version message.
6702 * server.c (gdbserver_version): Likewise.
6703
6704 2017-12-08 Tom Tromey <tom@tromey.com>
6705
6706 * ax.c (ax_printf): Update.
6707
6708 2017-12-07 Yao Qi <yao.qi@linaro.org>
6709
6710 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
6711 aarch64_linux_read_description.
6712 * linux-amd64-ipa.c (idx2mask): New array.
6713 (get_ipa_tdesc): Move idx2mask out.
6714 (initialize_low_tracepoint): Initialize target descriptions.
6715 * linux-i386-ipa.c (idx2mask): New array.
6716 (get_ipa_tdesc): Move idx2mask out.
6717 (initialize_low_tracepoint): Initialize target descriptions.
6718
6719 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
6720
6721 * tdesc.c (struct tdesc_type): Change return type.
6722 (tdesc_add_flag): Change parameter type.
6723 (tdesc_add_bitfield): Likewise.
6724 (tdesc_add_field): Likewise.
6725 (tdesc_set_struct_size): Likewise.
6726
6727 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
6728
6729 * regcache.c (registers_to_string): Remove unused variable.
6730
6731 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6732
6733 * inferiors.c (for_each_inferior_with_data): Remove.
6734 * inferiors.h (for_each_inferior_with_data): Remove.
6735 * server.c (handle_qxfer_threads_worker): Change parameter type.
6736 (handle_qxfer_threads_proper): Use for_each_thread.
6737
6738 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6739
6740 * inferiors.c (for_each_inferior): Remove.
6741 (clear_inferiors): Use for_each_thread.
6742 * inferiors.h (for_each_inferior): Remove.
6743 * linux-low.c (linux_wait_for_event_filtered): Use
6744 for_each_thread.
6745 (linux_stabilize_threads): Likewise.
6746 * regcache.c (regcache_release): Likewise.
6747 * server.c (gdb_wants_all_threads_stopped): Likewise.
6748 (clear_pending_status_callback): Remove.
6749 (handle_status): Use for_each_thread.
6750 (captured_main): Likewise.
6751 * win32-low.c (child_init_thread_list): Likewise.
6752 (win32_clear_inferiors): Likewise.
6753 (fake_breakpoint_event): Likewise.
6754
6755 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6756
6757 * inferiors.h (find_inferior): Remove.
6758 * inferiors.c (find_inferior): Remove.
6759
6760 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6761
6762 * linux-low.c (resume_status_pending_p): Update comment.
6763 (need_step_over_p): Update comment.
6764
6765 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6766
6767 * linux-low.c (proceed_one_lwp): Return void, change parameter
6768 type.
6769 (unsuspend_and_proceed_one_lwp): Likewise.
6770 (proceed_all_lwps): Use for_each_thread.
6771 (unstop_all_lwps): Likewise.
6772
6773 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6774
6775 * linux-low.c (linux_resume_one_thread): Return void, take
6776 parameter directly.
6777 (linux_resume): Use for_each_thread.
6778
6779 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6780
6781 * linux-low.c (send_sigstop_callback): Return void, change
6782 parameter type. Rename to...
6783 (send_sigstop): ... this.
6784 (suspend_and_send_sigstop_callback): Return void, change parameter
6785 type. Rename to...
6786 (suspend_and_send_sigstop): ... this.
6787 (stop_all_lwps): Use for_each_thread.
6788
6789 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6790
6791 * linux-low.c (lwp_running): Return bool, remove unused
6792 argument.
6793 (linux_stabilize_threads): Use find_thread.
6794
6795 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6796
6797 * linux-low.c (select_singlestep_lwp_callback): Remove.
6798 (count_events_callback): Remove.
6799 (select_event_lwp_callback): Remove.
6800 (select_event_lwp): Use find_thread/for_each_thread.
6801
6802 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6803
6804 * linux-low.c (not_stopped_callback): Return bool, take filter
6805 argument directly.
6806 (linux_wait_for_event_filtered): Use find_thread.
6807 (linux_wait_1): Likewise.
6808
6809 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6810
6811 * linux-low.c (same_lwp): Remove.
6812 (find_lwp_pid): Use find_thread.
6813
6814 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6815
6816 * linux-low.c (delete_lwp_callback): Remove.
6817 (linux_mourn): Use for_each_thread.
6818
6819 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6820
6821 * linux-low.c (linux_detach_lwp_callback): Return void, remove
6822 args parameter, don't check for pid.
6823 (linux_detach): Use for_each_thread.
6824
6825 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6826
6827 * linux-low.c (struct counter): Remove.
6828 (second_thread_of_pid_p): Remove.
6829 (last_thread_of_process_p): Use find_thread.
6830
6831 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6832
6833 * inferiors.c (find_inferior_in_random): Remove.
6834 * inferiors.h (find_inferior_in_random): Remove.
6835 * linux-low.c (status_pending_p_callback): Return bool, accept
6836 parameter ptid directly.
6837 (linux_wait_for_event_filtered): Use find_thread_in_random.
6838 (linux_wait_1): Likewise.
6839
6840 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6841
6842 * inferiors.c (find_inferior_id): Remove.
6843 (find_thread_ptid): Move implemention from find_inferior_id to
6844 here.
6845 * inferiors.h (find_inferior_id): Remove.
6846 * server.c (handle_status): Use find_thread_ptid.
6847 (process_serial_event): Likewise.
6848 * thread-db.c (find_one_thread): Likewise.
6849 (thread_db_thread_handle): Likewise.
6850 * win32-low.c (thread_rec): Likewise.
6851 (child_delete_thread): Likewise.
6852 (win32_thread_alive): Likewise.
6853 (get_child_debug_event): Likewise.
6854
6855 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6856
6857 * linux-mips-low.c (update_watch_registers_callback): Return
6858 void, remove pid_p parameter, don't check for pid.
6859 (mips_insert_point, mips_remove_point): Use for_each_thread.
6860
6861 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6862
6863 * lynx.low (lynx_delete_thread_callback): Remove.
6864 (lynx_mourn): Use for_each_thread.
6865
6866 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6867
6868 * regcache.c (regcache_invalidate_one): Remove.
6869 (regcache_invalidate_pid): use for_each_thread.
6870
6871 2017-11-26 Tom Tromey <tom@tromey.com>
6872
6873 * linux-low.c (linux_create_inferior): Update.
6874
6875 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
6876
6877 * spu-low.c (spu_create_inferior): Fix typo in argument name.
6878
6879 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6880
6881 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
6882 * linux-aarch64-low.c (initialize_low_arch): Call init func.
6883 * linux-aarch64-tdesc-selftest.c: New file.
6884 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
6885
6886 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6887
6888 * configure.srv: Add new file.
6889 * linux-aarch64-low.c (initialize_low_arch): Call init func.
6890 * linux-aarch64-tdesc-selftest.c: New file.
6891 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
6892
6893 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6894
6895 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
6896 * linux-aarch64-low.c (initialize_low_arch): Remove init.
6897 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
6898
6899 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6900
6901 * configure.srv: Add new files.
6902 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
6903 aarch64_linux_read_description.
6904 * linux-aarch64-low.c (aarch64_linux_read_description):
6905 Merge with aarch64_arch_setup.
6906 (aarch64_arch_setup): Call aarch64_linux_read_description.
6907 * linux-aarch64-tdesc.c: New file.
6908 * linux-aarch64-tdesc.h: New file.
6909
6910 2017-11-24 Yao Qi <yao.qi@linaro.org>
6911
6912 * configure.srv: Set $srv_regobj for tic6x-linux.
6913 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
6914 (tic6x_read_description): Move some code to tic6x_arch_setup.
6915 (tic6x_tdesc_test): New function.
6916 (initialize_low_arch): Call selftests::register_test.
6917
6918 2017-11-22 Yao Qi <yao.qi@linaro.org>
6919
6920 * remote-utils.c (prepare_resume_reply): Use memcpy.
6921
6922 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6923
6924 * linux-low.c (kill_one_lwp_callback): Return void, take
6925 argument directly, don't filter on pid.
6926 (linux_kill): Use for_each_thread.
6927
6928 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6929
6930 * linux-low.c (need_step_over_p): Return bool, remove dummy
6931 argument.
6932 (linux_resume, proceed_all_lwps): Use find_thread.
6933
6934 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6935
6936 * linux-low.c (resume_status_pending_p): Return bool, remove
6937 flag_p argument.
6938 (linux_resume): Use find_thread.
6939
6940 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6941
6942 * linux-low.c (struct thread_resume_array): Remove.
6943 (linux_set_resume_request): Return void, take arguments
6944 directly.
6945 (linux_resume): Use for_each_thread.
6946
6947 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6948
6949 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
6950 return bool, remove data argument.
6951 (linux_stabilize_threads): Use find_thread.
6952
6953 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6954
6955 * linux-low.c (unsuspend_one_lwp): Remove.
6956 (unsuspend_all_lwps): Use for_each_thread, inline code from
6957 unsuspend_one_lwp.
6958
6959 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6960
6961 * gdbthread.h (find_thread): Add overload with ptid_t filter.
6962 * linux-low.c (struct iterate_over_lwps_args): Remove.
6963 (iterate_over_lwps_filter): Remove.
6964 (iterate_over_lwps): Use find_thread.
6965
6966 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6967
6968 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
6969 (linux_handle_new_gdb_connection): Use for_each_thread, inline
6970 code from reset_lwp_ptrace_options_callback.
6971
6972 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6973
6974 * linux-arm-low.c (struct update_registers_data): Remove.
6975 (update_registers_callback): Return void, take arguments
6976 directly, don't check thread's pid.
6977 (arm_insert_point, arm_remove_point): Use for_each_thread.
6978
6979 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6980
6981 * win32-low.c (continue_one_thread): Return void, take argument
6982 directly.
6983 (child_continue): Use for_each_thread.
6984
6985 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6986
6987 * win32-i386-low.c (update_debug_registers_callback): Rename
6988 to ...
6989 (update_debug_registers): ... this, return void, remove pid_p arg.
6990 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
6991
6992 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
6993
6994 * inferiors.h (struct process_info): Add constructor, initialize
6995 fields..
6996 <syscalls_to_catch>: Change type to std::vector<int>.
6997 * inferiors.c (add_process): Allocate process_info with new.
6998 (remove_process): Free process_info with delete.
6999 * linux-low.c (handle_extended_wait): Adjust.
7000 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
7001 * server.c (handle_general_set): Adjust.
7002
7003 2017-11-16 Pedro Alves <palves@redhat.com>
7004
7005 * remote-utils.c (remote_close): Block SIGIO signals instead of
7006 uninstalling the SIGIO handler.
7007
7008 2017-11-16 Alan Hayward <alan.hayward@arm.com>
7009
7010 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
7011
7012 2017-11-16 Yao Qi <yao.qi@linaro.org>
7013
7014 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
7015 (tic6x_store_gregset): Likewise.
7016 (tic6x_usrregs_info): Move it up.
7017
7018 2017-11-15 Alan Hayward <alan.hayward@arm.com>
7019
7020 * Makefile.in: Update arch rules.
7021 * configure.srv: Explicitly mark arch/ files.
7022
7023 2017-11-13 Andreas Schwab <schwab@suse.de>
7024
7025 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
7026 function.
7027 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
7028
7029 2017-11-06 Pedro Alves <palves@redhat.com>
7030
7031 * config.in, configure: Regenerate.
7032
7033 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
7034
7035 * target.c (struct thread_search): Remove.
7036 (thread_search_callback): Remove.
7037 (prepare_to_access_memory): Use for_each_thread instead of
7038 find_inferior. Inline code from thread_search_callback.
7039
7040 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
7041
7042 * server.c (struct visit_actioned_threads_data): Remove.
7043 (visit_actioned_threads): Change prototype to take arguments
7044 directly.
7045 (resume): Use find_thread instead of find_inferior.
7046
7047 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
7048
7049 * server.c (queue_stop_reply_callback): Change prototype, return
7050 void.
7051 (find_status_pending_thread_callback): Remove.
7052 (handle_status): Replace find_inferior with find_thread and
7053 for_each_thread.
7054
7055 2017-10-25 Alan Hayward <alan.hayward@arm.com>
7056
7057 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
7058 with REGNO.
7059 (aarch64_store_gregset): Likewise.
7060 (aarch64_fill_fpregset): Likewise.
7061 (aarch64_store_fpregset): Likewise.
7062
7063 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
7064
7065 * gdbthread.h (find_thread, for_each_thread): New functions.
7066 * inferiors.c (thread_of_pid): Remove.
7067 (find_any_thread_of_pid): Use find_thread.
7068 * linux-low.c (num_lwps): Use for_each_thread.
7069
7070 2017-10-17 Yao Qi <yao.qi@linaro.org>
7071
7072 * Makefile.in: Remove one rule.
7073 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
7074
7075 2017-10-17 Yao Qi <yao.qi@linaro.org>
7076
7077 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
7078 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
7079
7080 2017-10-17 Yao Qi <yao.qi@linaro.org>
7081
7082 * configure.srv: Rename arm.o with arch/arm.o.
7083
7084 2017-10-17 Yao Qi <yao.qi@linaro.org>
7085
7086 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
7087 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
7088 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
7089 (arch-i386.o, arch-amd64.o): Remove rules.
7090 (arch/%.o): New rule.
7091 Update POSTCOMPILE and COMPILE.pre.
7092 * configure.ac: Invoke AC_CONFIG_COMMANDS.
7093 * configure: Re-generated.
7094 * configure.srv: Replace arch-i386.o with arch/i386.o.
7095 Replace arch-amd64.o with arch/amd64.o.
7096
7097 2017-10-16 Yao Qi <yao.qi@linaro.org>
7098
7099 * configure: Regenerated.
7100
7101 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
7102
7103 * inferiors.h: (struct inferior_list): Remove.
7104 (struct inferior_list_entry); Remove.
7105 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
7106 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
7107 get_first_inferior): Remove.
7108 (for_each_inferior, for_each_inferior_with_data, find_inferior,
7109 find_inferior_id, find_inferior_in_random): Change signature.
7110 * inferiors.c (all_threads): Change type to
7111 std::list<thread_info *>.
7112 (get_thread): Remove macro.
7113 (find_inferior, find_inferior_id): Change signature, implement
7114 using find_thread.
7115 (find_inferior_in_random): Change signature, implement using
7116 find_thread_in_random.
7117 (for_each_inferior, for_each_inferior_with_data): Change
7118 signature, implement using for_each_thread.
7119 (add_inferior_to_list, remove_inferior): Remove.
7120 (add_thread, get_first_thread, thread_of_pid,
7121 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
7122 (get_first_inferior, one_inferior_p, clear_inferior_list):
7123 Remove.
7124 (clear_inferiors, get_thread_process): Update.
7125 * gdbthread.h: Include <list>.
7126 (struct thread_info) <entry>: Remove field.
7127 <id>: New field.
7128 (all_threads): Change type to std::list<thread_info *>.
7129 (get_first_inferior): Add doc.
7130 (find_thread, for_each_thread, find_thread_in_random): New
7131 functions.
7132 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
7133 * linux-arm-low.c (update_registers_callback): Update.
7134 * linux-low.c (second_thread_of_pid_p): Update.
7135 (kill_one_lwp_callback, linux_detach_lwp_callback,
7136 delete_lwp_callback, status_pending_p_callback, same_lwp,
7137 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
7138 iterate_over_lwps, not_stopped_callback,
7139 resume_stopped_resumed_lwps, count_events_callback,
7140 select_singlestep_lwp_callback, select_event_lwp_callback,
7141 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
7142 suspend_and_send_sigstop_callback, wait_for_sigstop,
7143 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
7144 lwp_running, linux_set_resume_request, resume_status_pending_p,
7145 need_step_over_p, start_step_over, linux_resume_one_thread,
7146 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
7147 reset_lwp_ptrace_options_callback): Update.
7148 * linux-mips-low.c (update_watch_registers_callback): Update.
7149 * regcache.c (regcache_invalidate_one, regcache_invalidate):
7150 Update.
7151 (free_register_cache_thread_one): Remove.
7152 (regcache_release): Update.
7153 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
7154 handle_qxfer_threads_worker): Update.
7155 (handle_query): Update, use list iterator.
7156 (visit_actioned_threads, handle_pending_status,
7157 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
7158 clear_pending_status_callback, set_pending_status_callback,
7159 find_status_pending_thread_callback, handle_status,
7160 process_serial_event): Update.
7161 * target.c (thread_search_callback): Update.
7162 * thread-db.c (thread_db_get_tls_address): Update.
7163 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
7164 Update.
7165 * win32-i386-low.c (update_debug_registers_callback): Update.
7166 * win32-low.c (delete_thread_info, child_delete_thread,
7167 continue_one_thread, suspend_one_thread,
7168 get_child_debug_event): Adjust.
7169
7170 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
7171
7172 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
7173 * inferiors.h: Include <list>.
7174 (struct process_info) <entry>: Remove field.
7175 <pid>: New field.
7176 (pid_of): Change macro to function.
7177 (ptid_of, lwpid_of): Remove macro.
7178 (all_processes): Change type to std::list<process_info *>.
7179 (ALL_PROCESSES): Remove macro.
7180 (for_each_process, find_process): New function.
7181 * inferiors.c (all_processes): Change type to
7182 std::list<process_info *>.
7183 (find_thread_process): Adjust.
7184 (add_process): Likewise.
7185 (remove_process): Likewise.
7186 (find_process_pid): Likewise.
7187 (get_first_process): Likewise.
7188 (started_inferior_callback): Remove.
7189 (have_started_inferiors_p): Adjust.
7190 (attached_inferior_callback): Remove.
7191 (have_attached_inferiors_p): Adjust.
7192 * linux-low.c (check_zombie_leaders): Likewise.
7193 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
7194 (x86_linux_update_xmltarget): Adjust.
7195 * server.c (handle_query): Likewise.
7196 (gdb_reattached_process): Remove.
7197 (handle_status): Adjust.
7198 (kill_inferior_callback): Likewise.
7199 (detach_or_kill_inferior): Remove.
7200 (print_started_pid): Likewise.
7201 (print_attached_pid): Likewise.
7202 (detach_or_kill_for_exit): Update.
7203 (process_serial_event): Likewise.
7204 * linux-arm-low.c (arm_new_fork): Likewise.
7205
7206 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
7207
7208 * dll.h: Include <list>.
7209 (struct dll_info): Add constructor.
7210 <entry>: Remove field.
7211 (all_dlls): Change type to std::list<dll_info>.
7212 * dll.c: Include <algorithm>.
7213 (get_dll): Remove macro.
7214 (all_dlls): Change type to std::list<dll_info *>.
7215 (free_one_dll): Remove.
7216 (match_dll): Likewise.
7217 (loaded_dll): Adjust.
7218 (unloaded_dll): Adjust to all_dlls type change, use
7219 std::find_if. Inline code from match_dll.
7220 (clear_dlls): Adjust to all_dlls type change.
7221 * server.c (emit_dll_description): Remove.
7222 (handle_qxfer_libraries): Adjust to all_dlls type change,
7223 integrate emit_dll_description's functionality.
7224
7225 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
7226
7227 * linux-low.h (struct linux_target_ops) <delete_process>: New
7228 field.
7229 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
7230 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
7231 (struct linux_target_ops): Add delete_process callback.
7232 * linux-arm-low.c (arm_delete_process): New.
7233 (struct linux_target_ops): Add delete_process callback.
7234 * linux-bfin-low.c (struct linux_target_ops): Likewise.
7235 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
7236 * linux-m32r-low.c (struct linux_target_ops): Likewise.
7237 * linux-mips-low.c (mips_linux_delete_process): New.
7238 (struct linux_target_ops): Add delete_process callback.
7239 * linux-ppc-low.c (struct linux_target_ops): Likewise.
7240 * linux-s390-low.c (struct linux_target_ops): Likewise.
7241 * linux-sh-low.c (struct linux_target_ops): Likewise.
7242 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
7243 * linux-tile-low.c (struct linux_target_ops): Likewise.
7244 * linux-x86-low.c (x86_linux_delete_process): New.
7245 (struct linux_target_ops): Add delete_process callback.
7246 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
7247
7248 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
7249
7250 * linux-aarch64-low.c (the_low_target): Add thread delete
7251 callback.
7252 * linux-arm-low.c (arm_delete_thread): New function.
7253 (the_low_target): Add thread delete callback.
7254 * linux-bfin-low.c (the_low_target): Likewise.
7255 * linux-crisv32-low.c (the_low_target): Likewise.
7256 * linux-low.c (delete_lwp): Invoke delete_thread callback if
7257 set.
7258 * linux-low.h (struct linux_target_ops) <delete_thread>: New
7259 field.
7260 * linux-m32r-low.c (the_low_target): Add thread delete callback.
7261 * linux-mips-low.c (mips_linux_delete_thread): New function.
7262 (the_low_target): Add thread delete callback.
7263 * linux-ppc-low.c (the_low_target): Likewise.
7264 * linux-s390-low.c (the_low_target): Likewise.
7265 * linux-sh-low.c (the_low_target): Likewise.
7266 * linux-tic6x-low.c (the_low_target): Likewise.
7267 * linux-tile-low.c (the_low_target): Likewise.
7268 * linux-x86-low.c (the_low_target): Likewise.
7269 * linux-xtensa-low.c (the_low_target): Likewise.
7270
7271 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
7272
7273 * win32-low.c: Include "common-inferior.h".
7274
7275 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
7276
7277 * inferiors.c (set_inferior_cwd): New function.
7278 * server.c (handle_general_set): Handle QSetWorkingDir packet.
7279 (handle_query): Inform that QSetWorkingDir is supported.
7280 * win32-low.c (create_process): Pass the inferior's cwd to
7281 CreateProcess.
7282
7283 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
7284
7285 * inferiors.c (current_inferior_cwd): New global variable.
7286 (get_inferior_cwd): New function.
7287 * inferiors.h (struct process_info) <cwd>: New field.
7288
7289 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
7290
7291 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
7292 (OBS): Add gdb_tilde_expand.o.
7293
7294 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
7295
7296 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
7297 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
7298
7299 2017-09-29 Pedro Alves <palves@redhat.com>
7300
7301 * ax.c (gdb_parse_agent_expr): Constify.
7302 * ax.h (gdb_parse_agent_expr): Constify.
7303 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7304 Constify.
7305 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
7306 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
7307 * remote-utils.h (read_ptid): Constify.
7308 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
7309 (process_point_options, process_serial_event): Constify.
7310 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
7311 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
7312 (cmd_qtbuffer): Constify.
7313
7314 2017-09-29 Pedro Alves <palves@redhat.com>
7315
7316 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
7317 fails.
7318
7319 2017-09-29 Pedro Alves <palves@redhat.com>
7320
7321 * linux-low.c (handle_extended_wait): Pass parent thread instead
7322 of process to thread_db_notice_clone.
7323 * linux-low.h (thread_db_notice_clone): Replace parent process
7324 parameter with parent thread parameter.
7325 * thread-db.c (find_one_thread): Add comment.
7326 (thread_db_notice_clone): Replace parent process parameter with
7327 parent thread parameter. Temporarily switch to the parent thread.
7328
7329 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
7330
7331 * gdbthread.h: Include "common-gdbthread.h".
7332 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
7333 "if" when validating the ptid.
7334 * remote-utils.c: Include "gdbthread.h".
7335 (prepare_resume_reply): Use "switch_to_thread".
7336 * target.c (done_accessing_memory): Likewise.
7337
7338 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
7339
7340 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
7341 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
7342 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
7343 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
7344 s390x-gs-linux64-ipa.o to ipa_obj.
7345 * linux-s390-low.c (HWCAP_S390_GS): New define.
7346 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
7347 New functions.
7348 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
7349 (s390_arch_setup): Check for guarded-storage support and choose
7350 appropriate tdesc.
7351 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
7352 init_registers_s390x_gs_linux64.
7353 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
7354 enum value.
7355 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
7356 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
7357
7358 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
7359
7360 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
7361
7362 2017-09-21 Kevin Buettner <kevinb@redhat.com>
7363
7364 * linux-low.h (struct lwp_info): Add new field, thread_handle.
7365 (thread_db_thread_handle): Declare.
7366 * linux-low.c (linux_target_ops): Initialize thread_handle.
7367 * server.c (handle_qxfer_threads_worker): Add support for
7368 "handle" attribute.
7369 * target.h (struct target_ops): Add new function pointer,
7370 thread_handle.
7371 (target_thread_handle): Define.
7372 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
7373 field in lwp.
7374 (thread_db_thread_handle): New function.
7375
7376 2017-09-21 Kevin Buettner <kevinb@redhat.com>
7377
7378 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
7379 * linux-low.h (thread_db_notice_clone): Declare.
7380 * thread-db.c (thread_db_notice_clone): New function.
7381
7382 2017-09-21 Pedro Alves <palves@redhat.com>
7383
7384 * server.c (gdb_read_memory, handle_status, process_serial_event)
7385 (handle_serial_event, handle_target_event): Adjust to
7386 set_desired_thread prototype change.
7387 * target.c (set_desired_thread): Remove 'use_general' parameter
7388 and adjust.
7389 * target.h (set_desired_thread): Remove 'use_general' parameter.
7390
7391 2017-09-20 Tom Tromey <tom@tromey.com>
7392
7393 * target.c (target_terminal::terminal_state): Define.
7394 (target_terminal::init): Rename from target_terminal_init.
7395 (target_terminal::inferior): Rename from
7396 target_terminal_inferior.
7397 (target_terminal::ours): Rename from target_terminal_ours.
7398 (target_terminal::ours_for_output, target_terminal::info): New.
7399
7400 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7401
7402 * server.c (accumulate_file_name_length): Remove.
7403 (emit_dll_description): Adjust to std::string change.
7404 (handle_qxfer_libraries): Use std::string to hold document.
7405
7406 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7407
7408 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
7409 return type of xml_escape_text.
7410 * server.c (emit_dll_description): Likewise.
7411
7412 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7413
7414 * server.c (captured_main): Accept argument for --selftest.
7415 Update run_tests call.
7416 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
7417 when registering selftests.
7418
7419 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
7420
7421 * regcache.c (get_thread_regcache): Update code to use "std::vector"
7422 instead of "VEC" for "target_desc.reg_defs".
7423 (regcache_cpy): Likewise.
7424 (registers_to_string): Likewise.
7425 (registers_from_string): Likewise.
7426 (find_regno): Likewise.
7427 (supply_regblock): Likewise.
7428 (regcache_raw_read_unsigned): Likewise.
7429 * tdesc.c (init_target_desc): Likewise.
7430 (tdesc_create_reg): Likewise.
7431 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
7432 (struct target_desc) <reg_defs>: Convert to "std::vector".
7433 (target_desc): Do not initialize "reg_defs".
7434 (~target_desc): Update code to use "std::vector" instead of "VEC"
7435 for "target_desc.reg_defs".
7436 (operator==): Likewise.
7437
7438 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7439
7440 * inferiors.h (thread_to_gdb_id): Remove.
7441 * inferiors.c (thread_to_gdb_id): Remove.
7442 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
7443 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
7444 lynx_store_registers, lynx_read_memory, lynx_write_memory):
7445 Likewise.
7446 * nto-low.c (nto_fetch_registers, nto_store_registers,
7447 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
7448
7449 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7450
7451 * inferiors.h (gdb_id_to_thread_id): Remove.
7452 * inferiors.c (gdb_id_to_thread_id): Remove.
7453 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
7454 removal. Move pid declaration closer to where it's used.
7455
7456 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7457
7458 * server.c (handle_detach): New function.
7459 (process_serial_event): Move code out, call handle_detach.
7460
7461 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7462
7463 * server.c (require_running): Rename to ...
7464 (require_running_or_return): ... this ...
7465 (require_running_or_break): ... and this.
7466 (handle_query, process_serial_event): Adjust.
7467
7468 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7469
7470 * linux-low.c (linux_set_resume_request): Remove unused
7471 variables.
7472
7473 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7474
7475 * server.c (first_thread_of): Remove.
7476 (process_serial_event): Replace usage of first_thread_of with
7477 find_any_thread_of_pid.
7478 * tracepoint.c (same_process_p): Remove.
7479 (gdb_agent_about_to_close): Replace usage of same_process_p with
7480 find_any_thread_of_pid.
7481 * linux-x86-low.c (same_process_callback): Remove.
7482 (x86_arch_setup_process_callback): Replace usage of
7483 same_process_callback with find_any_thread_of_pid.
7484 * thread-db.c (any_thread_of): Remove.
7485 (switch_to_process): Replace usage of any_thread_of with
7486 find_any_thread_of_pid.
7487 * inferiors.c (thread_pid_matches_callback): Remove.
7488 (find_thread_process): Adjust to use find_any_thread_of_pid.
7489
7490 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
7491
7492 * regcache.c (get_thread_regcache): Guard calls to "memset"
7493 with "!VEC_empty".
7494
7495 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
7496
7497 * linux-low.c (handle_extended_wait): Use
7498 "allocate_target_description" instead of "XNEW".
7499 * linux-x86-low.c (initialize_low_arch): Likewise.
7500
7501 2017-09-05 Yao Qi <yao.qi@linaro.org>
7502
7503 * configure.srv (srv_i386_regobj): Remove.
7504 (srv_amd64_regobj): Remove.
7505 (srv_regobj): Set it to "" for x86 non-linux targets.
7506 * linux-x86-tdesc.c (i386_linux_read_description):
7507 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
7508 (init_registers_i386): Remove the declaration.
7509 (tdesc_i386): Remove the declaration.
7510 (lynx_i386_arch_setup): Call i386_create_target_description.
7511 * nto-x86-low.c: Likewise.
7512 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
7513 [!__x86_64__]: include arch/i386.h.
7514 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
7515
7516 2017-09-05 Yao Qi <yao.qi@linaro.org>
7517
7518 * configure.srv (srv_amd64_linux_xmlfiles): Remove
7519 i386/amd64-XXX-linux from it.
7520
7521 2017-09-05 Yao Qi <yao.qi@linaro.org>
7522
7523 * configure.srv: Empty srv_amd64_linux_regobj if $development is
7524 false.
7525 (ipa_amd64_linux_regobj): Remove.
7526 (ipa_x32_linux_regobj): Remove.
7527
7528 2017-09-05 Yao Qi <yao.qi@linaro.org>
7529
7530 * Makefile.in (arch-amd64.o): New rule.
7531 * configure.srv: Append arch-amd64.o.
7532 * linux-amd64-ipa.c: Include common/x86-xstate.h.
7533 (get_ipa_tdesc): Call amd64_linux_read_description.
7534 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
7535 and init_registers_amd64_XXX.
7536 * linux-x86-low.c (x86_linux_read_description): Call
7537 amd64_linux_read_description.
7538 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
7539 (initialize_low_arch): Don't call init_registers_x32_XXX and
7540 init_registers_amd64_XXX.
7541 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
7542 and tdesc_amd64_XXX.
7543 [__x86_64__] (amd64_tdesc_test): New function.
7544 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
7545 and init_registers_amd64_XXX.
7546 * linux-x86-tdesc.c: Include arch/amd64.h.
7547 (xcr0_to_tdesc_idx): New function.
7548 (i386_linux_read_description): New function.
7549 (amd64_get_ipa_tdesc_idx): New function.
7550 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
7551 (amd64_get_ipa_tdesc): Declare.
7552
7553 2017-09-05 Yao Qi <yao.qi@linaro.org>
7554
7555 * configure.srv (srv_i386_linux_xmlfiles): Remove
7556 i386/i386-XXX-linux.xml from it.
7557
7558 2017-09-05 Yao Qi <yao.qi@linaro.org>
7559
7560 * configure.srv: Set srv_i386_linux_regobj empty if $development
7561 is false.
7562 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
7563 initialize_low_tdesc.
7564 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
7565 with #if initialize_low_tdesc.
7566 * linux-x86-tdesc-selftest.c: New file.
7567 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
7568
7569 2017-09-05 Yao Qi <yao.qi@linaro.org>
7570
7571 * Makefile.in (arch-i386.o): New rule.
7572 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
7573 (x86_64-*-linux*): Likewise.
7574 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
7575 include arch/i386.h.
7576 (i386_linux_read_description): Remove code and call
7577 i386_create_target_description.
7578 * tdesc.c (allocate_target_description): New function.
7579 * tdesc.h (set_tdesc_architecture): Remove declaration.
7580 (set_tdesc_osabi): Likewise.
7581
7582 2017-09-05 Yao Qi <yao.qi@linaro.org>
7583
7584 * linux-x86-tdesc.c: Don't include <inttypes.h>.
7585 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
7586 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
7587 .xmltarget.
7588 * server.c (get_features_xml): Call tdesc_get_features_xml.
7589 * tdesc.c (set_tdesc_architecture): New function.
7590 (set_tdesc_osabi): New function.
7591 (tdesc_get_features_xml): New function.
7592 (tdesc_create_feature): Add an argument.
7593 * tdesc.h (struct target_desc) <features>: New field.
7594 <arch, osabi>: New field.
7595 (~target_desc): xfree features, arch, and osabi.
7596 (target_desc::oerator==): Don't compare .xmltarget.
7597 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
7598 (set_tdesc_osabi): Likewise.
7599 (tdesc_get_features_xml): Likewise.
7600
7601 2017-09-05 Yao Qi <yao.qi@linaro.org>
7602
7603 * linux-x86-tdesc.c: Include selftest.h.
7604 (i386_tdesc_test): New function.
7605 (initialize_low_tdesc): Call selftests::register_test.
7606 * tdesc.h: Include regdef.h.
7607 (target_desc): Override operator == and !=.
7608
7609 2017-09-05 Yao Qi <yao.qi@linaro.org>
7610
7611 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
7612 (ipa_obj): Likewise.
7613 * linux-i386-ipa.c: Include common/x86-xstate.h
7614 (get_ipa_tdesc): Call i386_linux_read_description.
7615 (initialize_low_tracepoint): Don't call init_registers_XXX
7616 functions, call initialize_low_tdesc instead.
7617 * linux-x86-low.c (x86_linux_read_description): Call
7618 i386_linux_read_description.
7619 (initialize_low_arch): Don't call init_registers_i386_XXX
7620 functions, call initialize_low_tdesc.
7621 * linux-x86-tdesc.c: New file.
7622 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
7623 (i386_get_ipa_tdesc_idx): Declare.
7624 (i386_get_ipa_tdesc): Declare.
7625 (initialize_low_tdesc): Declare.
7626
7627 2017-09-05 Yao Qi <yao.qi@linaro.org>
7628
7629 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
7630 instead of 0.
7631
7632 2017-09-05 Yao Qi <yao.qi@linaro.org>
7633
7634 * Makefile.in (IPA_OBJS): Add vec-ipa.o
7635 * regcache.c (get_thread_regcache): Use VEC_length.
7636 (init_register_cache): Likewise.
7637 (regcache_cpy): Likewise.
7638 (registers_to_string): Iterate reg_defs via VEC_iterate.
7639 (find_regno): Likewise.
7640 (find_register_by_number): Use VEC_index.
7641 (register_size): Call find_register_by_number.
7642 (register_data): Call find_register_by_number.
7643 (supply_regblock): Use VEC_length.
7644 (regcache_raw_read_unsigned): Likewise.
7645 * tdesc.c (init_target_desc): Iterate reg_defs via
7646 VEC_iterate.
7647 (default_description): Update initializer.
7648 (copy_target_description): Don't update field num_registers.
7649 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
7650 <num_registers>: Remove.
7651
7652 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7653
7654 * Makefile.in (.SECONDARY): Define target.
7655
7656 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
7657
7658 * linux-low.c (linux_wait_1): Adjust.
7659 * server.c (queue_stop_reply_callback): Adjust.
7660
7661 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
7662
7663 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
7664 QEnvironmentUnset and QEnvironmentReset packets.
7665 (handle_query): Inform remote that QEnvironmentHexEncoded,
7666 QEnvironmentUnset and QEnvironmentReset are supported.
7667
7668 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
7669
7670 * inferiors.h (inferior_target_data): Rename to ...
7671 (thread_target_data): ... this.
7672 (inferior_regcache_data): Rename to ...
7673 (thread_regcache_data): ... this.
7674 (set_inferior_regcache_data): Rename to ...
7675 (set_thread_regcache_data): ... this.
7676 * inferiors.c (inferior_target_data): Rename to ...
7677 (thread_target_data): ... this.
7678 (inferior_regcache_data): Rename to ...
7679 (thread_regcache_data): ... this.
7680 (set_inferior_regcache_data): Rename to ...
7681 (set_thread_regcache_data): ... this.
7682 (free_one_thread): Update.
7683 * linux-low.h (get_thread_lwp): Update.
7684 * regcache.c (get_thread_regcache): Update.
7685 (regcache_invalidate_thread): Update.
7686 (free_register_cache_thread): Update.
7687 * win32-i386-low.c (update_debug_registers_callback): Update.
7688 (win32_get_current_dr): Update.
7689 * win32-low.c (thread_rec): Update.
7690 (delete_thread_info): Update.
7691 (continue_one_thread): Update.
7692 (suspend_one_thread): Update.
7693
7694 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
7695
7696 * inferiors.c (set_inferior_target_data): Remove.
7697 * inferiors.h (set_inferior_target_data): Remove.
7698
7699 2017-08-18 Yao Qi <yao.qi@linaro.org>
7700
7701 * Makefile.in (OBS): Add selftest.o.
7702 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
7703 * configure, config.in: Re-generated.
7704 * server.c: Include common/sefltest.h.
7705 (captured_main): Handle option --selftest.
7706
7707 2017-08-09 Yao Qi <yao.qi@linaro.org>
7708
7709 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
7710 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
7711 i386-avx-mpx.o and i386-mmx.o.
7712 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
7713 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
7714 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
7715 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
7716 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
7717 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
7718 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
7719 i386/amd64-avx-mpx.xml.
7720
7721 2017-08-09 Yao Qi <yao.qi@linaro.org>
7722
7723 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
7724 and x32-avx-avx512.o.
7725 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
7726 i386/x32-avx-avx512.xml.
7727
7728 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
7729
7730 * tracepoint.h (enum class fast_tpoint_collect_result): New
7731 enumeration.
7732 (fast_tracepoint_collecting): Change return type to
7733 fast_tpoint_collect_result.
7734 * tracepoint.c (fast_tracepoint_collecting): Likewise.
7735 * linux-low.h: Include tracepoint.h.
7736 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
7737 fast_tpoint_collect_result.
7738 * linux-low.c (handle_tracepoints): Adjust.
7739 (linux_fast_tracepoint_collecting): Change return type to
7740 fast_tpoint_collect_result.
7741 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
7742 linux_wait_1, stuck_in_jump_pad_callback,
7743 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
7744 proceed_one_lwp): Adjust to type change.
7745
7746 2017-07-10 Yao Qi <yao.qi@linaro.org>
7747
7748 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
7749
7750 2017-06-29 Yao Qi <yao.qi@linaro.org>
7751
7752 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
7753 Remove.
7754 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
7755
7756 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
7757
7758 * Makefile.in (IPA_OBJS): Sort and format one item per line.
7759
7760 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
7761
7762 * linux-low.c (linux_create_inferior): Adjust code to access the
7763 environment information via 'gdb_environ' class.
7764 * lynx-low.c (lynx_create_inferior): Likewise.
7765 * server.c (our_environ): Make it an instance of 'gdb_environ'.
7766 (get_environ): Return a pointer to 'our_environ'.
7767 (captured_main): Initialize 'our_environ'.
7768 * server.h (get_environ): Adjust prototype.
7769 * spu-low.c (spu_create_inferior): Adjust code to access the
7770 environment information via 'gdb_environ' class.
7771
7772 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7773
7774 * linux-low.c (linux_read_memory, linux_write_memory): Remove
7775 usage of "register" keyword.
7776
7777 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7778
7779 * configure: Re-generate.
7780
7781 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7782
7783 * configure: Re-generate.
7784
7785 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7786
7787 * Makefile.in (COMPILE.pre): Add "-x c++".
7788
7789 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
7790
7791 * fork-child.c: Conditionally include <signal.h>.
7792
7793 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7794
7795 * server.c (handle_general_set): Handle new packet
7796 "QStartupWithShell".
7797 (handle_query): Add "QStartupWithShell" to the list of supported
7798 packets.
7799 (gdbserver_usage): Add help text explaining the
7800 new "--startup-with-shell" and "--no-startup-with-shell" CLI
7801 options.
7802 (captured_main): Recognize and act upon the presence of the new
7803 CLI options.
7804
7805 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7806 Pedro Alves <palves@redhat.com>
7807
7808 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
7809 * configure: Regenerate.
7810 * configure.srv (srv_linux_obj): Add "fork-child.o" and
7811 "fork-inferior.o".
7812 (i[34567]86-*-lynxos*): Likewise.
7813 (spu*-*-*): Likewise.
7814 * fork-child.c: New file.
7815 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
7816 and "environ.h".
7817 (linux_ptrace_fun): New function.
7818 (linux_create_inferior): Adjust function prototype to reflect
7819 change on "target.h". Adjust function code to use
7820 "fork_inferior".
7821 (linux_request_interrupt): Delete "signal_pid".
7822 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
7823 (lynx_ptrace_fun): New function.
7824 (lynx_create_inferior): Adjust function prototype to reflect
7825 change on "target.h". Adjust function code to use
7826 "fork_inferior".
7827 * nto-low.c (nto_create_inferior): Adjust function prototype and
7828 code to reflect change on "target.h". Update comments.
7829 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
7830 "common-terminal.h" and "environ.h".
7831 (terminal_fd): Moved to fork-child.c.
7832 (old_foreground_pgrp): Likewise.
7833 (restore_old_foreground_pgrp): Likewise.
7834 (last_status): Make it global.
7835 (last_ptid): Likewise.
7836 (our_environ): New variable.
7837 (startup_with_shell): Likewise.
7838 (program_name): Likewise.
7839 (program_argv): Rename to...
7840 (program_args): ...this.
7841 (wrapper_argv): New variable.
7842 (start_inferior): Delete function.
7843 (get_exec_wrapper): New function.
7844 (get_exec_file): Likewise.
7845 (get_environ): Likewise.
7846 (prefork_hook): Likewise.
7847 (post_fork_inferior): Likewise.
7848 (postfork_hook): Likewise.
7849 (postfork_child_hook): Likewise.
7850 (handle_v_run): Update code to deal with arguments coming from the
7851 remote host. Update calls from "start_inferior" to
7852 "create_inferior".
7853 (captured_main): Likewise. Initialize environment variable. Call
7854 "have_job_control".
7855 * server.h (post_fork_inferior): New prototype.
7856 (get_environ): Likewise.
7857 (last_status): Declare.
7858 (last_ptid): Likewise.
7859 (signal_pid): Likewise.
7860 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
7861 (spu_ptrace_fun): New function.
7862 (spu_create_inferior): Adjust function prototype to reflect change
7863 on "target.h". Adjust function code to use "fork_inferior".
7864 * target.c (target_terminal_init): New function.
7865 (target_terminal_inferior): Likewise.
7866 (target_terminal_ours): Likewise.
7867 * target.h: Include <vector>.
7868 (struct target_ops) <create_inferior>: Update prototype.
7869 (create_inferior): Update macro.
7870 * utils.c (gdb_flush_out_err): New function.
7871 * win32-low.c (win32_create_inferior): Adjust function prototype
7872 and code to reflect change on "target.h".
7873
7874 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7875
7876 * inferiors.c (switch_to_thread): New function.
7877
7878 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7879
7880 * Makefile.in (SFILE): Add "common/job-control.c".
7881 (OBS): Add "job-control.o".
7882
7883 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
7884
7885 * Makefile: Remove "@host_makefile_frag@".
7886
7887 2017-05-05 Pedro Alves <palves@redhat.com>
7888
7889 * configure: Regenerate.
7890
7891 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
7892
7893 * configure: Regenerate.
7894
7895 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
7896
7897 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
7898 software_single_step change of return type to
7899 std::vector<CORE_ADDR>.
7900 * linux-low.c (install_software_single_step_breakpoints):
7901 Likewise.
7902 * linux-low.h (install_software_single_step_breakpoints):
7903 Likewise.
7904
7905 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7906
7907 * remote-utils.c: Include "gdb_termios.h" instead of
7908 "terminal.h".
7909 * terminal.h: Delete file.
7910
7911 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7912
7913 * server.c: Include <vector>.
7914 <program_argv, wrapper_argv>: Convert to std::vector.
7915 (start_inferior): Rewrite function to use C++.
7916 (handle_v_run): Likewise. Update code that calculates the argv
7917 based on the vRun packet; use C++.
7918 (captured_main): Likewise.
7919
7920 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
7921
7922 * server.c (handle_v_cont): Initialize thread_resume::thread
7923 with null_ptid.
7924
7925 2017-04-05 Pedro Alves <palves@redhat.com>
7926
7927 * configure: Regenerate.
7928
7929 2017-04-05 Pedro Alves <palves@redhat.com>
7930
7931 * gdbreplay.c (sync_error): Constify.
7932 * linux-x86-low.c (push_opcode): Constify.
7933
7934 2017-04-05 Pedro Alves <palves@redhat.com>
7935
7936 * win32-low.c (get_child_debug_event)
7937 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
7938 Report TARGET_WAITKIND_SPURIOUS instead.
7939
7940 2017-04-05 Pedro Alves <palves@redhat.com>
7941
7942 * remote-utils.c (remote_prepare, remote_open): Constify.
7943 * remote-utils.h (remote_prepare, remote_open): Constify.
7944 * server.c (captured_main): Constify 'port' handling.
7945
7946 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
7947
7948 * Makefile.in (clean): Clear .deps.
7949
7950 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
7951
7952 * .gitignore: Remove generated files, replace with wildcard.
7953 * (clean): Replace removal of generated files with wildcard.
7954 (version.c): Replace with...
7955 (version-generated.c): ...this.
7956 (xml-builtin.c): Replace with...
7957 (xml-builtin-generated.c): ...this.
7958 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
7959 (%.c: *regformats*): Replace with...
7960 (%-generated.c: *regformats*): ...this.
7961
7962 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
7963
7964 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
7965 (xtensa_fill_gregset): Call collect_register_by_name for
7966 threadptr register.
7967 (xtensa_store_gregset): Call supply_register_by_name for
7968 threadptr register.
7969
7970 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
7971
7972 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
7973 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
7974 (xtensa_store_gregset): Call supply_register for all registers in
7975 a0_regnum..a0_regnum + C0_NREGS range.
7976
7977 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7978
7979 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
7980 (ax-ipa.o: ax.c): Remove.
7981 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
7982 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
7983 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
7984 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
7985 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
7986
7987 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7988
7989 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
7990 (print-utils-ipa.o: ../common/print-utils.c): Remove.
7991 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
7992 (errors-ipa.o: ../common/errors.c): Remove.
7993 (format-ipa.o: ../common/format.c): Remove.
7994 (common-utils-ipa.o: ../common/common-utils.c): Remove.
7995
7996 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7997
7998 * Makefile.in (%-ipa.o: %.c): New rule.
7999 (tracepoint-ipa.o: tracepoint.c): Remove.
8000 (utils-ipa.o: utils.c): Remove.
8001 (remote-utils-ipa.o: remote-utils.c): Remove.
8002 (regcache-ipa.o: regcache.c): Remove.
8003 (i386-linux-ipa.o: i386-linux.c): Remove.
8004 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
8005 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
8006 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
8007 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
8008 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
8009 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
8010 (amd64-linux-ipa.o: amd64-linux.c): Remove.
8011 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
8012 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
8013 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
8014 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
8015 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
8016 (aarch64-ipa.o: aarch64.c): Remove.
8017 (s390-linux32-ipa.o: s390-linux32.c): Remove.
8018 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
8019 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
8020 (s390-linux64-ipa.o: s390-linux64.c): Remove.
8021 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
8022 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
8023 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
8024 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
8025 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
8026 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
8027 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
8028 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
8029 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
8030 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
8031 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
8032 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
8033 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
8034 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
8035 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
8036 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
8037 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
8038 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
8039 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
8040 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
8041 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
8042 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
8043 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
8044 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
8045 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
8046 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
8047 (tdesc-ipa.o: tdesc.c): Remove.
8048 (x32-linux-ipa.o: x32-linux.c): Remove.
8049 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
8050 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
8051
8052 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
8053
8054 * Makefile.in (%.o: ../arch/%.c): New rule.
8055 (arm.o: ../arch/arm.c): Remove.
8056 (arm-linux.o: ../arch/arm-linux.c): Remove.
8057 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
8058 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
8059
8060 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
8061
8062 * Makefile.in (%.o: ../nat/%.c): New rule.
8063 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
8064 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
8065 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
8066 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
8067 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
8068 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
8069 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
8070 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
8071 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
8072 (linux-personality.o: ../nat/linux-personality.c): Remove.
8073 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
8074 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
8075 (x86-linux.o: ../nat/x86-linux.c): Remove.
8076 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
8077 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
8078
8079 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
8080
8081 * Makefile.in (%.o: ../common/%.c): New rule.
8082 (signals.o: ../common/signals.c): Remove.
8083 (print-utils.o: ../common/print-utils.c): Remove.
8084 (rsp-low.o: ../common/rsp-low.c): Remove.
8085 (common-utils.o: ../common/common-utils.c): Remove.
8086 (posix-strerror.o: ../common/posix-strerror.c): Remove.
8087 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
8088 (vec.o: ../common/vec.c): Remove.
8089 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
8090 (xml-utils.o: ../common/xml-utils.c): Remove.
8091 (ptid.o: ../common/ptid.c): Remove.
8092 (buffer.o: ../common/buffer.c): Remove.
8093 (format.o: ../common/format.c): Remove.
8094 (filestuff.o: ../common/filestuff.c): Remove.
8095 (agent.o: ../common/agent.c): Remove.
8096 (errors.o: ../common/errors.c): Remove.
8097 (environ.o: ../common/environ.c): Remove.
8098 (common-debug.o: ../common/common-debug.c): Remove.
8099 (cleanups.o: ../common/cleanups.c): Remove.
8100 (common-exceptions.o: ../common/common-exceptions.c): Remove.
8101 (fileio.o: ../common/fileio.c): Remove.
8102 (common-regcache.o: ../common/common-regcache.c): Remove.
8103 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
8104 (new-op.o: ../common/new-op.c): Remove.
8105 (btrace-common.o: ../common/btrace-common.c): Remove.
8106
8107 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
8108
8109 * Makefile.in (%.o: ../target/%.c): New rule.
8110 (waitstatus.o: ../target/waitstatus.c): Remove.
8111
8112 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
8113
8114 * Makefile.in
8115 (%.c: ../regformats/%.dat,
8116 (%.c: ../regformats/arm/%.dat,
8117 (%.c: ../regformats/i386/%.dat,
8118 (%.c: ../regformats/rs6000/%.dat): New rules.
8119 (aarch64.c): Remove.
8120 (reg-arm.c): Remove.
8121 (arm-with-iwmmxt.c): Remove.
8122 (arm-with-vfpv2.c): Remove.
8123 (arm-with-vfpv3.c): Remove.
8124 (arm-with-neon.c): Remove.
8125 (reg-bfin.c): Remove.
8126 (reg-cris.c): Remove.
8127 (reg-crisv32.c): Remove.
8128 (i386.c): Remove.
8129 (i386-linux.c): Remove.
8130 (i386-avx.c): Remove.
8131 (i386-avx-linux.c): Remove.
8132 (i386-avx-avx512.c): Remove.
8133 (i386-avx-avx512-linux.c): Remove.
8134 (i386-mpx.c): Remove.
8135 (i386-mpx-linux.c): Remove.
8136 (i386-avx-mpx-avx512-pku.c): Remove.
8137 (i386-avx-mpx-avx512-pku-linux.c): Remove.
8138 (i386-avx-mpx.c): Remove.
8139 (i386-avx-mpx-linux.c): Remove.
8140 (i386-mmx.c): Remove.
8141 (i386-mmx-linux.c): Remove.
8142 (reg-ia64.c): Remove.
8143 (reg-m32r.c): Remove.
8144 (reg-m68k.c): Remove.
8145 (reg-cf.c): Remove.
8146 (mips-linux.c): Remove.
8147 (mips-dsp-linux.c): Remove.
8148 (mips64-linux.c): Remove.
8149 (mips64-dsp-linux.c): Remove.
8150 (nios2-linux.c): Remove.
8151 (powerpc-32.c): Remove.
8152 (powerpc-32l.c): Remove.
8153 (powerpc-altivec32l.c): Remove.
8154 (powerpc-cell32l.c): Remove.
8155 (powerpc-vsx32l.c): Remove.
8156 (powerpc-isa205-32l.c): Remove.
8157 (powerpc-isa205-altivec32l.c): Remove.
8158 (powerpc-isa205-vsx32l.c): Remove.
8159 (powerpc-e500l.c): Remove.
8160 (powerpc-64l.c): Remove.
8161 (powerpc-altivec64l.c): Remove.
8162 (powerpc-cell64l.c): Remove.
8163 (powerpc-vsx64l.c): Remove.
8164 (powerpc-isa205-64l.c): Remove.
8165 (powerpc-isa205-altivec64l.c): Remove.
8166 (powerpc-isa205-vsx64l.c): Remove.
8167 (s390-linux32.c): Remove.
8168 (s390-linux32v1.c): Remove.
8169 (s390-linux32v2.c): Remove.
8170 (s390-linux64.c): Remove.
8171 (s390-linux64v1.c): Remove.
8172 (s390-linux64v2.c): Remove.
8173 (s390-te-linux64.c): Remove.
8174 (s390-vx-linux64.c): Remove.
8175 (s390-tevx-linux64.c): Remove.
8176 (s390x-linux64.c): Remove.
8177 (s390x-linux64v1.c): Remove.
8178 (s390x-linux64v2.c): Remove.
8179 (s390x-te-linux64.c): Remove.
8180 (s390x-vx-linux64.c): Remove.
8181 (s390x-tevx-linux64.c): Remove.
8182 (tic6x-c64xp-linux.c): Remove.
8183 (tic6x-c64x-linux.c): Remove.
8184 (tic6x-c62x-linux.c): Remove.
8185 (reg-sh.c): Remove.
8186 (reg-sparc64.c): Remove.
8187 (reg-spu.c): Remove.
8188 (amd64.c): Remove.
8189 (amd64-linux.c): Remove.
8190 (amd64-avx.c): Remove.
8191 (amd64-avx-linux.c): Remove.
8192 (amd64-avx-avx512.c): Remove.
8193 (amd64-avx-avx512-linux.c): Remove.
8194 (amd64-mpx.c): Remove.
8195 (amd64-mpx-linux.c): Remove.
8196 (amd64-avx-mpx-avx512-pku.c): Remove.
8197 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
8198 (amd64-avx-mpx.c): Remove.
8199 (amd64-avx-mpx-linux.c): Remove.
8200 (x32.c): Remove.
8201 (x32-linux.c): Remove.
8202 (x32-avx.c): Remove.
8203 (x32-avx-linux.c): Remove.
8204 (x32-avx-avx512.c): Remove.
8205 (x32-avx-avx512-linux.c): Remove.
8206 (reg-xtensa.c): Remove.
8207 (reg-tilegx.c): Remove.
8208 (reg-tilegx32.c): Remove.
8209
8210 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
8211
8212 * Makefile.in (SFILES): Add "common/environ.c".
8213 (OBJS): Add "common/environ.h".
8214
8215 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
8216
8217 * configure.ac: Check if the fs_base and gs_base members of
8218 `struct user_regs_struct' exist.
8219 * config.in: Regenerated.
8220 * configure: Likewise.
8221
8222 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
8223
8224 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
8225 target_read_memory.
8226 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
8227 (get_next_pcs_syscall_next_pc): Likewise.
8228
8229 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
8230
8231 * win32-i386-low.c: Fix incorrect reference to a couple source files.
8232 * nto-x86-low.c: Likewise.
8233
8234 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
8235
8236 * Makefile.in: Include disable-implicit-rules.mk.
8237
8238 2016-11-23 Pedro Alves <palves@redhat.com>
8239
8240 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
8241 (debug_vprintf): Use std::chrono::steady_clock instead of
8242 gettimeofday. Use '.' instead of ':'.
8243 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
8244 (get_timestamp): Use std::chrono::steady_clock instead of
8245 gettimeofday.
8246
8247 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
8248
8249 * Makefile.in: Fix whitespace formatting.
8250
8251 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
8252
8253 * Makefile.in (SFILES, OBS): Flatten list and order
8254 alphabetically.
8255
8256 2016-11-23 Pedro Alves <palves@redhat.com>
8257
8258 * event-loop.c (handle_file_event): Use warning.
8259 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
8260 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8261 Use warning.
8262
8263 2016-11-23 Pedro Alves <palves@redhat.com>
8264
8265 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
8266 output.
8267 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
8268 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
8269 debug_printf and debug_flush for debug output.
8270 * server.c (handle_general_set): Likewise.
8271 * thread-db.c (try_thread_db_load): Use debug_printf for debug
8272 output.
8273
8274 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
8275
8276 * Makefile.in (.c.o): Replace rule with ...
8277 (%.o: %.c): ... this one.
8278
8279 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
8280
8281 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
8282 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
8283 make.
8284 * configure.ac: Remove checks for the make program.
8285 * configure: Re-generate.
8286
8287 2016-10-28 Pedro Alves <palves@redhat.com>
8288
8289 * Makefile.in (CXX_DIALECT): Get from configure.
8290 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
8291 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
8292 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
8293 * config.in: Regenerate.
8294 * configure: Regenerate.
8295
8296 2016-10-27 Yao Qi <yao.qi@linaro.org>
8297
8298 * linux-low.c (linux_supports_range_stepping): Return true if
8299 can_software_single_step return true.
8300
8301 2016-10-27 Yao Qi <yao.qi@linaro.org>
8302
8303 * inferiors.c (find_inferior_in_random): New function.
8304 * inferiors.h (find_inferior_in_random): Declare.
8305 * linux-low.c (linux_wait_for_event_filtered): Call
8306 find_inferior_in_random instead of find_inferior.
8307
8308 2016-10-27 Yao Qi <yao.qi@linaro.org>
8309
8310 * linux-low.c (linux_wait_1): If single-step breakpoints are
8311 inserted, remove them.
8312
8313 2016-10-26 Pedro Alves <palves@redhat.com>
8314
8315 * linux-low.c (handle_extended_wait): Link parent/child fork
8316 threads.
8317 (linux_wait_1): Unlink them.
8318 (linux_set_resume_request): Ignore resume requests for
8319 already-resumed and unhandled fork child threads.
8320 * linux-low.h (struct lwp_info) <fork_relative>: New field.
8321 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
8322 New functions.
8323 (handle_v_requests) <vCont>: Don't call require_running.
8324 * server.h (in_queued_stop_replies): New declaration.
8325
8326 2016-10-24 Yao Qi <yao.qi@linaro.org>
8327
8328 PR server/20733
8329 * linux-aarch64-low.c (append_insns): Cast the return value to
8330 'uint32_t *'.
8331
8332 2016-10-10 Yao Qi <yao.qi@linaro.org>
8333
8334 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
8335
8336 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
8337
8338 * target.c (target_supports_multi_process): New function, moved
8339 from...
8340 * target.h (target_supports_multi_process): ... here. Remove
8341 macro.
8342
8343 2016-10-05 Tom Tromey <tom@tromey.com>
8344
8345 PR remote/20655:
8346 * tracepoint.c (handle_tracepoint_bkpts): Check
8347 ipa_error_tracepoint, not ipa_stopping_tracepoint.
8348
8349 2016-10-05 Yao Qi <yao.qi@linaro.org>
8350
8351 * configure.srv: Update the path of arm-*.xml files.
8352
8353 2016-10-05 Terry Guo <terry.guo@arm.com>
8354 Yao Qi <yao.qi@linaro.org>
8355
8356 * Makefile.in: Adjust the path of rules.
8357 * configure.srv: Update the path of xml files.
8358 * regformats/arm-with-iwmmxt.dat: Regenerated.
8359 * regformats/arm-with-neon.dat: Likewise.
8360 * regformats/arm-with-vfpv2.dat: Likewise.
8361 * regformats/arm-with-vfpv3.dat Likewise.
8362
8363 2016-09-30 Yao Qi <yao.qi@linaro.org>
8364
8365 PR gdbserver/20627
8366 * target.c (target_stop_and_wait): Don't call
8367 target_continue_no_signal, use resume_stop instead.
8368
8369 2016-09-26 Yao Qi <yao.qi@linaro.org>
8370
8371 * linux-low.c (linux_wait_1): Call debug_exit.
8372
8373 2016-09-23 Pedro Alves <palves@redhat.com>
8374
8375 * Makefile.in (SFILES): Add common/new-op.c.
8376 (OBS): Add common/new-op.o.
8377 (new-op.o): New rule.
8378
8379 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
8380
8381 * .gitinore: Ignore more files.
8382
8383 2016-09-21 Yao Qi <yao.qi@linaro.org>
8384
8385 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
8386 23.
8387
8388 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
8389
8390 * server.c (start_inferior): Call target_mourn_inferior instead of
8391 mourn_inferior; pass ptid_t argument to it.
8392 (resume): Likewise.
8393 (handle_target_event): Likewise.
8394 * target.c (target_mourn_inferior): New function.
8395 * target.h (mourn_inferior): Delete macro.
8396
8397 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
8398
8399 * linux-low.c (lwp_is_stepping): New function.
8400
8401 2016-09-06 Carl Love <cel@us.ibm.com>
8402
8403 * server.c (start_inferior): Fixed comment, requested comment change
8404 didn't get updated correctly. Removed reference to ptrace () call as
8405 it is only true on Linux systems.
8406
8407 2016-09-06 Carl Love <cel@us.ibm.com>
8408
8409 * server.c (start_inferior): Do not call
8410 function target_post_create_inferior () if the
8411 inferior process has already exited.
8412
8413 2016-09-05 Pedro Alves <palves@redhat.com>
8414
8415 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
8416 (COMPILE.pre, CC_LD): Use CXX directly.
8417 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
8418 * acinclude.m4: Don't include build-with-cxx.m4.
8419 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
8420 * configure: Regenerate.
8421
8422 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
8423
8424 PR gdb/19495
8425 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
8426 call writing data to own_buf.
8427
8428 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
8429
8430 * target.c (mywait): Call target_wait instead of
8431 the_target->wait.
8432 (target_wait): New function.
8433
8434 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
8435
8436 * server.c (start_inferior): New variable 'ptid'. Replace calls
8437 to the_target->resume by target_continue{,_no_signal}, depending
8438 on the case.
8439 * target.c (target_stop_and_wait): Call target_continue_no_signal
8440 instead of the_target->resume.
8441 (target_continue): New function.
8442
8443 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
8444
8445 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
8446
8447 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
8448
8449 PR server/20491
8450 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
8451 ps_prochandle.
8452 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
8453 * linux-arm-low.c (ps_get_thread_area): Likewise.
8454 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
8455 * linux-m68k-low.c (ps_get_thread_area): Likewise.
8456 * linux-mips-low.c (ps_get_thread_area): Likewise.
8457 * linux-nios2-low.c (ps_get_thread_area): Likewise.
8458 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
8459 * linux-x86-low.c (ps_get_thread_area): Likewise.
8460 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
8461
8462 2016-08-19 Pedro Alves <palves@redhat.com>
8463
8464 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
8465
8466 2016-08-19 Pedro Alves <palves@redhat.com>
8467
8468 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
8469 comment. Use memcpy instead of casting through unsigned long.
8470
8471 2016-08-19 Pedro Alves <palves@redhat.com>
8472
8473 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
8474 allocating around 0x80000000.
8475
8476 2016-08-19 Pedro Alves <palves@redhat.com>
8477
8478 PR gdb/20415
8479 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
8480 (x32-avx512-linux-ipa.o): New rules.
8481 * configure.ac (x86_64-*-linux*): New x32 check.
8482 * configure.srv (ipa_x32_linux_regobj): New.
8483 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
8484 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
8485 descriptions.
8486 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
8487 descriptions.
8488 * configure: Regenerate.
8489
8490 2016-08-09 Pedro Alves <palves@redhat.com>
8491
8492 PR gdb/18653
8493 * Makefile.in (OBS): Add signals-state-save-restore.o.
8494 (signals-state-save-restore.o): New rule.
8495 * config.in: Regenerate.
8496 * configure: Regenerate.
8497 * linux-low.c: Include "signals-state-save-restore.h".
8498 (linux_create_inferior): Call
8499 restore_original_signals_state.
8500 * server.c: Include "dispositions-save-restore.h".
8501 (captured_main): Call save_original_signals_state.
8502
8503 2016-08-05 Pedro Alves <palves@redhat.com>
8504
8505 * configure: Regenerate.
8506
8507 2016-08-04 Yao Qi <yao.qi@linaro.org>
8508
8509 * linux-low.c (regsets_fetch_inferior_registers): Check
8510 errno is ESRCH or not.
8511
8512 2016-08-02 Yao Qi <yao.qi@linaro.org>
8513
8514 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
8515 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
8516 (thread_db_load_search): Update.
8517 (try_thread_db_load_1): Don't look for td_ta_event_addr,
8518 td_ta_set_event and td_ta_event_getmsg.
8519
8520 2016-07-26 Pedro Alves <palves@redhat.com>
8521
8522 PR server/20414
8523 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
8524 of unsigned long for 64-bit registers and use uint32_t instead of
8525 unsigned int for 32-bit registers.
8526
8527 2016-07-26 Pedro Alves <palves@redhat.com>
8528
8529 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
8530 to 'ptrace'.
8531
8532 2016-07-21 Tom Tromey <tom@tromey.com>
8533
8534 * configure: Rebuild.
8535
8536 2016-07-21 Yao Qi <yao.qi@linaro.org>
8537
8538 * mem-break.c (find_gdb_breakpoint): Cast bp to
8539 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
8540
8541 2016-07-21 Yao Qi <yao.qi@linaro.org>
8542
8543 * server.c (handle_v_requests): Support s and S actions
8544 if target_supports_software_single_step return true.
8545
8546 2016-07-21 Yao Qi <yao.qi@linaro.org>
8547
8548 * linux-low.c (resume_stopped_resumed_lwps): If resume request
8549 is resume_step, call maybe_hw_step.
8550 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
8551 and unstop them.
8552 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
8553 breakpoints or not.
8554 (proceed_one_lwp): If resume request is resume_step, install
8555 reinsert breakpoints and call maybe_hw_step.
8556
8557 2016-07-21 Yao Qi <yao.qi@linaro.org>
8558
8559 * linux-low.c (proceed_one_lwp): Declare.
8560 (linux_resume_one_thread): Remove local variable 'step'.
8561 Lift code enqueue signal. Call proceed_one_lwp instead of
8562 linux_resume_one_lwp.
8563
8564 2016-07-21 Yao Qi <yao.qi@linaro.org>
8565
8566 * linux-low.c (linux_resume_one_thread): Call
8567 enqueue_pending_signal.
8568
8569 2016-07-21 Yao Qi <yao.qi@linaro.org>
8570
8571 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
8572 * inferiors.c (do_restore_current_thread_cleanup): New function.
8573 (make_cleanup_restore_current_thread): Likewise.
8574 * linux-low.c (install_software_single_step_breakpoints): Call
8575 make_cleanup_restore_current_thread. Switch current_thread to
8576 thread.
8577
8578 2016-07-21 Yao Qi <yao.qi@linaro.org>
8579
8580 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
8581 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
8582 (clone_one_breakpoint): Likewise.
8583 (delete_reinsert_breakpoints): Change parameter to thread.
8584 Callers updated.
8585 (has_reinsert_breakpoints): Likewise.
8586 (uninsert_reinsert_breakpoints): Likewise.
8587 (reinsert_reinsert_breakpoints): Likewise.
8588 * mem-break.h (set_reinsert_breakpoint): Update declaration.
8589 (delete_reinsert_breakpoints): Likewise.
8590 (reinsert_reinsert_breakpoints): Likewise.
8591 (uninsert_reinsert_breakpoints): Likewise.
8592 (has_reinsert_breakpoints): Likewise.
8593
8594 2016-07-21 Yao Qi <yao.qi@linaro.org>
8595
8596 * inferiors.c (get_thread_process): Make parameter const.
8597 * inferiors.h (get_thread_process): Update declaration.
8598 * mem-break.c (clone_all_breakpoints): Remove all parameters.
8599 Add new parameters child_thread and parent_thread. Callers
8600 updated.
8601 * mem-break.h (clone_all_breakpoints): Update declaration.
8602
8603 2016-07-21 Yao Qi <yao.qi@linaro.org>
8604
8605 * mem-break.c (struct breakpoint) <cond_list>: Remove.
8606 <command_list, handler>: Remove.
8607 (struct gdb_breakpoint): New.
8608 (struct other_breakpoint): New.
8609 (struct reinsert_breakpoint): New.
8610 (is_gdb_breakpoint): New function.
8611 (any_persistent_commands): Update command_list if
8612 is_gdb_breakpoint returns true.
8613 (set_breakpoint): Create breakpoints according to their types.
8614 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
8615 (set_gdb_breakpoint_1): Likewise.
8616 (set_gdb_breakpoint): Likewise.
8617 (clear_breakpoint_conditions): Change parameter type to
8618 'struct gdb_breakpoint *'.
8619 (clear_breakpoint_commands): Likewise.
8620 (clear_breakpoint_conditions_and_commands): Likewise.
8621 (add_condition_to_breakpoint): Likewise.
8622 (add_breakpoint_condition): Likewise.
8623 (add_commands_to_breakpoint): Likewise.
8624 (check_breakpoints): Check other_breakpoint.
8625 (clone_one_breakpoint): Clone breakpopint according to its type.
8626 * mem-break.h (struct gdb_breakpoint): Declare.
8627 (set_gdb_breakpoint): Update declaration.
8628 (clear_breakpoint_conditions_and_commands): Likewise.
8629 (add_breakpoint_condition): Likewise.
8630 (add_breakpoint_commands): Likewise.
8631 * server.c (process_point_options): Change parameter type to
8632 'struct gdb_breakpoint *'.
8633
8634 2016-07-21 Yao Qi <yao.qi@linaro.org>
8635
8636 * mem-break.c (set_breakpoint_at): Rename it to ...
8637 (set_breakpoint_type_at): ... it.
8638 (set_breakpoint_at): Call set_breakpoint_type_at.
8639 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
8640 * mem-break.h (set_breakpoint_at): Update comments.
8641
8642 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
8643
8644 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
8645 to buf parameter.
8646 (nios2_store_gregset): Likewise.
8647
8648 2016-07-01 Pedro Alves <palves@redhat.com>
8649 Antoine Tremblay <antoine.tremblay@ericsson.com>
8650
8651 * linux-low.c: Change interface to take the target lwp_info
8652 pointer directly and return void. Handle detaching from a zombie
8653 thread.
8654 (linux_detach_lwp_callback): New function.
8655 (linux_detach): Detach from the leader thread after detaching from
8656 the clone threads.
8657
8658 2016-06-28 Yao Qi <yao.qi@linaro.org>
8659
8660 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
8661 for variable new_offset.
8662 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
8663 (aarch64_ftrace_insn_reloc_cb): Likewise.
8664 (aarch64_ftrace_insn_reloc_tb): Likewise.
8665 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
8666 PRIx64 instead of PRIx32.
8667
8668 2016-06-28 Yao Qi <yao.qi@linaro.org>
8669
8670 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
8671 (the_low_target): Install arm_get_syscall_trapinfo.
8672
8673 2016-06-28 Yao Qi <yao.qi@linaro.org>
8674
8675 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
8676 function.
8677 (the_low_target): Install aarch64_get_syscall_trapinfo.
8678
8679 2016-06-28 Yao Qi <yao.qi@linaro.org>
8680
8681 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
8682 Callers updated.
8683 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
8684 Remove parameter sysno.
8685 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
8686 sysret.
8687
8688 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
8689
8690 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
8691 (s390_emit_ne_goto): Likewise.
8692 (s390_emit_lt_goto): Likewise.
8693 (s390_emit_le_goto): Likewise.
8694 (s390_emit_gt_goto): Likewise.
8695 (s390_emit_ge_goto): Likewise.
8696 (s390x_emit_eq_goto): Likewise.
8697 (s390x_emit_ne_goto): Likewise.
8698 (s390x_emit_lt_goto): Likewise.
8699 (s390x_emit_le_goto): Likewise.
8700 (s390x_emit_gt_goto): Likewise.
8701 (s390x_emit_ge_goto): Likewise.
8702 (s390_emit_ops_impl): Mark variable static.
8703 (s390x_emit_ops): Likewise.
8704
8705 2016-06-17 Yao Qi <yao.qi@linaro.org>
8706
8707 * linux-low.c (handle_extended_wait): Call
8708 uninsert_reinsert_breakpoints for the parent process. Remove
8709 reinsert breakpoints from the child process. Reinsert them to
8710 the parent process when vfork is done.
8711 * mem-break.c (uninsert_reinsert_breakpoints): New function.
8712 (reinsert_reinsert_breakpoints): New function.
8713 * mem-break.h (uninsert_reinsert_breakpoints): Declare
8714 (reinsert_reinsert_breakpoints): Declare.
8715
8716 2016-06-17 Yao Qi <yao.qi@linaro.org>
8717
8718 * linux-low.c (handle_extended_wait): If the parent is doing
8719 step-over, remove the reinsert breakpoints from the forked child.
8720
8721 2016-06-17 Yao Qi <yao.qi@linaro.org>
8722
8723 * linux-low.c (unsuspend_all_lwps): Declare.
8724 (linux_low_filter_event): If thread exited, call finish_step_over.
8725 If step-over is finished, unsuspend other threads.
8726
8727 2016-06-17 Yao Qi <yao.qi@linaro.org>
8728
8729 * linux-low.c (linux_resume_one_lwp_throw): Assert
8730 has_reinsert_breakpoints returns false.
8731 * mem-break.c (delete_disabled_breakpoints): Assert
8732 bp type isn't reinsert_breakpoint.
8733
8734 2016-06-17 Yao Qi <yao.qi@linaro.org>
8735
8736 * linux-low.c (maybe_hw_step): New function.
8737 (linux_resume_one_lwp_throw): Call maybe_hw_step.
8738 (finish_step_over): Switch current_thread to lwp temporarily,
8739 and assert has_reinsert_breakpoints returns true.
8740 (proceed_one_lwp): Call maybe_hw_step.
8741 * mem-break.c (has_reinsert_breakpoints): New function.
8742 * mem-break.h (has_reinsert_breakpoints): Declare.
8743
8744 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
8745
8746 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
8747
8748 2016-05-17 Yao Qi <yao.qi@linaro.org>
8749
8750 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
8751 instead of find_inferior.
8752
8753 2016-05-05 Yao Qi <yao.qi@linaro.org>
8754
8755 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
8756 Initialize res to zero.
8757
8758 2016-05-05 Yao Qi <yao.qi@linaro.org>
8759
8760 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
8761 to uint32_t.
8762
8763 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
8764
8765 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
8766 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
8767 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
8768
8769 2016-04-28 Par Olsson <par.olsson@windriver.com>
8770 Simon Marchi <simon.marchi@ericsson.com>
8771
8772 * tracepoint.c (write_inferior_int8): New function.
8773 (cmd_qtenable_disable): Write enable flag using
8774 write_inferior_int8.
8775
8776 2016-04-25 Yao Qi <yao.qi@linaro.org>
8777
8778 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
8779 (need_step_over_p): Return zero if the LWP has pending signals
8780 can be delivered on software single step target.
8781
8782 2016-04-25 Yao Qi <yao.qi@linaro.org>
8783
8784 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
8785 return instead of error.
8786
8787 2016-04-22 Yao Qi <yao.qi@linaro.org>
8788
8789 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
8790 to 23.
8791
8792 2016-04-22 Yao Qi <yao.qi@linaro.org>
8793
8794 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
8795 signal when stepping over breakpoint with software single
8796 step.
8797
8798 2016-04-21 Pedro Alves <palves@redhat.com>
8799
8800 * linux-s390-low.c (s390_collect_ptrace_register)
8801 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
8802 add casts.
8803 (s390_check_regset): Use void * instead of gdb_byte *.
8804
8805 2016-04-20 Pedro Alves <palves@redhat.com>
8806
8807 * configure: Renegerate.
8808
8809 2016-04-20 Yao Qi <yao.qi@linaro.org>
8810
8811 * linux-aarch32-low.c: Include "arch/arm-linux.h".
8812 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
8813 number 16.
8814 (arm_store_gregset): Likewise.
8815
8816 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
8817
8818 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
8819 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
8820 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
8821 (amd64-avx-mpx-linux.c): New rules.
8822 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
8823 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
8824 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
8825 (srv_amd64_regobj): Add amd64-avx-mpx.o.
8826 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
8827 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
8828 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
8829 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
8830 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
8831 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
8832 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
8833 * linux-x86-low.c (x86_linux_read_description): Add case for
8834 X86_XSTATE_AVX_MPX_MASK.
8835 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
8836 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
8837 init_registers_i386_avx_mpx_linux.
8838 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
8839 (initialize_low_tracepoint): Call
8840 init_registers_i386_avx_mpx_linux.
8841 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
8842 (initialize_low_tracepoint): Call
8843 init_registers_amd64_avx_mpx_linux.
8844 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
8845 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
8846 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
8847 declarations.
8848
8849 2016-04-18 Pedro Alves <palves@redhat.com>
8850
8851 * configure: Regenerate.
8852
8853 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
8854
8855 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
8856 (aarch64_emit_sub): Likewise.
8857
8858 2016-04-12 Pedro Alves <palves@redhat.com>
8859
8860 * utils.c (prepare_to_throw_exception): Delete.
8861
8862 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
8863
8864 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
8865
8866 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
8867
8868 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
8869
8870 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
8871
8872 * linux-aarch64-ipa.c: Add <elf.h> include.
8873 * linux-ppc-ipa.c: Add <elf.h> include.
8874 * linux-s390-ipa.c: Add <elf.h> include.
8875
8876 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
8877
8878 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
8879 (get_raw_reg_ptr): Likewise.
8880 (get_trace_state_variable_value_ptr): Likewise.
8881 (set_trace_state_variable_value_ptr): Likewise.
8882 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
8883 char *.
8884
8885 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
8886 Marcin Kościelnicki <koriakin@0x04.net>
8887
8888 PR/17221
8889 * linux-ppc-low.c (emit_insns): New function.
8890 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
8891 (ppc_emit_prologue): New function.
8892 (ppc_emit_epilogue): New function.
8893 (ppc_emit_add): New function.
8894 (ppc_emit_sub): New function.
8895 (ppc_emit_mul): New function.
8896 (ppc_emit_lsh): New function.
8897 (ppc_emit_rsh_signed): New function.
8898 (ppc_emit_rsh_unsigned): New function.
8899 (ppc_emit_ext): New function.
8900 (ppc_emit_zero_ext): New function.
8901 (ppc_emit_log_not): New function.
8902 (ppc_emit_bit_and): New function.
8903 (ppc_emit_bit_or): New function.
8904 (ppc_emit_bit_xor): New function.
8905 (ppc_emit_bit_not): New function.
8906 (ppc_emit_equal): New function.
8907 (ppc_emit_less_signed): New function.
8908 (ppc_emit_less_unsigned): New function.
8909 (ppc_emit_ref): New function.
8910 (ppc_emit_const): New function.
8911 (ppc_emit_reg): New function.
8912 (ppc_emit_pop): New function.
8913 (ppc_emit_stack_flush): New function.
8914 (ppc_emit_swap): New function.
8915 (ppc_emit_stack_adjust): New function.
8916 (ppc_emit_call): New function.
8917 (ppc_emit_int_call_1): New function.
8918 (ppc_emit_void_call_2): New function.
8919 (ppc_emit_if_goto): New function.
8920 (ppc_emit_goto): New function.
8921 (ppc_emit_eq_goto): New function.
8922 (ppc_emit_ne_goto): New function.
8923 (ppc_emit_lt_goto): New function.
8924 (ppc_emit_le_goto): New function.
8925 (ppc_emit_gt_goto): New function.
8926 (ppc_emit_ge_goto): New function.
8927 (ppc_write_goto_address): New function.
8928 (ppc_emit_ops_impl): New static variable.
8929 (ppc64v1_emit_prologue): New function.
8930 (ppc64v2_emit_prologue): New function.
8931 (ppc64_emit_epilogue): New function.
8932 (ppc64_emit_add): New function.
8933 (ppc64_emit_sub): New function.
8934 (ppc64_emit_mul): New function.
8935 (ppc64_emit_lsh): New function.
8936 (ppc64_emit_rsh_signed): New function.
8937 (ppc64_emit_rsh_unsigned): New function.
8938 (ppc64_emit_ext): New function.
8939 (ppc64_emit_zero_ext): New function.
8940 (ppc64_emit_log_not): New function.
8941 (ppc64_emit_bit_and): New function.
8942 (ppc64_emit_bit_or): New function.
8943 (ppc64_emit_bit_xor): New function.
8944 (ppc64_emit_bit_not): New function.
8945 (ppc64_emit_equal): New function.
8946 (ppc64_emit_less_signed): New function.
8947 (ppc64_emit_less_unsigned): New function.
8948 (ppc64_emit_ref): New function.
8949 (ppc64_emit_const): New function.
8950 (ppc64v1_emit_reg): New function.
8951 (ppc64v2_emit_reg): New function.
8952 (ppc64_emit_pop): New function.
8953 (ppc64_emit_stack_flush): New function.
8954 (ppc64_emit_swap): New function.
8955 (ppc64v1_emit_call): New function.
8956 (ppc64v2_emit_call): New function.
8957 (ppc64v1_emit_int_call_1): New function.
8958 (ppc64v2_emit_int_call_1): New function.
8959 (ppc64v1_emit_void_call_2): New function.
8960 (ppc64v2_emit_void_call_2): New function.
8961 (ppc64_emit_if_goto): New function.
8962 (ppc64_emit_eq_goto): New function.
8963 (ppc64_emit_ne_goto): New function.
8964 (ppc64_emit_lt_goto): New function.
8965 (ppc64_emit_le_goto): New function.
8966 (ppc64_emit_gt_goto): New function.
8967 (ppc64_emit_ge_goto): New function.
8968 (ppc64v1_emit_ops_impl): New static variable.
8969 (ppc64v2_emit_ops_impl): New static variable.
8970 (ppc_emit_ops): New function.
8971 (linux_low_target): Wire in ppc_emit_ops.
8972
8973 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
8974 Marcin Kościelnicki <koriakin@0x04.net>
8975
8976 PR/17221
8977 * Makefile.in: Add powerpc-*-ipa.o
8978 * configure.srv: Add ipa_obj for powerpc*-linux.
8979 * linux-ppc-ipa.c: New file.
8980 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
8981 includes.
8982 (PPC_FIELD): New macro.
8983 (PPC_SEXT): New macro.
8984 (PPC_OP6): New macro.
8985 (PPC_BO): New macro.
8986 (PPC_LI): New macro.
8987 (PPC_BD): New macro.
8988 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
8989 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
8990 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
8991 (ppc_get_thread_area): New function.
8992 (is_elfv2_inferior): New function.
8993 (gen_ds_form): New function.
8994 (GEN_STD): New macro.
8995 (GEN_STDU): New macro.
8996 (GEN_LD): New macro.
8997 (GEN_LDU): New macro.
8998 (gen_d_form): New function.
8999 (GEN_ADDI): New macro.
9000 (GEN_ADDIS): New macro.
9001 (GEN_LI): New macro.
9002 (GEN_LIS): New macro.
9003 (GEN_ORI): New macro.
9004 (GEN_ORIS): New macro.
9005 (GEN_LWZ): New macro.
9006 (GEN_STW): New macro.
9007 (GEN_STWU): New macro.
9008 (gen_xfx_form): New function.
9009 (GEN_MFSPR): New macro.
9010 (GEN_MTSPR): New macro.
9011 (GEN_MFCR): New macro.
9012 (GEN_MTCR): New macro.
9013 (GEN_SYNC): New macro.
9014 (GEN_LWSYNC): New macro.
9015 (gen_x_form): New function.
9016 (GEN_OR): New macro.
9017 (GEN_MR): New macro.
9018 (GEN_LWARX): New macro.
9019 (GEN_STWCX): New macro.
9020 (GEN_CMPW): New macro.
9021 (gen_md_form): New function.
9022 (GEN_RLDICL): New macro.
9023 (GEN_RLDICR): New macro.
9024 (gen_i_form): New function.
9025 (GEN_B): New macro.
9026 (GEN_BL): New macro.
9027 (gen_b_form): New function.
9028 (GEN_BNE): New macro.
9029 (GEN_LOAD): New macro.
9030 (GEN_STORE): New macro.
9031 (gen_limm): New function.
9032 (gen_atomic_xchg): New function.
9033 (gen_call): New function.
9034 (ppc_relocate_instruction): New function.
9035 (ppc_install_fast_tracepoint_jump_pad): New function.
9036 (ppc_get_min_fast_tracepoint_insn_len): New function.
9037 (ppc_get_ipa_tdesc_idx): New function.
9038 (the_low_target): Wire in the new functions.
9039 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
9040 tdescs.
9041 * linux-ppc-tdesc.h: New file.
9042
9043 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
9044
9045 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
9046 (alloc_jump_pad_buffer): New function.
9047 * linux-amd64-ipa.c: Add <sys/mman.h> include.
9048 (alloc_jump_pad_buffer): New function.
9049 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
9050 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
9051 (alloc_jump_pad_buffer): New function.
9052 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
9053 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
9054 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
9055 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
9056
9057 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
9058
9059 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
9060 * linux-amd64-ipa.c: Likewise.
9061 * linux-i386-ipa.c: Likewise.
9062 * linux-s390-ipa.c: Likewise.
9063 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
9064 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
9065 set_trace_state_variable_value_ptr.
9066 (struct ipa_sym_addresses): Likewise.
9067 (symbol_list): Likewise.
9068 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
9069 accessing gdb_collect directly.
9070 (gdb_collect_ptr_type): New typedef.
9071 (get_raw_reg_ptr_type): New typedef.
9072 (get_trace_state_variable_value_ptr_type): New typedef.
9073 (set_trace_state_variable_value_ptr_type): New typedef.
9074 (gdb_collect_ptr): New global.
9075 (get_raw_reg_ptr): New global.
9076 (get_trace_state_variable_value_ptr): New global.
9077 (set_trace_state_variable_value_ptr): New global.
9078 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
9079 accessing get_raw_reg directly.
9080 (get_get_tsv_func_addr): Likewise for
9081 get_trace_state_variable_value_ptr.
9082 (get_set_tsv_func_addr): Likewise for
9083 set_trace_state_variable_value_ptr.
9084 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
9085
9086 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
9087
9088 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
9089
9090 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
9091
9092 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
9093 packets.
9094 (relocate_instruction): Remove own_buf.
9095 * server.c (own_buf): Make global.
9096 (handle_v_requests): Make global.
9097 * server.h (own_buf): New declaration.
9098 (handle_v_requests): New prototype.
9099
9100 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
9101
9102 PR 18377
9103 * linux-s390-low.c (add_insns): New function.
9104 (s390_emit_prologue): New function.
9105 (s390_emit_epilogue): New function.
9106 (s390_emit_add): New function.
9107 (s390_emit_sub): New function.
9108 (s390_emit_mul): New function.
9109 (s390_emit_lsh): New function.
9110 (s390_emit_rsh_signed): New function.
9111 (s390_emit_rsh_unsigned): New function.
9112 (s390_emit_ext): New function.
9113 (s390_emit_log_not): New function.
9114 (s390_emit_bit_and): New function.
9115 (s390_emit_bit_or): New function.
9116 (s390_emit_bit_xor): New function.
9117 (s390_emit_bit_not): New function.
9118 (s390_emit_equal): New function.
9119 (s390_emit_less_signed): New function.
9120 (s390_emit_less_unsigned): New function.
9121 (s390_emit_ref): New function.
9122 (s390_emit_if_goto): New function.
9123 (s390_emit_goto): New function.
9124 (s390_write_goto_address): New function.
9125 (s390_emit_litpool): New function.
9126 (s390_emit_const): New function.
9127 (s390_emit_call): New function.
9128 (s390_emit_reg): New function.
9129 (s390_emit_pop): New function.
9130 (s390_emit_stack_flush): New function.
9131 (s390_emit_zero_ext): New function.
9132 (s390_emit_swap): New function.
9133 (s390_emit_stack_adjust): New function.
9134 (s390_emit_set_r2): New function.
9135 (s390_emit_int_call_1): New function.
9136 (s390_emit_void_call_2): New function.
9137 (s390_emit_eq_goto): New function.
9138 (s390_emit_ne_goto): New function.
9139 (s390_emit_lt_goto): New function.
9140 (s390_emit_le_goto): New function.
9141 (s390_emit_gt_goto): New function.
9142 (s390_emit_ge_goto): New function.
9143 (s390x_emit_prologue): New function.
9144 (s390x_emit_epilogue): New function.
9145 (s390x_emit_add): New function.
9146 (s390x_emit_sub): New function.
9147 (s390x_emit_mul): New function.
9148 (s390x_emit_lsh): New function.
9149 (s390x_emit_rsh_signed): New function.
9150 (s390x_emit_rsh_unsigned): New function.
9151 (s390x_emit_ext): New function.
9152 (s390x_emit_log_not): New function.
9153 (s390x_emit_bit_and): New function.
9154 (s390x_emit_bit_or): New function.
9155 (s390x_emit_bit_xor): New function.
9156 (s390x_emit_bit_not): New function.
9157 (s390x_emit_equal): New function.
9158 (s390x_emit_less_signed): New function.
9159 (s390x_emit_less_unsigned): New function.
9160 (s390x_emit_ref): New function.
9161 (s390x_emit_if_goto): New function.
9162 (s390x_emit_const): New function.
9163 (s390x_emit_call): New function.
9164 (s390x_emit_reg): New function.
9165 (s390x_emit_pop): New function.
9166 (s390x_emit_stack_flush): New function.
9167 (s390x_emit_zero_ext): New function.
9168 (s390x_emit_swap): New function.
9169 (s390x_emit_stack_adjust): New function.
9170 (s390x_emit_int_call_1): New function.
9171 (s390x_emit_void_call_2): New function.
9172 (s390x_emit_eq_goto): New function.
9173 (s390x_emit_ne_goto): New function.
9174 (s390x_emit_lt_goto): New function.
9175 (s390x_emit_le_goto): New function.
9176 (s390x_emit_gt_goto): New function.
9177 (s390x_emit_ge_goto): New function.
9178 (s390_emit_ops): New function.
9179 (struct linux_target_ops): Fill in emit_ops hook.
9180
9181 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
9182
9183 PR 18377
9184 * Makefile.in: Add s390 IPA files.
9185 * configure.srv: Build IPA for s390.
9186 * linux-s390-ipa.c: New file.
9187 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
9188 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
9189 (tdesc_s390_linux32): Likewise.
9190 (init_registers_s390_linux32v1): Likewise.
9191 (tdesc_s390_linux32v1): Likewise.
9192 (init_registers_s390_linux32v2): Likewise.
9193 (tdesc_s390_linux32v2): Likewise.
9194 (init_registers_s390_linux64): Likewise.
9195 (tdesc_s390_linux64): Likewise.
9196 (init_registers_s390_linux64v1): Likewise.
9197 (tdesc_s390_linux64v1): Likewise.
9198 (init_registers_s390_linux64v2): Likewise.
9199 (tdesc_s390_linux64v2): Likewise.
9200 (init_registers_s390_te_linux64): Likewise.
9201 (tdesc_s390_te_linux64): Likewise.
9202 (init_registers_s390_vx_linux64): Likewise.
9203 (tdesc_s390_vx_linux64): Likewise.
9204 (init_registers_s390_tevx_linux64): Likewise.
9205 (tdesc_s390_tevx_linux64): Likewise.
9206 (init_registers_s390x_linux64): Likewise.
9207 (tdesc_s390x_linux64): Likewise.
9208 (init_registers_s390x_linux64v1): Likewise.
9209 (tdesc_s390x_linux64v1): Likewise.
9210 (init_registers_s390x_linux64v2): Likewise.
9211 (tdesc_s390x_linux64v2): Likewise.
9212 (init_registers_s390x_te_linux64): Likewise.
9213 (tdesc_s390x_te_linux64): Likewise.
9214 (init_registers_s390x_vx_linux64): Likewise.
9215 (tdesc_s390x_vx_linux64): Likewise.
9216 (init_registers_s390x_tevx_linux64): Likewise.
9217 (tdesc_s390x_tevx_linux64): Likewise.
9218 (have_hwcap_s390_vx): New static variable.
9219 (s390_arch_setup): Fill have_hwcap_s390_vx.
9220 (s390_get_thread_area): New function.
9221 (s390_ft_entry_gpr_esa): New const.
9222 (s390_ft_entry_gpr_zarch): New const.
9223 (s390_ft_entry_misc): New const.
9224 (s390_ft_entry_fr): New const.
9225 (s390_ft_entry_vr): New const.
9226 (s390_ft_main_31): New const.
9227 (s390_ft_main_64): New const.
9228 (s390_ft_exit_fr): New const.
9229 (s390_ft_exit_vr): New const.
9230 (s390_ft_exit_misc): New const.
9231 (s390_ft_exit_gpr_esa): New const.
9232 (s390_ft_exit_gpr_zarch): New const.
9233 (append_insns): New function.
9234 (s390_relocate_instruction): New function.
9235 (s390_install_fast_tracepoint_jump_pad): New function.
9236 (s390_get_min_fast_tracepoint_insn_len): New function.
9237 (s390_get_ipa_tdesc_idx): New function.
9238 (struct linux_target_ops): Wire in the above functions.
9239 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
9240 * linux-s390-tdesc.h: New file.
9241
9242 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
9243
9244 * linux-s390-low.c (s390_supports_tracepoints): New function.
9245 (struct linux_target_ops): Fill supports_tracepoints hook.
9246
9247 2016-03-18 Yao Qi <yao.qi@linaro.org>
9248
9249 * linux-low.c (lwp_signal_can_be_delivered): New function.
9250 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
9251
9252 2016-03-18 Yao Qi <yao.qi@linaro.org>
9253
9254 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
9255 0 if signal is enqueued. Remove 'signal' from one debugging
9256 message. Move one debugging message to some lines below.
9257 Remove code setting 'signal' to 0.
9258
9259 2016-03-18 Yao Qi <yao.qi@linaro.org>
9260
9261 * linux-low.c (linux_low_filter_event): Remove redundant
9262 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
9263
9264 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
9265
9266 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
9267 (struct linux_target_ops): Wire in the above.
9268
9269 2016-03-03 Yao Qi <yao.qi@linaro.org>
9270
9271 * linux-low.c: Update comments to start_step_over.
9272
9273 2016-03-03 Yao Qi <yao.qi@linaro.org>
9274
9275 PR server/19736
9276 * linux-low.c (handle_extended_wait): Set child suspended
9277 if event_lwp->bp_reinsert isn't zero.
9278
9279 2016-03-02 Yao Qi <yao.qi@linaro.org>
9280
9281 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
9282 enqueue_pending_signal.
9283
9284 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
9285
9286 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
9287 is actually loaded.
9288
9289 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
9290
9291 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
9292 (s390_regmap_3264) [!__s390x__]: New global.
9293 (s390_collect_ptrace_register): Skip map entries containing -1.
9294 (s390_supply_ptrace_register): Ditto.
9295 (s390_fill_gprs_high): New function.
9296 (s390_store_gprs_high): New function.
9297 (s390_regsets): Add NT_S390_HIGH_GPRS.
9298 (s390_get_hwcap): Enable on 31-bit.
9299 (have_hwcap_s390_high_gprs): Enable on 31-bit.
9300 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
9301 Detect NT_S390_HIGH_GPRS.
9302 (s390_usrregs_info_3264): Enable on 31-bit.
9303 (s390_regs_info): Enable regs_info_3264 on 31-bit.
9304 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
9305
9306 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
9307
9308 PR gdb/13808
9309 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
9310 * configure.srv: Ditto.
9311 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
9312 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
9313 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
9314 (init_registers_amd64_linux): Remove prototype.
9315 (tdesc_amd64_linux): Remove declaration.
9316 (get_ipa_tdesc): New function.
9317 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
9318 initialize remaining tdescs.
9319 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
9320 (init_registers_i386_linux): Remove prototype.
9321 (tdesc_i386_linux): Remove declaration.
9322 (get_ipa_tdesc): New function.
9323 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
9324 initialize remaining tdescs.
9325 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
9326 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
9327 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
9328 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
9329 (x86_get_ipa_tdesc_idx): New function.
9330 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
9331 * linux-x86-tdesc.h: New file.
9332 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
9333 (target_get_ipa_tdesc_idx): New macro.
9334 * tracepoint.c (ipa_tdesc_idx): New macro.
9335 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
9336 (symbol_list): Add ipa_tdesc_idx.
9337 (cmd_qtstart): Write ipa_tdesc_idx in the target.
9338 (ipa_tdesc): Remove.
9339 (ipa_tdesc_idx): New variable.
9340 (get_context_regcache): Use get_ipa_tdesc.
9341 (gdb_collect): Ditto.
9342 (gdb_probe): Ditto.
9343 * tracepoint.h (get_ipa_tdesc): New prototype.
9344 (ipa_tdesc): Remove.
9345
9346 2016-02-24 Pedro Alves <palves@redhat.com>
9347
9348 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
9349 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
9350 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
9351 Factor out common code between the USE_SIGTRAP_SIGINFO and
9352 !USE_SIGTRAP_SIGINFO blocks.
9353 (linux_low_filter_event): Call save_stop_reason instead of
9354 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
9355 Update comments.
9356 (linux_wait_1): Update comments.
9357
9358 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
9359
9360 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
9361 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
9362 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
9363 ppc_insert_point, ppc_remove_point.
9364
9365 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
9366
9367 * linux-s390-low.c (s390_supports_z_point_type): New function.
9368 (struct linux_target_ops): Wire s390_supports_z_point_type in.
9369
9370 2016-02-16 Yao Qi <yao.qi@linaro.org>
9371
9372 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
9373 PC. Get pc from regcache_read_pc.
9374
9375 2016-02-12 Yao Qi <yao.qi@linaro.org>
9376
9377 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
9378 or linux_get_pc_32bit.
9379 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
9380
9381 2016-02-12 Yao Qi <yao.qi@linaro.org>
9382
9383 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
9384 arm_linux_get_next_pcs_fixup.
9385
9386 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
9387
9388 * tracepoint.c (x_tracepoint_action_download): Change
9389 write_inferior_data_ptr to write_inferior_data_pointer.
9390 (cmd_qtstart): Likewise.
9391 (write_inferior_data_ptr): Remove.
9392 (download_agent_expr): Change write_inferior_data_ptr to
9393 write_inferior_data_pointer.
9394 (download_tracepoint_1): Likewise.
9395 (download_tracepoint): Likewise.
9396 (download_trace_state_variables): Likewise.
9397
9398 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
9399 Marcin Kościelnicki <koriakin@0x04.net>
9400
9401 * tracepoint.c (struct tracepoint_action_ops): Remove.
9402 (struct tracepoint_action): Remove ops.
9403 (m_tracepoint_action_download, r_tracepoint_action_download)
9404 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
9405 size and offset accordingly.
9406 (m_tracepoint_action_ops, r_tracepoint_action_ops)
9407 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
9408 (tracepoint_action_send, tracepoint_action_download): New functions.
9409 Helpers for trace action handlers.
9410 (add_tracepoint_action): Remove setup actions ops.
9411 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
9412
9413 2016-02-10 Yao Qi <yao.qi@linaro.org>
9414
9415 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
9416
9417 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
9418
9419 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
9420 to AC_OUTPUT.
9421 * configure: Regenerate.
9422
9423 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
9424
9425 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
9426 void * to gdb_byte *.
9427 * linux-low.c (siginfo_fixup): Likewise.
9428 (linux_xfer_siginfo): Likewise.
9429 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
9430 Likewise.
9431 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9432
9433 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
9434
9435 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
9436 to srv_tgtobj.
9437 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
9438 to srv_tgtobj.
9439 * linux-x86-low.c [__x86_64__]: Include
9440 "nat/amd64-linux-siginfo.h".
9441 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
9442 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
9443 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
9444 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
9445 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
9446 (cpt_si_fd, si_timerid, si_overrun): Move from
9447 nat/amd64-linux-siginfo.c.
9448 * Makefile.in (amd64-linux-siginfo.o:): New rule.
9449
9450 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
9451
9452 * server.c (skip_to_semicolon): Remove.
9453 (process_point_options): Use strchrnul instead of
9454 skip_to_semicolon.
9455
9456 2016-01-26 Yao Qi <yao.qi@linaro.org>
9457
9458 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
9459 * linux-low.c (install_software_single_step_breakpoints): Don't
9460 call regcache_read_pc.
9461 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
9462 argument pc.
9463
9464 2016-01-26 Yao Qi <yao.qi@linaro.org>
9465
9466 * linux-low.c (install_software_single_step_breakpoints): Call
9467 regcache_read_pc instead of get_pc.
9468
9469 2016-01-26 Yao Qi <yao.qi@linaro.org>
9470
9471 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
9472 (unblock_async_io): Rename to ...
9473 (block_unblock_async_io): ... it. New function.
9474 (enable_async_io): Don't install SIGIO handler. Unblock it
9475 instead.
9476 (disable_async_io): Don't ignore SIGIO. Block it instead.
9477 (initialize_async_io): Install SIGIO handler. Don't call
9478 unblock_async_io.
9479
9480 2016-01-26 Yao Qi <yao.qi@linaro.org>
9481
9482 * remote-utils.c (getpkt): If the buffer isn't empty, and the
9483 first character is '\003', call *the_target->request_interrupt.
9484
9485 2016-01-25 Yao Qi <yao.qi@linaro.org>
9486
9487 * remote-utils.c (new_thread_notify): Remove.
9488 (dead_thread_notify): Likewise.
9489 * remote-utils.h (new_thread_notify): Remove declaration.
9490 (dead_thread_notify): Likewise.
9491
9492 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
9493
9494 * gdb.trace/pending.exp: Fix expected message on continue.
9495
9496 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
9497
9498 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
9499 it works properly on big-endian machines where sizeof (CORE_ADDR)
9500 != sizeof (void *).
9501
9502 2016-01-21 Pedro Alves <palves@redhat.com>
9503
9504 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
9505 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
9506 * configure: Regenerate.
9507
9508 2016-01-21 Yao Qi <yao.qi@linaro.org>
9509
9510 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
9511 is_thumb and set it according to CPSR saved on the stack.
9512 (get_next_pcs_syscall_next_pc): Pass is_thumb to
9513 arm_sigreturn_next_pc.
9514
9515 2016-01-18 Yao Qi <yao.qi@linaro.org>
9516
9517 * linux-low.c (linux_set_pc_64bit): New function.
9518 (linux_get_pc_64bit): New function.
9519 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
9520 Declare.
9521 * linux-sparc-low.c (debug_threads): Remove declaration.
9522 (sparc_get_pc): Remove.
9523 (the_low_target): Use linux_get_pc_64bit instead of
9524 sparc_get_pc.
9525 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
9526 (the_low_target): Use linux_get_pc_64bit and
9527 linux_set_pc_64bit.
9528
9529 2016-01-18 Yao Qi <yao.qi@linaro.org>
9530
9531 * linux-arm-low.c (debug_threads): Remove declaration.
9532 (arm_get_pc, arm_set_pc): Remove.
9533 (the_low_target): Use linux_get_pc_32bit and
9534 linux_set_pc_32bit.
9535 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
9536 (the_low_target): Use linux_get_pc_32bit and
9537 linux_set_pc_32bit.
9538 * linux-cris-low.c (debug_threads): Remove declaration.
9539 (cris_get_pc, cris_set_pc,): Remove.
9540 (the_low_target): Use linux_get_pc_32bit and
9541 linux_set_pc_32bit.
9542 * linux-crisv32-low.c (debug_threads): Remove declaration.
9543 (cris_get_pc, cris_set_pc): Remove.
9544 (the_low_target): Use linux_get_pc_32bit and
9545 linux_set_pc_32bit.
9546 * linux-low.c: Include inttypes.h.
9547 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
9548 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
9549 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
9550 (the_low_target): Use linux_get_pc_32bit and
9551 linux_set_pc_32bit.
9552 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
9553 (the_low_target): Use linux_get_pc_32bit and
9554 linux_set_pc_32bit.
9555 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
9556 (the_low_target): Use linux_get_pc_32bit and
9557 linux_set_pc_32bit.
9558 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
9559 (the_low_target): Use linux_get_pc_32bit and
9560 linux_set_pc_32bit.
9561 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
9562 (the_low_target): Use linux_get_pc_32bit and
9563 linux_set_pc_32bit.
9564
9565 2016-01-18 Gary Benson <gbenson@redhat.com>
9566
9567 * configure.ac (AC_FUNC_FORK): New check.
9568 * config.in: Regenerate.
9569 * configure: Likewise.
9570
9571 2016-01-14 Yao Qi <yao.qi@linaro.org>
9572
9573 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
9574 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
9575 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
9576 arm_get_next_pcs_ctor.
9577
9578 2016-01-12 Josh Stone <jistone@redhat.com>
9579 Philippe Waroquiers <philippe.waroquiers@skynet.be>
9580
9581 * inferiors.h: Include "gdb_vecs.h".
9582 (struct process_info): Add syscalls_to_catch.
9583 * inferiors.c (remove_process): Free syscalls_to_catch.
9584 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
9585 syscall_return stops.
9586 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
9587 * server.c (handle_general_set): Handle QCatchSyscalls.
9588 (handle_query): Report support for QCatchSyscalls.
9589 * target.h (struct target_ops): Add supports_catch_syscall.
9590 (target_supports_catch_syscall): New macro.
9591 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
9592 (struct lwp_info): Add syscall_state.
9593 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
9594 Maintain syscall_state and syscalls_to_catch across exec.
9595 (get_syscall_trapinfo): New function, proxy to the_low_target.
9596 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
9597 (linux_low_filter_event): Toggle syscall_state entry/return for
9598 syscall traps, and set it ignored for all others.
9599 (gdb_catching_syscalls_p): New function.
9600 (gdb_catch_this_syscall_p): New function.
9601 (linux_wait_1): Handle SYSCALL_SIGTRAP.
9602 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
9603 (linux_supports_catch_syscall): New function.
9604 (linux_target_ops): Install it.
9605 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
9606 (the_low_target): Install it.
9607
9608 2016-01-12 Mike Frysinger <vapier@gentoo.org>
9609
9610 * acinclude.m4: Include new ../warning.m4 file.
9611 * configure: Regenerated.
9612 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
9613
9614 2016-01-12 Mike Frysinger <vapier@gentoo.org>
9615
9616 * ax.c (is_goto_target): Mark static.
9617 * linux-low.c (register_addr): Likewise.
9618 (linux_fetch_registers, linux_store_registers): Likewise.
9619 * mem-break.c (any_persistent_commands): Fix old prototype.
9620 (add_commands_to_breakpoint): Mark static.
9621 * regcache.c (find_register_by_name): Delete unused func.
9622 * remote-utils.c (hex_or_minus_one): Mark static.
9623 * server.c (monitor_show_help): Mark static.
9624 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
9625 handle_v_requests): Likewise.
9626
9627 2016-01-12 Pedro Alves <palves@redhat.com>
9628
9629 Remove use of the registered trademark symbol throughout.
9630
9631 2016-01-08 Yao Qi <yao.qi@linaro.org>
9632
9633 * remote-utils.c (getpkt): If c is '\003', call target hook
9634 request_interrupt.
9635
9636 2016-01-06 Yao Qi <yao.qi@linaro.org>
9637
9638 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
9639 linux-aarch32-low.c.
9640 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9641 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
9642 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
9643 (thumb2_breakpoint): Declare.
9644 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
9645 linux-aarch32-low.h.
9646 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9647 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
9648 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
9649
9650 2016-01-01 Joel Brobecker <brobecker@adacore.com>
9651
9652 * gdbreplay.c (gdbreplay_version): Change copyright year in
9653 version message.
9654 * server.c (gdbserver_version): Likewise.
9655
9656 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
9657
9658 * server.c (crc32_table): Delete.
9659 (crc32): Use libiberty's xcrc32 function.
9660
9661 2015-12-22 Joel Brobecker <brobecker@adacore.com>
9662
9663 * lynx-low.c (lynx_delete_thread_callback): New function.
9664 (lynx_mourn): Properly delete our process and all of its
9665 threads. Remove call to clear_inferiors.
9666
9667 2015-12-22 Joel Brobecker <brobecker@adacore.com>
9668
9669 * target.c (thread_search_callback): Add check that
9670 the thread_stopped target callback is not NULL before
9671 calling it.
9672
9673 2015-12-21 Yao Qi <yao.qi@linaro.org>
9674
9675 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
9676 arm breakpoint.
9677
9678 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9679
9680 * server.c (handle_query): Call target_supports_software_single_step.
9681
9682 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9683
9684 * linux-low.c (single_step): New function.
9685 (linux_resume_one_lwp_throw): Call single_step.
9686 (start_step_over): Likewise.
9687
9688 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9689
9690 * Makefile.in (SFILES): Append arch/arm-linux.c,
9691 arch/arm-get-next-pcs.c.
9692 (arm-linux.o): New rule.
9693 (arm-get-next-pcs.o): New rule.
9694 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
9695 arm-linux.o.
9696 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
9697 to linux-aarch32-low.c.
9698 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9699 (arm_breakpoint_len, thumb_breakpoint): Likewise.
9700 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
9701 (thumb2_breakpoint_len): Likewise.
9702 (arm_is_thumb_mode): Make non-static.
9703 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
9704 from linux-aarch32-low.c.
9705 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9706 (arm_breakpoint_len, thumb_breakpoint): Likewise.
9707 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
9708 (thumb2_breakpoint_len): Likewise.
9709 (arm_is_thumb_mode): New declaration.
9710 * linux-arm-low.c: Include arch/arm-linux.h
9711 aarch/arm-get-next-pcs.h, sys/syscall.h.
9712 (get_next_pcs_ops): New struct.
9713 (get_next_pcs_addr_bits_remove): New function.
9714 (get_next_pcs_is_thumb): New function.
9715 (get_next_pcs_read_memory_unsigned_integer): Likewise.
9716 (arm_sigreturn_next_pc): Likewise.
9717 (get_next_pcs_syscall_next_pc): Likewise.
9718 (arm_gdbserver_get_next_pcs): Likewise.
9719 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
9720 Initialize.
9721 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
9722 * server.h: Include gdb_vecs.h.
9723
9724 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9725
9726 * Makefile.in (SFILES): Append common/common-regcache.c.
9727 (OBS): Append common-regcache.o.
9728 (common-regcache.o): New rule.
9729 * regcache.c (init_register_cache): Initialize cache to
9730 REG_UNAVAILABLE.
9731 (regcache_raw_read_unsigned): New function.
9732 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
9733 register_status enum.
9734
9735 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9736
9737 * linux-aarch64-low.c (the_low_targets): Rename
9738 breakpoint_reinsert_addr to get_next_pcs.
9739 * linux-arm-low.c (the_low_targets): Likewise.
9740 * linux-bfin-low.c (the_low_targets): Likewise.
9741 * linux-cris-low.c (the_low_targets): Likewise.
9742 * linux-crisv32-low.c (the_low_targets): Likewise.
9743 * linux-low.c (can_software_single_step): Likewise.
9744 (install_software_single_step_breakpoints): New function.
9745 (start_step_over): Use install_software_single_step_breakpoints.
9746 * linux-low.h: New CORE_ADDR vector.
9747 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
9748 get_next_pcs.
9749 * linux-mips-low.c (the_low_targets): Likewise.
9750 * linux-nios2-low.c (the_low_targets): Likewise.
9751 * linux-sparc-low.c (the_low_targets): Likewise.
9752
9753 2015-12-17 Pedro Alves <palves@redhat.com>
9754
9755 * linux-low.c (linux_kill_one_lwp): Remove references to
9756 LinuxThreads.
9757 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
9758 to 'kill'.
9759 (linux_init_signals): Delete.
9760 (initialize_low): Adjust.
9761 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
9762
9763 2015-12-16 Pedro Alves <palves@redhat.com>
9764
9765 * configure.ac (compiler warning flags): When testing a
9766 -Wno-foo option, check whether -Wfoo works instead.
9767 * configure: Regenerate.
9768
9769 2015-12-11 Don Breazeal <donb@codesourcery.com>
9770
9771 * server.c (process_serial_event): Don't exit from gdbserver
9772 in remote mode if there are still active inferiors.
9773
9774 2015-12-11 Yao Qi <yao.qi@linaro.org>
9775
9776 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
9777 arm_breakpoint_at if the process is 32-bit.
9778
9779 2015-12-11 Yao Qi <yao.qi@linaro.org>
9780
9781 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
9782 arm breakpoint.
9783
9784 2015-12-07 Yao Qi <yao.qi@linaro.org>
9785
9786 * configure.srv: Append arm.o to srv_tgtobj for
9787 aarch64*-*-linux* target.
9788 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
9789 from linux-arm-low.c.
9790 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9791 (arm_breakpoint_len, thumb_breakpoint): Likewise.
9792 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
9793 (thumb2_breakpoint_len): Likewise.
9794 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
9795 (arm_breakpoint_kinds): Likewise.
9796 (arm_breakpoint_kind_from_pc): Likewise.
9797 (arm_sw_breakpoint_from_kind): Likewise.
9798 (arm_breakpoint_kind_from_current_state): Likewise.
9799 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
9800 (arm_sw_breakpoint_from_kind): Declare.
9801 (arm_breakpoint_kind_from_current_state): Declare.
9802 (arm_breakpoint_at): Declare.
9803 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
9804 arm_sw_breakpoint_from_kind if process is 32-bit.
9805 (aarch64_breakpoint_kind_from_pc): New function.
9806 (aarch64_breakpoint_kind_from_current_state): New function.
9807 (the_low_target): Initialize fields breakpoint_kind_from_pc
9808 and breakpoint_kind_from_current_state.
9809 * linux-arm-low.c (arm_breakpoint_kinds): Move to
9810 linux-aarch32-low.c.
9811 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
9812 (arm_breakpoint, arm_breakpoint_len): Likewise.
9813 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
9814 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
9815 (arm_is_thumb_mode): Likewise.
9816 (arm_breakpoint_at): Likewise.
9817 (arm_breakpoint_kind_from_pc): Likewise.
9818 (arm_sw_breakpoint_from_kind): Likewise.
9819 (arm_breakpoint_kind_from_current_state): Likewise.
9820
9821 Revert:
9822 2015-08-04 Yao Qi <yao.qi@linaro.org>
9823
9824 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
9825 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
9826 * server.c (extended_protocol): Remove "static".
9827 * server.h (extended_protocol): Declare it.
9828
9829 2015-12-04 Josh Stone <jistone@redhat.com>
9830
9831 * target.h (struct target_ops) <arch_setup>: Rename to ...
9832 (struct target_ops) <post_create_inferior>: ... this.
9833 (target_arch_setup): Rename to ...
9834 (target_post_create_inferior): ... this, calling post_create_inferior.
9835 * server.c (start_inferior): Update target_arch_setup calls to
9836 target_post_create_inferior.
9837 * linux-low.c (linux_low_ptrace_options): Forward declare.
9838 (linux_arch_setup): Update its comment for general use.
9839 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
9840 (struct linux_target_ops): Use linux_post_create_inferior.
9841 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
9842 to post_create_inferior.
9843 * nto-low.c (struct nto_target_ops): Likewise.
9844 * spu-low.c (struct spu_target_ops): Likewise.
9845 * win32-low.c (struct win32_target_ops): Likewise.
9846
9847 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
9848
9849 * linux-arm-low.c: Remove duplicate arch/arm.h include.
9850
9851 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9852
9853 * linux-arm-low.c (arm_reinsert_addr): Remove function.
9854 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
9855 * linux-cris-low.c (cris_reinsert_addr> Remove function.
9856 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9857 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
9858 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9859 * linux-mips-low.c (mips_reinsert_addr): Remove function.
9860 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9861 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
9862 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9863 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
9864 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9865
9866 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9867
9868 * linux-low.c (linux_look_up_symbols): Don't call
9869 linux_supports_traceclone.
9870 * linux-low.h (thread_db_init): Remove use_events argument.
9871 * thread-db.c (thread_db_use_event): Remove global variable.
9872 (struct thread_db) <td_thr_event_enable_p>: Remove field.
9873 (struct thread_db) <td_create_bp>: Remove field.
9874 (thread_db_create_event): Remove function.
9875 (thread_db_enable_reporting): Likewise.
9876 (find_one_thread): Don't check for thread_db_use_events.
9877 (attach_thread): Likewise.
9878 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
9879 (try_thread_db_load_1): Don't check for thread_db_use_events.
9880 (thread_db_init): Remove use_events argument and thread events
9881 handling.
9882 (remove_thread_event_breakpoints): Remove function.
9883 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
9884
9885 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9886
9887 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
9888 New function.
9889 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9890 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
9891 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9892 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
9893 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
9894 Initialize.
9895 * linux-crisv32-low.c (cris_supports_hardware_single_step):
9896 New function.
9897 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9898 * linux-low.c (can_hardware_single_step): Use
9899 supports_hardware_single_step.
9900 (can_software_single_step): New function.
9901 (start_step_over): Call can_software_single_step.
9902 (linux_supports_hardware_single_step): New function.
9903 (struct target_ops) <supports_software_single_step>: Initialize.
9904 * linux-low.h (struct linux_target_ops)
9905 <supports_hardware_single_step>: Initialize.
9906 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
9907 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9908 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
9909 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
9910 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
9911 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9912 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
9913 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9914 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
9915 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
9916 Initialize.
9917 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
9918 (struct linux_target_ops) <tile_supports_hardware_single_step>:
9919 Initialize.
9920 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
9921 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9922 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
9923 New function.
9924 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9925 * target.h (struct target_ops): <supports_software_single_step>:
9926 New field.
9927 (target_supports_software_single_step): New macro.
9928
9929 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9930
9931 * linux-low.c (linux_wait_1): Fix pc advance condition.
9932 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
9933 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
9934
9935 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9936
9937 * linux-arm-low.c (arm_is_thumb_mode): New function.
9938 (arm_breakpoint_at): Use arm_is_thumb_mode.
9939 (arm_breakpoint_kind_from_current_state): New function.
9940 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
9941 Initialize.
9942 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
9943 (linux_breakpoint_kind_from_current_state): New function.
9944 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
9945 * linux-low.h (struct linux_target_ops)
9946 <breakpoint_kind_from_current_state>: New field.
9947 * target.h (struct target_ops): Likewise.
9948 (target_breakpoint_kind_from_current_state): New macro.
9949
9950 2015-11-30 Pedro Alves <palves@redhat.com>
9951
9952 * linux-low.c (linux_resume): Wake up the event loop before
9953 returning.
9954
9955 2015-11-30 Pedro Alves <palves@redhat.com>
9956
9957 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
9958 check.
9959 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
9960 to -1.
9961 * target.c (struct thread_search): New structure.
9962 (thread_search_callback): New function.
9963 (prev_general_thread): New global.
9964 (prepare_to_access_memory, done_accessing_memory): New functions.
9965 * target.h (prepare_to_access_memory, done_accessing_memory):
9966 Replace macros with function declarations.
9967
9968 2015-11-30 Pedro Alves <palves@redhat.com>
9969
9970 PR 14618
9971 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
9972 report TARGET_WAITKIND_NO_RESUMED.
9973 * remote-utils.c (prepare_resume_reply): Handle
9974 TARGET_WAITKIND_NO_RESUMED.
9975 * server.c (report_no_resumed): New global.
9976 (handle_query) <qSupported>: Handle "no-resumed+". Report
9977 "no-resumed+" support.
9978 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
9979 return error if the client doesn't support no-resumed events.
9980 (push_stop_notification): New function.
9981 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
9982 events if the client supports them.
9983
9984 2015-11-30 Pedro Alves <palves@redhat.com>
9985
9986 * linux-low.c (thread_still_has_status_pending_p): Don't check
9987 vCont;t here.
9988 (lwp_resumed): New function.
9989 (status_pending_p_callback): Return early if the LWP is not
9990 supposed to be resumed.
9991
9992 2015-11-30 Pedro Alves <palves@redhat.com>
9993
9994 * linux-low.c (handle_extended_wait): Assert that the LWP's
9995 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
9996 thread create events, leave the new child's status pending.
9997 (linux_low_filter_event): If GDB wants to hear about thread exit
9998 events, leave the LWP marked dead and don't delete it.
9999 (linux_wait_for_event_filtered): Don't check for thread exit.
10000 (filter_exit_event): New function.
10001 (linux_wait_1): Use it, when returning an exit event.
10002 (linux_resume_one_lwp_throw): Assert that the LWP's
10003 waitstatus is TARGET_WAITKIND_IGNORE.
10004 * remote-utils.c (prepare_resume_reply): Handle
10005 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
10006 * server.c (report_thread_events): New global.
10007 (handle_general_set): Handle QThreadEvents.
10008 (handle_query) <qSupported>: Handle and report QThreadEvents+;
10009 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
10010 TARGET_WAITKIND_THREAD_EXITED.
10011 * server.h (report_thread_events): Declare.
10012
10013 2015-11-30 Pedro Alves <palves@redhat.com>
10014
10015 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
10016 the thread's last_resume_kind was resume_stop.
10017
10018 2015-11-30 Pedro Alves <palves@redhat.com>
10019
10020 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
10021 before returning.
10022
10023 2015-11-30 Pedro Alves <palves@redhat.com>
10024
10025 * server.c (handle_v_requests): Handle vCtrlC.
10026
10027 2015-11-30 Pedro Alves <palves@redhat.com>
10028
10029 * gdbthread.h (find_any_thread_of_pid): Declare.
10030 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
10031 functions.
10032 * server.c (handle_query): If current_thread is NULL, look for
10033 another thread of the selected process.
10034
10035 2015-11-26 Daniel Colascione <dancol@dancol.org>
10036 Simon Marchi <simon.marchi@ericsson.com>
10037
10038 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
10039 * server.c (handle_qxfer_threads_worker): Refactor to include thread
10040 name in reply.
10041 * target.h (struct target_ops) <thread_name>: New field.
10042 (target_thread_name): New macro.
10043
10044 2015-11-23 Joel Brobecker <brobecker@adacore.com>
10045
10046 * regcache.h (regcache_invalidate_pid): Add declaration.
10047 * regcache.c (regcache_invalidate_pid): New function, extracted
10048 from regcache_invalidate.
10049 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
10050 Add trivial documentation comment.
10051 * lynx-low.c: Use regcache_invalidate_pid instead of
10052 regcache_invalidate.
10053
10054 2015-11-23 Joel Brobecker <brobecker@adacore.com>
10055
10056 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
10057 and Elf64_auxv_t if the target is Android.
10058
10059 2015-11-22 Doug Evans <xdje42@gmail.com>
10060
10061 * target.h: #include <sys/types.h>.
10062
10063 2015-11-19 Pedro Alves <palves@redhat.com>
10064
10065 * linux-low.c (linux_process_qsupported): Change prototype.
10066 Adjust.
10067 * linux-low.h (struct linux_target_ops) <process_qsupported>:
10068 Change prototype.
10069 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
10070 and adjust to loop over all features.
10071 * server.c (handle_query) <qSupported>: Adjust to call
10072 target_process_qsupported once, passing it a vector of unprocessed
10073 features.
10074 * target.h (struct target_ops) <process_qsupported>: Change
10075 prototype.
10076 (target_process_qsupported): Adjust.
10077
10078 2015-11-19 Pedro Alves <palves@redhat.com>
10079
10080 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
10081 mode.
10082 * configure: Regenerate.
10083
10084 2015-11-19 Pedro Alves <palves@redhat.com>
10085
10086 * configure: Regenerate.
10087
10088 2015-11-19 Yao Qi <yao.qi@linaro.org>
10089
10090 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
10091 type to uint32_t.
10092
10093 2015-11-19 Yao Qi <yao.qi@linaro.org>
10094
10095 * linux-aarch64-low.c (enum aarch64_operand_type): New.
10096 (struct aarch64_operand): Move enum out.
10097
10098 2015-11-19 Yao Qi <yao.qi@linaro.org>
10099
10100 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
10101 struct user_fpsimd_state *.
10102 (aarch64_store_fpregset): Likewise.
10103
10104 2015-11-19 Yao Qi <yao.qi@linaro.org>
10105
10106 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
10107 struct user_pt_regs *.
10108 (aarch64_store_gregset): Likewise.
10109
10110 2015-11-18 Pedro Alves <palves@redhat.com>
10111
10112 * Makefile.in (all_object_files): Add $IPA_OBJS.
10113
10114 2015-11-17 Pedro Alves <palves@redhat.com>
10115
10116 * win32-low.c (win32_resume): Use gdb_signal_from_host,
10117 GDB_SIGNAL_0 and gdb_signal_to_string.
10118
10119 2015-11-17 Pedro Alves <palves@redhat.com>
10120
10121 * win32-low.c (handle_output_debug_string): Remove parameter.
10122 (win32_kill): Remove our_status local and adjust call to
10123 handle_output_debug_string.
10124 (get_child_debug_event): Adjust call to
10125 handle_output_debug_string.
10126
10127 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
10128
10129 * linux-mips-low.c (mips_fill_gregset): Add cast.
10130 (mips_store_gregset): Likewise.
10131 (mips_fill_fpregset): Likewise.
10132 (mips_store_fpregset): Likewise.
10133
10134 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
10135
10136 * linux-mips-low.c (mips_add_watchpoint): Rename private to
10137 priv.
10138
10139 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
10140
10141 * linux-mips-low.c (mips_linux_new_thread): Change type of
10142 watch_type to enum target_hw_bp_type.
10143
10144 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
10145
10146 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
10147 Change return type to arm_hwbp_type.
10148
10149 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
10150
10151 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
10152 (arm_store_gregset): Likewise.
10153 * linux-arm-low.c (arm_get_hwcap): Likewise.
10154 (arm_read_description): Likewise.
10155
10156 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
10157
10158 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
10159
10160 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
10161
10162 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
10163 (ppc_fill_vsxregset): Likewise.
10164 (ppc_store_vsxregset): Likewise.
10165 (ppc_fill_vrregset): Likewise.
10166 (ppc_store_vrregset): Likewise.
10167 (ppc_fill_evrregset): Likewise.
10168 (ppc_store_evrregset): Likewise.
10169
10170 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
10171
10172 * linux-ppc-low.c (ppc_usrregs_info): Remove
10173 forward-declaration.
10174 (ppc_arch_setup): Move lower in file.
10175
10176 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
10177
10178 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
10179 (ps_pdwrite): Likewise.
10180
10181 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
10182
10183 * linux-arm-low.c (arm_new_thread): Move pointer dereference
10184 to after assert checks.
10185
10186 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
10187
10188 * proc-service.c (ps_pdread): Add/adjust casts.
10189 (ps_pdwrite): Add/adjust casts.
10190
10191 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
10192
10193 * server.c (handle_search_memory_1): Cast return value of
10194 memmem.
10195
10196 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
10197
10198 * server.c (write_qxfer_response): Change type of data to
10199 gdb_byte *.
10200
10201 2015-10-29 Pedro Alves <palves@redhat.com>
10202
10203 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
10204
10205 2015-10-29 Pedro Alves <palves@redhat.com>
10206
10207 * tracepoint.c (clear_installed_tracepoints): Add casts.
10208
10209 2015-10-29 Pedro Alves <palves@redhat.com>
10210
10211 * server.c (handle_v_cont, process_serial_event): Add enum
10212 gdb_signal casts to signal parsing code.
10213
10214 2015-10-29 Pedro Alves <palves@redhat.com>
10215
10216 * linux-low.h (NULL_REGSET): Define.
10217 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
10218 * linux-arm-low.c (arm_regsets): Likewise.
10219 * linux-crisv32-low.c (cris_regsets): Likewise.
10220 * linux-m68k-low.c (m68k_regsets): Likewise.
10221 * linux-mips-low.c (mips_regsets): Likewise.
10222 * linux-nios2-low.c (nios2_regsets): Likewise.
10223 * linux-ppc-low.c (ppc_regsets): Likewise.
10224 * linux-s390-low.c (s390_regsets): Likewise.
10225 * linux-sh-low.c (sh_regsets): Likewise.
10226 * linux-sparc-low.c (sparc_regsets): Likewise.
10227 * linux-tic6x-low.c (tic6x_regsets): Likewise.
10228 * linux-tile-low.c (tile_regsets): Likewise.
10229 * linux-x86-low.c (x86_regsets): Likewise.
10230 * linux-xtensa-low.c (xtensa_regsets): Likewise.
10231
10232 2015-10-29 Pedro Alves <palves@redhat.com>
10233
10234 * linux-low.h (NULL_REGSET): Define.
10235 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
10236 * linux-arm-low.c (arm_regsets): Likewise.
10237 * linux-crisv32-low.c (cris_regsets): Likewise.
10238 * linux-m68k-low.c (m68k_regsets): Likewise.
10239 * linux-mips-low.c (mips_regsets): Likewise.
10240 * linux-nios2-low.c (nios2_regsets): Likewise.
10241 * linux-ppc-low.c (ppc_regsets): Likewise.
10242 * linux-s390-low.c (s390_regsets): Likewise.
10243 * linux-sh-low.c (sh_regsets): Likewise.
10244 * linux-sparc-low.c (sparc_regsets): Likewise.
10245 * linux-tic6x-low.c (tic6x_regsets): Likewise.
10246 * linux-tile-low.c (tile_regsets): Likewise.
10247 * linux-x86-low.c (x86_regsets): Likewise.
10248 * linux-xtensa-low.c (xtensa_regsets): Likewise.
10249
10250 2015-10-26 Doug Evans <dje@google.com>
10251
10252 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
10253
10254 2015-10-26 Doug Evans <dje@google.com>
10255
10256 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
10257
10258 2015-10-26 Doug Evans <dje@google.com>
10259
10260 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
10261 for debug_printf.
10262 (attach_thread, find_new_threads_callback): Ditto.
10263
10264 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
10265
10266 * mem-break.h (set_breakpoint_data): Remove.
10267
10268 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
10269
10270 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
10271 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
10272 (initialize_low): Remove set_breakpoint_data call.
10273 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
10274 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
10275 (initialize_low): Remove set_breakpoint_data call.
10276 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
10277 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
10278 (initialize_low): Remove set_breakpoint_data call.
10279
10280 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
10281
10282 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
10283 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
10284 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
10285 * target.h (target_breakpoint_kind_from_pc): New macro.
10286
10287 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
10288
10289 * linux-low.c (default_breakpoint_kind_from_pc): New function.
10290 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
10291 the default breakpoint kind.
10292
10293 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
10294
10295 * linux-arm-low.c (arm_supports_z_point_type): Add software
10296 breakpoint support.
10297
10298 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
10299
10300 * linux-arm-low.c: Refactor breakpoint definitions.
10301 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
10302 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
10303
10304 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
10305
10306 * Makefile.in: Add arm.c/o.
10307 * configure.srv: Likewise.
10308 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
10309 (arm_breakpoint_kind_from_pc): New function.
10310 (arm_sw_breakpoint_from_kind): Return proper kind.
10311 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
10312
10313 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
10314
10315 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
10316 removal.
10317 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
10318 (struct raw_breakpoint) <size>: Remove.
10319 (struct raw_breakpoint) <kind>: Add.
10320 (bp_size): New function.
10321 (bp_opcode): Likewise.
10322 (find_raw_breakpoint_at): Adjust for kind.
10323 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
10324 (remove_memory_breakpoint): Adjust for kind call bp_size.
10325 (set_raw_breakpoint_at): Adjust for kind.
10326 (set_breakpoint): Likewise.
10327 (set_breakpoint_at): Call breakpoint_kind_from_pc.
10328 (delete_raw_breakpoint): Adjust for kind.
10329 (delete_breakpoint): Likewise.
10330 (find_gdb_breakpoint): Likewise.
10331 (set_gdb_breakpoint_1): Likewise.
10332 (set_gdb_breakpoint): Likewise.
10333 (delete_gdb_breakpoint_1): Likewise.
10334 (delete_gdb_breakpoint): Likewise.
10335 (uninsert_raw_breakpoint): Likewise.
10336 (reinsert_raw_breakpoint): Likewise.
10337 (set_breakpoint_data): Remove.
10338 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
10339 (check_mem_read): Adjust for kind call bp_size.
10340 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
10341 (clone_one_breakpoint): Adjust for kind.
10342 * mem-break.h (set_gdb_breakpoint): Likewise.
10343 (delete_gdb_breakpoint): Likewise.
10344 * server.c (process_serial_event): Likewise.
10345
10346 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
10347
10348 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
10349 (struct linux_target_ops) <breakpoint>: Remove.
10350 (struct linux_target_ops) <breakpoint_len>: Remove.
10351 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10352 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10353 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
10354 (arm_sw_breakpoint_from_kind): New function.
10355 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
10356 (struct linux_target_ops) <breakpoint>: Remove.
10357 (struct linux_target_ops) <breakpoint_len>: Remove.
10358 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10359 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10360 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
10361 (struct linux_target_ops) <breakpoint>: Remove.
10362 (struct linux_target_ops) <breakpoint_len>: Remove.
10363 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10364 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10365 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
10366 (struct linux_target_ops) <breakpoint>: Remove.
10367 (struct linux_target_ops) <breakpoint_len>: Remove.
10368 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10369 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10370 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
10371 and sw_breakpoint_from_kind to increment the pc.
10372 (linux_breakpoint_kind_from_pc): New function.
10373 (linux_sw_breakpoint_from_kind): New function.
10374 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
10375 (initialize_low): Call breakpoint_kind_from_pc and
10376 sw_breakpoint_from_kind to replace breakpoint_data/len.
10377 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
10378 New field.
10379 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
10380 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
10381 (struct linux_target_ops) <breakpoint>: Remove.
10382 (struct linux_target_ops) <breakpoint_len>: Remove.
10383 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10384 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10385 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
10386 (struct linux_target_ops) <breakpoint>: Remove.
10387 (struct linux_target_ops) <breakpoint_len>: Remove.
10388 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10389 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10390 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
10391 (struct linux_target_ops) <breakpoint>: Remove.
10392 (struct linux_target_ops) <breakpoint_len>: Remove.
10393 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10394 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10395 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
10396 (struct linux_target_ops) <breakpoint>: Remove.
10397 (struct linux_target_ops) <breakpoint_len>: Remove.
10398 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10399 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10400 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
10401 (struct linux_target_ops) <breakpoint>: Remove.
10402 (struct linux_target_ops) <breakpoint_len>: Remove.
10403 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10404 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10405 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
10406 (struct linux_target_ops) <breakpoint>: Remove.
10407 (struct linux_target_ops) <breakpoint_len>: Remove.
10408 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10409 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10410 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
10411 (struct linux_target_ops) <breakpoint>: Remove.
10412 (struct linux_target_ops) <breakpoint_len>: Remove.
10413 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10414 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10415 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
10416 (struct linux_target_ops) <breakpoint>: Remove.
10417 (struct linux_target_ops) <breakpoint_len>: Remove.
10418 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10419 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10420 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
10421 (struct linux_target_ops) <breakpoint>: Remove.
10422 (struct linux_target_ops) <breakpoint_len>: Remove.
10423 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10424 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10425 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
10426 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
10427 (struct linux_target_ops) <breakpoint>: Remove.
10428 (struct linux_target_ops) <breakpoint_len>: Remove.
10429 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10430 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10431 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
10432 (struct linux_target_ops) <breakpoint>: Remove.
10433 (struct linux_target_ops) <breakpoint_len>: Remove.
10434 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10435 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10436
10437 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
10438
10439 * linux-cris-low.c (cris_get_pc): Remove void arg.
10440
10441 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
10442
10443 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
10444 variable name.
10445
10446 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
10447
10448 * inferiors.c (thread_pid_matches_callback): New function.
10449 (find_thread_process): New function.
10450 (remove_thread): Reset current_thread.
10451 (remove_process): Assert threads have been removed first.
10452
10453 2015-10-15 Yao Qi <yao.qi@linaro.org>
10454
10455 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
10456 if it is 3.
10457 (aarch64_remove_point): Likewise.
10458 * regcache.c (regcache_register_size): New function.
10459
10460 2015-10-12 Yao Qi <yao.qi@linaro.org>
10461
10462 * linux-aarch64-low.c: Update all callers as emit_load_store
10463 is renamed to aarch64_emit_load_store.
10464
10465 2015-10-12 Yao Qi <yao.qi@linaro.org>
10466
10467 * linux-aarch64-low.c: Update all callers of function renaming
10468 from emit_insn to aarch64_emit_insn.
10469
10470 2015-10-12 Yao Qi <yao.qi@linaro.org>
10471
10472 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
10473 arch/aarch64-insn.h.
10474 (struct aarch64_memory_operand): Likewise.
10475 (ENCODE): Likewise.
10476 (emit_insn): Move to arch/aarch64-insn.c.
10477 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
10478 (emit_load_store): Move to arch/aarch64-insn.c.
10479 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
10480 (can_encode_int32): Remove.
10481
10482 2015-10-12 Yao Qi <yao.qi@linaro.org>
10483
10484 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
10485 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
10486 (aarch64_relocate_instruction): Likewise.
10487 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
10488 (struct aarch64_insn_visitor): Likewise.
10489
10490 2015-10-12 Yao Qi <yao.qi@linaro.org>
10491
10492 * linux-aarch64-low.c (struct aarch64_insn_data): New.
10493 (struct aarch64_insn_visitor): New.
10494 (struct aarch64_insn_relocation_data): New.
10495 (aarch64_ftrace_insn_reloc_b): New function.
10496 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
10497 (aarch64_ftrace_insn_reloc_cb): Likewise.
10498 (aarch64_ftrace_insn_reloc_tb): Likewise.
10499 (aarch64_ftrace_insn_reloc_adr): Likewise.
10500 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
10501 (aarch64_ftrace_insn_reloc_others): Likewise.
10502 (visitor): New.
10503 (aarch64_relocate_instruction): Use visitor.
10504
10505 2015-10-12 Yao Qi <yao.qi@linaro.org>
10506
10507 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
10508 int. Add argument buf.
10509 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
10510 aarch64_relocate_instruction.
10511
10512 2015-10-12 Yao Qi <yao.qi@linaro.org>
10513
10514 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
10515 argument insn. Remove local variable insn. Don't call
10516 target_read_uint32.
10517 (aarch64_install_fast_tracepoint_jump_pad): Call
10518 target_read_uint32.
10519
10520 2015-09-30 Yao Qi <yao.qi@linaro.org>
10521
10522 * linux-aarch64-low.c (emit_movk): Shorten a long line.
10523 (emit_load_store_pair): Likewise.
10524
10525 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
10526
10527 * dll.c (match_dll): Add cast(s).
10528 (unloaded_dll): Likewise.
10529 * linux-low.c (second_thread_of_pid_p): Likewise.
10530 (delete_lwp_callback): Likewise.
10531 (count_events_callback): Likewise.
10532 (select_event_lwp_callback): Likewise.
10533 (linux_set_resume_request): Likewise.
10534 * server.c (accumulate_file_name_length): Likewise.
10535 (emit_dll_description): Likewise.
10536 (handle_qxfer_threads_worker): Likewise.
10537 (visit_actioned_threads): Likewise.
10538 * thread-db.c (any_thread_of): Likewise.
10539 * tracepoint.c (same_process_p): Likewise.
10540 (match_blocktype): Likewise.
10541 (build_traceframe_info_xml): Likewise.
10542
10543 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
10544
10545 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
10546 assignment.
10547 (gdb_unparse_agent_expr): Likewise.
10548 * hostio.c (require_data): Likewise.
10549 (handle_pread): Likewise.
10550 * linux-low.c (disable_regset): Likewise.
10551 (fetch_register): Likewise.
10552 (store_register): Likewise.
10553 (get_dynamic): Likewise.
10554 (linux_qxfer_libraries_svr4): Likewise.
10555 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
10556 (set_fast_tracepoint_jump): Likewise.
10557 (uninsert_fast_tracepoint_jumps_at): Likewise.
10558 (reinsert_fast_tracepoint_jumps_at): Likewise.
10559 (validate_inserted_breakpoint): Likewise.
10560 (clone_agent_expr): Likewise.
10561 * regcache.c (init_register_cache): Likewise.
10562 * remote-utils.c (putpkt_binary_1): Likewise.
10563 (decode_M_packet): Likewise.
10564 (decode_X_packet): Likewise.
10565 (look_up_one_symbol): Likewise.
10566 (relocate_instruction): Likewise.
10567 (monitor_output): Likewise.
10568 * server.c (handle_search_memory): Likewise.
10569 (handle_qxfer_exec_file): Likewise.
10570 (handle_qxfer_libraries): Likewise.
10571 (handle_qxfer): Likewise.
10572 (handle_query): Likewise.
10573 (handle_v_cont): Likewise.
10574 (handle_v_run): Likewise.
10575 (captured_main): Likewise.
10576 * target.c (write_inferior_memory): Likewise.
10577 * thread-db.c (try_thread_db_load_from_dir): Likewise.
10578 * tracepoint.c (init_trace_buffer): Likewise.
10579 (add_tracepoint_action): Likewise.
10580 (add_traceframe): Likewise.
10581 (add_traceframe_block): Likewise.
10582 (cmd_qtdpsrc): Likewise.
10583 (cmd_qtdv): Likewise.
10584 (cmd_qtstatus): Likewise.
10585 (response_source): Likewise.
10586 (response_tsv): Likewise.
10587 (cmd_qtnotes): Likewise.
10588 (gdb_collect): Likewise.
10589 (initialize_tracepoint): Likewise.
10590
10591 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
10592
10593 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
10594 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
10595 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
10596 <NOP>: New.
10597 (enum aarch64_condition_codes): New enum.
10598 (w0): New static global.
10599 (fp): Likewise.
10600 (lr): Likewise.
10601 (struct aarch64_memory_operand) <type>: New
10602 MEMORY_OPERAND_POSTINDEX type.
10603 (postindex_memory_operand): New helper function.
10604 (emit_ret): New function.
10605 (emit_load_store_pair): New function, factored out of emit_stp
10606 with support for MEMORY_OPERAND_POSTINDEX.
10607 (emit_stp): Rewrite using emit_load_store_pair.
10608 (emit_ldp): New function.
10609 (emit_load_store): Likewise.
10610 (emit_ldr): Mention post-index instruction in comment.
10611 (emit_ldrh): New function.
10612 (emit_ldrb): New function.
10613 (emit_ldrsw): Mention post-index instruction in comment.
10614 (emit_str): Likewise.
10615 (emit_subs): New function.
10616 (emit_cmp): Likewise.
10617 (emit_and): Likewise.
10618 (emit_orr): Likewise.
10619 (emit_orn): Likewise.
10620 (emit_eor): Likewise.
10621 (emit_mvn): Likewise.
10622 (emit_lslv): Likewise.
10623 (emit_lsrv): Likewise.
10624 (emit_asrv): Likewise.
10625 (emit_mul): Likewise.
10626 (emit_sbfm): Likewise.
10627 (emit_sbfx): Likewise.
10628 (emit_ubfm): Likewise.
10629 (emit_ubfx): Likewise.
10630 (emit_csinc): Likewise.
10631 (emit_cset): Likewise.
10632 (emit_nop): Likewise.
10633 (emit_ops_insns): New helper function.
10634 (emit_pop): Likewise.
10635 (emit_push): Likewise.
10636 (aarch64_emit_prologue): New function.
10637 (aarch64_emit_epilogue): Likewise.
10638 (aarch64_emit_add): Likewise.
10639 (aarch64_emit_sub): Likewise.
10640 (aarch64_emit_mul): Likewise.
10641 (aarch64_emit_lsh): Likewise.
10642 (aarch64_emit_rsh_signed): Likewise.
10643 (aarch64_emit_rsh_unsigned): Likewise.
10644 (aarch64_emit_ext): Likewise.
10645 (aarch64_emit_log_not): Likewise.
10646 (aarch64_emit_bit_and): Likewise.
10647 (aarch64_emit_bit_or): Likewise.
10648 (aarch64_emit_bit_xor): Likewise.
10649 (aarch64_emit_bit_not): Likewise.
10650 (aarch64_emit_equal): Likewise.
10651 (aarch64_emit_less_signed): Likewise.
10652 (aarch64_emit_less_unsigned): Likewise.
10653 (aarch64_emit_ref): Likewise.
10654 (aarch64_emit_if_goto): Likewise.
10655 (aarch64_emit_goto): Likewise.
10656 (aarch64_write_goto_address): Likewise.
10657 (aarch64_emit_const): Likewise.
10658 (aarch64_emit_call): Likewise.
10659 (aarch64_emit_reg): Likewise.
10660 (aarch64_emit_pop): Likewise.
10661 (aarch64_emit_stack_flush): Likewise.
10662 (aarch64_emit_zero_ext): Likewise.
10663 (aarch64_emit_swap): Likewise.
10664 (aarch64_emit_stack_adjust): Likewise.
10665 (aarch64_emit_int_call_1): Likewise.
10666 (aarch64_emit_void_call_2): Likewise.
10667 (aarch64_emit_eq_goto): Likewise.
10668 (aarch64_emit_ne_goto): Likewise.
10669 (aarch64_emit_lt_goto): Likewise.
10670 (aarch64_emit_le_goto): Likewise.
10671 (aarch64_emit_gt_goto): Likewise.
10672 (aarch64_emit_ge_got): Likewise.
10673 (aarch64_emit_ops_impl): New static global variable.
10674 (aarch64_emit_ops): New target function, return
10675 &aarch64_emit_ops_impl.
10676 (struct linux_target_ops): Install it.
10677
10678 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
10679
10680 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
10681 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
10682 aarch64-ipa.o.
10683 * linux-aarch64-ipa.c: New file.
10684 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
10685 and endian.h.
10686 (aarch64_get_thread_area): New target method.
10687 (extract_signed_bitfield): New helper function.
10688 (aarch64_decode_ldr_literal): New function.
10689 (enum aarch64_opcodes): New enum.
10690 (struct aarch64_register): New struct.
10691 (struct aarch64_operand): New struct.
10692 (x0): New static global.
10693 (x1): Likewise.
10694 (x2): Likewise.
10695 (x3): Likewise.
10696 (x4): Likewise.
10697 (w2): Likewise.
10698 (ip0): Likewise.
10699 (sp): Likewise.
10700 (xzr): Likewise.
10701 (aarch64_register): New helper function.
10702 (register_operand): Likewise.
10703 (immediate_operand): Likewise.
10704 (struct aarch64_memory_operand): New struct.
10705 (offset_memory_operand): New helper function.
10706 (preindex_memory_operand): Likewise.
10707 (enum aarch64_system_control_registers): New enum.
10708 (ENCODE): New macro.
10709 (emit_insn): New helper function.
10710 (emit_b): New function.
10711 (emit_bcond): Likewise.
10712 (emit_cb): Likewise.
10713 (emit_tb): Likewise.
10714 (emit_blr): Likewise.
10715 (emit_stp): Likewise.
10716 (emit_ldp_q_offset): Likewise.
10717 (emit_stp_q_offset): Likewise.
10718 (emit_load_store): Likewise.
10719 (emit_ldr): Likewise.
10720 (emit_ldrsw): Likewise.
10721 (emit_str): Likewise.
10722 (emit_ldaxr): Likewise.
10723 (emit_stxr): Likewise.
10724 (emit_stlr): Likewise.
10725 (emit_data_processing_reg): Likewise.
10726 (emit_data_processing): Likewise.
10727 (emit_add): Likewise.
10728 (emit_sub): Likewise.
10729 (emit_mov): Likewise.
10730 (emit_movk): Likewise.
10731 (emit_mov_addr): Likewise.
10732 (emit_mrs): Likewise.
10733 (emit_msr): Likewise.
10734 (emit_sevl): Likewise.
10735 (emit_wfe): Likewise.
10736 (append_insns): Likewise.
10737 (can_encode_int32_in): New helper function.
10738 (aarch64_relocate_instruction): New function.
10739 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
10740 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
10741 (struct linux_target_ops): Install aarch64_get_thread_area,
10742 aarch64_install_fast_tracepoint_jump_pad and
10743 aarch64_get_min_fast_tracepoint_insn_len.
10744
10745 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
10746
10747 * Makefile.in (aarch64-insn.o): New rule.
10748 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
10749
10750 2015-09-21 Yao Qi <yao.qi@linaro.org>
10751
10752 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
10753
10754 2015-09-21 Yao Qi <yao.qi@linaro.org>
10755
10756 * tracepoint.c (max_jump_pad_size): Remove.
10757
10758 2015-09-18 Yao Qi <yao.qi@linaro.org>
10759
10760 * linux-aarch64-low.c: Don't include sys/uio.h.
10761 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
10762
10763 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
10764
10765 * tracepoint.c (eval_result_type): Change prototype.
10766 (condition_true_at_tracepoint): Fix argument to compiled_cond.
10767
10768 2015-09-15 Pedro Alves <palves@redhat.com>
10769
10770 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
10771 Check whether to report exec events instead of checking whether
10772 multiprocess is enabled.
10773
10774 2015-09-15 Pedro Alves <palves@redhat.com>
10775
10776 PR remote/18965
10777 * remote-utils.c (prepare_resume_reply): Merge
10778 TARGET_WAITKIND_VFORK_DONE switch case with the
10779 TARGET_WAITKIND_FORKED case.
10780
10781 2015-09-15 Yao Qi <yao.qi@linaro.org>
10782
10783 * server.c (handle_query): Check string comparison using
10784 "else if" instead of "if".
10785
10786 2015-09-15 Yao Qi <yao.qi@linaro.org>
10787
10788 * server.c (vCont_supported): New global variable.
10789 (handle_query): Set vCont_supported to 1 if "vContSupported+"
10790 matches. Append ";vContSupported+" to own_buf.
10791 (handle_v_requests): Append ";s;S" to own_buf if target supports
10792 hardware single step or vCont_supported is false.
10793 (capture_main): Set vCont_supported to zero.
10794
10795 2015-09-15 Yao Qi <yao.qi@linaro.org>
10796
10797 * linux-low.c (linux_supports_conditional_breakpoints): Rename
10798 it to ...
10799 (linux_supports_hardware_single_step): ... New function.
10800 (linux_target_ops): Update.
10801 * lynx-low.c (lynx_target_ops): Set field
10802 supports_hardware_single_step to target_can_do_hardware_single_step.
10803 * nto-low.c (nto_target_ops): Likewise.
10804 * spu-low.c (spu_target_ops): Likewise.
10805 * win32-low.c (win32_target_ops): Likewise.
10806 * target.c (target_can_do_hardware_single_step): New function.
10807 * target.h (struct target_ops) <supports_conditional_breakpoints>:
10808 Remove. <supports_hardware_single_step>: New field.
10809 (target_supports_conditional_breakpoints): Remove.
10810 (target_supports_hardware_single_step): New macro.
10811 (target_can_do_hardware_single_step): Declare.
10812 * server.c (handle_query): Use target_supports_hardware_single_step
10813 instead of target_supports_conditional_breakpoints.
10814
10815 2015-09-15 Yao Qi <yao.qi@linaro.org>
10816
10817 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
10818 function.
10819 (struct linux_target_ops the_low_target): Install
10820 aarch64_linux_siginfo_fixup.
10821
10822 2015-09-11 Don Breazeal <donb@codesourcery.com>
10823 Luis Machado <lgustavo@codesourcery.com>
10824
10825 * linux-low.c (linux_mourn): Static declaration.
10826 (linux_arch_setup): Move in front of
10827 handle_extended_wait.
10828 (linux_arch_setup_thread): New function.
10829 (handle_extended_wait): Handle exec events. Call
10830 linux_arch_setup_thread. Make event_lwp argument a
10831 pointer-to-a-pointer.
10832 (check_zombie_leaders): Do not check stopped threads.
10833 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
10834 (linux_low_filter_event): Add lwp and thread for exec'ing
10835 non-leader thread if leader thread has been deleted.
10836 Refactor code into linux_arch_setup_thread and call it.
10837 Pass child lwp pointer by reference to handle_extended_wait.
10838 (linux_wait_for_event_filtered): Update comment.
10839 (linux_wait_1): Prevent clobbering exec event status.
10840 (linux_supports_exec_events): New function.
10841 (linux_target_ops) <supports_exec_events>: Initialize new member.
10842 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
10843 new member.
10844 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
10845 * server.c (report_exec_events): New global variable.
10846 (handle_query): Handle qSupported query for exec-events feature.
10847 (captured_main): Initialize report_exec_events.
10848 * server.h (report_exec_events): Declare new global variable.
10849 * target.h (struct target_ops) <supports_exec_events>: New
10850 member.
10851 (target_supports_exec_events): New macro.
10852 * win32-low.c (win32_target_ops) <supports_exec_events>:
10853 Initialize new member.
10854
10855 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
10856
10857 * linux-low.c (linux_low_enable_btrace): Remove.
10858 (linux_target_ops): Replace linux_low_enable_btrace with
10859 linux_enable_btrace.
10860
10861 2015-09-03 Yao Qi <yao.qi@linaro.org>
10862
10863 * linux-aarch64-low.c (aarch64_insert_point): Call
10864 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
10865 returns true.
10866
10867 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10868
10869 * linux-low.c (check_stopped_by_breakpoint): Use
10870 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
10871
10872 2015-08-27 Pedro Alves <palves@redhat.com>
10873
10874 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
10875
10876 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
10877
10878 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
10879 the XNEW-family equivalent.
10880 (compile_bytecodes): Likewise.
10881 * dll.c (loaded_dll): Likewise.
10882 * event-loop.c (append_callback_event): Likewise.
10883 (create_file_handler): Likewise.
10884 (create_file_event): Likewise.
10885 * hostio.c (handle_open): Likewise.
10886 * inferiors.c (add_thread): Likewise.
10887 (add_process): Likewise.
10888 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
10889 * linux-arm-low.c (arm_new_process): Likewise.
10890 (arm_new_thread): Likewise.
10891 * linux-low.c (add_to_pid_list): Likewise.
10892 (linux_add_process): Likewise.
10893 (handle_extended_wait): Likewise.
10894 (add_lwp): Likewise.
10895 (enqueue_one_deferred_signal): Likewise.
10896 (enqueue_pending_signal): Likewise.
10897 (linux_resume_one_lwp_throw): Likewise.
10898 (linux_resume_one_thread): Likewise.
10899 (linux_read_memory): Likewise.
10900 (linux_write_memory): Likewise.
10901 * linux-mips-low.c (mips_linux_new_process): Likewise.
10902 (mips_linux_new_thread): Likewise.
10903 (mips_add_watchpoint): Likewise.
10904 * linux-x86-low.c (initialize_low_arch): Likewise.
10905 * lynx-low.c (lynx_add_process): Likewise.
10906 * mem-break.c (set_raw_breakpoint_at): Likewise.
10907 (set_breakpoint): Likewise.
10908 (add_condition_to_breakpoint): Likewise.
10909 (add_commands_to_breakpoint): Likewise.
10910 (clone_agent_expr): Likewise.
10911 (clone_one_breakpoint): Likewise.
10912 * regcache.c (new_register_cache): Likewise.
10913 * remote-utils.c (look_up_one_symbol): Likewise.
10914 * server.c (queue_stop_reply): Likewise.
10915 (start_inferior): Likewise.
10916 (queue_stop_reply_callback): Likewise.
10917 (handle_target_event): Likewise.
10918 * spu-low.c (fetch_ppc_memory): Likewise.
10919 (store_ppc_memory): Likewise.
10920 * target.c (set_target_ops): Likewise.
10921 * thread-db.c (thread_db_load_search): Likewise.
10922 (try_thread_db_load_1): Likewise.
10923 * tracepoint.c (add_tracepoint): Likewise.
10924 (add_tracepoint_action): Likewise.
10925 (create_trace_state_variable): Likewise.
10926 (cmd_qtdpsrc): Likewise.
10927 (cmd_qtro): Likewise.
10928 (add_while_stepping_state): Likewise.
10929 * win32-low.c (child_add_thread): Likewise.
10930 (get_image_name): Likewise.
10931
10932 2015-08-25 Yao Qi <yao.qi@linaro.org>
10933
10934 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
10935
10936 2015-08-25 Yao Qi <yao.qi@linaro.org>
10937
10938 * Makefile.in (aarch64-linux.o): New rule.
10939 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
10940 srv_tgtobj.
10941 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
10942 (aarch64_init_debug_reg_state): Make it extern.
10943 (aarch64_linux_prepare_to_resume): Remove.
10944
10945 2015-08-25 Yao Qi <yao.qi@linaro.org>
10946
10947 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
10948 lwp_arch_private_info and ptid_of_lwp.
10949
10950 2015-08-25 Yao Qi <yao.qi@linaro.org>
10951
10952 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
10953 Find proc_info by find_process_pid. All callers updated.
10954
10955 2015-08-25 Yao Qi <yao.qi@linaro.org>
10956
10957 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
10958 Remove.
10959 (debug_reg_change_callback): Remove.
10960 (aarch64_notify_debug_reg_change): Remove.
10961
10962 2015-08-25 Yao Qi <yao.qi@linaro.org>
10963
10964 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
10965 Call current_lwp_ptid.
10966
10967 2015-08-25 Yao Qi <yao.qi@linaro.org>
10968
10969 * linux-aarch64-low.c (debug_reg_change_callback): Use
10970 debug_printf.
10971
10972 2015-08-25 Yao Qi <yao.qi@linaro.org>
10973
10974 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
10975
10976 2015-08-25 Yao Qi <yao.qi@linaro.org>
10977
10978 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
10979
10980 2015-08-25 Yao Qi <yao.qi@linaro.org>
10981
10982 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
10983 the code.
10984
10985 2015-08-25 Yao Qi <yao.qi@linaro.org>
10986
10987 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
10988 Remove.
10989 (debug_reg_change_callback): Remove argument entry and add argument
10990 lwp. Remove local variable thread. Don't print thread id in the
10991 debugging output. Don't check whether pid of thread equals to pid.
10992 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
10993 iterate_over_lwps instead find_inferior.
10994
10995 2015-08-24 Pedro Alves <palves@redhat.com>
10996
10997 * inferiors.c (get_first_process): New function.
10998 * inferiors.h (get_first_process): New declaration.
10999 * remote-utils.c (read_ptid): Default to the first process in the
11000 list, instead of to the current thread's process.
11001
11002 2015-08-24 Pedro Alves <palves@redhat.com>
11003
11004 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
11005 * event-loop.c: Likewise.
11006 * remote-utils.c: Likewise.
11007 * tracepoint.c: Likewise.
11008
11009 2015-08-24 Pedro Alves <palves@redhat.com>
11010
11011 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
11012 ptid_get_lwp.
11013
11014 2015-08-21 Pedro Alves <palves@redhat.com>
11015
11016 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
11017 instead of literal 1.
11018
11019 2015-08-21 Pedro Alves <palves@redhat.com>
11020
11021 * tdesc.c (default_description): Explicitly zero-initialize.
11022
11023 2015-08-21 Pedro Alves <palves@redhat.com>
11024
11025 PR gdb/18749
11026 * inferiors.c (remove_thread): Discard any pending stop reply for
11027 this thread.
11028 * server.c (remove_all_on_match_pid): Rename to ...
11029 (remove_all_on_match_ptid): ... this. Work with a filter ptid
11030 instead of a pid.
11031 (discard_queued_stop_replies): Change parameter to a ptid. Now
11032 extern.
11033 (handle_v_kill, kill_inferior_callback, captured_main)
11034 (process_serial_event): Adjust.
11035 * server.h (discard_queued_stop_replies): Declare.
11036
11037 2015-08-21 Pedro Alves <palves@redhat.com>
11038
11039 * linux-low.c (wait_for_sigstop): Always switch to no thread
11040 selected if the previously current thread dies.
11041 * lynx-low.c (lynx_request_interrupt): Use the first thread's
11042 process instead of the current thread's.
11043 * remote-utils.c (input_interrupt): Don't check if there's no
11044 current thread.
11045 * server.c (gdb_read_memory, gdb_write_memory): If setting the
11046 current thread to the general thread fails, error out.
11047 (handle_qxfer_auxv, handle_qxfer_libraries)
11048 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
11049 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
11050 (handle_query): Check if there's a thread selected instead of
11051 checking whether there's any thread in the thread list.
11052 (handle_qxfer_threads, handle_qxfer_btrace)
11053 (handle_qxfer_btrace_conf): Don't error out early if there's no
11054 thread in the thread list.
11055 (handle_v_cont, myresume): Don't set the current thread to the
11056 continue thread.
11057 (process_serial_event) <Hg handling>: Also set thread_id if the
11058 previous general thread is still alive.
11059 (process_serial_event) <g/G handling>: If setting the current
11060 thread to the general thread fails, error out.
11061 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
11062 thread's lwp instead of the current thread's.
11063 * target.c (set_desired_thread): If the desired thread was not
11064 found, leave the current thread pointing to NULL. Return an int
11065 (boolean) indicating success.
11066 * target.h (set_desired_thread): Change return type to int.
11067
11068 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
11069
11070 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
11071 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
11072 #includes.
11073 (ps_get_thread_area): New function.
11074
11075 2015-08-19 Gary Benson <gbenson@redhat.com>
11076
11077 * hostio.c (handle_pread): Do not attempt to read more data
11078 than hostio_reply_with_data can fit in a packet.
11079
11080 2015-08-18 Joel Brobecker <brobecker@adacore.com>
11081
11082 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
11083
11084 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
11085
11086 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
11087
11088 2015-08-06 Pedro Alves <palves@redhat.com>
11089
11090 * tracepoint.c (expr_eval_result): Now an int.
11091
11092 2015-08-06 Pedro Alves <palves@redhat.com>
11093
11094 * gdbthread.h (struct regcache): Forward declare.
11095 (struct thread_info) <regcache_data>: Now a struct regcache
11096 pointer.
11097 * inferiors.c (inferior_regcache_data)
11098 (set_inferior_regcache_data): Now work with struct regcache
11099 pointers.
11100 * inferiors.h (struct regcache): Forward declare.
11101 (inferior_regcache_data, set_inferior_regcache_data): Now work
11102 with struct regcache pointers.
11103 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
11104 (free_register_cache_thread): Remove struct regcache pointer
11105 casts.
11106
11107 2015-08-06 Pedro Alves <palves@redhat.com>
11108
11109 * server.c (captured_main): On error, print the exception message
11110 to stderr, and if run_once is set, throw a quit.
11111
11112 2015-08-06 Pedro Alves <palves@redhat.com>
11113
11114 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
11115 the current thread.
11116
11117 2015-08-06 Pedro Alves <palves@redhat.com>
11118
11119 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
11120 reading beyond the passed in buffer length.
11121
11122 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
11123
11124 * tracepoint.c (symbol_list) <required>: Remove.
11125
11126 2015-08-06 Pedro Alves <palves@redhat.com>
11127
11128 * linux-low.c (handle_extended_wait): Set the fork child's suspend
11129 count if stopping and suspending threads.
11130 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
11131 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
11132 (linux_detach): Complete an ongoing step-over.
11133 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
11134 throughout.
11135 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
11136 (linux_wait_1): If passing a signal to the inferior after
11137 finishing a step-over, unsuspend and re-resume all lwps. If we
11138 see a single-step event but the thread should be continuing, don't
11139 pass the trap to gdb.
11140 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
11141 internal_error instead of gdb_assert.
11142 (enqueue_pending_signal): New function.
11143 (check_ptrace_stopped_lwp_gone): Add debug output.
11144 (start_step_over): Use internal_error instead of gdb_assert.
11145 (complete_ongoing_step_over): New function.
11146 (linux_resume_one_thread): Don't resume a suspended thread.
11147 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
11148 it stepping.
11149
11150 2015-08-06 Pedro Alves <palves@redhat.com>
11151
11152 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
11153 (linux_thread_alive): Use lwp_is_marked_dead.
11154 (extended_event_reported): Delete.
11155 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
11156 instead of extended_event_reported.
11157 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
11158 as well.
11159 (lwp_is_marked_dead): New function.
11160 (lwp_running): Use lwp_is_marked_dead.
11161 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
11162 comment.
11163
11164 2015-08-06 Pedro Alves <palves@redhat.com>
11165
11166 * linux-low.c (linux_wait_1): Move fork event output out of the
11167 !report_to_gdb check. Pass event_child->waitstatus to
11168 target_waitstatus_to_string instead of ourstatus.
11169
11170 2015-08-04 Yao Qi <yao.qi@linaro.org>
11171
11172 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
11173 if current_thread is 32 bit.
11174
11175 2015-08-04 Yao Qi <yao.qi@linaro.org>
11176
11177 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
11178 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
11179 * server.c (extended_protocol): Remove "static".
11180 * server.h (extended_protocol): Declare it.
11181
11182 2015-08-04 Yao Qi <yao.qi@linaro.org>
11183
11184 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
11185 both aarch64 and aarch32.
11186 (aarch64_set_pc): Likewise.
11187
11188 2015-08-04 Yao Qi <yao.qi@linaro.org>
11189
11190 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
11191 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
11192 arm-with-neon.xml to srv_xmlfiles.
11193 * linux-aarch64-low.c: Include linux-aarch32-low.h.
11194 (is_64bit_tdesc): New function.
11195 (aarch64_linux_read_description): New function.
11196 (aarch64_arch_setup): Call aarch64_linux_read_description.
11197 (regs_info): Rename to regs_info_aarch64.
11198 (aarch64_regs_info): Return right regs_info.
11199 (initialize_low_arch): Call initialize_low_arch_aarch32.
11200
11201 2015-08-04 Yao Qi <yao.qi@linaro.org>
11202
11203 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
11204 * linux-aarch32-low.c: New file.
11205 * linux-aarch32-low.h: New file.
11206 * linux-arm-low.c (arm_fill_gregset): Move it to
11207 linux-aarch32-low.c.
11208 (arm_store_gregset): Likewise.
11209 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
11210 (arm_store_vfpregset): Call arm_store_vfpregset_num.
11211 (arm_arch_setup): Check if PTRACE_GETREGSET works.
11212 (regs_info): Rename to regs_info_arm.
11213 (arm_regs_info): Return regs_info_aarch32 if
11214 have_ptrace_getregset is 1 and target description is
11215 arm_with_neon or arm_with_vfpv3.
11216 (initialize_low_arch): Don't call init_registers_arm_with_neon.
11217 Call initialize_low_arch_aarch32 instead.
11218
11219 2015-08-04 Yao Qi <yao.qi@linaro.org>
11220
11221 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
11222 * linux-low.c: ... here.
11223 * linux-low.h (have_ptrace_getregset): Declare it.
11224
11225 2015-08-04 Pedro Alves <palves@redhat.com>
11226
11227 * thread-db.c (struct thread_db): Use new typedefs.
11228 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
11229 CHK calls.
11230 (disable_thread_event_reporting): Cast result of dlsym to
11231 destination function pointer type.
11232 (thread_db_mourn): Use td_ta_delete_ftype.
11233
11234 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
11235
11236 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
11237 arch variant.
11238 (CDX_BREAKPOINT): Define for R2.
11239 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
11240 (the_low_target): Add comments.
11241
11242 2015-07-30 Yao Qi <yao.qi@linaro.org>
11243
11244 * linux-arm-low.c (arm_hwcap): Remove it.
11245 (arm_read_description): New local variable arm_hwcap. Don't
11246 set arm_hwcap to zero.
11247
11248 2015-07-30 Yao Qi <yao.qi@linaro.org>
11249
11250 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
11251 Use regcache->tdesc instead.
11252 (arm_store_wmmxregset): Likewise.
11253 (arm_fill_vfpregset): Likewise.
11254 (arm_store_vfpregset): Likewise.
11255
11256 2015-07-30 Yao Qi <yao.qi@linaro.org>
11257
11258 * linux-arm-low.c: Include arch/arm.h.
11259 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
11260 (arm_store_gregset): Likewise.
11261
11262 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
11263
11264 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
11265 ptrace's 4th parameter.
11266
11267 2015-07-27 Yao Qi <yao.qi@linaro.org>
11268
11269 * configure.srv (case aarch64*-*-linux*): Don't set
11270 srv_linux_usrregs.
11271
11272 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
11273
11274 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
11275 sys/ptrace.h.
11276 * linux-arm-low.c: Likewise.
11277 * linux-cris-low.c: Likewise.
11278 * linux-crisv32-low.c: Likewise.
11279 * linux-low.c: Likewise.
11280 * linux-m68k-low.c: Likewise.
11281 * linux-mips-low.c: Likewise.
11282 * linux-nios2-low.c: Likewise.
11283 * linux-s390-low.c: Likewise.
11284 * linux-sparc-low.c: Likewise.
11285 * linux-tic6x-low.c: Likewise.
11286 * linux-tile-low.c: Likewise.
11287 * linux-x86-low.c: Likewise.
11288
11289 2015-07-24 Pedro Alves <palves@redhat.com>
11290
11291 * config.in: Regenerate.
11292 * configure: Regenerate.
11293
11294 2015-07-24 Pedro Alves <palves@redhat.com>
11295
11296 * acinclude.m4: Include ../ptrace.m4.
11297 * configure.ac: Call GDB_AC_PTRACE.
11298 * config.in, configure: Regenerate.
11299
11300 2015-07-24 Yao Qi <yao.qi@linaro.org>
11301
11302 * linux-low.c (linux_create_inferior): Remove setting to
11303 proc->priv->new_inferior.
11304 (linux_attach): Likewise.
11305 (linux_low_filter_event): Likewise.
11306 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
11307
11308 2015-07-24 Yao Qi <yao.qi@linaro.org>
11309
11310 * linux-low.c (linux_arch_setup): New function.
11311 (linux_low_filter_event): If proc->tdesc is NULL and
11312 proc->attached is true, call the_low_target.arch_setup.
11313 Otherwise, keep status pending, and return.
11314 (linux_resume_one_lwp_throw): Don't call get_pc if
11315 thread->while_stepping isn't NULL. Don't call
11316 get_thread_regcache if proc->tdesc is NULL.
11317 (need_step_over_p): Return 0 if proc->tdesc is NULL.
11318 (linux_target_ops): Install arch_setup.
11319 * server.c (start_inferior): Call the_target->arch_setup.
11320 * target.h (struct target_ops) <arch_setup>: New field.
11321 (target_arch_setup): New marco.
11322 * lynx-low.c (lynx_target_ops): Update.
11323 * nto-low.c (nto_target_ops): Update.
11324 * spu-low.c (spu_target_ops): Update.
11325 * win32-low.c (win32_target_ops): Update.
11326
11327 2015-07-24 Yao Qi <yao.qi@linaro.org>
11328
11329 * linux-low.c (linux_add_process): Don't set
11330 proc->priv->new_inferior.
11331 (linux_create_inferior): Set proc->priv->new_inferior to 1.
11332 (linux_attach): Likewise.
11333
11334 2015-07-24 Yao Qi <yao.qi@linaro.org>
11335
11336 * server.c (start_inferior): Code refactor.
11337
11338 2015-07-24 Yao Qi <yao.qi@linaro.org>
11339
11340 * server.c (process_serial_event): Set general_thread.
11341
11342 2015-07-21 Yao Qi <yao.qi@linaro.org>
11343
11344 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
11345 aarch64_linux_get_debug_reg_capacity.
11346
11347 2015-07-17 Yao Qi <yao.qi@linaro.org>
11348
11349 * Makefile.in (aarch64-linux-hw-point.o): New rule.
11350 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
11351 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
11352 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
11353 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
11354 (AARCH64_HWP_ALIGNMENT): Likewise.
11355 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
11356 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
11357 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
11358 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
11359 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
11360 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
11361 (struct aarch64_debug_reg_state): Likewise.
11362 (struct arch_lwp_info): Likewise.
11363 (aarch64_align_watchpoint): Likewise.
11364 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
11365 (aarch64_watchpoint_length): Likewise.
11366 (aarch64_point_encode_ctrl_reg): Likewise
11367 (aarch64_point_is_aligned): Likewise.
11368 (aarch64_align_watchpoint): Likewise.
11369 (aarch64_linux_set_debug_regs):
11370 (aarch64_dr_state_insert_one_point): Likewise.
11371 (aarch64_dr_state_remove_one_point): Likewise.
11372 (aarch64_handle_breakpoint): Likewise.
11373 (aarch64_handle_aligned_watchpoint): Likewise.
11374 (aarch64_handle_unaligned_watchpoint): Likewise.
11375 (aarch64_handle_watchpoint): Likewise.
11376
11377 2015-07-17 Yao Qi <yao.qi@linaro.org>
11378
11379 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
11380 and don't aarch64_get_debug_reg_state. All callers update.
11381 (aarch64_handle_aligned_watchpoint): Likewise.
11382 (aarch64_handle_unaligned_watchpoint): Likewise.
11383 (aarch64_handle_watchpoint): Likewise.
11384 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
11385 (aarch64_remove_point): Likewise.
11386
11387 2015-07-17 Yao Qi <yao.qi@linaro.org>
11388
11389 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
11390 debug_printf.
11391 (aarch64_handle_unaligned_watchpoint): Likewise.
11392
11393 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11394
11395 Revert the previous 3 commits:
11396 Move gdb_regex* to common/
11397 Move linux_find_memory_regions_full & co.
11398 gdbserver build-id attribute generator
11399
11400 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
11401 Jan Kratochvil <jan.kratochvil@redhat.com>
11402
11403 gdbserver build-id attribute generator.
11404 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
11405 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
11406 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
11407 (find_phdr): New.
11408 (get_dynamic): Use find_pdhr to traverse program headers.
11409 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
11410 (compare_mapping_entry_range, struct find_memory_region_callback_data)
11411 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
11412 (get_hex_build_id): New.
11413 (linux_qxfer_libraries_svr4): Add optional build-id attribute
11414 to reply XML document.
11415
11416 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
11417 Jan Kratochvil <jan.kratochvil@redhat.com>
11418
11419 * target.c: Include target/target-utils.h and fcntl.h.
11420 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
11421 (target_fileio_read_stralloc): New functions.
11422
11423 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11424
11425 * Makefile.in (OBS): Add gdb_regex.o.
11426 (gdb_regex.o): New.
11427 * config.in: Rebuilt.
11428 * configure: Rebuilt.
11429
11430 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
11431 Jan Kratochvil <jan.kratochvil@redhat.com>
11432
11433 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
11434 * Makefile.in (OBS): Add target-utils.o.
11435 (linux-maps.o, target-utils.o): New.
11436 * configure.srv (srv_linux_obj): Add linux-maps.o.
11437
11438 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
11439
11440 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
11441 function, return 1.
11442 (the_low_target): Install it.
11443
11444 2015-07-14 Pedro Alves <palves@redhat.com>
11445
11446 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
11447 Instead, ignore ECHILD, and throw an error for other errnos.
11448
11449 2015-07-10 Pedro Alves <palves@redhat.com>
11450
11451 * event-loop.c (struct callback_event) <data>: Change type to
11452 gdb_client_data instance instead of gdb_client_data pointer.
11453 (append_callback_event): Adjust.
11454
11455 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
11456
11457 * linux-aarch64-low.c: Add comments for each linux_target_ops
11458 method. Remove comments already covered in target_ops and
11459 linux_target_ops definitions.
11460 (the_low_target): Add comments for each unimplemented method.
11461
11462 2015-07-09 Yao Qi <yao.qi@linaro.org>
11463
11464 * linux-aarch64-low.c (aarch64_regmap): Remove.
11465 (aarch64_usrregs_info): Remove.
11466 (regs_info): Set field usrregs to NULL.
11467
11468 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
11469
11470 * linux-low.c: Include "rsp-low.h"
11471 (linux_low_encode_pt_config, linux_low_encode_raw): New.
11472 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
11473 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
11474 (handle_btrace_enable_pt): New.
11475 (handle_btrace_general_set): Support "pt".
11476 (handle_btrace_conf_general_set): Support "pt:size".
11477
11478 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
11479
11480 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
11481 Z_PACKET_SW_BP.
11482
11483 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
11484
11485 * linux-aarch64-low.c: Remove comment about endianness.
11486 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
11487 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
11488 memcmp.
11489
11490 2015-06-24 Gary Benson <gbenson@redhat.com>
11491
11492 * linux-i386-ipa.c (stdint.h): Do not include.
11493 * lynx-i386-low.c (stdint.h): Likewise.
11494 * lynx-ppc-low.c (stdint.h): Likewise.
11495 * mem-break.c (stdint.h): Likewise.
11496 * thread-db.c (stdint.h): Likewise.
11497 * tracepoint.c (stdint.h): Likewise.
11498 * win32-low.c (stdint.h): Likewise.
11499
11500 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
11501
11502 * server.c (write_qxfer_response): Update call to
11503 remote_escape_output.
11504
11505 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
11506 Jan Kratochvil <jan.kratochvil@redhat.com>
11507
11508 Merge multiple hex conversions.
11509 * gdbreplay.c (tohex): Rename to 'fromhex'.
11510 (logchar): Use fromhex.
11511
11512 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
11513
11514 * server.c (handle_qxfer_libraries): Set `version' attribute for
11515 <library-list>.
11516
11517 2015-06-10 Gary Benson <gbenson@redhat.com>
11518
11519 * target.h (struct target_ops) <multifs_open>: New field.
11520 <multifs_unlink>: Likewise.
11521 <multifs_readlink>: Likewise.
11522 * linux-low.c (nat/linux-namespaces.h): New include.
11523 (linux_target_ops): Initialize the_target->multifs_open,
11524 the_target->multifs_unlink and the_target->multifs_readlink.
11525 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
11526 * hostio.c (hostio_fs_pid): New static variable.
11527 (hostio_handle_new_gdb_connection): New function.
11528 (handle_setfs): Likewise.
11529 (handle_open): Use the_target->multifs_open as appropriate.
11530 (handle_unlink): Use the_target->multifs_unlink as appropriate.
11531 (handle_readlink): Use the_target->multifs_readlink as
11532 appropriate.
11533 (handle_vFile): Handle vFile:setfs packets.
11534 * server.c (handle_query): Call hostio_handle_new_gdb_connection
11535 after target_handle_new_gdb_connection.
11536
11537 2015-06-10 Gary Benson <gbenson@redhat.com>
11538
11539 * configure.ac (AC_CHECK_FUNCS): Add setns.
11540 * config.in: Regenerate.
11541 * configure: Likewise.
11542 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
11543 (linux-namespaces.o): New rule.
11544 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
11545
11546 2015-06-09 Gary Benson <gbenson@redhat.com>
11547
11548 * hostio.c (handle_open): Process mode argument with
11549 fileio_to_host_mode.
11550
11551 2015-06-01 Yao Qi <yao.qi@linaro.org>
11552
11553 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
11554 * linux-x86-low.c: Likewise.
11555
11556 2015-05-28 Don Breazeal <donb@codesourcery.com>
11557
11558 * linux-low.c (handle_extended_wait): Initialize
11559 thread_info.last_resume_kind for new fork children.
11560
11561 2015-05-15 Pedro Alves <palves@redhat.com>
11562
11563 * target.h (target_handle_new_gdb_connection): Rewrite using if
11564 wrapped in do/while.
11565
11566 2015-05-14 Joel Brobecker <brobecker@adacore.com>
11567
11568 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
11569 * configure, config.in: Regenerate.
11570 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
11571 Declare typedef.
11572
11573 2015-05-12 Don Breazeal <donb@codesourcery.com>
11574
11575 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
11576 PTRACE_EVENT_VFORK_DONE.
11577 (linux_low_ptrace_options, extended_event_reported): Add vfork
11578 events.
11579 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
11580 and "vforkdone" for RSP 'T' Stop Reply Packet.
11581 * server.h (report_vfork_events): Declare
11582 global variable.
11583
11584 2015-05-12 Don Breazeal <donb@codesourcery.com>
11585
11586 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
11587 (the_low_target) <new_fork>: Initialize new member.
11588 * linux-arm-low.c (arm_new_fork): New function.
11589 (the_low_target) <new_fork>: Initialize new member.
11590 * linux-low.c (handle_extended_wait): Call new target function
11591 new_fork.
11592 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
11593 * linux-mips-low.c (mips_add_watchpoint): New function
11594 extracted from mips_insert_point.
11595 (the_low_target) <new_fork>: Initialize new member.
11596 (mips_linux_new_fork): New function.
11597 (mips_insert_point): Call mips_add_watchpoint.
11598 * linux-x86-low.c (x86_linux_new_fork): New function.
11599 (the_low_target) <new_fork>: Initialize new member.
11600
11601 2015-05-12 Don Breazeal <donb@codesourcery.com>
11602
11603 * linux-low.c (handle_extended_wait): Implement return value,
11604 rename argument 'event_child' to 'event_lwp', handle
11605 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
11606 (linux_low_ptrace_options): New function.
11607 (linux_low_filter_event): Call linux_low_ptrace_options,
11608 use different argument fo linux_enable_event_reporting,
11609 use return value from handle_extended_wait.
11610 (extended_event_reported): New function.
11611 (linux_wait_1): Call extended_event_reported and set
11612 status to report fork events.
11613 (linux_write_memory): Add pid to debug message.
11614 (reset_lwp_ptrace_options_callback): New function.
11615 (linux_handle_new_gdb_connection): New function.
11616 (linux_target_ops): Initialize new structure member.
11617 * linux-low.h (struct lwp_info) <waitstatus>: New member.
11618 * lynx-low.c: Initialize new structure member.
11619 * remote-utils.c (prepare_resume_reply): Implement stop reason
11620 "fork" for "T" stop message.
11621 * server.c (handle_query): Call handle_new_gdb_connection.
11622 * server.h (report_fork_events): Declare global flag.
11623 * target.h (struct target_ops) <handle_new_gdb_connection>:
11624 New member.
11625 (target_handle_new_gdb_connection): New macro.
11626 * win32-low.c: Initialize new structure member.
11627
11628 2015-05-12 Don Breazeal <donb@codesourcery.com>
11629
11630 * mem-break.c (APPEND_TO_LIST): Define macro.
11631 (clone_agent_expr): New function.
11632 (clone_one_breakpoint): New function.
11633 (clone_all_breakpoints): New function.
11634 * mem-break.h: Declare new functions.
11635
11636 2015-05-12 Don Breazeal <donb@codesourcery.com>
11637
11638 * linux-low.c (linux_supports_fork_events): New function.
11639 (linux_supports_vfork_events): New function.
11640 (linux_target_ops): Initialize new structure members.
11641 (initialize_low): Call linux_check_ptrace_features.
11642 * lynx-low.c (lynx_target_ops): Initialize new structure
11643 members.
11644 * server.c (report_fork_events, report_vfork_events):
11645 New global flags.
11646 (handle_query): Add new features to qSupported packet and
11647 response.
11648 (captured_main): Initialize new global variables.
11649 * target.h (struct target_ops) <supports_fork_events>:
11650 New member.
11651 <supports_vfork_events>: New member.
11652 (target_supports_fork_events): New macro.
11653 (target_supports_vfork_events): New macro.
11654 * win32-low.c (win32_target_ops): Initialize new structure
11655 members.
11656
11657 2015-05-12 Gary Benson <gbenson@redhat.com>
11658
11659 * server.c (handle_qxfer_exec_file): Use current process
11660 if annex is empty.
11661
11662 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
11663
11664 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
11665 Remove HAVE_PTRACE_GETREGS conditionals.
11666 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
11667 instead of PTRACE_GETREGS and PTRACE_SETREGS.
11668
11669 2015-05-08 Yao Qi <yao.qi@linaro.org>
11670
11671 * linux-low.c (linux_supports_conditional_breakpoints): New
11672 function.
11673 (linux_target_ops): Install new target method.
11674 * lynx-low.c (lynx_target_ops): Install NULL hook for
11675 supports_conditional_breakpoints.
11676 * nto-low.c (nto_target_ops): Likewise.
11677 * spu-low.c (spu_target_ops): Likewise.
11678 * win32-low.c (win32_target_ops): Likewise.
11679 * server.c (handle_query): Check
11680 target_supports_conditional_breakpoints.
11681 * target.h (struct target_ops) <supports_conditional_breakpoints>:
11682 New field.
11683 (target_supports_conditional_breakpoints): New macro.
11684
11685 2015-05-06 Pedro Alves <palves@redhat.com>
11686
11687 PR server/18081
11688 * server.c (start_inferior): If the process exits, mourn it.
11689
11690 2015-04-21 Gary Benson <gbenson@redhat.com>
11691
11692 * hostio.c (fileio_open_flags_to_host): Factored out to
11693 fileio_to_host_openflags in common/fileio.c. Single use
11694 updated.
11695
11696 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
11697
11698 * linux-xtensa-low.c (xtensa_fill_gregset)
11699 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
11700 XCHAL_HAVE_LOOP.
11701
11702 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
11703
11704 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
11705 (regs_info): Replace usrregs pointer with NULL.
11706
11707 2015-04-17 Gary Benson <gbenson@redhat.com>
11708
11709 * target.h (struct target_ops) <pid_to_exec_file>: New field.
11710 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
11711 * server.c (handle_qxfer_exec_file): New function.
11712 (qxfer_packets): Add exec-file entry.
11713 (handle_query): Report qXfer:exec-file:read as supported packet.
11714
11715 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
11716
11717 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
11718
11719 2015-04-09 Gary Benson <gbenson@redhat.com>
11720
11721 * hostio-errno.c (errno_to_fileio_error): Remove function.
11722 Update caller to use remote_fileio_to_fio_error.
11723
11724 2015-04-09 Yao Qi <yao.qi@linaro.org>
11725
11726 * linux-low.c (linux_insert_point): Call
11727 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
11728 (linux_remove_point): Call remove_memory_breakpoint if type is
11729 raw_bkpt_type_sw.
11730 * linux-x86-low.c (x86_insert_point): Don't call
11731 insert_memory_breakpoint.
11732 (x86_remove_point): Don't call remove_memory_breakpoint.
11733
11734 2015-04-01 Pedro Alves <palves@redhat.com>
11735 Cleber Rosa <crosa@redhat.com>
11736
11737 * server.c (gdbserver_usage): Reorganize and extend the usage
11738 message.
11739
11740 2015-03-24 Pedro Alves <palves@redhat.com>
11741
11742 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
11743 output. Also dump TRAP_TRACE.
11744 (linux_low_filter_event): In debug output, distinguish a
11745 resume_stop SIGSTOP from a delayed SIGSTOP.
11746
11747 2015-03-24 Gary Benson <gbenson@redhat.com>
11748
11749 * linux-x86-low.c (x86_linux_new_thread): Moved to
11750 nat/x86-linux.c.
11751 (x86_linux_prepare_to_resume): Likewise.
11752
11753 2015-03-24 Gary Benson <gbenson@redhat.com>
11754
11755 * Makefile.in (x86-linux-dregs.o): New rule.
11756 * configure.srv: Add x86-linux-dregs.o to relevant targets.
11757 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
11758 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
11759 (x86_linux_dr_get): Likewise.
11760 (x86_linux_dr_set): Likewise.
11761 (update_debug_registers_callback): Likewise.
11762 (x86_linux_dr_set_addr): Likewise.
11763 (x86_linux_dr_get_addr): Likewise.
11764 (x86_linux_dr_set_control): Likewise.
11765 (x86_linux_dr_get_control): Likewise.
11766 (x86_linux_dr_get_status): Likewise.
11767 (x86_linux_update_debug_registers): Likewise.
11768
11769 2015-03-24 Gary Benson <gbenson@redhat.com>
11770
11771 * linux-x86-low.c (x86_linux_update_debug_registers):
11772 New function, factored out from...
11773 (x86_linux_prepare_to_resume): ...this.
11774
11775 2015-03-24 Gary Benson <gbenson@redhat.com>
11776
11777 * linux-x86-low.c (x86_linux_dr_get): Update comments.
11778 (x86_linux_dr_set): Likewise.
11779 (update_debug_registers_callback): Likewise.
11780 (x86_linux_dr_set_addr): Likewise.
11781 (x86_linux_dr_get_addr): Likewise.
11782 (x86_linux_dr_set_control): Likewise.
11783 (x86_linux_dr_get_control): Likewise.
11784 (x86_linux_dr_get_status): Likewise.
11785 (x86_linux_prepare_to_resume): Likewise.
11786
11787 2015-03-24 Gary Benson <gbenson@redhat.com>
11788
11789 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
11790 Use perror_with_name. Pass string through gettext.
11791 (x86_linux_dr_set): Likewise.
11792
11793 2015-03-24 Gary Benson <gbenson@redhat.com>
11794
11795 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
11796 (x86_linux_dr_set_addr): ...this.
11797 (x86_dr_low_get_addr): Rename to...
11798 (x86_linux_dr_get_addr): ...this.
11799 (x86_dr_low_set_control): Rename to...
11800 (x86_linux_dr_set_control): ...this.
11801 (x86_dr_low_get_control): Rename to...
11802 (x86_linux_dr_get_control): ...this.
11803 (x86_dr_low_get_status): Rename to...
11804 (x86_linux_dr_get_status): ...this.
11805 (x86_dr_low): Update with new function names.
11806
11807 2015-03-24 Gary Benson <gbenson@redhat.com>
11808
11809 * Makefile.in (x86-linux.o): New rule.
11810 * configure.srv: Add x86-linux.o to relevant targets.
11811 * linux-low.c (lwp_set_arch_private_info): New function.
11812 (lwp_arch_private_info): Likewise.
11813 * linux-x86-low.c: Include nat/x86-linux.h.
11814 (arch_lwp_info): Removed structure.
11815 (update_debug_registers_callback):
11816 Use lwp_set_debug_registers_changed.
11817 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
11818 and lwp_set_debug_registers_changed.
11819 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
11820
11821 2015-03-24 Gary Benson <gbenson@redhat.com>
11822
11823 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
11824 * linux-arm-low.c (arm_new_thread): Likewise.
11825 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
11826 * linux-mips-low.c (mips_linux_new_thread): Likewise.
11827 * linux-x86-low.c (x86_linux_new_thread): Likewise.
11828 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
11829
11830 2015-03-24 Gary Benson <gbenson@redhat.com>
11831
11832 * linux-low.c (ptid_of_lwp): New function.
11833 (lwp_is_stopped): Likewise.
11834 (lwp_stop_reason): Likewise.
11835 * linux-x86-low.c (update_debug_registers_callback):
11836 Use lwp_is_stopped.
11837 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
11838 lwp_stop_reason.
11839
11840 2015-03-24 Gary Benson <gbenson@redhat.com>
11841
11842 * linux-low.h (linux_stop_lwp): Remove declaration.
11843
11844 2015-03-24 Gary Benson <gbenson@redhat.com>
11845
11846 * linux-low.h: Include nat/linux-nat.h.
11847 * linux-low.c (iterate_over_lwps_args): New structure.
11848 (iterate_over_lwps_filter): New function.
11849 (iterate_over_lwps): Likewise.
11850 * linux-x86-low.c (update_debug_registers_callback):
11851 Update signature to what iterate_over_lwps expects.
11852 Remove PID check that iterate_over_lwps now performs.
11853 (x86_dr_low_set_addr): Use iterate_over_lwps.
11854 (x86_dr_low_set_control): Likewise.
11855
11856 2015-03-24 Gary Benson <gbenson@redhat.com>
11857
11858 * linux-x86-low.c (x86_debug_reg_state): New function.
11859 (x86_linux_prepare_to_resume): Use the above.
11860
11861 2015-03-24 Gary Benson <gbenson@redhat.com>
11862
11863 * linux-low.c (current_lwp_ptid): New function.
11864 * linux-x86-low.c: Include nat/linux-nat.h.
11865 (x86_dr_low_get_addr): Use current_lwp_ptid.
11866 (x86_dr_low_get_control): Likewise.
11867 (x86_dr_low_get_status): Likewise.
11868
11869 2015-03-20 Pedro Alves <palves@redhat.com>
11870
11871 * tracepoint.c (cmd_qtstatus): Make "str" const.
11872
11873 2015-03-20 Pedro Alves <palves@redhat.com>
11874
11875 * server.c (handle_general_set): Make "req_str" const.
11876
11877 2015-03-19 Pedro Alves <palves@redhat.com>
11878
11879 * linux-low.c (linux_resume_one_lwp): Rename to ...
11880 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
11881 instead call perror_with_name.
11882 (check_ptrace_stopped_lwp_gone): New function.
11883 (linux_resume_one_lwp): Reimplement as wrapper around
11884 linux_resume_one_lwp_throw that swallows errors if the LWP is
11885 gone.
11886
11887 2015-03-19 Pedro Alves <palves@redhat.com>
11888
11889 * linux-low.c (count_events_callback, select_event_lwp_callback):
11890 No longer check whether the thread has resume_stop as last resume
11891 kind.
11892
11893 2015-03-19 Pedro Alves <palves@redhat.com>
11894
11895 * linux-low.c (count_events_callback, select_event_lwp_callback):
11896 Use the lwp's status_pending_p field, not the thread's.
11897
11898 2015-03-19 Pedro Alves <palves@redhat.com>
11899
11900 * linux-low.c (select_event_lwp_callback): Update comments to
11901 no longer mention SIGTRAP.
11902
11903 2015-03-18 Gary Benson <gbenson@redhat.com>
11904
11905 * server.c (handle_query): Do not report vFile:fstat as supported.
11906
11907 2015-03-11 Gary Benson <gbenson@redhat.com>
11908
11909 * hostio.c (sys/types.h): New include.
11910 (sys/stat.h): Likewise.
11911 (common-remote-fileio.h): Likewise.
11912 (handle_fstat): New function.
11913 (handle_vFile): Handle vFile:fstat packets.
11914
11915 2015-03-11 Gary Benson <gbenson@redhat.com>
11916
11917 * configure.ac (AC_CHECK_MEMBERS): Add checks for
11918 struct stat.st_blocks and struct stat.st_blksize.
11919 * configure: Regenerate.
11920 * config.in: Likewise.
11921 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
11922 (OBS): Add common-remote-fileio.o.
11923 (common-remote-fileio.o): New rule.
11924
11925 2015-03-09 Pedro Alves <palves@redhat.com>
11926
11927 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
11928 'struct sockaddr' pointer in 'accept' call.
11929
11930 2015-03-09 Pedro Alves <palves@redhat.com>
11931
11932 Revert:
11933 2015-03-07 Pedro Alves <palves@redhat.com>
11934 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
11935 or <winsock2.h> here. Instead include "gdb_socket.h".
11936 (remote_open): Use union gdb_sockaddr_u.
11937 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
11938 or <winsock2.h> here. Instead include "gdb_socket.h".
11939 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
11940 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
11941 or <sys/un.h>.
11942 (init_named_socket, gdb_agent_helper_thread): Use union
11943 gdb_sockaddr_u.
11944
11945 2015-03-07 Pedro Alves <palves@redhat.com>
11946
11947 * configure.ac (build_warnings): Move
11948 -Wdeclaration-after-statement to the C-specific set.
11949 * configure: Regenerate.
11950
11951 2015-03-07 Pedro Alves <palves@redhat.com>
11952
11953 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
11954 or <winsock2.h> here. Instead include "gdb_socket.h".
11955 (remote_open): Use union gdb_sockaddr_u.
11956 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
11957 or <winsock2.h> here. Instead include "gdb_socket.h".
11958 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
11959 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
11960 or <sys/un.h>.
11961 (init_named_socket, gdb_agent_helper_thread): Use union
11962 gdb_sockaddr_u.
11963
11964 2015-03-07 Pedro Alves <palves@redhat.com>
11965
11966 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
11967 instead.
11968
11969 2015-03-06 Yao Qi <yao.qi@linaro.org>
11970
11971 * linux-aarch64-low.c (aarch64_insert_point): Use
11972 show_debug_regs as a boolean.
11973 (aarch64_remove_point): Likewise.
11974
11975 2015-03-05 Pedro Alves <palves@redhat.com>
11976
11977 * lynx-low.c (lynx_target_ops): Install NULL hooks for
11978 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
11979 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
11980 * nto-low.c (nto_target_ops): Likewise.
11981 * spu-low.c (spu_target_ops): Likewise.
11982 * win32-low.c (win32_target_ops): Likewise.
11983
11984 2015-03-04 Pedro Alves <palves@redhat.com>
11985
11986 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
11987 Decide whether a breakpoint triggered based on the SIGTRAP's
11988 siginfo.si_code.
11989 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
11990 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
11991 (linux_low_filter_event): Check for breakpoints before checking
11992 watchpoints.
11993 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
11994 siginfo.si_code.
11995 (linux_stopped_by_sw_breakpoint)
11996 (linux_supports_stopped_by_sw_breakpoint)
11997 (linux_stopped_by_hw_breakpoint)
11998 (linux_supports_stopped_by_hw_breakpoint): New functions.
11999 (linux_target_ops): Install new target methods.
12000
12001 2015-03-04 Pedro Alves <palves@redhat.com>
12002
12003 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
12004 * server.c (swbreak_feature, hwbreak_feature): New globals.
12005 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
12006 (captured_main): Clear swbreak_feature and hwbreak_feature.
12007 * server.h (swbreak_feature, hwbreak_feature): Declare.
12008 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
12009 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
12010 supports_stopped_by_hw_breakpoint>: New fields.
12011 (target_supports_stopped_by_sw_breakpoint)
12012 (target_stopped_by_sw_breakpoint)
12013 (target_supports_stopped_by_hw_breakpoint)
12014 (target_stopped_by_hw_breakpoint): Declare.
12015
12016 2015-03-04 Pedro Alves <palves@redhat.com>
12017
12018 enum lwp_stop_reason -> enum target_stop_reason
12019 * linux-low.c (check_stopped_by_breakpoint): Adjust.
12020 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
12021 (linux_wait_1, stuck_in_jump_pad_callback)
12022 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
12023 (linux_stopped_by_watchpoint):
12024 * linux-low.h (enum lwp_stop_reason): Delete.
12025 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
12026 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
12027
12028 2015-03-04 Yao Qi <yao.qi@linaro.org>
12029
12030 * Makefile.in (SFILES): Add linux-aarch64-low.c.
12031
12032 2015-03-03 Gary Benson <gbenson@redhat.com>
12033
12034 * hostio.c (handle_vFile): Fix prefix lengths.
12035
12036 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
12037
12038 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
12039 ptr_bits.
12040
12041 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
12042
12043 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
12044 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
12045 (clean): Add "rm -f" for above C files.
12046 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
12047 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
12048 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
12049 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
12050 * linux-s390-low.c (HWCAP_S390_VX): New macro.
12051 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
12052 (init_registers_s390x_vx_linux64)
12053 (init_registers_s390x_tevx_linux64)
12054 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
12055 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
12056 declarations.
12057 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
12058 (s390_store_vxrs_high): New functions.
12059 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
12060 NT_S390_VXRS_HIGH.
12061 (s390_arch_setup): Add logic for selecting one of the new target
12062 descriptions. Activate the new vector regsets if applicable.
12063 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
12064 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
12065 and init_registers_s390x_tevx_linux64.
12066
12067 2015-03-01 Pedro Alves <palves@redhat.com>
12068
12069 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
12070 parameter.
12071
12072 2015-02-27 Pedro Alves <palves@redhat.com>
12073
12074 * linux-x86-low.c (u_debugreg_offset): New function.
12075 (x86_linux_dr_get, x86_linux_dr_set): Use it.
12076
12077 2015-02-27 Pedro Alves <palves@redhat.com>
12078
12079 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
12080 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
12081 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
12082 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
12083 (ps_lsetfpregs, ps_getpid)
12084 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
12085 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
12086 (ps_lsetxregs, ps_plog): Declare.
12087
12088 2015-02-27 Pedro Alves <palves@redhat.com>
12089
12090 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
12091 IP_AGENT_EXPORT_FUNC.
12092 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
12093 IP_AGENT_EXPORT_FUNC.
12094 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
12095 (IP_AGENT_EXPORT): Delete.
12096 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12097 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
12098 (gdb_trampoline_buffer_error, collecting, gdb_collect)
12099 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
12100 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
12101 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
12102 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
12103 (traceframe_read_count, traceframe_write_count)
12104 (traceframes_created, trace_state_variables, get_raw_reg)
12105 (get_trace_state_variable_value, set_trace_state_variable_value)
12106 (ust_loaded, helper_thread_id, cmd_buf): Use
12107 IPA_SYM_EXPORTED_NAME.
12108 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
12109 (tracepoints) Use IP_AGENT_EXPORT_VAR.
12110 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
12111 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
12112 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
12113 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
12114 EXTERN_C_PUSH/EXTERN_C_POP.
12115 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
12116 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
12117 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
12118 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
12119 (traceframe_write_count, traceframe_read_count)
12120 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
12121 (about_to_request_buffer_space, get_trace_state_variable_value)
12122 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
12123 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
12124 EXTERN_C_PUSH/EXTERN_C_POP.
12125 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
12126 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
12127 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
12128 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
12129 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12130 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
12131 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
12132 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
12133 Define.
12134 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
12135 (IP_AGENT_EXPORT_VAR_DECL): Define.
12136 (tracing): Declare.
12137 (gdb_agent_get_raw_reg): Declare.
12138
12139 2015-02-27 Tom Tromey <tromey@redhat.com>
12140 Pedro Alves <palves@redhat.com>
12141
12142 Rename symbols whose names are reserved C++ keywords throughout.
12143
12144 2015-02-27 Pedro Alves <palves@redhat.com>
12145
12146 * Makefile.in (COMPILER): New, get it from autoconf.
12147 (CXX): Get from autoconf instead.
12148 (COMPILE.pre): Use COMPILER.
12149 (CC-LD): Rename to ...
12150 (CC_LD): ... this. Use COMPILER.
12151 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
12152 (CXX_FOR_TARGET): Default to g++ instead of gcc.
12153 * acinclude.m4: Include build-with-cxx.m4.
12154 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
12155 Disable -Werror by default if building in C++ mode.
12156 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
12157 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
12158 the C++ compiler. Save/restore CXXFLAGS too.
12159 * configure: Regenerate.
12160
12161 2015-02-27 Pedro Alves <palves@redhat.com>
12162
12163 * acinclude.m4: Include libiberty.m4.
12164 * configure.ac: Call libiberty_INIT.
12165 * config.in, configure: Regenerate.
12166
12167 2015-02-26 Pedro Alves <palves@redhat.com>
12168
12169 * linux-low.c (linux_wait_1): When incrementing the PC past a
12170 program breakpoint always use the_low_target.breakpoint_len as
12171 increment, rather than the maximum between that and
12172 the_low_target.decr_pc_after_break.
12173
12174 2015-02-23 Pedro Alves <palves@redhat.com>
12175
12176 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
12177 thread was doing a step-over; always adjust the PC if
12178 we stepped over a permanent breakpoint.
12179 (linux_wait_1): If we stepped over breakpoint that was on top of a
12180 permanent breakpoint, manually advance the PC past it.
12181
12182 2015-02-23 Pedro Alves <palves@redhat.com>
12183
12184 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
12185 modes.
12186 (x86_fill_gregset, x86_store_gregset): Use it when handling
12187 $orig_eax.
12188
12189 2015-02-20 Pedro Alves <palves@redhat.com>
12190
12191 * thread-db.c: Include "nat/linux-procfs.h".
12192 (thread_db_init): Skip listing new threads if the kernel supports
12193 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
12194
12195 2015-02-20 Pedro Alves <palves@redhat.com>
12196
12197 * linux-low.c (status_pending_p_callback): Use ptid_match.
12198
12199 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
12200
12201 PR breakpoints/16812
12202 * linux-low.c (wstatus_maybe_breakpoint): Remove.
12203 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
12204 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
12205
12206 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
12207
12208 PR breakpoints/15956
12209 * tracepoint.c (cmd_qtinit): Add check for current_thread.
12210
12211 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
12212
12213 * linux-low.c (linux_low_btrace_conf): Print size.
12214 * server.c (handle_btrace_conf_general_set): New.
12215 (hanle_general_set): Call handle_btrace_conf_general_set.
12216 (handle_query): Report Qbtrace-conf:bts:size as supported.
12217
12218 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
12219
12220 * linux-low.c (linux_low_enable_btrace): Update parameters.
12221 (linux_low_btrace_conf): New.
12222 (linux_target_ops)<to_btrace_conf>: Initialize.
12223 * server.c (current_btrace_conf): New.
12224 (handle_btrace_enable): Rename to ...
12225 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
12226 to target_enable_btrace. Update comment. Update users.
12227 (handle_qxfer_btrace_conf): New.
12228 (qxfer_packets): Add btrace-conf entry.
12229 (handle_query): Report qXfer:btrace-conf:read as supported packet.
12230 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
12231 (target_ops)<read_btrace_conf>: New.
12232 (target_enable_btrace): Update parameters.
12233 (target_read_btrace_conf): New.
12234
12235 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
12236
12237 * server.c (handle_btrace_general_set): Remove call to
12238 target_supports_btrace.
12239 (supported_btrace_packets): New.
12240 (handle_query): Call supported_btrace_packets.
12241 * target.h: include btrace-common.h.
12242 (btrace_target_info): Removed.
12243 (supports_btrace, target_supports_btrace): Update parameters.
12244
12245 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
12246
12247 * Makefile.in (SFILES): Add common/btrace-common.c.
12248 (OBS): Add common/btrace-common.o.
12249 (btrace-common.o): Add build rules.
12250 * linux-low: Include btrace-common.h.
12251 (linux_low_read_btrace): Use struct btrace_data. Call
12252 btrace_data_init and btrace_data_fini.
12253
12254 2015-02-06 Pedro Alves <palves@redhat.com>
12255
12256 * thread-db.c (find_new_threads_callback): Add debug output.
12257
12258 2015-02-04 Pedro Alves <palves@redhat.com>
12259
12260 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
12261 (resume_stopped_resumed_lwps): New function.
12262 (linux_wait_for_event_filtered): Use it.
12263
12264 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
12265
12266 * Makefile.in (SFILES): Add linux-personality.c.
12267 (linux-personality.o): New rule.
12268 * configure.srv (srv_linux_obj): Add linux-personality.o to the
12269 list of objects to be built.
12270 * linux-low.c: Include nat/linux-personality.h.
12271 (linux_create_inferior): Remove code to disable address space
12272 randomization (moved to ../nat/linux-personality.c). Create
12273 cleanup to disable address space randomization.
12274
12275 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
12276
12277 * Makefile.in (posix-strerror.o): New rule.
12278 (mingw-strerror.o): Likewise.
12279 * configure: Regenerated.
12280 * configure.ac: Source file ../common/common.host. Initialize new
12281 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
12282
12283 2015-01-14 Yao Qi <yao@codesourcery.com>
12284
12285 * Makefile.in (SFILES): Add nat/ppc-linux.c.
12286 (ppc-linux.o): New rule.
12287 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
12288 * configure.ac: AC_CHECK_FUNCS(getauxval).
12289 * config.in: Re-generated.
12290 * configure: Re-generated.
12291 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
12292 ppc64_64bit_inferior_p
12293
12294 2015-01-14 Yao Qi <yao@codesourcery.com>
12295
12296 * linux-ppc-low.c: Include "nat/ppc-linux.h".
12297 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
12298 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
12299 (PT_ORIG_R3, PT_TRAP): Likewise.
12300 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
12301 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
12302 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
12303
12304 2015-01-10 Joel Brobecker <brobecker@adacore.com>
12305
12306 * i387-fp.c (i387_cache_to_xsave): In look over
12307 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
12308 zmmh_low_space field by use of zmmh_high_space.
12309
12310 2015-01-09 Pedro Alves <palves@redhat.com>
12311
12312 * linux-low.c (step_over_bkpt): Move higher up in the file.
12313 (handle_extended_wait): Don't store the stop_pc here.
12314 (get_stop_pc): Adjust comments and rename to ...
12315 (check_stopped_by_breakpoint): ... this. Record whether the LWP
12316 stopped for a software breakpoint or hardware breakpoint.
12317 (thread_still_has_status_pending_p): New function.
12318 (status_pending_p_callback): Use
12319 thread_still_has_status_pending_p. If the event is no longer
12320 interesting, resume the LWP.
12321 (handle_tracepoints): Add assert.
12322 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
12323 (wstatus_maybe_breakpoint): New function.
12324 (cancel_breakpoint): Delete function.
12325 (check_stopped_by_watchpoint): New function, factored out from
12326 linux_low_filter_event.
12327 (lp_status_maybe_breakpoint): Delete function.
12328 (linux_low_filter_event): Remove filter_ptid argument.
12329 Leave thread group exits pending here. Store the LWP's stop PC.
12330 Always leave events pending.
12331 (linux_wait_for_event_filtered): Pull all events out of the
12332 kernel, and leave them all pending.
12333 (count_events_callback, select_event_lwp_callback): Consider all
12334 events.
12335 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
12336 (select_event_lwp): Only give preference to the stepping LWP in
12337 all-stop mode. Adjust comments.
12338 (ignore_event): New function.
12339 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
12340 references to cancel_breakpoints. Adjust to renames. Also give
12341 equal priority to all LWPs that have had events in non-stop mode.
12342 If reporting a software breakpoint event, unadjust the LWP's PC.
12343 (linux_wait): If linux_wait_1 returned an ignored event, retry.
12344 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
12345 Adjust.
12346 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
12347 (resume_status_pending_p): Use thread_still_has_status_pending_p.
12348 (linux_stopped_by_watchpoint): Adjust.
12349 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
12350 * linux-low.h (enum lwp_stop_reason): New.
12351 (struct lwp_info) <stop_pc>: Adjust comment.
12352 <stopped_by_watchpoint>: Delete field.
12353 <stop_reason>: New field.
12354 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
12355 * mem-break.c (software_breakpoint_inserted_here)
12356 (hardware_breakpoint_inserted_here): New function.
12357 * mem-break.h (software_breakpoint_inserted_here)
12358 (hardware_breakpoint_inserted_here): Declare.
12359 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
12360 (cancel_breakpoints): Delete.
12361 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
12362 (upload_fast_traceframes): Remove references to
12363 cancel_breakpoints.
12364
12365 2015-01-09 Pedro Alves <palves@redhat.com>
12366
12367 * thread-db.c (find_new_threads_callback): Ignore thread if the
12368 kernel thread ID is -1.
12369
12370 2015-01-09 Pedro Alves <palves@redhat.com>
12371
12372 * linux-low.c (linux_attach_fail_reason_string): Move to
12373 nat/linux-ptrace.c, and rename.
12374 (linux_attach_lwp): Update comment.
12375 (attach_proc_task_lwp_callback): New function.
12376 (linux_attach): Adjust to rename and use
12377 linux_proc_attach_tgid_threads.
12378 (linux_attach_fail_reason_string): Delete declaration.
12379
12380 2015-01-01 Joel Brobecker <brobecker@adacore.com>
12381
12382 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
12383 * server.c (gdbserver_version): Likewise.
12384
12385 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
12386
12387 * remote-utils.c: Include ctype.h.
12388 (input_interrupt): Explicitly handle the case when the char
12389 received is the NUL byte. Improve the printing of non-ASCII
12390 characters.
12391
12392 2014-12-16 Joel Brobecker <brobecker@adacore.com>
12393
12394 * linux-low.c (linux_low_filter_event): Update call to
12395 linux_enable_event_reporting following the addition of
12396 a new parameter to that function.
12397
12398 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
12399
12400 PR server/17457
12401 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
12402 (AARCH64_FPCR_REGNO): Likewise.
12403 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
12404 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
12405 (aarch64_store_fpregset): Likewise.
12406
12407 2014-12-15 Joel Brobecker <brobecker@adacore.com>
12408
12409 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
12410 Remove FIXME comment about assumption about N.
12411
12412 2014-12-13 Joel Brobecker <brobecker@adacore.com>
12413
12414 * configure.ac: If large-file support is disabled in GDBserver,
12415 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
12416 * configure: Regenerate.
12417
12418 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
12419
12420 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
12421 warning upon ENODATA from ptrace.
12422 * linux-s390-low.c (s390_store_tdb): New.
12423 (s390_regsets): Add regset for NT_S390_TDB.
12424
12425 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
12426
12427 * linux-low.c (regsets_store_inferior_registers): Skip regsets
12428 without a fill_function.
12429 * linux-s390-low.c (s390_fill_last_break): Remove.
12430 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
12431 (s390_arch_setup): Use regset's size instead of fill_function for
12432 loop end condition.
12433
12434 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
12435
12436 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
12437 the regset's store function when ptrace returned an error.
12438 * regcache.c (get_thread_regcache): Invalidate register cache
12439 before fetching inferior's registers.
12440
12441 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
12442
12443 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
12444 while-loop as for-loop.
12445 (regsets_store_inferior_registers): Likewise.
12446
12447 2014-11-28 Yao Qi <yao@codesourcery.com>
12448
12449 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
12450 * config.in, configure: Re-generate.
12451 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
12452 is defined.
12453
12454 2014-11-21 Yao Qi <yao@codesourcery.com>
12455
12456 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
12457 (AC_CHECK_HEADERS): Remove malloc.h.
12458 * configure: Re-generated.
12459 * config.in: Re-generated.
12460 * server.h: Don't include alloca.h and malloc.h.
12461 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
12462 Don't include malloc.h.
12463
12464 2014-11-17 Joel Brobecker <brobecker@adacore.com>
12465
12466 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
12467 corresponding ERRNO check in same block.
12468
12469 2014-11-12 Pedro Alves <palves@redhat.com>
12470
12471 * server.c (cont_thread): Update comment.
12472 (start_inferior, attach_inferior): No longer clear cont_thread.
12473 (handle_v_cont): No longer set cont_thread.
12474 (captured_main): Clear cont_thread each time a GDB connects.
12475
12476 2014-11-12 Pedro Alves <palves@redhat.com>
12477
12478 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
12479 thread, and don't resume all threads if the Hc thread has exited.
12480
12481 2014-11-12 Pedro Alves <palves@redhat.com>
12482
12483 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
12484 the process group instead of to a specific LWP.
12485
12486 2014-10-15 Pedro Alves <palves@redhat.com>
12487
12488 PR server/17487
12489 * win32-arm-low.c (arm_set_thread_context): Remove current_event
12490 parameter.
12491 (arm_set_thread_context): Delete.
12492 (the_low_target): Adjust.
12493 * win32-i386-low.c (debug_registers_changed)
12494 (debug_registers_used): Delete.
12495 (update_debug_registers_callback): New function.
12496 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
12497 needing to update their debug registers.
12498 (win32_get_current_dr): New function.
12499 (x86_dr_low_get_addr, x86_dr_low_get_control)
12500 (x86_dr_low_get_status): Fetch the debug register from the thread
12501 record's context.
12502 (i386_initial_stuff): Adjust.
12503 (i386_get_thread_context): Remove current_event parameter. Don't
12504 clear debug_registers_changed nor copy DR values to
12505 debug_reg_state.
12506 (i386_set_thread_context): Delete.
12507 (i386_prepare_to_resume): New function.
12508 (i386_thread_added): Mark the thread as needing to update irs
12509 debug registers.
12510 (the_low_target): Remove i386_set_thread_context and install
12511 i386_prepare_to_resume.
12512 * win32-low.c (win32_get_thread_context): Adjust.
12513 (win32_set_thread_context): Use SetThreadContext
12514 directly.
12515 (win32_prepare_to_resume): New function.
12516 (win32_require_context): New function, factored out from ...
12517 (thread_rec): ... this.
12518 (continue_one_thread): Call win32_prepare_to_resume on each thread
12519 we're about to continue.
12520 (win32_resume): Call win32_prepare_to_resume on the event thread.
12521 * win32-low.h (struct win32_thread_info)
12522 <debug_registers_changed>: New field.
12523 (struct win32_target_ops): Change prototype of set_thread_context,
12524 delete set_thread_context and add prepare_to_resume.
12525 (win32_require_context): New declaration.
12526
12527 2014-10-08 Gary Benson <gbenson@redhat.com>
12528
12529 * server.h: Do not include common-exceptions.h.
12530
12531 2014-10-08 Gary Benson <gbenson@redhat.com>
12532
12533 * server.h: Do not include cleanups.h.
12534
12535 2014-09-30 James Hogan <james.hogan@imgtec.com>
12536
12537 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
12538 mips64-dsp-linux.c.
12539
12540 2014-09-23 Yao Qi <yao@codesourcery.com>
12541
12542 * linux-low.c (lp_status_maybe_breakpoint): New function.
12543 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
12544 (count_events_callback): Likewise.
12545 (select_event_lwp_callback): Likewise.
12546 (cancel_breakpoints_callback): Likewise.
12547
12548 2014-09-19 Don Breazeal <donb@codesourcery.com>
12549
12550 * linux-low.c (handle_extended_wait): Call
12551 linux_ptrace_get_extended_event.
12552 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
12553 linux_is_extended_waitstatus.
12554
12555 2014-09-16 Joel Brobecker <brobecker@adacore.com>
12556
12557 * Makefile.in (CPPFLAGS): Define.
12558 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
12559 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
12560
12561 2014-09-16 Gary Benson <gbenson@redhat.com>
12562
12563 * inferiors.h (current_inferior): Renamed as...
12564 (current_thread): New variable. All uses updated.
12565 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
12566 (maybe_move_out_of_jump_pad): Likewise.
12567 (cancel_breakpoint): Likewise.
12568 (linux_low_filter_event): Likewise.
12569 (wait_for_sigstop): Likewise.
12570 (linux_resume_one_lwp): Likewise.
12571 (need_step_over_p): Likewise.
12572 (start_step_over): Likewise.
12573 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
12574 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
12575 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
12576 and save_inferior as saved_thread.
12577 * regcache.c (get_thread_regcache): Renamed saved_inferior as
12578 saved_thread.
12579 (regcache_invalidate_thread): Likewise.
12580 * remote-utils.c (prepare_resume_reply): Likewise.
12581 * thread-db.c (thread_db_get_tls_address): Likewise.
12582 (disable_thread_event_reporting): Likewise.
12583 (remove_thread_event_breakpoints): Likewise.
12584 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
12585 as saved_thread.
12586 * target.h (set_desired_inferior): Renamed as...
12587 (set_desired_thread): New declaration. All uses updated.
12588 * server.c (myresume): Updated comment to reference thread instead
12589 of inferior.
12590 (handle_serial_event): Likewise.
12591 (handle_target_event): Likewise.
12592
12593 2014-09-12 Tom Tromey <tromey@redhat.com>
12594 Gary Benson <gbenson@redhat.com>
12595
12596 * regcache.h: Include common-regcache.h.
12597 (regcache_read_pc): Don't declare.
12598 * regcache.c (get_thread_regcache_for_ptid): New function.
12599
12600 2014-09-11 Tom Tromey <tromey@redhat.com>
12601 Gary Benson <gbenson@redhat.com>
12602
12603 * symbol.c: New file.
12604 * Makefile.in (SFILES): Add symbol.c.
12605 (OBS): Add symbol.o.
12606
12607 2014-09-11 Gary Benson <gbenson@redhat.com>
12608
12609 * target.c (target_stop_ptid, target_continue_ptid): New
12610 functions.
12611
12612 2014-09-11 Tom Tromey <tromey@redhat.com>
12613 Gary Benson <gbenson@redhat.com>
12614
12615 * target.h: Include target/target.h.
12616 * target.c (target_read_memory, target_read_uint32)
12617 (target_write_memory): New functions.
12618
12619 2014-09-11 Gary Benson <gbenson@redhat.com>
12620
12621 * server.h (debug_hw_points): Don't declare.
12622 * server.c (debug_hw_points): Don't define. Replace all uses
12623 with show_debug_regs.
12624 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
12625 all uses with show_debug_regs.
12626
12627 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
12628
12629 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
12630 endianness into account.
12631 (ppc_supply_ptrace_register): Likewise.
12632
12633 2014-09-03 James Hogan <james.hogan@imgtec.com>
12634
12635 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
12636 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
12637
12638 2014-09-03 Gary Benson <gbenson@redhat.com>
12639
12640 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
12641 ALL_DEBUG_ADDRESS_REGISTERS.
12642
12643 2014-09-02 Gary Benson <gbenson@redhat.com>
12644
12645 * i386-low.h: Renamed as...
12646 * x86-low.h: New file. All type, function and variable name
12647 prefixes changed from "i386_" to "x86_". All references updated.
12648 * i386-low.c: Renamed as...
12649 * x86-low.c: New file. All type, function and variable name
12650 prefixes changed from "i386_" to "x86_". All references updated.
12651
12652 2014-09-02 Gary Benson <gbenson@redhat.com>
12653
12654 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
12655 (x86_linux_new_thread): Likewise.
12656
12657 2014-08-29 Gary Benson <gbenson@redhat.com>
12658
12659 * server.h (setjmp.h): Do not include.
12660 (toplevel): Do not declare.
12661 (common-exceptions.h): Include.
12662 (cleanups.h): Likewise.
12663 * server.c (toplevel): Do not define.
12664 (exit_code): New static global.
12665 (detach_or_kill_for_exit_cleanup): New function.
12666 (main): New function. Original main renamed to...
12667 (captured_main): New function.
12668 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
12669
12670 2014-08-29 Gary Benson <gbenson@redhat.com>
12671
12672 * Makefile.in (SFILES): Add common/common-exceptions.c.
12673 (OBS): Add common-exceptions.o.
12674 (common-exceptions.o): New rule.
12675 * utils.c (prepare_to_throw_exception): New function.
12676
12677 2014-08-29 Gary Benson <gbenson@redhat.com>
12678
12679 * config.in: Regenerate.
12680 * configure: Likewise.
12681
12682 2014-08-29 Gary Benson <gbenson@redhat.com>
12683
12684 * Makefile.in (SFILES): Add common/cleanups.c.
12685 (OBS): cleanups.o.
12686 (cleanups.o): New rule.
12687
12688 2014-08-29 Gary Benson <gbenson@redhat.com>
12689
12690 * utils.c (internal_vwarning): New function.
12691
12692 2014-08-28 Gary Benson <gbenson@redhat.com>
12693
12694 * utils.h (fatal): Remove declaration.
12695 * utils.c (fatal): Remove function.
12696
12697 2014-08-28 Gary Benson <gbenson@redhat.com>
12698
12699 * tracepoint.c (gdb_agent_init): Replace fatal with
12700 perror_with_name.
12701 (initialize_tracepoint): Likewise.
12702
12703 2014-08-28 Gary Benson <gbenson@redhat.com>
12704
12705 * remote-utils.c (remote_prepare): Replace fatal with error.
12706
12707 2014-08-28 Gary Benson <gbenson@redhat.com>
12708
12709 * linux-low.c (linux_async): Replace fatal with warning.
12710 Tidy up and return.
12711 (linux_start_non_stop): Return -1 if linux_async failed.
12712
12713 2014-08-28 Gary Benson <gbenson@redhat.com>
12714
12715 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
12716 gdb_assert.
12717 (i386_dr_low_get_addr): Remove vague comment.
12718 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
12719 gdb_assert.
12720
12721 2014-08-28 Gary Benson <gbenson@redhat.com>
12722
12723 * inferiors.c (get_thread_process): Replace check with gdb_assert.
12724 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
12725 internal_error.
12726 (linux_resume_one_lwp): Likewise.
12727 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
12728 gdb_assert.
12729 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
12730 with internal_error.
12731 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
12732 (init_register_cache): Replace fatal with gdb_assert_not_reached.
12733 (find_register_by_name): Replace fatal with internal_error.
12734 (find_regno): Likewise.
12735 * tdesc.c (init_target_desc): Replace check with gdb_assert.
12736 * thread-db.c (thread_db_create_event): Likewise.
12737 (thread_db_load_search): Likewise.
12738 (try_thread_db_load_1): Likewise.
12739 * tracepoint.c (get_jump_space_head): Replace fatal with
12740 internal_error.
12741 (claim_trampoline_space): Likewise.
12742 (have_fast_tracepoint_trampoline_buffer): Likewise.
12743 (cmd_qtstart): Likewise.
12744 (stop_tracing): Likewise.
12745 (fast_tracepoint_collecting): Likewise.
12746 (target_malloc): Likewise.
12747 (download_tracepoint): Likewise.
12748 (download_trace_state_variables): Replace check with gdb_assert.
12749 (upload_fast_traceframes): Replace fatal with internal_error.
12750
12751 2014-08-19 Tom Tromey <tromey@redhat.com>
12752 Gary Benson <gbenson@redhat.com>
12753
12754 * Makefile.in (SFILES): Add common/common-debug.c.
12755 (OBS): Add common-debug.o.
12756 (common-debug.o): New rule.
12757 * debug.h (debug_printf): Don't declare.
12758 * debug.c (debug_printf): Renamed and rewritten as...
12759 (debug_vprintf): New function.
12760
12761 2014-08-19 Gary Benson <gbenson@redhat.com>
12762
12763 * utils.h: Do not include print-utils.h.
12764
12765 2014-08-19 Tom Tromey <tromey@redhat.com>
12766 Gary Benson <gbenson@redhat.com>
12767
12768 * server.h: Add static assertion.
12769 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
12770
12771 2014-08-19 Tom Tromey <tromey@redhat.com>
12772 Gary Benson <gbenson@redhat.com>
12773
12774 * Makefile.in (SFILES): Add common/errors.c.
12775 (OBS): Add errors.o.
12776 (IPA_OBS): Add errors-ipa.o.
12777 (errors.o): New rule.
12778 (errors-ipa.o): Likewise.
12779 * utils.h (perror_with_name, error, warning): Don't declare.
12780 * utils.c (warning): Renamed and rewritten as...
12781 (vwarning): New function.
12782 (error): Renamed and rewritten as...
12783 (verror): New function.
12784 (internal_error): Renamed and rewritten as...
12785 (internal_verror): New function.
12786
12787 2014-08-07 Gary Benson <gbenson@redhat.com>
12788
12789 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
12790 * configure: Regenerate.
12791 * config.in: Likewise.
12792 * server.h: Do not include errno.h.
12793 * event-loop.c: Likewise.
12794 * hostio-errno.c: Likewise.
12795 * linux-low.c: Likewise.
12796 * remote-utils.c: Likewise.
12797 * spu-low.c: Likewise.
12798 * utils.c: Likewise.
12799 * gdbreplay.c: Unconditionally include errno.h.
12800
12801 2014-08-07 Gary Benson <gbenson@redhat.com>
12802
12803 * server.h: Do not include string.h.
12804 * event-loop.c: Likewise.
12805 * linux-low.c: Likewise.
12806 * regcache.c: Likewise.
12807 * remote-utils.c: Likewise.
12808 * spu-low.c: Likewise.
12809 * utils.c: Likewise.
12810
12811 2014-08-07 Gary Benson <gbenson@redhat.com>
12812
12813 * server.h: Do not include gdb_assert.h.
12814
12815 2014-08-07 Gary Benson <gbenson@redhat.com>
12816
12817 * server.h: Do not include common-utils.h.
12818
12819 2014-08-07 Gary Benson <gbenson@redhat.com>
12820
12821 * server.h: Do not include ptid.h.
12822 * notif.h: Likewise.
12823
12824 2014-08-07 Gary Benson <gbenson@redhat.com>
12825
12826 * server.h: Do not include gdb_locale.h.
12827
12828 2014-08-07 Gary Benson <gbenson@redhat.com>
12829
12830 * server.h: Do not include gdb/signals.h.
12831 * win32-low.c: Likewise.
12832
12833 2014-08-07 Gary Benson <gbenson@redhat.com>
12834
12835 * server.h: Do not include pathmax.h.
12836
12837 2014-08-07 Gary Benson <gbenson@redhat.com>
12838
12839 * server.h: Do not include libiberty.h.
12840 * linux-bfin-low.c: Likewise.
12841
12842 2014-08-07 Gary Benson <gbenson@redhat.com>
12843
12844 * server.h: Do not include ansidecl.h.
12845
12846 2014-08-07 Gary Benson <gbenson@redhat.com>
12847
12848 * linux-x86-low.c: Do not include stddef.h.
12849 * lynx-ppc-low.c: Likewise.
12850 * tracepoint.c: Likewise.
12851
12852 2014-08-07 Gary Benson <gbenson@redhat.com>
12853
12854 * server.h: Do not include stdarg.h.
12855 * nto-low.c: Likewise.
12856
12857 2014-08-07 Gary Benson <gbenson@redhat.com>
12858
12859 * server.h: Do not include stdlib.h.
12860 * inferiors.c: Likewise.
12861 * linux-low.c: Likewise.
12862 * regcache.c: Likewise.
12863 * spu-low.c: Likewise.
12864 * tracepoint.c: Likewise.
12865 * utils.c: Likewise.
12866
12867 2014-08-07 Gary Benson <gbenson@redhat.com>
12868
12869 * server.h: Do not include stdio.h.
12870 * linux-low.c: Likewise.
12871 * remote-utils.c: Likewise.
12872 * spu-low.c: Likewise.
12873 * utils.c: Likewise.
12874 * wincecompat.c: Likewise.
12875
12876 2014-08-06 Gary Benson <gbenson@redhat.com>
12877
12878 * regcache.c (init_register_cache): Move conditionals inside if.
12879
12880 2014-08-06 Gary Benson <gbenson@redhat.com>
12881
12882 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
12883
12884 2014-07-31 Gary Benson <gbenson@redhat.com>
12885
12886 * ax.h: Do not include server.h.
12887 * gdbthread.h: Likewise.
12888 * lynx-low.h: Likewise.
12889 * notif.h: Likewise.
12890
12891 2014-07-30 Gary Benson <gbenson@redhat.com>
12892
12893 * server.h: Include common-defs.h.
12894 Do not include config.h or build-gnulib-gdbserver/config.h.
12895
12896 2014-07-30 Gary Benson <gbenson@redhat.com>
12897
12898 * hostio-errno.c: Move server.h to top of includes list.
12899 * inferiors.c: Likewise.
12900 * linux-x86-low.c: Likewise.
12901 * notif.c: Include server.h.
12902
12903 2014-07-24 Tom Tromey <tromey@redhat.com>
12904 Gary Benson <gbenson@redhat.com>
12905
12906 * server.h (CORE_ADDR): Now unsigned.
12907
12908 2014-07-16 Pedro Alves <palves@redhat.com>
12909
12910 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
12911
12912 2014-07-15 Pedro Alves <palves@redhat.com>
12913
12914 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
12915 copy.
12916
12917 2014-07-11 Pedro Alves <palves@redhat.com>
12918
12919 * linux-low.c (kill_wait_lwp): New function, based on
12920 kill_one_lwp_callback, but use my_waitpid directly.
12921 (kill_one_lwp_callback, linux_kill): Use it.
12922
12923 2014-06-23 Pedro Alves <palves@redhat.com>
12924
12925 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
12926 before setting DR0..DR3.
12927
12928 2014-06-20 Gary Benson <gbenson@redhat.com>
12929
12930 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
12931 * configure: Regenerated.
12932 * config.in: Likewise.
12933
12934 2014-06-20 Gary Benson <gbenson@redhat.com>
12935
12936 * Makefile.in (SFILES): Update locations for files moved
12937 from common to nat.
12938 (object file files): Reordered.
12939
12940 2014-06-20 Gary Benson <gbenson@redhat.com>
12941
12942 * i386-low.h (i386_dr_low_can_set_addr): Removed.
12943 (i386_dr_low_set_addr): Likewise.
12944 (i386_dr_low_get_addr): Likewise.
12945 (i386_dr_low_can_set_control): Likewise.
12946 (i386_dr_low_set_control): Likewise.
12947 (i386_dr_low_get_control): Likewise.
12948 (i386_dr_low_get_status): Likewise.
12949 (i386_get_debug_register_length): Likewise.
12950 * linux-x86-low.c (i386_dr_low_set_addr):
12951 Changed signature. Made static.
12952 (i386_dr_low_get_addr): Likewise.
12953 (i386_dr_low_set_control): Likewise.
12954 (i386_dr_low_get_control): Likewise.
12955 (i386_dr_low_get_status): Likewise.
12956 (i386_dr_low): New global variable.
12957 * win32-i386-low.c (i386_dr_low_set_addr):
12958 Changed signature. Made static.
12959 (i386_dr_low_get_addr): Likewise.
12960 (i386_dr_low_set_control): Likewise.
12961 (i386_dr_low_get_control): Likewise.
12962 (i386_dr_low_get_status): Likewise.
12963 (i386_dr_low): New global variable.
12964
12965 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
12966
12967 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
12968 * Makefile.in (AR, AR_FLAGS): Define.
12969 * configure: Regenerate.
12970
12971 2014-06-19 Gary Benson <gbenson@redhat.com>
12972
12973 * Makefile.in (i386-dregs.o): New rule.
12974 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
12975 * i386-low.c (target.h): Remove include.
12976 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
12977 (DR_CONTROL_SHIFT): Likewise.
12978 (DR_CONTROL_SIZE): Likewise.
12979 (DR_RW_EXECUTE): Likewise.
12980 (DR_RW_WRITE): Likewise.
12981 (DR_RW_READ): Likewise.
12982 (DR_RW_IORW): Likewise.
12983 (DR_LEN_1): Likewise.
12984 (DR_LEN_2): Likewise.
12985 (DR_LEN_4): Likewise.
12986 (DR_LEN_8): Likewise.
12987 (DR_LOCAL_ENABLE_SHIFT): Likewise.
12988 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
12989 (DR_ENABLE_SIZE): Likewise.
12990 (DR_LOCAL_SLOWDOWN): Likewise.
12991 (DR_GLOBAL_SLOWDOWN): Likewise.
12992 (DR_CONTROL_RESERVED): Likewise.
12993 (I386_DR_CONTROL_MASK): Likewise.
12994 (I386_DR_VACANT): Likewise.
12995 (I386_DR_LOCAL_ENABLE): Likewise.
12996 (I386_DR_GLOBAL_ENABLE): Likewise.
12997 (I386_DR_DISABLE): Likewise.
12998 (I386_DR_SET_RW_LEN): Likewise.
12999 (I386_DR_GET_RW_LEN): Likewise.
13000 (I386_DR_WATCH_HIT): Likewise.
13001 (i386_wp_op_t): Likewise.
13002 (i386_show_dr): Likewise.
13003 (i386_length_and_rw_bits): Likewise.
13004 (i386_insert_aligned_watchpoint): Likewise.
13005 (i386_remove_aligned_watchpoint): Likewise.
13006 (i386_handle_nonaligned_watchpoint): Likewise.
13007 i386_update_inferior_debug_regs(): Likewise.
13008 (i386_dr_insert_watchpoint): Likewise.
13009 (i386_dr_remove_watchpoint): Likewise.
13010 (i386_dr_region_ok_for_watchpoint): Likewise.
13011 (i386_dr_stopped_data_address): Likewise.
13012 (i386_dr_stopped_by_watchpoint): Likewise.
13013
13014 2014-06-19 Gary Benson <gbenson@redhat.com>
13015
13016 * i386-low.c (i386_dr_show): Renamed to
13017 i386_show_dr and made static. All uses updated.
13018 (i386_dr_length_and_rw_bits): Renamed to
13019 i386_length_and_rw_bits and made static.
13020 All uses updated.
13021 (i386_dr_insert_aligned_watchpoint): Renamed to
13022 i386_insert_aligned_watchpoint and made static.
13023 All uses updated.
13024 (i386_dr_remove_aligned_watchpoint): Renamed to
13025 i386_remove_aligned_watchpoint and made static.
13026 All uses updated.
13027 (i386_dr_update_inferior_debug_regs): Renamed to
13028 i386_update_inferior_debug_regs and made static.
13029 All uses updated.
13030
13031 2014-06-18 Gary Benson <gbenson@redhat.com>
13032
13033 * i386-low.h (i386_dr_low_can_set_addr): New macro.
13034 (i386_dr_low_can_set_control): Likewise.
13035 (i386_get_debug_register_length): Likewise.
13036 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
13037 (i386_dr_low_can_set_control): Likewise.
13038 (i386_get_debug_register_length): Likewise.
13039
13040 2014-06-17 Gary Benson <gbenson@redhat.com>
13041
13042 * i386-low.h (i386-dregs.h): New include.
13043 (DR_FIRSTADDR): Now in i386-dregs.h.
13044 (DR_LASTADDR): Likewise.
13045 (DR_NADDR): Likewise.
13046 (DR_STATUS): Likewise.
13047 (DR_CONTROL): Likewise.
13048 (i386_debug_reg_state): Likewise.
13049 (i386_dr_insert_watchpoint): Likewise.
13050 (i386_dr_remove_watchpoint): Likewise.
13051 (i386_dr_region_ok_for_watchpoint): Likewise.
13052 (i386_dr_stopped_data_address): Likewise.
13053 (i386_dr_stopped_by_watchpoint): Likewise.
13054 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
13055
13056 2014-06-18 Gary Benson <gbenson@redhat.com>
13057
13058 * i386-low.h (i386_low_insert_watchpoint): Renamed to
13059 i386_dr_insert_watchpoint.
13060 (i386_low_remove_watchpoint): Renamed to
13061 i386_dr_remove_watchpoint.
13062 (i386_low_region_ok_for_watchpoint): Renamed to
13063 i386_dr_region_ok_for_watchpoint.
13064 (i386_low_stopped_data_address): Renamed to
13065 i386_dr_stopped_data_address.
13066 (i386_low_stopped_by_watchpoint): Renamed to
13067 i386_dr_stopped_by_watchpoint.
13068 * i386-low.c (i386_show_dr): Renamed to
13069 i386_dr_show and made nonstatic. All uses updated.
13070 (i386_length_and_rw_bits): Renamed to
13071 i386_dr_length_and_rw_bits and made nonstatic.
13072 All uses updated.
13073 (i386_insert_aligned_watchpoint): Renamed to
13074 i386_dr_insert_aligned_watchpoint and made nonstatic.
13075 All uses updated.
13076 (i386_remove_aligned_watchpoint): Renamed to
13077 i386_dr_remove_aligned_watchpoint and made nonstatic.
13078 All uses updated.
13079 (i386_update_inferior_debug_regs): Renamed to
13080 i386_dr_update_inferior_debug_regs and made nonstatic.
13081 All uses updated.
13082 (i386_low_insert_watchpoint): Renamed to
13083 i386_dr_insert_watchpoint. All uses updated.
13084 (i386_low_remove_watchpoint): Renamed to
13085 i386_dr_remove_watchpoint. All uses updated.
13086 (i386_low_region_ok_for_watchpoint): Renamed to
13087 i386_dr_region_ok_for_watchpoint. All uses updated.
13088 (i386_low_stopped_data_address): Renamed to
13089 i386_dr_stopped_data_address. All uses updated.
13090 (i386_low_stopped_by_watchpoint): Renamed to
13091 i386_dr_stopped_by_watchpoint. All uses updated.
13092
13093 2014-06-18 Gary Benson <gbenson@redhat.com>
13094
13095 * i386-low.c (i386_dr_low_can_set_addr): New macro.
13096 (i386_dr_low_can_set_control): Likewise.
13097 (i386_insert_aligned_watchpoint): New check.
13098
13099 2014-06-18 Gary Benson <gbenson@redhat.com>
13100
13101 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
13102 Renamed to state.
13103
13104 2014-06-18 Gary Benson <gbenson@redhat.com>
13105
13106 * i386-low.c (i386_length_and_rw_bits): Use internal_error
13107 instead of fatal and error.
13108 (i386_handle_nonaligned_watchpoint): Likewise.
13109
13110 2014-06-18 Gary Benson <gbenson@redhat.com>
13111
13112 * i386-low.c (i386_get_debug_register_length): New macro.
13113 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
13114 (i386_show_dr): Use debug_printf instead of fprintf. Use
13115 phex to format values.
13116
13117 2014-06-18 Gary Benson <gbenson@redhat.com>
13118
13119 * i386-low.h: Comment changes.
13120 * i386-low.c: Likewise.
13121
13122 2014-06-18 Gary Benson <gbenson@redhat.com>
13123
13124 * i386-low.c: Whitespace changes.
13125
13126 2014-06-12 Tom Tromey <tromey@redhat.com>
13127
13128 * utils.c (freeargv): Remove.
13129
13130 2014-06-12 Tom Tromey <tromey@redhat.com>
13131
13132 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
13133 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
13134 (parse_debug_format_options): Likewise.
13135 (gdbserver_usage): Likewise.
13136 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
13137 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
13138 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
13139 against libiberty.
13140 ($(LIBGNU)): Depend on libiberty.
13141 (all-lib): Recurse into all subdirs.
13142 (install-only): Invoke "install" target in subdirs.
13143 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
13144 targets.
13145 * configure: Rebuild.
13146 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
13147 for vasprintf, vsnprintf, or gettimeofday.
13148 * configure.srv: Don't add safe-ctype.o or lbasename.o to
13149 srv_tgtobj.
13150
13151 2014-06-05 Joel Brobecker <brobecker@adacore.com>
13152
13153 * development.sh: Delete.
13154 * Makefile.in (config.status): Adjust dependency on development.sh.
13155 * configure.ac: Adjust development.sh source call.
13156 * configure: Regenerate.
13157
13158 2014-06-02 Pedro Alves <palves@redhat.com>
13159
13160 * ax.c (gdb_free_agent_expr): New function.
13161 * ax.h (gdb_free_agent_expr): New declaration.
13162 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
13163 list.
13164 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
13165 static.
13166 (clear_breakpoint_conditions_and_commands): New function.
13167 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
13168 (clear_breakpoint_conditions_and_commands): New declaration.
13169
13170 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
13171
13172 * linux-aarch64-low.c (asm/ptrace.h): Include.
13173
13174 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13175
13176 Fix TLS access for -static -pthread.
13177 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
13178 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
13179 (thread_db_load_search, try_thread_db_load_1): Initialize it.
13180
13181 2014-05-20 Pedro Alves <palves@redhat.com>
13182
13183 * linux-aarch64-low.c (aarch64_insert_point)
13184 (aarch64_remove_point): No longer check whether the type is
13185 supported here. Adjust to new interface.
13186 (the_low_target): Install aarch64_supports_z_point_type as
13187 supports_z_point_type method.
13188 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
13189 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
13190 instead of a Z packet char. Adjust.
13191 (arm_supports_z_point_type): New function.
13192 (arm_insert_point, arm_remove_point): Adjust to new interface.
13193 (the_low_target): Install arm_supports_z_point_type.
13194 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
13195 (cris_insert_point, cris_remove_point): Adjust to new interface.
13196 Don't check whether the type is supported here.
13197 (the_low_target): Install cris_supports_z_point_type.
13198 * linux-low.c (linux_supports_z_point_type): New function.
13199 (linux_insert_point, linux_remove_point): Adjust to new interface.
13200 * linux-low.h (struct linux_target_ops) <insert_point,
13201 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
13202 raw_breakpoint pointer parameter.
13203 <supports_z_point_type>: New method.
13204 * linux-mips-low.c (mips_supports_z_point_type): New function.
13205 (mips_insert_point, mips_remove_point): Adjust to new interface.
13206 Use mips_supports_z_point_type.
13207 (the_low_target): Install mips_supports_z_point_type.
13208 * linux-ppc-low.c (the_low_target): Install NULL as
13209 supports_z_point_type method.
13210 * linux-s390-low.c (the_low_target): Install NULL as
13211 supports_z_point_type method.
13212 * linux-sparc-low.c (the_low_target): Install NULL as
13213 supports_z_point_type method.
13214 * linux-x86-low.c (x86_supports_z_point_type): New function.
13215 (x86_insert_point): Adjust to new insert_point interface. Use
13216 insert_memory_breakpoint. Adjust to new
13217 i386_low_insert_watchpoint interface.
13218 (x86_remove_point): Adjust to remove_point interface. Use
13219 remove_memory_breakpoint. Adjust to new
13220 i386_low_remove_watchpoint interface.
13221 (the_low_target): Install x86_supports_z_point_type.
13222 * lynx-low.c (lynx_target_ops): Install NULL as
13223 supports_z_point_type callback.
13224 * nto-low.c (nto_supports_z_point_type): New.
13225 (nto_insert_point, nto_remove_point): Adjust to new interface.
13226 (nto_target_ops): Install nto_supports_z_point_type.
13227 * mem-break.c: Adjust intro comment.
13228 (struct raw_breakpoint) <raw_type, size>: New fields.
13229 <inserted>: Update comment.
13230 <shlib_disabled>: Delete field.
13231 (enum bkpt_type) <gdb_breakpoint>: Delete value.
13232 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
13233 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
13234 (raw_bkpt_type_to_target_hw_bp_type): New function.
13235 (find_enabled_raw_code_breakpoint_at): New function.
13236 (find_raw_breakpoint_at): New type and size parameters. Use them.
13237 (insert_memory_breakpoint): New function, based off
13238 set_raw_breakpoint_at.
13239 (remove_memory_breakpoint): New function.
13240 (set_raw_breakpoint_at): Reimplement.
13241 (set_breakpoint): New, based on set_breakpoint_at.
13242 (set_breakpoint_at): Reimplement.
13243 (delete_raw_breakpoint): Go through the_target->remove_point
13244 instead of assuming memory breakpoints.
13245 (find_gdb_breakpoint_at): Delete.
13246 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
13247 (find_gdb_breakpoint): New function.
13248 (set_gdb_breakpoint_at): Delete.
13249 (z_type_supported): New function.
13250 (set_gdb_breakpoint_1): New function, loosely based off
13251 set_gdb_breakpoint_at.
13252 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
13253 (delete_gdb_breakpoint_at): Delete.
13254 (delete_gdb_breakpoint_1): New function, loosely based off
13255 delete_gdb_breakpoint_at.
13256 (delete_gdb_breakpoint): New function.
13257 (clear_gdb_breakpoint_conditions): Rename to ...
13258 (clear_breakpoint_conditions): ... this. Don't handle a NULL
13259 breakpoint.
13260 (add_condition_to_breakpoint): Make static.
13261 (add_breakpoint_condition): Take a struct breakpoint pointer
13262 instead of an address. Adjust.
13263 (gdb_condition_true_at_breakpoint): Rename to ...
13264 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
13265 z_type parameter.
13266 (gdb_condition_true_at_breakpoint): Reimplement.
13267 (add_breakpoint_commands): Take a struct breakpoint pointer
13268 instead of an address. Adjust.
13269 (gdb_no_commands_at_breakpoint): Rename to ...
13270 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
13271 parameter. Return true if no breakpoint was found. Change debug
13272 output.
13273 (gdb_no_commands_at_breakpoint): Reimplement.
13274 (run_breakpoint_commands): Rename to ...
13275 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
13276 and change return type to boolean.
13277 (run_breakpoint_commands): New function.
13278 (gdb_breakpoint_here): Also check for Z1 breakpoints.
13279 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
13280 breakpoint. Go through the_target->remove_point instead of
13281 assuming memory breakpoint.
13282 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
13283 software and hardware breakpoints.
13284 (reinsert_raw_breakpoint): Go through the_target->insert_point
13285 instead of assuming memory breakpoint.
13286 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
13287 software and hardware breakpoints.
13288 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
13289 Check both software and hardware breakpoints.
13290 (validate_inserted_breakpoint): Assert the breakpoint is a
13291 software breakpoint. Set the inserted flag to -1 instead of
13292 setting shlib_disabled.
13293 (delete_disabled_breakpoints): Adjust.
13294 (validate_breakpoints): Only validate software breakpoints.
13295 Adjust to inserted flag change.
13296 (check_mem_read, check_mem_write): Skip breakpoint types other
13297 than software breakpoints. Adjust to inserted flag change.
13298 * mem-break.h (enum raw_bkpt_type): New enum.
13299 (raw_breakpoint, struct process_info): Forward declare.
13300 (Z_packet_to_target_hw_bp_type): Delete declaration.
13301 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
13302 (set_gdb_breakpoint, delete_gdb_breakpoint)
13303 (clear_breakpoint_conditions): New declarations.
13304 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
13305 (breakpoint_inserted_here): Update comment.
13306 (add_breakpoint_condition, add_breakpoint_commands): Replace
13307 address parameter with a breakpoint pointer parameter.
13308 (gdb_breakpoint_here): Update comment.
13309 (delete_gdb_breakpoint_at): Delete.
13310 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
13311 * server.c (process_point_options): Take a struct breakpoint
13312 pointer instead of an address. Adjust.
13313 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
13314 delete_gdb_breakpoint.
13315 * spu-low.c (spu_target_ops): Install NULL as
13316 supports_z_point_type method.
13317 * target.h: Include mem-break.h.
13318 (struct target_ops) <prepare_to_access_memory>: Update comment.
13319 <supports_z_point_type>: New field.
13320 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
13321 instead of a char. Also take a raw breakpoint pointer.
13322 * win32-arm-low.c (the_low_target): Install NULL as
13323 supports_z_point_type.
13324 * win32-i386-low.c (i386_supports_z_point_type): New function.
13325 (i386_insert_point, i386_remove_point): Adjust to new interface.
13326 (the_low_target): Install i386_supports_z_point_type.
13327 * win32-low.c (win32_supports_z_point_type): New function.
13328 (win32_insert_point, win32_remove_point): Adjust to new interface.
13329 (win32_target_ops): Install win32_supports_z_point_type.
13330 * win32-low.h (struct win32_target_ops):
13331 <supports_z_point_type>: New method.
13332 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
13333 instead of a char. Also take a raw breakpoint pointer.
13334
13335 2014-05-20 Pedro Alves <palves@redhat.com>
13336
13337 * mem-break.h: Include break-common.h.
13338 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
13339 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
13340 (Z_packet_to_target_hw_bp_type): New declaration.
13341 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
13342 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
13343 (Z_PACKET_ACCESS_WP): Delete macros.
13344 (Z_packet_to_hw_type): Delete function.
13345 * i386-low.h: Don't include break-common.h here.
13346 (Z_packet_to_hw_type): Delete declaration.
13347 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
13348 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
13349 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
13350 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
13351 * linux-aarch64-low.c: Don't include break-common.h here.
13352 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
13353 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
13354 (Z_packet_to_target_hw_bp_type): Delete function.
13355 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
13356 function.
13357 (mips_insert_point, mips_remove_point): Use
13358 Z_packet_to_target_hw_bp_type.
13359
13360 2014-05-20 Pedro Alves <palves@redhat.com>
13361
13362 * linux-aarch64-low.c: Include break-common.h.
13363 (enum target_point_type): Delete.
13364 (Z_packet_to_point_type): Rename to ...
13365 (Z_packet_to_target_hw_bp_type): ... this, and return a
13366 target_hw_bp_type instead.
13367 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
13368 instead of an enum target_point_type.
13369 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
13370 breakpoint type.
13371 (aarch64_dr_state_insert_one_point)
13372 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
13373 (aarch64_handle_aligned_watchpoint)
13374 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
13375 Take an enum target_hw_bp_type instead of an enum
13376 target_point_type.
13377 (aarch64_supports_z_point_type): New function.
13378 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
13379 use Z_packet_to_target_hw_bp_type.
13380
13381 2014-05-20 Joel Brobecker <brobecker@adacore.com>
13382
13383 * configure.ac: Only use -Werror by default when DEVELOPMENT
13384 is true.
13385 * configure: Regenerate.
13386
13387 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
13388
13389 Fix gdbserver qGetTLSAddr for x86_64 -m32.
13390 * linux-x86-low.c (X86_64_USER_REGS): New.
13391 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
13392
13393 2014-04-28 Yao Qi <yao@codesourcery.com>
13394
13395 * Makefile.in (i386-avx512.c): Fix the typo of generated file
13396 name.
13397
13398 2014-04-25 Pedro Alves <palves@redhat.com>
13399
13400 PR server/16255
13401 * linux-low.c (linux_attach_fail_reason_string): New function.
13402 (linux_attach_lwp): Delete.
13403 (linux_attach_lwp_1): Rename to ...
13404 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
13405 argument. Remove "initial" parameter. Return int instead of
13406 void. Don't error or warn here.
13407 (linux_attach): Adjust to call linux_attach_lwp. Call error on
13408 failure to attach to the tgid. Call warning when failing to
13409 attach to an lwp.
13410 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
13411 argument. Remove "initial" parameter. Return int instead of
13412 void. Don't error or warn here.
13413 (linux_attach_fail_reason_string): New declaration.
13414 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
13415 interface change. Use linux_attach_fail_reason_string.
13416
13417 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
13418 Walfred Tedeschi <walfred.tedeschi@intel.com>
13419
13420 * Makefile.in: Added rules to handle new files
13421 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
13422 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
13423 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
13424 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
13425 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
13426 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
13427 x32-avx512-linux.o.
13428 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
13429 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
13430 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
13431 i386/x32-avx512.xml.
13432 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
13433 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
13434 i386/x32-avx512-linux.xml.
13435 * i387-fp.c (num_avx512_k_registers): New constant for number
13436 of K registers.
13437 (num_avx512_zmmh_low_registers): New constant for number of
13438 lower ZMM registers (0-15).
13439 (num_avx512_zmmh_high_registers): New constant for number of
13440 higher ZMM registers (16-31).
13441 (num_avx512_ymmh_registers): New contant for number of higher
13442 YMM registers (ymm16-31 added by avx521 on x86_64).
13443 (num_avx512_xmm_registers): New constant for number of higher
13444 XMM registers (xmm16-31 added by AVX512 on x86_64).
13445 (struct i387_xsave): Add space for AVX512 registers.
13446 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
13447 Add code to handle AVX512 registers.
13448 (i387_xsave_to_cache): Add code to handle AVX512 registers.
13449 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
13450 prototypei from generated file.
13451 (tdesc_amd64_avx512_linux): Likewise.
13452 (init_registers_x32_avx512_linux): Likewise.
13453 (tdesc_x32_avx512_linux): Likewise.
13454 (init_registers_i386_avx512_linux): Likewise.
13455 (tdesc_i386_avx512_linux): Likewise.
13456 (x86_64_regmap): Add AVX512 registers.
13457 (x86_linux_read_description): Add code to handle AVX512 XSTATE
13458 mask.
13459 (initialize_low_arch): Add code to initialize AVX512 registers.
13460
13461 2014-04-23 Pedro Alves <palves@redhat.com>
13462
13463 * mem-break.c (find_gdb_breakpoint_at): Make static.
13464 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
13465
13466 2014-04-23 Pedro Alves <palves@redhat.com>
13467
13468 * i386-low.c: Don't include break-common.h here.
13469 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
13470 prototype to take target_hw_bp_type as argument instead of a Z
13471 packet char.
13472 * i386-low.h: Include break-common.h here.
13473 (Z_packet_to_hw_type): Declare.
13474 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
13475 prototypes.
13476 * linux-x86-low.c (x86_insert_point): Convert the packet number to
13477 a target_hw_bp_type before calling i386_low_insert_watchpoint.
13478 (x86_remove_point): Convert the packet number to a
13479 target_hw_bp_type before calling i386_low_remove_watchpoint.
13480 * win32-i386-low.c (i386_insert_point): Convert the packet number
13481 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
13482 (i386_remove_point): Convert the packet number to a
13483 target_hw_bp_type before calling i386_low_remove_watchpoint.
13484
13485 2014-04-23 Pedro Alves <palves@redhat.com>
13486
13487 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
13488
13489 2014-04-10 Pedro Alves <palves@redhat.com>
13490
13491 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
13492 Check if the condition or command is NULL before checking if the
13493 breakpoint is known. On success, return true.
13494 * mem-break.h (add_breakpoint_condition): Document return.
13495 (add_breakpoint_commands): Add describing comment.
13496 * server.c (skip_to_semicolon): New function.
13497 (process_point_options): Use it.
13498
13499 2014-04-09 Pedro Alves <palves@redhat.com>
13500
13501 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
13502 to lwpid_of.
13503
13504 2014-02-27 Pedro Alves <palves@redhat.com>
13505
13506 PR 12702
13507 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
13508 macros.
13509 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
13510 output.
13511 (last_thread_of_process_p): Take a PID argument instead of a
13512 thread pointer.
13513 (linux_wait_for_lwp): Delete.
13514 (num_lwps, check_zombie_leaders, not_stopped_callback): New
13515 functions.
13516 (linux_low_filter_event): New function, party factored out from
13517 linux_wait_for_event.
13518 (linux_wait_for_event): Rename to ...
13519 (linux_wait_for_event_filtered): ... this. Add new filter ptid
13520 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
13521 sigsuspend. Check for zombie leaders.
13522 (linux_wait_for_event): Reimplement as wrapper around
13523 linux_wait_for_event_filtered.
13524 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
13525 a normal or signal exit is seen, it's the whole process exiting.
13526 (wait_for_sigstop): No longer a for_each_inferior callback.
13527 Rewrite on top of linux_wait_for_event_filtered.
13528 (stop_all_lwps): Call wait_for_sigstop directly.
13529 * server.c (resume, handle_target_event): Handle
13530 TARGET_WAITKIND_NO_RESUMED.
13531
13532 2014-02-26 Joel Brobecker <brobecker@adacore.com>
13533
13534 * win32-low.c (psapi_get_dll_name,
13535 * win32_CreateToolhelp32Snapshot): Delete.
13536 (win32_CreateToolhelp32Snapshot, win32_Module32First)
13537 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
13538 Delete.
13539 (handle_load_dll): Add function description.
13540 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
13541
13542 2014-02-26 Joel Brobecker <brobecker@adacore.com>
13543
13544 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
13545 Add comment.
13546 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
13547 base address when calling win32_add_one_solib.
13548 (handle_load_dll): Delete local variable load_addr.
13549 Remove 0x1000 offset applied to DLL base address when calling
13550 win32_add_one_solib.
13551 (handle_unload_dll): Add comment.
13552
13553 2014-02-26 Joel Brobecker <brobecker@adacore.com>
13554
13555 * win32-low.c (win32_add_all_dlls): Renames
13556 win32_ensure_ntdll_loaded. Rewrite function documentation.
13557 Adjust implementation to always load all DLLs.
13558 Add 0x1000 offset to DLL base address when calling
13559 win32_add_one_solib.
13560 (child_initialization_done): New static global.
13561 (do_initial_child_stuff): Set child_initialization_done to
13562 zero during child initialization, and 1 after. Replace call
13563 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
13564 Add comment.
13565 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
13566 (handle_unload_dll): Add function documentation.
13567 (get_child_debug_event): Ignore load and unload DLL events
13568 during child initialization.
13569
13570 2014-02-20 Doug Evans <dje@google.com>
13571
13572 Remove global all_lwps.
13573 * inferiors.h (ptid_of): Move here from linux-low.h.
13574 (pid_of, lwpid_of): Ditto.
13575 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
13576 parameter is a struct thread_info * now.
13577 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
13578 directly. Pass &all_threads to find_inferior instead of &all_lwps.
13579 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
13580 directly.
13581 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
13582 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
13583 * linux-arm-low.c (update_registers_callback): Update, "entry"
13584 parameter is a struct thread_info * now.
13585 Fetch lwpid from current_inferior directly.
13586 (arm_insert_point): Pass &all_threads to find_inferior instead of
13587 &all_lwps.
13588 (arm_remove_point): Ditto.
13589 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
13590 (arm_prepare_to_resume): Fetch pid from thread.
13591 (arm_read_description): Fetch lwpid from current_inferior directly.
13592 * linux-low.c (all_lwps): Delete.
13593 (delete_lwp): Delete call to remove_inferior.
13594 (handle_extended_wait): Fetch lwpid from thread.
13595 (add_lwp): Don't set lwp->entry.id. Remove call to
13596 add_inferior_to_list.
13597 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
13598 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
13599 (kill_one_lwp_callback): Ditto.
13600 (linux_kill): Don't dereference NULL pointer.
13601 Fetch ptid,lwpid from thread.
13602 (get_detach_signal): Fetch ptid from thread.
13603 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
13604 Simplify call to regcache_invalidate_thread.
13605 (delete_lwp_callback): Update, "entry" parameter is a
13606 struct thread_info * now. Fetch pid from thread.
13607 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
13608 (status_pending_p_callback): Update, "entry" parameter is a
13609 struct thread_info * now. Fetch ptid from thread.
13610 (find_lwp_pid): Update, "entry" parameter is a
13611 struct thread_info * now.
13612 (linux_wait_for_lwp): Fetch pid from thread.
13613 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
13614 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
13615 (enqueue_one_deferred_signal): Fetch lwpid from thread.
13616 (dequeue_one_deferred_signal): Ditto.
13617 (cancel_breakpoint): Fetch ptid from current_inferior.
13618 (linux_wait_for_event): Pass &all_threads to find_inferior,
13619 not &all_lwps. Fetch ptid, lwpid from thread.
13620 (count_events_callback): Update, "entry" parameter is a
13621 struct thread_info * now.
13622 (select_singlestep_lwp_callback): Ditto.
13623 (select_event_lwp_callback): Ditto.
13624 (cancel_breakpoints_callback): Ditto.
13625 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
13626 not &all_lwps.
13627 (select_event_lwp): Ditto. Fetch ptid from event_thread.
13628 (unsuspend_one_lwp): Update, "entry" parameter is a
13629 struct thread_info * now.
13630 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
13631 not &all_lwps.
13632 (linux_stabilize_threads): Ditto. And for for_each_inferior.
13633 Fetch lwpid from thread, not lwp.
13634 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
13635 Pass &all_threads to find_inferior, not &all_lwps.
13636 (send_sigstop): Fetch lwpid from thread, not lwp.
13637 (send_sigstop_callback): Update, "entry" parameter is a
13638 struct thread_info * now.
13639 (suspend_and_send_sigstop_callback): Ditto.
13640 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
13641 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
13642 struct thread_info * now.
13643 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
13644 from thread, lwp.
13645 (lwp_running): Update, "entry" parameter is a
13646 struct thread_info * now.
13647 (stop_all_lwps): Fetch ptid from thread.
13648 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
13649 (linux_resume_one_lwp): Fetch lwpid from thread.
13650 (linux_set_resume_request): Update, "entry" parameter is a
13651 struct thread_info * now. Fetch pid, lwpid from thread.
13652 (resume_status_pending_p): Update, "entry" parameter is a
13653 struct thread_info * now.
13654 (need_step_over_p): Ditto. Fetch lwpid from thread.
13655 (start_step_over): Fetch lwpid from thread.
13656 (linux_resume_one_thread): Update, "entry" parameter is a
13657 struct thread_info * now. Fetch lwpid from thread.
13658 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
13659 (proceed_one_lwp): Update, "entry" parameter is a
13660 struct thread_info * now. Fetch lwpid from thread.
13661 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
13662 struct thread_info * now.
13663 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
13664 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
13665 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
13666 directly.
13667 (regsets_store_inferior_registers): Ditto.
13668 (fetch_register, store_register): Ditto.
13669 (linux_read_memory, linux_write_memory): Ditto.
13670 (linux_request_interrupt): Ditto.
13671 (linux_read_auxv): Ditto.
13672 (linux_xfer_siginfo): Ditto.
13673 (linux_qxfer_spu): Ditto.
13674 (linux_qxfer_libraries_svr4): Ditto.
13675 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
13676 moved to inferiors.h.
13677 (get_lwp): Delete.
13678 (get_thread_lwp): Update.
13679 (struct lwp_info): Delete member "entry". Simplify comment for
13680 member "thread".
13681 (all_lwps): Delete.
13682 * linux-mips-low.c (mips_read_description): Fetch lwpid from
13683 current_inferior directly.
13684 (update_watch_registers_callback): Update, "entry" parameter is a
13685 struct thread_info * now. Fetch pid from thread.
13686 (mips_linux_prepare_to_resume): Fetch ptid from thread.
13687 (mips_insert_point): Fetch lwpid from current_inferior.
13688 Pass &all_threads to find_inferior, not &all_lwps.
13689 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
13690 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
13691 directly.
13692 (mips_stopped_data_address): Ditto.
13693 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
13694 directly.
13695 * linux-tile-low.c (tile_arch_setup): Ditto.
13696 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
13697 (update_debug_registers_callback): Update, "entry" parameter is a
13698 struct thread_info * now. Fetch pid from thread.
13699 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
13700 Pass &all_threads to find_inferior, not &all_lwps.
13701 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
13702 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
13703 Pass &all_threads to find_inferior, not &all_lwps.
13704 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
13705 (i386_dr_low_get_status): Ditto.
13706 (x86_linux_prepare_to_resume): Fetch ptid from thread.
13707 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
13708 (x86_linux_read_description): Ditto.
13709 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
13710
13711 2014-02-20 Doug Evans <dje@google.com>
13712
13713 * inferiors.c (get_first_inferior): Fix buglet.
13714
13715 2014-02-19 Doug Evans <dje@google.com>
13716
13717 * gdbthread.h (add_thread): Change result type to struct thread_info *.
13718 * inferiors.c (add_thread): Change result type to struct thread_info *.
13719 All callers updated.
13720 (add_lwp): Call add_thread here instead of in callers.
13721 All callers updated.
13722 * linux-low.h (get_lwp_thread): Rewrite.
13723 (struct lwp_info): New member "thread".
13724
13725 2014-02-19 Doug Evans <dje@google.com>
13726
13727 * linux-low.c (add_lwp): Change result to struct lwp_info *.
13728 All callers updated.
13729
13730 2014-02-19 Doug Evans <dje@google.com>
13731
13732 * inferiors.c (add_thread): Fix whitespace.
13733
13734 2014-02-19 Doug Evans <dje@google.com>
13735
13736 * dll.c (clear_dlls): Replace accessing list implemention details
13737 with API function.
13738 * gdbthread.h (get_first_thread): Declare.
13739 * inferiors.c (for_each_inferior_with_data): New function.
13740 (get_first_thread): New function.
13741 (find_thread_ptid): Simplify.
13742 (get_first_inferior): New function.
13743 (clear_list): Delete.
13744 (one_inferior_p): New function.
13745 (clear_inferior_list): New function.
13746 (clear_inferiors): Update.
13747 * inferiors.h (for_each_inferior_with_data): Declare.
13748 (clear_inferior_list): Declare.
13749 (one_inferior_p): Declare.
13750 (get_first_inferior): Declare.
13751 * linux-low.c (linux_wait_for_event): Replace accessing list
13752 implemention details with API function.
13753 * server.c (target_running): Ditto.
13754 (accumulate_file_name_length): New function.
13755 (emit_dll_description): New function.
13756 (handle_qxfer_libraries): Replace accessing list implemention
13757 details with API function.
13758 (handle_qxfer_threads_worker): New function.
13759 (handle_qxfer_threads_proper): Replace accessing list implemention
13760 details with API function.
13761 (handle_query): Ditto.
13762 (visit_actioned_threads_callback_ftype): New typedef.
13763 (visit_actioned_threads_data): New struct.
13764 (visit_actioned_threads): Rewrite to be find_inferior callback.
13765 (resume): Call find_inferior.
13766 (handle_status): Replace accessing list implemention
13767 details with API function.
13768 (process_serial_event): Replace accessing list implemention details
13769 with API function.
13770 * target.c (set_desired_inferior): Replace accessing list implemention
13771 details with API function.
13772 * tracepoint.c (same_process_p): New function.
13773 (gdb_agent_about_to_close): Replace accessing list implemention
13774 details with API function.
13775 * win32-low.c (child_delete_thread): Replace accessing list
13776 implemention details with API function.
13777 (match_dll_by_basename): New function.
13778 (dll_is_loaded_by_basename): New function.
13779 (win32_ensure_ntdll_loaded): Replace accessing list implemention
13780 details call to dll_is_loaded_by_basename.
13781
13782 2014-02-19 Doug Evans <dje@google.com>
13783
13784 * dll.h (struct dll_info): Add comment.
13785 * gdbthread.h (struct thread_info): Add comment.
13786 (current_ptid): Simplify.
13787 * inferiors.c (add_process): Update.
13788 (remove_process): Update.
13789 * inferiors.h (struct process_info): Rename member "head" to "entry".
13790 * linux-low.c (delete_lwp): Update.
13791 (add_lwp): Update.
13792 (last_thread_of_process_p): Update.
13793 (kill_one_lwp_callback, linux_kill): Update.
13794 (status_pending_p_callback): Update.
13795 (wait_for_sigstop): Update. Simplify read of ptid.
13796 (start_step_over): Update.
13797 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
13798 (get_lwp_thread): Update.
13799 (struct lwp_info): Rename member "head" to "entry".
13800 * regcache.h (inferior_list_entry): Delete.
13801 * server.c (kill_inferior_callback): Update.
13802 (detach_or_kill_inferior_callback): Update.
13803 (print_started_pid): Update.
13804 (print_attached_pid): Update.
13805 (process_serial_event): Simplify read of ptid.
13806 * thread-db.c (thread_db_create_event): Update.
13807 (thread_db_get_tls_address): Update.
13808 * win32-low.c (current_inferior_ptid): Simplify.
13809
13810 2014-02-19 Tom Tromey <tromey@redhat.com>
13811
13812 * target.h (struct target_ops) <supports_btrace>: Add target_ops
13813 argument.
13814 (target_supports_btrace): Update.
13815
13816 2014-02-14 Yao Qi <yao@codesourcery.com>
13817
13818 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
13819 (rsp-low-ipa.o): New target.
13820
13821 2014-02-12 Tom Tromey <tromey@redhat.com>
13822
13823 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
13824 convert_ascii_to_int.
13825 * regcache.c (registers_to_string): Likewise.
13826 * remote-utils.c (decode_M_packet): Likewise.
13827 * server.c (process_serial_event): Likewise.
13828
13829 2014-02-12 Tom Tromey <tromey@redhat.com>
13830
13831 * server.c (handle_query, handle_v_run): Use hex2bin, not
13832 unhexify.
13833 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
13834
13835 2014-02-12 Tom Tromey <tromey@redhat.com>
13836
13837 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
13838 convert_int_to_ascii.
13839 * regcache.c (registers_to_string, collect_register_as_string):
13840 Likewise.
13841 * remote-utils.c (look_up_one_symbol, relocate_instruction):
13842 Likewise.
13843 * server.c (process_serial_event): Likewise.
13844 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
13845 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
13846
13847 2014-02-12 Tom Tromey <tromey@redhat.com>
13848
13849 * remote-utils.c (look_up_one_symbol, monitor_output): Use
13850 bin2hex, not hexify.
13851 * tracepoint.c (cmd_qtstatus): Likewise.
13852
13853 2014-02-12 Tom Tromey <tromey@redhat.com>
13854
13855 * remote-utils.c (monitor_output): Pass explicit length to
13856 hexify.
13857
13858 2014-02-12 Tom Tromey <tromey@redhat.com>
13859
13860 * tracepoint.c: Include rsp-low.h.
13861 * server.c: Include rsp-low.h.
13862 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
13863 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
13864 declare.
13865 * remote-utils.c: Include rsp-low.h.
13866 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
13867 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
13868 (convert_int_to_ascii, convert_ascii_to_int): Move to
13869 common/rsp-low.c.
13870 * regcache.c: Include rsp-low.h.
13871 * ax.c: Include rsp-low.h.
13872 * Makefile.in (SFILES): Add common/rsp-low.c.
13873 (OBS): Add rsp-low.o.
13874 (rsp-low.o): New target.
13875
13876 2014-02-12 Tom Tromey <tromey@redhat.com>
13877
13878 * utils.h (pulongest, plongest, phex_nz): Don't declare.
13879 Include print-utils.h.
13880 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
13881 (plongest, thirty_two, phex_nz): Remove.
13882 * Makefile.in (SFILES): Add common/print-utils.c.
13883 (OBS): Add print-utils.o.
13884 (print-utils-ipa.o): New target.
13885 (print-utils.o): New target.
13886 (IPA_OBJS): Add print-utils-ipa.o.
13887
13888 2014-02-06 Tom Tromey <tromey@redhat.com>
13889
13890 * Makefile.in (SFILES): Fix indentation.
13891
13892 2014-02-05 Doug Evans <dje@google.com>
13893
13894 * linux-low.c (linux_wait_for_event): Improve comment.
13895 (linux_wait_1): Keep current_inferior in sync with event_child.
13896
13897 2014-01-22 Doug Evans <dje@google.com>
13898
13899 * gdbthread.h (gdb_id_to_thread): Delete, unused.
13900
13901 2014-01-22 Doug Evans <dje@google.com>
13902
13903 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
13904 * configure: Regenerate.
13905 * config.in: Regenerate.
13906 * Makefile.in (SFILES): Add debug.c.
13907 (OBS): Add debug.o.
13908 * debug.c: New file.
13909 * debug.h: New file.
13910 * linux-aarch64-low.c (*): Update all debugging printfs to use
13911 debug_printf instead of fprintf.
13912 * linux-arm-low.c (*): Ditto.
13913 * linux-cris-low.c (*): Ditto.
13914 * linux-crisv32-low.c (*): Ditto.
13915 * linux-m32r-low.c (*): Ditto.
13916 * linux-sparc-low.c (*): Ditto.
13917 * linux-x86.c (*): Ditto.
13918 * linux-low.c (*): Ditto.
13919 (linux_wait_1): Add calls to debug_enter, debug_exit.
13920 (linux_wait): Remove redundant debugging printf.
13921 (stop_all_lwps): Add calls to debug_enter, debug_exit.
13922 (linux_resume, unstop_all_lwps): Ditto.
13923 * mem-break.c (*): Update all debugging printfs to use
13924 debug_printf instead of fprintf.
13925 * remote-utils.c (*): Ditto.
13926 * thread-db.c (*): Ditto.
13927 * server.c #include <ctype.h>, "gdb_vecs.h".
13928 (debug_threads): Moved to debug.c.
13929 (*): Update all debugging printfs to use debug_printf instead of
13930 fprintf.
13931 (start_inferior): Replace call to fflush with call to debug_flush.
13932 (monitor_show_help): Mention set debug-format.
13933 (parse_debug_format_options): New function.
13934 (handle_monitor_command): Handle "monitor set debug-format".
13935 (gdbserver_usage): Mention --debug-format.
13936 (main): Parse --debug-format.
13937 * server.h (debug_threads): Declaration moved to debug.h.
13938 #include "debug.h".
13939 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
13940 trace_debug_1 that uses debug_printf.
13941 (tracepoint_look_up_symbols): Update all debugging printfs to use
13942 debug_printf instead of fprintf.
13943
13944 2014-01-20 Baruch Siach <baruch@tkos.co.il>
13945
13946 * linux-xtensa-low.c: Include asm/ptrace.h instead of
13947 sys/ptrace.h.
13948
13949 2014-01-17 Pedro Alves <palves@redhat.com>
13950
13951 PR build/16445
13952 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
13953 defined after including gdb_proc_service.h.
13954
13955 2014-01-16 Doug Evans <dje@google.com>
13956
13957 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
13958 (match_dll): Use it.
13959
13960 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
13961
13962 * target.h (target_ops) <read_btrace>: Change parameters and
13963 return type to allow error reporting.
13964 * server.c (handle_qxfer_btrace): Support delta reads. Pass
13965 trace reading errors on.
13966 * linux-low.c (linux_low_read_btrace): Pass trace reading
13967 errors on.
13968 (linux_low_disable_btrace): New.
13969
13970 2014-01-15 Doug Evans <dje@google.com>
13971
13972 * inferiors.c (thread_id_to_gdb_id): Delete.
13973 * inferiors.h (thread_id_to_gdb_id): Delete.
13974
13975 2014-01-13 Eli Zaretskii <eliz@gnu.org>
13976
13977 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
13978 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
13979 versions.
13980
13981 2014-01-08 Pedro Alves <palves@redhat.com>
13982
13983 * server.c (handle_status): Don't discard previous queued stop
13984 replies or thread's pending status here.
13985 (main) <disconnection>: Do it here instead.
13986
13987 2014-01-08 Pedro Alves <palves@redhat.com>
13988
13989 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
13990 * server.c (visit_actioned_threads, handle_pending_status): New
13991 function.
13992 (handle_v_cont): Factor out parts to ...
13993 (resume): ... this new function. If in all-stop, and a thread
13994 being resumed has a pending status, report it without actually
13995 resuming.
13996 (myresume): Adjust to use the new 'resume' function.
13997 (clear_pending_status_callback, set_pending_status_callback)
13998 (find_status_pending_thread_callback): New functions.
13999 (handle_status): Handle the case of multiple threads having
14000 interesting statuses to report. Report threads' real last signal
14001 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
14002 with an interesting thread to report the status for, instead of
14003 always reporting the status of the first thread.
14004
14005 2014-01-01 Joel Brobecker <brobecker@adacore.com>
14006
14007 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
14008 * gdbreplay.c (gdbreplay_version): Likewise.
14009
14010 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
14011
14012 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
14013 iov.iov_len with the real length in use.
14014
14015 2013-12-13 Joel Brobecker <brobecker@adacore.com>
14016
14017 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
14018 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
14019 for all targets that use win32-low.c.
14020 * win32-low.c (win32_ensure_ntdll_loaded): New function.
14021 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
14022
14023 2013-12-13 Pedro Alves <palves@redhat.com>
14024
14025 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
14026 if equal to TARGET_WAITKIND_LOADED.
14027 * win32-low.c (cached_status): New static global.
14028 (win32_wait): Add declaration.
14029 (do_initial_child_stuff): Flush all initial pending debug events
14030 up to the initial breakpoint.
14031 (win32_wait): If CACHED_STATUS was set, return that instead
14032 of doing a real wait. Remove the code resuming the execution
14033 of the inferior after receiving a TARGET_WAITKIND_LOADED event
14034 during the initial phase. Also remove the code changing
14035 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
14036 TARGET_WAITKIND_STOPPED.
14037
14038 2013-12-11 Yao Qi <yao@codesourcery.com>
14039
14040 * notif.c (handle_notif_ack): Return 0 if no notification
14041 matches.
14042
14043 2013-11-20 Doug Evans <dje@google.com>
14044
14045 * linux-low.c (linux_set_resume_request): Fix comment.
14046
14047 2013-11-20 Doug Evans <dje@google.com>
14048
14049 * linux-low.c (resume_status_pending_p): Tweak comment.
14050
14051 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
14052
14053 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
14054 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
14055 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
14056 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
14057 (srv_amd64_regobj): Add amd64-mpx.o.
14058 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
14059 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
14060 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
14061 * i387-fp.c (num_pl_bnd_register) Added constant.
14062 (num_pl_bnd_cfg_registers) Added constant.
14063 (struct i387_xsave) Added reserved area and MPX fields.
14064 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
14065 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
14066 function.
14067 (tdesc_i386_mpx_linux): Add MPX amd64 target.
14068 (init_registers_amd64_mpx_linux): Declare new function.
14069 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
14070 (x86_64_regmap): Add MPX registers.
14071 (x86_linux_read_description): Add MPX case.
14072 (initialize_low_arch): Initialize MPX targets.
14073
14074 2013-11-18 Tom Tromey <tromey@redhat.com>
14075
14076 * configure: Rebuild.
14077 * configure.ac: Don't check for stdlib.h.
14078 * gdbreplay.c: Unconditionally include stdlib.h.
14079
14080 2013-11-18 Tom Tromey <tromey@redhat.com>
14081
14082 * config.in: Rebuild.
14083 * configure: Rebuild.
14084 * configure.ac: Don't use AC_HEADER_DIRENT.
14085
14086 2013-11-18 Tom Tromey <tromey@redhat.com>
14087
14088 * server.h: Don't check HAVE_STRING_H.
14089 * gdbreplay.c: Don't check HAVE_STRING_H.
14090 * configure: Rebuild.
14091
14092 2013-11-18 Tom Tromey <tromey@redhat.com>
14093
14094 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
14095 LIBGNU.
14096
14097 2013-11-08 Tom Tromey <tromey@redhat.com>
14098
14099 * configure, config.in: Rebuild.
14100 * configure.ac: Remove unused configury.
14101
14102 2013-11-08 Tom Tromey <tromey@redhat.com>
14103
14104 * acinclude.m4: Include common.m4, codeset.m4.
14105 * configure, config.in: Rebuild.
14106 * configure.ac: Use GDB_AC_COMMON.
14107
14108 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
14109
14110 * linux-s390-low.c (HWCAP_S390_TE): New define.
14111 (s390_arch_setup): Consider the TE field in the HWCAP for
14112 determining 'have_regset_tdb'.
14113
14114 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
14115
14116 PR gdb/16014
14117 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
14118 call to sizeof.
14119
14120 2013-10-02 Pedro Alves <palves@redhat.com>
14121
14122 * server.c (process_serial_event): Don't output "GDBserver
14123 exiting" if GDB is connected through stdio.
14124 * target.c (mywait): Likewise, be silent if GDB is connected
14125 through stdio.
14126
14127 2013-10-01 Joel Brobecker <brobecker@adacore.com>
14128
14129 * lynx-low.c (lynx_add_threads_after_attach): New function.
14130 (lynx_attach): Remove call to add_thread. Add call to
14131 lynx_add_threads_after_attach instead.
14132
14133 2013-09-28 Mike Frysinger <vapier@gentoo.org>
14134
14135 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
14136 * config.in, configure: Regenerated.
14137
14138 2013-09-18 Yao Qi <yao@codesourcery.com>
14139
14140 PR server/15959
14141 * server.c (start_inferior): Clear 'resume_info'.
14142
14143 2013-09-16 Jiong Wang <jiwang@tilera.com>
14144
14145 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
14146 for each register.
14147
14148 2013-09-16 Jiong Wang <jiwang@tilera.com>
14149
14150 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
14151 linux-tile-low.o to srv_tgtobj.
14152
14153 2013-09-16 Will Newton <will.newton@linaro.org>
14154
14155 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
14156 out regs.
14157
14158 2013-09-06 Pedro Alves <palves@redhat.com>
14159
14160 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
14161 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
14162 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
14163 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
14164 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
14165 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
14166
14167 2013-09-06 Pedro Alves <palves@redhat.com>
14168
14169 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
14170 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
14171
14172 2013-09-06 Pedro Alves <palves@redhat.com>
14173
14174 * linux-amd64-ipa.c: Include tracepoint.h.
14175 * linux-i386-ipa.c: Include tracepoint.h.
14176
14177 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
14178
14179 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
14180 (ps_get_thread_area): New function.
14181
14182 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
14183
14184 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
14185 (initialize_low_arch): Call init_registers_crisv32 rather than
14186 init_register_crisv32.
14187
14188 2013-09-05 Pedro Alves <palves@redhat.com>
14189
14190 * server.h (handle_vFile, hostio_last_error_from_errno): Move
14191 to ...
14192 * hostio.h: ... this new file.
14193 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
14194 win32-low.c: Include hostio.h.
14195
14196 2013-09-05 Pedro Alves <palves@redhat.com>
14197
14198 * server.h (gdb_client_data, handler_func, callback_handler_func)
14199 (delete_file_handler, add_file_handler, append_callback_event)
14200 (delete_callback_event, start_event_loop, initialize_event_loop):
14201 Move to event-loop.h and include it.
14202 * event-loop.h: New file.
14203
14204 2013-09-05 Pedro Alves <palves@redhat.com>
14205
14206 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
14207 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
14208 (loaded_dll, unloaded_dll): Move to ...
14209 * dll.h: ... this new file.
14210 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
14211
14212 2013-09-05 Pedro Alves <palves@redhat.com>
14213
14214 * server.h (current_process, get_thread_process, all_processes)
14215 (add_inferior_to_list, for_each_inferior, current_inferior)
14216 (remove_inferior, add_process, remove_process, find_process_pid)
14217 (have_started_inferiors_p, have_attached_inferiors_p)
14218 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
14219 (clear_inferiors, find_inferior, find_inferior_id)
14220 (inferior_target_data, set_inferior_target_data)
14221 (inferior_regcache_data, set_inferior_regcache_data): Move to
14222 inferiors.h, and include it.
14223 * inferiors.h: New file.
14224
14225 2013-09-05 Pedro Alves <palves@redhat.com>
14226
14227 * server.h (struct emit_ops, current_insn_ptr, emit_error):
14228 Move ...
14229 * ax.h: ... here.
14230
14231 2013-09-05 Pedro Alves <palves@redhat.com>
14232
14233 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
14234 tracepoint.h.
14235 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
14236 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
14237 (handle_tracepoint_general_set, handle_tracepoint_query)
14238 (tracepoint_finished_step, tracepoint_was_hit)
14239 (release_while_stepping_state_list, current_traceframe)
14240 (in_readonly_region, traceframe_read_mem)
14241 (fetch_traceframe_registers, traceframe_read_sdata)
14242 (traceframe_read_info, struct fast_tpoint_collect_status)
14243 (fast_tracepoint_collecting, force_unlock_trace_buffer)
14244 (handle_tracepoit_bkpts, initialize_low_tracepoint)
14245 (supply_fast_tracepoint_registers)
14246 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
14247 (ipa_tdesc, claim_trampoline_space)
14248 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
14249 (agent_mem_read, agent_get_trace_state_variable_value)
14250 (agent_set_trace_state_variable_value, agent_tsv_read)
14251 (agent_mem_read_string, get_raw_reg_func_addr)
14252 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
14253 * tracepoint.h: ... this new file.
14254
14255 2013-09-05 Pedro Alves <palves@redhat.com>
14256
14257 * server.h (perror_with_name, error, fatal, warning, paddress)
14258 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
14259 include it.
14260 * utils.h: New file.
14261
14262 2013-09-05 Pedro Alves <palves@redhat.com>
14263
14264 * server.h (remote_debug, noack_mode, transport_is_reliable)
14265 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
14266 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
14267 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
14268 (write_enn, initialize_async_io, enable_async_io)
14269 (disable_async_io, check_remote_input_interrupt_request)
14270 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
14271 (dead_thread_notify, prepare_resume_reply)
14272 (decode_address_to_semicolon, decode_address, decode_m_packet)
14273 (decode_M_packet, decode_X_packet, decode_xfer_write)
14274 (decode_search_memory_packet, unhexify, hexify)
14275 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
14276 (look_up_one_symbol, relocate_instruction)
14277 (monitor_output): Move to remote-utils.h, and include it.
14278 * remote-utils.h: New file.
14279
14280 2013-09-05 Pedro Alves <palves@redhat.com>
14281
14282 * server.h (_): Delete.
14283
14284 2013-09-02 Pedro Alves <palves@redhat.com>
14285
14286 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
14287 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
14288 allocated.
14289 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
14290
14291 2013-09-02 Pierre Muller <muller@sourceware.org>
14292
14293 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
14294 or WriteProcessMemory complete successfully and handle
14295 ERROR_PARTIAL_COPY error.
14296
14297 2013-09-02 Pedro Alves <palves@redhat.com>
14298
14299 * server.c (gdb_read_memory): Return -1 on traceframe memory read
14300 error instead of EIO.
14301
14302 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14303
14304 PR server/15604
14305 * linux-low.c: Include filestuff.h.
14306 (linux_create_inferior) <pid == 0>: Call close_most_fds.
14307 * lynx-low.c: Include filestuff.h.
14308 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
14309 * server.c: Include filestuff.h.
14310 (main): Call notice_open_fds.
14311 * spu-low.c: Include filestuff.h.
14312 (spu_create_inferior) <pid == 0>: Call close_most_fds.
14313
14314 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
14315
14316 * Makefile.in: Explain why ../target and ../nat are not
14317 listed as include file search paths.
14318 (linux-waitpid.o): New object file rule.
14319 * configure.srv (srv_native_linux_obj): New variable.
14320 Replace all occurrences of linux native object files with
14321 $srv_native_linux_obj.
14322 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
14323 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
14324 (linux_enable_event_reporting): Remove declaration.
14325 (my_waitpid): Moved to common/linux-waitpid.c.
14326 (linux_wait_for_event): Pass ptid when calling
14327 linux_enable_event_reporting.
14328 (linux_supports_tracefork_flag): Remove.
14329 (linux_enable_event_reporting): Likewise.
14330 (linux_tracefork_grandchild): Remove.
14331 (STACK_SIZE): Moved to common/linux-ptrace.c.
14332 (linux_tracefork_child): Remove.
14333 (linux_test_for_tracefork): Remove.
14334 (linux_look_up_symbols): Call linux_supports_traceclone.
14335 (initialize_low): Remove call to linux_test_for_tracefork.
14336 * linux-low.h (PTRACE_TYPE_ARG3): Move to
14337 common/linux-ptrace.h.
14338 (PTRACE_TYPE_ARG4): Likewise.
14339 Include linux-ptrace.h.
14340
14341 2013-08-21 Pedro Alves <palves@redhat.com>
14342
14343 * config.in: Renegerate.
14344
14345 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
14346
14347 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
14348 (SFILES): Remove $(srcdir)/common/target-common.c and
14349 add $(srcdir)/target/waitstatus.c.
14350 (OBS): Remove target-common.o and add waitstatus.o.
14351 (server_h): Remove $(srcdir)/../common/target-common.h and
14352 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
14353 and $(srcdir)/../target/waitstatus.h.
14354 (target-common.o): Remove.
14355 (waitstatus.o): New target object file.
14356 * target.h: Do not include target-common.h and
14357 include target/resume.h, target/wait.h and
14358 target/waitstatus.h.
14359
14360 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
14361
14362 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
14363 to PTRACE_TYPE_ARG3.
14364 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
14365 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
14366 PTRACE_TYPE_ARG4.
14367 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
14368 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
14369
14370 2013-07-27 Jie Zhang <jie@codesourcery.com>
14371 Daniel Jacobowitz <dan@codesourcery.com>
14372 Yao Qi <yao@codesourcery.com>
14373
14374 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
14375 (mips-linux-watch.o): New rule.
14376 (mips_linux_watch_h): New variable.
14377 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
14378 srv_tgtobj.
14379 * linux-mips-low.c: Include mips-linux-watch.h.
14380 (struct arch_process_info, struct arch_lwp_info): New.
14381 (update_watch_registers_callback): New function.
14382 (mips_linux_new_process, mips_linux_new_thread) New functions.
14383 (mips_linux_prepare_to_resume, mips_insert_point): New
14384 functions.
14385 (mips_remove_point, mips_stopped_by_watchpoint): New
14386 functions.
14387 (rsp_bp_type_to_target_hw_bp_type): New function.
14388 (mips_stopped_data_address): New function.
14389 (the_low_target): Add watchpoint support functions.
14390
14391 2013-07-27 Yao Qi <yao@codesourcery.com>
14392
14393 * i386-low.c: Include break-common.h.
14394 (enum target_hw_bp_type): Remove.
14395
14396 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
14397
14398 * Makefile.in (SFILES): /common/target-common.c.
14399 (OBS): Add target-common.o.
14400 (server_h): Add $(srcdir)/../common/target-common.h.
14401 (target-common.o): New target.
14402 * server.c (queue_stop_reply_callback): Free
14403 status string after use.
14404 * target.c (target_waitstatus_to_string): Remove.
14405 * target.h: Include target-common.h.
14406 (resume_kind): Likewise.
14407 (target_waitkind): Likewise.
14408 (target_waitstatus): Likewise.
14409 (TARGET_WNOHANG): Likewise.
14410
14411 2013-07-04 Yao Qi <yao@codesourcery.com>
14412
14413 * Makefile.in (host_alias): Use @host_noncanonical@.
14414 (target_alias): Use @target_noncanonical@.
14415 * configure.ac: Use ACX_NONCANONICAL_TARGET and
14416 ACX_NONCANONICAL_HOST.
14417 * configure: Regenerated.
14418
14419 Revert:
14420 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
14421
14422 * configure.ac (version_host, version_target): Set and AC_SUBST them.
14423 * configure: Rebuild.
14424 * Makefile.in (version_host, version_target): Get from configure.
14425 (version.c): Use $(version_host) and $(version_target).
14426
14427 2013-07-03 Pedro Alves <palves@redhat.com>
14428
14429 * Makefile.in (config.status): Depend on development.sh.
14430 * acinclude.m4: Include libmcheck.m4.
14431 * configure: Regenerate.
14432
14433 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
14434
14435 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
14436 attribute inside the parentheses.
14437 (winapi_DebugSetProcessKillOnExit): Ditto.
14438 (winapi_DebugBreakProcess): Ditto.
14439 (winapi_GenerateConsoleCtrlEvent): Ditto.
14440
14441 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
14442
14443 * notif.h (notif_event): Add a dummy member to avoid compiler
14444 errors.
14445
14446 2013-07-01 Pedro Alves <palves@redhat.com>
14447
14448 * hostio.c (HOSTIO_PATH_MAX): Define.
14449 (require_filename, handle_open, handle_unlink, handle_readlink):
14450 Use it.
14451
14452 2013-07-01 Pedro Alves <palves@redhat.com>
14453
14454 * server.h: Include "pathmax.h".
14455 * linux-low.c: Don't include sys/param.h.
14456 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
14457 MAXPATHLEN.
14458 * win32-low.c: Don't include sys/param.h.
14459 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
14460
14461 2013-07-01 Pedro Alves <palves@redhat.com>
14462
14463 * event-loop.c: Don't check HAVE_UNISTD_H before including
14464 <unistd.h>.
14465 * gdbreplay.c: Likewise.
14466 * remote-utils.c: Likewise.
14467 * server.c: Likewise.
14468 * configure.ac: Don't check for unistd.h.
14469 * configure: Regenerate.
14470
14471 2013-06-28 Tom Tromey <tromey@redhat.com>
14472
14473 * Makefile.in (version.c): Use version.in, not
14474 common/version.in.
14475
14476 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
14477
14478 * configure.ac (version_host, version_target): Set and AC_SUBST them.
14479 * configure: Rebuild.
14480 * Makefile.in (version_host, version_target): Get from configure.
14481 (version.c): Use $(version_host) and $(version_target).
14482
14483 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
14484
14485 Fix trace-status to output user name without trailing colon.
14486 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
14487
14488 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
14489
14490 Fix trace-status to output proper start-time and stop-time.
14491 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
14492 output start time and stop time in hex as gdb expects.
14493
14494 2013-06-26 Pedro Alves <pedro@codesourcery.com>
14495
14496 * tracepoint.c (build_traceframe_info_xml): Output trace state
14497 variables present in the trace buffer.
14498
14499 2013-06-24 Tom Tromey <tromey@redhat.com>
14500
14501 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
14502 create-version.sh.
14503 (version.o): Remove.
14504 * gdbreplay.c: Include version.h.
14505 (version, host_name): Don't declare.
14506 * server.h: Include version.h.
14507 (version, host_name): Don't declare.
14508
14509 2013-06-12 Pedro Alves <palves@redhat.com>
14510
14511 * linux-x86-low.c (linux_is_elf64): Delete global.
14512 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
14513 with local linux_pid_exe_is_elf_64_file use.
14514
14515 2013-06-11 Pedro Alves <palves@redhat.com>
14516
14517 * linux-low.c (regset_disabled, disable_regset): New functions.
14518 (regsets_fetch_inferior_registers)
14519 (regsets_store_inferior_registers): Use them.
14520 (initialize_regsets_info); Don't allocate the disabled_regsets
14521 array here.
14522 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
14523 comment.
14524
14525 2013-06-11 Pedro Alves <palves@redhat.com>
14526
14527 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
14528 xmalloc.
14529
14530 2013-06-11 Pedro Alves <palves@redhat.com>
14531
14532 * linux-x86-low.c (initialize_low_arch): Call
14533 init_registers_x32_avx_linux.
14534
14535 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
14536
14537 Fix compatibility with Android Bionic.
14538 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
14539 it is not empty.
14540
14541 2013-06-07 Pedro Alves <palves@redhat.com>
14542
14543 PR server/14823
14544 * Makefile.in (OBS): Add tdesc.o.
14545 (IPA_OBJS): Add tdesc-ipa.o.
14546 (tdesc-ipa.o): New rule.
14547 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
14548 interface.
14549 * linux-low.c (new_inferior): Delete.
14550 (disabled_regsets, num_regsets): Delete.
14551 (linux_add_process): Adjust to set the new per-process
14552 new_inferior flag.
14553 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
14554 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
14555 was a stop. When calling arch_setup, switch the current inferior
14556 to the thread that got an event.
14557 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
14558 (regsets_fetch_inferior_registers)
14559 (regsets_store_inferior_registers): New regsets_info parameter.
14560 Adjust to use it.
14561 (linux_register_in_regsets): New regs_info parameter. Adjust to
14562 use it.
14563 (register_addr, fetch_register, store_register): New usrregs_info
14564 parameter. Adjust to use it.
14565 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
14566 parameter regs_info. Adjust to use it.
14567 (linux_fetch_registers): Get the current inferior's regs_info, and
14568 adjust to use it.
14569 (linux_store_registers): Ditto.
14570 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
14571 (initialize_low): Don't initialize the target_regsets here. Call
14572 initialize_low_arch.
14573 * linux-low.h (target_regsets): Delete declaration.
14574 (struct regsets_info): New.
14575 (struct usrregs_info): New.
14576 (struct regs_info): New.
14577 (struct process_info_private) <new_inferior>: New field.
14578 (struct linux_target_ops): Delete the num_regs, regmap, and
14579 regset_bitmap fields. New field regs_info.
14580 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
14581 * i387-fp.c (num_xmm_registers): Delete.
14582 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
14583 calls to new interface.
14584 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
14585 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
14586 Infer the number of xmm registers from the regcache's target
14587 description.
14588 * i387-fp.h (num_xmm_registers): Delete.
14589 * inferiors.c (add_thread): Don't install the thread's regcache
14590 here.
14591 * proc-service.c (gregset_info): Fetch the current inferior's
14592 regs_info. Adjust to use it.
14593 * regcache.c: Include tdesc.h.
14594 (register_bytes, reg_defs, num_registers)
14595 (gdbserver_expedite_regs): Delete.
14596 (get_thread_regcache): If the thread doesn't have a regcache yet,
14597 create one, instead of aborting gdbserver.
14598 (regcache_invalidate_one): Rename to ...
14599 (regcache_invalidate_thread): ... this.
14600 (regcache_invalidate_one): New.
14601 (regcache_invalidate): Only invalidate registers of the current
14602 process.
14603 (init_register_cache): Add target_desc parameter, and use it.
14604 (new_register_cache): Ditto. Assert the target description has a
14605 non zero registers_size.
14606 (regcache_cpy): Add assertions. Adjust.
14607 (realloc_register_cache, set_register_cache): Delete.
14608 (registers_to_string, registers_from_string): Adjust.
14609 (find_register_by_name, find_regno, find_register_by_number)
14610 (register_cache_size): Add target_desc parameter, and use it.
14611 (free_register_cache_thread, free_register_cache_thread_one)
14612 (regcache_release, register_cache_size): New.
14613 (register_size): Add target_desc parameter, and use it.
14614 (register_data, supply_register, supply_register_zeroed)
14615 (supply_regblock, supply_register_by_name, collect_register)
14616 (collect_register_as_string, collect_register_by_name): Adjust.
14617 * regcache.h (struct target_desc): Forward declare.
14618 (struct regcache) <tdesc>: New field.
14619 (init_register_cache, new_register_cache): Add target_desc
14620 parameter.
14621 (regcache_invalidate_thread): Declare.
14622 (regcache_invalidate_one): Delete declaration.
14623 (regcache_release): Declare.
14624 (find_register_by_number, register_cache_size, register_size)
14625 (find_regno): Add target_desc parameter.
14626 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
14627 declarations.
14628 * remote-utils.c: Include tdesc.h.
14629 (outreg, prepare_resume_reply): Adjust.
14630 * server.c: Include tdesc.h.
14631 (gdbserver_xmltarget): Delete declaration.
14632 (get_features_xml, process_serial_event): Adjust.
14633 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
14634 declare.
14635 (struct process_info) <tdesc>: New field.
14636 (ipa_tdesc): Declare.
14637 * tdesc.c: New file.
14638 * tdesc.h: New file.
14639 * tracepoint.c: Include tdesc.h.
14640 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
14641 (get_context_regcache): Adjust to pass ipa_tdesc down.
14642 (do_action_at_tracepoint): Adjust to get the register cache size
14643 from the context regcache's description.
14644 (traceframe_walk_blocks): Adjust to get the register cache size
14645 from the current trace frame's description.
14646 (traceframe_get_pc): Adjust to get current trace frame's
14647 description and pass it down.
14648 (gdb_collect): Adjust to get the register cache size from the
14649 IPA's description.
14650 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
14651 (gdbserver_xmltarget): Delete.
14652 (initialize_low_tracepoint): Set the ipa's target description.
14653 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
14654 (initialize_low_tracepoint): Set the ipa's target description.
14655 * linux-x86-low.c: Include tdesc.h.
14656 [__x86_64__] (is_64bit_tdesc): New.
14657 (ps_get_thread_area, x86_get_thread_area): Use it.
14658 (i386_cannot_store_register): Rename to ...
14659 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
14660 (i386_cannot_fetch_register): Rename to ...
14661 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
14662 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
14663 to new interface.
14664 (target_regsets): Rename to ...
14665 (x86_regsets): ... this.
14666 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
14667 interface.
14668 (x86_siginfo_fixup): Use is_64bit_tdesc.
14669 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
14670 (tdesc_x32_avx_linux, tdesc_x32_linux)
14671 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
14672 Declare.
14673 (x86_linux_update_xmltarget): Delete.
14674 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
14675 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
14676 (AMD64_LINUX_USER64_CS): New.
14677 (x86_linux_read_description): New, based on
14678 x86_linux_update_xmltarget.
14679 (same_process_callback): New.
14680 (x86_arch_setup_process_callback): New.
14681 (x86_linux_update_xmltarget): New.
14682 (x86_regsets_info): New.
14683 (amd64_linux_regs_info): New.
14684 (i386_linux_usrregs_info): New.
14685 (i386_linux_regs_info): New.
14686 (x86_linux_regs_info): New.
14687 (x86_arch_setup): Reimplement.
14688 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
14689 (x86_emit_ops): Ditto.
14690 (the_low_target): Adjust. Install x86_linux_regs_info,
14691 x86_cannot_fetch_register, and x86_cannot_store_register.
14692 (initialize_low_arch): New.
14693 * linux-ia64-low.c (tdesc_ia64): Declare.
14694 (ia64_fetch_register): Adjust.
14695 (ia64_usrregs_info, regs_info): New globals.
14696 (ia64_regs_info): New function.
14697 (the_low_target): Adjust.
14698 (initialize_low_arch): New function.
14699 * linux-sparc-low.c (tdesc_sparc64): Declare.
14700 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
14701 Adjust.
14702 (sparc_arch_setup): New function.
14703 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
14704 (the_low_target): Adjust.
14705 (initialize_low_arch): New function.
14706 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
14707 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
14708 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
14709 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
14710 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
14711 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
14712 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
14713 (tdesc_powerpc_isa205_vsx64l): Declare.
14714 (ppc_cannot_store_register, ppc_collect_ptrace_register)
14715 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
14716 (ppc_set_pc, ppc_get_hwcap): Adjust.
14717 (ppc_usrregs_info): Forward declare.
14718 (!__powerpc64__) ppc_regmap_adjusted: New global.
14719 (ppc_arch_setup): Adjust to the current process'es target
14720 description.
14721 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
14722 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
14723 (ppc_store_evrregset): Adjust.
14724 (target_regsets): Rename to ...
14725 (ppc_regsets): ... this, and make static.
14726 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
14727 (ppc_regs_info): New function.
14728 (the_low_target): Adjust.
14729 (initialize_low_arch): New function.
14730 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
14731 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
14732 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
14733 (tdesc_s390x_linux64v2): Declare.
14734 (s390_collect_ptrace_register, s390_supply_ptrace_register)
14735 (s390_fill_gregset, s390_store_last_break): Adjust.
14736 (target_regsets): Rename to ...
14737 (s390_regsets): ... this, and make static.
14738 (s390_get_pc, s390_set_pc): Adjust.
14739 (s390_get_hwcap): New target_desc parameter, and use it.
14740 [__s390x__] (have_hwcap_s390_high_gprs): New global.
14741 (s390_arch_setup): Adjust to set the current process'es target
14742 description. Don't adjust the regmap.
14743 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
14744 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
14745 (regs_info_3264): New globals.
14746 (s390_regs_info): New function.
14747 (the_low_target): Adjust.
14748 (initialize_low_arch): New function.
14749 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
14750 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
14751 [__mips64] (init_registers_mips_linux)
14752 (init_registers_mips_dsp_linux): Delete defines.
14753 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
14754 (have_dsp): New global.
14755 (mips_read_description): New, based on mips_arch_setup.
14756 (mips_arch_setup): Reimplement.
14757 (get_usrregs_info): New function.
14758 (mips_cannot_fetch_register, mips_cannot_store_register)
14759 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
14760 (mips_fill_fpregset, mips_store_fpregset): Adjust.
14761 (target_regsets): Rename to ...
14762 (mips_regsets): ... this, and make static.
14763 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
14764 (dsp_regs_info, regs_info): New globals.
14765 (mips_regs_info): New function.
14766 (the_low_target): Adjust.
14767 (initialize_low_arch): New function.
14768 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
14769 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
14770 Declare.
14771 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
14772 (arm_read_description): New, with bits factored from
14773 arm_arch_setup.
14774 (arm_arch_setup): Reimplement.
14775 (target_regsets): Rename to ...
14776 (arm_regsets): ... this, and make static.
14777 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
14778 (arm_regs_info): New function.
14779 (the_low_target): Adjust.
14780 (initialize_low_arch): New function.
14781 * linux-m68k-low.c (tdesc_m68k): Declare.
14782 (target_regsets): Rename to ...
14783 (m68k_regsets): ... this, and make static.
14784 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
14785 (m68k_regs_info): New function.
14786 (m68k_arch_setup): New function.
14787 (the_low_target): Adjust.
14788 (initialize_low_arch): New function.
14789 * linux-sh-low.c (tdesc_sharch): Declare.
14790 (target_regsets): Rename to ...
14791 (sh_regsets): ... this, and make static.
14792 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
14793 (sh_regs_info, sh_arch_setup): New functions.
14794 (the_low_target): Adjust.
14795 (initialize_low_arch): New function.
14796 * linux-bfin-low.c (tdesc_bfin): Declare.
14797 (bfin_arch_setup): New function.
14798 (bfin_usrregs_info, regs_info): New globals.
14799 (bfin_regs_info): New function.
14800 (the_low_target): Adjust.
14801 (initialize_low_arch): New function.
14802 * linux-cris-low.c (tdesc_cris): Declare.
14803 (cris_arch_setup): New function.
14804 (cris_usrregs_info, regs_info): New globals.
14805 (cris_regs_info): New function.
14806 (the_low_target): Adjust.
14807 (initialize_low_arch): New function.
14808 * linux-cris-low.c (tdesc_crisv32): Declare.
14809 (cris_arch_setup): New function.
14810 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
14811 (cris_regs_info): New function.
14812 (the_low_target): Adjust.
14813 (initialize_low_arch): New function.
14814 * linux-m32r-low.c (tdesc_m32r): Declare.
14815 (m32r_arch_setup): New function.
14816 (m32r_usrregs_info, regs_info): New globals.
14817 (m32r_regs_info): Adjust.
14818 (initialize_low_arch): New function.
14819 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
14820 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
14821 (tic6x_usrregs_info): Forward declare.
14822 (tic6x_read_description): New function, based on ...
14823 (tic6x_arch_setup): ... this. Reimplement.
14824 (target_regsets): Rename to ...
14825 (tic6x_regsets): ... this, and make static.
14826 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
14827 (tic6x_regs_info): New function.
14828 (the_low_target): Adjust.
14829 (initialize_low_arch): New function.
14830 * linux-xtensa-low.c (tdesc_xtensa): Declare.
14831 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
14832 (target_regsets): Rename to ...
14833 (xtensa_regsets): ... this, and make static.
14834 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
14835 globals.
14836 (xtensa_arch_setup, xtensa_regs_info): New functions.
14837 (the_low_target): Adjust.
14838 (initialize_low_arch): New function.
14839 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
14840 (nios2_arch_setup): Set the current process'es tdesc.
14841 (target_regsets): Rename to ...
14842 (nios2_regsets): ... this.
14843 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
14844 (nios2_regs_info): New function.
14845 (the_low_target): Adjust.
14846 (initialize_low_arch): New function.
14847 * linux-aarch64-low.c (tdesc_aarch64): Declare.
14848 (aarch64_arch_setup): Set the current process'es tdesc.
14849 (target_regsets): Rename to ...
14850 (aarch64_regsets): ... this.
14851 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
14852 (aarch64_regs_info): New function.
14853 (the_low_target): Adjust.
14854 (initialize_low_arch): New function.
14855 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
14856 globals.
14857 (target_regsets): Rename to ...
14858 (tile_regsets): ... this.
14859 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
14860 (tile_regs_info): New function.
14861 (tile_arch_setup): Set the current process'es tdesc.
14862 (the_low_target): Adjust.
14863 (initialize_low_arch): New function.
14864 * spu-low.c (tdesc_spu): Declare.
14865 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
14866 * win32-arm-low.c (tdesc_arm): Declare.
14867 (arm_arch_setup): New function.
14868 (the_low_target): Install arm_arch_setup instead of
14869 init_registers_arm.
14870 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
14871 (init_windows_x86): Rename to ...
14872 (i386_arch_setup): ... this. Set `win32_tdesc'.
14873 (the_low_target): Adjust.
14874 * win32-low.c (win32_tdesc): New global.
14875 (child_add_thread): Don't create the thread cache here.
14876 (do_initial_child_stuff): Set the new process'es tdesc.
14877 * win32-low.h (struct target_desc): Forward declare.
14878 (win32_tdesc): Declare.
14879 * lynx-i386-low.c (tdesc_i386): Declare global.
14880 (lynx_i386_arch_setup): Set `lynx_tdesc'.
14881 * lynx-low.c (lynx_tdesc): New global.
14882 (lynx_add_process): Set the new process'es tdesc.
14883 * lynx-low.h (struct target_desc): Forward declare.
14884 (lynx_tdesc): Declare global.
14885 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
14886 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
14887 * nto-low.c (nto_tdesc): New global.
14888 (do_attach): Set the new process'es tdesc.
14889 * nto-low.h (struct target_desc): Forward declare.
14890 (nto_tdesc): Declare.
14891 * nto-x86-low.c (tdesc_i386): Declare.
14892 (nto_x86_arch_setup): Set `nto_tdesc'.
14893
14894 2013-06-04 Gary Benson <gbenson@redhat.com>
14895
14896 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
14897 to qSupported response when appropriate.
14898 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
14899 with nonzero-length annex.
14900 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
14901 arguments supplied in annex.
14902
14903 2013-05-31 Doug Evans <dje@google.com>
14904
14905 PR server/15594
14906 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
14907 64 bits in 64-cross-32 environment.
14908
14909 2013-05-28 Pedro Alves <palves@redhat.com>
14910
14911 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
14912 (aarch64-without-fpu.c): Delete rule.
14913 * configure.srv (aarch64*-*-linux*): Remove references to
14914 aarch64-without-fpu.o and aarch64-without-fpu.xml.
14915 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
14916 declaration.
14917
14918 2013-05-24 Pedro Alves <palves@redhat.com>
14919
14920 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
14921 instead of strchr/decode_address. Error if the range isn't split
14922 with a ','. Don't assume there's be a ':' in the action.
14923
14924 2013-05-23 Yao Qi <yao@codesourcery.com>
14925 Pedro Alves <palves@redhat.com>
14926
14927 * linux-low.c (lwp_in_step_range): New function.
14928 (linux_wait_1): If the thread was range stepping and stopped
14929 outside the stepping range, report the stop to GDB. Otherwise,
14930 continue stepping. Add range stepping debug output.
14931 (linux_set_resume_request): Copy the step range from the resume
14932 request to the lwp.
14933 (linux_supports_range_stepping): New.
14934 (linux_target_ops) <supports_range_stepping>: Set to
14935 linux_supports_range_stepping.
14936 * linux-low.h (struct linux_target_ops)
14937 <supports_range_stepping>: New field.
14938 (struct lwp_info) <step_range_start, step_range_end>: New fields.
14939 * linux-x86-low.c (x86_supports_range_stepping): New.
14940 (the_low_target) <supports_range_stepping>: Set to
14941 x86_supports_range_stepping.
14942 * server.c (handle_v_cont): Handle 'r' action.
14943 (handle_v_requests): Append ";r" if the target supports range
14944 stepping.
14945 * target.h (struct thread_resume) <step_range_start,
14946 step_range_end>: New fields.
14947 (struct target_ops) <supports_range_stepping>:
14948 New field.
14949 (target_supports_range_stepping): New macro.
14950
14951 2013-05-17 Joel Brobecker <brobecker@adacore.com>
14952
14953 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
14954 confusion in comment.
14955
14956 2013-05-17 Joel Brobecker <brobecker@adacore.com>
14957
14958 * lynx-low.c (struct process_info_private): New type.
14959 (lynx_add_process): New function.
14960 (lynx_create_inferior, lynx_attach): Replace calls to
14961 add_process by calls to lynx_add_process.
14962 (lynx_resume): If PTID is null, then try using
14963 current_process()->private->last_wait_event_ptid.
14964 Add comments.
14965 (lynx_clear_inferiors): Delete. The contents of that function
14966 has been inlined in lynx_mourn;
14967 (lynx_wait_1): Save the ptid in the process's private data.
14968 (lynx_mourn): Free the process' private data. Replace call
14969 to lynx_clear_inferiors by call to clear_inferiors.
14970
14971 2013-05-17 Yao Qi <yao@codesourcery.com>
14972
14973 * i386-low.c (i386_length_and_rw_bits): Move the comment to
14974 the right place.
14975
14976 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
14977
14978 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
14979 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
14980 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
14981 PT_TEXT_END_ADDR guards. Update comments.
14982 (linux_target_op) <read_offsets>: Conditionally define to
14983 linux_read_offsets if the target is UCLIBC and if it defines
14984 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
14985
14986 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
14987 Andrew Jenner <andrew@codesourcery.com>
14988
14989 * Makefile.in (SFILES): Add linux-nios2-low.c.
14990 (clean): Add action to delete nios2-linux.c.
14991 (nios2-linux.c): New rule.
14992 * configure.srv: Add nios2*-*-linux*.
14993 * linux-nios2-low.c: New.
14994
14995 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
14996
14997 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
14998
14999 2013-04-25 Hui Zhu <hui@codesourcery.com>
15000
15001 PR gdb/15186
15002 * ax.c (ax_printf): Add fflush.
15003
15004 2013-04-22 Tom Tromey <tromey@redhat.com>
15005
15006 * Makefile.in (SFILES): Add filestuff.c.
15007 (OBS): Add filestuff.o.
15008 (filestuff.o): New target.
15009 * config.in, configure: Rebuild.
15010 * configure.ac: Check for fdwalk, pipe2.
15011
15012 2013-04-17 Pedro Alves <palves@redhat.com>
15013
15014 * configure.ac (USE_THREAD_DB): Delete variable.
15015 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
15016 Don't AC_SUBST USE_THREAD_DB.
15017 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
15018 * config.in, configure: Regenerate.
15019
15020 2013-04-16 Pedro Alves <palves@redhat.com>
15021
15022 * linux-low.h (struct lwp_info) <thread_known>: Move under
15023 the USE_THREAD_DB #ifdef.
15024
15025 2013-04-16 Pedro Alves <palves@redhat.com>
15026
15027 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
15028 (linux-low.o): Delete rule.
15029 * linux-low.h: Always include "gdb_thread_db.h" instead of
15030 conditionally including thread_db.h.
15031 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
15032 HAVE_THREAD_DB_H.
15033
15034 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
15035
15036 * Makefile.in (install-only): Fix make install regression.
15037
15038 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
15039
15040 Convert man pages to texinfo, new gdbinit.5 texinfo page.
15041 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
15042 installation.
15043 * gdbserver.1: Remove.
15044
15045 2013-03-22 Pedro Alves <palves@redhat.com>
15046
15047 * linux-low.c (handle_extended_wait): Don't call
15048 linux_enable_event_reporting.
15049
15050 2013-03-15 Tony Theodore <tonyt@logyst.com>
15051
15052 PR build/9098:
15053 * Makefile.in (SHELL): Use @SHELL@.
15054
15055 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
15056
15057 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
15058 compiler warning.
15059
15060 2013-03-13 Joel Brobecker <brobecker@adacore.com>
15061
15062 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
15063 Remove extraneous NULL element.
15064
15065 2013-03-13 Yao Qi <yao@codesourcery.com>
15066
15067 * tracepoint.c (traceframe_read_tsv): Look for the last matched
15068 'V' block in trace frame.
15069
15070 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
15071
15072 * target.h (struct target_ops): Add btrace ops.
15073 (target_supports_btrace): New macro.
15074 (target_enable_btrace): New macro.
15075 (target_disable_btrace): New macro.
15076 (target_read_btrace): New macro.
15077 * gdbthread.h (struct thread_info): Add btrace field.
15078 * server.c: Include btrace-common.h.
15079 (handle_btrace_general_set): New function.
15080 (handle_btrace_enable): New function.
15081 (handle_btrace_disable): New function.
15082 (handle_general_set): Call handle_btrace_general_set.
15083 (handle_qxfer_btrace): New function.
15084 (struct qxfer qxfer_packets[]): Add btrace entry.
15085 * inferiors.c (remove_thread): Disable btrace.
15086 * linux-low: Include linux-btrace.h.
15087 (linux_low_enable_btrace): New function.
15088 (linux_low_read_btrace): New function.
15089 (linux_target_ops): Add btrace ops.
15090 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
15091 Add srv_linux_btrace=yes.
15092 (x86_64-*-linux*): Add linux-btrace.o.
15093 Add srv_linux_btrace=yes.
15094 * configure.ac: Define HAVE_LINUX_BTRACE.
15095 * config.in: Regenerated.
15096 * configure: Regenerated.
15097
15098 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
15099
15100 * server.c (handle_qxfer): Preserve error message if -3 is
15101 returned.
15102 (qxfer): Document the -3 return value.
15103
15104 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
15105
15106 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
15107 (linux_btrace_h): New variable.
15108 (linux-btrace.o): New rule.
15109
15110 2013-03-08 Stan Shebs <stan@codesourcery.com>
15111 Hafiz Abid Qadeer <abidh@codesourcery.com>
15112
15113 * tracepoint.c (trace_buffer_size): New global.
15114 (DEFAULT_TRACE_BUFFER_SIZE): New define.
15115 (init_trace_buffer): Change to one-argument function. Allocate
15116 trace buffer memory.
15117 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
15118 handle QTBuffer:size packet.
15119 (cmd_bigqtbuffer_size): New function.
15120 (initialize_tracepoint): Call init_trace_buffer with
15121 DEFAULT_TRACE_BUFFER_SIZE.
15122 * server.c (handle_query): Add QTBuffer:size in the
15123 supported packets.
15124
15125 2013-03-07 Yao Qi <yao@codesourcery.com>
15126
15127 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
15128 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
15129 of -1.
15130 (cmd_qtsp): Adjust condition. Do post increment.
15131 Set cur_action and cur_step_action back to 0.
15132
15133 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
15134
15135 PR server/15236
15136 * linux-low.c (linux_write_memory): Return early success if LEN is
15137 zero.
15138
15139 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
15140
15141 * configure.srv: Add x86_64-*-cygwin* as target.
15142
15143 2013-02-28 Tom Tromey <tromey@redhat.com>
15144
15145 * configure.ac: Invoke AC_SYS_LARGEFILE.
15146 * configure, config.in: Rebuild.
15147
15148 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
15149
15150 * win32-low.c: Throughout, fix format strings and casts of
15151 printf-like functions to avoid type related warnings on all
15152 platforms.
15153 (get_child_debug_event): Print dwDebugEventCode as hex since
15154 that's how it's usually documented.
15155
15156 2013-02-28 Yao Qi <yao@codesourcery.com>
15157
15158 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
15159 pulongest.
15160
15161 2013-02-27 Jiong Wang <jiwang@tilera.com>
15162
15163 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
15164 (reg-tilegx32.c): New rule.
15165 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
15166 * linux-tile-low.c (tile_arch_setup): New function. Invoke
15167 different register info initializer according to elf class.
15168 (init_registers_tilgx32): New function. The tilegx32 register info
15169 initializer.
15170 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
15171 (tile_store_gregset): Likewise.
15172
15173 2013-02-27 Yao Qi <yao@codesourcery.com>
15174
15175 * server.c (process_point_options): Print debug message when
15176 debug_threads is true.
15177
15178 2013-02-26 Yao Qi <yao@codesourcery.com>
15179
15180 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
15181
15182 2013-02-19 Pedro Alves <palves@redhat.com>
15183 Kai Tietz <ktietz@redhat.com>
15184
15185 PR gdb/15161
15186
15187 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
15188 instead of strtoul to extract address from packet.
15189 (process_serial_event) <'z'>: Likewise.
15190
15191 2013-02-18 Yao Qi <yao@codesourcery.com>
15192
15193 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
15194
15195 2013-02-14 Pedro Alves <palves@redhat.com>
15196
15197 Plug memory leak.
15198
15199 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
15200 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
15201
15202 2013-02-14 Pedro Alves <palves@redhat.com>
15203
15204 * tracepoint.c (cmd_qtdpsrc): Use savestring.
15205
15206 2013-02-14 Pedro Alves <palves@redhat.com>
15207
15208 * tracepoint.c (save_string): Delete.
15209 (add_tracepoint_action): Use savestring instead of save_string.
15210
15211 2013-02-12 Pedro Alves <palves@redhat.com>
15212
15213 * linux-xtensa-low.c: Ditto.
15214 * xtensa-xtregs.c: Ditto.
15215
15216 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
15217
15218 * thread-db.c (thread_db_get_tls_address): NULL pointer check
15219 thread_db.
15220
15221 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
15222
15223 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
15224 aarch64_num_wp_regs and aarch64_num_bp_regs to
15225 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
15226
15227 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
15228
15229 * linux-aarch64-low.c (ps_get_thread_area): Replace
15230 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
15231
15232 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
15233 Marcus Shawcroft <marcus.shawcroft@arm.com>
15234 Nigel Stephens <nigel.stephens@arm.com>
15235 Yufeng Zhang <yufeng.zhang@arm.com>
15236
15237 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
15238 (aarch64.c, aarch64-without-fpu.c): New targets.
15239 * configure.srv (aarch64*-*-linux*): New.
15240 * linux-aarch64-low.c: New file.
15241
15242 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
15243
15244 * linux-low.c (handle_extended_wait, linux_create_inferior)
15245 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
15246 (dequeue_one_deferred_signal, linux_resume_one_thread)
15247 (fetch_register, linux_write_memory, linux_enable_event_reporting)
15248 (linux_tracefork_grandchild, linux_test_for_tracefork)
15249 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
15250 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
15251 where the argument is 0.
15252
15253 2013-01-25 Yao Qi <yao@codesourcery.com>
15254
15255 * event-loop.c: Include "queue.h".
15256 (gdb_event_p): New typedef.
15257 (struct gdb_event) <next_event>: Remove.
15258 (event_queue): Change to QUEUE(gdb_event_p).
15259 (async_queue_event): Remove.
15260 (gdb_event_xfree): New.
15261 (initialize_event_loop): New.
15262 (process_event): Use API from QUEUE.
15263 (wait_for_event): Likewise.
15264 * server.c (main): Call initialize_event_loop.
15265 * server.h (initialize_event_loop): Declare.
15266
15267 2013-01-18 Yao Qi <yao@codesourcery.com>
15268
15269 * ax.h (struct eval_agent_expr_context): New.
15270 (gdb_eval_agent_expr): Update declaration.
15271 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
15272 TFRAME. Add new argument CTX.
15273 * server.h (struct eval_agent_expr_context): Declare.
15274 (agent_mem_read, agent_tsv_read): Update declaration.
15275 (agent_mem_read_string): Likewise.
15276 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
15277 (add_traceframe_block): Add new argument TPOINT.
15278 Increase TPOINT->traceframe_usage.
15279 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
15280 eval_tracepoint_agent_expr.
15281 (condition_true_at_tracepoint): Likewise.
15282 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
15283 (agent_mem_read_string, agent_tsv_read): Likewise.
15284
15285 2013-01-16 Yao Qi <yao@codesourcery.com>
15286
15287 * linux-low.c (linux_resume_one_lwp): Don't check
15288 'lwp->bp_reinsert != 0'.
15289
15290 2013-01-07 Joel Brobecker <brobecker@adacore.com>
15291 Pedro Alves <palves@redhat.com>
15292
15293 * lynx-low.c (ptrace_request_to_str): Define a temporary
15294 macro and use it to simplify this function's implementation.
15295
15296 2013-01-07 Joel Brobecker <brobecker@adacore.com>
15297
15298 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
15299 sets errno.
15300
15301 2013-01-07 Joel Brobecker <brobecker@adacore.com>
15302
15303 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
15304
15305 2013-01-07 Joel Brobecker <brobecker@adacore.com>
15306
15307 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
15308
15309 2013-01-07 Joel Brobecker <brobecker@adacore.com>
15310
15311 * lynx-low.c (lynx_resume): Use the resume_info parameter
15312 to determine the ptid for the lynx_ptrace call, unless
15313 it is equal to minus_one_ptid, in which case we use the
15314 ptid of the current_inferior.
15315 (lynx_wait_1): After having received a thread create/exit
15316 event, resume the inferior's execution using the signaling
15317 thread's ptid, rather than the old ptid.
15318
15319 2013-01-07 Joel Brobecker <brobecker@adacore.com>
15320
15321 * lynx-low.c (lynx_resume): Delete variable ret.
15322
15323 2013-01-01 Joel Brobecker <brobecker@adacore.com>
15324
15325 * gdbreplay.c (gdbreplay_version): Update copyright year.
15326 * server.c (gdbserver_version): Likewise.
15327
15328 2012-12-17 Joel Brobecker <brobecker@adacore.com>
15329
15330 * lynx-low.c (lynx_wait_1): Add debug trace before adding
15331 new thread.
15332
15333 2012-12-17 Joel Brobecker <brobecker@adacore.com>
15334
15335 * lynx-low.c (ptrace_request_to_str): Add handling for
15336 PTRACE_GETTRACESIG.
15337
15338 2012-12-17 Joel Brobecker <brobecker@adacore.com>
15339
15340 * lynx-low.c (lynx_attach): Delete variable new_process.
15341
15342 2012-12-17 Joel Brobecker <brobecker@adacore.com>
15343
15344 * lynx-low.c (lynx_create_inferior): Delete variable
15345 new_process.
15346
15347 2012-12-17 Joel Brobecker <brobecker@adacore.com>
15348
15349 * lynx-low.c (ptrace_request_to_str): Do not handle
15350 PTRACE_GETTHREADLIST if this macro does not exist.
15351
15352 2012-12-15 Yao Qi <yao@codesourcery.com>
15353
15354 * Makefile.in (OBS): Add notif.o.
15355 * notif.c, notif.h: New.
15356 * server.c: Include "notif.h".
15357 (struct vstop_notif) <next>: Remove.
15358 <base>: New field.
15359 (queue_stop_reply): Update.
15360 (push_event, send_next_stop_reply): Remove.
15361 (discard_queued_stop_replies): Update.
15362 (notif_stop): New variable.
15363 (handle_v_stopped): Remove.
15364 (handle_v_requests): Don't call handle_v_stopped. Call
15365 handle_ack_notif instead.
15366 (queue_stop_reply_callback): Call notif_event_enque instead
15367 of queue_stop_reply.
15368 (handle_status): Don't call send_next_stop_reply, call
15369 notif_write_event instead.
15370 (kill_inferior_callback): Likewise.
15371 (detach_or_kill_inferior_callback): Likewise.
15372 (main): Call initialize_notif.
15373 (process_serial_event): Call QUEUE_is_empty.
15374 (handle_target_event): Call notif_push instead of push event.
15375 * server.h (push_event): Remove declaration.
15376
15377 2012-12-10 Tom Tromey <tromey@redhat.com>
15378
15379 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
15380 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
15381 macros.
15382 (.c.o): Rewrite.
15383 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
15384 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
15385 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
15386 (amd64-linux-ipa.o, ax.o): Rewrite.
15387 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
15388 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
15389 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
15390 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
15391 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
15392 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
15393 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
15394 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
15395 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
15396 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
15397 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
15398 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
15399 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
15400 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
15401 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
15402 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
15403 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
15404 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
15405 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
15406 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
15407 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
15408 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
15409 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
15410 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
15411 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
15412 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
15413 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
15414 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
15415 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
15416 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
15417 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
15418 (reg-tilegx.o): Remove.
15419 (all_object_files): New macro.
15420 Include .deps files.
15421 * aclocal.m4, configure: Rebuild.
15422 * acinclude.m4: Include depstand.m4, lead-dot.m4.
15423 * configure.ac: Invoke ZW_CREATE_DEPDIR,
15424 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
15425
15426 2012-12-05 Tom Tromey <tromey@redhat.com>
15427
15428 PR gdb/14917:
15429 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
15430
15431 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
15432
15433 * configure.ac: Check for linux/perf_event.h.
15434 * config.in: Regenerated.
15435 * configure: Regenerated.
15436
15437 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
15438
15439 * hostio.c (handle_readlink): Decrease buffer size
15440 parameter passed to readlink by one byte.
15441
15442 2012-11-26 Yao Qi <yao@codesourcery.com>
15443
15444 * configure.ac (build_warnings): Append '-Wempty-body'.
15445 * configure: Regenerated.
15446 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
15447 body.
15448
15449 2012-11-15 Pierre Muller <muller@sourceware.org>
15450
15451 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
15452 * config.in: Regenerate.
15453 * configure: Regenerate.
15454 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
15455 Use "gdb_wait.h" header instead of <sys/wait.h> header.
15456 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
15457 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
15458 header.
15459 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
15460 instead of <sys/wait.h> header.
15461 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
15462
15463 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
15464
15465 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
15466 (various make rules): Remove -DGDBSERVER
15467
15468 2012-11-09 Yao Qi <yao@codesourcery.com>
15469
15470 * spu-low.c (current_ptid): Move it to ..
15471 * gdbthread.h: ... here. New.
15472 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
15473 * server.c (myresume, process_serial_event): Likewise.
15474 * thread-db.c (thread_db_find_new_threads): Likewise.
15475 * tracepoint.c (run_inferior_command): Likewise.
15476
15477 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
15478
15479 * server.c (handle_search_memory_1): Include access length in
15480 warning message.
15481
15482 2012-09-05 Michael Brandt <michael.brandt@axis.com>
15483
15484 * linux-crisv32-low.c: Fix compile errors.
15485
15486 2012-09-04 Yao Qi <yao@codesourcery.com>
15487
15488 * tracepoint.c (cmd_qtsv): Adjust debug message.
15489 Don't check CUR_TPOINT.
15490
15491 2012-08-28 Yao Qi <yao@codesourcery.com>
15492
15493 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
15494 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
15495 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
15496 Remove declarations of xmalloc, xreallloc, xstrdup and
15497 freeargv.
15498 * Makefile.in (libiberty_h): New.
15499 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
15500 (linux-bfin-low.o): Append dependency 'libiberty.h'.
15501
15502 2012-08-23 Yao Qi <yao@codesourcery.com>
15503
15504 * server.h: Remove declaration of 'xsnprintf'.
15505
15506 2012-08-22 Keith Seitz <keiths@redhat.com>
15507
15508 * server.h: Include build-gnulib-gbserver/config.h.
15509 * gdbreplay.c: Likewise.
15510
15511 2012-08-08 Doug Evans <dje@google.com>
15512
15513 * Makefile.in (SFILES): Add gdb_vecs.c.
15514 (OBS): Add gdb_vecs.o.
15515 (gdb_vecs_h, host_defs_h): New variables.
15516 (thread-db.o): Add $(gdb_vecs_h) dependency.
15517 (gdb_vecs.o): New rule.
15518 * thread-db.c: #include "gdb_vecs.h".
15519 (thread_db_load_search): Use a vector to iterate over path elements.
15520 Handle text appearing after "$pdir".
15521
15522 * configure.ac: Add check for strstr.
15523 * config.in: Regenerate.
15524 * configure: Regenerate.
15525
15526 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
15527
15528 * hostio.c (handle_pread): If pread fails, fall back to attempting
15529 lseek/read.
15530 (handle_pwrite): Likewise for pwrite.
15531
15532 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
15533
15534 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
15535 between unsupported TYPE and unimplementable ADDR/LEN combination.
15536 (arm_insert_point): Act on new return value.
15537
15538 2012-07-31 Pedro Alves <palves@redhat.com>
15539
15540 * server.c (process_point_options): Only skip tokens if we find
15541 one that is unrecognized. Don't treat 'X' specially while
15542 skipping unrecognized tokens.
15543
15544 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
15545
15546 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
15547 to 4-byte-align HW breakpoint addresses for Thumb.
15548
15549 2012-07-27 Yao Qi <yao@codesourcery.com>
15550
15551 PR remote/14161.
15552
15553 * server.h: Declare gdb_agent_about_to_close.
15554 * target.c (kill_inferior): Include "agent.h".
15555 New. Send command 'kill'.
15556 * target.h (kill_inferior): Removed macro.
15557 * tracepoint.c (gdb_agent_about_to_close): New.
15558 (gdb_agent_helper_thread): Handle command 'close'.
15559 Wait endlessly until the inferior stops.
15560 Install gdb_agent_remove_socket to atexit hook.
15561 (agent_socket_name): New static variable.
15562 (gdb_agent_socket_init): Replace local variable 'name' with
15563 'agent_socket_name'.
15564 (gdb_agent_remove_socket): New.
15565
15566 2012-07-27 Yao Qi <yao@codesourcery.com>
15567
15568 * server.c (process_point_options): Stop at 'X' when parsing.
15569
15570 2012-07-19 Michael Eager <eager@eagercon.com>
15571
15572 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
15573 to hw_execute.
15574 * linux-x86-low.c (x86_insert_point, x86_remove_point):
15575 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
15576 hardware breakpoint.
15577
15578 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
15579
15580 * gdbserver/linux-low.c (initialize_low): Call
15581 linux_ptrace_init_warnings.
15582
15583 2012-07-02 Doug Evans <dje@google.com>
15584
15585 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
15586 pointer to int.
15587
15588 2012-07-02 Stan Shebs <stan@codesourcery.com>
15589
15590 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
15591 (ax.o): Add it to build rule.
15592 (ax-ipa.o): Ditto.
15593 (OBS): Add format.o.
15594 (IPA_OBS): Add format.o.
15595 * server.c (handle_query): Claim support for breakpoint commands.
15596 (process_point_options): Add command case.
15597 (process_serial_event): Leave running if there are printfs in
15598 effect.
15599 * mem-break.h (any_persistent_commands): Declare.
15600 (add_breakpoint_commands): Declare.
15601 (gdb_no_commands_at_breakpoint): Declare.
15602 (run_breakpoint_commands): Declare.
15603 * mem-break.c (struct point_command_list): New struct.
15604 (struct breakpoint): New field command_list.
15605 (any_persistent_commands): New function.
15606 (add_commands_to_breakpoint): New function.
15607 (add_breakpoint_commands): New function.
15608 (gdb_no_commands_at_breakpoint): New function.
15609 (run_breakpoint_commands): New function.
15610 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
15611 locally.
15612 * ax.c: Include format.h.
15613 (ax_printf): New function.
15614 (gdb_eval_agent_expr): Add printf opcode.
15615
15616 2012-06-13 Yao Qi <yao@codesourcery.com>
15617
15618 * server.c (start_inferior): Remove duplicated writes to fields
15619 'last_resume_kind' and 'last_status' of 'current_inferior'.
15620
15621 2012-06-12 Yao Qi <yao@codesourcery.com>
15622 Pedro Alves <palves@redhat.com>
15623
15624 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
15625 comment.
15626 * server.c (handle_v_cont): Extend comment.
15627
15628 2012-06-11 Yao Qi <yao@codesourcery.com>
15629
15630 * linux-low.c (linux_attach): Add 'static'.
15631
15632 2012-06-06 Yao Qi <yao@codesourcery.com>
15633
15634 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
15635
15636 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
15637
15638 Fix gcc -flto compilation warning.
15639 * server.c (main): Make variable multi_mode and attach volatile.
15640
15641 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15642
15643 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
15644 if the platform doesn't know about it.
15645
15646 2012-05-30 Jeff Kenton <jkenton@tilera.com>
15647
15648 * Makefile.in (SFILES): Add linux-tile-low.c.
15649 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
15650 * configure.srv: Handle tilegx-*-linux*.
15651 * linux-tile-low.c: New file.
15652
15653 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
15654
15655 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
15656
15657 2012-05-24 Pedro Alves <palves@redhat.com>
15658
15659 PR gdb/7205
15660
15661 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
15662
15663 2012-05-24 Pedro Alves <palves@redhat.com>
15664
15665 PR gdb/7205
15666
15667 Replace target_signal with gdb_signal throughout.
15668
15669 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
15670
15671 * linux-low.c (linux_store_registers): Avoid the copying sequence
15672 when no data has been retrieved by ptrace.
15673
15674 2012-05-22 Will Deacon <will.deacon@arm.com>
15675
15676 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
15677 Include asm/ptrace.h.
15678 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
15679 already defined.
15680
15681 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
15682
15683 * linux-low.c (linux_store_registers): Don't re-retrieve data
15684 with ptrace that has already been obtained from /proc. Always
15685 copy any data retrieved with ptrace to the buffer supplied.
15686
15687 2012-05-11 Yao Qi <yao@codesourcery.com>
15688 Pedro Alves <palves@redhat.com>
15689
15690 * linux-low.c (enum stopping_threads_kind): New.
15691 (stopping_threads): Change type to `enum stopping_threads_kind'.
15692 (handle_extended_wait): If stopping and suspending threads, leave
15693 the new_lwp suspended too.
15694 (linux_wait_for_event): Adjust.
15695 (stop_all_lwps): Set `stopping_threads' to
15696 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
15697 whether we're suspending threads or just stopping them. Assert no
15698 recursion happens.
15699
15700 2012-04-29 Yao Qi <yao@codesourcery.com>
15701
15702 * server.h: Move some code to ...
15703 * gdbthread.h: ... here. New.
15704 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
15705 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
15706 (nto-low.o, win32-low.o): Likewise.
15707 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
15708 * regcache.c, remote-utils.c, server.c: Likewise.
15709 * target.c, tracepoint.c, win32-low.c: Likewise.
15710
15711 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15712
15713 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
15714 (PTRACE_ARG4_TYPE): Likewise.
15715 (PTRACE_XFER_TYPE): Likewise.
15716 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
15717 ptrace to PTRACE_ARG3_TYPE.
15718 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
15719 (PTRACE_ARG4_TYPE): Likewise.
15720 (PTRACE_XFER_TYPE): Likewise.
15721 (linux_detach_one_lwp): Cast fourth argument of
15722 ptrace to long then PTRACE_ARG4_TYPE.
15723 (regsets_fetch_inferior_registers): Cast third argument of
15724 ptrace to long then PTRACE_ARG3_TYPE.
15725 (regsets_store_inferior_registers): Likewise.
15726
15727 2012-04-20 Pedro Alves <palves@redhat.com>
15728
15729 * configure: Regenerate.
15730
15731 2012-04-19 Pedro Alves <palves@redhat.com>
15732
15733 * Makefile.in (GNULIB_BUILDDIR): New.
15734 (LIBGNU, INCGNU, GNULIB_H): Adjust.
15735 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
15736 (all, install-only, uninstall, clean-info, all-lib, clean): No
15737 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
15738 (maintainer-clean realclean distclean): Use subdir_do.
15739 (subdir_do): New.
15740 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
15741 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
15742 * acinclude.m4: Include acx_configure_dir.m4.
15743 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
15744 calls. Call AC_PROG_RANLIB. Configure gnulib using
15745 ACX_CONFIGURE_DIR.
15746 (GNULIB): New.
15747 (GNULIB_STDINT_H): Adjust.
15748 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
15749 * gdbreplay.c: Include build-gnulib/config.h.
15750 * server.h: Likewise.
15751 * aclocal.m4: Regenerate.
15752 * config.in: Regenerate.
15753 * configure: Regenerate.
15754
15755 2012-04-19 Pedro Alves <palves@redhat.com>
15756
15757 * Makefile.in (LIBGNU, INCGNU): Adjust.
15758 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
15759 (all, install-only, uninstall, clean-info, all-lib, clean)
15760 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
15761 * configure.ac: Adjust AC_OUTPUT output.
15762 * aclocal.m4: Regenerate.
15763 * configure: Regenerate.
15764
15765 2012-04-19 Pedro Alves <palves@redhat.com>
15766
15767 * Makefile.in (generated_files): New.
15768 (server_h): Remove the explicit dependency on config.h, and depend
15769 on $generated_files.
15770
15771 2012-04-19 Pedro Alves <palves@redhat.com>
15772
15773 * Makefile.in (INCGNU): Add -Ignulib.
15774
15775 2012-04-19 Pedro Alves <palves@redhat.com>
15776
15777 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
15778 (INCGNU): ... this, and spell out -I here.
15779 (GNULIB_LIB): Rename to ...
15780 (LIBGNU): ... this.
15781 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
15782
15783 2012-04-19 Pedro Alves <palves@redhat.com>
15784
15785 * config.in: Regenerate.
15786
15787 2012-04-19 Pedro Alves <palves@redhat.com>
15788
15789 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
15790 * server.h (memmem): Remove declaration.
15791 * config.in: Regenerate.
15792 * configure: Regenerate.
15793
15794 2012-04-19 Yao Qi <yao@codesourcery.com>
15795
15796 * Makefile.in (SFILES): Add common/vec.c.
15797 (OBS): Add vec.o.
15798 (vec.o): New rule.
15799
15800 2012-04-19 Yao Qi <yao@codesourcery.com>
15801
15802 * remote-utils.c (prepare_resume_reply): Replace with macro
15803 target_core_of_thread.
15804 * server.c (handle_qxfer_threads_proper): Likewise.
15805 * target.h (traget_core_of_thread): New macro.
15806
15807 2012-04-18 Pedro Alves <palves@redhat.com>
15808
15809 * aclocal.m4: Regenerate.
15810 * configure: Regenerate.
15811
15812 2012-04-16 Yao Qi <yao@codesourcery.com>
15813
15814 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
15815 duplicated on address.
15816
15817 2012-04-16 Yao Qi <yao@codesourcery.com>
15818
15819 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
15820 (struct tracepoint_action_ops) <send>: New field.
15821 (m_tracepoint_action_send, r_tracepoint_action_send): New.
15822 (agent_expr_send, x_tracepoint_action_send): New.
15823 (l_tracepoint_action_send): New.
15824 (cmd_qtdp): Download and install tracepoint
15825 according to `use_agent'.
15826 (run_inferior_command): Add one more parameter `len'.
15827 Update callers.
15828 (tracepoint_send_agent): New.
15829 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
15830
15831 2012-04-16 Yao Qi <yao@codesourcery.com>
15832
15833 * tracepoint.c (download_tracepoints): Moved to ...
15834 (cmd_qtstart): ... here.
15835
15836 2012-04-14 Yao Qi <yao@codesourcery.com>
15837
15838 * tracepoint.c: Include inttypes.h.
15839 (struct collect_memory_action): Use sized types.
15840 (struct tracepoint): Likewise.
15841 (cmd_qtdp, stop_tracing): Update print specifiers.
15842 (cmd_qtp, response_tracepoint): Likewise.
15843 (collect_data_at_tracepoint): Likewise.
15844 (collect_data_at_step): Likewise.
15845
15846 2012-04-14 Yao Qi <yao@codesourcery.com>
15847
15848 Import gnulib module inttypes.
15849 * aclocal.m4, config.in, configure: Regenerated.
15850
15851 2012-04-14 Yao Qi <yao@codesourcery.com>
15852
15853 * Makefile.in (maintainer-clean, realclean, distclean): Remove
15854 Makefile and config.status at last.
15855
15856 2012-04-13 Yao Qi <yao@codesourcery.com>
15857
15858 * tracepoint.c: Include stdint.h unconditionally.
15859
15860 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15861
15862 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
15863 on BFD_HAVE_SYS_PROCFS_TYPE.
15864 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
15865 * configure: Regenerate.
15866 * config.in: Likewise.
15867
15868 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
15869
15870 * Makefile.in (clean): Also remove x32.c x32-linux.c
15871 x32-avx.c x32-avx-linux.c.
15872 (x32.o): New target.
15873 (x32.c): Likewise.
15874 (x32-linux.o): Likewise.
15875 (x32-linux.c): Likewise.
15876 (x32-avx.o): Likewise.
15877 (x32-avx.c): Likewise.
15878 (x32-avx-linux.o): Likewise.
15879 (x32-avx-linux.c): Likewise.
15880
15881 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
15882 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
15883 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
15884 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
15885 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
15886 i386/x32-avx-linux.xml.
15887
15888 * linux-x86-low.c (init_registers_x32_linux): New prototype.
15889 (init_registers_x32_avx_linux): Likwise.
15890 (x86_linux_update_xmltarget): Call init_registers_x32_linux
15891 or init_registers_x32_avx_linux if linux_is_elf64 is false.
15892
15893 2012-04-13 Pedro Alves <palves@redhat.com>
15894
15895 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
15896 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
15897 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
15898 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
15899 the sub-make.
15900
15901 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
15902
15903 * linux-x86-low.c (compat_x32_clock_t): New.
15904 (compat_x32_siginfo_t): Likewise.
15905 (compat_x32_siginfo_from_siginfo): Likewise.
15906 (siginfo_from_compat_x32_siginfo): Likewise.
15907 (linux_is_elf64): Likewise.
15908 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
15909 and siginfo_from_compat_x32_siginfo for x32.
15910 (x86_arch_setup): Set linux_is_elf64.
15911
15912 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
15913
15914 PR gdb/13969
15915 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
15916 e_machine field.
15917 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
15918 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
15919 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
15920 compatible with process.
15921
15922 2012-04-12 Yao Qi <yao@codesourcery.com>
15923
15924 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
15925 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
15926 (install-only, install-info, clean): Handle sub dir gnulib.
15927 (all-lib, am--refresh): New targets.
15928 (memmem.o): Remove target.
15929 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
15930 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
15931 (AC_REPLACE_FUNCS): Remove memmem.
15932 Invoke gl_INIT and AM_INIT_AUTOMAKE.
15933 (AC_OUTPUT): Generate Makefile in gnulib/.
15934 * aclocal.m4, config.in, configure: Regenerated.
15935
15936 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
15937
15938 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
15939
15940 2012-04-05 Pedro Alves <palves@redhat.com>
15941
15942 -Werror=strict-aliasing
15943
15944 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
15945 pointer.
15946
15947 2012-04-04 Pedro Alves <palves@redhat.com>
15948
15949 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
15950 (sparc_store_gregset_from_stack, sparc_store_gregset)
15951 (sparc_breakpoint_at): Fix formatting.
15952
15953 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15954
15955 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
15956 are available.
15957 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
15958 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
15959 * config.in: Regenerate.
15960 * configure: Likewise.
15961
15962 2012-03-29 Pedro Alves <palves@redhat.com>
15963
15964 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
15965 Correct ptrace arguments.
15966
15967 2012-03-28 Pedro Alves <palves@redhat.com>
15968
15969 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
15970 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
15971 (IA64_FR1_REGNUM): New defines.
15972 (ia64_fetch_register): New.
15973 (the_low_target): Install it.
15974 * linux-low.h (struct linux_target_ops) <fetch_register>: New
15975 field.
15976 * linux-low.c (linux_fetch_registers): Try the
15977 the_low_target.fetch_register hook first.
15978
15979 * linux-arm-low.c (the_low_target): Adjust.
15980 * linux-bfin-low.c (the_low_target): Adjust.
15981 * linux-cris-low.c (the_low_target): Adjust.
15982 * linux-crisv32-low.c (the_low_target): Adjust.
15983 * linux-m32r-low.c (the_low_target): Adjust.
15984 * linux-m68k-low.c (the_low_target): Adjust.
15985 * linux-mips-low.c (the_low_target): Adjust.
15986 * linux-ppc-low.c (the_low_target): Adjust.
15987 * linux-s390-low.c (the_low_target): Adjust.
15988 * linux-sh-low.c (the_low_target): Adjust.
15989 * linux-sparc-low.c (the_low_target): Adjust.
15990 * linux-tic6x-low.c (the_low_target): Adjust.
15991 * linux-x86-low.c (the_low_target): Adjust.
15992 * linux-xtensa-low.c (the_low_target): Adjust.
15993
15994 2012-03-26 Pedro Alves <palves@redhat.com>
15995
15996 * server.c (handle_qxfer_libraries): Don't bail early if
15997 the_target->qxfer_libraries_svr4 is not NULL.
15998
15999 2012-03-26 Pedro Alves <palves@redhat.com>
16000
16001 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
16002
16003 2012-03-23 Pedro Alves <palves@redhat.com>
16004
16005 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
16006 "library-list-svr4" element's start tag when the the DSO list is
16007 empty.
16008
16009 2012-03-23 Pedro Alves <palves@redhat.com>
16010
16011 * linux-low.c (read_one_ptr): Read the inferior's pointer through
16012 a variable whose type size is the same as the inferior's pointer
16013 size.
16014
16015 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
16016
16017 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
16018 struct siginfo.
16019 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
16020 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
16021 * linux-low.h: Include <signal.h>.
16022 (struct siginfo): Remove forward declaration.
16023 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
16024 struct siginfo.
16025
16026 2012-03-21 Mike Frysinger <vapier@gentoo.org>
16027
16028 * .gitignore: Ignore more files.
16029
16030 2012-03-19 Pedro Alves <palves@redhat.com>
16031 Jan Kratochvil <jan.kratochvil@redhat.com>
16032
16033 * server.c (cont_thread, general_thread): Add describing comments.
16034 (start_inferior): Clear `cont_thread'.
16035 (handle_v_cont): Don't set `cont_thread' if resuming all threads
16036 of a process.
16037
16038 2012-03-15 Yao Qi <yao@codesourcery.com>
16039
16040 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
16041 handling to ...
16042 (cmd_qtdp): ... here.
16043
16044 2012-03-15 Yao Qi <yao@codesourcery.com>
16045
16046 * tracepoint.c (struct tracepoint_action_ops): New.
16047 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
16048 (m_tracepoint_action_download): New.
16049 (r_tracepoint_action_download): New.
16050 (x_tracepoint_action_download): New.
16051 (l_tracepoint_action_download): New.
16052 (add_tracepoint_action): Install `action->ops' according type.
16053 (download_tracepoint_1): Move code `download' function pointer
16054 of various tracepoint_action_ops.
16055
16056 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
16057
16058 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
16059 linux_ptrace_attach_warnings.
16060
16061 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
16062
16063 * Makefile.in (linux-ptrace.o): New.
16064 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
16065 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
16066 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
16067 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
16068 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
16069 of these targets.
16070 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
16071
16072 2012-03-08 Yao Qi <yao@codesourcery.com>
16073 Pedro Alves <palves@redhat.com>
16074
16075 Fix PR server/13392.
16076 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
16077 offset of JMP insn.
16078 * tracepoint.c (remove_tracepoint): New.
16079 (cmd_qtdp): Call remove_tracepoint when failed to install.
16080
16081 2012-03-07 Pedro Alves <palves@redhat.com>
16082
16083 * linux-low.c (get_detach_signal): New.
16084 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
16085 Pass on pending signals to PTRACE_DETACH. Check the result of the
16086 ptrace call.
16087 * server.c (program_signals, program_signals_p): New.
16088 (handle_general_set): Handle QProgramSignals.
16089 * server.h (program_signals, program_signals_p): Declare.
16090
16091 2012-03-05 Pedro Alves <palves@redhat.com>
16092 Jan Kratochvil <jan.kratochvil@redhat.com>
16093
16094 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
16095 New comment why.
16096
16097 2012-03-03 Yao Qi <yao@codesourcery.com>
16098
16099 * tracepoint.c (tracepoint_look_up_symbols): Update call to
16100 agent_look_up_symbols.
16101
16102 2012-03-03 Yao Qi <yao@codesourcery.com>
16103
16104 * Makefile.in (linux-low.o): Keep dependence on agent.h.
16105 (linux-x86-low.o): Likewise.
16106 * server.h: Remove in_process_agent_loaded.
16107 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
16108 common/agent.c.
16109 Update callers.
16110
16111 2012-03-03 Yao Qi <yao@codesourcery.com>
16112
16113 * tracepoint.c (gdb_agent_capability): New global.
16114 (in_process_agent_loaded_ust): Renamed to
16115 `in_process_agent_supports_ust'.
16116 Update callers.
16117 (in_process_agent_supports_ust): Call agent_capability_check.
16118 (clear_installed_tracepoints): Assert that agent supports
16119 agent.
16120
16121 2012-03-03 Yao Qi <yao@codesourcery.com>
16122
16123 * linux-low.c (linux_supports_agent): New.
16124 (linux_target_ops): Initialize field `supports_agent' with
16125 linux_supports_agent.
16126 * target.h (struct target_ops) <supports_agent>: New.
16127 (target_supports_agent): New macro.
16128 * server.c (handle_general_set): Handle packet 'QAgent'.
16129 (handle_query): Send `QAgent+'.
16130 * Makefile.in (server.o): Depends on agent.h.
16131
16132 2012-03-03 Yao Qi <yao@codesourcery.com>
16133
16134 * Makefile.in (OBS): Add agent.o.
16135 Add new rule for agent.o.
16136 Track dependence of tracepoint.c on agent.h.
16137 * tracepoint.c (run_inferior_command_1):
16138 (run_inferior_command): Call agent_run_command.
16139 (gdb_ust_connect_sync_socket): Deleted. Move it to
16140 common/agent.c.
16141 (resume_thread, stop_thread): Likewise.
16142 (gdb_ust_socket_init): Renamed to ...
16143 (gdb_agent_socket_init): ... New.
16144 (gdb_ust_thread): Renamed to ...
16145 (gdb_agent_helper_thread): ... New.
16146 (gdb_ust_init): Move some code to ...
16147 (gdb_agent_init): ... here. New.
16148 [HAVE_UST]: Call gdb_ust_init.
16149 (initialize_tracepoint_ftlib): Call gdb_agent_init.
16150 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
16151 * config.in, configure: Regenerated.
16152
16153 2012-03-02 Pedro Alves <palves@redhat.com>
16154
16155 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
16156 * linux-low.c (struct simple_pid_list): New.
16157 (stopped_pids): New a struct simple_pid_list pointer.
16158 (add_to_pid_list, pull_pid_from_list): New.
16159 (handle_extended_wait): Don't assume the first signal new children
16160 report is SIGSTOP. Adjust call to pull_pid_from_list.
16161 (linux_wait_for_lwp): Adjust.
16162
16163 2012-03-02 Yao Qi <yao@codesourcery.com>
16164
16165 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
16166 debug log.
16167
16168 2012-03-02 Yao Qi <yao@codesourcery.com>
16169
16170 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
16171 `stop_pc' and `tpoint'. Update caller.
16172
16173 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
16174
16175 * linux-low.h (linux_target_ops): Add regset_bitmap member.
16176 * linux-low.c (use_linux_regsets): New macro.
16177 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
16178 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
16179 (linux_register_in_regsets): New function.
16180 (usr_fetch_inferior_registers): Skip registers covered by
16181 regsets.
16182 (usr_store_inferior_registers): Likewise.
16183 (usr_fetch_inferior_registers): New macro.
16184 (usr_store_inferior_registers): Likewise.
16185 (linux_fetch_registers): Handle mixed regset/non-regset targets.
16186 (linux_store_registers): Likewise.
16187 * linux-mips-low.c (init_registers_mips_dsp_linux): New
16188 prototype.
16189 (init_registers_mips64_dsp_linux): Likewise.
16190 (init_registers_mips_linux): New macro.
16191 (init_registers_mips_dsp_linux): Likewise.
16192 (mips_dsp_num_regs): Likewise.
16193 (DSP_BASE, DSP_CONTROL): New fallback macros.
16194 (mips_base_regs): New macro.
16195 (mips_regmap): Use it. Fix the size.
16196 (mips_dsp_regmap): New variable.
16197 (mips_dsp_regset_bitmap): Likewise.
16198 (mips_arch_setup): New function.
16199 (mips_cannot_fetch_register): Use the_low_target.regmap rather
16200 than mips_regmap.
16201 (mips_cannot_store_register): Likewise.
16202 (the_low_target): Update .arch_setup, .num_regs and .regmap
16203 initializers. Add .regset_bitmap initializer.
16204 * linux-arm-low.c (the_low_target): Add .regset_bitmap
16205 initializer.
16206 * linux-bfin-low.c (the_low_target): Likewise.
16207 * linux-cris-low.c (the_low_target): Likewise.
16208 * linux-crisv32-low.c (the_low_target): Likewise.
16209 * linux-ia64-low.c (the_low_target): Likewise.
16210 * linux-m32r-low.c (the_low_target): Likewise.
16211 * linux-m68k-low.c (the_low_target): Likewise.
16212 * linux-ppc-low.c (the_low_target): Likewise.
16213 * linux-s390-low.c (the_low_target): Likewise.
16214 * linux-sh-low.c (the_low_target): Likewise.
16215 * linux-sparc-low.c (the_low_target): Likewise.
16216 * linux-tic6x-low.c (the_low_target): Likewise.
16217 * linux-x86-low.c (the_low_target): Likewise.
16218 * linux-xtensa-low.c (the_low_target): Likewise.
16219 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
16220 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
16221 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
16222 srv_xmlfiles.
16223 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
16224 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
16225
16226 2012-02-29 Yao Qi <yao@codesourcery.com>
16227 Pedro Alves <palves@redhat.com>
16228
16229 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
16230 `step_over_finished' is true.
16231
16232 2012-02-27 Pedro Alves <palves@redhat.com>
16233
16234 * linux-low.c (pid_is_stopped): Delete, moved to common/.
16235 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
16236
16237 2012-02-27 Pedro Alves <palves@redhat.com>
16238
16239 PR server/9684
16240 * linux-low.c (pid_is_stopped): New.
16241 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
16242
16243 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
16244
16245 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
16246 of conditions.
16247
16248 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
16249
16250 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
16251
16252 2012-02-24 Luis Machado <lgustavo@codesourcery>
16253
16254 * server.c (handle_query): Advertise support for target-side
16255 breakpoint condition evaluation.
16256 (process_point_options): New function.
16257 (process_serial_event): When inserting a breakpoint, check for
16258 a target-side condition that should be evaluated.
16259
16260 * mem-break.c: Include regcache.h and ax.h.
16261 (point_cond_list_t): New data structure.
16262 (breakpoint) <cond_list>: New field.
16263 (find_gdb_breakpoint_at): Make non-static.
16264 (delete_gdb_breakpoint_at): Clear any target-side
16265 conditions.
16266 (clear_gdb_breakpoint_conditions): New function.
16267 (add_condition_to_breakpoint): Likewise.
16268 (add_breakpoint_condition): Likewise.
16269 (gdb_condition_true_at_breakpoint): Likewise.
16270 (gdb_breakpoint_here): Return result directly instead
16271 of going through a local variable.
16272
16273 * mem-break.h (find_gdb_breakpoint_at): New prototype.
16274 (clear_gdb_breakpoint_conditions): Likewise.
16275 (add_breakpoint_condition): Likewise.
16276 (gdb_condition_true_at_breakpoint): Likewise.
16277
16278 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
16279 (need_step_over_p): Take target-side breakpoint condition into
16280 consideration.
16281
16282 2012-02-24 Luis Machado <lgustavo@codesourcery>
16283
16284 * server.h: Include tracepoint.h.
16285 (agent_mem_read, agent_get_trace_state_variable_value,
16286 agent_set_trace_state_variable_value,
16287 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
16288 get_set_tsv_func_addr): New prototypes.
16289
16290 * ax.h: New include file.
16291 * ax.c: New source file.
16292
16293 * tracepoint.c: Include ax.h.
16294 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
16295 agent_expr, eval_result_type): Move to ax.h.
16296 (parse_agent_expr): Rename to ...
16297 (gdb_parse_agent_expr): ... this, make it non-static and move
16298 to ax.h.
16299 (unparse_agent_expr) Rename to ...
16300 (gdb_unparse_agent_expr): ... this, make it non-static and move
16301 to ax.h.
16302 (eval_agent_expr): Rename to ...
16303 (eval_tracepoint_agent_expr): ... this.
16304 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
16305 forward declarations.
16306 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
16307 (agent_get_trace_state_variable_value): New function.
16308 (agent_set_trace_state_variable_value): New function.
16309 (cmd_qtdp): Call gdb_parse_agent_expr (...).
16310 (response_tracepoint): Call gdb_unparse_agent_expr (...).
16311 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
16312 (condition_true_at_tracepoint): Likewise.
16313 (parse_agent_expr): Rename to ...
16314 (gdb_parse_agent_expr): ... this and move to ax.c.
16315 (unparse_agent_expr): Rename to ...
16316 (gdb_unparse_agent_expr): ... this and move to ax.c.
16317 (gdb_agent_op_name): Move to ax.c.
16318 (eval_agent_expr): Rename to ...
16319 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
16320 and move to ax.c.
16321 (eval_tracepoint_agent_expr): New function.
16322 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
16323 non-static.
16324 (current_insn_ptr, emit_error, struct bytecode_address): Move to
16325 ax.c.
16326 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
16327 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
16328 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
16329 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
16330 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
16331 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
16332 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
16333 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
16334 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
16335 (compile_bytecodes): Remove forward declaration.
16336 (is_goto_target): Move to ax.c.
16337 (compile_bytecodes): Move to ax.c and call
16338 agent_get_trace_state_variable_value (...) and
16339 agent_set_trace_state_variable_value (...).
16340
16341 * Makefile.in: Update ax.c and IPA dependencies.
16342
16343 2012-02-24 Pedro Alves <palves@redhat.com>
16344
16345 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
16346 (cmd_bigqtbuffer_circular): ... this. Only handle
16347 'QTBuffer:circular:'.
16348 (handle_tracepoint_general_set): Adjust.
16349
16350 2012-02-16 Yao Qi <yao@codesourcery.com>
16351
16352 * inferiors.c: Move code to ...
16353 * dll.c: .... here. New.
16354 * server.h: Declare clear_dlls.
16355 * Makefile.in (SFILES): Add dll.c.
16356 (OBS): Add dll.o
16357 (dll.o): New rule.
16358
16359 2012-02-11 Yao Qi <yao@codesourcery.com>
16360
16361 * server.c: (handle_monitor_command): Add a new parameter
16362 `own_buf'.
16363 (handle_query): Update caller.
16364
16365 2012-02-09 Joel Brobecker <brobecker@adacore.com>
16366
16367 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
16368 * configure, config.in: Regenerate.
16369 * hostio.c: Provide an alternate implementation if HAVE_READLINK
16370 is not defined.
16371
16372 2012-02-02 Pedro Alves <palves@redhat.com>
16373
16374 Try SIGKILL first, then PTRACE_KILL.
16375 * linux-low.c (linux_kill_one_lwp): New.
16376 (linux_kill_one_lwp): Rename to ...
16377 (kill_one_lwp_callback): ... this. Use the new
16378 linux_kill_one_lwp.
16379
16380 2012-02-02 Pedro Alves <palves@redhat.com>
16381
16382 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
16383 inferior.
16384
16385 2012-01-27 Pedro Alves <palves@redhat.com>
16386
16387 * linux-low.c (linux_child_pid_to_exec_file): Delete.
16388 (elf_64_file_p): Make static.
16389 (linux_pid_exe_is_elf_64_file): New.
16390 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
16391 Delete declarations.
16392 (linux_pid_exe_is_elf_64_file): Declare.
16393 * linux-x86-low.c (x86_arch_setup): Use
16394 linux_pid_exe_is_elf_64_file.
16395
16396 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
16397
16398 * linux-low.c (linux_wait_for_event_1): Rename to ...
16399 (linux_wait_for_event): ... here and merge it with former
16400 linux_wait_for_event - new variable wait_ptid, use it.
16401 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
16402
16403 2012-01-23 Pedro Alves <palves@redhat.com>
16404
16405 * server.c (main): Avoid yet another case of infinite loop while
16406 detaching/killing after a longjmp.
16407
16408 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16409
16410 Code cleanup.
16411 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
16412
16413 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
16414
16415 * hostio.c (handle_readlink): New function.
16416 (handle_vFile): Call it to handle "vFile:readlink" packets.
16417
16418 2012-01-20 Pedro Alves <palves@redhat.com>
16419 Ulrich Weigand <ulrich.weigand@linaro.org>
16420
16421 * server.c (handle_v_requests): Only support vAttach and vRun to
16422 start multiple processes when in extended protocol mode.
16423
16424 2012-01-17 Pedro Alves <palves@redhat.com>
16425
16426 * tracepoint.c (initialize_tracepoint): Use mmap instead of
16427 memalign plus mprotect to allocate the scratch buffer.
16428
16429 2012-01-13 Pedro Alves <palves@redhat.com>
16430
16431 * server.c (attach_inferior): Clear `cont_thread'.
16432
16433 2012-01-13 Pedro Alves <palves@redhat.com>
16434
16435 * server.c (main): Avoid infinite loop while detaching/killing
16436 after a longjmp.
16437
16438 2012-01-09 Doug Evans <dje@google.com>
16439
16440 * server.c (start_inferior): Set last_ptid in --wrapper case.
16441
16442 2012-01-06 Yao Qi <yao@codesourcery.com>
16443
16444 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
16445 defined.
16446 [IN_PROCESS_AGENT] (debug_agent): New global variable.
16447
16448 2012-01-04 Yao Qi <yao@codesourcery.com>
16449
16450 * tracepoint.c (cmd_qtdp): Print debug message
16451 for static tracepoint.
16452
16453 2012-01-04 Yao Qi <yao@codesourcery.com>
16454
16455 * tracepoint.c (trace_vdebug): Differentiate debug message
16456 between gdbserver and IPA.
16457
16458 2012-01-03 Yao Qi <yao@codesourcery.com>
16459
16460 * tracepoint.c (tracepoint_was_hit): Don't collect for
16461 static tracepoint.
16462
16463 2012-01-02 Joel Brobecker <brobecker@adacore.com>
16464
16465 * terminal.h: Reformat copyright header.
16466
16467 2012-01-02 Joel Brobecker <brobecker@adacore.com>
16468
16469 * server.c (gdbserver_version): Update copyright year.
16470 * gdbreplay.c (gdbreplay_version): Likewise.
16471
16472 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
16473
16474 * linux-low.c (linux_create_inferior): Put empty if clause for write.
16475
16476 Revert:
16477 2011-12-18 Hui Zhu <teawater@gmail.com>
16478 * linux-low.c (linux_create_inferior): Save return value to ret.
16479
16480 2011-12-18 Hui Zhu <teawater@gmail.com>
16481
16482 * linux-low.c (linux_create_inferior): Save return value to ret.
16483
16484 2011-12-16 Doug Evans <dje@google.com>
16485
16486 * linux-low.c (linux_create_inferior): If stdio connection,
16487 redirect stdin from /dev/null, stdout to stderr.
16488 * remote-utils.c (remote_is_stdio): New static global.
16489 (remote_connection_is_stdio): New function.
16490 (remote_prepare): Handle stdio connection.
16491 (remote_open): Ditto.
16492 (remote_close): Don't close stdin for stdio connections.
16493 (read_prim,write_prim): New functions. Replace all calls to
16494 read/write to these.
16495 * server.c (main): Watch for "-" argument. Move call to
16496 remote_prepare before start_inferior.
16497 * server.h (STDIO_CONNECTION_NAME): New macro.
16498 (remote_connection_is_stdio): Declare.
16499
16500 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
16501 in debugging output.
16502
16503 2011-12-15 Yao Qi <yao@codesourcery.com>
16504
16505 * tracepoint.c: Include sys/syscall.h.
16506 (gdb_ust_thread): Remove preprocessor conditional.
16507
16508 2011-12-14 Pedro Alves <pedro@codesourcery.com>
16509
16510 * linux-low.c (linux_detach_one_lwp): Call
16511 the_low_target.prepare_to_resume before detaching.
16512
16513 2011-12-14 Yao Qi <yao@codesourcery.com>
16514
16515 * tracepoint.c (gdb_ust_thread): Don't ignore return value
16516 of write.
16517
16518 2011-12-14 Yao Qi <yao@codesourcery.com>
16519
16520 * i386-low.c (i386_low_stopped_data_address): Initialize local
16521 variable `control'.
16522
16523 2011-12-13 Pedro Alves <pedro@codesourcery.com>
16524
16525 PR remote/13492
16526
16527 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
16528 DR_CONTROL unless necessary. Extend comments.
16529 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
16530 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
16531
16532 2011-12-13 Yao Qi <yao@codesourcery.com>
16533
16534 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
16535 macros.
16536 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
16537
16538 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
16539
16540 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
16541 Print new debug message for such case.
16542
16543 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
16544
16545 Fix overlapping memcpy.
16546 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
16547 the read_inferior_memory transfer.
16548 (delete_fast_tracepoint_jump): New variable buf. Use it for the
16549 write_inferior_memory transfer.
16550 (set_fast_tracepoint_jump): New variable buf. Use it for the
16551 read_inferior_memory and write_inferior_memory transfers.
16552 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
16553 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
16554 Use it for the write_inferior_memory transfer.
16555 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
16556 buffers.
16557
16558 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
16559
16560 * linux-low.c (fetch_register, store_register): Make code
16561 consistent, fix formatting.
16562
16563 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
16564
16565 * linux-low.c (usr_store_inferior_registers): Factor out code
16566 to handle individual registers into...
16567 (store_register): ... this new function.
16568
16569 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
16570
16571 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
16572 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
16573 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
16574 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
16575 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
16576 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
16577 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
16578 (srv_xmlfiles): Add new XML files.
16579
16580 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
16581 and <sys/uio.h>.
16582 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
16583 (init_registers_s390_linux32v1): Add prototype.
16584 (init_registers_s390_linux32v2): Likewise.
16585 (init_registers_s390_linux64v1): Likewise.
16586 (init_registers_s390_linux64v2): Likewise.
16587 (init_registers_s390x_linux64v1): Likewise.
16588 (init_registers_s390x_linux64v2): Likewise.
16589 (s390_num_regs): Increment to 52.
16590 (s390_regmap): Add orig_r2 register.
16591 (s390_num_regs_3264): Increment to 68.
16592 (s390_regmap_3264): Add orig_r2 register.
16593 (s390_collect_ptrace_register): Handle orig_r2 register.
16594 (s390_supply_ptrace_register): Likewise.
16595 (s390_fill_last_break): New function.
16596 (s390_store_last_break): Likewise.
16597 (s390_fill_system_call): New function.
16598 (s390_store_system_call): Likewise.
16599 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
16600 register sets.
16601 (s390_check_regset): New function.
16602 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
16603 NT_S390_SYSTEM_CALL regsets and use appropriate description.
16604 Update target_regsets for available register sets.
16605
16606 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
16607 Jan Kratochvil <jan.kratochvil@redhat.com>
16608
16609 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
16610 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
16611 New.
16612 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
16613 * linux-low.h (struct process_info_private): New member r_debug.
16614 * server.c (handle_qxfer_libraries): Call
16615 the_target->qxfer_libraries_svr4.
16616 (handle_qxfer_libraries_svr4): New function.
16617 (qxfer_packets): New entry "libraries-svr4".
16618 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
16619 * target.h (struct target_ops): New member qxfer_libraries_svr4.
16620 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
16621 PACKET_qXfer_libraries_svr4.
16622
16623 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
16624
16625 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
16626 PSW address/mask between 8-byte and 16-byte formats.
16627 (s390_supply_ptrace_register): Likewise.
16628 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
16629 basic addressing mode bit.
16630
16631 2011-11-24 Stan Shebs <stan@codesourcery.com>
16632
16633 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
16634
16635 2011-11-17 Stan Shebs <stan@codesourcery.com>
16636
16637 * tracepoint.c (struct tracepoint): New field traceframe_usage.
16638 (tracing_start_time): New global.
16639 (tracing_stop_time): New global.
16640 (tracing_user_name): New global.
16641 (tracing_notes): New global.
16642 (tracing_stop_note): New global.
16643 (cmd_qtstart): Set traceframe_usage, start_time.
16644 (stop_tracing): Set stop_time.
16645 (cmd_qtstatus): Report additional status.
16646 (cmd_qtp): New function.
16647 (handle_tracepoint_query): Call it.
16648 (cmd_qtnotes): New function.
16649 (handle_tracepoint_general_set): Call it.
16650 (get_timestamp): Rename from tsv_get_timestamp.
16651
16652 2011-11-14 Stan Shebs <stan@codesourcery.com>
16653 Kwok Cheung Yeung <kcy@codesourcery.com>
16654
16655 * linux-x86-low.c (small_jump_insn): New.
16656 (i386_install_fast_tracepoint_jump_pad): Add arguments for
16657 trampoline and error message, build a trampoline and issue a small
16658 jump instruction to it.
16659 (x86_install_fast_tracepoint_jump_pad): Add arguments for
16660 trampoline and error message.
16661 (x86_get_min_fast_tracepoint_insn_len): New.
16662 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
16663 * linux-low.h (struct linux_target_ops): Add arguments to
16664 install_fast_tracepoint_jump_pad operation, add new operation.
16665 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
16666 arguments.
16667 (linux_get_min_fast_tracepoint_insn_len): New function.
16668 (linux_target_op): Add new operation.
16669 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
16670 (gdb_trampoline_buffer_end): Ditto.
16671 (gdb_trampoline_buffer_error): Ditto.
16672 (struct ipa_sym_addresses): Add fields for new IPA variables.
16673 (symbol_list): Add entries for new IPA variables.
16674 (struct tracepoint): Add fields to hold the address range of the
16675 trampoline used by the tracepoint.
16676 (trampoline_buffer_head): New static variable.
16677 (trampoline_buffer_tail): Ditto.
16678 (claim_trampoline_space): New function.
16679 (have_fast_tracepoint_trampoline_buffer): New function.
16680 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
16681 structure.
16682 (install_fast_tracepoint): Ditto, also add error buffer argument.
16683 (cmd_qtminftpilen): New function.
16684 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
16685 (fast_tracepoint_from_trampoline_address): New function.
16686 (fast_tracepoint_collecting): Handle trampoline as part of jump
16687 pad space.
16688 (set_trampoline_buffer_space): New function.
16689 (initialize_tracepoint): Initialize new IPA variables.
16690 * target.h (struct target_ops): Add arguments to
16691 install_fast_tracepoint_jump_pad operation, add new
16692 get_min_fast_tracepoint_insn_len operation.
16693 (target_get_min_fast_tracepoint_insn_len): New.
16694 (install_fast_tracepoint_jump_pad): Add arguments.
16695 * server.h (IPA_BUFSIZ): Define.
16696 * linux-i386-ipa.c: Include extra header files.
16697 (initialize_fast_tracepoint_trampoline_buffer): New function.
16698 (initialize_low_tracepoint): Call it.
16699 * server.h (set_trampoline_buffer_space): Declare.
16700 (claim_trampoline_space): Ditto.
16701 (have_fast_tracepoint_trampoline_buffer): Ditto.
16702
16703 2011-11-14 Yao Qi <yao@codesourcery.com>
16704
16705 * server.c (handle_query): Handle InstallInTrace for qSupported.
16706 * tracepoint.c (add_tracepoint): Sort list.
16707 (install_tracepoint, download_tracepoint): New.
16708 (cmd_qtdp): Call them to install and download tracepoints.
16709 (sort_tracepoints): Removed.
16710 (cmd_qtstart): Update.
16711
16712 2011-11-14 Yao Qi <yao@codesourcery.com>
16713
16714 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
16715 * mem-break.h: Declare.
16716 * tracepoint.c (cmd_qtstart): Move some code to ...
16717 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
16718 New.
16719 (download_tracepoints): Move some code to ...
16720 (download_tracepoint_1): ... here. New.
16721
16722 2011-11-08 Yao Qi <yao@codesourcery.com>
16723
16724 * remote-utils.c (relocate_instruction): A comment fix.
16725
16726 2011-11-07 Joel Brobecker <brobecker@adacore.com>
16727
16728 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
16729 (i386_dr_low_get_control, i386_dr_low_get_status): Use
16730 dr_status_mirror and dr_control_mirror from debug_reg_state.
16731 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
16732 (i386_initial_stuff): Remove use of deleted globals.
16733 (i386_get_thread_context, i386_set_thread_context,
16734 i386_thread_added): Use dr_status_mirror and dr_control_mirror
16735 from debug_reg_state.
16736
16737 2011-11-05 Yao Qi <yao@codesourcery.com>
16738
16739 * tracepoint.c (gdb_collect): Loop over tracepoints of same
16740 address as TPOINT's.
16741
16742 2011-11-02 Stan Shebs <stan@codesourcery.com>
16743
16744 * tracepoint.c (agent_mem_read_string): New function.
16745 (eval_agent_expr): Call it for tracenz.
16746 * server.c (handle_query): Report support for tracenz.
16747
16748 2011-11-02 Yao Qi <yao@codesourcery.com>
16749
16750 * tracepoint.c (cmd_qtstart): Remove unused local variables.
16751
16752 2011-11-02 Yao Qi <yao@codesourcery.com>
16753
16754 * target.h: Fix a typo in comment.
16755
16756 2011-10-31 Pedro Alves <pedro@codesourcery.com>
16757
16758 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
16759 clobber the breakpoints' shadows with fast tracepoint jumps.
16760 * mem-break.h (check_mem_write): Add `myaddr' parameter.
16761 * target.c (write_inferior_memory): Also pass MYADDR down to
16762 check_mem_write.
16763
16764 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
16765
16766 * configure.ac: Check support for personality routine.
16767 * configure: Regenerate.
16768 * config.in: Likewise.
16769 * linux-low.c: Include <sys/personality.h>.
16770 Define ADDR_NO_RANDOMIZE if necessary.
16771 (linux_create_inferior): Disable address space randomization when
16772 forking inferior, if requested.
16773 (linux_supports_disable_randomization): New function.
16774 (linux_target_ops): Install it.
16775 * server.h (disable_randomization): Declare.
16776 * server.c (disable_randomization): New global variable.
16777 (handle_general_set): Handle QDisableRandomization.
16778 (handle_query): Likewise for qSupported.
16779 (main): Support --disable-randomization and --no-disable-randomization
16780 command line arguments.
16781 * target.h (struct target_ops): Add supports_disable_randomization.
16782 (target_supports_disable_randomization): New macro.
16783
16784 2011-09-29 Mike Frysinger <vapier@gentoo.org>
16785
16786 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
16787 ifdef check.
16788 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
16789 [!PT_GETDSBT] (target_loadmap): New definition.
16790 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
16791 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
16792 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
16793 and PT_GETDSBT to LINUX_LOADMAP.
16794 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
16795 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
16796
16797 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
16798
16799 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
16800 (arm_linux_hwbp_cap): New static variable.
16801 (arm_linux_get_hwbp_cap): Replace by ...
16802 (arm_linux_init_hwbp_cap): ... this new function.
16803 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
16804 (arm_linux_get_hw_watchpoint_count): Likewise.
16805 (arm_linux_get_hw_watchpoint_max_length): Likewise.
16806 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
16807 (arm_prepare_to_resume): Use perror_with_name instead of error.
16808
16809 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
16810
16811 * linux-arm-low.c: Include <signal.h>.
16812 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
16813 (struct arm_linux_hwbp_cap): New data type.
16814 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
16815 (struct arm_linux_hw_breakpoint): New data type.
16816 (MAX_BPTS, MAX_WPTS): Define.
16817 (struct arch_process_info, struct arch_lwp_info): New data types.
16818 (arm_linux_get_hwbp_cap): New function.
16819 (arm_linux_get_hw_breakpoint_count): Likewise.
16820 (arm_linux_get_hw_watchpoint_count): Likewise.
16821 (arm_linux_get_hw_watchpoint_max_length): Likewise.
16822 (arm_hwbp_control_initialize): Likewise.
16823 (arm_hwbp_control_is_enabled): Likewise.
16824 (arm_hwbp_control_is_initialized): Likewise.
16825 (arm_hwbp_control_disable): Likewise.
16826 (arm_linux_hw_breakpoint_equal): Likewise.
16827 (arm_linux_hw_point_initialize): Likewise.
16828 (struct update_registers_data): New data structure.
16829 (update_registers_callback: New function.
16830 (arm_insert_point): Likewise.
16831 (arm_remove_point): Likewise.
16832 (arm_stopped_by_watchpoint): Likewise.
16833 (arm_stopped_data_address): Likewise.
16834 (arm_new_process): Likewise.
16835 (arm_new_thread): Likewise.
16836 (arm_prepare_to_resume): Likewise.
16837 (the_low_target): Register arm_insert_point, arm_remove_point,
16838 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
16839 arm_new_thread, and arm_prepare_to_resume.
16840
16841 2011-09-15 Stan Shebs <stan@codesourcery.com>
16842
16843 * server.h (struct emit_ops): Add compare-goto fields.
16844 * tracepoint.c (gdb_agent_op_sizes): New table.
16845 (emit_eq_goto): New function.
16846 (emit_ne_goto): New function.
16847 (emit_lt_goto): New function.
16848 (emit_le_goto): New function.
16849 (emit_gt_goto): New function.
16850 (emit_ge_goto): New function.
16851 (is_goto_target): New function.
16852 (compile_bytecodes): Recognize special cases of compare-goto
16853 combinations and call specialized emitters for them.
16854 * linux-x86-low.c (amd64_emit_eq_goto): New function.
16855 (amd64_emit_ne_goto): New function.
16856 (amd64_emit_lt_goto): New function.
16857 (amd64_emit_le_goto): New function.
16858 (amd64_emit_gt_goto): New function.
16859 (amd64_emit_ge_goto): New function.
16860 (amd64_emit_ops): Add the new functions.
16861 (i386_emit_eq_goto): New function.
16862 (i386_emit_ne_goto): New function.
16863 (i386_emit_lt_goto): New function.
16864 (i386_emit_le_goto): New function.
16865 (i386_emit_gt_goto): New function.
16866 (i386_emit_ge_goto): New function.
16867 (i386_emit_ops): Add the new functions.
16868
16869 2011-09-08 Stan Shebs <stan@codesourcery.com>
16870
16871 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
16872 (i386_emit_epilogue): Restore %ebx.
16873
16874 2011-08-31 Jie Zhang <jzhang918@gmail.com>
16875
16876 * server.c (step_thread): Remove definition.
16877 (process_serial_event): Don't handle Hs.
16878 * server.h (step_thread): Remove declaration.
16879 * target.c (set_desired_inferior): Remove use of step_thread.
16880
16881 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
16882
16883 * linux-low.c: Include linux-procfs.h.
16884 (linux_attach_lwp_1): Update comments.
16885 (linux_attach): Scan for existing threads when attaching to a
16886 process that is the tgid.
16887 * Makefile.in: Update dependencies.
16888
16889 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
16890
16891 * configure.srv: Add linux-procfs.o dependencies.
16892
16893 2011-08-14 Yao Qi <yao@codesourcery.com>
16894
16895 * target.h (struct target_ops): Fix indent.
16896 * win32-low.c (win32_target_ops): Fix comment.
16897
16898 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
16899 Yao Qi <yao@codesourcery.com>
16900
16901 * Makefile.in (clean): Remove tic6x-*.c files.
16902 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
16903 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
16904 (tic6x-c64xp-linux.c): Likewise.
16905 * configure.srv: Add support for tic6x-*-uclinux.
16906 * linux-tic6x-low.c: New.
16907 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
16908
16909 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
16910 Yao Qi <yao@codesourcery.com>
16911
16912 * target.h (struct target_ops): Add read_loadmap.
16913 * linux-low.c (struct target_loadseg): New type.
16914 (struct target_loadmap): New type.
16915 (linux_read_loadmap): New function.
16916 (linux_target_ops): Add linux_read_loadmap.
16917 * server.c (handle_query): Support qXfer:fdpic:read packet.
16918 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
16919 to NULL.
16920
16921 2011-08-05 Eli Zaretskii <eliz@gnu.org>
16922
16923 * win32-low.c: Include <stdint.h>.
16924
16925 2011-07-22 Pedro Alves <pedro@codesourcery.com>
16926
16927 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
16928 to the inferior here.
16929 (i386_remove_aligned_watchpoint): Ditto.
16930 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
16931 fit part of the watchpoint in the debug registers.
16932 (i386_update_inferior_debug_regs): New.
16933 (i386_low_insert_watchpoint): Work on a local mirror of the debug
16934 registers, and only update the inferior on success.
16935 (i386_low_remove_watchpoint): Ditto.
16936
16937 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
16938
16939 * linux-low.c (compare_ints, unique, list_threads, show_process,
16940 linux_core_of_thread): Delete.
16941 (linux_target_ops): Change linux_core_of_thread to
16942 linux_common_core_of_thread.
16943 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
16944 * utils.c (malloc_failure): Change type of argument.
16945 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
16946 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
16947 common/linux-osdata.c, common/ptid.c and common/buffer.c.
16948 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
16949 (IPA_OBJS): Add common-utils-ipa.o.
16950 (ptid_h, linux_osdata_h): New macros.
16951 (server_h): Add common/common-utils.h, common/xml-utils.h,
16952 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
16953 common/ptid.h.
16954 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
16955 ptid.o, buffer.o): New rules.
16956 (linux-low.o): Add common/linux-osdata.h as a dependency.
16957 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
16958 * configure.ac: Add AC_HEADER_DIRENT check.
16959 * config.in: Regenerate.
16960 * configure: Regenerate.
16961 * remote-utils.c (xml_escape_text): Delete.
16962 (buffer_grow, buffer_free, buffer_init, buffer_finish,
16963 buffer_xml_printf): Move to common/buffer.c.
16964 * server.c (main): Remove call to initialize_inferiors.
16965 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
16966 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
16967 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
16968 internal_error, gdb_assert, gdb_assert_fail): Delete.
16969 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
16970 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
16971 common/buffer.h.
16972 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
16973 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
16974 initialize_inferiors): Delete.
16975
16976 2011-07-20 Pedro Alves <pedro@codesourcery.com>
16977
16978 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
16979 symbol error.
16980
16981 2011-05-31 Pedro Alves <pedro@codesourcery.com>
16982
16983 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
16984 assertion.
16985 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
16986
16987 2011-05-26 Yao Qi <yao@codesourcery.com>
16988
16989 * Makefile.in (thread-db.o): Track dependence to
16990 common/gdb_thread_db.h.
16991 * thread-db.c: include gdb_thread_db.h from right place.
16992
16993 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
16994
16995 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
16996 __FILE__ and __LINE__ to internal_error.
16997
16998 2011-05-13 Doug Evans <dje@google.com>
16999
17000 * thread-db.c (try_thread_db_load_from_sdir): New function.
17001 (try_thread_db_load_from_dir): New function.
17002 (thread_db_load_search): Handle $sdir, ignore $pdir.
17003 Remove trying of system directories if search of
17004 libthread-db-search-path fails, that is now done via $sdir.
17005
17006 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
17007
17008 * server.c (handle_query): Add EnableDisableTracepoints to the list
17009 of supported features.
17010 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
17011 tracepoints.
17012 (cmd_qtenable_disable): New.
17013 (cmd_qtstart): Install tracepoints even if disabled.
17014 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
17015 receiving a QTEnable or QTDisable packet.
17016 (gdb_collect): Skip data collection if fast tracepoint is disabled.
17017 (ust_marker_to_static_tracepoint): Do not ignore disabled static
17018 tracepoints.
17019 (gdb_probe): Skip data collection if static tracepoint is disabled.
17020
17021 2011-05-10 Doug Evans <dje@google.com>
17022
17023 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
17024
17025 2011-05-04 Doug Evans <dje@google.com>
17026
17027 * linux-low.c (linux_join): Skip process lookup.
17028 * spu-low.c (spu_join): Ditto.
17029 * server.c (join_inferiors_callback): Delete.
17030 (process_serial_event): For 'D' packet (detach) call join_inferior
17031 directly.
17032
17033 2011-05-04 Joseph Myers <joseph@codesourcery.com>
17034
17035 * README: Don't mention xscale*-*-linux*.
17036 * configure.srv (xscale*-*-linux*): Don't handle target.
17037
17038 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
17039
17040 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
17041 casting pointers.
17042 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
17043 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
17044 (i386_emit_void_call_2): Likewise.
17045
17046 2011-04-26 Yao Qi <yao@codesourcery.com>
17047
17048 * linux-low.c: Move common macros to linux-ptrace.h.
17049 Include linux-ptrace.h.
17050 * Makefile.in (linux_ptrace_h): New.
17051 (linux-low.o): Depends on linux-ptrace.h.
17052
17053 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
17054
17055 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
17056 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
17057 (remote_prepare): New function with most of the TCP code from ...
17058 (remote_open): ... here. Detect PORT here unconditionally. Move also
17059 setting transport_is_reliable.
17060 * server.c (run_once): New variable.
17061 (gdbserver_usage): Document it.
17062 (main): Set run_once for `--once'. Call remote_prepare. Exit after
17063 the first run if RUN_ONCE.
17064 * server.h (run_once, remote_prepare): New declarations.
17065
17066 2011-04-19 Tom Tromey <tromey@redhat.com>
17067
17068 * win32-low.c (handle_load_dll): Remove duplicate "the".
17069
17070 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
17071
17072 Remove support for old Cygwin 1.5 versions.
17073 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
17074 function to avoid warning.
17075 (win32_add_one_solib): Use cygwin_conv_path function to avoid
17076 warning.
17077
17078 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
17079
17080 * gdbserver/server.h (Macro _): Define it if not available.
17081
17082 2011-03-14 Michael Snyder <msnyder@vmware.com>
17083
17084 * hostio.c (handle_close): Remove unnecessary null test.
17085
17086 2011-03-10 Joel Brobecker <brobecker@adacore.com>
17087
17088 * Makefile.in (maintainer-clean realclean distclean): Remove
17089 "make ... subdir_do" command.
17090
17091 2011-03-10 Michael Snyder <msnyder@vmware.com>
17092
17093 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
17094
17095 * server.c (handle_v_run): Free alloced buffer on early return.
17096
17097 2011-03-09 Yao Qi <yao@codesourcery.com>
17098
17099 Revert:
17100 2011-03-04 Yao Qi <yao@codesourcery.com>
17101
17102 * Makefile.in: Remove GNU make feature --directory.
17103
17104 2011-03-05 Yao Qi <yao@codesourcery.com>
17105
17106 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
17107 (subdir_do): New make target. Copied from gdb/Makefile.
17108 (maintainer-clean, realclean, distclean, clean): Call corresponding
17109 make targets in common/Makefile.
17110
17111 2011-02-11 Yao Qi <yao@codesourcery.com>
17112
17113 * configure.ac: Call AC_PROG_RANLIB.
17114 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
17115 * configure: Regenerate.
17116
17117 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
17118
17119 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
17120
17121 2011-03-06 Yao Qi <yao@codesourcery.com>
17122
17123 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
17124
17125 2011-03-05 Yao Qi <yao@codesourcery.com>
17126
17127 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
17128 (subdir_do): New make target. Copied from gdb/Makefile.
17129 (maintainer-clean, realclean, distclean, clean): Call corresponding
17130 make targets in common/Makefile.
17131
17132 2011-03-04 Yao Qi <yao@codesourcery.com>
17133
17134 * Makefile.in: Remove GNU make feature --directory.
17135
17136 2011-03-04 Michael Snyder <msnyder@vmware.com>
17137
17138 * server.c (queue_stop_reply): Call xmalloc not malloc.
17139
17140 2011-03-02 Michael Snyder <msnyder@vmware.com>
17141
17142 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
17143
17144 2011-02-28 Michael Snyder <msnyder@vmware.com>
17145
17146 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
17147 (cmd_qtframe): Ditto.
17148 (cmd_qtbuffer): Ditto.
17149 (cmd_bigqtbuffer): Ditto.
17150
17151 * utils.c (decimal2str): Initialize 'width' to nine, then
17152 don't mess with it.
17153
17154 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
17155
17156 * hostio.c (require_data): Free *data, not data.
17157
17158 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
17159
17160 * hostio.c (require_data): Use free, not xfree.
17161
17162 2011-02-27 Michael Snyder <msnyder@vmware.com>
17163
17164 * server.c (handle_query): Discard unused value.
17165
17166 * hostio.c (require_data): Free malloc memory before returning
17167 error.
17168
17169 2011-02-26 Michael Snyder <msnyder@vmware.com>
17170
17171 * linux-low.c (list_threads): Call closedir for dirent.
17172
17173 2011-02-27 Michael Snyder <msnyder@vmware.com>
17174
17175 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
17176 a case statement falls through.
17177
17178 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
17179
17180 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
17181 in comparison.
17182
17183 2011-02-26 Michael Snyder <msnyder@vmware.com>
17184
17185 * utils.c (decimal2str): Eliminate dead code and dead param.
17186 (pulongest): Drop dead param from call to decimal2str.
17187 (plongest): Ditto.
17188
17189 2011-02-24 Joel Brobecker <brobecker@adacore.com>
17190
17191 Revert the following patch (not approved yet):
17192 2011-02-21 Hui Zhu <teawater@gmail.com>
17193 * tracepoint.c (tp_printf): New function.
17194 (eval_agent_expr): Handle gdb_agent_op_printf.
17195
17196 2011-02-21 Hui Zhu <teawater@gmail.com>
17197
17198 * tracepoint.c (tp_printf): New function.
17199 (eval_agent_expr): Handle gdb_agent_op_printf.
17200
17201 2011-02-18 Tom Tromey <tromey@redhat.com>
17202
17203 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
17204 (tracepoint.o): Likewise.
17205 * tracepoint.c (enum gdb_agent_op): Use ax.def.
17206 (gdb_agent_op_names): Likewise.
17207
17208 2011-02-18 Tom Tromey <tromey@redhat.com>
17209
17210 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
17211 gdb_agent_op_rot>: New constants.
17212 (gdb_agent_op_names): Add pick and roll.
17213 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
17214 cases.
17215
17216 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
17217
17218 * aclocal.m4: Regenerated with aclocal-1.11.1.
17219
17220 2011-02-14 Pedro Alves <pedro@codesourcery.com>
17221
17222 * server.c (handle_qxfer_traceframe_info): New.
17223 (qxfer_packets): Register "traceframe-info".
17224 (handle_query): Report support for qXfer:traceframe-info:read+.
17225 * tracepoint.c (match_blocktype): New.
17226 (traceframe_find_block_type): Rename to ...
17227 (traceframe_walk_blocks): ... this. Add callback filter argument,
17228 and use it.
17229 (traceframe_find_block_type): New, reimplemented on top of
17230 traceframe_walk_blocks.
17231 (build_traceframe_info_xml): New.
17232 (traceframe_read_info): New.
17233 * server.h (traceframe_read_info): Declare.
17234
17235 2011-02-11 Yao Qi <yao@codesourcery.com>
17236
17237 * configure.ac: Call AC_PROG_RANLIB.
17238 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
17239 * configure: Regenerate.
17240
17241 2011-02-07 Pedro Alves <pedro@codesourcery.com>
17242
17243 * server.c (gdb_read_memory): Change return semantics to allow
17244 partial transfers.
17245 (handle_search_memory_1): Adjust.
17246 (process_serial_event) <'m' packet>: Handle partial transfers.
17247 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
17248
17249 2011-01-28 Pedro Alves <pedro@codesourcery.com>
17250
17251 * regcache.c (init_register_cache): Initialize
17252 regcache->register_status.
17253 (free_register_cache): Release regcache->register_status.
17254 (regcache_cpy): Copy register_status.
17255 (registers_to_string): Print 'x's for unavailable registers.
17256 (supply_register): Mark the register's status valid or
17257 unavailable, depending on whether a buffer was passed in or not.
17258 (supply_register_zeroed): New.
17259 (supply_regblock): Mark the registers' status valid or
17260 unavailable, depending on whether a buffer was passed in or not.
17261 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
17262 (struct regcache): New `register_status' field.
17263 (supply_register_zeroed): Declare.
17264 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
17265 supply_register_zeroed, rather than passing a NULL buffer to
17266 supply_register.
17267 * tracepoint.c (fetch_traceframe_registers): Update comment.
17268
17269 2011-01-28 Pedro Alves <pedro@codesourcery.com>
17270
17271 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
17272 buffer explicit.
17273
17274 2011-01-25 Pedro Alves <pedro@codesourcery.com>
17275
17276 * server.h (decode_xfer_write): Change prototype.
17277 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
17278 and don't extract the annex here.
17279 * server.c (decode_xfer_read): Remove `annex' parameter,
17280 and don't extract the annex here.
17281 (decode_xfer): New.
17282 (struct qxfer): New.
17283 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
17284 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
17285 (handle_qxfer_statictrace): New functions, abstracted out from
17286 handle_query, and made to use the struct qxfer interface.
17287 (handle_threads_qxfer_proper): Rename to ...
17288 (handle_qxfer_threads_proper): ... this.
17289 (handle_threads_qxfer): Rename to ...
17290 (handle_qxfer_threads): ... this. Adjust.
17291 (qxfer_packets): New array.
17292 (handle_qxfer): New function.
17293 (handle_query): Use handle_qxfer.
17294
17295 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
17296
17297 * gdbreplay.c: Shorten lines of >= 80 columns.
17298 * linux-low.c: Ditto.
17299 * linux-ppc-low.c: Ditto.
17300 * linux-s390-low.c: Ditto.
17301 * linux-sparc-low.c: Ditto.
17302 * linux-x86-low.c: Ditto.
17303 * linux-xtensa-low.c: Ditto.
17304 * mem-break.c: Ditto.
17305 * nto-low.c: Ditto.
17306 * regcache.h: Ditto.
17307 * remote-utils.c: Ditto.
17308 * server.c: Ditto.
17309 * server.h: Ditto.
17310 * thread-db.c: Ditto.
17311 * tracepoint.c: Ditto.
17312 * utils.c: Ditto.
17313 * win32-low.h: Ditto.
17314
17315 2011-01-05 Joel Brobecker <brobecker@adacore.com>
17316
17317 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
17318 update.
17319
17320 2011-01-01 Joel Brobecker <brobecker@adacore.com>
17321
17322 * server.c (gdbserver_version): Update copyright year in version
17323 output.
17324 * gdbreplay.c (gdbreplay_version): Ditto.
17325
17326 2010-12-29 Jie Zhang <jie.zhang@analog.com>
17327
17328 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
17329 * linux-bfin-low.c: New file.
17330 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
17331 PT_DATA_ADDR for BFIN targets.
17332 * Makefile.in (SFILES): Add linux-bfin-low.c.
17333 (clean): Remove reg-bfin.c.
17334 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
17335 * README: Mention supported Blackfin targets.
17336
17337 2010-12-23 Mike Frysinger <vapier@gentoo.org>
17338
17339 * .gitignore: New file.
17340
17341 2010-11-16 Mike Frysinger <vapier@gentoo.org>
17342
17343 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
17344
17345 2010-10-22 Jie Zhang <jie@codesourcery.com>
17346
17347 * Makefile.in: Add FLAGS_TO_PASS variable.
17348 (install): Remove dependency of install-only and recursively
17349 invoke make for install-only.
17350
17351 2010-10-04 Doug Evans <dje@google.com>
17352
17353 * Makefile.in (uninstall): Use $(DESTDIR).
17354
17355 2010-09-24 Pedro Alves <pedro@codesourcery.com>
17356
17357 PR gdb/11842
17358
17359 * linux-x86-low.c (compat_siginfo_from_siginfo)
17360 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
17361 si_code is < 0. Check for si_code == SI_TIMER before checking for
17362 si_code < 0.
17363
17364 2010-09-13 Joel Brobecker <brobecker@adacore.com>
17365
17366 * lynx-i386-low.c: New file.
17367 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
17368
17369 2010-09-13 Joel Brobecker <brobecker@adacore.com>
17370
17371 * lynx-low.c (ptrace_request_to_str): Remove handling for
17372 request values that have been removed in LynxOS 5.x.
17373
17374 2010-09-13 Joel Brobecker <brobecker@adacore.com>
17375
17376 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
17377 <ptrace.h>
17378
17379 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
17380
17381 * configure.ac: Add --enable-inprocess-agent option.
17382 * configure: Rebuilt.
17383
17384 2010-09-06 Yao Qi <yao@codesourcery.com>
17385
17386 * linux-low.c (linux_kill): Remove unused variable.
17387 (linux_stabilize_threads): Likewise.
17388 * server.c (start_inferior): Likewise.
17389 (queue_stop_reply_callback): Likewise.
17390 * tracepoint.c (do_action_at_tracepoint): Likewise.
17391
17392 2010-09-06 Yao Qi <yao@codesourcery.com>
17393
17394 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
17395 on return.
17396
17397 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
17398
17399 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
17400
17401 2010-09-06 Pedro Alves <pedro@codesourcery.com>
17402
17403 * Makefile.in (install-only): Replace $IPA_DEPFILES with
17404 "$(IPA_DEPFILES)".
17405
17406 2010-09-01 Joel Brobecker <brobecker@adacore.com>
17407
17408 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
17409 gdbserver/lynx-ppc-low.c: New files.
17410 * Makefile.in (lynx_low_h): New variable.
17411 (lynx-low.o, lynx-ppc-low.o): New rules.
17412 * configure.ac: On LynxOS, link with -lnetinet.
17413 * configure.srv: Add handling of powerpc-*-lynxos* targets.
17414 * configure: regenerate.
17415
17416 2010-09-01 Joel Brobecker <brobecker@adacore.com>
17417
17418 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
17419 * configure.ac: Add check for vasprintf and vsnprintf.
17420 * configure, config.in: Regenerate.
17421 * server.h (vasprintf, vsnprintf): Add conditional declarations.
17422
17423 2010-09-01 Joel Brobecker <brobecker@adacore.com>
17424
17425 * gdbreplay.c: Move include of alloca.h up, next to include of
17426 malloc.h.
17427 * server.h: Add include of malloc.h.
17428 * mem-break.c: Remove include of malloc.h.
17429 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
17430
17431 2010-09-01 Joel Brobecker <brobecker@adacore.com>
17432
17433 * Makefile.in (memmem.o): Build with -Wno-error.
17434
17435 2010-09-01 Joel Brobecker <brobecker@adacore.com>
17436
17437 * utils.c (xsnprintf): Make non-static.
17438 * server.h: Add xsnprintf declaration.
17439 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
17440 replace calls to snprintf by calls to xsnprintf throughout.
17441
17442 2010-09-01 Joel Brobecker <brobecker@adacore.com>
17443
17444 * configure.ac: Add configure check for alloca.
17445 * configure, config.in: Regenerate.
17446 * server.h: Include alloca.h if it exists.
17447 * gdbreplay.c: Include alloca.h if it exists.
17448
17449 2010-08-28 Pedro Alves <pedro@codesourcery.com>
17450
17451 * linux-low.c (__SIGRTMIN): Define if not already defined.
17452 (linux_create_inferior): Check for __ANDROID__ rather than
17453 __SIGRTMIN.
17454 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
17455 are already deferred.
17456 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
17457 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
17458 stopped and already has a pending signal to report.
17459 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
17460 a pending signal to report or is moving out of a jump pad.
17461 (linux_init_signals): Check for __ANDROID__ rather than
17462 __SIGRTMIN.
17463
17464 2010-08-28 Pedro Alves <pedro@codesourcery.com>
17465
17466 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
17467 debug_threads check. Avoid a linear search when not doing debug
17468 output.
17469
17470 2010-08-27 Pedro Alves <pedro@codesourcery.com>
17471
17472 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
17473 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
17474 (struct file_handler) <fd>: Change type to gdb_fildes_t.
17475 (process_event): Change local fd's type to gdb_fildes_t.
17476 (create_file_handler): Adjust prototype.
17477 (delete_file_handler): Adjust prototype.
17478 (handle_file_event): Adjust prototype. Use pfildes.
17479 (create_file_event): Adjsut prototype.
17480 * remote-utils.c (remote_desc, listen_desc): Change type to
17481 gdb_fildes_t.
17482 * server.h: New gdb_fildes_t typedef.
17483 [USE_WIN32API]: Include winsock2.h.
17484 (delete_file_handler, add_file_handler): Adjust prototypes.
17485 (pfildes): Declare.
17486 * utils.c (pfildes): New.
17487
17488 2010-08-27 Pedro Alves <pedro@codesourcery.com>
17489
17490 * configure.ac (build_warnings): Add -Wno-char-subscripts.
17491 * configure: Regenerate.
17492
17493 2010-08-27 Pedro Alves <pedro@codesourcery.com>
17494
17495 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
17496 (linux_done_accessing_memory): ... this.
17497 (linux_target_ops): Adjust.
17498 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
17499 * nto-low.c (nto_target_ops): Adjust comment.
17500 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
17501 * spu-low.c (spu_target_ops): Adjust comment.
17502 * target.h (target_ops): Rename unprepare_to_access_memory field
17503 to done_accessing_memory.
17504 (unprepare_to_access_memory): Rename to ...
17505 (done_accessing_memory): ... this.
17506
17507 2010-08-26 Pedro Alves <pedro@codesourcery.com>
17508
17509 * linux-low.c (linux_prepare_to_access_memory): New.
17510 (linux_unprepare_to_access_memory): New.
17511 (linux_target_ops): Install them.
17512 * server.c (read_memory): Rename to ...
17513 (gdb_read_memory): ... this. Use
17514 prepare_to_access_memory/prepare_to_access_memory.
17515 (write_memory): Rename to ...
17516 (gdb_write_memory): ... this. Use
17517 prepare_to_access_memory/prepare_to_access_memory.
17518 (handle_search_memory_1): Adjust.
17519 (process_serial_event): Adjust.
17520 * target.h (struct target_ops): New fields
17521 prepare_to_access_memory and unprepare_to_access_memory.
17522 (prepare_to_access_memory, unprepare_to_access_memory): New.
17523 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
17524 prepare_to_access_memory/prepare_to_access_memory.
17525 * nto-low.c (nto_target_ops): Adjust.
17526 * spu-low.c (spu_target_ops): Adjust.
17527 * win32-low.c (win32_target_ops): Adjust.
17528
17529 2010-08-26 Pedro Alves <pedro@codesourcery.com>
17530
17531 * Makefile.in (WARN_CFLAGS): Get it from configure.
17532 (WERROR_CFLAGS): New.
17533 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
17534 * configure.ac: Introduce --enable-werror, which adds -Werror to
17535 the compiler command line. Enabled by default. Disable with
17536 --disable-werror. Add -Wdeclaration-after-statement
17537 Wpointer-arith and -Wformat-nonliteral to warning flags.
17538 * configure: Regenerate.
17539
17540 2010-08-26 Pedro Alves <pedro@codesourcery.com>
17541
17542 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
17543
17544 2010-08-26 Pedro Alves <pedro@codesourcery.com>
17545
17546 * gdbreplay.c (remote_error): New.
17547 (gdbchar): New.
17548 (expect): Use gdbchar. Check for error reading from GDB.
17549 Clarify sync error output.
17550 (play): Check for errors writing to GDB.
17551 * linux-low.c (sigchld_handler): Really ignore `write' errors.
17552 * remote-utils.c (getpkt): Check for errors writing to the remote
17553 descriptor.
17554
17555 2010-08-25 Pedro Alves <pedro@codesourcery.com>
17556
17557 * linux-low.c (linux_wait_1): Move non-debugging code out of
17558 `debug_threads' control.
17559
17560 2010-08-25 Pedro Alves <pedro@codesourcery.com>
17561
17562 * linux-low.c (linux_wait_1): Don't set last_status here.
17563 * server.c (push_event, queue_stop_reply_callback): Assert we're
17564 not pushing a TARGET_WAITKIND_IGNORE event.
17565 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
17566 (myresume, handle_target_event): Set the thread's last_resume_kind
17567 and last_status from the target returned status.
17568
17569 2010-08-25 Pedro Alves <pedro@codesourcery.com>
17570
17571 PR threads/10729
17572
17573 * linux-x86-low.c (update_debug_registers_callback): New.
17574 (i386_dr_low_set_addr): Use it.
17575 (i386_dr_low_get_addr): New.
17576 (i386_dr_low_set_control): Use update_debug_registers_callback.
17577 (i386_dr_low_get_control): New.
17578 (i386_dr_low_get_status): Adjust.
17579 * linux-low.c (linux_stop_lwp): New.
17580 * linux-low.h (linux_stop_lwp): Declare.
17581
17582 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
17583 argument instead of a i386_debug_reg_state.
17584 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
17585 a i386_debug_reg_state.
17586 (i386_insert_aligned_watchpoint): Adjust.
17587 (i386_remove_aligned_watchpoint): Adjust.
17588 (i386_low_stopped_data_address): Read the debug registers from the
17589 inferior instead of from the mirrors.
17590 * i386-low.h (struct i386_debug_reg_state): Extend comment.
17591 (i386_dr_low_get_addr): Declare.
17592 (i386_dr_low_get_control): Declare.
17593 (i386_dr_low_get_status): Change prototype.
17594
17595 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
17596 (i386_dr_low_get_addr): New.
17597 (i386_dr_low_get_control): New.
17598 (i386_dr_low_get_status): Adjust prototype. Return
17599 dr_status_mirror.
17600 (i386_initial_stuff): Clear dr_status_mirror and
17601 dr_control_mirror.
17602 (i386_get_thread_context): Adjust.
17603 (i386_set_thread_context): Adjust.
17604 (i386_thread_added): Adjust.
17605
17606 2010-08-24 Pedro Alves <pedro@codesourcery.com>
17607
17608 * linux-low.h (linux_thread_area): Delete declaration.
17609
17610 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
17611
17612 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
17613 after its termination.
17614
17615 2010-08-09 Pedro Alves <pedro@codesourcery.com>
17616
17617 * linux-low.c (gdb_wants_lwp_stopped): Delete.
17618 (gdb_wants_all_stopped): Delete.
17619 (linux_wait_1): Don't call them.
17620 * server.c (handle_v_cont): Tag all threads as want-stopped.
17621 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
17622 stopped as "client-wants-stopped".
17623
17624 2010-07-31 Pedro Alves <pedro@codesourcery.com>
17625
17626 * Makefile.in (signals_h): New.
17627 (server_h): Depend on it.
17628 (server.o): Don't depend on $(signals_def).
17629 (signals.o): Depend on $(signals_def).
17630
17631 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
17632
17633 * Makefile.in (signals_def): New.
17634 (server_h): Append include/gdb/signals.h and signals_def.
17635 (server.o): Append signals_def.
17636
17637 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
17638
17639 * server.c (handle_target_event): Use target_signal_to_host for
17640 resume_info.sig initialization.
17641 * target.h (struct thread_resume) <sig>: New comment.
17642
17643 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
17644
17645 * server.c (handle_query): strcpy() the returned string from paddress()
17646 instead of sprintf().
17647 * utils.c (paddress): Return phex_nz().
17648
17649 2010-07-07 Joel Brobecker <brobecker@adacore.com>
17650
17651 * server.c (handle_v_cont): Call mourn_inferior if process
17652 just exited.
17653 (myresume): Likewise.
17654
17655 2010-07-01 Pedro Alves <pedro@codesourcery.com>
17656
17657 Static tracepoints, and integration with UST.
17658
17659 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
17660 * mem-break.c (uninsert_all_breakpoints)
17661 (reinsert_all_breakpoints): New.
17662 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
17663 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
17664 (gdb_agent_ust_loaded, helper_thread_id)
17665 (gdb_agent_helper_thread_id): New macros.
17666 (struct ipa_sym_addresses): Add addr_ust_loaded,
17667 addr_helper_thread_id, addr_cmd_buf.
17668 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
17669 (in_process_agent_loaded_ust): New.
17670 (write_e_ust_not_loaded): New.
17671 (maybe_write_ipa_ust_not_loaded): New.
17672 (struct collect_static_trace_data_action): New.
17673 (enum tracepoint_type) <static_tracepoint>: New.
17674 (struct tracepoint) <handle>: Mention static tracepoints.
17675 (struct static_tracepoint_ctx): New.
17676 (CMD_BUF_SIZE): New.
17677 (add_tracepoint_action): Handle static tracepoint actions.
17678 (unprobe_marker_at): New.
17679 (clear_installed_tracepoints): Handle static tracepoints.
17680 (cmd_qtdp): Handle static tracepoints.
17681 (probe_marker_at): New.
17682 (cmd_qtstart): Handle static tracepoints.
17683 (response_tracepoint): Handle static tracepoints.
17684 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
17685 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
17686 (get_context_regcache): Handle static tracepoints.
17687 (do_action_at_tracepoint): Handle static tracepoint actions.
17688 (traceframe_find_block_type): Handle static trace data blocks.
17689 (traceframe_read_sdata): New.
17690 (download_tracepoints): Download static tracepoint actions.
17691 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
17692 (GDB_PROBE_NAME): New.
17693 (ust_ops): New.
17694 (GET_UST_SYM): New.
17695 (USTF): New.
17696 (dlsym_ust): New.
17697 (ust_marker_to_static_tracepoint): New.
17698 (gdb_probe): New.
17699 (collect_ust_data_at_tracepoint): New.
17700 (gdb_ust_probe): New.
17701 (UNIX_PATH_MAX, SOCK_DIR): New.
17702 (gdb_ust_connect_sync_socket): New.
17703 (resume_thread, stop_thread): New.
17704 (run_inferior_command): New.
17705 (init_named_socket): New.
17706 (gdb_ust_socket_init): New.
17707 (cstr_to_hexstr): New.
17708 (next_st): New.
17709 (first_marker, next_marker): New.
17710 (response_ust_marker): New.
17711 (cmd_qtfstm, cmd_qtsstm): New.
17712 (unprobe_marker_at, probe_marker_at): New.
17713 (cmd_qtstmat, gdb_ust_thread): New.
17714 (gdb_ust_init): New.
17715 (initialize_tracepoint_ftlib): Call gdb_ust_init.
17716 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
17717 (ST_REGENTRY): New.
17718 (x86_64_st_collect_regmap): New.
17719 (X86_64_NUM_ST_COLLECT_GREGS): New.
17720 (AMD64_RIP_REGNUM): New.
17721 (supply_static_tracepoint_registers): New.
17722 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
17723 (ST_REGENTRY): New.
17724 (i386_st_collect_regmap): New.
17725 (i386_NUM_ST_COLLECT_GREGS): New.
17726 (supply_static_tracepoint_registers): New.
17727 * server.c (handle_query): Handle qXfer:statictrace:read.
17728 <qSupported>: Report support for StaticTracepoints, and
17729 qXfer:statictrace:read features.
17730 * server.h (traceframe_read_sdata)
17731 (supply_static_tracepoint_registers): Declare.
17732 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
17733 (unpack_varlen_hex): Include in IPA build.
17734 * Makefile.in (ustlibs, ustinc): New.
17735 (IPA_OBJS): Add remote-utils-ipa.o.
17736 ($(IPA_LIB)): Link -ldl and -lpthread.
17737 (UST_CFLAGS): New.
17738 (IPAGENT_CFLAGS): Add UST_CFLAGS.
17739 * config.in, configure: Regenerate.
17740
17741 2010-06-20 Ian Lance Taylor <iant@google.com>
17742 Pedro Alves <pedro@codesourcery.com>
17743
17744 * linux-x86-low.c (always_true): Delete.
17745 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
17746 trying to fool the compiler with always_true.
17747
17748 2010-06-20 Pedro Alves <pedro@codesourcery.com>
17749
17750 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
17751 conditions in gdbserver.
17752
17753 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
17754
17755 * spu-low.c (spu_read_memory): Wrap around local store limit.
17756 (spu_write_memory): Likewise.
17757
17758 2010-06-15 Pedro Alves <pedro@codesourcery.com>
17759
17760 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
17761 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
17762 LONGEST uses.
17763 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
17764 uses.
17765 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
17766 uses with LONGEST uses.
17767
17768 2010-06-14 Stan Shebs <stan@codesourcery.com>
17769 Pedro Alves <pedro@codesourcery.com>
17770
17771 Bytecode compiler.
17772
17773 * linux-x86-low.c: Include limits.h.
17774 (add_insns): New.
17775 (always_true): New.
17776 (EMIT_ASM): New.
17777 (EMIT_ASM32): New.
17778 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
17779 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
17780 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
17781 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
17782 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
17783 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
17784 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
17785 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
17786 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
17787 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
17788 (amd64_emit_void_call_2): New.
17789 (amd64_emit_ops): New.
17790 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
17791 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
17792 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
17793 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
17794 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
17795 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
17796 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
17797 (i386_emit_call, i386_emit_reg, i386_emit_pop)
17798 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
17799 (i386_emit_stack_adjust, i386_emit_int_call_1)
17800 (i386_emit_void_call_2): New.
17801 (i386_emit_ops): New.
17802 (x86_emit_ops): New.
17803 (the_low_target): Install x86_emit_ops.
17804 * server.h (struct emit_ops): New.
17805 (get_raw_reg_func_addr): Declare.
17806 (current_insn_ptr, emit_error): Declare.
17807 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
17808 (set_trace_state_variable_value): New defines.
17809 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
17810 addr_get_trace_state_variable_value and
17811 addr_set_trace_state_variable_value.
17812 (symbol_list): New fields for get_raw_reg,
17813 get_trace_state_variable_value and set_trace_state_variable_value.
17814 (condfn): New typedef.
17815 (struct tracepoint): New field `compiled_cond'.
17816 (do_action_at_tracepoint): Clear compiled_cond.
17817 (get_trace_state_variable_value, set_trace_state_variable_value):
17818 Export in the IPA.
17819 (condition_true_at_tracepoint): If there's a compiled condition,
17820 run that.
17821 (current_insn_ptr, emit_error): New globals.
17822 (struct bytecode_address): New.
17823 (get_raw_reg_func_addr): New.
17824 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
17825 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
17826 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
17827 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
17828 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
17829 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
17830 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
17831 (compile_tracepoint_condition, compile_bytecodes): New.
17832 * target.h (emit_ops): Forward declare.
17833 (struct target_ops): New field emit_ops.
17834 (target_emit_ops): New.
17835 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
17836 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
17837 * linux-low.c (linux_emit_ops): New.
17838 (linux_target_ops): Install it.
17839 * linux-low.h (struct linux_target_ops): New field emit_ops.
17840
17841 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
17842
17843 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
17844 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
17845
17846 2010-06-01 Pedro Alves <pedro@codesourcery.com>
17847 Stan Shebs <stan@codesourcery.com>
17848
17849 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
17850 (all): Depend on $(extra_libraries).
17851 (install-only): Install the IPA.
17852 (IPA_OBJS, IPA_LIB): New.
17853 (clean): Remove the IPA lib.
17854 (IPAGENT_CFLAGS): New.
17855 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
17856 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
17857 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
17858 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
17859 * configure.ac: Check for atomic builtins support in the compiler.
17860 (IPA_DEPFILES, extra_libraries): Define.
17861 * configure.srv (ipa_obj): Add description.
17862 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
17863 (i[34567]86-*-linux*): Set ipa_obj.
17864 (x86_64-*-linux*): Set ipa_obj.
17865 * linux-low.c (stabilizing_threads): New.
17866 (supports_fast_tracepoints): New.
17867 (linux_detach): Stabilize threads before detaching.
17868 (handle_tracepoints): Handle internal tracing breakpoints. Assert
17869 the lwp is either not stabilizing, or is moving out of a jump pad.
17870 (linux_fast_tracepoint_collecting): New.
17871 (maybe_move_out_of_jump_pad): New.
17872 (enqueue_one_deferred_signal): New.
17873 (dequeue_one_deferred_signal): New.
17874 (linux_wait_for_event_1): If moving out of a jump pad, defer
17875 pending signals to later.
17876 (linux_stabilize_threads): New.
17877 (linux_wait_1): Check if threads need moving out of jump pads, and
17878 do it if so.
17879 (stuck_in_jump_pad_callback): New.
17880 (move_out_of_jump_pad_callback): New.
17881 (lwp_running): New.
17882 (linux_resume_one_lwp): Handle moving out of jump pads.
17883 (linux_set_resume_request): Dequeue deferred signals.
17884 (need_step_over_p): Also step over fast tracepoint jumps.
17885 (start_step_over): Also uninsert fast tracepoint jumps.
17886 (finish_step_over): Also reinsert fast tracepoint jumps.
17887 (linux_install_fast_tracepoint_jump): New.
17888 (linux_target_ops): Install linux_stabilize_threads and
17889 linux_install_fast_tracepoint_jump_pad.
17890 * linux-low.h (linux_target_ops) <get_thread_area,
17891 install_fast_tracepoint_jump_pad>: New fields.
17892 (struct lwp_info) <collecting_fast_tracepoint,
17893 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
17894 (linux_get_thread_area): Declare.
17895 * linux-x86-low.c (jump_insn): New.
17896 (x86_get_thread_area): New.
17897 (append_insns): New.
17898 (push_opcode): New.
17899 (amd64_install_fast_tracepoint_jump_pad): New.
17900 (i386_install_fast_tracepoint_jump_pad): New.
17901 (x86_install_fast_tracepoint_jump_pad): New.
17902 (the_low_target): Install x86_get_thread_area and
17903 x86_install_fast_tracepoint_jump_pad.
17904 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
17905 (struct fast_tracepoint_jump): New.
17906 (fast_tracepoint_jump_insn): New.
17907 (fast_tracepoint_jump_shadow): New.
17908 (find_fast_tracepoint_jump_at): New.
17909 (fast_tracepoint_jump_here): New.
17910 (delete_fast_tracepoint_jump): New.
17911 (set_fast_tracepoint_jump): New.
17912 (uninsert_fast_tracepoint_jumps_at): New.
17913 (reinsert_fast_tracepoint_jumps_at): New.
17914 (set_breakpoint_at): Use write_inferior_memory.
17915 (uninsert_raw_breakpoint): Use write_inferior_memory.
17916 (check_mem_read): Mask out fast tracepoint jumps.
17917 (check_mem_write): Mask out fast tracepoint jumps.
17918 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
17919 (set_fast_tracepoint_jump): Declare.
17920 (delete_fast_tracepoint_jump)
17921 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
17922 (reinsert_fast_tracepoint_jumps_at): Declare.
17923 * regcache.c: Don't compile many functions when building the
17924 in-process agent library.
17925 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
17926 the register buffer in the heap.
17927 (free_register_cache): If the register buffer isn't owned by the
17928 regcache, don't free it.
17929 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
17930 pre-existing register caches.
17931 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
17932 type.
17933 (convert_ascii_to_int): : Constify `from' parameter type.
17934 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
17935 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
17936 the needed buffer in-place.
17937 (relocate_instruction): New.
17938 * server.c (handle_query) <qSymbols>: If the target supports
17939 tracepoints, give it a chance of looking up symbols. Report
17940 support for fast tracepoints.
17941 (handle_status): Stabilize threads.
17942 (process_serial_event): Adjust.
17943 * server.h (struct fast_tracepoint_jump): Forward declare.
17944 (struct process_info) <fast_tracepoint_jumps>: New field.
17945 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
17946 (decode_X_packet, decode_M_packet): Adjust.
17947 (relocate_instruction): Declare.
17948 (in_process_agent_loaded): Declare.
17949 (tracepoint_look_up_symbols): Declare.
17950 (struct fast_tpoint_collect_status): Declare.
17951 (fast_tracepoint_collecting): Declare.
17952 (force_unlock_trace_buffer): Declare.
17953 (handle_tracepoint_bkpts): Declare.
17954 (initialize_low_tracepoint)
17955 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
17956 * target.h (struct target_ops) <stabilize_threads,
17957 install_fast_tracepoint_jump_pad>: New fields.
17958 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
17959 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
17960 [HAVE_STDINT_H]: Include stdint.h.
17961 (trace_debug_1): Rename to ...
17962 (trace_vdebug): ... this.
17963 (trace_debug): Rename to ...
17964 (trace_debug_1): ... this. Add `level' parameter.
17965 (trace_debug): New.
17966 (ATTR_USED, ATTR_NOINLINE): New.
17967 (IP_AGENT_EXPORT): New.
17968 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
17969 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
17970 (about_to_request_buffer_space, trace_buffer_is_full)
17971 (stopping_tracepoint, expr_eval_result, error_tracepoint)
17972 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
17973 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
17974 (traceframe_write_count, traceframes_created)
17975 (trace_state_variables)
17976 New renaming defines.
17977 (struct ipa_sym_addresses): New.
17978 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
17979 (symbol_list): New.
17980 (ipa_sym_addrs): New.
17981 (all_tracepoint_symbols_looked_up): New.
17982 (in_process_agent_loaded): New.
17983 (write_e_ipa_not_loaded): New.
17984 (maybe_write_ipa_not_loaded): New.
17985 (tracepoint_look_up_symbols): New.
17986 (debug_threads) [IN_PROCESS_AGENT]: New.
17987 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
17988 (UNKNOWN_SIDE_EFFECTS): New.
17989 (stop_tracing): New.
17990 (flush_trace_buffer): New.
17991 (stop_tracing_bkpt): New.
17992 (flush_trace_buffer_bkpt): New.
17993 (read_inferior_integer): New.
17994 (read_inferior_uinteger): New.
17995 (read_inferior_data_pointer): New.
17996 (write_inferior_data_pointer): New.
17997 (write_inferior_integer): New.
17998 (write_inferior_uinteger): New.
17999 (struct collect_static_trace_data_action): Delete.
18000 (enum tracepoint_type): New.
18001 (struct tracepoint) <type>: New field `type'.
18002 <actions_str, step_actions, step_actions_str>: Only include in
18003 GDBserver.
18004 <orig_size, obj_addr_on_target, adjusted_insn_addr>
18005 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
18006 (tracepoints): Use IP_AGENT_EXPORT.
18007 (last_tracepoint): Don't include in the IPA.
18008 (stopping_tracepoint): Use IP_AGENT_EXPORT.
18009 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
18010 (alloced_trace_state_variables): New.
18011 (trace_state_variables): Use IP_AGENT_EXPORT.
18012 (traceframe_t): Delete unused variable.
18013 (circular_trace_buffer): Don't include in the IPA.
18014 (trace_buffer_start): Delete.
18015 (struct trace_buffer_control): New.
18016 (trace_buffer_free): Delete.
18017 (struct ipa_trace_buffer_control): New.
18018 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
18019 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
18020 New.
18021 (trace_buffer_ctrl): New.
18022 (TRACE_BUFFER_CTRL_CURR): New.
18023 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
18024 Reimplement as macros.
18025 (trace_buffer_wrap): Delete.
18026 (traceframe_write_count, traceframe_read_count)
18027 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
18028 (struct tracepoint_hit_ctx) <type>: New field.
18029 (struct fast_tracepoint_ctx): New.
18030 (memory_barrier): New.
18031 (cmpxchg): New.
18032 (record_tracepoint_error): Update atomically in the IPA.
18033 (clear_inferior_trace_buffer): New.
18034 (about_to_request_buffer_space): New.
18035 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
18036 updating the same buffer.
18037 (add_tracepoint): Default the tracepoint's type to trap
18038 tracepoint, and orig_size to -1.
18039 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
18040 internal variables.
18041 (create_trace_state_variable): New parameter `gdb'. Handle it.
18042 (clear_installed_tracepoints): Clear fast tracepoint jumps.
18043 (cmd_qtdp): Handle fast tracepoints.
18044 (cmd_qtdv): Adjust.
18045 (max_jump_pad_size): New.
18046 (gdb_jump_pad_head): New.
18047 (get_jump_space_head): New.
18048 (claim_jump_space): New.
18049 (sort_tracepoints): New.
18050 (MAX_JUMP_SIZE): New.
18051 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
18052 IPA.
18053 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
18054 support. Upload fast traceframes, and delete internal IPA
18055 breakpoints.
18056 (stop_tracing_handler): New.
18057 (flush_trace_buffer_handler): New.
18058 (cmd_qtstop): Upload fast tracepoints.
18059 (response_tracepoint): Handle fast tracepoints.
18060 (tracepoint_finished_step): Upload fast traceframes. Set the
18061 tracepoint hit context's tracepoint type.
18062 (handle_tracepoint_bkpts): New.
18063 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
18064 type. Add comment about fast tracepoints.
18065 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
18066 non-existing action_str field.
18067 (get_context_regcache): Handle fast tracepoints.
18068 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
18069 to the regcache.
18070 (fast_tracepoint_from_jump_pad_address): New.
18071 (fast_tracepoint_from_ipa_tpoint_address): New.
18072 (collecting_t): New.
18073 (force_unlock_trace_buffer): New.
18074 (fast_tracepoint_collecting): New.
18075 (collecting): New.
18076 (gdb_collect): New.
18077 (write_inferior_data_ptr): New.
18078 (target_tp_heap): New.
18079 (target_malloc): New.
18080 (download_agent_expr): New.
18081 (UALIGN): New.
18082 (download_tracepoints): New.
18083 (download_trace_state_variables): New.
18084 (upload_fast_traceframes): New.
18085 (IPA_FIRST_TRACEFRAME): New.
18086 (IPA_NEXT_TRACEFRAME_1): New.
18087 (IPA_NEXT_TRACEFRAME): New.
18088 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
18089 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
18090 (gdb_jump_pad_buffer_end): New.
18091 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
18092 (initialize_tracepoint): Adjust.
18093 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
18094 buffer. Initialize the low module.
18095 * utils.c (PREFIX, TOOLNAME): New.
18096 (malloc_failure): Use PREFIX.
18097 (error): In the IPA, an error causes an exit.
18098 (fatal, warning): Use PREFIX.
18099 (internal_error): Use TOOLNAME.
18100 (NUMCELLS): Increase to 10.
18101 * configure, config.in: Regenerate.
18102
18103 2010-06-01 Pedro Alves <pedro@codesourcery.com>
18104
18105 * server.c (handle_query) <qSupported>: Do two passes over the
18106 qSupported string to avoid nesting strtok.
18107
18108 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
18109
18110 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
18111 (CDEPS): New.
18112 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
18113 -Wl,--dynamic-list.
18114 * configure: Regenerate.
18115 * proc-service.list: New.
18116
18117 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
18118
18119 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
18120 New comment.
18121
18122 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
18123
18124 * gdbreplay.c (remote_open): Check error return from socket() call by
18125 its equality to -1 not by it being negative.
18126 * remote-utils.c (remote_open): Likewise.
18127
18128 2010-05-23 Pedro Alves <pedro@codesourcery.com>
18129
18130 * config.h: Regenerate.
18131
18132 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
18133
18134 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
18135 doesn't provide PTRACE_GET_THREAD_AREA.
18136
18137 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
18138
18139 * linux-m68k-low.c: Include <asm/ptrace.h>
18140 (ps_get_thread_area): Implement.
18141
18142 2010-05-03 Doug Evans <dje@google.com>
18143
18144 * event-loop.c (struct callback_event): New struct.
18145 (callback_list): New global.
18146 (append_callback_event, delete_callback_event): New functions.
18147 (process_callback): New function.
18148 (start_event_loop): Call it.
18149 * remote-utils.c (NOT_SCHEDULED): Define.
18150 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
18151 moved out of readchar.
18152 (readchar): Rewrite. Call reschedule before returning.
18153 (reset_readchar): New function.
18154 (remote_close): Call it.
18155 (process_remaining, reschedule): New functions.
18156 * server.h (callback_handler_func): New typedef.
18157 (append_callback_event, delete_callback_event): Declare.
18158
18159 2010-05-03 Pedro Alves <pedro@codesourcery.com>
18160
18161 * proc-service.c (ps_pglobal_lookup): Use
18162 thread_db_look_up_one_symbol.
18163 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
18164 parameter. Use it instead of all_symbols_looked_up.
18165 * server.h (struct process_info) <all_symbols_looked_up>: Delete
18166 field.
18167 (all_symbols_looked_up): Don't declare.
18168 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
18169 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
18170 field.
18171 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
18172 Set all_symbols_looked_up here.
18173 (thread_db_look_up_one_symbol): New.
18174 (thread_db_get_tls_address): Adjust.
18175 (thread_db_load_search, try_thread_db_load_1): Always allocate the
18176 thread_db object on the heap, and tentatively set it in the
18177 process structure.
18178 (thread_db_init): Don't set all_symbols_looked_up here.
18179 * linux-low.h (thread_db_look_up_one_symbol): Declare.
18180
18181 2010-05-03 Pedro Alves <pedro@codesourcery.com>
18182
18183 * linux-low.c (linux_kill, linux_detach): Adjust.
18184 (status_pending_p_callback): Remove redundant statement. Check
18185 for !TARGET_WAITIKIND_IGNORE, instead of
18186 TARGET_WAITKIND_STOPPED.
18187 (handle_tracepoints): Make sure LWP is locked. Adjust.
18188 (linux_wait_for_event_1): Adjust.
18189 (linux_cancel_breakpoints): New.
18190 (unsuspend_one_lwp): New.
18191 (unsuspend_all_lwps): New.
18192 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
18193 (send_sigstop_callback): Change return type to int, add new
18194 `except' parameter and handle it.
18195 (suspend_and_send_sigstop_callback): New.
18196 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
18197 pass them down. If SUSPEND, also increment the lwp's suspend
18198 count.
18199 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
18200 (need_step_over_p): Don't consider suspended LWPs.
18201 (start_step_over): Adjust.
18202 (proceed_one_lwp): Change return type to int, add new `except'
18203 parameter and handle it.
18204 (unsuspend_and_proceed_one_lwp): New.
18205 (proceed_all_lwps): Use find_inferior instead of
18206 for_each_inferior.
18207 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
18208 also decrement the suspend count of LWPs. Pass `except' down,
18209 instead of hacking its suspend count.
18210 (linux_pause_all): Add `freeze' parameter. Adjust.
18211 (linux_unpause_all): New.
18212 (linux_target_ops): Install linux_unpause_all.
18213 * server.c (handle_status): Adjust.
18214 * target.h (struct target_ops): New fields `unpause_all' and
18215 `cancel_breakpoints'. Add new parameter to `pause_all'.
18216 (pause_all): Add new `freeze' parameter.
18217 (unpause_all): New.
18218 (cancel_breakpoints): New.
18219 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
18220 cancel breakpoints.
18221 (cmd_qtstart): Pause threads.
18222 (stop_tracing): Pause threads, and cancel breakpoints.
18223 * win32-low.c (win32_target_ops): Adjust.
18224
18225 2010-05-03 Pedro Alves <pedro@codesourcery.com>
18226
18227 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
18228 the inferior right away from here...
18229 (linux_wait_1): ... to here, and adjust to check the thread's
18230 last_resume_kind instead of the lwp's step or stop_expected flags.
18231
18232 2010-05-02 Pedro Alves <pedro@codesourcery.com>
18233
18234 * README: Use consistent `GDB' and `GDBserver' spellings.
18235
18236 2010-05-02 Pedro Alves <pedro@codesourcery.com>
18237
18238 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
18239 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
18240 (linux_detach_one_lwp): Assume the lwp is stopped.
18241 (any_thread_of): Delete.
18242 (linux_detach): Stop all lwps here. Don't blindly delete all
18243 breakpoints.
18244 (delete_lwp_callback): New.
18245 (linux_mourn): Delete all lwps of the process that is gone.
18246 (linux_wait_1): Don't delete the last lwp of the process here.
18247 * mem-break.h (mark_breakpoints_out): Declare.
18248 * mem-break.c (mark_breakpoints_out): New.
18249 (free_all_breakpoints): Use it.
18250 * server.c (handle_target_event): If the process is gone, mark
18251 breakpoints out.
18252 * thread-db.c (struct thread_db) <create_bp>: New field.
18253 (thread_db_enable_reporting): Fix prototype. Store a thread event
18254 breakpoint reference in the thread_db struct.
18255 (thread_db_load_search): Clear the thread_db object.
18256 (try_thread_db_load_1): Ditto.
18257 (switch_to_process): New.
18258 (disable_thread_event_reporting): Use it.
18259 (remove_thread_event_breakpoints): New.
18260 (thread_db_detach, thread_db_mourn): Use it.
18261
18262 2010-05-01 Pedro Alves <pedro@codesourcery.com>
18263
18264 * linux-low.c (linux_enable_event_reporting): New.
18265 (linux_wait_for_event_1, handle_extended_wait): Use it.
18266
18267 2010-04-30 Pedro Alves <pedro@codesourcery.com>
18268
18269 * linux-low.c (linux_kill_one_lwp, linux_kill)
18270 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
18271 (send_sigstop): Take an lwp_info as parameter instead. Queue a
18272 SIGSTOP even if the LWP is stopped.
18273 (send_sigstop_callback): New.
18274 (stop_all_lwps): Use send_sigstop_callback instead.
18275 (linux_resume_one_thread): Adjust.
18276 (proceed_one_lwp): Still proceed an LWP that the client has
18277 requested to stop, if we haven't reported it as stopped yet. Make
18278 sure that LWPs the client want stopped, have a pending SIGSTOP.
18279
18280 2010-04-26 Doug Evans <dje@google.com>
18281
18282 * server.c (handle_general_set): Make static.
18283
18284 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
18285 Print received char after testing for error/eof instead of before.
18286 (input_interrupt): Tweak comment.
18287
18288 2010-04-23 Doug Evans <dje@google.com>
18289
18290 * server.c (start_inferior): Print inferior argv if --debug.
18291
18292 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
18293
18294 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
18295 * nto-x86-low.c: Include server.h
18296
18297 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
18298
18299 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
18300 be consistent with other sources of this directory.
18301 (init_registers_amd64): Correct name of source file of this function
18302 in the comment.
18303
18304 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
18305
18306 * configure.srv (x86_64-*-mingw*): New configuration for Windows
18307 64-bit executables.
18308
18309 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
18310
18311 * win32-i386-low.c: Add 64-bit support.
18312 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
18313 (init_registers_amd64): Declare.
18314 (mappings): Add 64-bit version of array.
18315 (init_windows_x86): New function.
18316 (the_low_target): Change init_arch field to init_windows_x86.
18317
18318 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
18319
18320 * win32-low.c: Adapt to support also 64-bit architecture.
18321 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
18322 (get_image_name): Use SIZE_T type for local variable `done'.
18323 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
18324 (toolhelp_get_dll_name): Idem.
18325 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
18326 Use uintptr_t typecast to avoid warning.
18327 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
18328 (handle_exception): Use phex_nz to avoid warning.
18329 (win32_wait): Remove unused local variable `process'.
18330
18331 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
18332
18333 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
18334 `amd64-avx.o'.
18335
18336 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
18337
18338 * configure.ac: Use `ws2_32' library for srv_mingw.
18339 * configure: Regenerate.
18340 * gdbreplay.c: Include winsock2.h instead of winsock.h.
18341 * remote-utils.c: Likewise.
18342
18343 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
18344
18345 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
18346 if __x86_64__ is defined.
18347
18348 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
18349
18350 * configure: Regenerate.
18351
18352 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
18353
18354 * server.c (handle_query): Handle 'qGetTIBAddr' query.
18355 * target.h (target_ops): New get_tib_address field.
18356 * win32-low.h (win32_thread_info): Add thread_local_base field.
18357 * win32-low.c (child_add_thread): Add tlb argument.
18358 Set thread_local_base field to TLB.
18359 (get_child_debug_event): Adapt to child_add_thread change.
18360 (win32_get_tib_address): New function.
18361 (win32_target_ops): Set get_tib_address field to
18362 win32_get_tib_address.
18363 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
18364
18365 2010-04-12 Pedro Alves <pedro@codesourcery.com>
18366
18367 * linux-low.c (linux_mourn): Also remove the process.
18368 * server.c (handle_target_event): Don't remove the process here.
18369 * nto-low.c (nto_mourn): New.
18370 (nto_target_ops): Install it.
18371 * spu-low.c (spu_mourn): New.
18372 (spu_target_ops): Install it.
18373 * win32-low.c (win32_mourn): New.
18374 (win32_target_ops): Install it.
18375
18376 2010-04-12 Pedro Alves <pedro@codesourcery.com>
18377
18378 * server.h (buffer_xml_printf): Remove redundant `;'.
18379
18380 2010-04-12 Pedro Alves <pedro@codesourcery.com>
18381
18382 * regcache.c (set_register_cache): Invalidate regcaches before
18383 changing the register cache layout.
18384 (regcache_invalidate_one): Allow a NULL regcache.
18385 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
18386 regcaches before changing the register cache layout or the target
18387 regsets.
18388
18389 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
18390
18391 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
18392 variable warning on Linux/x86-64.
18393
18394 2010-04-11 Pedro Alves <pedro@codesourcery.com>
18395
18396 GDBserver disconnected tracing support.
18397
18398 * linux-low.c (linux_remove_process): Delete.
18399 (add_lwp): Don't set last_resume_kind here.
18400 (linux_kill): Use `mourn'.
18401 (linux_detach): Use `thread_db_detach', and `mourn'.
18402 (linux_mourn): New.
18403 (linux_attach_lwp_1): Adjust comment.
18404 (linux_attach): last_resume_kind moved the thread_info; adjust.
18405 (status_pending_p_callback): Adjust.
18406 (linux_wait_for_event_1): Adjust.
18407 (count_events_callback, select_singlestep_lwp_callback)
18408 (select_event_lwp_callback, cancel_breakpoints_callback)
18409 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
18410 (proceed_one_lwp): Adjust.
18411 (linux_async): Add debug output.
18412 (linux_thread_stopped): New.
18413 (linux_pause_all): New.
18414 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
18415 linux_pause_all.
18416 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
18417 (thread_db_free): Delete declaration.
18418 (thread_db_detach, thread_db_mourn): Declare.
18419 * thread-db.c (thread_db_init): Use thread_db_mourn.
18420 (thread_db_free): Delete, split in two.
18421 (disable_thread_event_reporting): New.
18422 (thread_db_detach): New.
18423 (thread_db_mourn): New.
18424
18425 * server.h (struct thread_info) <last_resume_kind>: New field.
18426 <attached>: Add comment.
18427 <gdb_detached>: New field.
18428 (handler_func): Change return type to int.
18429 (handle_serial_event, handle_target_event): Ditto.
18430 (gdb_connected): Declare.
18431 (tracing): Delete.
18432 (disconnected_tracing): Declare.
18433 (stop_tracing): Declare.
18434
18435 * server.c (handle_query) <qSupported>: Report support for
18436 disconnected tracing.
18437 (queue_stop_reply_callback): Account for running threads.
18438 (gdb_wants_thread_stopped): New.
18439 (gdb_wants_all_threads_stopped): New.
18440 (gdb_reattached_process): New.
18441 (handle_status): Clear the `gdb_detached' flag of all processes.
18442 In all-stop, stop all threads.
18443 (main): Be sure to leave tfind mode. Handle disconnected tracing.
18444 (process_serial_event): If the remote connection breaks, or if an
18445 exit was forced with "monitor exit", force an event loop exit.
18446 Handle disconnected tracing on detach.
18447 (handle_serial_event): Adjust.
18448 (handle_target_event): If GDB isn't connected, forward events back
18449 to the inferior, unless the last process exited, in which case,
18450 exit gdbserver. Adjust interface.
18451
18452 * remote-utils.c (remote_open): Don't block in accept. Instead
18453 register an event loop source on the listen socket file
18454 descriptor. Refactor bits into ...
18455 (listen_desc): ... this new global.
18456 (gdb_connected): ... this new function.
18457 (enable_async_notification): ... this new function.
18458 (handle_accept_event): ... this new function.
18459 (remote_close): Clear remote_desc.
18460
18461 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
18462
18463 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
18464 New fields.
18465 (mourn_inferior): Define.
18466 (target_process_qsupported): Avoid the dangling else problem.
18467 (thread_stopped): Define.
18468 (pause_all): Define.
18469 (target_waitstatus_to_string): Declare.
18470 * target.c (target_waitstatus_to_string): New.
18471
18472 * tracepoint.c (tracing): Make extern.
18473 (disconnected_tracing): New.
18474 (stop_tracing): Make extern. Handle tracing stops due to GDB
18475 disconnecting.
18476 (cmd_qtdisconnected): New.
18477 (cmd_qtstatus): Report disconnected tracing status in trace reply.
18478 (handle_tracepoint_general_set): Handle QTDisconnected.
18479
18480 * event-loop.c (event_handler_func): Change return type to int.
18481 (process_event): Bail out if the event handler wants the event
18482 loop to stop.
18483 (handle_file_event): Ditto.
18484 (start_event_loop): Bail out if the event handler wants the event
18485 loop to stop.
18486
18487 * nto-low.c (nto_target_ops): Adjust.
18488 * spu-low.c (spu_wait): Don't remove the process here.
18489 (spu_target_ops): Adjust.
18490 * win32-low.c (win32_wait): Don't remove the process here.
18491 (win32_target_ops): Adjust.
18492
18493 2010-04-11 Pedro Alves <pedro@codesourcery.com>
18494
18495 * regcache.c (realloc_register_cache): Invalidate inferior's
18496 regcache before recreating it.
18497
18498 2010-04-09 Pedro Alves <pedro@codesourcery.com>
18499
18500 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
18501
18502 2010-04-09 Stan Shebs <stan@codesourcery.com>
18503 Pedro Alves <pedro@codesourcery.com>
18504
18505 * server.h (LONGEST): New.
18506 (struct thread_info) <while_stepping>: New field.
18507 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
18508 Declare.
18509 (initialize_tracepoint, handle_tracepoint_general_set)
18510 (handle_tracepoint_query, tracepoint_finished_step)
18511 (tracepoint_was_hit, release_while_stepping_state_list):
18512 (current_traceframe): Declare.
18513 * server.c (handle_general_set): Handle tracepoint packets.
18514 (read_memory): New.
18515 (write_memory): New.
18516 (handle_search_memory_1): Use read_memory.
18517 (handle_query): Report support for conditional tracepoints, trace
18518 state variables, and tracepoint sources. Handle tracepoint
18519 queries.
18520 (main): Initialize the tracepoints module.
18521 (process_serial_event): Handle traceframe reads/writes.
18522
18523 * linux-low.c (handle_tracepoints): New.
18524 (linux_wait_1): Call it.
18525 (linux_resume_one_lwp): Handle while-stepping.
18526 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
18527 (linux_target_ops): Install them.
18528 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
18529 New field.
18530 * linux-x86-low.c (x86_supports_tracepoints): New.
18531 (the_low_target). Install it.
18532
18533 * mem-break.h (delete_breakpoint): Declare.
18534 * mem-break.c (delete_breakpoint): Make external.
18535
18536 * target.h (struct target_ops): Add `supports_tracepoints',
18537 `read_pc', and `write_pc' fields.
18538 (target_supports_tracepoints): Define.
18539 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
18540 (phex_nz): New.
18541
18542 * regcache.h (struct regcache) <registers_owned>: New field.
18543 (init_register_cache, regcache_cpy): Declare.
18544 (regcache_read_pc, regcache_write_pc): Declare.
18545 (register_cache_size): Declare.
18546 (supply_regblock): Declare.
18547 * regcache.c (init_register_cache): New.
18548 (new_register_cache): Use it.
18549 (regcache_cpy): New.
18550 (register_cache_size): New.
18551 (supply_regblock): New.
18552 (regcache_read_pc, regcache_write_pc): New.
18553
18554 * tracepoint.c: New.
18555
18556 * Makefile.in (OBS): Add tracepoint.o.
18557 (tracepoint.o): New rule.
18558
18559 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
18560
18561 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
18562 (i386-mmx.o): New.
18563 (i386-mmx.c): Likewise.
18564 (i386-mmx-linux.o): Likewise.
18565 (i386-mmx-linux.c): Likewise.
18566
18567 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
18568 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
18569 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
18570 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
18571
18572 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
18573 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
18574 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
18575
18576 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
18577
18578 * Makefile.in (clean): Updated.
18579 (i386-avx.o): New.
18580 (i386-avx.c): Likewise.
18581 (i386-avx-linux.o): Likewise.
18582 (i386-avx-linux.c): Likewise.
18583 (amd64-avx.o): Likewise.
18584 (amd64-avx.c): Likewise.
18585 (amd64-avx-linux.o): Likewise.
18586 (amd64-avx-linux.c): Likewise.
18587
18588 * configure.srv (srv_i386_regobj): Add i386-avx.o.
18589 (srv_i386_linux_regobj): Add i386-avx-linux.o.
18590 (srv_amd64_regobj): Add amd64-avx.o.
18591 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
18592 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
18593 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
18594 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
18595 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
18596 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
18597 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
18598
18599 * i387-fp.c: Include "i386-xstate.h".
18600 (i387_xsave): New.
18601 (i387_cache_to_xsave): Likewise.
18602 (i387_xsave_to_cache): Likewise.
18603 (x86_xcr0): Likewise.
18604
18605 * i387-fp.h (i387_cache_to_xsave): Likewise.
18606 (i387_xsave_to_cache): Likewise.
18607 (x86_xcr0): Likewise.
18608
18609 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
18610 * linux-crisv32-low.c (target_regsets): Likewise.
18611 * linux-m68k-low.c (target_regsets): Likewise.
18612 * linux-mips-low.c (target_regsets): Likewise.
18613 * linux-ppc-low.c (target_regsets): Likewise.
18614 * linux-s390-low.c (target_regsets): Likewise.
18615 * linux-sh-low.c (target_regsets): Likewise.
18616 * linux-sparc-low.c (target_regsets): Likewise.
18617 * linux-xtensa-low.c (target_regsets): Likewise.
18618
18619 * linux-low.c: Include <sys/uio.h>.
18620 (regsets_fetch_inferior_registers): Support nt_type.
18621 (regsets_store_inferior_registers): Likewise.
18622 (linux_process_qsupported): New.
18623 (linux_target_ops): Add linux_process_qsupported.
18624
18625 * linux-low.h (regset_info): Add nt_type.
18626 (linux_target_ops): Add process_qsupported.
18627
18628 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
18629 and <sys/uio.h>.
18630 (init_registers_i386_avx_linux): New.
18631 (init_registers_amd64_avx_linux): Likewise.
18632 (xmltarget_i386_linux_no_xml): Likewise.
18633 (xmltarget_amd64_linux_no_xml): Likewise.
18634 (PTRACE_GETREGSET): Likewise.
18635 (PTRACE_SETREGSET): Likewise.
18636 (x86_fill_xstateregset): Likewise.
18637 (x86_store_xstateregset): Likewise.
18638 (use_xml): Likewise.
18639 (x86_linux_update_xmltarget): Likewise.
18640 (x86_linux_process_qsupported): Likewise.
18641 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
18642 (x86_arch_setup): Don't call init_registers_amd64_linux nor
18643 init_registers_i386_linux here. Call
18644 x86_linux_update_xmltarget.
18645 (the_low_target): Add x86_linux_process_qsupported.
18646
18647 * server.c (handle_query): Call target_process_qsupported.
18648
18649 * target.h (target_ops): Add process_qsupported.
18650 (target_process_qsupported): New.
18651
18652 2010-04-03 Pedro Alves <pedro@codesourcery.com>
18653
18654 * inferiors.c (add_thread): Set last_status kind to
18655 TARGET_WAITKIND_IGNORE.
18656 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
18657 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
18658 (linux_wait_1): Move `thread' local definition to block that uses
18659 it. Don't NULL initialize `event_child'.
18660 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
18661 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
18662 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
18663
18664 2010-04-01 Pedro Alves <pedro@codesourcery.com>
18665
18666 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
18667 an extended waitstatus, or by a watchpoint.
18668 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
18669 thread was stepping or has been stopped by a watchpoint.
18670
18671 2010-04-01 Pedro Alves <pedro@codesourcery.com>
18672
18673 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
18674 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
18675 of another, then delete the previous, and validate all
18676 breakpoints.
18677 (validate_inserted_breakpoint): New.
18678 (delete_disabled_breakpoints): New.
18679 (validate_breakpoints): New.
18680 (check_mem_read): Validate breakpoints before trusting their
18681 shadow. Delete disabled breakpoints.
18682 (check_mem_write): Validate breakpoints before trusting they
18683 should be inserted. Delete disabled breakpoints.
18684 * mem-break.h (validate_breakpoints):
18685 * server.c (handle_query): Validate breakpoints when we see a
18686 qSymbol query.
18687
18688 2010-04-01 Pedro Alves <pedro@codesourcery.com>
18689
18690 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
18691 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
18692 if we could tell there's a GDB breakpoint at stop_pc.
18693 (need_step_over_p): Don't do a step over if we find a GDB
18694 breakpoint at the resume PC.
18695
18696 * mem-break.c (struct raw_breakpoint): New.
18697 (enum bkpt_type): New type `gdb_breakpoint'.
18698 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
18699 fields. New field `raw'.
18700 (find_raw_breakpoint_at): New.
18701 (set_raw_breakpoint_at): Handle refcounting. Create a raw
18702 breakpoint instead.
18703 (set_breakpoint_at): Adjust.
18704 (delete_raw_breakpoint): New.
18705 (release_breakpoint): New.
18706 (delete_breakpoint): Rename to...
18707 (delete_breakpoint_1): ... this. Add proc parameter. Use
18708 release_breakpoint. Return ENOENT.
18709 (delete_breakpoint): Reimplement.
18710 (find_breakpoint_at): Delete.
18711 (find_gdb_breakpoint_at): New.
18712 (delete_breakpoint_at): Delete.
18713 (set_gdb_breakpoint_at): New.
18714 (delete_gdb_breakpoint_at): New.
18715 (gdb_breakpoint_here): New.
18716 (set_reinsert_breakpoint): Use release_breakpoint.
18717 (uninsert_breakpoint): Rename to ...
18718 (uninsert_raw_breakpoint): ... this.
18719 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
18720 (reinsert_raw_breakpoint): Change parameter type to
18721 raw_breakpoint.
18722 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
18723 instead.
18724 (check_breakpoints): Adjust. Use release_breakpoint.
18725 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
18726 (breakpoint_inserted_here): Ditto.
18727 (check_mem_read): Adjust to iterate over raw breakpoints instead.
18728 Don't trust the breakpoint's shadow if it is not inserted.
18729 (check_mem_write): Adjust to iterate over raw breakpoints instead.
18730 (delete_all_breakpoints): Adjust.
18731 (free_all_breakpoints): Mark all breakpoints as uninserted, and
18732 use delete_breakpoint_1.
18733
18734 * mem-break.h (breakpoints_supported): Delete declaration.
18735 (set_gdb_breakpoint_at): Declare.
18736 (gdb_breakpoint_here): Declare.
18737 (delete_breakpoint_at): Delete.
18738 (delete_gdb_breakpoint_at): Declare.
18739
18740 * server.h (struct raw_breakpoint): Forward declare.
18741 (struct process_info): New field `raw_breakpoints'.
18742
18743 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
18744 breakpoints.
18745
18746 2010-03-24 Pedro Alves <pedro@codesourcery.com>
18747
18748 * linux-low.c (status_pending_p_callback): Fix comment.
18749 (linux_wait_for_event_1): Move most of the internal breakpoint
18750 handling from here...
18751 (linux_wait_1): ... to here.
18752 (count_events_callback): New.
18753 (select_singlestep_lwp_callback): New.
18754 (select_event_lwp_callback): New.
18755 (cancel_breakpoints_callback): New.
18756 (select_event_lwp): New.
18757 (linux_wait_1): Simplify internal breakpoint handling. Give equal
18758 priority to all LWPs that have had events that should be reported
18759 to the client. Cancel breakpoints when about to reporting the
18760 event to the client, not while stopping lwps. No longer cancel
18761 finished single-steps here.
18762 (cancel_finished_single_step): Delete.
18763 (cancel_finished_single_steps): Delete.
18764
18765 2010-03-24 Pedro Alves <pedro@codesourcery.com>
18766
18767 * mem-break.c (enum bkpt_type): New.
18768 (struct breakpoint): New field `type'.
18769 (set_breakpoint_at): Change return type to struct breakpoint
18770 pointer. Set type to `other_breakpoint' by default.
18771 (delete_breakpoint): Rewrite, supporting more than one breakpoint
18772 in the breakpoint list.
18773 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
18774 (reinsert_breakpoint): Rename to ...
18775 (reinsert_raw_breakpoint): ... this.
18776 (reinsert_breakpoints_at): Adjust.
18777 * mem-break.h (struct breakpoint): Declare.
18778 (set_breakpoint_at): Change return type to struct breakpoint
18779 pointer.
18780
18781 2010-03-24 Pedro Alves <pedro@codesourcery.com>
18782
18783 * server.c (handle_query): Assign, not compare.
18784
18785 2010-03-24 Pedro Alves <pedro@codesourcery.com>
18786
18787 Teach linux gdbserver to step-over-breakpoints.
18788
18789 * linux-low.c (can_hardware_single_step): New.
18790 (supports_breakpoints): New.
18791 (handle_extended_wait): If stopping threads, read the stop pc of
18792 the new cloned LWP.
18793 (get_pc): New.
18794 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
18795 low target doesn't support retrieving the PC.
18796 (add_lwp): Set last_resume_kind to resume_continue.
18797 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
18798 (linux_attach): Don't clear stop_expected. Set the lwp's
18799 last_resume_kind to resume_stop.
18800 (linux_detach_one_lwp): Don't check for removed breakpoints.
18801 (check_removed_breakpoint): Delete.
18802 (status_pending_p): Rename to ...
18803 (status_pending_p_callback): ... this. Don't check for removed
18804 breakpoints. Don't consider threads that are stopped from GDB's
18805 perspective.
18806 (linux_wait_for_lwp): Always read the stop_pc here.
18807 (cancel_breakpoint): New.
18808 (step_over_bkpt): New global.
18809 (linux_wait_for_event_1): Implement stepping over breakpoints.
18810 (gdb_wants_lwp_stopped): New.
18811 (gdb_wants_all_stopped): New.
18812 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
18813 single-step traps here. Store the thread's last reported target
18814 wait status.
18815 (send_sigstop): Don't clear stop_expected. Always set it,
18816 instead.
18817 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
18818 (cancel_finished_single_step): New.
18819 (cancel_finished_single_steps): New.
18820 (wait_for_sigstop): Don't cancel finished single-step traps here.
18821 (linux_resume_one_lwp): Don't check for removed breakpoints.
18822 Don't set `step' on non-hardware step archs.
18823 (linux_set_resume_request): Ignore resume_stop requests if already
18824 stopping or stopped. Set the lwp's last_resume_kind.
18825 (resume_status_pending_p): Don't check for removed breakpoints.
18826 (need_step_over_p): New.
18827 (start_step_over): New.
18828 (finish_step_over): New.
18829 (linux_resume_one_thread): Always queue a sigstop for resume_stop
18830 requests. Clear the thread's last reported target waitstatus.
18831 Don't use the `suspended' flag. Don't consider pending breakpoints.
18832 (linux_resume): Start a step-over if necessary.
18833 (proceed_one_lwp): New.
18834 (proceed_all_lwps): New.
18835 (unstop_all_lwps): New.
18836 * linux-low.h (struct lwp_info): Rewrite comment for the
18837 `suspended' flag. Add the `stop_pc' field. Delete the
18838 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
18839 Add `'last_resume_kind' and `need_step_over' fields.
18840 * inferiors.c (struct thread_info): Delete, moved elsewhere.
18841 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
18842 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
18843 (set_raw_breakpoint_at): New.
18844 (set_breakpoint_at): Rewrite to use it.
18845 (reinsert_breakpoint_handler): Delete.
18846 (set_reinsert_breakpoint): New.
18847 (reinsert_breakpoint_by_bp): Delete.
18848 (delete_reinsert_breakpoints): New.
18849 (uninsert_breakpoint): Rewrite.
18850 (uninsert_breakpoints_at): New.
18851 (reinsert_breakpoint): Rewrite.
18852 (reinsert_breakpoints_at): New.
18853 (check_breakpoints): Rewrite.
18854 (breakpoint_here): New.
18855 (breakpoint_inserted_here): New.
18856 (check_mem_read): Adjust.
18857 * mem-break.h (breakpoints_supported, breakpoint_here)
18858 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
18859 (reinsert_breakpoint_by_bp): Delete declaration.
18860 (delete_reinsert_breakpoints): Declare.
18861 (reinsert_breakpoint): Delete declaration.
18862 (reinsert_breakpoints_at): Declare.
18863 (uninsert_breakpoint): Delete declaration.
18864 (uninsert_breakpoints_at): Declare.
18865 (check_breakpoints): Adjust prototype.
18866 * server.h: Adjust include order.
18867 (struct thread_info): Declare here. Add a `last_status' field.
18868
18869 2010-03-23 Michael Snyder <msnyder@vmware.com>
18870
18871 * server.c (crc32): New function.
18872 (handle_query): Add handling for 'qCRC:' request.
18873
18874 2010-03-23 Pedro Alves <pedro@codesourcery.com>
18875
18876 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
18877 lwp had been stopped by a watchpoint.
18878
18879 2010-03-16 Pedro Alves <pedro@codesourcery.com>
18880
18881 * server.h (internal_error): Declare.
18882 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
18883 * utils.c (internal_error): New function.
18884
18885 2010-03-15 Andreas Schwab <schwab@redhat.com>
18886
18887 * configure.srv: Fix typo setting srv_regobj.
18888
18889 2010-03-15 Pedro Alves <pedro@codesourcery.com>
18890
18891 * linux-low.c (fetch_register): Avoid passing a non string literal
18892 format to `error'.
18893 (usr_store_inferior_registers): Ditto.
18894
18895 2010-03-14 Pedro Alves <pedro@codesourcery.com>
18896
18897 * linux-low.c (linux_write_memory): Bail out early if peeking
18898 memory failed.
18899
18900 2010-03-14 Pedro Alves <pedro@codesourcery.com>
18901
18902 * linux-low.h (struct lwp_info): New fields
18903 `stopped_by_watchpoint' and `stopped_data_address'.
18904 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
18905 here, and cache them in the lwp object.
18906 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
18907 directly.
18908 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
18909 field.
18910 (linux_stopped_by_watchpoint): Rewrite.
18911 (linux_stopped_data_address): Rewrite.
18912
18913 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
18914
18915 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
18916 switching the current inferior, not before.
18917
18918 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
18919
18920 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
18921 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
18922 i386-linux.c and amd64-linux.c.
18923 (reg-i386.o): Removed.
18924 (reg-i386.c): Likewise.
18925 (reg-i386-linux.o): Likewise.
18926 (reg-i386-linux.c): Likewise.
18927 (reg-x86-64.o): Likewise.
18928 (reg-x86-64.c): Likewise.
18929 (reg-x86-64-linux.o): Likewise.
18930 (reg-x86-64-linux.c): Likewise.
18931 (i386.o): New.
18932 (i386.c): Likewise.
18933 (i386-linux.o): Likewise.
18934 (i386-linux.c): Likewise.
18935 (amd64.o): Likewise.
18936 (amd64.c): Likewise.
18937 (amd64-linux.o): Likewise.
18938 (amd64-linux.c): Likewise.
18939
18940 * configure.srv (srv_i386_regobj): New.
18941 (srv_i386_linux_regobj): Likewise.
18942 (srv_amd64_regobj): Likewise.
18943 (srv_amd64_linux_regobj): Likewise.
18944 (srv_i386_32bit_xmlfiles): Likewise.
18945 (srv_i386_64bit_xmlfiles): Likewise.
18946 (srv_i386_xmlfiles): Likewise.
18947 (srv_amd64_xmlfiles): Likewise.
18948 (srv_i386_linux_xmlfiles): Likewise.
18949 (srv_amd64_linux_xmlfiles): Likewise.
18950 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
18951 srv_xmlfiles to $srv_i386_xmlfiles.
18952 (i[34567]86-*-mingw32ce*): Likewise.
18953 (i[34567]86-*-mingw*): Likewise.
18954 (i[34567]86-*-nto*): Likewise.
18955 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
18956 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
18957 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
18958 (x86_64-*-linux*): Likewise.
18959
18960 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
18961 (init_registers_amd64_linux): New.
18962 (x86_arch_setup): Replace init_registers_x86_64_linux with
18963 init_registers_amd64_linux.
18964
18965 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
18966
18967 * configure.ac: Check for libdl. If it is not available link against
18968 static libthread_db.
18969 * configure: Regenerate.
18970
18971 2010-02-22 Pedro Alves <pedro@codesourcery.com>
18972
18973 PR9605
18974
18975 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
18976 handing a read watchpoint.
18977 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
18978
18979 2010-02-12 Doug Evans <dje@google.com>
18980
18981 * linux-low.c (linux_supports_tracefork_flag): Document.
18982 (linux_look_up_symbols): Add comment.
18983
18984 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
18985
18986 * regcache.c (supply_register): Clear regcache if buf is NULL.
18987
18988 2010-02-02 Nicolas Roche <roche@sourceware.org>
18989 Joel Brobecker <brobecker@adacore.com>
18990
18991 * inferiors.c (find_inferior): Add function documentation.
18992 (unloaded_dll): Handle the case where the unloaded dll has not
18993 been previously registered in the dll list.
18994
18995 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
18996
18997 * linux-arm-low.c (thumb_breakpoint_len): Delete.
18998 (thumb2_breakpoint): New.
18999 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
19000
19001 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
19002
19003 * linux-low.c (get_stop_pc): Check for SIGTRAP.
19004 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
19005 breakpoints.
19006
19007 2010-01-21 Pedro Alves <pedro@codesourcery.com>
19008
19009 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
19010
19011 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
19012
19013 * linux-s390-low.c (s390_collect_ptrace_register)
19014 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
19015
19016 2010-01-21 Doug Evans <dje@google.com>
19017
19018 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
19019 (PTRACE_ARG4_TYPE): New macro.
19020 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
19021 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
19022 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
19023 (usr_store_inferior_registers): Ditto.
19024 (linux_read_memory, linux_write_memory): Ditto.
19025 (linux_test_for_tracefork): Ditto.
19026
19027 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
19028 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
19029
19030 2010-01-21 Pedro Alves <pedro@codesourcery.com>
19031
19032 * proc-service.c (ps_lgetregs): Don't refetch registers from the
19033 target.
19034
19035 2010-01-21 Pedro Alves <pedro@codesourcery.com>
19036
19037 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
19038 prototype to take a regcache. Adjust.
19039
19040 2010-01-20 Pedro Alves <pedro@codesourcery.com>
19041
19042 * regcache.h (struct thread_info): Forward declare.
19043 (struct regcache): New.
19044 (new_register_cache): Adjust prototype.
19045 (get_thread_regcache): Declare.
19046 (free_register_cache): Adjust prototype.
19047 (registers_to_string, registers_from_string): Ditto.
19048 (supply_register, supply_register_by_name, collect_register)
19049 (collect_register_as_string, collect_register_by_name): Ditto.
19050 * regcache.c (struct inferior_regcache_data): Delete.
19051 (get_regcache): Rename to ...
19052 (get_thread_regcache): ... this. Adjust. Switch inferior before
19053 fetching registers.
19054 (regcache_invalidate_one): Adjust.
19055 (regcache_invalidate): Fix prototype.
19056 (new_register_cache): Return the new register cache.
19057 (free_register_cache): Change prototype.
19058 (realloc_register_cache): Adjust.
19059 (registers_to_string): Change prototype to take a regcache. Adjust.
19060 (registers_from_string): Ditto.
19061 (register_data): Ditto.
19062 (supply_register): Ditto.
19063 (supply_register_by_name): Ditto.
19064 (collect_register): Ditto.
19065 (collect_register_as_string): Ditto.
19066 (collect_register_by_name): Ditto.
19067 * server.c (process_serial_event): Adjust.
19068 * linux-low.h (regset_fill_func, regset_store_func): Change
19069 prototype.
19070 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
19071 Change prototype.
19072 * linux-low.c (get_stop_pc): Adjust.
19073 (check_removed_breakpoint): Adjust.
19074 (linux_wait_for_event): Adjust.
19075 (linux_resume_one_lwp): Adjust.
19076 (fetch_register): Add regcache parameter. Adjust.
19077 (usr_store_inferior_registers): Ditto.
19078 (regsets_fetch_inferior_registers): Ditto.
19079 (regsets_store_inferior_registers): Ditto.
19080 (linux_fetch_registers, linux_store_registers): Ditto.
19081 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
19082 regcache. Adjust.
19083 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
19084 Ditto.
19085 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
19086 prototype to take a regcache.
19087 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
19088 * remote-utils.c (convert_ascii_to_int, outreg)
19089 (prepare_resume_reply): Change prototype to take a regcache.
19090 Adjust.
19091 * target.h (struct target_ops) <fetch_registers, store_registers>:
19092 Change prototype to take a regcache.
19093 (fetch_inferior_registers, store_inferior_registers): Change
19094 prototype to take a regcache. Adjust.
19095 * proc-service.c (ps_lgetregs): Adjust.
19096 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
19097 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
19098 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
19099 take a regcache. Adjust.
19100 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
19101 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
19102 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
19103 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
19104 * linux-cris-low.c (cris_get_pc, cris_set_pc)
19105 (cris_cannot_fetch_register):
19106 (cris_breakpoint_at): Change prototype to take a regcache.
19107 Adjust.
19108 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
19109 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
19110 to take a regcache. Adjust.
19111 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
19112 Adjust.
19113 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
19114 take a regcache. Adjust.
19115 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
19116 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
19117 (m68k_set_pc): Change prototype to take a regcache. Adjust.
19118 * linux-mips-low.c (mips_get_pc):
19119 (mips_set_pc): Change prototype to take a regcache. Adjust.
19120 (mips_reinsert_addr): Adjust.
19121 (mips_collect_register): Change prototype to take a regcache.
19122 Adjust.
19123 (mips_supply_register):
19124 (mips_collect_register_32bit, mips_supply_register_32bit)
19125 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
19126 (mips_store_fpregset): Ditto.
19127 * linux-ppc-low.c (ppc_supply_ptrace_register)
19128 (ppc_supply_ptrace_register): Ditto.
19129 (parse_spufs_run): Adjust.
19130 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
19131 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
19132 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
19133 take a regcache. Adjust.
19134 * linux-s390-low.c (s390_collect_ptrace_register)
19135 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
19136 (s390_set_pc): Change prototype to take a regcache. Adjust.
19137 (s390_arch_setup): Adjust.
19138 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
19139 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
19140 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
19141 (sparc_fill_gregset, sparc_store_gregset_from_stack)
19142 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
19143 regcache. Adjust.
19144 (sparc_breakpoint_at): Adjust.
19145 * linux-xtensa-low.c (xtensa_fill_gregset):
19146 (xtensa_store_gregset):
19147 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
19148 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
19149 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
19150 prototype to take a regcache. Adjust.
19151 * win32-arm-low.c (arm_fetch_inferior_register)
19152 (arm_store_inferior_register): Change prototype to take a
19153 regcache. Adjust.
19154 * win32-i386-low.c (i386_fetch_inferior_register)
19155 (i386_store_inferior_register): Change prototype to take a
19156 regcache. Adjust.
19157 * win32-low.c (child_fetch_inferior_registers)
19158 (child_store_inferior_registers): Change prototype to take a
19159 regcache. Adjust.
19160 (win32_wait): Adjust.
19161 (win32_fetch_inferior_registers): Change prototype to take a
19162 regcache. Adjust.
19163 (win32_store_inferior_registers): Adjust.
19164 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
19165 store_inferior_register>: Change prototype to take a regcache.
19166
19167 2010-01-20 Doug Evans <dje@google.com>
19168
19169 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
19170 #ifdef.
19171 (linux_wait_for_event1, linux_init_signals): Ditto.
19172 (W_STOPCODE): Provide definition if missing.
19173
19174 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
19175
19176 * linux-low.c (linux_core_of_thread): New.
19177 (compare_ints, show_process, list_threads): New.
19178 (linux_qxfer_osdata): Report threads and cores.
19179 (linux_target_op): Register linux_core_of_thread.
19180 * remote-utils.c (prepare_resume_reply): Report the core.
19181 (buffer_xml_printf): Support %d specifier.
19182 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
19183 New.
19184 (handle_query): Handle qXfer:threads. Announce availability
19185 thereof.
19186 * target.h (struct target_ops): New field core_of_thread.
19187
19188 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
19189
19190 * Makefile.in (clean): Remove new generated files.
19191 (reg-s390.o, reg-s390.c): Remove rules.
19192 (reg-s390x.o, reg-s390x.c): Likewise.
19193 (s390-linux32.o, s390-linux32.c): Add rules.
19194 (s390-linux64.o, s390-linux64.c): Likewise.
19195 (s390x-linux64.o, s390x-linux64.c): Likewise.
19196 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
19197 * linux-s390-low.c: Include <elf.h>.
19198 (HWCAP_S390_HIGH_GPRS): Define if undefined.
19199 (init_registers_s390): Remove prototype.
19200 (init_registers_s390x): Likewise.
19201 (init_registers_s390_linux32): Add prototype.
19202 (init_registers_s390_linux64): Likewise.
19203 (init_registers_s390x_linux64): Likewise.
19204 (s390_num_regs_3264): New define.
19205 (s390_regmap_3264): New global variable.
19206 (s390_cannot_fetch_register): Remove obsolete check.
19207 (s390_cannot_store_register): Likewise.
19208 (s390_collect_ptrace_register): Handle upper/lower register halves.
19209 (s390_supply_ptrace_register): Likewise.
19210 (s390_fill_gregset): Update to register number changes.
19211 (s390_get_hwcap): New routine.
19212 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
19213 Install appropriate regmap and register set.
19214
19215 2010-01-01 Joel Brobecker <brobecker@adacore.com>
19216
19217 * server.c (gdbserver_version): Update copyright year to 2010.
19218 * gdbreplay.c (gdbreplay_version): Likewise.
19219
19220 2009-12-28 Doug Evans <dje@google.com>
19221
19222 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
19223 elf/external.h. Include <elf.h> instead but only if necessary.
19224
19225 2009-12-28 Pedro Alves <pedro@codesourcery.com>
19226
19227 * linux-low.c (linux_remove_process): Remove `detaching'
19228 parameter. Don't release/detach from thread_db here.
19229 (linux_kill): Release/detach from thread_db here, ...
19230 (linux_detach): ... and here, before actually detaching.
19231 (linux_wait_1): ... and here, when a process exits.
19232 * thread-db.c (any_thread_of): New.
19233 (thread_db_free): Switch the current inferior to a thread of the
19234 passed in process.
19235
19236 2009-12-21 Doug Evans <dje@google.com>
19237
19238 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
19239
19240 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
19241 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
19242 warning ifndef __NR_tkill. Move setting of errno there too.
19243 Delete unnecessary resetting of errno after syscall.
19244 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
19245
19246 * configure.ac: Check for dladdr.
19247 * config.in: Regenerate.
19248 * configure: Regenerate.
19249 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
19250 (try_thread_db_load): Update.
19251
19252 * linux-low.c (my_waitpid): Delete unnecessary prototype.
19253
19254 2009-12-18 Doug Evans <dje@google.com>
19255
19256 * event-loop.c: Include unistd.h if it exists.
19257
19258 * linux-low.c (my_waitpid): Move definition away from being in
19259 between linux_tracefork_child/linux_test_for_tracefork.
19260
19261 * gdb_proc_service.h (psaddr_t): Fix type.
19262 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
19263 signature to match glibc.
19264
19265 2009-12-16 Doug Evans <dje@google.com>
19266
19267 * linux-low.c (linux_read_memory): Fix argument to read.
19268
19269 2009-11-26 Pedro Alves <pedro@codesourcery.com>
19270
19271 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
19272 events, don't leave current_inferior pointing at null.
19273
19274 2009-11-26 Pedro Alves <pedro@codesourcery.com>
19275
19276 * win32-low.c (LOG): Delete.
19277 (OUTMSG): Output to stderr.
19278 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
19279 on compile time LOG macro.
19280 (win32_wait): Fix debug output.
19281
19282 2009-11-26 Pedro Alves <pedro@codesourcery.com>
19283
19284 * win32-low.c (win32_add_one_solib): If the dll name is
19285 "ntdll.dll", prepend the system directory to the dll path.
19286
19287 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
19288
19289 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
19290
19291 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
19292 Vladimir Prus <vladimir@codesourcery.com>
19293
19294 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
19295 * configure.ac: Check for __mcoldfire__ and set
19296 gdb_cv_m68k_is_coldfire.
19297 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
19298 reg-cf.o and reg-m68k.o.
19299 * configure: Regenerated.
19300
19301 2009-11-16 Pedro Alves <pedro@codesourcery.com>
19302
19303 * linux-low.c (linux_remove_process): Add `detaching' parameter.
19304 Pass it to thread_db_free.
19305 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
19306 proper `detaching' argument to linux_remove_process.
19307 * linux-low.h (thread_db_free): Add `detaching' parameter.
19308 * thread-db.c (thread_db_init): Pass false as `detaching' argument
19309 to thread_db_free.
19310 (thread_db_free): Add `detaching' parameter. Only
19311 call td_ta_clear_event if detaching from process.
19312
19313 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
19314
19315 * thread-db.c (thread_db_free): Fix typo.
19316
19317 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
19318
19319 PR gdb/10838
19320 * thread-db.c (thread_db_free): Call td_ta_clear_event.
19321
19322 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
19323
19324 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
19325 with an i686 compiler.
19326 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
19327 needed.
19328 * configure: Rebuilt.
19329
19330 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
19331
19332 PR gdb/10783
19333
19334 * server.c (handle_search_memory_1): Correct read_addr initialization
19335 in loop for searching subsequent chunks.
19336
19337 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
19338
19339 * configure.ac: New --with-libthread-db option.
19340 * thread-db.c: Allow direct dependence on libthread_db.
19341 (thread_db_free): Adjust.
19342 * config.in: Regenerate.
19343 * configure: Likewise.
19344
19345 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
19346
19347 PR gdb/10757
19348 * thread-db.c (attach_thread): New function.
19349 (maybe_attach_thread): Return success/failure.
19350 (find_new_threads_callback): Adjust.
19351 (thread_db_find_new_threads): Loop until no new threads.
19352
19353 2009-10-13 Pedro Alves <pedro@codesourcery.com>
19354
19355 * proc-service.c (ps_lgetregs): Formatting.
19356
19357 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
19358
19359 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
19360 * configure.ac: Adjust.
19361 * linux-low.h (struct process_info_private): Move members to struct
19362 thread_db.
19363 (thread_db_free, thread_db_handle_monitor_command): New prototype.
19364 * linux-low.c (linux_remove_process): Adjust.
19365 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
19366 * server.c (handle_query): Move code ...
19367 (handle_monitor_command): ... here. New function.
19368 * target.h (struct target_ops): New member.
19369 * thread-db.c (struct thread_db): New.
19370 (libthread_db_search_path): New variable.
19371 (thread_db_create_event, thread_db_enable_reporting)
19372 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
19373 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
19374 (try_thread_db_load_1, dladdr_to_soname): New functions.
19375 (try_thread_db_load, thread_db_load_search): New functions.
19376 (thread_db_init): Search for libthread_db.
19377 (thread_db_free): New function.
19378 (thread_db_handle_monitor_command): Likewise.
19379 * config.in: Regenerate.
19380 * configure: Regenerate.
19381
19382 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
19383
19384 * spu-low.c (spu_kill): Wait for inferior to terminate.
19385 Call clear_inferiors.
19386 (spu_detach): Call clear_inferiors.
19387
19388 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
19389
19390 * aclocal.m4: Regenerate.
19391 * config.in: Likewise.
19392 * configure: Likewise.
19393
19394 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
19395
19396 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
19397 (parse_spufs_run): New function.
19398 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
19399 (ppc_breakpoint_at): Handle SPU breakpoints.
19400
19401 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
19402
19403 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
19404 (SPUFS_MAGIC): Define.
19405 (spu_enumerate_spu_ids): New function.
19406 (linux_qxfer_spu): New function.
19407 (linux_target_ops): Install linux_qxfer_spu.
19408
19409 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
19410
19411 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
19412 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
19413 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
19414 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
19415 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
19416 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
19417 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
19418 (init_registers_powerpc_cell32l): Add prototype.
19419 (init_registers_powerpc_cell64l): Likewise.
19420 (ppc_arch_setup): Detect Cell/B.E. architecture.
19421
19422 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
19423
19424 * Makefile.in (datarootdir): New variable.
19425
19426 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
19427
19428 * linux-low.c (linux_write_memory): Update debugging output.
19429 * Makefile.in (clean): Add new descriptions.
19430 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
19431 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
19432 * configure.srv: Add new files for arm*-*-linux*.
19433 * linux-arm-low.c: Add new declarations.
19434 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
19435 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
19436 (HWCAP_VFPv3D16): New.
19437 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
19438 instead of __IWMMXT__.
19439 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
19440 (arm_arch_setup): New.
19441 (target_regsets): Remove #ifdef. Add VFP regset.
19442 (the_low_target): Use arm_arch_setup.
19443
19444 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
19445
19446 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
19447 the main thread again.
19448
19449 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
19450
19451 Adding Neutrino gdbserver.
19452 * configure: Regenerated.
19453 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
19454 * configure.srv (i[34567]86-*-nto*): New target.
19455 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
19456 * remote-utils.c [__QNX__]: Include sys/iomgr.h
19457 (nto_comctrl) [__QNX__]: New function.
19458 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
19459
19460 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
19461
19462 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
19463 srv_tgtobj.
19464
19465 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
19466 Pedro Alves <pedro@codesourcery.com>
19467
19468 * win32-i386-low.c (i386_get_thread_context): Handle systems that
19469 don't support CONTEXT_EXTENDED_REGISTERS.
19470 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
19471 (the_low_target): Install them.
19472 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
19473 failing with ERROR_PIPE_NOT_CONNECTED.
19474
19475 2009-06-30 Doug Evans <dje@google.com>
19476 Pierre Muller <muller@ics.u-strasbg.fr>
19477
19478 Add h/w watchpoint support to x86-linux, win32-i386.
19479 * Makefile.in (SFILES): Add i386-low.c
19480 (i386_low_h): Define.
19481 (i386-low.o): Add dependencies.
19482 (linux-x86-low.o): Add i386-low.h dependency.
19483 (win32-i386-low.o): Ditto.
19484 * i386-low.c: New file.
19485 * i386-low.h: New file.
19486 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
19487 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
19488 * linux-low.c (linux_add_process): Initialize arch_private.
19489 (linux_remove_process): Free arch_private.
19490 (add_lwp): Initialize arch_private.
19491 (delete_lwp): Free arch_private.
19492 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
19493 provided.
19494 * linux-low.h (process_info_private): New member arch_private.
19495 (lwp_info): New member arch_private.
19496 (linux_target_ops): New members new_process, new_thread,
19497 prepare_to_resume.
19498 (ptid_of): New macro.
19499 * linux-x86-low.c: Include stddef.h, i386-low.h.
19500 (arch_process_info): New struct.
19501 (arch_lwp_info): New struct.
19502 (x86_linux_dr_get, x86_linux_dr_set): New functions.
19503 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
19504 (i386_dr_low_get_status): New function.
19505 (x86_insert_point, x86_remove_point): New functions.
19506 (x86_stopped_by_watchpoint): New function.
19507 (x86_stopped_data_address): New function.
19508 (x86_linux_new_process, x86_linux_new_thread): New functions.
19509 (x86_linux_prepare_to_resume): New function.
19510 (the_low_target): Add entries for insert_point, remove_point,
19511 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
19512 prepare_to_resume.
19513 * server.c (debug_hw_points): New global.
19514 (monitor_show_help): Document set debug-hw-points.
19515 (handle_query): Process "set debug-hw-points".
19516 * server.h (debug_hw_points): Declare.
19517 (paddress): Declare.
19518 * utils.c (NUMCELLS, CELLSIZE): New macros.
19519 (get_sell, xsnprintf, paddress): New functions.
19520 * win32-arm-low.c (the_low_target): Add entries for insert_point,
19521 remove_point, stopped_by_watchpoint, stopped_data_address.
19522 * win32-i386-low.c: Include i386-low.h.
19523 (debug_reg_state): Replaces dr.
19524 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
19525 (i386_dr_low_get_status): New function.
19526 (i386_insert_point, i386_remove_point): New functions.
19527 (i386_stopped_by_watchpoint): New function.
19528 (i386_stopped_data_address): New function.
19529 (i386_initial_stuff): Update.
19530 (get_thread_context,set_thread_context,i386_thread_added): Update.
19531 (the_low_target): Add entries for insert_point,
19532 remove_point, stopped_by_watchpoint, stopped_data_address.
19533 * win32-low.c (win32_insert_watchpoint): New function.
19534 (win32_remove_watchpoint): New function.
19535 (win32_stopped_by_watchpoint): New function.
19536 (win32_stopped_data_address): New function.
19537 (win32_target_ops): Add entries for insert_watchpoint,
19538 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
19539 * win32-low.h (win32_target_ops): New members insert_point,
19540 remove_point, stopped_by_watchpoint, stopped_data_address.
19541
19542 2009-06-25 Pedro Alves <pedro@codesourcery.com>
19543
19544 * server.c (process_serial_event): Re-return unsupported, not
19545 error, if the type isn't recognized. Re-allow supporting only
19546 insert or remove packets. Also call require_running for
19547 breakpoints. Add missing break statement to default case. Tidy.
19548 * target.h (struct target_ops): Rename insert_watchpoint to
19549 insert_point, and remove_watchpoint to remove_point.
19550
19551 * linux-low.h (struct linux_target_ops): Likewise.
19552 * linux-low.c (linux_insert_watchpoint): Rename to ...
19553 (linux_insert_point): ... this. Adjust.
19554 (linux_remove_watchpoint): Rename to ...
19555 (linux_remove_point): ... this. Adjust.
19556 (linux_target_ops): Adjust.
19557 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
19558 (cris_insert_point): ... this.
19559 (cris_remove_watchpoint): Rename to ...
19560 (cris_remove_point): ... this.
19561 (the_low_target): Adjust.
19562
19563 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
19564
19565 * server.c (handle_v_kill): Pass signal_pid to
19566 kill_inferior if multi_process is zero.
19567
19568 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
19569
19570 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
19571 * target.h (target_ops): Comment for *_watchpoint to make it clear
19572 the functions can get types '0' and '1'.
19573
19574 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
19575
19576 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
19577 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
19578 * regcache.c (get_regcache): Likewise.
19579 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
19580 * win32-low.c (child_fetch_inferior_registers): Remove check for
19581 regno 0.
19582
19583 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
19584 Pedro Alves <pedro@codesourcery.com>
19585
19586 * target.h (struct target_ops) <supports_multi_process>: New
19587 callback.
19588 (target_supports_multi_process): New.
19589 * server.c (handle_query): Even if GDB reports support, only
19590 enable multi-process if the target also supports it. Report
19591 multi-process support only if the target backend supports it.
19592 * linux-low.c (linux_supports_multi_process): New function.
19593 (linux_target_ops): Install it as target_supports_multi_process
19594 callback.
19595
19596 2009-05-24 Doug Evans <dje@google.com>
19597
19598 Global renaming of find_thread_pid to find_thread_ptid.
19599 * server.h (find_thread_ptid): Renamed from find_thread_pid.
19600 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
19601 All callers updated.
19602
19603 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
19604 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
19605 directly.
19606
19607 * linux-low.c (get_stop_pc): Print pc if debug_threads.
19608 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
19609 (linux_resume_one_lwp): Ditto.
19610
19611 2009-05-23 Doug Evans <dje@google.com>
19612
19613 * linux-low.c (linux_resume_one_lwp): Change type of first arg
19614 from struct inferior_list_entry * to struct lwp_info *.
19615 All callers updated.
19616
19617 2009-05-13 Doug Evans <dje@google.com>
19618
19619 * linux-x86-low.c: Don't include assert.h.
19620 (x86_siginfo_fixup): Use fatal, not assert.
19621 (x86_arch_setup): Fix comment.
19622
19623 2009-05-12 Doug Evans <dje@google.com>
19624
19625 Biarch support for i386/amd64 gdbserver.
19626 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
19627 Add linux-x86-low.c.
19628 (linux-i386-low.o, linux-x86-64-low.o): Delete.
19629 (linux-x86-low.o): Add.
19630 * linux-x86-64-low.c: Delete.
19631 * linux-i386-low.c: Delete.
19632 * linux-x86-low.c: New file.
19633 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
19634 linux-x86-low.o.
19635 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
19636 linux-x86-low.o.
19637 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
19638 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
19639 (linux_child_pid_to_exec_file): New function.
19640 (elf_64_header_p, elf_64_file_p): New functions.
19641 (siginfo_fixup): New function.
19642 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
19643 give target a chance to convert layout.
19644 * linux-low.h (linux_target_ops): New member siginfo_fixup.
19645 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
19646
19647 2009-05-07 Doug Evans <dje@google.com>
19648
19649 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
19650 (regsets_store_inferior_registers): Ditto.
19651
19652 2009-05-06 Pedro Alves <pedro@codesourcery.com>
19653
19654 PR server/10048
19655
19656 * linux-low.c (must_set_ptrace_flags): Delete.
19657 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
19658 of the global.
19659 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
19660 `lwp->must_set_ptrace_flags' instead.
19661 (linux_wait_for_event_1): Set ptrace options here.
19662 (linux_wait_1): ... not here.
19663
19664 2009-04-30 Doug Evans <dje@google.com>
19665
19666 * inferiors.c (started_inferior_callback): New function.
19667 (attached_inferior_callback): New function.
19668 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
19669 * server.c (print_started_pid, print_attached_pid): New functions.
19670 (detach_or_kill_for_exit): New function.
19671 (main): Call it instead of for_each_inferior (kill_inferior_callback).
19672 * server.h (have_started_inferiors_p): Declare.
19673 (have_attached_inferiors_p): Declare.
19674
19675 * inferiors.c (remove_process): Fix memory leak, free process.
19676 * linux-low.c (linux_remove_process): New function.
19677 (linux_kill): Call it instead of remove_process.
19678 (linux_detach, linux_wait_1): Ditto.
19679
19680 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
19681
19682 * configure.srv: Add x86 Windows CE target.
19683
19684 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
19685
19686 * inferiors.c (get_thread_process): Make global.
19687 * server.h (get_thread_process): Add prototype.
19688 * thread-db.c (find_one_thread): Use get_thread_process
19689 instead of current_process.
19690 (thread_db_get_tls_address): Do not crash if called when
19691 thread layer is not yet initialized.
19692
19693 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
19694
19695 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
19696 * spu-low.c (current_tid): Rename to ...
19697 (current_ptid): ... this.
19698 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
19699 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
19700 ptid_get_lwp (current_ptid) instead of current_tid.
19701 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
19702 instead of current_tid. Use find_process_pid to verify pid
19703 argument is valid. Pass proper argument to remove_process.
19704 (spu_thread_alive): Compare current_ptid instead of current_tid.
19705 (spu_resume): Likewise.
19706
19707 2009-04-02 Pedro Alves <pedro@codesourcery.com>
19708
19709 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
19710 variable.
19711
19712 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19713
19714 Implement the multiprocess extensions, and add linux multiprocess
19715 support.
19716
19717 * server.h (ULONGEST): Declare.
19718 (struct ptid, ptid_t): New.
19719 (minus_one_ptid, null_ptid): Declare.
19720 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
19721 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
19722 (struct inferior_list_entry): Change `id' type from unsigned from
19723 to ptid_t.
19724 (struct sym_cache, struct breakpoint, struct
19725 process_info_private): Forward declare.
19726 (struct process_info): Declare.
19727 (current_process): Declare.
19728 (all_processes): Declare.
19729 (initialize_inferiors): Declare.
19730 (add_thread): Adjust to use ptid_t.
19731 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
19732 (add_process, remove_process, find_thread_pid): Declare.
19733 (find_inferior_id): Adjust to use ptid_t.
19734 (cont_thread, general_thread, step_thread): Change type to ptid_t.
19735 (multi_process): Declare.
19736 (push_event): Adjust to use ptid_t.
19737 (read_ptid, write_ptid): Declare.
19738 (prepare_resume_reply): Adjust to use ptid_t.
19739 (clear_symbol_cache): Declare.
19740 * inferiors.c (all_processes): New.
19741 (null_ptid, minus_one_ptid): New.
19742 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
19743 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
19744 (add_thread): Change unsigned long to ptid. Remove gdb_id
19745 parameter. Adjust.
19746 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
19747 (gdb_id_to_thread): Rename to ...
19748 (find_thread_pid): ... this. Change unsigned long to ptid.
19749 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
19750 (loaded_dll, pull_pid_from_list): Adjust.
19751 (add_process, remove_process, find_process_pid)
19752 (get_thread_process, current_process, initialize_inferiors): New.
19753 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
19754 (struct target_waitstatus) <related_pid>: Ditto.
19755 (struct target_ops) <kill, detach>: Add `pid' argument. Change
19756 return type to int.
19757 (struct target_ops) <join>: Add `pid' argument.
19758 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
19759 (struct target_ops) <wait>: Add `ptid' field. Change return type
19760 to ptid.
19761 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
19762 (mywait): Add `ptid' argument. Change return type to ptid_t.
19763 (target_pid_to_str): Declare.
19764 * target.c (set_desired_inferior): Adjust to use ptids.
19765 (mywait): Add new `ptid' argument. Adjust.
19766 (target_pid_to_str): New.
19767 * mem-break.h (free_all_breakpoints): Declare.
19768 * mem-break.c (breakpoints): Delelete.
19769 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
19770 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
19771 to use per-process breakpoint list.
19772 (free_all_breakpoints): New.
19773 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
19774 (symbol_cache, all_symbols_looked_up): Delete.
19775 (hexchars): New.
19776 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
19777 read_ptid): New.
19778 (prepare_resume_reply): Change ptid argument's type from unsigned
19779 long to ptid_t. Adjust. Implement W;process and X;process.
19780 (free_sym_cache, clear_symbol_cache): New.
19781 (look_up_one_symbol): Adjust to per-process symbol cache. *
19782 * server.c (cont_thread, general_thread, step_thread): Change type
19783 to ptid_t.
19784 (attached): Delete.
19785 (multi_process): New.
19786 (last_ptid): Change type to ptid_t.
19787 (struct vstop_notif) <ptid>: Change type to ptid_t.
19788 (queue_stop_reply, push_event): Change `ptid' argument's type to
19789 ptid_t.
19790 (discard_queued_stop_replies): Add `pid' argument.
19791 (start_inferior): Adjust to use ptids. Adjust to mywait interface
19792 changes. Don't reference the `attached' global.
19793 (attach_inferior): Adjust to mywait interface changes.
19794 (handle_query): Adjust to use ptids. Parse GDB's qSupported
19795 features. Handle and report "multiprocess+". Handle
19796 "qAttached:PID".
19797 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
19798 changes.
19799 (handle_v_kill): New.
19800 (handle_v_stopped): Adjust to use target_pid_to_str.
19801 (handle_v_requests): Allow multiple attaches and runs when
19802 multiprocess extensions are in effect. Handle "vKill".
19803 (myresume): Adjust to use ptids.
19804 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
19805 (handle_status): Adjust to discard_queued_stop_replies interface
19806 change.
19807 (first_thread_of, kill_inferior_callback)
19808 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
19809 (main): Call initialize_inferiors. Adjust to use ptids, killing
19810 and detaching from all inferiors. Handle multiprocess packet
19811 variants.
19812 * linux-low.h: Include gdb_proc_service.h.
19813 (struct process_info_private): New.
19814 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
19815 <lwpid_of>: Use ptid_get_lwp.
19816 (get_lwp_thread): Adjust.
19817 (struct lwp_info): Add `dead' member.
19818 (find_lwp_pid): Declare.
19819 * linux-low.c (thread_db_active): Delete.
19820 (new_inferior): Adjust comment.
19821 (inferior_pid): Delete.
19822 (linux_add_process): New.
19823 (handle_extended_wait): Adjust.
19824 (add_lwp): Change unsigned long to ptid.
19825 (linux_create_inferior): Add process to processes table. Adjust
19826 to use ptids. Don't set new_inferior here.
19827 (linux_attach_lwp): Rename to ...
19828 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
19829 it. Adjust to use ptids.
19830 (linux_attach_lwp): New.
19831 (linux_attach): Add process to processes table. Don't set
19832 new_inferior here.
19833 (struct counter): New.
19834 (second_thread_of_pid_p, last_thread_of_process_p): New.
19835 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
19836 multiple processes.
19837 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
19838 processes. Remove process from process table.
19839 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
19840 to multiple processes.
19841 (any_thread_of): New.
19842 (linux_detach): Add `pid' argument, and handle it. Remove process
19843 from processes table.
19844 (linux_join): Add `pid' argument. Handle it.
19845 (linux_thread_alive): Change unsighed long argument to ptid_t.
19846 Consider dead lwps as not being alive.
19847 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
19848 threads we're not interested in.
19849 (same_lwp, find_lwp_pid): New.
19850 (linux_wait_for_lwp): Change `pid' argument's type from int to
19851 ptid_t. Adjust.
19852 (linux_wait_for_event): Rename to ...
19853 (linux_wait_for_event_1): ... this. Change `pid' argument's type
19854 from int to ptid_t. Adjust.
19855 (linux_wait_for_event): New.
19856 (linux_wait_1): Add `ptid' argument. Change return type to
19857 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
19858 that exit from the process table.
19859 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
19860 Adjust.
19861 (mark_lwp_dead): New.
19862 (wait_for_sigstop): Adjust to use ptids. If a process exits while
19863 stopping all threads, mark its main lwp as dead.
19864 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
19865 ptids.
19866 (fetch_register, usr_store_inferior_registers)
19867 (regsets_fetch_inferior_registers)
19868 (regsets_store_inferior_registers, linux_read_memory)
19869 (linux_write_memory): Inline `inferior_pid'.
19870 (linux_look_up_symbols): Adjust to use per-process
19871 `thread_db_active'.
19872 (linux_request_interrupt): Adjust to use ptids.
19873 (linux_read_auxv): Inline `inferior_pid'.
19874 (initialize_low): Don't reference thread_db_active.
19875 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
19876 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
19877 (ps_getpid): Return the pid of the current inferior.
19878 * thread-db.c (proc_handle, thread_agent): Delete.
19879 (thread_db_create_event, thread_db_enable_reporting): Adjust to
19880 per-process data.
19881 (find_one_thread): Change argument type to ptid_t. Adjust to
19882 per-process data.
19883 (maybe_attach_thread): Adjust to per-process data and ptids.
19884 (thread_db_find_new_threads): Ditto.
19885 (thread_db_init): Ditto.
19886 * spu-low.c (spu_create_inferior, spu_attach): Add process to
19887 processes table. Adjust to use ptids.
19888 (spu_kill, spu_detach): Adjust interface. Remove process from
19889 processes table.
19890 (spu_join, spu_thread_alive): Adjust interface.
19891 (spu_wait): Adjust interface. Remove process from processes
19892 table. Adjust to use ptids.
19893 * win32-low.c (current_inferior_tid): Delete.
19894 (current_inferior_ptid): New.
19895 (debug_event_ptid): New.
19896 (thread_rec): Take a ptid. Adjust.
19897 (child_add_thread): Add `pid' argument. Adjust to use ptids.
19898 (child_delete_thread): Ditto.
19899 (do_initial_child_stuff): Add `attached' argument. Add process to
19900 processes table.
19901 (child_fetch_inferior_registers, child_store_inferior_registers):
19902 Adjust.
19903 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
19904 (win32_attach): Pass 1 to do_initial_child_stuff.
19905 (win32_kill): Adjust interface. Remove process from processes
19906 table.
19907 (win32_detach): Ditto.
19908 (win32_join): Adjust interface.
19909 (win32_thread_alive): Take a ptid.
19910 (win32_resume): Adjust to use ptids.
19911 (get_child_debug_event): Ditto.
19912 (win32_wait): Adjust interface. Remove exiting process from
19913 processes table.
19914
19915 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19916
19917 Non-stop mode support.
19918
19919 * server.h (non_stop): Declare.
19920 (gdb_client_data, handler_func): Declare.
19921 (delete_file_handler, add_file_handler, start_event_loop):
19922 Declare.
19923 (handle_serial_event, handle_target_event, push_event)
19924 (putpkt_notif): Declare.
19925 * target.h (enum resume_kind): New.
19926 (struct thread_resume): Replace `step' field by `kind' field.
19927 (TARGET_WNOHANG): Define.
19928 (struct target_ops) <wait>: Add `options' argument.
19929 <supports_non_stop, async, start_non_stop>: New fields.
19930 (target_supports_non_stop, target_async): New.
19931 (start_non_stop): Declare.
19932 (mywait): Add `options' argument.
19933 * target.c (mywait): Add `options' argument. Print child exit
19934 notifications here.
19935 (start_non_stop): New.
19936 * server.c (non_stop, own_buf, mem_buf): New globals.
19937 (struct vstop_notif): New.
19938 (notif_queue): New global.
19939 (queue_stop_reply, push_event, discard_queued_stop_replies)
19940 (send_next_stop_reply): New.
19941 (start_inferior): Adjust to use resume_kind. Adjust to mywait
19942 interface changes.
19943 (attach_inferior): In non-stop mode, don't wait for the target
19944 here.
19945 (handle_general_set): Handle QNonStop.
19946 (handle_query): When handling qC, return the current general
19947 thread, instead of the first thread of the list.
19948 (handle_query): If the backend supports non-stop mode, include
19949 QNonStop+ in the qSupported query response.
19950 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
19951 and non-stop mode.
19952 (handle_v_attach, handle_v_run): Handle non-stop mode.
19953 (handle_v_stopped): New.
19954 (handle_v_requests): Report support for vCont;t. Handle vStopped.
19955 (myresume): Adjust to use resume_kind. Handle non-stop.
19956 (queue_stop_reply_callback): New.
19957 (handle_status): Handle non-stop mode.
19958 (main): Clear non_stop flag on reconnection. Use the event-loop.
19959 Refactor serial protocol handling from here ...
19960 (process_serial_event): ... to this new function. When GDB
19961 selects any thread, select one here. In non-stop mode, wait until
19962 GDB acks all pending events before exiting.
19963 (handle_serial_event, handle_target_event): New.
19964 * remote-utils.c (remote_open): Install remote_desc in the event
19965 loop.
19966 (remote_close): Remove remote_desc from the event loop.
19967 (putpkt_binary): Rename to...
19968 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
19969 (putpkt_binary): New as wrapper around putpkt_binary_1.
19970 (putpkt_notif): New.
19971 (prepare_resume_reply): In non-stop mode, don't change the
19972 general_thread.
19973 * event-loop.c: New.
19974 * Makefile.in (OBJ): Add event-loop.o.
19975 (event-loop.o): New rule.
19976
19977 * linux-low.h (pid_of): Moved here.
19978 (lwpid_of): New.
19979 (get_lwp_thread): Use lwpid_of.
19980 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
19981 * linux-low.c (pid_of): Delete.
19982 (inferior_pid): Use lwpid_of.
19983 (linux_event_pipe): New.
19984 (target_is_async_p): New.
19985 (delete_lwp): New.
19986 (handle_extended_wait): Use lwpid_of.
19987 (add_lwp): Don't set lwpid field.
19988 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
19989 (linux_kill_one_lwp): If killing a running lwp, stop it first.
19990 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
19991 (linux_detach_one_lwp): If detaching from a running lwp, stop it
19992 first. Adjust to linux_wait_for_event interface changes. Use
19993 lwpid_of.
19994 (linux_detach): Don't delete the main lwp here.
19995 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
19996 (status_pending_p): Don't consider explicitly suspended lwps.
19997 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
19998 pointer. Add OPTIONS argument. Change return type to int. Use
19999 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
20000 (linux_wait_for_event): Take an integer pid instead of a lwp_info
20001 pointer. Add status pointer argument. Return a pid instead of a
20002 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
20003 changes. In non-stop mode, don't switch to a random thread.
20004 (linux_wait): Rename to...
20005 (linux_wait_1): ... this. Add target_options argument, and handle
20006 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
20007 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
20008 clean exit and signal exit code. Don't stop all threads in
20009 non-stop mode. In all-stop mode, only stop all threads when
20010 reporting a stop to GDB. Handle explicit thread stop requests.
20011 (async_file_flush, async_file_mark): New.
20012 (linux_wait): New.
20013 (send_sigstop): Use lwpid_of.
20014 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
20015 interface changes. In non-stop mode, don't switch to a random
20016 thread.
20017 (linux_resume_one_lwp): Use lwpid_of.
20018 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
20019 (linux_resume_one_thread): ... this. Handle resume_stop. In
20020 non-stop mode, don't look for pending flag in all threads.
20021 (resume_status_pending_p): Don't consider explicitly suspended
20022 threads.
20023 (my_waitpid): Reimplement. Emulate __WALL.
20024 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
20025 Use lwpid_of.
20026 (sigchld_handler, linux_supports_non_stop, linux_async)
20027 (linux_start_non_stop): New.
20028 (linux_target_ops): Register linux_supports_non_stop, linux_async
20029 and linux_start_non_stop.
20030 (initialize_low): Install SIGCHLD handler.
20031 * thread-db.c (thread_db_create_event, find_one_thread)
20032 (thread_db_get_tls_address): Use lwpid_of.
20033 * win32-low.c (win32_detach): Adjust to use resume_kind.
20034 (win32_wait): Add `options' argument.
20035 * spu-low.c (spu_resume): Adjust to use resume_kind.
20036 (spu_wait): Add `options' argument.
20037
20038 2009-04-01 Pedro Alves <pedro@codesourcery.com>
20039
20040 Decouple target code from remote protocol.
20041
20042 * target.h (enum target_waitkind): New.
20043 (struct target_waitstatus): New.
20044 (struct target_ops) <wait>: Return an unsigned long. Take a
20045 target_waitstatus pointer instead of a char pointer.
20046 (mywait): Likewise.
20047 * target.c (mywait): Change prototype to return an unsigned long.
20048 Take a target_waitstatus pointer instead of a char pointer. Adjust.
20049 * server.h (thread_from_wait, old_thread_from_wait): Delete
20050 declarations.
20051 (prepare_resume_reply): Change prototype to take a
20052 target_waitstatus.
20053 * server.c (thread_from_wait, old_thread_from_wait): Delete.
20054 (last_status, last_ptid): New.
20055 (start_inferior): Remove "statusptr" argument. Adjust. Return a
20056 pid instead of a signal.
20057 (attach_inferior): Remove "status" and "signal" parameters.
20058 Adjust.
20059 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
20060 not as an address.
20061 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
20062 (handle_v_requests, myresume): Remove "status" and "signal"
20063 parameters. Adjust.
20064 (handle_status): New.
20065 (main): Delete local `status'. Adjust.
20066 * remote-utils.c: Include target.h.
20067 (prepare_resume_reply): Change prototype to take a
20068 target_waitstatus. Adjust.
20069
20070 * linux-low.c (linux_wait): Adjust to new target_ops->wait
20071 interface.
20072 * spu-low.c (spu_wait): Adjust.
20073 * win32-low.c (enum target_waitkind, struct target_waitstatus):
20074 Delete.
20075 (win32_wait): Adjust.
20076
20077 2009-04-01 Pedro Alves <pedro@codesourcery.com>
20078
20079 * target.h (struct thread_resume): Delete leave_stopped member.
20080 (struct target_ops): Add a `n' argument to the `resume' callback.
20081 * server.c (start_inferior): Adjust.
20082 (handle_v_cont, myresume): Adjust.
20083 * linux-low.c (check_removed_breakpoint): Adjust to resume
20084 interface change, and to removed leave_stopped field.
20085 (resume_ptr): Delete.
20086 (struct thread_resume_array): New.
20087 (linux_set_resume_request): Add new `arg' parameter. Adjust to
20088 resume interface change.
20089 (linux_continue_one_thread, linux_queue_one_thread)
20090 (resume_status_pending_p): Check if the resume field is NULL
20091 instead of checking the leave_stopped member.
20092 (linux_resume): Adjust to the target resume interface change.
20093 * spu-low.c (spu_resume): Adjust to the target resume interface
20094 change.
20095 * win32-low.c (win32_detach, win32_resume): Ditto.
20096
20097 2009-04-01 Pedro Alves <pedro@codesourcery.com>
20098
20099 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
20100 flag.
20101 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
20102 pending.
20103 (linux_continue_one_thread): Only preserve the stepping flag if
20104 there's a pending breakpoint.
20105
20106 2009-03-31 Pedro Alves <pedro@codesourcery.com>
20107
20108 * server.c (main): After the inferior having exited, call
20109 remote_close before exiting gdbserver.
20110
20111 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
20112
20113 Fix size of FPSCR in Power 7 processors.
20114 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
20115 (PPC_FEATURE_HAS_DFP): New #define.
20116 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
20117 size of the FPSCR.
20118
20119 2009-03-23 Pedro Alves <pedro@codesourcery.com>
20120
20121 * server.c (handle_query) Whitespace and formatting.
20122
20123 2009-03-22 Pedro Alves <pedro@codesourcery.com>
20124
20125 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
20126 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
20127 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
20128 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
20129 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
20130 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
20131 Makefile.in, configure.ac: Fix whitespace throughout.
20132 * configure: Regenerate.
20133
20134 2009-03-22 Pedro Alves <pedro@codesourcery.com>
20135
20136 * inferiors.c (find_inferior): Make it safe for the callback
20137 function to delete the currently iterated inferior.
20138
20139 2009-03-22 Pedro Alves <pedro@codesourcery.com>
20140
20141 * Makefile.in (linuw_low_h): Move higher.
20142 (thread-db.o): Depend on $(linux_low_h).
20143
20144 2009-03-17 Pedro Alves <pedro@codesourcery.com>
20145
20146 Rename "process" to "lwp" throughout.
20147
20148 * linux-low.c (all_processes): Rename to...
20149 (all_lwps): ... this.
20150 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
20151 (add_process): Rename to ...
20152 (add_lwp): ... this. Adjust.
20153 (linux_create_inferior): Adjust.
20154 (linux_attach_lwp): Adjust.
20155 (linux_attach): Adjust.
20156 (linux_kill_one_process): Rename to ...
20157 (linux_kill_one_lwp): ... this. Adjust.
20158 (linux_kill): Adjust.
20159 (linux_detach_one_process): Rename to ...
20160 (linux_detach_one_lwp): ... this. Adjust.
20161 (linux_detach): Adjust.
20162 (check_removed_breakpoint): Adjust.
20163 (status_pending_p): Adjust.
20164 (linux_wait_for_process): Rename to ...
20165 (linux_wait_for_lwp): ... this. Adjust.
20166 (linux_wait_for_event): Adjust.
20167 (send_sigstop): Adjust.
20168 (wait_for_sigstop): Adjust.
20169 (stop_all_processes): Rename to ...
20170 (stop_all_lwps): ... this.
20171 (linux_resume_one_process): Rename to ...
20172 (linux_resume_one_lwp): ... this. Adjust.
20173 (linux_set_resume_request, linux_continue_one_thread)
20174 (linux_queue_one_thread, resume_status_pending_p)
20175 (usr_store_inferior_registers, regsets_store_inferior_registers)
20176 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
20177 Adjust.
20178 * linux-low.h (get_process): Rename to ...
20179 (get_lwp): ... this. Adjust.
20180 (get_thread_process): Rename to ...
20181 (get_thread_lwp): ... this. Adjust.
20182 (get_process_thread): Rename to ...
20183 (get_lwp_thread): ... this. Adjust.
20184 (struct process_info): Rename to ...
20185 (struct lwp_info): ... this.
20186 (all_processes): Rename to ...
20187 (all_lwps): ... this.
20188 * proc-service.c (ps_lgetregs): Adjust.
20189 * thread-db.c (thread_db_create_event, find_one_thread)
20190 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
20191
20192 2009-03-14 Pedro Alves <pedro@codesourcery.com>
20193
20194 * server.c (handle_query): Handle "qAttached".
20195
20196 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
20197
20198 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
20199 GPLv3, update license URL.
20200
20201 2009-03-01 Doug Evans <dje@google.com>
20202
20203 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
20204 (server_h): Add gdb_signals.h.
20205 (signals.o): Update.
20206 * server.h (target_signal_from_host,target_signal_to_host_p)
20207 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
20208
20209 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
20210
20211 * remote-utils.c (getpkt): Also generate remote-debug
20212 information if noack_mode is set.
20213
20214 2009-02-06 Pedro Alves <pedro@codesourcery.com>
20215
20216 * server.c (handle_query): Report qXfer:siginfo:read and
20217 qXfer:siginfo:write as supported and handle them.
20218 * target.h (struct target_ops) <qxfer_siginfo>: New field.
20219 * linux-low.c (linux_xfer_siginfo): New.
20220 (linux_target_ops): Set it.
20221
20222 2009-01-26 Pedro Alves <pedro@codesourcery.com>
20223
20224 * server.c (gdbserver_usage): Mention --remote-debug.
20225 (main): Accept '--remote-debug' switch.
20226
20227 2009-01-18 Doug Evans <dje@google.com>
20228
20229 * regcache.c (new_register_cache): No need to check result of xcalloc.
20230 * server.c (handle_search_memory): Back out calls to xmalloc,
20231 result is checked and error is returned to user upon failure.
20232 (handle_query): Ditto. Add more checks for result of malloc.
20233 (handle_v_cont): Check result of malloc, report error back to
20234 user upon failure.
20235 (handle_v_run): Ditto. Call freeargv.
20236 * server.h (freeargv): Declare.
20237 * utils.c (freeargv): New fn.
20238
20239 2009-01-15 Doug Evans <dje@google.com>
20240
20241 * gdbreplay.c (perror_with_name): Make arg const char *.
20242 * server.h (target_signal_to_name): Make return type const char *.
20243 * thread-db.c (thread_db_err_str): Make return type const char *.
20244 * utils.c (perror_with_name): Make arg const char *.
20245
20246 2009-01-14 Pedro Alves <pedro@codesourcery.com>
20247
20248 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
20249 when handling a EXIT_PROCESS_DEBUG_EVENT.
20250
20251 2009-01-06 Joel Brobecker <brobecker@adacore.com>
20252
20253 * gdbreplay.c (gdbreplay_version): Update copyright year.
20254 * server.c (gdbserver_version): Likewise.
20255
20256 2009-01-05 Doug Evans <dje@google.com>
20257
20258 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
20259 (handle_extended_wait): Improve comment.
20260
20261 2008-12-13 Doug Evans <dje@google.com>
20262
20263 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
20264 * server.h (ATTR_MALLOC): New macro.
20265 (xmalloc,xcalloc,xstrdup): Declare.
20266 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
20267 * inferiors.c: Ditto.
20268 * linux-low.c: Ditto.
20269 * mem-break.c: Ditto.
20270 * regcache.c: Ditto.
20271 * remote-utils.c: Ditto.
20272 * server.c: Ditto.
20273 * target.c: Ditto.
20274 * win32-low.c: Ditto.
20275
20276 2008-12-12 Doug Evans <dje@google.com>
20277
20278 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
20279 in debugging printf.
20280
20281 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
20282
20283 2008-12-09 Doug Evans <dje@google.com>
20284
20285 * linux-low.h (struct process_info): Delete member tid, unused.
20286 * thread-db.c (find_one_thread): Update.
20287 (maybe_attach_thread): Update.
20288
20289 2008-12-02 Pedro Alves <pedro@codesourcery.com>
20290
20291 * target.h (struct target_ops): Add qxfer_osdata member.
20292 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
20293 and dirent.h.
20294 (linux_qxfer_osdata): New functions.
20295 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
20296 callback.
20297 * server.c (handle_query): Handle "qXfer:osdata:read:".
20298 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
20299 (buffer_xml_printf): New functions.
20300 * server.h (struct buffer): New.
20301 (buffer_grow_str, buffer_grow_str0): New macros.
20302 (buffer_grow, buffer_free, buffer_init, buffer_finish)
20303 (buffer_xml_printf): Declare.
20304
20305 2008-11-24 Doug Evans <dje@google.com>
20306
20307 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
20308
20309 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
20310
20311 * server.c (handle_v_run): Always use the supplied argument list.
20312
20313 2008-11-19 Bob Wilson <bob.wilson@acm.org>
20314
20315 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
20316 (xtensa_regmap_table): Add entry for scompare1.
20317
20318 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
20319
20320 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
20321 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
20322 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
20323 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
20324 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
20325 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
20326 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
20327 XML target descriptions.
20328 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
20329 when inferior is running on an ISA 2.05 or later processor. Add
20330 special case to return offset for full 64-bit slot of FPSCR when
20331 in 32-bits.
20332
20333 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
20334
20335 * Makefile.in (SFILES, clean): Added sparc64 files.
20336 (reg-sparc64.o, reg-sparc64.c): New.
20337 * configure.srv (sparc*-*-linux*): New configuration.
20338 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
20339 syscall arguments for SPARC.
20340 (regsets_store_inferior_registers): Likewise.
20341 * linux-sparc-low.c: New file.
20342
20343 2008-10-21 Doug Evans <dje@google.com>
20344
20345 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
20346 (READLINE_DIR,READLINE_DEP): Delete.
20347 (INTERNAL_CFLAGS): Update.
20348 (LINTFLAGS): Update.
20349
20350 2008-10-10 Pedro Alves <pedro@codesourcery.com>
20351
20352 * server.c (handle_v_run): If GDB didn't specify an argv, use the
20353 whole argv from the last run, not just argv[0].
20354
20355 2008-09-08 Pedro Alves <pedro@codesourcery.com>
20356
20357 * regcache.c (new_register_cache): Return NULL if the register
20358 cache size isn't known yet.
20359 (free_register_cache): Avoid dereferencing a NULL regcache.
20360
20361 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
20362
20363 * configure.srv: Merge MIPS and MIPS64.
20364
20365 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
20366
20367 * Makefile.in (uninstall): Apply $(EXEEXT) too.
20368
20369 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
20370
20371 * Makefile.in: Add required vsx dependencies.
20372
20373 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
20374 Declare init_registers_powerpc_vsx32l.
20375 Declare init_registers_powerpc_vsx64l.
20376 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
20377 (ppc_arch_setup): Check for VSX in hwcap.
20378 (ppc_fill_vsxregset): New function.
20379 (ppc_store_vsxregset): New function.
20380 Add new VSX entry in regset_info target_regsets.
20381
20382 * configure.srv: Add new VSX dependencies.
20383
20384 2008-08-12 Pedro Alves <pedro@codesourcery.com>
20385
20386 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
20387 (remote_open): Set or clear transport_is_reliable.
20388 (putpkt_binary): Don't expect acks in noack mode.
20389 (getpkt): Don't send ack/nac in noack mode.
20390 * server.c (handle_general_set): Handle QStartNoAckMode.
20391 (handle_query): If connected by tcp pass QStartNoAckMode+ in
20392 qSupported.
20393 (main): Reset noack_mode on every connection.
20394 * server.h (noack_mode): Declare.
20395
20396 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
20397
20398 * Makefile.in (GDBREPLAY_OBS): New variable.
20399 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
20400
20401 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
20402 Daniel Jacobowitz <dan@codesourcery.com>
20403
20404 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
20405 (usr_store_inferior_registers): Likewise.
20406 (regsets_store_inferior_registers): Likewise.
20407
20408 2008-07-31 Rolf Jansen <rj@surtec.com>
20409 Pedro Alves <pedro@codesourcery.com>
20410
20411 * configure.ac: Check for memmem declaration.
20412 * server.c [HAVE_MALLOC_H]: Include malloc.h.
20413 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
20414 (disable_packet_qfThreadInfo): Unconditionally compile.
20415 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
20416 * configure, config.in: Regenerate.
20417
20418 2008-07-28 Doug Kwan <dougkwan@google.com>
20419
20420 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
20421 (linux_write_memory): Remove declaration of errno.
20422
20423 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
20424
20425 * linux-low.c (handle_extended_wait): Do not use "status"
20426 variable uninitialized.
20427
20428 2008-07-07 Pedro Alves <pedro@codesourcery.com>
20429
20430 * server.c (handle_v_attach): Inhibit reporting dll changes.
20431
20432 2008-06-27 Pedro Alves <pedro@codesourcery.com>
20433
20434 * remote-utils.c (prepare_resume_reply): If requested, don't
20435 output "thread:TID" in the T stop reply.
20436
20437 * server.c (disable_packet_vCont, disable_packet_Tthread)
20438 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
20439 (handle_query): If requested, disable support for qC, qfThreadInfo
20440 and qsThreadInfo.
20441 (handle_v_requests): If requested, disable support for vCont.
20442 (gdbserver_show_disableable): New.
20443 (main): Handle --disable-packet and --disable-packet=LIST.
20444
20445 * server.h (disable_packet_vCont, disable_packet_Tthread)
20446 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
20447
20448 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
20449
20450 * server.c (gdbserver_usage): Mention --version.
20451
20452 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
20453
20454 * Makefile.in (gdbreplay.o): New rule.
20455
20456 2008-06-06 Joseph Myers <joseph@codesourcery.com>
20457
20458 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
20459 message, not gdbserver.
20460
20461 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
20462 Nathan Sidwell <nathan@codesourcery.com>
20463 Joseph Myers <joseph@codesourcery.com>
20464
20465 * acinclude.m4: Include ../../config/acx.m4.
20466 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
20467 * configure, config.in: Regenerate.
20468 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
20469 * server.c (gdbserver_version): Print PKGVERSION.
20470 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
20471 (main): Adjust gdbserver_usage calls.
20472 * gdbreplay.c (version, host_name): Add declarations.
20473 (gdbreplay_version, gdbreplay_usage): New.
20474 (main): Accept --version and --help options.
20475
20476 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
20477
20478 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
20479 (arm_breakpoint_at): Handle Thumb.
20480 (the_low_target): Add comment.
20481
20482 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
20483
20484 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
20485
20486 2008-05-09 Doug Evans <dje@google.com>
20487
20488 * server.h (decode_search_memory_packet): Declare.
20489 * remote-utils.c (decode_search_memory_packet): New fn.
20490 * server.c (handle_search_memory_1): New fn.
20491 (handle_search_memory): New fn.
20492 (handle_query): Process qSearch:memory packets.
20493
20494 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
20495
20496 * regcache.c (registers_length): Remove.
20497 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
20498 full register packet.
20499 * regcache.h (registers_length): Remove prototype.
20500 * server.h (PBUFSIZ): Define to 16384.
20501
20502 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
20503
20504 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
20505 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
20506 powerpc-64l.o, and powerpc-altivec64l.o.
20507 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
20508 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
20509 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
20510 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
20511 rs6000/power-linux.xml, and rs6000/power64-linux.xml
20512 to srv_xmlfiles.
20513
20514 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
20515 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
20516 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
20517 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
20518 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
20519 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
20520 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
20521 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
20522 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
20523 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
20524 (clean): Update.
20525
20526 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
20527 (init_registers_powerpc_32l): ... this new prototype.
20528 (init_registers_powerpc_32): Remove, replace by ...
20529 (init_registers_powerpc_altivec32l): ... this new prototype.
20530 (init_registers_powerpc_e500): Remove, replace by ...
20531 (init_registers_powerpc_e500l): ... this new prototype.
20532 (init_registers_ppc64): Remove, replace by ...
20533 (init_registers_powerpc_64l): ... this new prototype.
20534 (init_registers_powerpc_64): Remove, replace by ...
20535 (init_registers_powerpc_altivec64l): ... this new prototype.
20536 (ppc_num_regs): Set to 73.
20537 (PT_ORIG_R3, PT_TRAP): Define if necessary.
20538 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
20539 (ppc_cannot_store_register): Handle orig_r3 and trap.
20540 (ppc_arch_setup): Update init_registers_... calls.
20541 (ppc_fill_gregset): Handle orig_r3 and trap.
20542
20543 * inferiors.c (clear_inferiors): Reset current_inferior.
20544
20545 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
20546
20547 * acinclude.m4: Add override.m4.
20548 * configure: Regenerate.
20549
20550 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
20551
20552 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
20553 initial call to init_register_ppc64.
20554
20555 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
20556
20557 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
20558 single powerpc*-*-linux* case.
20559 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
20560
20561 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
20562
20563 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
20564 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
20565 from reg_xmlfiles.
20566 * linux-ppc-low.c: Include <elf.h>.
20567 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
20568 (ppc_hwcap): New global variable.
20569 (ppc_regmap): Remove __SPE__ #ifdef sections.
20570 (ppc_regmap_e500): New global variable.
20571 (ppc_cannot_store_register): Update __SPE__ special case.
20572 (ppc_get_hwcap): New function.
20573 (ppc_arch_setup): Use it to determine whether inferior supports
20574 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
20575 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
20576 Do not access registers if target does not support AltiVec.
20577 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
20578 Do not access registers if target does not support SPE.
20579 (target_regsets): Unconditionally include AltiVec and SPE regsets.
20580
20581 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
20582
20583 * linux-low.c (disabled_regsets, num_regsets): New.
20584 (use_regsets_p): Delete.
20585 (linux_wait_for_process): Clear disabled_regsets.
20586 (regsets_fetch_inferior_registers): Check and set it.
20587 (regsets_store_inferior_registers): Likewise.
20588 (linux_fetch_registers, linux_store_registers): Do not use
20589 use_regsets_p.
20590 (initialize_low): Allocate disabled_regsets.
20591
20592 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
20593
20594 * Makefile.in (LIBOBJS): New.
20595 (OBS): Use LIBOBJS.
20596 (memmem.o): New rule.
20597 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
20598 * configure: Regenerated.
20599
20600 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
20601
20602 * server.c (handle_query): Never return "unsupported" for
20603 qXfer:features:read queries.
20604
20605 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
20606
20607 * server.c (get_features_xml): Fix inverted condition.
20608 (handle_query): Always support qXfer:feature:read.
20609
20610 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
20611
20612 * server.c (wrapper_argv): New.
20613 (start_inferior): Handle wrapper_argv. If set, expect an extra
20614 trap.
20615 (gdbserver_usage): Document --wrapper.
20616 (main): Parse --wrapper.
20617
20618 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
20619
20620 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
20621 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
20622 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
20623 (ppc_set_pc): Likewise.
20624 (ppc_arch_setup): New function.
20625 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
20626 of collect_register.
20627 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
20628
20629 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
20630
20631 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
20632 instead of linux-ppc64-low.o.
20633 * linux-ppc64-low.c: Remove file.
20634 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
20635 (linux-ppc64-low.o): Remove rule.
20636
20637 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
20638 (init_registers_powerpc_64): Likewise.
20639 (ppc_regmap): Conditionally define depending on __powerpc64__.
20640 (ppc_cannot_store_register): Do not special-case "fpscr" when
20641 compiled on __powerpc64__.
20642 (ppc_collect_ptrace_register): New function.
20643 (ppc_supply_ptrace_register): New function.
20644 (ppc_breakpoint): Change type to "unsigned int".
20645 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
20646 (the_low_target): Conditionally provide initializers for the
20647 arch_setup member depending on __powerpc64__. Install
20648 collect_ptrace_register and supply_ptrace_register members.
20649
20650 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
20651
20652 * regcache.h (gdbserver_xmltarget): Add extern declaration.
20653 * server.c (gdbserver_xmltarget): Define.
20654 (get_features_xml): Use it to replace "target.xml" and arch_string.
20655
20656 * configure.srv: Remove srv_xmltarget. Add XML files that were
20657 mentioned there to srv_xmlfiles instead. Remove conditional tests
20658 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
20659 srv_xmlfiles and srv_regobj to include all possible choices.
20660 * configure.ac (srv_xmltarget): Remove.
20661 (srv_xmlfiles): Do not add "target.xml".
20662 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
20663 checks for supplementary target information.
20664 * configure: Regenerate.
20665 * Makefile.in (XML_TARGET): Remove.
20666 (target.xml): Remove rule.
20667 (clean): Do not clean up target.xml.
20668 (.PRECIOUS): Do not mention target.xml.
20669
20670 * target.h (struct target_ops): Remove arch_string member.
20671 * linux-low.c (linux_arch_string): Remove.
20672 (linux_target_ops): Remove arch_string initializer.
20673 * linux-low.h (struct linux_target_ops): Remove arch_string member.
20674 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
20675 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
20676 * spu-low.c (spu_arch_string): Remove.
20677 (spu_target_ops): Remove arch_string initializer.
20678 * win32-low.c (win32_arch_string): Remove.
20679 (win32_target_ops): Remove arch_string initializer.
20680 * win32-low.h (struct win32_target_ops): Remove arch_string member.
20681 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
20682 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
20683
20684 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
20685
20686 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
20687 by collect_ptrace_register and supply_ptrace_register hooks.
20688 * linux-low.c (fetch_register): Use supply_ptrace_register callback
20689 instead of checking for the_low_target.left_pad_xfer.
20690 (usr_store_inferior_registers): Use collect_ptrace_register callback
20691 instead of checking for the_low_target.left_pad_xfer.
20692
20693 * linux-s390-low.c (s390_collect_ptrace_register): New function.
20694 (s390_supply_ptrace_register): Likewise.
20695 (s390_fill_gregset): Call s390_collect_ptrace_register.
20696 (the_low_target): Update.
20697
20698 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
20699 (ppc_supply_ptrace_register): Likewise.
20700 (the_low_target): Update.
20701
20702 * linux-i386-low.c (the_low_target): Update.
20703 * linux-x86-64-low.c (the_low_target): Update.
20704
20705 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
20706
20707 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
20708 reg-s390.o and reg-s390x.o.
20709
20710 * linux-low.c (new_inferior): New global variable.
20711 (linux_create_inferior, linux_attach): Set it.
20712 (linux_wait_for_process): Call the_low_target.arch_setup after the
20713 target has stopped for the first time.
20714 (initialize_low): Do not call the_low_target.arch_setup.
20715
20716 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
20717 (s390_set_pc): Likewise.
20718 (s390_arch_setup): New function.
20719 (the_low_target): Use s390_arch_setup as arch_setup routine.
20720
20721 * regcache.c (realloc_register_cache): New function.
20722 (set_register_cache): Call it for each existing regcache.
20723
20724 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
20725
20726 * server.h (init_registers): Remove prototype.
20727
20728 * linux-low.h (struct linux_target_ops): Add arch_setup field.
20729 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
20730 instead of init_registers ().
20731 * linux-arm-low.c (init_registers_arm): Add prototype.
20732 (init_registers_arm_with_iwmmxt): Likewise.
20733 (the_low_target): Add initializer for arch_setup field.
20734 * linux-cris-low.c (init_registers_cris): Add prototype.
20735 (the_low_target): Add initializer for arch_setup field.
20736 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
20737 (the_low_target): Add initializer for arch_setup field.
20738 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
20739 (the_low_target): Add initializer for arch_setup field.
20740 * linux-ia64-low.c (init_registers_ia64): Add prototype.
20741 (the_low_target): Add initializer for arch_setup field.
20742 * linux-m32r-low.c (init_registers_m32r): Add prototype.
20743 (the_low_target): Add initializer for arch_setup field.
20744 * linux-m68k-low.c (init_registers_m68k): Add prototype.
20745 (the_low_target): Add initializer for arch_setup field.
20746 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
20747 (init_registers_mips64_linux): Likewise.
20748 (the_low_target): Add initializer for arch_setup field.
20749 * linux-ppc-low.c (init_registers_ppc): Add prototype.
20750 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
20751 (the_low_target): Add initializer for arch_setup field.
20752 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
20753 (init_registers_powerpc_64): Likewise.
20754 (the_low_target): Add initializer for arch_setup field.
20755 * linux-s390-low.c (init_registers_s390): Add prototype.
20756 (init_registers_s390x): Likewise.
20757 (the_low_target): Add initializer for arch_setup field.
20758 * linux-sh-low.c (init_registers_sh): Add prototype.
20759 (the_low_target): Add initializer for arch_setup field.
20760 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
20761 (the_low_target): Add initializer for arch_setup field.
20762 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
20763 (the_low_target): Add initializer for arch_setup field.
20764
20765 * win32-low.h (struct win32_target_ops): Add arch_setup field.
20766 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
20767 instead of init_registers ().
20768 * win32-arm-low.c (init_registers_arm): Add prototype.
20769 (the_low_target): Add initializer for arch_setup field.
20770 * win32-i386-low.c (init_registers_i386): Add prototype.
20771 (the_low_target): Add initializer for arch_setup field.
20772
20773 * spu-low.c (init_registers_spu): Add prototype.
20774 (initialize_low): Call initialie_registers_spu () instead of
20775 initialize_registers ().
20776
20777 2008-02-19 Pedro Alves <pedro@codesourcery.com>
20778
20779 * server.c (handle_v_requests): When handling the vRun and vAttach
20780 packets, if already debugging a process, don't kill it. Return an
20781 error instead.
20782
20783 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
20784
20785 * server.c (handle_query): Correct length check.
20786
20787 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
20788
20789 * win32-low.c (do_initial_child_stuff): Add process handle
20790 parameter. Set current_process_handle and current_process_id from the
20791 parameters. Clear globals.
20792 (win32_create_inferior): Don't set current_process_handle and
20793 current_process_id here. Instead pass them on the call to
20794 do_initial_child_stuff.
20795 (win32_attach): Likewise.
20796 (win32_clear_inferiors): New.
20797 (win32_kill): Don't close the current process handle or the
20798 current thread handle here. Instead call win32_clear_inferiors.
20799 (win32_detach): Don't open a new handle to the process. Call
20800 win32_clear_inferiors.
20801 (win32_join): Don't rely on current_process_handle; open a new
20802 handle using the process id.
20803 (win32_wait): Call win32_clear_inferiors when the inferior process
20804 has exited.
20805
20806 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
20807
20808 * server.c (monitor_show_help): Add "exit".
20809
20810 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
20811
20812 * Makefile.in (SFILES): Add linux-xtensa-low.c.
20813 (clean): Add reg-xtensa.c.
20814 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
20815 * configure.srv (xtensa*-*-linux*) New target.
20816 * linux-xtensa-low.c: New.
20817 * xtensa-xtregs.c: New.
20818
20819 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
20820
20821 * hostio.c: Don't include errno.h.
20822 (errno_to_fileio_errno): Move to hostio-errno.
20823 * hostio.c: (hostio_error): Remove the error parameter. Defer the
20824 error number outputting to the target->hostio_last_error callback.
20825 (hostio_packet_error): Use FILEIO_EINVAL directly.
20826 (handle_open, handle_pread, hostio_error, handle_unlink): Update
20827 calls to hostio_error.
20828 * hostio-errno.c: New.
20829 * server.h (hostio_last_error_from_errno): Declare.
20830 * target.h (target_ops): Add hostio_last_error member.
20831 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
20832 as hostio_last_error handler.
20833 * spu-low.c (spu_target_ops): Likewise.
20834 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
20835 (wince_hostio_last_error): New functions.
20836 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
20837 as hostio_last_error handler.
20838 (win32_target_ops) [!_WIN32_WCE]: Register
20839 hostio_last_error_from_errno as hostio_last_error handler.
20840 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
20841 (hostio-errno.o): New rule.
20842 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
20843 * configure.srv (srv_hostio_err_objs): New variable. Default to
20844 hostio-errno.o.
20845 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
20846 * configure: Regenerate.
20847
20848 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
20849
20850 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
20851 (linux_kill, linux_detach): Clean up the process list.
20852 * remote-utils.c (remote_open): Improve port number parsing.
20853 (putpkt_binary, input_interrupt): Only send interrupts if the target
20854 is running.
20855 * server.c (extended_protocol): Make static.
20856 (attached): Define earlier.
20857 (exit_requested, response_needed, program_argv): New variables.
20858 (target_running): New.
20859 (start_inferior): Clear attached here.
20860 (attach_inferior): Set attached here.
20861 (require_running): Define.
20862 (handle_query): Use require_running and target_running. Implement
20863 "monitor exit".
20864 (handle_v_attach, handle_v_run): New.
20865 (handle_v_requests): Use require_running. Handle vAttach and vRun.
20866 (gdbserver_usage): Update.
20867 (main): Redo argument parsing. Handle --debug and --multi. Handle
20868 --attach along with other options or after the port. Save
20869 program_argv. Support no initial program. Resynchronize
20870 communication with GDB after an error. Handle "monitor exit".
20871 Use require_running and target_running. Always allow the extended
20872 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
20873 restart in extended mode.
20874 * README: Refer to the GDB manual. Update --attach usage.
20875
20876 2007-12-20 Andreas Schwab <schwab@suse.de>
20877
20878 * linux-low.c (STACK_SIZE): Define.
20879 (linux_tracefork_child): Use it. Use __clone2 on ia64.
20880 (linux_test_for_tracefork): Likewise.
20881
20882 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
20883
20884 * linux-low.c (linux_wait_for_event): Update messages. Do not
20885 reinsert auto-delete breakpoints.
20886 * mem-break.c (struct breakpoint): Change return type of handler to
20887 int.
20888 (set_breakpoint_at): Update handler type.
20889 (reinsert_breakpoint_handler): Return 1 instead of calling
20890 delete_breakpoint.
20891 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
20892 setting a new one.
20893 (check_breakpoints): Delete auto-delete breakpoints and return 2.
20894 * mem-break.h (set_breakpoint_at): Update handler type.
20895 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
20896 * win32-low.c (auto_delete_breakpoint): New.
20897 (get_child_debug_event): Use it.
20898
20899 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
20900
20901 * configure.ac: Check for pread and pwrite.
20902 * hostio.c (handle_pread): Fall back to lseek and read.
20903 (handle_pwrite): Fall back to lseek and write.
20904 * config.in, configure: Regenerated.
20905
20906 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
20907
20908 * server.c (myresume): Add own_buf argument.
20909 (main): Update calls.
20910
20911 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
20912
20913 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
20914 * remote-utils.c (remote_open): Do not call disable_async_io.
20915 (block_async_io): Delete.
20916 (unblock_async_io): Make static.
20917 (initialize_async_io): New.
20918 * server.c (handle_v_cont): Handle async I/O here.
20919 (myresume): Likewise. Move other common resume tasks here...
20920 (main): ... from here. Call initialize_async_io. Disable async
20921 I/O before the main loop.
20922 * server.h (initialize_async_io): Declare.
20923 (block_async_io, unblock_async_io): Delete prototypes.
20924 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
20925
20926 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
20927
20928 * remote-utils.c (readchar): Allow binary data in received messages.
20929
20930 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20931
20932 * win32-low.c (attaching): New global.
20933 (win32_create_inferior): Clear the `attaching' global.
20934 (win32_attach): Set the `attaching' global.
20935 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
20936 attaching. Only set a breakpoint at the entry point if not
20937 attaching.
20938
20939 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20940
20941 * server.c (main): Don't report dll events on the initial
20942 connection on attaches.
20943
20944 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20945
20946 * server.c (main): Relax numerical bases supported for the pid of
20947 the --attach command line argument.
20948
20949 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20950
20951 * win32-low.c (win32_attach): Call OpenProcess before
20952 DebugActiveProcess, not after. Add last error output to error
20953 call.
20954
20955 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20956
20957 * win32-low.c (win32_get_thread_context)
20958 (win32_set_thread_context): New functions.
20959 (thread_rec): Use win32_get_thread_context.
20960 (continue_one_thread, win32_resume): Use win32_set_thread_context.
20961 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
20962 field.
20963
20964 2007-12-03 Leo Zayas
20965 Pedro Alves <pedro_alves@portugalmail.pt>
20966
20967 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
20968 global variables.
20969 (child_add_thread): Minor cleanup.
20970 (child_continue): Resume artificially suspended threads before
20971 calling ContinueDebugEvent.
20972 (suspend_one_thread): New.
20973 (fake_breakpoint_event): New.
20974 (get_child_debug_event): Change return type to int. Check here if
20975 gdb sent an interrupt request. If a soft interrupt was requested,
20976 fake a breakpoint event. Return 0 if there is no event to handle,
20977 and 1 otherwise.
20978 (win32_wait): Don't check here if gdb sent an interrupt request.
20979 Ensure there is a valid event to handle.
20980 (win32_request_interrupt): Add soft interruption method as last
20981 resort.
20982
20983 2007-12-03 Leo Zayas
20984 Pedro Alves <pedro_alves@portugalmail.pt>
20985
20986 * win32-low.h (win32_thread_info): Add descriptions to the
20987 structure members. Replace `suspend_count' counter by a
20988 `suspended' flag.
20989 * win32-low.c (thread_rec): Update condition of when to get the
20990 context from the inferior. Rely on ContextFlags being set if it
20991 has already been retrieved. Only suspend the inferior thread if
20992 we haven't already. Warn if that fails.
20993 (continue_one_thread): s/suspend_count/suspended/. Only call
20994 ResumeThread once. Warn if that fails.
20995
20996 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
20997
20998 * win32-low.c (win32_wait): Don't read from the inferior when it
20999 has already exited.
21000
21001 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
21002
21003 * Makefile.in (win32_low_h): New variable.
21004 (win32-low.o): Add dependency on $(win32_low_h).
21005 (win32-arm-low.o, win32-i386-low.o): New rules.
21006
21007 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
21008
21009 * hostio.c: Correct copyright year.
21010
21011 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
21012
21013 * Makefile.in (OBS): Add hostio.o.
21014 (hostio.o): New rule.
21015 * server.h (handle_vFile): Declare.
21016 * hostio.c: New file.
21017 * server.c (handle_v_requests): Take packet_len and new_packet_len
21018 for binary packets. Call handle_vFile.
21019 (main): Update call to handle_v_requests.
21020
21021 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
21022
21023 * linux-low.c: Include <sched.h>.
21024
21025 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
21026
21027 * linux-low.c (linux_tracefork_grandchild): New.
21028 (linux_tracefork_child): Use clone.
21029 (linux_test_for_tracefork): Use clone; allocate and free a stack.
21030
21031 2007-10-31 Joel Brobecker <brobecker@adacore.com>
21032
21033 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
21034
21035 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
21036
21037 * linux-low.c (handle_extended_wait): Handle unexpected signals.
21038
21039 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
21040
21041 * inferiors.c (change_inferior_id): Delete.
21042 (add_pid_to_list, pull_pid_from_list): New.
21043 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
21044 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
21045 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
21046 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
21047 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
21048 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
21049 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
21050 (using_threads): Always set to 1.
21051 (handle_extended_wait): New.
21052 (add_process): Do not set TID.
21053 (linux_create_inferior): Set must_set_ptrace_flags.
21054 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
21055 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
21056 (linux_thread_alive): Rename TID argument to LWPID.
21057 (linux_wait_for_process): Handle unknown processes. Do not use TID.
21058 (linux_wait_for_event): Do not use TID or check using_threads. Update
21059 call to dead_thread_notify. Call handle_extended_wait.
21060 (linux_create_inferior): Use PTRACE_SETOPTIONS.
21061 (send_sigstop): Delete sigstop_sent.
21062 (wait_for_sigstop): Avoid TID.
21063 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
21064 (linux_test_for_tracefork): New.
21065 (linux_lookup_signals): Use thread_db_active and
21066 linux_supports_tracefork_flag.
21067 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
21068 * linux-low.h (get_process_thread): Avoid TID.
21069 (struct process_ifo): Move thread_known and tid to the end. Remove
21070 sigstop_sent.
21071 (linux_attach_lwp, thread_db_init): Update prototypes.
21072 * server.h (change_inferior_id): Delete prototype.
21073 (add_pid_to_list, pull_pid_from_list): New prototypes.
21074 * thread-db.c (thread_db_use_events): New.
21075 (find_first_thread): Rename to...
21076 (find_one_thread): ...this. Update callers and messages. Do not
21077 call fatal. Check thread_db_use_events. Do not call
21078 change_inferior_id or new_thread_notify.
21079 (maybe_attach_thread): Update. Do not call new_thread_notify.
21080 (thread_db_init): Set thread_db_use_events. Check use_events.
21081 * utils.c (fatal, warning): Correct message prefix.
21082
21083 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
21084
21085 * Makefile.in (clean): Remove new files.
21086 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
21087 (powerpc-64.o, powerpc-64.c): New rules.
21088 * configure.srv: Use alternate register sets for powerpc64-*-linux*
21089 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
21090 with SPE.
21091 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
21092 SPE targets.
21093 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
21094 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
21095 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
21096 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
21097 (target_regsets): Add AltiVec and SPE register sets.
21098 * configure.ac: Check for AltiVec and SPE.
21099 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
21100 (ppc_fill_vrregset, ppc_store_vrregset): New.
21101 (target_regsets): Add AltiVec register set.
21102 * configure: Regenerated.
21103
21104 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
21105
21106 * linux-low.c (O_LARGEFILE): Define.
21107 (linux_read_memory): Use /proc/PID/mem.
21108 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
21109 * configure, config.in: Regenerated.
21110
21111 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
21112
21113 * linux-low.c (linux_wait_for_event): Do not pass signals while
21114 single-stepping.
21115
21116 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
21117
21118 * win32-low.c (create_process): New.
21119 (win32_create_inferior): Use create_process instead of
21120 CreateProcess. If create_process failed retry appending an ".exe"
21121 suffix. Store the GetLastError result immediatelly after
21122 create_process calls and use it on the call to error.
21123
21124 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
21125
21126 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
21127
21128 2007-08-23 Joel Brobecker <brobecker@adacore.com>
21129
21130 * configure.ac: Switch license to GPLv3.
21131
21132 2007-08-01 Michael Snyder <msnyder@access-company.com>
21133
21134 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
21135
21136 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
21137
21138 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
21139 typedef.
21140 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
21141 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
21142 CloseToolhelp32Snapshot.
21143 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
21144 CloseToolhelp32Snapshot.
21145
21146 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
21147
21148 * server.c (main): Check for inferior exit before main loop.
21149
21150 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
21151
21152 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
21153 instead of on tmp_desc.
21154
21155 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
21156 Daniel Jacobowitz <dan@codesourcery.com>
21157
21158 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
21159 (add_thread): Minor cleanups.
21160 (clear_inferiors): Move lower in the file. Clear the DLL
21161 list.
21162 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
21163 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
21164 (xml_escape_text): New.
21165 * server.c (handle_query): Handle qXfer:libraries:read. Report it
21166 for qSupported.
21167 (handle_v_cont): Report errors.
21168 (gdbserver_version): Update.
21169 (main): Correct size of own_buf. Do not report initial DLL events.
21170 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
21171 (unloaded_dll, xml_escape_text): New.
21172 * win32-low.c (enum target_waitkind): Update comments.
21173 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
21174 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
21175 (win32_EnumProcessModules, win32_GetModuleInformation)
21176 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
21177 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
21178 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
21179 (win32_Module32First, win32_Module32Next, load_toolhelp)
21180 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
21181 (get_child_debug_event): Handle DLL events.
21182 (win32_wait): Likewise.
21183
21184 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
21185
21186 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
21187 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
21188
21189 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
21190
21191 * win32-low.c (handle_output_debug_string): Ignore event if not
21192 waiting.
21193
21194 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
21195
21196 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
21197
21198 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
21199
21200 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
21201
21202 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
21203
21204 * inferiors.c (change_inferior_id): Add comment.
21205 * linux-low.c (check_removed_breakpoint): Add an early
21206 prototype. Improve debug output.
21207 (linux_attach): Doc update.
21208 (linux_detach_one_process, linux_detach): Clean up before releasing
21209 each process.
21210 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
21211 * linux-low.h (struct process_info): Doc improvement.
21212 * mem-break.c (delete_all_breakpoints): New.
21213 * mem-break.h (delete_all_breakpoints): New prototype.
21214 * thread-db.c (find_first_thread): New.
21215 (thread_db_create_event): Call it instead of
21216 thread_db_find_new_threads. Clean up unused variables.
21217 (maybe_attach_thread): Remove first thread handling.
21218 (thread_db_find_new_threads): Use find_first_thread.
21219 (thread_db_get_tls_address): Likewise.
21220
21221 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
21222
21223 * thread-db.c (thread_db_find_new_threads): Add prototype.
21224 (thread_db_create_event): Check for the main thread before adding
21225 a new thread.
21226 (maybe_attach_thread): Only enable event reporting if TID == 0.
21227 (thread_db_get_tls_address): Check for new threads.
21228
21229 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
21230
21231 * linux-low.c (linux_create_inferior): Try execv before execvp.
21232 * spu-low.c (spu_create_inferior): Likewise.
21233
21234 2007-06-13 Mike Frysinger <vapier@gentoo.org>
21235
21236 * linux-low.c (linux_create_inferior): Change execv to execvp.
21237 * spu-low.c (spu_create_inferior): Likewies.
21238
21239 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
21240
21241 * Makefile.in (clean): Clean new files instead of deleted ones.
21242 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
21243 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
21244 rules.
21245 * configure.srv: Specify XML files and new regformats for MIPS and
21246 MIPS64 GNU/Linux.
21247 * linux-mips-low.c (mips_num_regs): Set to only used registers.
21248 (mips_regmap): Do not fetch $0. Remove unused registers. Add
21249 an entry for the restart register.
21250 (mips_cannot_fetch_register, mips_cannot_store_register)
21251 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
21252 register names to match the XML descriptions.
21253 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
21254 restart register instead of $0.
21255
21256 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
21257 Markus Deuling <deuling@de.ibm.com>
21258
21259 * remote-utils.c (decode_xfer_write): New function.
21260 * server.h (decode_xfer_write): Add prototype.
21261 * server.c (handle_query): Add PACKET_LEN argument. Support
21262 qXfer:spu:read and qXfer:spu:write packets.
21263 (main): Pass packet_len to handle_query.
21264 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
21265 * target.h (target_ops): Add qxfer_spu.
21266
21267 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
21268
21269 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
21270 accessing non-seekable spufs files.
21271
21272 2007-05-16 Markus Deuling <deuling@de.ibm.com>
21273
21274 * server.c (handle_query): Add reply for qC packet.
21275
21276 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
21277 Leo Zayas <lerele@champenstudios@com>
21278
21279 * server.h (check_remote_input_interrupt_request): New function.
21280 * remote_utils.c (INVALID_DESCRIPTOR): New define.
21281 (remote_desc): Initialize with INVALID_DESCRIPTOR.
21282 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
21283 (check_remote_input_interrupt_request): New function.
21284 * server.h (check_remote_input_interrupt_request): Declare.
21285 * win32-low.c (winapi_DebugBreakProcess,
21286 winapi_GenerateConsoleCtrlEvent): New typedefs.
21287 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
21288 to 250 ms.
21289 (win32_wait): Check for remote interrupt request
21290 with check_remote_input_interrupt_request.
21291 (win32_request_interrupt): New function.
21292 (win32_target_op): Set request_interrupt to win32_request_interrupt.
21293
21294 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
21295
21296 * win32-low.c (debug_registers_changed,
21297 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
21298 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
21299 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
21300 (thread_rec): Get context using the low target.
21301 (child_add_thread): Call thread_added on the low target,
21302 which does the same thing.
21303 (regptr): Delete.
21304 (do_initial_child_stuff): Remove debug registers references.
21305 Set context using the low target. Resume threads after
21306 setting the contexts.
21307 (child_continue): Remove dead variable. Remove debug
21308 registers references.
21309 (child_fetch_inferior_registers): Go through the low target.
21310 (do_child_store_inferior_registers): Remove.
21311 (child_store_inferior_registers): Go through the low target.
21312 (win32_resume): Remove debug registers references.
21313 Set context using the low target.
21314 (handle_exception): Change return type to void. Don't record
21315 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
21316 first chance exception.
21317 (get_child_debug_event): Change return type to void. Remove
21318 goto loop. Always return after waiting for debug event.
21319 (win32_wait): Convert to switch statement. Handle spurious
21320 events.
21321
21322 * win32-i386-low.c (debug_registers_changed,
21323 debug_registers_used): New.
21324 (initial_stuff): Rename to ...
21325 (i386_initial_stuff): ... this. Clear debug registers
21326 state variables.
21327 (store_debug_registers): Delete.
21328 (i386_get_thread_context): New.
21329 (load_debug_registers): Delete.
21330 (i386_set_thread_context): New.
21331 (i386_thread_added): New.
21332 (single_step): Rename to ...
21333 (i386_single_step): ... this.
21334 (do_fetch_inferior_registers): Rename to ...
21335 (i386_fetch_inferior_register): ... this.
21336 (i386_store_inferior_register): New.
21337 (the_low_target): Adapt to new interface.
21338
21339 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
21340 (arm_get_thread_context): New.
21341 (arm_set_thread_context): New.
21342 (regptr): New.
21343 (do_fetch_inferior_registers): Rename to ...
21344 (arm_fetch_inferior_register): ... this.
21345 (arm_store_inferior_register): New.
21346 (arm_wince_breakpoint): Reimplement as unsigned long.
21347 (arm_wince_breakpoint_len): Define.
21348 (the_low_target): Adapt to new interface.
21349
21350 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
21351 load_debug_registers. Add get_thread_context, set_thread_context,
21352 thread_added and store_inferior_register. Rename
21353 fetch_inferior_registers to fetch_inferior_register.
21354 (regptr): Remove declaration.
21355
21356 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
21357
21358 * linux-low.c (linux_detach): Change return type to int. Return 0.
21359 * spu-low.c (spu_detach): Likewise.
21360
21361 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
21362
21363 * target.h (target_ops): Change return type of detach to int.
21364 Add join.
21365 (join_inferior): New.
21366 * server.c (main): Don't skip detach support on mingw32.
21367 If the inferior doesn't support detaching return error.
21368 Call join_inferior instead of using waitpid.
21369 * linux-low.c (linux_join): New.
21370 (linux_target_op): Add linux_join.
21371 * spu-low.c (spu_join): New.
21372 (spu_target_ops): Add spu_join.
21373 * win32-low.c (win32_detach): Adapt to new interface.
21374 Reopen current_process_handle before detaching. Issue a child
21375 resume before detaching.
21376 (win32_join): New.
21377 (win32_target_op): Add win32_join.
21378
21379 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
21380
21381 * win32-low.c (win32-attach): Fix return value.
21382 * target.h (target_ops): Describe ATTACH return values.
21383
21384 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
21385
21386 * win32-low.c (GETPROCADDRESS): Define.
21387 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
21388 (winapi_DebugSetProcessKillOnExit): Likewise.
21389 (win32_create_inferior): Force usage of ansi CreateProcessA.
21390 (win32_attach): Use GETPROCADDRESS.
21391 (win32_detach): Likewise.
21392
21393 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
21394
21395 * win32-low.c (win32_wait): Don't use WSTOPSIG.
21396
21397 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
21398
21399 * win32-low.c: Commit leftover changes from 2007-03-29.
21400
21401 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
21402
21403 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
21404 fields short instead of int. Add explicit padding.
21405 (i387_cache_to_fsave): Remove unnecessary casts.
21406 (i387_fsave_to_cache): Doc fix.
21407 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
21408
21409 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
21410
21411 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
21412 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
21413
21414 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
21415
21416 * configure.srv (arm*-*-mingw32ce*): Move near the other
21417 arm targets.
21418
21419 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
21420
21421 * configure.ac: Add errno checking.
21422 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
21423 sys/file.h and malloc.h.
21424 (AC_CHECK_DECLS): Add perror.
21425 (srv_mingwce): Handle.
21426 * configure.srv (i[34567]86-*-cygwin*): Add
21427 win32-i386-low.o to srv_tgtobj.
21428 (i[34567]86-*-mingw*): Likewise.
21429 (arm*-*-mingw32ce*): Add case.
21430 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
21431 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
21432 [__MINGW32CE__] (strerror): New function.
21433 [__MINGW32CE__] (errno): Define to GetLastError.
21434 [__MINGW32CE__] (COUNTOF): New macro.
21435 (remote_open): Remove extra close call.
21436 * mem-break.c (delete_breakpoint_at): New function.
21437 * mem-break.h (delete_breakpoint_at): Declare.
21438 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
21439 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
21440 [USE_WIN32API] (read, write): Add char* casts.
21441 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
21442 * server.h: Include wincecompat.h on Windows CE.
21443 [HAVE_ERRNO_H]: Check.
21444 (perror): Declare if not declared.
21445 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
21446 (perror_with_name): Remove errno declaration.
21447 * wincecompat.h: New.
21448 * wincecompat.c: New.
21449 * win32-low.h: New.
21450 * win32-arm-low.c: New.
21451 * win32-i386-low.c: New.
21452 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
21453 (OUTMSG2): Make it safe.
21454 (_T): New macro.
21455 (COUNTOF): New macro.
21456 (NUM_REGS): Get it from the low target.
21457 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
21458 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
21459 (thread_rec): Let low target handle debug registers.
21460 (child_add_thread): Likewise.
21461 (child_init_thread_list): Likewise.
21462 (continue_one_thread): Likewise.
21463 (regptr): New.
21464 (do_child_fetch_inferior_registers): Move to ...
21465 * win32-i386-low.c: ... here, and rename to ...
21466 (do_fetch_inferior_registers): ... this.
21467 * win32-low.c (child_fetch_inferior_registers):
21468 Go through the low target.
21469 (do_child_store_inferior_registers): Use regptr.
21470 (strwinerror): New function.
21471 (win32_create_inferior): Handle Windows CE.
21472 Use strwinerror instead of strerror on Windows error
21473 codes. Add program to the error output.
21474 Don't close the main thread handle on Windows CE.
21475 (win32_attach): Use coredll.dll on Windows CE.
21476 (win32_kill): Close current process and current
21477 thread handles.
21478 (win32_detach): Use coredll.dll on Windows CE.
21479 (win32_resume): Let low target handle debug registers, and
21480 step request.
21481 (handle_exception): Add/Remove initial breakpoint. Avoid
21482 non-existant WSTOPSIG on Windows CE.
21483 (win32_read_inferior_memory): Cast to remove warning.
21484 (win32_arch_string): Go through the low target.
21485 (initialize_low): Call set_breakpoint_data with the low
21486 target's breakpoint.
21487 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
21488 FOP_REGNUM, mappings): Move to ...
21489 * win32-i386-low.c: ... here.
21490 * win32-low.c (win32_thread_info): Move to ...
21491 * win32-low.h: ... here.
21492 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
21493 win32-arm-low.c and wincecompat.c.
21494 (all:): Add $EXEEXT.
21495 (install-only:): Likewise.
21496 (gdbserver:): Likewise.
21497 (gdbreplay:): Likewise.
21498 * config.in: Regenerate.
21499 * configure: Regenerate.
21500
21501 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
21502
21503 * win32-low.c: Rename typedef thread_info to
21504 win32_thread_info throughout.
21505
21506 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
21507
21508 * win32-i386-low.c: Rename to ...
21509 * win32-low.c: ... this.
21510 * configure.srv: Replace win32-i386-low.o with win32-low.o.
21511 * Makefile.in: Likewise.
21512
21513 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
21514
21515 * remote-utils.c (monitor_output): Constify msg parameter.
21516 * server.h (monitor_output): Likewise.
21517 * win32-i386-low.c (handle_output_debug_string): New.
21518 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
21519 handle_output_debug_string.
21520 (get_child_debug_event): Likewise.
21521
21522 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
21523
21524 * server.c (main): Correct strtoul check.
21525
21526 2007-03-27 Jon Ringle <jon@ringle.org>
21527
21528 * linux-low.c: Check __ARCH_HAS_MMU__ also.
21529
21530 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
21531
21532 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
21533
21534 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
21535
21536 * terminal.h: Check HAVE_SGTTY_H.
21537
21538 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
21539
21540 * remote-utils.c (remote_open): Print out the assigned port number.
21541
21542 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
21543
21544 * remote-utils.c (monitor_output): New function.
21545 * server.c (debug_threads): Define here.
21546 (monitor_show_help): New function.
21547 (handle_query): Handle qRcmd.
21548 (main): Do not handle 'd' packet.
21549 * server.h (debug_threads, remote_debug, monitor_output): Declare.
21550 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
21551 of debug_threads.
21552
21553 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
21554
21555 * Makefile.in (EXEEXT): New.
21556 (clean): Use $(EXEEXT).
21557
21558 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
21559
21560 * target.h (target_ops): Rename send_signal to request_interrupt,
21561 and remove enum target_signal parameter.
21562 * linux-low.c (linux_request_interrupt): Rename from
21563 linux_send_signal, and always send SIGINT.
21564 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
21565 and always send SIGINT.
21566 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
21567 of send_signal.
21568 (input_interrupt): Likewise.
21569
21570 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
21571
21572 * server.c (get_features_xml): Check if target implemented
21573 arch_string.
21574 * win32-i386-low.c (win32_arch_string): New.
21575 (win32_target_ops): Add win32_arch_string as arch_string member.
21576
21577 2007-02-22 Markus Deuling <deuling@de.ibm.com>
21578
21579 * spu-low.c (spu_arch_string): New.
21580 (spu_target_ops): Add spu_arch_string.
21581
21582 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
21583
21584 * remote-utils.c: Remove HAVE_TERMINAL_H check.
21585 * configure.ac: Do not check for terminal.h.
21586 * configure, config.in: Regenerated.
21587
21588 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
21589
21590 * Makefile.in (OBS): Add $(XML_BUILTIN).
21591 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
21592 (clean): Update.
21593 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
21594 (arm-with-iwmmxt.c): New.
21595 * config.in, configure: Regenerate.
21596 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
21597 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
21598 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
21599 (arm*-*-linux*): Add iWMMXt and regset support.
21600 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
21601 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
21602 (arm_store_wmmxregset, target_regsets): New.
21603 * server.c (get_features_xml): Take annex argument. Check builtin
21604 XML documents.
21605 (handle_query): Handle multiple annexes.
21606
21607 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
21608
21609 * remote-utils.c [USE_WIN32API] (read, write): Define.
21610 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
21611 write.
21612
21613 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
21614
21615 * linux-i386-low.c (the_low_target): Set arch_string.
21616 * linux-x86-64-low.c (the_low_target): Likewise.
21617 * linux-low.c (linux_arch_string): New.
21618 (linux_target_ops): Add it.
21619 * linux-low.h (struct linux_target_ops): Add arch_string.
21620 * server.c (write_qxfer_response): Use const void * for DATA.
21621 (get_features_xml): New.
21622 (handle_query): Handle qXfer:features:read. Report it for qSupported.
21623 * target.h (struct target_ops): Add arch_string method.
21624
21625 2007-01-03 Denis Pilat <denis.pilat@st.com>
21626 Daniel Jacobowitz <dan@codesourcery.com>
21627
21628 * linux-low.c (linux_kill): Handle being called with no threads.
21629 * win32-i386-low.c (win32_kill): Likewise.
21630 (get_child_debug_event): Clear current_process_handle.
21631
21632 2006-12-30 Denis PILAT <denis.pilat@st.com>
21633 Daniel Jacobowitz <dan@codesourcery.com>
21634
21635 * remote-utils.c (remote_open): Check the type of specified
21636 serial port devices before opening them.
21637 * server.c (main): Kill the inferior if an error occurs during
21638 the first remote_open.
21639
21640 2006-12-05 Markus Deuling <deuling@de.ibm.com>
21641
21642 * README: Update supported targets.
21643
21644 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
21645
21646 * Makefile.in (clean): Remove reg-mips64.c.
21647 (reg-mips64.c, reg-mips64.o): New rules.
21648 * configure.srv: Handle mips64. Include regset support for mips.
21649 * linux-mips-low.c (union mips_register): New.
21650 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
21651 (mips_breakpoint, mips_breakpoint_at): Use int.
21652 (mips_collect_register, mips_supply_register)
21653 (mips_collect_register_32bit, mips_supply_register_32bit)
21654 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
21655 (mips_store_fpregset, target_regsets): New.
21656 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
21657
21658 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
21659
21660 * configure.srv: Add target "spu*-*-*".
21661 * Makefile.in (clean): Remove reg-spu.c.
21662 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
21663 * spu-low.c: New file.
21664
21665 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
21666
21667 * configure.ac: Correct td_thr_tls_get_addr test.
21668 * configure: Regenerated.
21669
21670 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
21671
21672 * linux-low.c (linux_wait_for_event): Reformat. Use the
21673 pass_signals array.
21674 * remote-utils.c (decode_address_to_semicolon): New.
21675 * server.c (pass_signals, handle_general_set): New.
21676 (handle_query): Mention QPassSignals for qSupported.
21677 (main): Call handle_general_set.
21678 * server.h (pass_signals, decode_address_to_semicolon): New.
21679
21680 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
21681
21682 * server.c (handle_query): Correct error handling for read_auxv.
21683
21684 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
21685
21686 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
21687 and srv_linux_thread_db to yes.
21688 * linux-s390-low.c (s390_fill_gregset): New function.
21689 (target_regsets): Define data structure.
21690
21691 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
21692
21693 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
21694 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
21695 * config.in, configure: Regenerated.
21696 * inferiors.c (gdb_id_to_thread): New function.
21697 (gdb_id_to_thread_id): Use it.
21698 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
21699 * linux-low.h (struct process_info): Add th member.
21700 (thread_db_get_tls_address): New prototype.
21701 * remote-utils.c (decode_address): Make non-static.
21702 * server.c (handle_query): Handle qGetTLSAddr.
21703 * server.h (gdb_id_to_thread, decode_address): New prototypes.
21704 * target.h (struct target_ops): Add get_tls_address.
21705 * thread-db.c (maybe_attach_thread): Save the thread handle.
21706 (thread_db_get_tls_address): New.
21707
21708 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
21709
21710 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
21711 (linux_resume_one_process): Take a siginfo_t *. Update all
21712 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
21713 (struct pending_signals): Add a siginfo_t.
21714 (linux_wait_for_process): Always set last_status.
21715 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
21716 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
21717 * linux-low.h (struct process_info): Add last_status.
21718
21719 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
21720
21721 * remote-utils.c (try_rle): New function.
21722 (putpkt_binary): Use it.
21723
21724 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
21725
21726 * Makefile.in (clean): Clean reg-x86-64-linux.c.
21727 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
21728 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
21729 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
21730 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
21731 point registers.
21732
21733 2006-08-08 Richard Sandiford <richard@codesourcery.com>
21734
21735 * server.c (terminal_fd): New variable.
21736 (old_foreground_pgrp): Likewise.
21737 (restore_old_foreground_pgrp): New function.
21738 (start_inferior): Record the terminal file descriptor in terminal_fd
21739 and its original foreground group in old_foreground_pgrp. Register
21740 restore_old_foreground_pgrp with atexit().
21741
21742 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
21743
21744 * server.c (handle_query): Correct qPart to qXfer.
21745
21746 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
21747
21748 * configure.ac: Check for more headers which are missing on
21749 Windows. Automatically supply -lwsock32 and USE_WIN32API.
21750 * configure.srv: Add Cygwin and mingw32.
21751 * remote-utils.c: Don't include headers unconditionally which
21752 are missing on mingw32. Include <winsock.h> for mingw32.
21753 (remote_open): Adjust for mingw32 support. Flush
21754 standard error after writing to it.
21755 (remote_close, putpkt_binary, input_interrupt, block_async_io)
21756 (unblock_async_io, enable_async_io, disable_async_io)
21757 (readchar, getpkt): Update for Winsock support.
21758 (prepare_resume_reply): Expect a protocol signal number.
21759 * server.c: Disable <sys/wait.h> on mingw32.
21760 (start_inferior): Adjust for mingw32 support. Flush
21761 standard error after writing to it.
21762 (attach_inferior): Likewise. Use protocol signal
21763 numbers.
21764 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
21765 and names.
21766 * win32-i386-low.c: New file.
21767 * Makefile.in (XM_CLIBS): Set.
21768 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
21769 (win32-i386-low.o): New dependency rule.
21770 * linux-low.c (linux_wait): Use target signal numbers.
21771 * target.h (struct target_ops): Doc fix.
21772 * server.h (target_signal_to_name): New prototype.
21773 * gdbreplay.c: Don't include headers unconditionally which
21774 are missing on mingw32. Include <winsock.h> for mingw32.
21775 (remote_close, remote_open): Adjust for Winsock support.
21776 * configure, config.in: Regenerated.
21777
21778 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
21779
21780 * server.c (decode_xfer_read, write_qxfer_response): New.
21781 (handle_query): Take a packet length argument. Handle
21782 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
21783 the qSupported response.
21784 (main): Update call to handle_query.
21785
21786 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
21787
21788 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
21789 (putpkt_binary): Renamed from putpkt and adjusted for binary
21790 data.
21791 (putpkt): New wrapper for putpkt_binary.
21792 (readchar): Don't mask off the high bit.
21793 (decode_X_packet): New function.
21794 * server.c (main): Call putpkt_binary if a handler sets the packet
21795 length. Save the length of the incoming packet. Handle 'X'.
21796 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
21797
21798 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
21799
21800 * server.c (handle_query): Handle qSupported.
21801
21802 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
21803
21804 * remote-utils.c (all_symbols_looked_up): New variable.
21805 (look_up_one_symbol): Check it.
21806 * server.h (look_up_one_symbol): New declaration.
21807 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
21808
21809 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
21810
21811 * Makefile.in (linux-arm-low.o): Update dependencies.
21812 * linux-arm-low.c: Include "gdb_proc_service.h".
21813 (PTRACE_GET_THREAD_AREA): Define.
21814 (ps_get_thread_area): New function.
21815
21816 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
21817
21818 * configure.srv (m68k*-*-uclinux*): New target.
21819 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
21820 (linux_resume_one_process): Remove extraneous cast.
21821 (linux_read_offsets): New.
21822 (linux_target_op): Add linux_read_offsets on mmuless systems.
21823 * server.c (handle_query): Add qOffsets logic.
21824 * target.h (struct target_ops): Add read_offsets.
21825
21826 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
21827
21828 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
21829 (PTRACE_GET_THREAD_AREA): Define.
21830 (ps_get_thread_area): New function.
21831 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
21832 (linux-x86-64-low.o): Update.
21833
21834 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
21835
21836 * configure.ac: Remove checks for prfpregset_t.
21837 * gdb_proc_service.h: New file.
21838 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
21839 new "gdb_proc_service.h".
21840 * proc-service.c: Likewise.
21841 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
21842 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
21843 * Makefile.in (gdb_proc_service_h): Updated.
21844 * configure, config.in: Regenerated.
21845
21846 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
21847
21848 * remote-utils.c (prepare_resume_reply): Move declaration
21849 of gdb_id_from_wait to the top of the block.
21850
21851 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
21852
21853 * linux-low.c (regsets_store_inferior_registers): Read the regset
21854 from the target before filling it.
21855
21856 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
21857
21858 * server.c (attach_inferior): Return SIGTRAP for a successful
21859 attach.
21860
21861 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
21862
21863 * Makefile.in (OBS): Add version.o.
21864 (STAGESTUFF): Delete.
21865 (version.o): Add dependencies.
21866 (version.c): Replace rule.
21867 (clean): Remove version.c.
21868 * server.c (gdbserver_version): New.
21869 (gdbserver_usage): Use printf.
21870 (main): Handle --version and --help.
21871 * server.h (version, host_name): Add declarations.
21872
21873 2005-12-23 Eli Zaretskii <eliz@gnu.org>
21874
21875 * linux-arm-low.c:
21876 * linux-arm-low.c:
21877 * inferiors.c:
21878 * i387-fp.h:
21879 * i387-fp.c:
21880 * gdbreplay.c:
21881 * regcache.c:
21882 * proc-service.c:
21883 * mem-break.h:
21884 * mem-break.c:
21885 * linux-x86-64-low.c:
21886 * linux-sh-low.c:
21887 * linux-s390-low.c:
21888 * linux-ppc64-low.c:
21889 * linux-ppc-low.c:
21890 * linux-mips-low.c:
21891 * linux-m68k-low.c:
21892 * linux-m32r-low.c:
21893 * linux-low.h:
21894 * linux-low.c:
21895 * linux-ia64-low.c:
21896 * linux-i386-low.c:
21897 * linux-crisv32-low.c:
21898 * thread-db.c:
21899 * terminal.h:
21900 * target.h:
21901 * target.c:
21902 * server.h:
21903 * server.c:
21904 * remote-utils.c:
21905 * regcache.h:
21906 * utils.c:
21907 * Makefile.in:
21908 * configure.ac:
21909 * gdbserver.1: Add (C) after Copyright. Update the FSF
21910 address.
21911
21912 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
21913
21914 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
21915 (arm_breakpoint_at): Recognize both breakpoints.
21916 (the_low_target): Use the correct breakpoint instruction.
21917
21918 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
21919
21920 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
21921 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
21922 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
21923 (the_low_target): Update.
21924
21925 2005-10-25 Andreas Schwab <schwab@suse.de>
21926
21927 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
21928
21929 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
21930 (ia64_num_regs): Reduce to 462.
21931
21932 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
21933
21934 * acinclude.m4: Correct quoting.
21935 * aclocal.m4: Regenerated.
21936
21937 Suggested by SZOKOVACS Robert <szo@ies.hu>:
21938 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
21939 (thread_db_init): Call thread_db_err_str.
21940 * configure.ac: Check for TD_VERSION.
21941 * config.in, configure: Regenerated.
21942
21943 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21944
21945 * server.h (error, fatal, warning): Add ATTR_FORMAT.
21946
21947 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21948
21949 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
21950 is not available. Define HAVE_PTRACE_GETREGS if it is.
21951 * config.in, configure: Regenerated.
21952 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
21953 * linux-i386-low.c, linux-m68k-low.c: Update to use
21954 HAVE_PTRACE_GETREGS.
21955 * linux-low.c (regsets_fetch_inferior_registers)
21956 (regsets_store_inferior_registers): Only return 0 if we processed
21957 GENERAL_REGS.
21958 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
21959 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
21960
21961 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21962
21963 * inferiors.c (struct thread_info): Add gdb_id.
21964 (add_thread): Add gdb_id argument.
21965 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
21966 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
21967 calls to add_thread.
21968 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
21969 * server.c (handle_query): Use thread_to_gdb_id.
21970 (handle_v_cont, main): Use gdb_id_to_thread_id.
21971 * server.h (add_thread): Update prototype.
21972 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
21973 prototypes.
21974
21975 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21976
21977 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
21978 left-padded registers.
21979 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
21980 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
21981
21982 2005-07-01 Steve Ellcey <sje@cup.hp.com>
21983
21984 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
21985 * configure: Regenerate.
21986 * config.in: Regenerate.
21987 * server.h (NEED_DECLARATION_STRERROR):
21988 Replace with !HAVE_DECL_STRERROR.
21989
21990 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
21991
21992 * linux-low.c (linux_wait, linux_send_signal): Don't test
21993 an unsigned long variable for > 0 if it could be MAX_ULONG.
21994 * server.c (myresume): Likewise.
21995 * target.c (set_desired_inferior): Likewise.
21996
21997 2005-06-13 Mark Kettenis <kettenis@gnu.org>
21998
21999 * configure.ac: Simplify and improve check for socklen_t.
22000 * configure, config.in: Regenerate.
22001
22002 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
22003
22004 * acconfig.h: Remove.
22005 * configure.ac: Add a test for socklen_t. Use three-argument
22006 AC_DEFINE throughout.
22007 * config.in: Regenerated using autoheader 2.59.
22008 * configure: Regenerated.
22009
22010 * gdbreplay.c (socklen_t): Provide a default.
22011 (remote_open): Use socklen_t.
22012 * remote-utils.c (socklen_t): Provide a default.
22013 (remote_open): Use socklen_t.
22014 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
22015 unsigned char.
22016
22017 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
22018 char for buffers.
22019 * linux-low.c (linux_read_memory, linux_write_memory)
22020 (linux_read_auxv): Likewise.
22021 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
22022 (check_mem_write): Likewise.
22023 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
22024 Likewise.
22025 * regcache.c (struct inferior_rgcache_data, registers_to_string)
22026 (registers_from_string, register_data): Likewise.
22027 * server.c (handle_query, main): Likewise.
22028 * server.h (convert_ascii_to_int, convert_int_to_ascii)
22029 (decode_M_packet): Likewise.
22030 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
22031 * target.h (struct target_ops): Update read_memory, write_memory,
22032 and read_auxv.
22033 (read_inferior_memory, write_inferior_memory): Update.
22034 * linux-low.h (struct linux_target_ops): Change type of breakpoint
22035 to unsigned char *.
22036 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
22037 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
22038 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
22039 linux-s390-low.c, linux-sh-low.c: Update for changes in
22040 read_inferior_memory and the_low_target->breakpoint.
22041
22042 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
22043
22044 * Makefile.in (SFILES): Add linux-ppc64-low.c.
22045 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
22046 * configure.srv: Add powerpc64-*-linux*.
22047 * linux-ppc64-low.c: New file.
22048
22049 2005-05-23 Orjan Friberg <orjanf@axis.com>
22050
22051 * linux-cris-low.c: New file with support for CRIS.
22052 * linux-crisv32-low.c: Ditto for CRISv32.
22053 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
22054 (clean): Add reg-cris.c and reg-crisv32.c.
22055 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
22056 reg-crisv32.o, and reg-crisv32.c to make rules.
22057 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
22058 recognized targets.
22059
22060 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
22061
22062 * linux-low.c (fetch_register): Ensure buffer size is a multiple
22063 of sizeof (PTRACE_XFER_TYPE).
22064 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
22065
22066 2005-05-12 Orjan Friberg <orjanf@axis.com>
22067
22068 * target.h (struct target_ops): Add insert_watchpoint,
22069 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
22070 pointers for hardware watchpoint support.
22071 * linux-low.h (struct linux_target_ops): Ditto.
22072 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
22073 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
22074 to linux_target_ops.
22075 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
22076 reply packet.
22077 * server.c (main): Recognize 'Z' and 'z' packets.
22078
22079 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
22080
22081 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
22082 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
22083 (the_low_target): Add new members.
22084
22085 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
22086
22087 * proc-service.c (ps_lgetregs): Search all_processes instead of
22088 all_threads.
22089
22090 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
22091
22092 * server.c (start_inferior): Change return type to int.
22093 (attach_inferior): Change sigptr to int *.
22094 (handle_v_cont, handle_v_requests): Change signal to int *.
22095 (main): Change signal to int.
22096
22097 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
22098
22099 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
22100 * configure.srv: Add m32r*-*-linux*.
22101 * linux-m32r-low.c: New file.
22102
22103 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
22104
22105 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
22106
22107 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
22108
22109 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
22110 Take unsigned long arguments for PIDs.
22111 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
22112 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
22113 (wait_for_sigstop, linux_resume_one_process)
22114 (regsets_fetch_inferior_registers, linux_send_signal)
22115 (linux_read_auxv): Likewise. Update the types of variables holding
22116 PIDs. Update format string specifiers.
22117 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
22118 * remote-utils.c (prepare_resume_reply): Likewise.
22119 * server.c (cont_thread, general_thread, step_thread)
22120 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
22121 unsigned long.
22122 (handle_query): Update format specifiers.
22123 (handle_v_cont, main): Use strtoul for thread IDs.
22124 * server.h (struct inferior_list_entry): Use unsigned long for ID.
22125 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
22126 (general_thread, step_thread, thread_from_wait)
22127 (old_thread_from_wait): Update.
22128 * target.h (struct thread_resume): Use unsigned long for THREAD.
22129 (struct target_ops): Use unsigned long for arguments to attach and
22130 thread_alive.
22131
22132 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
22133
22134 * acinclude.m4: Include bfd/bfd.m4 directly.
22135 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
22136 <agriffis@toolchain.org>.
22137 * aclocal.m4, configure: Regenerated.
22138
22139 2005-01-07 Andrew Cagney <cagney@gnu.org>
22140
22141 * configure.ac: Rename configure.in, require autoconf 2.59.
22142 * configure: Re-generate.
22143
22144 2004-12-08 Daniel Jacobowitz <dan@debian.org>
22145
22146 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
22147 LIBS when finished.
22148 * aclocal.m4: Regenerated.
22149 * configure: Regenerated.
22150
22151 2004-11-21 Andreas Schwab <schwab@suse.de>
22152
22153 * linux-m68k-low.c (m68k_num_gregs): Define.
22154 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
22155 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
22156 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
22157 (m68k_breakpoint_at): New. Add to the_low_target.
22158
22159 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
22160 srv_linux_thread_db to yes.
22161
22162 2004-10-20 Joel Brobecker <brobecker@gnat.com>
22163
22164 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
22165 (ARCH_SET_FS): Likewise.
22166 (ARCH_GET_FS): Likewise.
22167 (ARCH_GET_GS): Likewise.
22168
22169 2004-10-16 Daniel Jacobowitz <dan@debian.org>
22170
22171 * linux-i386-low.c (ps_get_thread_area): New.
22172 * linux-x86-64-low.c (ps_get_thread_area): New.
22173 * linux-low.c: Include <sys/syscall.h>.
22174 (linux_kill_one_process): Don't kill the first thread here.
22175 (linux_kill): Kill the first thread here.
22176 (kill_lwp): New function.
22177 (send_sigstop, linux_send_signal): Use it.
22178 * proc-service.c: Clean up #ifdefs.
22179 (fpregset_info): Delete.
22180 (ps_lgetregs): Update and enable implementation.
22181 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
22182 implementations.
22183 * remote-utils.c (struct sym_cache, symbol_cache): New.
22184 (input_interrupt): Print a clearer message.
22185 (async_io_enabled): New variable.
22186 (enable_async_io, disable_async_io): Use it. Update comments.
22187 (look_up_one_symbol): Use the symbol cache.
22188 * thread-db.c (thread_db_look_up_symbols): New function.
22189 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
22190
22191 2004-10-16 Daniel Jacobowitz <dan@debian.org>
22192
22193 * configure.in: Test for -rdynamic.
22194 * configure: Regenerated.
22195 * Makefile (INTERNAL_LDFLAGS): New.
22196 (gdbserver, gdbreplay): Use it.
22197
22198 2004-09-02 Andrew Cagney <cagney@gnu.org>
22199
22200 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
22201
22202 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
22203
22204 * linux-low.c (linux_wait): Clear all_processes list also.
22205
22206 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
22207
22208 * linux-low.c: Include <errno.h>. Remove extern declaration of
22209 errno.
22210
22211 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
22212
22213 * gdbreplay.c, server.h, utils.c: Update copyright years.
22214
22215 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
22216
22217 * server.c (main): Print child status or termination signal from
22218 variable 'signal', not 'sig'.
22219
22220 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
22221
22222 * linux-low.c (linux_read_memory): Change return type to
22223 int. Check for and return error from ptrace().
22224 * target.c (read_inferior_memory): Change return type to int. Pass
22225 back return status from the_target->read_memory().
22226 * target.h (struct target_ops): Adapt *read_memory() prototype.
22227 Update comment.
22228 (read_inferior_memory): Adapt prototype.
22229 * server.c (main): Return an error packet if
22230 read_inferior_memory() returns an error.
22231
22232 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
22233
22234 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
22235 Unify with other clean targets.
22236
22237 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
22238
22239 * server.c (handle_v_cont): Call set_desired_inferior.
22240
22241 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
22242
22243 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
22244
22245 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
22246
22247 * linux-low.c (linux_wait): Unblock async I/O.
22248 (linux_resume): Block and enable async I/O.
22249 * remote-utils.c (block_async_io, unblock_async_io): New functions.
22250 * server.h (block_async_io, unblock_async_io): Add prototypes.
22251
22252 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
22253
22254 * remote-utils.c (remote_open): Print a status notice after
22255 opening a TCP port.
22256 * server.c (attach_inferior): Print a status notice after
22257 attaching.
22258
22259 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
22260
22261 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
22262
22263 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
22264
22265 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
22266 error packet.
22267 * server.c, target.h: Update copyright years.
22268
22269 2004-02-25 Roland McGrath <roland@redhat.com>
22270
22271 * target.h (struct target_ops): New member `read_auxv'.
22272 * server.c (handle_query): Handle qPart:auxv:read: query using that.
22273 * linux-low.c (linux_read_auxv): New function.
22274 (linux_target_ops): Initialize `read_auxv' member to that.
22275
22276 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
22277
22278 Committed by Jim Blandy <jimb@redhat.com>.
22279
22280 * linux-s390-low.c (s390_num_regs): Update.
22281 (s390_regmap): Remove control registers. Use __s390x__ predefine
22282 instead of GPR_SIZE to distiguish s390 and s390x targets.
22283
22284 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
22285
22286 * linux-low.c: Update copyright year.
22287 (check_removed_breakpoint): Clear pending_is_breakpoint.
22288 (linux_set_resume_request, linux_queue_one_thread)
22289 (resume_status_pending_p): New functions.
22290 (linux_continue_one_thread): Use process->resume.
22291 (linux_resume): Only resume threads if there are no pending events.
22292 * linux-low.h (struct process_info): Add resume request
22293 pointer.
22294
22295 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
22296
22297 * regcache.c (new_register_cache): Clear the allocated register
22298 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
22299
22300 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
22301
22302 * linux-low.c (linux_resume): Take a struct thread_resume *
22303 argument.
22304 (linux_wait): Update call.
22305 (resume_ptr): New static variable.
22306 (linux_continue_one_thread): Renamed from
22307 linux_continue_one_process. Use resume_ptr.
22308 (linux_resume): Use linux_continue_one_thread.
22309 * server.c (handle_v_cont, handle_v_requests): New functions.
22310 (myresume): New function.
22311 (main): Handle 'v' case.
22312 * target.h (struct thread_resume): New type.
22313 (struct target_ops): Change argument of "resume" to struct
22314 thread_resume *.
22315 (myresume): Delete macro.
22316
22317 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
22318
22319 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
22320 (uninstall): Support DESTDIR.
22321
22322 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
22323
22324 * configure.srv: Add xscale*linux copy of arm*linux entry.
22325
22326 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
22327
22328 * linux-arm-low.c (arm_reinsert_addr): New function.
22329 (the_low_target): Add arm_reinsert_addr.
22330
22331 2003-07-08 Mark Kettenis <kettenis@gnu.org>
22332
22333 * mem-break.c: Remove whitespace at end of file.
22334
22335 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
22336
22337 * configure.in: Check whether we need to prototype strerror.
22338 * server.h: Optionally prototype strerror.
22339 * gdbreplay.c (perror_with_name): Use strerror.
22340 * linux-low.c (linux_attach_lwp): Use strerror.
22341 * utils.c (perror_with_name): Use strerror.
22342 * config.in, configure: Regenerated.
22343
22344 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
22345
22346 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
22347 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
22348
22349 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
22350
22351 * Makefile.in (SFILES): Update.
22352 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
22353 low-sun3.c: Remove files.
22354
22355 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
22356
22357 * linux-low.c: Move comment to linux_thread_alive where it belonged.
22358 (linux_detach_one_process, linux_detach): New functions.
22359 (linux_target_ops): Add linux_detach.
22360 * server.c (main): Handle 'D' packet.
22361 * target.h (struct target_ops): Add "detach" member.
22362 (detach_inferior): Define.
22363
22364 2003-06-13 Mark Kettenis <kettenis@gnu.org>
22365
22366 From Kelley Cook <kelleycook@wideopenwest.com>:
22367 * configure.srv: Accept i[34567]86 variants.
22368
22369 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
22370
22371 * linux-low.c (linux_wait_for_event): Correct comment typos.
22372 (linux_resume_one_process): Call check_removed_breakpoint.
22373 (linux_send_signal): New function.
22374 (linux_target_ops): Add linux_send_signal.
22375 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
22376 of kill.
22377 * target.h (struct target_ops): Add send_signal.
22378
22379 2003-05-29 Jim Blandy <jimb@redhat.com>
22380
22381 * linux-low.c (usr_store_inferior_registers): Transfer buf in
22382 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
22383 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
22384 away part of the register's value.
22385
22386 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
22387
22388 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
22389 (linux_wait_for_event, linux_init_signals): Likewise.
22390
22391 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
22392
22393 * configure.in: Check for stdlib.h.
22394 * configure: Regenerated.
22395 * config.in: Regenerated.
22396
22397 2003-01-04 Andreas Schwab <schwab@suse.de>
22398
22399 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
22400
22401 2003-01-02 Andrew Cagney <ac131313@redhat.com>
22402
22403 * Makefile.in: Remove obsolete code.
22404
22405 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
22406
22407 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
22408 defined(PT_FPR0_HI).
22409
22410 2002-11-17 Stuart Hughes <seh@zee2.com>
22411
22412 * linux-arm-low.c (arm_num_regs): Increase.
22413 (arm_regmap): Include status register.
22414
22415 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
22416
22417 * linux-low.c (register_addr): Remove incorrect -1 check.
22418
22419 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
22420
22421 * linux-low.c (linux_create_inferior): Call setpgid. Return
22422 the new PID.
22423 (unstopped_p, linux_signal_pid): Remove.
22424 (linux_target_ops): Remove linux_signal_pid.
22425 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
22426 global instead of target method.
22427 * target.h (struct target_ops): Remove signal_pid. Update comment
22428 for create_inferior.
22429 * server.c (signal_pid): New variable.
22430 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
22431 gdbserver. Set the child to be the foreground process group.
22432 (attach_inferior): Set signal_pid.
22433
22434 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
22435
22436 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
22437
22438 2002-08-20 Jim Blandy <jimb@redhat.com>
22439
22440 * Makefile.in (LDFLAGS): Allow the configure script to establish a
22441 default for this.
22442
22443 2002-08-01 Andrew Cagney <cagney@redhat.com>
22444
22445 * Makefile.in: Make chill references obsolete.
22446
22447 2002-07-24 Kevin Buettner <kevinb@redhat.com>
22448
22449 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
22450 * configure: Regenerate.
22451 * config.in: Regenerate.
22452
22453 2002-07-09 David O'Brien <obrien@FreeBSD.org>
22454
22455 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
22456 (perror_with_name, remote_close, remote_open, expect, play): Static.
22457
22458 2002-07-04 Michal Ludvig <mludvig@suse.cz>
22459
22460 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
22461 byte offsets instead of an array of indexes.
22462 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
22463
22464 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
22465
22466 * regcache.c: Add comment.
22467
22468 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
22469
22470 * thread-db.c: New file.
22471 * proc-service.c: New file.
22472 * acinclude.m4: New file.
22473 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
22474 proc-service.o, and thread-db.o.
22475 (linux-low.o): Add USE_THREAD_DB.
22476 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
22477 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
22478 * aclocal.m4: Regenerated.
22479 * config.in: Regenerated.
22480 * configure: Regenerated.
22481 * configure.in: Check for proc_service.h, sys/procfs.h,
22482 thread_db.h, and linux/elf.h headrs.
22483 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
22484 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
22485 Check for -lthread_db and thread support.
22486 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
22487 PowerPC, and SuperH.
22488 * i387-fp.c: Constify arguments.
22489 * i387-fp.h: Likewise.
22490 * inferiors.c: (struct thread_info): Renamed from
22491 `struct inferior_info'. Remove PID member. Use generic inferior
22492 list header. All uses updated.
22493 (inferiors, signal_pid): Removed.
22494 (all_threads): New variable.
22495 (get_thread): Define.
22496 (add_inferior_to_list): New function.
22497 (for_each_inferior): New function.
22498 (change_inferior_id): New function.
22499 (add_inferior): Removed.
22500 (remove_inferior): New function.
22501 (add_thread): New function.
22502 (free_one_thread): New function.
22503 (remove_thread): New function.
22504 (clear_inferiors): Use for_each_inferior and free_one_thread.
22505 (find_inferior): New function.
22506 (find_inferior_id): New function.
22507 (inferior_target_data): Update argument type.
22508 (set_inferior_target_data): Likewise.
22509 (inferior_regcache_data): Likewise.
22510 (set_inferior_regcache_data): Likewise.
22511 * linux-low.c (linux_bp_reinsert): Remove.
22512 (all_processes, stopping_threads, using_thrads)
22513 (struct pending_signals, debug_threads, pid_of): New.
22514 (inferior_pid): Replace with macro.
22515 (struct inferior_linux_data): Remove.
22516 (get_stop_pc, add_process): New functions.
22517 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
22518 Use add_process and add_thread.
22519 (linux_attach_lwp): New function, based on old linux_attach. Use
22520 add_process and add_thread. Set stop_expected for new threads.
22521 (linux_attach): New function.
22522 (linux_kill_one_process): New function.
22523 (linux_kill): Kill all LWPs.
22524 (linux_thread_alive): Use find_inferior_id.
22525 (check_removed_breakpoints, status_pending_p): New functions.
22526 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
22527 Update. Use WNOHANG. Wait for cloned processes also. Update process
22528 struct for the found process.
22529 (linux_wait_for_event): New function.
22530 (linux_wait): Use it. Support LWPs.
22531 (send_sigstop, wait_for_sigstop, stop_all_processes)
22532 (linux_resume_one_process, linux_continue_one_process): New functions.
22533 (linux_resume): Support LWPs.
22534 (REGISTER_RAW_SIZE): Remove.
22535 (fetch_register): Use register_size instead. Call supply_register.
22536 (usr_store_inferior_registers): Likewise. Call collect_register.
22537 Fix recursive case.
22538 (regsets_fetch_inferior_registers): Improve error message.
22539 (regsets_store_inferior_registers): Add debugging.
22540 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
22541 (unstopped_p, linux_signal_pid): New functions.
22542 (linux_target_ops): Add linux_signal_pid.
22543 (linux_init_signals): New function.
22544 (initialize_low): Call it. Initialize using_threads.
22545 * regcache.c (inferior_regcache_data): Add valid
22546 flag.
22547 (get_regcache): Fetch registers lazily. Add fetch argument
22548 and update all callers.
22549 (regcache_invalidate_one, regcache_invalidate): New
22550 functions.
22551 (new_register_cache): Renamed from create_register_cache.
22552 Return the new regcache.
22553 (free_register_cache): Change argument to a void *.
22554 (registers_to_string, registers_from_string): Call get_regcache
22555 with fetch flag set.
22556 (register_data): Make static. Pass fetch flag to get_regcache.
22557 (supply_register): Call get_regcache with fetch flag clear.
22558 (collect_register): Call get_regcache with fetch flag set.
22559 (collect_register_as_string): New function.
22560 * regcache.h: Update.
22561 * remote-utils.c (putpkt): Flush after debug output and use
22562 stderr.
22563 Handle input interrupts while waiting for an ACK.
22564 (input_interrupt): Use signal_pid method.
22565 (getpkt): Flush after debug output and use stderr.
22566 (outreg): Use collect_register_as_string.
22567 (new_thread_notify, dead_thread_notify): New functions.
22568 (prepare_resume_reply): Check using_threads. Set thread_from_wait
22569 and general_thread.
22570 (look_up_one_symbol): Flush after debug output.
22571 * server.c (step_thread, server_waiting): New variables.
22572 (start_inferior): Don't use signal_pid. Update call to mywait.
22573 (attach_inferior): Update call to mywait.
22574 (handle_query): Handle qfThreadInfo and qsThreadInfo.
22575 (main): Don't fetch/store registers explicitly. Use
22576 set_desired_inferior. Support proposed ``Hs'' packet. Update
22577 calls to mywait.
22578 * server.h: Update.
22579 (struct inferior_list, struct_inferior_list_entry): New.
22580 * target.c (set_desired_inferior): New.
22581 (write_inferior_memory): Constify.
22582 (mywait): New function.
22583 * target.h: Update.
22584 (struct target_ops): New signal_pid method.
22585 (mywait): Removed macro, added prototype.
22586
22587 * linux-low.h (regset_func): Removed.
22588 (regset_fill_func, regset_store_func): New.
22589 (enum regset_type): New.
22590 (struct regset_info): Add type field. Use new operation types.
22591 (struct linux_target_ops): stop_pc renamed to get_pc.
22592 Add decr_pc_after_break and breakpoint_at.
22593 (get_process, get_thread_proess, get_process_thread)
22594 (strut process_info, all_processes, linux_attach_lwp)
22595 (thread_db_init): New.
22596
22597 * linux-arm-low.c (arm_get_pc, arm_set_pc,
22598 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
22599 (the_low_target): Add new members.
22600 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
22601 (i386_store_fpxregset): Constify.
22602 (target_regsets): Add new kind identifier.
22603 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
22604 (i386_set_pc): Add debugging.
22605 (i386_breakpoint_at): New function.
22606 (the_low_target): Add new members.
22607 * linux-mips-low.c (mips_get_pc, mips_set_pc)
22608 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
22609 (mips_breakpoint_at): New.
22610 (the_low_target): Add new members.
22611 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
22612 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
22613 (the_low_target): Add new members.
22614 * linux-sh-low.c (sh_get_pc, sh_set_pc)
22615 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
22616 (the_low_target): Add new members.
22617 * linux-x86-64-low.c (target_regsets): Add new kind
22618 identifier.
22619
22620 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
22621
22622 From Martin Pool <mbp@samba.org>:
22623 * server.c (gdbserver_usage): New function.
22624 (main): Call it.
22625
22626 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
22627
22628 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
22629 stop_at -> stop_pc.
22630
22631 2002-05-04 Andrew Cagney <ac131313@redhat.com>
22632
22633 * Makefile.in: Remove obsolete code.
22634
22635 2002-04-24 Michal Ludvig <mludvig@suse.cz>
22636
22637 * linux-low.c (regsets_fetch_inferior_registers),
22638 (regsets_store_inferior_registers): Removed cast to int from
22639 ptrace() calls.
22640 * regcache.h: Added declaration of struct inferior_info.
22641
22642 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
22643
22644 * inferiors.c (struct inferior_info): Add regcache_data.
22645 (add_inferior): Call create_register_cache.
22646 (clear_inferiors): Call free_register_cache.
22647 (inferior_regcache_data, set_inferior_regcache_data): New functions.
22648 * regcache.c (struct inferior_regcache_data): New.
22649 (registers): Remove.
22650 (get_regcache): New function.
22651 (create_register_cache, free_register_cache): New functions.
22652 (set_register_cache): Don't initialize the register cache here.
22653 (registers_to_string, registers_from_string, register_data): Call
22654 get_regcache.
22655 * regcache.h: Add prototypes.
22656 * server.h: Likewise.
22657
22658 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
22659
22660 * mem-break.c: New file.
22661 * mem-break.h: New file.
22662 * Makefile.in: Add mem-break.o rule; update server.h
22663 dependencies.
22664 * inferiors.c (struct inferior_info): Add target_data
22665 member.
22666 (clear_inferiors): Free target_data member if set.
22667 (inferior_target_data, set_inferior_target_data): New functions.
22668 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
22669 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
22670 * linux-low.c (linux_bp_reinsert): New variable.
22671 (struct inferior_linux_data): New.
22672 (linux_create_inferior): Use set_inferior_target_data.
22673 (linux_attach): Likewise. Call add_inferior.
22674 (linux_wait_for_one_inferior): New function.
22675 (linux_wait): Call it.
22676 (linux_write_memory): Add const.
22677 (initialize_low): Call set_breakpoint_data.
22678 * linux-low.h (struct linux_target_ops): Add breakpoint
22679 handling members.
22680 * server.c (attach_inferior): Remove extra add_inferior
22681 call.
22682 * server.h: Include mem-break.h. Update inferior.c
22683 prototypes.
22684 * target.c (read_inferior_memory)
22685 (write_inferior_memory): New functions.
22686 * target.h (read_inferior_memory)
22687 (write_inferior_memory): Change macros to prototypes.
22688 (struct target_ops): Update comments. Add const to write_memory
22689 definition.
22690
22691 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
22692
22693 * linux-low.c (usr_store_inferior_registers): Support
22694 registers which are allowed to fail to store.
22695 * linux-low.h (linux_target_ops): Likewise.
22696 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
22697 (ppc_cannot_store_register): FPSCR may not be storable.
22698
22699 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22700
22701 * server.h: Include <string.h> if HAVE_STRING_H.
22702 * ChangeLog: Correct paths in last ChangeLog entry.
22703
22704 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22705
22706 * linux-low.h: Remove obsolete prototypes.
22707 (struct linux_target_ops): New.
22708 (extern the_low_target): New.
22709 * linux-low.c (num_regs, regmap): Remove declarations.
22710 (register_addr): Use the_low_target explicitly.
22711 (fetch_register): Likewise.
22712 (usr_fetch_inferior_registers): Likewise.
22713 (usr_store_inferior_registers): Likewise.
22714 * linux-arm-low.c (num_regs): Remove.
22715 (arm_num_regs): Define.
22716 (arm_regmap): Renamed from regmap, made static.
22717 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
22718 made static.
22719 (arm_cannot_store_register): Renamed from cannot_store_register,
22720 made static.
22721 (the_low_target): New.
22722 * linux-i386-low.c (num_regs): Remove.
22723 (i386_num_regs): Define.
22724 (i386_regmap): Renamed from regmap, made static.
22725 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
22726 made static.
22727 (i386_cannot_store_register): Renamed from cannot_store_register,
22728 made static.
22729 (the_low_target): New.
22730 * linux-ia64-low.c (num_regs): Remove.
22731 (ia64_num_regs): Define.
22732 (ia64_regmap): Renamed from regmap, made static.
22733 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
22734 made static.
22735 (ia64_cannot_store_register): Renamed from cannot_store_register,
22736 made static.
22737 (the_low_target): New.
22738 * linux-m68k-low.c (num_regs): Remove.
22739 (m68k_num_regs): Define.
22740 (m68k_regmap): Renamed from regmap, made static.
22741 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
22742 made static.
22743 (m68k_cannot_store_register): Renamed from cannot_store_register,
22744 made static.
22745 (the_low_target): New.
22746 * linux-mips-low.c (num_regs): Remove.
22747 (mips_num_regs): Define.
22748 (mips_regmap): Renamed from regmap, made static.
22749 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
22750 made static.
22751 (mips_cannot_store_register): Renamed from cannot_store_register,
22752 made static.
22753 (the_low_target): New.
22754 * linux-ppc-low.c (num_regs): Remove.
22755 (ppc_num_regs): Define.
22756 (ppc_regmap): Renamed from regmap, made static.
22757 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
22758 made static.
22759 (ppc_cannot_store_register): Renamed from cannot_store_register,
22760 made static.
22761 (the_low_target): New.
22762 * linux-s390-low.c (num_regs): Remove.
22763 (s390_num_regs): Define.
22764 (s390_regmap): Renamed from regmap, made static.
22765 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
22766 made static.
22767 (s390_cannot_store_register): Renamed from cannot_store_register,
22768 made static.
22769 (the_low_target): New.
22770 * linux-sh-low.c (num_regs): Remove.
22771 (sh_num_regs): Define.
22772 (sh_regmap): Renamed from regmap, made static.
22773 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
22774 made static.
22775 (sh_cannot_store_register): Renamed from cannot_store_register,
22776 made static.
22777 (the_low_target): New.
22778 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
22779 (the_low_target): New.
22780
22781 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22782
22783 * Makefile.in: Add stamp-h target.
22784 * configure.in: Create stamp-h.
22785 * configure: Regenerated.
22786
22787 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22788
22789 * inferiors.c: New file.
22790 * target.c: New file.
22791 * target.h: New file.
22792 * Makefile.in: Add target.o and inferiors.o. Update
22793 dependencies.
22794 * linux-low.c (inferior_pid): New static variable,
22795 moved from server.c.
22796 (linux_create_inferior): Renamed from create_inferior.
22797 Call add_inferior. Return 0 on success instead of a PID.
22798 (linux_attach): Renamed from myattach.
22799 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
22800 (linux_thread_alive): Renamed from mythread_alive.
22801 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
22802 child dies.
22803 (linux_resume): Renamed from myresume. Add missing ``return 0''.
22804 (regsets_store_inferior_registers): Correct error message.
22805 Add missing ``return 0''.
22806 (linux_fetch_registers): Renamed from fetch_inferior_registers.
22807 (linux_store_registers): Renamed from store_inferior_registers.
22808 (linux_read_memory): Renamed from read_inferior_memory.
22809 (linux_write_memory): Renamed from write_inferior_memory.
22810 (linux_target_ops): New structure.
22811 (initialize_low): Call set_target_ops ().
22812 * remote-utils.c (unhexify): New function.
22813 (hexify): New function.
22814 (input_interrupt): Send signals to ``signal_pid''.
22815 * server.c (inferior_pid): Remove.
22816 (start_inferior): Update create_inferior call.
22817 (attach_inferior): Call add_inferior.
22818 (handle_query): New function.
22819 (main): Call handle_query for `q' packets.
22820 * server.h: Include "target.h". Remove obsolete prototypes.
22821 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
22822
22823 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22824
22825 * Makefile.in: Add WARN_CFLAGS. Update configury
22826 dependencies.
22827 * configure.in: Check for <string.h>
22828 * configure: Regenerate.
22829 * config.in: Regenerate.
22830 * gdbreplay.c: Include needed system headers.
22831 (remote_open): Remove strchr prototype.
22832 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
22833 * regcache.c (supply_register): Change buf argument to const void *.
22834 (supply_register_by_name): Likewise.
22835 (collect_register): Change buf argument to void *.
22836 (collect_register_by_name): Likewise.
22837 * regcache.h: Add missing prototypes.
22838 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
22839 * server.c (handle_query): New function.
22840 (attached): New static variable, moved out of main.
22841 (main): Quiet longjmp clobber warnings.
22842 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
22843 * utils.c (error): Remove NORETURN.
22844 (fatal): Likewise.
This page took 0.7032 seconds and 5 git commands to generate.