> By Ksplice Post Importer on Jan 24, 2011 Heh. When interning at Ksplice/Oracle in 2011, I was tasked to import all of the blog posts from the old Ksplice Wordpress blog into Oracle's system. By hand, because they didn't want to turn on the Apache Roller API, or something. I couldn't set a custom author for each post, so instead I changed my name to "Importer, Ksplice Post".
I would have left my internship if I was tasked with that.
GDB tricks
21–30 of 35 posts
Re: GDB tricks
#22Isn't lldb better option now? Commands are more structured. FWIW, gdb on OSX is a pain to setup, and attaching processes is broken.
My current standing is to use whichever compiler and debugger your platform comes default with: msvc/cdb for Windows, gcc/gdb for Linux and clang/lldb for OS X. Crossing them always reveals tons of bugs, at least for me.
Re: GDB tricks
#23Earlier quoted context omitted.
I would have left my internship if I was tasked with that.
Bad engineers are only effective when given tasks that are interesting to them. Good engineers are those who are equally effective when given tasks that aren't so exciting. If you're at the intern level and you're already picking out which tasks are worthy of you and which tasks are beneath you, you may want to think about a different line of work.
An internship is not some magical excuse to hire someone likely overqualified to do extremely tangential work for low pay, its a partnership between the intern and the company to perform work that is useful for both the intern and the company.
Its not about being a good or bad engineer, its about the work being relevant. Tasking an apprentice welder to change the oil in the fleet of company cars would be more akin to the scenario described: somewhat related but utterly useless beyond a piece of paper saying they did an internship at X.
Re: GDB tricks
#24These are all useful, and I would even say fundamental, commands. But, as such, these are also very basic commands, not tricks. If you're looking for something more advanced, you'll be disappointed. I strongly suggest to anyone using gdb to just read the manual [0]. Or at least skim it quickly and find a dozen of such useful "tricks" in as many minutes. The time gained in debugging later is well worth knowing and mas…
I found constructing small problems and solving them with GDB when not under pressure greatly expanded my working knowledge. Trying to learn GDB while attempting to solve a time critical production bug is not possible for me.
Re: GDB tricks
#25Re: GDB tricks
#26Buried lede: Oracle uses GDB.
Oracle got their filthy hands on it when they bought Sun.
Re: GDB tricks
#27Seems like here's the right time and place to ask. How do I comfortably inspect variables of types like std::vector >> with gdb ?
Re: GDB tricks
#28These are all useful, and I would even say fundamental, commands. But, as such, these are also very basic commands, not tricks. If you're looking for something more advanced, you'll be disappointed. I strongly suggest to anyone using gdb to just read the manual [0]. Or at least skim it quickly and find a dozen of such useful "tricks" in as many minutes. The time gained in debugging later is well worth knowing and mas…
I found constructing small problems and solving them with GDB when not under pressure greatly expanded my working knowledge. Trying to learn GDB while attempting to solve a time critical production bug is not possible for me.
I actually developed most of my debugging skill when younger, by reverse engineering other programs and games. And after reversing foreign code from the binaries, debugging with the source code seems comfortable. It is also great to get more familiar with the inner working of the processor and to understand what instructions different languages and compilers produce.
It was not with gdb, but debugging is debugging. Switching debugger when you've known a few is like learning a new programming language when you know others, but much easier. You just need to find the new syntax, they're mostly similar.
One thing you learn quickly when REing is also not to jump head first in the debugger. Sometimes your problem can be solved easier using a different route, and that applies to debugging as well. A good read of a promising part of the source code or a well placed debug trace can sometimes be much faster.
For others who want to learn, there are plenty of reverse engineering tutorials you can find with a simple search. I have a particular place in my heart for fravia's (RIP) old website (should still be mirrored by woodmann [0]). It's a bit dated and there may be a better place to start now but it certainly covers some basics.
[0] http://www.woodmann.com/fravia/ You can check out http://www.woodmann.com/forum/content.php for more modern stuff while you're there
Re: GDB tricks
#29Isn't lldb better option now? Commands are more structured. FWIW, gdb on OSX is a pain to setup, and attaching processes is broken.
On osx, perhaps. On Linux it's still a little rough. Or was last time I tried to use it. That said, I do look forward to using it more. But most importantly, I look forward to the tooling that can be built around it, since it's much easier to treat it as a library than gdb.
Re: GDB tricks
#30> By Ksplice Post Importer on Jan 24, 2011 Heh. When interning at Ksplice/Oracle in 2011, I was tasked to import all of the blog posts from the old Ksplice Wordpress blog into Oracle's system. By hand, because they didn't want to turn on the Apache Roller API, or something. I couldn't set a custom author for each post, so instead I changed my name to "Importer, Ksplice Post".