Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-4041-

WTF, gdb?

Name: Anonymous 2012-08-18 19:35

Why the fuck is it so absolutely convoluted just to get it to display a standard 16 byte + ASCII hexdump of what's in memory at a particular address, unlike almost every other debugger out there?

Name: Anonymous 2012-08-18 19:40

Because you're silly and can't use GDB

Name: Anonymous 2012-08-18 19:58

Because it's GNU shitware. Use a real debugger.

Name: Anonymous 2012-08-18 21:31

It's an open source software, it's like crack, free at first, but in the end it will cost you.

Name: Anonymous 2012-08-18 21:49

>>3,4
Fuck you freedom haters I will soon have a Lemote. You'll see.

Name: Anonymous 2012-08-18 22:25

>>5
Still waiting, Lemote.

Name: Anonymous 2012-08-19 0:25

>>5
>>6
Fuck off, fagshits.

Name: Anonymous 2012-08-19 14:55

>>3-4
fuck off and die, freedom haters

Name: Anonymous 2012-08-19 17:16

gdb is actually an acronym for what you exclaim when it doesn't work the way you think it should: God Damn Bastard!

Name: Anonymous 2012-08-19 17:23

>>1
That feature wasn't designed to be easy in GDB. If you like, you should contribute a patch/hire someone else to do it on your behalf.

Name: Anonymous 2012-08-19 18:49

>>1
I know gdb is shit, but in this case the feature is there, you just did not find out about it.

help x

Name: >>11 2012-08-20 3:12

>>1
please respond.

Name: >>12 2012-08-20 3:13

>>1
no thank you?

Name: >>13 2012-08-20 3:14

>>1
fine

Name: Anonymous 2012-08-20 7:18

>>4
Where can I get free crack?!

Name: Anonymous 2012-08-20 9:52

>>15
``free'' cracks are loaded up with viruses, they will steal your credit cards and make your computer slow

Name: Anonymous 2012-08-20 15:06

GDB follows the ``Worse is Better'' philosophy. Create a debugger so terrible and painful to use that it's better to add printfs to your code than to use the debugger.

Name: Anonymous 2012-08-20 15:20

>>17
So I'm not the one who does that.

Name: Anonymous 2012-08-20 16:52

>>17
It's only ``hard'' to use when you don't read the documentation and learn how to use it.

Name: Anonymous 2012-08-20 16:54

>>17
Also,
I've never coded a low-level assembly program on an embedded device before

Name: Anonymous 2012-08-20 17:43

Microsoft makes better debuggers. Even Windbg, the assembly-oriented debugger, is better than gahnoo bullshit.

Name: Anonymous 2012-08-20 19:21

GNU's not usable

Name: linax fanboi 2012-08-20 19:23

>>21
I sadly have to agree.

Name: Anonymous 2012-08-20 19:28

I am laughing so hard about all your stupid comments.
/prog/ is lame

Name: Anonymous 2012-08-20 20:27

>≥ No! fuck u man

Name: Anonymous 2012-08-20 21:08

>>20
I routinely code in assembly for embedded devices and I always use printf (over serial IO) debugging.  I hate debuggers with a passion.

Name: Anonymous 2012-08-20 21:17

>>25                   `
>2012
>not doing crystal meth

Name: Anonymous 2012-08-20 21:32

>>27
inb4 /backcat kebgoes/

Name: Anonymous 2012-08-20 22:49

>>11
19000100  49 20 6B 6E 6F 77 20 61-62 6F 75 74 20 78 2C 20   I know about x,
19000110  62 75 74 20 74 68 61 74-20 64 6F 65 73 6E 27 74   but that doesn't
19000120  20 70 72 69 6E 74 20 6F-75 74 20 61 20 73 74 61    print out a sta
19000130  6E 64 61 72 64 20 68 65-78 64 75 6D 70 2C 20 77   ndard hexdump, w
19000140  68 69 63 68 20 69 6E 20-63 61 73 65 20 79 6F 75   hich in case you
19000150  20 64 6F 6E 27 74 20 6B-6E 6F 77 2C 20 6C 6F 6F    don't know, loo
19000160  6B 73 20 6C 69 6B 65 20-74 68 69 73 2E 00 00 00   ks like this....
19000170  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00   ................

Name: Anonymous 2012-08-20 23:00

>>29

typedef unsigned char u1;
#define times(i,e) for(i=0; i<(e); i++)
static void hd(u1 *P, int S) {
  int X, Y, I;
  times(Y, (S+15)/16) {
    printf("%04X |", Y*16);
    times(X, 16) {
      I = Y*16 + X;
      if ((I&0xf) == 8) printf(" ");
      if (I<S) printf(" %02X", P[I]);
      else printf("   ");
    }
    printf(" |");
    times(X, 16) {
      I = Y*16 + X;
      if (I<S && isprint(P[I]) && P[I]!='\n' && P[I]!='\t') printf("%c", P[I]);
      else printf(" ");
    }
    printf("\n");
  }
}

Name: Anonymous 2012-08-20 23:19

>>30
PIG DISGUSTING

Thanks for reminding me that if it's not Lisp, it's shit

Name: Anonymous 2012-08-20 23:27

>>29
Buy a Lemote.

Name: Anonymous 2012-08-20 23:52

>>32
Fuck off, fagshit.

Name: Anonymous 2012-08-21 0:23

Waito piggu, hand me the lemote.

Name: Anonymous 2012-08-21 3:12

>>30
C's printf is a lot weaker than the Algol 68, PL/I or Common Lisp equivalents.
$16r4d" |", 2(" "8(16r2d" ")), "|"16a, l$
This one simple Algol 68 format prints (or reads) a whole 16-character line of hex dump in the same exact format as your C code. Look at the elegance of that nested replicator.

Name: Anonymous 2012-08-21 3:49

>>29
Looks like hexual sealing.

Name: Anonymous 2012-08-21 23:15

>>35
00000000  49 20 6b 6e 6f 77 20 61  62 6f 75 74 20 78 2c 20  |I know about x, |
00000010  62 75 74 20 74 68 61 74  20 64 6f 65 73 6e 74 20  |but that doesnt |
00000020  70 72 69 6e 74 20 6f 75  74 20 61 20 73 74 61 6e  |print out a stan|
00000030  64 61 72 64 20 68 65 78  64 75 6d 70 2c 20 77 68  |dard hexdump, wh|
00000040  69 63 68 20 69 6e 20 63  61 73 65 20 79 6f 75 20  |ich in case you |
00000050  64 6f 6e 74 20 6b 6e 6f  77 2c 20 6c 6f 6f 6b 73  |dont know, looks|
00000060  20 6c 69 6b 65 20 74 68  69 73                    | like this|
0000006a

Name: Anonymous 2012-08-22 0:28

>>37

This isn't close enough to strike your fancy?


(gdb) x/32x 0x08048732
0x8048732 <main+3>:     0x81f0e483      0x0068f0ec      0x2444c700      0x00680008
0x8048742 <main+19>:    0x2444c700      0x00000004      0x24448d00      0x2404891c
0x8048752 <main+35>:    0xfffcd5e8      0x2444c7ff      0x00006808      0x2444c700
0x8048762 <main+51>:    0x00000004      0x24848d00      0x0000681c      0xe8240489
0x8048772 <main+67>:    0xfffffcb6      0xec2484c7      0x00000068      0xeb000000
0x8048782 <main+83>:    0x24948b28      0x000068ec      0xec24848b      0xc1000068
0x8048792 <main+99>:    0xc1890ae0      0x1c24448d      0x8489c801      0x00688494
0x80487a2 <main+115>:   0x24848300      0x000068ec      0x24bc8301      0x000068ec
(gdb) x/32s 0x08048732
0x8048732 <main+3>:      "\203\344\360\201\354\360h"
0x804873a <main+11>:     ""
0x804873b <main+12>:     "\307D$\b"
0x8048740 <main+17>:     "h"
0x8048742 <main+19>:     ""
0x8048743 <main+20>:     "\307D$\004"
0x8048748 <main+25>:     ""
0x8048749 <main+26>:     ""
0x804874a <main+27>:     ""
0x804874b <main+28>:     "\215D$\034\211\004$\350\325\374\377\377\307D$\bh"
0x804875d <main+46>:     ""
0x804875e <main+47>:     ""
0x804875f <main+48>:     "\307D$\004"
0x8048764 <main+53>:     ""
0x8048765 <main+54>:     ""
0x8048766 <main+55>:     ""
0x8048767 <main+56>:     "\215\204$\034h"
0x804876d <main+62>:     ""
0x804876e <main+63>:     "\211\004$\350\266\374\377\377DŽ$\354h"
0x804877c <main+77>:     ""
0x804877d <main+78>:     ""
0x804877e <main+79>:     ""
0x804877f <main+80>:     ""
0x8048780 <main+81>:     ""
0x8048781 <main+82>:     "\353(\213\224$\354h"
0x8048789 <main+90>:     ""
0x804878a <main+91>:     "\213\204$\354h"
0x8048790 <main+97>:     ""
0x8048791 <main+98>:     "\301\340\n\211\301\215D$\034\001ȉ\204\224\204h"
0x80487a2 <main+115>:    ""
0x80487a3 <main+116>:    "\203\204$\354h"
0x80487a9 <main+122>:    ""
(gdb)

Name: Anonymous 2012-08-22 4:02

>>38

>>37 is poking fun at >>29's hexdump format.  16 bytes per line with the dash in the middle is the classic MS DEBUG style (goes back to CP/M I think).

x is fine as long as you know what you're looking at (bytes, words, ASCII chars) beforehand.  For wild and crazy shit, though, you're going to want to reach for IDA...

Name: Cudder !MhMRSATORI!fR8duoqGZdD/iE5 2012-08-22 6:50

gdb manages to include a lot of relatively obscure features while missing out on a lot of obvious ones.

>>39
Either of >>29 or >>37 is much better than what gdb can do. Bytes + ASCII goes back before CP/M. Possibly early UNIX era.

Even DEBUG is easier to use than gdb, at least its frequently used commands are all 1 character. (I know about the partial match feature, but the documentation is a bit vague.) The "show registers and current instruction after each step" is also very helpful when tracing.

For an example of how the bytes+ASCII has become nearly standard, Google "hexdump" as images and count how many are bytes+ASCII and how many only bytes.

Name: Anonymous 2012-08-22 10:19

>>40
gdb manages to include a lot of relatively obscure features while missing out on a lot of obvious ones.
Because Stallman is a fucking Jew. He provided GCC/GDB to torture goyim.

Name: Anonymous 2012-08-22 11:39

For C programs, trace output is far more efficient than a debugger.

Name: Anonymous 2012-08-22 14:12

>>27
Back to le imagereddits, ``please"!

Name: Anonymous 2012-08-22 14:26

display (char[20]) address

Name: Hipster Stallman 2012-08-22 15:19

>>40,41
gdb manages to include a lot of relatively obscure features while missing out on a lot of obvious ones.
This debug feature's pretty obscure. You've probably never heard of it.

Name: Anonymous 2012-08-22 15:36

>>45
No one needs hex view, when source code is available right away. The point is that Windows debuggers, like SoftICE, were made for crackers to steal other people's code, while GDB was made for programmers who know their code and dont need hex or advanced disassembly.

Name: Anonymous 2012-08-22 16:56

>>46
steal other people's code

Name: Anonymous 2012-08-22 20:41

>>47
?

Name: Anonymous 2012-08-22 22:37

>>47
!

Don't change these.
Name: Email:
Entire Thread Thread List