Comments (5)
In Itanium C++ ABI (which is the basis of the linux C++ ABI):
3.1.4 Return Values
In general, C++ return values are handled just like C return values. This includes class type results returned in registers. However, if the return value type has a non-trivial copy constructor or destructor, the caller allocates space for a temporary, and passes a pointer to the temporary as an implicit first parameter preceding both the this parameter and user parameters. The callee constructs the return value into this temporary.
https://refspecs.linuxfoundation.org/cxxabi-1.86.html#calls
from uftrace.
Hi @namhyung , thanks for the specific answer. But my concern is that if it's possible to know whether I have to give -A bar@arg1
or -A bar@arg2
for such function to print the first argument.
from uftrace.
I think it should be handled in uftrace if it knows about the debug info. But I don't know how much info would be provided from the debuginfo.
from uftrace.
So it seems that it's not possible to handle this case as of now. Debuginfo support may be required to fix this in the future.
from uftrace.
With gcc 8.1 and -O2
option, it can find the correct argument of bar
from the debug info. (foo
was optimized out). But it still gets an incorrect value when -O0
.
$ g++ -O2 -g -pg test.cc
$ uftrace -A bar -R bar a.out
# DURATION TID FUNCTION
[ 3345] | main() {
15.967 us [ 3345] | bar(10) = 0x7ffd64b2f410;
1.777 us [ 3345] | operator delete();
23.460 us [ 3345] | } /* main */
from uftrace.
Related Issues (20)
- how to trace a dynamic lib HOT 7
- Build failures with LTO HOT 2
- Segmentation fault with uftrace dump --flame-graph HOT 8
- Typo in README: Redundant 'the' in documentation
- Improve Documentation about Flame Graph (with --sample-time examples) HOT 1
- Compile warning on `โsizeofโ in the earlier argument and not in the later argument` HOT 2
- Compile warning caused by Python3.12 header from `-Wdeclaration-after-statement` HOT 2
- what should i do when i want to trace a member function? HOT 1
- demangling failure with __device_stub_ prefix HOT 5
- "./misc/demangler --unknown" triggers segfault
- How to get uftrace data before the process terminates? HOT 3
- Segmentation fault HOT 8
- "<" symbol causes bad output with "uftrace dump --mermaid" HOT 2
- How to show function calling process in real time? HOT 1
- Segmentation fault HOT 7
- WARN: child terminated by signal: 11: Segmentation fault fault for ( C++ ) HOT 10
- WARN: Segmentation fault: address not mapped in llama.cpp HOT 12
- WARN: Cannot open record data: uftrace_524528: No such file or directory? HOT 6
- Does not work on binaries linked with mold HOT 2
- I want to automatically generate a /info file when the program ends. HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from uftrace.