public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Release symbol file
@ 2004-09-22 11:11 Fabian Cenedese
  2004-09-22 14:20 ` Michael Chastain
  0 siblings, 1 reply; 7+ messages in thread
From: Fabian Cenedese @ 2004-09-22 11:11 UTC (permalink / raw)
  To: gdb

Hi

I know that gdb tries to optimize disc accesses by first reading only the
minimal symbols and only complete them upon request. Is there a
possibility to read in the whole file and release it so the tool chain
can overwrite it? Or do I need to do stuff like copying the file and read
this into gdb so the original can be overwritten?

Thanks

bye  Fabi


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Release symbol file
  2004-09-22 11:11 Release symbol file Fabian Cenedese
@ 2004-09-22 14:20 ` Michael Chastain
  2004-09-22 14:30   ` Fabian Cenedese
  0 siblings, 1 reply; 7+ messages in thread
From: Michael Chastain @ 2004-09-22 14:20 UTC (permalink / raw)
  To: gdb, Cenedese

Fabian Cenedese <Cenedese@indel.ch> wrote:
> I know that gdb tries to optimize disc accesses by first reading only the
> minimal symbols and only complete them upon request. Is there a
> possibility to read in the whole file and release it so the tool chain
> can overwrite it? Or do I need to do stuff like copying the file and read
> this into gdb so the original can be overwritten?

gdb --readnow file

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Release symbol file
  2004-09-22 14:20 ` Michael Chastain
@ 2004-09-22 14:30   ` Fabian Cenedese
  2004-09-22 15:16     ` Michael Chastain
  0 siblings, 1 reply; 7+ messages in thread
From: Fabian Cenedese @ 2004-09-22 14:30 UTC (permalink / raw)
  To: gdb


>> I know that gdb tries to optimize disc accesses by first reading only the
>> minimal symbols and only complete them upon request. Is there a
>> possibility to read in the whole file and release it so the tool chain
>> can overwrite it? Or do I need to do stuff like copying the file and read
>> this into gdb so the original can be overwritten?
>
>gdb --readnow file

Thanks, but what about the MI? I can't give switches to e.g
-file-exec-and-symbol, can I? I mean, once gdb is started. Or
do I have to stop and restart gdb every time?

Thanks

bye   Fabi


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Release symbol file
  2004-09-22 14:30   ` Fabian Cenedese
@ 2004-09-22 15:16     ` Michael Chastain
  2004-09-23  6:29       ` Fabian Cenedese
  0 siblings, 1 reply; 7+ messages in thread
From: Michael Chastain @ 2004-09-22 15:16 UTC (permalink / raw)
  To: gdb, Cenedese

Fabian Cenedese <Cenedese@indel.ch> wrote:
> Thanks, but what about the MI? I can't give switches to e.g
> -file-exec-and-symbol, can I? I mean, once gdb is started. Or
> do I have to stop and restart gdb every time?

--readnow is a global flag.  It turns on the "read now" behavior
on all future calls to symbol_file_add_with_addrs_or_offsets.

  [mec.gnu@berman gdb]$ gdb-621 --readnow
  GNU gdb 6.2.1
  Copyright 2004 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 "i686-pc-linux-gnu".
  (gdb) file /berman/migchain/install/target/native/gdb-6.2.1/bin/gdb
  Reading symbols from /berman/migchain/install/target/native/gdb-6.2.1/bin/gdb...expanding to full symbols...
  Using host libthread_db library "/lib/libthread_db.so.1".
  (gdb)

gdb does keep file descriptors open for the target program,
but it ought to have all the symbols in memory after
"expanding to full symbols".

Try it.

Michael

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Release symbol file
  2004-09-22 15:16     ` Michael Chastain
@ 2004-09-23  6:29       ` Fabian Cenedese
  2004-10-05 18:57         ` Andrew Cagney
  0 siblings, 1 reply; 7+ messages in thread
From: Fabian Cenedese @ 2004-09-23  6:29 UTC (permalink / raw)
  To: gdb


>> Thanks, but what about the MI? I can't give switches to e.g
>> -file-exec-and-symbol, can I? I mean, once gdb is started. Or
>> do I have to stop and restart gdb every time?
>
>--readnow is a global flag.  It turns on the "read now" behavior
>on all future calls to symbol_file_add_with_addrs_or_offsets.
>
>gdb does keep file descriptors open for the target program,
>but it ought to have all the symbols in memory after
>"expanding to full symbols".

I'm not concerned about the symbols but about the file access.
Even when started with "gdb --readnow -i mi" and load a file
I can't delete that file anymore. As I want to recreate it without
unloading from gdb I guess I need to make a copy then.

Thanks

bye  Fabi


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Release symbol file
  2004-09-23  6:29       ` Fabian Cenedese
@ 2004-10-05 18:57         ` Andrew Cagney
  2004-10-06  6:53           ` Fabian Cenedese
  0 siblings, 1 reply; 7+ messages in thread
From: Andrew Cagney @ 2004-10-05 18:57 UTC (permalink / raw)
  To: Fabian Cenedese; +Cc: gdb

>>>>> Thanks, but what about the MI? I can't give switches to e.g
>>>>> -file-exec-and-symbol, can I? I mean, once gdb is started. Or
>>>>> do I have to stop and restart gdb every time?
>>
>>>
>>>--readnow is a global flag.  It turns on the "read now" behavior
>>>on all future calls to symbol_file_add_with_addrs_or_offsets.
>>>
>>>gdb does keep file descriptors open for the target program,
>>>but it ought to have all the symbols in memory after
>>>"expanding to full symbols".
> 
> 
> I'm not concerned about the symbols but about the file access.
> Even when started with "gdb --readnow -i mi" and load a file
> I can't delete that file anymore. As I want to recreate it without
> unloading from gdb I guess I need to make a copy then.

How recent is your GDB?  Jerome Guitton (2004-08-10) modified GDB so 
that it would always close these object files.

Andrew


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Release symbol file
  2004-10-05 18:57         ` Andrew Cagney
@ 2004-10-06  6:53           ` Fabian Cenedese
  0 siblings, 0 replies; 7+ messages in thread
From: Fabian Cenedese @ 2004-10-06  6:53 UTC (permalink / raw)
  To: gdb


>>>>--readnow is a global flag.  It turns on the "read now" behavior
>>>>on all future calls to symbol_file_add_with_addrs_or_offsets.
>>>>
>>>>gdb does keep file descriptors open for the target program,
>>>>but it ought to have all the symbols in memory after
>>>>"expanding to full symbols".
>>
>>I'm not concerned about the symbols but about the file access.
>>Even when started with "gdb --readnow -i mi" and load a file
>>I can't delete that file anymore. As I want to recreate it without
>>unloading from gdb I guess I need to make a copy then.
>
>How recent is your GDB?  Jerome Guitton (2004-08-10) modified GDB so that it would always close these object files.

I have (or had) a gdb-6.1.1. But as this has problems with PPC I
need to try a newer version anyway. I guess I have 2 reasons now :)

Thanks

bye  Fabi


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2004-10-06  6:14 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-22 11:11 Release symbol file Fabian Cenedese
2004-09-22 14:20 ` Michael Chastain
2004-09-22 14:30   ` Fabian Cenedese
2004-09-22 15:16     ` Michael Chastain
2004-09-23  6:29       ` Fabian Cenedese
2004-10-05 18:57         ` Andrew Cagney
2004-10-06  6:53           ` Fabian Cenedese

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).