Live data from Hacker News

Learning C with gdb

hackerschool.com

11–20 of 98 posts

Re: Learning C with gdb

#11
post #5
post #3

Here's a more full-featured C++ REPL: http://root.cern.ch/drupal/content/what-cling

...except, that it isn't C++ standard compliant, and you are worse off than when you started out. "full-featured C++" is misleading. http://www.insectnation.org/howto/living-without-root https://linuxfr.org/nodes/18919/comments/632920 http://comments.gmane.org/gmane.comp.lang.c%2B%2B.root/5924

You are making a confusion here, CINT != CLING.

Re: Learning C with gdb

#13
gdb is very nice. I use it with C++ too. Watch sizeof on char arrays. Why is my string's sizeof always 8? That confuses some when starting out.

Re: Learning C with gdb

#14
While graphical debuggers are great overall, there are times when I prefer to get down to the command line and do my debugging there. And quite surprisingly, I don't lose much efficiency there, either.

But then, this could be the story of most command line utilities: Seems fiddly at first, but actually it is quite usable and often times more convenient than all those whiz-bang graphical tools.

Re: Learning C with gdb

#16
post #11
post #5

Earlier quoted context omitted.

...except, that it isn't C++ standard compliant, and you are worse off than when you started out. "full-featured C++" is misleading. http://www.insectnation.org/howto/living-without-root https://linuxfr.org/nodes/18919/comments/632920 http://comments.gmane.org/gmane.comp.lang.c%2B%2B.root/5924

You are making a confusion here, CINT != CLING.

CINT referenced, because CLING hasn't seen deployment and real tests. Maybe in a few years.

Re: Learning C with gdb

#18
Does anyone else think debuggers are awesome for learning how programs/languages work? Its pretty much always the first thing I do, even before reading docs, build and debug.

Re: Learning C with gdb

#20

There was a debugger posted here to HN awhile back that actually displayed structs and pointers graphically. What was the name of that project, and is it still around? I was trying to find it the other day. I thought that was a dynamite tool for students. With LLVM, we should be able to have a REPL for C. as a pedagogical tool.

Perhaps cling? http://root.cern.ch/drupal/content/cling
Post reply on HN