This is the mail archive of the gdb-testers@sourceware.org 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]

[binutils-gdb] Set emacs default mode for the GDB directory to C++


*** TEST RESULTS FOR COMMIT ff71884063d048e8f8c03de27d2bac343df4f77a ***

Author: Antoine Tremblay <antoine.tremblay@ericsson.com>
Branch: master
Commit: ff71884063d048e8f8c03de27d2bac343df4f77a

Set emacs default mode for the GDB directory to C++

Since GDB has switched to C++ but the file names are still .c emacs does
not load the proper mode when opening files in the gdb directory.

This patch fixes that by enabling c++ mode.

This patch also fixes indentation tweaks as discussed in this thread:
https://sourceware.org/ml/gdb-patches/2016-12/msg00074.html

Indent with gdb-code-style.el included and the .dir-locals.el is as such:

namespace TestNameSpace {

class test
{
public:
  test test() {}

  int m_a;
};

struct teststruct
{
  int a;
}
}

gdb/ChangeLog:

	* .dir-locals.el: Set c++ mode for the directory and set indent
	properly.
	* gdb-code-style.el: Set c-set-offset 'innamespace as a safe value
	to be used in .dir-locals.el.


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