This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] DW_AT_calling_convention support


> > "The DW_CC_program value is intended to support Fortran main programs.
> > It is not intended as
> > a way of finding the entry address for the program."
> > 
> > So the answer is yes and no. But I think the patch is valid as it
> > determines not the entry point, but the main program. As far as I am
> > aware you can have only one PROGRAM entry per FORTRAN program. If there
> > is more than one found, the patch just uses the last read entry. I don't
> > think supporting a more intricate way would be much use (such as keeping
> > a list of DW_CC_program entries.)
> 
> What's the difference between the entry point and the main program?

I would imagine the thinking is executables that can act as both shared 
libs, and as main programs (IE they have one entry point used when loaded 
as a module, one when used as loaded as a program).
A not-so-clear example of this would be a C++ program that can act as a 
shared lib and an executable.

As a shared lib, it probably has some automatically run by the 
runtime linker entry point that deals with exception registration and 
whatnot, but as a main program, this is probably done from main.

Thus, the main program is "main", but the entry points are "main" and 
"initialize_exceptions".
> 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]