-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fprintf: preserve conf_fprintf pointer in tag__ptr_name #29
base: master
Are you sure you want to change the base?
Conversation
This fixes the use of classes_as_structs and probably other options, when fprintf meets a pointer/reference type. Signed-off-by: Alibek Omarov <[email protected]>
Unrelated to PR, I see there is a mailing list available. https://lore.kernel.org/dwarves/ @acmel do you mind publishing an address where patches should be sent, if it is public at all and accepts without subscription or manual approval. Or is GitHub should be preferred method? |
Em Mon, Apr 18, 2022 at 03:57:15PM -0700, a1batross escreveu:
Unrelated to PR, I see there is a mailing list available. https://lore.kernel.org/dwarves/
Yes, ***@***.*** is the list to post patches, etc.
- Arnaldo
… @acmel do you mind publishing an address where patches should be sent, if it is public at all and accepts without subscription or manual approval. Or is GitHub should be preferred method?
--
Reply to this email directly or view it on GitHub:
#29 (comment)
You are receiving this because you were mentioned.
Message ID: ***@***.***>
--
- Arnaldo
|
yeah, dwarves at vger . kernel . org is the mailing list for pahole. |
$ pahole vmlinux > after So I think I need some C++ .o to see changes, please consider providing one together with before/after so that we can see quickly the effect of the patch. I'm grabbing one from some random debuginfo file now. |
@acmel ok, there is simple example I took from my own C++ library: https://github.com/FWGS/mainui_cpp/blob/master/EngineCallback.cpp. It implements GUI in a game engine written in C. I compiled pahole with this patch and without, and ran with --classes_as_struct flag, as this patch fixes this case in the first place:
I uploaded the diff in the attachments, if you want to look closely. diff.txt |
Ran without any flags, the result is the same without and with patch:
|
Em Fri, Apr 22, 2022 at 04:36:12AM -0700, a1batross escreveu:
@acmel ok, there is simple example I took from my own C++ library: https://github.com/FWGS/mainui_cpp/blob/master/EngineCallback.cpp. It implements GUI in a game engine written in C.
I compiled pahole with this patch and without, and ran with --classes_as_struct flag, as this patch fixes this case in the first place:
```
$ ./pahole-pre-patch EngineCallback.cpp.1.o > pre-patch.h
$ ./pahole-post-patch EngineCallback.cpp.1.o > post-patch.h
$ diff -u pre-patch.h post-patch.h | tail -n 20
- void Update(class CWindowStack *);
+ void Update(struct CWindowStack *);
- void KeyUpEvent(class CWindowStack *, int);
+ void KeyUpEvent(struct CWindowStack *, int);
- void KeyDownEvent(class CWindowStack *, int);
+ void KeyDownEvent(struct CWindowStack *, int);
- void CharEvent(class CWindowStack *, int);
+ void CharEvent(struct CWindowStack *, int);
- void MouseEvent(class CWindowStack *, int, int);
+ void MouseEvent(struct CWindowStack *, int, int);
- void InputMethodResized(class CWindowStack *);
+ void InputMethodResized(struct CWindowStack *);
struct CUtlLinkedList<CMenuBaseWindow*, int> stack; /* 0 56 */
int active; /* 56 4 */
```
I uploaded the diff in the attachments, if you want to look closely. [diff.txt](https://github.com/acmel/dwarves/files/8540596/diff.txt)
thanks, this should be enough, I added the above test output and
description to the cset and merged it.
Will surface on master after the libbpf regression test passes.
- Arnaldo
|
This fixes the use of classes_as_structs and probably other options, when
fprintf meets a pointer/reference type.
Signed-off-by: Alibek Omarov [email protected]