cvs commit: src/gnu/usr.bin/gdb/kgdb kgdb.h kld.c trgt.c

John Baldwin jhb at FreeBSD.org
Mon Jan 28 13:40:10 PST 2008


jhb         2008-01-28 21:40:10 UTC

  FreeBSD src repository

  Modified files:
    gnu/usr.bin/gdb/kgdb kgdb.h kld.c trgt.c 
  Log:
  Add support for automatically loading symbols for kld's on startup:
  - Add a new 'kgdb_auto_load_klds()' routine which is invoked during
    startup that walks the list of linker files and tries to find a matching
    kld on disk for each non-kernel kld.  If a kld file is found, then it
    is added as if the 'add-kld' command is invoked.  One change from
    'add-kld' is that this method attempts to use the 'pathname' from the
    linker_file structure first to try to load the file.  If that fails
    it then looks in the kernel directory followed by the directories in
    the module path.
  - Move the kld file suffix handling into a separate routine so that it
    can be called standalone and to reduce duplicate code in find_kld_path().
  - Cache the offsets of members of 'struct linker_file' during startup
    instead of computing them for each 'add-kld'.
  - Use GDB's target_read_string() instead of direct KVM access.
  - Add all resident sections from a kld by using bfd_map_over_sections() to
    build the section list rather than just adding symbols for ".text",
    ".data", ".bss", and ".rodata".
  - Change the 'add-kld' command to do a y/n prompt before adding the
    symbols when run interactively to match 'add-symbol-file'.
  
  MFC after:      1 week
  
  Revision  Changes    Path
  1.9       +1 -0      src/gnu/usr.bin/gdb/kgdb/kgdb.h
  1.2       +243 -137  src/gnu/usr.bin/gdb/kgdb/kld.c
  1.8       +1 -0      src/gnu/usr.bin/gdb/kgdb/trgt.c


More information about the cvs-all mailing list