Linux Debuginfo Formats - DWARF, ELF, dwo, dwp - What are They All? - Greg Law - CppCon 2022
Вставка
- Опубліковано 12 вер 2024
- cppcon.org/
---
Linux Debuginfo Formats - DWARF, ELF, dwo, dwp - What are They All? - Greg Law - CppCon 2022
github.com/Cpp...
Many different Linux debugging tools are available - as well as the traditional debuggers (GDB, LLDB) we have checkers (Valgrind, the sanitizers), tracing tools (strace, ltrace), time-travel debuggers (rr, UDB). They all rely on debug info to map from the executable back to the source-code. Most of us know to pass the -g option to gcc to generate debuggable binaries, but there is much more to it than that.
This talk covers what exactly is in debug info, the different compiler options to control its generation, and the different kind of object files and why you might want them (e.g. split dwarf files for quicker loading). We also introduce ways to manage this information, including the new debuginfod service.
As is usual for Greg's talks: few slides, many demos.
This talk will give the information you need in order to use the available tooling more effectively, and to troubleshoot when the debug experience doesn't quite "just work".
---
Greg Law
Greg is the founder of Undo. He is a coder at heart, but likes to bridge the gap between the business and software worlds. (Sadly, these days most of Greg's coding is done on airplanes).
Greg has 25 years’ experience in the software industry and has held development and management roles at companies including the pioneering British computer firm Acorn, as well as fast-growing start ups, NexWave and Solarflare. It was at Acorn that Greg met Julian and on evenings and weekends, they invented the core technology that would eventually become UDB and LiveRecorder. Greg has overseen the company as it transitioned from his garden shed to a scaling, award-winning business.
Greg holds a PhD from City University, London and was nominated for the 2001 British Computer Society Distinguished Dissertation Award. He lives in Cambridge, UK with his wife, two children, two dogs and a cat. In his spare time, Greg catches up on email.
---
Videos Filmed & Edited by Bash Films: www.BashFilms.com
UA-cam Channel Managed by Digital Medium Ltd events.digital...
#cppcon #programming #linux
I expected a deeper dive into what was in the debug information rather than an overview of various tools for pulling apart binaries to see what's where.
Still a lot of useful information. Thank you.
Really enjoyed this talk, learned interesting stuff about ELF. Thank you.
This is what I was looking in the past days (dwarf and debuginfo), thanks cppcon for having this 😁
24:40: "I'm a C programmer, The puny compiler is no match for me!" 😂
Wow seriously after a few years, I still don't know what an ELF file is. Looking forward to watching this talk!
I was looking forward to see this material. Unfortunately, this presentation is kind of lost time for me.
It lacks consistency and some definitions and references. DWARF itself is huge topic and here almost nothing is said abut it. If you look for deeper knowledge and understanding of DWARF and debugging, you won't find it here.
If you need to be guided through available tools for debugging and handling binaries then this presentation might be good idea. Nevertheless, I appreciate effort of the presenter. I know it's hard go do such presentations for larger audience.
Do you have any recommended talks about DWARF?
Amazing video
RR doesn't need debug info either. RR isn't a traditional debugger as much as it is, what I would call, an execution supervisor.
The actually debugging experience is via GDB, that rr spawns for you.
Good topic!
40:09 Indeed, Emacs can do all that right away, with org-mode. Sorry vim users, keep it to text editing, if you want a W.
Emacs was slow as hell specially in big C++ projects when last time i tried, no multithreading sucks , unless it is rewritten with modern system Emacs is no go
Perhaps you mean org-babel with the shell extension. I use this for documenting every shell command I run for documenting process.
Idk if you’re joking about org mode being able to do that (if you’re not please explain, if you are, lol). But this guy doesn’t know how to use vim to the fullest potential. He coulda used the :! command instead of $(( )) shell arithmetic, with the program awk ‘/SIZE/ {next;} {sum+=$} END {print sum}’ to do all of that filtering much faster. Tbh didn’t need a text editor at all. That was just the easiest way for him to string together a known set of operations to do the thing. That’s what computers are all about
Good on him, but absolutely no room for any emacs smugness 😁😂
An interesting and enjoyable first look into the previously mysterious (to me) ELF file format. Very hands on and practical, retrieving the information when you know all the tools really looks quite fluid
Setting up a debuginfod server at my workplace seems like it might be a good idea. One of our devs was bemoaning the fact that there’s nothing like MS Symbol Server a few years ago, well I might have good news for him now.
There wasn't. I love that linux is better with debuginfo now . But remember this stuff is less than a year old. While microsoft has it for almost 20 years. Linux is not really progressive and innovative in any way
i hate the name of vscode - it totally broke seaching stuff about the normal visual studio
RE non-relocated code: what happens if two things with the same pre-determined address try to run at the same time? Is than an additional layer of remapping somewhere else to prevent collisions?
Yes. This is what is called virtual memory and is handled by cpu and OS. In translates virtual address to a physical one. So 10 apps will use same virtual address but phisycally memory pages will be located in different addresses. You may also read about mmu. Memory management unit.
"What are They All?"
[Abort at 21:28]
As a C++ beginner, one of my impressions is that we can look at ELF in a `.out` file. But, actually, I still do not get the value or motivation of the necessary reason for doing all the stuff in the video.
The talk is an eloquent proof of the superiority of fish over bash. The speaker spends so much time struggling with history navigation during live demos...
I think in fairness he's not familiar with the many readline features. Are you?