]> granicus.if.org Git - yasm/commitdiff
Add better handling of functions for stabs debugging. It now looks for a
authorMichael Urman <mu@tortall.net>
Sat, 23 Oct 2004 14:56:50 +0000 (14:56 -0000)
committerMichael Urman <mu@tortall.net>
Sat, 23 Oct 2004 14:56:50 +0000 (14:56 -0000)
potential function as of every bytecode, using the information provided
in revision [1147], and filtering out lables with "." or "$".
  * symrec.c: don't add symrec to bytecode unless added to table.
  * stabs-dbgfmt.c: remove old inefficient code to use new sym lookup.
  * tests/*: create first test, using a copy of elftest.asm.

svn path=/trunk/yasm/; revision=1167

libyasm/symrec.c
modules/dbgfmts/stabs/Makefile.inc
modules/dbgfmts/stabs/stabs-dbgfmt.c
modules/dbgfmts/stabs/tests/Makefile.inc [new file with mode: 0644]
modules/dbgfmts/stabs/tests/stabs-elf.asm [new file with mode: 0644]
modules/dbgfmts/stabs/tests/stabs-elf.errwarn [new file with mode: 0644]
modules/dbgfmts/stabs/tests/stabs-elf.hex [new file with mode: 0644]
modules/dbgfmts/stabs/tests/stabs_test.sh [new file with mode: 0755]

index 880a7873d8179754c3b776964c30a9f5f9fea46d..10741a234eaab589fb87a997e1481adaf9d64d95 100644 (file)
@@ -220,7 +220,7 @@ yasm_symtab_define_label(yasm_symtab *symtab, const char *name,
     yasm_symrec *rec;
     rec = symtab_define(symtab, name, SYM_LABEL, in_table, line);
     rec->value.precbc = precbc;
-    if (precbc)
+    if (in_table && precbc)
        yasm_bc__add_symrec(precbc, rec);
     return rec;
 }
index b7b2b41188a12956eeceb2cfb484420a49cc7e0a..a510850e69afbf8158939fb64445830396130712 100644 (file)
@@ -6,3 +6,6 @@ dbgfmt_stabs_la_SOURCES = modules/dbgfmts/stabs/stabs-dbgfmt.c
 dbgfmt_stabs_la_LDFLAGS = -module -avoid-version -no-undefined
 dbgfmt_stabs_la_LIBADD = libyasm.la
 YASM_MODULES += -dlopen dbgfmt_stabs.la
+
+EXTRA_DIST += modules/dbgfmts/stabs/tests/Makefile.inc
+include modules/dbgfmts/stabs/tests/Makefile.inc
index 4ebe08c8fc3383537da0964ff4d8e77a324eaec0..cd2bc025ce5f08ef6dc029e5084f58aacd387b3c 100644 (file)
@@ -101,8 +101,8 @@ typedef struct {
 
     yasm_section *stab;                /* sections to which stabs, stabstrs appended */
     yasm_section *stabstr;
-    yasm_symrec *firstsym;     /* track leading sym of section/function */
-    yasm_bytecode *firstbc;    /* and its bytecode */
+
+    yasm_bytecode *basebc;      /* base bytecode from which to track SLINEs */
 
     yasm_dbgfmt_stabs *dbgfmt_stabs;
 } stabs_info;
@@ -117,13 +117,6 @@ typedef struct {
     unsigned long value;               /* fallthrough value if above NULL */
 } stabs_stab;
 
-/* helper struct for finding first sym (and bytecode) of a section */
-typedef struct {
-    yasm_symrec *sym;
-    yasm_bytecode *precbc;
-    yasm_section *sect;
-} stabs_symsect;
-
 /* Bytecode types */
 
 typedef struct {
@@ -258,41 +251,33 @@ stabs_dbgfmt_append_stab(stabs_info *info, yasm_section *sect,
     return stab;
 }
 
-/* Update current first sym and bytecode if it's in the right section */
-static int
-stabs_dbgfmt_first_sym_traversal(yasm_symrec *sym, void *d)
+static void
+stabs_dbgfmt_generate_n_fun(stabs_info *info, yasm_bytecode *bc)
 {
-    stabs_symsect *symsect = (stabs_symsect *)d;
-    yasm_bytecode *precbc;
-
-    if (!yasm_symrec_get_label(sym, &precbc))
-       return 1;
-    if ((precbc->section == symsect->sect)
-       && ((symsect->sym == NULL)
-           || precbc->offset < symsect->precbc->offset))
+    /* check all syms at this bc for potential function syms */
+    int bcsym;
+    for (bcsym=0; bc->symrecs && bc->symrecs[bcsym]; bcsym++)
     {
-       symsect->sym = sym;
-       symsect->precbc = precbc;
-    }
-    return 1;
-}
+        char *str;
+        yasm_symrec *sym = bc->symrecs[bcsym];
+        const char *name = yasm_symrec_get_name(sym);
 
-/* Find the first sym and its preceding bytecode in a given section */
-static void
-stabs_dbgfmt_first_sym_by_sect(yasm_dbgfmt_stabs *dbgfmt_stabs,
-                              stabs_info *info, yasm_section *sect)
-{
-    stabs_symsect symsect = { NULL, NULL, NULL };
-    if (sect == NULL) {
-       info->firstsym = NULL;
-       info->firstbc = NULL;
-    }
+        /* best guess algorithm - ignore labels containing a . or $ */
+        if (strchr(name, '.') || strchr(name, '$'))
+            continue;
+
+        /* if a function, update basebc, and output a funcname:F1 stab */
+        info->basebc = bc;
 
-    symsect.sect = sect;
-    yasm_symtab_traverse(dbgfmt_stabs->symtab, (void *)&symsect,
-                        stabs_dbgfmt_first_sym_traversal);
-    info->firstsym = symsect.sym;
-    info->firstbc = symsect.precbc;
+        str = yasm_xmalloc(strlen(name)+4);
+        strcpy(str, name);
+        strcat(str, ":F1");
+       stabs_dbgfmt_append_stab(info, info->stab,
+                                stabs_dbgfmt_append_bcstr(info->stabstr, str),
+                                N_FUN, 0, sym, info->basebc, 0);
+       yasm_xfree(str);
+        break;
+    }
 }
 
 static int
@@ -302,17 +287,22 @@ stabs_dbgfmt_generate_bcs(yasm_bytecode *bc, void *d)
     yasm_linemap_lookup(info->dbgfmt_stabs->linemap, bc->line, &info->curfile,
                        &info->curline);
 
+    /* check for new function */
+    stabs_dbgfmt_generate_n_fun(info, bc);
+
     if (info->lastfile != info->curfile) {
        info->lastline = 0; /* new file, so line changes */
        /*stabs_dbgfmt_append_stab(info, info->stab,
            stabs_dbgfmt_append_bcstr(info->stabstr, info->curfile),
            N_SOL, 0, NULL, bc, 0);*/
     }
-    if (info->curline != info->lastline) {
+
+    /* output new line stabs if there's a basebc (known function) */
+    if (info->basebc != NULL && info->curline != info->lastline) {
        info->lastline = bc->line;
        stabs_dbgfmt_append_stab(info, info->stab, NULL, N_SLINE,
                                 info->curline, NULL, NULL,
-                                bc->offset - info->firstbc->offset);
+                                bc->offset - info->basebc->offset);
     }
 
     info->lastline = info->curline;
@@ -327,18 +317,11 @@ stabs_dbgfmt_generate_sections(yasm_section *sect, /*@null@*/ void *d)
     stabs_info *info = (stabs_info *)d;
     const char *sectname=yasm_section_get_name(sect);
 
-    stabs_dbgfmt_first_sym_by_sect(info->dbgfmt_stabs, info, sect);
-    if (yasm__strcasecmp(sectname, ".text")==0) {
-       char *str;
-       const char *symname=yasm_symrec_get_name(info->firstsym);
-       str = yasm_xmalloc(strlen(symname)+4);
-       strcpy(str, symname);
-       strcat(str, ":F1");
-       stabs_dbgfmt_append_stab(info, info->stab,
-                                stabs_dbgfmt_append_bcstr(info->stabstr, str),
-                                N_FUN, 0, info->firstsym, info->firstbc, 0);
-       yasm_xfree(str);
-    }
+    /* each section has a different base symbol */
+    info->basebc = NULL;
+    
+    /* handle first (pseudo) bc separately */
+    stabs_dbgfmt_generate_n_fun(d, yasm_section_bcs_first(sect));
 
     yasm_section_bcs_traverse(sect, d, stabs_dbgfmt_generate_bcs);
 
@@ -361,7 +344,8 @@ stabs_dbgfmt_generate(yasm_dbgfmt *dbgfmt)
     yasm_bytecode *dbgbc;
     stabs_bc_stab *dbgbc_stab;
     stabs_stab *stab;
-    yasm_bytecode *filebc, *nullbc, *laststr;
+    yasm_bytecode *filebc, *nullbc, *laststr, *firstbc;
+    yasm_symrec *firstsym;
     yasm_section *stext;
 
     /* Stablen is determined by arch/machine */
@@ -416,11 +400,11 @@ stabs_dbgfmt_generate(yasm_dbgfmt *dbgfmt)
     filebc = stabs_dbgfmt_append_bcstr(info.stabstr, dbgfmt_stabs->filename);
 
     stext = yasm_object_find_general(dbgfmt_stabs->object, ".text");
-    info.firstsym = yasm_symtab_use(dbgfmt_stabs->symtab, ".text", 0);
-    info.firstbc = yasm_section_bcs_first(stext);
+    firstsym = yasm_symtab_use(dbgfmt_stabs->symtab, ".text", 0);
+    firstbc = yasm_section_bcs_first(stext);
     /* N_SO file stab */
     stabs_dbgfmt_append_stab(&info, info.stab, filebc, N_SO, 0,
-                            info.firstsym, info.firstbc, 0);
+                            firstsym, firstbc, 0);
 
     yasm_object_sections_traverse(dbgfmt_stabs->object, (void *)&info,
                                  stabs_dbgfmt_generate_sections);
diff --git a/modules/dbgfmts/stabs/tests/Makefile.inc b/modules/dbgfmts/stabs/tests/Makefile.inc
new file mode 100644 (file)
index 0000000..7e2e2ec
--- /dev/null
@@ -0,0 +1,8 @@
+# $Id$
+
+EXTRA_DIST += modules/dbgfmts/stabs/tests/stabs_test.sh
+TESTS += modules/dbgfmts/stabs/tests/stabs_test.sh
+
+EXTRA_DIST += modules/dbgfmts/stabs/tests/stabs-elf.asm
+EXTRA_DIST += modules/dbgfmts/stabs/tests/stabs-elf.errwarn
+EXTRA_DIST += modules/dbgfmts/stabs/tests/stabs-elf.hex
diff --git a/modules/dbgfmts/stabs/tests/stabs-elf.asm b/modules/dbgfmts/stabs/tests/stabs-elf.asm
new file mode 100644 (file)
index 0000000..f88457e
--- /dev/null
@@ -0,0 +1,83 @@
+; test source file for assembling to ELF
+; copied from cofftest.asm;  s/_//g  s/coff/elf/g
+; build with (under Linux, for example):
+;    yasm -f elf elftest.asm
+;    gcc -o elftest elftest.c elftest.o
+
+; This file should test the following:
+; [1] Define and export a global text-section symbol
+; [2] Define and export a global data-section symbol
+; [3] Define and export a global BSS-section symbol
+; [4] Define a non-global text-section symbol
+; [5] Define a non-global data-section symbol
+; [6] Define a non-global BSS-section symbol
+; [7] Define a COMMON symbol
+; [8] Define a NASM local label
+; [9] Reference a NASM local label
+; [10] Import an external symbol
+; [11] Make a PC-relative call to an external symbol
+; [12] Reference a text-section symbol in the text section
+; [13] Reference a data-section symbol in the text section
+; [14] Reference a BSS-section symbol in the text section
+; [15] Reference a text-section symbol in the data section
+; [16] Reference a data-section symbol in the data section
+; [17] Reference a BSS-section symbol in the data section
+
+[BITS 32]
+[GLOBAL lrotate]       ; [1]
+[GLOBAL greet]         ; [1]
+[GLOBAL asmstr]                ; [2]
+[GLOBAL textptr]       ; [2]
+[GLOBAL selfptr]       ; [2]
+[GLOBAL integer]       ; [3]
+[EXTERN printf]                ; [10]
+[COMMON commvar 4]     ; [7]
+
+[SECTION .text]
+
+; prototype: long lrotate(long x, int num);
+lrotate:                       ; [1]
+         push ebp
+         mov ebp,esp
+         mov eax,[ebp+8]
+         mov ecx,[ebp+12]
+.label   rol eax,1             ; [4] [8]
+         loop .label           ; [9] [12]
+         mov esp,ebp
+         pop ebp
+         ret
+
+; prototype: void greet(void);
+greet    mov eax,[integer]     ; [14]
+         inc eax
+         mov [localint],eax    ; [14]
+         push dword [commvar]
+         mov eax,[localptr]    ; [13]
+         push dword [eax]
+         push dword [integer]  ; [1] [14]
+         push dword printfstr  ; [13]
+         call printf           ; [11]
+         add esp,16
+         ret
+
+[SECTION .data]
+
+; a string
+asmstr   db 'hello, world', 0  ; [2]
+
+; a string for Printf
+printfstr db "integer==%d, localint==%d, commvar=%d"
+         db 10, 0
+
+; some pointers
+localptr  dd localint          ; [5] [17]
+textptr  dd greet              ; [15]
+selfptr  dd selfptr            ; [16]
+
+[SECTION .bss]
+
+; an integer
+integer  resd 1                        ; [3]
+
+; a local integer
+localint  resd 1               ; [6]
diff --git a/modules/dbgfmts/stabs/tests/stabs-elf.errwarn b/modules/dbgfmts/stabs/tests/stabs-elf.errwarn
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/modules/dbgfmts/stabs/tests/stabs-elf.hex b/modules/dbgfmts/stabs/tests/stabs-elf.hex
new file mode 100644 (file)
index 0000000..335bfa3
--- /dev/null
@@ -0,0 +1,1600 @@
+7f 
+45 
+4c 
+46 
+01 
+01 
+01 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+01 
+00 
+03 
+00 
+01 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+60 
+04 
+00 
+00 
+00 
+00 
+00 
+00 
+34 
+00 
+00 
+00 
+00 
+00 
+28 
+00 
+0c 
+00 
+01 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+55 
+89 
+e5 
+8b 
+45 
+08 
+8b 
+4d 
+0c 
+d1 
+c0 
+e2 
+fc 
+89 
+ec 
+5d 
+c3 
+a1 
+00 
+00 
+00 
+00 
+40 
+a3 
+04 
+00 
+00 
+00 
+ff 
+35 
+00 
+00 
+00 
+00 
+a1 
+34 
+00 
+00 
+00 
+ff 
+30 
+ff 
+35 
+00 
+00 
+00 
+00 
+68 
+0d 
+00 
+00 
+00 
+e8 
+fc 
+ff 
+ff 
+ff 
+81 
+c4 
+10 
+00 
+00 
+00 
+c3 
+12 
+00 
+00 
+00 
+01 
+08 
+00 
+00 
+18 
+00 
+00 
+00 
+01 
+08 
+00 
+00 
+1e 
+00 
+00 
+00 
+01 
+11 
+00 
+00 
+23 
+00 
+00 
+00 
+01 
+07 
+00 
+00 
+2b 
+00 
+00 
+00 
+01 
+08 
+00 
+00 
+30 
+00 
+00 
+00 
+01 
+07 
+00 
+00 
+35 
+00 
+00 
+00 
+02 
+10 
+00 
+00 
+68 
+65 
+6c 
+6c 
+6f 
+2c 
+20 
+77 
+6f 
+72 
+6c 
+64 
+00 
+69 
+6e 
+74 
+65 
+67 
+65 
+72 
+3d 
+3d 
+25 
+64 
+2c 
+20 
+6c 
+6f 
+63 
+61 
+6c 
+69 
+6e 
+74 
+3d 
+3d 
+25 
+64 
+2c 
+20 
+63 
+6f 
+6d 
+6d 
+76 
+61 
+72 
+3d 
+25 
+64 
+0a 
+00 
+04 
+00 
+00 
+00 
+11 
+00 
+00 
+00 
+3c 
+00 
+00 
+00 
+34 
+00 
+00 
+00 
+01 
+08 
+00 
+00 
+38 
+00 
+00 
+00 
+01 
+02 
+00 
+00 
+3c 
+00 
+00 
+00 
+01 
+07 
+00 
+00 
+01 
+00 
+00 
+00 
+00 
+00 
+18 
+00 
+17 
+00 
+00 
+00 
+01 
+00 
+00 
+00 
+64 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+03 
+00 
+00 
+00 
+24 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+44 
+00 
+28 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+44 
+00 
+29 
+00 
+01 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+44 
+00 
+2a 
+00 
+03 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+44 
+00 
+2b 
+00 
+06 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+44 
+00 
+2c 
+00 
+09 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+44 
+00 
+2d 
+00 
+0b 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+44 
+00 
+2e 
+00 
+0d 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+44 
+00 
+2f 
+00 
+0f 
+00 
+00 
+00 
+0e 
+00 
+00 
+00 
+24 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+44 
+00 
+30 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+44 
+00 
+33 
+00 
+01 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+44 
+00 
+34 
+00 
+06 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+44 
+00 
+35 
+00 
+07 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+44 
+00 
+36 
+00 
+0c 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+44 
+00 
+37 
+00 
+12 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+44 
+00 
+38 
+00 
+17 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+44 
+00 
+39 
+00 
+19 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+44 
+00 
+3a 
+00 
+1f 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+44 
+00 
+3b 
+00 
+24 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+44 
+00 
+3c 
+00 
+29 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+44 
+00 
+3d 
+00 
+2f 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+64 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+14 
+00 
+00 
+00 
+01 
+02 
+00 
+00 
+20 
+00 
+00 
+00 
+01 
+0a 
+00 
+00 
+8c 
+00 
+00 
+00 
+01 
+0b 
+00 
+00 
+28 
+01 
+00 
+00 
+01 
+09 
+00 
+00 
+00 
+2d 
+00 
+6c 
+72 
+6f 
+74 
+61 
+74 
+65 
+3a 
+46 
+31 
+00 
+67 
+72 
+65 
+65 
+74 
+3a 
+46 
+31 
+00 
+00 
+00 
+2e 
+74 
+65 
+78 
+74 
+00 
+2e 
+64 
+61 
+74 
+61 
+00 
+2e 
+62 
+73 
+73 
+00 
+2e 
+72 
+65 
+6c 
+2e 
+74 
+65 
+78 
+74 
+00 
+2e 
+72 
+65 
+6c 
+2e 
+64 
+61 
+74 
+61 
+00 
+2e 
+73 
+74 
+61 
+62 
+00 
+2e 
+72 
+65 
+6c 
+2e 
+73 
+74 
+61 
+62 
+00 
+2e 
+73 
+74 
+61 
+62 
+73 
+74 
+72 
+00 
+2e 
+73 
+74 
+72 
+74 
+61 
+62 
+00 
+2e 
+73 
+79 
+6d 
+74 
+61 
+62 
+00 
+2e 
+73 
+68 
+73 
+74 
+72 
+74 
+61 
+62 
+00 
+00 
+00 
+00 
+00 
+2d 
+00 
+6c 
+72 
+6f 
+74 
+61 
+74 
+65 
+00 
+67 
+72 
+65 
+65 
+74 
+00 
+61 
+73 
+6d 
+73 
+74 
+72 
+00 
+74 
+65 
+78 
+74 
+70 
+74 
+72 
+00 
+73 
+65 
+6c 
+66 
+70 
+74 
+72 
+00 
+69 
+6e 
+74 
+65 
+67 
+65 
+72 
+00 
+70 
+72 
+69 
+6e 
+74 
+66 
+00 
+63 
+6f 
+6d 
+6d 
+76 
+61 
+72 
+00 
+2e 
+6e 
+5f 
+73 
+6f 
+00 
+70 
+72 
+69 
+6e 
+74 
+66 
+73 
+74 
+72 
+00 
+6c 
+6f 
+63 
+61 
+6c 
+70 
+74 
+72 
+00 
+6c 
+6f 
+63 
+61 
+6c 
+69 
+6e 
+74 
+00 
+6c 
+72 
+6f 
+74 
+61 
+74 
+65 
+2e 
+6c 
+61 
+62 
+65 
+6c 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+01 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+04 
+00 
+f1 
+ff 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+03 
+00 
+04 
+00 
+61 
+00 
+00 
+00 
+09 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+04 
+00 
+58 
+00 
+00 
+00 
+04 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+08 
+00 
+4f 
+00 
+00 
+00 
+34 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+06 
+00 
+45 
+00 
+00 
+00 
+0d 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+06 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+03 
+00 
+06 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+03 
+00 
+08 
+00 
+3f 
+00 
+00 
+00 
+40 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+04 
+00 
+03 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+10 
+00 
+04 
+00 
+0b 
+00 
+00 
+00 
+11 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+10 
+00 
+04 
+00 
+11 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+10 
+00 
+06 
+00 
+18 
+00 
+00 
+00 
+38 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+10 
+00 
+06 
+00 
+20 
+00 
+00 
+00 
+3c 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+10 
+00 
+06 
+00 
+28 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+10 
+00 
+08 
+00 
+30 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+10 
+00 
+00 
+00 
+37 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+04 
+00 
+00 
+00 
+10 
+00 
+f2 
+ff 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+4f 
+00 
+00 
+00 
+03 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+74 
+02 
+00 
+00 
+59 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+3f 
+00 
+00 
+00 
+03 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+d0 
+02 
+00 
+00 
+6f 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+47 
+00 
+00 
+00 
+02 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+40 
+03 
+00 
+00 
+20 
+01 
+00 
+00 
+02 
+00 
+00 
+00 
+0a 
+00 
+00 
+00 
+04 
+00 
+00 
+00 
+10 
+00 
+00 
+00 
+01 
+00 
+00 
+00 
+01 
+00 
+00 
+00 
+06 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+40 
+00 
+00 
+00 
+40 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+10 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+12 
+00 
+00 
+00 
+09 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+80 
+00 
+00 
+00 
+38 
+00 
+00 
+00 
+03 
+00 
+00 
+00 
+04 
+00 
+00 
+00 
+04 
+00 
+00 
+00 
+08 
+00 
+00 
+00 
+07 
+00 
+00 
+00 
+01 
+00 
+00 
+00 
+03 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+b8 
+00 
+00 
+00 
+40 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+04 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+1c 
+00 
+00 
+00 
+09 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+f8 
+00 
+00 
+00 
+18 
+00 
+00 
+00 
+03 
+00 
+00 
+00 
+06 
+00 
+00 
+00 
+04 
+00 
+00 
+00 
+08 
+00 
+00 
+00 
+0d 
+00 
+00 
+00 
+08 
+00 
+00 
+00 
+03 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+08 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+04 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+26 
+00 
+00 
+00 
+01 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+10 
+01 
+00 
+00 
+2c 
+01 
+00 
+00 
+0b 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+04 
+00 
+00 
+00 
+0c 
+00 
+00 
+00 
+2c 
+00 
+00 
+00 
+09 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+3c 
+02 
+00 
+00 
+20 
+00 
+00 
+00 
+03 
+00 
+00 
+00 
+09 
+00 
+00 
+00 
+04 
+00 
+00 
+00 
+08 
+00 
+00 
+00 
+36 
+00 
+00 
+00 
+03 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+5c 
+02 
+00 
+00 
+17 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+01 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
diff --git a/modules/dbgfmts/stabs/tests/stabs_test.sh b/modules/dbgfmts/stabs/tests/stabs_test.sh
new file mode 100755 (executable)
index 0000000..64f24f3
--- /dev/null
@@ -0,0 +1,5 @@
+#! /bin/sh
+# $Id$
+# copied from yasm/modules/objfmts/coff/tests/coff_test.sh ; s/coff/stabs/g
+${srcdir}/out_test.sh stabs_test modules/dbgfmts/stabs/tests "stabs dbgfmt" "-f elf -g stabs" ".o"
+exit $?