HI
   i am using the following flags, which is nothing but rtl.mk file which is
auto mativcally generated by
     RTLInux Make file.
   i am sending my make file at the end.
Could u pls tell me  whether can i use this as it is.
    i tried   by removing  optimization option, -O2. then i its compiled
fine.
    and when i was trying to insert the module, its giving some
    errors like unresolved syblos related to thread attibutes, and its not
yet all loading
    into the kernel.

  and i also included my make file after this.
Could u pls any one tell me what are the things i have to remove from  this
CFLAGS list,
 to debug my rtlinux module programme, and also i want to access all my
symbols in my progrramme.

advance thamnks
chandu
---------------------------
RTL_DIR = /usr/src/rtlinux-3.0
RTLINUX_DIR = /usr/src/rtlinux-3.0/linux
INCLUDE= -I/usr/src/rtlinux-3.0/linux/include -I/usr/src/rtlinux-3.0/include
 -I/usr/src/rtlinux-3.0/include/compat
CFLAGS
= -D__KERNEL__ -Wall -Wstrict-prototypes -fno-strict-aliasing -D__SMP__ -pip
e -fno-strength-reduce -m486 -malign-loops=2 -malign-jumps=2 -malign-functio
ns=2 -DCPU=586 -g -D__RTL__ -DMODULE -D_LOOSE_KERNEL_NAMES -O2 -I/usr/src/rt
linux-3.0/linux/include -I/usr/src/rtlinux-3.0/include -I/usr/src/rtlinux-3.
0/include/compat -I/usr/src/rtlinux-3.0/include/posix
ARCH = i386
CC = cc
CXXFLAGS
= -D__KERNEL__ -Wall -Wstrict-prototypes -fno-strict-aliasing -D__SMP__ -pip
e -fno-strength-reduce -m486 -malign-loops=2 -malign-jumps=2 -malign-functio
ns=2 -DCPU=586 -g -D__RTL__ -DMODULE -D_LOOSE_KERNEL_NAMES -fno-exceptions -
fno-rtti


AND MY make file is as follws:

-----------------------------------------
all: temp.o

MYCFLAGS = -O2 -Wall
include /usr/src/rtlinux-3.0/rtl.mk


temp.o: tempc1c1.o tempc1t1.o
        ld -r -o tempc.o tempc1c1.o tempc1t1.o

tempc1c1.o: tempc1c1.c
        $(CC) ${INCLUDE} ${CFLAGS} -c tempc1c1.c

tempc1t1.o: tempc1t1.c
        $(CC) ${INCLUDE} ${CFLAGS} -c tempc1t1.c
-------------------------------------------------------------


----- Original Message -----
From: Joel Vallier <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; Joel Vallier <[EMAIL PROTECTED]>
Sent: Friday, June 22, 2001 8:24 AM
Subject: Re: [rtl] Re: regd RTL debugger


> Michael Barabanov wrote:
> >
> > >  whether it is possible to use one module rtl_debug.o to debug
different modules
> > >  separately used by two people, i faced probelm while doing this.
> >
> > No, it's not possible. There's no concept of ownership of RTLinux
> > threads; only root can create them anyway.
> >
> > > i am unable to set or print the varianbles some times  via gdb ( just
command line , not using GDB)
> > > like the context is as follws
> > >  1) global variables of a file( assume here i am having only one file)
in a module
> >
> > Probably a bug in gdb. Try explicitely initializing your global
variables,
> > for example to 0.
> >
> Hi,
>
> Modules must be compiled with the "-fno-common" option. Else, GDB
> won't find informations concerning global uninitialized variables.
> Moreover, this option prevent multiple global data definition.
>
> Standard GDB 5.0 failed to locate global variables when we load
> modules with add-symbol-file command. Indeed, it takes the ".text"
> section offset to compute address of global initialized variables
> instead of using the offset of ".data" section.
>
> To fix this problem we have to path GDB (see below).
>
> This patch is a concatenation of 2 patchs from the mailing list at
> http://sourceware.cygnus.com/gdb:
>
> 2000-05-04  Elena Zannoni  <[EMAIL PROTECTED]>
>
>         * elfread.c (elf_symtab_read): The calculation of 'offset'
>         must be done for each symbol, not just once. The index
>         used must be the index of the section where 'sym' resides,
>         not .text.
>
> 2000-05-09  Elena Zannoni  <[EMAIL PROTECTED]>
>
>         * elfread.c (record_minimal_symbol_and_info): Use the section
>         where the symbol lives to get the index, instead of guessing.
>
> Joel
>
> Note: You need to compile your module without -fomit-frame-pointer
>       as Michael said.
>
> ----------------------------------
> Here is the patch:
>
> diff -Nru gdb-5.0/gdb/elfread.c gdb-5.0-patch/gdb/elfread.c
> --- gdb-5.0/gdb/elfread.c Tue Feb 15 05:48:23 2000
> +++ gdb-5.0-patch/gdb/elfread.c Mon Nov 13 09:19:00 2000
> @@ -191,18 +191,16 @@
>      {
>      case mst_text:
>      case mst_file_text:
> -      section = SECT_OFF_TEXT;
> +      section = bfd_section->index;
>  #ifdef SMASH_TEXT_ADDRESS
>        SMASH_TEXT_ADDRESS (address);
>  #endif
>        break;
>      case mst_data:
>      case mst_file_data:
> -      section = SECT_OFF_DATA;
> -      break;
>      case mst_bss:
>      case mst_file_bss:
> -      section = SECT_OFF_BSS;
> +      section = bfd_section->index;
>        break;
>      default:
>        section = -1;
> @@ -293,8 +291,7 @@
>        if (number_of_symbols < 0)
>   error ("Can't read symbols from %s: %s", bfd_get_filename
(objfile->obfd),
>          bfd_errmsg (bfd_get_error ()));
> -      /* FIXME: Should use section specific offset, not SECT_OFF_TEXT. */
> -      offset = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT);
> +
>        for (i = 0; i < number_of_symbols; i++)
>   {
>     sym = symbol_table[i];
> @@ -305,6 +302,7 @@
>         continue;
>       }
>
> +   offset = ANOFFSET (objfile->section_offsets, sym->section->index);
>     if (dynamic
>         && sym->section == &bfd_und_section
>         && (sym->flags & BSF_FUNCTION))
>
> ----- End of forwarded message from [EMAIL PROTECTED] -----
> -- [rtl] ---
> To unsubscribe:
> echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
> echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
> --
> For more information on Real-Time Linux see:
> http://www.rtlinux.org/rtlinux/
>

----- End of forwarded message from [EMAIL PROTECTED] -----
-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
--
For more information on Real-Time Linux see:
http://www.rtlinux.org/

Reply via email to