]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdbserver/target.cc
Automatic Copyright Year update after running gdb/copyright.py
[thirdparty/binutils-gdb.git] / gdbserver / target.cc
CommitLineData
ce3a066d 1/* Target operations for the remote server for GDB.
4a94e368 2 Copyright (C) 2002-2022 Free Software Foundation, Inc.
ce3a066d
DJ
3
4 Contributed by MontaVista Software.
5
6 This file is part of GDB.
7
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
a9762ec7 10 the Free Software Foundation; either version 3 of the License, or
ce3a066d
DJ
11 (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
a9762ec7 19 along with this program. If not, see <http://www.gnu.org/licenses/>. */
ce3a066d
DJ
20
21#include "server.h"
c144c7a0 22#include "tracepoint.h"
d59b55f0 23#include "gdbsupport/byte-vector.h"
ea06bbaa 24#include "hostio.h"
c9b7b804
TBA
25#include <fcntl.h>
26#include <unistd.h>
27#include <sys/types.h>
28#include <sys/stat.h>
ce3a066d 29
5b6d1e4f 30process_stratum_target *the_target;
ce3a066d 31
f0db101d 32int
f557a88a 33set_desired_thread ()
0d62e5e8 34{
c12a5089
SC
35 client_state &cs = get_client_state ();
36 thread_info *found = find_thread_ptid (cs.general_thread);
0d62e5e8 37
24583e45 38 switch_to_thread (found);
f0db101d 39 return (current_thread != NULL);
0d62e5e8
DJ
40}
41
a67a9fae
PA
42/* The thread that was current before prepare_to_access_memory was
43 called. done_accessing_memory uses this to restore the previous
44 selected thread. */
45static ptid_t prev_general_thread;
46
47/* See target.h. */
48
49int
50prepare_to_access_memory (void)
51{
c12a5089
SC
52 client_state &cs = get_client_state ();
53
bac608e7
SM
54 /* The first thread found. */
55 struct thread_info *first = NULL;
56 /* The first stopped thread found. */
57 struct thread_info *stopped = NULL;
58 /* The current general thread, if found. */
59 struct thread_info *current = NULL;
a67a9fae 60
bac608e7
SM
61 /* Save the general thread value, since prepare_to_access_memory could change
62 it. */
c12a5089 63 prev_general_thread = cs.general_thread;
a67a9fae 64
52405d85 65 int res = the_target->prepare_to_access_memory ();
79b44087
TBA
66 if (res != 0)
67 return res;
a67a9fae 68
bac608e7
SM
69 for_each_thread (prev_general_thread.pid (), [&] (thread_info *thread)
70 {
71 if (mythread_alive (thread->id))
72 {
52405d85 73 if (stopped == NULL && the_target->supports_thread_stopped ()
68119632 74 && target_thread_stopped (thread))
bac608e7
SM
75 stopped = thread;
76
77 if (first == NULL)
78 first = thread;
79
80 if (current == NULL && prev_general_thread == thread->id)
81 current = thread;
82 }
83 });
84
85 /* The thread we end up choosing. */
86 struct thread_info *thread;
a67a9fae
PA
87
88 /* Prefer a stopped thread. If none is found, try the current
89 thread. Otherwise, take the first thread in the process. If
90 none is found, undo the effects of
91 target->prepare_to_access_memory() and return error. */
bac608e7
SM
92 if (stopped != NULL)
93 thread = stopped;
94 else if (current != NULL)
95 thread = current;
96 else if (first != NULL)
97 thread = first;
a67a9fae
PA
98 else
99 {
100 done_accessing_memory ();
101 return 1;
102 }
103
24583e45 104 switch_to_thread (thread);
c12a5089 105 cs.general_thread = ptid_of (thread);
a67a9fae
PA
106
107 return 0;
108}
109
110/* See target.h. */
111
112void
113done_accessing_memory (void)
114{
c12a5089
SC
115 client_state &cs = get_client_state ();
116
52405d85 117 the_target->done_accessing_memory ();
a67a9fae
PA
118
119 /* Restore the previous selected thread. */
c12a5089 120 cs.general_thread = prev_general_thread;
5b6d1e4f 121 switch_to_thread (the_target, cs.general_thread);
a67a9fae
PA
122}
123
c3e735a6 124int
f450004a 125read_inferior_memory (CORE_ADDR memaddr, unsigned char *myaddr, int len)
611cb4a5 126{
c3e735a6 127 int res;
52405d85 128 res = the_target->read_memory (memaddr, myaddr, len);
611cb4a5 129 check_mem_read (memaddr, myaddr, len);
c3e735a6 130 return res;
611cb4a5
DJ
131}
132
721ec300
GB
133/* See target/target.h. */
134
135int
136target_read_memory (CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len)
137{
138 return read_inferior_memory (memaddr, myaddr, len);
139}
140
141/* See target/target.h. */
142
143int
144target_read_uint32 (CORE_ADDR memaddr, uint32_t *result)
145{
146 return read_inferior_memory (memaddr, (gdb_byte *) result, sizeof (*result));
147}
148
4196ab2a
TT
149/* See target/target.h. */
150
611cb4a5 151int
4196ab2a
TT
152target_write_memory (CORE_ADDR memaddr, const unsigned char *myaddr,
153 ssize_t len)
0d62e5e8 154{
c6778d00
TT
155 /* Make a copy of the data because check_mem_write may need to
156 update it. */
d59b55f0 157 gdb::byte_vector buffer (myaddr, myaddr + len);
c6778d00 158 check_mem_write (memaddr, buffer.data (), myaddr, len);
52405d85 159 return the_target->write_memory (memaddr, buffer.data (), len);
0d62e5e8
DJ
160}
161
95954743 162ptid_t
b60cea74
TT
163mywait (ptid_t ptid, struct target_waitstatus *ourstatus,
164 target_wait_flags options, int connected_wait)
611cb4a5 165{
95954743 166 ptid_t ret;
0d62e5e8
DJ
167
168 if (connected_wait)
169 server_waiting = 1;
170
f2b9e3df 171 ret = target_wait (ptid, ourstatus, options);
bd99dc85 172
4210d83e
PA
173 /* We don't expose _LOADED events to gdbserver core. See the
174 `dlls_changed' global. */
183be222
SM
175 if (ourstatus->kind () == TARGET_WAITKIND_LOADED)
176 ourstatus->set_stopped (GDB_SIGNAL_0);
4210d83e 177
1a3d890b
PA
178 /* If GDB is connected through TCP/serial, then GDBserver will most
179 probably be running on its own terminal/console, so it's nice to
180 print there why is GDBserver exiting. If however, GDB is
181 connected through stdio, then there's no need to spam the GDB
182 console with this -- the user will already see the exit through
183 regular GDB output, in that same terminal. */
184 if (!remote_connection_is_stdio ())
185 {
183be222 186 if (ourstatus->kind () == TARGET_WAITKIND_EXITED)
1a3d890b 187 fprintf (stderr,
183be222
SM
188 "\nChild exited with status %d\n", ourstatus->exit_status ());
189 else if (ourstatus->kind () == TARGET_WAITKIND_SIGNALLED)
1a3d890b 190 fprintf (stderr, "\nChild terminated with signal = 0x%x (%s)\n",
183be222
SM
191 gdb_signal_to_host (ourstatus->sig ()),
192 gdb_signal_to_name (ourstatus->sig ()));
1a3d890b 193 }
0d62e5e8
DJ
194
195 if (connected_wait)
196 server_waiting = 0;
197
198 return ret;
611cb4a5
DJ
199}
200
f8c1d06b
GB
201/* See target/target.h. */
202
203void
03f4463b 204target_stop_and_wait (ptid_t ptid)
f8c1d06b
GB
205{
206 struct target_waitstatus status;
3e6ec53a 207 bool was_non_stop = non_stop;
17e16485 208 struct thread_resume resume_info;
f8c1d06b 209
17e16485
YQ
210 resume_info.thread = ptid;
211 resume_info.kind = resume_stop;
212 resume_info.sig = GDB_SIGNAL_0;
52405d85 213 the_target->resume (&resume_info, 1);
f8c1d06b 214
3e6ec53a 215 non_stop = true;
f8c1d06b
GB
216 mywait (ptid, &status, 0, 0);
217 non_stop = was_non_stop;
218}
219
220/* See target/target.h. */
221
f2b9e3df 222ptid_t
b60cea74
TT
223target_wait (ptid_t ptid, struct target_waitstatus *status,
224 target_wait_flags options)
f2b9e3df 225{
52405d85 226 return the_target->wait (ptid, status, options);
f2b9e3df
SDJ
227}
228
229/* See target/target.h. */
230
bc1e6c81
SDJ
231void
232target_mourn_inferior (ptid_t ptid)
233{
52405d85 234 the_target->mourn (find_process_pid (ptid.pid ()));
bc1e6c81
SDJ
235}
236
237/* See target/target.h. */
238
f8c1d06b 239void
03f4463b 240target_continue_no_signal (ptid_t ptid)
f8c1d06b
GB
241{
242 struct thread_resume resume_info;
243
244 resume_info.thread = ptid;
245 resume_info.kind = resume_continue;
246 resume_info.sig = GDB_SIGNAL_0;
52405d85 247 the_target->resume (&resume_info, 1);
f8c1d06b
GB
248}
249
049a8570
SDJ
250/* See target/target.h. */
251
252void
253target_continue (ptid_t ptid, enum gdb_signal signal)
254{
255 struct thread_resume resume_info;
256
257 resume_info.thread = ptid;
258 resume_info.kind = resume_continue;
259 resume_info.sig = gdb_signal_to_host (signal);
52405d85 260 the_target->resume (&resume_info, 1);
049a8570
SDJ
261}
262
1fb77080
SDJ
263/* See target/target.h. */
264
265int
266target_supports_multi_process (void)
267{
52405d85 268 return the_target->supports_multi_process ();
1fb77080
SDJ
269}
270
ce3a066d 271void
5b6d1e4f 272set_target_ops (process_stratum_target *target)
ce3a066d 273{
478f9adf 274 the_target = target;
ce3a066d 275}
95954743
PA
276
277/* Convert pid to printable format. */
278
61d7f128 279std::string
95954743
PA
280target_pid_to_str (ptid_t ptid)
281{
d7e15655 282 if (ptid == minus_one_ptid)
61d7f128 283 return string_printf("<all threads>");
d7e15655 284 else if (ptid == null_ptid)
61d7f128 285 return string_printf("<null thread>");
cc6bcb54 286 else if (ptid.tid () != 0)
61d7f128
SM
287 return string_printf("Thread %d.0x%s",
288 ptid.pid (),
289 phex_nz (ptid.tid (), sizeof (ULONGEST)));
e38504b3 290 else if (ptid.lwp () != 0)
61d7f128
SM
291 return string_printf("LWP %d.%ld",
292 ptid.pid (), ptid.lwp ());
95954743 293 else
61d7f128
SM
294 return string_printf("Process %d",
295 ptid.pid ());
95954743 296}
8336d594 297
7255706c 298int
a780ef4f 299kill_inferior (process_info *proc)
7255706c 300{
a780ef4f 301 gdb_agent_about_to_close (proc->pid);
7255706c 302
52405d85 303 return the_target->kill (proc);
7255706c 304}
70b90b91 305
223ffa71
TT
306/* Define it. */
307
e671cd59
PA
308target_terminal_state target_terminal::m_terminal_state
309 = target_terminal_state::is_ours;
223ffa71 310
2090129c
SDJ
311/* See target/target.h. */
312
313void
223ffa71 314target_terminal::init ()
2090129c
SDJ
315{
316 /* Placeholder needed because of fork_inferior. Not necessary on
317 GDBserver. */
318}
319
320/* See target/target.h. */
321
322void
223ffa71 323target_terminal::inferior ()
2090129c
SDJ
324{
325 /* Placeholder needed because of fork_inferior. Not necessary on
326 GDBserver. */
327}
328
329/* See target/target.h. */
330
331void
223ffa71 332target_terminal::ours ()
2090129c
SDJ
333{
334 /* Placeholder needed because of fork_inferior. Not necessary on
335 GDBserver. */
336}
223ffa71
TT
337
338/* See target/target.h. */
339
340void
341target_terminal::ours_for_output (void)
342{
343 /* Placeholder. */
344}
345
346/* See target/target.h. */
347
348void
349target_terminal::info (const char *arg, int from_tty)
350{
351 /* Placeholder. */
352}
6dee9afb
TBA
353
354/* Default implementations of target ops.
355 See target.h for definitions. */
356
357void
52405d85 358process_stratum_target::post_create_inferior ()
6dee9afb
TBA
359{
360 /* Nop. */
361}
79b44087
TBA
362
363int
52405d85 364process_stratum_target::prepare_to_access_memory ()
79b44087
TBA
365{
366 return 0;
367}
368
369void
52405d85 370process_stratum_target::done_accessing_memory ()
79b44087
TBA
371{
372 /* Nop. */
373}
2a31c7aa
TBA
374
375void
52405d85 376process_stratum_target::look_up_symbols ()
2a31c7aa
TBA
377{
378 /* Nop. */
379}
eac215cc
TBA
380
381bool
52405d85 382process_stratum_target::supports_read_auxv ()
eac215cc
TBA
383{
384 return false;
385}
386
387int
52405d85
TBA
388process_stratum_target::read_auxv (CORE_ADDR offset, unsigned char *myaddr,
389 unsigned int len)
eac215cc
TBA
390{
391 gdb_assert_not_reached ("target op read_auxv not supported");
392}
a2b2297a
TBA
393
394bool
52405d85 395process_stratum_target::supports_z_point_type (char z_type)
a2b2297a
TBA
396{
397 return false;
398}
7e0bde70
TBA
399
400int
52405d85
TBA
401process_stratum_target::insert_point (enum raw_bkpt_type type,
402 CORE_ADDR addr,
403 int size, raw_breakpoint *bp)
7e0bde70
TBA
404{
405 return 1;
406}
407
408int
52405d85
TBA
409process_stratum_target::remove_point (enum raw_bkpt_type type,
410 CORE_ADDR addr,
411 int size, raw_breakpoint *bp)
7e0bde70
TBA
412{
413 return 1;
414}
84320c4e
TBA
415
416bool
52405d85 417process_stratum_target::stopped_by_sw_breakpoint ()
84320c4e
TBA
418{
419 return false;
420}
421
422bool
52405d85 423process_stratum_target::supports_stopped_by_sw_breakpoint ()
84320c4e
TBA
424{
425 return false;
426}
93fe88b2
TBA
427
428bool
52405d85 429process_stratum_target::stopped_by_hw_breakpoint ()
93fe88b2
TBA
430{
431 return false;
432}
433
434bool
52405d85 435process_stratum_target::supports_stopped_by_hw_breakpoint ()
93fe88b2
TBA
436{
437 return false;
438}
22aa6223
TBA
439
440bool
52405d85 441process_stratum_target::supports_hardware_single_step ()
22aa6223
TBA
442{
443 return false;
444}
6eeb5c55
TBA
445
446bool
52405d85 447process_stratum_target::stopped_by_watchpoint ()
6eeb5c55
TBA
448{
449 return false;
450}
451
452CORE_ADDR
52405d85 453process_stratum_target::stopped_data_address ()
6eeb5c55
TBA
454{
455 return 0;
456}
5203ae1e
TBA
457
458bool
52405d85 459process_stratum_target::supports_read_offsets ()
5203ae1e
TBA
460{
461 return false;
462}
463
546b77fe
LM
464bool
465process_stratum_target::supports_memory_tagging ()
466{
467 return false;
468}
469
470bool
471process_stratum_target::fetch_memtags (CORE_ADDR address, size_t len,
472 gdb::byte_vector &tags, int type)
473{
474 gdb_assert_not_reached ("target op fetch_memtags not supported");
475}
476
477bool
478process_stratum_target::store_memtags (CORE_ADDR address, size_t len,
479 const gdb::byte_vector &tags, int type)
480{
481 gdb_assert_not_reached ("target op store_memtags not supported");
482}
483
5203ae1e 484int
52405d85 485process_stratum_target::read_offsets (CORE_ADDR *text, CORE_ADDR *data)
5203ae1e
TBA
486{
487 gdb_assert_not_reached ("target op read_offsets not supported");
488}
6e3fd7e9
TBA
489
490bool
52405d85 491process_stratum_target::supports_get_tls_address ()
6e3fd7e9
TBA
492{
493 return false;
494}
495
496int
52405d85
TBA
497process_stratum_target::get_tls_address (thread_info *thread,
498 CORE_ADDR offset,
499 CORE_ADDR load_module,
500 CORE_ADDR *address)
6e3fd7e9
TBA
501{
502 gdb_assert_not_reached ("target op get_tls_address not supported");
503}
ea06bbaa 504
2d0795ee 505bool
52405d85 506process_stratum_target::supports_qxfer_osdata ()
2d0795ee
TBA
507{
508 return false;
509}
510
511int
52405d85
TBA
512process_stratum_target::qxfer_osdata (const char *annex,
513 unsigned char *readbuf,
514 unsigned const char *writebuf,
515 CORE_ADDR offset, int len)
2d0795ee
TBA
516{
517 gdb_assert_not_reached ("target op qxfer_osdata not supported");
518}
d7abedf7
TBA
519
520bool
52405d85 521process_stratum_target::supports_qxfer_siginfo ()
d7abedf7
TBA
522{
523 return false;
524}
525
526int
52405d85
TBA
527process_stratum_target::qxfer_siginfo (const char *annex,
528 unsigned char *readbuf,
529 unsigned const char *writebuf,
530 CORE_ADDR offset, int len)
d7abedf7
TBA
531{
532 gdb_assert_not_reached ("target op qxfer_siginfo not supported");
533}
0dc587d4
TBA
534
535bool
52405d85 536process_stratum_target::supports_non_stop ()
0dc587d4
TBA
537{
538 return false;
539}
540
541bool
52405d85 542process_stratum_target::async (bool enable)
0dc587d4
TBA
543{
544 return false;
545}
546
547int
52405d85 548process_stratum_target::start_non_stop (bool enable)
0dc587d4
TBA
549{
550 if (enable)
551 return -1;
552 else
553 return 0;
554}
652aef77
TBA
555
556bool
52405d85 557process_stratum_target::supports_multi_process ()
652aef77
TBA
558{
559 return false;
560}
9690a72a
TBA
561
562bool
52405d85 563process_stratum_target::supports_fork_events ()
9690a72a
TBA
564{
565 return false;
566}
567
568bool
52405d85 569process_stratum_target::supports_vfork_events ()
9690a72a
TBA
570{
571 return false;
572}
573
574bool
52405d85 575process_stratum_target::supports_exec_events ()
9690a72a
TBA
576{
577 return false;
578}
fb00dfce
TBA
579
580void
52405d85 581process_stratum_target::handle_new_gdb_connection ()
fb00dfce
TBA
582{
583 /* Nop. */
584}
55cf3021
TBA
585
586int
52405d85 587process_stratum_target::handle_monitor_command (char *mon)
55cf3021
TBA
588{
589 return 0;
590}
95a45fc1
TBA
591
592int
52405d85 593process_stratum_target::core_of_thread (ptid_t ptid)
95a45fc1
TBA
594{
595 return -1;
596}
9da41fda
TBA
597
598bool
52405d85 599process_stratum_target::supports_read_loadmap ()
9da41fda
TBA
600{
601 return false;
602}
603
604int
52405d85
TBA
605process_stratum_target::read_loadmap (const char *annex,
606 CORE_ADDR offset,
607 unsigned char *myaddr,
608 unsigned int len)
9da41fda
TBA
609{
610 gdb_assert_not_reached ("target op read_loadmap not supported");
611}
0df28b1b
TBA
612
613void
b315b67d
SM
614process_stratum_target::process_qsupported
615 (gdb::array_view<const char * const> features)
0df28b1b
TBA
616{
617 /* Nop. */
618}
290732bf
TBA
619
620bool
52405d85 621process_stratum_target::supports_tracepoints ()
290732bf
TBA
622{
623 return false;
624}
770d8f6a
TBA
625
626CORE_ADDR
52405d85 627process_stratum_target::read_pc (regcache *regcache)
770d8f6a
TBA
628{
629 gdb_assert_not_reached ("process_target::read_pc: Unable to find PC");
630}
631
632void
52405d85 633process_stratum_target::write_pc (regcache *regcache, CORE_ADDR pc)
770d8f6a
TBA
634{
635 gdb_assert_not_reached ("process_target::write_pc: Unable to update PC");
636}
68119632
TBA
637
638bool
52405d85 639process_stratum_target::supports_thread_stopped ()
68119632
TBA
640{
641 return false;
642}
643
644bool
52405d85 645process_stratum_target::thread_stopped (thread_info *thread)
68119632
TBA
646{
647 gdb_assert_not_reached ("target op thread_stopped not supported");
648}
4e2e869c
TBA
649
650bool
52405d85 651process_stratum_target::supports_get_tib_address ()
4e2e869c
TBA
652{
653 return false;
654}
655
656int
52405d85 657process_stratum_target::get_tib_address (ptid_t ptid, CORE_ADDR *address)
4e2e869c
TBA
658{
659 gdb_assert_not_reached ("target op get_tib_address not supported");
660}
29e8dc09
TBA
661
662void
52405d85 663process_stratum_target::pause_all (bool freeze)
29e8dc09
TBA
664{
665 /* Nop. */
666}
667
668void
52405d85 669process_stratum_target::unpause_all (bool unfreeze)
29e8dc09
TBA
670{
671 /* Nop. */
672}
5c9eb2f2
TBA
673
674void
52405d85 675process_stratum_target::stabilize_threads ()
5c9eb2f2
TBA
676{
677 /* Nop. */
678}
c23c9391
TBA
679
680bool
52405d85 681process_stratum_target::supports_fast_tracepoints ()
c23c9391
TBA
682{
683 return false;
684}
685
686int
52405d85 687process_stratum_target::install_fast_tracepoint_jump_pad
c23c9391
TBA
688 (CORE_ADDR tpoint, CORE_ADDR tpaddr, CORE_ADDR collector,
689 CORE_ADDR lockaddr, ULONGEST orig_size, CORE_ADDR *jump_entry,
690 CORE_ADDR *trampoline, ULONGEST *trampoline_size,
691 unsigned char *jjump_pad_insn, ULONGEST *jjump_pad_insn_size,
692 CORE_ADDR *adjusted_insn_addr, CORE_ADDR *adjusted_insn_addr_end,
693 char *err)
694{
695 gdb_assert_not_reached ("target op install_fast_tracepoint_jump_pad "
696 "not supported");
697}
698
699int
52405d85 700process_stratum_target::get_min_fast_tracepoint_insn_len ()
c23c9391
TBA
701{
702 return 0;
703}
345dafad
TBA
704
705struct emit_ops *
52405d85 706process_stratum_target::emit_ops ()
345dafad
TBA
707{
708 return nullptr;
709}
c756403b
TBA
710
711bool
52405d85 712process_stratum_target::supports_disable_randomization ()
c756403b
TBA
713{
714 return false;
715}
974387bb
TBA
716
717bool
52405d85 718process_stratum_target::supports_qxfer_libraries_svr4 ()
974387bb
TBA
719{
720 return false;
721}
722
723int
52405d85
TBA
724process_stratum_target::qxfer_libraries_svr4 (const char *annex,
725 unsigned char *readbuf,
726 unsigned const char *writebuf,
727 CORE_ADDR offset, int len)
974387bb
TBA
728{
729 gdb_assert_not_reached ("target op qxfer_libraries_svr4 not supported");
730}
c0245cb9
TBA
731
732bool
52405d85 733process_stratum_target::supports_agent ()
c0245cb9
TBA
734{
735 return false;
736}
79597bdd
TBA
737
738btrace_target_info *
52405d85 739process_stratum_target::enable_btrace (ptid_t ptid, const btrace_config *conf)
79597bdd
TBA
740{
741 error (_("Target does not support branch tracing."));
742}
743
744int
52405d85 745process_stratum_target::disable_btrace (btrace_target_info *tinfo)
79597bdd
TBA
746{
747 error (_("Target does not support branch tracing."));
748}
749
750int
52405d85 751process_stratum_target::read_btrace (btrace_target_info *tinfo,
79597bdd
TBA
752 buffer *buffer,
753 enum btrace_read_type type)
754{
755 error (_("Target does not support branch tracing."));
756}
757
758int
52405d85
TBA
759process_stratum_target::read_btrace_conf (const btrace_target_info *tinfo,
760 buffer *buffer)
79597bdd
TBA
761{
762 error (_("Target does not support branch tracing."));
763}
2526e0cd
TBA
764
765bool
52405d85 766process_stratum_target::supports_range_stepping ()
2526e0cd
TBA
767{
768 return false;
769}
8247b823
TBA
770
771bool
52405d85 772process_stratum_target::supports_pid_to_exec_file ()
8247b823
TBA
773{
774 return false;
775}
776
04977957 777const char *
52405d85 778process_stratum_target::pid_to_exec_file (int pid)
8247b823
TBA
779{
780 gdb_assert_not_reached ("target op pid_to_exec_file not supported");
781}
c9b7b804
TBA
782
783bool
52405d85 784process_stratum_target::supports_multifs ()
c9b7b804
TBA
785{
786 return false;
787}
788
789int
52405d85
TBA
790process_stratum_target::multifs_open (int pid, const char *filename,
791 int flags, mode_t mode)
c9b7b804
TBA
792{
793 return open (filename, flags, mode);
794}
795
796int
52405d85 797process_stratum_target::multifs_unlink (int pid, const char *filename)
c9b7b804
TBA
798{
799 return unlink (filename);
800}
801
802ssize_t
52405d85
TBA
803process_stratum_target::multifs_readlink (int pid, const char *filename,
804 char *buf, size_t bufsiz)
c9b7b804
TBA
805{
806 return readlink (filename, buf, bufsiz);
807}
d367006f
TBA
808
809int
52405d85 810process_stratum_target::breakpoint_kind_from_pc (CORE_ADDR *pcptr)
d367006f
TBA
811{
812 /* The default behavior is to use the size of a breakpoint as the
813 kind. */
814 int size = 0;
815 sw_breakpoint_from_kind (0, &size);
816 return size;
817}
818
819int
52405d85 820process_stratum_target::breakpoint_kind_from_current_state (CORE_ADDR *pcptr)
d367006f
TBA
821{
822 return breakpoint_kind_from_pc (pcptr);
823}
7f63b89b
TBA
824
825const char *
52405d85 826process_stratum_target::thread_name (ptid_t thread)
7f63b89b
TBA
827{
828 return nullptr;
829}
830
831bool
52405d85
TBA
832process_stratum_target::thread_handle (ptid_t ptid, gdb_byte **handle,
833 int *handle_len)
7f63b89b
TBA
834{
835 return false;
836}
5303a34f 837
7b961964
SM
838thread_info *
839process_stratum_target::thread_pending_parent (thread_info *thread)
840{
841 return nullptr;
842}
843
df5ad102
SM
844thread_info *
845process_stratum_target::thread_pending_child (thread_info *thread)
846{
847 return nullptr;
848}
849
5303a34f 850bool
52405d85 851process_stratum_target::supports_software_single_step ()
5303a34f
TBA
852{
853 return false;
854}
bc8d3ae4
TBA
855
856bool
52405d85 857process_stratum_target::supports_catch_syscall ()
bc8d3ae4
TBA
858{
859 return false;
860}
d633e831
TBA
861
862int
52405d85 863process_stratum_target::get_ipa_tdesc_idx ()
d633e831
TBA
864{
865 return 0;
866}