Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 86725 Details for
Bug 97409
gdbinit file causes error in gdb
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
gdbinit-6.2.diff
gdbinit-6.2.diff (text/plain), 3.13 KB, created by
solar (RETIRED)
on 2006-05-13 20:19:12 UTC
(
hide
)
Description:
gdbinit-6.2.diff
Filename:
MIME Type:
Creator:
solar (RETIRED)
Created:
2006-05-13 20:19:12 UTC
Size:
3.13 KB
patch
obsolete
>--- .gdbinit 2006-05-13 23:13:22.000000000 -0400 >+++ .gdbinit 2006-05-13 23:14:47.000000000 -0400 >@@ -2,7 +2,7 @@ > # > # DESCRIPTION: A user-friendly gdb configuration file. > # >-# REVISION : 6.1-gentoo >+# REVISION : 6.2-gentoo > # > # CONTRIBUTORS: mammon_, elaine, pusillus, mong > # >@@ -12,6 +12,10 @@ > # 'context on' now enables auto-display of context screen > # > # CHANGELOG: >+# Version 6.2-gentoo >+# $SHOW_CONTEXT variable does not appear to work within defines. >+# so just show it always. but with dont-repeat set. >+# taviso - more powerful assemble macro > # Version 6.1-gentoo > # made gas the default. some content censored to be *cough* > # politically correct. -solar >@@ -794,16 +798,8 @@ > # _____________________misc_____________________ > # this makes 'context' be called at every BP/step > define hook-stop >- if ( $SHOW_CONTEXT > 0 ) >- context >- end >- if ( $SHOW_NEST_INSN > 0 ) >- set $x = $_nest >- while ($x > 0 ) >- printf "\t" >- set $x = $x - 1 >- end >- end >+ dont-repeat >+ context > end > > define nasm_assemble >@@ -818,14 +814,57 @@ > Usage: nasm_assemble > end > >+# A more powerful assemble macro. >+# Tavis Ormandy <taviso@gentoo.org>, 8 May 2006. > define assemble >-printf "Type code to assemble, hit Ctrl-D until results appear :)\n" >+ # dont enter routine again if user hits enter >+ dont-repeat >+ if ($argc) >+ if (*$arg0 = *$arg0) >+ # check if we have a valid address by dereferencing it, >+ # if we havnt, this will cause the routine to exit. >+ end >+ printf "Instructions will be written to %#x.\n", $arg0 >+ else >+ printf "Instructions will be written to stdout.\n" >+ end >+ printf "Type instructions, one per line.\n" >+ printf "End with a line saying just \"end\".\n" >+ if ($argc) >+ # argument specified, assemble instructions into memory >+ # at address specified. >+ shell nasm -f bin -o /dev/stdout /dev/stdin \ >+ <<< "$( echo "BITS 32"; while read -ep '>' r && test "$r" != end; \ >+ do echo -E "$r"; done )" | hexdump -ve \ >+ '1/1 "set *((unsigned char *) $arg0 + %#2_ax) = %#02x\n"' \ >+ > ~/.gdbassemble >+ # load the file containing set instructions >+ source ~/.gdbassemble >+ # all done. >+ shell rm -f ~/.gdbassemble >+ else >+ # no argument, assemble instructions to stdout >+ shell nasm -f bin -o /dev/stdout /dev/stdin \ >+ <<< "$( echo "BITS 32"; while read -ep '>' r && test "$r" != end; \ >+ do echo -E "$r"; done )" | ndisasm -i -b32 /dev/stdin >+ end >+end >+document assemble >+Assemble instructions using nasm. >+Type a line containing "end" to indicate the end. >+If an address is specified, insert instructions at that address. >+If no address is specified, assembled instructions are printed to stdout. >+Use the pseudo instruction "org ADDR" to set the base address. >+end >+ >+define gassemble >+printf "Type code to gassemble, hit Ctrl-D until results appear :)\n" > printf "Note that this command uses GAS (AT&T syntax) to assemble.\n" > shell as -o ~/__gdb_tmp.bin > shell objdump -d -j .text --adjust-vma=$arg0 ~/__gdb_tmp.bin > shell rm ~/__gdb_tmp.bin > end >-document assemble >+document gassemble > Assemble Intel x86 instructions to binary opcodes using gas and objdump > Usage: assemble address > end
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 97409
:
78161
|
78162
| 86725