aboutsummaryrefslogtreecommitdiff
path: root/gdb/make-target-delegates
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2018-06-07 17:27:47 +0100
committerPedro Alves <palves@redhat.com>2018-06-07 18:57:06 +0100
commitb6a8c27bb8fb383be6f57724eb9aafa9f2f83aa5 (patch)
tree059f5868ffe785858804b071ff5cf4072b634f05 /gdb/make-target-delegates
parent8b88a78e63526b84d540b9c7d5f459593a248d5e (diff)
downloadgdb-b6a8c27bb8fb383be6f57724eb9aafa9f2f83aa5.zip
gdb-b6a8c27bb8fb383be6f57724eb9aafa9f2f83aa5.tar.gz
gdb-b6a8c27bb8fb383be6f57724eb9aafa9f2f83aa5.tar.bz2
target_ops::beneath -> target_ops::beneath()
This changes target_ops::beneath from a pointer to a method, and adjusts all references throughout. The idea here is to make it easier to change the target stack representation from an intrusive singly linked list to something else without leaking implementation details throughout. The commit does not change the representation yet, that will be done in a following patch. That is why a new target_ops::m_beneath field appears here. That new field isn't really documented properly or made private, simply because it will be removed shortly. Note that target_ops::beneath() is essentially the same as the current find_target_beneath routine. The following patch will eliminate the latter. gdb/ChangeLog: 2018-06-07 Pedro Alves <palves@redhat.com> * target.h (target_ops) <beneath>: Now a method. All references updated. (target_ops) <m_beneath>: New. * target.c (target_ops::beneath): New. * corelow.c: Adjust all references to target_ops::beneath. * linux-thread-db.c: Likewise. * make-target-delegates: Likewise. * record-btrace.c: Likewise. * record-full.c: Likewise. * remote.c: Likewise. * target.c: Likewise. * target-delegates.c: Regenerate.
Diffstat (limited to 'gdb/make-target-delegates')
-rwxr-xr-xgdb/make-target-delegates8
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/make-target-delegates b/gdb/make-target-delegates
index b8cf63c..28b49a4 100755
--- a/gdb/make-target-delegates
+++ b/gdb/make-target-delegates
@@ -225,7 +225,7 @@ sub write_delegator($$@) {
if ($return_type ne 'void') {
print "return ";
}
- print "this->beneath->" . $name . " (";
+ print "this->beneath ()->" . $name . " (";
print join (', ', @names);
print ");\n";
print "}\n\n";
@@ -309,19 +309,19 @@ sub write_debugmethod($$$@) {
print " $return_type result;\n";
}
- print " fprintf_unfiltered (gdb_stdlog, \"-> %s->$name (...)\\n\", this->beneath->shortname ());\n";
+ print " fprintf_unfiltered (gdb_stdlog, \"-> %s->$name (...)\\n\", this->beneath ()->shortname ());\n";
# Delegate to the beneath target.
print " ";
if ($return_type ne 'void') {
print "result = ";
}
- print "this->beneath->" . $name . " (";
+ print "this->beneath ()->" . $name . " (";
print join (', ', @names);
print ");\n";
# Now print the arguments.
- print " fprintf_unfiltered (gdb_stdlog, \"<- %s->$name (\", this->beneath->shortname ());\n";
+ print " fprintf_unfiltered (gdb_stdlog, \"<- %s->$name (\", this->beneath ()->shortname ());\n";
for my $i (0 .. $#argtypes) {
if ($i > 0) {
print " fputs_unfiltered (\", \", gdb_stdlog);\n"