public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "tg at mirbsd dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug ada/48835] New: Porting GNAT to GNU/Linux/m68k Date: Sat, 30 Apr 2011 15:47:00 -0000 [thread overview] Message-ID: <bug-48835-4@http.gcc.gnu.org/bugzilla/> (raw) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48835 Summary: Porting GNAT to GNU/Linux/m68k Product: gcc Version: 4.4.6 Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: ada AssignedTo: unassigned@gcc.gnu.org ReportedBy: tg@mirbsd.org Created attachment 24151 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24151 first draft Discussion about attempting to port GNAT to GNU/Linux/m68k. I’ve come this far: root@ara5:...mnt/home/tg/Xg/gcc-4.4-4.4.6/b68k/gcc # gdb ./gnat1 GNU gdb (GDB) 7.2-debian Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "m68k-linux-gnu". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from /mnt/home/tg/Xg/gcc-4.4-4.4.6/b68k/gcc/gnat1...done. warning: not using untrusted file ".gdbinit" (gdb) r Starting program: /mnt/home/tg/Xg/gcc-4.4-4.4.6/b68k/gcc/gnat1 #NO_APP .file "<stdin>" Program received signal SIGSEGV, Segmentation fault. 0xc014d428 in memcpy (dstpp=0x8018668a, srcpp=0x80a2688e, len=2149082762) at memcpy.c:61 61 memcpy.c: No such file or directory. in memcpy.c (gdb) bt #0 0xc014d428 in memcpy (dstpp=0x8018668a, srcpp=0x80a2688e, len=2149082762) at memcpy.c:61 #1 0x80137084 in <hostparm___elabs> () at ../../src/gcc/ada/hostparm.ads:54 #2 0x800049cc in adainit () at ada/b_gnat1.c:317 #3 0x80015a3a in gnat_parse_file (set_yydebug=0) at ../../src/gcc/ada/gcc-interface/misc.c:198 #4 0x80459e62 in compile_file (argc=1, argv=0xefe5dc24) at ../../src/gcc/toplev.c:970 #5 do_compile (argc=1, argv=0xefe5dc24) at ../../src/gcc/toplev.c:2197 #6 toplev_main (argc=1, argv=0xefe5dc24) at ../../src/gcc/toplev.c:2229 #7 0xc00fae68 in __libc_start_main (main=0x802a29e4 <main>, argc=1, ubp_av=0xefe5dc24, init=0x806dadd0 <__libc_csu_init>, fini=0x806dadc8 <__libc_csu_fini>, rtld_fini=0xc000d320 <_dl_fini>, stack_end=0xefe5dc24) at libc-start.c:228 #8 0x80003a6e in _start () (gdb) frame 1 #1 0x80137084 in <hostparm___elabs> () at ../../src/gcc/ada/hostparm.ads:54 54 Normalized_CWD : constant String := "." & Direct_Separator; (gdb) disas Dump of assembler code for function hostparm___elabs: 0x80136ef0 <+0>: linkw %fp,#0 0x80136ef4 <+4>: moveml %d2-%d7,%sp@- 0x80136ef8 <+8>: movel 0x806db078 <__gnat_vmsp>,%d0 0x80136efe <+14>: sne %d0 0x80136f00 <+16>: negb %d0 0x80136f02 <+18>: moveb %d0,0x807eff68 <hostparm__openvms> 0x80136f08 <+24>: moveb 0x807ab130 <__gnat_dir_separator>,%d2 0x80136f0e <+30>: movel #-2140172272,%d0 0x80136f14 <+36>: movel #-2140172268,%d1 0x80136f1a <+42>: andil #255,%d2 0x80136f20 <+48>: movel %d2,%sp@- 0x80136f22 <+50>: movel %d1,%sp@- 0x80136f24 <+52>: movel %d0,%sp@- 0x80136f26 <+54>: jsr 0x80187a8a <system__string_ops__str_concat_sc> […] See how %d0 and %d1 (arguments to System.String_Ops.Str_Concat) have immense sizes. I don’t know the Ada calling conventions though, and three things are pushed, yet "." is a one-byte string, and Direct_Separator is only a char. This matches the “len” argument to memcpy. (gdb) info r d0 0x1 1 d1 0xf 15 d2 0x8018668a -2145884534 d3 0xf 15 d4 0x1c 28 d5 0x1 1 d6 0x1 1 d7 0x1 1 a0 0x8018668a 0x8018668a a1 0x80a2688f 0x80a2688f a2 0x0 0x0 a3 0x802f3094 0x802f3094 a4 0x8000319c 0x8000319c a5 0xc0202000 0xc0202000 fp 0xefe5dadc 0xefe5dadc sp 0xefe5dab4 0xefe5dab4 ps 0x300 [ I0 I1 ] pc 0x80137084 0x80137084 <<hostparm___elabs>+404> fpcontrol 0x0 0 fpstatus 0x0 0 fpiaddr 0x0 0 I’m attaching my current patch (I have copyright assignments standing), although the result is currently the same with the patch not applied. My baseline is Debian gcc-4.4 (4.4.6-2), since that contains all needed backports for working C, C++ and GCJ on m68k.
next reply other threads:[~2011-04-30 15:47 UTC|newest] Thread overview: 59+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-04-30 15:47 tg at mirbsd dot org [this message] 2011-04-30 16:25 ` [Bug ada/48835] " mikpe at it dot uu.se 2011-04-30 21:58 ` schwab@linux-m68k.org 2011-04-30 22:16 ` tg at mirbsd dot org 2011-04-30 22:20 ` tg at mirbsd dot org 2011-04-30 22:29 ` tg at mirbsd dot org 2011-05-01 7:58 ` schwab@linux-m68k.org 2011-06-10 20:55 ` tg at mirbsd dot org 2011-06-11 12:33 ` mikpe at it dot uu.se 2011-06-13 21:16 ` ebotcazou at gcc dot gnu.org 2011-06-14 8:13 ` mikpe at it dot uu.se 2011-06-14 8:44 ` ebotcazou at gcc dot gnu.org 2011-06-14 10:59 ` tg at mirbsd dot org 2011-06-14 11:28 ` ebotcazou at gcc dot gnu.org 2011-06-17 10:03 ` mikpe at it dot uu.se 2011-06-23 8:37 ` mikpe at it dot uu.se 2011-06-29 7:41 ` mikpe at it dot uu.se 2011-07-01 7:54 ` mikpe at it dot uu.se 2011-07-09 10:58 ` mikpe at it dot uu.se 2011-07-11 22:28 ` mikpe at it dot uu.se 2011-07-11 22:52 ` tg at mirbsd dot org 2011-07-12 15:44 ` mikpe at it dot uu.se 2011-07-12 17:06 ` ebotcazou at gcc dot gnu.org 2011-07-14 8:45 ` mikpe at it dot uu.se 2011-07-15 10:13 ` mikpe at it dot uu.se 2011-07-16 13:22 ` mikpe at it dot uu.se 2011-07-16 16:18 ` tg at mirbsd dot de 2011-07-17 10:19 ` mikpe at it dot uu.se 2011-07-19 9:12 ` mikpe at it dot uu.se 2011-09-10 10:15 ` mikpe at it dot uu.se 2011-09-10 13:36 ` tg at mirbsd dot org 2011-09-21 8:22 ` mikpe at it dot uu.se 2011-09-25 19:03 ` mikpe at it dot uu.se 2011-10-12 17:21 ` mikpe at it dot uu.se 2011-10-14 7:54 ` mikpe at it dot uu.se 2011-10-14 7:58 ` mikpe at it dot uu.se 2011-10-14 8:40 ` tg at mirbsd dot org 2011-10-16 13:20 ` rsandifo at gcc dot gnu.org 2011-10-17 16:26 ` mikpe at it dot uu.se 2011-10-17 20:30 ` tg at mirbsd dot org 2011-10-17 22:22 ` ebotcazou at gcc dot gnu.org 2011-11-21 10:11 ` mikpe at it dot uu.se 2011-12-07 9:59 ` mikpe at it dot uu.se 2011-12-07 11:07 ` schwab@linux-m68k.org 2011-12-07 12:04 ` mikpe at it dot uu.se 2011-12-07 12:48 ` schwab@linux-m68k.org 2011-12-07 13:10 ` schwab@linux-m68k.org 2011-12-07 21:13 ` mikpe at it dot uu.se 2011-12-08 10:05 ` mikpe at it dot uu.se 2011-12-08 16:04 ` ebotcazou at gcc dot gnu.org 2011-12-09 9:47 ` mikpe at it dot uu.se 2012-02-11 14:44 ` ebotcazou at gcc dot gnu.org 2012-03-10 0:53 ` [Bug ada/48835] porting GNAT to m68k-linux tg at mirbsd dot org 2012-03-12 22:16 ` mikpe at it dot uu.se 2013-03-20 11:06 ` mikpe at it dot uu.se 2013-03-22 14:30 ` mikpe at it dot uu.se 2014-01-06 7:40 ` ebotcazou at gcc dot gnu.org 2014-03-13 15:45 ` ebotcazou at gcc dot gnu.org 2014-05-02 16:42 ` schwab@linux-m68k.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-48835-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).