Live data from Hacker News

Give me 15 minutes and I'll change your view of GDB (2015) [video]

youtube.com

41–50 of 95 posts

Re: Give me 15 minutes and I'll change your view of GDB (2015) [video]

#41
post #17

Earlier quoted context omitted.

If you are curious as to why you're being downvoted, it's because this comment adds no substance and states something completely obvious. In other words, it was unnecessary. That kind of stuff is for reddit.

No, I am not curious. I know exactly why I am being downvoted. HN'ers sometimes need to lighten up a bit. A little humor among thousands of serious comments (many not useful) is not going to bring down HN and it is incorrect to assume it doesn't add any substance. My comment was not crass, sarcastic, degrading or mean. It was appreciating the commenter's sense of humor in a harmless way.

There was no humorous value in your comment.

People who are familiar with Mitch Hedberg's work don't need any help in recognizing the quote.

For people who haven't heard about Mitch Hedberg, your comment doesn't make any sense without further research.

To me it sounded like you're bragging that you understood the reference.

Re: Give me 15 minutes and I'll change your view of GDB (2015) [video]

#44
post #40
post #32

Earlier quoted context omitted.

Can you tell me some of the things that VS does much better? I've only ever used GDB, and I am kind of lost when trying to debug a binary on windows

> I am kind of lost when trying to debug a binary on windows When I want to debug a program using the Visual Studio IDE I do the following: 1. Start the IDE and open the solution file. 2. Make sure the Debug Build option is selected. 3. Open a given file in the solution that I want to debug. 4. Select a line in that file and use the Debug, Toggle Breakpoint menu to set a breakpoint. 5. Run the debugger using the Debu…

> a binary

I'm not sure that there's a VS project and source code available for the binaries in question.

Re: Give me 15 minutes and I'll change your view of GDB (2015) [video]

#45
post #40
post #32

Earlier quoted context omitted.

Can you tell me some of the things that VS does much better? I've only ever used GDB, and I am kind of lost when trying to debug a binary on windows

> I am kind of lost when trying to debug a binary on windows When I want to debug a program using the Visual Studio IDE I do the following: 1. Start the IDE and open the solution file. 2. Make sure the Debug Build option is selected. 3. Open a given file in the solution that I want to debug. 4. Select a line in that file and use the Debug, Toggle Breakpoint menu to set a breakpoint. 5. Run the debugger using the Debu…

While a simple series of steps it's still pretty complex compares to the equivalent in gdb:

  $ gdb ./binary
  (gdb) break file.c:line
  (gdb) run
I think this is merely a disguised version of the "CLIs are too hard" argument...

Re: Give me 15 minutes and I'll change your view of GDB (2015) [video]

#46
post #40

Earlier quoted context omitted.

> I am kind of lost when trying to debug a binary on windows When I want to debug a program using the Visual Studio IDE I do the following: 1. Start the IDE and open the solution file. 2. Make sure the Debug Build option is selected. 3. Open a given file in the solution that I want to debug. 4. Select a line in that file and use the Debug, Toggle Breakpoint menu to set a breakpoint. 5. Run the debugger using the Debu…

> a binary I'm not sure that there's a VS project and source code available for the binaries in question.

Well if there isn't, you can start the EXE and do Debug|Attach from VS. Or (I think?), you can go to File|Open Solution, open the EXE directly, and let VS create a temporary solution for you that will let you run the EXE as a debuggee by pressing F5.

If you're debugging an EXE without source because you're writing a plugin or addon for it as a DLL, and you want todebug that DLL, you can specify the EXE in question as the EXE to run when you start debugging as part of the properties for the project for the DL in question. Visual Studio will spot when your DLL loads, load the debug info for it, and activate any breakpoints and so on. Works well.

(If your addon runs as a child process, you need the Child Process Debugging tool. Transformative. Get it here: https://marketplace.visualstudio.com/items?itemName=GreggMis...)

When you don't have source code, VS is not the best environment ever - it's oriented very much towards worknig with C/C++/etc., and there's a few options you have to play with to get it to show you disassembly and so on. But it's adequate. (One thing I like about it very much is that the step commands are the same whether you're stepping through source code or whether you're stepping in the disassembly window. I'll put up with quite a lot in exchange for that.)

Re: Give me 15 minutes and I'll change your view of GDB (2015) [video]

#47
Some other very nice:

https://github.com/snare/voltron

https://github.com/cyrus-and/gdb-dashboard

I particularly like Voltro's view modularity and backends support. But dashboard is a really nice throwback (SoftICE) with its theme and sensible default layout.

Re: Give me 15 minutes and I'll change your view of GDB (2015) [video]

#48
post #5

I used to think GDB was a tool with the most broken interface I've ever seen, and which requires arcane commands to do the most trivial of debugging things. I still do, but I used to too. That early dig against Windows was particularly funny. There's no way I would pick that over Visual Studio's debugging tools.

I agree that gdb's syntax is ridiculous, having come from a background of DOS DEBUG and WinDbg, but what irritates me more are the implementations of certain functionality:

- No way to get a 16-column (bytes+ASCII) standard hexdump. This is functionality that even the most basic debugger should have, yet it's missing from gdb.

- "disassemble" command is next to useless.

- If you write "b 0x12345" intending to set a breakpoint at address 0x12345, it doesn't work. An unnecessary and nonsensical extra asterisk is needed (which makes it look like it's retrieving 4/8 bytes from 0x12345, and using that as the address of the breakpoint.)

- Starting gdb with a binary and passing arguments to it --- you'd expect it to be smart enough to realise that anything after the executable name should be the arguments to the debuggee and not the debugger, but it isnt.

I don't use gdb often, but when I do, it's usually the option of last resort.

Re: Give me 15 minutes and I'll change your view of GDB (2015) [video]

#49
If you want a powerful debugger with a crappy interface that is widespread (and programming java) try jdb. It comes with the freaking jdk tool chain so it is basically everywhere, however, gdb can't hold a candle to the horrible experience it is to use jdb without a graphical frontend. The documentation is about a page and a half, that is all, classes must be fully qualified with packages (which can have dozens of levels) in all commands, and it does not use readline for input!!! No left or right arrow to move the cursor! /rant
Post reply on HN