buildMemory assumes all Non-Anonymous VMA file mappings are to the executable, is it OK? #4031
Replies: 2 comments
-
I think even if dlv handles this, it won't be perfect: in buildMemory, dlv create the spliced memory for the mapped VMAs, it ignore the FileSZ==0 cases. why? The mapped files maybe readonly when process running, but after that, it could be modified on the filesytem. So, current work of dlv is enough. If I misunderstand something, please let me know. |
Beta Was this translation helpful? Give feedback.
-
What you wrote looks correct to me.
There are several tools that generate core files. The kernel is one, gdb is another. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, guys, I'm learning how coredump file created and how to use it for debugging.
After reading the relevant code in dlv, I found I'm confused about a little code here.
buildMemory
when we rundlv core [executable] [core]
.buildMemory
function, the comment says "for now, assume all file mappings are to the exe",readNote
function, it doesn't read the mapped file names.So I think, is there a problem here in dlv? we ignore the mapped filename, and the data is not dumped into the core, we should read the file to get the data.
I'm a little confused here, does that means dlv, so far, not handle this? Most go programs use static linkage, maybe it's not a problem for most debugging cases. I'm write some articles and I use dlv as demo, so I want to make it clear to the readers. If I misunderstand some points, please let me know.
Thank you.
The following are the relevant code, and my test demo written in c programming language.
a demo with c programming language, it only prints its pid every 1s. Then I send a SIGBUS to it, and check the coredump with readelf as following:
Beta Was this translation helpful? Give feedback.
All reactions