Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add c++ symbol support in xinfo. (#1028)
This change adds c++ symbol support in xinfo. Currently, when using xinfo to get the symbol information in C++ programs, we might get incomplete data This is because the gdb_get_location_from_symbol function could not handle space in the symbol name. This change updates the gdb_get_location_from_symbol, so we can handle the space. It makes `xinfo` produces expected result.
- Loading branch information
Showing
4 changed files
with
49 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#include <stdio.h> | ||
|
||
class TraitA {}; | ||
class TraitB {}; | ||
|
||
class A { | ||
private: | ||
int _a; | ||
|
||
public: | ||
virtual ~A() {} | ||
virtual void Run() { printf("I am A\n"); } | ||
}; | ||
|
||
template <class TA, class TB> | ||
class B : public A { | ||
private: | ||
int _b; | ||
|
||
public: | ||
virtual void Run() { printf("I am B\n"); } | ||
}; | ||
|
||
int main() { | ||
A* a = new B<TraitA, TraitB>(); | ||
a->Run(); | ||
delete a; | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters