]> git.pld-linux.org Git - packages/gdb.git/blob - gdb-bz634660-gdbpy-load-on-attach.patch
- updated (performance fixes).
[packages/gdb.git] / gdb-bz634660-gdbpy-load-on-attach.patch
1 http://sourceware.org/ml/gdb-patches/2010-09/msg00365.html
2 Subject: [patch] python: load *-gdb.py for shlibs during attach
3
4 Hi,
5
6 currently if you attach to or load a core file for executable, its -gdb.py
7 script is loaded.  But none -gdb.py for the shared libraries.
8
9 Spawned or with the fix (libstdc++-gdb.py):
10 #1  0x00000000004007b5 in f (s="a") at 1.C:4
11                              ^ is std::string
12
13 Attached/core without the fix:
14 #1  0x00000000004007b5 in f (s=...) at 1.C:4
15
16 No regressions on {x86_64,x86_64-m32,i686}-fedora13-linux-gnu.
17
18 Mostly obvious, I will check it in later.
19
20
21 Thanks,
22 Jan
23
24
25 gdb/
26 2010-09-22  Jan Kratochvil  <jan.kratochvil@redhat.com>
27
28         * main.c: Include objfiles.h.
29         (captured_main): New variable objfile.  Call
30         load_auto_scripts_for_objfile for ALL_OBJFILES.
31
32 --- ./gdb/main.c        2010-09-22 10:51:32.000000000 +0200
33 +++ ./gdb/main.c        2010-09-22 10:50:44.000000000 +0200
34 @@ -43,6 +43,7 @@
35  #include "source.h"
36  #include "cli/cli-cmds.h"
37  #include "python/python.h"
38 +#include "objfiles.h"
39  
40  /* The selected interpreter.  This will be used as a set command
41     variable, so it should always be malloc'ed - since
42 @@ -323,6 +324,7 @@ captured_main (void *data)
43  
44    int i;
45    int save_auto_load;
46 +  struct objfile *objfile;
47  
48    struct cleanup *pre_stat_chain = make_command_stats_cleanup (0);
49  
50 @@ -957,8 +959,8 @@ Can't attach to process and specify a co
51       We wait until now because it is common to add to the source search
52       path in local_gdbinit.  */
53    gdbpy_global_auto_load = save_auto_load;
54 -  if (symfile_objfile != NULL)
55 -    load_auto_scripts_for_objfile (symfile_objfile);
56 +  ALL_OBJFILES (objfile)
57 +    load_auto_scripts_for_objfile (objfile);
58  
59    for (i = 0; i < ncmd; i++)
60      {
61
This page took 0.031385 seconds and 3 git commands to generate.