Can you do a build with debug info to get line numbers?

On Fri, Jun 26, 2009 at 1:29 PM, vikram <patilvik...@gmail.com> wrote:

>
>
> bash-3.00$ gdb src/.libs/lt-protoc
> GNU gdb 5.1.1
> Copyright 2002 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and
> you are
> welcome to change it and/or distribute copies of it under certain
> conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show warranty" for
> details.
> This GDB was configured as "powerpc-ibm-aix4.3.2.0"...(no debugging
> symbols found)...
> (gdb) run
> CHANGES.txt                   Makefile.in
> config.h.in                   depcomp
> java                          src
> CONTRIBUTORS.txt              README.txt
> config.log                    editors
> libtool                       stamp-h1
> COPYING.txt                   aclocal.m4
> config.status                 examples
> ltmain.sh                     vsprojects
> INSTALL.txt                   autogen.sh
> config.sub                    generate_descriptor_proto.sh
> m4                            warning.txt
> Makefile                      config.guess
> configure                     gtest                         missing
> Makefile.am                   config.h
> configure.ac                  install-sh                    python
> (gdb) run
> CHANGES.txt                   Makefile.in
> config.h.in                   depcomp
> java                          src
> CONTRIBUTORS.txt              README.txt
> config.log                    editors
> libtool                       stamp-h1
> COPYING.txt                   aclocal.m4
> config.status                 examples
> ltmain.sh                     vsprojects
> INSTALL.txt                   autogen.sh
> config.sub                    generate_descriptor_proto.sh
> m4                            warning.txt
> Makefile                      config.guess
> configure                     gtest                         missing
> Makefile.am                   config.h
> configure.ac                  install-sh                    python
> (gdb) run src/g
> generated_message_reflection.lo  google
> gzip_stream.lo
> (gdb) run src/google/protobuf/test
> test.proto    test1.proto   test_util.cc  test_util.h   testdata
> testing
> (gdb) run src/google/protobuf/test.proto --cpp_out=.
> Starting program: /work/vpatil/protobuf-2.1.0/src/.libs/lt-protoc src/
> google/protobuf/test.proto --cpp_out=.
> ***********************************
> HOST: Undefined variable.
> (no debugging symbols found)...(no debugging symbols found)...(no
> debugging symbols found)...(no debugging symbols found)...(no
> debugging symbols found)...(no debugging symbols found)...
> (no debugging symbols found)...(no debugging symbols found)...(no
> debugging symbols found)...(no debugging symbols found)...(no
> debugging symbols found)...(no debugging symbols found)...
>
> Program received signal SIGINT, Interrupt.
> 0xd1cfe90c in __384 () from /work/vpatil/protobuf-2.1.0/src/.libs/
> libprotobuf.a(libprotobuf.so.4)
> (gdb) backtrace
> #0  0xd1cfe90c in __384 () from /work/vpatil/protobuf-2.1.0/src/.libs/
> libprotobuf.a(libprotobuf.so.4)
> #1  0xd1cfe900 in __384 () from /work/vpatil/protobuf-2.1.0/src/.libs/
> libprotobuf.a(libprotobuf.so.4)
> #2  0xd1d056c0 in __384 () from /work/vpatil/protobuf-2.1.0/src/.libs/
> libprotobuf.a(libprotobuf.so.4)
> #3  0xd1d0bd48 in
> google::protobuf::compiler::SourceLocationTable::__ct () from /work/
> vpatil/protobuf-2.1.0/src/.libs/libprotobuf.a(libprotobuf.so.4)
> #4  0xd1d128b8 in
>
> ParseType__Q4_6google8protobuf8compiler6ParserFPQ3_6google8protobuf25FieldDescriptorProto_TypePQ2_3std12basic_stringXTcTQ2_3std11char_traitsXTc_TQ2_3std9allocatorXTc__
> ()
>   from /work/vpatil/protobuf-2.1.0/src/.libs/libprotobuf.a
> (libprotobuf.so.4)
> #5  0xd1d13f64 in
>
> ParseMessageField__Q4_6google8protobuf8compiler6ParserFPQ3_6google8protobuf20FieldDescriptorProtoPQ3_6google8protobuf16RepeatedPtrFieldXTQ3_6google8protobuf15DescriptorProto_
> ()
>    from /work/vpatil/protobuf-2.1.0/src/.libs/libprotobuf.a
> (libprotobuf.so.4)
> #6  0xd1d13a8c in
> google::protobuf::compiler::Parser::ParseMessageStatement () from /
> work/vpatil/protobuf-2.1.0/src/.libs/libprotobuf.a(libprotobuf.so.4)
> #7  0xd1d13bfc in
> google::protobuf::compiler::Parser::ParseMessageBlock () from /work/
> vpatil/protobuf-2.1.0/src/.libs/libprotobuf.a(libprotobuf.so.4)
> #8  0xd1d137c4 in
> google::protobuf::compiler::Parser::ParseMessageDefinition () from /
> work/vpatil/protobuf-2.1.0/src/.libs/libprotobuf.a(libprotobuf.so.4)
> #9  0xd1d14ffc in
> google::protobuf::compiler::Parser::ParseTopLevelStatement () from /
> work/vpatil/protobuf-2.1.0/src/.libs/libprotobuf.a(libprotobuf.so.4)
> #10 0xd1d15754 in google::protobuf::compiler::Parser::Parse () from /
> work/vpatil/protobuf-2.1.0/src/.libs/libprotobuf.a(libprotobuf.so.4)
> #11 0xd1d2bbac in
>
> FindFileByName__Q4_6google8protobuf8compiler28SourceTreeDescriptorDatabaseFRCQ2_3std12basic_stringXTcTQ2_3std11char_traitsXTc_TQ2_3std9allocatorXTc
> ()
>   from /work/vpatil/protobuf-2.1.0/src/.libs/libprotobuf.a
> (libprotobuf.so.4)
> #12 0xd1b39f88 in
>
> TryFindFileInFallbackDatabase__Q3_6google8protobuf14DescriptorPoolCFRCQ2_3std12basic_stringXTcTQ2_3std11char_traitsXTc_TQ2_3std9allocatorXTc__
> ()
>   from /work/vpatil/protobuf-2.1.0/src/.libs/libprotobuf.a
> (libprotobuf.so.4)
> #13 0xd1b3a2c8 in
>
> FindFileByName__Q3_6google8protobuf14DescriptorPoolCFRCQ2_3std12basic_stringXTcTQ2_3std11char_traitsXTc_TQ2_3std9allocatorXTc__
> ()
>   from /work/vpatil/protobuf-2.1.0/src/.libs/libprotobuf.a
> (libprotobuf.so.4)
> #14 0xd1d2a0c8 in
>
> Import__Q4_6google8protobuf8compiler8ImporterFRCQ2_3std12basic_stringXTcTQ2_3std11char_traitsXTc_TQ2_3std9allocatorXTc__
> ()
>   from /work/vpatil/protobuf-2.1.0/src/.libs/libprotobuf.a
> (libprotobuf.so.4)
> #15 0xd1755298 in
> google::protobuf::compiler::CommandLineInterface::Run () from /work/
> vpatil/protobuf-2.1.0/src/.libs/libprotoc.a(libprotoc.so.4)
> #16 0x10002734 in main ()
> #17 0x100001c4 in __start ()
>
>
> This one is what I found out when I debugged created binary using gdb.
> So code is stuck somewhere here.
>
> Vikram
>
>
>
> On Jun 26, 12:39 pm, vikram <patilvik...@gmail.com> wrote:
> > Yes I am using v 2.1.0
> >
> > I provided compiler option "-qrtti=all "  . So compilation went
> > smoothly but last step where
> > protoc is uses proto files seems like running in infinite loop. I am
> > currently looking at it
> >
> > Vikram
> >
> > On Jun 26, 12:32 pm, Kenton Varda <ken...@google.com> wrote:
> >
> > > On Thu, Jun 25, 2009 at 6:59 PM, vikram <patilvik...@gmail.com> wrote:
> >
> > > > Hello guys,
> >
> > > >       I am actually attempting to compile protocol buffer source on
> > > > AIX 5.3 and xlC 3.55 .
> > > > It seems that I am able to compile it correctly but when it tried to
> > > > use created protoc compiler it fails.
> > > > So following it the snapshot of what happens when I do make.
> basically
> > > > it can not replace ./$^ with appropriate prerequisites
> >
> > > Yeah, you need to use gmake.
> >
> > > > I created this simplest proto file to check whether it works fine.
> But
> > > > when I tried tocompile it with create protoc binary ( .libs/lt-
> > > > protoc ) it blocked in infinite loop.
> >
> > > Can you run in a debugger, ctrl+c during the loop, and give me the
> stack
> > > trace?
> >
> > > > But with "option" uncommented it creates coredump
> >
> > > > ./src/.libs/lt-protoc src/google/protobuf/test.proto -I. --cpp_out=.
> > > > Assertion failed: f == NULL || dynamic_cast<To>(f) != NULL, file  ./
> > > > google/protobuf/stubs/common.h, line 282
> > > > IOT/Abort trap (core dumped)
> >
> > > You are using v2.1.0, right?
> >
> > > Does your compiler support RTTI?
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to protobuf@googlegroups.com
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to