Skip to content

Instantly share code, notes, and snippets.

@kraiskil
Created August 19, 2014 10:29
Show Gist options
  • Save kraiskil/d82c4f7b1c78b3deaeaa to your computer and use it in GitHub Desktop.
Save kraiskil/d82c4f7b1c78b3deaeaa to your computer and use it in GitHub Desktop.
for cgdb issue #47
Breaking gdb:
#echo 'q' | gdb --annotate=2 | hexdump -c
0000000 G N U g d b ( U b u n t u
0000010 7 . 7 - 0 u b u n t u 3 . 1 )
0000020 7 . 7 \n C o p y r i g h t ( C
0000030 ) 2 0 1 4 F r e e S o f t
0000040 w a r e F o u n d a t i o n ,
0000050 I n c . \n L i c e n s e G P
0000060 L v 3 + : G N U G P L v e
0000070 r s i o n 3 o r l a t e r
0000080 < h t t p : / / g n u . o r g
0000090 / l i c e n s e s / g p l . h t
00000a0 m l > \n T h i s i s f r e e
00000b0 s o f t w a r e : y o u a
00000c0 r e f r e e t o c h a n g
00000d0 e a n d r e d i s t r i b u
00000e0 t e i t . \n T h e r e i s
00000f0 N O W A R R A N T Y , t o
0000100 t h e e x t e n t p e r m i
0000110 t t e d b y l a w . T y
0000120 p e " s h o w c o p y i n g
0000130 " \n a n d " s h o w w a r r
0000140 a n t y " f o r d e t a i l
0000150 s . \n T h i s G D B w a s
0000160 c o n f i g u r e d a s " a
0000170 r m - l i n u x - g n u e a b i
0000180 h f " . \n T y p e " s h o w
0000190 c o n f i g u r a t i o n " f
00001a0 o r c o n f i g u r a t i o n
00001b0 d e t a i l s . \n F o r b u
00001c0 g r e p o r t i n g i n s t
00001d0 r u c t i o n s , p l e a s e
00001e0 s e e : \n < h t t p : / / w w
00001f0 w . g n u . o r g / s o f t w a
0000200 r e / g d b / b u g s / > . \n F
0000210 i n d t h e G D B m a n u
0000220 a l a n d o t h e r d o c
0000230 u m e n t a t i o n r e s o u
0000240 r c e s o n l i n e a t : \n
0000250 < h t t p : / / w w w . g n u .
0000260 o r g / s o f t w a r e / g d b
0000270 / d o c u m e n t a t i o n / >
0000280 . \n F o r h e l p , t y p e
0000290 " h e l p " . \n T y p e " a
00002a0 p r o p o s w o r d " t o
00002b0 s e a r c h f o r c o m m a
00002c0 n d s r e l a t e d t o "
00002d0 w o r d " . \n \n 032 032 p r e - p r
00002e0 o m p t \n ( g d b ) \n 032 032 p r
00002f0 o m p t \n \n 032 032 p o s t - p r o
0000300 m p t \n
0000304
working gdb:
$ echo 'q' | /opt/gdb/7.7/bin/gdb --annotate=2 | hexdump -c
0000000 G N U g d b ( G D B ) 7 .
0000010 7 \n C o p y r i g h t ( C )
0000020 2 0 1 4 F r e e S o f t w a
0000030 r e F o u n d a t i o n , I
0000040 n c . \n L i c e n s e G P L v
0000050 3 + : G N U G P L v e r s
0000060 i o n 3 o r l a t e r <
0000070 h t t p : / / g n u . o r g / l
0000080 i c e n s e s / g p l . h t m l
0000090 > \n T h i s i s f r e e s
00000a0 o f t w a r e : y o u a r e
00000b0 f r e e t o c h a n g e
00000c0 a n d r e d i s t r i b u t e
00000d0 i t . \n T h e r e i s N O
00000e0 W A R R A N T Y , t o t h
00000f0 e e x t e n t p e r m i t t
0000100 e d b y l a w . T y p e
0000110 " s h o w c o p y i n g " \n
0000120 a n d " s h o w w a r r a n
0000130 t y " f o r d e t a i l s .
0000140 \n T h i s G D B w a s c o
0000150 n f i g u r e d a s " a r m
0000160 v 7 l - u n k n o w n - l i n u
0000170 x - g n u e a b i h f " . \n T y
0000180 p e " s h o w c o n f i g u
0000190 r a t i o n " f o r c o n f
00001a0 i g u r a t i o n d e t a i l
00001b0 s . \n F o r b u g r e p o r
00001c0 t i n g i n s t r u c t i o n
00001d0 s , p l e a s e s e e : \n <
00001e0 h t t p : / / w w w . g n u . o
00001f0 r g / s o f t w a r e / g d b /
0000200 b u g s / > . \n F i n d t h e
0000210 G D B m a n u a l a n d
0000220 o t h e r d o c u m e n t a t
0000230 i o n r e s o u r c e s o n
0000240 l i n e a t : \n < h t t p : /
0000250 / w w w . g n u . o r g / s o f
0000260 t w a r e / g d b / d o c u m e
0000270 n t a t i o n / > . \n F o r h
0000280 e l p , t y p e " h e l p "
0000290 . \n T y p e " a p r o p o s
00002a0 w o r d " t o s e a r c h
00002b0 f o r c o m m a n d s r e l
00002c0 a t e d t o " w o r d " . \n
00002d0 \n 032 032 p r e - p r o m p t \n ( g
00002e0 d b ) \n 032 032 p r o m p t \n \n 032
00002f0 032 p o s t - p r o m p t \n
00002fd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment