From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM,WEIRD_PORT autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,79d422601576e972 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!feeder.news-service.com!feeder.news-service.com!news.motzarella.org!motzarella.org!not-for-mail From: Sebastien Morand Newsgroups: comp.lang.ada Subject: Re: AWS issue Date: Sun, 18 May 2008 11:51:51 +0000 Organization: A noiseless patient Spider Message-ID: <48301857.5090609@gmail.com> References: <4830012E.1080504@bredband.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: feeder.motzarella.org U2FsdGVkX1/JEt1lQhD9kejnRprU0FVbiojC44uga22V8YnC1lq8p+NAgem/Gx3pTqZa4wcLok/Py9K0ZwojPZirjiFH06k2NZehtRIaU/skHMjt3umpQ9XDEQaIqEAfPLxYhmsgyXo= X-Complaints-To: Please send complaints to abuse@motzarella.org with full headers NNTP-Posting-Date: Sun, 18 May 2008 11:49:41 +0000 (UTC) In-Reply-To: X-Auth-Sender: U2FsdGVkX187cE/WFwbY5MNmHKBnOuAj3C8w50Eq+4Q= Cancel-Lock: sha1:TqJM1VRRHKLsFMLa8PozG7SLPnk= User-Agent: Thunderbird 2.0.0.12 (X11/20080406) Xref: g2news1.google.com comp.lang.ada:200 Date: 2008-05-18T11:51:51+00:00 List-Id: Debugger for ada is not installed, so I can run the debugger, but the only answer I get is exit code 01. About addr2line, here is what I got: $ addr2line -e hello_world 0x28188ac9 0x2818a535 0x2819196a 0x28183cac 0x2819bd94 0x2819e324 0x804d184 0x804d022 0x804c987??:0 ??:0 ??:0 ??:0 ??:0 ??:0 /mnt/programs/opt/src/AWS-gpl-2.3.0/demos/hello_world.adb:43 /mnt/programs/opt/src/AWS-gpl-2.3.0/.build/release/demos/obj/b~hello_world.adb:447 ??:0 The problem is /mnt/programs/opt/src/AWS-gpl-2.3.0/.build/release/demos/obj/b~hello_world.adb does not exist :-) So finally I tried the third solutions: Adding exception when e : others => Ada.Text_Io.Put_Line (GNAT.Traceback.Symbolic. Symbolic_Traceback(E)); at the end of the program. So I got the two errors: /usr/bin/ld: Unable to find -laddr2line /usr/bin/ld: Unable to find -lbfd So I use addr2line/*.o and bfd/*.o in the FreeBSD source tree to create the lib and then... convert_addresses was missing. I found out in gcc source tree the following: in ada/adaint.c: /* Dummy function to satisfy g-trasym.o. See the preprocessor conditional just above for a list of native platforms that provide a non-dummy version of this procedure in libaddr2line.a. */ void convert_addresses (const char *file_name ATTRIBUTE_UNUSED, void *addrs ATTRIBUTE_UNUSED, int n_addr ATTRIBUTE_UNUSED, void *buf ATTRIBUTE_UNUSED, int *len ATTRIBUTE_UNUSED) { *len = 0; } So I compile a single file with this function and link with all that stuff. And compile was fine but no error anymore. I think the empty code of the function convert_addresses if the point. If you have a code more appropriate, I think I hope I'll be able to get GNAT.Traceback.Symbolic.Symbolic_Traceback(E) working. > Hi. > First: > At a glance it seems like you are missing -gnat05 in the compile command > so you get and Ada95 compiler instead of Ada (Ada05) compiler. > > And the second just a hint: > 3 options to start debugging: > * Use the debugger. > * Do an addr2line -e httpd 0x28188ac9 0x2818a535 0x2819196a .. > * Last in your main program add a handler that proints > exception > when e : others => > Ada.Text_Io.Put_Line > (GNAT.Traceback.Symbolic. > Symbolic_Traceback(E)); > > Sebastien Morand wrote: >> Hi, >> >> I've got two problems on AWS, hope there is some aws 2.3 users here. >> I'm under FreeBSD 7.0-STABLE running gnat and gcc 4.3 >> >> First, there are lines that doesn't compile, I think it's more an ada >> issue about some think I miss that an AWS issue: >> >> $ gnatmake --GCC=gcc-ada -P *gpr && ./httpd >> gcc-ada -c -I- -gnatA >> /mnt/programs/home/sebastien/workspaces/httpd/src/httpd/httpd.adb >> httpd.adb:65:06: no selector "Initialize" for private type "Handler" >> defined at aws-services-dispatchers-uri.ads:41 >> httpd.adb:66:06: no selector "Initialize" for private type "Handler" >> defined at aws-services-dispatchers-virtual_host.ads:39 >> gnatmake: >> "/mnt/programs/home/sebastien/workspaces/httpd/src/httpd/httpd.adb" >> compilation error >> >> The lines are the following: >> 60 H: AWS.Services.Dispatchers.URI.Handler; >> 61 V: AWS.Services.Dispatchers.Virtual_Host.Handler; >> 62 C: AWS.Config.Object := AWS.Config.Default_Config; >> 63 >> 64 begin >> 65 H.Initialize; >> 66 V.Initialize; >> >> What I don't understand is that AWS.Services.Dispatchers.URI.Handler; >> is a new AWS.Dispatchers.Handler and Initialize is defined for >> AWS.Dispatchers.Handler type, so it should be ok. >> >> >> Second I'm not able to run AWS tests, I got the following for the >> hello_world demo : >> $ ./hello_world >> Call me on port 8080, I will stop in 60 seconds... >> >> Execution terminated by unhandled exception >> Exception name: AWS.NET.SOCKET_ERROR >> Message: Connect : [47] Address family not supported by protocol family >> Call stack traceback locations: >> 0x28188ac9 0x2818a535 0x2819196a 0x28183cac 0x2819bd94 0x2819e324 >> 0x804d184 0x804d022 0x804c987 >> >> So, Could it be some mistakes in my gnat installation about socket? >> >> Sebastien