45 ms·
GDB 8.1 Released
- rom1v 9y agoCool, but why are the release checksums in MD5?
- bjoli 9y agoI don't know, but they also have gpg .sig-files in the download folder.
- dmm 9y agoMD5 is fine for verifying a download is not corrupted, so that's probably the intended use.
- lucb1e 9y agoFor that purpose, TCP already includes a CRC32. I'd say cryptographic hashes are generally meant for more than corrupted downloads.
- alanfranzoni 9y agoWhich is not that hard to fool on large files with multiple, sistemic errors.
- harikb 9y agoFile checksums are typically used when the checksum is still on the master site but the file could be in untrusted mirrors. TCP level stuff is useless in those scenarios.
- guipsp 9y agoSo is md5
- rwmj 9y agoI have a machine which randomly zeroes blocks of 32 bytes in HTTP downloads [thought to be a cache-related fault] and TCP doesn't catch this.
- tonyg 9y agoTCP's checksum isn't even as good as CRC32. It's just a one's-complement sum of the packet and a few header words. From this [0] helpful StackOverflow post: > If you need to transfer data and you want to be sure the data didn't get corrupted, the TCP checksum alone is certainly not enough for this task. I would even dare to say that a CRC checksum is not enough for this task, since a CRC32 may not detect an error where more than 32 bits in a row are affected (these errors can "cancel out" each other). The minimum checksum you'd need for ensuring flawless data transfer is the MD5 value of the data. [0] https://stackoverflow.com/questions/3830206/can-a-tcp-checksum-produce-a-false-positive-if-yes-how-is-this-dealt-with https://stackoverflow.com/questions/3830206/can-a-tcp-checks...
- Boxxed 9y agoAh yes, the standard nitpicky dismissive HN comment makes its appearance.
- qubex 9y agoI’m quite amazed we’ve made it to 33 comments without somebody complaining it the project hasn’t been retooled with Rust/Clojure/Node.js yet.
- Maken 9y agoThere is no point on reimplementing GDB yet, you need first a legacy debugger with proper Rust support until the new one can debug itself.
- rom1v 9y agoFair enough. I had nothing interesting to say about the new GDB release, but the checksum used surprised me. Hence the question.
- Rexxar 9y agoI see just a question, nothing "nitpicky dismissive" ? Has the comment been edited into a more neutral tone ?
- zython 9y ago> New shortcuts for TUI Single-Key mode: 'i' for stepi, and 'o' for nexti; TUI really is one of the best features to really get into gdb. visually stepping through the disassembly really makes debugging more appealing, I really wish they dont abandon this aspect of gdb
- scottlu2 9y agoTry cgdb.
- bch 9y agoSince I was curious enough to look it up: https://cgdb.github.io/ https://cgdb.github.io/
- erk__ 9y agoMy favorite visual gdb interface is the one build into emacs esspecially with gbd-many-mode
- simark1 9y agoGDB developers use it extensively, so it's not going to disappear anytime soon. Of course it's far from perfect and there are better visual interfaces for GDB, but the fact that it's a keystroke away is its strong point.
- zython 9y agoSeems like a I cannot edit my post, but I just remembered this brilliant short talk (15min) about gdb's TUI. https://www.youtube.com/watch?v=PorfLSr3DDI https://www.youtube.com/watch?v=PorfLSr3DDI It really did change my opinion of gdb in just 15 min.
- jhasse 9y agoWhy not use a real GUI frontend like Visual Studio Code instead?
- flukus 9y ago
- purplezooey 9y agoheh. Has anyone ever used gdb to debug Pascal? :)
- gramstrong 9y agoI might have used it to debug Ada, which is like Pascal, back when I was in school.
- rivert 9y agoI have to, on a regular basis actually and I'm glad gdb and FPC work well together.
- agumonkey 9y agoNice to hear, I have a pascal lisp project I need to revive, having gdb on my side would help
- purplezooey 9y agoThat's awesome! They taught Pascal in my CS undergrad classes.
- kazinator 9y agoI'd really like a way for a program to have an API for interacting with GDB: with that it could tell "I'm running under a debugger". There would be a file descriptor which talks to the debugger, if the debugger is present. Output sent to it goes to the debugger and perhaps it could obtain input from the debugger also. Maybe the API could provide some introspection: the program could ask what breakpoints have been set and things like that.
- wazari972 9y agothis is not particularly hard to do with the Python interface: you define structures that are known by the process and the Python module + global variables, then you set an internal (silent) breakpoint on a given 'event' function. In the program you fill the structure with some queries, and in the Python breakpoint callback, you process it as you need. This is the way multi-thread debugging work (used to at least), shared library detection as well...
- kazinator 9y agoOkay, good ideas there: so the program has some standard dispatch function that can be called to talk to the debugger. Normally that does nothing. The debugger can recognize this function and stick a breakpoint in it to alter the behavior. The function can do something like put a request into a mailbox buffer, and then check for a reply in the inbox buffer. When there is no debugger, there is never any reply. When the debugger stops the show with the breakpoint, it processes the request and prepares a reply, flipping some "reply present" flag; when the program is resumed then, it gets the reply. It would be good not have any of that damned Python monkey business involved in this.
- wazari972 9y ago> It would be good not have any of that damned Python monkey business involved in this. please, GDB internals are open source, you can do all of that in plain C :D That's what I did initially, to give GDB the ability to distinguish user-level threads (see libthread_db). Having a high-level language / interface to GDB is a great again of time !
- xuhu 9y agostarti, rbreak and ptype sound good even if they've been available as idioms before.
- ebeip90 9y agostarti did not exist before, and specifically addresses a StackOverflow question of mine from ~3 years ago: https://reverseengineering.stackexchange.com/questions/8724 https://reverseengineering.stackexchange.com/questions/8724 ptype already existed, but did not print out offsets. This is incredibly useful, and something Windbg does with dt. Pwndbg does this in GDB by adding new commands.
- rurban 9y agoDoes this mean p does not work anymore, because there are now 2 commands starting with p? This would be a shame.
- rurban 9y agoI checked it out. p still works as before. But I needed a C++ patch on osx with cc/clang. Apparently they added cxx files with the .c extension: gdb/probe.c:63 - const any_static_probe_ops any_static_probe_ops; + any_static_probe_ops any_static_probe_ops;
- akrasuski1 9y agoPresumably the stackexchange answer is what OP meant by it being an idiom.